@@ -95,6 +95,16 @@ const defaultColumns = Object.freeze({
95
95
"params" : { type : 'Object' } , // params received when calling the job
96
96
"finishedAt" : { type : 'Date' }
97
97
} ,
98
+ _JobSchedule : {
99
+ "jobName" : { type :'String' } ,
100
+ "description" : { type :'String' } ,
101
+ "params" : { type :'Object' } ,
102
+ "startAfter" : { type :'Date' } ,
103
+ "daysOfWeek" : { type :'Array' } ,
104
+ "timeOfDay" : { type :'String' } ,
105
+ "lastRun" : { type :'Number' } ,
106
+ "repeatMinutes" :{ type :'String' }
107
+ } ,
98
108
_Hooks : {
99
109
"functionName" : { type :'String' } ,
100
110
"className" : { type :'String' } ,
@@ -112,9 +122,9 @@ const requiredColumns = Object.freeze({
112
122
_Role : [ "name" , "ACL" ]
113
123
} ) ;
114
124
115
- const systemClasses = Object . freeze ( [ '_User' , '_Installation' , '_Role' , '_Session' , '_Product' , '_PushStatus' , '_JobStatus' ] ) ;
125
+ const systemClasses = Object . freeze ( [ '_User' , '_Installation' , '_Role' , '_Session' , '_Product' , '_PushStatus' , '_JobStatus' , '_JobSchedule' ] ) ;
116
126
117
- const volatileClasses = Object . freeze ( [ '_JobStatus' , '_PushStatus' , '_Hooks' , '_GlobalConfig' ] ) ;
127
+ const volatileClasses = Object . freeze ( [ '_JobStatus' , '_PushStatus' , '_Hooks' , '_GlobalConfig' , '_JobSchedule' ] ) ;
118
128
119
129
// 10 alpha numberic chars + uppercase
120
130
const userIdRegex = / ^ [ a - z A - Z 0 - 9 ] { 10 } $ / ;
@@ -291,7 +301,12 @@ const _JobStatusSchema = convertSchemaToAdapterSchema(injectDefaultSchema({
291
301
fields : { } ,
292
302
classLevelPermissions : { }
293
303
} ) ) ;
294
- const VolatileClassesSchemas = [ _HooksSchema , _JobStatusSchema , _PushStatusSchema , _GlobalConfigSchema ] ;
304
+ const _JobScheduleSchema = convertSchemaToAdapterSchema ( injectDefaultSchema ( {
305
+ className : "_JobSchedule" ,
306
+ fields : { } ,
307
+ classLevelPermissions : { }
308
+ } ) ) ;
309
+ const VolatileClassesSchemas = [ _HooksSchema , _JobStatusSchema , _JobScheduleSchema , _PushStatusSchema , _GlobalConfigSchema ] ;
295
310
296
311
const dbTypeMatchesObjectType = ( dbType , objectType ) => {
297
312
if ( dbType . type !== objectType . type ) return false ;
0 commit comments