diff --git a/etc/sdk.api.md b/etc/sdk.api.md index a65dc5c..322de88 100644 --- a/etc/sdk.api.md +++ b/etc/sdk.api.md @@ -5,6 +5,7 @@ ```ts import { Buckets } from '@textile/hub'; +import { IGunChainReference } from 'gun/types/chain'; import { UserAuth } from '@textile/hub'; // @public (undocumented) @@ -69,6 +70,13 @@ export class BrowserStorage { remove(key: string): Promise; } +// @public +export interface BucketMetadata { + dbId: string; + encryptionKey: Uint8Array; + slug: string; +} + // @public (undocumented) export interface CreateFolderRequest { bucket: string; @@ -107,6 +115,16 @@ export class FileStorage { remove(key: string): Promise; } +// @public +export class GunsdbMetadataStore implements UserMetadataStore { + createBucket(bucketSlug: string, dbId: string): Promise; + findBucket(bucketSlug: string, dbId: string): Promise; + // Warning: (ae-forgotten-export) The symbol "GunChainReference" needs to be exported by the entry point index.d.ts + // Warning: (ae-forgotten-export) The symbol "GunDataState" needs to be exported by the entry point index.d.ts + static fromIdentity(identity: Identity, gunOrServer?: GunChainReference | string): Promise; + listBuckets(): Promise; + } + // Warning: (ae-internal-missing-underscore) The name "HubAuthResponse" should be prefixed with an underscore because the declaration is marked as @internal // // @internal @@ -119,6 +137,7 @@ export interface HubAuthResponse { // @public export interface Identity { + privKey: Uint8Array; public: Public; sign(data: Uint8Array): Promise; } @@ -202,6 +221,13 @@ export class UnauthenticatedError extends Error { constructor(); } +// @public +export interface UserMetadataStore { + createBucket: (bucketSlug: string, dbId: string) => Promise; + findBucket: (bucketSlug: string, dbId: string) => Promise; + listBuckets: () => Promise; +} + // @public export class Users { constructor(config: UsersConfig, storage?: IdentityStorage); @@ -238,6 +264,8 @@ export class UserStorage { export interface UserStorageConfig { bucketsInit?: (auth: UserAuth) => Buckets; // (undocumented) + metadataStoreInit?: (identity: Identity) => Promise; + // (undocumented) textileHubAddress?: string; } diff --git a/package.json b/package.json index 9856694..c768b07 100644 --- a/package.json +++ b/package.json @@ -8,7 +8,7 @@ "serve:docs": "npm run docs && cd website && npm run start", "build:docs": "npm run docs && cd website && npm install && npm run build", "bootstrap": "lerna bootstrap", - "bumpversion": "lerna version --no-push --no-git-tag-version", + "bumpversion": "npm run build:docs && lerna version --no-push --no-git-tag-version", "publish": "lerna publish", "publish:from": "lerna publish from-package", "clean": "lerna clean && lerna run clean",