@tailglow/cli 0.6.4 → 0.7.1

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.
@@ -247,6 +247,17 @@ export const CLI_COMMANDS = [
247
247
  ],
248
248
  "query_params": [],
249
249
  "body_fields": [
250
+ {
251
+ "name": "tgl_authoring_mode",
252
+ "type": "TglAuthoringMode",
253
+ "required": false,
254
+ "description": "Project-wide authoring behavior. Aggressive chooses a defensible mapping; normal requests clarification for competing meanings. Defaults to aggressive. Existing scripts are unchanged. Optional.",
255
+ "allowed_values": [
256
+ "normal",
257
+ "aggressive"
258
+ ],
259
+ "deprecated": null
260
+ },
250
261
  {
251
262
  "name": "name",
252
263
  "type": "string",
@@ -3815,8 +3826,10 @@ export const CLI_COMMANDS = [
3815
3826
  ],
3816
3827
  "notes": [
3817
3828
  "`last` returns the latest reading in each time bucket within the requested range.",
3818
- "`coverage_mode=observed` returns partial observed rows beyond the strict boundary without filling missing buckets. `coverage_reasons` names unresolved view scopes; `excluded` is informational.",
3819
- "Record keys are UTC bucket starts. A bucket is final only when its UTC calendar end (start plus one `interval`) is at or before `complete_through_at`; strict omits all other buckets. A null cutoff means unknown completeness. Observed may include populated partial buckets even when the requested end lies inside one, and does not synthesize empty partial buckets.",
3829
+ "Record keys are UTC bucket starts. Buckets still filling come back with the data counted so far: every key at or after `first_incomplete_bucket_at` is incomplete and can still grow, so report it as \"so far\" and never compare it with a complete bucket. Incomplete buckets with no data yet are left out rather than returned as zero.",
3830
+ "`complete_through_at` is the instant before which every number is final. Null means completeness is unknown, and then every bucket is incomplete.",
3831
+ "For complete buckets only, leave out every key at or after `first_incomplete_bucket_at`.",
3832
+ "`coverage_reasons` names unresolved view scopes; `excluded` is informational.",
3820
3833
  "The aggregation window is resolved in order: an explicit `start_at` plus `end_at` wins; otherwise `time_range` is used; otherwise the metric's saved chart range is used.",
3821
3834
  "`start_at` and `end_at` only take effect when sent together. Sending one without the other has no effect on the window.",
3822
3835
  "When both are provided, `start_at` must be earlier than `end_at`.",
@@ -3842,17 +3855,6 @@ export const CLI_COMMANDS = [
3842
3855
  }
3843
3856
  ],
3844
3857
  "query_params": [
3845
- {
3846
- "name": "coverage_mode",
3847
- "type": "string",
3848
- "required": false,
3849
- "description": "Strict returns only final data. Observed includes partial data beyond complete_through_at without filling missing buckets. Optional. Defaults to `\"strict\"`.",
3850
- "allowed_values": [
3851
- "strict",
3852
- "observed"
3853
- ],
3854
- "deprecated": null
3855
- },
3856
3858
  {
3857
3859
  "name": "start_at",
3858
3860
  "type": "ISODateString",
@@ -4147,14 +4149,6 @@ export const CLI_COMMANDS = [
4147
4149
  "allowed_values": [],
4148
4150
  "deprecated": null
4149
4151
  },
4150
- {
4151
- "name": "ui_chart_show_monitors",
4152
- "type": "boolean",
4153
- "required": false,
4154
- "description": "Whether the chart displays monitor thresholds. Optional.",
4155
- "allowed_values": [],
4156
- "deprecated": null
4157
- },
4158
4152
  {
4159
4153
  "name": "ui_chart_show_trends",
4160
4154
  "type": "boolean",
@@ -4529,14 +4523,6 @@ export const CLI_COMMANDS = [
4529
4523
  "allowed_values": [],
4530
4524
  "deprecated": null
4531
4525
  },
4532
- {
4533
- "name": "ui_chart_show_monitors",
4534
- "type": "boolean",
4535
- "required": false,
4536
- "description": "Whether the chart displays monitor thresholds. Optional.",
4537
- "allowed_values": [],
4538
- "deprecated": null
4539
- },
4540
4526
  {
4541
4527
  "name": "ui_chart_show_trends",
4542
4528
  "type": "boolean",
@@ -5177,12 +5163,13 @@ export const CLI_COMMANDS = [
5177
5163
  "monitors:write"
5178
5164
  ],
5179
5165
  "notes": [
5180
- "The monitor starts evaluating on its schedule as soon as it is created, unless it is created with `status` set to `paused`.",
5181
- "`scope` decides how many alerts a monitor can raise at once: `any_series` fires once for the metric as a whole, `each_series` tracks every series separately.",
5182
- "No-data (`absence`) conditions require `chart_value=count` and a finite `time_window_minutes`.",
5183
- "`sustained_minutes` is required when `condition_type` is `sustained`, and `threshold_value` is required when it is `threshold`.",
5184
- "`min_occurrences` and `occurrence_window_minutes` must both be set or both be null, and occurrence-based triggering cannot be combined with a sustained condition.",
5185
- "`schedule_cron` must be a valid cron expression. It is evaluated in UTC, and the finest granularity is one minute.",
5166
+ "The monitor starts checking on its schedule as soon as it is created, unless it is created with `status` set to `paused`. Its first check is the first scheduled time after it is created.",
5167
+ "`scope` decides how many alerts a monitor can raise at once: `any_series` raises one for the metric as a whole, `each_series` tracks every series separately.",
5168
+ "A `rolling` window needs `window_minutes`. An `all_time` window takes `window_minutes: null`.",
5169
+ "`count`, `sum` and `count_unique` require `empty_window_handling: \"zero\"`. Omitted, it is `zero` for those statistics and `no_value` for the others.",
5170
+ "An `immediate` trigger takes no trigger fields. `sustained` needs `sustained_minutes` and no repeat fields. `repeated` needs `repeat_count` and `repeat_window_minutes` and no `sustained_minutes`.",
5171
+ "A trigger the schedule can never satisfy is rejected. A gap between checks longer than `sustained_minutes` restarts the hold, so a `sustained` trigger needs checks that run for `sustained_minutes` without such a gap. A `repeated` trigger needs a `repeat_window_minutes` that can hold `repeat_count` checks. A schedule that only might satisfy the trigger is allowed.",
5172
+ "`schedule_cron` must be a valid five-field cron expression. It is evaluated in UTC, and the finest granularity is one minute.",
5186
5173
  "A monitor cannot be created active with an `expires_at` already in the past."
5187
5174
  ],
5188
5175
  "path_params": [
@@ -5225,7 +5212,7 @@ export const CLI_COMMANDS = [
5225
5212
  "name": "status",
5226
5213
  "type": "string",
5227
5214
  "required": false,
5228
- "description": "Whether the monitor starts evaluating immediately or switched off. `disabled` is not accepted: the system uses it to record that it stopped the monitor itself. Optional. Defaults to `\"active\"`.",
5215
+ "description": "Whether the monitor starts checking immediately or switched off. `disabled` is not accepted: the system uses it to record that it stopped the monitor itself. Optional. Defaults to `\"active\"`.",
5229
5216
  "allowed_values": [
5230
5217
  "active",
5231
5218
  "paused"
@@ -5233,19 +5220,25 @@ export const CLI_COMMANDS = [
5233
5220
  "deprecated": null
5234
5221
  },
5235
5222
  {
5236
- "name": "chart_value",
5237
- "type": "MetricChartValue",
5223
+ "name": "expires_at",
5224
+ "type": "ISODateString | null",
5238
5225
  "required": false,
5239
- "description": "Which value of the metric is compared against the threshold. Optional. Defaults to `\"sum\"`.",
5226
+ "description": "When the monitor stops checking. Leave null for no expiry. Optional.",
5227
+ "allowed_values": [],
5228
+ "deprecated": null
5229
+ },
5230
+ {
5231
+ "name": "statistic",
5232
+ "type": "MonitorStatistic",
5233
+ "required": true,
5234
+ "description": "What is computed over each window. `count`, `sum` and `count_unique` measure how much happened; the others read a value from the window's observations.",
5240
5235
  "allowed_values": [
5241
5236
  "count",
5242
- "average",
5243
5237
  "sum",
5238
+ "average",
5244
5239
  "min",
5245
5240
  "max",
5246
5241
  "last",
5247
- "cumulative_sum",
5248
- "cumulative_count",
5249
5242
  "p50",
5250
5243
  "p95",
5251
5244
  "p99",
@@ -5254,120 +5247,151 @@ export const CLI_COMMANDS = [
5254
5247
  "deprecated": null
5255
5248
  },
5256
5249
  {
5257
- "name": "scope",
5258
- "type": "MonitorScope",
5259
- "required": false,
5260
- "description": "Whether the monitor fires once for the metric as a whole, or tracks each series separately. Optional. Defaults to `\"total\"`.",
5250
+ "name": "operator",
5251
+ "type": "MonitorOperator",
5252
+ "required": true,
5253
+ "description": "How the statistic is compared with `threshold_value`.",
5261
5254
  "allowed_values": [
5262
- "total",
5263
- "any_series",
5264
- "each_series"
5255
+ "gt",
5256
+ "gte",
5257
+ "lt",
5258
+ "lte",
5259
+ "eq",
5260
+ "neq"
5265
5261
  ],
5266
5262
  "deprecated": null
5267
5263
  },
5268
5264
  {
5269
- "name": "time_window_minutes",
5270
- "type": "integer | null",
5271
- "required": false,
5272
- "description": "Evaluation lookback in whole minutes (1 to 525600). Null means since the metric was created. No-data conditions require a finite window. Optional.",
5265
+ "name": "threshold_value",
5266
+ "type": "number",
5267
+ "required": true,
5268
+ "description": "The value the statistic is compared with. `count` equal to 0 alerts when no data arrives.",
5273
5269
  "allowed_values": [],
5274
5270
  "deprecated": null
5275
5271
  },
5276
5272
  {
5277
- "name": "condition_type",
5278
- "type": "MonitorConditionType",
5273
+ "name": "empty_window_handling",
5274
+ "type": "MonitorEmptyWindowHandling",
5279
5275
  "required": false,
5280
- "description": "threshold compares a value, sustained requires that comparison to hold, existence fires when the selected value is greater than zero, and absence fires when no observations exist in the complete evaluation window, regardless of chart gap handling. Optional. Defaults to `\"threshold\"`.",
5276
+ "description": "What the statistic reads when the window holds no data. `zero` reads 0. `no_value` reads nothing, so that check neither opens nor closes an alert. Optional.",
5281
5277
  "allowed_values": [
5282
- "threshold",
5283
- "sustained",
5284
- "existence",
5285
- "absence"
5278
+ "no_value",
5279
+ "zero"
5286
5280
  ],
5287
5281
  "deprecated": null
5288
5282
  },
5289
5283
  {
5290
- "name": "operator",
5291
- "type": "MonitorOperator",
5284
+ "name": "window_type",
5285
+ "type": "MonitorWindowType",
5292
5286
  "required": false,
5293
- "description": "How the metric value is compared against the threshold. Optional. Defaults to `\"gt\"`.",
5287
+ "description": "`rolling` reads the `window_minutes` before each check. `all_time` reads everything from the start of the project. Optional. Defaults to `\"rolling\"`.",
5294
5288
  "allowed_values": [
5295
- "gt",
5296
- "gte",
5297
- "lt",
5298
- "lte",
5299
- "eq",
5300
- "neq"
5289
+ "rolling",
5290
+ "all_time"
5301
5291
  ],
5302
5292
  "deprecated": null
5303
5293
  },
5304
5294
  {
5305
- "name": "threshold_value",
5306
- "type": "number | null",
5295
+ "name": "window_minutes",
5296
+ "type": "integer | null",
5307
5297
  "required": false,
5308
- "description": "The value the metric is compared against. Optional.",
5298
+ "description": "Length of a rolling window in whole minutes (1 to 525600). Null for `all_time`. Optional.",
5309
5299
  "allowed_values": [],
5310
5300
  "deprecated": null
5311
5301
  },
5312
5302
  {
5313
- "name": "sustained_minutes",
5314
- "type": "number | null",
5303
+ "name": "scope",
5304
+ "type": "MonitorScope",
5315
5305
  "required": false,
5316
- "description": "How long the condition must hold before the monitor fires. Optional.",
5317
- "allowed_values": [],
5306
+ "description": "`total` checks the whole feed as one value. `any_series` keeps one alert open while any series matches. `each_series` checks every series separately. Optional. Defaults to `\"total\"`.",
5307
+ "allowed_values": [
5308
+ "total",
5309
+ "any_series",
5310
+ "each_series"
5311
+ ],
5318
5312
  "deprecated": null
5319
5313
  },
5320
5314
  {
5321
- "name": "schedule_cron",
5322
- "type": "string",
5315
+ "name": "series_filters",
5316
+ "type": "object",
5323
5317
  "required": false,
5324
- "description": "Cron expression, in UTC, setting how often the monitor evaluates. Optional. Defaults to `\"* * * * *\"`. Minimum length: `1`. Maximum length: `128`.",
5318
+ "description": "Narrows which of the metric's series this monitor watches. Property values may use `*` wildcards. Empty watches every series. Optional.",
5325
5319
  "allowed_values": [],
5326
- "deprecated": null
5320
+ "deprecated": null,
5321
+ "fields": [
5322
+ {
5323
+ "name": "include",
5324
+ "type": "object[]",
5325
+ "required": false,
5326
+ "description": "Only series matching one of these property sets are watched. Optional.",
5327
+ "allowed_values": [],
5328
+ "deprecated": null
5329
+ },
5330
+ {
5331
+ "name": "exclude",
5332
+ "type": "object[]",
5333
+ "required": false,
5334
+ "description": "Series matching one of these property sets are ignored. Optional.",
5335
+ "allowed_values": [],
5336
+ "deprecated": null
5337
+ }
5338
+ ]
5327
5339
  },
5328
5340
  {
5329
- "name": "alert_mode",
5330
- "type": "MonitorAlertMode",
5341
+ "name": "trigger_type",
5342
+ "type": "MonitorTriggerType",
5331
5343
  "required": false,
5332
- "description": "Whether an alert stays open until the condition clears, or opens and ends in one moment. Optional. Defaults to `\"spanning\"`.",
5344
+ "description": "When a match opens an alert. `immediate` on the first matching check, `sustained` once matches have held for `sustained_minutes`, `repeated` after `repeat_count` matching checks within `repeat_window_minutes`. Optional. Defaults to `\"immediate\"`.",
5333
5345
  "allowed_values": [
5334
- "spanning",
5335
- "instant"
5346
+ "immediate",
5347
+ "sustained",
5348
+ "repeated"
5336
5349
  ],
5337
5350
  "deprecated": null
5338
5351
  },
5339
5352
  {
5340
- "name": "expires_at",
5341
- "type": "ISODateString | null",
5353
+ "name": "sustained_minutes",
5354
+ "type": "integer | null",
5342
5355
  "required": false,
5343
- "description": "When the monitor stops evaluating. Leave null for no expiry. Optional.",
5356
+ "description": "How long matches must hold before an alert opens, in whole minutes. Only for `sustained`. Optional.",
5344
5357
  "allowed_values": [],
5345
5358
  "deprecated": null
5346
5359
  },
5347
5360
  {
5348
- "name": "series_filters",
5349
- "type": "object | null",
5361
+ "name": "repeat_count",
5362
+ "type": "integer | null",
5350
5363
  "required": false,
5351
- "description": "Narrows which of the metric's series this monitor watches. Optional.",
5364
+ "description": "How many matching checks open an alert. Only for `repeated`. Optional.",
5352
5365
  "allowed_values": [],
5353
5366
  "deprecated": null
5354
5367
  },
5355
5368
  {
5356
- "name": "min_occurrences",
5369
+ "name": "repeat_window_minutes",
5357
5370
  "type": "integer | null",
5358
5371
  "required": false,
5359
- "description": "How many times the condition must be met before the monitor fires. Optional.",
5372
+ "description": "The window, in whole minutes, those matching checks must fall within. Only for `repeated`. Optional.",
5360
5373
  "allowed_values": [],
5361
5374
  "deprecated": null
5362
5375
  },
5363
5376
  {
5364
- "name": "occurrence_window_minutes",
5365
- "type": "integer | null",
5377
+ "name": "schedule_cron",
5378
+ "type": "string",
5366
5379
  "required": false,
5367
- "description": "The window those occurrences have to fall within. Optional.",
5380
+ "description": "Five-field cron expression, in UTC, setting when the monitor checks. Optional. Defaults to `\"* * * * *\"`. Minimum length: `1`. Maximum length: `128`.",
5368
5381
  "allowed_values": [],
5369
5382
  "deprecated": null
5370
5383
  },
5384
+ {
5385
+ "name": "alert_mode",
5386
+ "type": "MonitorAlertMode",
5387
+ "required": false,
5388
+ "description": "`spanning` keeps an alert open until the condition clears. `instant` opens and ends it at once. Optional. Defaults to `\"spanning\"`.",
5389
+ "allowed_values": [
5390
+ "spanning",
5391
+ "instant"
5392
+ ],
5393
+ "deprecated": null
5394
+ },
5371
5395
  {
5372
5396
  "name": "metric_id",
5373
5397
  "type": "string",
@@ -5378,12 +5402,59 @@ export const CLI_COMMANDS = [
5378
5402
  }
5379
5403
  ]
5380
5404
  },
5405
+ {
5406
+ "resource": "monitors",
5407
+ "command": "draft",
5408
+ "operation_id": "draftMonitor",
5409
+ "summary": "Draft Monitor",
5410
+ "description": "Draft a monitor rule from a description in your own words.",
5411
+ "method": "POST",
5412
+ "path": "/v1/projects/:project_id/metrics/:metric_id/monitors/draft",
5413
+ "alternate_paths": [],
5414
+ "scopes": [
5415
+ "monitors:write"
5416
+ ],
5417
+ "notes": [
5418
+ "Nothing is saved. Review the draft and its `assumptions`, then create the monitor with the draft as the body.",
5419
+ "When the description is not enough for a rule (no threshold, no measurable condition), the outcome is `clarification` with a `question` to answer in a new description.",
5420
+ "Drafts count against a per-team hourly budget (50 on Pro, 500 on Enterprise). Over budget the request is refused with `resource_limit_reached` and says when the budget resets."
5421
+ ],
5422
+ "path_params": [
5423
+ {
5424
+ "name": "project_id",
5425
+ "type": "string",
5426
+ "required": true,
5427
+ "description": "Unique identifier of the project.",
5428
+ "allowed_values": [],
5429
+ "deprecated": null
5430
+ },
5431
+ {
5432
+ "name": "metric_id",
5433
+ "type": "string",
5434
+ "required": true,
5435
+ "description": "Unique identifier of the metric.",
5436
+ "allowed_values": [],
5437
+ "deprecated": null
5438
+ }
5439
+ ],
5440
+ "query_params": [],
5441
+ "body_fields": [
5442
+ {
5443
+ "name": "description",
5444
+ "type": "string",
5445
+ "required": true,
5446
+ "description": "The alert in your own words, for example `Alert me if no data arrives for 10 minutes.`. Minimum length: `1`. Maximum length: `1000`.",
5447
+ "allowed_values": [],
5448
+ "deprecated": null
5449
+ }
5450
+ ]
5451
+ },
5381
5452
  {
5382
5453
  "resource": "monitors",
5383
5454
  "command": "preview",
5384
5455
  "operation_id": "previewMonitor",
5385
5456
  "summary": "Preview Monitor",
5386
- "description": "Preview a monitor condition over its current evaluation window without saving or raising alerts.",
5457
+ "description": "Preview a monitor's rule on its most recent scheduled check, without saving or raising alerts.",
5387
5458
  "method": "POST",
5388
5459
  "path": "/v1/projects/:project_id/metrics/:metric_id/monitors/preview",
5389
5460
  "alternate_paths": [],
@@ -5391,12 +5462,13 @@ export const CLI_COMMANDS = [
5391
5462
  "monitors:read"
5392
5463
  ],
5393
5464
  "notes": [
5394
- "Uses the same series filtering and condition evaluation as scheduled monitors. This is a condition preview, not a simulation of cron timing, sustained duration, or occurrence counting.",
5395
- "An incomplete window returns ready=false with no verdicts. No-data conditions count observations across the whole window, including when the chart displays missing buckets as gaps.",
5396
- "No-data (`absence`) conditions require `chart_value=count` and a finite `time_window_minutes`.",
5397
- "`sustained_minutes` is required when `condition_type` is `sustained`, and `threshold_value` is required when it is `threshold`.",
5398
- "`min_occurrences` and `occurrence_window_minutes` must both be set or both be null, and occurrence-based triggering cannot be combined with a sustained condition.",
5399
- "`schedule_cron` must be a valid cron expression. It is evaluated in UTC, and the finest granularity is one minute.",
5465
+ "Reads the same window and computes the same statistic and verdict per target as a scheduled check of the most recent time on the rule's schedule. It shows one check: `trigger_note` explains when a `sustained` or `repeated` trigger would open an alert.",
5466
+ "A window whose data is not complete yet returns `is_ready: false` with no verdicts.",
5467
+ "A `rolling` window needs `window_minutes`. An `all_time` window takes `window_minutes: null`.",
5468
+ "`count`, `sum` and `count_unique` require `empty_window_handling: \"zero\"`. Omitted, it is `zero` for those statistics and `no_value` for the others.",
5469
+ "An `immediate` trigger takes no trigger fields. `sustained` needs `sustained_minutes` and no repeat fields. `repeated` needs `repeat_count` and `repeat_window_minutes` and no `sustained_minutes`.",
5470
+ "A trigger the schedule can never satisfy is rejected. A gap between checks longer than `sustained_minutes` restarts the hold, so a `sustained` trigger needs checks that run for `sustained_minutes` without such a gap. A `repeated` trigger needs a `repeat_window_minutes` that can hold `repeat_count` checks. A schedule that only might satisfy the trigger is allowed.",
5471
+ "`schedule_cron` must be a valid five-field cron expression. It is evaluated in UTC, and the finest granularity is one minute.",
5400
5472
  "A monitor cannot be created active with an `expires_at` already in the past."
5401
5473
  ],
5402
5474
  "path_params": [
@@ -5439,7 +5511,7 @@ export const CLI_COMMANDS = [
5439
5511
  "name": "status",
5440
5512
  "type": "string",
5441
5513
  "required": false,
5442
- "description": "Whether the monitor starts evaluating immediately or switched off. `disabled` is not accepted: the system uses it to record that it stopped the monitor itself. Optional. Defaults to `\"active\"`.",
5514
+ "description": "Whether the monitor starts checking immediately or switched off. `disabled` is not accepted: the system uses it to record that it stopped the monitor itself. Optional. Defaults to `\"active\"`.",
5443
5515
  "allowed_values": [
5444
5516
  "active",
5445
5517
  "paused"
@@ -5447,19 +5519,25 @@ export const CLI_COMMANDS = [
5447
5519
  "deprecated": null
5448
5520
  },
5449
5521
  {
5450
- "name": "chart_value",
5451
- "type": "MetricChartValue",
5522
+ "name": "expires_at",
5523
+ "type": "ISODateString | null",
5452
5524
  "required": false,
5453
- "description": "Which value of the metric is compared against the threshold. Optional. Defaults to `\"sum\"`.",
5525
+ "description": "When the monitor stops checking. Leave null for no expiry. Optional.",
5526
+ "allowed_values": [],
5527
+ "deprecated": null
5528
+ },
5529
+ {
5530
+ "name": "statistic",
5531
+ "type": "MonitorStatistic",
5532
+ "required": true,
5533
+ "description": "What is computed over each window. `count`, `sum` and `count_unique` measure how much happened; the others read a value from the window's observations.",
5454
5534
  "allowed_values": [
5455
5535
  "count",
5456
- "average",
5457
5536
  "sum",
5537
+ "average",
5458
5538
  "min",
5459
5539
  "max",
5460
5540
  "last",
5461
- "cumulative_sum",
5462
- "cumulative_count",
5463
5541
  "p50",
5464
5542
  "p95",
5465
5543
  "p99",
@@ -5468,120 +5546,151 @@ export const CLI_COMMANDS = [
5468
5546
  "deprecated": null
5469
5547
  },
5470
5548
  {
5471
- "name": "scope",
5472
- "type": "MonitorScope",
5473
- "required": false,
5474
- "description": "Whether the monitor fires once for the metric as a whole, or tracks each series separately. Optional. Defaults to `\"total\"`.",
5549
+ "name": "operator",
5550
+ "type": "MonitorOperator",
5551
+ "required": true,
5552
+ "description": "How the statistic is compared with `threshold_value`.",
5475
5553
  "allowed_values": [
5476
- "total",
5477
- "any_series",
5478
- "each_series"
5554
+ "gt",
5555
+ "gte",
5556
+ "lt",
5557
+ "lte",
5558
+ "eq",
5559
+ "neq"
5479
5560
  ],
5480
5561
  "deprecated": null
5481
5562
  },
5482
5563
  {
5483
- "name": "time_window_minutes",
5484
- "type": "integer | null",
5485
- "required": false,
5486
- "description": "Evaluation lookback in whole minutes (1 to 525600). Null means since the metric was created. No-data conditions require a finite window. Optional.",
5564
+ "name": "threshold_value",
5565
+ "type": "number",
5566
+ "required": true,
5567
+ "description": "The value the statistic is compared with. `count` equal to 0 alerts when no data arrives.",
5487
5568
  "allowed_values": [],
5488
5569
  "deprecated": null
5489
5570
  },
5490
5571
  {
5491
- "name": "condition_type",
5492
- "type": "MonitorConditionType",
5572
+ "name": "empty_window_handling",
5573
+ "type": "MonitorEmptyWindowHandling",
5493
5574
  "required": false,
5494
- "description": "threshold compares a value, sustained requires that comparison to hold, existence fires when the selected value is greater than zero, and absence fires when no observations exist in the complete evaluation window, regardless of chart gap handling. Optional. Defaults to `\"threshold\"`.",
5575
+ "description": "What the statistic reads when the window holds no data. `zero` reads 0. `no_value` reads nothing, so that check neither opens nor closes an alert. Optional.",
5495
5576
  "allowed_values": [
5496
- "threshold",
5497
- "sustained",
5498
- "existence",
5499
- "absence"
5577
+ "no_value",
5578
+ "zero"
5500
5579
  ],
5501
5580
  "deprecated": null
5502
5581
  },
5503
5582
  {
5504
- "name": "operator",
5505
- "type": "MonitorOperator",
5583
+ "name": "window_type",
5584
+ "type": "MonitorWindowType",
5506
5585
  "required": false,
5507
- "description": "How the metric value is compared against the threshold. Optional. Defaults to `\"gt\"`.",
5586
+ "description": "`rolling` reads the `window_minutes` before each check. `all_time` reads everything from the start of the project. Optional. Defaults to `\"rolling\"`.",
5508
5587
  "allowed_values": [
5509
- "gt",
5510
- "gte",
5511
- "lt",
5512
- "lte",
5513
- "eq",
5514
- "neq"
5588
+ "rolling",
5589
+ "all_time"
5515
5590
  ],
5516
5591
  "deprecated": null
5517
5592
  },
5518
5593
  {
5519
- "name": "threshold_value",
5520
- "type": "number | null",
5594
+ "name": "window_minutes",
5595
+ "type": "integer | null",
5521
5596
  "required": false,
5522
- "description": "The value the metric is compared against. Optional.",
5597
+ "description": "Length of a rolling window in whole minutes (1 to 525600). Null for `all_time`. Optional.",
5523
5598
  "allowed_values": [],
5524
5599
  "deprecated": null
5525
5600
  },
5526
5601
  {
5527
- "name": "sustained_minutes",
5528
- "type": "number | null",
5602
+ "name": "scope",
5603
+ "type": "MonitorScope",
5529
5604
  "required": false,
5530
- "description": "How long the condition must hold before the monitor fires. Optional.",
5531
- "allowed_values": [],
5605
+ "description": "`total` checks the whole feed as one value. `any_series` keeps one alert open while any series matches. `each_series` checks every series separately. Optional. Defaults to `\"total\"`.",
5606
+ "allowed_values": [
5607
+ "total",
5608
+ "any_series",
5609
+ "each_series"
5610
+ ],
5532
5611
  "deprecated": null
5533
5612
  },
5534
5613
  {
5535
- "name": "schedule_cron",
5536
- "type": "string",
5614
+ "name": "series_filters",
5615
+ "type": "object",
5537
5616
  "required": false,
5538
- "description": "Cron expression, in UTC, setting how often the monitor evaluates. Optional. Defaults to `\"* * * * *\"`. Minimum length: `1`. Maximum length: `128`.",
5617
+ "description": "Narrows which of the metric's series this monitor watches. Property values may use `*` wildcards. Empty watches every series. Optional.",
5539
5618
  "allowed_values": [],
5540
- "deprecated": null
5619
+ "deprecated": null,
5620
+ "fields": [
5621
+ {
5622
+ "name": "include",
5623
+ "type": "object[]",
5624
+ "required": false,
5625
+ "description": "Only series matching one of these property sets are watched. Optional.",
5626
+ "allowed_values": [],
5627
+ "deprecated": null
5628
+ },
5629
+ {
5630
+ "name": "exclude",
5631
+ "type": "object[]",
5632
+ "required": false,
5633
+ "description": "Series matching one of these property sets are ignored. Optional.",
5634
+ "allowed_values": [],
5635
+ "deprecated": null
5636
+ }
5637
+ ]
5541
5638
  },
5542
5639
  {
5543
- "name": "alert_mode",
5544
- "type": "MonitorAlertMode",
5640
+ "name": "trigger_type",
5641
+ "type": "MonitorTriggerType",
5545
5642
  "required": false,
5546
- "description": "Whether an alert stays open until the condition clears, or opens and ends in one moment. Optional. Defaults to `\"spanning\"`.",
5643
+ "description": "When a match opens an alert. `immediate` on the first matching check, `sustained` once matches have held for `sustained_minutes`, `repeated` after `repeat_count` matching checks within `repeat_window_minutes`. Optional. Defaults to `\"immediate\"`.",
5547
5644
  "allowed_values": [
5548
- "spanning",
5549
- "instant"
5645
+ "immediate",
5646
+ "sustained",
5647
+ "repeated"
5550
5648
  ],
5551
5649
  "deprecated": null
5552
5650
  },
5553
5651
  {
5554
- "name": "expires_at",
5555
- "type": "ISODateString | null",
5652
+ "name": "sustained_minutes",
5653
+ "type": "integer | null",
5556
5654
  "required": false,
5557
- "description": "When the monitor stops evaluating. Leave null for no expiry. Optional.",
5655
+ "description": "How long matches must hold before an alert opens, in whole minutes. Only for `sustained`. Optional.",
5558
5656
  "allowed_values": [],
5559
5657
  "deprecated": null
5560
5658
  },
5561
5659
  {
5562
- "name": "series_filters",
5563
- "type": "object | null",
5660
+ "name": "repeat_count",
5661
+ "type": "integer | null",
5564
5662
  "required": false,
5565
- "description": "Narrows which of the metric's series this monitor watches. Optional.",
5663
+ "description": "How many matching checks open an alert. Only for `repeated`. Optional.",
5566
5664
  "allowed_values": [],
5567
5665
  "deprecated": null
5568
5666
  },
5569
5667
  {
5570
- "name": "min_occurrences",
5668
+ "name": "repeat_window_minutes",
5571
5669
  "type": "integer | null",
5572
5670
  "required": false,
5573
- "description": "How many times the condition must be met before the monitor fires. Optional.",
5671
+ "description": "The window, in whole minutes, those matching checks must fall within. Only for `repeated`. Optional.",
5574
5672
  "allowed_values": [],
5575
5673
  "deprecated": null
5576
5674
  },
5577
5675
  {
5578
- "name": "occurrence_window_minutes",
5579
- "type": "integer | null",
5676
+ "name": "schedule_cron",
5677
+ "type": "string",
5580
5678
  "required": false,
5581
- "description": "The window those occurrences have to fall within. Optional.",
5679
+ "description": "Five-field cron expression, in UTC, setting when the monitor checks. Optional. Defaults to `\"* * * * *\"`. Minimum length: `1`. Maximum length: `128`.",
5582
5680
  "allowed_values": [],
5583
5681
  "deprecated": null
5584
5682
  },
5683
+ {
5684
+ "name": "alert_mode",
5685
+ "type": "MonitorAlertMode",
5686
+ "required": false,
5687
+ "description": "`spanning` keeps an alert open until the condition clears. `instant` opens and ends it at once. Optional. Defaults to `\"spanning\"`.",
5688
+ "allowed_values": [
5689
+ "spanning",
5690
+ "instant"
5691
+ ],
5692
+ "deprecated": null
5693
+ },
5585
5694
  {
5586
5695
  "name": "metric_id",
5587
5696
  "type": "string",
@@ -5597,7 +5706,7 @@ export const CLI_COMMANDS = [
5597
5706
  "command": "update",
5598
5707
  "operation_id": "updateMonitor",
5599
5708
  "summary": "Update Monitor",
5600
- "description": "Change a monitor's condition, schedule, or status.",
5709
+ "description": "Change a monitor's rule, schedule, name, description or expiry.",
5601
5710
  "method": "POST",
5602
5711
  "path": "/v1/projects/:project_id/metrics/:metric_id/monitors/:monitor_id",
5603
5712
  "alternate_paths": [],
@@ -5605,17 +5714,18 @@ export const CLI_COMMANDS = [
5605
5714
  "monitors:write"
5606
5715
  ],
5607
5716
  "notes": [
5608
- "Send only the fields you are changing. Anything omitted keeps its current value.",
5609
- "Changing what the monitor MEANS (its condition, scope, series filters or alert mode) ends any period currently firing, because the old alert no longer describes the new rule.",
5717
+ "Send the fields you are changing. A field sent with its current value changes nothing, so sending the whole monitor back is fine.",
5718
+ "Changing the rule (statistic, comparison, empty window handling, window, scope, series filters, trigger or alert mode) ends the monitor's open alerts with `monitor_changed` and starts checking afresh at the next scheduled time.",
5719
+ "Changing only `schedule_cron` keeps open alerts. Checks move to the new schedule, and a `sustained` or `repeated` trigger starts counting again.",
5720
+ "Changing only `name`, `description` or `expires_at` affects nothing else.",
5610
5721
  "`metric_id` cannot be changed. Create a new monitor against the other metric instead.",
5611
5722
  "The metric a monitor watches cannot be changed. Create a second monitor instead.",
5612
- "No-data (`absence`) conditions require `chart_value=count` and a finite `time_window_minutes`.",
5613
- "`sustained_minutes` is required when `condition_type` is `sustained`, and `threshold_value` is required when it is `threshold`.",
5614
- "`min_occurrences` and `occurrence_window_minutes` must both be set or both be null, and occurrence-based triggering cannot be combined with a sustained condition.",
5615
- "`schedule_cron` must be a valid cron expression. It is evaluated in UTC, and the finest granularity is one minute.",
5616
5723
  "`status` is not editable here. Use the pause and resume operations, which is also what keeps a customer from writing the `disabled` the system uses for expiry.",
5617
- "Moving `expires_at` is rejected when that would leave an active monitor with an expiry already in the past. Editing a monitor that has already expired is allowed, including the update that extends its expiry.",
5618
- "Conditions are checked against the monitor as it will be stored, not against the fields you send, so a change that would leave the monitor in an invalid combination is rejected even when the conflicting value is one you did not send."
5724
+ "The fields you send are merged into the stored monitor, and the result must satisfy the create rules for windows, `empty_window_handling`, trigger fields and the schedule, so a change is rejected even when the conflicting value is one you did not send.",
5725
+ "An omitted `empty_window_handling` becomes `zero` when the new `statistic` is `count`, `sum` or `count_unique`, and `no_value` when the stored statistic was one of those and the new one is not. Otherwise it keeps its stored value.",
5726
+ "Fields the new window or trigger does not use are cleared when you omit them or send null: switching to `all_time` clears `window_minutes`, and switching `trigger_type` clears the other triggers' fields. Sending a value for a field the new choice does not use is rejected.",
5727
+ "`schedule_cron` must be a valid five-field cron expression. It is evaluated in UTC, and the finest granularity is one minute.",
5728
+ "Moving `expires_at` is rejected when that would leave an active monitor with an expiry already in the past. Editing a monitor that has already expired is allowed, including the update that extends its expiry."
5619
5729
  ],
5620
5730
  "path_params": [
5621
5731
  {
@@ -5662,19 +5772,25 @@ export const CLI_COMMANDS = [
5662
5772
  "deprecated": null
5663
5773
  },
5664
5774
  {
5665
- "name": "chart_value",
5666
- "type": "MetricChartValue",
5775
+ "name": "expires_at",
5776
+ "type": "ISODateString | null",
5777
+ "required": false,
5778
+ "description": "When the monitor stops checking. Leave null for no expiry. Optional.",
5779
+ "allowed_values": [],
5780
+ "deprecated": null
5781
+ },
5782
+ {
5783
+ "name": "statistic",
5784
+ "type": "MonitorStatistic",
5667
5785
  "required": false,
5668
- "description": "Which value of the metric is compared against the threshold. Optional.",
5786
+ "description": "What is computed over each window. `count`, `sum` and `count_unique` measure how much happened; the others read a value from the window's observations. Optional.",
5669
5787
  "allowed_values": [
5670
5788
  "count",
5671
- "average",
5672
5789
  "sum",
5790
+ "average",
5673
5791
  "min",
5674
5792
  "max",
5675
5793
  "last",
5676
- "cumulative_sum",
5677
- "cumulative_count",
5678
5794
  "p50",
5679
5795
  "p95",
5680
5796
  "p99",
@@ -5683,119 +5799,150 @@ export const CLI_COMMANDS = [
5683
5799
  "deprecated": null
5684
5800
  },
5685
5801
  {
5686
- "name": "scope",
5687
- "type": "MonitorScope",
5802
+ "name": "operator",
5803
+ "type": "MonitorOperator",
5688
5804
  "required": false,
5689
- "description": "Whether the monitor fires once for the metric as a whole, or tracks each series separately. Optional.",
5805
+ "description": "How the statistic is compared with `threshold_value`. Optional.",
5690
5806
  "allowed_values": [
5691
- "total",
5692
- "any_series",
5693
- "each_series"
5807
+ "gt",
5808
+ "gte",
5809
+ "lt",
5810
+ "lte",
5811
+ "eq",
5812
+ "neq"
5694
5813
  ],
5695
5814
  "deprecated": null
5696
5815
  },
5697
5816
  {
5698
- "name": "time_window_minutes",
5699
- "type": "integer | null",
5817
+ "name": "threshold_value",
5818
+ "type": "number",
5700
5819
  "required": false,
5701
- "description": "Evaluation lookback in whole minutes (1 to 525600). Null means since the metric was created. No-data conditions require a finite window. Optional.",
5820
+ "description": "The value the statistic is compared with. `count` equal to 0 alerts when no data arrives. Optional.",
5702
5821
  "allowed_values": [],
5703
5822
  "deprecated": null
5704
5823
  },
5705
5824
  {
5706
- "name": "condition_type",
5707
- "type": "MonitorConditionType",
5825
+ "name": "empty_window_handling",
5826
+ "type": "MonitorEmptyWindowHandling",
5708
5827
  "required": false,
5709
- "description": "threshold compares a value, sustained requires that comparison to hold, existence fires when the selected value is greater than zero, and absence fires when no observations exist in the complete evaluation window, regardless of chart gap handling. Optional.",
5828
+ "description": "What the statistic reads when the window holds no data. `zero` reads 0. `no_value` reads nothing, so that check neither opens nor closes an alert. Optional.",
5710
5829
  "allowed_values": [
5711
- "threshold",
5712
- "sustained",
5713
- "existence",
5714
- "absence"
5830
+ "no_value",
5831
+ "zero"
5715
5832
  ],
5716
5833
  "deprecated": null
5717
5834
  },
5718
5835
  {
5719
- "name": "operator",
5720
- "type": "MonitorOperator",
5836
+ "name": "window_type",
5837
+ "type": "MonitorWindowType",
5721
5838
  "required": false,
5722
- "description": "How the metric value is compared against the threshold. Optional.",
5839
+ "description": "`rolling` reads the `window_minutes` before each check. `all_time` reads everything from the start of the project. Optional.",
5723
5840
  "allowed_values": [
5724
- "gt",
5725
- "gte",
5726
- "lt",
5727
- "lte",
5728
- "eq",
5729
- "neq"
5841
+ "rolling",
5842
+ "all_time"
5730
5843
  ],
5731
5844
  "deprecated": null
5732
5845
  },
5733
5846
  {
5734
- "name": "threshold_value",
5735
- "type": "number | null",
5847
+ "name": "window_minutes",
5848
+ "type": "integer | null",
5736
5849
  "required": false,
5737
- "description": "The value the metric is compared against. Optional.",
5850
+ "description": "Length of a rolling window in whole minutes (1 to 525600). Null for `all_time`. Optional.",
5738
5851
  "allowed_values": [],
5739
5852
  "deprecated": null
5740
5853
  },
5741
5854
  {
5742
- "name": "sustained_minutes",
5743
- "type": "number | null",
5855
+ "name": "scope",
5856
+ "type": "MonitorScope",
5744
5857
  "required": false,
5745
- "description": "How long the condition must hold before the monitor fires. Optional.",
5746
- "allowed_values": [],
5858
+ "description": "`total` checks the whole feed as one value. `any_series` keeps one alert open while any series matches. `each_series` checks every series separately. Optional.",
5859
+ "allowed_values": [
5860
+ "total",
5861
+ "any_series",
5862
+ "each_series"
5863
+ ],
5747
5864
  "deprecated": null
5748
5865
  },
5749
5866
  {
5750
- "name": "schedule_cron",
5751
- "type": "string",
5867
+ "name": "series_filters",
5868
+ "type": "object",
5752
5869
  "required": false,
5753
- "description": "Cron expression, in UTC, setting how often the monitor evaluates. Optional. Minimum length: `1`. Maximum length: `128`.",
5870
+ "description": "Narrows which of the metric's series this monitor watches. Property values may use `*` wildcards. Empty watches every series. Optional.",
5754
5871
  "allowed_values": [],
5755
- "deprecated": null
5872
+ "deprecated": null,
5873
+ "fields": [
5874
+ {
5875
+ "name": "include",
5876
+ "type": "object[]",
5877
+ "required": false,
5878
+ "description": "Only series matching one of these property sets are watched. Optional.",
5879
+ "allowed_values": [],
5880
+ "deprecated": null
5881
+ },
5882
+ {
5883
+ "name": "exclude",
5884
+ "type": "object[]",
5885
+ "required": false,
5886
+ "description": "Series matching one of these property sets are ignored. Optional.",
5887
+ "allowed_values": [],
5888
+ "deprecated": null
5889
+ }
5890
+ ]
5756
5891
  },
5757
5892
  {
5758
- "name": "alert_mode",
5759
- "type": "MonitorAlertMode",
5893
+ "name": "trigger_type",
5894
+ "type": "MonitorTriggerType",
5760
5895
  "required": false,
5761
- "description": "Whether an alert stays open until the condition clears, or opens and ends in one moment. Optional.",
5896
+ "description": "When a match opens an alert. `immediate` on the first matching check, `sustained` once matches have held for `sustained_minutes`, `repeated` after `repeat_count` matching checks within `repeat_window_minutes`. Optional.",
5762
5897
  "allowed_values": [
5763
- "spanning",
5764
- "instant"
5898
+ "immediate",
5899
+ "sustained",
5900
+ "repeated"
5765
5901
  ],
5766
5902
  "deprecated": null
5767
5903
  },
5768
5904
  {
5769
- "name": "expires_at",
5770
- "type": "ISODateString | null",
5905
+ "name": "sustained_minutes",
5906
+ "type": "integer | null",
5771
5907
  "required": false,
5772
- "description": "When the monitor stops evaluating. Leave null for no expiry. Optional.",
5908
+ "description": "How long matches must hold before an alert opens, in whole minutes. Only for `sustained`. Optional.",
5773
5909
  "allowed_values": [],
5774
5910
  "deprecated": null
5775
5911
  },
5776
5912
  {
5777
- "name": "series_filters",
5778
- "type": "object | null",
5913
+ "name": "repeat_count",
5914
+ "type": "integer | null",
5779
5915
  "required": false,
5780
- "description": "Narrows which of the metric's series this monitor watches. Optional.",
5916
+ "description": "How many matching checks open an alert. Only for `repeated`. Optional.",
5781
5917
  "allowed_values": [],
5782
5918
  "deprecated": null
5783
5919
  },
5784
5920
  {
5785
- "name": "min_occurrences",
5921
+ "name": "repeat_window_minutes",
5786
5922
  "type": "integer | null",
5787
5923
  "required": false,
5788
- "description": "How many times the condition must be met before the monitor fires. Optional.",
5924
+ "description": "The window, in whole minutes, those matching checks must fall within. Only for `repeated`. Optional.",
5789
5925
  "allowed_values": [],
5790
5926
  "deprecated": null
5791
5927
  },
5792
5928
  {
5793
- "name": "occurrence_window_minutes",
5794
- "type": "integer | null",
5929
+ "name": "schedule_cron",
5930
+ "type": "string",
5795
5931
  "required": false,
5796
- "description": "The window those occurrences have to fall within. Optional.",
5932
+ "description": "Five-field cron expression, in UTC, setting when the monitor checks. Optional. Minimum length: `1`. Maximum length: `128`.",
5797
5933
  "allowed_values": [],
5798
5934
  "deprecated": null
5935
+ },
5936
+ {
5937
+ "name": "alert_mode",
5938
+ "type": "MonitorAlertMode",
5939
+ "required": false,
5940
+ "description": "`spanning` keeps an alert open until the condition clears. `instant` opens and ends it at once. Optional.",
5941
+ "allowed_values": [
5942
+ "spanning",
5943
+ "instant"
5944
+ ],
5945
+ "deprecated": null
5799
5946
  }
5800
5947
  ]
5801
5948
  },
@@ -5804,7 +5951,7 @@ export const CLI_COMMANDS = [
5804
5951
  "command": "pause",
5805
5952
  "operation_id": "pauseMonitor",
5806
5953
  "summary": "Pause Monitor",
5807
- "description": "Pause a monitor so it stops evaluating.",
5954
+ "description": "Pause a monitor so it stops checking.",
5808
5955
  "method": "POST",
5809
5956
  "path": "/v1/projects/:project_id/metrics/:metric_id/monitors/:monitor_id/pause",
5810
5957
  "alternate_paths": [],
@@ -5812,7 +5959,8 @@ export const CLI_COMMANDS = [
5812
5959
  "monitors:write"
5813
5960
  ],
5814
5961
  "notes": [
5815
- "A paused monitor raises no alerts and closes nothing that is already firing. Resuming evaluates it again on its next scheduled tick."
5962
+ "Pausing ends the monitor's open alerts with `monitor_paused`. A paused monitor is not checked, and resuming starts again at its next scheduled time: the paused period is never checked.",
5963
+ "Pausing a paused monitor changes nothing. A monitor the system disabled when its expiry passed cannot be paused; resume it instead."
5816
5964
  ],
5817
5965
  "path_params": [
5818
5966
  {
@@ -5848,7 +5996,7 @@ export const CLI_COMMANDS = [
5848
5996
  "command": "resume",
5849
5997
  "operation_id": "resumeMonitor",
5850
5998
  "summary": "Resume Monitor",
5851
- "description": "Resume a paused monitor so it evaluates on its schedule again.",
5999
+ "description": "Resume a paused monitor so it checks on its schedule again.",
5852
6000
  "method": "POST",
5853
6001
  "path": "/v1/projects/:project_id/metrics/:metric_id/monitors/:monitor_id/resume",
5854
6002
  "alternate_paths": [],
@@ -5856,6 +6004,7 @@ export const CLI_COMMANDS = [
5856
6004
  "monitors:write"
5857
6005
  ],
5858
6006
  "notes": [
6007
+ "Checking starts again at the next scheduled time; the paused period is never checked.",
5859
6008
  "A monitor the system stopped because its expiry passed can be resumed once the expiry is moved into the future. Resuming one whose expiry is still in the past is rejected."
5860
6009
  ],
5861
6010
  "path_params": [
@@ -5944,7 +6093,7 @@ export const CLI_COMMANDS = [
5944
6093
  "alerts:read"
5945
6094
  ],
5946
6095
  "notes": [
5947
- "An alert is a firing PERIOD, not a single notification. `created_at` is when the condition started holding and `ended_at` is when it stopped, so one incident is one row for its whole duration.",
6096
+ "An alert is a firing PERIOD, not a single notification. `triggered_at` is the check that opened it and `ended_at` is when it ended, with the reason in `end_reason`, so one incident is one row for its whole duration. `created_at` is only when the row was written.",
5948
6097
  "Results cover a time window. Send `start_at` and `end_at`, or a `time_range`; with neither, the metric's own configured chart range is used.",
5949
6098
  "An alert is returned when its period OVERLAPS the window, so a period that opened before the window and is still firing is included.",
5950
6099
  "Use `is_open=true` to see only what is currently firing.",
@@ -5975,9 +6124,9 @@ export const CLI_COMMANDS = [
5975
6124
  "name": "order_by",
5976
6125
  "type": "string",
5977
6126
  "required": false,
5978
- "description": "Field the results are sorted by. Alerts sort by when their period opened. Optional. Defaults to `\"created_at\"`.",
6127
+ "description": "Field the results are sorted by. Alerts sort by when their period opened. Optional. Defaults to `\"triggered_at\"`.",
5979
6128
  "allowed_values": [
5980
- "created_at"
6129
+ "triggered_at"
5981
6130
  ],
5982
6131
  "deprecated": null
5983
6132
  },
@@ -6418,7 +6567,7 @@ export const CLI_COMMANDS = [
6418
6567
  "command": "update",
6419
6568
  "operation_id": "updatePage",
6420
6569
  "summary": "Update Page",
6421
- "description": "Change a page's name, time range, or public access.",
6570
+ "description": "Change a page's name, time range, public access, or its layout of cards.",
6422
6571
  "method": "POST",
6423
6572
  "path": "/v1/projects/:project_id/pages/:page_id",
6424
6573
  "alternate_paths": [],
@@ -6428,8 +6577,11 @@ export const CLI_COMMANDS = [
6428
6577
  "notes": [
6429
6578
  "Send only the fields you are changing. Anything omitted keeps its current value.",
6430
6579
  "Making a page private clears its public URL. Making it public again issues a new slug, so any previously shared link stops working.",
6580
+ "`components` is the whole layout, in page order: each entry is a card's full state, an entry without an `id` adds a card, and a card you leave out is removed. Leave it out to change settings only. Settings and layout are saved together, or not at all.",
6581
+ "Every listed card `id` must already be on this page, and every metric must belong to the page's project and not be scheduled for deletion.",
6431
6582
  "A `custom` time range requires both `custom_range_start_at` and `custom_range_end_at`, at least 30 minutes apart, with the start before the end. The rule is checked against the page as it will be after the update, not against the fields you send.",
6432
- "An `access_code` is trimmed, and an empty one clears the code."
6583
+ "An `access_code` is trimmed, and an empty one clears the code.",
6584
+ "A card can be listed only once in `components`, and a metric can be on only one card of the page."
6433
6585
  ],
6434
6586
  "path_params": [
6435
6587
  {
@@ -6559,6 +6711,51 @@ export const CLI_COMMANDS = [
6559
6711
  "description": "End of the window, when the time range is custom. Optional.",
6560
6712
  "allowed_values": [],
6561
6713
  "deprecated": null
6714
+ },
6715
+ {
6716
+ "name": "components",
6717
+ "type": "object[]",
6718
+ "required": false,
6719
+ "description": "The page's whole layout, in page order. Cards left out are removed. Optional.",
6720
+ "allowed_values": [],
6721
+ "deprecated": null,
6722
+ "fields": [
6723
+ {
6724
+ "name": "id",
6725
+ "type": "string",
6726
+ "required": false,
6727
+ "description": "Card to keep. Leave out to add a new card. Optional.",
6728
+ "allowed_values": [],
6729
+ "deprecated": null
6730
+ },
6731
+ {
6732
+ "name": "name",
6733
+ "type": "string | null",
6734
+ "required": false,
6735
+ "description": "Title of a card that shows several metrics. Leave out or send null to title it with their names. Optional.",
6736
+ "allowed_values": [],
6737
+ "deprecated": null
6738
+ },
6739
+ {
6740
+ "name": "ui_card_size",
6741
+ "type": "string",
6742
+ "required": false,
6743
+ "description": "How much of the page width the card occupies. Defaults to the full width. Optional.",
6744
+ "allowed_values": [
6745
+ "1/1",
6746
+ "1/2"
6747
+ ],
6748
+ "deprecated": null
6749
+ },
6750
+ {
6751
+ "name": "metric_ids",
6752
+ "type": "string[]",
6753
+ "required": true,
6754
+ "description": "Metrics the card shows together, in order.",
6755
+ "allowed_values": [],
6756
+ "deprecated": null
6757
+ }
6758
+ ]
6562
6759
  }
6563
6760
  ]
6564
6761
  },
@@ -6747,7 +6944,7 @@ export const CLI_COMMANDS = [
6747
6944
  "command": "create",
6748
6945
  "operation_id": "createComponent",
6749
6946
  "summary": "Add Component",
6750
- "description": "Add a metric to a page.",
6947
+ "description": "Add a card of one or more metrics to a page.",
6751
6948
  "method": "POST",
6752
6949
  "path": "/v1/projects/:project_id/pages/:page_id/components",
6753
6950
  "alternate_paths": [],
@@ -6755,9 +6952,8 @@ export const CLI_COMMANDS = [
6755
6952
  "pages:write"
6756
6953
  ],
6757
6954
  "notes": [
6758
- "A component is one metric placed on one page. The metric has to belong to the same project.",
6759
- "The metric must belong to the same project as the page.",
6760
- "A page holds a limited number of components. Adding one past the limit is rejected."
6955
+ "A component is a card on one page showing one to six metrics together.",
6956
+ "To change a whole page's layout in one write, send `components` to Update Page instead."
6761
6957
  ],
6762
6958
  "path_params": [
6763
6959
  {
@@ -6778,50 +6974,14 @@ export const CLI_COMMANDS = [
6778
6974
  }
6779
6975
  ],
6780
6976
  "query_params": [],
6781
- "body_fields": [
6782
- {
6783
- "name": "ui_sort_index",
6784
- "type": "integer",
6785
- "required": false,
6786
- "description": "Position of the component on the page. Lower appears first. Optional.",
6787
- "allowed_values": [],
6788
- "deprecated": null
6789
- },
6790
- {
6791
- "name": "ui_card_size",
6792
- "type": "ComponentCardSize",
6793
- "required": false,
6794
- "description": "How much of the page width the component occupies. Optional.",
6795
- "allowed_values": [
6796
- "1/1",
6797
- "1/2"
6798
- ],
6799
- "deprecated": null
6800
- },
6801
- {
6802
- "name": "metric_id",
6803
- "type": "string",
6804
- "required": true,
6805
- "description": "Metric this component displays.",
6806
- "allowed_values": [],
6807
- "deprecated": null
6808
- },
6809
- {
6810
- "name": "page_id",
6811
- "type": "string",
6812
- "required": false,
6813
- "description": "Page the component is added to. Optional.",
6814
- "allowed_values": [],
6815
- "deprecated": null
6816
- }
6817
- ]
6977
+ "body_fields": []
6818
6978
  },
6819
6979
  {
6820
6980
  "resource": "components",
6821
6981
  "command": "update",
6822
6982
  "operation_id": "updateComponent",
6823
6983
  "summary": "Update Component",
6824
- "description": "Change which metric a component shows, its size, or its position.",
6984
+ "description": "Change which metrics a component shows, its name, its size, or its position.",
6825
6985
  "method": "POST",
6826
6986
  "path": "/v1/projects/:project_id/pages/:page_id/components/:component_id",
6827
6987
  "alternate_paths": [],
@@ -6831,7 +6991,8 @@ export const CLI_COMMANDS = [
6831
6991
  "notes": [
6832
6992
  "Send only the fields you are changing. Anything omitted keeps its current value.",
6833
6993
  "Reorder a page by sending a new `ui_sort_index` for each component you are moving.",
6834
- "A new `metric_id` must belong to the same project as the page."
6994
+ "`metric_ids` replaces the card's metrics. Every metric must belong to the same project as the page, and none can already be on another card of the page.",
6995
+ "A metric can be listed only once in `metric_ids`."
6835
6996
  ],
6836
6997
  "path_params": [
6837
6998
  {
@@ -6861,6 +7022,14 @@ export const CLI_COMMANDS = [
6861
7022
  ],
6862
7023
  "query_params": [],
6863
7024
  "body_fields": [
7025
+ {
7026
+ "name": "name",
7027
+ "type": "string | null",
7028
+ "required": false,
7029
+ "description": "Title of a card that shows several metrics. Send null to title it with their names. Optional.",
7030
+ "allowed_values": [],
7031
+ "deprecated": null
7032
+ },
6864
7033
  {
6865
7034
  "name": "ui_sort_index",
6866
7035
  "type": "integer",
@@ -6881,10 +7050,10 @@ export const CLI_COMMANDS = [
6881
7050
  "deprecated": null
6882
7051
  },
6883
7052
  {
6884
- "name": "metric_id",
6885
- "type": "string",
7053
+ "name": "metric_ids",
7054
+ "type": "string[]",
6886
7055
  "required": false,
6887
- "description": "Metric this component displays. Optional.",
7056
+ "description": "Metrics the card shows together, in order. Optional.",
6888
7057
  "allowed_values": [],
6889
7058
  "deprecated": null
6890
7059
  }
@@ -6903,7 +7072,7 @@ export const CLI_COMMANDS = [
6903
7072
  "pages:write"
6904
7073
  ],
6905
7074
  "notes": [
6906
- "The metric itself is not affected, only its placement on this page."
7075
+ "The metrics themselves are not affected, only the card on this page."
6907
7076
  ],
6908
7077
  "path_params": [
6909
7078
  {
@@ -9618,6 +9787,14 @@ export const CLI_COMMANDS = [
9618
9787
  "allowed_values": [],
9619
9788
  "deprecated": null
9620
9789
  },
9790
+ {
9791
+ "name": "block_on_failure",
9792
+ "type": "boolean",
9793
+ "required": false,
9794
+ "description": "Wait for acknowledgement before sending later deliveries. Defaults to false. Check block_on_failure in the response for availability; null means the setting is unavailable. Optional.",
9795
+ "allowed_values": [],
9796
+ "deprecated": null
9797
+ },
9621
9798
  {
9622
9799
  "name": "exclude_fields",
9623
9800
  "type": "string[]",
@@ -9705,6 +9882,14 @@ export const CLI_COMMANDS = [
9705
9882
  ],
9706
9883
  "deprecated": null
9707
9884
  },
9885
+ {
9886
+ "name": "block_on_failure",
9887
+ "type": "boolean",
9888
+ "required": false,
9889
+ "description": "Wait for acknowledgement before sending later deliveries. Defaults to false. Check block_on_failure in the response for availability; null means the setting is unavailable. Optional.",
9890
+ "allowed_values": [],
9891
+ "deprecated": null
9892
+ },
9708
9893
  {
9709
9894
  "name": "exclude_fields",
9710
9895
  "type": "string[]",