@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.
- package/dist/download-file.d.ts +49 -0
- package/dist/download-file.d.ts.map +1 -0
- package/dist/download-file.js +220 -0
- package/dist/fetch-url.d.ts +10 -0
- package/dist/fetch-url.d.ts.map +1 -0
- package/dist/fetch-url.js +60 -0
- package/dist/host-token.d.ts +20 -0
- package/dist/host-token.d.ts.map +1 -0
- package/dist/host-token.js +62 -0
- package/dist/index.d.ts +9 -223
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +24 -1
- package/dist/media-subtitles.d.ts +35 -0
- package/dist/media-subtitles.d.ts.map +1 -0
- package/dist/media-subtitles.js +141 -0
- package/dist/upload-file.d.ts +49 -0
- package/dist/upload-file.d.ts.map +1 -0
- package/dist/upload-file.js +270 -0
- package/dist/upload-part.d.ts +30 -0
- package/dist/upload-part.d.ts.map +1 -0
- package/dist/upload-part.js +112 -0
- package/dist/upload-running.d.ts +14 -0
- package/dist/upload-running.d.ts.map +1 -0
- package/dist/upload-running.js +68 -0
- package/dist/upload-success.d.ts +21 -0
- package/dist/upload-success.d.ts.map +1 -0
- package/dist/upload-success.js +101 -0
- package/package.json +12 -12
- package/dist/index.d.mts +0 -223
- package/dist/index.mjs +0 -1
package/dist/index.js
CHANGED
|
@@ -1 +1,24 @@
|
|
|
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);
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
+
};
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
__exportStar(require("./download-file"), exports);
|
|
18
|
+
__exportStar(require("./host-token"), exports);
|
|
19
|
+
__exportStar(require("./fetch-url"), exports);
|
|
20
|
+
__exportStar(require("./media-subtitles"), exports);
|
|
21
|
+
__exportStar(require("./upload-file"), exports);
|
|
22
|
+
__exportStar(require("./upload-part"), exports);
|
|
23
|
+
__exportStar(require("./upload-running"), exports);
|
|
24
|
+
__exportStar(require("./upload-success"), exports);
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import { RecordDetail, NormalStatus } from '@soga/types';
|
|
2
|
+
export declare enum ActionType {
|
|
3
|
+
ADD = "add",
|
|
4
|
+
UPDATE = "update"
|
|
5
|
+
}
|
|
6
|
+
export declare class MediaSubtitles {
|
|
7
|
+
id: number;
|
|
8
|
+
is_attachment: boolean;
|
|
9
|
+
uuid: string;
|
|
10
|
+
uid: number;
|
|
11
|
+
space_id: number;
|
|
12
|
+
space_name: string;
|
|
13
|
+
record_id: number;
|
|
14
|
+
record_name: string;
|
|
15
|
+
record_info: RecordDetail;
|
|
16
|
+
action_type: ActionType;
|
|
17
|
+
action_uuid: string;
|
|
18
|
+
inputs: string[];
|
|
19
|
+
baidu_upload_result: {
|
|
20
|
+
md5: string;
|
|
21
|
+
md4: string;
|
|
22
|
+
size: number;
|
|
23
|
+
fs_id: number;
|
|
24
|
+
};
|
|
25
|
+
ali_upload_result: {
|
|
26
|
+
md5: string;
|
|
27
|
+
sha1: string;
|
|
28
|
+
size: number;
|
|
29
|
+
file_id: string;
|
|
30
|
+
};
|
|
31
|
+
status: NormalStatus;
|
|
32
|
+
output_root: string;
|
|
33
|
+
created_at: Date;
|
|
34
|
+
}
|
|
35
|
+
//# sourceMappingURL=media-subtitles.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"media-subtitles.d.ts","sourceRoot":"","sources":["../src/media-subtitles.ts"],"names":[],"mappings":"AAQA,OAAO,EAAE,YAAY,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AACzD,oBAAY,UAAU;IACpB,GAAG,QAAQ;IACX,MAAM,WAAW;CAClB;AACD,qBACa,cAAc;IAEzB,EAAE,EAAE,MAAM,CAAC;IAKX,aAAa,EAAE,OAAO,CAAC;IAKvB,IAAI,EAAE,MAAM,CAAC;IAOb,GAAG,EAAE,MAAM,CAAC;IAGZ,QAAQ,EAAE,MAAM,CAAC;IAGjB,UAAU,EAAE,MAAM,CAAC;IAInB,SAAS,EAAE,MAAM,CAAC;IAGlB,WAAW,EAAE,MAAM,CAAC;IAKpB,WAAW,EAAE,YAAY,CAAC;IAO1B,WAAW,EAAE,UAAU,CAAC;IAIxB,WAAW,EAAE,MAAM,CAAC;IAMpB,MAAM,EAAE,MAAM,EAAE,CAAC;IAMjB,mBAAmB,EAAE;QACnB,GAAG,EAAE,MAAM,CAAC;QACZ,GAAG,EAAE,MAAM,CAAC;QACZ,IAAI,EAAE,MAAM,CAAC;QACb,KAAK,EAAE,MAAM,CAAC;KACf,CAAC;IAMF,iBAAiB,EAAE;QACjB,GAAG,EAAE,MAAM,CAAC;QACZ,IAAI,EAAE,MAAM,CAAC;QACb,IAAI,EAAE,MAAM,CAAC;QACb,OAAO,EAAE,MAAM,CAAC;KACjB,CAAC;IAOF,MAAM,EAAE,YAAY,CAAC;IAIrB,WAAW,EAAE,MAAM,CAAC;IAIpB,UAAU,EAAE,IAAI,CAAC;CAClB"}
|
|
@@ -0,0 +1,141 @@
|
|
|
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.MediaSubtitles = exports.ActionType = void 0;
|
|
13
|
+
const typeorm_1 = require("typeorm");
|
|
14
|
+
const types_1 = require("@soga/types");
|
|
15
|
+
var ActionType;
|
|
16
|
+
(function (ActionType) {
|
|
17
|
+
ActionType["ADD"] = "add";
|
|
18
|
+
ActionType["UPDATE"] = "update";
|
|
19
|
+
})(ActionType || (exports.ActionType = ActionType = {}));
|
|
20
|
+
let MediaSubtitles = class MediaSubtitles {
|
|
21
|
+
id;
|
|
22
|
+
is_attachment;
|
|
23
|
+
uuid;
|
|
24
|
+
// 用户id
|
|
25
|
+
uid;
|
|
26
|
+
space_id;
|
|
27
|
+
space_name;
|
|
28
|
+
record_id;
|
|
29
|
+
record_name;
|
|
30
|
+
record_info;
|
|
31
|
+
action_type;
|
|
32
|
+
// 如果是更新字幕, 需要传入uuid
|
|
33
|
+
action_uuid;
|
|
34
|
+
inputs;
|
|
35
|
+
baidu_upload_result;
|
|
36
|
+
ali_upload_result;
|
|
37
|
+
status;
|
|
38
|
+
// 输出路径
|
|
39
|
+
output_root;
|
|
40
|
+
// 创建时间
|
|
41
|
+
created_at;
|
|
42
|
+
};
|
|
43
|
+
exports.MediaSubtitles = MediaSubtitles;
|
|
44
|
+
__decorate([
|
|
45
|
+
(0, typeorm_1.PrimaryGeneratedColumn)(),
|
|
46
|
+
__metadata("design:type", Number)
|
|
47
|
+
], MediaSubtitles.prototype, "id", void 0);
|
|
48
|
+
__decorate([
|
|
49
|
+
(0, typeorm_1.Column)({
|
|
50
|
+
default: false,
|
|
51
|
+
}),
|
|
52
|
+
__metadata("design:type", Boolean)
|
|
53
|
+
], MediaSubtitles.prototype, "is_attachment", void 0);
|
|
54
|
+
__decorate([
|
|
55
|
+
(0, typeorm_1.Column)({
|
|
56
|
+
nullable: true,
|
|
57
|
+
}),
|
|
58
|
+
__metadata("design:type", String)
|
|
59
|
+
], MediaSubtitles.prototype, "uuid", void 0);
|
|
60
|
+
__decorate([
|
|
61
|
+
(0, typeorm_1.Index)(),
|
|
62
|
+
(0, typeorm_1.Column)({
|
|
63
|
+
default: 0,
|
|
64
|
+
}),
|
|
65
|
+
__metadata("design:type", Number)
|
|
66
|
+
], MediaSubtitles.prototype, "uid", void 0);
|
|
67
|
+
__decorate([
|
|
68
|
+
(0, typeorm_1.Column)(),
|
|
69
|
+
__metadata("design:type", Number)
|
|
70
|
+
], MediaSubtitles.prototype, "space_id", void 0);
|
|
71
|
+
__decorate([
|
|
72
|
+
(0, typeorm_1.Column)(),
|
|
73
|
+
__metadata("design:type", String)
|
|
74
|
+
], MediaSubtitles.prototype, "space_name", void 0);
|
|
75
|
+
__decorate([
|
|
76
|
+
(0, typeorm_1.Index)(),
|
|
77
|
+
(0, typeorm_1.Column)({ default: 0 }),
|
|
78
|
+
__metadata("design:type", Number)
|
|
79
|
+
], MediaSubtitles.prototype, "record_id", void 0);
|
|
80
|
+
__decorate([
|
|
81
|
+
(0, typeorm_1.Column)(),
|
|
82
|
+
__metadata("design:type", String)
|
|
83
|
+
], MediaSubtitles.prototype, "record_name", void 0);
|
|
84
|
+
__decorate([
|
|
85
|
+
(0, typeorm_1.Column)({
|
|
86
|
+
type: 'json',
|
|
87
|
+
}),
|
|
88
|
+
__metadata("design:type", Object)
|
|
89
|
+
], MediaSubtitles.prototype, "record_info", void 0);
|
|
90
|
+
__decorate([
|
|
91
|
+
(0, typeorm_1.Column)({
|
|
92
|
+
type: 'simple-enum',
|
|
93
|
+
enum: ActionType,
|
|
94
|
+
default: ActionType.ADD,
|
|
95
|
+
}),
|
|
96
|
+
__metadata("design:type", String)
|
|
97
|
+
], MediaSubtitles.prototype, "action_type", void 0);
|
|
98
|
+
__decorate([
|
|
99
|
+
(0, typeorm_1.Column)({ default: '' }),
|
|
100
|
+
__metadata("design:type", String)
|
|
101
|
+
], MediaSubtitles.prototype, "action_uuid", void 0);
|
|
102
|
+
__decorate([
|
|
103
|
+
(0, typeorm_1.Column)({
|
|
104
|
+
type: 'json',
|
|
105
|
+
nullable: true,
|
|
106
|
+
}),
|
|
107
|
+
__metadata("design:type", Array)
|
|
108
|
+
], MediaSubtitles.prototype, "inputs", void 0);
|
|
109
|
+
__decorate([
|
|
110
|
+
(0, typeorm_1.Column)({
|
|
111
|
+
type: 'json',
|
|
112
|
+
nullable: true,
|
|
113
|
+
}),
|
|
114
|
+
__metadata("design:type", Object)
|
|
115
|
+
], MediaSubtitles.prototype, "baidu_upload_result", void 0);
|
|
116
|
+
__decorate([
|
|
117
|
+
(0, typeorm_1.Column)({
|
|
118
|
+
type: 'json',
|
|
119
|
+
nullable: true,
|
|
120
|
+
}),
|
|
121
|
+
__metadata("design:type", Object)
|
|
122
|
+
], MediaSubtitles.prototype, "ali_upload_result", void 0);
|
|
123
|
+
__decorate([
|
|
124
|
+
(0, typeorm_1.Column)({
|
|
125
|
+
type: 'simple-enum',
|
|
126
|
+
enum: types_1.NormalStatus,
|
|
127
|
+
default: types_1.NormalStatus.PROCESS,
|
|
128
|
+
}),
|
|
129
|
+
__metadata("design:type", Number)
|
|
130
|
+
], MediaSubtitles.prototype, "status", void 0);
|
|
131
|
+
__decorate([
|
|
132
|
+
(0, typeorm_1.Column)(),
|
|
133
|
+
__metadata("design:type", String)
|
|
134
|
+
], MediaSubtitles.prototype, "output_root", void 0);
|
|
135
|
+
__decorate([
|
|
136
|
+
(0, typeorm_1.CreateDateColumn)(),
|
|
137
|
+
__metadata("design:type", Date)
|
|
138
|
+
], MediaSubtitles.prototype, "created_at", void 0);
|
|
139
|
+
exports.MediaSubtitles = MediaSubtitles = __decorate([
|
|
140
|
+
(0, typeorm_1.Entity)()
|
|
141
|
+
], MediaSubtitles);
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
import { RecordType, RecordFolderConfig, UploadStatus, CloudInfoField, RecordFtype, NormalStatus } from '@soga/types';
|
|
2
|
+
import { EncodePrepareResult, EncodeResult, UploadInputItem } from '@soga/node-types';
|
|
3
|
+
export interface ErrorType {
|
|
4
|
+
type: 'encode' | 'upload';
|
|
5
|
+
message: string;
|
|
6
|
+
stack?: string;
|
|
7
|
+
details?: string[];
|
|
8
|
+
cause?: any;
|
|
9
|
+
}
|
|
10
|
+
export declare class UploadFile {
|
|
11
|
+
id: number;
|
|
12
|
+
is_attachment: boolean;
|
|
13
|
+
total_count: number;
|
|
14
|
+
completed_count: number;
|
|
15
|
+
input: UploadInputItem;
|
|
16
|
+
filepath: string;
|
|
17
|
+
root_id: number;
|
|
18
|
+
root_status: NormalStatus;
|
|
19
|
+
space_id: number;
|
|
20
|
+
space_name: string;
|
|
21
|
+
is_ready: boolean;
|
|
22
|
+
config: RecordFolderConfig;
|
|
23
|
+
uid: number;
|
|
24
|
+
aid: number;
|
|
25
|
+
baidu_host_id: number;
|
|
26
|
+
baidu_upload_result: Record<string, {
|
|
27
|
+
md4: string;
|
|
28
|
+
fs_id: number;
|
|
29
|
+
}>;
|
|
30
|
+
ali_host_id: number;
|
|
31
|
+
ali_upload_result: Record<string, object>;
|
|
32
|
+
upload_status: UploadStatus;
|
|
33
|
+
is_paused: boolean;
|
|
34
|
+
pid: number;
|
|
35
|
+
type: RecordType;
|
|
36
|
+
ftype: RecordFtype;
|
|
37
|
+
task_record_id: number;
|
|
38
|
+
cloud_info: CloudInfoField;
|
|
39
|
+
output_root: string;
|
|
40
|
+
external_texts: string[];
|
|
41
|
+
progress: EncodePrepareResult;
|
|
42
|
+
percent: number;
|
|
43
|
+
encoded: EncodeResult;
|
|
44
|
+
error: ErrorType | null;
|
|
45
|
+
order: number;
|
|
46
|
+
updated_at: Date;
|
|
47
|
+
created_at: Date;
|
|
48
|
+
}
|
|
49
|
+
//# sourceMappingURL=upload-file.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"upload-file.d.ts","sourceRoot":"","sources":["../src/upload-file.ts"],"names":[],"mappings":"AASA,OAAO,EACL,UAAU,EACV,kBAAkB,EAClB,YAAY,EACZ,cAAc,EACd,WAAW,EACX,YAAY,EACb,MAAM,aAAa,CAAC;AACrB,OAAO,EACL,mBAAmB,EACnB,YAAY,EACZ,eAAe,EAChB,MAAM,kBAAkB,CAAC;AAE1B,MAAM,WAAW,SAAS;IAGxB,IAAI,EAAE,QAAQ,GAAG,QAAQ,CAAC;IAC1B,OAAO,EAAE,MAAM,CAAC;IAChB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,OAAO,CAAC,EAAE,MAAM,EAAE,CAAC;IACnB,KAAK,CAAC,EAAE,GAAG,CAAC;CACb;AACD,qBACa,UAAU;IAErB,EAAE,EAAE,MAAM,CAAC;IAKX,aAAa,EAAE,OAAO,CAAC;IAGvB,WAAW,EAAE,MAAM,CAAC;IAGpB,eAAe,EAAE,MAAM,CAAC;IAcxB,KAAK,EAAE,eAAe,CAAC;IAIvB,QAAQ,EAAE,MAAM,CAAC;IAKjB,OAAO,EAAE,MAAM,CAAC;IAQhB,WAAW,EAAE,YAAY,CAAC;IAG1B,QAAQ,EAAE,MAAM,CAAC;IAGjB,UAAU,EAAE,MAAM,CAAC;IAGnB,QAAQ,EAAE,OAAO,CAAC;IAOlB,MAAM,EAAE,kBAAkB,CAAC;IAO3B,GAAG,EAAE,MAAM,CAAC;IAMZ,GAAG,EAAE,MAAM,CAAC;IAIZ,aAAa,EAAE,MAAM,CAAC;IAMtB,mBAAmB,EAAE,MAAM,CACzB,MAAM,EACN;QACE,GAAG,EAAE,MAAM,CAAC;QACZ,KAAK,EAAE,MAAM,CAAC;KACf,CACF,CAAC;IAIF,WAAW,EAAE,MAAM,CAAC;IAMpB,iBAAiB,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IAY1C,aAAa,EAAE,YAAY,CAAC;IAI5B,SAAS,EAAE,OAAO,CAAC;IAOnB,GAAG,EAAE,MAAM,CAAC;IAQZ,IAAI,EAAE,UAAU,CAAC;IAOjB,KAAK,EAAE,WAAW,CAAC;IAInB,cAAc,EAAE,MAAM,CAAC;IAMvB,UAAU,EAAE,cAAc,CAAC;IAI3B,WAAW,EAAE,MAAM,CAAC;IAGpB,cAAc,EAAE,MAAM,EAAE,CAAC;IAGzB,QAAQ,EAAE,mBAAmB,CAAC;IAG9B,OAAO,EAAE,MAAM,CAAC;IAOhB,OAAO,EAAE,YAAY,CAAC;IAMtB,KAAK,EAAE,SAAS,GAAG,IAAI,CAAC;IASxB,KAAK,EAAE,MAAM,CAAC;IAId,UAAU,EAAE,IAAI,CAAC;IAIjB,UAAU,EAAE,IAAI,CAAC;CAClB"}
|
|
@@ -0,0 +1,270 @@
|
|
|
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.UploadFile = void 0;
|
|
13
|
+
const typeorm_1 = require("typeorm");
|
|
14
|
+
const types_1 = require("@soga/types");
|
|
15
|
+
let UploadFile = class UploadFile {
|
|
16
|
+
id;
|
|
17
|
+
is_attachment;
|
|
18
|
+
total_count;
|
|
19
|
+
completed_count;
|
|
20
|
+
// @Index()
|
|
21
|
+
// @Column({ nullable: true })
|
|
22
|
+
// filename: string;
|
|
23
|
+
// @Index()
|
|
24
|
+
// @Column({ nullable: true })
|
|
25
|
+
// filepath: string;
|
|
26
|
+
input;
|
|
27
|
+
filepath;
|
|
28
|
+
// 上传的如果是一个文件夹,则文件夹为一个root,文件夹下全部文件的root_id都为这个值,该文件夹的root_id为0
|
|
29
|
+
root_id;
|
|
30
|
+
root_status;
|
|
31
|
+
space_id;
|
|
32
|
+
space_name;
|
|
33
|
+
is_ready;
|
|
34
|
+
// @Index()
|
|
35
|
+
// @Column({ default: '' })
|
|
36
|
+
// task_id: string;
|
|
37
|
+
config;
|
|
38
|
+
// 用户id
|
|
39
|
+
uid;
|
|
40
|
+
// 专辑id
|
|
41
|
+
aid;
|
|
42
|
+
baidu_host_id;
|
|
43
|
+
baidu_upload_result;
|
|
44
|
+
ali_host_id;
|
|
45
|
+
ali_upload_result;
|
|
46
|
+
// // 是否有些part已经上传完成。主要用在单个片段都上传成功,但是整体的状态失败的场景
|
|
47
|
+
// @Column({ default: false })
|
|
48
|
+
// some_host_uploaded: boolean;
|
|
49
|
+
upload_status;
|
|
50
|
+
is_paused;
|
|
51
|
+
// 上级目录id
|
|
52
|
+
pid;
|
|
53
|
+
// 文件类型
|
|
54
|
+
type;
|
|
55
|
+
ftype;
|
|
56
|
+
// 上传任务上传到的record_id
|
|
57
|
+
task_record_id;
|
|
58
|
+
cloud_info;
|
|
59
|
+
// 输出路径
|
|
60
|
+
output_root;
|
|
61
|
+
external_texts;
|
|
62
|
+
progress;
|
|
63
|
+
percent;
|
|
64
|
+
// encoded: EncodedData;
|
|
65
|
+
encoded;
|
|
66
|
+
error;
|
|
67
|
+
// @Column({
|
|
68
|
+
// type: 'json',
|
|
69
|
+
// default: '{}',
|
|
70
|
+
// })
|
|
71
|
+
// uploaded: UploadedData;
|
|
72
|
+
order;
|
|
73
|
+
// 最后一次更新时间
|
|
74
|
+
updated_at;
|
|
75
|
+
// 创建时间
|
|
76
|
+
created_at;
|
|
77
|
+
};
|
|
78
|
+
exports.UploadFile = UploadFile;
|
|
79
|
+
__decorate([
|
|
80
|
+
(0, typeorm_1.PrimaryGeneratedColumn)(),
|
|
81
|
+
__metadata("design:type", Number)
|
|
82
|
+
], UploadFile.prototype, "id", void 0);
|
|
83
|
+
__decorate([
|
|
84
|
+
(0, typeorm_1.Column)({
|
|
85
|
+
default: false,
|
|
86
|
+
}),
|
|
87
|
+
__metadata("design:type", Boolean)
|
|
88
|
+
], UploadFile.prototype, "is_attachment", void 0);
|
|
89
|
+
__decorate([
|
|
90
|
+
(0, typeorm_1.Column)({ default: 0 }),
|
|
91
|
+
__metadata("design:type", Number)
|
|
92
|
+
], UploadFile.prototype, "total_count", void 0);
|
|
93
|
+
__decorate([
|
|
94
|
+
(0, typeorm_1.Column)({ default: 0 }),
|
|
95
|
+
__metadata("design:type", Number)
|
|
96
|
+
], UploadFile.prototype, "completed_count", void 0);
|
|
97
|
+
__decorate([
|
|
98
|
+
(0, typeorm_1.Column)({
|
|
99
|
+
type: 'json',
|
|
100
|
+
nullable: true,
|
|
101
|
+
}),
|
|
102
|
+
__metadata("design:type", Object)
|
|
103
|
+
], UploadFile.prototype, "input", void 0);
|
|
104
|
+
__decorate([
|
|
105
|
+
(0, typeorm_1.Index)(),
|
|
106
|
+
(0, typeorm_1.Column)({ default: '' }),
|
|
107
|
+
__metadata("design:type", String)
|
|
108
|
+
], UploadFile.prototype, "filepath", void 0);
|
|
109
|
+
__decorate([
|
|
110
|
+
(0, typeorm_1.Index)(),
|
|
111
|
+
(0, typeorm_1.Column)({ default: 0 }),
|
|
112
|
+
__metadata("design:type", Number)
|
|
113
|
+
], UploadFile.prototype, "root_id", void 0);
|
|
114
|
+
__decorate([
|
|
115
|
+
(0, typeorm_1.Index)(),
|
|
116
|
+
(0, typeorm_1.Column)({
|
|
117
|
+
type: 'simple-enum',
|
|
118
|
+
enum: types_1.NormalStatus,
|
|
119
|
+
nullable: true,
|
|
120
|
+
}),
|
|
121
|
+
__metadata("design:type", Number)
|
|
122
|
+
], UploadFile.prototype, "root_status", void 0);
|
|
123
|
+
__decorate([
|
|
124
|
+
(0, typeorm_1.Column)(),
|
|
125
|
+
__metadata("design:type", Number)
|
|
126
|
+
], UploadFile.prototype, "space_id", void 0);
|
|
127
|
+
__decorate([
|
|
128
|
+
(0, typeorm_1.Column)(),
|
|
129
|
+
__metadata("design:type", String)
|
|
130
|
+
], UploadFile.prototype, "space_name", void 0);
|
|
131
|
+
__decorate([
|
|
132
|
+
(0, typeorm_1.Column)({ default: true }),
|
|
133
|
+
__metadata("design:type", Boolean)
|
|
134
|
+
], UploadFile.prototype, "is_ready", void 0);
|
|
135
|
+
__decorate([
|
|
136
|
+
(0, typeorm_1.Column)('json', { default: '{}' }),
|
|
137
|
+
__metadata("design:type", Object)
|
|
138
|
+
], UploadFile.prototype, "config", void 0);
|
|
139
|
+
__decorate([
|
|
140
|
+
(0, typeorm_1.Index)(),
|
|
141
|
+
(0, typeorm_1.Column)({
|
|
142
|
+
default: 0,
|
|
143
|
+
}),
|
|
144
|
+
__metadata("design:type", Number)
|
|
145
|
+
], UploadFile.prototype, "uid", void 0);
|
|
146
|
+
__decorate([
|
|
147
|
+
(0, typeorm_1.Column)({
|
|
148
|
+
default: 0,
|
|
149
|
+
}),
|
|
150
|
+
__metadata("design:type", Number)
|
|
151
|
+
], UploadFile.prototype, "aid", void 0);
|
|
152
|
+
__decorate([
|
|
153
|
+
(0, typeorm_1.Index)(),
|
|
154
|
+
(0, typeorm_1.Column)({ nullable: true }),
|
|
155
|
+
__metadata("design:type", Number)
|
|
156
|
+
], UploadFile.prototype, "baidu_host_id", void 0);
|
|
157
|
+
__decorate([
|
|
158
|
+
(0, typeorm_1.Column)({
|
|
159
|
+
type: 'json',
|
|
160
|
+
nullable: true,
|
|
161
|
+
}),
|
|
162
|
+
__metadata("design:type", Object)
|
|
163
|
+
], UploadFile.prototype, "baidu_upload_result", void 0);
|
|
164
|
+
__decorate([
|
|
165
|
+
(0, typeorm_1.Index)(),
|
|
166
|
+
(0, typeorm_1.Column)({ nullable: true }),
|
|
167
|
+
__metadata("design:type", Number)
|
|
168
|
+
], UploadFile.prototype, "ali_host_id", void 0);
|
|
169
|
+
__decorate([
|
|
170
|
+
(0, typeorm_1.Column)({
|
|
171
|
+
type: 'json',
|
|
172
|
+
nullable: true,
|
|
173
|
+
}),
|
|
174
|
+
__metadata("design:type", Object)
|
|
175
|
+
], UploadFile.prototype, "ali_upload_result", void 0);
|
|
176
|
+
__decorate([
|
|
177
|
+
(0, typeorm_1.Index)(),
|
|
178
|
+
(0, typeorm_1.Column)({
|
|
179
|
+
type: 'simple-enum',
|
|
180
|
+
enum: types_1.UploadStatus,
|
|
181
|
+
default: types_1.UploadStatus.NULL,
|
|
182
|
+
}),
|
|
183
|
+
__metadata("design:type", Number)
|
|
184
|
+
], UploadFile.prototype, "upload_status", void 0);
|
|
185
|
+
__decorate([
|
|
186
|
+
(0, typeorm_1.Index)(),
|
|
187
|
+
(0, typeorm_1.Column)({ default: false }),
|
|
188
|
+
__metadata("design:type", Boolean)
|
|
189
|
+
], UploadFile.prototype, "is_paused", void 0);
|
|
190
|
+
__decorate([
|
|
191
|
+
(0, typeorm_1.Index)(),
|
|
192
|
+
(0, typeorm_1.Column)({
|
|
193
|
+
default: 0,
|
|
194
|
+
}),
|
|
195
|
+
__metadata("design:type", Number)
|
|
196
|
+
], UploadFile.prototype, "pid", void 0);
|
|
197
|
+
__decorate([
|
|
198
|
+
(0, typeorm_1.Index)(),
|
|
199
|
+
(0, typeorm_1.Column)({
|
|
200
|
+
type: 'simple-enum',
|
|
201
|
+
enum: types_1.RecordType,
|
|
202
|
+
}),
|
|
203
|
+
__metadata("design:type", Number)
|
|
204
|
+
], UploadFile.prototype, "type", void 0);
|
|
205
|
+
__decorate([
|
|
206
|
+
(0, typeorm_1.Index)(),
|
|
207
|
+
(0, typeorm_1.Column)({
|
|
208
|
+
type: 'simple-enum',
|
|
209
|
+
enum: types_1.RecordFtype,
|
|
210
|
+
}),
|
|
211
|
+
__metadata("design:type", Number)
|
|
212
|
+
], UploadFile.prototype, "ftype", void 0);
|
|
213
|
+
__decorate([
|
|
214
|
+
(0, typeorm_1.Column)({ default: 0 }),
|
|
215
|
+
__metadata("design:type", Number)
|
|
216
|
+
], UploadFile.prototype, "task_record_id", void 0);
|
|
217
|
+
__decorate([
|
|
218
|
+
(0, typeorm_1.Column)({
|
|
219
|
+
type: 'json',
|
|
220
|
+
default: '{}',
|
|
221
|
+
}),
|
|
222
|
+
__metadata("design:type", Object)
|
|
223
|
+
], UploadFile.prototype, "cloud_info", void 0);
|
|
224
|
+
__decorate([
|
|
225
|
+
(0, typeorm_1.Column)({ default: '' }),
|
|
226
|
+
__metadata("design:type", String)
|
|
227
|
+
], UploadFile.prototype, "output_root", void 0);
|
|
228
|
+
__decorate([
|
|
229
|
+
(0, typeorm_1.Column)('json', { default: '[]' }),
|
|
230
|
+
__metadata("design:type", Array)
|
|
231
|
+
], UploadFile.prototype, "external_texts", void 0);
|
|
232
|
+
__decorate([
|
|
233
|
+
(0, typeorm_1.Column)({ type: 'json', default: '{}' }),
|
|
234
|
+
__metadata("design:type", Object)
|
|
235
|
+
], UploadFile.prototype, "progress", void 0);
|
|
236
|
+
__decorate([
|
|
237
|
+
(0, typeorm_1.Column)({ default: 0, type: 'decimal' }),
|
|
238
|
+
__metadata("design:type", Number)
|
|
239
|
+
], UploadFile.prototype, "percent", void 0);
|
|
240
|
+
__decorate([
|
|
241
|
+
(0, typeorm_1.Column)({
|
|
242
|
+
type: 'json',
|
|
243
|
+
default: '{}',
|
|
244
|
+
})
|
|
245
|
+
// encoded: EncodedData;
|
|
246
|
+
,
|
|
247
|
+
__metadata("design:type", Object)
|
|
248
|
+
], UploadFile.prototype, "encoded", void 0);
|
|
249
|
+
__decorate([
|
|
250
|
+
(0, typeorm_1.Column)({
|
|
251
|
+
nullable: true,
|
|
252
|
+
type: 'json',
|
|
253
|
+
}),
|
|
254
|
+
__metadata("design:type", Object)
|
|
255
|
+
], UploadFile.prototype, "error", void 0);
|
|
256
|
+
__decorate([
|
|
257
|
+
(0, typeorm_1.Column)({ default: 0 }),
|
|
258
|
+
__metadata("design:type", Number)
|
|
259
|
+
], UploadFile.prototype, "order", void 0);
|
|
260
|
+
__decorate([
|
|
261
|
+
(0, typeorm_1.UpdateDateColumn)(),
|
|
262
|
+
__metadata("design:type", Date)
|
|
263
|
+
], UploadFile.prototype, "updated_at", void 0);
|
|
264
|
+
__decorate([
|
|
265
|
+
(0, typeorm_1.CreateDateColumn)(),
|
|
266
|
+
__metadata("design:type", Date)
|
|
267
|
+
], UploadFile.prototype, "created_at", void 0);
|
|
268
|
+
exports.UploadFile = UploadFile = __decorate([
|
|
269
|
+
(0, typeorm_1.Entity)()
|
|
270
|
+
], UploadFile);
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { PartItem } from '@soga/node-types';
|
|
2
|
+
import { HostType, NormalStatus } from '@soga/types';
|
|
3
|
+
export declare class UploadPart {
|
|
4
|
+
id: number;
|
|
5
|
+
uid: number;
|
|
6
|
+
file_id: number;
|
|
7
|
+
root_id: number;
|
|
8
|
+
part_name: string;
|
|
9
|
+
is_paused: boolean;
|
|
10
|
+
output_root: string;
|
|
11
|
+
info: PartItem;
|
|
12
|
+
host_id: number;
|
|
13
|
+
host_type: HostType;
|
|
14
|
+
upload_status: NormalStatus;
|
|
15
|
+
upload_percent: number;
|
|
16
|
+
upload_result: UploadResult;
|
|
17
|
+
updated_at: Date;
|
|
18
|
+
created_at: Date;
|
|
19
|
+
}
|
|
20
|
+
type UploadResult = {
|
|
21
|
+
ali?: {
|
|
22
|
+
file_id: string;
|
|
23
|
+
drive_id: string;
|
|
24
|
+
};
|
|
25
|
+
baidu?: {
|
|
26
|
+
fs_id: number;
|
|
27
|
+
};
|
|
28
|
+
};
|
|
29
|
+
export {};
|
|
30
|
+
//# sourceMappingURL=upload-part.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"upload-part.d.ts","sourceRoot":"","sources":["../src/upload-part.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AAC5C,OAAO,EAAE,QAAQ,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAUrD,qBACa,UAAU;IAErB,EAAE,EAAE,MAAM,CAAC;IAIX,GAAG,EAAE,MAAM,CAAC;IAIZ,OAAO,EAAE,MAAM,CAAC;IAIhB,OAAO,EAAE,MAAM,CAAC;IAIhB,SAAS,EAAE,MAAM,CAAC;IAGlB,SAAS,EAAE,OAAO,CAAC;IAGnB,WAAW,EAAE,MAAM,CAAC;IAGpB,IAAI,EAAE,QAAQ,CAAC;IAIf,OAAO,EAAE,MAAM,CAAC;IAOhB,SAAS,EAAE,QAAQ,CAAC;IAQpB,aAAa,EAAE,YAAY,CAAC;IAG5B,cAAc,EAAE,MAAM,CAAC;IAMvB,aAAa,EAAE,YAAY,CAAC;IAG5B,UAAU,EAAE,IAAI,CAAC;IAGjB,UAAU,EAAE,IAAI,CAAC;CAClB;AAED,KAAK,YAAY,GAAG;IAClB,GAAG,CAAC,EAAE;QAAE,OAAO,EAAE,MAAM,CAAC;QAAC,QAAQ,EAAE,MAAM,CAAA;KAAE,CAAC;IAC5C,KAAK,CAAC,EAAE;QAAE,KAAK,EAAE,MAAM,CAAA;KAAE,CAAC;CAC3B,CAAC"}
|