Skip to content

Conversation

@mandarini
Copy link
Contributor

@mandarini mandarini commented Nov 18, 2025

Summary

Renames StorageAnalyticsApi to StorageAnalyticsClient to align with the established naming convention where user-facing entry points use the "Client" suffix.

Motivation

We have an architectural pattern where:

  • "Client" = User-facing entry points (StorageClient, StorageVectorsClient)
  • "Api" = Internal building blocks/lower-level APIs (VectorBucketApi, VectorIndexApi, VectorDataApi)

StorageAnalyticsApi was incorrectly using the "Api" suffix even though it's a top-level user-facing entry point accessed via storage.analytics. This inconsistency was confusing and didn't match the pattern used for vectors.

Changes

  • Renamed file: StorageAnalyticsApi.tsStorageAnalyticsClient.ts
  • Renamed class: StorageAnalyticsApiStorageAnalyticsClient
  • Updated class JSDoc comments
  • Updated import/export statements in StorageClient.ts and index.ts

Impact

  • Breaking Change: Yes, but API is marked as @alpha (public alpha)
  • Public API: Export name changes from StorageAnalyticsApi to StorageAnalyticsClient
  • Internal: All references updated to use new name

Pattern Clarity

After this change, our naming is now consistent:

Class Type Usage
StorageClient Client Main entry point
StorageVectorsClient Client Vector operations entry point
StorageAnalyticsClient Client Analytics operations entry point (fixed)
VectorBucketApi Api Internal building block
VectorIndexApi Api Internal building block
VectorDataApi Api Internal building block (also exportable for advanced usage)

@mandarini mandarini changed the title fix(storage): rename StorageAnalyticsApi to StorageAnalyticsClient feat(storage): rename StorageAnalyticsApi to StorageAnalyticsClient Nov 18, 2025
@github-actions github-actions bot added the storage-js Related to the storage-js library. label Nov 18, 2025
@mandarini mandarini marked this pull request as ready for review November 18, 2025 13:50
@mandarini mandarini requested review from a team as code owners November 18, 2025 13:50
@mandarini mandarini self-assigned this Nov 18, 2025
@mandarini mandarini force-pushed the fix/normalize-storage-analytics branch from afdbbfd to e6f4b3c Compare November 18, 2025 13:57
@mandarini mandarini enabled auto-merge (squash) November 18, 2025 14:12
@mandarini
Copy link
Contributor Author

mandarini commented Nov 18, 2025

Bun is failing due to 500 - most probably due to Cloudflare outage.

@mandarini mandarini merged commit 5259ffc into master Nov 18, 2025
58 of 63 checks passed
@mandarini mandarini deleted the fix/normalize-storage-analytics branch November 18, 2025 14:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

storage-js Related to the storage-js library.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants