context.dev 2.2.0 → 2.3.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.
- checksums.yaml +4 -4
- data/CHANGELOG.md +14 -0
- data/README.md +1 -1
- data/lib/context_dev/client.rb +7 -2
- data/lib/context_dev/internal/type/base_model.rb +5 -5
- data/lib/context_dev/models/monitor_create_params.rb +28 -3
- data/lib/context_dev/models/monitor_create_response.rb +96 -4
- data/lib/context_dev/models/monitor_list_account_runs_response.rb +19 -98
- data/lib/context_dev/models/monitor_list_response.rb +100 -4
- data/lib/context_dev/models/monitor_list_runs_response.rb +19 -96
- data/lib/context_dev/models/monitor_retrieve_change_response.rb +10 -10
- data/lib/context_dev/models/monitor_retrieve_response.rb +97 -4
- data/lib/context_dev/models/monitor_update_params.rb +28 -3
- data/lib/context_dev/models/monitor_update_response.rb +96 -4
- data/lib/context_dev/models/parse_handle_params.rb +110 -0
- data/lib/context_dev/models/parse_handle_response.rb +132 -0
- data/lib/context_dev/models/web_web_crawl_md_params.rb +16 -6
- data/lib/context_dev/models/web_web_scrape_html_params.rb +16 -6
- data/lib/context_dev/models/web_web_scrape_md_params.rb +16 -6
- data/lib/context_dev/models/web_web_scrape_md_response.rb +11 -1
- data/lib/context_dev/models/webhook_delivery.rb +109 -0
- data/lib/context_dev/models.rb +4 -0
- data/lib/context_dev/resources/monitors.rb +3 -2
- data/lib/context_dev/resources/parse.rb +63 -0
- data/lib/context_dev/resources/web.rb +19 -4
- data/lib/context_dev/version.rb +1 -1
- data/lib/context_dev.rb +4 -0
- data/rbi/context_dev/client.rbi +6 -2
- data/rbi/context_dev/models/monitor_create_params.rbi +85 -5
- data/rbi/context_dev/models/monitor_create_response.rbi +234 -6
- data/rbi/context_dev/models/monitor_list_account_runs_response.rbi +27 -192
- data/rbi/context_dev/models/monitor_list_response.rbi +235 -5
- data/rbi/context_dev/models/monitor_list_runs_response.rbi +27 -192
- data/rbi/context_dev/models/monitor_retrieve_change_response.rbi +12 -15
- data/rbi/context_dev/models/monitor_retrieve_response.rbi +234 -6
- data/rbi/context_dev/models/monitor_update_params.rbi +85 -5
- data/rbi/context_dev/models/monitor_update_response.rbi +234 -6
- data/rbi/context_dev/models/parse_handle_params.rbi +163 -0
- data/rbi/context_dev/models/parse_handle_response.rbi +377 -0
- data/rbi/context_dev/models/web_web_crawl_md_params.rbi +26 -7
- data/rbi/context_dev/models/web_web_scrape_html_params.rbi +26 -7
- data/rbi/context_dev/models/web_web_scrape_md_params.rbi +26 -7
- data/rbi/context_dev/models/web_web_scrape_md_response.rbi +12 -0
- data/rbi/context_dev/models/webhook_delivery.rbi +172 -0
- data/rbi/context_dev/models.rbi +4 -0
- data/rbi/context_dev/resources/monitors.rbi +3 -2
- data/rbi/context_dev/resources/parse.rbi +65 -0
- data/rbi/context_dev/resources/web.rbi +22 -7
- data/sig/context_dev/client.rbs +2 -0
- data/sig/context_dev/models/monitor_create_params.rbs +32 -3
- data/sig/context_dev/models/monitor_create_response.rbs +85 -6
- data/sig/context_dev/models/monitor_list_account_runs_response.rbs +15 -68
- data/sig/context_dev/models/monitor_list_response.rbs +85 -6
- data/sig/context_dev/models/monitor_list_runs_response.rbs +15 -68
- data/sig/context_dev/models/monitor_retrieve_change_response.rbs +8 -10
- data/sig/context_dev/models/monitor_retrieve_response.rbs +85 -6
- data/sig/context_dev/models/monitor_update_params.rbs +32 -3
- data/sig/context_dev/models/monitor_update_response.rbs +85 -6
- data/sig/context_dev/models/parse_handle_params.rbs +96 -0
- data/sig/context_dev/models/parse_handle_response.rbs +159 -0
- data/sig/context_dev/models/web_web_crawl_md_params.rbs +13 -2
- data/sig/context_dev/models/web_web_scrape_html_params.rbs +13 -2
- data/sig/context_dev/models/web_web_scrape_md_params.rbs +13 -2
- data/sig/context_dev/models/web_web_scrape_md_response.rbs +5 -0
- data/sig/context_dev/models/webhook_delivery.rbs +81 -0
- data/sig/context_dev/models.rbs +4 -0
- data/sig/context_dev/resources/parse.rbs +22 -0
- metadata +14 -2
|
@@ -179,6 +179,28 @@ module ContextDev
|
|
|
179
179
|
end
|
|
180
180
|
attr_writer :webhook
|
|
181
181
|
|
|
182
|
+
# Present while webhook deliveries are failing consecutively; null when deliveries
|
|
183
|
+
# are healthy or no webhook is configured. Cleared on the next successful delivery
|
|
184
|
+
# and when the webhook URL changes.
|
|
185
|
+
sig do
|
|
186
|
+
returns(
|
|
187
|
+
T.nilable(
|
|
188
|
+
ContextDev::Models::MonitorListResponse::Data::WebhookFailure
|
|
189
|
+
)
|
|
190
|
+
)
|
|
191
|
+
end
|
|
192
|
+
attr_reader :webhook_failure
|
|
193
|
+
|
|
194
|
+
sig do
|
|
195
|
+
params(
|
|
196
|
+
webhook_failure:
|
|
197
|
+
T.nilable(
|
|
198
|
+
ContextDev::Models::MonitorListResponse::Data::WebhookFailure::OrHash
|
|
199
|
+
)
|
|
200
|
+
).void
|
|
201
|
+
end
|
|
202
|
+
attr_writer :webhook_failure
|
|
203
|
+
|
|
182
204
|
# A web monitor. `mode` is the constant `web`; behavior is described by `target`
|
|
183
205
|
# (page/sitemap/extract) and `change_detection` (exact/semantic).
|
|
184
206
|
sig do
|
|
@@ -222,6 +244,10 @@ module ContextDev
|
|
|
222
244
|
webhook:
|
|
223
245
|
T.nilable(
|
|
224
246
|
ContextDev::Models::MonitorListResponse::Data::Webhook::OrHash
|
|
247
|
+
),
|
|
248
|
+
webhook_failure:
|
|
249
|
+
T.nilable(
|
|
250
|
+
ContextDev::Models::MonitorListResponse::Data::WebhookFailure::OrHash
|
|
225
251
|
)
|
|
226
252
|
).returns(T.attached_class)
|
|
227
253
|
end
|
|
@@ -260,7 +286,11 @@ module ContextDev
|
|
|
260
286
|
next_run_at: nil,
|
|
261
287
|
# User-defined tags for grouping and filtering monitors and their changes.
|
|
262
288
|
tags: nil,
|
|
263
|
-
webhook: nil
|
|
289
|
+
webhook: nil,
|
|
290
|
+
# Present while webhook deliveries are failing consecutively; null when deliveries
|
|
291
|
+
# are healthy or no webhook is configured. Cleared on the next successful delivery
|
|
292
|
+
# and when the webhook URL changes.
|
|
293
|
+
webhook_failure: nil
|
|
264
294
|
)
|
|
265
295
|
end
|
|
266
296
|
|
|
@@ -295,6 +325,10 @@ module ContextDev
|
|
|
295
325
|
webhook:
|
|
296
326
|
T.nilable(
|
|
297
327
|
ContextDev::Models::MonitorListResponse::Data::Webhook
|
|
328
|
+
),
|
|
329
|
+
webhook_failure:
|
|
330
|
+
T.nilable(
|
|
331
|
+
ContextDev::Models::MonitorListResponse::Data::WebhookFailure
|
|
298
332
|
)
|
|
299
333
|
}
|
|
300
334
|
)
|
|
@@ -1061,10 +1095,35 @@ module ContextDev
|
|
|
1061
1095
|
)
|
|
1062
1096
|
end
|
|
1063
1097
|
|
|
1064
|
-
# Webhook URL
|
|
1098
|
+
# Webhook URL events are delivered to.
|
|
1065
1099
|
sig { returns(String) }
|
|
1066
1100
|
attr_accessor :url
|
|
1067
1101
|
|
|
1102
|
+
# Events delivered to this endpoint. `change.detected` fires only when a run
|
|
1103
|
+
# detects a change; `run.completed` fires on every completed run — including runs
|
|
1104
|
+
# that detected no change — and embeds the change when one was detected. Defaults
|
|
1105
|
+
# to `["change.detected"]` when omitted.
|
|
1106
|
+
sig do
|
|
1107
|
+
returns(
|
|
1108
|
+
T.nilable(
|
|
1109
|
+
T::Array[
|
|
1110
|
+
ContextDev::Models::MonitorListResponse::Data::Webhook::Event::TaggedSymbol
|
|
1111
|
+
]
|
|
1112
|
+
)
|
|
1113
|
+
)
|
|
1114
|
+
end
|
|
1115
|
+
attr_reader :events
|
|
1116
|
+
|
|
1117
|
+
sig do
|
|
1118
|
+
params(
|
|
1119
|
+
events:
|
|
1120
|
+
T::Array[
|
|
1121
|
+
ContextDev::Models::MonitorListResponse::Data::Webhook::Event::OrSymbol
|
|
1122
|
+
]
|
|
1123
|
+
).void
|
|
1124
|
+
end
|
|
1125
|
+
attr_writer :events
|
|
1126
|
+
|
|
1068
1127
|
# Signing secret used to verify webhook authenticity. Each delivery includes an
|
|
1069
1128
|
# `X-Context-Signature: t=<unix>,v1=<hmac>` header, where the HMAC is SHA-256 over
|
|
1070
1129
|
# `"{t}.{rawRequestBody}"` keyed by this secret. Recompute it with a constant-time
|
|
@@ -1076,10 +1135,24 @@ module ContextDev
|
|
|
1076
1135
|
sig { params(secret: String).void }
|
|
1077
1136
|
attr_writer :secret
|
|
1078
1137
|
|
|
1079
|
-
sig
|
|
1138
|
+
sig do
|
|
1139
|
+
params(
|
|
1140
|
+
url: String,
|
|
1141
|
+
events:
|
|
1142
|
+
T::Array[
|
|
1143
|
+
ContextDev::Models::MonitorListResponse::Data::Webhook::Event::OrSymbol
|
|
1144
|
+
],
|
|
1145
|
+
secret: String
|
|
1146
|
+
).returns(T.attached_class)
|
|
1147
|
+
end
|
|
1080
1148
|
def self.new(
|
|
1081
|
-
# Webhook URL
|
|
1149
|
+
# Webhook URL events are delivered to.
|
|
1082
1150
|
url:,
|
|
1151
|
+
# Events delivered to this endpoint. `change.detected` fires only when a run
|
|
1152
|
+
# detects a change; `run.completed` fires on every completed run — including runs
|
|
1153
|
+
# that detected no change — and embeds the change when one was detected. Defaults
|
|
1154
|
+
# to `["change.detected"]` when omitted.
|
|
1155
|
+
events: nil,
|
|
1083
1156
|
# Signing secret used to verify webhook authenticity. Each delivery includes an
|
|
1084
1157
|
# `X-Context-Signature: t=<unix>,v1=<hmac>` header, where the HMAC is SHA-256 over
|
|
1085
1158
|
# `"{t}.{rawRequestBody}"` keyed by this secret. Recompute it with a constant-time
|
|
@@ -1089,9 +1162,166 @@ module ContextDev
|
|
|
1089
1162
|
)
|
|
1090
1163
|
end
|
|
1091
1164
|
|
|
1092
|
-
sig
|
|
1165
|
+
sig do
|
|
1166
|
+
override.returns(
|
|
1167
|
+
{
|
|
1168
|
+
url: String,
|
|
1169
|
+
events:
|
|
1170
|
+
T::Array[
|
|
1171
|
+
ContextDev::Models::MonitorListResponse::Data::Webhook::Event::TaggedSymbol
|
|
1172
|
+
],
|
|
1173
|
+
secret: String
|
|
1174
|
+
}
|
|
1175
|
+
)
|
|
1176
|
+
end
|
|
1177
|
+
def to_hash
|
|
1178
|
+
end
|
|
1179
|
+
|
|
1180
|
+
module Event
|
|
1181
|
+
extend ContextDev::Internal::Type::Enum
|
|
1182
|
+
|
|
1183
|
+
TaggedSymbol =
|
|
1184
|
+
T.type_alias do
|
|
1185
|
+
T.all(
|
|
1186
|
+
Symbol,
|
|
1187
|
+
ContextDev::Models::MonitorListResponse::Data::Webhook::Event
|
|
1188
|
+
)
|
|
1189
|
+
end
|
|
1190
|
+
OrSymbol = T.type_alias { T.any(Symbol, String) }
|
|
1191
|
+
|
|
1192
|
+
CHANGE_DETECTED =
|
|
1193
|
+
T.let(
|
|
1194
|
+
:"change.detected",
|
|
1195
|
+
ContextDev::Models::MonitorListResponse::Data::Webhook::Event::TaggedSymbol
|
|
1196
|
+
)
|
|
1197
|
+
RUN_COMPLETED =
|
|
1198
|
+
T.let(
|
|
1199
|
+
:"run.completed",
|
|
1200
|
+
ContextDev::Models::MonitorListResponse::Data::Webhook::Event::TaggedSymbol
|
|
1201
|
+
)
|
|
1202
|
+
|
|
1203
|
+
sig do
|
|
1204
|
+
override.returns(
|
|
1205
|
+
T::Array[
|
|
1206
|
+
ContextDev::Models::MonitorListResponse::Data::Webhook::Event::TaggedSymbol
|
|
1207
|
+
]
|
|
1208
|
+
)
|
|
1209
|
+
end
|
|
1210
|
+
def self.values
|
|
1211
|
+
end
|
|
1212
|
+
end
|
|
1213
|
+
end
|
|
1214
|
+
|
|
1215
|
+
class WebhookFailure < ContextDev::Internal::Type::BaseModel
|
|
1216
|
+
OrHash =
|
|
1217
|
+
T.type_alias do
|
|
1218
|
+
T.any(
|
|
1219
|
+
ContextDev::Models::MonitorListResponse::Data::WebhookFailure,
|
|
1220
|
+
ContextDev::Internal::AnyHash
|
|
1221
|
+
)
|
|
1222
|
+
end
|
|
1223
|
+
|
|
1224
|
+
# Number of consecutive delivery attempts that did not succeed.
|
|
1225
|
+
sig { returns(Integer) }
|
|
1226
|
+
attr_accessor :consecutive_failures
|
|
1227
|
+
|
|
1228
|
+
sig { returns(Time) }
|
|
1229
|
+
attr_accessor :last_failed_at
|
|
1230
|
+
|
|
1231
|
+
# Human-readable description of the most recent failure.
|
|
1232
|
+
sig { returns(String) }
|
|
1233
|
+
attr_accessor :last_message
|
|
1234
|
+
|
|
1235
|
+
# Outcome of the most recent failed delivery. rejected means a non-2xx response;
|
|
1236
|
+
# failed means no HTTP response was received; skipped_unsafe_url means the URL
|
|
1237
|
+
# failed the public-endpoint safety check.
|
|
1238
|
+
sig do
|
|
1239
|
+
returns(
|
|
1240
|
+
ContextDev::Models::MonitorListResponse::Data::WebhookFailure::LastStatus::TaggedSymbol
|
|
1241
|
+
)
|
|
1242
|
+
end
|
|
1243
|
+
attr_accessor :last_status
|
|
1244
|
+
|
|
1245
|
+
# Present while webhook deliveries are failing consecutively; null when deliveries
|
|
1246
|
+
# are healthy or no webhook is configured. Cleared on the next successful delivery
|
|
1247
|
+
# and when the webhook URL changes.
|
|
1248
|
+
sig do
|
|
1249
|
+
params(
|
|
1250
|
+
consecutive_failures: Integer,
|
|
1251
|
+
last_failed_at: Time,
|
|
1252
|
+
last_message: String,
|
|
1253
|
+
last_status:
|
|
1254
|
+
ContextDev::Models::MonitorListResponse::Data::WebhookFailure::LastStatus::OrSymbol
|
|
1255
|
+
).returns(T.attached_class)
|
|
1256
|
+
end
|
|
1257
|
+
def self.new(
|
|
1258
|
+
# Number of consecutive delivery attempts that did not succeed.
|
|
1259
|
+
consecutive_failures:,
|
|
1260
|
+
last_failed_at:,
|
|
1261
|
+
# Human-readable description of the most recent failure.
|
|
1262
|
+
last_message:,
|
|
1263
|
+
# Outcome of the most recent failed delivery. rejected means a non-2xx response;
|
|
1264
|
+
# failed means no HTTP response was received; skipped_unsafe_url means the URL
|
|
1265
|
+
# failed the public-endpoint safety check.
|
|
1266
|
+
last_status:
|
|
1267
|
+
)
|
|
1268
|
+
end
|
|
1269
|
+
|
|
1270
|
+
sig do
|
|
1271
|
+
override.returns(
|
|
1272
|
+
{
|
|
1273
|
+
consecutive_failures: Integer,
|
|
1274
|
+
last_failed_at: Time,
|
|
1275
|
+
last_message: String,
|
|
1276
|
+
last_status:
|
|
1277
|
+
ContextDev::Models::MonitorListResponse::Data::WebhookFailure::LastStatus::TaggedSymbol
|
|
1278
|
+
}
|
|
1279
|
+
)
|
|
1280
|
+
end
|
|
1093
1281
|
def to_hash
|
|
1094
1282
|
end
|
|
1283
|
+
|
|
1284
|
+
# Outcome of the most recent failed delivery. rejected means a non-2xx response;
|
|
1285
|
+
# failed means no HTTP response was received; skipped_unsafe_url means the URL
|
|
1286
|
+
# failed the public-endpoint safety check.
|
|
1287
|
+
module LastStatus
|
|
1288
|
+
extend ContextDev::Internal::Type::Enum
|
|
1289
|
+
|
|
1290
|
+
TaggedSymbol =
|
|
1291
|
+
T.type_alias do
|
|
1292
|
+
T.all(
|
|
1293
|
+
Symbol,
|
|
1294
|
+
ContextDev::Models::MonitorListResponse::Data::WebhookFailure::LastStatus
|
|
1295
|
+
)
|
|
1296
|
+
end
|
|
1297
|
+
OrSymbol = T.type_alias { T.any(Symbol, String) }
|
|
1298
|
+
|
|
1299
|
+
REJECTED =
|
|
1300
|
+
T.let(
|
|
1301
|
+
:rejected,
|
|
1302
|
+
ContextDev::Models::MonitorListResponse::Data::WebhookFailure::LastStatus::TaggedSymbol
|
|
1303
|
+
)
|
|
1304
|
+
FAILED =
|
|
1305
|
+
T.let(
|
|
1306
|
+
:failed,
|
|
1307
|
+
ContextDev::Models::MonitorListResponse::Data::WebhookFailure::LastStatus::TaggedSymbol
|
|
1308
|
+
)
|
|
1309
|
+
SKIPPED_UNSAFE_URL =
|
|
1310
|
+
T.let(
|
|
1311
|
+
:skipped_unsafe_url,
|
|
1312
|
+
ContextDev::Models::MonitorListResponse::Data::WebhookFailure::LastStatus::TaggedSymbol
|
|
1313
|
+
)
|
|
1314
|
+
|
|
1315
|
+
sig do
|
|
1316
|
+
override.returns(
|
|
1317
|
+
T::Array[
|
|
1318
|
+
ContextDev::Models::MonitorListResponse::Data::WebhookFailure::LastStatus::TaggedSymbol
|
|
1319
|
+
]
|
|
1320
|
+
)
|
|
1321
|
+
end
|
|
1322
|
+
def self.values
|
|
1323
|
+
end
|
|
1324
|
+
end
|
|
1095
1325
|
end
|
|
1096
1326
|
end
|
|
1097
1327
|
end
|
|
@@ -139,23 +139,27 @@ module ContextDev
|
|
|
139
139
|
sig { returns(T.nilable(Time)) }
|
|
140
140
|
attr_accessor :started_at
|
|
141
141
|
|
|
142
|
-
#
|
|
143
|
-
# no webhook was attempted, including
|
|
144
|
-
#
|
|
142
|
+
# All webhook deliveries attempted by this run — one per subscribed event that
|
|
143
|
+
# fired. Omitted when no webhook was attempted, including runs created before
|
|
144
|
+
# event selection was added.
|
|
145
|
+
sig { returns(T.nilable(T::Array[ContextDev::WebhookDelivery])) }
|
|
146
|
+
attr_reader :webhook_deliveries
|
|
147
|
+
|
|
145
148
|
sig do
|
|
146
|
-
|
|
147
|
-
T
|
|
148
|
-
|
|
149
|
-
)
|
|
150
|
-
)
|
|
149
|
+
params(
|
|
150
|
+
webhook_deliveries: T::Array[ContextDev::WebhookDelivery::OrHash]
|
|
151
|
+
).void
|
|
151
152
|
end
|
|
153
|
+
attr_writer :webhook_deliveries
|
|
154
|
+
|
|
155
|
+
# Deprecated: use `webhook_deliveries`, which records every attempt now that a run
|
|
156
|
+
# can deliver multiple events. Omitted when no webhook was attempted, including
|
|
157
|
+
# historical runs created before delivery tracking was added.
|
|
158
|
+
sig { returns(T.nilable(ContextDev::WebhookDelivery)) }
|
|
152
159
|
attr_reader :webhook_delivery
|
|
153
160
|
|
|
154
161
|
sig do
|
|
155
|
-
params(
|
|
156
|
-
webhook_delivery:
|
|
157
|
-
ContextDev::Models::MonitorListRunsResponse::Data::WebhookDelivery::OrHash
|
|
158
|
-
).void
|
|
162
|
+
params(webhook_delivery: ContextDev::WebhookDelivery::OrHash).void
|
|
159
163
|
end
|
|
160
164
|
attr_writer :webhook_delivery
|
|
161
165
|
|
|
@@ -185,8 +189,8 @@ module ContextDev
|
|
|
185
189
|
ContextDev::Models::MonitorListRunsResponse::Data::SkipReason::OrSymbol
|
|
186
190
|
),
|
|
187
191
|
started_at: T.nilable(Time),
|
|
188
|
-
|
|
189
|
-
|
|
192
|
+
webhook_deliveries: T::Array[ContextDev::WebhookDelivery::OrHash],
|
|
193
|
+
webhook_delivery: ContextDev::WebhookDelivery::OrHash
|
|
190
194
|
).returns(T.attached_class)
|
|
191
195
|
end
|
|
192
196
|
def self.new(
|
|
@@ -211,9 +215,13 @@ module ContextDev
|
|
|
211
215
|
# Why a skipped run never executed; null unless status is `skipped`.
|
|
212
216
|
skip_reason: nil,
|
|
213
217
|
started_at: nil,
|
|
214
|
-
#
|
|
215
|
-
# no webhook was attempted, including
|
|
216
|
-
#
|
|
218
|
+
# All webhook deliveries attempted by this run — one per subscribed event that
|
|
219
|
+
# fired. Omitted when no webhook was attempted, including runs created before
|
|
220
|
+
# event selection was added.
|
|
221
|
+
webhook_deliveries: nil,
|
|
222
|
+
# Deprecated: use `webhook_deliveries`, which records every attempt now that a run
|
|
223
|
+
# can deliver multiple events. Omitted when no webhook was attempted, including
|
|
224
|
+
# historical runs created before delivery tracking was added.
|
|
217
225
|
webhook_delivery: nil
|
|
218
226
|
)
|
|
219
227
|
end
|
|
@@ -245,8 +253,8 @@ module ContextDev
|
|
|
245
253
|
ContextDev::Models::MonitorListRunsResponse::Data::SkipReason::TaggedSymbol
|
|
246
254
|
),
|
|
247
255
|
started_at: T.nilable(Time),
|
|
248
|
-
|
|
249
|
-
|
|
256
|
+
webhook_deliveries: T::Array[ContextDev::WebhookDelivery],
|
|
257
|
+
webhook_delivery: ContextDev::WebhookDelivery
|
|
250
258
|
}
|
|
251
259
|
)
|
|
252
260
|
end
|
|
@@ -477,179 +485,6 @@ module ContextDev
|
|
|
477
485
|
def self.values
|
|
478
486
|
end
|
|
479
487
|
end
|
|
480
|
-
|
|
481
|
-
class WebhookDelivery < ContextDev::Internal::Type::BaseModel
|
|
482
|
-
OrHash =
|
|
483
|
-
T.type_alias do
|
|
484
|
-
T.any(
|
|
485
|
-
ContextDev::Models::MonitorListRunsResponse::Data::WebhookDelivery,
|
|
486
|
-
ContextDev::Internal::AnyHash
|
|
487
|
-
)
|
|
488
|
-
end
|
|
489
|
-
|
|
490
|
-
sig { returns(Time) }
|
|
491
|
-
attr_accessor :attempted_at
|
|
492
|
-
|
|
493
|
-
sig do
|
|
494
|
-
returns(
|
|
495
|
-
T.nilable(
|
|
496
|
-
ContextDev::Models::MonitorListRunsResponse::Data::WebhookDelivery::Error
|
|
497
|
-
)
|
|
498
|
-
)
|
|
499
|
-
end
|
|
500
|
-
attr_reader :error
|
|
501
|
-
|
|
502
|
-
sig do
|
|
503
|
-
params(
|
|
504
|
-
error:
|
|
505
|
-
T.nilable(
|
|
506
|
-
ContextDev::Models::MonitorListRunsResponse::Data::WebhookDelivery::Error::OrHash
|
|
507
|
-
)
|
|
508
|
-
).void
|
|
509
|
-
end
|
|
510
|
-
attr_writer :error
|
|
511
|
-
|
|
512
|
-
# Identifier sent in the X-Context-Id header.
|
|
513
|
-
sig { returns(String) }
|
|
514
|
-
attr_accessor :event_id
|
|
515
|
-
|
|
516
|
-
# The endpoint's final HTTP response status, or null when no response was
|
|
517
|
-
# received.
|
|
518
|
-
sig { returns(T.nilable(Integer)) }
|
|
519
|
-
attr_accessor :http_status
|
|
520
|
-
|
|
521
|
-
# Delivery outcome. delivered means any 2xx response; rejected means a non-2xx
|
|
522
|
-
# response; failed means no HTTP response was received; skipped_unsafe_url means
|
|
523
|
-
# the URL failed the public-endpoint safety check.
|
|
524
|
-
sig do
|
|
525
|
-
returns(
|
|
526
|
-
ContextDev::Models::MonitorListRunsResponse::Data::WebhookDelivery::Status::TaggedSymbol
|
|
527
|
-
)
|
|
528
|
-
end
|
|
529
|
-
attr_accessor :status
|
|
530
|
-
|
|
531
|
-
# The webhook delivery attempted for a change detected by this run. Omitted when
|
|
532
|
-
# no webhook was attempted, including historical runs created before delivery
|
|
533
|
-
# tracking was added.
|
|
534
|
-
sig do
|
|
535
|
-
params(
|
|
536
|
-
attempted_at: Time,
|
|
537
|
-
error:
|
|
538
|
-
T.nilable(
|
|
539
|
-
ContextDev::Models::MonitorListRunsResponse::Data::WebhookDelivery::Error::OrHash
|
|
540
|
-
),
|
|
541
|
-
event_id: String,
|
|
542
|
-
http_status: T.nilable(Integer),
|
|
543
|
-
status:
|
|
544
|
-
ContextDev::Models::MonitorListRunsResponse::Data::WebhookDelivery::Status::OrSymbol
|
|
545
|
-
).returns(T.attached_class)
|
|
546
|
-
end
|
|
547
|
-
def self.new(
|
|
548
|
-
attempted_at:,
|
|
549
|
-
error:,
|
|
550
|
-
# Identifier sent in the X-Context-Id header.
|
|
551
|
-
event_id:,
|
|
552
|
-
# The endpoint's final HTTP response status, or null when no response was
|
|
553
|
-
# received.
|
|
554
|
-
http_status:,
|
|
555
|
-
# Delivery outcome. delivered means any 2xx response; rejected means a non-2xx
|
|
556
|
-
# response; failed means no HTTP response was received; skipped_unsafe_url means
|
|
557
|
-
# the URL failed the public-endpoint safety check.
|
|
558
|
-
status:
|
|
559
|
-
)
|
|
560
|
-
end
|
|
561
|
-
|
|
562
|
-
sig do
|
|
563
|
-
override.returns(
|
|
564
|
-
{
|
|
565
|
-
attempted_at: Time,
|
|
566
|
-
error:
|
|
567
|
-
T.nilable(
|
|
568
|
-
ContextDev::Models::MonitorListRunsResponse::Data::WebhookDelivery::Error
|
|
569
|
-
),
|
|
570
|
-
event_id: String,
|
|
571
|
-
http_status: T.nilable(Integer),
|
|
572
|
-
status:
|
|
573
|
-
ContextDev::Models::MonitorListRunsResponse::Data::WebhookDelivery::Status::TaggedSymbol
|
|
574
|
-
}
|
|
575
|
-
)
|
|
576
|
-
end
|
|
577
|
-
def to_hash
|
|
578
|
-
end
|
|
579
|
-
|
|
580
|
-
class Error < ContextDev::Internal::Type::BaseModel
|
|
581
|
-
OrHash =
|
|
582
|
-
T.type_alias do
|
|
583
|
-
T.any(
|
|
584
|
-
ContextDev::Models::MonitorListRunsResponse::Data::WebhookDelivery::Error,
|
|
585
|
-
ContextDev::Internal::AnyHash
|
|
586
|
-
)
|
|
587
|
-
end
|
|
588
|
-
|
|
589
|
-
sig { returns(String) }
|
|
590
|
-
attr_accessor :code
|
|
591
|
-
|
|
592
|
-
sig { returns(String) }
|
|
593
|
-
attr_accessor :message
|
|
594
|
-
|
|
595
|
-
sig do
|
|
596
|
-
params(code: String, message: String).returns(T.attached_class)
|
|
597
|
-
end
|
|
598
|
-
def self.new(code:, message:)
|
|
599
|
-
end
|
|
600
|
-
|
|
601
|
-
sig { override.returns({ code: String, message: String }) }
|
|
602
|
-
def to_hash
|
|
603
|
-
end
|
|
604
|
-
end
|
|
605
|
-
|
|
606
|
-
# Delivery outcome. delivered means any 2xx response; rejected means a non-2xx
|
|
607
|
-
# response; failed means no HTTP response was received; skipped_unsafe_url means
|
|
608
|
-
# the URL failed the public-endpoint safety check.
|
|
609
|
-
module Status
|
|
610
|
-
extend ContextDev::Internal::Type::Enum
|
|
611
|
-
|
|
612
|
-
TaggedSymbol =
|
|
613
|
-
T.type_alias do
|
|
614
|
-
T.all(
|
|
615
|
-
Symbol,
|
|
616
|
-
ContextDev::Models::MonitorListRunsResponse::Data::WebhookDelivery::Status
|
|
617
|
-
)
|
|
618
|
-
end
|
|
619
|
-
OrSymbol = T.type_alias { T.any(Symbol, String) }
|
|
620
|
-
|
|
621
|
-
DELIVERED =
|
|
622
|
-
T.let(
|
|
623
|
-
:delivered,
|
|
624
|
-
ContextDev::Models::MonitorListRunsResponse::Data::WebhookDelivery::Status::TaggedSymbol
|
|
625
|
-
)
|
|
626
|
-
REJECTED =
|
|
627
|
-
T.let(
|
|
628
|
-
:rejected,
|
|
629
|
-
ContextDev::Models::MonitorListRunsResponse::Data::WebhookDelivery::Status::TaggedSymbol
|
|
630
|
-
)
|
|
631
|
-
FAILED =
|
|
632
|
-
T.let(
|
|
633
|
-
:failed,
|
|
634
|
-
ContextDev::Models::MonitorListRunsResponse::Data::WebhookDelivery::Status::TaggedSymbol
|
|
635
|
-
)
|
|
636
|
-
SKIPPED_UNSAFE_URL =
|
|
637
|
-
T.let(
|
|
638
|
-
:skipped_unsafe_url,
|
|
639
|
-
ContextDev::Models::MonitorListRunsResponse::Data::WebhookDelivery::Status::TaggedSymbol
|
|
640
|
-
)
|
|
641
|
-
|
|
642
|
-
sig do
|
|
643
|
-
override.returns(
|
|
644
|
-
T::Array[
|
|
645
|
-
ContextDev::Models::MonitorListRunsResponse::Data::WebhookDelivery::Status::TaggedSymbol
|
|
646
|
-
]
|
|
647
|
-
)
|
|
648
|
-
end
|
|
649
|
-
def self.values
|
|
650
|
-
end
|
|
651
|
-
end
|
|
652
|
-
end
|
|
653
488
|
end
|
|
654
489
|
end
|
|
655
490
|
end
|
|
@@ -43,6 +43,10 @@ module ContextDev
|
|
|
43
43
|
sig { returns(String) }
|
|
44
44
|
attr_accessor :summary
|
|
45
45
|
|
|
46
|
+
# User-defined tags for grouping and filtering monitors and their changes.
|
|
47
|
+
sig { returns(T::Array[String]) }
|
|
48
|
+
attr_accessor :tags
|
|
49
|
+
|
|
46
50
|
sig do
|
|
47
51
|
returns(
|
|
48
52
|
ContextDev::Models::MonitorRetrieveChangeResponse::TargetType::TaggedSymbol
|
|
@@ -158,18 +162,11 @@ module ContextDev
|
|
|
158
162
|
sig { params(removed_urls: T::Array[String]).void }
|
|
159
163
|
attr_writer :removed_urls
|
|
160
164
|
|
|
161
|
-
# User-defined tags for grouping and filtering monitors and their changes.
|
|
162
|
-
sig { returns(T.nilable(T::Array[String])) }
|
|
163
|
-
attr_reader :tags
|
|
164
|
-
|
|
165
|
-
sig { params(tags: T::Array[String]).void }
|
|
166
|
-
attr_writer :tags
|
|
167
|
-
|
|
168
165
|
# A detected change. `mode` is the constant `web`; `target_type` and
|
|
169
166
|
# `change_detection_type` describe the change, and which optional fields are
|
|
170
167
|
# present depends on them (page: `diff` + excerpts; sitemap:
|
|
171
168
|
# `added_urls`/`removed_urls`; semantic:
|
|
172
|
-
# `
|
|
169
|
+
# `confidence`/`importance`/`evidence`/`matched_urls`).
|
|
173
170
|
sig do
|
|
174
171
|
params(
|
|
175
172
|
id: String,
|
|
@@ -181,6 +178,7 @@ module ContextDev
|
|
|
181
178
|
monitor_id: String,
|
|
182
179
|
run_id: String,
|
|
183
180
|
summary: String,
|
|
181
|
+
tags: T::Array[String],
|
|
184
182
|
target_type:
|
|
185
183
|
ContextDev::Models::MonitorRetrieveChangeResponse::TargetType::OrSymbol,
|
|
186
184
|
title: String,
|
|
@@ -200,8 +198,7 @@ module ContextDev
|
|
|
200
198
|
matched_url_count: Integer,
|
|
201
199
|
matched_urls: T::Array[String],
|
|
202
200
|
removed_url_count: Integer,
|
|
203
|
-
removed_urls: T::Array[String]
|
|
204
|
-
tags: T::Array[String]
|
|
201
|
+
removed_urls: T::Array[String]
|
|
205
202
|
).returns(T.attached_class)
|
|
206
203
|
end
|
|
207
204
|
def self.new(
|
|
@@ -215,6 +212,8 @@ module ContextDev
|
|
|
215
212
|
# The run that detected this change.
|
|
216
213
|
run_id:,
|
|
217
214
|
summary:,
|
|
215
|
+
# User-defined tags for grouping and filtering monitors and their changes.
|
|
216
|
+
tags:,
|
|
218
217
|
target_type:,
|
|
219
218
|
title:,
|
|
220
219
|
url:,
|
|
@@ -233,9 +232,7 @@ module ContextDev
|
|
|
233
232
|
matched_urls: nil,
|
|
234
233
|
removed_url_count: nil,
|
|
235
234
|
# At most 500 URLs are included; the corresponding count field is always exact.
|
|
236
|
-
removed_urls: nil
|
|
237
|
-
# User-defined tags for grouping and filtering monitors and their changes.
|
|
238
|
-
tags: nil
|
|
235
|
+
removed_urls: nil
|
|
239
236
|
)
|
|
240
237
|
end
|
|
241
238
|
|
|
@@ -251,6 +248,7 @@ module ContextDev
|
|
|
251
248
|
monitor_id: String,
|
|
252
249
|
run_id: String,
|
|
253
250
|
summary: String,
|
|
251
|
+
tags: T::Array[String],
|
|
254
252
|
target_type:
|
|
255
253
|
ContextDev::Models::MonitorRetrieveChangeResponse::TargetType::TaggedSymbol,
|
|
256
254
|
title: String,
|
|
@@ -270,8 +268,7 @@ module ContextDev
|
|
|
270
268
|
matched_url_count: Integer,
|
|
271
269
|
matched_urls: T::Array[String],
|
|
272
270
|
removed_url_count: Integer,
|
|
273
|
-
removed_urls: T::Array[String]
|
|
274
|
-
tags: T::Array[String]
|
|
271
|
+
removed_urls: T::Array[String]
|
|
275
272
|
}
|
|
276
273
|
)
|
|
277
274
|
end
|