import { JSONObject, Status, Timestamp, XID } from './index';
import { UserSummary } from './user';
export type OrganizationType = 'platform' | 'customer';
export interface Organization {
    id: XID;
    name: string;
    slug: string;
    displayName?: string;
    orgType: OrganizationType;
    isPlatformOrganization: boolean;
    status: Status;
    logoUrl?: string;
    brandColor?: string;
    faviconUrl?: string;
    customCSS?: string;
    domain?: string;
    domains?: string[];
    website?: string;
    description?: string;
    address?: OrganizationAddress;
    owner?: UserSummary;
    ownerId?: XID;
    members?: MemberSummary[];
    memberCount?: number;
    plan: string;
    subscriptionId?: string;
    subscriptionStatus: string;
    billingEmail?: string;
    trialEndsAt?: Timestamp;
    externalUserLimit: number;
    endUserLimit: number;
    currentExternalUsers?: number;
    currentEndUsers?: number;
    features?: FeatureSummary[];
    enabledFeatures?: string[];
    ssoEnabled: boolean;
    ssoDomain?: string;
    ssoProvider?: string;
    ssoConfiguration?: JSONObject;
    mfaRequired: boolean;
    allowPublicSignup: boolean;
    emailDomainRestrictions?: string[];
    ipWhitelist?: string[];
    createdAt: Timestamp;
    updatedAt: Timestamp;
    metadata?: JSONObject;
    customAttributes?: JSONObject;
    stats?: OrganizationStats;
}
export interface OrganizationSummary {
    id: XID;
    name: string;
    slug: string;
    logoUrl?: string;
    orgType: OrganizationType;
    status: Status;
    memberCount?: number;
    userRole?: string;
    userPermissions?: string[];
}
export interface CreateOrganizationRequest {
    name: string;
    slug?: string;
    displayName?: string;
    domain?: string;
    logoUrl?: string;
    description?: string;
    plan?: string;
    metadata?: JSONObject;
    customAttributes?: JSONObject;
}
export interface UpdateOrganizationRequest {
    name?: string;
    displayName?: string;
    domain?: string;
    logoUrl?: string;
    brandColor?: string;
    faviconUrl?: string;
    customCSS?: string;
    website?: string;
    description?: string;
    address?: OrganizationAddress;
    billingEmail?: string;
    metadata?: JSONObject;
    customAttributes?: JSONObject;
}
export interface OrganizationAddress {
    street?: string;
    city?: string;
    state?: string;
    postalCode?: string;
    country?: string;
}
export interface MemberSummary {
    id: XID;
    userId: XID;
    user?: UserSummary;
    role: string;
    roleId: XID;
    status: 'active' | 'inactive' | 'pending' | 'suspended';
    joinedAt: Timestamp;
    invitedBy?: XID;
    lastActiveAt?: Timestamp;
    permissions?: string[];
}
export interface Membership {
    id: XID;
    organizationId: XID;
    organization?: OrganizationSummary;
    userId: XID;
    user?: UserSummary;
    roleId: XID;
    roleName: string;
    permissions: string[];
    status: 'active' | 'inactive' | 'pending' | 'suspended';
    joinedAt: Timestamp;
    invitedAt?: Timestamp;
    invitedBy?: XID;
    acceptedAt?: Timestamp;
    suspendedAt?: Timestamp;
    suspendedBy?: XID;
    suspensionReason?: string;
    lastActiveAt?: Timestamp;
    loginCount?: number;
    isBillableSeat: boolean;
    seatType?: 'full' | 'guest' | 'service';
    metadata?: JSONObject;
}
export interface MemberInvitation {
    id: XID;
    organizationId: XID;
    inviterUserId: XID;
    inviterName?: string;
    emailAddress: string;
    roleId: XID;
    roleName: string;
    status: 'pending' | 'accepted' | 'expired' | 'revoked';
    token: string;
    expiresAt: Timestamp;
    createdAt: Timestamp;
    acceptedAt?: Timestamp;
    revokedAt?: Timestamp;
    revokedBy?: XID;
    customMessage?: string;
    redirectUrl?: string;
    metadata?: JSONObject;
}
export interface CreateInvitationRequest {
    emailAddress: string;
    roleId: XID;
    customMessage?: string;
    redirectUrl?: string;
    expiresAt?: Timestamp;
    metadata?: JSONObject;
}
export interface OrganizationRole {
    id: XID;
    name: string;
    description?: string;
    organizationId: XID;
    isDefault: boolean;
    isSystemRole: boolean;
    permissions: string[];
    memberCount?: number;
    createdAt: Timestamp;
    updatedAt: Timestamp;
}
export interface FeatureSummary {
    id: XID;
    name: string;
    displayName: string;
    description?: string;
    enabled: boolean;
    required: boolean;
    planRestricted: boolean;
    configuration?: JSONObject;
}
export interface OrganizationSettings {
    allowPublicSignup: boolean;
    requireEmailVerification: boolean;
    allowUsernameSignup: boolean;
    allowPhoneSignup: boolean;
    passwordMinLength: number;
    passwordRequireUppercase: boolean;
    passwordRequireLowercase: boolean;
    passwordRequireNumbers: boolean;
    passwordRequireSymbols: boolean;
    sessionDuration: number;
    inactivityTimeout: number;
    maxConcurrentSessions: number;
    mfaRequired: boolean;
    allowedMfaMethods: string[];
    mfaGracePeriod?: number;
    emailDomainRestrictions?: string[];
    emailDomainRestrictionsEnabled: boolean;
    ipWhitelist?: string[];
    ipWhitelistEnabled: boolean;
    allowedCountries?: string[];
    blockedCountries?: string[];
    securityNotifications: boolean;
    billingNotifications: boolean;
    featureAnnouncements: boolean;
    customBranding: boolean;
    hideFromDirectory: boolean;
    auditLogRetentionDays: number;
    dataResidency?: string;
    encryptionAtRest: boolean;
    apiRateLimit?: number;
    webhookSecret?: string;
    allowedCallbackUrls?: string[];
}
export interface OrganizationStats {
    totalMembers: number;
    activeMembers: number;
    pendingInvitations: number;
    suspendedMembers: number;
    internalUsers: number;
    externalUsers: number;
    endUsers: number;
    dailyActiveUsers: number;
    weeklyActiveUsers: number;
    monthlyActiveUsers: number;
    totalLogins: number;
    successfulLogins: number;
    failedLogins: number;
    mfaLogins: number;
    ssoLogins: number;
    blockedAttempts: number;
    passwordResets: number;
    accountLockouts: number;
    billableSeats: number;
    seatUtilization: number;
    timeSeriesData?: Array<{
        date: string;
        activeUsers: number;
        newMembers: number;
        logins: number;
    }>;
}
export interface OrganizationSearchParams {
    query?: string;
    orgType?: OrganizationType;
    status?: Status;
    plan?: string;
    subscriptionStatus?: string;
    hasSSO?: boolean;
    createdBefore?: Timestamp;
    createdAfter?: Timestamp;
    sortBy?: 'name' | 'createdAt' | 'memberCount' | 'lastActiveAt';
    sortOrder?: 'asc' | 'desc';
}
export interface OrganizationDomain {
    id: XID;
    organizationId: XID;
    domain: string;
    isPrimary: boolean;
    verified: boolean;
    verificationToken?: string;
    verificationMethod: 'dns' | 'http';
    verifiedAt?: Timestamp;
    createdAt: Timestamp;
}
export interface DomainVerificationRequest {
    domain: string;
    method: 'dns' | 'http';
}
export interface DomainVerificationResponse {
    domain: string;
    token: string;
    method: 'dns' | 'http';
    instructions: string;
    dnsRecord?: {
        type: string;
        name: string;
        value: string;
    };
    httpFile?: {
        path: string;
        content: string;
    };
}
export interface TransferOrganizationRequest {
    newOwnerId: XID;
    reason?: string;
    notifyMembers: boolean;
}
export interface OrganizationUsage {
    organizationId: XID;
    billingPeriodStart: Timestamp;
    billingPeriodEnd: Timestamp;
    billableSeats: number;
    maxSeats: number;
    seatOverage: number;
    apiCallsUsed: number;
    apiCallsLimit: number;
    storageUsed: number;
    storageLimit: number;
    activeUsers: number;
    newUsers: number;
    totalLogins: number;
    dataTransfer: number;
}
export interface OrganizationBilling {
    organizationId: XID;
    subscriptionId?: string;
    customerId?: string;
    plan: string;
    planName: string;
    planPrice: number;
    billingCycle: 'monthly' | 'yearly';
    status: 'active' | 'trialing' | 'past_due' | 'canceled' | 'unpaid';
    trialStart?: Timestamp;
    trialEnd?: Timestamp;
    currentPeriodStart: Timestamp;
    currentPeriodEnd: Timestamp;
    paymentMethod?: string;
    lastPaymentAmount?: number;
    lastPaymentDate?: Timestamp;
    nextPaymentDate?: Timestamp;
    baseSeats: number;
    additionalSeats: number;
    overage: number;
    billingEmail: string;
    billingAddress?: OrganizationAddress;
    taxId?: string;
}
//# sourceMappingURL=organization.d.ts.map