File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ import type { CronListPageOptions , CronListPageResult } from "./service/list-page-types.js" ;
12import type {
23 CronAddInput ,
34 CronAddResult ,
@@ -12,28 +13,7 @@ import type {
1213} from "./service/state.js" ;
1314import type { CronJob } from "./types.js" ;
1415
15- type CronJobsEnabledFilter = "all" | "enabled" | "disabled" ;
16- type CronJobsSortBy = "nextRunAtMs" | "updatedAtMs" | "name" ;
17- type CronSortDir = "asc" | "desc" ;
18-
19- export type CronListPageOptions = {
20- includeDisabled ?: boolean ;
21- limit ?: number ;
22- offset ?: number ;
23- query ?: string ;
24- enabled ?: CronJobsEnabledFilter ;
25- sortBy ?: CronJobsSortBy ;
26- sortDir ?: CronSortDir ;
27- } ;
28-
29- export type CronListPageResult = {
30- jobs : CronJob [ ] ;
31- total : number ;
32- offset : number ;
33- limit : number ;
34- hasMore : boolean ;
35- nextOffset : number | null ;
36- } ;
16+ export type { CronListPageOptions , CronListPageResult } from "./service/list-page-types.js" ;
3717
3818export type CronWakeResult = { ok : true } | { ok : false } ;
3919
Original file line number Diff line number Diff line change 1+ import type { CronJob } from "../types.js" ;
2+
3+ export type CronJobsEnabledFilter = "all" | "enabled" | "disabled" ;
4+ export type CronJobsSortBy = "nextRunAtMs" | "updatedAtMs" | "name" ;
5+ export type CronSortDir = "asc" | "desc" ;
6+
7+ export type CronListPageOptions = {
8+ includeDisabled ?: boolean ;
9+ limit ?: number ;
10+ offset ?: number ;
11+ query ?: string ;
12+ enabled ?: CronJobsEnabledFilter ;
13+ sortBy ?: CronJobsSortBy ;
14+ sortDir ?: CronSortDir ;
15+ } ;
16+
17+ export type CronListPageResult < TJobs extends readonly CronJob [ ] = CronJob [ ] > = {
18+ jobs : TJobs ;
19+ total : number ;
20+ offset : number ;
21+ limit : number ;
22+ hasMore : boolean ;
23+ nextOffset : number | null ;
24+ } ;
Original file line number Diff line number Diff line change @@ -21,6 +21,13 @@ import {
2121 recomputeNextRuns ,
2222 recomputeNextRunsForMaintenance ,
2323} from "./jobs.js" ;
24+ import type {
25+ CronJobsEnabledFilter ,
26+ CronJobsSortBy ,
27+ CronListPageOptions ,
28+ CronListPageResult ,
29+ CronSortDir ,
30+ } from "./list-page-types.js" ;
2431import { locked } from "./locked.js" ;
2532import type { CronServiceState } from "./state.js" ;
2633import { ensureLoaded , persist , warnIfDisabled } from "./store.js" ;
@@ -35,28 +42,6 @@ import {
3542 wake ,
3643} from "./timer.js" ;
3744
38- type CronJobsEnabledFilter = "all" | "enabled" | "disabled" ;
39- type CronJobsSortBy = "nextRunAtMs" | "updatedAtMs" | "name" ;
40- type CronSortDir = "asc" | "desc" ;
41-
42- export type CronListPageOptions = {
43- includeDisabled ?: boolean ;
44- limit ?: number ;
45- offset ?: number ;
46- query ?: string ;
47- enabled ?: CronJobsEnabledFilter ;
48- sortBy ?: CronJobsSortBy ;
49- sortDir ?: CronSortDir ;
50- } ;
51-
52- export type CronListPageResult = {
53- jobs : ReturnType < typeof sortJobs > ;
54- total : number ;
55- offset : number ;
56- limit : number ;
57- hasMore : boolean ;
58- nextOffset : number | null ;
59- } ;
6045function mergeManualRunSnapshotAfterReload ( params : {
6146 state : CronServiceState ;
6247 jobId : string ;
You can’t perform that action at this time.
0 commit comments