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
{{ message }}
Repository navigation
Commit a2650d4
Browse filesBrowse the repository at this point in the historyBrowse files
"""Watch a sitemap for URL additions and removals."""
108
+
"""Watch a sitemap for URL additions and removals.
109
+
110
+
Crawled URLs are normalized (lowercased host, no trailing slash/fragment) and scoped to the monitored site and its subdomains before comparison. A new URL set must be observed on two consecutive runs before a change is reported, suppressing one-run crawl flaps.
111
+
"""
109
112
110
113
type: Required[Literal["sitemap"]]
111
114
@@ -119,6 +122,7 @@ class TargetMonitorsSitemapTarget(TypedDict, total=False):
119
122
"""URL path patterns to include."""
120
123
121
124
max_urls: int
125
+
"""Maximum number of sitemap URLs to track (capped at 10,000)."""
Copy file name to clipboardExpand all lines: src/context/dev/types/monitor_create_response.py
+27-1Lines changed: 27 additions & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -19,6 +19,7 @@
19
19
"TargetMonitorsPageTarget",
20
20
"TargetMonitorsSitemapTarget",
21
21
"TargetMonitorsExtractTarget",
22
+
"LastError",
22
23
"Webhook",
23
24
]
24
25
@@ -79,7 +80,10 @@ class TargetMonitorsPageTarget(BaseModel):
79
80
80
81
81
82
classTargetMonitorsSitemapTarget(BaseModel):
82
-
"""Watch a sitemap for URL additions and removals."""
83
+
"""Watch a sitemap for URL additions and removals.
84
+
85
+
Crawled URLs are normalized (lowercased host, no trailing slash/fragment) and scoped to the monitored site and its subdomains before comparison. A new URL set must be observed on two consecutive runs before a change is reported, suppressing one-run crawl flaps.
86
+
"""
83
87
84
88
type: Literal["sitemap"]
85
89
@@ -93,6 +97,7 @@ class TargetMonitorsSitemapTarget(BaseModel):
93
97
"""URL path patterns to include."""
94
98
95
99
max_urls: Optional[int] =None
100
+
"""Maximum number of sitemap URLs to track (capped at 10,000)."""
96
101
97
102
98
103
classTargetMonitorsExtractTarget(BaseModel):
@@ -127,6 +132,14 @@ class TargetMonitorsExtractTarget(BaseModel):
127
132
]
128
133
129
134
135
+
classLastError(BaseModel):
136
+
"""Error from the most recent failed run; null when the last run succeeded."""
137
+
138
+
code: str
139
+
140
+
message: str
141
+
142
+
130
143
classWebhook(BaseModel):
131
144
url: str
132
145
"""Webhook URL called when a change is detected."""
@@ -171,6 +184,13 @@ class MonitorCreateResponse(BaseModel):
171
184
"""
172
185
173
186
status: Literal["active", "paused", "failed"]
187
+
"""Monitor lifecycle status.
188
+
189
+
`failed` means the most recent run failed (see the monitor's `last_error`);
190
+
failed monitors keep running on schedule and flip back to `active` on the next
191
+
successful run. Monitors are auto-`paused` after repeated consecutive failures
192
+
or insufficient-credit skips; resume by PATCHing status to `active`.
193
+
"""
174
194
175
195
target: Target
176
196
"""Discriminated union describing what the monitor watches."""
@@ -179,8 +199,14 @@ class MonitorCreateResponse(BaseModel):
179
199
180
200
last_change_at: Optional[datetime] =None
181
201
202
+
last_error: Optional[LastError] =None
203
+
"""Error from the most recent failed run; null when the last run succeeded."""
204
+
182
205
last_run_at: Optional[datetime] =None
183
206
207
+
next_run_at: Optional[datetime] =None
208
+
"""When the next scheduled run is due."""
209
+
184
210
tags: Optional[List[str]] =None
185
211
"""User-defined tags for grouping and filtering monitors and their changes."""
Copy file name to clipboardExpand all lines: src/context/dev/types/monitor_list_response.py
+27-1Lines changed: 27 additions & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -20,6 +20,7 @@
20
20
"DataTargetMonitorsPageTarget",
21
21
"DataTargetMonitorsSitemapTarget",
22
22
"DataTargetMonitorsExtractTarget",
23
+
"DataLastError",
23
24
"DataWebhook",
24
25
]
25
26
@@ -80,7 +81,10 @@ class DataTargetMonitorsPageTarget(BaseModel):
80
81
81
82
82
83
classDataTargetMonitorsSitemapTarget(BaseModel):
83
-
"""Watch a sitemap for URL additions and removals."""
84
+
"""Watch a sitemap for URL additions and removals.
85
+
86
+
Crawled URLs are normalized (lowercased host, no trailing slash/fragment) and scoped to the monitored site and its subdomains before comparison. A new URL set must be observed on two consecutive runs before a change is reported, suppressing one-run crawl flaps.
87
+
"""
84
88
85
89
type: Literal["sitemap"]
86
90
@@ -94,6 +98,7 @@ class DataTargetMonitorsSitemapTarget(BaseModel):
94
98
"""URL path patterns to include."""
95
99
96
100
max_urls: Optional[int] =None
101
+
"""Maximum number of sitemap URLs to track (capped at 10,000)."""
97
102
98
103
99
104
classDataTargetMonitorsExtractTarget(BaseModel):
@@ -128,6 +133,14 @@ class DataTargetMonitorsExtractTarget(BaseModel):
128
133
]
129
134
130
135
136
+
classDataLastError(BaseModel):
137
+
"""Error from the most recent failed run; null when the last run succeeded."""
138
+
139
+
code: str
140
+
141
+
message: str
142
+
143
+
131
144
classDataWebhook(BaseModel):
132
145
url: str
133
146
"""Webhook URL called when a change is detected."""
@@ -172,6 +185,13 @@ class Data(BaseModel):
172
185
"""
173
186
174
187
status: Literal["active", "paused", "failed"]
188
+
"""Monitor lifecycle status.
189
+
190
+
`failed` means the most recent run failed (see the monitor's `last_error`);
191
+
failed monitors keep running on schedule and flip back to `active` on the next
192
+
successful run. Monitors are auto-`paused` after repeated consecutive failures
193
+
or insufficient-credit skips; resume by PATCHing status to `active`.
194
+
"""
175
195
176
196
target: DataTarget
177
197
"""Discriminated union describing what the monitor watches."""
@@ -180,8 +200,14 @@ class Data(BaseModel):
180
200
181
201
last_change_at: Optional[datetime] =None
182
202
203
+
last_error: Optional[DataLastError] =None
204
+
"""Error from the most recent failed run; null when the last run succeeded."""
205
+
183
206
last_run_at: Optional[datetime] =None
184
207
208
+
next_run_at: Optional[datetime] =None
209
+
"""When the next scheduled run is due."""
210
+
185
211
tags: Optional[List[str]] =None
186
212
"""User-defined tags for grouping and filtering monitors and their changes."""
0 commit comments