@pipedream/rendex 0.1.0 → 0.2.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/actions/create-artifact/create-artifact.mjs +111 -0
- package/actions/create-render-link/create-render-link.mjs +256 -0
- package/actions/create-watch/create-watch.mjs +141 -0
- package/actions/delete-watch/delete-watch.mjs +34 -0
- package/actions/extract-content/extract-content.mjs +64 -0
- package/actions/get-account/get-account.mjs +33 -0
- package/actions/get-watch/get-watch.mjs +32 -0
- package/actions/list-watch-runs/list-watch-runs.mjs +48 -0
- package/actions/list-watches/list-watches.mjs +55 -0
- package/actions/render-markdown/render-markdown.mjs +49 -0
- package/actions/render-to-image/render-to-image.mjs +211 -1
- package/actions/run-watch/run-watch.mjs +32 -0
- package/actions/update-watch/update-watch.mjs +148 -0
- package/package.json +1 -1
- package/rendex.app.mjs +429 -0
- package/sources/new-change-detected/new-change-detected.mjs +151 -0
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
import rendex from "../../rendex.app.mjs";
|
|
2
|
+
|
|
3
|
+
export default {
|
|
4
|
+
key: "rendex-list-watch-runs",
|
|
5
|
+
name: "List Watch Runs",
|
|
6
|
+
description: "List the run history for a watch (most recent first). [See the documentation](https://rendex.dev/docs/watch#reading-run-history).",
|
|
7
|
+
version: "0.0.1",
|
|
8
|
+
type: "action",
|
|
9
|
+
annotations: {
|
|
10
|
+
destructiveHint: false,
|
|
11
|
+
openWorldHint: true,
|
|
12
|
+
readOnlyHint: true,
|
|
13
|
+
},
|
|
14
|
+
props: {
|
|
15
|
+
rendex,
|
|
16
|
+
watchId: {
|
|
17
|
+
propDefinition: [
|
|
18
|
+
rendex,
|
|
19
|
+
"watchId",
|
|
20
|
+
],
|
|
21
|
+
},
|
|
22
|
+
limit: {
|
|
23
|
+
propDefinition: [
|
|
24
|
+
rendex,
|
|
25
|
+
"limit",
|
|
26
|
+
],
|
|
27
|
+
},
|
|
28
|
+
cursor: {
|
|
29
|
+
propDefinition: [
|
|
30
|
+
rendex,
|
|
31
|
+
"cursor",
|
|
32
|
+
],
|
|
33
|
+
},
|
|
34
|
+
},
|
|
35
|
+
async run({ $ }) {
|
|
36
|
+
const response = await this.rendex.listRuns(this.watchId, {
|
|
37
|
+
$,
|
|
38
|
+
params: {
|
|
39
|
+
limit: this.limit,
|
|
40
|
+
cursor: this.cursor,
|
|
41
|
+
},
|
|
42
|
+
});
|
|
43
|
+
|
|
44
|
+
const data = response.data;
|
|
45
|
+
$.export("$summary", `Retrieved ${data?.items?.length ?? 0} run(s)`);
|
|
46
|
+
return data;
|
|
47
|
+
},
|
|
48
|
+
};
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
import rendex from "../../rendex.app.mjs";
|
|
2
|
+
|
|
3
|
+
export default {
|
|
4
|
+
key: "rendex-list-watches",
|
|
5
|
+
name: "List Watches",
|
|
6
|
+
description: "List the watches on your Rendex account, optionally filtered by status. [See the documentation](https://rendex.dev/docs/watch#endpoints).",
|
|
7
|
+
version: "0.0.1",
|
|
8
|
+
type: "action",
|
|
9
|
+
annotations: {
|
|
10
|
+
destructiveHint: false,
|
|
11
|
+
openWorldHint: true,
|
|
12
|
+
readOnlyHint: true,
|
|
13
|
+
},
|
|
14
|
+
props: {
|
|
15
|
+
rendex,
|
|
16
|
+
status: {
|
|
17
|
+
type: "string",
|
|
18
|
+
label: "Status",
|
|
19
|
+
description: "Filter watches by status.",
|
|
20
|
+
optional: true,
|
|
21
|
+
default: "all",
|
|
22
|
+
options: [
|
|
23
|
+
"active",
|
|
24
|
+
"paused",
|
|
25
|
+
"all",
|
|
26
|
+
],
|
|
27
|
+
},
|
|
28
|
+
limit: {
|
|
29
|
+
propDefinition: [
|
|
30
|
+
rendex,
|
|
31
|
+
"limit",
|
|
32
|
+
],
|
|
33
|
+
},
|
|
34
|
+
cursor: {
|
|
35
|
+
propDefinition: [
|
|
36
|
+
rendex,
|
|
37
|
+
"cursor",
|
|
38
|
+
],
|
|
39
|
+
},
|
|
40
|
+
},
|
|
41
|
+
async run({ $ }) {
|
|
42
|
+
const response = await this.rendex.listWatches({
|
|
43
|
+
$,
|
|
44
|
+
params: {
|
|
45
|
+
status: this.status,
|
|
46
|
+
limit: this.limit,
|
|
47
|
+
cursor: this.cursor,
|
|
48
|
+
},
|
|
49
|
+
});
|
|
50
|
+
|
|
51
|
+
const data = response.data;
|
|
52
|
+
$.export("$summary", `Retrieved ${data?.items?.length ?? 0} watch(es)`);
|
|
53
|
+
return data;
|
|
54
|
+
},
|
|
55
|
+
};
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
import { ConfigurationError } from "@pipedream/platform";
|
|
2
|
+
import rendex from "../../rendex.app.mjs";
|
|
3
|
+
|
|
4
|
+
export default {
|
|
5
|
+
key: "rendex-render-markdown",
|
|
6
|
+
name: "Render Markdown",
|
|
7
|
+
description: "Render a Markdown string to an image or PDF via Rendex — clean default typography, no CSS required. Returns base64-encoded data with metadata. [See the documentation](https://rendex.dev/docs/api-reference#post-screenshot-json).",
|
|
8
|
+
version: "0.0.1",
|
|
9
|
+
type: "action",
|
|
10
|
+
annotations: {
|
|
11
|
+
destructiveHint: false,
|
|
12
|
+
openWorldHint: true,
|
|
13
|
+
readOnlyHint: false,
|
|
14
|
+
},
|
|
15
|
+
props: {
|
|
16
|
+
rendex,
|
|
17
|
+
markdown: {
|
|
18
|
+
propDefinition: [
|
|
19
|
+
rendex,
|
|
20
|
+
"markdown",
|
|
21
|
+
],
|
|
22
|
+
},
|
|
23
|
+
format: {
|
|
24
|
+
propDefinition: [
|
|
25
|
+
rendex,
|
|
26
|
+
"format",
|
|
27
|
+
],
|
|
28
|
+
},
|
|
29
|
+
},
|
|
30
|
+
async run({ $ }) {
|
|
31
|
+
if (!this.markdown) {
|
|
32
|
+
throw new ConfigurationError("`markdown` is required.");
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
const data = {
|
|
36
|
+
markdown: this.markdown,
|
|
37
|
+
format: this.format || "png",
|
|
38
|
+
};
|
|
39
|
+
|
|
40
|
+
const response = await this.rendex.renderJson({
|
|
41
|
+
$,
|
|
42
|
+
data,
|
|
43
|
+
});
|
|
44
|
+
|
|
45
|
+
const result = response.data;
|
|
46
|
+
$.export("$summary", `Successfully rendered ${result?.format || "image"} from Markdown (${result?.bytesSize ?? "unknown"} bytes)`);
|
|
47
|
+
return result;
|
|
48
|
+
},
|
|
49
|
+
};
|
|
@@ -5,7 +5,7 @@ export default {
|
|
|
5
5
|
key: "rendex-render-to-image",
|
|
6
6
|
name: "Render to Image",
|
|
7
7
|
description: "Render an HTML string or a page URL to an image (or PDF) via Rendex. Returns base64-encoded image data with metadata. [See the documentation](https://rendex.dev/docs/api-reference#post-screenshot-json).",
|
|
8
|
-
version: "0.0
|
|
8
|
+
version: "0.1.0",
|
|
9
9
|
type: "action",
|
|
10
10
|
annotations: {
|
|
11
11
|
destructiveHint: false,
|
|
@@ -32,6 +32,168 @@ export default {
|
|
|
32
32
|
"format",
|
|
33
33
|
],
|
|
34
34
|
},
|
|
35
|
+
width: {
|
|
36
|
+
propDefinition: [
|
|
37
|
+
rendex,
|
|
38
|
+
"width",
|
|
39
|
+
],
|
|
40
|
+
},
|
|
41
|
+
height: {
|
|
42
|
+
propDefinition: [
|
|
43
|
+
rendex,
|
|
44
|
+
"height",
|
|
45
|
+
],
|
|
46
|
+
},
|
|
47
|
+
fullPage: {
|
|
48
|
+
propDefinition: [
|
|
49
|
+
rendex,
|
|
50
|
+
"fullPage",
|
|
51
|
+
],
|
|
52
|
+
},
|
|
53
|
+
quality: {
|
|
54
|
+
propDefinition: [
|
|
55
|
+
rendex,
|
|
56
|
+
"quality",
|
|
57
|
+
],
|
|
58
|
+
},
|
|
59
|
+
delay: {
|
|
60
|
+
propDefinition: [
|
|
61
|
+
rendex,
|
|
62
|
+
"delay",
|
|
63
|
+
],
|
|
64
|
+
},
|
|
65
|
+
darkMode: {
|
|
66
|
+
propDefinition: [
|
|
67
|
+
rendex,
|
|
68
|
+
"darkMode",
|
|
69
|
+
],
|
|
70
|
+
},
|
|
71
|
+
deviceScaleFactor: {
|
|
72
|
+
propDefinition: [
|
|
73
|
+
rendex,
|
|
74
|
+
"deviceScaleFactor",
|
|
75
|
+
],
|
|
76
|
+
},
|
|
77
|
+
device: {
|
|
78
|
+
propDefinition: [
|
|
79
|
+
rendex,
|
|
80
|
+
"device",
|
|
81
|
+
],
|
|
82
|
+
},
|
|
83
|
+
selector: {
|
|
84
|
+
propDefinition: [
|
|
85
|
+
rendex,
|
|
86
|
+
"selector",
|
|
87
|
+
],
|
|
88
|
+
},
|
|
89
|
+
hideSelectors: {
|
|
90
|
+
propDefinition: [
|
|
91
|
+
rendex,
|
|
92
|
+
"hideSelectors",
|
|
93
|
+
],
|
|
94
|
+
},
|
|
95
|
+
blockAds: {
|
|
96
|
+
propDefinition: [
|
|
97
|
+
rendex,
|
|
98
|
+
"blockAds",
|
|
99
|
+
],
|
|
100
|
+
},
|
|
101
|
+
blockCookieBanners: {
|
|
102
|
+
propDefinition: [
|
|
103
|
+
rendex,
|
|
104
|
+
"blockCookieBanners",
|
|
105
|
+
],
|
|
106
|
+
},
|
|
107
|
+
timeout: {
|
|
108
|
+
propDefinition: [
|
|
109
|
+
rendex,
|
|
110
|
+
"timeout",
|
|
111
|
+
],
|
|
112
|
+
},
|
|
113
|
+
waitUntil: {
|
|
114
|
+
propDefinition: [
|
|
115
|
+
rendex,
|
|
116
|
+
"waitUntil",
|
|
117
|
+
],
|
|
118
|
+
},
|
|
119
|
+
bestAttempt: {
|
|
120
|
+
propDefinition: [
|
|
121
|
+
rendex,
|
|
122
|
+
"bestAttempt",
|
|
123
|
+
],
|
|
124
|
+
},
|
|
125
|
+
css: {
|
|
126
|
+
propDefinition: [
|
|
127
|
+
rendex,
|
|
128
|
+
"css",
|
|
129
|
+
],
|
|
130
|
+
},
|
|
131
|
+
js: {
|
|
132
|
+
propDefinition: [
|
|
133
|
+
rendex,
|
|
134
|
+
"js",
|
|
135
|
+
],
|
|
136
|
+
},
|
|
137
|
+
userAgent: {
|
|
138
|
+
propDefinition: [
|
|
139
|
+
rendex,
|
|
140
|
+
"userAgent",
|
|
141
|
+
],
|
|
142
|
+
},
|
|
143
|
+
cookies: {
|
|
144
|
+
propDefinition: [
|
|
145
|
+
rendex,
|
|
146
|
+
"cookies",
|
|
147
|
+
],
|
|
148
|
+
},
|
|
149
|
+
headers: {
|
|
150
|
+
propDefinition: [
|
|
151
|
+
rendex,
|
|
152
|
+
"headers",
|
|
153
|
+
],
|
|
154
|
+
},
|
|
155
|
+
pdfFormat: {
|
|
156
|
+
propDefinition: [
|
|
157
|
+
rendex,
|
|
158
|
+
"pdfFormat",
|
|
159
|
+
],
|
|
160
|
+
},
|
|
161
|
+
pdfLandscape: {
|
|
162
|
+
propDefinition: [
|
|
163
|
+
rendex,
|
|
164
|
+
"pdfLandscape",
|
|
165
|
+
],
|
|
166
|
+
},
|
|
167
|
+
pdfPrintBackground: {
|
|
168
|
+
propDefinition: [
|
|
169
|
+
rendex,
|
|
170
|
+
"pdfPrintBackground",
|
|
171
|
+
],
|
|
172
|
+
},
|
|
173
|
+
pdfScale: {
|
|
174
|
+
propDefinition: [
|
|
175
|
+
rendex,
|
|
176
|
+
"pdfScale",
|
|
177
|
+
],
|
|
178
|
+
},
|
|
179
|
+
geo: {
|
|
180
|
+
propDefinition: [
|
|
181
|
+
rendex,
|
|
182
|
+
"geo",
|
|
183
|
+
],
|
|
184
|
+
},
|
|
185
|
+
geoCity: {
|
|
186
|
+
propDefinition: [
|
|
187
|
+
rendex,
|
|
188
|
+
"geoCity",
|
|
189
|
+
],
|
|
190
|
+
},
|
|
191
|
+
geoState: {
|
|
192
|
+
propDefinition: [
|
|
193
|
+
rendex,
|
|
194
|
+
"geoState",
|
|
195
|
+
],
|
|
196
|
+
},
|
|
35
197
|
},
|
|
36
198
|
async run({ $ }) {
|
|
37
199
|
// Rendex requires exactly one of `html` or `url` per request, so reject both
|
|
@@ -42,8 +204,56 @@ export default {
|
|
|
42
204
|
throw new ConfigurationError("Provide exactly one of `html` or `url`.");
|
|
43
205
|
}
|
|
44
206
|
|
|
207
|
+
let cookies;
|
|
208
|
+
if (this.cookies?.length) {
|
|
209
|
+
try {
|
|
210
|
+
cookies = this.cookies.map((cookie) => {
|
|
211
|
+
const parsed = typeof cookie === "string"
|
|
212
|
+
? JSON.parse(cookie)
|
|
213
|
+
: cookie;
|
|
214
|
+
if (!parsed || typeof parsed !== "object" || Array.isArray(parsed)) {
|
|
215
|
+
throw new Error("Invalid cookie shape");
|
|
216
|
+
}
|
|
217
|
+
return parsed;
|
|
218
|
+
});
|
|
219
|
+
} catch {
|
|
220
|
+
throw new ConfigurationError("Each cookie must be a JSON object, e.g. {\"name\":\"session\",\"value\":\"abc\"}.");
|
|
221
|
+
}
|
|
222
|
+
}
|
|
223
|
+
|
|
45
224
|
const data = {
|
|
46
225
|
format: this.format || "png",
|
|
226
|
+
width: this.width,
|
|
227
|
+
height: this.height,
|
|
228
|
+
fullPage: this.fullPage,
|
|
229
|
+
quality: this.quality,
|
|
230
|
+
delay: this.delay,
|
|
231
|
+
darkMode: this.darkMode,
|
|
232
|
+
deviceScaleFactor: this.deviceScaleFactor !== undefined
|
|
233
|
+
? Number(this.deviceScaleFactor)
|
|
234
|
+
: undefined,
|
|
235
|
+
device: this.device,
|
|
236
|
+
selector: this.selector,
|
|
237
|
+
hideSelectors: this.hideSelectors,
|
|
238
|
+
blockAds: this.blockAds,
|
|
239
|
+
blockCookieBanners: this.blockCookieBanners,
|
|
240
|
+
timeout: this.timeout,
|
|
241
|
+
waitUntil: this.waitUntil,
|
|
242
|
+
bestAttempt: this.bestAttempt,
|
|
243
|
+
css: this.css,
|
|
244
|
+
js: this.js,
|
|
245
|
+
userAgent: this.userAgent,
|
|
246
|
+
cookies,
|
|
247
|
+
headers: this.headers,
|
|
248
|
+
pdfFormat: this.pdfFormat,
|
|
249
|
+
pdfLandscape: this.pdfLandscape,
|
|
250
|
+
pdfPrintBackground: this.pdfPrintBackground,
|
|
251
|
+
pdfScale: this.pdfScale !== undefined
|
|
252
|
+
? Number(this.pdfScale)
|
|
253
|
+
: undefined,
|
|
254
|
+
geo: this.geo,
|
|
255
|
+
geoCity: this.geoCity,
|
|
256
|
+
geoState: this.geoState,
|
|
47
257
|
};
|
|
48
258
|
if (hasHtml) {
|
|
49
259
|
data.html = this.html;
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import rendex from "../../rendex.app.mjs";
|
|
2
|
+
|
|
3
|
+
export default {
|
|
4
|
+
key: "rendex-run-watch",
|
|
5
|
+
name: "Run Watch Now",
|
|
6
|
+
description: "Trigger an immediate check for a watch. The run is queued and its diff result is produced asynchronously — poll **List Watch Runs** for the completed run. [See the documentation](https://rendex.dev/docs/watch#endpoints).",
|
|
7
|
+
version: "0.0.1",
|
|
8
|
+
type: "action",
|
|
9
|
+
annotations: {
|
|
10
|
+
destructiveHint: false,
|
|
11
|
+
openWorldHint: true,
|
|
12
|
+
readOnlyHint: false,
|
|
13
|
+
},
|
|
14
|
+
props: {
|
|
15
|
+
rendex,
|
|
16
|
+
watchId: {
|
|
17
|
+
propDefinition: [
|
|
18
|
+
rendex,
|
|
19
|
+
"watchId",
|
|
20
|
+
],
|
|
21
|
+
},
|
|
22
|
+
},
|
|
23
|
+
async run({ $ }) {
|
|
24
|
+
const response = await this.rendex.runWatch(this.watchId, {
|
|
25
|
+
$,
|
|
26
|
+
});
|
|
27
|
+
|
|
28
|
+
const result = response.data;
|
|
29
|
+
$.export("$summary", `Queued run ${result?.runId} for watch ${this.watchId}`);
|
|
30
|
+
return result;
|
|
31
|
+
},
|
|
32
|
+
};
|
|
@@ -0,0 +1,148 @@
|
|
|
1
|
+
import rendex from "../../rendex.app.mjs";
|
|
2
|
+
|
|
3
|
+
export default {
|
|
4
|
+
key: "rendex-update-watch",
|
|
5
|
+
name: "Update Watch",
|
|
6
|
+
description: "Update a watch, including pausing or resuming it. Only the fields you set are changed. [See the documentation](https://rendex.dev/docs/watch#endpoints).",
|
|
7
|
+
version: "0.0.1",
|
|
8
|
+
type: "action",
|
|
9
|
+
annotations: {
|
|
10
|
+
destructiveHint: false,
|
|
11
|
+
openWorldHint: true,
|
|
12
|
+
readOnlyHint: false,
|
|
13
|
+
},
|
|
14
|
+
props: {
|
|
15
|
+
rendex,
|
|
16
|
+
watchId: {
|
|
17
|
+
propDefinition: [
|
|
18
|
+
rendex,
|
|
19
|
+
"watchId",
|
|
20
|
+
],
|
|
21
|
+
},
|
|
22
|
+
url: {
|
|
23
|
+
type: "string",
|
|
24
|
+
label: "URL",
|
|
25
|
+
description: "New page URL to monitor. Changing it re-baselines the watch on the next run.",
|
|
26
|
+
optional: true,
|
|
27
|
+
},
|
|
28
|
+
name: {
|
|
29
|
+
propDefinition: [
|
|
30
|
+
rendex,
|
|
31
|
+
"name",
|
|
32
|
+
],
|
|
33
|
+
},
|
|
34
|
+
intervalMinutes: {
|
|
35
|
+
propDefinition: [
|
|
36
|
+
rendex,
|
|
37
|
+
"intervalMinutes",
|
|
38
|
+
],
|
|
39
|
+
},
|
|
40
|
+
diffMode: {
|
|
41
|
+
propDefinition: [
|
|
42
|
+
rendex,
|
|
43
|
+
"diffMode",
|
|
44
|
+
],
|
|
45
|
+
},
|
|
46
|
+
threshold: {
|
|
47
|
+
propDefinition: [
|
|
48
|
+
rendex,
|
|
49
|
+
"threshold",
|
|
50
|
+
],
|
|
51
|
+
},
|
|
52
|
+
webhookUrl: {
|
|
53
|
+
propDefinition: [
|
|
54
|
+
rendex,
|
|
55
|
+
"webhookUrl",
|
|
56
|
+
],
|
|
57
|
+
},
|
|
58
|
+
notifyEmail: {
|
|
59
|
+
propDefinition: [
|
|
60
|
+
rendex,
|
|
61
|
+
"notifyEmail",
|
|
62
|
+
],
|
|
63
|
+
},
|
|
64
|
+
paused: {
|
|
65
|
+
propDefinition: [
|
|
66
|
+
rendex,
|
|
67
|
+
"paused",
|
|
68
|
+
],
|
|
69
|
+
},
|
|
70
|
+
renderFullPage: {
|
|
71
|
+
propDefinition: [
|
|
72
|
+
rendex,
|
|
73
|
+
"renderFullPage",
|
|
74
|
+
],
|
|
75
|
+
},
|
|
76
|
+
renderSelector: {
|
|
77
|
+
propDefinition: [
|
|
78
|
+
rendex,
|
|
79
|
+
"renderSelector",
|
|
80
|
+
],
|
|
81
|
+
},
|
|
82
|
+
ignoreText: {
|
|
83
|
+
propDefinition: [
|
|
84
|
+
rendex,
|
|
85
|
+
"ignoreText",
|
|
86
|
+
],
|
|
87
|
+
},
|
|
88
|
+
minTextChars: {
|
|
89
|
+
propDefinition: [
|
|
90
|
+
rendex,
|
|
91
|
+
"minTextChars",
|
|
92
|
+
],
|
|
93
|
+
},
|
|
94
|
+
suppressWhilePresent: {
|
|
95
|
+
propDefinition: [
|
|
96
|
+
rendex,
|
|
97
|
+
"suppressWhilePresent",
|
|
98
|
+
],
|
|
99
|
+
},
|
|
100
|
+
uaMode: {
|
|
101
|
+
propDefinition: [
|
|
102
|
+
rendex,
|
|
103
|
+
"uaMode",
|
|
104
|
+
],
|
|
105
|
+
},
|
|
106
|
+
},
|
|
107
|
+
methods: {
|
|
108
|
+
// Assemble the render knobs to PATCH from the render* props. Returns undefined
|
|
109
|
+
// when every field is empty so the body omits `renderParams` and leaves the
|
|
110
|
+
// watch's stored params untouched. Field names match the API watch schema
|
|
111
|
+
// (schemas/watch-params.ts → WatchRenderParams).
|
|
112
|
+
buildRenderParams() {
|
|
113
|
+
const renderParams = {
|
|
114
|
+
fullPage: this.renderFullPage,
|
|
115
|
+
selector: this.renderSelector,
|
|
116
|
+
ignoreText: this.ignoreText,
|
|
117
|
+
minTextChars: this.minTextChars,
|
|
118
|
+
suppressWhilePresent: this.suppressWhilePresent,
|
|
119
|
+
uaMode: this.uaMode,
|
|
120
|
+
};
|
|
121
|
+
return Object.values(renderParams).some((value) => value !== undefined)
|
|
122
|
+
? renderParams
|
|
123
|
+
: undefined;
|
|
124
|
+
},
|
|
125
|
+
},
|
|
126
|
+
async run({ $ }) {
|
|
127
|
+
const response = await this.rendex.updateWatch(this.watchId, {
|
|
128
|
+
$,
|
|
129
|
+
data: {
|
|
130
|
+
url: this.url,
|
|
131
|
+
name: this.name,
|
|
132
|
+
intervalMinutes: this.intervalMinutes,
|
|
133
|
+
diffMode: this.diffMode,
|
|
134
|
+
threshold: this.threshold !== undefined
|
|
135
|
+
? Number(this.threshold)
|
|
136
|
+
: undefined,
|
|
137
|
+
webhookUrl: this.webhookUrl,
|
|
138
|
+
notifyEmail: this.notifyEmail,
|
|
139
|
+
paused: this.paused,
|
|
140
|
+
renderParams: this.buildRenderParams(),
|
|
141
|
+
},
|
|
142
|
+
});
|
|
143
|
+
|
|
144
|
+
const watch = response.data;
|
|
145
|
+
$.export("$summary", `Updated watch ${this.watchId}`);
|
|
146
|
+
return watch;
|
|
147
|
+
},
|
|
148
|
+
};
|