Skip to content

Commit 5259ffc

Browse files
authored
feat(storage): rename StorageAnalyticsApi to StorageAnalyticsClient (#1869)
1 parent 5b11772 commit 5259ffc

File tree

3 files changed

+22
-9
lines changed

3 files changed

+22
-9
lines changed

packages/core/storage-js/src/StorageClient.ts

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import StorageFileApi from './packages/StorageFileApi'
22
import StorageBucketApi from './packages/StorageBucketApi'
3-
import StorageAnalyticsApi from './packages/StorageAnalyticsApi'
3+
import StorageAnalyticsClient from './packages/StorageAnalyticsClient'
44
import { Fetch } from './lib/fetch'
55
import { StorageVectorsClient } from './lib/vectors'
66

@@ -66,12 +66,15 @@ export class StorageClient extends StorageBucketApi {
6666
}
6767

6868
/**
69+
*
70+
* @alpha
71+
*
6972
* Access analytics storage operations using Iceberg tables.
7073
*
7174
* **Public alpha:** This API is part of a public alpha release and may not be available to your account type.
7275
*
7376
* @category Analytics Buckets
74-
* @returns A StorageAnalyticsApi instance configured with the current storage settings.
77+
* @returns A StorageAnalyticsClient instance configured with the current storage settings.
7578
* @example
7679
* ```typescript
7780
* const client = createClient(url, key)
@@ -87,7 +90,7 @@ export class StorageClient extends StorageBucketApi {
8790
* await analytics.deleteBucket('old-analytics-bucket')
8891
* ```
8992
*/
90-
get analytics(): StorageAnalyticsApi {
91-
return new StorageAnalyticsApi(this.url + '/iceberg', this.headers, this.fetch)
93+
get analytics(): StorageAnalyticsClient {
94+
return new StorageAnalyticsClient(this.url + '/iceberg', this.headers, this.fetch)
9295
}
9396
}
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
export { StorageClient } from './StorageClient'
22
export type { StorageClientOptions } from './StorageClient'
3-
export { default as StorageAnalyticsApi } from './packages/StorageAnalyticsApi'
3+
export { default as StorageAnalyticsClient } from './packages/StorageAnalyticsClient'
44
export * from './lib/types'
55
export * from './lib/errors'
66
export * from './lib/vectors'

packages/core/storage-js/src/packages/StorageAnalyticsApi.ts renamed to packages/core/storage-js/src/packages/StorageAnalyticsClient.ts

Lines changed: 14 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,17 +5,19 @@ import { resolveFetch } from '../lib/helpers'
55
import { AnalyticBucket } from '../lib/types'
66

77
/**
8-
* API class for managing Analytics Buckets using Iceberg tables
8+
* Client class for managing Analytics Buckets using Iceberg tables
99
* Provides methods for creating, listing, and deleting analytics buckets
1010
*/
11-
export default class StorageAnalyticsApi {
11+
export default class StorageAnalyticsClient {
1212
protected url: string
1313
protected headers: { [key: string]: string }
1414
protected fetch: Fetch
1515
protected shouldThrowOnError = false
1616

1717
/**
18-
* Creates a new StorageAnalyticsApi instance
18+
* @alpha
19+
*
20+
* Creates a new StorageAnalyticsClient instance
1921
*
2022
* **Public alpha:** This API is part of a public alpha release and may not be available to your account type.
2123
*
@@ -26,7 +28,7 @@ export default class StorageAnalyticsApi {
2628
*
2729
* @example
2830
* ```typescript
29-
* const client = new StorageAnalyticsApi(url, headers)
31+
* const client = new StorageAnalyticsClient(url, headers)
3032
* ```
3133
*/
3234
constructor(url: string, headers: { [key: string]: string } = {}, fetch?: Fetch) {
@@ -36,6 +38,8 @@ export default class StorageAnalyticsApi {
3638
}
3739

3840
/**
41+
* @alpha
42+
*
3943
* Enable throwing errors instead of returning them in the response
4044
* When enabled, failed operations will throw instead of returning { data: null, error }
4145
*
@@ -50,6 +54,8 @@ export default class StorageAnalyticsApi {
5054
}
5155

5256
/**
57+
* @alpha
58+
*
5359
* Creates a new analytics bucket using Iceberg tables
5460
* Analytics buckets are optimized for analytical queries and data processing
5561
*
@@ -103,6 +109,8 @@ export default class StorageAnalyticsApi {
103109
}
104110

105111
/**
112+
* @alpha
113+
*
106114
* Retrieves the details of all Analytics Storage buckets within an existing project
107115
* Only returns buckets of type 'ANALYTICS'
108116
*
@@ -190,6 +198,8 @@ export default class StorageAnalyticsApi {
190198
}
191199

192200
/**
201+
* @alpha
202+
*
193203
* Deletes an existing analytics bucket
194204
* A bucket can't be deleted with existing objects inside it
195205
* You must first empty the bucket before deletion

0 commit comments

Comments
 (0)