tt-uploader 1.6.0 → 1.6.2-rc.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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "tt-uploader",
3
- "version": "1.6.0",
3
+ "version": "1.6.2-rc.0",
4
4
  "description": "upload component for veVod and veImageX",
5
5
  "main": "dist/index.js",
6
6
  "typings": "./types/index.d.ts",
package/types/index.d.ts CHANGED
@@ -14,6 +14,13 @@ export interface Action {
14
14
  export interface VideoConfig {
15
15
  spaceName: string
16
16
  processAction?: Action[]
17
+ callbackArgs?: string
18
+ /**
19
+ * 默认的视频文件过期时间,ISO 日期格式(例:'2024-08-30T20:10:11+08:00')。
20
+ * 不传或传 '9999-12-31T23:59:59Z' 表示永不过期。仅适用于音视频类型媒资(有 Vid)。
21
+ * 亚太东南(柔佛)地域暂不支持此参数。addFile 中的 expireTime 优先级更高。
22
+ */
23
+ expireTime?: string
17
24
  }
18
25
 
19
26
  export interface ImageConfig {
@@ -30,6 +37,11 @@ export interface ObjectConfig {
30
37
  processAction?: Action[]
31
38
  }
32
39
 
40
+ export interface ActionVersionOverride {
41
+ Action?: string
42
+ Version?: string
43
+ }
44
+
33
45
  export interface InitConfig {
34
46
  userId: string
35
47
  appId: number
@@ -57,6 +69,14 @@ export interface InitConfig {
57
69
  uploadTimeout?: number
58
70
  requestTimeout?: number
59
71
  useConsoleMode?: boolean
72
+ /**
73
+ * 仅在 useConsoleMode 开启时生效:用于覆盖 apply 阶段默认的 Action / Version
74
+ */
75
+ applyActionVersion?: ActionVersionOverride
76
+ /**
77
+ * 仅在 useConsoleMode 开启时生效:用于覆盖 commit 阶段默认的 Action / Version
78
+ */
79
+ commitActionVersion?: ActionVersionOverride
60
80
  useFileNameInCacheKey?: boolean
61
81
  }
62
82
 
@@ -68,6 +88,8 @@ export interface UpdateOptions {
68
88
  useFileExtension?: boolean
69
89
  useLocalStorage?: boolean
70
90
  useConsoleMode?: boolean
91
+ applyActionVersion?: ActionVersionOverride
92
+ commitActionVersion?: ActionVersionOverride
71
93
  useFileNameInCacheKey?: boolean
72
94
  }
73
95
  export interface VodFileOption {
@@ -75,6 +97,12 @@ export interface VodFileOption {
75
97
  stsToken: STSToken
76
98
  type: 'video' | 'image' | 'object' | 'media'
77
99
  callbackArgs?: string
100
+ /**
101
+ * 视频文件过期时间,ISO 日期格式(例:'2024-08-30T20:10:11+08:00')。
102
+ * 不传或传 '9999-12-31T23:59:59Z' 表示永不过期。仅适用于音视频类型媒资(有 Vid)。
103
+ * 亚太东南(柔佛)地域暂不支持此参数。
104
+ */
105
+ expireTime?: string
78
106
  fileName?: string
79
107
  fileExtension?: string
80
108
  storageClass?: 1 | 2
@@ -93,6 +121,8 @@ export interface ImageXFileOption {
93
121
  overwrite?: boolean
94
122
  headers?: Record<string, string>
95
123
  storageClass?: 'STANDARD'|'IA'|'ARCHIVE_FR'|'COLD_ARCHIVE'|'ARCHIVE'
124
+ enableAIGCMark?: boolean
125
+ aigcMetaData?: Record<string, string>
96
126
  }
97
127
 
98
128