import { IStatisticsSchema } from '@/types/IDB';
/**
 *
 * @description Api endpoints req body & res data types ,
 * these types index the type of the data that get shared between the
 * front end & the back end by the api
 * * source : https://www.typescriptlang.org/docs/
 */

export interface IUser {
    username: string,
    password: string,
    token: {
        value: string,
        expiresAt: number
    }
}

export interface IAuthReqBody {
    username: string;
    password: string;
}

export interface IAuthResData {
    success: boolean,
    message: string,
    authToken?: string,
}
// statistics
export interface IStatisticsResData {
    membersCount: {
        name: string,
        value: number,
    },
    activeSubscriptionsCount: {
        name: "activeSubscriptionsCount",
        value: number,
    },
    expiredSoonSubscriptionsCount: {
        name: "expiredSoonSubscriptionsCount",
        value: number,
    },
    expiredSubscriptionsCount: {
        name: "expiredSubscriptionsCount",
        value: number,
    },
    activeMembersCount: {
        name: "activeMembersCount",
        value: number,
    },
    disActiveMembersCount: {
        name: "disActiveMembersCount",
        value: number,
    },
    servicesCount: {
        name: "servicesCount",
        value: number,
    },
    activeServicesCount: {
        name: "activeServicesCount",
        value: number,
    },
    disActiveServicesCount: {
        name: "disActiveServicesCount",
        value: number,
    },
    generalMembersOverView: {
        name: "generalMembersOverView",
        value: IStatisticsSchema
    },
    totalIncome: number,
    totalOutcome: number,
}