@korso/shepherd-ui 0.5.1 → 0.7.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -3,7 +3,7 @@ import { ReactElement } from 'react';
3
3
  import { ReactNode } from 'react';
4
4
  import { z } from 'zod';
5
5
 
6
- export declare function ConfigPanel({ workspace, hubUrl, membersRefreshKey, onMembersChanged, onLeft, }: ConfigPanelProps): JSX_2.Element;
6
+ export declare function ConfigPanel({ workspace, hubUrl, membersRefreshKey, onMembersChanged, onLeft, onDeleted, }: ConfigPanelProps): JSX_2.Element;
7
7
 
8
8
  export declare interface ConfigPanelProps {
9
9
  /** The active workspace all sections configure. */
@@ -16,6 +16,8 @@ export declare interface ConfigPanelProps {
16
16
  onMembersChanged?: () => void;
17
17
  /** Called after a successful leave, so the shell re-lists its workspaces. */
18
18
  onLeft?: () => void;
19
+ /** Called after a successful delete, so the shell re-lists its workspaces. */
20
+ onDeleted?: () => void;
19
21
  }
20
22
 
21
23
  export declare function ConnectAgent({ hubUrl }: ConnectAgentProps): JSX_2.Element;
@@ -139,6 +141,16 @@ export declare interface DashboardProps {
139
141
  hasWorkspace?: boolean;
140
142
  }
141
143
 
144
+ declare const DeleteWorkspaceResponse: z.ZodObject<{
145
+ deleted: z.ZodLiteral<true>;
146
+ }, "strip", z.ZodTypeAny, {
147
+ deleted: true;
148
+ }, {
149
+ deleted: true;
150
+ }>;
151
+
152
+ declare type DeleteWorkspaceResponseT = z.infer<typeof DeleteWorkspaceResponse>;
153
+
142
154
  /**
143
155
  * Maps any thrown value into a short, human-friendly message for the view layer.
144
156
  * A {@link ShepherdClientError} (and any other `Error`) surfaces its own
@@ -190,13 +202,15 @@ declare const FeedbackResponse: z.ZodObject<{
190
202
 
191
203
  declare type FeedbackResponseT = z.infer<typeof FeedbackResponse>;
192
204
 
193
- export declare function GeneralSettings({ workspace, onLeft }: GeneralSettingsProps): JSX_2.Element;
205
+ export declare function GeneralSettings({ workspace, onLeft, onDeleted }: GeneralSettingsProps): JSX_2.Element;
194
206
 
195
207
  export declare interface GeneralSettingsProps {
196
208
  /** The active workspace whose identity is shown. */
197
209
  workspace: WorkspaceSummaryT;
198
210
  /** Called after a successful leave, so the shell refreshes its workspace list. */
199
211
  onLeft?: () => void;
212
+ /** Called after a successful delete, so the shell refreshes its workspace list. */
213
+ onDeleted?: () => void;
200
214
  }
201
215
 
202
216
  declare const InviteByEmailResponse: z.ZodObject<{
@@ -470,6 +484,8 @@ export declare interface ShepherdClient {
470
484
  listWorkspaces(): Promise<ListWorkspacesResponseT>;
471
485
  /** POST a new workspace; the caller becomes its admin. */
472
486
  createWorkspace(body: CreateWorkspaceRequestT): Promise<CreateWorkspaceResponseT>;
487
+ /** DELETE a workspace and ALL its data (admin only). Permanent, irreversible. */
488
+ deleteWorkspace(workspaceId: string): Promise<DeleteWorkspaceResponseT>;
473
489
  /** POST a new agent token; the raw `shp_` value is returned exactly once. */
474
490
  mintToken(workspaceId: string, body: MintTokenRequestT): Promise<MintTokenResponseT>;
475
491
  /** GET the workspace's token metadata (never the raw token). */