@soga/entities 0.3.0 → 1.0.0

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,223 @@
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 };
@@ -0,0 +1,223 @@
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.js ADDED
@@ -0,0 +1 @@
1
+ var t,e=Object.defineProperty,o=Object.getOwnPropertyDescriptor,p=Object.getOwnPropertyNames,u=Object.prototype.hasOwnProperty,l=(t,p,u,l)=>{for(var a,r=l>1?void 0:l?o(p,u):p,d=t.length-1;d>=0;d--)(a=t[d])&&(r=(l?a(p,u,r):a(r))||r);return l&&r&&e(p,u,r),r},a={};((t,o)=>{for(var p in o)e(t,p,{get:o[p],enumerable:!0})})(a,{ActionType:()=>b,DownloadFile:()=>m,DownloadFrom:()=>n,DownloadStatus:()=>y,FetchUrl:()=>c,HostToken:()=>_,MediaSubtitles:()=>I,UploadFile:()=>D,UploadPart:()=>g,UploadRunning:()=>R,UploadRunningType:()=>P,UploadSuccess:()=>v}),module.exports=(t=a,((t,l,a,r)=>{if(l&&"object"==typeof l||"function"==typeof l)for(let d of p(l))u.call(t,d)||d===a||e(t,d,{get:()=>l[d],enumerable:!(r=o(l,d))||r.enumerable});return t})(e({},"__esModule",{value:!0}),t));var r=require("@soga/types"),d=require("typeorm"),n=(t=>(t.BAIDU="baidu",t.ALI="ali",t.ALL="all",t))(n||{}),y=(t=>(t[t.NULL=0]="NULL",t[t.PROCESS=1]="PROCESS",t[t.SUCCESS=2]="SUCCESS",t[t.ERROR=4]="ERROR",t))(y||{}),m=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};l([(0,d.PrimaryGeneratedColumn)()],m.prototype,"id",2),l([(0,d.Column)()],m.prototype,"cloud_id",2),l([(0,d.Column)()],m.prototype,"title",2),l([(0,d.Column)({default:!1})],m.prototype,"has_attachment",2),l([(0,d.Column)({nullable:!0})],m.prototype,"attachment_uuid",2),l([(0,d.Column)({nullable:!0})],m.prototype,"download_from",2),l([(0,d.Column)({nullable:!0})],m.prototype,"baidu_host_id",2),l([(0,d.Column)({nullable:!0})],m.prototype,"ali_host_id",2),l([(0,d.Column)({default:!1})],m.prototype,"is_paused",2),l([(0,d.Column)({default:!1})],m.prototype,"is_ready",2),l([(0,d.Column)({type:"simple-enum",enum:r.RecordType})],m.prototype,"type",2),l([(0,d.Column)({type:"simple-enum",enum:r.RecordFtype,default:r.RecordFtype.NONE})],m.prototype,"ftype",2),l([(0,d.Column)({type:"json",default:"[]"})],m.prototype,"routes",2),l([(0,d.Column)({default:""})],m.prototype,"download_root",2),l([(0,d.Column)({default:0})],m.prototype,"pid",2),l([(0,d.Index)(),(0,d.Column)({default:0})],m.prototype,"root_id",2),l([(0,d.Column)()],m.prototype,"space_id",2),l([(0,d.Column)()],m.prototype,"space_name",2),l([(0,d.Column)()],m.prototype,"uid",2),l([(0,d.Column)("json",{default:"{}"})],m.prototype,"detail",2),l([(0,d.Column)({default:0})],m.prototype,"order",2),l([(0,d.Column)({type:"simple-enum",enum:y,default:0})],m.prototype,"status",2),l([(0,d.Column)({default:0})],m.prototype,"file_total",2),l([(0,d.Column)({default:0})],m.prototype,"file_successed",2),l([(0,d.Column)({default:0,type:"decimal"})],m.prototype,"percent",2),l([(0,d.Column)({type:"json",default:"{}"})],m.prototype,"progress",2),l([(0,d.Column)({type:"json",default:"{}"})],m.prototype,"error",2),l([(0,d.UpdateDateColumn)()],m.prototype,"updated_at",2),l([(0,d.CreateDateColumn)()],m.prototype,"created_at",2),m=l([(0,d.Entity)()],m);var i=require("@soga/types"),s=require("typeorm"),_=class{id;uid;host_id;auth_data;type;expired_at};l([(0,s.PrimaryGeneratedColumn)()],_.prototype,"id",2),l([(0,s.Column)()],_.prototype,"uid",2),l([(0,s.Index)(),(0,s.Column)()],_.prototype,"host_id",2),l([(0,s.Column)({type:"json",nullable:!0})],_.prototype,"auth_data",2),l([(0,s.Column)({type:"simple-enum",default:i.HostType.BAIDU,enum:i.HostType})],_.prototype,"type",2),l([(0,s.Column)()],_.prototype,"expired_at",2),_=l([(0,s.Index)(["uid","host_id"]),(0,s.Entity)()],_);var C=require("typeorm"),c=class{id;speed;key;dlink;expire;fail;created_at};l([(0,C.PrimaryGeneratedColumn)()],c.prototype,"id",2),l([(0,C.Index)(),(0,C.Column)({default:0})],c.prototype,"speed",2),l([(0,C.Index)(),(0,C.Column)()],c.prototype,"key",2),l([(0,C.Index)(),(0,C.Column)()],c.prototype,"dlink",2),l([(0,C.Index)(),(0,C.Column)()],c.prototype,"expire",2),l([(0,C.Index)(),(0,C.Column)({default:0})],c.prototype,"fail",2),l([(0,C.CreateDateColumn)()],c.prototype,"created_at",2),c=l([(0,C.Entity)()],c);var f=require("typeorm"),x=require("@soga/types"),b=(t=>(t.ADD="add",t.UPDATE="update",t))(b||{}),I=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};l([(0,f.PrimaryGeneratedColumn)()],I.prototype,"id",2),l([(0,f.Column)({default:!1})],I.prototype,"is_attachment",2),l([(0,f.Column)({nullable:!0})],I.prototype,"uuid",2),l([(0,f.Index)(),(0,f.Column)({default:0})],I.prototype,"uid",2),l([(0,f.Column)()],I.prototype,"space_id",2),l([(0,f.Column)()],I.prototype,"space_name",2),l([(0,f.Index)(),(0,f.Column)({default:0})],I.prototype,"record_id",2),l([(0,f.Column)()],I.prototype,"record_name",2),l([(0,f.Column)({type:"json"})],I.prototype,"record_info",2),l([(0,f.Column)({type:"simple-enum",enum:b,default:"add"})],I.prototype,"action_type",2),l([(0,f.Column)({default:""})],I.prototype,"action_uuid",2),l([(0,f.Column)({type:"json",nullable:!0})],I.prototype,"inputs",2),l([(0,f.Column)({type:"json",nullable:!0})],I.prototype,"baidu_upload_result",2),l([(0,f.Column)({type:"json",nullable:!0})],I.prototype,"ali_upload_result",2),l([(0,f.Column)({type:"simple-enum",enum:x.NormalStatus,default:x.NormalStatus.PROCESS})],I.prototype,"status",2),l([(0,f.Column)()],I.prototype,"output_root",2),l([(0,f.CreateDateColumn)()],I.prototype,"created_at",2),I=l([(0,f.Entity)()],I);var h=require("typeorm"),j=require("@soga/types"),D=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};l([(0,h.PrimaryGeneratedColumn)()],D.prototype,"id",2),l([(0,h.Column)({default:!1})],D.prototype,"is_attachment",2),l([(0,h.Column)({default:0})],D.prototype,"total_count",2),l([(0,h.Column)({default:0})],D.prototype,"completed_count",2),l([(0,h.Column)({type:"json",nullable:!0})],D.prototype,"input",2),l([(0,h.Index)(),(0,h.Column)({default:""})],D.prototype,"filepath",2),l([(0,h.Index)(),(0,h.Column)({default:0})],D.prototype,"root_id",2),l([(0,h.Index)(),(0,h.Column)({type:"simple-enum",enum:j.NormalStatus,nullable:!0})],D.prototype,"root_status",2),l([(0,h.Column)()],D.prototype,"space_id",2),l([(0,h.Column)()],D.prototype,"space_name",2),l([(0,h.Column)({default:!0})],D.prototype,"is_ready",2),l([(0,h.Column)("json",{default:"{}"})],D.prototype,"config",2),l([(0,h.Index)(),(0,h.Column)({default:0})],D.prototype,"uid",2),l([(0,h.Column)({default:0})],D.prototype,"aid",2),l([(0,h.Index)(),(0,h.Column)({nullable:!0})],D.prototype,"baidu_host_id",2),l([(0,h.Column)({type:"json",nullable:!0})],D.prototype,"baidu_upload_result",2),l([(0,h.Index)(),(0,h.Column)({nullable:!0})],D.prototype,"ali_host_id",2),l([(0,h.Column)({type:"json",nullable:!0})],D.prototype,"ali_upload_result",2),l([(0,h.Index)(),(0,h.Column)({type:"simple-enum",enum:j.UploadStatus,default:j.UploadStatus.NULL})],D.prototype,"upload_status",2),l([(0,h.Index)(),(0,h.Column)({default:!1})],D.prototype,"is_paused",2),l([(0,h.Index)(),(0,h.Column)({default:0})],D.prototype,"pid",2),l([(0,h.Index)(),(0,h.Column)({type:"simple-enum",enum:j.RecordType})],D.prototype,"type",2),l([(0,h.Index)(),(0,h.Column)({type:"simple-enum",enum:j.RecordFtype})],D.prototype,"ftype",2),l([(0,h.Column)({default:0})],D.prototype,"task_record_id",2),l([(0,h.Column)({type:"json",default:"{}"})],D.prototype,"cloud_info",2),l([(0,h.Column)({default:""})],D.prototype,"output_root",2),l([(0,h.Column)("json",{default:"[]"})],D.prototype,"external_texts",2),l([(0,h.Column)({type:"json",default:"{}"})],D.prototype,"progress",2),l([(0,h.Column)({default:0,type:"decimal"})],D.prototype,"percent",2),l([(0,h.Column)({type:"json",default:"{}"})],D.prototype,"encoded",2),l([(0,h.Column)({nullable:!0,type:"json"})],D.prototype,"error",2),l([(0,h.Column)({default:0})],D.prototype,"order",2),l([(0,h.UpdateDateColumn)()],D.prototype,"updated_at",2),l([(0,h.CreateDateColumn)()],D.prototype,"created_at",2),D=l([(0,h.Entity)()],D);var S=require("@soga/types"),U=require("typeorm"),g=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};l([(0,U.PrimaryGeneratedColumn)()],g.prototype,"id",2),l([(0,U.Index)(),(0,U.Column)()],g.prototype,"uid",2),l([(0,U.Index)(),(0,U.Column)()],g.prototype,"file_id",2),l([(0,U.Index)(),(0,U.Column)()],g.prototype,"root_id",2),l([(0,U.Index)(),(0,U.Column)({default:""})],g.prototype,"part_name",2),l([(0,U.Column)({default:!1})],g.prototype,"is_paused",2),l([(0,U.Column)()],g.prototype,"output_root",2),l([(0,U.Column)("json")],g.prototype,"info",2),l([(0,U.Index)(),(0,U.Column)()],g.prototype,"host_id",2),l([(0,U.Index)(),(0,U.Column)({type:"simple-enum",enum:S.HostType})],g.prototype,"host_type",2),l([(0,U.Index)(),(0,U.Column)({type:"simple-enum",enum:S.NormalStatus,default:S.NormalStatus.NULL})],g.prototype,"upload_status",2),l([(0,U.Column)({default:0,type:"decimal"})],g.prototype,"upload_percent",2),l([(0,U.Column)({type:"json",default:"{}"})],g.prototype,"upload_result",2),l([(0,U.UpdateDateColumn)()],g.prototype,"updated_at",2),l([(0,U.CreateDateColumn)()],g.prototype,"created_at",2),g=l([(0,U.Entity)()],g);var E=require("typeorm"),P=(t=>(t.ENCODE="encode",t.UPLOAD="upload",t))(P||{}),R=class{id;uid;type;root_id;file_id;part_id;created_at};l([(0,E.PrimaryGeneratedColumn)()],R.prototype,"id",2),l([(0,E.Column)()],R.prototype,"uid",2),l([(0,E.Index)(),(0,E.Column)({type:"simple-enum",enum:P,nullable:!0})],R.prototype,"type",2),l([(0,E.Column)({default:0})],R.prototype,"root_id",2),l([(0,E.Column)()],R.prototype,"file_id",2),l([(0,E.Column)({default:0})],R.prototype,"part_id",2),l([(0,E.CreateDateColumn)()],R.prototype,"created_at",2),R=l([(0,E.Entity)()],R);var O=require("@soga/types"),q=require("typeorm"),v=class{id;is_attachment;root_id;pid;space_id;space_name;uid;input;cloud_id;cloud_name;type;updated_at;created_at};l([(0,q.Index)(),(0,q.PrimaryGeneratedColumn)()],v.prototype,"id",2),l([(0,q.Column)({default:!1})],v.prototype,"is_attachment",2),l([(0,q.Index)(),(0,q.Column)()],v.prototype,"root_id",2),l([(0,q.Index)(),(0,q.Column)({default:0})],v.prototype,"pid",2),l([(0,q.Column)()],v.prototype,"space_id",2),l([(0,q.Column)()],v.prototype,"space_name",2),l([(0,q.Column)()],v.prototype,"uid",2),l([(0,q.Column)({type:"json",default:"[]"})],v.prototype,"input",2),l([(0,q.Column)()],v.prototype,"cloud_id",2),l([(0,q.Column)()],v.prototype,"cloud_name",2),l([(0,q.Column)({type:"simple-enum",enum:O.RecordType})],v.prototype,"type",2),l([(0,q.UpdateDateColumn)()],v.prototype,"updated_at",2),l([(0,q.CreateDateColumn)()],v.prototype,"created_at",2),v=l([(0,q.Entity)()],v);
package/dist/index.mjs ADDED
@@ -0,0 +1 @@
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};
package/package.json CHANGED
@@ -1,28 +1,35 @@
1
1
  {
2
2
  "name": "@soga/entities",
3
- "version": "0.3.0",
3
+ "version": "1.0.0",
4
4
  "publishConfig": {
5
5
  "access": "public"
6
6
  },
7
7
  "description": "",
8
- "main": "dist/main.js",
9
- "types": "dist/main.d.ts",
8
+ "main": "./dist/index.js",
9
+ "module": "./dist/index.mjs",
10
+ "types": "./dist/index.d.ts",
10
11
  "files": [
11
12
  "dist"
12
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
+ },
13
19
  "dependencies": {
14
- "@soga/types": "^0.3.0",
20
+ "@soga/node-types": "latest",
21
+ "@soga/types": "latest",
22
+ "reflect-metadata": "^0.2.2",
15
23
  "typeorm": "^0.3.24"
16
24
  },
17
25
  "keywords": [],
18
26
  "author": "",
19
27
  "license": "ISC",
20
- "scripts": {
21
- "build": "rimraf dist && tsc && ts-node ./scripts/minify",
22
- "minify": "ts-node ./scripts/minify",
23
- "demo": "ts-node ./demo/demo.ts",
24
- "test": "jest",
25
- "dev": "ts-node ./src/main.ts",
26
- "lint": "eslint . --ext .ts"
28
+ "devDependencies": {
29
+ "@soga/typescript-config": "latest",
30
+ "rimraf": "^6.0.1",
31
+ "terser": "^5.43.1",
32
+ "tsup": "^8.5.0",
33
+ "typescript": "^5.8.3"
27
34
  }
28
- }
35
+ }
@@ -1,43 +0,0 @@
1
- import { RecordFtype, RecordListItem, RecordType } from '@soga/types';
2
- export declare enum DownloadType {
3
- SOURCE = "source",
4
- PREVIEW = "preview"
5
- }
6
- export declare enum DownloadStatus {
7
- NULL = 0,
8
- PROCESS = 1,
9
- SUCCESS = 2,
10
- ERROR = 4
11
- }
12
- export declare class DownloadFile {
13
- id: number;
14
- download_type: DownloadType;
15
- is_paused: boolean;
16
- type: RecordType;
17
- ftype: RecordFtype;
18
- baidu_host_id: number;
19
- ali_host_id: number;
20
- routes: string[];
21
- download_root: string;
22
- download_temp: string;
23
- download_name: string;
24
- root_id: number;
25
- space_id: number;
26
- uid: number;
27
- record: RecordListItem;
28
- order: number;
29
- status: DownloadStatus;
30
- file_total: number;
31
- file_successed: number;
32
- file_size: number;
33
- percent: number;
34
- progress: DownloadProgressData;
35
- error: Record<string, unknown>;
36
- updated_at: Date;
37
- created_at: Date;
38
- }
39
- export type DownloadProgressStep = 'PREPARE' | 'DOWNLOAD_CHUNK' | 'COMBINE_CHUNK' | 'UNPACK' | 'ENDING';
40
- export type DownloadProgressData = Record<DownloadProgressStep, {
41
- weight: number;
42
- percent: number;
43
- }>;
@@ -1 +0,0 @@
1
- "use strict";var __decorate=this&&this.__decorate||function(e,t,o,a){var d,_=arguments.length,r=_<3?t:null===a?a=Object.getOwnPropertyDescriptor(t,o):a;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,o,a);else for(var p=e.length-1;p>=0;p--)(d=e[p])&&(r=(_<3?d(r):_>3?d(t,o,r):d(t,o))||r);return _>3&&r&&Object.defineProperty(t,o,r),r},__metadata=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)};Object.defineProperty(exports,"__esModule",{value:!0}),exports.DownloadFile=exports.DownloadStatus=exports.DownloadType=void 0;const types_1=require("@soga/types"),typeorm_1=require("typeorm");var DownloadType,DownloadStatus;!function(e){e.SOURCE="source",e.PREVIEW="preview"}(DownloadType||(exports.DownloadType=DownloadType={})),function(e){e[e.NULL=0]="NULL",e[e.PROCESS=1]="PROCESS",e[e.SUCCESS=2]="SUCCESS",e[e.ERROR=4]="ERROR"}(DownloadStatus||(exports.DownloadStatus=DownloadStatus={}));let DownloadFile=class{id;download_type;is_paused;type;ftype;baidu_host_id;ali_host_id;routes;download_root;download_temp;download_name;root_id;space_id;uid;record;order;status;file_total;file_successed;file_size;percent;progress;error;updated_at;created_at};exports.DownloadFile=DownloadFile,__decorate([(0,typeorm_1.PrimaryGeneratedColumn)(),__metadata("design:type",Number)],DownloadFile.prototype,"id",void 0),__decorate([(0,typeorm_1.Column)({type:"simple-enum",enum:DownloadType,default:DownloadType.SOURCE}),__metadata("design:type",String)],DownloadFile.prototype,"download_type",void 0),__decorate([(0,typeorm_1.Column)({default:!1}),__metadata("design:type",Boolean)],DownloadFile.prototype,"is_paused",void 0),__decorate([(0,typeorm_1.Column)({type:"simple-enum",enum:types_1.RecordType}),__metadata("design:type",Number)],DownloadFile.prototype,"type",void 0),__decorate([(0,typeorm_1.Column)({type:"simple-enum",enum:types_1.RecordFtype,default:types_1.RecordFtype.NONE}),__metadata("design:type",Number)],DownloadFile.prototype,"ftype",void 0),__decorate([(0,typeorm_1.Index)(),(0,typeorm_1.Column)({default:0}),__metadata("design:type",Number)],DownloadFile.prototype,"baidu_host_id",void 0),__decorate([(0,typeorm_1.Index)(),(0,typeorm_1.Column)({default:0}),__metadata("design:type",Number)],DownloadFile.prototype,"ali_host_id",void 0),__decorate([(0,typeorm_1.Column)({type:"json",default:"[]"}),__metadata("design:type",Array)],DownloadFile.prototype,"routes",void 0),__decorate([(0,typeorm_1.Column)({default:""}),__metadata("design:type",String)],DownloadFile.prototype,"download_root",void 0),__decorate([(0,typeorm_1.Column)({default:""}),__metadata("design:type",String)],DownloadFile.prototype,"download_temp",void 0),__decorate([(0,typeorm_1.Column)({default:""}),__metadata("design:type",String)],DownloadFile.prototype,"download_name",void 0),__decorate([(0,typeorm_1.Column)({default:0}),__metadata("design:type",Number)],DownloadFile.prototype,"root_id",void 0),__decorate([(0,typeorm_1.Column)(),__metadata("design:type",Number)],DownloadFile.prototype,"space_id",void 0),__decorate([(0,typeorm_1.Column)(),__metadata("design:type",Number)],DownloadFile.prototype,"uid",void 0),__decorate([(0,typeorm_1.Column)("json",{default:"{}"}),__metadata("design:type",Object)],DownloadFile.prototype,"record",void 0),__decorate([(0,typeorm_1.Column)({default:0}),__metadata("design:type",Number)],DownloadFile.prototype,"order",void 0),__decorate([(0,typeorm_1.Column)({type:"simple-enum",enum:DownloadStatus,default:DownloadStatus.NULL}),__metadata("design:type",Number)],DownloadFile.prototype,"status",void 0),__decorate([(0,typeorm_1.Column)({default:0}),__metadata("design:type",Number)],DownloadFile.prototype,"file_total",void 0),__decorate([(0,typeorm_1.Column)({default:0}),__metadata("design:type",Number)],DownloadFile.prototype,"file_successed",void 0),__decorate([(0,typeorm_1.Column)({default:0}),__metadata("design:type",Number)],DownloadFile.prototype,"file_size",void 0),__decorate([(0,typeorm_1.Column)({default:0,type:"decimal"}),__metadata("design:type",Number)],DownloadFile.prototype,"percent",void 0),__decorate([(0,typeorm_1.Column)({type:"json",default:"{}"}),__metadata("design:type",Object)],DownloadFile.prototype,"progress",void 0),__decorate([(0,typeorm_1.Column)({type:"json",default:"{}"}),__metadata("design:type",Object)],DownloadFile.prototype,"error",void 0),__decorate([(0,typeorm_1.UpdateDateColumn)(),__metadata("design:type",Date)],DownloadFile.prototype,"updated_at",void 0),__decorate([(0,typeorm_1.CreateDateColumn)(),__metadata("design:type",Date)],DownloadFile.prototype,"created_at",void 0),exports.DownloadFile=DownloadFile=__decorate([(0,typeorm_1.Entity)()],DownloadFile);
@@ -1,9 +0,0 @@
1
- export declare class FetchUrl {
2
- id: number;
3
- speed: number;
4
- key: string;
5
- dlink: string;
6
- expire: number;
7
- fail: number;
8
- created_at: Date;
9
- }
package/dist/fetch-url.js DELETED
@@ -1 +0,0 @@
1
- "use strict";var __decorate=this&&this.__decorate||function(e,t,r,o){var a,d=arguments.length,_=d<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,r):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)_=Reflect.decorate(e,t,r,o);else for(var p=e.length-1;p>=0;p--)(a=e[p])&&(_=(d<3?a(_):d>3?a(t,r,_):a(t,r))||_);return d>3&&_&&Object.defineProperty(t,r,_),_},__metadata=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)};Object.defineProperty(exports,"__esModule",{value:!0}),exports.FetchUrl=void 0;const typeorm_1=require("typeorm");let FetchUrl=class{id;speed;key;dlink;expire;fail;created_at};exports.FetchUrl=FetchUrl,__decorate([(0,typeorm_1.PrimaryGeneratedColumn)(),__metadata("design:type",Number)],FetchUrl.prototype,"id",void 0),__decorate([(0,typeorm_1.Index)(),(0,typeorm_1.Column)({default:0}),__metadata("design:type",Number)],FetchUrl.prototype,"speed",void 0),__decorate([(0,typeorm_1.Index)(),(0,typeorm_1.Column)(),__metadata("design:type",String)],FetchUrl.prototype,"key",void 0),__decorate([(0,typeorm_1.Index)(),(0,typeorm_1.Column)(),__metadata("design:type",String)],FetchUrl.prototype,"dlink",void 0),__decorate([(0,typeorm_1.Index)(),(0,typeorm_1.Column)(),__metadata("design:type",Number)],FetchUrl.prototype,"expire",void 0),__decorate([(0,typeorm_1.Index)(),(0,typeorm_1.Column)({default:0}),__metadata("design:type",Number)],FetchUrl.prototype,"fail",void 0),__decorate([(0,typeorm_1.CreateDateColumn)(),__metadata("design:type",Date)],FetchUrl.prototype,"created_at",void 0),exports.FetchUrl=FetchUrl=__decorate([(0,typeorm_1.Entity)()],FetchUrl);
@@ -1,19 +0,0 @@
1
- import { HostType } from '@soga/types';
2
- export type BaiduAuthData = {
3
- token: string;
4
- };
5
- export type AliAuthData = {
6
- token: string;
7
- drive_id: string;
8
- dpan_file_id: string;
9
- cache_file_id: string;
10
- space_file_id: string;
11
- };
12
- export declare class HostToken {
13
- id: number;
14
- uid: number;
15
- host_id: number;
16
- auth_data: BaiduAuthData | AliAuthData;
17
- type: HostType;
18
- expired_at: number;
19
- }
@@ -1 +0,0 @@
1
- "use strict";var __decorate=this&&this.__decorate||function(e,t,o,r){var a,_=arguments.length,p=_<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,o):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)p=Reflect.decorate(e,t,o,r);else for(var d=e.length-1;d>=0;d--)(a=e[d])&&(p=(_<3?a(p):_>3?a(t,o,p):a(t,o))||p);return _>3&&p&&Object.defineProperty(t,o,p),p},__metadata=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)};Object.defineProperty(exports,"__esModule",{value:!0}),exports.HostToken=void 0;const types_1=require("@soga/types"),typeorm_1=require("typeorm");let HostToken=class{id;uid;host_id;auth_data;type;expired_at};exports.HostToken=HostToken,__decorate([(0,typeorm_1.PrimaryGeneratedColumn)(),__metadata("design:type",Number)],HostToken.prototype,"id",void 0),__decorate([(0,typeorm_1.Column)(),__metadata("design:type",Number)],HostToken.prototype,"uid",void 0),__decorate([(0,typeorm_1.Index)(),(0,typeorm_1.Column)(),__metadata("design:type",Number)],HostToken.prototype,"host_id",void 0),__decorate([(0,typeorm_1.Column)({type:"json",nullable:!0}),__metadata("design:type",Object)],HostToken.prototype,"auth_data",void 0),__decorate([(0,typeorm_1.Column)({type:"simple-enum",default:types_1.HostType.BAIDU,enum:types_1.HostType}),__metadata("design:type",String)],HostToken.prototype,"type",void 0),__decorate([(0,typeorm_1.Column)(),__metadata("design:type",Number)],HostToken.prototype,"expired_at",void 0),exports.HostToken=HostToken=__decorate([(0,typeorm_1.Index)(["uid","host_id"]),(0,typeorm_1.Entity)()],HostToken);
package/dist/main.d.ts DELETED
@@ -1,7 +0,0 @@
1
- export * from './download-file';
2
- export * from './host-token';
3
- export * from './upload-part';
4
- export * from './upload-file';
5
- export * from './upload-success';
6
- export * from './fetch-url';
7
- export * from './media-subtitles';
package/dist/main.js DELETED
@@ -1 +0,0 @@
1
- "use strict";var __createBinding=this&&this.__createBinding||(Object.create?function(e,r,t,o){void 0===o&&(o=t);var i=Object.getOwnPropertyDescriptor(r,t);i&&!("get"in i?!r.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return r[t]}}),Object.defineProperty(e,o,i)}:function(e,r,t,o){void 0===o&&(o=t),e[o]=r[t]}),__exportStar=this&&this.__exportStar||function(e,r){for(var t in e)"default"===t||Object.prototype.hasOwnProperty.call(r,t)||__createBinding(r,e,t)};Object.defineProperty(exports,"__esModule",{value:!0}),__exportStar(require("./download-file"),exports),__exportStar(require("./host-token"),exports),__exportStar(require("./upload-part"),exports),__exportStar(require("./upload-file"),exports),__exportStar(require("./upload-success"),exports),__exportStar(require("./fetch-url"),exports),__exportStar(require("./media-subtitles"),exports);
@@ -1,32 +0,0 @@
1
- import { RecordDetail, UploadStatus } from '@soga/types';
2
- export declare enum ActionType {
3
- ADD = "add",
4
- UPDATE = "update"
5
- }
6
- export declare class MediaSubtitles {
7
- id: number;
8
- uid: number;
9
- space_id: number;
10
- space_name: string;
11
- record_id: number;
12
- record_name: string;
13
- record_info: RecordDetail;
14
- action_type: ActionType;
15
- action_uuid: string;
16
- inputs: string[];
17
- baidu_upload_result: {
18
- md5: string;
19
- md4: string;
20
- size: number;
21
- fs_id: number;
22
- };
23
- ali_upload_result: {
24
- md5: string;
25
- sha1: string;
26
- size: number;
27
- file_id: string;
28
- };
29
- status: UploadStatus;
30
- output_root: string;
31
- created_at: Date;
32
- }
@@ -1 +0,0 @@
1
- "use strict";var __decorate=this&&this.__decorate||function(e,t,o,a){var d,i=arguments.length,_=i<3?t:null===a?a=Object.getOwnPropertyDescriptor(t,o):a;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)_=Reflect.decorate(e,t,o,a);else for(var r=e.length-1;r>=0;r--)(d=e[r])&&(_=(i<3?d(_):i>3?d(t,o,_):d(t,o))||_);return i>3&&_&&Object.defineProperty(t,o,_),_},__metadata=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)};Object.defineProperty(exports,"__esModule",{value:!0}),exports.MediaSubtitles=exports.ActionType=void 0;const typeorm_1=require("typeorm"),types_1=require("@soga/types");var ActionType;!function(e){e.ADD="add",e.UPDATE="update"}(ActionType||(exports.ActionType=ActionType={}));let MediaSubtitles=class{id;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};exports.MediaSubtitles=MediaSubtitles,__decorate([(0,typeorm_1.PrimaryGeneratedColumn)(),__metadata("design:type",Number)],MediaSubtitles.prototype,"id",void 0),__decorate([(0,typeorm_1.Index)(),(0,typeorm_1.Column)({default:0}),__metadata("design:type",Number)],MediaSubtitles.prototype,"uid",void 0),__decorate([(0,typeorm_1.Column)(),__metadata("design:type",Number)],MediaSubtitles.prototype,"space_id",void 0),__decorate([(0,typeorm_1.Column)(),__metadata("design:type",String)],MediaSubtitles.prototype,"space_name",void 0),__decorate([(0,typeorm_1.Index)(),(0,typeorm_1.Column)({default:0}),__metadata("design:type",Number)],MediaSubtitles.prototype,"record_id",void 0),__decorate([(0,typeorm_1.Column)(),__metadata("design:type",String)],MediaSubtitles.prototype,"record_name",void 0),__decorate([(0,typeorm_1.Column)({type:"json"}),__metadata("design:type",Object)],MediaSubtitles.prototype,"record_info",void 0),__decorate([(0,typeorm_1.Column)({type:"simple-enum",enum:ActionType,default:ActionType.ADD}),__metadata("design:type",String)],MediaSubtitles.prototype,"action_type",void 0),__decorate([(0,typeorm_1.Column)({default:""}),__metadata("design:type",String)],MediaSubtitles.prototype,"action_uuid",void 0),__decorate([(0,typeorm_1.Column)({type:"json",nullable:!0}),__metadata("design:type",Array)],MediaSubtitles.prototype,"inputs",void 0),__decorate([(0,typeorm_1.Column)({type:"json",nullable:!0}),__metadata("design:type",Object)],MediaSubtitles.prototype,"baidu_upload_result",void 0),__decorate([(0,typeorm_1.Column)({type:"json",nullable:!0}),__metadata("design:type",Object)],MediaSubtitles.prototype,"ali_upload_result",void 0),__decorate([(0,typeorm_1.Column)({type:"simple-enum",enum:types_1.UploadStatus,default:types_1.UploadStatus.PROCESS}),__metadata("design:type",Number)],MediaSubtitles.prototype,"status",void 0),__decorate([(0,typeorm_1.Column)(),__metadata("design:type",String)],MediaSubtitles.prototype,"output_root",void 0),__decorate([(0,typeorm_1.CreateDateColumn)(),__metadata("design:type",Date)],MediaSubtitles.prototype,"created_at",void 0),exports.MediaSubtitles=MediaSubtitles=__decorate([(0,typeorm_1.Entity)()],MediaSubtitles);
@@ -1,40 +0,0 @@
1
- import { RecordType, RecordFolderConfig, EncodeStatus, UploadStatus, RootStatus, UploadPrepareData, CloudInfoField, EncodedData, UploadInputItem } from '@soga/types';
2
- export declare class UploadFile {
3
- id: number;
4
- total_count: number;
5
- completed_count: number;
6
- inputs: UploadInputItem[];
7
- filepath: string;
8
- root_id: number;
9
- root_status: RootStatus;
10
- space_id: number;
11
- space_name: string;
12
- is_ready: boolean;
13
- config: RecordFolderConfig;
14
- uid: number;
15
- aid: number;
16
- encode_status: EncodeStatus;
17
- baidu_host_id: number;
18
- baidu_upload_status: UploadStatus | null;
19
- baidu_upload_result: Record<string, {
20
- md4: string;
21
- fs_id: number;
22
- }>;
23
- ali_host_id: number;
24
- ali_upload_status: UploadStatus | null;
25
- ali_upload_result: Record<string, object>;
26
- upload_status: UploadStatus;
27
- is_paused: boolean;
28
- pid: number;
29
- type: RecordType;
30
- task_record_id: number;
31
- cloud_info: CloudInfoField;
32
- output_root: string;
33
- external_texts: string[];
34
- progress: UploadPrepareData;
35
- percent: number;
36
- encoded: EncodedData;
37
- order: number;
38
- updated_at: Date;
39
- created_at: Date;
40
- }
@@ -1 +0,0 @@
1
- "use strict";var __decorate=this&&this.__decorate||function(e,t,o,a){var d,p=arguments.length,_=p<3?t:null===a?a=Object.getOwnPropertyDescriptor(t,o):a;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)_=Reflect.decorate(e,t,o,a);else for(var l=e.length-1;l>=0;l--)(d=e[l])&&(_=(p<3?d(_):p>3?d(t,o,_):d(t,o))||_);return p>3&&_&&Object.defineProperty(t,o,_),_},__metadata=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)};Object.defineProperty(exports,"__esModule",{value:!0}),exports.UploadFile=void 0;const typeorm_1=require("typeorm"),types_1=require("@soga/types");let UploadFile=class{id;total_count;completed_count;inputs;filepath;root_id;root_status;space_id;space_name;is_ready;config;uid;aid;encode_status;baidu_host_id;baidu_upload_status;baidu_upload_result;ali_host_id;ali_upload_status;ali_upload_result;upload_status;is_paused;pid;type;task_record_id;cloud_info;output_root;external_texts;progress;percent;encoded;order;updated_at;created_at};exports.UploadFile=UploadFile,__decorate([(0,typeorm_1.PrimaryGeneratedColumn)(),__metadata("design:type",Number)],UploadFile.prototype,"id",void 0),__decorate([(0,typeorm_1.Column)({default:0}),__metadata("design:type",Number)],UploadFile.prototype,"total_count",void 0),__decorate([(0,typeorm_1.Column)({default:0}),__metadata("design:type",Number)],UploadFile.prototype,"completed_count",void 0),__decorate([(0,typeorm_1.Column)({type:"json",nullable:!0}),__metadata("design:type",Array)],UploadFile.prototype,"inputs",void 0),__decorate([(0,typeorm_1.Index)(),(0,typeorm_1.Column)({default:""}),__metadata("design:type",String)],UploadFile.prototype,"filepath",void 0),__decorate([(0,typeorm_1.Index)(),(0,typeorm_1.Column)({default:0}),__metadata("design:type",Number)],UploadFile.prototype,"root_id",void 0),__decorate([(0,typeorm_1.Index)(),(0,typeorm_1.Column)({type:"simple-enum",enum:types_1.RootStatus,nullable:!0}),__metadata("design:type",Number)],UploadFile.prototype,"root_status",void 0),__decorate([(0,typeorm_1.Column)(),__metadata("design:type",Number)],UploadFile.prototype,"space_id",void 0),__decorate([(0,typeorm_1.Column)(),__metadata("design:type",String)],UploadFile.prototype,"space_name",void 0),__decorate([(0,typeorm_1.Column)({default:!0}),__metadata("design:type",Boolean)],UploadFile.prototype,"is_ready",void 0),__decorate([(0,typeorm_1.Column)("json",{default:"{}"}),__metadata("design:type",Object)],UploadFile.prototype,"config",void 0),__decorate([(0,typeorm_1.Index)(),(0,typeorm_1.Column)({default:0}),__metadata("design:type",Number)],UploadFile.prototype,"uid",void 0),__decorate([(0,typeorm_1.Column)({default:0}),__metadata("design:type",Number)],UploadFile.prototype,"aid",void 0),__decorate([(0,typeorm_1.Index)(),(0,typeorm_1.Column)({type:"simple-enum",enum:types_1.EncodeStatus,default:types_1.EncodeStatus.NULL}),__metadata("design:type",Number)],UploadFile.prototype,"encode_status",void 0),__decorate([(0,typeorm_1.Index)(),(0,typeorm_1.Column)({nullable:!0}),__metadata("design:type",Number)],UploadFile.prototype,"baidu_host_id",void 0),__decorate([(0,typeorm_1.Index)(),(0,typeorm_1.Column)({type:"simple-enum",enum:types_1.UploadStatus,nullable:!0}),__metadata("design:type",Number)],UploadFile.prototype,"baidu_upload_status",void 0),__decorate([(0,typeorm_1.Column)({type:"json",nullable:!0}),__metadata("design:type",Object)],UploadFile.prototype,"baidu_upload_result",void 0),__decorate([(0,typeorm_1.Index)(),(0,typeorm_1.Column)({nullable:!0}),__metadata("design:type",Number)],UploadFile.prototype,"ali_host_id",void 0),__decorate([(0,typeorm_1.Index)(),(0,typeorm_1.Column)({type:"simple-enum",enum:types_1.UploadStatus,nullable:!0}),__metadata("design:type",Number)],UploadFile.prototype,"ali_upload_status",void 0),__decorate([(0,typeorm_1.Column)({type:"json",nullable:!0}),__metadata("design:type",Object)],UploadFile.prototype,"ali_upload_result",void 0),__decorate([(0,typeorm_1.Index)(),(0,typeorm_1.Column)({type:"simple-enum",enum:types_1.UploadStatus,default:types_1.UploadStatus.NULL}),__metadata("design:type",Number)],UploadFile.prototype,"upload_status",void 0),__decorate([(0,typeorm_1.Index)(),(0,typeorm_1.Column)({default:!1}),__metadata("design:type",Boolean)],UploadFile.prototype,"is_paused",void 0),__decorate([(0,typeorm_1.Index)(),(0,typeorm_1.Column)({default:0}),__metadata("design:type",Number)],UploadFile.prototype,"pid",void 0),__decorate([(0,typeorm_1.Index)(),(0,typeorm_1.Column)({type:"simple-enum",enum:types_1.RecordType}),__metadata("design:type",Number)],UploadFile.prototype,"type",void 0),__decorate([(0,typeorm_1.Column)({default:0}),__metadata("design:type",Number)],UploadFile.prototype,"task_record_id",void 0),__decorate([(0,typeorm_1.Column)({type:"json",default:"{}"}),__metadata("design:type",Object)],UploadFile.prototype,"cloud_info",void 0),__decorate([(0,typeorm_1.Column)({default:""}),__metadata("design:type",String)],UploadFile.prototype,"output_root",void 0),__decorate([(0,typeorm_1.Column)("json",{default:"[]"}),__metadata("design:type",Array)],UploadFile.prototype,"external_texts",void 0),__decorate([(0,typeorm_1.Column)({type:"json",default:"{}"}),__metadata("design:type",Object)],UploadFile.prototype,"progress",void 0),__decorate([(0,typeorm_1.Column)({default:0,type:"decimal"}),__metadata("design:type",Number)],UploadFile.prototype,"percent",void 0),__decorate([(0,typeorm_1.Column)({type:"json",default:"{}"}),__metadata("design:type",Object)],UploadFile.prototype,"encoded",void 0),__decorate([(0,typeorm_1.Column)({default:0}),__metadata("design:type",Number)],UploadFile.prototype,"order",void 0),__decorate([(0,typeorm_1.UpdateDateColumn)(),__metadata("design:type",Date)],UploadFile.prototype,"updated_at",void 0),__decorate([(0,typeorm_1.CreateDateColumn)(),__metadata("design:type",Date)],UploadFile.prototype,"created_at",void 0),exports.UploadFile=UploadFile=__decorate([(0,typeorm_1.Entity)()],UploadFile);
@@ -1,27 +0,0 @@
1
- import { FilePartItem, HostType, UploadStatus } from '@soga/types';
2
- export declare class UploadPart {
3
- id: number;
4
- uid: number;
5
- file_id: number;
6
- part_name: string;
7
- is_paused: boolean;
8
- output_root: string;
9
- info: FilePartItem;
10
- host_id: number;
11
- host_type: HostType;
12
- upload_status: UploadStatus;
13
- upload_percent: number;
14
- upload_result: UploadResult;
15
- updated_at: Date;
16
- created_at: Date;
17
- }
18
- type UploadResult = {
19
- ali?: {
20
- file_id: string;
21
- drive_id: string;
22
- };
23
- baidu?: {
24
- fs_id: number;
25
- };
26
- };
27
- export {};
@@ -1 +0,0 @@
1
- "use strict";var __decorate=this&&this.__decorate||function(t,e,o,a){var p,d=arguments.length,r=d<3?e:null===a?a=Object.getOwnPropertyDescriptor(e,o):a;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(t,e,o,a);else for(var _=t.length-1;_>=0;_--)(p=t[_])&&(r=(d<3?p(r):d>3?p(e,o,r):p(e,o))||r);return d>3&&r&&Object.defineProperty(e,o,r),r},__metadata=this&&this.__metadata||function(t,e){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(t,e)};Object.defineProperty(exports,"__esModule",{value:!0}),exports.UploadPart=void 0;const types_1=require("@soga/types"),typeorm_1=require("typeorm");let UploadPart=class{id;uid;file_id;part_name;is_paused;output_root;info;host_id;host_type;upload_status;upload_percent;upload_result;updated_at;created_at};exports.UploadPart=UploadPart,__decorate([(0,typeorm_1.PrimaryGeneratedColumn)(),__metadata("design:type",Number)],UploadPart.prototype,"id",void 0),__decorate([(0,typeorm_1.Index)(),(0,typeorm_1.Column)(),__metadata("design:type",Number)],UploadPart.prototype,"uid",void 0),__decorate([(0,typeorm_1.Index)(),(0,typeorm_1.Column)(),__metadata("design:type",Number)],UploadPart.prototype,"file_id",void 0),__decorate([(0,typeorm_1.Index)(),(0,typeorm_1.Column)({default:""}),__metadata("design:type",String)],UploadPart.prototype,"part_name",void 0),__decorate([(0,typeorm_1.Column)({default:!1}),__metadata("design:type",Boolean)],UploadPart.prototype,"is_paused",void 0),__decorate([(0,typeorm_1.Column)(),__metadata("design:type",String)],UploadPart.prototype,"output_root",void 0),__decorate([(0,typeorm_1.Column)("json"),__metadata("design:type",Object)],UploadPart.prototype,"info",void 0),__decorate([(0,typeorm_1.Index)(),(0,typeorm_1.Column)(),__metadata("design:type",Number)],UploadPart.prototype,"host_id",void 0),__decorate([(0,typeorm_1.Index)(),(0,typeorm_1.Column)({type:"simple-enum",enum:types_1.HostType}),__metadata("design:type",String)],UploadPart.prototype,"host_type",void 0),__decorate([(0,typeorm_1.Index)(),(0,typeorm_1.Column)({type:"simple-enum",enum:types_1.UploadStatus,default:types_1.UploadStatus.NULL}),__metadata("design:type",Number)],UploadPart.prototype,"upload_status",void 0),__decorate([(0,typeorm_1.Column)({default:0,type:"decimal"}),__metadata("design:type",Number)],UploadPart.prototype,"upload_percent",void 0),__decorate([(0,typeorm_1.Column)({type:"json",default:"{}"}),__metadata("design:type",Object)],UploadPart.prototype,"upload_result",void 0),__decorate([(0,typeorm_1.UpdateDateColumn)(),__metadata("design:type",Date)],UploadPart.prototype,"updated_at",void 0),__decorate([(0,typeorm_1.CreateDateColumn)(),__metadata("design:type",Date)],UploadPart.prototype,"created_at",void 0),exports.UploadPart=UploadPart=__decorate([(0,typeorm_1.Entity)()],UploadPart);
@@ -1,19 +0,0 @@
1
- import { RecordType } from '@soga/types';
2
- export declare class UploadSuccess {
3
- id: number;
4
- root_id: number;
5
- pid: number;
6
- space_id: number;
7
- space_name: string;
8
- uid: number;
9
- inputs: {
10
- filename: string;
11
- filepath: string;
12
- filesize: number;
13
- }[];
14
- cloud_id: number;
15
- cloud_name: string;
16
- type: RecordType;
17
- updated_at: Date;
18
- created_at: Date;
19
- }
@@ -1 +0,0 @@
1
- "use strict";var __decorate=this&&this.__decorate||function(e,t,o,a){var d,p=arguments.length,_=p<3?t:null===a?a=Object.getOwnPropertyDescriptor(t,o):a;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)_=Reflect.decorate(e,t,o,a);else for(var r=e.length-1;r>=0;r--)(d=e[r])&&(_=(p<3?d(_):p>3?d(t,o,_):d(t,o))||_);return p>3&&_&&Object.defineProperty(t,o,_),_},__metadata=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)};Object.defineProperty(exports,"__esModule",{value:!0}),exports.UploadSuccess=void 0;const types_1=require("@soga/types"),typeorm_1=require("typeorm");let UploadSuccess=class{id;root_id;pid;space_id;space_name;uid;inputs;cloud_id;cloud_name;type;updated_at;created_at};exports.UploadSuccess=UploadSuccess,__decorate([(0,typeorm_1.Index)(),(0,typeorm_1.PrimaryGeneratedColumn)(),__metadata("design:type",Number)],UploadSuccess.prototype,"id",void 0),__decorate([(0,typeorm_1.Index)(),(0,typeorm_1.Column)(),__metadata("design:type",Number)],UploadSuccess.prototype,"root_id",void 0),__decorate([(0,typeorm_1.Index)(),(0,typeorm_1.Column)({default:0}),__metadata("design:type",Number)],UploadSuccess.prototype,"pid",void 0),__decorate([(0,typeorm_1.Column)(),__metadata("design:type",Number)],UploadSuccess.prototype,"space_id",void 0),__decorate([(0,typeorm_1.Column)(),__metadata("design:type",String)],UploadSuccess.prototype,"space_name",void 0),__decorate([(0,typeorm_1.Column)(),__metadata("design:type",Number)],UploadSuccess.prototype,"uid",void 0),__decorate([(0,typeorm_1.Column)({type:"json",default:"[]"}),__metadata("design:type",Array)],UploadSuccess.prototype,"inputs",void 0),__decorate([(0,typeorm_1.Column)(),__metadata("design:type",Number)],UploadSuccess.prototype,"cloud_id",void 0),__decorate([(0,typeorm_1.Column)(),__metadata("design:type",String)],UploadSuccess.prototype,"cloud_name",void 0),__decorate([(0,typeorm_1.Column)({type:"simple-enum",enum:types_1.RecordType}),__metadata("design:type",Number)],UploadSuccess.prototype,"type",void 0),__decorate([(0,typeorm_1.UpdateDateColumn)(),__metadata("design:type",Date)],UploadSuccess.prototype,"updated_at",void 0),__decorate([(0,typeorm_1.CreateDateColumn)(),__metadata("design:type",Date)],UploadSuccess.prototype,"created_at",void 0),exports.UploadSuccess=UploadSuccess=__decorate([(0,typeorm_1.Entity)()],UploadSuccess);