import type { Team, TeamRole, TeamMember } from '../teams/types'; import type { EntityActionResult, EntityActionVoidResult } from './types'; /** * Team update data that can be passed to updateTeam */ export interface UpdateTeamData { name?: string; slug?: string; description?: string; avatarUrl?: string; settings?: Record; } /** * Result of invite member action */ export interface InviteMemberResult { memberId: string; userId: string; teamId: string; role: TeamRole; } /** * Update a team's information * * Requires owner or admin role in the team. * * @param teamId - The team ID to update * @param data - Team fields to update * @returns Updated team data wrapped in EntityActionResult * * @example * ```typescript * const result = await updateTeam('team-123', { * name: 'New Team Name', * description: 'Updated description' * }) * * if (result.success) { * console.log('Team updated:', result.data.name) * } * ``` */ export declare function updateTeam(teamId: string, data: UpdateTeamData): Promise>; /** * Invite a user to join the team * * Requires owner or admin role in the team. * The user must already exist in the system. * * @param teamId - The team ID * @param email - Email of the user to invite * @param role - Role to assign (member, admin, viewer) * @returns Created membership data wrapped in EntityActionResult * * @example * ```typescript * const result = await inviteMember('team-123', 'user@example.com', 'member') * * if (result.success) { * console.log('Member invited:', result.data.memberId) * } * ``` */ export declare function inviteMember(teamId: string, email: string, role?: TeamRole): Promise>; /** * Remove a member from the team * * Requires owner or admin role in the team. * Cannot remove the team owner (must transfer ownership first). * * @param teamId - The team ID * @param memberId - The member ID to remove (from team_members table) * @returns Success status * * @example * ```typescript * const result = await removeMember('team-123', 'member-id-456') * * if (result.success) { * console.log('Member removed') * } * ``` */ export declare function removeMember(teamId: string, memberId: string): Promise; /** * Update a team member's role * * Requires owner role to change to/from admin. * Admins can change member/viewer roles. * Cannot change owner role (must transfer ownership). * * @param teamId - The team ID * @param memberId - The member's user ID * @param role - New role to assign * @returns Updated membership data wrapped in EntityActionResult * * @example * ```typescript * const result = await updateMemberRole('team-123', 'user-456', 'admin') * * if (result.success) { * console.log('Role updated:', result.data.role) * } * ``` */ export declare function updateMemberRole(teamId: string, memberId: string, role: TeamRole): Promise>; //# sourceMappingURL=team.actions.d.ts.map