@things-factory/scheduler 9.0.0 → 9.0.3

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.
@@ -27,7 +27,7 @@ let ScheduleMutation = class ScheduleMutation {
27
27
  exports.ScheduleMutation = ScheduleMutation;
28
28
  tslib_1.__decorate([
29
29
  (0, type_graphql_1.Directive)('@privilege(superUserGranted: true)'),
30
- (0, type_graphql_1.Mutation)(() => type_graphql_1.ID),
30
+ (0, type_graphql_1.Mutation)(() => type_graphql_1.ID, { description: 'Register a new schedule with the scheduler service.' }),
31
31
  tslib_1.__param(0, (0, type_graphql_1.Arg)('schedule')),
32
32
  tslib_1.__metadata("design:type", Function),
33
33
  tslib_1.__metadata("design:paramtypes", [schedule_type_1.NewSchedule]),
@@ -35,7 +35,7 @@ tslib_1.__decorate([
35
35
  ], ScheduleMutation.prototype, "registerSchedule", null);
36
36
  tslib_1.__decorate([
37
37
  (0, type_graphql_1.Directive)('@privilege(superUserGranted: true)'),
38
- (0, type_graphql_1.Mutation)(() => type_graphql_1.ID),
38
+ (0, type_graphql_1.Mutation)(() => type_graphql_1.ID, { description: 'Update an existing schedule configuration.' }),
39
39
  tslib_1.__param(0, (0, type_graphql_1.Arg)('schedule')),
40
40
  tslib_1.__metadata("design:type", Function),
41
41
  tslib_1.__metadata("design:paramtypes", [schedule_type_1.SchedulePatch]),
@@ -43,7 +43,7 @@ tslib_1.__decorate([
43
43
  ], ScheduleMutation.prototype, "updateSchedule", null);
44
44
  tslib_1.__decorate([
45
45
  (0, type_graphql_1.Directive)('@privilege(superUserGranted: true)'),
46
- (0, type_graphql_1.Mutation)(() => Boolean),
46
+ (0, type_graphql_1.Mutation)(() => Boolean, { description: 'Unregister and remove a schedule from the scheduler service.' }),
47
47
  tslib_1.__param(0, (0, type_graphql_1.Arg)('handle', () => type_graphql_1.ID)),
48
48
  tslib_1.__metadata("design:type", Function),
49
49
  tslib_1.__metadata("design:paramtypes", [String]),
@@ -1 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BAAG,EAAC,QAAQ,EAAE,GAAG,EAAE,CAAC,iBAAE,CAAC,CAAA;;;;0DAShD;2BA1BU,gBAAgB;IAD5B,IAAA,uBAAQ,EAAC,wBAAQ,CAAC;GACN,gBAAgB,CA2B5B","sourcesContent":["import { Resolver, Directive, Mutation, Arg, ID } from 'type-graphql'\n\nimport { registerSchedule, updateSchedule, unregisterSchedule } from '@things-factory/scheduler-client'\nimport { Schedule, NewSchedule, SchedulePatch } from './schedule-type'\n\n@Resolver(Schedule)\nexport class ScheduleMutation {\n @Directive('@privilege(superUserGranted: true)')\n @Mutation(() => ID)\n async registerSchedule(@Arg('schedule') schedule: NewSchedule): Promise<string> {\n var handle = await registerSchedule(schedule)\n\n return handle\n }\n\n @Directive('@privilege(superUserGranted: true)')\n @Mutation(() => ID)\n async updateSchedule(@Arg('schedule') schedule: SchedulePatch): Promise<string> {\n return await updateSchedule(schedule)\n }\n\n @Directive('@privilege(superUserGranted: true)')\n @Mutation(() => Boolean)\n async unregisterSchedule(@Arg('handle', () => ID) handle: string): Promise<boolean> {\n try {\n await unregisterSchedule(handle)\n } catch (error) {\n console.error(error)\n return false\n }\n\n return true\n }\n}\n"]}
1
+ {"version":3,"file":"schedule-mutation.js","sourceRoot":"","sources":["../../../server/service/schedule/schedule-mutation.ts"],"names":[],"mappings":";;;;AAAA,+CAAqE;AAErE,uEAAuG;AACvG,mDAAsE;AAG/D,IAAM,gBAAgB,GAAtB,MAAM,gBAAgB;IAGrB,AAAN,KAAK,CAAC,gBAAgB,CAAkB,QAAqB;QAC3D,IAAI,MAAM,GAAG,MAAM,IAAA,mCAAgB,EAAC,QAAQ,CAAC,CAAA;QAE7C,OAAO,MAAM,CAAA;IACf,CAAC;IAIK,AAAN,KAAK,CAAC,cAAc,CAAkB,QAAuB;QAC3D,OAAO,MAAM,IAAA,iCAAc,EAAC,QAAQ,CAAC,CAAA;IACvC,CAAC;IAIK,AAAN,KAAK,CAAC,kBAAkB,CAA0B,MAAc;QAC9D,IAAI,CAAC;YACH,MAAM,IAAA,qCAAkB,EAAC,MAAM,CAAC,CAAA;QAClC,CAAC;QAAC,OAAO,KAAK,EAAE,CAAC;YACf,OAAO,CAAC,KAAK,CAAC,KAAK,CAAC,CAAA;YACpB,OAAO,KAAK,CAAA;QACd,CAAC;QAED,OAAO,IAAI,CAAA;IACb,CAAC;CACF,CAAA;AA3BY,4CAAgB;AAGrB;IAFL,IAAA,wBAAS,EAAC,oCAAoC,CAAC;IAC/C,IAAA,uBAAQ,EAAC,GAAG,EAAE,CAAC,iBAAE,EAAE,EAAE,WAAW,EAAE,qDAAqD,EAAE,CAAC;IACnE,mBAAA,IAAA,kBAAG,EAAC,UAAU,CAAC,CAAA;;6CAAW,2BAAW;;wDAI5D;AAIK;IAFL,IAAA,wBAAS,EAAC,oCAAoC,CAAC;IAC/C,IAAA,uBAAQ,EAAC,GAAG,EAAE,CAAC,iBAAE,EAAE,EAAE,WAAW,EAAE,4CAA4C,EAAE,CAAC;IAC5D,mBAAA,IAAA,kBAAG,EAAC,UAAU,CAAC,CAAA;;6CAAW,6BAAa;;sDAE5D;AAIK;IAFL,IAAA,wBAAS,EAAC,oCAAoC,CAAC;IAC/C,IAAA,uBAAQ,EAAC,GAAG,EAAE,CAAC,OAAO,EAAE,EAAE,WAAW,EAAE,8DAA8D,EAAE,CAAC;IAC/E,mBAAA,IAAA,kBAAG,EAAC,QAAQ,EAAE,GAAG,EAAE,CAAC,iBAAE,CAAC,CAAA;;;;0DAShD;2BA1BU,gBAAgB;IAD5B,IAAA,uBAAQ,EAAC,wBAAQ,CAAC;GACN,gBAAgB,CA2B5B","sourcesContent":["import { Resolver, Directive, Mutation, Arg, ID } from 'type-graphql'\n\nimport { registerSchedule, updateSchedule, unregisterSchedule } from '@things-factory/scheduler-client'\nimport { Schedule, NewSchedule, SchedulePatch } from './schedule-type'\n\n@Resolver(Schedule)\nexport class ScheduleMutation {\n @Directive('@privilege(superUserGranted: true)')\n @Mutation(() => ID, { description: 'Register a new schedule with the scheduler service.' })\n async registerSchedule(@Arg('schedule') schedule: NewSchedule): Promise<string> {\n var handle = await registerSchedule(schedule)\n\n return handle\n }\n\n @Directive('@privilege(superUserGranted: true)')\n @Mutation(() => ID, { description: 'Update an existing schedule configuration.' })\n async updateSchedule(@Arg('schedule') schedule: SchedulePatch): Promise<string> {\n return await updateSchedule(schedule)\n }\n\n @Directive('@privilege(superUserGranted: true)')\n @Mutation(() => Boolean, { description: 'Unregister and remove a schedule from the scheduler service.' })\n async unregisterSchedule(@Arg('handle', () => ID) handle: string): Promise<boolean> {\n try {\n await unregisterSchedule(handle)\n } catch (error) {\n console.error(error)\n return false\n }\n\n return true\n }\n}\n"]}
@@ -48,7 +48,7 @@ let ScheduleQuery = class ScheduleQuery {
48
48
  exports.ScheduleQuery = ScheduleQuery;
49
49
  tslib_1.__decorate([
50
50
  (0, type_graphql_1.Directive)('@privilege(superUserGranted: true)'),
51
- (0, type_graphql_1.Query)(() => schedule_type_1.Schedule, { nullable: true }),
51
+ (0, type_graphql_1.Query)(() => schedule_type_1.Schedule, { nullable: true, description: 'Retrieve a single schedule by its unique identifier.' }),
52
52
  tslib_1.__param(0, (0, type_graphql_1.Arg)('id', () => type_graphql_1.ID)),
53
53
  tslib_1.__metadata("design:type", Function),
54
54
  tslib_1.__metadata("design:paramtypes", [String]),
@@ -56,7 +56,9 @@ tslib_1.__decorate([
56
56
  ], ScheduleQuery.prototype, "schedule", null);
57
57
  tslib_1.__decorate([
58
58
  (0, type_graphql_1.Directive)('@privilege(superUserGranted: true)'),
59
- (0, type_graphql_1.Query)(returns => schedule_type_1.ScheduleList, { description: 'To fetch multiple Schedules' }),
59
+ (0, type_graphql_1.Query)(returns => schedule_type_1.ScheduleList, {
60
+ description: 'Retrieve a paginated list of schedules with filtering capabilities by name, application, group, type, key, and operation.'
61
+ }),
60
62
  tslib_1.__param(0, (0, type_graphql_1.Args)(type => shell_1.ListParam)),
61
63
  tslib_1.__param(1, (0, type_graphql_1.Ctx)()),
62
64
  tslib_1.__metadata("design:type", Function),
@@ -1 +1 @@
1
- {"version":3,"file":"schedule-query.js","sourceRoot":"","sources":["../../../server/service/schedule/schedule-query.ts"],"names":[],"mappings":";;;;AAAA,+CAA6E;AAC7E,iDAAiD;AAEjD,uEAA4E;AAC5E,mDAAwD;AAGjD,IAAM,aAAa,GAAnB,MAAM,aAAa;IAGlB,AAAN,KAAK,CAAC,QAAQ,CAAsB,EAAU;QAC5C,OAAO,MAAM,IAAA,8BAAW,EAAC,EAAE,CAAC,CAAA;IAC9B,CAAC;IAIK,AAAN,KAAK,CAAC,SAAS,CAA0B,MAAiB,EAAS,OAAwB;QACzF,MAAM,OAAO,GAAG,MAAM,CAAC,OAAO,IAAI,EAAE,CAAA;QAEpC,MAAM,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC,MAAM,CAAC,EAAE,CAAC,MAAM,CAAC,IAAI,IAAI,MAAM,CAAC,EAAE,KAAK,CAAA;QAEjE,MAAM,WAAW,GAAG,OAAO,CAAC,IAAI,CAAC,MAAM,CAAC,EAAE,CAAC,MAAM,CAAC,IAAI,IAAI,aAAa,CAAC,EAAE,KAAK,CAAA;QAC/E,MAAM,KAAK,GAAG,OAAO,CAAC,IAAI,CAAC,MAAM,CAAC,EAAE,CAAC,MAAM,CAAC,IAAI,IAAI,OAAO,CAAC,EAAE,KAAK,CAAA;QACnE,MAAM,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC,MAAM,CAAC,EAAE,CAAC,MAAM,CAAC,IAAI,IAAI,MAAM,CAAC,EAAE,KAAK,CAAA;QACjE,MAAM,GAAG,GAAG,OAAO,CAAC,IAAI,CAAC,MAAM,CAAC,EAAE,CAAC,MAAM,CAAC,IAAI,IAAI,KAAK,CAAC,EAAE,KAAK,CAAA;QAC/D,MAAM,SAAS,GAAG,OAAO,CAAC,IAAI,CAAC,MAAM,CAAC,EAAE,CAAC,MAAM,CAAC,IAAI,IAAI,WAAW,CAAC,EAAE,KAAK,CAAA;QAE3E,IAA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CzD;wBAvDU,aAAa;IADzB,IAAA,uBAAQ,EAAC,wBAAQ,CAAC;GACN,aAAa,CAwDzB","sourcesContent":["import { Resolver, Query, Args, Arg, Ctx, Directive, ID } from 'type-graphql'\nimport { ListParam } from '@things-factory/shell'\nimport { User } from '@things-factory/auth-base'\nimport { getSchedules, getSchedule } from '@things-factory/scheduler-client'\nimport { Schedule, ScheduleList } from './schedule-type'\n\n@Resolver(Schedule)\nexport class ScheduleQuery {\n @Directive('@privilege(superUserGranted: true)')\n @Query(() => Schedule, { nullable: true })\n async schedule(@Arg('id', () => ID) id: string): Promise<Schedule | null> {\n return await getSchedule(id)\n }\n\n @Directive('@privilege(superUserGranted: true)')\n @Query(returns => ScheduleList, { description: 'To fetch multiple Schedules' })\n async schedules(@Args(type => ListParam) params: ListParam, @Ctx() context: ResolverContext): Promise<ScheduleList> {\n const filters = params.filters || []\n\n const name = filters.find(filter => filter.name == 'name')?.value\n\n const application = filters.find(filter => filter.name == 'application')?.value\n const group = filters.find(filter => filter.name == 'group')?.value\n const type = filters.find(filter => filter.name == 'type')?.value\n const key = filters.find(filter => filter.name == 'key')?.value\n const operation = filters.find(filter => filter.name == 'operation')?.value\n\n var schedules = await getSchedules({})\n\n if (name) {\n schedules = schedules.filter(schedule => (schedule.name || '').toLowerCase().includes(name.toLowerCase()))\n }\n if (application) {\n schedules = schedules.filter(schedule =>\n (schedule.client?.application || '').toLowerCase().includes(application.toLowerCase())\n )\n }\n if (group) {\n schedules = schedules.filter(schedule =>\n (schedule.client?.group || '').toLowerCase().includes(group.toLowerCase())\n )\n }\n if (type) {\n schedules = schedules.filter(schedule => (schedule.client?.type || '').toLowerCase().includes(type.toLowerCase()))\n }\n if (key) {\n schedules = schedules.filter(schedule => (schedule.client?.key || '').toLowerCase().includes(key.toLowerCase()))\n }\n if (operation) {\n schedules = schedules.filter(schedule =>\n (schedule.client?.operation || '').toLowerCase().includes(operation.toLowerCase())\n )\n }\n\n const { page = 1, limit = 20 } = params.pagination || {}\n\n const start = (page - 1) * limit\n const end = start + limit\n const items = schedules.slice(start, end)\n const total = schedules.length\n\n return { items, total }\n }\n}\n"]}
1
+ {"version":3,"file":"schedule-query.js","sourceRoot":"","sources":["../../../server/service/schedule/schedule-query.ts"],"names":[],"mappings":";;;;AAAA,+CAA6E;AAC7E,iDAAiD;AAEjD,uEAA4E;AAC5E,mDAAwD;AAGjD,IAAM,aAAa,GAAnB,MAAM,aAAa;IAGlB,AAAN,KAAK,CAAC,QAAQ,CAAsB,EAAU;QAC5C,OAAO,MAAM,IAAA,8BAAW,EAAC,EAAE,CAAC,CAAA;IAC9B,CAAC;IAOK,AAAN,KAAK,CAAC,SAAS,CAA0B,MAAiB,EAAS,OAAwB;QACzF,MAAM,OAAO,GAAG,MAAM,CAAC,OAAO,IAAI,EAAE,CAAA;QAEpC,MAAM,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC,MAAM,CAAC,EAAE,CAAC,MAAM,CAAC,IAAI,IAAI,MAAM,CAAC,EAAE,KAAK,CAAA;QAEjE,MAAM,WAAW,GAAG,OAAO,CAAC,IAAI,CAAC,MAAM,CAAC,EAAE,CAAC,MAAM,CAAC,IAAI,IAAI,aAAa,CAAC,EAAE,KAAK,CAAA;QAC/E,MAAM,KAAK,GAAG,OAAO,CAAC,IAAI,CAAC,MAAM,CAAC,EAAE,CAAC,MAAM,CAAC,IAAI,IAAI,OAAO,CAAC,EAAE,KAAK,CAAA;QACnE,MAAM,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC,MAAM,CAAC,EAAE,CAAC,MAAM,CAAC,IAAI,IAAI,MAAM,CAAC,EAAE,KAAK,CAAA;QACjE,MAAM,GAAG,GAAG,OAAO,CAAC,IAAI,CAAC,MAAM,CAAC,EAAE,CAAC,MAAM,CAAC,IAAI,IAAI,KAAK,CAAC,EAAE,KAAK,CAAA;QAC/D,MAAM,SAAS,GAAG,OAAO,CAAC,IAAI,CAAC,MAAM,CAAC,EAAE,CAAC,MAAM,CAAC,IAAI,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C,CAAA;IAAqB,mBAAA,IAAA,kBAAG,GAAE,CAAA;;6CAAjB,iBAAS;;8CA8CzD;wBA1DU,aAAa;IADzB,IAAA,uBAAQ,EAAC,wBAAQ,CAAC;GACN,aAAa,CA2DzB","sourcesContent":["import { Resolver, Query, Args, Arg, Ctx, Directive, ID } from 'type-graphql'\nimport { ListParam } from '@things-factory/shell'\nimport { User } from '@things-factory/auth-base'\nimport { getSchedules, getSchedule } from '@things-factory/scheduler-client'\nimport { Schedule, ScheduleList } from './schedule-type'\n\n@Resolver(Schedule)\nexport class ScheduleQuery {\n @Directive('@privilege(superUserGranted: true)')\n @Query(() => Schedule, { nullable: true, description: 'Retrieve a single schedule by its unique identifier.' })\n async schedule(@Arg('id', () => ID) id: string): Promise<Schedule | null> {\n return await getSchedule(id)\n }\n\n @Directive('@privilege(superUserGranted: true)')\n @Query(returns => ScheduleList, {\n description:\n 'Retrieve a paginated list of schedules with filtering capabilities by name, application, group, type, key, and operation.'\n })\n async schedules(@Args(type => ListParam) params: ListParam, @Ctx() context: ResolverContext): Promise<ScheduleList> {\n const filters = params.filters || []\n\n const name = filters.find(filter => filter.name == 'name')?.value\n\n const application = filters.find(filter => filter.name == 'application')?.value\n const group = filters.find(filter => filter.name == 'group')?.value\n const type = filters.find(filter => filter.name == 'type')?.value\n const key = filters.find(filter => filter.name == 'key')?.value\n const operation = filters.find(filter => filter.name == 'operation')?.value\n\n var schedules = await getSchedules({})\n\n if (name) {\n schedules = schedules.filter(schedule => (schedule.name || '').toLowerCase().includes(name.toLowerCase()))\n }\n if (application) {\n schedules = schedules.filter(schedule =>\n (schedule.client?.application || '').toLowerCase().includes(application.toLowerCase())\n )\n }\n if (group) {\n schedules = schedules.filter(schedule =>\n (schedule.client?.group || '').toLowerCase().includes(group.toLowerCase())\n )\n }\n if (type) {\n schedules = schedules.filter(schedule => (schedule.client?.type || '').toLowerCase().includes(type.toLowerCase()))\n }\n if (key) {\n schedules = schedules.filter(schedule => (schedule.client?.key || '').toLowerCase().includes(key.toLowerCase()))\n }\n if (operation) {\n schedules = schedules.filter(schedule =>\n (schedule.client?.operation || '').toLowerCase().includes(operation.toLowerCase())\n )\n }\n\n const { page = 1, limit = 20 } = params.pagination || {}\n\n const start = (page - 1) * limit\n const end = start + limit\n const items = schedules.slice(start, end)\n const total = schedules.length\n\n return { items, total }\n }\n}\n"]}
@@ -8,274 +8,298 @@ let ScheduleClient = class ScheduleClient {
8
8
  };
9
9
  exports.ScheduleClient = ScheduleClient;
10
10
  tslib_1.__decorate([
11
- (0, type_graphql_1.Field)(),
11
+ (0, type_graphql_1.Field)({ description: 'Name of the application that owns this schedule.' }),
12
12
  tslib_1.__metadata("design:type", String)
13
13
  ], ScheduleClient.prototype, "application", void 0);
14
14
  tslib_1.__decorate([
15
- (0, type_graphql_1.Field)(),
15
+ (0, type_graphql_1.Field)({ description: 'Group identifier for organizing related schedules.' }),
16
16
  tslib_1.__metadata("design:type", String)
17
17
  ], ScheduleClient.prototype, "group", void 0);
18
18
  tslib_1.__decorate([
19
- (0, type_graphql_1.Field)(),
19
+ (0, type_graphql_1.Field)({ description: 'Type of the schedule client (e.g., data collection, reporting, maintenance).' }),
20
20
  tslib_1.__metadata("design:type", String)
21
21
  ], ScheduleClient.prototype, "type", void 0);
22
22
  tslib_1.__decorate([
23
- (0, type_graphql_1.Field)(),
23
+ (0, type_graphql_1.Field)({ description: 'Unique key identifier for the schedule.' }),
24
24
  tslib_1.__metadata("design:type", String)
25
25
  ], ScheduleClient.prototype, "key", void 0);
26
26
  tslib_1.__decorate([
27
- (0, type_graphql_1.Field)(),
27
+ (0, type_graphql_1.Field)({ description: 'Operation to be performed by this schedule (e.g., start, stop, collect, report).' }),
28
28
  tslib_1.__metadata("design:type", String)
29
29
  ], ScheduleClient.prototype, "operation", void 0);
30
30
  exports.ScheduleClient = ScheduleClient = tslib_1.__decorate([
31
- (0, type_graphql_1.ObjectType)()
31
+ (0, type_graphql_1.ObjectType)({
32
+ description: 'Represents a schedule client configuration that defines the application, group, type, key, and operation for scheduled tasks.'
33
+ })
32
34
  ], ScheduleClient);
33
35
  let ScheduleTaskConnection = class ScheduleTaskConnection {
34
36
  };
35
37
  exports.ScheduleTaskConnection = ScheduleTaskConnection;
36
38
  tslib_1.__decorate([
37
- (0, type_graphql_1.Field)({ nullable: true }),
39
+ (0, type_graphql_1.Field)({
40
+ nullable: true,
41
+ description: 'Host URL for the task connection (e.g., REST API endpoint, Kafka broker, Redis server).'
42
+ }),
38
43
  tslib_1.__metadata("design:type", String)
39
44
  ], ScheduleTaskConnection.prototype, "host", void 0);
40
45
  tslib_1.__decorate([
41
- (0, type_graphql_1.Field)(type => shell_1.ScalarObject, { nullable: true }),
46
+ (0, type_graphql_1.Field)(type => shell_1.ScalarObject, {
47
+ nullable: true,
48
+ description: 'HTTP headers for REST API connections or connection parameters.'
49
+ }),
42
50
  tslib_1.__metadata("design:type", Object)
43
51
  ], ScheduleTaskConnection.prototype, "headers", void 0);
44
52
  tslib_1.__decorate([
45
- (0, type_graphql_1.Field)({ nullable: true }),
53
+ (0, type_graphql_1.Field)({
54
+ nullable: true,
55
+ description: 'Topic name for message-based connections (e.g., Kafka topic, Redis channel).'
56
+ }),
46
57
  tslib_1.__metadata("design:type", String)
47
58
  ], ScheduleTaskConnection.prototype, "topic", void 0);
48
59
  exports.ScheduleTaskConnection = ScheduleTaskConnection = tslib_1.__decorate([
49
- (0, type_graphql_1.ObjectType)()
60
+ (0, type_graphql_1.ObjectType)({
61
+ description: 'Represents the connection configuration for a scheduled task, including host, headers, and topic settings.'
62
+ })
50
63
  ], ScheduleTaskConnection);
51
64
  let ScheduleTask = class ScheduleTask {
52
65
  };
53
66
  exports.ScheduleTask = ScheduleTask;
54
67
  tslib_1.__decorate([
55
- (0, type_graphql_1.Field)(),
68
+ (0, type_graphql_1.Field)({ description: 'Type of the scheduled task (rest, kafka, redis).' }),
56
69
  tslib_1.__metadata("design:type", String)
57
70
  ], ScheduleTask.prototype, "type", void 0);
58
71
  tslib_1.__decorate([
59
- (0, type_graphql_1.Field)(type => ScheduleTaskConnection),
72
+ (0, type_graphql_1.Field)(type => ScheduleTaskConnection, { description: 'Connection configuration for the scheduled task.' }),
60
73
  tslib_1.__metadata("design:type", ScheduleTaskConnection)
61
74
  ], ScheduleTask.prototype, "connection", void 0);
62
75
  tslib_1.__decorate([
63
- (0, type_graphql_1.Field)(type => shell_1.ScalarObject),
76
+ (0, type_graphql_1.Field)(type => shell_1.ScalarObject, { description: 'Data payload to be sent with the scheduled task.' }),
64
77
  tslib_1.__metadata("design:type", Object)
65
78
  ], ScheduleTask.prototype, "data", void 0);
66
79
  tslib_1.__decorate([
67
- (0, type_graphql_1.Field)(),
80
+ (0, type_graphql_1.Field)({ description: 'Indicates whether to check task execution history before scheduling.' }),
68
81
  tslib_1.__metadata("design:type", Boolean)
69
82
  ], ScheduleTask.prototype, "history_check", void 0);
70
83
  tslib_1.__decorate([
71
- (0, type_graphql_1.Field)(),
84
+ (0, type_graphql_1.Field)({ description: 'Policy for handling failed task executions (ignore, retry, retry_dlq).' }),
72
85
  tslib_1.__metadata("design:type", String)
73
86
  ], ScheduleTask.prototype, "failed_policy", void 0);
74
87
  tslib_1.__decorate([
75
- (0, type_graphql_1.Field)(type => type_graphql_1.Int),
88
+ (0, type_graphql_1.Field)(type => type_graphql_1.Int, { description: 'Wait time in seconds before retrying a failed task.' }),
76
89
  tslib_1.__metadata("design:type", Number)
77
90
  ], ScheduleTask.prototype, "retry_wait", void 0);
78
91
  tslib_1.__decorate([
79
- (0, type_graphql_1.Field)(type => type_graphql_1.Int),
92
+ (0, type_graphql_1.Field)(type => type_graphql_1.Int, { description: 'Current number of retry attempts for this task.' }),
80
93
  tslib_1.__metadata("design:type", Number)
81
94
  ], ScheduleTask.prototype, "retry_count", void 0);
82
95
  tslib_1.__decorate([
83
- (0, type_graphql_1.Field)(type => type_graphql_1.Int),
96
+ (0, type_graphql_1.Field)(type => type_graphql_1.Int, { description: 'Maximum number of retry attempts allowed for this task.' }),
84
97
  tslib_1.__metadata("design:type", Number)
85
98
  ], ScheduleTask.prototype, "max_retry_count", void 0);
86
99
  exports.ScheduleTask = ScheduleTask = tslib_1.__decorate([
87
- (0, type_graphql_1.ObjectType)()
100
+ (0, type_graphql_1.ObjectType)({ description: 'Represents a scheduled task with connection settings, data payload, and retry policies.' })
88
101
  ], ScheduleTask);
89
102
  let Schedule = class Schedule {
90
103
  };
91
104
  exports.Schedule = Schedule;
92
105
  tslib_1.__decorate([
93
- (0, type_graphql_1.Field)(type => type_graphql_1.ID),
106
+ (0, type_graphql_1.Field)(type => type_graphql_1.ID, { description: 'Unique identifier for the schedule.' }),
94
107
  tslib_1.__metadata("design:type", String)
95
108
  ], Schedule.prototype, "id", void 0);
96
109
  tslib_1.__decorate([
97
- (0, type_graphql_1.Field)({ nullable: true }),
110
+ (0, type_graphql_1.Field)({ nullable: true, description: 'Name of the schedule for identification.' }),
98
111
  tslib_1.__metadata("design:type", String)
99
112
  ], Schedule.prototype, "name", void 0);
100
113
  tslib_1.__decorate([
101
- (0, type_graphql_1.Field)(type => ScheduleClient),
114
+ (0, type_graphql_1.Field)(type => ScheduleClient, { description: 'Client configuration for this schedule.' }),
102
115
  tslib_1.__metadata("design:type", ScheduleClient)
103
116
  ], Schedule.prototype, "client", void 0);
104
117
  tslib_1.__decorate([
105
- (0, type_graphql_1.Field)(),
118
+ (0, type_graphql_1.Field)({ description: 'Type of schedule timing (now, delay, date, cron, delay-recur).' }),
106
119
  tslib_1.__metadata("design:type", String)
107
120
  ], Schedule.prototype, "type", void 0);
108
121
  tslib_1.__decorate([
109
- (0, type_graphql_1.Field)({ nullable: true }),
122
+ (0, type_graphql_1.Field)({ nullable: true, description: 'Schedule expression (cron expression, date string, or delay value).' }),
110
123
  tslib_1.__metadata("design:type", String)
111
124
  ], Schedule.prototype, "schedule", void 0);
112
125
  tslib_1.__decorate([
113
- (0, type_graphql_1.Field)({ nullable: true }),
126
+ (0, type_graphql_1.Field)({ nullable: true, description: 'Timezone for the schedule execution (e.g., UTC, Asia/Seoul).' }),
114
127
  tslib_1.__metadata("design:type", String)
115
128
  ], Schedule.prototype, "timezone", void 0);
116
129
  tslib_1.__decorate([
117
- (0, type_graphql_1.Field)(type => ScheduleTask),
130
+ (0, type_graphql_1.Field)(type => ScheduleTask, { description: 'Task configuration and execution details for this schedule.' }),
118
131
  tslib_1.__metadata("design:type", ScheduleTask)
119
132
  ], Schedule.prototype, "task", void 0);
120
133
  exports.Schedule = Schedule = tslib_1.__decorate([
121
- (0, type_graphql_1.ObjectType)()
134
+ (0, type_graphql_1.ObjectType)({
135
+ description: 'Represents a scheduled task with timing configuration, client settings, and task execution details.'
136
+ })
122
137
  ], Schedule);
123
138
  let ScheduleClientInput = class ScheduleClientInput {
124
139
  };
125
140
  tslib_1.__decorate([
126
- (0, type_graphql_1.Field)(),
141
+ (0, type_graphql_1.Field)({ description: 'Name of the application that owns this schedule.' }),
127
142
  tslib_1.__metadata("design:type", String)
128
143
  ], ScheduleClientInput.prototype, "application", void 0);
129
144
  tslib_1.__decorate([
130
- (0, type_graphql_1.Field)(),
145
+ (0, type_graphql_1.Field)({ description: 'Group identifier for organizing related schedules.' }),
131
146
  tslib_1.__metadata("design:type", String)
132
147
  ], ScheduleClientInput.prototype, "group", void 0);
133
148
  tslib_1.__decorate([
134
- (0, type_graphql_1.Field)(),
149
+ (0, type_graphql_1.Field)({ description: 'Type of the schedule client (e.g., data collection, reporting, maintenance).' }),
135
150
  tslib_1.__metadata("design:type", String)
136
151
  ], ScheduleClientInput.prototype, "type", void 0);
137
152
  tslib_1.__decorate([
138
- (0, type_graphql_1.Field)(),
153
+ (0, type_graphql_1.Field)({ description: 'Unique key identifier for the schedule.' }),
139
154
  tslib_1.__metadata("design:type", String)
140
155
  ], ScheduleClientInput.prototype, "key", void 0);
141
156
  tslib_1.__decorate([
142
- (0, type_graphql_1.Field)(),
157
+ (0, type_graphql_1.Field)({ description: 'Operation to be performed by this schedule (e.g., start, stop, collect, report).' }),
143
158
  tslib_1.__metadata("design:type", String)
144
159
  ], ScheduleClientInput.prototype, "operation", void 0);
145
160
  ScheduleClientInput = tslib_1.__decorate([
146
- (0, type_graphql_1.InputType)()
161
+ (0, type_graphql_1.InputType)({ description: 'Input type for schedule client configuration.' })
147
162
  ], ScheduleClientInput);
148
163
  let ScheduleTaskConnectionInput = class ScheduleTaskConnectionInput {
149
164
  };
150
165
  exports.ScheduleTaskConnectionInput = ScheduleTaskConnectionInput;
151
166
  tslib_1.__decorate([
152
- (0, type_graphql_1.Field)({ nullable: true }),
167
+ (0, type_graphql_1.Field)({
168
+ nullable: true,
169
+ description: 'Host URL for the task connection (e.g., REST API endpoint, Kafka broker, Redis server).'
170
+ }),
153
171
  tslib_1.__metadata("design:type", String)
154
172
  ], ScheduleTaskConnectionInput.prototype, "host", void 0);
155
173
  tslib_1.__decorate([
156
- (0, type_graphql_1.Field)(type => shell_1.ScalarObject, { nullable: true }),
174
+ (0, type_graphql_1.Field)(type => shell_1.ScalarObject, {
175
+ nullable: true,
176
+ description: 'HTTP headers for REST API connections or connection parameters.'
177
+ }),
157
178
  tslib_1.__metadata("design:type", Object)
158
179
  ], ScheduleTaskConnectionInput.prototype, "headers", void 0);
159
180
  tslib_1.__decorate([
160
- (0, type_graphql_1.Field)({ nullable: true }),
181
+ (0, type_graphql_1.Field)({
182
+ nullable: true,
183
+ description: 'Topic name for message-based connections (e.g., Kafka topic, Redis channel).'
184
+ }),
161
185
  tslib_1.__metadata("design:type", String)
162
186
  ], ScheduleTaskConnectionInput.prototype, "topic", void 0);
163
187
  exports.ScheduleTaskConnectionInput = ScheduleTaskConnectionInput = tslib_1.__decorate([
164
- (0, type_graphql_1.InputType)()
188
+ (0, type_graphql_1.InputType)({ description: 'Input type for schedule task connection configuration.' })
165
189
  ], ScheduleTaskConnectionInput);
166
190
  let ScheduleTaskInput = class ScheduleTaskInput {
167
191
  };
168
192
  tslib_1.__decorate([
169
- (0, type_graphql_1.Field)(),
193
+ (0, type_graphql_1.Field)({ description: 'Type of the scheduled task (rest, kafka, redis).' }),
170
194
  tslib_1.__metadata("design:type", String)
171
195
  ], ScheduleTaskInput.prototype, "type", void 0);
172
196
  tslib_1.__decorate([
173
- (0, type_graphql_1.Field)(type => ScheduleTaskConnectionInput),
197
+ (0, type_graphql_1.Field)(type => ScheduleTaskConnectionInput, { description: 'Connection configuration for the scheduled task.' }),
174
198
  tslib_1.__metadata("design:type", ScheduleTaskConnectionInput)
175
199
  ], ScheduleTaskInput.prototype, "connection", void 0);
176
200
  tslib_1.__decorate([
177
- (0, type_graphql_1.Field)(type => shell_1.ScalarObject),
201
+ (0, type_graphql_1.Field)(type => shell_1.ScalarObject, { description: 'Data payload to be sent with the scheduled task.' }),
178
202
  tslib_1.__metadata("design:type", Object)
179
203
  ], ScheduleTaskInput.prototype, "data", void 0);
180
204
  tslib_1.__decorate([
181
- (0, type_graphql_1.Field)(),
205
+ (0, type_graphql_1.Field)({ description: 'Indicates whether to check task execution history before scheduling.' }),
182
206
  tslib_1.__metadata("design:type", Boolean)
183
207
  ], ScheduleTaskInput.prototype, "history_check", void 0);
184
208
  tslib_1.__decorate([
185
- (0, type_graphql_1.Field)(),
209
+ (0, type_graphql_1.Field)({ description: 'Policy for handling failed task executions (ignore, retry, retry_dlq).' }),
186
210
  tslib_1.__metadata("design:type", String)
187
211
  ], ScheduleTaskInput.prototype, "failed_policy", void 0);
188
212
  tslib_1.__decorate([
189
- (0, type_graphql_1.Field)(type => type_graphql_1.Int),
213
+ (0, type_graphql_1.Field)(type => type_graphql_1.Int, { description: 'Wait time in seconds before retrying a failed task.' }),
190
214
  tslib_1.__metadata("design:type", Number)
191
215
  ], ScheduleTaskInput.prototype, "retry_wait", void 0);
192
216
  tslib_1.__decorate([
193
- (0, type_graphql_1.Field)(type => type_graphql_1.Int),
217
+ (0, type_graphql_1.Field)(type => type_graphql_1.Int, { description: 'Current number of retry attempts for this task.' }),
194
218
  tslib_1.__metadata("design:type", Number)
195
219
  ], ScheduleTaskInput.prototype, "retry_count", void 0);
196
220
  tslib_1.__decorate([
197
- (0, type_graphql_1.Field)(type => type_graphql_1.Int),
221
+ (0, type_graphql_1.Field)(type => type_graphql_1.Int, { description: 'Maximum number of retry attempts allowed for this task.' }),
198
222
  tslib_1.__metadata("design:type", Number)
199
223
  ], ScheduleTaskInput.prototype, "max_retry_count", void 0);
200
224
  ScheduleTaskInput = tslib_1.__decorate([
201
- (0, type_graphql_1.InputType)()
225
+ (0, type_graphql_1.InputType)({ description: 'Input type for schedule task configuration.' })
202
226
  ], ScheduleTaskInput);
203
227
  let NewSchedule = class NewSchedule {
204
228
  };
205
229
  exports.NewSchedule = NewSchedule;
206
230
  tslib_1.__decorate([
207
- (0, type_graphql_1.Field)(),
231
+ (0, type_graphql_1.Field)({ description: 'Name of the schedule for identification.' }),
208
232
  tslib_1.__metadata("design:type", String)
209
233
  ], NewSchedule.prototype, "name", void 0);
210
234
  tslib_1.__decorate([
211
- (0, type_graphql_1.Field)(type => ScheduleClientInput),
235
+ (0, type_graphql_1.Field)(type => ScheduleClientInput, { description: 'Client configuration for this schedule.' }),
212
236
  tslib_1.__metadata("design:type", ScheduleClientInput)
213
237
  ], NewSchedule.prototype, "client", void 0);
214
238
  tslib_1.__decorate([
215
- (0, type_graphql_1.Field)(),
239
+ (0, type_graphql_1.Field)({ description: 'Type of schedule timing (now, delay, date, cron, delay-recur).' }),
216
240
  tslib_1.__metadata("design:type", String)
217
241
  ], NewSchedule.prototype, "type", void 0);
218
242
  tslib_1.__decorate([
219
- (0, type_graphql_1.Field)({ nullable: true }),
243
+ (0, type_graphql_1.Field)({ nullable: true, description: 'Schedule expression (cron expression, date string, or delay value).' }),
220
244
  tslib_1.__metadata("design:type", String)
221
245
  ], NewSchedule.prototype, "schedule", void 0);
222
246
  tslib_1.__decorate([
223
- (0, type_graphql_1.Field)({ nullable: true }),
247
+ (0, type_graphql_1.Field)({ nullable: true, description: 'Timezone for the schedule execution (e.g., UTC, Asia/Seoul).' }),
224
248
  tslib_1.__metadata("design:type", String)
225
249
  ], NewSchedule.prototype, "timezone", void 0);
226
250
  tslib_1.__decorate([
227
- (0, type_graphql_1.Field)(type => ScheduleTaskInput),
251
+ (0, type_graphql_1.Field)(type => ScheduleTaskInput, { description: 'Task configuration and execution details for this schedule.' }),
228
252
  tslib_1.__metadata("design:type", ScheduleTaskInput)
229
253
  ], NewSchedule.prototype, "task", void 0);
230
254
  exports.NewSchedule = NewSchedule = tslib_1.__decorate([
231
- (0, type_graphql_1.InputType)()
255
+ (0, type_graphql_1.InputType)({ description: 'Input type for creating a new schedule with complete configuration.' })
232
256
  ], NewSchedule);
233
257
  let SchedulePatch = class SchedulePatch {
234
258
  };
235
259
  exports.SchedulePatch = SchedulePatch;
236
260
  tslib_1.__decorate([
237
- (0, type_graphql_1.Field)({ nullable: true }),
261
+ (0, type_graphql_1.Field)({ nullable: true, description: 'Unique identifier for the schedule to update.' }),
238
262
  tslib_1.__metadata("design:type", String)
239
263
  ], SchedulePatch.prototype, "id", void 0);
240
264
  tslib_1.__decorate([
241
- (0, type_graphql_1.Field)({ nullable: true }),
265
+ (0, type_graphql_1.Field)({ nullable: true, description: 'Name of the schedule for identification.' }),
242
266
  tslib_1.__metadata("design:type", String)
243
267
  ], SchedulePatch.prototype, "name", void 0);
244
268
  tslib_1.__decorate([
245
- (0, type_graphql_1.Field)(type => ScheduleClientInput),
269
+ (0, type_graphql_1.Field)(type => ScheduleClientInput, { description: 'Client configuration for this schedule.' }),
246
270
  tslib_1.__metadata("design:type", ScheduleClientInput)
247
271
  ], SchedulePatch.prototype, "client", void 0);
248
272
  tslib_1.__decorate([
249
- (0, type_graphql_1.Field)(),
273
+ (0, type_graphql_1.Field)({ description: 'Type of schedule timing (now, delay, date, cron, delay-recur).' }),
250
274
  tslib_1.__metadata("design:type", String)
251
275
  ], SchedulePatch.prototype, "type", void 0);
252
276
  tslib_1.__decorate([
253
- (0, type_graphql_1.Field)({ nullable: true }),
277
+ (0, type_graphql_1.Field)({ nullable: true, description: 'Schedule expression (cron expression, date string, or delay value).' }),
254
278
  tslib_1.__metadata("design:type", String)
255
279
  ], SchedulePatch.prototype, "schedule", void 0);
256
280
  tslib_1.__decorate([
257
- (0, type_graphql_1.Field)({ nullable: true }),
281
+ (0, type_graphql_1.Field)({ nullable: true, description: 'Timezone for the schedule execution (e.g., UTC, Asia/Seoul).' }),
258
282
  tslib_1.__metadata("design:type", String)
259
283
  ], SchedulePatch.prototype, "timezone", void 0);
260
284
  tslib_1.__decorate([
261
- (0, type_graphql_1.Field)(type => ScheduleTaskInput),
285
+ (0, type_graphql_1.Field)(type => ScheduleTaskInput, { description: 'Task configuration and execution details for this schedule.' }),
262
286
  tslib_1.__metadata("design:type", ScheduleTaskInput)
263
287
  ], SchedulePatch.prototype, "task", void 0);
264
288
  exports.SchedulePatch = SchedulePatch = tslib_1.__decorate([
265
- (0, type_graphql_1.InputType)()
289
+ (0, type_graphql_1.InputType)({ description: 'Input type for updating an existing schedule configuration.' })
266
290
  ], SchedulePatch);
267
291
  let ScheduleList = class ScheduleList {
268
292
  };
269
293
  exports.ScheduleList = ScheduleList;
270
294
  tslib_1.__decorate([
271
- (0, type_graphql_1.Field)(type => [Schedule]),
295
+ (0, type_graphql_1.Field)(type => [Schedule], { description: 'Array of schedule objects.' }),
272
296
  tslib_1.__metadata("design:type", Array)
273
297
  ], ScheduleList.prototype, "items", void 0);
274
298
  tslib_1.__decorate([
275
- (0, type_graphql_1.Field)(type => type_graphql_1.Int),
299
+ (0, type_graphql_1.Field)(type => type_graphql_1.Int, { description: 'Total number of schedules matching the query criteria.' }),
276
300
  tslib_1.__metadata("design:type", Number)
277
301
  ], ScheduleList.prototype, "total", void 0);
278
302
  exports.ScheduleList = ScheduleList = tslib_1.__decorate([
279
- (0, type_graphql_1.ObjectType)()
303
+ (0, type_graphql_1.ObjectType)({ description: 'Represents a paginated list of schedules with total count.' })
280
304
  ], ScheduleList);
281
305
  //# sourceMappingURL=schedule-type.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"schedule-type.js","sourceRoot":"","sources":["../../../server/service/schedule/schedule-type.ts"],"names":[],"mappings":";;;;AAAA,+CAAoE;AACpE,iDAAoD;AAG7C,IAAM,cAAc,GAApB,MAAM,cAAc;CAe1B,CAAA;AAfY,wCAAc;AAEzB;IADC,IAAA,oBAAK,GAAE;;mDACY;AAGpB;IADC,IAAA,oBAAK,GAAE;;6CACM;AAGd;IADC,IAAA,oBAAK,GAAE;;4CACK;AAGb;IADC,IAAA,oBAAK,GAAE;;2CACI;AAGZ;IADC,IAAA,oBAAK,GAAE;;iDACU;yBAdP,cAAc;IAD1B,IAAA,yBAAU,GAAE;GACA,cAAc,CAe1B;AAGM,IAAM,sBAAsB,GAA5B,MAAM,sBAAsB;CASlC,CAAA;AATY,wDAAsB;AAEjC;IADC,IAAA,oBAAK,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;oDACb;AAGb;IADC,IAAA,oBAAK,EAAC,IAAI,CAAC,EAAE,CAAC,oBAAY,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;uDAChB;AAGhC;IADC,IAAA,oBAAK,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;qDACZ;iCARH,sBAAsB;IADlC,IAAA,yBAAU,GAAE;GACA,sBAAsB,CASlC;AAGM,IAAM,YAAY,GAAlB,MAAM,YAAY;CAwBxB,CAAA;AAxBY,oCAAY;AAEvB;IADC,IAAA,oBAAK,GAAE;;0CACK;AAGb;IADC,IAAA,oBAAK,EAAC,IAAI,CAAC,EAAE,CAAC,sBAAsB,CAAC;sCACzB,sBAAsB;gDAAA;AAGnC;IADC,IAAA,oBAAK,EAAC,IAAI,CAAC,EAAE,CAAC,oBAAY,CAAC;;0CACF;AAG1B;IADC,IAAA,oBAAK,GAAE;;mDACe;AAGvB;IADC,IAAA,oBAAK,GAAE;;mDACwC;AAGhD;IADC,IAAA,oBAAK,EAAC,IAAI,CAAC,EAAE,CAAC,kBAAG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, Field, InputType, Int, ID } from 'type-graphql'\nimport { ScalarObject } from '@things-factory/shell'\n\n@ObjectType()\nexport class ScheduleClient {\n @Field()\n application?: string\n\n @Field()\n group?: string\n\n @Field()\n type?: string\n\n @Field()\n key?: string\n\n @Field()\n operation?: string\n}\n\n@ObjectType()\nexport class ScheduleTaskConnection {\n @Field({ nullable: true })\n host?: string\n\n @Field(type => ScalarObject, { nullable: true })\n headers?: Record<string, string>\n\n @Field({ nullable: true })\n topic?: string\n}\n\n@ObjectType()\nexport class ScheduleTask {\n @Field()\n type?: string\n\n @Field(type => ScheduleTaskConnection)\n connection?: ScheduleTaskConnection\n\n @Field(type => ScalarObject)\n data?: Record<string, any>\n\n @Field()\n history_check?: boolean\n\n @Field()\n failed_policy?: 'ignore' | 'retry' | 'retry_dlq'\n\n @Field(type => Int)\n retry_wait?: number\n\n @Field(type => Int)\n retry_count?: number\n\n @Field(type => Int)\n max_retry_count?: number\n}\n\n@ObjectType()\nexport class Schedule {\n @Field(type => ID)\n id: string\n\n @Field({ nullable: true })\n name?: string\n\n @Field(type => ScheduleClient)\n client?: ScheduleClient\n\n @Field()\n type?: 'now' | 'delay' | 'date' | 'cron' | 'delay-recur'\n\n @Field({ nullable: true })\n schedule?: string\n\n @Field({ nullable: true })\n timezone?: string\n\n @Field(type => ScheduleTask)\n task?: ScheduleTask\n}\n\n@InputType()\nclass ScheduleClientInput {\n @Field()\n application: string\n\n @Field()\n group: string\n\n @Field()\n type: string\n\n @Field()\n key: string\n\n @Field()\n operation: string\n}\n\n@InputType()\nexport class ScheduleTaskConnectionInput {\n @Field({ nullable: true })\n host?: string\n\n @Field(type => ScalarObject, { nullable: true })\n headers?: Record<string, string>\n\n @Field({ nullable: true })\n topic?: string\n}\n\n@InputType()\nclass ScheduleTaskInput {\n @Field()\n type: 'rest' | 'kafka' | 'redis'\n\n @Field(type => ScheduleTaskConnectionInput)\n connection: ScheduleTaskConnectionInput\n\n @Field(type => ScalarObject)\n data: Record<string, any>\n\n @Field()\n history_check: boolean\n\n @Field()\n failed_policy: 'ignore' | 'retry' | 'retry_dlq'\n\n @Field(type => Int)\n retry_wait: number\n\n @Field(type => Int)\n retry_count: number\n\n @Field(type => Int)\n max_retry_count: number\n}\n\n@InputType()\nexport class NewSchedule {\n @Field()\n name: string\n\n @Field(type => ScheduleClientInput)\n client: ScheduleClientInput\n\n @Field()\n type: 'now' | 'delay' | 'date' | 'cron' | 'delay-recur'\n\n @Field({ nullable: true })\n schedule: string\n\n @Field({ nullable: true })\n timezone: string\n\n @Field(type => ScheduleTaskInput)\n task: ScheduleTaskInput\n}\n\n@InputType()\nexport class SchedulePatch {\n @Field({ nullable: true })\n id: string\n\n @Field({ nullable: true })\n name?: string\n\n @Field(type => ScheduleClientInput)\n client: ScheduleClientInput\n\n @Field()\n type: 'now' | 'delay' | 'date' | 'cron' | 'delay-recur'\n\n @Field({ nullable: true })\n schedule: string\n\n @Field({ nullable: true })\n timezone: string\n\n @Field(type => ScheduleTaskInput)\n task: ScheduleTaskInput\n}\n\n@ObjectType()\nexport class ScheduleList {\n @Field(type => [Schedule])\n items: Schedule[]\n\n @Field(type => Int)\n total: number\n}\n"]}
1
+ {"version":3,"file":"schedule-type.js","sourceRoot":"","sources":["../../../server/service/schedule/schedule-type.ts"],"names":[],"mappings":";;;;AAAA,+CAAoE;AACpE,iDAAoD;AAM7C,IAAM,cAAc,GAApB,MAAM,cAAc;CAe1B,CAAA;AAfY,wCAAc;AAEzB;IADC,IAAA,oBAAK,EAAC,EAAE,WAAW,EAAE,kDAAkD,EAAE,CAAC;;mDACvD;AAGpB;IADC,IAAA,oBAAK,EAAC,EAAE,WAAW,EAAE,oDAAoD,EAAE,CAAC;;6CAC/D;AAGd;IADC,IAAA,oBAAK,EAAC,EAAE,WAAW,EAAE,8EAA8E,EAAE,CAAC;;4CAC1F;AAGb;IADC,IAAA,oBAAK,EAAC,EAAE,WAAW,EAAE,yCAAyC,EAAE,CAAC;;2CACtD;AAGZ;IADC,IAAA,oBA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,CAAC,EAAE,CAAC,iBAAiB,EAAE,EAAE,WAAW,EAAE,6DAA6D,EAAE,CAAC;sCAC3G,iBAAiB;2CAAA;wBApBZ,aAAa;IADzB,IAAA,wBAAS,EAAC,EAAE,WAAW,EAAE,6DAA6D,EAAE,CAAC;GAC7E,aAAa,CAqBzB;AAGM,IAAM,YAAY,GAAlB,MAAM,YAAY;CAMxB,CAAA;AANY,oCAAY;AAEvB;IADC,IAAA,oBAAK,EAAC,IAAI,CAAC,EAAE,CAAC,CAAC,QAAQ,CAAC,EAAE,EAAE,WAAW,EAAE,4BAA4B,EAAE,CAAC;;2CACxD;AAGjB;IADC,IAAA,oBAAK,EAAC,IAAI,CAAC,EAAE,CAAC,kBAAG,EAAE,EAAE,WAAW,EAAE,wDAAwD,EAAE,CAAC;;2CACjF;uBALF,YAAY;IADxB,IAAA,yBAAU,EAAC,EAAE,WAAW,EAAE,4DAA4D,EAAE,CAAC;GAC7E,YAAY,CAMxB","sourcesContent":["import { ObjectType, Field, InputType, Int, ID } from 'type-graphql'\nimport { ScalarObject } from '@things-factory/shell'\n\n@ObjectType({\n description:\n 'Represents a schedule client configuration that defines the application, group, type, key, and operation for scheduled tasks.'\n})\nexport class ScheduleClient {\n @Field({ description: 'Name of the application that owns this schedule.' })\n application?: string\n\n @Field({ description: 'Group identifier for organizing related schedules.' })\n group?: string\n\n @Field({ description: 'Type of the schedule client (e.g., data collection, reporting, maintenance).' })\n type?: string\n\n @Field({ description: 'Unique key identifier for the schedule.' })\n key?: string\n\n @Field({ description: 'Operation to be performed by this schedule (e.g., start, stop, collect, report).' })\n operation?: string\n}\n\n@ObjectType({\n description:\n 'Represents the connection configuration for a scheduled task, including host, headers, and topic settings.'\n})\nexport class ScheduleTaskConnection {\n @Field({\n nullable: true,\n description: 'Host URL for the task connection (e.g., REST API endpoint, Kafka broker, Redis server).'\n })\n host?: string\n\n @Field(type => ScalarObject, {\n nullable: true,\n description: 'HTTP headers for REST API connections or connection parameters.'\n })\n headers?: Record<string, string>\n\n @Field({\n nullable: true,\n description: 'Topic name for message-based connections (e.g., Kafka topic, Redis channel).'\n })\n topic?: string\n}\n\n@ObjectType({ description: 'Represents a scheduled task with connection settings, data payload, and retry policies.' })\nexport class ScheduleTask {\n @Field({ description: 'Type of the scheduled task (rest, kafka, redis).' })\n type?: string\n\n @Field(type => ScheduleTaskConnection, { description: 'Connection configuration for the scheduled task.' })\n connection?: ScheduleTaskConnection\n\n @Field(type => ScalarObject, { description: 'Data payload to be sent with the scheduled task.' })\n data?: Record<string, any>\n\n @Field({ description: 'Indicates whether to check task execution history before scheduling.' })\n history_check?: boolean\n\n @Field({ description: 'Policy for handling failed task executions (ignore, retry, retry_dlq).' })\n failed_policy?: 'ignore' | 'retry' | 'retry_dlq'\n\n @Field(type => Int, { description: 'Wait time in seconds before retrying a failed task.' })\n retry_wait?: number\n\n @Field(type => Int, { description: 'Current number of retry attempts for this task.' })\n retry_count?: number\n\n @Field(type => Int, { description: 'Maximum number of retry attempts allowed for this task.' })\n max_retry_count?: number\n}\n\n@ObjectType({\n description: 'Represents a scheduled task with timing configuration, client settings, and task execution details.'\n})\nexport class Schedule {\n @Field(type => ID, { description: 'Unique identifier for the schedule.' })\n id: string\n\n @Field({ nullable: true, description: 'Name of the schedule for identification.' })\n name?: string\n\n @Field(type => ScheduleClient, { description: 'Client configuration for this schedule.' })\n client?: ScheduleClient\n\n @Field({ description: 'Type of schedule timing (now, delay, date, cron, delay-recur).' })\n type?: 'now' | 'delay' | 'date' | 'cron' | 'delay-recur'\n\n @Field({ nullable: true, description: 'Schedule expression (cron expression, date string, or delay value).' })\n schedule?: string\n\n @Field({ nullable: true, description: 'Timezone for the schedule execution (e.g., UTC, Asia/Seoul).' })\n timezone?: string\n\n @Field(type => ScheduleTask, { description: 'Task configuration and execution details for this schedule.' })\n task?: ScheduleTask\n}\n\n@InputType({ description: 'Input type for schedule client configuration.' })\nclass ScheduleClientInput {\n @Field({ description: 'Name of the application that owns this schedule.' })\n application: string\n\n @Field({ description: 'Group identifier for organizing related schedules.' })\n group: string\n\n @Field({ description: 'Type of the schedule client (e.g., data collection, reporting, maintenance).' })\n type: string\n\n @Field({ description: 'Unique key identifier for the schedule.' })\n key: string\n\n @Field({ description: 'Operation to be performed by this schedule (e.g., start, stop, collect, report).' })\n operation: string\n}\n\n@InputType({ description: 'Input type for schedule task connection configuration.' })\nexport class ScheduleTaskConnectionInput {\n @Field({\n nullable: true,\n description: 'Host URL for the task connection (e.g., REST API endpoint, Kafka broker, Redis server).'\n })\n host?: string\n\n @Field(type => ScalarObject, {\n nullable: true,\n description: 'HTTP headers for REST API connections or connection parameters.'\n })\n headers?: Record<string, string>\n\n @Field({\n nullable: true,\n description: 'Topic name for message-based connections (e.g., Kafka topic, Redis channel).'\n })\n topic?: string\n}\n\n@InputType({ description: 'Input type for schedule task configuration.' })\nclass ScheduleTaskInput {\n @Field({ description: 'Type of the scheduled task (rest, kafka, redis).' })\n type: 'rest' | 'kafka' | 'redis'\n\n @Field(type => ScheduleTaskConnectionInput, { description: 'Connection configuration for the scheduled task.' })\n connection: ScheduleTaskConnectionInput\n\n @Field(type => ScalarObject, { description: 'Data payload to be sent with the scheduled task.' })\n data: Record<string, any>\n\n @Field({ description: 'Indicates whether to check task execution history before scheduling.' })\n history_check: boolean\n\n @Field({ description: 'Policy for handling failed task executions (ignore, retry, retry_dlq).' })\n failed_policy: 'ignore' | 'retry' | 'retry_dlq'\n\n @Field(type => Int, { description: 'Wait time in seconds before retrying a failed task.' })\n retry_wait: number\n\n @Field(type => Int, { description: 'Current number of retry attempts for this task.' })\n retry_count: number\n\n @Field(type => Int, { description: 'Maximum number of retry attempts allowed for this task.' })\n max_retry_count: number\n}\n\n@InputType({ description: 'Input type for creating a new schedule with complete configuration.' })\nexport class NewSchedule {\n @Field({ description: 'Name of the schedule for identification.' })\n name: string\n\n @Field(type => ScheduleClientInput, { description: 'Client configuration for this schedule.' })\n client: ScheduleClientInput\n\n @Field({ description: 'Type of schedule timing (now, delay, date, cron, delay-recur).' })\n type: 'now' | 'delay' | 'date' | 'cron' | 'delay-recur'\n\n @Field({ nullable: true, description: 'Schedule expression (cron expression, date string, or delay value).' })\n schedule: string\n\n @Field({ nullable: true, description: 'Timezone for the schedule execution (e.g., UTC, Asia/Seoul).' })\n timezone: string\n\n @Field(type => ScheduleTaskInput, { description: 'Task configuration and execution details for this schedule.' })\n task: ScheduleTaskInput\n}\n\n@InputType({ description: 'Input type for updating an existing schedule configuration.' })\nexport class SchedulePatch {\n @Field({ nullable: true, description: 'Unique identifier for the schedule to update.' })\n id: string\n\n @Field({ nullable: true, description: 'Name of the schedule for identification.' })\n name?: string\n\n @Field(type => ScheduleClientInput, { description: 'Client configuration for this schedule.' })\n client: ScheduleClientInput\n\n @Field({ description: 'Type of schedule timing (now, delay, date, cron, delay-recur).' })\n type: 'now' | 'delay' | 'date' | 'cron' | 'delay-recur'\n\n @Field({ nullable: true, description: 'Schedule expression (cron expression, date string, or delay value).' })\n schedule: string\n\n @Field({ nullable: true, description: 'Timezone for the schedule execution (e.g., UTC, Asia/Seoul).' })\n timezone: string\n\n @Field(type => ScheduleTaskInput, { description: 'Task configuration and execution details for this schedule.' })\n task: ScheduleTaskInput\n}\n\n@ObjectType({ description: 'Represents a paginated list of schedules with total count.' })\nexport class ScheduleList {\n @Field(type => [Schedule], { description: 'Array of schedule objects.' })\n items: Schedule[]\n\n @Field(type => Int, { description: 'Total number of schedules matching the query criteria.' })\n total: number\n}\n"]}