Skip to content

Commit

Permalink
feat: expose OwnedSpace and SharedSpace from access-client (#1244)
Browse files Browse the repository at this point in the history
Not having these available as types is making it hard to build the web
console space creation wizard.
  • Loading branch information
travis committed Dec 14, 2023
1 parent c0b306d commit 8ec1b44
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 2 deletions.
4 changes: 2 additions & 2 deletions packages/access-client/src/space.js
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@ const toCapabilities = (allow) => {
* Represents an owned space, meaning a space for which we have a private key
* and consequently have full authority over.
*/
class OwnedSpace {
export class OwnedSpace {
/**
* @param {Model} model
*/
Expand Down Expand Up @@ -290,7 +290,7 @@ export const provision = async (space, { proofs, agent }) => {
* Represents a shared space, meaning a space for which we have a delegation
* and consequently have limited authority over.
*/
class SharedSpace {
export class SharedSpace {
/**
* @typedef {object} SharedSpaceModel
* @property {API.SpaceDID} id
Expand Down
1 change: 1 addition & 0 deletions packages/access-client/src/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,7 @@ export * from '@web3-storage/capabilities/types'
export * from './errors.js'
export * from '@web3-storage/did-mailto'
export type { Agent } from './agent.js'
export type { OwnedSpace, SharedSpace } from './space.js'

export interface SpaceInfoResult {
// space did
Expand Down
2 changes: 2 additions & 0 deletions packages/w3up-client/src/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,8 @@ export type {
AccountDID,
ProviderDID,
SpaceDID,
OwnedSpace,
SharedSpace,
} from '@web3-storage/access/types'

export type ProofQuery = Record<Resource, Record<Ability, Unit>>
Expand Down

0 comments on commit 8ec1b44

Please sign in to comment.