dt-common-device 11.1.5 → 11.1.6

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.
@@ -21,6 +21,7 @@ class CronicleService {
21
21
  plugin: "urlplug",
22
22
  timeZone: timezone || "UTC",
23
23
  enabled: enabled ? 1 : 0,
24
+ max_children: 1,
24
25
  target: target,
25
26
  api_key: this.cronicleApiKey,
26
27
  params: {
@@ -29,6 +30,7 @@ class CronicleService {
29
30
  headers: {
30
31
  "Content-Type": "application/json",
31
32
  "x-api-key": this.cronicleApiKey,
33
+ "User-Agent": "Cronicle/1.0",
32
34
  },
33
35
  timeout: 120,
34
36
  },
@@ -52,8 +54,14 @@ class CronicleService {
52
54
  const { name, apiUrl, method, schedule, cronJobId, target, category, timezone, enabled, } = payload;
53
55
  try {
54
56
  const croniclePayload = {};
55
- if (apiUrl || method)
56
- croniclePayload.params = {};
57
+ croniclePayload.params = {
58
+ timeout: 120,
59
+ headers: {
60
+ "Content-Type": "application/json",
61
+ "x-api-key": this.cronicleApiKey,
62
+ "User-Agent": "Cronicle/1.0",
63
+ },
64
+ };
57
65
  if (name)
58
66
  croniclePayload.title = name;
59
67
  if (timezone)
@@ -70,11 +78,15 @@ class CronicleService {
70
78
  croniclePayload.params.method = method;
71
79
  if (schedule)
72
80
  croniclePayload.timing = schedule;
73
- await axios_1.default.post(`${this.cronicleEndpoint}/update_event/v1`, {
81
+ const payload = {
74
82
  id: cronJobId,
75
83
  ...croniclePayload,
84
+ category: "general", // Need to make this dynamic
85
+ timeout: 60,
86
+ max_children: 1,
76
87
  api_key: this.cronicleApiKey,
77
- });
88
+ };
89
+ await axios_1.default.post(`${this.cronicleEndpoint}/update_event/v1`, payload);
78
90
  }
79
91
  catch (error) {
80
92
  (0, config_1.getConfig)().LOGGER.error(`Failed to update Cronicle job: ${error.message}`);
@@ -137,6 +137,7 @@ export interface UpdateIssueData {
137
137
  resolvedAt?: Date;
138
138
  dueDate?: Date;
139
139
  isDeleted?: boolean;
140
+ zoneId?: string;
140
141
  }
141
142
  export interface AddCommentData {
142
143
  userId: string;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "dt-common-device",
3
- "version": "11.1.5",
3
+ "version": "11.1.6",
4
4
  "main": "dist/index.js",
5
5
  "types": "dist/index.d.ts",
6
6
  "files": [