export type OrgType = 'PRIVATE' | 'PUBLIC' | 'PERSONAL' | 'BUSINESS';
export type OrgPlan = 'free' | 'pro' | 'enterprise';
export interface Organization {
    id: string;
    name: string;
    description?: string;
    type: OrgType;
    plan: OrgPlan;
    ownerId: string;
    isActive: boolean;
    createdAt: string;
    updatedAt?: string;
}
export interface ListMyOrgsResponse {
    operationId: string;
    organizations: Organization[];
    nextToken?: string;
    count: number;
}
export interface OrgResponse {
    operationId: string;
    organization: Organization;
}
export interface CreateOrgRequest {
    name: string;
    type: OrgType;
    description?: string;
}
export interface UpdateOrgRequest {
    name?: string;
    description?: string;
}
export interface InviteUserRequest {
    email?: string;
    userId?: string;
    roleId: string;
}
export interface InviteUserResponse {
    operationId: string;
    inviteUrl: string;
    expiresAt: string;
    email: string;
}
export interface LeaveOrgResponse {
    operationId: string;
    message: string;
    leftAt: string;
}
export interface OrgMember {
    userId: string;
    email?: string;
    name?: string;
    roles: string[];
    assignedAt?: string;
}
export interface ListOrgMembersResponse {
    operationId: string;
    members: OrgMember[];
    nextToken?: string;
    count: number;
}
export interface PendingInvitation {
    orgId: string;
    orgName: string;
    roleId: string;
    inviterId: string;
    inviterName: string;
    expiresAt: string;
}
export interface ListPendingInvitationsResponse {
    operationId: string;
    items: PendingInvitation[];
}
export interface AcceptInvitationResponse {
    operationId: string;
    orgId: string;
    orgName: string;
    roleId: string;
}
export interface OrgRole {
    id: string;
    name: string;
    description?: string;
    permissions?: string[];
    isSystem?: boolean;
}
export interface ListOrgRolesResponse {
    operationId: string;
    roles: OrgRole[];
}
export interface ChangeMemberRoleRequest {
    roleId: string;
}
export interface ChangeMemberRoleResponse {
    operationId: string;
    userId: string;
    orgId: string;
    roleId: string;
}
export type ImportOnConflict = 'assignRole' | 'skip' | 'error';
export interface ImportUserRow {
    email: string;
    name?: string;
    roleName: string;
}
export interface ImportMembersRequest {
    users: ImportUserRow[];
    onConflict?: ImportOnConflict;
    sendActivation?: boolean;
}
export type ImportRowStatus = 'created' | 'assigned' | 'skipped' | 'error';
export interface ImportRowResult {
    email: string;
    status: ImportRowStatus;
    userId?: string;
    activation?: 'sent' | 'pending';
    reason?: string;
}
export interface ImportSummary {
    created: number;
    assigned: number;
    skipped: number;
    failed: number;
}
export interface ImportMembersResponse {
    operationId: string;
    summary: ImportSummary;
    results: ImportRowResult[];
}
