@@ -2,7 +2,7 @@ import { DEFAULT_HEADERS } from '../lib/constants'
2
2
import { isStorageError , StorageError } from '../lib/errors'
3
3
import { Fetch , get , post , put , remove } from '../lib/fetch'
4
4
import { resolveFetch } from '../lib/helpers'
5
- import { Bucket } from '../lib/types'
5
+ import { Bucket , BucketType } from '../lib/types'
6
6
7
7
export default class StorageBucketApi {
8
8
protected url : string
@@ -96,15 +96,16 @@ export default class StorageBucketApi {
96
96
* The default value is null, which allows files with all mime types to be uploaded.
97
97
* Each mime type specified can be a wildcard, e.g. image/*, or a specific mime type, e.g. image/png.
98
98
* @returns newly created bucket id
99
- * @param options.icebergCatalog (private-beta) specifies whether this bucket can be used as an Iceberg data lake.
99
+ * @param options.type (private-beta) specifies the bucket type. see `BucketType` for more details.
100
+ * - default bucket type is `STANDARD`
100
101
*/
101
102
async createBucket (
102
103
id : string ,
103
104
options : {
104
105
public : boolean
105
106
fileSizeLimit ?: number | string | null
106
107
allowedMimeTypes ?: string [ ] | null
107
- icebergCatalog ?: boolean | null
108
+ type ?: BucketType
108
109
} = {
109
110
public : false ,
110
111
}
@@ -125,10 +126,10 @@ export default class StorageBucketApi {
125
126
{
126
127
id,
127
128
name : id ,
129
+ type : options . type ,
128
130
public : options . public ,
129
131
file_size_limit : options . fileSizeLimit ,
130
132
allowed_mime_types : options . allowedMimeTypes ,
131
- iceberg_catalog : options . icebergCatalog ,
132
133
} ,
133
134
{ headers : this . headers }
134
135
)
@@ -153,15 +154,13 @@ export default class StorageBucketApi {
153
154
* @param options.allowedMimeTypes specifies the allowed mime types that this bucket can accept during upload.
154
155
* The default value is null, which allows files with all mime types to be uploaded.
155
156
* Each mime type specified can be a wildcard, e.g. image/*, or a specific mime type, e.g. image/png.
156
- * @param options.icebergCatalog (private-beta) specifies whether this bucket can be used as an Iceberg data lake.
157
157
*/
158
158
async updateBucket (
159
159
id : string ,
160
160
options : {
161
161
public : boolean
162
162
fileSizeLimit ?: number | string | null
163
163
allowedMimeTypes ?: string [ ] | null
164
- icebergCatalog ?: boolean | null
165
164
}
166
165
) : Promise <
167
166
| {
@@ -183,7 +182,6 @@ export default class StorageBucketApi {
183
182
public : options . public ,
184
183
file_size_limit : options . fileSizeLimit ,
185
184
allowed_mime_types : options . allowedMimeTypes ,
186
- iceberg_catalog : options . icebergCatalog ,
187
185
} ,
188
186
{ headers : this . headers }
189
187
)
0 commit comments