import z from "zod"; import { ServiceClient } from "../../service-client"; import { CreateScheduledJobSchema, ListScheduledJobsSchema, GetScheduledJobSchema, ListExecutionsSchema, GetDailyExecutionTrendSchema, GetTopFailedJobsSchema, GetJobStatsSchema, ListAvgExecutionsSchema, UpdateJobSchema, DeleteJobSchema, QueueJobSchema, DeleteExecutionsSchema } from "./schema"; import { AvgExecution, Execution, ExecutionTrend, FailedJob, JobMetrics, JobStats, ScheduledJob } from "./types"; export class ScheduledJobService extends ServiceClient { protected getServiceName(): string { return 'com.appconda.service.scheduled-jobs'; } public async CreateScheduledJob(payload: z.infer): Promise { return await this.actionCall('CreateScheduledJob', payload); } public async ListScheduledJobs(payload: z.infer): Promise { return await this.actionCall('ListScheduledJobs', payload); } public async GetScheduledJob(payload: z.infer): Promise { return await this.actionCall('GetScheduledJob', payload); } public async ListExecutions(payload: z.infer): Promise { return await this.actionCall('ListExecutions', payload); } public async ListAvgExecutions(payload: z.infer): Promise { return await this.actionCall('ListAvgExecutions', payload); } public async UpdateJob(payload: z.infer): Promise { return await this.actionCall('UpdateJob', payload); } public async GetDailyExecutionTrend(payload: z.infer): Promise { return await this.actionCall('GetDailyExecutionTrend', payload); } public async GetTopFailedJobs(payload: z.infer): Promise { return await this.actionCall('GetTopFailedJobs', payload); } public async GetJobStats(payload: z.infer): Promise { return await this.actionCall('GetJobStats', payload); } public async DeleteJob(payload: z.infer): Promise { return await this.actionCall('DeleteJob', payload); } public async GetJobMetrics(): Promise { return await this.actionCall('GetJobMetrics', {}); } public async QueueJob(payload: z.infer): Promise { return await this.actionCall('QueueJob', payload); } public async DeleteExecutions(payload: z.infer): Promise { return await this.actionCall('DeleteExecutions', payload); } }