@acarmisc/backstage-plugin-litellm 0.31.1 → 0.33.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.
@@ -1,5 +1,10 @@
1
1
  import { FC } from 'react';
2
2
  import { TeamInfo, ModelInfo, LiteLlmConfig, CreateTeamRequest, UpdateTeamRequest, VectorStoreInfo, McpServerInfo } from '../types';
3
+ /** A catalog User entity flattened into what the member picker needs. */
4
+ export interface InitialMember {
5
+ userEntityRef: string;
6
+ maxBudgetInTeam?: number;
7
+ }
3
8
  interface ManageTeamDialogProps {
4
9
  open: boolean;
5
10
  onClose: () => void;
@@ -7,7 +12,11 @@ interface ManageTeamDialogProps {
7
12
  team?: TeamInfo;
8
13
  allModels: ModelInfo[];
9
14
  config?: LiteLlmConfig;
10
- onSubmit: (payload: CreateTeamRequest | UpdateTeamRequest) => Promise<void>;
15
+ /**
16
+ * Saves the team. In create mode, `initialMembers` lists the members picked
17
+ * in the dialog; the parent adds them once the team exists.
18
+ */
19
+ onSubmit: (payload: CreateTeamRequest | UpdateTeamRequest, initialMembers?: InitialMember[]) => Promise<void>;
11
20
  /** When true, the Members section (edit mode only) exposes add/remove controls. */
12
21
  canManageMembers?: boolean;
13
22
  /** Called to add a member; the parent is expected to refresh `team` on success. */
@@ -26,6 +35,12 @@ interface ManageTeamDialogProps {
26
35
  mcpServers?: McpServerInfo[];
27
36
  /** Called to replace the team's attached MCP servers; parent refreshes `team`. */
28
37
  onSaveMcpServers?: (mcpServerIds: string[]) => Promise<void>;
38
+ /** When true, only members section is shown (not budget/models/KB/MCP); title changes; Save becomes Done. */
39
+ membersOnly?: boolean;
40
+ /** Current user's LiteLLM ID; used in membersOnly mode to prevent self-removal and role-restricted removal. */
41
+ currentUserId?: string;
42
+ /** Roles that can manage members in membersOnly mode; used to disable removal of role holders. */
43
+ memberManagerRoles?: string[];
29
44
  }
30
45
  export declare const ManageTeamDialog: FC<ManageTeamDialogProps>;
31
46
  export {};
@@ -12,6 +12,11 @@ interface TeamUsageProps {
12
12
  onCreateTeam?: () => void;
13
13
  /** Called when a team card is expanded to trigger data loading. */
14
14
  onTeamExpand?: (team: TeamInfo) => void;
15
+ /** Per-team: whether the caller may manage this team's members only. */
16
+ canManageMembers?: (team: TeamInfo) => boolean;
17
+ onManageMembers?: (team: TeamInfo) => void;
18
+ /** Teams are synced from an identity provider: show a badge, no write controls. */
19
+ readOnly?: boolean;
15
20
  }
16
21
  export declare const TeamUsage: FC<TeamUsageProps>;
17
22
  export {};