@cloudbase/js-sdk 3.9.3 → 3.9.4

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/core.d.ts CHANGED
@@ -596,7 +596,7 @@ declare namespace cloudbase.app {
596
596
  * '文件A的fileID',
597
597
  * {
598
598
  * fileID: '文件B的fileID',
599
- * maxAge: 600 // 文件B的链接有效期,单位`ms`
599
+ * maxAge: 600 // 兼容字段,传统模式不会用它生成下载链接
600
600
  * }
601
601
  * ]
602
602
  * });
@@ -605,7 +605,7 @@ declare namespace cloudbase.app {
605
605
  * @param params
606
606
  * @param params.fileList 要下载的文件数组,数组元素可以是`string`或`Object`,如果是`string`代表文件ID,如果是`Object`可配置以下信息
607
607
  * @param params.fileList[].fileID 要下载的文件ID
608
- * @param params.fileList[].maxAge 下载链接的有效期,单位`ms`
608
+ * @param params.fileList[].maxAge 过期时间。传统模式不会用它生成下载链接,TTL 传入无效。需要可控过期请改用 `app.storage.from(bucketId).createSignedUrl(path, expiresIn)`(PG 模式下可用)。
609
609
  *
610
610
  * @return Promise-文件下载链接
611
611
  *
@@ -1956,6 +1956,10 @@ declare namespace cloudbase.storage {
1956
1956
 
1957
1957
  interface ICloudbaseFileInfo {
1958
1958
  fileID: string
1959
+ /**
1960
+ * 仅为兼容字段。传统模式不会用它生成下载链接,TTL 传入无效。
1961
+ * 需要可控过期请改用 `app.storage.from(bucketId).createSignedUrl(path, expiresIn)`(PG 模式下可用)。
1962
+ */
1959
1963
  maxAge: number
1960
1964
  }
1961
1965
 
@@ -2278,7 +2282,7 @@ declare namespace cloudbase.storage {
2278
2282
  * 创建签名下载 URL
2279
2283
  *
2280
2284
  * @param path 文件路径
2281
- * @param expiresIn 有效期(秒)
2285
+ * @param expiresIn 过期时间。传统模式不会用它生成下载链接,TTL 传入无效。需要可控过期请改用 `from(bucketId).createSignedUrl`(PG 模式下可用)。
2282
2286
  * @param options 可选配置
2283
2287
  */
2284
2288
  createSignedUrl(
@@ -2297,7 +2301,7 @@ declare namespace cloudbase.storage {
2297
2301
  * 批量创建签名下载 URL
2298
2302
  *
2299
2303
  * @param paths 文件路径数组
2300
- * @param expiresIn 有效期(秒)
2304
+ * @param expiresIn 过期时间。传统模式不会用它生成下载链接,TTL 传入无效。需要可控过期请改用 `from(bucketId).createSignedUrls`(PG 模式下可用)。
2301
2305
  */
2302
2306
  createSignedUrls(
2303
2307
  paths: string[],