@groundcover/api-client 0.93.0 → 0.95.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.
@@ -1315,6 +1315,24 @@ export type BatchUpdateMonitorTagsV2Response = {
1315
1315
  updatedCount?: number;
1316
1316
  };
1317
1317
 
1318
+ /**
1319
+ * BlockerCount is one named blocker of unresolved goals. None and unknown
1320
+ * are reported beside this list, not as percentages.
1321
+ */
1322
+ export type BlockerCount = {
1323
+ blocker: string;
1324
+ /**
1325
+ * Drilldown is the clause of this bucket. To open it, send the same sources and
1326
+ * (<request query>) AND <clause>, or the clause alone when the request query
1327
+ * is empty; that selects exactly these goals.
1328
+ */
1329
+ drilldown?: string;
1330
+ /**
1331
+ * UnresolvedGoals counts the unresolved goals this blocker stopped.
1332
+ */
1333
+ unresolvedGoals: number;
1334
+ };
1335
+
1318
1336
  export type BucketDurationSeconds = number;
1319
1337
 
1320
1338
  /**
@@ -4403,6 +4421,229 @@ export type GetTagsResponse = {
4403
4421
  tags?: Array<string>;
4404
4422
  };
4405
4423
 
4424
+ /**
4425
+ * GoalAgent is one participant attributed to the goal.
4426
+ */
4427
+ export type GoalAgent = {
4428
+ id: string;
4429
+ name: string;
4430
+ version: string;
4431
+ };
4432
+
4433
+ /**
4434
+ * GoalDrilldown holds the filters the UI runs when a row's subject or blocker
4435
+ * is opened.
4436
+ */
4437
+ export type GoalDrilldown = {
4438
+ /**
4439
+ * Blocker is the clause of this row's unresolved blocker. To open it, send the same sources and (<request query>) AND <clause>, or the clause alone when the request query is empty.
4440
+ */
4441
+ blocker?: string;
4442
+ /**
4443
+ * Subject is the clause of this row's subject. To open it, send the same sources and (<request query>) AND <clause>, or the clause alone when the request query is empty.
4444
+ */
4445
+ subject?: string;
4446
+ };
4447
+
4448
+ /**
4449
+ * GoalEvalResult is the current result of one requested Eval field on a goal
4450
+ * row, judged against the catalog the request read.
4451
+ */
4452
+ export type GoalEvalResult = {
4453
+ /**
4454
+ * State is the state of the field's Eval result.
4455
+ * pending EvalResultPending
4456
+ * complete EvalResultComplete
4457
+ * failed EvalResultFailed
4458
+ * exhausted EvalResultExhausted
4459
+ * skipped EvalResultSkipped
4460
+ * disabled EvalResultDisabled
4461
+ * outdated EvalResultOutdated
4462
+ * unavailable EvalResultUnavailable
4463
+ */
4464
+ state: 'pending' | 'complete' | 'failed' | 'exhausted' | 'skipped' | 'disabled' | 'outdated' | 'unavailable';
4465
+ value?: GoalEvalValue;
4466
+ };
4467
+
4468
+ /**
4469
+ * GoalEvalValue is one Eval field value; exactly the member that matches the
4470
+ * field type is set. A field without a value of its type is left out.
4471
+ */
4472
+ export type GoalEvalValue = {
4473
+ boolean?: boolean;
4474
+ /**
4475
+ * Number is the value of an integer or float field.
4476
+ */
4477
+ number?: number;
4478
+ /**
4479
+ * Text is the value of a text or enum field.
4480
+ */
4481
+ text?: string;
4482
+ };
4483
+
4484
+ /**
4485
+ * GoalListPage is one page and the cursor for the page after it.
4486
+ */
4487
+ export type GoalListPage = {
4488
+ /**
4489
+ * Cursor is absent on the last page.
4490
+ */
4491
+ cursor?: string;
4492
+ goals: Array<GoalRow>;
4493
+ };
4494
+
4495
+ /**
4496
+ * GoalRow is one published goal on the list.
4497
+ */
4498
+ export type GoalRow = {
4499
+ agents: Array<GoalAgent>;
4500
+ /**
4501
+ * Blocker is what stopped the goal, when one is known.
4502
+ */
4503
+ blocker: string | null;
4504
+ cluster: string;
4505
+ /**
4506
+ * ConversationKey identifies the conversation the goal was found in.
4507
+ */
4508
+ conversationKey: string;
4509
+ drilldown: GoalDrilldown;
4510
+ endTimestamp: string;
4511
+ env: string;
4512
+ /**
4513
+ * Evals holds the current result of each requested evalFields reference, keyed by that reference.
4514
+ */
4515
+ evals?: {
4516
+ [key: string]: GoalEvalResult;
4517
+ };
4518
+ /**
4519
+ * GenAiCostInput is the input cost of the goal's spans in USD.
4520
+ */
4521
+ genAiCostInput: number | null;
4522
+ /**
4523
+ * GenAiCostOutput is the output cost of the goal's spans in USD.
4524
+ */
4525
+ genAiCostOutput: number | null;
4526
+ /**
4527
+ * GenAiCostTotal is the total cost of the goal's spans in USD.
4528
+ */
4529
+ genAiCostTotal: number | null;
4530
+ /**
4531
+ * Token and cost fields are null when the spans carry no usage or price.
4532
+ */
4533
+ genAiUsageInputTokens: number | null;
4534
+ genAiUsageOutputTokens: number | null;
4535
+ goalId: string;
4536
+ /**
4537
+ * pending GoalStatePending
4538
+ * complete GoalStateComplete
4539
+ * unknown GoalStateUnknown GoalStateUnknown has no current outcome result.
4540
+ */
4541
+ goalState: 'pending' | 'complete' | 'unknown';
4542
+ /**
4543
+ * GoalVersion identifies this published version of the goal.
4544
+ */
4545
+ goalVersion: string;
4546
+ namespace: string;
4547
+ /**
4548
+ * Outcome is set once the goal has an outcome.
4549
+ */
4550
+ outcome: string | null;
4551
+ /**
4552
+ * PendingReason says why a goal without an outcome is still open.
4553
+ */
4554
+ pendingReason: string | null;
4555
+ /**
4556
+ * SentimentEnd is the user's sentiment at the end of the goal.
4557
+ */
4558
+ sentimentEnd: string | null;
4559
+ startTimestamp: string;
4560
+ /**
4561
+ * SubjectID is the current subject of the goal; the last step of subjectPath.
4562
+ */
4563
+ subjectId: string;
4564
+ /**
4565
+ * SubjectPath is the current root-to-subject path, never empty. A goal without
4566
+ * a current subject has the path of the subject other.
4567
+ */
4568
+ subjectPath: Array<SubjectStep>;
4569
+ /**
4570
+ * Timestamp is the time of the goal's first publication; it does not change
4571
+ * between versions, and the list sorts on it.
4572
+ */
4573
+ timestamp: string;
4574
+ title: string;
4575
+ workloads: Array<string>;
4576
+ };
4577
+
4578
+ /**
4579
+ * GoalSuggestion is one value the caller may insert. Subject suggestions
4580
+ * carry the current path so two children with the same label stay distinct,
4581
+ * and so a parent filters its subtree. Count covers the full filtered window.
4582
+ */
4583
+ export type GoalSuggestion = {
4584
+ /**
4585
+ * Count is the number of matching goals with this value.
4586
+ */
4587
+ count: number;
4588
+ /**
4589
+ * SubjectID and SubjectPath, ordered root to subject, are set on subject suggestions only.
4590
+ */
4591
+ subjectId?: string;
4592
+ subjectPath?: Array<SubjectStep>;
4593
+ value: string;
4594
+ };
4595
+
4596
+ /**
4597
+ * GoalSuggestions has the shape of the search values response.
4598
+ */
4599
+ export type GoalSuggestions = {
4600
+ /**
4601
+ * IsLimitReached is true when more values exist than Limit.
4602
+ */
4603
+ isLimitReached: boolean;
4604
+ results: Array<GoalSuggestion>;
4605
+ };
4606
+
4607
+ /**
4608
+ * goalsAutocompleteRequest suggests values of Field that occur on visible
4609
+ * goals matching Sources and Query. Prefix is the text still being typed; a
4610
+ * condition of Query on Field with that value is the draft and is ignored,
4611
+ * whatever its operator. Sources are never the draft.
4612
+ */
4613
+ export type GoalsAutocompleteRequest = {
4614
+ /**
4615
+ * End time of the request range
4616
+ */
4617
+ end: string;
4618
+ /**
4619
+ * Field is a string or string-array goal column other than title, or an Eval text, enum or boolean field.
4620
+ */
4621
+ field: string;
4622
+ /**
4623
+ * Limit is the number of suggestions: 20 when 0, at most 50.
4624
+ */
4625
+ limit?: number;
4626
+ /**
4627
+ * Prefix is the text still being typed; values start with it.
4628
+ */
4629
+ prefix?: string;
4630
+ /**
4631
+ * Query is the gcQL filter being edited; pipes are not supported yet. Free text searches the goal title as the other search routes do: each word matches a whole word of the title and a quoted phrase must also appear in it, ignoring case; title is also a filter field, where title:"..." is an exact match and title:*word* a case-insensitive LIKE. Each other term names a known field (a goal field, a short judgment field such as outcome, or <evalKey>.<fieldKey>).
4632
+ * A value of an enum or boolean Eval field must be one of its options.
4633
+ * The goal time field is timestamp; _time is not accepted.
4634
+ * The request window is [start, end): end is exclusive.
4635
+ */
4636
+ query?: string;
4637
+ /**
4638
+ * Page-level conditions, ANDed with query; same fields and rules as query.
4639
+ */
4640
+ sources?: Array<Condition>;
4641
+ /**
4642
+ * Start time of the request range
4643
+ */
4644
+ start: string;
4645
+ };
4646
+
4406
4647
  /**
4407
4648
  * goalsErrorBody is the ginInternal.ErrorResponse the goals routes write, with type narrowed to GoalErrorType.
4408
4649
  */
@@ -4443,7 +4684,52 @@ export type GoalsErrorBody = {
4443
4684
  * Trace ID of the request.
4444
4685
  */
4445
4686
  trace_id?: string;
4446
- type?: 'unavailable';
4687
+ type?: 'unavailable' | 'cursor_expired' | 'cursor_invalid';
4688
+ };
4689
+
4690
+ /**
4691
+ * goalsSearchRequest is one page of the Goals tab.
4692
+ */
4693
+ export type GoalsSearchRequest = {
4694
+ /**
4695
+ * Cursor is the previous page's cursor. It expires after 15 minutes and is
4696
+ * valid only with the same sources, query, time range, sort, evalFields, data scope and
4697
+ * Eval catalog; any Eval edit makes it cursor_invalid.
4698
+ */
4699
+ cursor?: string;
4700
+ /**
4701
+ * End time of the request range
4702
+ */
4703
+ end: string;
4704
+ /**
4705
+ * EvalFields are Eval field references, <evalKey>.<fieldKey> from the catalog's evalKey and key,
4706
+ * as in the query; at most 100.
4707
+ */
4708
+ evalFields?: Array<string>;
4709
+ /**
4710
+ * Limit is the page size: 50 when 0, at most 200.
4711
+ */
4712
+ limit?: number;
4713
+ /**
4714
+ * Query is a gcQL filter; pipes are not supported yet. Free text searches the goal title as the other search routes do: each word matches a whole word of the title and a quoted phrase must also appear in it, ignoring case; title is also a filter field, where title:"..." is an exact match and title:*word* a case-insensitive LIKE. Each other term names a known field (a goal field, a short judgment field such as outcome, or <evalKey>.<fieldKey>).
4715
+ * A value of an enum or boolean Eval field must be one of its options.
4716
+ * The goal time field is timestamp; _time is not accepted.
4717
+ * The request window is [start, end): end is exclusive.
4718
+ */
4719
+ query?: string;
4720
+ /**
4721
+ * Sort is timestamp_desc when empty; no other order exists.
4722
+ * timestamp_desc goalSortTimestampDesc
4723
+ */
4724
+ sort?: 'timestamp_desc';
4725
+ /**
4726
+ * Page-level conditions, ANDed with query; same fields and rules as query.
4727
+ */
4728
+ sources?: Array<Condition>;
4729
+ /**
4730
+ * Start time of the request range
4731
+ */
4732
+ start: string;
4447
4733
  };
4448
4734
 
4449
4735
  export type Group = {
@@ -4605,6 +4891,130 @@ export type IngestionMeasurementsSearchTimeSeriesRequest = {
4605
4891
  valueField?: string;
4606
4892
  };
4607
4893
 
4894
+ /**
4895
+ * InsightsCharts is blockers and end sentiment over time. Sentiment has one
4896
+ * point for each bucket of the window, in time order, also for a bucket
4897
+ * without goals.
4898
+ */
4899
+ export type InsightsCharts = {
4900
+ blockers: Array<BlockerCount>;
4901
+ sentiment: Array<SentimentPoint>;
4902
+ unresolvedNone: number;
4903
+ unresolvedUnknown: number;
4904
+ };
4905
+
4906
+ /**
4907
+ * insightsChartsRequest is the remaining Insights panels for one window.
4908
+ *
4909
+ * BucketDuration is the sentiment interval, parsed as the search-time-series
4910
+ * routes parse theirs; empty uses the same bucket size as the existing
4911
+ * time-series charts. TimeZone is an IANA time zone name and defaults to the
4912
+ * request's time zone, then UTC.
4913
+ */
4914
+ export type InsightsChartsRequest = {
4915
+ /**
4916
+ * BucketDuration is the sentiment interval as a whole number of seconds in a
4917
+ * duration string with the units s, m and h, such as "10s", "5m", "1h" or
4918
+ * "24h" (there is no d unit: "1d" answers 400); empty picks one from the
4919
+ * window. A bucket longer than the window gives one bucket.
4920
+ */
4921
+ bucketDuration?: string;
4922
+ /**
4923
+ * End time of the request range
4924
+ */
4925
+ end: string;
4926
+ /**
4927
+ * Query is the goal list's gcQL filter; pipes are not supported yet. Free text searches the goal title as the other search routes do: each word matches a whole word of the title and a quoted phrase must also appear in it, ignoring case; title is also a filter field, where title:"..." is an exact match and title:*word* a case-insensitive LIKE. Each other term names a known field (a goal field, a short judgment field such as outcome, or <evalKey>.<fieldKey>).
4928
+ * A value of an enum or boolean Eval field must be one of its options.
4929
+ * The goal time field is timestamp; _time is not accepted.
4930
+ * The request window is [start, end): end is exclusive.
4931
+ */
4932
+ query?: string;
4933
+ /**
4934
+ * Page-level conditions, ANDed with query; same fields and rules as query.
4935
+ */
4936
+ sources?: Array<Condition>;
4937
+ /**
4938
+ * Start time of the request range
4939
+ */
4940
+ start: string;
4941
+ /**
4942
+ * TimeZone is an IANA name for the sentiment buckets; empty uses the request time zone, then UTC.
4943
+ */
4944
+ timeZone?: string;
4945
+ };
4946
+
4947
+ /**
4948
+ * InsightsRatio is a KPI numerator and its evaluable count, always present.
4949
+ *
4950
+ * Denominator 0 means nothing could be evaluated, so there is no rate.
4951
+ */
4952
+ export type InsightsRatio = {
4953
+ denominator: number;
4954
+ numerator: number;
4955
+ };
4956
+
4957
+ /**
4958
+ * InsightsSummary is the overview payload. A ratio with denominator 0 has no
4959
+ * rate. Totals, PendingGoals and UnclassifiedGoals cover the whole filtered
4960
+ * population, also under parentSubjectId. UnclassifiedGoals counts the goals of
4961
+ * the root bucket of the subject other (subject_id:"other"); under a parent no
4962
+ * such bucket is returned.
4963
+ */
4964
+ export type InsightsSummary = {
4965
+ frustration: InsightsRatio;
4966
+ latestReportedAt: string | null;
4967
+ pendingGoals: number;
4968
+ satisfaction: InsightsRatio;
4969
+ subjects: Array<SubjectBucket>;
4970
+ success: InsightsRatio;
4971
+ totals: InsightsTotals;
4972
+ unclassifiedGoals: number;
4973
+ };
4974
+
4975
+ /**
4976
+ * insightsSummaryRequest is one Insights overview: the same window and
4977
+ * filters as the goal list, plus an optional parent to drill into.
4978
+ */
4979
+ export type InsightsSummaryRequest = {
4980
+ /**
4981
+ * End time of the request range
4982
+ */
4983
+ end: string;
4984
+ /**
4985
+ * Limit keeps the largest subject buckets after shares are computed
4986
+ * against the full population. Zero returns every bucket.
4987
+ */
4988
+ limit?: number;
4989
+ /**
4990
+ * ParentSubjectID drills into one subject; empty is the root.
4991
+ */
4992
+ parentSubjectId?: string;
4993
+ /**
4994
+ * Query is the goal list's gcQL filter; pipes are not supported yet. Free text searches the goal title as the other search routes do: each word matches a whole word of the title and a quoted phrase must also appear in it, ignoring case; title is also a filter field, where title:"..." is an exact match and title:*word* a case-insensitive LIKE. Each other term names a known field (a goal field, a short judgment field such as outcome, or <evalKey>.<fieldKey>).
4995
+ * A value of an enum or boolean Eval field must be one of its options.
4996
+ * The goal time field is timestamp; _time is not accepted.
4997
+ * The request window is [start, end): end is exclusive.
4998
+ */
4999
+ query?: string;
5000
+ /**
5001
+ * Page-level conditions, ANDed with query; same fields and rules as query.
5002
+ */
5003
+ sources?: Array<Condition>;
5004
+ /**
5005
+ * Start time of the request range
5006
+ */
5007
+ start: string;
5008
+ };
5009
+
5010
+ /**
5011
+ * InsightsTotals are the published goals the filters selected.
5012
+ */
5013
+ export type InsightsTotals = {
5014
+ conversations: number;
5015
+ goals: number;
5016
+ };
5017
+
4608
5018
  export type InstallAllAssetsResponse = {
4609
5019
  dashboards?: InstallAssetsResponse;
4610
5020
  monitors?: InstallAssetsResponse;
@@ -8714,6 +9124,23 @@ export type Selector = {
8714
9124
  windowSpec?: WindowSpec;
8715
9125
  };
8716
9126
 
9127
+ /**
9128
+ * SentimentPoint is one chart bucket. A ratio has denominator 0 when the bucket
9129
+ * has nothing to evaluate for it; unknown is counted outside that denominator.
9130
+ * A bucket without goals has every count 0 and every ratio with denominator 0.
9131
+ */
9132
+ export type SentimentPoint = {
9133
+ bucket: string;
9134
+ frustration: InsightsRatio;
9135
+ mixed: InsightsRatio;
9136
+ negative: InsightsRatio;
9137
+ neutral: InsightsRatio;
9138
+ positive: InsightsRatio;
9139
+ satisfaction: InsightsRatio;
9140
+ success: InsightsRatio;
9141
+ unknown: number;
9142
+ };
9143
+
8717
9144
  export type ServiceAccountCreatePayload = {
8718
9145
  /**
8719
9146
  * The UUID of the created service account.
@@ -9225,6 +9652,58 @@ export type Subject = {
9225
9652
  name_gc?: string;
9226
9653
  };
9227
9654
 
9655
+ /**
9656
+ * SubjectBucket is one slice of the subject chart, bucketed by the goal's
9657
+ * subject_id facet. At the root a bucket is a top-level subtree, and the
9658
+ * bucket of the subject other (Direct), under its catalog label, also holds
9659
+ * goals with no current subject. Under a parent, buckets are child subtrees plus the parent's
9660
+ * direct assignments (Direct). Costs sum recorded values in USD, including
9661
+ * pending goals; their known counts expose partial coverage. NonSuccessGoals
9662
+ * and nonSuccessGenAiCostTotal count goals whose outcome is partial_success,
9663
+ * failure, abandoned or blocked; they are not the charts' unresolved blocker state.
9664
+ */
9665
+ export type SubjectBucket = {
9666
+ direct?: boolean;
9667
+ /**
9668
+ * Drilldown is the clause of this bucket. To open it, send the same sources and
9669
+ * (<request query>) AND <clause>, or the clause alone when the request query
9670
+ * is empty; that selects exactly this bucket's goals. A parent's Direct bucket
9671
+ * has none: gcQL cannot select a subject without its children.
9672
+ */
9673
+ drilldown?: string;
9674
+ frustration: InsightsRatio;
9675
+ /**
9676
+ * GenAiCostTotal is the bucket's total cost in USD.
9677
+ */
9678
+ genAiCostTotal: number | null;
9679
+ /**
9680
+ * GenAiCostTotalKnown counts the goals with a recorded cost.
9681
+ */
9682
+ genAiCostTotalKnown: number;
9683
+ goals: number;
9684
+ label: string;
9685
+ /**
9686
+ * NonSuccessGenAiCostTotal is the total cost of the non-success goals in USD.
9687
+ */
9688
+ nonSuccessGenAiCostTotal: number | null;
9689
+ /**
9690
+ * NonSuccessGenAiCostTotalKnown counts the non-success goals with a recorded cost.
9691
+ */
9692
+ nonSuccessGenAiCostTotalKnown: number;
9693
+ nonSuccessGoals: number;
9694
+ share: number;
9695
+ subjectId: string;
9696
+ success: InsightsRatio;
9697
+ };
9698
+
9699
+ /**
9700
+ * SubjectStep is one node on the current root-to-assigned path.
9701
+ */
9702
+ export type SubjectStep = {
9703
+ id: string;
9704
+ label: string;
9705
+ };
9706
+
9228
9707
  /**
9229
9708
  * Suggestion proposes an alternative for a missing resource.
9230
9709
  */