@webiny/api-headless-cms-scheduler 6.0.0-alpha.4 → 6.0.0-rc.0
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.
- package/README.md +11 -15
- package/context.d.ts +2 -7
- package/context.js +9 -64
- package/context.js.map +1 -1
- package/features/CancelScheduledActionOnEntryChange/CancelScheduledActionOnEntryDeleteEventHandler.d.ts +20 -0
- package/features/CancelScheduledActionOnEntryChange/CancelScheduledActionOnEntryDeleteEventHandler.js +51 -0
- package/features/CancelScheduledActionOnEntryChange/CancelScheduledActionOnEntryDeleteEventHandler.js.map +1 -0
- package/features/CancelScheduledActionOnEntryChange/CancelScheduledActionOnPublishEventHandler.d.ts +19 -0
- package/features/CancelScheduledActionOnEntryChange/CancelScheduledActionOnPublishEventHandler.js +48 -0
- package/features/CancelScheduledActionOnEntryChange/CancelScheduledActionOnPublishEventHandler.js.map +1 -0
- package/features/CancelScheduledActionOnEntryChange/CancelScheduledActionOnRevisionDeleteEventHandler.d.ts +19 -0
- package/features/CancelScheduledActionOnEntryChange/CancelScheduledActionOnRevisionDeleteEventHandler.js +47 -0
- package/features/CancelScheduledActionOnEntryChange/CancelScheduledActionOnRevisionDeleteEventHandler.js.map +1 -0
- package/features/CancelScheduledActionOnEntryChange/CancelScheduledActionOnUnpublishEventHandler.d.ts +19 -0
- package/features/CancelScheduledActionOnEntryChange/CancelScheduledActionOnUnpublishEventHandler.js +48 -0
- package/features/CancelScheduledActionOnEntryChange/CancelScheduledActionOnUnpublishEventHandler.js.map +1 -0
- package/features/CancelScheduledActionOnEntryChange/feature.d.ts +8 -0
- package/features/CancelScheduledActionOnEntryChange/feature.js +24 -0
- package/features/CancelScheduledActionOnEntryChange/feature.js.map +1 -0
- package/features/CancelScheduledEntryAction/CancelScheduledEntryActionUseCase.d.ts +15 -0
- package/features/CancelScheduledEntryAction/CancelScheduledEntryActionUseCase.js +25 -0
- package/features/CancelScheduledEntryAction/CancelScheduledEntryActionUseCase.js.map +1 -0
- package/features/CancelScheduledEntryAction/abstractions.d.ts +22 -0
- package/features/CancelScheduledEntryAction/abstractions.js +11 -0
- package/features/CancelScheduledEntryAction/abstractions.js.map +1 -0
- package/features/CancelScheduledEntryAction/feature.d.ts +6 -0
- package/features/CancelScheduledEntryAction/feature.js +16 -0
- package/features/CancelScheduledEntryAction/feature.js.map +1 -0
- package/features/CancelScheduledEntryAction/index.d.ts +1 -0
- package/features/CancelScheduledEntryAction/index.js +3 -0
- package/features/CancelScheduledEntryAction/index.js.map +1 -0
- package/features/ScheduleEntryAction/ScheduleEntryActionUseCase.d.ts +27 -0
- package/features/ScheduleEntryAction/ScheduleEntryActionUseCase.js +83 -0
- package/features/ScheduleEntryAction/ScheduleEntryActionUseCase.js.map +1 -0
- package/features/ScheduleEntryAction/abstractions.d.ts +45 -0
- package/features/ScheduleEntryAction/abstractions.js +15 -0
- package/features/ScheduleEntryAction/abstractions.js.map +1 -0
- package/features/ScheduleEntryAction/actionHandlers/PublishEntryActionHandler.d.ts +35 -0
- package/features/ScheduleEntryAction/actionHandlers/PublishEntryActionHandler.js +109 -0
- package/features/ScheduleEntryAction/actionHandlers/PublishEntryActionHandler.js.map +1 -0
- package/features/ScheduleEntryAction/actionHandlers/UnpublishEntryActionHandler.d.ts +29 -0
- package/features/ScheduleEntryAction/actionHandlers/UnpublishEntryActionHandler.js +92 -0
- package/features/ScheduleEntryAction/actionHandlers/UnpublishEntryActionHandler.js.map +1 -0
- package/features/ScheduleEntryAction/feature.d.ts +7 -0
- package/features/ScheduleEntryAction/feature.js +21 -0
- package/features/ScheduleEntryAction/feature.js.map +1 -0
- package/features/ScheduleEntryAction/index.d.ts +1 -0
- package/features/ScheduleEntryAction/index.js +3 -0
- package/features/ScheduleEntryAction/index.js.map +1 -0
- package/graphql/ActionMapper.d.ts +15 -0
- package/graphql/ActionMapper.js +18 -0
- package/graphql/ActionMapper.js.map +1 -0
- package/{scheduler → graphql}/dates.d.ts +1 -2
- package/graphql/dates.js +9 -0
- package/graphql/dates.js.map +1 -0
- package/graphql/index.d.ts +2 -2
- package/graphql/index.js +113 -71
- package/graphql/index.js.map +1 -1
- package/graphql/schema.d.ts +93 -148
- package/graphql/schema.js +51 -55
- package/graphql/schema.js.map +1 -1
- package/index.d.ts +3 -7
- package/index.js +5 -22
- package/index.js.map +1 -1
- package/package.json +20 -22
- package/constants.d.ts +0 -11
- package/constants.js +0 -19
- package/constants.js.map +0 -1
- package/handler/Handler.d.ts +0 -23
- package/handler/Handler.js +0 -74
- package/handler/Handler.js.map +0 -1
- package/handler/actions/PublishHandlerAction.d.ts +0 -13
- package/handler/actions/PublishHandlerAction.js +0 -64
- package/handler/actions/PublishHandlerAction.js.map +0 -1
- package/handler/actions/UnpublishHandlerAction.d.ts +0 -13
- package/handler/actions/UnpublishHandlerAction.js +0 -53
- package/handler/actions/UnpublishHandlerAction.js.map +0 -1
- package/handler/index.d.ts +0 -7
- package/handler/index.js +0 -64
- package/handler/index.js.map +0 -1
- package/handler/types.d.ts +0 -5
- package/handler/types.js +0 -7
- package/handler/types.js.map +0 -1
- package/hooks/index.d.ts +0 -7
- package/hooks/index.js +0 -58
- package/hooks/index.js.map +0 -1
- package/manifest.d.ts +0 -17
- package/manifest.js +0 -47
- package/manifest.js.map +0 -1
- package/scheduler/ScheduleExecutor.d.ts +0 -16
- package/scheduler/ScheduleExecutor.js +0 -55
- package/scheduler/ScheduleExecutor.js.map +0 -1
- package/scheduler/ScheduleFetcher.d.ts +0 -16
- package/scheduler/ScheduleFetcher.js +0 -51
- package/scheduler/ScheduleFetcher.js.map +0 -1
- package/scheduler/ScheduleRecord.d.ts +0 -31
- package/scheduler/ScheduleRecord.js +0 -57
- package/scheduler/ScheduleRecord.js.map +0 -1
- package/scheduler/Scheduler.d.ts +0 -14
- package/scheduler/Scheduler.js +0 -27
- package/scheduler/Scheduler.js.map +0 -1
- package/scheduler/actions/PublishScheduleAction.d.ts +0 -26
- package/scheduler/actions/PublishScheduleAction.js +0 -196
- package/scheduler/actions/PublishScheduleAction.js.map +0 -1
- package/scheduler/actions/UnpublishScheduleAction.d.ts +0 -26
- package/scheduler/actions/UnpublishScheduleAction.js +0 -194
- package/scheduler/actions/UnpublishScheduleAction.js.map +0 -1
- package/scheduler/createScheduleRecordId.d.ts +0 -2
- package/scheduler/createScheduleRecordId.js +0 -33
- package/scheduler/createScheduleRecordId.js.map +0 -1
- package/scheduler/createScheduler.d.ts +0 -12
- package/scheduler/createScheduler.js +0 -65
- package/scheduler/createScheduler.js.map +0 -1
- package/scheduler/dates.js +0 -27
- package/scheduler/dates.js.map +0 -1
- package/scheduler/model.d.ts +0 -1
- package/scheduler/model.js +0 -88
- package/scheduler/model.js.map +0 -1
- package/scheduler/types.d.ts +0 -88
- package/scheduler/types.js +0 -19
- package/scheduler/types.js.map +0 -1
- package/service/SchedulerService.d.ts +0 -23
- package/service/SchedulerService.js +0 -151
- package/service/SchedulerService.js.map +0 -1
- package/service/types.d.ts +0 -19
- package/service/types.js +0 -7
- package/service/types.js.map +0 -1
- package/types.d.ts +0 -11
- package/types.js +0 -7
- package/types.js.map +0 -1
- package/utils/dateInTheFuture.d.ts +0 -6
- package/utils/dateInTheFuture.js +0 -19
- package/utils/dateInTheFuture.js.map +0 -1
package/graphql/schema.d.ts
CHANGED
|
@@ -1,217 +1,162 @@
|
|
|
1
1
|
import zod from "zod";
|
|
2
|
-
import { ScheduleType } from "../scheduler/types.js";
|
|
3
2
|
export declare const getScheduleSchema: zod.ZodObject<{
|
|
4
3
|
modelId: zod.ZodString;
|
|
5
4
|
id: zod.ZodString;
|
|
6
5
|
}, "strip", zod.ZodTypeAny, {
|
|
7
|
-
id: string;
|
|
8
6
|
modelId: string;
|
|
9
|
-
}, {
|
|
10
7
|
id: string;
|
|
8
|
+
}, {
|
|
11
9
|
modelId: string;
|
|
10
|
+
id: string;
|
|
12
11
|
}>;
|
|
12
|
+
export declare enum ScheduleType {
|
|
13
|
+
publish = "publish",
|
|
14
|
+
unpublish = "unpublish"
|
|
15
|
+
}
|
|
13
16
|
export declare const listScheduleSchema: zod.ZodObject<{
|
|
14
17
|
modelId: zod.ZodString;
|
|
15
18
|
where: zod.ZodOptional<zod.ZodObject<{
|
|
16
19
|
targetId: zod.ZodOptional<zod.ZodString>;
|
|
17
|
-
|
|
20
|
+
namespace: zod.ZodOptional<zod.ZodString>;
|
|
18
21
|
title_contains: zod.ZodOptional<zod.ZodString>;
|
|
19
22
|
title_not_contains: zod.ZodOptional<zod.ZodString>;
|
|
20
23
|
type: zod.ZodOptional<zod.ZodNativeEnum<typeof ScheduleType>>;
|
|
21
24
|
scheduledBy: zod.ZodOptional<zod.ZodString>;
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
+
scheduledFor: zod.ZodEffects<zod.ZodOptional<zod.ZodDate>, `${number}-${number}-${number}T${number}:${number}:${number}.${number}Z` | undefined, Date | undefined>;
|
|
26
|
+
scheduledFor_gte: zod.ZodEffects<zod.ZodOptional<zod.ZodDate>, `${number}-${number}-${number}T${number}:${number}:${number}.${number}Z` | undefined, Date | undefined>;
|
|
27
|
+
scheduledFor_lte: zod.ZodEffects<zod.ZodOptional<zod.ZodDate>, `${number}-${number}-${number}T${number}:${number}:${number}.${number}Z` | undefined, Date | undefined>;
|
|
25
28
|
}, "strip", zod.ZodTypeAny, {
|
|
26
29
|
type?: ScheduleType | undefined;
|
|
27
30
|
targetId?: string | undefined;
|
|
28
|
-
|
|
29
|
-
scheduledBy?: string | undefined;
|
|
30
|
-
scheduledOn?: `${number}-${number}-${number}T${number}:${number}:${number}.${number}Z` | undefined;
|
|
31
|
-
scheduledOn_gte?: `${number}-${number}-${number}T${number}:${number}:${number}.${number}Z` | undefined;
|
|
32
|
-
scheduledOn_lte?: `${number}-${number}-${number}T${number}:${number}:${number}.${number}Z` | undefined;
|
|
31
|
+
namespace?: string | undefined;
|
|
33
32
|
title_contains?: string | undefined;
|
|
34
33
|
title_not_contains?: string | undefined;
|
|
34
|
+
scheduledBy?: string | undefined;
|
|
35
|
+
scheduledFor?: `${number}-${number}-${number}T${number}:${number}:${number}.${number}Z` | undefined;
|
|
36
|
+
scheduledFor_gte?: `${number}-${number}-${number}T${number}:${number}:${number}.${number}Z` | undefined;
|
|
37
|
+
scheduledFor_lte?: `${number}-${number}-${number}T${number}:${number}:${number}.${number}Z` | undefined;
|
|
35
38
|
}, {
|
|
36
39
|
type?: ScheduleType | undefined;
|
|
37
40
|
targetId?: string | undefined;
|
|
38
|
-
|
|
39
|
-
scheduledBy?: string | undefined;
|
|
40
|
-
scheduledOn?: Date | undefined;
|
|
41
|
-
scheduledOn_gte?: Date | undefined;
|
|
42
|
-
scheduledOn_lte?: Date | undefined;
|
|
41
|
+
namespace?: string | undefined;
|
|
43
42
|
title_contains?: string | undefined;
|
|
44
43
|
title_not_contains?: string | undefined;
|
|
44
|
+
scheduledBy?: string | undefined;
|
|
45
|
+
scheduledFor?: Date | undefined;
|
|
46
|
+
scheduledFor_gte?: Date | undefined;
|
|
47
|
+
scheduledFor_lte?: Date | undefined;
|
|
45
48
|
}>>;
|
|
46
|
-
sort: zod.ZodOptional<zod.ZodArray<zod.ZodEffects<zod.ZodString, `${string}_ASC` | `${string}_DESC`, string>, "many">>;
|
|
49
|
+
sort: zod.ZodOptional<zod.ZodArray<zod.ZodEffects<zod.ZodEffects<zod.ZodString, `${string}_ASC` | `${string}_DESC`, string>, `${string}_ASC` | `${string}_DESC`, string>, "many">>;
|
|
47
50
|
limit: zod.ZodOptional<zod.ZodNumber>;
|
|
48
51
|
after: zod.ZodOptional<zod.ZodString>;
|
|
49
52
|
}, "strip", zod.ZodTypeAny, {
|
|
50
53
|
modelId: string;
|
|
51
54
|
sort?: (`${string}_ASC` | `${string}_DESC`)[] | undefined;
|
|
52
|
-
limit?: number | undefined;
|
|
53
|
-
after?: string | undefined;
|
|
54
55
|
where?: {
|
|
55
56
|
type?: ScheduleType | undefined;
|
|
56
57
|
targetId?: string | undefined;
|
|
57
|
-
|
|
58
|
-
scheduledBy?: string | undefined;
|
|
59
|
-
scheduledOn?: `${number}-${number}-${number}T${number}:${number}:${number}.${number}Z` | undefined;
|
|
60
|
-
scheduledOn_gte?: `${number}-${number}-${number}T${number}:${number}:${number}.${number}Z` | undefined;
|
|
61
|
-
scheduledOn_lte?: `${number}-${number}-${number}T${number}:${number}:${number}.${number}Z` | undefined;
|
|
58
|
+
namespace?: string | undefined;
|
|
62
59
|
title_contains?: string | undefined;
|
|
63
60
|
title_not_contains?: string | undefined;
|
|
61
|
+
scheduledBy?: string | undefined;
|
|
62
|
+
scheduledFor?: `${number}-${number}-${number}T${number}:${number}:${number}.${number}Z` | undefined;
|
|
63
|
+
scheduledFor_gte?: `${number}-${number}-${number}T${number}:${number}:${number}.${number}Z` | undefined;
|
|
64
|
+
scheduledFor_lte?: `${number}-${number}-${number}T${number}:${number}:${number}.${number}Z` | undefined;
|
|
64
65
|
} | undefined;
|
|
66
|
+
limit?: number | undefined;
|
|
67
|
+
after?: string | undefined;
|
|
65
68
|
}, {
|
|
66
69
|
modelId: string;
|
|
67
70
|
sort?: string[] | undefined;
|
|
68
|
-
limit?: number | undefined;
|
|
69
|
-
after?: string | undefined;
|
|
70
71
|
where?: {
|
|
71
72
|
type?: ScheduleType | undefined;
|
|
72
73
|
targetId?: string | undefined;
|
|
73
|
-
|
|
74
|
-
scheduledBy?: string | undefined;
|
|
75
|
-
scheduledOn?: Date | undefined;
|
|
76
|
-
scheduledOn_gte?: Date | undefined;
|
|
77
|
-
scheduledOn_lte?: Date | undefined;
|
|
74
|
+
namespace?: string | undefined;
|
|
78
75
|
title_contains?: string | undefined;
|
|
79
76
|
title_not_contains?: string | undefined;
|
|
77
|
+
scheduledBy?: string | undefined;
|
|
78
|
+
scheduledFor?: Date | undefined;
|
|
79
|
+
scheduledFor_gte?: Date | undefined;
|
|
80
|
+
scheduledFor_lte?: Date | undefined;
|
|
80
81
|
} | undefined;
|
|
82
|
+
limit?: number | undefined;
|
|
83
|
+
after?: string | undefined;
|
|
81
84
|
}>;
|
|
82
|
-
export declare const createScheduleSchema: zod.ZodObject<{
|
|
85
|
+
export declare const createScheduleSchema: zod.ZodIntersection<zod.ZodDiscriminatedUnion<"immediately", [zod.ZodObject<{
|
|
86
|
+
immediately: zod.ZodLiteral<true>;
|
|
87
|
+
scheduleFor: zod.ZodOptional<zod.ZodNever>;
|
|
88
|
+
type: zod.ZodNativeEnum<typeof ScheduleType>;
|
|
89
|
+
}, "strip", zod.ZodTypeAny, {
|
|
90
|
+
type: ScheduleType;
|
|
91
|
+
immediately: true;
|
|
92
|
+
scheduleFor?: undefined;
|
|
93
|
+
}, {
|
|
94
|
+
type: ScheduleType;
|
|
95
|
+
immediately: true;
|
|
96
|
+
scheduleFor?: undefined;
|
|
97
|
+
}>, zod.ZodObject<{
|
|
98
|
+
immediately: zod.ZodOptional<zod.ZodLiteral<false>>;
|
|
99
|
+
scheduleFor: zod.ZodUnion<[zod.ZodDate, zod.ZodEffects<zod.ZodString, Date, string>]>;
|
|
100
|
+
type: zod.ZodNativeEnum<typeof ScheduleType>;
|
|
101
|
+
}, "strip", zod.ZodTypeAny, {
|
|
102
|
+
type: ScheduleType;
|
|
103
|
+
scheduleFor: Date;
|
|
104
|
+
immediately?: false | undefined;
|
|
105
|
+
}, {
|
|
106
|
+
type: ScheduleType;
|
|
107
|
+
scheduleFor: string | Date;
|
|
108
|
+
immediately?: false | undefined;
|
|
109
|
+
}>]>, zod.ZodObject<{
|
|
83
110
|
modelId: zod.ZodString;
|
|
84
111
|
id: zod.ZodString;
|
|
85
|
-
input: zod.ZodDiscriminatedUnion<"immediately", [zod.ZodObject<{
|
|
86
|
-
immediately: zod.ZodLiteral<true>;
|
|
87
|
-
scheduleOn: zod.ZodOptional<zod.ZodNever>;
|
|
88
|
-
dateOn: zod.ZodOptional<zod.ZodDate>;
|
|
89
|
-
type: zod.ZodNativeEnum<typeof ScheduleType>;
|
|
90
|
-
}, "strip", zod.ZodTypeAny, {
|
|
91
|
-
type: ScheduleType;
|
|
92
|
-
immediately: true;
|
|
93
|
-
scheduleOn?: undefined;
|
|
94
|
-
dateOn?: Date | undefined;
|
|
95
|
-
}, {
|
|
96
|
-
type: ScheduleType;
|
|
97
|
-
immediately: true;
|
|
98
|
-
scheduleOn?: undefined;
|
|
99
|
-
dateOn?: Date | undefined;
|
|
100
|
-
}>, zod.ZodObject<{
|
|
101
|
-
immediately: zod.ZodOptional<zod.ZodLiteral<false>>;
|
|
102
|
-
scheduleOn: zod.ZodUnion<[zod.ZodDate, zod.ZodEffects<zod.ZodString, Date, string>]>;
|
|
103
|
-
dateOn: zod.ZodEffects<zod.ZodOptional<zod.ZodDate>, Date | undefined, Date | undefined>;
|
|
104
|
-
type: zod.ZodNativeEnum<typeof ScheduleType>;
|
|
105
|
-
}, "strip", zod.ZodTypeAny, {
|
|
106
|
-
type: ScheduleType;
|
|
107
|
-
scheduleOn: Date;
|
|
108
|
-
immediately?: false | undefined;
|
|
109
|
-
dateOn?: Date | undefined;
|
|
110
|
-
}, {
|
|
111
|
-
type: ScheduleType;
|
|
112
|
-
scheduleOn: string | Date;
|
|
113
|
-
immediately?: false | undefined;
|
|
114
|
-
dateOn?: Date | undefined;
|
|
115
|
-
}>]>;
|
|
116
112
|
}, "strip", zod.ZodTypeAny, {
|
|
117
|
-
id: string;
|
|
118
|
-
input: {
|
|
119
|
-
type: ScheduleType;
|
|
120
|
-
immediately: true;
|
|
121
|
-
scheduleOn?: undefined;
|
|
122
|
-
dateOn?: Date | undefined;
|
|
123
|
-
} | {
|
|
124
|
-
type: ScheduleType;
|
|
125
|
-
scheduleOn: Date;
|
|
126
|
-
immediately?: false | undefined;
|
|
127
|
-
dateOn?: Date | undefined;
|
|
128
|
-
};
|
|
129
113
|
modelId: string;
|
|
130
|
-
}, {
|
|
131
114
|
id: string;
|
|
132
|
-
|
|
133
|
-
type: ScheduleType;
|
|
134
|
-
immediately: true;
|
|
135
|
-
scheduleOn?: undefined;
|
|
136
|
-
dateOn?: Date | undefined;
|
|
137
|
-
} | {
|
|
138
|
-
type: ScheduleType;
|
|
139
|
-
scheduleOn: string | Date;
|
|
140
|
-
immediately?: false | undefined;
|
|
141
|
-
dateOn?: Date | undefined;
|
|
142
|
-
};
|
|
115
|
+
}, {
|
|
143
116
|
modelId: string;
|
|
144
|
-
|
|
145
|
-
|
|
117
|
+
id: string;
|
|
118
|
+
}>>;
|
|
119
|
+
export declare const updateScheduleSchema: zod.ZodIntersection<zod.ZodDiscriminatedUnion<"immediately", [zod.ZodObject<{
|
|
120
|
+
immediately: zod.ZodLiteral<true>;
|
|
121
|
+
scheduleFor: zod.ZodOptional<zod.ZodNever>;
|
|
122
|
+
type: zod.ZodNativeEnum<typeof ScheduleType>;
|
|
123
|
+
}, "strip", zod.ZodTypeAny, {
|
|
124
|
+
type: ScheduleType;
|
|
125
|
+
immediately: true;
|
|
126
|
+
scheduleFor?: undefined;
|
|
127
|
+
}, {
|
|
128
|
+
type: ScheduleType;
|
|
129
|
+
immediately: true;
|
|
130
|
+
scheduleFor?: undefined;
|
|
131
|
+
}>, zod.ZodObject<{
|
|
132
|
+
immediately: zod.ZodOptional<zod.ZodLiteral<false>>;
|
|
133
|
+
scheduleFor: zod.ZodUnion<[zod.ZodDate, zod.ZodEffects<zod.ZodString, Date, string>]>;
|
|
134
|
+
type: zod.ZodNativeEnum<typeof ScheduleType>;
|
|
135
|
+
}, "strip", zod.ZodTypeAny, {
|
|
136
|
+
type: ScheduleType;
|
|
137
|
+
scheduleFor: Date;
|
|
138
|
+
immediately?: false | undefined;
|
|
139
|
+
}, {
|
|
140
|
+
type: ScheduleType;
|
|
141
|
+
scheduleFor: string | Date;
|
|
142
|
+
immediately?: false | undefined;
|
|
143
|
+
}>]>, zod.ZodObject<{
|
|
146
144
|
modelId: zod.ZodString;
|
|
147
145
|
id: zod.ZodString;
|
|
148
|
-
input: zod.ZodDiscriminatedUnion<"immediately", [zod.ZodObject<{
|
|
149
|
-
immediately: zod.ZodLiteral<true>;
|
|
150
|
-
scheduleOn: zod.ZodOptional<zod.ZodNever>;
|
|
151
|
-
dateOn: zod.ZodOptional<zod.ZodDate>;
|
|
152
|
-
type: zod.ZodNativeEnum<typeof ScheduleType>;
|
|
153
|
-
}, "strip", zod.ZodTypeAny, {
|
|
154
|
-
type: ScheduleType;
|
|
155
|
-
immediately: true;
|
|
156
|
-
scheduleOn?: undefined;
|
|
157
|
-
dateOn?: Date | undefined;
|
|
158
|
-
}, {
|
|
159
|
-
type: ScheduleType;
|
|
160
|
-
immediately: true;
|
|
161
|
-
scheduleOn?: undefined;
|
|
162
|
-
dateOn?: Date | undefined;
|
|
163
|
-
}>, zod.ZodObject<{
|
|
164
|
-
immediately: zod.ZodOptional<zod.ZodLiteral<false>>;
|
|
165
|
-
scheduleOn: zod.ZodUnion<[zod.ZodDate, zod.ZodEffects<zod.ZodString, Date, string>]>;
|
|
166
|
-
dateOn: zod.ZodEffects<zod.ZodOptional<zod.ZodDate>, Date | undefined, Date | undefined>;
|
|
167
|
-
type: zod.ZodNativeEnum<typeof ScheduleType>;
|
|
168
|
-
}, "strip", zod.ZodTypeAny, {
|
|
169
|
-
type: ScheduleType;
|
|
170
|
-
scheduleOn: Date;
|
|
171
|
-
immediately?: false | undefined;
|
|
172
|
-
dateOn?: Date | undefined;
|
|
173
|
-
}, {
|
|
174
|
-
type: ScheduleType;
|
|
175
|
-
scheduleOn: string | Date;
|
|
176
|
-
immediately?: false | undefined;
|
|
177
|
-
dateOn?: Date | undefined;
|
|
178
|
-
}>]>;
|
|
179
146
|
}, "strip", zod.ZodTypeAny, {
|
|
180
|
-
id: string;
|
|
181
|
-
input: {
|
|
182
|
-
type: ScheduleType;
|
|
183
|
-
immediately: true;
|
|
184
|
-
scheduleOn?: undefined;
|
|
185
|
-
dateOn?: Date | undefined;
|
|
186
|
-
} | {
|
|
187
|
-
type: ScheduleType;
|
|
188
|
-
scheduleOn: Date;
|
|
189
|
-
immediately?: false | undefined;
|
|
190
|
-
dateOn?: Date | undefined;
|
|
191
|
-
};
|
|
192
147
|
modelId: string;
|
|
193
|
-
}, {
|
|
194
148
|
id: string;
|
|
195
|
-
|
|
196
|
-
type: ScheduleType;
|
|
197
|
-
immediately: true;
|
|
198
|
-
scheduleOn?: undefined;
|
|
199
|
-
dateOn?: Date | undefined;
|
|
200
|
-
} | {
|
|
201
|
-
type: ScheduleType;
|
|
202
|
-
scheduleOn: string | Date;
|
|
203
|
-
immediately?: false | undefined;
|
|
204
|
-
dateOn?: Date | undefined;
|
|
205
|
-
};
|
|
149
|
+
}, {
|
|
206
150
|
modelId: string;
|
|
207
|
-
|
|
151
|
+
id: string;
|
|
152
|
+
}>>;
|
|
208
153
|
export declare const cancelScheduleSchema: zod.ZodObject<{
|
|
209
154
|
modelId: zod.ZodString;
|
|
210
155
|
id: zod.ZodString;
|
|
211
156
|
}, "strip", zod.ZodTypeAny, {
|
|
212
|
-
id: string;
|
|
213
157
|
modelId: string;
|
|
214
|
-
}, {
|
|
215
158
|
id: string;
|
|
159
|
+
}, {
|
|
216
160
|
modelId: string;
|
|
161
|
+
id: string;
|
|
217
162
|
}>;
|
package/graphql/schema.js
CHANGED
|
@@ -1,47 +1,44 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
});
|
|
7
|
-
exports.updateScheduleSchema = exports.listScheduleSchema = exports.getScheduleSchema = exports.createScheduleSchema = exports.cancelScheduleSchema = void 0;
|
|
8
|
-
var _zod = _interopRequireDefault(require("zod"));
|
|
9
|
-
var _types = require("../scheduler/types.js");
|
|
10
|
-
var _dates = require("../scheduler/dates.js");
|
|
11
|
-
const getScheduleSchema = exports.getScheduleSchema = _zod.default.object({
|
|
12
|
-
modelId: _zod.default.string(),
|
|
13
|
-
id: _zod.default.string()
|
|
1
|
+
import zod from "zod";
|
|
2
|
+
import { dateToISOString } from "./dates.js";
|
|
3
|
+
export const getScheduleSchema = zod.object({
|
|
4
|
+
modelId: zod.string(),
|
|
5
|
+
id: zod.string()
|
|
14
6
|
});
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
7
|
+
export let ScheduleType = /*#__PURE__*/function (ScheduleType) {
|
|
8
|
+
ScheduleType["publish"] = "publish";
|
|
9
|
+
ScheduleType["unpublish"] = "unpublish";
|
|
10
|
+
return ScheduleType;
|
|
11
|
+
}({});
|
|
12
|
+
const publishAndUnpublishSchemaType = zod.nativeEnum(ScheduleType);
|
|
13
|
+
export const listScheduleSchema = zod.object({
|
|
14
|
+
modelId: zod.string(),
|
|
15
|
+
where: zod.object({
|
|
16
|
+
targetId: zod.string().optional(),
|
|
17
|
+
namespace: zod.string().optional(),
|
|
18
|
+
title_contains: zod.string().optional(),
|
|
19
|
+
title_not_contains: zod.string().optional(),
|
|
23
20
|
type: publishAndUnpublishSchemaType.optional(),
|
|
24
|
-
scheduledBy:
|
|
25
|
-
|
|
21
|
+
scheduledBy: zod.string().optional(),
|
|
22
|
+
scheduledFor: zod.date().optional().transform(value => {
|
|
26
23
|
if (!value) {
|
|
27
24
|
return undefined;
|
|
28
25
|
}
|
|
29
|
-
return
|
|
26
|
+
return dateToISOString(value);
|
|
30
27
|
}),
|
|
31
|
-
|
|
28
|
+
scheduledFor_gte: zod.date().optional().transform(value => {
|
|
32
29
|
if (!value) {
|
|
33
30
|
return undefined;
|
|
34
31
|
}
|
|
35
|
-
return
|
|
32
|
+
return dateToISOString(value);
|
|
36
33
|
}),
|
|
37
|
-
|
|
34
|
+
scheduledFor_lte: zod.date().optional().transform(value => {
|
|
38
35
|
if (!value) {
|
|
39
36
|
return undefined;
|
|
40
37
|
}
|
|
41
|
-
return
|
|
38
|
+
return dateToISOString(value);
|
|
42
39
|
})
|
|
43
40
|
}).optional(),
|
|
44
|
-
sort:
|
|
41
|
+
sort: zod.array(zod.string().refine(value => {
|
|
45
42
|
const [field, direction] = value.split("_");
|
|
46
43
|
if (!field) {
|
|
47
44
|
return false;
|
|
@@ -49,39 +46,38 @@ const listScheduleSchema = exports.listScheduleSchema = _zod.default.object({
|
|
|
49
46
|
return false;
|
|
50
47
|
}
|
|
51
48
|
return true;
|
|
49
|
+
}).transform(value => {
|
|
50
|
+
if (!value) {
|
|
51
|
+
return value;
|
|
52
|
+
}
|
|
53
|
+
return `values_${value}`;
|
|
52
54
|
})).optional(),
|
|
53
|
-
limit:
|
|
54
|
-
after:
|
|
55
|
+
limit: zod.number().optional(),
|
|
56
|
+
after: zod.string().optional()
|
|
55
57
|
});
|
|
56
|
-
const
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
const schedulerInputSchema = _zod.default.discriminatedUnion("immediately", [_zod.default.object({
|
|
60
|
-
immediately: _zod.default.literal(true),
|
|
61
|
-
scheduleOn: _zod.default.never().optional(),
|
|
62
|
-
dateOn: _zod.default.date().optional(),
|
|
58
|
+
const schedulerInputSchema = zod.discriminatedUnion("immediately", [zod.object({
|
|
59
|
+
immediately: zod.literal(true),
|
|
60
|
+
scheduleFor: zod.never().optional(),
|
|
63
61
|
type: publishAndUnpublishSchemaType
|
|
64
|
-
}),
|
|
65
|
-
immediately:
|
|
66
|
-
|
|
62
|
+
}), zod.object({
|
|
63
|
+
immediately: zod.literal(false).optional(),
|
|
64
|
+
scheduleFor: zod.date().or(zod.string().transform(value => {
|
|
67
65
|
return new Date(value);
|
|
68
66
|
})),
|
|
69
|
-
dateOn: dateOnSchema,
|
|
70
67
|
type: publishAndUnpublishSchemaType
|
|
71
68
|
})]);
|
|
72
|
-
const createScheduleSchema =
|
|
73
|
-
modelId:
|
|
74
|
-
id:
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
id: _zod.default.string()
|
|
69
|
+
export const createScheduleSchema = schedulerInputSchema.and(zod.object({
|
|
70
|
+
modelId: zod.string(),
|
|
71
|
+
id: zod.string()
|
|
72
|
+
}));
|
|
73
|
+
export const updateScheduleSchema = schedulerInputSchema.and(zod.object({
|
|
74
|
+
modelId: zod.string(),
|
|
75
|
+
id: zod.string()
|
|
76
|
+
}));
|
|
77
|
+
export const cancelScheduleSchema = zod.object({
|
|
78
|
+
modelId: zod.string(),
|
|
79
|
+
// TODO: remove this; not needed as schedule ID already has model encoded
|
|
80
|
+
id: zod.string()
|
|
85
81
|
});
|
|
86
82
|
|
|
87
83
|
//# sourceMappingURL=schema.js.map
|
package/graphql/schema.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["
|
|
1
|
+
{"version":3,"names":["zod","dateToISOString","getScheduleSchema","object","modelId","string","id","ScheduleType","publishAndUnpublishSchemaType","nativeEnum","listScheduleSchema","where","targetId","optional","namespace","title_contains","title_not_contains","type","scheduledBy","scheduledFor","date","transform","value","undefined","scheduledFor_gte","scheduledFor_lte","sort","array","refine","field","direction","split","limit","number","after","schedulerInputSchema","discriminatedUnion","immediately","literal","scheduleFor","never","or","Date","createScheduleSchema","and","updateScheduleSchema","cancelScheduleSchema"],"sources":["schema.ts"],"sourcesContent":["import zod from \"zod\";\nimport type {\n CmsEntryListSortAsc,\n CmsEntryListSortDesc\n} from \"@webiny/api-headless-cms/types/index.js\";\nimport { dateToISOString } from \"./dates.js\";\n\nexport const getScheduleSchema = zod.object({\n modelId: zod.string(),\n id: zod.string()\n});\n\nexport enum ScheduleType {\n publish = \"publish\",\n unpublish = \"unpublish\"\n}\n\nconst publishAndUnpublishSchemaType = zod.nativeEnum(ScheduleType);\n\nexport const listScheduleSchema = zod.object({\n modelId: zod.string(),\n where: zod\n .object({\n targetId: zod.string().optional(),\n namespace: zod.string().optional(),\n title_contains: zod.string().optional(),\n title_not_contains: zod.string().optional(),\n type: publishAndUnpublishSchemaType.optional(),\n scheduledBy: zod.string().optional(),\n scheduledFor: zod\n .date()\n .optional()\n .transform(value => {\n if (!value) {\n return undefined;\n }\n return dateToISOString(value);\n }),\n scheduledFor_gte: zod\n .date()\n .optional()\n .transform(value => {\n if (!value) {\n return undefined;\n }\n return dateToISOString(value);\n }),\n scheduledFor_lte: zod\n .date()\n .optional()\n .transform(value => {\n if (!value) {\n return undefined;\n }\n return dateToISOString(value);\n })\n })\n .optional(),\n sort: zod\n .array(\n zod\n .string()\n .refine((value): value is CmsEntryListSortAsc | CmsEntryListSortDesc => {\n const [field, direction] = value.split(\"_\");\n if (!field) {\n return false;\n } else if (direction !== \"ASC\" && direction !== \"DESC\") {\n return false;\n }\n return true;\n })\n .transform(value => {\n if (!value) {\n return value;\n }\n return `values_${value}` as typeof value;\n })\n )\n .optional(),\n limit: zod.number().optional(),\n after: zod.string().optional()\n});\n\nconst schedulerInputSchema = zod.discriminatedUnion(\"immediately\", [\n zod.object({\n immediately: zod.literal(true),\n scheduleFor: zod.never().optional(),\n type: publishAndUnpublishSchemaType\n }),\n zod.object({\n immediately: zod.literal(false).optional(),\n scheduleFor: zod.date().or(\n zod.string().transform(value => {\n return new Date(value);\n })\n ),\n type: publishAndUnpublishSchemaType\n })\n]);\n\nexport const createScheduleSchema = schedulerInputSchema.and(\n zod.object({\n modelId: zod.string(),\n id: zod.string()\n })\n);\n\nexport const updateScheduleSchema = schedulerInputSchema.and(\n zod.object({\n modelId: zod.string(),\n id: zod.string()\n })\n);\n\nexport const cancelScheduleSchema = zod.object({\n modelId: zod.string(), // TODO: remove this; not needed as schedule ID already has model encoded\n id: zod.string()\n});\n"],"mappings":"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","ignoreList":[]}
|
package/index.d.ts
CHANGED
|
@@ -1,10 +1,6 @@
|
|
|
1
|
-
import type {
|
|
2
|
-
import type { ICreateHeadlessCmsSchedulerContextParams } from "./context.js";
|
|
3
|
-
export interface ICreateHeadlessCmsScheduleParams extends ICreateHeadlessCmsSchedulerContextParams {
|
|
4
|
-
}
|
|
1
|
+
import type { PluginCollection } from "@webiny/plugins/types.js";
|
|
5
2
|
/**
|
|
6
3
|
* This will register both API and Handler plugins for the Headless CMS Scheduler.
|
|
7
|
-
*
|
|
8
|
-
* * API plugin will provide the GraphQL API and code for managing the scheduled CMS actions.
|
|
4
|
+
* API plugin will provide the GraphQL API and code for managing the scheduled CMS actions.
|
|
9
5
|
*/
|
|
10
|
-
export declare const createHeadlessCmsScheduler: (
|
|
6
|
+
export declare const createHeadlessCmsScheduler: () => PluginCollection;
|
package/index.js
CHANGED
|
@@ -1,29 +1,12 @@
|
|
|
1
|
-
|
|
1
|
+
import { createHeadlessCmsScheduleContext } from "./context.js";
|
|
2
|
+
import { createSchedulerGraphQL } from "./graphql/index.js";
|
|
2
3
|
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports.createHeadlessCmsScheduler = void 0;
|
|
7
|
-
var _context = require("./context.js");
|
|
8
|
-
var _model = require("./scheduler/model.js");
|
|
9
|
-
var _index = require("./graphql/index.js");
|
|
10
|
-
var _index2 = require("./handler/index.js");
|
|
11
4
|
/**
|
|
12
5
|
* This will register both API and Handler plugins for the Headless CMS Scheduler.
|
|
13
|
-
*
|
|
14
|
-
* * API plugin will provide the GraphQL API and code for managing the scheduled CMS actions.
|
|
6
|
+
* API plugin will provide the GraphQL API and code for managing the scheduled CMS actions.
|
|
15
7
|
*/
|
|
16
|
-
const createHeadlessCmsScheduler =
|
|
17
|
-
return [
|
|
18
|
-
/**
|
|
19
|
-
* Handler for the Scheduled CMS Action Event.
|
|
20
|
-
*/
|
|
21
|
-
(0, _index2.createScheduledCmsActionEventHandler)(),
|
|
22
|
-
/**
|
|
23
|
-
* API side of the scheduler.
|
|
24
|
-
*/
|
|
25
|
-
(0, _model.createSchedulerModel)(), (0, _context.createHeadlessCmsScheduleContext)(params), (0, _index.createSchedulerGraphQL)()];
|
|
8
|
+
export const createHeadlessCmsScheduler = () => {
|
|
9
|
+
return [createHeadlessCmsScheduleContext(), createSchedulerGraphQL()];
|
|
26
10
|
};
|
|
27
|
-
exports.createHeadlessCmsScheduler = createHeadlessCmsScheduler;
|
|
28
11
|
|
|
29
12
|
//# sourceMappingURL=index.js.map
|
package/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["
|
|
1
|
+
{"version":3,"names":["createHeadlessCmsScheduleContext","createSchedulerGraphQL","createHeadlessCmsScheduler"],"sources":["index.ts"],"sourcesContent":["import type { PluginCollection } from \"@webiny/plugins/types.js\";\nimport { createHeadlessCmsScheduleContext } from \"~/context.js\";\nimport { createSchedulerGraphQL } from \"~/graphql/index.js\";\n\n/**\n * This will register both API and Handler plugins for the Headless CMS Scheduler.\n * API plugin will provide the GraphQL API and code for managing the scheduled CMS actions.\n */\nexport const createHeadlessCmsScheduler = (): PluginCollection => {\n return [createHeadlessCmsScheduleContext(), createSchedulerGraphQL()];\n};\n"],"mappings":"AACA,SAASA,gCAAgC;AACzC,SAASC,sBAAsB;;AAE/B;AACA;AACA;AACA;AACA,OAAO,MAAMC,0BAA0B,GAAGA,CAAA,KAAwB;EAC9D,OAAO,CAACF,gCAAgC,CAAC,CAAC,EAAEC,sBAAsB,CAAC,CAAC,CAAC;AACzE,CAAC","ignoreList":[]}
|
package/package.json
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@webiny/api-headless-cms-scheduler",
|
|
3
|
-
"version": "6.0.0-
|
|
3
|
+
"version": "6.0.0-rc.0",
|
|
4
|
+
"type": "module",
|
|
4
5
|
"main": "index.js",
|
|
5
6
|
"description": "Schedule for Webiny Headless CMS",
|
|
6
7
|
"keywords": [
|
|
@@ -13,33 +14,30 @@
|
|
|
13
14
|
},
|
|
14
15
|
"license": "MIT",
|
|
15
16
|
"dependencies": {
|
|
16
|
-
"@webiny/api": "6.0.0-
|
|
17
|
-
"@webiny/api-headless-cms": "6.0.0-
|
|
18
|
-
"@webiny/
|
|
19
|
-
"@webiny/
|
|
20
|
-
"@webiny/handler-graphql": "6.0.0-
|
|
21
|
-
"@webiny/utils": "6.0.0-
|
|
22
|
-
"zod": "3.
|
|
17
|
+
"@webiny/api": "6.0.0-rc.0",
|
|
18
|
+
"@webiny/api-headless-cms": "6.0.0-rc.0",
|
|
19
|
+
"@webiny/api-scheduler": "6.0.0-rc.0",
|
|
20
|
+
"@webiny/feature": "6.0.0-rc.0",
|
|
21
|
+
"@webiny/handler-graphql": "6.0.0-rc.0",
|
|
22
|
+
"@webiny/utils": "6.0.0-rc.0",
|
|
23
|
+
"zod": "3.25.76"
|
|
23
24
|
},
|
|
24
25
|
"devDependencies": {
|
|
25
|
-
"@webiny/api-
|
|
26
|
-
"@webiny/
|
|
27
|
-
"@webiny/
|
|
28
|
-
"@webiny/
|
|
29
|
-
"@webiny/handler": "6.0.0-
|
|
30
|
-
"@webiny/
|
|
31
|
-
"@webiny/
|
|
32
|
-
"@webiny/
|
|
26
|
+
"@webiny/api-core": "6.0.0-rc.0",
|
|
27
|
+
"@webiny/aws-sdk": "6.0.0-rc.0",
|
|
28
|
+
"@webiny/build-tools": "6.0.0-rc.0",
|
|
29
|
+
"@webiny/handler": "6.0.0-rc.0",
|
|
30
|
+
"@webiny/handler-aws": "6.0.0-rc.0",
|
|
31
|
+
"@webiny/plugins": "6.0.0-rc.0",
|
|
32
|
+
"@webiny/project-utils": "6.0.0-rc.0",
|
|
33
|
+
"@webiny/wcp": "6.0.0-rc.0",
|
|
33
34
|
"aws-sdk-client-mock": "4.1.0",
|
|
34
|
-
"typescript": "5.
|
|
35
|
-
|
|
36
|
-
"scripts": {
|
|
37
|
-
"build": "node ../cli/bin.js run build",
|
|
38
|
-
"watch": "node ../cli/bin.js run watch"
|
|
35
|
+
"typescript": "5.9.3",
|
|
36
|
+
"vitest": "4.0.18"
|
|
39
37
|
},
|
|
40
38
|
"publishConfig": {
|
|
41
39
|
"access": "public",
|
|
42
40
|
"directory": "dist"
|
|
43
41
|
},
|
|
44
|
-
"gitHead": "
|
|
42
|
+
"gitHead": "0f2aa699f4642e550ab62c96fcd050e8d02345c9"
|
|
45
43
|
}
|
package/constants.d.ts
DELETED
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
export declare const SCHEDULE_MODEL_ID = "webinyCmsSchedule";
|
|
2
|
-
export declare const SCHEDULE_ID_PREFIX = "wby-schedule-";
|
|
3
|
-
/**
|
|
4
|
-
* Minimum number of seconds in the future that a schedule can be set.
|
|
5
|
-
* Everything else will result in immediately running the action.
|
|
6
|
-
*/
|
|
7
|
-
export declare const SCHEDULE_MIN_FUTURE_SECONDS = 65;
|
|
8
|
-
/**
|
|
9
|
-
*
|
|
10
|
-
*/
|
|
11
|
-
export declare const SCHEDULED_CMS_ACTION_EVENT_IDENTIFIER = "WebinyScheduledCmsAction";
|