You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Usage: "Scrape 25K URLs or crawl large websites asynchronously.",
134
134
Suggest: true,
@@ -144,9 +144,14 @@ var batchSubmit = cli.Command{
144
144
Usage: "Tags stored on the batch. Filter the batch list by them later.",
145
145
BodyPath: "tags",
146
146
},
147
+
&requestflag.Flag[map[string]any]{
148
+
Name: "webhook",
149
+
Usage: "Completion webhook settings. Cannot be combined with webhookUrl. Omitting retry preserves legacy delivery; retry: {} opts into durable retries.",
150
+
BodyPath: "webhook",
151
+
},
147
152
&requestflag.Flag[string]{
148
153
Name: "webhook-url",
149
-
Usage: "URL notified when the batch finishes.",
154
+
Usage: "Legacy URL notified when the batch finishes. Preserves one best-effort attempt. Cannot be combined with webhook.",
150
155
BodyPath: "webhookUrl",
151
156
},
152
157
&requestflag.Flag[string]{
@@ -157,7 +162,19 @@ var batchSubmit = cli.Command{
157
162
},
158
163
Action: handleBatchSubmit,
159
164
HideHelpCommand: true,
160
-
}
165
+
}, map[string][]requestflag.HasOuterFlag{
166
+
"webhook": {
167
+
&requestflag.InnerFlag[string]{
168
+
Name: "webhook.url",
169
+
InnerField: "url",
170
+
},
171
+
&requestflag.InnerFlag[map[string]any]{
172
+
Name: "webhook.retry",
173
+
Usage: "Opt into durable webhook delivery. An empty object uses the default retry schedule. Omit retry to preserve legacy delivery behavior. The policy is snapshotted for each event.",
Copy file name to clipboardExpand all lines: pkg/cmd/monitor.go
+10Lines changed: 10 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -86,6 +86,11 @@ var monitorsCreate = requestflag.WithInnerFlags(cli.Command{
86
86
Usage: "Events delivered to this endpoint. `change.detected` fires only when a run detects a change; `run.completed` fires on every completed run — including runs that detected no change — and embeds the change when one was detected. Defaults to `[\"change.detected\"]` when omitted.",
87
87
InnerField: "events",
88
88
},
89
+
&requestflag.InnerFlag[map[string]any]{
90
+
Name: "webhook.retry",
91
+
Usage: "Opt into durable webhook delivery. An empty object uses the default retry schedule. Omit retry to preserve legacy delivery behavior. The policy is snapshotted for each event.",
92
+
InnerField: "retry",
93
+
},
89
94
&requestflag.InnerFlag[string]{
90
95
Name: "webhook.secret",
91
96
Usage: "Signing secret used to verify webhook authenticity. Each delivery includes an `X-Context-Signature: t=<unix>,v1=<hmac>` header, where the HMAC is SHA-256 over `\"{t}.{rawRequestBody}\"` keyed by this secret. Recompute it with a constant-time compare and reject stale timestamps to prevent replay. Generated by the API; cannot be set by clients.",
@@ -185,6 +190,11 @@ var monitorsUpdate = requestflag.WithInnerFlags(cli.Command{
185
190
Usage: "Events delivered to this endpoint. `change.detected` fires only when a run detects a change; `run.completed` fires on every completed run — including runs that detected no change — and embeds the change when one was detected. Defaults to `[\"change.detected\"]` when omitted.",
186
191
InnerField: "events",
187
192
},
193
+
&requestflag.InnerFlag[map[string]any]{
194
+
Name: "webhook.retry",
195
+
Usage: "Opt into durable webhook delivery. An empty object uses the default retry schedule. Omit retry to preserve legacy delivery behavior. The policy is snapshotted for each event.",
196
+
InnerField: "retry",
197
+
},
188
198
&requestflag.InnerFlag[string]{
189
199
Name: "webhook.secret",
190
200
Usage: "Signing secret used to verify webhook authenticity. Each delivery includes an `X-Context-Signature: t=<unix>,v1=<hmac>` header, where the HMAC is SHA-256 over `\"{t}.{rawRequestBody}\"` keyed by this secret. Recompute it with a constant-time compare and reject stale timestamps to prevent replay. Generated by the API; cannot be set by clients.",
0 commit comments