@groundcover/api-client 0.8.0 → 0.10.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.
@@ -372,6 +372,56 @@ export type AssetFetchResult = {
372
372
  */
373
373
  type?: string;
374
374
  };
375
+ /**
376
+ * AssetFunnel is the wet-mode hierarchical breakdown for one asset type.
377
+ *
378
+ * Unit names what Total counts: monitors are counted whole, dashboards are
379
+ * counted per widget.
380
+ */
381
+ export type AssetFunnel = {
382
+ excluded?: ExcludedBucket;
383
+ not_supported?: NotSupportedBucket;
384
+ supported_converted?: SupportedConvertedBucket;
385
+ supported_not_converted?: SupportedNotConvertedBucket;
386
+ total?: number;
387
+ unit?: string;
388
+ };
389
+ /**
390
+ * AssetGapDetail describes one unit's gaps, counted once regardless of how many
391
+ * findings produced it.
392
+ */
393
+ export type AssetGapDetail = {
394
+ asset_id?: string;
395
+ asset_name?: string;
396
+ datasources?: Array<string>;
397
+ keys?: Array<string>;
398
+ keys_by_datasource?: {
399
+ [key: string]: Array<string>;
400
+ };
401
+ /**
402
+ * KeysByMetric and KeysByDatasource preserve which owner each missing key
403
+ * belongs to. Without them a unit missing a metric label and a log field
404
+ * reported both keys under the metric *and* under logs.
405
+ */
406
+ keys_by_metric?: {
407
+ [key: string]: Array<string>;
408
+ };
409
+ metrics?: Array<string>;
410
+ queries?: Array<ExecutedQuery>;
411
+ reason?: string;
412
+ /**
413
+ * SomeQueriesReturnedData distinguishes a unit where every query came back
414
+ * empty from one where only some did. Without it, a widget with nine working
415
+ * series and one broken one is indistinguishable from a wholly dead widget.
416
+ */
417
+ some_queries_returned_data?: boolean;
418
+ values?: Array<string>;
419
+ values_by_metric?: {
420
+ [key: string]: Array<string>;
421
+ };
422
+ widget_id?: string;
423
+ widget_title?: string;
424
+ };
375
425
  export type AssetInstallResult = {
376
426
  /**
377
427
  * Error message if the installation failed.
@@ -1528,6 +1578,13 @@ export type ConvertMonitorResponse = {
1528
1578
  error?: string;
1529
1579
  success?: boolean;
1530
1580
  };
1581
+ /**
1582
+ * CountPct is a count with percentage of its parent total.
1583
+ */
1584
+ export type CountPct = {
1585
+ count?: number;
1586
+ pct?: number;
1587
+ };
1531
1588
  /**
1532
1589
  * CoverageAction defines an actionable step and its estimated query impact.
1533
1590
  */
@@ -2274,10 +2331,31 @@ export type DataScope = {
2274
2331
  advanced?: AdvancedDataScope;
2275
2332
  simple?: Group;
2276
2333
  };
2334
+ /**
2335
+ * DataSetAvailableBucket is converted units whose underlying dataset exists in GC.
2336
+ */
2337
+ export type DataSetAvailableBucket = {
2338
+ /**
2339
+ * Lookback is the widest window actually queried, so the report never claims
2340
+ * a window it did not use.
2341
+ */
2342
+ lookback?: string;
2343
+ no_data?: NoDataBreakdown;
2344
+ returns_data?: CountPct;
2345
+ total?: number;
2346
+ };
2277
2347
  /**
2278
2348
  * Datasource identifies the query backend.
2279
2349
  */
2280
2350
  export type Datasource = string;
2351
+ /**
2352
+ * DatasourceKeyGap aggregates missing field keys for one search datasource.
2353
+ */
2354
+ export type DatasourceKeyGap = {
2355
+ count?: number;
2356
+ datasource?: string;
2357
+ keys?: Array<string>;
2358
+ };
2281
2359
  export type DeleteIngestionKeyRequest = {
2282
2360
  /**
2283
2361
  * Name of the ingestion key to delete
@@ -2584,6 +2662,40 @@ export type EventsSearchTimeSeriesRequest = {
2584
2662
  */
2585
2663
  valueField?: string;
2586
2664
  };
2665
+ /**
2666
+ * ExcludedBucket counts units held out of the funnel because their only unmet
2667
+ * dependency is Datadog's own telemetry: a self-observability metric, or one
2668
+ * already inactive in Datadog. Migration quality has no bearing on either —
2669
+ * they were never going to return data — so they are reported separately
2670
+ * rather than weighing on supported/unsupported like a real gap would.
2671
+ */
2672
+ export type ExcludedBucket = {
2673
+ datadog_self_observability?: MetricListBucket;
2674
+ inactive_in_datadog?: MetricListBucket;
2675
+ total?: number;
2676
+ };
2677
+ /**
2678
+ * ExecutedQuery is the evidence for a unit's wet outcome: the query that ran,
2679
+ *
2680
+ * the window it ran over, and what came back.
2681
+ */
2682
+ export type ExecutedQuery = {
2683
+ datasource?: string;
2684
+ error?: string;
2685
+ language?: string;
2686
+ /**
2687
+ * Metric names the query's underlying metric, for datasource == "metrics"
2688
+ * only. Without it a metrics query that returned no data cannot be traced
2689
+ * back to which metric was empty without parsing the query text.
2690
+ */
2691
+ metric?: string;
2692
+ original_dd?: string;
2693
+ query?: string;
2694
+ query_id?: string;
2695
+ resolved_query?: string;
2696
+ status?: string;
2697
+ window?: string;
2698
+ };
2587
2699
  /**
2588
2700
  * ExecutionPolicy defines model for ExecutionPolicy.
2589
2701
  */
@@ -2757,6 +2869,34 @@ export type Finding = {
2757
2869
  widget_id?: string;
2758
2870
  widget_title?: string;
2759
2871
  };
2872
+ /**
2873
+ * FunnelAssetEntry maps one asset — or one dashboard widget — to the funnel stage
2874
+ * it reached, with the queries that were executed as evidence.
2875
+ */
2876
+ export type FunnelAssetEntry = {
2877
+ asset_id?: string;
2878
+ asset_name?: string;
2879
+ asset_type?: string;
2880
+ metrics?: Array<string>;
2881
+ missing_keys?: Array<string>;
2882
+ missing_values?: Array<string>;
2883
+ queries?: Array<ExecutedQuery>;
2884
+ reason?: string;
2885
+ stage?: string;
2886
+ widget_id?: string;
2887
+ widget_title?: string;
2888
+ };
2889
+ /**
2890
+ * FunnelByAsset is the per-asset view of the funnel: every monitor and every
2891
+ * dashboard widget, with the stage it terminated at.
2892
+ */
2893
+ export type FunnelByAsset = {
2894
+ assets?: Array<FunnelAssetEntry>;
2895
+ by_stage?: {
2896
+ [key: string]: number;
2897
+ };
2898
+ total?: number;
2899
+ };
2760
2900
  export type GenericFiltersItem = {
2761
2901
  count?: number;
2762
2902
  name?: string;
@@ -3105,6 +3245,16 @@ export type IntegrationCount = {
3105
3245
  count?: number;
3106
3246
  name?: string;
3107
3247
  };
3248
+ /**
3249
+ * IntegrationCountBucket counts units per data-source mapping.
3250
+ */
3251
+ export type IntegrationCountBucket = {
3252
+ by_integration?: {
3253
+ [key: string]: number;
3254
+ };
3255
+ count?: number;
3256
+ metrics?: Array<TaggedMetric>;
3257
+ };
3108
3258
  export type Integrations = {
3109
3259
  /**
3110
3260
  * Identity is the principal of the backend's own cloud (an AWS role ARN, a GCP
@@ -3257,6 +3407,19 @@ export type KeyMapping = {
3257
3407
  metric_pattern?: string;
3258
3408
  source_key?: string;
3259
3409
  };
3410
+ /**
3411
+ * KeyMissingBreakdown groups units with missing keys.
3412
+ *
3413
+ * Metric label gaps and search field gaps are reported separately: a log or event
3414
+ * field gap has no metric to attribute it to, and folding both into a by-metric
3415
+ * view produced a meaningless "unknown" bucket.
3416
+ */
3417
+ export type KeyMissingBreakdown = {
3418
+ assets?: Array<AssetGapDetail>;
3419
+ by_datasource?: Array<DatasourceKeyGap>;
3420
+ by_metric?: Array<MetricKeyGap>;
3421
+ count?: number;
3422
+ };
3260
3423
  export type KeysResponse = {
3261
3424
  isLimitReached?: boolean;
3262
3425
  keys?: Array<KeyItem>;
@@ -3815,6 +3978,21 @@ export type LogsInsightsRequestParams = {
3815
3978
  start?: string;
3816
3979
  threshold?: number;
3817
3980
  };
3981
+ /**
3982
+ * LogsMissingBucket covers units whose log dataset is absent, including the case
3983
+ * where the log source they filter on is not ingested into groundcover at all.
3984
+ */
3985
+ export type LogsMissingBucket = {
3986
+ assets?: Array<AssetGapDetail>;
3987
+ count?: number;
3988
+ known_sources?: Array<string>;
3989
+ missing_sources?: Array<string>;
3990
+ /**
3991
+ * SourceNotIngested counts units filtering on a source:<value> that
3992
+ * groundcover does not ingest, which no lookback widening can fix.
3993
+ */
3994
+ source_not_ingested?: number;
3995
+ };
3818
3996
  export type LogsPatternParamDistributionResponse = {
3819
3997
  values?: Array<PatternParamDistributionValue>;
3820
3998
  };
@@ -4150,6 +4328,14 @@ export type Metadata = {
4150
4328
  syntheticName?: string;
4151
4329
  target?: string;
4152
4330
  };
4331
+ /**
4332
+ * MetricKeyGap aggregates missing label keys for one metric across units.
4333
+ */
4334
+ export type MetricKeyGap = {
4335
+ count?: number;
4336
+ keys?: Array<string>;
4337
+ metric?: string;
4338
+ };
4153
4339
  export type MetricKeysRequestV2 = {
4154
4340
  end?: string;
4155
4341
  filter?: string;
@@ -4165,10 +4351,25 @@ export type MetricKeysResponseV2 = {
4165
4351
  export type MetricLabels = {
4166
4352
  [key: string]: string;
4167
4353
  };
4354
+ /**
4355
+ * MetricListBucket counts units and lists the metrics responsible.
4356
+ */
4357
+ export type MetricListBucket = {
4358
+ count?: number;
4359
+ metrics?: Array<TaggedMetric>;
4360
+ };
4168
4361
  export type MetricMapping = {
4169
4362
  groundcover_metric?: string;
4170
4363
  source_metric?: string;
4171
4364
  };
4365
+ /**
4366
+ * MetricValueGap aggregates missing label values for one metric.
4367
+ */
4368
+ export type MetricValueGap = {
4369
+ count?: number;
4370
+ metric?: string;
4371
+ values?: Array<string>;
4372
+ };
4172
4373
  export type MetricValuesRequestV2 = {
4173
4374
  conditions?: Array<Condition>;
4174
4375
  end?: string;
@@ -4477,6 +4678,32 @@ export type MigrationDetectedIntegration = {
4477
4678
  */
4478
4679
  metricCount: number;
4479
4680
  };
4681
+ /**
4682
+ * MissingDataSetBucket covers converted units whose underlying dataset is absent.
4683
+ */
4684
+ export type MissingDataSetBucket = {
4685
+ logs?: LogsMissingBucket;
4686
+ metrics?: MissingMetricsBreakdown;
4687
+ missing_env?: ValueMissingBucket;
4688
+ tail?: TailDataSetBreakdown;
4689
+ total?: number;
4690
+ };
4691
+ /**
4692
+ * MissingMetricsBreakdown splits missing metrics into mutually exclusive buckets.
4693
+ *
4694
+ * A metric can qualify for several buckets at once (a datadog.* metric that is
4695
+ * also inactive, say). It is counted in exactly one — chosen by the priority
4696
+ * order in classifyMissingMetric — and carries a tag for every bucket that
4697
+ * applies, so nothing is lost to that choice.
4698
+ */
4699
+ export type MissingMetricsBreakdown = {
4700
+ custom_metrics?: MetricListBucket;
4701
+ datadog_self_observability?: MetricListBucket;
4702
+ inactive_in_datadog?: MetricListBucket;
4703
+ integrations_we_dont_have?: IntegrationCountBucket;
4704
+ integrations_we_have?: IntegrationCountBucket;
4705
+ total?: number;
4706
+ };
4480
4707
  /**
4481
4708
  * Model holds the core query/reducer/threshold definitions.
4482
4709
  */
@@ -4643,6 +4870,41 @@ export type MonitorVariable = {
4643
4870
  search?: VariableSearch;
4644
4871
  storage?: string;
4645
4872
  };
4873
+ /**
4874
+ * NoDataBreakdown drills into units that did not come back fully working.
4875
+ *
4876
+ * A unit lands here when any of its queries returned no data, or when a static
4877
+ * key/value gap was found. For a multi-query unit — a widget with several series,
4878
+ * a monitor with a formula — that means "not all queries returned data" rather
4879
+ * than "nothing returned data"; SomeQueriesReturnedData on each entry records
4880
+ * which of the two it was.
4881
+ */
4882
+ export type NoDataBreakdown = {
4883
+ count?: number;
4884
+ negative_key_missing?: KeyMissingBreakdown;
4885
+ negative_value_missing?: ValueMissingBucket;
4886
+ pct?: number;
4887
+ positive_all_keys_values_exist?: PositiveNoDataBucket;
4888
+ };
4889
+ /**
4890
+ * NoDataNeededBucket counts units that need no query to render.
4891
+ */
4892
+ export type NoDataNeededBucket = {
4893
+ by_type?: {
4894
+ [key: string]: number;
4895
+ };
4896
+ count?: number;
4897
+ };
4898
+ /**
4899
+ * NotSupportedBucket covers unsupported types, bucketed by type.
4900
+ */
4901
+ export type NotSupportedBucket = {
4902
+ assets?: Array<AssetGapDetail>;
4903
+ by_type?: {
4904
+ [key: string]: number;
4905
+ };
4906
+ total?: number;
4907
+ };
4646
4908
  export type NotificationRouteListItemResponse = {
4647
4909
  /**
4648
4910
  * The creation timestamp
@@ -4970,11 +5232,29 @@ export type PolicyWithEntityCount = Policy & {
4970
5232
  */
4971
5233
  readonly entityCount?: number;
4972
5234
  };
5235
+ /**
5236
+ * PositiveNoDataBucket covers units where every dependency resolves yet no data
5237
+ * came back, broken down by the reason we could establish.
5238
+ */
5239
+ export type PositiveNoDataBucket = {
5240
+ assets?: Array<AssetGapDetail>;
5241
+ by_reason?: OrderedReasons;
5242
+ count?: number;
5243
+ pct?: number;
5244
+ };
4973
5245
  /**
4974
5246
  * PreflightReport is the top-level structured output of a preflight validation run.
4975
5247
  */
4976
5248
  export type PreflightReport = {
4977
5249
  coverage_plan?: CoveragePlan;
5250
+ funnel_by_asset?: FunnelByAsset;
5251
+ /**
5252
+ * GeneratedAt is when this report was produced, set once right before it is
5253
+ * written out. A report is often diffed against a later rerun after a fix, so
5254
+ * the file needs to say for itself when it was taken without relying on
5255
+ * filesystem mtimes, which a copy or a git checkout does not preserve.
5256
+ */
5257
+ generated_at?: string;
4978
5258
  integrations_summary?: Array<IntegrationCount>;
4979
5259
  raw_findings?: Array<Finding>;
4980
5260
  summary?: UnifiedSummary;
@@ -5958,6 +6238,42 @@ export type SpanLink = {
5958
6238
  traceId?: string;
5959
6239
  traceState?: string;
5960
6240
  };
6241
+ export type SpanRecord = {
6242
+ attributes?: {
6243
+ [key: string]: unknown;
6244
+ };
6245
+ client?: string;
6246
+ cluster?: string;
6247
+ end_time?: string;
6248
+ env?: string;
6249
+ is_pii?: boolean;
6250
+ kind?: string;
6251
+ namespace?: string;
6252
+ parent_id?: string;
6253
+ protocol_type?: string;
6254
+ query_parameters?: {
6255
+ [key: string]: unknown;
6256
+ };
6257
+ request_body?: string;
6258
+ request_headers?: {
6259
+ [key: string]: unknown;
6260
+ };
6261
+ response_body?: string;
6262
+ response_headers?: {
6263
+ [key: string]: unknown;
6264
+ };
6265
+ server?: string;
6266
+ source?: string;
6267
+ span_id?: string;
6268
+ span_name?: string;
6269
+ start_time?: string;
6270
+ status?: string;
6271
+ tags?: {
6272
+ [key: string]: string;
6273
+ };
6274
+ trace_id?: string;
6275
+ workload?: string;
6276
+ };
5961
6277
  /**
5962
6278
  * SqlPipeline defines a pipeline for search queries.
5963
6279
  *
@@ -6053,10 +6369,47 @@ export type Subject = {
6053
6369
  */
6054
6370
  export type Suggestion = {
6055
6371
  confidence?: number;
6056
- reason?: string;
6372
+ reasons?: Array<SuggestionReason>;
6057
6373
  type?: string;
6058
6374
  value?: string;
6059
6375
  };
6376
+ /**
6377
+ * SuggestionReason is one scoring signal that contributed to a Suggestion.
6378
+ *
6379
+ * Weight is the signal's additive contribution within the scorer that produced
6380
+ * it. Name-similarity signals and value-overlap signals are scored
6381
+ * independently, so when both back the same candidate the suggestion carries
6382
+ * reasons from each and Confidence is the higher of the two estimates rather
6383
+ * than their sum — weights add up within a scorer, not across them.
6384
+ *
6385
+ * Detail carries the evidence behind the signal. For value-overlap signals that
6386
+ * means the matched values themselves, which is what makes the difference
6387
+ * between a suggestion worth acting on and one worth eyeballing.
6388
+ */
6389
+ export type SuggestionReason = {
6390
+ code?: string;
6391
+ detail?: string;
6392
+ weight?: number;
6393
+ };
6394
+ /**
6395
+ * SupportedConvertedBucket covers units that converted successfully.
6396
+ */
6397
+ export type SupportedConvertedBucket = {
6398
+ data_set_available?: DataSetAvailableBucket;
6399
+ missing_underlying_data_set?: MissingDataSetBucket;
6400
+ no_data_needed?: NoDataNeededBucket;
6401
+ total?: number;
6402
+ };
6403
+ /**
6404
+ * SupportedNotConvertedBucket covers supported types that failed conversion.
6405
+ */
6406
+ export type SupportedNotConvertedBucket = {
6407
+ assets?: Array<AssetGapDetail>;
6408
+ by_error?: {
6409
+ [key: string]: number;
6410
+ };
6411
+ total?: number;
6412
+ };
6060
6413
  /**
6061
6414
  * SyntheticMonitorConfig represents optional monitor configuration overrides for a synthetic test.
6062
6415
  *
@@ -6173,6 +6526,21 @@ export type SyntheticsCheckInput = {
6173
6526
  checkConfig?: WorkerRequest;
6174
6527
  interval?: string;
6175
6528
  };
6529
+ /**
6530
+ * TaggedMetric names a metric plus every classification that applies to it.
6531
+ */
6532
+ export type TaggedMetric = {
6533
+ metric?: string;
6534
+ tags?: Array<string>;
6535
+ };
6536
+ /**
6537
+ * TailDataSetBreakdown covers non-metrics/logs datasets.
6538
+ */
6539
+ export type TailDataSetBreakdown = {
6540
+ events?: number;
6541
+ rum?: number;
6542
+ traces?: number;
6543
+ };
6176
6544
  /**
6177
6545
  * +enum
6178
6546
  */
@@ -6886,6 +7254,17 @@ export type TracesSearchTimeSeriesRequest = {
6886
7254
  */
6887
7255
  valueField?: string;
6888
7256
  };
7257
+ export type TracesSimulationRequest = {
7258
+ ruleYaml?: string;
7259
+ span?: SpanRecord;
7260
+ };
7261
+ export type TracesSimulationResponse = {
7262
+ error?: string;
7263
+ ruleRan?: boolean;
7264
+ ruleValid?: boolean;
7265
+ spanDropped?: boolean;
7266
+ spanRecord?: SpanRecord;
7267
+ };
6889
7268
  /**
6890
7269
  * Tracing defines model for Tracing.
6891
7270
  */
@@ -7022,13 +7401,19 @@ export type UnfurlTraceSummary = {
7022
7401
  * UnifiedSummary is the single hierarchical summary included in JSON output.
7023
7402
  */
7024
7403
  export type UnifiedSummary = {
7025
- affected_assets_by_type?: {
7404
+ assets?: AssetsSummary;
7405
+ /**
7406
+ * AssetsByFindingType is the distribution of affected assets per finding
7407
+ * type, keyed by asset type.
7408
+ */
7409
+ assets_by_finding_type?: {
7026
7410
  [key: string]: {
7027
7411
  [key: string]: number;
7028
7412
  };
7029
7413
  };
7030
- assets?: AssetsSummary;
7031
7414
  conversion?: ConversionSummary;
7415
+ dashboards?: AssetFunnel;
7416
+ monitors?: AssetFunnel;
7032
7417
  queries?: QueriesSummary;
7033
7418
  wet_validation?: WetValidationSummary;
7034
7419
  };
@@ -7469,6 +7854,14 @@ export type ValueItem = {
7469
7854
  types?: Array<string>;
7470
7855
  value?: string;
7471
7856
  };
7857
+ /**
7858
+ * ValueMissingBucket lists units whose filter values are absent in groundcover.
7859
+ */
7860
+ export type ValueMissingBucket = {
7861
+ assets?: Array<AssetGapDetail>;
7862
+ by_metric?: Array<MetricValueGap>;
7863
+ count?: number;
7864
+ };
7472
7865
  export type ValuesDistributionRequest = {
7473
7866
  conditions?: Array<Condition>;
7474
7867
  /**
@@ -7670,14 +8063,31 @@ export type WetResult = {
7670
8063
  asset_type?: string;
7671
8064
  datasource?: Datasource;
7672
8065
  error?: string;
8066
+ /**
8067
+ * HasFreeText mirrors WetQuery.HasFreeText.
8068
+ */
8069
+ has_free_text?: boolean;
7673
8070
  latency?: Duration;
8071
+ /**
8072
+ * Metric mirrors WetQuery.Metric.
8073
+ */
8074
+ metric?: string;
7674
8075
  original_dd?: string;
7675
8076
  query?: string;
7676
8077
  query_id?: string;
7677
8078
  query_type?: QueryType;
7678
8079
  resolved_query?: string;
7679
8080
  status?: WetStatus;
8081
+ widget_id?: string;
7680
8082
  widget_title?: string;
8083
+ /**
8084
+ * Window is the span actually queried:
8085
+ * "5m" progressive first pass
8086
+ * "30m" dashboard long pass
8087
+ * "7d" monitor long pass (or whatever --wet-monitor-lookback sets)
8088
+ * "instant" instant query answered at a single point in time
8089
+ * "instant→7d" instant query was empty, so it was re-run as a range
8090
+ */
7681
8091
  window?: string;
7682
8092
  };
7683
8093
  /**
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@groundcover/api-client",
3
- "version": "0.8.0",
3
+ "version": "0.10.0",
4
4
  "description": "groundcover TypeScript API Client",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",