Skip to content

Commit 371f6ce

Browse files
authored
feat: managing iceberg buckets (#231)
1 parent 56c1c49 commit 371f6ce

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

src/packages/StorageBucketApi.ts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -96,13 +96,15 @@ export default class StorageBucketApi {
9696
* The default value is null, which allows files with all mime types to be uploaded.
9797
* Each mime type specified can be a wildcard, e.g. image/*, or a specific mime type, e.g. image/png.
9898
* @returns newly created bucket id
99+
* @param options.icebergCatalog (private-beta) specifies whether this bucket can be used as an Iceberg data lake.
99100
*/
100101
async createBucket(
101102
id: string,
102103
options: {
103104
public: boolean
104105
fileSizeLimit?: number | string | null
105106
allowedMimeTypes?: string[] | null
107+
icebergCatalog?: boolean | null
106108
} = {
107109
public: false,
108110
}
@@ -126,6 +128,7 @@ export default class StorageBucketApi {
126128
public: options.public,
127129
file_size_limit: options.fileSizeLimit,
128130
allowed_mime_types: options.allowedMimeTypes,
131+
iceberg_catalog: options.icebergCatalog,
129132
},
130133
{ headers: this.headers }
131134
)
@@ -150,13 +153,15 @@ export default class StorageBucketApi {
150153
* @param options.allowedMimeTypes specifies the allowed mime types that this bucket can accept during upload.
151154
* The default value is null, which allows files with all mime types to be uploaded.
152155
* 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.
153157
*/
154158
async updateBucket(
155159
id: string,
156160
options: {
157161
public: boolean
158162
fileSizeLimit?: number | string | null
159163
allowedMimeTypes?: string[] | null
164+
icebergCatalog?: boolean | null
160165
}
161166
): Promise<
162167
| {
@@ -178,6 +183,7 @@ export default class StorageBucketApi {
178183
public: options.public,
179184
file_size_limit: options.fileSizeLimit,
180185
allowed_mime_types: options.allowedMimeTypes,
186+
iceberg_catalog: options.icebergCatalog,
181187
},
182188
{ headers: this.headers }
183189
)

0 commit comments

Comments
 (0)