@soga/entities 1.0.0 → 1.3.1

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,112 @@
1
+ "use strict";
2
+ var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
3
+ var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
4
+ if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
5
+ else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
6
+ return c > 3 && r && Object.defineProperty(target, key, r), r;
7
+ };
8
+ var __metadata = (this && this.__metadata) || function (k, v) {
9
+ if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
10
+ };
11
+ Object.defineProperty(exports, "__esModule", { value: true });
12
+ exports.UploadPart = void 0;
13
+ const types_1 = require("@soga/types");
14
+ const typeorm_1 = require("typeorm");
15
+ let UploadPart = class UploadPart {
16
+ id;
17
+ uid;
18
+ file_id;
19
+ root_id;
20
+ part_name;
21
+ is_paused;
22
+ output_root;
23
+ info;
24
+ host_id;
25
+ host_type;
26
+ upload_status;
27
+ upload_percent;
28
+ upload_result;
29
+ updated_at;
30
+ created_at;
31
+ };
32
+ exports.UploadPart = UploadPart;
33
+ __decorate([
34
+ (0, typeorm_1.PrimaryGeneratedColumn)(),
35
+ __metadata("design:type", Number)
36
+ ], UploadPart.prototype, "id", void 0);
37
+ __decorate([
38
+ (0, typeorm_1.Index)(),
39
+ (0, typeorm_1.Column)(),
40
+ __metadata("design:type", Number)
41
+ ], UploadPart.prototype, "uid", void 0);
42
+ __decorate([
43
+ (0, typeorm_1.Index)(),
44
+ (0, typeorm_1.Column)(),
45
+ __metadata("design:type", Number)
46
+ ], UploadPart.prototype, "file_id", void 0);
47
+ __decorate([
48
+ (0, typeorm_1.Index)(),
49
+ (0, typeorm_1.Column)(),
50
+ __metadata("design:type", Number)
51
+ ], UploadPart.prototype, "root_id", void 0);
52
+ __decorate([
53
+ (0, typeorm_1.Index)(),
54
+ (0, typeorm_1.Column)({ default: '' }),
55
+ __metadata("design:type", String)
56
+ ], UploadPart.prototype, "part_name", void 0);
57
+ __decorate([
58
+ (0, typeorm_1.Column)({ default: false }),
59
+ __metadata("design:type", Boolean)
60
+ ], UploadPart.prototype, "is_paused", void 0);
61
+ __decorate([
62
+ (0, typeorm_1.Column)(),
63
+ __metadata("design:type", String)
64
+ ], UploadPart.prototype, "output_root", void 0);
65
+ __decorate([
66
+ (0, typeorm_1.Column)('json'),
67
+ __metadata("design:type", Object)
68
+ ], UploadPart.prototype, "info", void 0);
69
+ __decorate([
70
+ (0, typeorm_1.Index)(),
71
+ (0, typeorm_1.Column)(),
72
+ __metadata("design:type", Number)
73
+ ], UploadPart.prototype, "host_id", void 0);
74
+ __decorate([
75
+ (0, typeorm_1.Index)(),
76
+ (0, typeorm_1.Column)({
77
+ type: 'simple-enum',
78
+ enum: types_1.HostType,
79
+ }),
80
+ __metadata("design:type", String)
81
+ ], UploadPart.prototype, "host_type", void 0);
82
+ __decorate([
83
+ (0, typeorm_1.Index)(),
84
+ (0, typeorm_1.Column)({
85
+ type: 'simple-enum',
86
+ enum: types_1.NormalStatus,
87
+ default: types_1.NormalStatus.NULL,
88
+ }),
89
+ __metadata("design:type", Number)
90
+ ], UploadPart.prototype, "upload_status", void 0);
91
+ __decorate([
92
+ (0, typeorm_1.Column)({ default: 0, type: 'decimal' }),
93
+ __metadata("design:type", Number)
94
+ ], UploadPart.prototype, "upload_percent", void 0);
95
+ __decorate([
96
+ (0, typeorm_1.Column)({
97
+ type: 'json',
98
+ default: '{}',
99
+ }),
100
+ __metadata("design:type", Object)
101
+ ], UploadPart.prototype, "upload_result", void 0);
102
+ __decorate([
103
+ (0, typeorm_1.UpdateDateColumn)(),
104
+ __metadata("design:type", Date)
105
+ ], UploadPart.prototype, "updated_at", void 0);
106
+ __decorate([
107
+ (0, typeorm_1.CreateDateColumn)(),
108
+ __metadata("design:type", Date)
109
+ ], UploadPart.prototype, "created_at", void 0);
110
+ exports.UploadPart = UploadPart = __decorate([
111
+ (0, typeorm_1.Entity)()
112
+ ], UploadPart);
@@ -0,0 +1,14 @@
1
+ export declare enum UploadRunningType {
2
+ ENCODE = "encode",
3
+ UPLOAD = "upload"
4
+ }
5
+ export declare class UploadRunning {
6
+ id: number;
7
+ uid: number;
8
+ type: UploadRunningType;
9
+ root_id: number;
10
+ file_id: number;
11
+ part_id: number;
12
+ created_at: Date;
13
+ }
14
+ //# sourceMappingURL=upload-running.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"upload-running.d.ts","sourceRoot":"","sources":["../src/upload-running.ts"],"names":[],"mappings":"AASA,oBAAY,iBAAiB;IAC3B,MAAM,WAAW;IACjB,MAAM,WAAW;CAClB;AAED,qBACa,aAAa;IAExB,EAAE,EAAE,MAAM,CAAC;IAGX,GAAG,EAAE,MAAM,CAAC;IAQZ,IAAI,EAAE,iBAAiB,CAAC;IAKxB,OAAO,EAAE,MAAM,CAAC;IAGhB,OAAO,EAAE,MAAM,CAAC;IAKhB,OAAO,EAAE,MAAM,CAAC;IAGhB,UAAU,EAAE,IAAI,CAAC;CAClB"}
@@ -0,0 +1,68 @@
1
+ "use strict";
2
+ var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
3
+ var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
4
+ if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
5
+ else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
6
+ return c > 3 && r && Object.defineProperty(target, key, r), r;
7
+ };
8
+ var __metadata = (this && this.__metadata) || function (k, v) {
9
+ if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
10
+ };
11
+ Object.defineProperty(exports, "__esModule", { value: true });
12
+ exports.UploadRunning = exports.UploadRunningType = void 0;
13
+ const typeorm_1 = require("typeorm");
14
+ var UploadRunningType;
15
+ (function (UploadRunningType) {
16
+ UploadRunningType["ENCODE"] = "encode";
17
+ UploadRunningType["UPLOAD"] = "upload";
18
+ })(UploadRunningType || (exports.UploadRunningType = UploadRunningType = {}));
19
+ let UploadRunning = class UploadRunning {
20
+ id;
21
+ uid;
22
+ type;
23
+ root_id;
24
+ file_id;
25
+ part_id;
26
+ created_at;
27
+ };
28
+ exports.UploadRunning = UploadRunning;
29
+ __decorate([
30
+ (0, typeorm_1.PrimaryGeneratedColumn)(),
31
+ __metadata("design:type", Number)
32
+ ], UploadRunning.prototype, "id", void 0);
33
+ __decorate([
34
+ (0, typeorm_1.Column)(),
35
+ __metadata("design:type", Number)
36
+ ], UploadRunning.prototype, "uid", void 0);
37
+ __decorate([
38
+ (0, typeorm_1.Index)(),
39
+ (0, typeorm_1.Column)({
40
+ type: 'simple-enum',
41
+ enum: UploadRunningType,
42
+ nullable: true,
43
+ }),
44
+ __metadata("design:type", String)
45
+ ], UploadRunning.prototype, "type", void 0);
46
+ __decorate([
47
+ (0, typeorm_1.Column)({
48
+ default: 0,
49
+ }),
50
+ __metadata("design:type", Number)
51
+ ], UploadRunning.prototype, "root_id", void 0);
52
+ __decorate([
53
+ (0, typeorm_1.Column)(),
54
+ __metadata("design:type", Number)
55
+ ], UploadRunning.prototype, "file_id", void 0);
56
+ __decorate([
57
+ (0, typeorm_1.Column)({
58
+ default: 0,
59
+ }),
60
+ __metadata("design:type", Number)
61
+ ], UploadRunning.prototype, "part_id", void 0);
62
+ __decorate([
63
+ (0, typeorm_1.CreateDateColumn)(),
64
+ __metadata("design:type", Date)
65
+ ], UploadRunning.prototype, "created_at", void 0);
66
+ exports.UploadRunning = UploadRunning = __decorate([
67
+ (0, typeorm_1.Entity)()
68
+ ], UploadRunning);
@@ -0,0 +1,21 @@
1
+ import { RecordType } from '@soga/types';
2
+ export declare class UploadSuccess {
3
+ id: number;
4
+ is_attachment: boolean;
5
+ root_id: number;
6
+ pid: number;
7
+ space_id: number;
8
+ space_name: string;
9
+ uid: number;
10
+ input: {
11
+ filename: string;
12
+ filepath: string;
13
+ filesize: number;
14
+ };
15
+ cloud_id: number;
16
+ cloud_name: string;
17
+ type: RecordType;
18
+ updated_at: Date;
19
+ created_at: Date;
20
+ }
21
+ //# sourceMappingURL=upload-success.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"upload-success.d.ts","sourceRoot":"","sources":["../src/upload-success.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AAUzC,qBACa,aAAa;IAGxB,EAAE,EAAE,MAAM,CAAC;IAKX,aAAa,EAAE,OAAO,CAAC;IAIvB,OAAO,EAAE,MAAM,CAAC;IAMhB,GAAG,EAAE,MAAM,CAAC;IAGZ,QAAQ,EAAE,MAAM,CAAC;IAGjB,UAAU,EAAE,MAAM,CAAC;IAGnB,GAAG,EAAE,MAAM,CAAC;IAMZ,KAAK,EAAE;QACL,QAAQ,EAAE,MAAM,CAAC;QACjB,QAAQ,EAAE,MAAM,CAAC;QACjB,QAAQ,EAAE,MAAM,CAAC;KAClB,CAAC;IAGF,QAAQ,EAAE,MAAM,CAAC;IAGjB,UAAU,EAAE,MAAM,CAAC;IAOnB,IAAI,EAAE,UAAU,CAAC;IAIjB,UAAU,EAAE,IAAI,CAAC;IAIjB,UAAU,EAAE,IAAI,CAAC;CAClB"}
@@ -0,0 +1,101 @@
1
+ "use strict";
2
+ var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
3
+ var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
4
+ if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
5
+ else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
6
+ return c > 3 && r && Object.defineProperty(target, key, r), r;
7
+ };
8
+ var __metadata = (this && this.__metadata) || function (k, v) {
9
+ if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
10
+ };
11
+ Object.defineProperty(exports, "__esModule", { value: true });
12
+ exports.UploadSuccess = void 0;
13
+ const types_1 = require("@soga/types");
14
+ const typeorm_1 = require("typeorm");
15
+ let UploadSuccess = class UploadSuccess {
16
+ id;
17
+ is_attachment;
18
+ root_id;
19
+ pid;
20
+ space_id;
21
+ space_name;
22
+ uid;
23
+ input;
24
+ cloud_id;
25
+ cloud_name;
26
+ // 文件类型
27
+ type;
28
+ // 最后一次更新时间
29
+ updated_at;
30
+ // 创建时间
31
+ created_at;
32
+ };
33
+ exports.UploadSuccess = UploadSuccess;
34
+ __decorate([
35
+ (0, typeorm_1.Index)(),
36
+ (0, typeorm_1.PrimaryGeneratedColumn)(),
37
+ __metadata("design:type", Number)
38
+ ], UploadSuccess.prototype, "id", void 0);
39
+ __decorate([
40
+ (0, typeorm_1.Column)({
41
+ default: false,
42
+ }),
43
+ __metadata("design:type", Boolean)
44
+ ], UploadSuccess.prototype, "is_attachment", void 0);
45
+ __decorate([
46
+ (0, typeorm_1.Index)(),
47
+ (0, typeorm_1.Column)(),
48
+ __metadata("design:type", Number)
49
+ ], UploadSuccess.prototype, "root_id", void 0);
50
+ __decorate([
51
+ (0, typeorm_1.Index)(),
52
+ (0, typeorm_1.Column)({
53
+ default: 0,
54
+ }),
55
+ __metadata("design:type", Number)
56
+ ], UploadSuccess.prototype, "pid", void 0);
57
+ __decorate([
58
+ (0, typeorm_1.Column)(),
59
+ __metadata("design:type", Number)
60
+ ], UploadSuccess.prototype, "space_id", void 0);
61
+ __decorate([
62
+ (0, typeorm_1.Column)(),
63
+ __metadata("design:type", String)
64
+ ], UploadSuccess.prototype, "space_name", void 0);
65
+ __decorate([
66
+ (0, typeorm_1.Column)(),
67
+ __metadata("design:type", Number)
68
+ ], UploadSuccess.prototype, "uid", void 0);
69
+ __decorate([
70
+ (0, typeorm_1.Column)({
71
+ type: 'json',
72
+ default: '[]',
73
+ }),
74
+ __metadata("design:type", Object)
75
+ ], UploadSuccess.prototype, "input", void 0);
76
+ __decorate([
77
+ (0, typeorm_1.Column)(),
78
+ __metadata("design:type", Number)
79
+ ], UploadSuccess.prototype, "cloud_id", void 0);
80
+ __decorate([
81
+ (0, typeorm_1.Column)(),
82
+ __metadata("design:type", String)
83
+ ], UploadSuccess.prototype, "cloud_name", void 0);
84
+ __decorate([
85
+ (0, typeorm_1.Column)({
86
+ type: 'simple-enum',
87
+ enum: types_1.RecordType,
88
+ }),
89
+ __metadata("design:type", Number)
90
+ ], UploadSuccess.prototype, "type", void 0);
91
+ __decorate([
92
+ (0, typeorm_1.UpdateDateColumn)(),
93
+ __metadata("design:type", Date)
94
+ ], UploadSuccess.prototype, "updated_at", void 0);
95
+ __decorate([
96
+ (0, typeorm_1.CreateDateColumn)(),
97
+ __metadata("design:type", Date)
98
+ ], UploadSuccess.prototype, "created_at", void 0);
99
+ exports.UploadSuccess = UploadSuccess = __decorate([
100
+ (0, typeorm_1.Entity)()
101
+ ], UploadSuccess);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@soga/entities",
3
- "version": "1.0.0",
3
+ "version": "1.3.1",
4
4
  "publishConfig": {
5
5
  "access": "public"
6
6
  },
@@ -11,25 +11,25 @@
11
11
  "files": [
12
12
  "dist"
13
13
  ],
14
- "scripts": {
15
- "build": "rimraf dist && tsup src/index.ts --format cjs,esm --dts --minify terser",
16
- "watch": "tsc --watch",
17
- "prepublishOnly": "npm run build"
18
- },
19
14
  "dependencies": {
20
- "@soga/node-types": "latest",
21
- "@soga/types": "latest",
22
15
  "reflect-metadata": "^0.2.2",
23
- "typeorm": "^0.3.24"
16
+ "typeorm": "^0.3.24",
17
+ "@soga/node-types": "^1.0.0",
18
+ "@soga/types": "^1.0.1"
24
19
  },
25
20
  "keywords": [],
26
21
  "author": "",
27
22
  "license": "ISC",
28
23
  "devDependencies": {
29
- "@soga/typescript-config": "latest",
30
24
  "rimraf": "^6.0.1",
31
25
  "terser": "^5.43.1",
32
26
  "tsup": "^8.5.0",
33
- "typescript": "^5.8.3"
27
+ "typescript": "^5.8.3",
28
+ "@soga/typescript-config": "^1.0.0"
29
+ },
30
+ "scripts": {
31
+ "build": "rimraf dist && tsc",
32
+ "build2": "rimraf dist && tsup src/index.ts --format cjs,esm --dts --minify terser",
33
+ "watch": "tsc --watch"
34
34
  }
35
- }
35
+ }
package/dist/index.d.mts DELETED
@@ -1,223 +0,0 @@
1
- import { RecordType, RecordFtype, RecordInfo, HostType, RecordDetail, NormalStatus, RecordFolderConfig, UploadStatus, CloudInfoField } from '@soga/types';
2
- import { UploadInputItem, EncodePrepareResult, EncodeResult, PartItem } from '@soga/node-types';
3
-
4
- declare enum DownloadFrom {
5
- BAIDU = "baidu",
6
- ALI = "ali",
7
- ALL = "all"
8
- }
9
- declare enum DownloadStatus {
10
- NULL = 0,
11
- PROCESS = 1,
12
- SUCCESS = 2,
13
- ERROR = 4
14
- }
15
- declare class DownloadFile {
16
- id: number;
17
- cloud_id: number;
18
- title: string;
19
- has_attachment: boolean;
20
- attachment_uuid: string;
21
- download_from: DownloadFrom;
22
- baidu_host_id: number;
23
- ali_host_id: number;
24
- is_paused: boolean;
25
- is_ready: boolean;
26
- type: RecordType;
27
- ftype: RecordFtype;
28
- routes: string[];
29
- download_root: string;
30
- pid: number;
31
- root_id: number;
32
- space_id: number;
33
- space_name: string;
34
- uid: number;
35
- detail: RecordInfo;
36
- order: number;
37
- status: DownloadStatus;
38
- file_total: number;
39
- file_successed: number;
40
- percent: number;
41
- progress: DownloadProgressData;
42
- error: Record<string, unknown>;
43
- updated_at: Date;
44
- created_at: Date;
45
- }
46
- type DownloadProgressStep = 'PREPARE' | 'DOWNLOAD_CHUNK' | 'COMBINE_CHUNK' | 'UNPACK' | 'ENDING';
47
- type DownloadProgressData = Record<DownloadProgressStep, {
48
- weight: number;
49
- percent: number;
50
- }>;
51
-
52
- type BaiduAuthData = {
53
- token: string;
54
- };
55
- type AliAuthData = {
56
- token: string;
57
- drive_id: string;
58
- dpan_file_id: string;
59
- cache_file_id: string;
60
- space_file_id: string;
61
- };
62
- declare class HostToken {
63
- id: number;
64
- uid: number;
65
- host_id: number;
66
- auth_data: BaiduAuthData | AliAuthData;
67
- type: HostType;
68
- expired_at: number;
69
- }
70
-
71
- declare class FetchUrl {
72
- id: number;
73
- speed: number;
74
- key: string;
75
- dlink: string;
76
- expire: number;
77
- fail: number;
78
- created_at: Date;
79
- }
80
-
81
- declare enum ActionType {
82
- ADD = "add",
83
- UPDATE = "update"
84
- }
85
- declare class MediaSubtitles {
86
- id: number;
87
- is_attachment: boolean;
88
- uuid: string;
89
- uid: number;
90
- space_id: number;
91
- space_name: string;
92
- record_id: number;
93
- record_name: string;
94
- record_info: RecordDetail;
95
- action_type: ActionType;
96
- action_uuid: string;
97
- inputs: string[];
98
- baidu_upload_result: {
99
- md5: string;
100
- md4: string;
101
- size: number;
102
- fs_id: number;
103
- };
104
- ali_upload_result: {
105
- md5: string;
106
- sha1: string;
107
- size: number;
108
- file_id: string;
109
- };
110
- status: NormalStatus;
111
- output_root: string;
112
- created_at: Date;
113
- }
114
-
115
- interface ErrorType {
116
- type: 'encode' | 'upload';
117
- message: string;
118
- stack?: string;
119
- details?: string[];
120
- cause?: any;
121
- }
122
- declare class UploadFile {
123
- id: number;
124
- is_attachment: boolean;
125
- total_count: number;
126
- completed_count: number;
127
- input: UploadInputItem;
128
- filepath: string;
129
- root_id: number;
130
- root_status: NormalStatus;
131
- space_id: number;
132
- space_name: string;
133
- is_ready: boolean;
134
- config: RecordFolderConfig;
135
- uid: number;
136
- aid: number;
137
- baidu_host_id: number;
138
- baidu_upload_result: Record<string, {
139
- md4: string;
140
- fs_id: number;
141
- }>;
142
- ali_host_id: number;
143
- ali_upload_result: Record<string, object>;
144
- upload_status: UploadStatus;
145
- is_paused: boolean;
146
- pid: number;
147
- type: RecordType;
148
- ftype: RecordFtype;
149
- task_record_id: number;
150
- cloud_info: CloudInfoField;
151
- output_root: string;
152
- external_texts: string[];
153
- progress: EncodePrepareResult;
154
- percent: number;
155
- encoded: EncodeResult;
156
- error: ErrorType | null;
157
- order: number;
158
- updated_at: Date;
159
- created_at: Date;
160
- }
161
-
162
- declare class UploadPart {
163
- id: number;
164
- uid: number;
165
- file_id: number;
166
- root_id: number;
167
- part_name: string;
168
- is_paused: boolean;
169
- output_root: string;
170
- info: PartItem;
171
- host_id: number;
172
- host_type: HostType;
173
- upload_status: NormalStatus;
174
- upload_percent: number;
175
- upload_result: UploadResult;
176
- updated_at: Date;
177
- created_at: Date;
178
- }
179
- type UploadResult = {
180
- ali?: {
181
- file_id: string;
182
- drive_id: string;
183
- };
184
- baidu?: {
185
- fs_id: number;
186
- };
187
- };
188
-
189
- declare enum UploadRunningType {
190
- ENCODE = "encode",
191
- UPLOAD = "upload"
192
- }
193
- declare class UploadRunning {
194
- id: number;
195
- uid: number;
196
- type: UploadRunningType;
197
- root_id: number;
198
- file_id: number;
199
- part_id: number;
200
- created_at: Date;
201
- }
202
-
203
- declare class UploadSuccess {
204
- id: number;
205
- is_attachment: boolean;
206
- root_id: number;
207
- pid: number;
208
- space_id: number;
209
- space_name: string;
210
- uid: number;
211
- input: {
212
- filename: string;
213
- filepath: string;
214
- filesize: number;
215
- };
216
- cloud_id: number;
217
- cloud_name: string;
218
- type: RecordType;
219
- updated_at: Date;
220
- created_at: Date;
221
- }
222
-
223
- export { ActionType, type AliAuthData, type BaiduAuthData, DownloadFile, DownloadFrom, type DownloadProgressData, type DownloadProgressStep, DownloadStatus, type ErrorType, FetchUrl, HostToken, MediaSubtitles, UploadFile, UploadPart, UploadRunning, UploadRunningType, UploadSuccess };
package/dist/index.mjs DELETED
@@ -1 +0,0 @@
1
- var t=Object.defineProperty,e=Object.getOwnPropertyDescriptor,o=(o,p,a,r)=>{for(var d,u=r>1?void 0:r?e(p,a):p,l=o.length-1;l>=0;l--)(d=o[l])&&(u=(r?d(p,a,u):d(u))||u);return r&&u&&t(p,a,u),u};import{RecordFtype as p,RecordType as a}from"@soga/types";import{Column as r,CreateDateColumn as d,Entity as u,Index as l,PrimaryGeneratedColumn as y,UpdateDateColumn as s}from"typeorm";var i=(t=>(t.BAIDU="baidu",t.ALI="ali",t.ALL="all",t))(i||{}),n=(t=>(t[t.NULL=0]="NULL",t[t.PROCESS=1]="PROCESS",t[t.SUCCESS=2]="SUCCESS",t[t.ERROR=4]="ERROR",t))(n||{}),_=class{id;cloud_id;title;has_attachment;attachment_uuid;download_from;baidu_host_id;ali_host_id;is_paused;is_ready;type;ftype;routes;download_root;pid;root_id;space_id;space_name;uid;detail;order;status;file_total;file_successed;percent;progress;error;updated_at;created_at};o([y()],_.prototype,"id",2),o([r()],_.prototype,"cloud_id",2),o([r()],_.prototype,"title",2),o([r({default:!1})],_.prototype,"has_attachment",2),o([r({nullable:!0})],_.prototype,"attachment_uuid",2),o([r({nullable:!0})],_.prototype,"download_from",2),o([r({nullable:!0})],_.prototype,"baidu_host_id",2),o([r({nullable:!0})],_.prototype,"ali_host_id",2),o([r({default:!1})],_.prototype,"is_paused",2),o([r({default:!1})],_.prototype,"is_ready",2),o([r({type:"simple-enum",enum:a})],_.prototype,"type",2),o([r({type:"simple-enum",enum:p,default:p.NONE})],_.prototype,"ftype",2),o([r({type:"json",default:"[]"})],_.prototype,"routes",2),o([r({default:""})],_.prototype,"download_root",2),o([r({default:0})],_.prototype,"pid",2),o([l(),r({default:0})],_.prototype,"root_id",2),o([r()],_.prototype,"space_id",2),o([r()],_.prototype,"space_name",2),o([r()],_.prototype,"uid",2),o([r("json",{default:"{}"})],_.prototype,"detail",2),o([r({default:0})],_.prototype,"order",2),o([r({type:"simple-enum",enum:n,default:0})],_.prototype,"status",2),o([r({default:0})],_.prototype,"file_total",2),o([r({default:0})],_.prototype,"file_successed",2),o([r({default:0,type:"decimal"})],_.prototype,"percent",2),o([r({type:"json",default:"{}"})],_.prototype,"progress",2),o([r({type:"json",default:"{}"})],_.prototype,"error",2),o([s()],_.prototype,"updated_at",2),o([d()],_.prototype,"created_at",2),_=o([u()],_);import{HostType as m}from"@soga/types";import{Column as c,Entity as f,Index as C,PrimaryGeneratedColumn as h}from"typeorm";var b=class{id;uid;host_id;auth_data;type;expired_at};o([h()],b.prototype,"id",2),o([c()],b.prototype,"uid",2),o([C(),c()],b.prototype,"host_id",2),o([c({type:"json",nullable:!0})],b.prototype,"auth_data",2),o([c({type:"simple-enum",default:m.BAIDU,enum:m})],b.prototype,"type",2),o([c()],b.prototype,"expired_at",2),b=o([C(["uid","host_id"]),f()],b);import{Column as j,CreateDateColumn as E,Entity as D,Index as x,PrimaryGeneratedColumn as g}from"typeorm";var P=class{id;speed;key;dlink;expire;fail;created_at};o([g()],P.prototype,"id",2),o([x(),j({default:0})],P.prototype,"speed",2),o([x(),j()],P.prototype,"key",2),o([x(),j()],P.prototype,"dlink",2),o([x(),j()],P.prototype,"expire",2),o([x(),j({default:0})],P.prototype,"fail",2),o([E()],P.prototype,"created_at",2),P=o([D()],P);import{Column as S,CreateDateColumn as U,Entity as L,Index as R,PrimaryGeneratedColumn as v}from"typeorm";import{NormalStatus as O}from"@soga/types";var I=(t=>(t.ADD="add",t.UPDATE="update",t))(I||{}),N=class{id;is_attachment;uuid;uid;space_id;space_name;record_id;record_name;record_info;action_type;action_uuid;inputs;baidu_upload_result;ali_upload_result;status;output_root;created_at};o([v()],N.prototype,"id",2),o([S({default:!1})],N.prototype,"is_attachment",2),o([S({nullable:!0})],N.prototype,"uuid",2),o([R(),S({default:0})],N.prototype,"uid",2),o([S()],N.prototype,"space_id",2),o([S()],N.prototype,"space_name",2),o([R(),S({default:0})],N.prototype,"record_id",2),o([S()],N.prototype,"record_name",2),o([S({type:"json"})],N.prototype,"record_info",2),o([S({type:"simple-enum",enum:I,default:"add"})],N.prototype,"action_type",2),o([S({default:""})],N.prototype,"action_uuid",2),o([S({type:"json",nullable:!0})],N.prototype,"inputs",2),o([S({type:"json",nullable:!0})],N.prototype,"baidu_upload_result",2),o([S({type:"json",nullable:!0})],N.prototype,"ali_upload_result",2),o([S({type:"simple-enum",enum:O,default:O.PROCESS})],N.prototype,"status",2),o([S()],N.prototype,"output_root",2),o([U()],N.prototype,"created_at",2),N=o([L()],N);import{Column as A,CreateDateColumn as G,Entity as k,Index as w,PrimaryGeneratedColumn as T,UpdateDateColumn as B}from"typeorm";import{RecordType as F,UploadStatus as H,RecordFtype as q,NormalStatus as z}from"@soga/types";var J=class{id;is_attachment;total_count;completed_count;input;filepath;root_id;root_status;space_id;space_name;is_ready;config;uid;aid;baidu_host_id;baidu_upload_result;ali_host_id;ali_upload_result;upload_status;is_paused;pid;type;ftype;task_record_id;cloud_info;output_root;external_texts;progress;percent;encoded;error;order;updated_at;created_at};o([T()],J.prototype,"id",2),o([A({default:!1})],J.prototype,"is_attachment",2),o([A({default:0})],J.prototype,"total_count",2),o([A({default:0})],J.prototype,"completed_count",2),o([A({type:"json",nullable:!0})],J.prototype,"input",2),o([w(),A({default:""})],J.prototype,"filepath",2),o([w(),A({default:0})],J.prototype,"root_id",2),o([w(),A({type:"simple-enum",enum:z,nullable:!0})],J.prototype,"root_status",2),o([A()],J.prototype,"space_id",2),o([A()],J.prototype,"space_name",2),o([A({default:!0})],J.prototype,"is_ready",2),o([A("json",{default:"{}"})],J.prototype,"config",2),o([w(),A({default:0})],J.prototype,"uid",2),o([A({default:0})],J.prototype,"aid",2),o([w(),A({nullable:!0})],J.prototype,"baidu_host_id",2),o([A({type:"json",nullable:!0})],J.prototype,"baidu_upload_result",2),o([w(),A({nullable:!0})],J.prototype,"ali_host_id",2),o([A({type:"json",nullable:!0})],J.prototype,"ali_upload_result",2),o([w(),A({type:"simple-enum",enum:H,default:H.NULL})],J.prototype,"upload_status",2),o([w(),A({default:!1})],J.prototype,"is_paused",2),o([w(),A({default:0})],J.prototype,"pid",2),o([w(),A({type:"simple-enum",enum:F})],J.prototype,"type",2),o([w(),A({type:"simple-enum",enum:q})],J.prototype,"ftype",2),o([A({default:0})],J.prototype,"task_record_id",2),o([A({type:"json",default:"{}"})],J.prototype,"cloud_info",2),o([A({default:""})],J.prototype,"output_root",2),o([A("json",{default:"[]"})],J.prototype,"external_texts",2),o([A({type:"json",default:"{}"})],J.prototype,"progress",2),o([A({default:0,type:"decimal"})],J.prototype,"percent",2),o([A({type:"json",default:"{}"})],J.prototype,"encoded",2),o([A({nullable:!0,type:"json"})],J.prototype,"error",2),o([A({default:0})],J.prototype,"order",2),o([B()],J.prototype,"updated_at",2),o([G()],J.prototype,"created_at",2),J=o([k()],J);import{HostType as K,NormalStatus as M}from"@soga/types";import{Column as Q,CreateDateColumn as V,Entity as W,Index as X,PrimaryGeneratedColumn as Y,UpdateDateColumn as Z}from"typeorm";var $=class{id;uid;file_id;root_id;part_name;is_paused;output_root;info;host_id;host_type;upload_status;upload_percent;upload_result;updated_at;created_at};o([Y()],$.prototype,"id",2),o([X(),Q()],$.prototype,"uid",2),o([X(),Q()],$.prototype,"file_id",2),o([X(),Q()],$.prototype,"root_id",2),o([X(),Q({default:""})],$.prototype,"part_name",2),o([Q({default:!1})],$.prototype,"is_paused",2),o([Q()],$.prototype,"output_root",2),o([Q("json")],$.prototype,"info",2),o([X(),Q()],$.prototype,"host_id",2),o([X(),Q({type:"simple-enum",enum:K})],$.prototype,"host_type",2),o([X(),Q({type:"simple-enum",enum:M,default:M.NULL})],$.prototype,"upload_status",2),o([Q({default:0,type:"decimal"})],$.prototype,"upload_percent",2),o([Q({type:"json",default:"{}"})],$.prototype,"upload_result",2),o([Z()],$.prototype,"updated_at",2),o([V()],$.prototype,"created_at",2),$=o([W()],$);import{Column as tt,CreateDateColumn as et,Entity as ot,Index as pt,PrimaryGeneratedColumn as at}from"typeorm";var rt=(t=>(t.ENCODE="encode",t.UPLOAD="upload",t))(rt||{}),dt=class{id;uid;type;root_id;file_id;part_id;created_at};o([at()],dt.prototype,"id",2),o([tt()],dt.prototype,"uid",2),o([pt(),tt({type:"simple-enum",enum:rt,nullable:!0})],dt.prototype,"type",2),o([tt({default:0})],dt.prototype,"root_id",2),o([tt()],dt.prototype,"file_id",2),o([tt({default:0})],dt.prototype,"part_id",2),o([et()],dt.prototype,"created_at",2),dt=o([ot()],dt);import{RecordType as ut}from"@soga/types";import{Column as lt,CreateDateColumn as yt,Entity as st,Index as it,PrimaryGeneratedColumn as nt,UpdateDateColumn as _t}from"typeorm";var mt=class{id;is_attachment;root_id;pid;space_id;space_name;uid;input;cloud_id;cloud_name;type;updated_at;created_at};o([it(),nt()],mt.prototype,"id",2),o([lt({default:!1})],mt.prototype,"is_attachment",2),o([it(),lt()],mt.prototype,"root_id",2),o([it(),lt({default:0})],mt.prototype,"pid",2),o([lt()],mt.prototype,"space_id",2),o([lt()],mt.prototype,"space_name",2),o([lt()],mt.prototype,"uid",2),o([lt({type:"json",default:"[]"})],mt.prototype,"input",2),o([lt()],mt.prototype,"cloud_id",2),o([lt()],mt.prototype,"cloud_name",2),o([lt({type:"simple-enum",enum:ut})],mt.prototype,"type",2),o([_t()],mt.prototype,"updated_at",2),o([yt()],mt.prototype,"created_at",2),mt=o([st()],mt);export{I as ActionType,_ as DownloadFile,i as DownloadFrom,n as DownloadStatus,P as FetchUrl,b as HostToken,N as MediaSubtitles,J as UploadFile,$ as UploadPart,dt as UploadRunning,rt as UploadRunningType,mt as UploadSuccess};