@soga/types 0.3.0 → 0.5.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.
- package/dist/index.d.mts +843 -0
- package/dist/index.d.ts +843 -0
- package/dist/index.js +171 -0
- package/dist/index.mjs +133 -0
- package/package.json +12 -8
- package/dist/common.d.ts +0 -41
- package/dist/common.js +0 -2
- package/dist/download.d.ts +0 -39
- package/dist/download.js +0 -10
- package/dist/error.d.ts +0 -10
- package/dist/error.js +0 -2
- package/dist/host.d.ts +0 -41
- package/dist/host.js +0 -13
- package/dist/main.d.ts +0 -14
- package/dist/main.js +0 -30
- package/dist/member.d.ts +0 -13
- package/dist/member.js +0 -2
- package/dist/net-success.d.ts +0 -21
- package/dist/net-success.js +0 -8
- package/dist/record-manifest.d.ts +0 -185
- package/dist/record-manifest.js +0 -2
- package/dist/record.d.ts +0 -128
- package/dist/record.js +0 -48
- package/dist/share.d.ts +0 -38
- package/dist/share.js +0 -2
- package/dist/space.d.ts +0 -26
- package/dist/space.js +0 -2
- package/dist/sub.d.ts +0 -19
- package/dist/sub.js +0 -2
- package/dist/upload-process.d.ts +0 -172
- package/dist/upload-process.js +0 -21
- package/dist/upload.d.ts +0 -86
- package/dist/upload.js +0 -25
- package/dist/user.d.ts +0 -21
- package/dist/user.js +0 -2
package/dist/index.js
ADDED
|
@@ -0,0 +1,171 @@
|
|
|
1
|
+
var __defProp = Object.defineProperty;
|
|
2
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
3
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
4
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
5
|
+
var __export = (target, all) => {
|
|
6
|
+
for (var name in all)
|
|
7
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
8
|
+
};
|
|
9
|
+
var __copyProps = (to, from, except, desc) => {
|
|
10
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
11
|
+
for (let key of __getOwnPropNames(from))
|
|
12
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
13
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
14
|
+
}
|
|
15
|
+
return to;
|
|
16
|
+
};
|
|
17
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
18
|
+
|
|
19
|
+
// src/index.ts
|
|
20
|
+
var index_exports = {};
|
|
21
|
+
__export(index_exports, {
|
|
22
|
+
CloudType: () => CloudType,
|
|
23
|
+
DownloadStatus: () => DownloadStatus,
|
|
24
|
+
EncodeStatus: () => EncodeStatus,
|
|
25
|
+
HostType: () => HostType,
|
|
26
|
+
NetType: () => NetType,
|
|
27
|
+
RecordAdaptResolution: () => RecordAdaptResolution,
|
|
28
|
+
RecordFileKeep: () => RecordFileKeep,
|
|
29
|
+
RecordFtype: () => RecordFtype,
|
|
30
|
+
RecordInsertLast: () => RecordInsertLast,
|
|
31
|
+
RecordType: () => RecordType,
|
|
32
|
+
RootStatus: () => RootStatus,
|
|
33
|
+
UploadProcessStep: () => UploadProcessStep,
|
|
34
|
+
UploadStatus: () => UploadStatus
|
|
35
|
+
});
|
|
36
|
+
module.exports = __toCommonJS(index_exports);
|
|
37
|
+
|
|
38
|
+
// src/host.ts
|
|
39
|
+
var HostType = /* @__PURE__ */ function(HostType2) {
|
|
40
|
+
HostType2["BAIDU"] = "baidu";
|
|
41
|
+
HostType2["ALI"] = "ali";
|
|
42
|
+
return HostType2;
|
|
43
|
+
}({});
|
|
44
|
+
var CloudType = /* @__PURE__ */ function(CloudType2) {
|
|
45
|
+
CloudType2[CloudType2["BAIDU"] = 1] = "BAIDU";
|
|
46
|
+
CloudType2[CloudType2["ALI"] = 2] = "ALI";
|
|
47
|
+
return CloudType2;
|
|
48
|
+
}({});
|
|
49
|
+
|
|
50
|
+
// src/record.ts
|
|
51
|
+
var RecordType = /* @__PURE__ */ function(RecordType2) {
|
|
52
|
+
RecordType2[RecordType2["FOLDER"] = 0] = "FOLDER";
|
|
53
|
+
RecordType2[RecordType2["VIDEO"] = 1] = "VIDEO";
|
|
54
|
+
RecordType2[RecordType2["AUDIO"] = 2] = "AUDIO";
|
|
55
|
+
RecordType2[RecordType2["IMAGE"] = 3] = "IMAGE";
|
|
56
|
+
RecordType2[RecordType2["TXT"] = 4] = "TXT";
|
|
57
|
+
RecordType2[RecordType2["TEXT"] = 5] = "TEXT";
|
|
58
|
+
RecordType2[RecordType2["OTHER"] = 6] = "OTHER";
|
|
59
|
+
RecordType2[RecordType2["TEXT_RELATION"] = 120] = "TEXT_RELATION";
|
|
60
|
+
RecordType2[RecordType2["AFFIX"] = 127] = "AFFIX";
|
|
61
|
+
return RecordType2;
|
|
62
|
+
}({});
|
|
63
|
+
var RecordFtype = /* @__PURE__ */ function(RecordFtype2) {
|
|
64
|
+
RecordFtype2[RecordFtype2["NONE"] = 0] = "NONE";
|
|
65
|
+
RecordFtype2[RecordFtype2["VIDEO_NORMAL"] = 11] = "VIDEO_NORMAL";
|
|
66
|
+
RecordFtype2[RecordFtype2["VIDEO_VR"] = 12] = "VIDEO_VR";
|
|
67
|
+
RecordFtype2[RecordFtype2["VIDEO_3D"] = 13] = "VIDEO_3D";
|
|
68
|
+
RecordFtype2[RecordFtype2["IMAGE_NORMAL"] = 31] = "IMAGE_NORMAL";
|
|
69
|
+
RecordFtype2[RecordFtype2["IMAGE_VR"] = 32] = "IMAGE_VR";
|
|
70
|
+
RecordFtype2[RecordFtype2["TEXT_PDF"] = 52] = "TEXT_PDF";
|
|
71
|
+
RecordFtype2[RecordFtype2["TEXT_WORD"] = 53] = "TEXT_WORD";
|
|
72
|
+
RecordFtype2[RecordFtype2["TEXT_EXCEL"] = 55] = "TEXT_EXCEL";
|
|
73
|
+
RecordFtype2[RecordFtype2["TEXT_PPT"] = 55] = "TEXT_PPT";
|
|
74
|
+
RecordFtype2[RecordFtype2["TEXT_OTHER"] = 56] = "TEXT_OTHER";
|
|
75
|
+
return RecordFtype2;
|
|
76
|
+
}({});
|
|
77
|
+
var RecordInsertLast = /* @__PURE__ */ function(RecordInsertLast2) {
|
|
78
|
+
RecordInsertLast2[RecordInsertLast2["NULL"] = 0] = "NULL";
|
|
79
|
+
RecordInsertLast2[RecordInsertLast2["YES"] = 1] = "YES";
|
|
80
|
+
RecordInsertLast2[RecordInsertLast2["NO"] = -1] = "NO";
|
|
81
|
+
return RecordInsertLast2;
|
|
82
|
+
}({});
|
|
83
|
+
var RecordFileKeep = /* @__PURE__ */ function(RecordFileKeep2) {
|
|
84
|
+
RecordFileKeep2[RecordFileKeep2["NULL"] = 0] = "NULL";
|
|
85
|
+
RecordFileKeep2[RecordFileKeep2["SOURCE"] = 1] = "SOURCE";
|
|
86
|
+
RecordFileKeep2[RecordFileKeep2["PREVIEW"] = 2] = "PREVIEW";
|
|
87
|
+
RecordFileKeep2[RecordFileKeep2["BOTH"] = 3] = "BOTH";
|
|
88
|
+
return RecordFileKeep2;
|
|
89
|
+
}({});
|
|
90
|
+
var RecordAdaptResolution = /* @__PURE__ */ function(RecordAdaptResolution2) {
|
|
91
|
+
RecordAdaptResolution2[RecordAdaptResolution2["NULL"] = 0] = "NULL";
|
|
92
|
+
RecordAdaptResolution2[RecordAdaptResolution2["YES"] = 1] = "YES";
|
|
93
|
+
RecordAdaptResolution2[RecordAdaptResolution2["NO"] = -1] = "NO";
|
|
94
|
+
return RecordAdaptResolution2;
|
|
95
|
+
}({});
|
|
96
|
+
|
|
97
|
+
// src/upload.ts
|
|
98
|
+
var EncodeStatus = /* @__PURE__ */ function(EncodeStatus2) {
|
|
99
|
+
EncodeStatus2[EncodeStatus2["NULL"] = 0] = "NULL";
|
|
100
|
+
EncodeStatus2[EncodeStatus2["PROCESS"] = 1] = "PROCESS";
|
|
101
|
+
EncodeStatus2[EncodeStatus2["SUCCESS"] = 2] = "SUCCESS";
|
|
102
|
+
EncodeStatus2[EncodeStatus2["ERROR"] = 4] = "ERROR";
|
|
103
|
+
return EncodeStatus2;
|
|
104
|
+
}({});
|
|
105
|
+
var UploadStatus = /* @__PURE__ */ function(UploadStatus2) {
|
|
106
|
+
UploadStatus2[UploadStatus2["NULL"] = 0] = "NULL";
|
|
107
|
+
UploadStatus2[UploadStatus2["PROCESS"] = 1] = "PROCESS";
|
|
108
|
+
UploadStatus2[UploadStatus2["SUCCESS"] = 2] = "SUCCESS";
|
|
109
|
+
UploadStatus2[UploadStatus2["ERROR"] = 4] = "ERROR";
|
|
110
|
+
return UploadStatus2;
|
|
111
|
+
}({});
|
|
112
|
+
var RootStatus = /* @__PURE__ */ function(RootStatus2) {
|
|
113
|
+
RootStatus2[RootStatus2["NULL"] = 0] = "NULL";
|
|
114
|
+
RootStatus2[RootStatus2["PROCESS"] = 1] = "PROCESS";
|
|
115
|
+
RootStatus2[RootStatus2["SUCCESS"] = 2] = "SUCCESS";
|
|
116
|
+
RootStatus2[RootStatus2["PAUSED"] = 3] = "PAUSED";
|
|
117
|
+
RootStatus2[RootStatus2["ERROR"] = 4] = "ERROR";
|
|
118
|
+
return RootStatus2;
|
|
119
|
+
}({});
|
|
120
|
+
|
|
121
|
+
// src/download.ts
|
|
122
|
+
var DownloadStatus = /* @__PURE__ */ function(DownloadStatus2) {
|
|
123
|
+
DownloadStatus2[DownloadStatus2["NULL"] = 0] = "NULL";
|
|
124
|
+
DownloadStatus2[DownloadStatus2["PROCESS"] = 1] = "PROCESS";
|
|
125
|
+
DownloadStatus2[DownloadStatus2["SUCCESS"] = 2] = "SUCCESS";
|
|
126
|
+
DownloadStatus2[DownloadStatus2["ERROR"] = 4] = "ERROR";
|
|
127
|
+
return DownloadStatus2;
|
|
128
|
+
}({});
|
|
129
|
+
|
|
130
|
+
// src/net-success.ts
|
|
131
|
+
var NetType = /* @__PURE__ */ function(NetType2) {
|
|
132
|
+
NetType2["DOWNLOAD"] = "download";
|
|
133
|
+
NetType2["UPLOAD"] = "upload";
|
|
134
|
+
return NetType2;
|
|
135
|
+
}({});
|
|
136
|
+
|
|
137
|
+
// src/upload-process.ts
|
|
138
|
+
var UploadProcessStep = /* @__PURE__ */ function(UploadProcessStep2) {
|
|
139
|
+
UploadProcessStep2["prepare"] = "PREPARE";
|
|
140
|
+
UploadProcessStep2["separate_video"] = "SEPARATE_VIDEO";
|
|
141
|
+
UploadProcessStep2["separate_audio"] = "SEPARATE_AUDIO";
|
|
142
|
+
UploadProcessStep2["separate_text"] = "SEPARATE_TEXT";
|
|
143
|
+
UploadProcessStep2["transcode_video"] = "TRANSCODE_VIDEO";
|
|
144
|
+
UploadProcessStep2["transcode_audio"] = "TRANSCODE_AUDIO";
|
|
145
|
+
UploadProcessStep2["transcode_thumbnail"] = "TRANSCODE_THUMBNAIL";
|
|
146
|
+
UploadProcessStep2["transcode_source"] = "TRANSCODE_SOURCE";
|
|
147
|
+
UploadProcessStep2["transcode_txt"] = "TRANSCODE_TXT";
|
|
148
|
+
UploadProcessStep2["transcode_img"] = "TRANSCODE_IMG";
|
|
149
|
+
UploadProcessStep2["transcode_affix"] = "TRANSCODE_AFFIX";
|
|
150
|
+
UploadProcessStep2["group_media"] = "GROUP_MEDIA";
|
|
151
|
+
UploadProcessStep2["upload_baidu"] = "UPLOAD_BAIDU";
|
|
152
|
+
UploadProcessStep2["upload_ali"] = "UPLOAD_ALI";
|
|
153
|
+
UploadProcessStep2["end"] = "END";
|
|
154
|
+
return UploadProcessStep2;
|
|
155
|
+
}({});
|
|
156
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
157
|
+
0 && (module.exports = {
|
|
158
|
+
CloudType,
|
|
159
|
+
DownloadStatus,
|
|
160
|
+
EncodeStatus,
|
|
161
|
+
HostType,
|
|
162
|
+
NetType,
|
|
163
|
+
RecordAdaptResolution,
|
|
164
|
+
RecordFileKeep,
|
|
165
|
+
RecordFtype,
|
|
166
|
+
RecordInsertLast,
|
|
167
|
+
RecordType,
|
|
168
|
+
RootStatus,
|
|
169
|
+
UploadProcessStep,
|
|
170
|
+
UploadStatus
|
|
171
|
+
});
|
package/dist/index.mjs
ADDED
|
@@ -0,0 +1,133 @@
|
|
|
1
|
+
// src/host.ts
|
|
2
|
+
var HostType = /* @__PURE__ */ function(HostType2) {
|
|
3
|
+
HostType2["BAIDU"] = "baidu";
|
|
4
|
+
HostType2["ALI"] = "ali";
|
|
5
|
+
return HostType2;
|
|
6
|
+
}({});
|
|
7
|
+
var CloudType = /* @__PURE__ */ function(CloudType2) {
|
|
8
|
+
CloudType2[CloudType2["BAIDU"] = 1] = "BAIDU";
|
|
9
|
+
CloudType2[CloudType2["ALI"] = 2] = "ALI";
|
|
10
|
+
return CloudType2;
|
|
11
|
+
}({});
|
|
12
|
+
|
|
13
|
+
// src/record.ts
|
|
14
|
+
var RecordType = /* @__PURE__ */ function(RecordType2) {
|
|
15
|
+
RecordType2[RecordType2["FOLDER"] = 0] = "FOLDER";
|
|
16
|
+
RecordType2[RecordType2["VIDEO"] = 1] = "VIDEO";
|
|
17
|
+
RecordType2[RecordType2["AUDIO"] = 2] = "AUDIO";
|
|
18
|
+
RecordType2[RecordType2["IMAGE"] = 3] = "IMAGE";
|
|
19
|
+
RecordType2[RecordType2["TXT"] = 4] = "TXT";
|
|
20
|
+
RecordType2[RecordType2["TEXT"] = 5] = "TEXT";
|
|
21
|
+
RecordType2[RecordType2["OTHER"] = 6] = "OTHER";
|
|
22
|
+
RecordType2[RecordType2["TEXT_RELATION"] = 120] = "TEXT_RELATION";
|
|
23
|
+
RecordType2[RecordType2["AFFIX"] = 127] = "AFFIX";
|
|
24
|
+
return RecordType2;
|
|
25
|
+
}({});
|
|
26
|
+
var RecordFtype = /* @__PURE__ */ function(RecordFtype2) {
|
|
27
|
+
RecordFtype2[RecordFtype2["NONE"] = 0] = "NONE";
|
|
28
|
+
RecordFtype2[RecordFtype2["VIDEO_NORMAL"] = 11] = "VIDEO_NORMAL";
|
|
29
|
+
RecordFtype2[RecordFtype2["VIDEO_VR"] = 12] = "VIDEO_VR";
|
|
30
|
+
RecordFtype2[RecordFtype2["VIDEO_3D"] = 13] = "VIDEO_3D";
|
|
31
|
+
RecordFtype2[RecordFtype2["IMAGE_NORMAL"] = 31] = "IMAGE_NORMAL";
|
|
32
|
+
RecordFtype2[RecordFtype2["IMAGE_VR"] = 32] = "IMAGE_VR";
|
|
33
|
+
RecordFtype2[RecordFtype2["TEXT_PDF"] = 52] = "TEXT_PDF";
|
|
34
|
+
RecordFtype2[RecordFtype2["TEXT_WORD"] = 53] = "TEXT_WORD";
|
|
35
|
+
RecordFtype2[RecordFtype2["TEXT_EXCEL"] = 55] = "TEXT_EXCEL";
|
|
36
|
+
RecordFtype2[RecordFtype2["TEXT_PPT"] = 55] = "TEXT_PPT";
|
|
37
|
+
RecordFtype2[RecordFtype2["TEXT_OTHER"] = 56] = "TEXT_OTHER";
|
|
38
|
+
return RecordFtype2;
|
|
39
|
+
}({});
|
|
40
|
+
var RecordInsertLast = /* @__PURE__ */ function(RecordInsertLast2) {
|
|
41
|
+
RecordInsertLast2[RecordInsertLast2["NULL"] = 0] = "NULL";
|
|
42
|
+
RecordInsertLast2[RecordInsertLast2["YES"] = 1] = "YES";
|
|
43
|
+
RecordInsertLast2[RecordInsertLast2["NO"] = -1] = "NO";
|
|
44
|
+
return RecordInsertLast2;
|
|
45
|
+
}({});
|
|
46
|
+
var RecordFileKeep = /* @__PURE__ */ function(RecordFileKeep2) {
|
|
47
|
+
RecordFileKeep2[RecordFileKeep2["NULL"] = 0] = "NULL";
|
|
48
|
+
RecordFileKeep2[RecordFileKeep2["SOURCE"] = 1] = "SOURCE";
|
|
49
|
+
RecordFileKeep2[RecordFileKeep2["PREVIEW"] = 2] = "PREVIEW";
|
|
50
|
+
RecordFileKeep2[RecordFileKeep2["BOTH"] = 3] = "BOTH";
|
|
51
|
+
return RecordFileKeep2;
|
|
52
|
+
}({});
|
|
53
|
+
var RecordAdaptResolution = /* @__PURE__ */ function(RecordAdaptResolution2) {
|
|
54
|
+
RecordAdaptResolution2[RecordAdaptResolution2["NULL"] = 0] = "NULL";
|
|
55
|
+
RecordAdaptResolution2[RecordAdaptResolution2["YES"] = 1] = "YES";
|
|
56
|
+
RecordAdaptResolution2[RecordAdaptResolution2["NO"] = -1] = "NO";
|
|
57
|
+
return RecordAdaptResolution2;
|
|
58
|
+
}({});
|
|
59
|
+
|
|
60
|
+
// src/upload.ts
|
|
61
|
+
var EncodeStatus = /* @__PURE__ */ function(EncodeStatus2) {
|
|
62
|
+
EncodeStatus2[EncodeStatus2["NULL"] = 0] = "NULL";
|
|
63
|
+
EncodeStatus2[EncodeStatus2["PROCESS"] = 1] = "PROCESS";
|
|
64
|
+
EncodeStatus2[EncodeStatus2["SUCCESS"] = 2] = "SUCCESS";
|
|
65
|
+
EncodeStatus2[EncodeStatus2["ERROR"] = 4] = "ERROR";
|
|
66
|
+
return EncodeStatus2;
|
|
67
|
+
}({});
|
|
68
|
+
var UploadStatus = /* @__PURE__ */ function(UploadStatus2) {
|
|
69
|
+
UploadStatus2[UploadStatus2["NULL"] = 0] = "NULL";
|
|
70
|
+
UploadStatus2[UploadStatus2["PROCESS"] = 1] = "PROCESS";
|
|
71
|
+
UploadStatus2[UploadStatus2["SUCCESS"] = 2] = "SUCCESS";
|
|
72
|
+
UploadStatus2[UploadStatus2["ERROR"] = 4] = "ERROR";
|
|
73
|
+
return UploadStatus2;
|
|
74
|
+
}({});
|
|
75
|
+
var RootStatus = /* @__PURE__ */ function(RootStatus2) {
|
|
76
|
+
RootStatus2[RootStatus2["NULL"] = 0] = "NULL";
|
|
77
|
+
RootStatus2[RootStatus2["PROCESS"] = 1] = "PROCESS";
|
|
78
|
+
RootStatus2[RootStatus2["SUCCESS"] = 2] = "SUCCESS";
|
|
79
|
+
RootStatus2[RootStatus2["PAUSED"] = 3] = "PAUSED";
|
|
80
|
+
RootStatus2[RootStatus2["ERROR"] = 4] = "ERROR";
|
|
81
|
+
return RootStatus2;
|
|
82
|
+
}({});
|
|
83
|
+
|
|
84
|
+
// src/download.ts
|
|
85
|
+
var DownloadStatus = /* @__PURE__ */ function(DownloadStatus2) {
|
|
86
|
+
DownloadStatus2[DownloadStatus2["NULL"] = 0] = "NULL";
|
|
87
|
+
DownloadStatus2[DownloadStatus2["PROCESS"] = 1] = "PROCESS";
|
|
88
|
+
DownloadStatus2[DownloadStatus2["SUCCESS"] = 2] = "SUCCESS";
|
|
89
|
+
DownloadStatus2[DownloadStatus2["ERROR"] = 4] = "ERROR";
|
|
90
|
+
return DownloadStatus2;
|
|
91
|
+
}({});
|
|
92
|
+
|
|
93
|
+
// src/net-success.ts
|
|
94
|
+
var NetType = /* @__PURE__ */ function(NetType2) {
|
|
95
|
+
NetType2["DOWNLOAD"] = "download";
|
|
96
|
+
NetType2["UPLOAD"] = "upload";
|
|
97
|
+
return NetType2;
|
|
98
|
+
}({});
|
|
99
|
+
|
|
100
|
+
// src/upload-process.ts
|
|
101
|
+
var UploadProcessStep = /* @__PURE__ */ function(UploadProcessStep2) {
|
|
102
|
+
UploadProcessStep2["prepare"] = "PREPARE";
|
|
103
|
+
UploadProcessStep2["separate_video"] = "SEPARATE_VIDEO";
|
|
104
|
+
UploadProcessStep2["separate_audio"] = "SEPARATE_AUDIO";
|
|
105
|
+
UploadProcessStep2["separate_text"] = "SEPARATE_TEXT";
|
|
106
|
+
UploadProcessStep2["transcode_video"] = "TRANSCODE_VIDEO";
|
|
107
|
+
UploadProcessStep2["transcode_audio"] = "TRANSCODE_AUDIO";
|
|
108
|
+
UploadProcessStep2["transcode_thumbnail"] = "TRANSCODE_THUMBNAIL";
|
|
109
|
+
UploadProcessStep2["transcode_source"] = "TRANSCODE_SOURCE";
|
|
110
|
+
UploadProcessStep2["transcode_txt"] = "TRANSCODE_TXT";
|
|
111
|
+
UploadProcessStep2["transcode_img"] = "TRANSCODE_IMG";
|
|
112
|
+
UploadProcessStep2["transcode_affix"] = "TRANSCODE_AFFIX";
|
|
113
|
+
UploadProcessStep2["group_media"] = "GROUP_MEDIA";
|
|
114
|
+
UploadProcessStep2["upload_baidu"] = "UPLOAD_BAIDU";
|
|
115
|
+
UploadProcessStep2["upload_ali"] = "UPLOAD_ALI";
|
|
116
|
+
UploadProcessStep2["end"] = "END";
|
|
117
|
+
return UploadProcessStep2;
|
|
118
|
+
}({});
|
|
119
|
+
export {
|
|
120
|
+
CloudType,
|
|
121
|
+
DownloadStatus,
|
|
122
|
+
EncodeStatus,
|
|
123
|
+
HostType,
|
|
124
|
+
NetType,
|
|
125
|
+
RecordAdaptResolution,
|
|
126
|
+
RecordFileKeep,
|
|
127
|
+
RecordFtype,
|
|
128
|
+
RecordInsertLast,
|
|
129
|
+
RecordType,
|
|
130
|
+
RootStatus,
|
|
131
|
+
UploadProcessStep,
|
|
132
|
+
UploadStatus
|
|
133
|
+
};
|
package/package.json
CHANGED
|
@@ -1,21 +1,25 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@soga/types",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.5.0",
|
|
4
4
|
"publishConfig": {
|
|
5
5
|
"access": "public"
|
|
6
6
|
},
|
|
7
7
|
"description": "",
|
|
8
|
-
"main": "dist/
|
|
9
|
-
"types": "dist/
|
|
8
|
+
"main": "dist/index.js",
|
|
9
|
+
"types": "dist/index.d.ts",
|
|
10
10
|
"files": [
|
|
11
11
|
"dist"
|
|
12
12
|
],
|
|
13
|
+
"module": "./dist/index.mjs",
|
|
14
|
+
"scripts": {
|
|
15
|
+
"build": "rimraf dist && tsup src/index.ts --format cjs,esm --dts",
|
|
16
|
+
"dev": "tsup src/index.ts --format cjs,esm --dts --watch",
|
|
17
|
+
"prepublishOnly": "npm run build"
|
|
18
|
+
},
|
|
13
19
|
"keywords": [],
|
|
14
20
|
"author": "",
|
|
15
21
|
"license": "ISC",
|
|
16
|
-
"
|
|
17
|
-
"
|
|
18
|
-
"dev": "tsc --watch",
|
|
19
|
-
"lint": "eslint . --ext .ts"
|
|
22
|
+
"devDependencies": {
|
|
23
|
+
"rimraf": "^6.0.1"
|
|
20
24
|
}
|
|
21
|
-
}
|
|
25
|
+
}
|
package/dist/common.d.ts
DELETED
|
@@ -1,41 +0,0 @@
|
|
|
1
|
-
export type PaginationParams = {
|
|
2
|
-
page?: number;
|
|
3
|
-
pagesize?: number;
|
|
4
|
-
};
|
|
5
|
-
export type ApiResponse<T = never> = {
|
|
6
|
-
data: T;
|
|
7
|
-
code: number;
|
|
8
|
-
message: string;
|
|
9
|
-
};
|
|
10
|
-
export type ApiListResponse<T = never> = {
|
|
11
|
-
data: T;
|
|
12
|
-
currentPage: number;
|
|
13
|
-
perPage: number;
|
|
14
|
-
total: number;
|
|
15
|
-
previousPage: null | number;
|
|
16
|
-
nextPage: null | number;
|
|
17
|
-
lastPage: number;
|
|
18
|
-
code: number;
|
|
19
|
-
message: string;
|
|
20
|
-
};
|
|
21
|
-
export type LocalListResponse<T = never> = {
|
|
22
|
-
list: T;
|
|
23
|
-
perpage: number;
|
|
24
|
-
pages: number;
|
|
25
|
-
total: number;
|
|
26
|
-
};
|
|
27
|
-
export type UpyunSignInfo = {
|
|
28
|
-
bucket: string;
|
|
29
|
-
domain: string;
|
|
30
|
-
policy: string;
|
|
31
|
-
signature: string;
|
|
32
|
-
authorization: string;
|
|
33
|
-
api: string;
|
|
34
|
-
};
|
|
35
|
-
export type WithP<T = never> = {
|
|
36
|
-
page?: number;
|
|
37
|
-
pagesize?: number;
|
|
38
|
-
} & T;
|
|
39
|
-
export type WithPK<T = never> = WithP<{
|
|
40
|
-
keyword: string;
|
|
41
|
-
}> & T;
|
package/dist/common.js
DELETED
package/dist/download.d.ts
DELETED
|
@@ -1,39 +0,0 @@
|
|
|
1
|
-
import { ErrorData } from './error';
|
|
2
|
-
import { RecordFtype, RecordListItem, RecordType } from './record';
|
|
3
|
-
export declare enum DownloadStatus {
|
|
4
|
-
NULL = 0,
|
|
5
|
-
PROCESS = 1,
|
|
6
|
-
SUCCESS = 2,
|
|
7
|
-
ERROR = 4
|
|
8
|
-
}
|
|
9
|
-
export type DownloadProgressStep = 'PREPARE' | 'DOWNLOAD_CHUNK' | 'COMBINE_CHUNK' | 'UNPACK' | 'ENDING';
|
|
10
|
-
export type DownloadProgressData = Record<DownloadProgressStep, {
|
|
11
|
-
weight: number;
|
|
12
|
-
percent: number;
|
|
13
|
-
}>;
|
|
14
|
-
export type DownloadFileItem = {
|
|
15
|
-
id: number;
|
|
16
|
-
is_affix: boolean;
|
|
17
|
-
is_paused: boolean;
|
|
18
|
-
type: RecordType;
|
|
19
|
-
ftype: RecordFtype;
|
|
20
|
-
routes: string[];
|
|
21
|
-
download_root: string;
|
|
22
|
-
download_temp: string;
|
|
23
|
-
download_name: string;
|
|
24
|
-
pid: number;
|
|
25
|
-
root_id: number;
|
|
26
|
-
space_id: number;
|
|
27
|
-
uid: number;
|
|
28
|
-
record: RecordListItem;
|
|
29
|
-
order: number;
|
|
30
|
-
status: DownloadStatus;
|
|
31
|
-
file_total: number;
|
|
32
|
-
file_successed: number;
|
|
33
|
-
file_size: number;
|
|
34
|
-
percent: number;
|
|
35
|
-
progress: DownloadProgressData;
|
|
36
|
-
error: ErrorData;
|
|
37
|
-
update_at: string;
|
|
38
|
-
create_at: string;
|
|
39
|
-
};
|
package/dist/download.js
DELETED
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.DownloadStatus = void 0;
|
|
4
|
-
var DownloadStatus;
|
|
5
|
-
(function (DownloadStatus) {
|
|
6
|
-
DownloadStatus[DownloadStatus["NULL"] = 0] = "NULL";
|
|
7
|
-
DownloadStatus[DownloadStatus["PROCESS"] = 1] = "PROCESS";
|
|
8
|
-
DownloadStatus[DownloadStatus["SUCCESS"] = 2] = "SUCCESS";
|
|
9
|
-
DownloadStatus[DownloadStatus["ERROR"] = 4] = "ERROR";
|
|
10
|
-
})(DownloadStatus || (exports.DownloadStatus = DownloadStatus = {}));
|
package/dist/error.d.ts
DELETED
package/dist/error.js
DELETED
package/dist/host.d.ts
DELETED
|
@@ -1,41 +0,0 @@
|
|
|
1
|
-
export declare enum HostType {
|
|
2
|
-
BAIDU = "baidu",
|
|
3
|
-
ALI = "ali"
|
|
4
|
-
}
|
|
5
|
-
export declare enum CloudType {
|
|
6
|
-
BAIDU = 1,
|
|
7
|
-
ALI = 2
|
|
8
|
-
}
|
|
9
|
-
interface CommonHostDetail {
|
|
10
|
-
id: number;
|
|
11
|
-
access_token: string;
|
|
12
|
-
account_level: string;
|
|
13
|
-
account_name: string;
|
|
14
|
-
avatar_url: string;
|
|
15
|
-
cloud_type: CloudType;
|
|
16
|
-
created_at: string;
|
|
17
|
-
quota_total: number;
|
|
18
|
-
quota_used: number;
|
|
19
|
-
refresh_at: string;
|
|
20
|
-
user_id: number;
|
|
21
|
-
vip_type: number;
|
|
22
|
-
remark: string;
|
|
23
|
-
uk: string;
|
|
24
|
-
is_save: number;
|
|
25
|
-
}
|
|
26
|
-
export interface BaiduHostDetail extends CommonHostDetail {
|
|
27
|
-
cloud_type: CloudType.BAIDU;
|
|
28
|
-
api_info: null;
|
|
29
|
-
}
|
|
30
|
-
export interface AliHostDetail extends CommonHostDetail {
|
|
31
|
-
cloud_type: CloudType.ALI;
|
|
32
|
-
api_info: {
|
|
33
|
-
drive_id: string;
|
|
34
|
-
dpan_file_id: string;
|
|
35
|
-
cache_file_id: string;
|
|
36
|
-
space_file_id: string;
|
|
37
|
-
};
|
|
38
|
-
}
|
|
39
|
-
export type HostDetail = BaiduHostDetail | AliHostDetail;
|
|
40
|
-
export type HostListItem = HostDetail;
|
|
41
|
-
export {};
|
package/dist/host.js
DELETED
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.CloudType = exports.HostType = void 0;
|
|
4
|
-
var HostType;
|
|
5
|
-
(function (HostType) {
|
|
6
|
-
HostType["BAIDU"] = "baidu";
|
|
7
|
-
HostType["ALI"] = "ali";
|
|
8
|
-
})(HostType || (exports.HostType = HostType = {}));
|
|
9
|
-
var CloudType;
|
|
10
|
-
(function (CloudType) {
|
|
11
|
-
CloudType[CloudType["BAIDU"] = 1] = "BAIDU";
|
|
12
|
-
CloudType[CloudType["ALI"] = 2] = "ALI";
|
|
13
|
-
})(CloudType || (exports.CloudType = CloudType = {}));
|
package/dist/main.d.ts
DELETED
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
export * from './common';
|
|
2
|
-
export * from './host';
|
|
3
|
-
export * from './record';
|
|
4
|
-
export * from './record-manifest';
|
|
5
|
-
export * from './upload';
|
|
6
|
-
export * from './member';
|
|
7
|
-
export * from './user';
|
|
8
|
-
export * from './share';
|
|
9
|
-
export * from './sub';
|
|
10
|
-
export * from './space';
|
|
11
|
-
export * from './error';
|
|
12
|
-
export * from './download';
|
|
13
|
-
export * from './net-success';
|
|
14
|
-
export * from './upload-process';
|
package/dist/main.js
DELETED
|
@@ -1,30 +0,0 @@
|
|
|
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("./common"), exports);
|
|
18
|
-
__exportStar(require("./host"), exports);
|
|
19
|
-
__exportStar(require("./record"), exports);
|
|
20
|
-
__exportStar(require("./record-manifest"), exports);
|
|
21
|
-
__exportStar(require("./upload"), exports);
|
|
22
|
-
__exportStar(require("./member"), exports);
|
|
23
|
-
__exportStar(require("./user"), exports);
|
|
24
|
-
__exportStar(require("./share"), exports);
|
|
25
|
-
__exportStar(require("./sub"), exports);
|
|
26
|
-
__exportStar(require("./space"), exports);
|
|
27
|
-
__exportStar(require("./error"), exports);
|
|
28
|
-
__exportStar(require("./download"), exports);
|
|
29
|
-
__exportStar(require("./net-success"), exports);
|
|
30
|
-
__exportStar(require("./upload-process"), exports);
|
package/dist/member.d.ts
DELETED
package/dist/member.js
DELETED
package/dist/net-success.d.ts
DELETED
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
import { RecordFtype, RecordType } from './record';
|
|
2
|
-
export declare enum NetType {
|
|
3
|
-
DOWNLOAD = "download",
|
|
4
|
-
UPLOAD = "upload"
|
|
5
|
-
}
|
|
6
|
-
export type NetSuccessItem = {
|
|
7
|
-
id: number;
|
|
8
|
-
uid: number;
|
|
9
|
-
net_type: NetType;
|
|
10
|
-
is_affix: boolean;
|
|
11
|
-
type: RecordType;
|
|
12
|
-
ftype: RecordFtype;
|
|
13
|
-
space_id: number;
|
|
14
|
-
title: string;
|
|
15
|
-
local_path: string;
|
|
16
|
-
record_id: number;
|
|
17
|
-
file_total: number;
|
|
18
|
-
file_size: number;
|
|
19
|
-
updated_at: Date;
|
|
20
|
-
created_at: Date;
|
|
21
|
-
};
|
package/dist/net-success.js
DELETED