@appconda/nextjs 1.0.131 → 1.0.132

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (58) hide show
  1. package/dist/modules/hooks/index.d.ts +3 -0
  2. package/dist/modules/hooks/index.js +4 -0
  3. package/dist/modules/hooks/lib/Hooks.d.ts +32 -0
  4. package/dist/modules/hooks/lib/Hooks.js +64 -0
  5. package/dist/modules/hooks/lib/handler.d.ts +12 -0
  6. package/dist/modules/hooks/lib/handler.js +23 -0
  7. package/dist/modules/hooks/lib/jobs/index.d.ts +2 -0
  8. package/dist/modules/hooks/lib/jobs/index.js +3 -0
  9. package/dist/modules/hooks/lib/jobs/job1.d.ts +1 -0
  10. package/dist/modules/hooks/lib/jobs/job1.js +16 -0
  11. package/dist/modules/hooks/lib/jobs/log-job.d.ts +1 -0
  12. package/dist/modules/hooks/lib/jobs/log-job.js +9 -0
  13. package/dist/modules/hooks/lib/wait.d.ts +8 -0
  14. package/dist/modules/hooks/lib/wait.js +13 -0
  15. package/dist/modules/index.d.ts +1 -0
  16. package/dist/modules/index.js +2 -1
  17. package/dist/modules/scheduled-job/action.d.ts +40 -1
  18. package/dist/modules/scheduled-job/action.js +26 -2
  19. package/dist/modules/scheduled-job/index.d.ts +3 -0
  20. package/dist/modules/scheduled-job/index.js +4 -1
  21. package/dist/modules/scheduled-job/lib/Schedules.d.ts +32 -0
  22. package/dist/modules/scheduled-job/lib/Schedules.js +64 -0
  23. package/dist/modules/scheduled-job/lib/handler.d.ts +12 -0
  24. package/dist/modules/scheduled-job/lib/handler.js +23 -0
  25. package/dist/modules/scheduled-job/lib/jobs/index.d.ts +2 -0
  26. package/dist/modules/scheduled-job/lib/jobs/index.js +3 -0
  27. package/dist/modules/scheduled-job/lib/jobs/job1.d.ts +1 -0
  28. package/dist/modules/scheduled-job/lib/jobs/job1.js +30 -0
  29. package/dist/modules/scheduled-job/lib/jobs/log-job.d.ts +1 -0
  30. package/dist/modules/scheduled-job/lib/jobs/log-job.js +9 -0
  31. package/dist/modules/scheduled-job/lib/wait.d.ts +8 -0
  32. package/dist/modules/scheduled-job/lib/wait.js +13 -0
  33. package/dist/modules/scheduled-job/schema.d.ts +20 -0
  34. package/dist/modules/scheduled-job/schema.js +10 -2
  35. package/dist/modules/scheduled-job/service.d.ts +4 -2
  36. package/dist/modules/scheduled-job/service.js +7 -1
  37. package/dist/modules/scheduled-job/types.d.ts +6 -0
  38. package/dist/modules/scheduled-job/types.js +1 -1
  39. package/package.json +1 -1
  40. package/src/modules/hooks/index.ts +5 -0
  41. package/src/modules/hooks/lib/Hooks.ts +103 -0
  42. package/src/modules/hooks/lib/handler.ts +27 -0
  43. package/src/modules/hooks/lib/jobs/index.ts +2 -0
  44. package/src/modules/hooks/lib/jobs/job1.ts +20 -0
  45. package/src/modules/hooks/lib/jobs/log-job.ts +10 -0
  46. package/src/modules/hooks/lib/wait.ts +17 -0
  47. package/src/modules/index.ts +2 -1
  48. package/src/modules/scheduled-job/action.ts +30 -2
  49. package/src/modules/scheduled-job/index.ts +5 -1
  50. package/src/modules/scheduled-job/lib/Schedules.ts +103 -0
  51. package/src/modules/scheduled-job/lib/handler.ts +27 -0
  52. package/src/modules/scheduled-job/lib/jobs/index.ts +2 -0
  53. package/src/modules/scheduled-job/lib/jobs/job1.ts +34 -0
  54. package/src/modules/scheduled-job/lib/jobs/log-job.ts +9 -0
  55. package/src/modules/scheduled-job/lib/wait.ts +17 -0
  56. package/src/modules/scheduled-job/schema.ts +13 -1
  57. package/src/modules/scheduled-job/service.ts +10 -2
  58. package/src/modules/scheduled-job/types.ts +10 -0
@@ -16,9 +16,21 @@ export const GetScheduledJobSchema = z.object({
16
16
  });
17
17
 
18
18
  export const ListExecutionsSchema = z.object({
19
- scheduledJobId: z.string()
19
+ scheduledJobId: z.string(),
20
+ status: z.string().optional()
20
21
  });
21
22
 
23
+ export const ListAvgExecutionsSchema = z.object({
24
+ });
25
+
26
+ export const UpdateJobSchema = z.object({
27
+ id: z.string(),
28
+ name: z.string().optional(),
29
+ cron: z.string().optional(),
30
+ enabled: z.boolean().optional(),
31
+ });
32
+
33
+
22
34
  export const GetDailyExecutionTrendSchema = z.object({
23
35
 
24
36
  });
@@ -1,8 +1,8 @@
1
1
 
2
2
  import z from "zod";
3
3
  import { ServiceClient } from "../../service-client";
4
- import { CreateScheduledJobSchema, ListScheduledJobsSchema, GetScheduledJobSchema, ListExecutionsSchema, GetDailyExecutionTrendSchema, GetTopFailedJobsSchema, GetJobStatsSchema } from "./schema";
5
- import { Execution, ExecutionTrend, FailedJob, JobStats, ScheduledJob } from "./types";
4
+ import { CreateScheduledJobSchema, ListScheduledJobsSchema, GetScheduledJobSchema, ListExecutionsSchema, GetDailyExecutionTrendSchema, GetTopFailedJobsSchema, GetJobStatsSchema, ListAvgExecutionsSchema, UpdateJobSchema } from "./schema";
5
+ import { AvgExecution, Execution, ExecutionTrend, FailedJob, JobStats, ScheduledJob } from "./types";
6
6
 
7
7
  export class ScheduledJobService extends ServiceClient {
8
8
  protected getServiceName(): string {
@@ -25,6 +25,14 @@ export class ScheduledJobService extends ServiceClient {
25
25
  return await this.actionCall('ListExecutions', payload);
26
26
  }
27
27
 
28
+ public async ListAvgExecutions(payload: z.infer<typeof ListAvgExecutionsSchema>): Promise<AvgExecution[]> {
29
+ return await this.actionCall('ListAvgExecutions', payload);
30
+ }
31
+
32
+ public async UpdateJob(payload: z.infer<typeof UpdateJobSchema>): Promise<ScheduledJob> {
33
+ return await this.actionCall('UpdateJob', payload);
34
+ }
35
+
28
36
  public async GetDailyExecutionTrend(payload: z.infer<typeof GetDailyExecutionTrendSchema>): Promise<ExecutionTrend[]> {
29
37
  return await this.actionCall('GetDailyExecutionTrend', payload);
30
38
  }
@@ -26,6 +26,16 @@ export type Execution = {
26
26
  status: string;
27
27
  }
28
28
 
29
+
30
+ export type AvgExecution = {
31
+ scheduledJobId: string;
32
+ totalExecutions: number;
33
+ activeDays: number;
34
+ avgExecutionsPerDay: number;
35
+ }
36
+
37
+
38
+
29
39
  export type ExecutionTrend = {
30
40
  labels: string[];
31
41
  datasets: {