Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

BosClient升级计划 #68

Open
mudio opened this issue Apr 23, 2020 · 15 comments
Open

BosClient升级计划 #68

mudio opened this issue Apr 23, 2020 · 15 comments

Comments

@mudio
Copy link

mudio commented Apr 23, 2020

BosClient升级计划

Bucket 功能类

功能点 功能是否支持 声明文件
GetBucketLocation
ListBuckets
PutBucket(createBucket)
HeadBucket(doesBucketExist)
DeleteBucket
PutBucketAcl(setBucketAcl)
GetBucketAcl
PutBucketReplication
GetBucketReplication
DeleteBucketReplication
GetBucketReplicationProgress
PutBucketLogging
GetBucketLogging
DeleteBucketLogging
PutBucketLifecycle
GetBucketLifecycle
DeleteBucketLifecycle
PutBucketStorageclass
GetBucketStorageClass
PutBucketEncryption
GetBucketEncryption
DeleteBucketEncryption
PutBucketStaticWebsite
GetBucketStaticWebsite
DeleteBucketStaticWebsite
PutBucketTrash
GetBucketTrash
DeleteBucketTrash
PutBucketCors
GetBucketCors
DeleteBucketCors
PutBucketCopyrightProtection
GetCopyrightProtection
DeleteCopyrightProtection

Bucket 事件类别

功能点 功能是否支持 声明文件
PutNotification
GetNotification
DeleteNotification
PostEvent
PostResult

Object 功能类

功能点 功能是否支持 声明文件
ListObject
PutObject
PostObject
CopyObject
GetObject
GetObjectMeta
RestoreObject
SelectObject
FetchObject
AppendObject
DeleteObject
DeleteMultipleObjects
GetObjectAcl
PutObjectAcl
DeleteObjectAcl
@mudio mudio pinned this issue Apr 23, 2020
@yingerfeifei
Copy link

请问声明文件计划什么时候补充完整

@songlipeng2003
Copy link

对啊,typescript根本用不了啊。。。

@yunfan
Copy link

yunfan commented Jun 9, 2020

@songlipeng2003 我也是 关键是rc16还加了types声明 还不如不要加 等弄完了一次性加上去

@songlipeng2003
Copy link

是的,极其烦人,花了一下午时间还没有解决

@otakustay
Copy link
Collaborator

我给个建议,不完善的types不如干脆别发布types,覆盖它的类型比没有类型还难受

所以我用了as any大法

@songlipeng2003
Copy link

@otakustay 提供一下代码,我也查考一下

@yunfan
Copy link

yunfan commented Jun 9, 2020

@otakustay 麻烦贴下 as any 大法的片段 我也继续hack

@mudio
Copy link
Author

mudio commented Jun 9, 2020

先回滚了,等我补完接口再发布吧~

@otakustay
Copy link
Collaborator

@otakustay 麻烦贴下 as any 大法的片段 我也继续hack

也没啥代码啊,直接const client = new BosClient(config) as any了哈哈

@yunfan
Copy link

yunfan commented Jun 9, 2020

@otakustay 试过你这个 并不行 tsc照样报类型不匹配
我的代码如下

const bosClient = new BosClient({
            endpoint: `http://${Config.Upload.region}.bcebos.com`,
            credentials: {ak: Config.Upload.ak, sk: Config.Upload.sk}
        }) as any;

提示里面的endpoint类型不是 BosEndpoint

@songlipeng2003
Copy link

const client: any = new BosClient(config)

我是这样写的,ok了

@mudio
Copy link
Author

mudio commented Jun 9, 2020

@yunfan @songlipeng2003 RC.17删除了声明文件

@yunfan
Copy link

yunfan commented Jun 9, 2020

@songlipeng2003 我这样写也不行 虽然已经可以用rc17解决了 但是我倒是想掌握下这个解决方法

@mudio
Copy link
Author

mudio commented Jun 9, 2020

@songlipeng2003 我这样写也不行 虽然已经可以用rc17解决了 但是我倒是想掌握下这个解决方法

问题是 rc.16版本中 BosEndpoint union type 但是不包含 string导致的,后续会避免这个问题。

@lurunze1226 lurunze1226 unpinned this issue Mar 26, 2021
@shenlanchenwei
Copy link

为啥不直接用TS写

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants