diff --git a/packages/upload-api/package.json b/packages/upload-api/package.json index a4321f611..7a0d91434 100644 --- a/packages/upload-api/package.json +++ b/packages/upload-api/package.json @@ -57,9 +57,6 @@ "space": [ "dist/src/space.d.ts" ], - "store": [ - "dist/src/store.d.ts" - ], "subscription": [ "dist/src/subscription.d.ts" ], @@ -146,10 +143,6 @@ "types": "./dist/src/space.d.ts", "import": "./src/space.js" }, - "./store": { - "types": "./dist/src/store.d.ts", - "import": "./src/store.js" - }, "./subscription": { "types": "./dist/src/subscription.d.ts", "import": "./src/subscription.js" diff --git a/packages/upload-api/src/types.ts b/packages/upload-api/src/types.ts index 47cd0ff0e..d36c408b7 100644 --- a/packages/upload-api/src/types.ts +++ b/packages/upload-api/src/types.ts @@ -180,12 +180,8 @@ export type { SubscriptionsStorage } import { UsageStorage } from './types/usage.js' export type { UsageStorage } import { StorageGetError } from './types/storage.js' -import { - Registry as BlobRegistry, - Entry as BlobEntry, - RoutingService, -} from './types/blob.js' -export type { BlobRegistry, BlobEntry, RoutingService } +import { Registry as BlobRegistry, RoutingService } from './types/blob.js' +export type * as BlobAPI from './types/blob.js' import { IndexServiceContext } from './types/index.js' import { ClaimsClientConfig } from './types/content-claims.js' import { Claim } from '@web3-storage/content-claims/client/api' diff --git a/packages/upload-api/test/storage/blob-registry.js b/packages/upload-api/test/storage/blob-registry.js index b98bb75b1..21ff2b7a5 100644 --- a/packages/upload-api/test/storage/blob-registry.js +++ b/packages/upload-api/test/storage/blob-registry.js @@ -2,14 +2,14 @@ import * as API from '../../src/types.js' import { ok, error, Failure } from '@ucanto/core' import { equals } from 'multiformats/bytes' -/** @implements {API.BlobRegistry} */ +/** @implements {API.BlobAPI.Registry} */ export class Registry { constructor() { - /** @type {Map} */ + /** @type {Map} */ this.data = new Map() } - /** @type {API.BlobRegistry['register']} */ + /** @type {API.BlobAPI.Registry['register']} */ async register({ space, cause, blob }) { const entries = this.data.get(space) ?? [] if (entries.some((e) => equals(e.blob.digest, blob.digest))) { @@ -20,7 +20,7 @@ export class Registry { return ok({}) } - /** @type {API.BlobRegistry['find']} */ + /** @type {API.BlobAPI.Registry['find']} */ async find(space, digest) { const entries = this.data.get(space) ?? [] const entry = entries.find((e) => equals(e.blob.digest, digest.bytes)) @@ -28,7 +28,7 @@ export class Registry { return ok(entry) } - /** @type {API.BlobRegistry['deregister']} */ + /** @type {API.BlobAPI.Registry['deregister']} */ async deregister(space, digest) { const entries = this.data.get(space) ?? [] const entry = entries.find((e) => equals(e.blob.digest, digest.bytes)) @@ -40,7 +40,7 @@ export class Registry { return ok({}) } - /** @type {API.BlobRegistry['entries']} */ + /** @type {API.BlobAPI.Registry['entries']} */ async entries(space, options) { const entries = this.data.get(space) ?? [] const { cursor = '0', size = entries.length } = options ?? {}