Skip to content

craft-hub / TeamManager

Class: TeamManager ​

Defined in: packages/craft-hub/src/teams.ts:26

Own the complete Team lifecycle behind one transactional interface.

Constructors ​

Constructor ​

new TeamManager(ownerScopes, gitSync, workspaces): TeamManager

Defined in: packages/craft-hub/src/teams.ts:27

Parameters ​

ownerScopes ​

OwnerScopeService

gitSync ​

TeamGitSyncService

workspaces ​

WorkspaceService

Returns ​

TeamManager

Methods ​

create() ​

create(input): Promise<OwnerScope>

Defined in: packages/craft-hub/src/teams.ts:34

Create a Team only when its Git target and initial snapshot are ready.

Parameters ​

input ​

CreateTeamInput

Returns ​

Promise<OwnerScope>


delete() ​

delete(ownerScopeId, confirmationName): Promise<TeamDeletionResult>

Defined in: packages/craft-hub/src/teams.ts:76

Delete local Team state after an exact-name confirmation, retaining its shared Git snapshot.

Parameters ​

ownerScopeId ​

string

confirmationName ​

string

Returns ​

Promise<TeamDeletionResult>


rename() ​

rename(ownerScopeId, name): Promise<OwnerScope>

Defined in: packages/craft-hub/src/teams.ts:64

Rename a Team without changing its stable id or Git target.

Parameters ​

ownerScopeId ​

string

name ​

string

Returns ​

Promise<OwnerScope>


updateIcon() ​

updateIcon(ownerScopeId, icon?): Promise<OwnerScope>

Defined in: packages/craft-hub/src/teams.ts:69

Save or clear a Team logo while retaining its identity and execution boundaries.

Parameters ​

ownerScopeId ​

string

icon? ​

string

Returns ​

Promise<OwnerScope>

Released under the MIT License.