import { z } from 'zod';
import { globalOptionsZod } from '../../../../Command.js';
import DateAndPeriodBasedReport from '../../../base/DateAndPeriodBasedReport.js';
import commands from '../../commands.js';
export const options = z.strictObject({
    ...globalOptionsZod.shape,
    output: z.enum(['csv', 'json']).optional().alias('o'),
    period: z.enum(['D7', 'D30', 'D90', 'D180']).optional().alias('p'),
    date: z.string().regex(/^\d{4}-\d{2}-\d{2}$/, 'The supported date format is YYYY-MM-DD').optional().alias('d')
});
class OneDriveReportActivityUserDetailCommand extends DateAndPeriodBasedReport {
    get name() {
        return commands.REPORT_ACTIVITYUSERDETAIL;
    }
    get usageEndpoint() {
        return 'getOneDriveActivityUserDetail';
    }
    get description() {
        return 'Gets details about OneDrive activity by user';
    }
    get schema() {
        return options;
    }
    getRefinedSchema(schema) {
        return schema
            .refine((opts) => opts.period !== undefined || opts.date !== undefined, {
            message: 'Specify period or date, one is required.',
            params: { customCode: 'optionSet', options: ['period', 'date'] }
        })
            .refine((opts) => !(opts.period !== undefined && opts.date !== undefined), {
            message: 'Specify period or date but not both.'
        });
    }
}
export default new OneDriveReportActivityUserDetailCommand();
//# sourceMappingURL=report-activityuserdetail.js.map