@miradorlabs/web-grpc 4.32.0 → 4.34.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.
@@ -141,41 +141,6 @@ export function aISessionScoreRubricToJSON(object: AISessionScoreRubric): string
141
141
  }
142
142
  }
143
143
 
144
- /** SessionInsightSort orders a page of insights. */
145
- export enum SessionInsightSort {
146
- SESSION_INSIGHT_SORT_UNSPECIFIED = 0,
147
- /** SESSION_INSIGHT_SORT_RECENT - Newest analysis first; within one session, the model's order (most costly first); then source system and session id. */
148
- SESSION_INSIGHT_SORT_RECENT = 1,
149
- UNRECOGNIZED = -1,
150
- }
151
-
152
- export function sessionInsightSortFromJSON(object: any): SessionInsightSort {
153
- switch (object) {
154
- case 0:
155
- case "SESSION_INSIGHT_SORT_UNSPECIFIED":
156
- return SessionInsightSort.SESSION_INSIGHT_SORT_UNSPECIFIED;
157
- case 1:
158
- case "SESSION_INSIGHT_SORT_RECENT":
159
- return SessionInsightSort.SESSION_INSIGHT_SORT_RECENT;
160
- case -1:
161
- case "UNRECOGNIZED":
162
- default:
163
- return SessionInsightSort.UNRECOGNIZED;
164
- }
165
- }
166
-
167
- export function sessionInsightSortToJSON(object: SessionInsightSort): string {
168
- switch (object) {
169
- case SessionInsightSort.SESSION_INSIGHT_SORT_UNSPECIFIED:
170
- return "SESSION_INSIGHT_SORT_UNSPECIFIED";
171
- case SessionInsightSort.SESSION_INSIGHT_SORT_RECENT:
172
- return "SESSION_INSIGHT_SORT_RECENT";
173
- case SessionInsightSort.UNRECOGNIZED:
174
- default:
175
- return "UNRECOGNIZED";
176
- }
177
- }
178
-
179
144
  /**
180
145
  * AISessionInsightActionType is the kind of change an insight recommends (ai.common.v1.AISessionInsightActionType,
181
146
  * same numbers).
@@ -1569,88 +1534,6 @@ export function trackerSyncErrorToJSON(object: TrackerSyncError): string {
1569
1534
  }
1570
1535
  }
1571
1536
 
1572
- /** AIProjectInsightKind is what a card recommends, for display. */
1573
- export enum AIProjectInsightKind {
1574
- AI_PROJECT_INSIGHT_KIND_UNSPECIFIED = 0,
1575
- /** AI_PROJECT_INSIGHT_KIND_REUSABLE_WORKFLOW - A repeated workflow worth turning into a new reusable skill. */
1576
- AI_PROJECT_INSIGHT_KIND_REUSABLE_WORKFLOW = 1,
1577
- AI_PROJECT_INSIGHT_KIND_REPOSITORY_STRUCTURE = 2,
1578
- /** AI_PROJECT_INSIGHT_KIND_SECURITY_REVIEW - An observed concern to investigate, never a confirmed vulnerability. */
1579
- AI_PROJECT_INSIGHT_KIND_SECURITY_REVIEW = 3,
1580
- AI_PROJECT_INSIGHT_KIND_TOOLING_MCP = 4,
1581
- /** AI_PROJECT_INSIGHT_KIND_COORDINATION - Members duplicating work, or needing to coordinate it. */
1582
- AI_PROJECT_INSIGHT_KIND_COORDINATION = 5,
1583
- /** AI_PROJECT_INSIGHT_KIND_SHARED_FOCUS - Members working on the same product, feature or area, who would gain from knowing it. */
1584
- AI_PROJECT_INSIGHT_KIND_SHARED_FOCUS = 6,
1585
- /** AI_PROJECT_INSIGHT_KIND_SKILL_SHARING - A practice, skill or know-how one member shows that others working nearby would benefit from. */
1586
- AI_PROJECT_INSIGHT_KIND_SKILL_SHARING = 7,
1587
- /** AI_PROJECT_INSIGHT_KIND_AGENT_EXPERIENCE - How members get on with their agents: models or tools they favour, and where work flowed or stalled. */
1588
- AI_PROJECT_INSIGHT_KIND_AGENT_EXPERIENCE = 8,
1589
- UNRECOGNIZED = -1,
1590
- }
1591
-
1592
- export function aIProjectInsightKindFromJSON(object: any): AIProjectInsightKind {
1593
- switch (object) {
1594
- case 0:
1595
- case "AI_PROJECT_INSIGHT_KIND_UNSPECIFIED":
1596
- return AIProjectInsightKind.AI_PROJECT_INSIGHT_KIND_UNSPECIFIED;
1597
- case 1:
1598
- case "AI_PROJECT_INSIGHT_KIND_REUSABLE_WORKFLOW":
1599
- return AIProjectInsightKind.AI_PROJECT_INSIGHT_KIND_REUSABLE_WORKFLOW;
1600
- case 2:
1601
- case "AI_PROJECT_INSIGHT_KIND_REPOSITORY_STRUCTURE":
1602
- return AIProjectInsightKind.AI_PROJECT_INSIGHT_KIND_REPOSITORY_STRUCTURE;
1603
- case 3:
1604
- case "AI_PROJECT_INSIGHT_KIND_SECURITY_REVIEW":
1605
- return AIProjectInsightKind.AI_PROJECT_INSIGHT_KIND_SECURITY_REVIEW;
1606
- case 4:
1607
- case "AI_PROJECT_INSIGHT_KIND_TOOLING_MCP":
1608
- return AIProjectInsightKind.AI_PROJECT_INSIGHT_KIND_TOOLING_MCP;
1609
- case 5:
1610
- case "AI_PROJECT_INSIGHT_KIND_COORDINATION":
1611
- return AIProjectInsightKind.AI_PROJECT_INSIGHT_KIND_COORDINATION;
1612
- case 6:
1613
- case "AI_PROJECT_INSIGHT_KIND_SHARED_FOCUS":
1614
- return AIProjectInsightKind.AI_PROJECT_INSIGHT_KIND_SHARED_FOCUS;
1615
- case 7:
1616
- case "AI_PROJECT_INSIGHT_KIND_SKILL_SHARING":
1617
- return AIProjectInsightKind.AI_PROJECT_INSIGHT_KIND_SKILL_SHARING;
1618
- case 8:
1619
- case "AI_PROJECT_INSIGHT_KIND_AGENT_EXPERIENCE":
1620
- return AIProjectInsightKind.AI_PROJECT_INSIGHT_KIND_AGENT_EXPERIENCE;
1621
- case -1:
1622
- case "UNRECOGNIZED":
1623
- default:
1624
- return AIProjectInsightKind.UNRECOGNIZED;
1625
- }
1626
- }
1627
-
1628
- export function aIProjectInsightKindToJSON(object: AIProjectInsightKind): string {
1629
- switch (object) {
1630
- case AIProjectInsightKind.AI_PROJECT_INSIGHT_KIND_UNSPECIFIED:
1631
- return "AI_PROJECT_INSIGHT_KIND_UNSPECIFIED";
1632
- case AIProjectInsightKind.AI_PROJECT_INSIGHT_KIND_REUSABLE_WORKFLOW:
1633
- return "AI_PROJECT_INSIGHT_KIND_REUSABLE_WORKFLOW";
1634
- case AIProjectInsightKind.AI_PROJECT_INSIGHT_KIND_REPOSITORY_STRUCTURE:
1635
- return "AI_PROJECT_INSIGHT_KIND_REPOSITORY_STRUCTURE";
1636
- case AIProjectInsightKind.AI_PROJECT_INSIGHT_KIND_SECURITY_REVIEW:
1637
- return "AI_PROJECT_INSIGHT_KIND_SECURITY_REVIEW";
1638
- case AIProjectInsightKind.AI_PROJECT_INSIGHT_KIND_TOOLING_MCP:
1639
- return "AI_PROJECT_INSIGHT_KIND_TOOLING_MCP";
1640
- case AIProjectInsightKind.AI_PROJECT_INSIGHT_KIND_COORDINATION:
1641
- return "AI_PROJECT_INSIGHT_KIND_COORDINATION";
1642
- case AIProjectInsightKind.AI_PROJECT_INSIGHT_KIND_SHARED_FOCUS:
1643
- return "AI_PROJECT_INSIGHT_KIND_SHARED_FOCUS";
1644
- case AIProjectInsightKind.AI_PROJECT_INSIGHT_KIND_SKILL_SHARING:
1645
- return "AI_PROJECT_INSIGHT_KIND_SKILL_SHARING";
1646
- case AIProjectInsightKind.AI_PROJECT_INSIGHT_KIND_AGENT_EXPERIENCE:
1647
- return "AI_PROJECT_INSIGHT_KIND_AGENT_EXPERIENCE";
1648
- case AIProjectInsightKind.UNRECOGNIZED:
1649
- default:
1650
- return "UNRECOGNIZED";
1651
- }
1652
- }
1653
-
1654
1537
  /**
1655
1538
  * AIAgentKind is whose run made a model call: the session's main thread or a subagent run inside it. Mirrors
1656
1539
  * ai.api.v1.
@@ -3318,66 +3201,93 @@ export interface SessionTotalsBucket {
3318
3201
  subscriptionFacilityUsd: number;
3319
3202
  }
3320
3203
 
3321
- export interface GetSessionAnalysisRequest {
3322
- organizationId: string;
3323
- projectId: string;
3324
- /** source_system + session_id are the session identity. */
3325
- sourceSystem: string;
3326
- sessionId: string;
3327
- }
3328
-
3329
- /** ListSessionInsightsRequest pages a project's insights one insight at a time, newest analysis first. */
3330
- export interface ListSessionInsightsRequest {
3204
+ export interface GetSessionAnalysisOverviewRequest {
3331
3205
  organizationId: string;
3332
3206
  projectId: string;
3333
- /** Narrows the insights; unset reads the whole team's. */
3334
- filter:
3335
- | SessionInsightFilter
3336
- | undefined;
3337
- /** Unspecified is SESSION_INSIGHT_SORT_RECENT. */
3338
- sort: SessionInsightSort;
3339
- /** Insights per page, 1 to 50; 0 is the default, 15. Negative is INVALID_ARGUMENT. */
3340
- pageSize: number;
3341
3207
  /**
3342
- * A next_page_token from the same request; empty reads the first page. A token used with another filter or sort
3343
- * reads on from its position under the new one.
3208
+ * The window's start, which is scope: the sessions last active at or after it. At most 35 days before the
3209
+ * server's clock, else INVALID_ARGUMENT; a start in the future answers an empty overview.
3344
3210
  */
3345
- pageToken: string;
3211
+ activeAfter:
3212
+ | Date
3213
+ | undefined;
3214
+ /** Which of the window's sessions to roll up; unset rolls up the whole project. */
3215
+ filter: SessionAnalysisOverviewFilter | undefined;
3346
3216
  }
3347
3217
 
3348
3218
  /**
3349
- * SessionInsightFilter narrows a project's insights. Fields AND; a repeated field matches any of its values; an unset
3350
- * or empty field does not filter.
3219
+ * SessionAnalysisOverviewFilter narrows the sessions. Fields AND; a repeated field matches any of its values; an
3220
+ * unset or empty field does not filter. Each list holds at most 500 entries, else INVALID_ARGUMENT.
3351
3221
  */
3352
- export interface SessionInsightFilter {
3222
+ export interface SessionAnalysisOverviewFilter {
3353
3223
  /**
3354
- * The session's user (ai_sessions.UserId when the insights were written). Any reader of the project may list any of
3355
- * its people's insights.
3224
+ * The session's actor (its user id, else its api key id, as the summary shows it), as SessionFilter.principals
3225
+ * matches it: a user matches its user id, an api key only a session with no user id, an empty id a session with
3226
+ * neither; each on its source system when one is given. A principal of an unspecified kind is INVALID_ARGUMENT.
3227
+ * An empty list reads the whole project, so a caller does not query a person with no principals.
3356
3228
  */
3357
- userIds: string[];
3229
+ principals: DailyActivityPrincipal[];
3230
+ /** Exact source systems. */
3358
3231
  sourceSystems: string[];
3359
- /** The topics file's keys; a topic the model named has no key and matches none. */
3360
- topicKeys: string[];
3361
3232
  }
3362
3233
 
3363
- export interface ListSessionInsightsResponse {
3234
+ export interface GetSessionAnalysisOverviewResponse {
3364
3235
  status:
3365
3236
  | ResponseStatus
3366
3237
  | undefined;
3367
- /** The page's insights in sort order; empty when the project has none that match. */
3368
- insights: SessionInsightEntry[];
3369
- /** Empty on the last page. */
3370
- nextPageToken: string;
3238
+ /**
3239
+ * Sessions as ListSessions lists them for the same principals, source systems and active_after: its
3240
+ * pagination.total_count.
3241
+ */
3242
+ sessions: number;
3243
+ /**
3244
+ * One row per work type key with at least one session, ordered by key, read in one statement with `sessions`:
3245
+ * the rows add up to the labelled sessions, at most `sessions`. A session with no label, or whose label names
3246
+ * no work type (""), is in no row.
3247
+ */
3248
+ workTypeCounts: SessionWorkTypeCount[];
3249
+ /**
3250
+ * The sessions that carry a score (AISessionSummary.session_score), ordered by last_activity_at descending, then
3251
+ * source_system and session_id ascending, as ListSessions orders by recency; at most 20.
3252
+ */
3253
+ scoredSessions: ScoredSession[];
3254
+ /** How many of the sessions carry a score; scored_sessions holds the first 20 of them. */
3255
+ scoredSessionCount: number;
3256
+ }
3257
+
3258
+ /** SessionWorkTypeCount is how many sessions carry one work type (AISessionSummary.work_type) as their latest label. */
3259
+ export interface SessionWorkTypeCount {
3260
+ workType: string;
3261
+ sessions: number;
3262
+ /**
3263
+ * The latest last_activity_at among those sessions, so a caller can order work types with equal counts by how
3264
+ * recently each was worked on.
3265
+ */
3266
+ lastActivityAt: Date | undefined;
3371
3267
  }
3372
3268
 
3373
- /** SessionInsightEntry is one insight with the session it is about. */
3374
- export interface SessionInsightEntry {
3375
- /** source_system with session_id is the session's identity. */
3269
+ /**
3270
+ * ScoredSession is one session with its score, and what a caller needs to name it and open it. Each field is
3271
+ * AISessionSummary's of the same name.
3272
+ */
3273
+ export interface ScoredSession {
3274
+ sourceSystem: string;
3275
+ sessionId: string;
3276
+ lastActivityAt: Date | undefined;
3277
+ title: string;
3278
+ clients: string[];
3279
+ /** 0-100, from the session's latest grading read from its current session_version. */
3280
+ sessionScore: number;
3281
+ /** UNSPECIFIED when the score predates the scorer recording its template. */
3282
+ sessionScoreRubric: AISessionScoreRubric;
3283
+ }
3284
+
3285
+ export interface GetSessionAnalysisRequest {
3286
+ organizationId: string;
3287
+ projectId: string;
3288
+ /** source_system + session_id are the session identity. */
3376
3289
  sourceSystem: string;
3377
3290
  sessionId: string;
3378
- /** When the insights run that wrote it selected the session. */
3379
- analyzedAt: Date | undefined;
3380
- insight: AISessionInsight | undefined;
3381
3291
  }
3382
3292
 
3383
3293
  /**
@@ -3463,7 +3373,14 @@ export interface AISessionInsight {
3463
3373
  | AISessionInsightTopic
3464
3374
  | undefined;
3465
3375
  /** The catalog skill the insight recommends installing; set when the insight attaches one, always on ADD_SKILL. */
3466
- skill: AISkillSuggestion | undefined;
3376
+ skill:
3377
+ | AISkillSuggestion
3378
+ | undefined;
3379
+ /**
3380
+ * Names this insight of this analysis for AIInsightsGatewayService's ratings: opaque, minted by the server. A later
3381
+ * analysis of the session replaces its insights, and their ids with them.
3382
+ */
3383
+ id: string;
3467
3384
  }
3468
3385
 
3469
3386
  /** AISkillSuggestion pins an immutable catalog revision, even when metadata cannot be resolved now. */
@@ -3530,6 +3447,11 @@ export interface AISessionScore {
3530
3447
  * only rubric_version names it).
3531
3448
  */
3532
3449
  rubric: AISessionScoreRubric;
3450
+ /**
3451
+ * Names this grading of the session for AIInsightsGatewayService's ratings: opaque, minted by the server. A later
3452
+ * grading replaces the score, and its id with it.
3453
+ */
3454
+ id: string;
3533
3455
  }
3534
3456
 
3535
3457
  /**
@@ -4379,95 +4301,6 @@ export interface IssueSession {
4379
4301
  costUsdNanos: string;
4380
4302
  }
4381
4303
 
4382
- export interface ListProjectInsightCardsRequest {
4383
- organizationId: string;
4384
- projectId: string;
4385
- /** Cards per page, 1 to 50; 0 is the default, 15. Negative is a validation error. */
4386
- pageSize: number;
4387
- /** A prior response's next_page_token: resumes after its card's local day and rank. Empty reads the newest cards. */
4388
- pageToken: string;
4389
- }
4390
-
4391
- export interface ListProjectInsightCardsResponse {
4392
- status:
4393
- | ResponseStatus
4394
- | undefined;
4395
- /**
4396
- * Newest local day first, rank order within a day; empty when the project has no READY day. A page can be shorter
4397
- * than page_size while next_page_token is set.
4398
- */
4399
- cards: AIProjectInsightCard[];
4400
- /** Empty on the last page. */
4401
- nextPageToken: string;
4402
- }
4403
-
4404
- /**
4405
- * AIProjectInsightCard is one card with the run that served it: label it with its day and analysis ("Nov 3 (final)",
4406
- * "Today until 14:00, analyzed 14:06").
4407
- */
4408
- export interface AIProjectInsightCard {
4409
- insight: AIProjectInsight | undefined;
4410
- runId: string;
4411
- /** The day the run analyzed, YYYY-MM-DD in time_zone. */
4412
- localDate: string;
4413
- /** The IANA timezone the day is in: the organization's, or "UTC" when it had none. */
4414
- timeZone: string;
4415
- /** True when the run covered the whole local day, final for that day; false while the day is still running. */
4416
- windowClosed: boolean;
4417
- /** When the run analyzed the window. */
4418
- analyzedAt: Date | undefined;
4419
- }
4420
-
4421
- /**
4422
- * AIProjectInsight is one recommendation about the project's work, grounded in sessions of at least two linked people.
4423
- * title, pattern, explanation, action and limitations are model-written text; the counts and spend come from
4424
- * SQL, never from the model. Cards are new on every run: id names this run's card, not a pattern across runs.
4425
- */
4426
- export interface AIProjectInsight {
4427
- id: string;
4428
- /** 1 is the model's highest priority; unique within the run. */
4429
- rank: number;
4430
- /** For display only; not evidence. */
4431
- kind: AIProjectInsightKind;
4432
- title: string;
4433
- /** The observed pattern. */
4434
- pattern: string;
4435
- /** How the cited sessions connect, and why the action follows. */
4436
- explanation: string;
4437
- /** The proposed action. Nothing is done automatically. */
4438
- action: string;
4439
- /** What is still uncertain. */
4440
- limitations: string;
4441
- /** Distinct supporting sessions (at most 50) and their linked people (at least 2). */
4442
- sessionCount: number;
4443
- personCount: number;
4444
- /**
4445
- * Recorded spend in the supporting sessions during the window, in USD, as an exact decimal string ("12.5"). It is a
4446
- * sum of Decimal(18,9) amounts, so it can exceed a double's precision or int64 nanodollars. Absent when it could
4447
- * not be measured, never "0" for unknown. Cards' sessions overlap: never add amounts across cards.
4448
- */
4449
- spendUsd?:
4450
- | string
4451
- | undefined;
4452
- /** The events the card cites, in the model's order; each names a session of the project. */
4453
- citations: AIProjectInsightCitation[];
4454
- /**
4455
- * Absent when this card has no catalog suggestion. The model chose it from its run's shortlist of public skills no
4456
- * session of the project used in the window; its metadata is public reference text, not instructions.
4457
- */
4458
- skillSuggestion: AISkillSuggestion | undefined;
4459
- }
4460
-
4461
- /**
4462
- * AIProjectInsightCitation is one cited event: its session's identity (source_system with session_id) and the
4463
- * event's stored identity in that session.
4464
- */
4465
- export interface AIProjectInsightCitation {
4466
- sourceSystem: string;
4467
- sessionId: string;
4468
- eventRef: AISessionEventRef | undefined;
4469
- }
4470
-
4471
4304
  function createBaseListSessionsRequest(): ListSessionsRequest {
4472
4305
  return { organizationId: "", projectId: "", filter: undefined, sort: 0, page: 0, perPage: 0 };
4473
4306
  }
@@ -24200,167 +24033,28 @@ export const SessionTotalsBucket: MessageFns<SessionTotalsBucket> = {
24200
24033
  },
24201
24034
  };
24202
24035
 
24203
- function createBaseGetSessionAnalysisRequest(): GetSessionAnalysisRequest {
24204
- return { organizationId: "", projectId: "", sourceSystem: "", sessionId: "" };
24036
+ function createBaseGetSessionAnalysisOverviewRequest(): GetSessionAnalysisOverviewRequest {
24037
+ return { organizationId: "", projectId: "", activeAfter: undefined, filter: undefined };
24205
24038
  }
24206
24039
 
24207
- export const GetSessionAnalysisRequest: MessageFns<GetSessionAnalysisRequest> = {
24208
- encode(message: GetSessionAnalysisRequest, writer: BinaryWriter = new BinaryWriter()): BinaryWriter {
24040
+ export const GetSessionAnalysisOverviewRequest: MessageFns<GetSessionAnalysisOverviewRequest> = {
24041
+ encode(message: GetSessionAnalysisOverviewRequest, writer: BinaryWriter = new BinaryWriter()): BinaryWriter {
24209
24042
  if (message.organizationId !== "") {
24210
24043
  writer.uint32(10).string(message.organizationId);
24211
24044
  }
24212
24045
  if (message.projectId !== "") {
24213
24046
  writer.uint32(18).string(message.projectId);
24214
24047
  }
24215
- if (message.sourceSystem !== "") {
24216
- writer.uint32(26).string(message.sourceSystem);
24217
- }
24218
- if (message.sessionId !== "") {
24219
- writer.uint32(34).string(message.sessionId);
24220
- }
24221
- return writer;
24222
- },
24223
-
24224
- decode(input: BinaryReader | Uint8Array, length?: number): GetSessionAnalysisRequest {
24225
- const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
24226
- const previousRecursionDepth = (reader as any).__tsProtoDecodeDepth ?? 0;
24227
- if (previousRecursionDepth >= 100) {
24228
- throw new globalThis.Error("protobuf decode recursion limit exceeded");
24229
- }
24230
- (reader as any).__tsProtoDecodeDepth = previousRecursionDepth + 1;
24231
- try {
24232
- const end = length === undefined ? reader.len : reader.pos + length;
24233
- const message = createBaseGetSessionAnalysisRequest();
24234
- while (reader.pos < end) {
24235
- const tag = reader.uint32();
24236
- switch (tag >>> 3) {
24237
- case 1: {
24238
- if (tag !== 10) {
24239
- break;
24240
- }
24241
-
24242
- message.organizationId = reader.string();
24243
- continue;
24244
- }
24245
- case 2: {
24246
- if (tag !== 18) {
24247
- break;
24248
- }
24249
-
24250
- message.projectId = reader.string();
24251
- continue;
24252
- }
24253
- case 3: {
24254
- if (tag !== 26) {
24255
- break;
24256
- }
24257
-
24258
- message.sourceSystem = reader.string();
24259
- continue;
24260
- }
24261
- case 4: {
24262
- if (tag !== 34) {
24263
- break;
24264
- }
24265
-
24266
- message.sessionId = reader.string();
24267
- continue;
24268
- }
24269
- }
24270
- if ((tag & 7) === 4 || tag === 0) {
24271
- break;
24272
- }
24273
- reader.skip(tag & 7);
24274
- }
24275
- return message;
24276
- } finally {
24277
- (reader as any).__tsProtoDecodeDepth = previousRecursionDepth;
24278
- }
24279
- },
24280
-
24281
- fromJSON(object: any): GetSessionAnalysisRequest {
24282
- return {
24283
- organizationId: isSet(object.organizationId)
24284
- ? globalThis.String(object.organizationId)
24285
- : isSet(object.organization_id)
24286
- ? globalThis.String(object.organization_id)
24287
- : "",
24288
- projectId: isSet(object.projectId)
24289
- ? globalThis.String(object.projectId)
24290
- : isSet(object.project_id)
24291
- ? globalThis.String(object.project_id)
24292
- : "",
24293
- sourceSystem: isSet(object.sourceSystem)
24294
- ? globalThis.String(object.sourceSystem)
24295
- : isSet(object.source_system)
24296
- ? globalThis.String(object.source_system)
24297
- : "",
24298
- sessionId: isSet(object.sessionId)
24299
- ? globalThis.String(object.sessionId)
24300
- : isSet(object.session_id)
24301
- ? globalThis.String(object.session_id)
24302
- : "",
24303
- };
24304
- },
24305
-
24306
- toJSON(message: GetSessionAnalysisRequest): unknown {
24307
- const obj: any = {};
24308
- if (message.organizationId !== "") {
24309
- obj.organizationId = message.organizationId;
24310
- }
24311
- if (message.projectId !== "") {
24312
- obj.projectId = message.projectId;
24313
- }
24314
- if (message.sourceSystem !== "") {
24315
- obj.sourceSystem = message.sourceSystem;
24316
- }
24317
- if (message.sessionId !== "") {
24318
- obj.sessionId = message.sessionId;
24319
- }
24320
- return obj;
24321
- },
24322
-
24323
- create<I extends Exact<DeepPartial<GetSessionAnalysisRequest>, I>>(base?: I): GetSessionAnalysisRequest {
24324
- return GetSessionAnalysisRequest.fromPartial(base ?? ({} as any));
24325
- },
24326
- fromPartial<I extends Exact<DeepPartial<GetSessionAnalysisRequest>, I>>(object: I): GetSessionAnalysisRequest {
24327
- const message = createBaseGetSessionAnalysisRequest();
24328
- message.organizationId = object.organizationId ?? "";
24329
- message.projectId = object.projectId ?? "";
24330
- message.sourceSystem = object.sourceSystem ?? "";
24331
- message.sessionId = object.sessionId ?? "";
24332
- return message;
24333
- },
24334
- };
24335
-
24336
- function createBaseListSessionInsightsRequest(): ListSessionInsightsRequest {
24337
- return { organizationId: "", projectId: "", filter: undefined, sort: 0, pageSize: 0, pageToken: "" };
24338
- }
24339
-
24340
- export const ListSessionInsightsRequest: MessageFns<ListSessionInsightsRequest> = {
24341
- encode(message: ListSessionInsightsRequest, writer: BinaryWriter = new BinaryWriter()): BinaryWriter {
24342
- if (message.organizationId !== "") {
24343
- writer.uint32(10).string(message.organizationId);
24344
- }
24345
- if (message.projectId !== "") {
24346
- writer.uint32(18).string(message.projectId);
24048
+ if (message.activeAfter !== undefined) {
24049
+ Timestamp.encode(toTimestamp(message.activeAfter), writer.uint32(26).fork()).join();
24347
24050
  }
24348
24051
  if (message.filter !== undefined) {
24349
- SessionInsightFilter.encode(message.filter, writer.uint32(26).fork()).join();
24350
- }
24351
- if (message.sort !== 0) {
24352
- writer.uint32(32).int32(message.sort);
24353
- }
24354
- if (message.pageSize !== 0) {
24355
- writer.uint32(40).int32(message.pageSize);
24356
- }
24357
- if (message.pageToken !== "") {
24358
- writer.uint32(50).string(message.pageToken);
24052
+ SessionAnalysisOverviewFilter.encode(message.filter, writer.uint32(34).fork()).join();
24359
24053
  }
24360
24054
  return writer;
24361
24055
  },
24362
24056
 
24363
- decode(input: BinaryReader | Uint8Array, length?: number): ListSessionInsightsRequest {
24057
+ decode(input: BinaryReader | Uint8Array, length?: number): GetSessionAnalysisOverviewRequest {
24364
24058
  const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
24365
24059
  const previousRecursionDepth = (reader as any).__tsProtoDecodeDepth ?? 0;
24366
24060
  if (previousRecursionDepth >= 100) {
@@ -24369,7 +24063,7 @@ export const ListSessionInsightsRequest: MessageFns<ListSessionInsightsRequest>
24369
24063
  (reader as any).__tsProtoDecodeDepth = previousRecursionDepth + 1;
24370
24064
  try {
24371
24065
  const end = length === undefined ? reader.len : reader.pos + length;
24372
- const message = createBaseListSessionInsightsRequest();
24066
+ const message = createBaseGetSessionAnalysisOverviewRequest();
24373
24067
  while (reader.pos < end) {
24374
24068
  const tag = reader.uint32();
24375
24069
  switch (tag >>> 3) {
@@ -24394,31 +24088,15 @@ export const ListSessionInsightsRequest: MessageFns<ListSessionInsightsRequest>
24394
24088
  break;
24395
24089
  }
24396
24090
 
24397
- message.filter = SessionInsightFilter.decode(reader, reader.uint32());
24091
+ message.activeAfter = fromTimestamp(Timestamp.decode(reader, reader.uint32()));
24398
24092
  continue;
24399
24093
  }
24400
24094
  case 4: {
24401
- if (tag !== 32) {
24402
- break;
24403
- }
24404
-
24405
- message.sort = reader.int32() as any;
24406
- continue;
24407
- }
24408
- case 5: {
24409
- if (tag !== 40) {
24410
- break;
24411
- }
24412
-
24413
- message.pageSize = reader.int32();
24414
- continue;
24415
- }
24416
- case 6: {
24417
- if (tag !== 50) {
24095
+ if (tag !== 34) {
24418
24096
  break;
24419
24097
  }
24420
24098
 
24421
- message.pageToken = reader.string();
24099
+ message.filter = SessionAnalysisOverviewFilter.decode(reader, reader.uint32());
24422
24100
  continue;
24423
24101
  }
24424
24102
  }
@@ -24433,7 +24111,7 @@ export const ListSessionInsightsRequest: MessageFns<ListSessionInsightsRequest>
24433
24111
  }
24434
24112
  },
24435
24113
 
24436
- fromJSON(object: any): ListSessionInsightsRequest {
24114
+ fromJSON(object: any): GetSessionAnalysisOverviewRequest {
24437
24115
  return {
24438
24116
  organizationId: isSet(object.organizationId)
24439
24117
  ? globalThis.String(object.organizationId)
@@ -24445,22 +24123,16 @@ export const ListSessionInsightsRequest: MessageFns<ListSessionInsightsRequest>
24445
24123
  : isSet(object.project_id)
24446
24124
  ? globalThis.String(object.project_id)
24447
24125
  : "",
24448
- filter: isSet(object.filter) ? SessionInsightFilter.fromJSON(object.filter) : undefined,
24449
- sort: isSet(object.sort) ? sessionInsightSortFromJSON(object.sort) : 0,
24450
- pageSize: isSet(object.pageSize)
24451
- ? globalThis.Number(object.pageSize)
24452
- : isSet(object.page_size)
24453
- ? globalThis.Number(object.page_size)
24454
- : 0,
24455
- pageToken: isSet(object.pageToken)
24456
- ? globalThis.String(object.pageToken)
24457
- : isSet(object.page_token)
24458
- ? globalThis.String(object.page_token)
24459
- : "",
24126
+ activeAfter: isSet(object.activeAfter)
24127
+ ? fromJsonTimestamp(object.activeAfter)
24128
+ : isSet(object.active_after)
24129
+ ? fromJsonTimestamp(object.active_after)
24130
+ : undefined,
24131
+ filter: isSet(object.filter) ? SessionAnalysisOverviewFilter.fromJSON(object.filter) : undefined,
24460
24132
  };
24461
24133
  },
24462
24134
 
24463
- toJSON(message: ListSessionInsightsRequest): unknown {
24135
+ toJSON(message: GetSessionAnalysisOverviewRequest): unknown {
24464
24136
  const obj: any = {};
24465
24137
  if (message.organizationId !== "") {
24466
24138
  obj.organizationId = message.organizationId;
@@ -24468,57 +24140,50 @@ export const ListSessionInsightsRequest: MessageFns<ListSessionInsightsRequest>
24468
24140
  if (message.projectId !== "") {
24469
24141
  obj.projectId = message.projectId;
24470
24142
  }
24471
- if (message.filter !== undefined) {
24472
- obj.filter = SessionInsightFilter.toJSON(message.filter);
24473
- }
24474
- if (message.sort !== 0) {
24475
- obj.sort = sessionInsightSortToJSON(message.sort);
24476
- }
24477
- if (message.pageSize !== 0) {
24478
- obj.pageSize = Math.round(message.pageSize);
24143
+ if (message.activeAfter !== undefined) {
24144
+ obj.activeAfter = message.activeAfter.toISOString();
24479
24145
  }
24480
- if (message.pageToken !== "") {
24481
- obj.pageToken = message.pageToken;
24146
+ if (message.filter !== undefined) {
24147
+ obj.filter = SessionAnalysisOverviewFilter.toJSON(message.filter);
24482
24148
  }
24483
24149
  return obj;
24484
24150
  },
24485
24151
 
24486
- create<I extends Exact<DeepPartial<ListSessionInsightsRequest>, I>>(base?: I): ListSessionInsightsRequest {
24487
- return ListSessionInsightsRequest.fromPartial(base ?? ({} as any));
24152
+ create<I extends Exact<DeepPartial<GetSessionAnalysisOverviewRequest>, I>>(
24153
+ base?: I,
24154
+ ): GetSessionAnalysisOverviewRequest {
24155
+ return GetSessionAnalysisOverviewRequest.fromPartial(base ?? ({} as any));
24488
24156
  },
24489
- fromPartial<I extends Exact<DeepPartial<ListSessionInsightsRequest>, I>>(object: I): ListSessionInsightsRequest {
24490
- const message = createBaseListSessionInsightsRequest();
24157
+ fromPartial<I extends Exact<DeepPartial<GetSessionAnalysisOverviewRequest>, I>>(
24158
+ object: I,
24159
+ ): GetSessionAnalysisOverviewRequest {
24160
+ const message = createBaseGetSessionAnalysisOverviewRequest();
24491
24161
  message.organizationId = object.organizationId ?? "";
24492
24162
  message.projectId = object.projectId ?? "";
24163
+ message.activeAfter = object.activeAfter ?? undefined;
24493
24164
  message.filter = (object.filter !== undefined && object.filter !== null)
24494
- ? SessionInsightFilter.fromPartial(object.filter)
24165
+ ? SessionAnalysisOverviewFilter.fromPartial(object.filter)
24495
24166
  : undefined;
24496
- message.sort = object.sort ?? 0;
24497
- message.pageSize = object.pageSize ?? 0;
24498
- message.pageToken = object.pageToken ?? "";
24499
24167
  return message;
24500
24168
  },
24501
24169
  };
24502
24170
 
24503
- function createBaseSessionInsightFilter(): SessionInsightFilter {
24504
- return { userIds: [], sourceSystems: [], topicKeys: [] };
24171
+ function createBaseSessionAnalysisOverviewFilter(): SessionAnalysisOverviewFilter {
24172
+ return { principals: [], sourceSystems: [] };
24505
24173
  }
24506
24174
 
24507
- export const SessionInsightFilter: MessageFns<SessionInsightFilter> = {
24508
- encode(message: SessionInsightFilter, writer: BinaryWriter = new BinaryWriter()): BinaryWriter {
24509
- for (const v of message.userIds) {
24510
- writer.uint32(10).string(v!);
24175
+ export const SessionAnalysisOverviewFilter: MessageFns<SessionAnalysisOverviewFilter> = {
24176
+ encode(message: SessionAnalysisOverviewFilter, writer: BinaryWriter = new BinaryWriter()): BinaryWriter {
24177
+ for (const v of message.principals) {
24178
+ DailyActivityPrincipal.encode(v!, writer.uint32(10).fork()).join();
24511
24179
  }
24512
24180
  for (const v of message.sourceSystems) {
24513
24181
  writer.uint32(18).string(v!);
24514
24182
  }
24515
- for (const v of message.topicKeys) {
24516
- writer.uint32(26).string(v!);
24517
- }
24518
24183
  return writer;
24519
24184
  },
24520
24185
 
24521
- decode(input: BinaryReader | Uint8Array, length?: number): SessionInsightFilter {
24186
+ decode(input: BinaryReader | Uint8Array, length?: number): SessionAnalysisOverviewFilter {
24522
24187
  const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
24523
24188
  const previousRecursionDepth = (reader as any).__tsProtoDecodeDepth ?? 0;
24524
24189
  if (previousRecursionDepth >= 100) {
@@ -24527,7 +24192,7 @@ export const SessionInsightFilter: MessageFns<SessionInsightFilter> = {
24527
24192
  (reader as any).__tsProtoDecodeDepth = previousRecursionDepth + 1;
24528
24193
  try {
24529
24194
  const end = length === undefined ? reader.len : reader.pos + length;
24530
- const message = createBaseSessionInsightFilter();
24195
+ const message = createBaseSessionAnalysisOverviewFilter();
24531
24196
  while (reader.pos < end) {
24532
24197
  const tag = reader.uint32();
24533
24198
  switch (tag >>> 3) {
@@ -24536,7 +24201,7 @@ export const SessionInsightFilter: MessageFns<SessionInsightFilter> = {
24536
24201
  break;
24537
24202
  }
24538
24203
 
24539
- message.userIds.push(reader.string());
24204
+ message.principals.push(DailyActivityPrincipal.decode(reader, reader.uint32()));
24540
24205
  continue;
24541
24206
  }
24542
24207
  case 2: {
@@ -24547,14 +24212,6 @@ export const SessionInsightFilter: MessageFns<SessionInsightFilter> = {
24547
24212
  message.sourceSystems.push(reader.string());
24548
24213
  continue;
24549
24214
  }
24550
- case 3: {
24551
- if (tag !== 26) {
24552
- break;
24553
- }
24554
-
24555
- message.topicKeys.push(reader.string());
24556
- continue;
24557
- }
24558
24215
  }
24559
24216
  if ((tag & 7) === 4 || tag === 0) {
24560
24217
  break;
@@ -24567,71 +24224,68 @@ export const SessionInsightFilter: MessageFns<SessionInsightFilter> = {
24567
24224
  }
24568
24225
  },
24569
24226
 
24570
- fromJSON(object: any): SessionInsightFilter {
24227
+ fromJSON(object: any): SessionAnalysisOverviewFilter {
24571
24228
  return {
24572
- userIds: globalThis.Array.isArray(object?.userIds)
24573
- ? object.userIds.map((e: any) => globalThis.String(e))
24574
- : globalThis.Array.isArray(object?.user_ids)
24575
- ? object.user_ids.map((e: any) => globalThis.String(e))
24229
+ principals: globalThis.Array.isArray(object?.principals)
24230
+ ? object.principals.map((e: any) => DailyActivityPrincipal.fromJSON(e))
24576
24231
  : [],
24577
24232
  sourceSystems: globalThis.Array.isArray(object?.sourceSystems)
24578
24233
  ? object.sourceSystems.map((e: any) => globalThis.String(e))
24579
24234
  : globalThis.Array.isArray(object?.source_systems)
24580
24235
  ? object.source_systems.map((e: any) => globalThis.String(e))
24581
24236
  : [],
24582
- topicKeys: globalThis.Array.isArray(object?.topicKeys)
24583
- ? object.topicKeys.map((e: any) => globalThis.String(e))
24584
- : globalThis.Array.isArray(object?.topic_keys)
24585
- ? object.topic_keys.map((e: any) => globalThis.String(e))
24586
- : [],
24587
24237
  };
24588
24238
  },
24589
24239
 
24590
- toJSON(message: SessionInsightFilter): unknown {
24240
+ toJSON(message: SessionAnalysisOverviewFilter): unknown {
24591
24241
  const obj: any = {};
24592
- if (message.userIds?.length) {
24593
- obj.userIds = message.userIds;
24242
+ if (message.principals?.length) {
24243
+ obj.principals = message.principals.map((e) => DailyActivityPrincipal.toJSON(e));
24594
24244
  }
24595
24245
  if (message.sourceSystems?.length) {
24596
24246
  obj.sourceSystems = message.sourceSystems;
24597
24247
  }
24598
- if (message.topicKeys?.length) {
24599
- obj.topicKeys = message.topicKeys;
24600
- }
24601
24248
  return obj;
24602
24249
  },
24603
24250
 
24604
- create<I extends Exact<DeepPartial<SessionInsightFilter>, I>>(base?: I): SessionInsightFilter {
24605
- return SessionInsightFilter.fromPartial(base ?? ({} as any));
24251
+ create<I extends Exact<DeepPartial<SessionAnalysisOverviewFilter>, I>>(base?: I): SessionAnalysisOverviewFilter {
24252
+ return SessionAnalysisOverviewFilter.fromPartial(base ?? ({} as any));
24606
24253
  },
24607
- fromPartial<I extends Exact<DeepPartial<SessionInsightFilter>, I>>(object: I): SessionInsightFilter {
24608
- const message = createBaseSessionInsightFilter();
24609
- message.userIds = object.userIds?.map((e) => e) || [];
24254
+ fromPartial<I extends Exact<DeepPartial<SessionAnalysisOverviewFilter>, I>>(
24255
+ object: I,
24256
+ ): SessionAnalysisOverviewFilter {
24257
+ const message = createBaseSessionAnalysisOverviewFilter();
24258
+ message.principals = object.principals?.map((e) => DailyActivityPrincipal.fromPartial(e)) || [];
24610
24259
  message.sourceSystems = object.sourceSystems?.map((e) => e) || [];
24611
- message.topicKeys = object.topicKeys?.map((e) => e) || [];
24612
24260
  return message;
24613
24261
  },
24614
24262
  };
24615
24263
 
24616
- function createBaseListSessionInsightsResponse(): ListSessionInsightsResponse {
24617
- return { status: undefined, insights: [], nextPageToken: "" };
24264
+ function createBaseGetSessionAnalysisOverviewResponse(): GetSessionAnalysisOverviewResponse {
24265
+ return { status: undefined, sessions: 0, workTypeCounts: [], scoredSessions: [], scoredSessionCount: 0 };
24618
24266
  }
24619
24267
 
24620
- export const ListSessionInsightsResponse: MessageFns<ListSessionInsightsResponse> = {
24621
- encode(message: ListSessionInsightsResponse, writer: BinaryWriter = new BinaryWriter()): BinaryWriter {
24268
+ export const GetSessionAnalysisOverviewResponse: MessageFns<GetSessionAnalysisOverviewResponse> = {
24269
+ encode(message: GetSessionAnalysisOverviewResponse, writer: BinaryWriter = new BinaryWriter()): BinaryWriter {
24622
24270
  if (message.status !== undefined) {
24623
24271
  ResponseStatus.encode(message.status, writer.uint32(10).fork()).join();
24624
24272
  }
24625
- for (const v of message.insights) {
24626
- SessionInsightEntry.encode(v!, writer.uint32(18).fork()).join();
24273
+ if (message.sessions !== 0) {
24274
+ writer.uint32(16).uint64(message.sessions);
24627
24275
  }
24628
- if (message.nextPageToken !== "") {
24629
- writer.uint32(26).string(message.nextPageToken);
24276
+ for (const v of message.workTypeCounts) {
24277
+ SessionWorkTypeCount.encode(v!, writer.uint32(26).fork()).join();
24278
+ }
24279
+ for (const v of message.scoredSessions) {
24280
+ ScoredSession.encode(v!, writer.uint32(34).fork()).join();
24281
+ }
24282
+ if (message.scoredSessionCount !== 0) {
24283
+ writer.uint32(40).uint64(message.scoredSessionCount);
24630
24284
  }
24631
24285
  return writer;
24632
24286
  },
24633
24287
 
24634
- decode(input: BinaryReader | Uint8Array, length?: number): ListSessionInsightsResponse {
24288
+ decode(input: BinaryReader | Uint8Array, length?: number): GetSessionAnalysisOverviewResponse {
24635
24289
  const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
24636
24290
  const previousRecursionDepth = (reader as any).__tsProtoDecodeDepth ?? 0;
24637
24291
  if (previousRecursionDepth >= 100) {
@@ -24640,7 +24294,7 @@ export const ListSessionInsightsResponse: MessageFns<ListSessionInsightsResponse
24640
24294
  (reader as any).__tsProtoDecodeDepth = previousRecursionDepth + 1;
24641
24295
  try {
24642
24296
  const end = length === undefined ? reader.len : reader.pos + length;
24643
- const message = createBaseListSessionInsightsResponse();
24297
+ const message = createBaseGetSessionAnalysisOverviewResponse();
24644
24298
  while (reader.pos < end) {
24645
24299
  const tag = reader.uint32();
24646
24300
  switch (tag >>> 3) {
@@ -24653,11 +24307,11 @@ export const ListSessionInsightsResponse: MessageFns<ListSessionInsightsResponse
24653
24307
  continue;
24654
24308
  }
24655
24309
  case 2: {
24656
- if (tag !== 18) {
24310
+ if (tag !== 16) {
24657
24311
  break;
24658
24312
  }
24659
24313
 
24660
- message.insights.push(SessionInsightEntry.decode(reader, reader.uint32()));
24314
+ message.sessions = longToNumber(reader.uint64());
24661
24315
  continue;
24662
24316
  }
24663
24317
  case 3: {
@@ -24665,7 +24319,23 @@ export const ListSessionInsightsResponse: MessageFns<ListSessionInsightsResponse
24665
24319
  break;
24666
24320
  }
24667
24321
 
24668
- message.nextPageToken = reader.string();
24322
+ message.workTypeCounts.push(SessionWorkTypeCount.decode(reader, reader.uint32()));
24323
+ continue;
24324
+ }
24325
+ case 4: {
24326
+ if (tag !== 34) {
24327
+ break;
24328
+ }
24329
+
24330
+ message.scoredSessions.push(ScoredSession.decode(reader, reader.uint32()));
24331
+ continue;
24332
+ }
24333
+ case 5: {
24334
+ if (tag !== 40) {
24335
+ break;
24336
+ }
24337
+
24338
+ message.scoredSessionCount = longToNumber(reader.uint64());
24669
24339
  continue;
24670
24340
  }
24671
24341
  }
@@ -24680,70 +24350,216 @@ export const ListSessionInsightsResponse: MessageFns<ListSessionInsightsResponse
24680
24350
  }
24681
24351
  },
24682
24352
 
24683
- fromJSON(object: any): ListSessionInsightsResponse {
24353
+ fromJSON(object: any): GetSessionAnalysisOverviewResponse {
24684
24354
  return {
24685
24355
  status: isSet(object.status) ? ResponseStatus.fromJSON(object.status) : undefined,
24686
- insights: globalThis.Array.isArray(object?.insights)
24687
- ? object.insights.map((e: any) => SessionInsightEntry.fromJSON(e))
24356
+ sessions: isSet(object.sessions) ? globalThis.Number(object.sessions) : 0,
24357
+ workTypeCounts: globalThis.Array.isArray(object?.workTypeCounts)
24358
+ ? object.workTypeCounts.map((e: any) => SessionWorkTypeCount.fromJSON(e))
24359
+ : globalThis.Array.isArray(object?.work_type_counts)
24360
+ ? object.work_type_counts.map((e: any) => SessionWorkTypeCount.fromJSON(e))
24688
24361
  : [],
24689
- nextPageToken: isSet(object.nextPageToken)
24690
- ? globalThis.String(object.nextPageToken)
24691
- : isSet(object.next_page_token)
24692
- ? globalThis.String(object.next_page_token)
24693
- : "",
24362
+ scoredSessions: globalThis.Array.isArray(object?.scoredSessions)
24363
+ ? object.scoredSessions.map((e: any) => ScoredSession.fromJSON(e))
24364
+ : globalThis.Array.isArray(object?.scored_sessions)
24365
+ ? object.scored_sessions.map((e: any) => ScoredSession.fromJSON(e))
24366
+ : [],
24367
+ scoredSessionCount: isSet(object.scoredSessionCount)
24368
+ ? globalThis.Number(object.scoredSessionCount)
24369
+ : isSet(object.scored_session_count)
24370
+ ? globalThis.Number(object.scored_session_count)
24371
+ : 0,
24694
24372
  };
24695
24373
  },
24696
24374
 
24697
- toJSON(message: ListSessionInsightsResponse): unknown {
24375
+ toJSON(message: GetSessionAnalysisOverviewResponse): unknown {
24698
24376
  const obj: any = {};
24699
24377
  if (message.status !== undefined) {
24700
24378
  obj.status = ResponseStatus.toJSON(message.status);
24701
24379
  }
24702
- if (message.insights?.length) {
24703
- obj.insights = message.insights.map((e) => SessionInsightEntry.toJSON(e));
24380
+ if (message.sessions !== 0) {
24381
+ obj.sessions = Math.round(message.sessions);
24704
24382
  }
24705
- if (message.nextPageToken !== "") {
24706
- obj.nextPageToken = message.nextPageToken;
24383
+ if (message.workTypeCounts?.length) {
24384
+ obj.workTypeCounts = message.workTypeCounts.map((e) => SessionWorkTypeCount.toJSON(e));
24385
+ }
24386
+ if (message.scoredSessions?.length) {
24387
+ obj.scoredSessions = message.scoredSessions.map((e) => ScoredSession.toJSON(e));
24388
+ }
24389
+ if (message.scoredSessionCount !== 0) {
24390
+ obj.scoredSessionCount = Math.round(message.scoredSessionCount);
24707
24391
  }
24708
24392
  return obj;
24709
24393
  },
24710
24394
 
24711
- create<I extends Exact<DeepPartial<ListSessionInsightsResponse>, I>>(base?: I): ListSessionInsightsResponse {
24712
- return ListSessionInsightsResponse.fromPartial(base ?? ({} as any));
24395
+ create<I extends Exact<DeepPartial<GetSessionAnalysisOverviewResponse>, I>>(
24396
+ base?: I,
24397
+ ): GetSessionAnalysisOverviewResponse {
24398
+ return GetSessionAnalysisOverviewResponse.fromPartial(base ?? ({} as any));
24713
24399
  },
24714
- fromPartial<I extends Exact<DeepPartial<ListSessionInsightsResponse>, I>>(object: I): ListSessionInsightsResponse {
24715
- const message = createBaseListSessionInsightsResponse();
24400
+ fromPartial<I extends Exact<DeepPartial<GetSessionAnalysisOverviewResponse>, I>>(
24401
+ object: I,
24402
+ ): GetSessionAnalysisOverviewResponse {
24403
+ const message = createBaseGetSessionAnalysisOverviewResponse();
24716
24404
  message.status = (object.status !== undefined && object.status !== null)
24717
24405
  ? ResponseStatus.fromPartial(object.status)
24718
24406
  : undefined;
24719
- message.insights = object.insights?.map((e) => SessionInsightEntry.fromPartial(e)) || [];
24720
- message.nextPageToken = object.nextPageToken ?? "";
24407
+ message.sessions = object.sessions ?? 0;
24408
+ message.workTypeCounts = object.workTypeCounts?.map((e) => SessionWorkTypeCount.fromPartial(e)) || [];
24409
+ message.scoredSessions = object.scoredSessions?.map((e) => ScoredSession.fromPartial(e)) || [];
24410
+ message.scoredSessionCount = object.scoredSessionCount ?? 0;
24721
24411
  return message;
24722
24412
  },
24723
24413
  };
24724
24414
 
24725
- function createBaseSessionInsightEntry(): SessionInsightEntry {
24726
- return { sourceSystem: "", sessionId: "", analyzedAt: undefined, insight: undefined };
24415
+ function createBaseSessionWorkTypeCount(): SessionWorkTypeCount {
24416
+ return { workType: "", sessions: 0, lastActivityAt: undefined };
24727
24417
  }
24728
24418
 
24729
- export const SessionInsightEntry: MessageFns<SessionInsightEntry> = {
24730
- encode(message: SessionInsightEntry, writer: BinaryWriter = new BinaryWriter()): BinaryWriter {
24419
+ export const SessionWorkTypeCount: MessageFns<SessionWorkTypeCount> = {
24420
+ encode(message: SessionWorkTypeCount, writer: BinaryWriter = new BinaryWriter()): BinaryWriter {
24421
+ if (message.workType !== "") {
24422
+ writer.uint32(10).string(message.workType);
24423
+ }
24424
+ if (message.sessions !== 0) {
24425
+ writer.uint32(16).uint64(message.sessions);
24426
+ }
24427
+ if (message.lastActivityAt !== undefined) {
24428
+ Timestamp.encode(toTimestamp(message.lastActivityAt), writer.uint32(26).fork()).join();
24429
+ }
24430
+ return writer;
24431
+ },
24432
+
24433
+ decode(input: BinaryReader | Uint8Array, length?: number): SessionWorkTypeCount {
24434
+ const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
24435
+ const previousRecursionDepth = (reader as any).__tsProtoDecodeDepth ?? 0;
24436
+ if (previousRecursionDepth >= 100) {
24437
+ throw new globalThis.Error("protobuf decode recursion limit exceeded");
24438
+ }
24439
+ (reader as any).__tsProtoDecodeDepth = previousRecursionDepth + 1;
24440
+ try {
24441
+ const end = length === undefined ? reader.len : reader.pos + length;
24442
+ const message = createBaseSessionWorkTypeCount();
24443
+ while (reader.pos < end) {
24444
+ const tag = reader.uint32();
24445
+ switch (tag >>> 3) {
24446
+ case 1: {
24447
+ if (tag !== 10) {
24448
+ break;
24449
+ }
24450
+
24451
+ message.workType = reader.string();
24452
+ continue;
24453
+ }
24454
+ case 2: {
24455
+ if (tag !== 16) {
24456
+ break;
24457
+ }
24458
+
24459
+ message.sessions = longToNumber(reader.uint64());
24460
+ continue;
24461
+ }
24462
+ case 3: {
24463
+ if (tag !== 26) {
24464
+ break;
24465
+ }
24466
+
24467
+ message.lastActivityAt = fromTimestamp(Timestamp.decode(reader, reader.uint32()));
24468
+ continue;
24469
+ }
24470
+ }
24471
+ if ((tag & 7) === 4 || tag === 0) {
24472
+ break;
24473
+ }
24474
+ reader.skip(tag & 7);
24475
+ }
24476
+ return message;
24477
+ } finally {
24478
+ (reader as any).__tsProtoDecodeDepth = previousRecursionDepth;
24479
+ }
24480
+ },
24481
+
24482
+ fromJSON(object: any): SessionWorkTypeCount {
24483
+ return {
24484
+ workType: isSet(object.workType)
24485
+ ? globalThis.String(object.workType)
24486
+ : isSet(object.work_type)
24487
+ ? globalThis.String(object.work_type)
24488
+ : "",
24489
+ sessions: isSet(object.sessions) ? globalThis.Number(object.sessions) : 0,
24490
+ lastActivityAt: isSet(object.lastActivityAt)
24491
+ ? fromJsonTimestamp(object.lastActivityAt)
24492
+ : isSet(object.last_activity_at)
24493
+ ? fromJsonTimestamp(object.last_activity_at)
24494
+ : undefined,
24495
+ };
24496
+ },
24497
+
24498
+ toJSON(message: SessionWorkTypeCount): unknown {
24499
+ const obj: any = {};
24500
+ if (message.workType !== "") {
24501
+ obj.workType = message.workType;
24502
+ }
24503
+ if (message.sessions !== 0) {
24504
+ obj.sessions = Math.round(message.sessions);
24505
+ }
24506
+ if (message.lastActivityAt !== undefined) {
24507
+ obj.lastActivityAt = message.lastActivityAt.toISOString();
24508
+ }
24509
+ return obj;
24510
+ },
24511
+
24512
+ create<I extends Exact<DeepPartial<SessionWorkTypeCount>, I>>(base?: I): SessionWorkTypeCount {
24513
+ return SessionWorkTypeCount.fromPartial(base ?? ({} as any));
24514
+ },
24515
+ fromPartial<I extends Exact<DeepPartial<SessionWorkTypeCount>, I>>(object: I): SessionWorkTypeCount {
24516
+ const message = createBaseSessionWorkTypeCount();
24517
+ message.workType = object.workType ?? "";
24518
+ message.sessions = object.sessions ?? 0;
24519
+ message.lastActivityAt = object.lastActivityAt ?? undefined;
24520
+ return message;
24521
+ },
24522
+ };
24523
+
24524
+ function createBaseScoredSession(): ScoredSession {
24525
+ return {
24526
+ sourceSystem: "",
24527
+ sessionId: "",
24528
+ lastActivityAt: undefined,
24529
+ title: "",
24530
+ clients: [],
24531
+ sessionScore: 0,
24532
+ sessionScoreRubric: 0,
24533
+ };
24534
+ }
24535
+
24536
+ export const ScoredSession: MessageFns<ScoredSession> = {
24537
+ encode(message: ScoredSession, writer: BinaryWriter = new BinaryWriter()): BinaryWriter {
24731
24538
  if (message.sourceSystem !== "") {
24732
24539
  writer.uint32(10).string(message.sourceSystem);
24733
24540
  }
24734
24541
  if (message.sessionId !== "") {
24735
24542
  writer.uint32(18).string(message.sessionId);
24736
24543
  }
24737
- if (message.analyzedAt !== undefined) {
24738
- Timestamp.encode(toTimestamp(message.analyzedAt), writer.uint32(26).fork()).join();
24544
+ if (message.lastActivityAt !== undefined) {
24545
+ Timestamp.encode(toTimestamp(message.lastActivityAt), writer.uint32(26).fork()).join();
24739
24546
  }
24740
- if (message.insight !== undefined) {
24741
- AISessionInsight.encode(message.insight, writer.uint32(34).fork()).join();
24547
+ if (message.title !== "") {
24548
+ writer.uint32(34).string(message.title);
24549
+ }
24550
+ for (const v of message.clients) {
24551
+ writer.uint32(42).string(v!);
24552
+ }
24553
+ if (message.sessionScore !== 0) {
24554
+ writer.uint32(48).int32(message.sessionScore);
24555
+ }
24556
+ if (message.sessionScoreRubric !== 0) {
24557
+ writer.uint32(56).int32(message.sessionScoreRubric);
24742
24558
  }
24743
24559
  return writer;
24744
24560
  },
24745
24561
 
24746
- decode(input: BinaryReader | Uint8Array, length?: number): SessionInsightEntry {
24562
+ decode(input: BinaryReader | Uint8Array, length?: number): ScoredSession {
24747
24563
  const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
24748
24564
  const previousRecursionDepth = (reader as any).__tsProtoDecodeDepth ?? 0;
24749
24565
  if (previousRecursionDepth >= 100) {
@@ -24752,7 +24568,7 @@ export const SessionInsightEntry: MessageFns<SessionInsightEntry> = {
24752
24568
  (reader as any).__tsProtoDecodeDepth = previousRecursionDepth + 1;
24753
24569
  try {
24754
24570
  const end = length === undefined ? reader.len : reader.pos + length;
24755
- const message = createBaseSessionInsightEntry();
24571
+ const message = createBaseScoredSession();
24756
24572
  while (reader.pos < end) {
24757
24573
  const tag = reader.uint32();
24758
24574
  switch (tag >>> 3) {
@@ -24777,7 +24593,7 @@ export const SessionInsightEntry: MessageFns<SessionInsightEntry> = {
24777
24593
  break;
24778
24594
  }
24779
24595
 
24780
- message.analyzedAt = fromTimestamp(Timestamp.decode(reader, reader.uint32()));
24596
+ message.lastActivityAt = fromTimestamp(Timestamp.decode(reader, reader.uint32()));
24781
24597
  continue;
24782
24598
  }
24783
24599
  case 4: {
@@ -24785,7 +24601,31 @@ export const SessionInsightEntry: MessageFns<SessionInsightEntry> = {
24785
24601
  break;
24786
24602
  }
24787
24603
 
24788
- message.insight = AISessionInsight.decode(reader, reader.uint32());
24604
+ message.title = reader.string();
24605
+ continue;
24606
+ }
24607
+ case 5: {
24608
+ if (tag !== 42) {
24609
+ break;
24610
+ }
24611
+
24612
+ message.clients.push(reader.string());
24613
+ continue;
24614
+ }
24615
+ case 6: {
24616
+ if (tag !== 48) {
24617
+ break;
24618
+ }
24619
+
24620
+ message.sessionScore = reader.int32();
24621
+ continue;
24622
+ }
24623
+ case 7: {
24624
+ if (tag !== 56) {
24625
+ break;
24626
+ }
24627
+
24628
+ message.sessionScoreRubric = reader.int32() as any;
24789
24629
  continue;
24790
24630
  }
24791
24631
  }
@@ -24800,7 +24640,7 @@ export const SessionInsightEntry: MessageFns<SessionInsightEntry> = {
24800
24640
  }
24801
24641
  },
24802
24642
 
24803
- fromJSON(object: any): SessionInsightEntry {
24643
+ fromJSON(object: any): ScoredSession {
24804
24644
  return {
24805
24645
  sourceSystem: isSet(object.sourceSystem)
24806
24646
  ? globalThis.String(object.sourceSystem)
@@ -24812,16 +24652,27 @@ export const SessionInsightEntry: MessageFns<SessionInsightEntry> = {
24812
24652
  : isSet(object.session_id)
24813
24653
  ? globalThis.String(object.session_id)
24814
24654
  : "",
24815
- analyzedAt: isSet(object.analyzedAt)
24816
- ? fromJsonTimestamp(object.analyzedAt)
24817
- : isSet(object.analyzed_at)
24818
- ? fromJsonTimestamp(object.analyzed_at)
24655
+ lastActivityAt: isSet(object.lastActivityAt)
24656
+ ? fromJsonTimestamp(object.lastActivityAt)
24657
+ : isSet(object.last_activity_at)
24658
+ ? fromJsonTimestamp(object.last_activity_at)
24819
24659
  : undefined,
24820
- insight: isSet(object.insight) ? AISessionInsight.fromJSON(object.insight) : undefined,
24660
+ title: isSet(object.title) ? globalThis.String(object.title) : "",
24661
+ clients: globalThis.Array.isArray(object?.clients) ? object.clients.map((e: any) => globalThis.String(e)) : [],
24662
+ sessionScore: isSet(object.sessionScore)
24663
+ ? globalThis.Number(object.sessionScore)
24664
+ : isSet(object.session_score)
24665
+ ? globalThis.Number(object.session_score)
24666
+ : 0,
24667
+ sessionScoreRubric: isSet(object.sessionScoreRubric)
24668
+ ? aISessionScoreRubricFromJSON(object.sessionScoreRubric)
24669
+ : isSet(object.session_score_rubric)
24670
+ ? aISessionScoreRubricFromJSON(object.session_score_rubric)
24671
+ : 0,
24821
24672
  };
24822
24673
  },
24823
24674
 
24824
- toJSON(message: SessionInsightEntry): unknown {
24675
+ toJSON(message: ScoredSession): unknown {
24825
24676
  const obj: any = {};
24826
24677
  if (message.sourceSystem !== "") {
24827
24678
  obj.sourceSystem = message.sourceSystem;
@@ -24829,26 +24680,169 @@ export const SessionInsightEntry: MessageFns<SessionInsightEntry> = {
24829
24680
  if (message.sessionId !== "") {
24830
24681
  obj.sessionId = message.sessionId;
24831
24682
  }
24832
- if (message.analyzedAt !== undefined) {
24833
- obj.analyzedAt = message.analyzedAt.toISOString();
24683
+ if (message.lastActivityAt !== undefined) {
24684
+ obj.lastActivityAt = message.lastActivityAt.toISOString();
24685
+ }
24686
+ if (message.title !== "") {
24687
+ obj.title = message.title;
24688
+ }
24689
+ if (message.clients?.length) {
24690
+ obj.clients = message.clients;
24834
24691
  }
24835
- if (message.insight !== undefined) {
24836
- obj.insight = AISessionInsight.toJSON(message.insight);
24692
+ if (message.sessionScore !== 0) {
24693
+ obj.sessionScore = Math.round(message.sessionScore);
24694
+ }
24695
+ if (message.sessionScoreRubric !== 0) {
24696
+ obj.sessionScoreRubric = aISessionScoreRubricToJSON(message.sessionScoreRubric);
24837
24697
  }
24838
24698
  return obj;
24839
24699
  },
24840
24700
 
24841
- create<I extends Exact<DeepPartial<SessionInsightEntry>, I>>(base?: I): SessionInsightEntry {
24842
- return SessionInsightEntry.fromPartial(base ?? ({} as any));
24701
+ create<I extends Exact<DeepPartial<ScoredSession>, I>>(base?: I): ScoredSession {
24702
+ return ScoredSession.fromPartial(base ?? ({} as any));
24843
24703
  },
24844
- fromPartial<I extends Exact<DeepPartial<SessionInsightEntry>, I>>(object: I): SessionInsightEntry {
24845
- const message = createBaseSessionInsightEntry();
24704
+ fromPartial<I extends Exact<DeepPartial<ScoredSession>, I>>(object: I): ScoredSession {
24705
+ const message = createBaseScoredSession();
24706
+ message.sourceSystem = object.sourceSystem ?? "";
24707
+ message.sessionId = object.sessionId ?? "";
24708
+ message.lastActivityAt = object.lastActivityAt ?? undefined;
24709
+ message.title = object.title ?? "";
24710
+ message.clients = object.clients?.map((e) => e) || [];
24711
+ message.sessionScore = object.sessionScore ?? 0;
24712
+ message.sessionScoreRubric = object.sessionScoreRubric ?? 0;
24713
+ return message;
24714
+ },
24715
+ };
24716
+
24717
+ function createBaseGetSessionAnalysisRequest(): GetSessionAnalysisRequest {
24718
+ return { organizationId: "", projectId: "", sourceSystem: "", sessionId: "" };
24719
+ }
24720
+
24721
+ export const GetSessionAnalysisRequest: MessageFns<GetSessionAnalysisRequest> = {
24722
+ encode(message: GetSessionAnalysisRequest, writer: BinaryWriter = new BinaryWriter()): BinaryWriter {
24723
+ if (message.organizationId !== "") {
24724
+ writer.uint32(10).string(message.organizationId);
24725
+ }
24726
+ if (message.projectId !== "") {
24727
+ writer.uint32(18).string(message.projectId);
24728
+ }
24729
+ if (message.sourceSystem !== "") {
24730
+ writer.uint32(26).string(message.sourceSystem);
24731
+ }
24732
+ if (message.sessionId !== "") {
24733
+ writer.uint32(34).string(message.sessionId);
24734
+ }
24735
+ return writer;
24736
+ },
24737
+
24738
+ decode(input: BinaryReader | Uint8Array, length?: number): GetSessionAnalysisRequest {
24739
+ const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
24740
+ const previousRecursionDepth = (reader as any).__tsProtoDecodeDepth ?? 0;
24741
+ if (previousRecursionDepth >= 100) {
24742
+ throw new globalThis.Error("protobuf decode recursion limit exceeded");
24743
+ }
24744
+ (reader as any).__tsProtoDecodeDepth = previousRecursionDepth + 1;
24745
+ try {
24746
+ const end = length === undefined ? reader.len : reader.pos + length;
24747
+ const message = createBaseGetSessionAnalysisRequest();
24748
+ while (reader.pos < end) {
24749
+ const tag = reader.uint32();
24750
+ switch (tag >>> 3) {
24751
+ case 1: {
24752
+ if (tag !== 10) {
24753
+ break;
24754
+ }
24755
+
24756
+ message.organizationId = reader.string();
24757
+ continue;
24758
+ }
24759
+ case 2: {
24760
+ if (tag !== 18) {
24761
+ break;
24762
+ }
24763
+
24764
+ message.projectId = reader.string();
24765
+ continue;
24766
+ }
24767
+ case 3: {
24768
+ if (tag !== 26) {
24769
+ break;
24770
+ }
24771
+
24772
+ message.sourceSystem = reader.string();
24773
+ continue;
24774
+ }
24775
+ case 4: {
24776
+ if (tag !== 34) {
24777
+ break;
24778
+ }
24779
+
24780
+ message.sessionId = reader.string();
24781
+ continue;
24782
+ }
24783
+ }
24784
+ if ((tag & 7) === 4 || tag === 0) {
24785
+ break;
24786
+ }
24787
+ reader.skip(tag & 7);
24788
+ }
24789
+ return message;
24790
+ } finally {
24791
+ (reader as any).__tsProtoDecodeDepth = previousRecursionDepth;
24792
+ }
24793
+ },
24794
+
24795
+ fromJSON(object: any): GetSessionAnalysisRequest {
24796
+ return {
24797
+ organizationId: isSet(object.organizationId)
24798
+ ? globalThis.String(object.organizationId)
24799
+ : isSet(object.organization_id)
24800
+ ? globalThis.String(object.organization_id)
24801
+ : "",
24802
+ projectId: isSet(object.projectId)
24803
+ ? globalThis.String(object.projectId)
24804
+ : isSet(object.project_id)
24805
+ ? globalThis.String(object.project_id)
24806
+ : "",
24807
+ sourceSystem: isSet(object.sourceSystem)
24808
+ ? globalThis.String(object.sourceSystem)
24809
+ : isSet(object.source_system)
24810
+ ? globalThis.String(object.source_system)
24811
+ : "",
24812
+ sessionId: isSet(object.sessionId)
24813
+ ? globalThis.String(object.sessionId)
24814
+ : isSet(object.session_id)
24815
+ ? globalThis.String(object.session_id)
24816
+ : "",
24817
+ };
24818
+ },
24819
+
24820
+ toJSON(message: GetSessionAnalysisRequest): unknown {
24821
+ const obj: any = {};
24822
+ if (message.organizationId !== "") {
24823
+ obj.organizationId = message.organizationId;
24824
+ }
24825
+ if (message.projectId !== "") {
24826
+ obj.projectId = message.projectId;
24827
+ }
24828
+ if (message.sourceSystem !== "") {
24829
+ obj.sourceSystem = message.sourceSystem;
24830
+ }
24831
+ if (message.sessionId !== "") {
24832
+ obj.sessionId = message.sessionId;
24833
+ }
24834
+ return obj;
24835
+ },
24836
+
24837
+ create<I extends Exact<DeepPartial<GetSessionAnalysisRequest>, I>>(base?: I): GetSessionAnalysisRequest {
24838
+ return GetSessionAnalysisRequest.fromPartial(base ?? ({} as any));
24839
+ },
24840
+ fromPartial<I extends Exact<DeepPartial<GetSessionAnalysisRequest>, I>>(object: I): GetSessionAnalysisRequest {
24841
+ const message = createBaseGetSessionAnalysisRequest();
24842
+ message.organizationId = object.organizationId ?? "";
24843
+ message.projectId = object.projectId ?? "";
24846
24844
  message.sourceSystem = object.sourceSystem ?? "";
24847
24845
  message.sessionId = object.sessionId ?? "";
24848
- message.analyzedAt = object.analyzedAt ?? undefined;
24849
- message.insight = (object.insight !== undefined && object.insight !== null)
24850
- ? AISessionInsight.fromPartial(object.insight)
24851
- : undefined;
24852
24846
  return message;
24853
24847
  },
24854
24848
  };
@@ -25238,6 +25232,7 @@ function createBaseAISessionInsight(): AISessionInsight {
25238
25232
  remediationPrompt: "",
25239
25233
  topic: undefined,
25240
25234
  skill: undefined,
25235
+ id: "",
25241
25236
  };
25242
25237
  }
25243
25238
 
@@ -25267,6 +25262,9 @@ export const AISessionInsight: MessageFns<AISessionInsight> = {
25267
25262
  if (message.skill !== undefined) {
25268
25263
  AISkillSuggestion.encode(message.skill, writer.uint32(66).fork()).join();
25269
25264
  }
25265
+ if (message.id !== "") {
25266
+ writer.uint32(74).string(message.id);
25267
+ }
25270
25268
  return writer;
25271
25269
  },
25272
25270
 
@@ -25347,6 +25345,14 @@ export const AISessionInsight: MessageFns<AISessionInsight> = {
25347
25345
  message.skill = AISkillSuggestion.decode(reader, reader.uint32());
25348
25346
  continue;
25349
25347
  }
25348
+ case 9: {
25349
+ if (tag !== 74) {
25350
+ break;
25351
+ }
25352
+
25353
+ message.id = reader.string();
25354
+ continue;
25355
+ }
25350
25356
  }
25351
25357
  if ((tag & 7) === 4 || tag === 0) {
25352
25358
  break;
@@ -25381,6 +25387,7 @@ export const AISessionInsight: MessageFns<AISessionInsight> = {
25381
25387
  : "",
25382
25388
  topic: isSet(object.topic) ? AISessionInsightTopic.fromJSON(object.topic) : undefined,
25383
25389
  skill: isSet(object.skill) ? AISkillSuggestion.fromJSON(object.skill) : undefined,
25390
+ id: isSet(object.id) ? globalThis.String(object.id) : "",
25384
25391
  };
25385
25392
  },
25386
25393
 
@@ -25410,6 +25417,9 @@ export const AISessionInsight: MessageFns<AISessionInsight> = {
25410
25417
  if (message.skill !== undefined) {
25411
25418
  obj.skill = AISkillSuggestion.toJSON(message.skill);
25412
25419
  }
25420
+ if (message.id !== "") {
25421
+ obj.id = message.id;
25422
+ }
25413
25423
  return obj;
25414
25424
  },
25415
25425
 
@@ -25430,6 +25440,7 @@ export const AISessionInsight: MessageFns<AISessionInsight> = {
25430
25440
  message.skill = (object.skill !== undefined && object.skill !== null)
25431
25441
  ? AISkillSuggestion.fromPartial(object.skill)
25432
25442
  : undefined;
25443
+ message.id = object.id ?? "";
25433
25444
  return message;
25434
25445
  },
25435
25446
  };
@@ -25790,6 +25801,7 @@ function createBaseAISessionScore(): AISessionScore {
25790
25801
  inputSessionVersion: 0,
25791
25802
  scoredAt: undefined,
25792
25803
  rubric: 0,
25804
+ id: "",
25793
25805
  };
25794
25806
  }
25795
25807
 
@@ -25822,6 +25834,9 @@ export const AISessionScore: MessageFns<AISessionScore> = {
25822
25834
  if (message.rubric !== 0) {
25823
25835
  writer.uint32(72).int32(message.rubric);
25824
25836
  }
25837
+ if (message.id !== "") {
25838
+ writer.uint32(82).string(message.id);
25839
+ }
25825
25840
  return writer;
25826
25841
  },
25827
25842
 
@@ -25910,6 +25925,14 @@ export const AISessionScore: MessageFns<AISessionScore> = {
25910
25925
  message.rubric = reader.int32() as any;
25911
25926
  continue;
25912
25927
  }
25928
+ case 10: {
25929
+ if (tag !== 82) {
25930
+ break;
25931
+ }
25932
+
25933
+ message.id = reader.string();
25934
+ continue;
25935
+ }
25913
25936
  }
25914
25937
  if ((tag & 7) === 4 || tag === 0) {
25915
25938
  break;
@@ -25951,6 +25974,7 @@ export const AISessionScore: MessageFns<AISessionScore> = {
25951
25974
  ? fromJsonTimestamp(object.scored_at)
25952
25975
  : undefined,
25953
25976
  rubric: isSet(object.rubric) ? aISessionScoreRubricFromJSON(object.rubric) : 0,
25977
+ id: isSet(object.id) ? globalThis.String(object.id) : "",
25954
25978
  };
25955
25979
  },
25956
25980
 
@@ -25983,6 +26007,9 @@ export const AISessionScore: MessageFns<AISessionScore> = {
25983
26007
  if (message.rubric !== 0) {
25984
26008
  obj.rubric = aISessionScoreRubricToJSON(message.rubric);
25985
26009
  }
26010
+ if (message.id !== "") {
26011
+ obj.id = message.id;
26012
+ }
25986
26013
  return obj;
25987
26014
  },
25988
26015
 
@@ -26002,6 +26029,7 @@ export const AISessionScore: MessageFns<AISessionScore> = {
26002
26029
  message.inputSessionVersion = object.inputSessionVersion ?? 0;
26003
26030
  message.scoredAt = object.scoredAt ?? undefined;
26004
26031
  message.rubric = object.rubric ?? 0;
26032
+ message.id = object.id ?? "";
26005
26033
  return message;
26006
26034
  },
26007
26035
  };
@@ -35109,833 +35137,6 @@ export const IssueSession: MessageFns<IssueSession> = {
35109
35137
  },
35110
35138
  };
35111
35139
 
35112
- function createBaseListProjectInsightCardsRequest(): ListProjectInsightCardsRequest {
35113
- return { organizationId: "", projectId: "", pageSize: 0, pageToken: "" };
35114
- }
35115
-
35116
- export const ListProjectInsightCardsRequest: MessageFns<ListProjectInsightCardsRequest> = {
35117
- encode(message: ListProjectInsightCardsRequest, writer: BinaryWriter = new BinaryWriter()): BinaryWriter {
35118
- if (message.organizationId !== "") {
35119
- writer.uint32(10).string(message.organizationId);
35120
- }
35121
- if (message.projectId !== "") {
35122
- writer.uint32(18).string(message.projectId);
35123
- }
35124
- if (message.pageSize !== 0) {
35125
- writer.uint32(24).int32(message.pageSize);
35126
- }
35127
- if (message.pageToken !== "") {
35128
- writer.uint32(34).string(message.pageToken);
35129
- }
35130
- return writer;
35131
- },
35132
-
35133
- decode(input: BinaryReader | Uint8Array, length?: number): ListProjectInsightCardsRequest {
35134
- const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
35135
- const previousRecursionDepth = (reader as any).__tsProtoDecodeDepth ?? 0;
35136
- if (previousRecursionDepth >= 100) {
35137
- throw new globalThis.Error("protobuf decode recursion limit exceeded");
35138
- }
35139
- (reader as any).__tsProtoDecodeDepth = previousRecursionDepth + 1;
35140
- try {
35141
- const end = length === undefined ? reader.len : reader.pos + length;
35142
- const message = createBaseListProjectInsightCardsRequest();
35143
- while (reader.pos < end) {
35144
- const tag = reader.uint32();
35145
- switch (tag >>> 3) {
35146
- case 1: {
35147
- if (tag !== 10) {
35148
- break;
35149
- }
35150
-
35151
- message.organizationId = reader.string();
35152
- continue;
35153
- }
35154
- case 2: {
35155
- if (tag !== 18) {
35156
- break;
35157
- }
35158
-
35159
- message.projectId = reader.string();
35160
- continue;
35161
- }
35162
- case 3: {
35163
- if (tag !== 24) {
35164
- break;
35165
- }
35166
-
35167
- message.pageSize = reader.int32();
35168
- continue;
35169
- }
35170
- case 4: {
35171
- if (tag !== 34) {
35172
- break;
35173
- }
35174
-
35175
- message.pageToken = reader.string();
35176
- continue;
35177
- }
35178
- }
35179
- if ((tag & 7) === 4 || tag === 0) {
35180
- break;
35181
- }
35182
- reader.skip(tag & 7);
35183
- }
35184
- return message;
35185
- } finally {
35186
- (reader as any).__tsProtoDecodeDepth = previousRecursionDepth;
35187
- }
35188
- },
35189
-
35190
- fromJSON(object: any): ListProjectInsightCardsRequest {
35191
- return {
35192
- organizationId: isSet(object.organizationId)
35193
- ? globalThis.String(object.organizationId)
35194
- : isSet(object.organization_id)
35195
- ? globalThis.String(object.organization_id)
35196
- : "",
35197
- projectId: isSet(object.projectId)
35198
- ? globalThis.String(object.projectId)
35199
- : isSet(object.project_id)
35200
- ? globalThis.String(object.project_id)
35201
- : "",
35202
- pageSize: isSet(object.pageSize)
35203
- ? globalThis.Number(object.pageSize)
35204
- : isSet(object.page_size)
35205
- ? globalThis.Number(object.page_size)
35206
- : 0,
35207
- pageToken: isSet(object.pageToken)
35208
- ? globalThis.String(object.pageToken)
35209
- : isSet(object.page_token)
35210
- ? globalThis.String(object.page_token)
35211
- : "",
35212
- };
35213
- },
35214
-
35215
- toJSON(message: ListProjectInsightCardsRequest): unknown {
35216
- const obj: any = {};
35217
- if (message.organizationId !== "") {
35218
- obj.organizationId = message.organizationId;
35219
- }
35220
- if (message.projectId !== "") {
35221
- obj.projectId = message.projectId;
35222
- }
35223
- if (message.pageSize !== 0) {
35224
- obj.pageSize = Math.round(message.pageSize);
35225
- }
35226
- if (message.pageToken !== "") {
35227
- obj.pageToken = message.pageToken;
35228
- }
35229
- return obj;
35230
- },
35231
-
35232
- create<I extends Exact<DeepPartial<ListProjectInsightCardsRequest>, I>>(base?: I): ListProjectInsightCardsRequest {
35233
- return ListProjectInsightCardsRequest.fromPartial(base ?? ({} as any));
35234
- },
35235
- fromPartial<I extends Exact<DeepPartial<ListProjectInsightCardsRequest>, I>>(
35236
- object: I,
35237
- ): ListProjectInsightCardsRequest {
35238
- const message = createBaseListProjectInsightCardsRequest();
35239
- message.organizationId = object.organizationId ?? "";
35240
- message.projectId = object.projectId ?? "";
35241
- message.pageSize = object.pageSize ?? 0;
35242
- message.pageToken = object.pageToken ?? "";
35243
- return message;
35244
- },
35245
- };
35246
-
35247
- function createBaseListProjectInsightCardsResponse(): ListProjectInsightCardsResponse {
35248
- return { status: undefined, cards: [], nextPageToken: "" };
35249
- }
35250
-
35251
- export const ListProjectInsightCardsResponse: MessageFns<ListProjectInsightCardsResponse> = {
35252
- encode(message: ListProjectInsightCardsResponse, writer: BinaryWriter = new BinaryWriter()): BinaryWriter {
35253
- if (message.status !== undefined) {
35254
- ResponseStatus.encode(message.status, writer.uint32(10).fork()).join();
35255
- }
35256
- for (const v of message.cards) {
35257
- AIProjectInsightCard.encode(v!, writer.uint32(18).fork()).join();
35258
- }
35259
- if (message.nextPageToken !== "") {
35260
- writer.uint32(26).string(message.nextPageToken);
35261
- }
35262
- return writer;
35263
- },
35264
-
35265
- decode(input: BinaryReader | Uint8Array, length?: number): ListProjectInsightCardsResponse {
35266
- const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
35267
- const previousRecursionDepth = (reader as any).__tsProtoDecodeDepth ?? 0;
35268
- if (previousRecursionDepth >= 100) {
35269
- throw new globalThis.Error("protobuf decode recursion limit exceeded");
35270
- }
35271
- (reader as any).__tsProtoDecodeDepth = previousRecursionDepth + 1;
35272
- try {
35273
- const end = length === undefined ? reader.len : reader.pos + length;
35274
- const message = createBaseListProjectInsightCardsResponse();
35275
- while (reader.pos < end) {
35276
- const tag = reader.uint32();
35277
- switch (tag >>> 3) {
35278
- case 1: {
35279
- if (tag !== 10) {
35280
- break;
35281
- }
35282
-
35283
- message.status = ResponseStatus.decode(reader, reader.uint32());
35284
- continue;
35285
- }
35286
- case 2: {
35287
- if (tag !== 18) {
35288
- break;
35289
- }
35290
-
35291
- message.cards.push(AIProjectInsightCard.decode(reader, reader.uint32()));
35292
- continue;
35293
- }
35294
- case 3: {
35295
- if (tag !== 26) {
35296
- break;
35297
- }
35298
-
35299
- message.nextPageToken = reader.string();
35300
- continue;
35301
- }
35302
- }
35303
- if ((tag & 7) === 4 || tag === 0) {
35304
- break;
35305
- }
35306
- reader.skip(tag & 7);
35307
- }
35308
- return message;
35309
- } finally {
35310
- (reader as any).__tsProtoDecodeDepth = previousRecursionDepth;
35311
- }
35312
- },
35313
-
35314
- fromJSON(object: any): ListProjectInsightCardsResponse {
35315
- return {
35316
- status: isSet(object.status) ? ResponseStatus.fromJSON(object.status) : undefined,
35317
- cards: globalThis.Array.isArray(object?.cards)
35318
- ? object.cards.map((e: any) => AIProjectInsightCard.fromJSON(e))
35319
- : [],
35320
- nextPageToken: isSet(object.nextPageToken)
35321
- ? globalThis.String(object.nextPageToken)
35322
- : isSet(object.next_page_token)
35323
- ? globalThis.String(object.next_page_token)
35324
- : "",
35325
- };
35326
- },
35327
-
35328
- toJSON(message: ListProjectInsightCardsResponse): unknown {
35329
- const obj: any = {};
35330
- if (message.status !== undefined) {
35331
- obj.status = ResponseStatus.toJSON(message.status);
35332
- }
35333
- if (message.cards?.length) {
35334
- obj.cards = message.cards.map((e) => AIProjectInsightCard.toJSON(e));
35335
- }
35336
- if (message.nextPageToken !== "") {
35337
- obj.nextPageToken = message.nextPageToken;
35338
- }
35339
- return obj;
35340
- },
35341
-
35342
- create<I extends Exact<DeepPartial<ListProjectInsightCardsResponse>, I>>(base?: I): ListProjectInsightCardsResponse {
35343
- return ListProjectInsightCardsResponse.fromPartial(base ?? ({} as any));
35344
- },
35345
- fromPartial<I extends Exact<DeepPartial<ListProjectInsightCardsResponse>, I>>(
35346
- object: I,
35347
- ): ListProjectInsightCardsResponse {
35348
- const message = createBaseListProjectInsightCardsResponse();
35349
- message.status = (object.status !== undefined && object.status !== null)
35350
- ? ResponseStatus.fromPartial(object.status)
35351
- : undefined;
35352
- message.cards = object.cards?.map((e) => AIProjectInsightCard.fromPartial(e)) || [];
35353
- message.nextPageToken = object.nextPageToken ?? "";
35354
- return message;
35355
- },
35356
- };
35357
-
35358
- function createBaseAIProjectInsightCard(): AIProjectInsightCard {
35359
- return { insight: undefined, runId: "", localDate: "", timeZone: "", windowClosed: false, analyzedAt: undefined };
35360
- }
35361
-
35362
- export const AIProjectInsightCard: MessageFns<AIProjectInsightCard> = {
35363
- encode(message: AIProjectInsightCard, writer: BinaryWriter = new BinaryWriter()): BinaryWriter {
35364
- if (message.insight !== undefined) {
35365
- AIProjectInsight.encode(message.insight, writer.uint32(10).fork()).join();
35366
- }
35367
- if (message.runId !== "") {
35368
- writer.uint32(18).string(message.runId);
35369
- }
35370
- if (message.localDate !== "") {
35371
- writer.uint32(26).string(message.localDate);
35372
- }
35373
- if (message.timeZone !== "") {
35374
- writer.uint32(34).string(message.timeZone);
35375
- }
35376
- if (message.windowClosed !== false) {
35377
- writer.uint32(40).bool(message.windowClosed);
35378
- }
35379
- if (message.analyzedAt !== undefined) {
35380
- Timestamp.encode(toTimestamp(message.analyzedAt), writer.uint32(50).fork()).join();
35381
- }
35382
- return writer;
35383
- },
35384
-
35385
- decode(input: BinaryReader | Uint8Array, length?: number): AIProjectInsightCard {
35386
- const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
35387
- const previousRecursionDepth = (reader as any).__tsProtoDecodeDepth ?? 0;
35388
- if (previousRecursionDepth >= 100) {
35389
- throw new globalThis.Error("protobuf decode recursion limit exceeded");
35390
- }
35391
- (reader as any).__tsProtoDecodeDepth = previousRecursionDepth + 1;
35392
- try {
35393
- const end = length === undefined ? reader.len : reader.pos + length;
35394
- const message = createBaseAIProjectInsightCard();
35395
- while (reader.pos < end) {
35396
- const tag = reader.uint32();
35397
- switch (tag >>> 3) {
35398
- case 1: {
35399
- if (tag !== 10) {
35400
- break;
35401
- }
35402
-
35403
- message.insight = AIProjectInsight.decode(reader, reader.uint32());
35404
- continue;
35405
- }
35406
- case 2: {
35407
- if (tag !== 18) {
35408
- break;
35409
- }
35410
-
35411
- message.runId = reader.string();
35412
- continue;
35413
- }
35414
- case 3: {
35415
- if (tag !== 26) {
35416
- break;
35417
- }
35418
-
35419
- message.localDate = reader.string();
35420
- continue;
35421
- }
35422
- case 4: {
35423
- if (tag !== 34) {
35424
- break;
35425
- }
35426
-
35427
- message.timeZone = reader.string();
35428
- continue;
35429
- }
35430
- case 5: {
35431
- if (tag !== 40) {
35432
- break;
35433
- }
35434
-
35435
- message.windowClosed = reader.bool();
35436
- continue;
35437
- }
35438
- case 6: {
35439
- if (tag !== 50) {
35440
- break;
35441
- }
35442
-
35443
- message.analyzedAt = fromTimestamp(Timestamp.decode(reader, reader.uint32()));
35444
- continue;
35445
- }
35446
- }
35447
- if ((tag & 7) === 4 || tag === 0) {
35448
- break;
35449
- }
35450
- reader.skip(tag & 7);
35451
- }
35452
- return message;
35453
- } finally {
35454
- (reader as any).__tsProtoDecodeDepth = previousRecursionDepth;
35455
- }
35456
- },
35457
-
35458
- fromJSON(object: any): AIProjectInsightCard {
35459
- return {
35460
- insight: isSet(object.insight) ? AIProjectInsight.fromJSON(object.insight) : undefined,
35461
- runId: isSet(object.runId)
35462
- ? globalThis.String(object.runId)
35463
- : isSet(object.run_id)
35464
- ? globalThis.String(object.run_id)
35465
- : "",
35466
- localDate: isSet(object.localDate)
35467
- ? globalThis.String(object.localDate)
35468
- : isSet(object.local_date)
35469
- ? globalThis.String(object.local_date)
35470
- : "",
35471
- timeZone: isSet(object.timeZone)
35472
- ? globalThis.String(object.timeZone)
35473
- : isSet(object.time_zone)
35474
- ? globalThis.String(object.time_zone)
35475
- : "",
35476
- windowClosed: isSet(object.windowClosed)
35477
- ? globalThis.Boolean(object.windowClosed)
35478
- : isSet(object.window_closed)
35479
- ? globalThis.Boolean(object.window_closed)
35480
- : false,
35481
- analyzedAt: isSet(object.analyzedAt)
35482
- ? fromJsonTimestamp(object.analyzedAt)
35483
- : isSet(object.analyzed_at)
35484
- ? fromJsonTimestamp(object.analyzed_at)
35485
- : undefined,
35486
- };
35487
- },
35488
-
35489
- toJSON(message: AIProjectInsightCard): unknown {
35490
- const obj: any = {};
35491
- if (message.insight !== undefined) {
35492
- obj.insight = AIProjectInsight.toJSON(message.insight);
35493
- }
35494
- if (message.runId !== "") {
35495
- obj.runId = message.runId;
35496
- }
35497
- if (message.localDate !== "") {
35498
- obj.localDate = message.localDate;
35499
- }
35500
- if (message.timeZone !== "") {
35501
- obj.timeZone = message.timeZone;
35502
- }
35503
- if (message.windowClosed !== false) {
35504
- obj.windowClosed = message.windowClosed;
35505
- }
35506
- if (message.analyzedAt !== undefined) {
35507
- obj.analyzedAt = message.analyzedAt.toISOString();
35508
- }
35509
- return obj;
35510
- },
35511
-
35512
- create<I extends Exact<DeepPartial<AIProjectInsightCard>, I>>(base?: I): AIProjectInsightCard {
35513
- return AIProjectInsightCard.fromPartial(base ?? ({} as any));
35514
- },
35515
- fromPartial<I extends Exact<DeepPartial<AIProjectInsightCard>, I>>(object: I): AIProjectInsightCard {
35516
- const message = createBaseAIProjectInsightCard();
35517
- message.insight = (object.insight !== undefined && object.insight !== null)
35518
- ? AIProjectInsight.fromPartial(object.insight)
35519
- : undefined;
35520
- message.runId = object.runId ?? "";
35521
- message.localDate = object.localDate ?? "";
35522
- message.timeZone = object.timeZone ?? "";
35523
- message.windowClosed = object.windowClosed ?? false;
35524
- message.analyzedAt = object.analyzedAt ?? undefined;
35525
- return message;
35526
- },
35527
- };
35528
-
35529
- function createBaseAIProjectInsight(): AIProjectInsight {
35530
- return {
35531
- id: "",
35532
- rank: 0,
35533
- kind: 0,
35534
- title: "",
35535
- pattern: "",
35536
- explanation: "",
35537
- action: "",
35538
- limitations: "",
35539
- sessionCount: 0,
35540
- personCount: 0,
35541
- spendUsd: undefined,
35542
- citations: [],
35543
- skillSuggestion: undefined,
35544
- };
35545
- }
35546
-
35547
- export const AIProjectInsight: MessageFns<AIProjectInsight> = {
35548
- encode(message: AIProjectInsight, writer: BinaryWriter = new BinaryWriter()): BinaryWriter {
35549
- if (message.id !== "") {
35550
- writer.uint32(10).string(message.id);
35551
- }
35552
- if (message.rank !== 0) {
35553
- writer.uint32(16).uint32(message.rank);
35554
- }
35555
- if (message.kind !== 0) {
35556
- writer.uint32(24).int32(message.kind);
35557
- }
35558
- if (message.title !== "") {
35559
- writer.uint32(34).string(message.title);
35560
- }
35561
- if (message.pattern !== "") {
35562
- writer.uint32(42).string(message.pattern);
35563
- }
35564
- if (message.explanation !== "") {
35565
- writer.uint32(50).string(message.explanation);
35566
- }
35567
- if (message.action !== "") {
35568
- writer.uint32(58).string(message.action);
35569
- }
35570
- if (message.limitations !== "") {
35571
- writer.uint32(66).string(message.limitations);
35572
- }
35573
- if (message.sessionCount !== 0) {
35574
- writer.uint32(72).uint32(message.sessionCount);
35575
- }
35576
- if (message.personCount !== 0) {
35577
- writer.uint32(80).uint32(message.personCount);
35578
- }
35579
- if (message.spendUsd !== undefined) {
35580
- writer.uint32(90).string(message.spendUsd);
35581
- }
35582
- for (const v of message.citations) {
35583
- AIProjectInsightCitation.encode(v!, writer.uint32(98).fork()).join();
35584
- }
35585
- if (message.skillSuggestion !== undefined) {
35586
- AISkillSuggestion.encode(message.skillSuggestion, writer.uint32(106).fork()).join();
35587
- }
35588
- return writer;
35589
- },
35590
-
35591
- decode(input: BinaryReader | Uint8Array, length?: number): AIProjectInsight {
35592
- const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
35593
- const previousRecursionDepth = (reader as any).__tsProtoDecodeDepth ?? 0;
35594
- if (previousRecursionDepth >= 100) {
35595
- throw new globalThis.Error("protobuf decode recursion limit exceeded");
35596
- }
35597
- (reader as any).__tsProtoDecodeDepth = previousRecursionDepth + 1;
35598
- try {
35599
- const end = length === undefined ? reader.len : reader.pos + length;
35600
- const message = createBaseAIProjectInsight();
35601
- while (reader.pos < end) {
35602
- const tag = reader.uint32();
35603
- switch (tag >>> 3) {
35604
- case 1: {
35605
- if (tag !== 10) {
35606
- break;
35607
- }
35608
-
35609
- message.id = reader.string();
35610
- continue;
35611
- }
35612
- case 2: {
35613
- if (tag !== 16) {
35614
- break;
35615
- }
35616
-
35617
- message.rank = reader.uint32();
35618
- continue;
35619
- }
35620
- case 3: {
35621
- if (tag !== 24) {
35622
- break;
35623
- }
35624
-
35625
- message.kind = reader.int32() as any;
35626
- continue;
35627
- }
35628
- case 4: {
35629
- if (tag !== 34) {
35630
- break;
35631
- }
35632
-
35633
- message.title = reader.string();
35634
- continue;
35635
- }
35636
- case 5: {
35637
- if (tag !== 42) {
35638
- break;
35639
- }
35640
-
35641
- message.pattern = reader.string();
35642
- continue;
35643
- }
35644
- case 6: {
35645
- if (tag !== 50) {
35646
- break;
35647
- }
35648
-
35649
- message.explanation = reader.string();
35650
- continue;
35651
- }
35652
- case 7: {
35653
- if (tag !== 58) {
35654
- break;
35655
- }
35656
-
35657
- message.action = reader.string();
35658
- continue;
35659
- }
35660
- case 8: {
35661
- if (tag !== 66) {
35662
- break;
35663
- }
35664
-
35665
- message.limitations = reader.string();
35666
- continue;
35667
- }
35668
- case 9: {
35669
- if (tag !== 72) {
35670
- break;
35671
- }
35672
-
35673
- message.sessionCount = reader.uint32();
35674
- continue;
35675
- }
35676
- case 10: {
35677
- if (tag !== 80) {
35678
- break;
35679
- }
35680
-
35681
- message.personCount = reader.uint32();
35682
- continue;
35683
- }
35684
- case 11: {
35685
- if (tag !== 90) {
35686
- break;
35687
- }
35688
-
35689
- message.spendUsd = reader.string();
35690
- continue;
35691
- }
35692
- case 12: {
35693
- if (tag !== 98) {
35694
- break;
35695
- }
35696
-
35697
- message.citations.push(AIProjectInsightCitation.decode(reader, reader.uint32()));
35698
- continue;
35699
- }
35700
- case 13: {
35701
- if (tag !== 106) {
35702
- break;
35703
- }
35704
-
35705
- message.skillSuggestion = AISkillSuggestion.decode(reader, reader.uint32());
35706
- continue;
35707
- }
35708
- }
35709
- if ((tag & 7) === 4 || tag === 0) {
35710
- break;
35711
- }
35712
- reader.skip(tag & 7);
35713
- }
35714
- return message;
35715
- } finally {
35716
- (reader as any).__tsProtoDecodeDepth = previousRecursionDepth;
35717
- }
35718
- },
35719
-
35720
- fromJSON(object: any): AIProjectInsight {
35721
- return {
35722
- id: isSet(object.id) ? globalThis.String(object.id) : "",
35723
- rank: isSet(object.rank) ? globalThis.Number(object.rank) : 0,
35724
- kind: isSet(object.kind) ? aIProjectInsightKindFromJSON(object.kind) : 0,
35725
- title: isSet(object.title) ? globalThis.String(object.title) : "",
35726
- pattern: isSet(object.pattern) ? globalThis.String(object.pattern) : "",
35727
- explanation: isSet(object.explanation) ? globalThis.String(object.explanation) : "",
35728
- action: isSet(object.action) ? globalThis.String(object.action) : "",
35729
- limitations: isSet(object.limitations) ? globalThis.String(object.limitations) : "",
35730
- sessionCount: isSet(object.sessionCount)
35731
- ? globalThis.Number(object.sessionCount)
35732
- : isSet(object.session_count)
35733
- ? globalThis.Number(object.session_count)
35734
- : 0,
35735
- personCount: isSet(object.personCount)
35736
- ? globalThis.Number(object.personCount)
35737
- : isSet(object.person_count)
35738
- ? globalThis.Number(object.person_count)
35739
- : 0,
35740
- spendUsd: isSet(object.spendUsd)
35741
- ? globalThis.String(object.spendUsd)
35742
- : isSet(object.spend_usd)
35743
- ? globalThis.String(object.spend_usd)
35744
- : undefined,
35745
- citations: globalThis.Array.isArray(object?.citations)
35746
- ? object.citations.map((e: any) => AIProjectInsightCitation.fromJSON(e))
35747
- : [],
35748
- skillSuggestion: isSet(object.skillSuggestion)
35749
- ? AISkillSuggestion.fromJSON(object.skillSuggestion)
35750
- : isSet(object.skill_suggestion)
35751
- ? AISkillSuggestion.fromJSON(object.skill_suggestion)
35752
- : undefined,
35753
- };
35754
- },
35755
-
35756
- toJSON(message: AIProjectInsight): unknown {
35757
- const obj: any = {};
35758
- if (message.id !== "") {
35759
- obj.id = message.id;
35760
- }
35761
- if (message.rank !== 0) {
35762
- obj.rank = Math.round(message.rank);
35763
- }
35764
- if (message.kind !== 0) {
35765
- obj.kind = aIProjectInsightKindToJSON(message.kind);
35766
- }
35767
- if (message.title !== "") {
35768
- obj.title = message.title;
35769
- }
35770
- if (message.pattern !== "") {
35771
- obj.pattern = message.pattern;
35772
- }
35773
- if (message.explanation !== "") {
35774
- obj.explanation = message.explanation;
35775
- }
35776
- if (message.action !== "") {
35777
- obj.action = message.action;
35778
- }
35779
- if (message.limitations !== "") {
35780
- obj.limitations = message.limitations;
35781
- }
35782
- if (message.sessionCount !== 0) {
35783
- obj.sessionCount = Math.round(message.sessionCount);
35784
- }
35785
- if (message.personCount !== 0) {
35786
- obj.personCount = Math.round(message.personCount);
35787
- }
35788
- if (message.spendUsd !== undefined) {
35789
- obj.spendUsd = message.spendUsd;
35790
- }
35791
- if (message.citations?.length) {
35792
- obj.citations = message.citations.map((e) => AIProjectInsightCitation.toJSON(e));
35793
- }
35794
- if (message.skillSuggestion !== undefined) {
35795
- obj.skillSuggestion = AISkillSuggestion.toJSON(message.skillSuggestion);
35796
- }
35797
- return obj;
35798
- },
35799
-
35800
- create<I extends Exact<DeepPartial<AIProjectInsight>, I>>(base?: I): AIProjectInsight {
35801
- return AIProjectInsight.fromPartial(base ?? ({} as any));
35802
- },
35803
- fromPartial<I extends Exact<DeepPartial<AIProjectInsight>, I>>(object: I): AIProjectInsight {
35804
- const message = createBaseAIProjectInsight();
35805
- message.id = object.id ?? "";
35806
- message.rank = object.rank ?? 0;
35807
- message.kind = object.kind ?? 0;
35808
- message.title = object.title ?? "";
35809
- message.pattern = object.pattern ?? "";
35810
- message.explanation = object.explanation ?? "";
35811
- message.action = object.action ?? "";
35812
- message.limitations = object.limitations ?? "";
35813
- message.sessionCount = object.sessionCount ?? 0;
35814
- message.personCount = object.personCount ?? 0;
35815
- message.spendUsd = object.spendUsd ?? undefined;
35816
- message.citations = object.citations?.map((e) => AIProjectInsightCitation.fromPartial(e)) || [];
35817
- message.skillSuggestion = (object.skillSuggestion !== undefined && object.skillSuggestion !== null)
35818
- ? AISkillSuggestion.fromPartial(object.skillSuggestion)
35819
- : undefined;
35820
- return message;
35821
- },
35822
- };
35823
-
35824
- function createBaseAIProjectInsightCitation(): AIProjectInsightCitation {
35825
- return { sourceSystem: "", sessionId: "", eventRef: undefined };
35826
- }
35827
-
35828
- export const AIProjectInsightCitation: MessageFns<AIProjectInsightCitation> = {
35829
- encode(message: AIProjectInsightCitation, writer: BinaryWriter = new BinaryWriter()): BinaryWriter {
35830
- if (message.sourceSystem !== "") {
35831
- writer.uint32(10).string(message.sourceSystem);
35832
- }
35833
- if (message.sessionId !== "") {
35834
- writer.uint32(18).string(message.sessionId);
35835
- }
35836
- if (message.eventRef !== undefined) {
35837
- AISessionEventRef.encode(message.eventRef, writer.uint32(26).fork()).join();
35838
- }
35839
- return writer;
35840
- },
35841
-
35842
- decode(input: BinaryReader | Uint8Array, length?: number): AIProjectInsightCitation {
35843
- const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
35844
- const previousRecursionDepth = (reader as any).__tsProtoDecodeDepth ?? 0;
35845
- if (previousRecursionDepth >= 100) {
35846
- throw new globalThis.Error("protobuf decode recursion limit exceeded");
35847
- }
35848
- (reader as any).__tsProtoDecodeDepth = previousRecursionDepth + 1;
35849
- try {
35850
- const end = length === undefined ? reader.len : reader.pos + length;
35851
- const message = createBaseAIProjectInsightCitation();
35852
- while (reader.pos < end) {
35853
- const tag = reader.uint32();
35854
- switch (tag >>> 3) {
35855
- case 1: {
35856
- if (tag !== 10) {
35857
- break;
35858
- }
35859
-
35860
- message.sourceSystem = reader.string();
35861
- continue;
35862
- }
35863
- case 2: {
35864
- if (tag !== 18) {
35865
- break;
35866
- }
35867
-
35868
- message.sessionId = reader.string();
35869
- continue;
35870
- }
35871
- case 3: {
35872
- if (tag !== 26) {
35873
- break;
35874
- }
35875
-
35876
- message.eventRef = AISessionEventRef.decode(reader, reader.uint32());
35877
- continue;
35878
- }
35879
- }
35880
- if ((tag & 7) === 4 || tag === 0) {
35881
- break;
35882
- }
35883
- reader.skip(tag & 7);
35884
- }
35885
- return message;
35886
- } finally {
35887
- (reader as any).__tsProtoDecodeDepth = previousRecursionDepth;
35888
- }
35889
- },
35890
-
35891
- fromJSON(object: any): AIProjectInsightCitation {
35892
- return {
35893
- sourceSystem: isSet(object.sourceSystem)
35894
- ? globalThis.String(object.sourceSystem)
35895
- : isSet(object.source_system)
35896
- ? globalThis.String(object.source_system)
35897
- : "",
35898
- sessionId: isSet(object.sessionId)
35899
- ? globalThis.String(object.sessionId)
35900
- : isSet(object.session_id)
35901
- ? globalThis.String(object.session_id)
35902
- : "",
35903
- eventRef: isSet(object.eventRef)
35904
- ? AISessionEventRef.fromJSON(object.eventRef)
35905
- : isSet(object.event_ref)
35906
- ? AISessionEventRef.fromJSON(object.event_ref)
35907
- : undefined,
35908
- };
35909
- },
35910
-
35911
- toJSON(message: AIProjectInsightCitation): unknown {
35912
- const obj: any = {};
35913
- if (message.sourceSystem !== "") {
35914
- obj.sourceSystem = message.sourceSystem;
35915
- }
35916
- if (message.sessionId !== "") {
35917
- obj.sessionId = message.sessionId;
35918
- }
35919
- if (message.eventRef !== undefined) {
35920
- obj.eventRef = AISessionEventRef.toJSON(message.eventRef);
35921
- }
35922
- return obj;
35923
- },
35924
-
35925
- create<I extends Exact<DeepPartial<AIProjectInsightCitation>, I>>(base?: I): AIProjectInsightCitation {
35926
- return AIProjectInsightCitation.fromPartial(base ?? ({} as any));
35927
- },
35928
- fromPartial<I extends Exact<DeepPartial<AIProjectInsightCitation>, I>>(object: I): AIProjectInsightCitation {
35929
- const message = createBaseAIProjectInsightCitation();
35930
- message.sourceSystem = object.sourceSystem ?? "";
35931
- message.sessionId = object.sessionId ?? "";
35932
- message.eventRef = (object.eventRef !== undefined && object.eventRef !== null)
35933
- ? AISessionEventRef.fromPartial(object.eventRef)
35934
- : undefined;
35935
- return message;
35936
- },
35937
- };
35938
-
35939
35140
  /**
35940
35141
  * AIGatewayService is the frontend-facing proxy over telemetry.api.v1.AIService.
35941
35142
  * It stamps the authorized organization/project and forwards telemetry-api-shaped messages.
@@ -36099,16 +35300,20 @@ export interface AIGatewayService {
36099
35300
  request: GetSessionTotalsTrendRequest,
36100
35301
  metadata?: Metadata,
36101
35302
  ): Promise<GetSessionTotalsTrendResponse>;
35303
+ /**
35304
+ * The sessions ListSessions lists for the same principals, source systems and active_after, rolled up from what
35305
+ * the analysis jobs wrote: how many sessions, how many carry each work type, and the latest 20 that carry a score
35306
+ * with how many do. Mirrors ai.api.v1.
35307
+ */
35308
+ GetSessionAnalysisOverview(
35309
+ request: GetSessionAnalysisOverviewRequest,
35310
+ metadata?: Metadata,
35311
+ ): Promise<GetSessionAnalysisOverviewResponse>;
36102
35312
  /**
36103
35313
  * One session's latest score against the scorer's rubric, with each criterion's assessment and improvement, and
36104
35314
  * its latest insights with their cause and action; each part absent until its job has run. Mirrors ai.api.v1.
36105
35315
  */
36106
35316
  GetSessionAnalysis(request: GetSessionAnalysisRequest, metadata?: Metadata): Promise<GetSessionAnalysisResponse>;
36107
- /**
36108
- * A project's insights one at a time, newest analysis first: a person's most recent insights with filter.user_ids,
36109
- * the team's without. Mirrors ai.api.v1.
36110
- */
36111
- ListSessionInsights(request: ListSessionInsightsRequest, metadata?: Metadata): Promise<ListSessionInsightsResponse>;
36112
35317
  /**
36113
35318
  * A project's graded sessions, or one person's, per ISO week (UTC, by last activity): counts, the mean score, the
36114
35319
  * mean grade value per rubric criterion. Directional. Mirrors ai.api.v1.
@@ -36191,14 +35396,6 @@ export interface AIGatewayService {
36191
35396
  * ai.api.v1.
36192
35397
  */
36193
35398
  ListIssueSessions(request: ListIssueSessionsRequest, metadata?: Metadata): Promise<ListIssueSessionsResponse>;
36194
- /**
36195
- * The project's cards across local days, newest local day first and rank order within a day: each day's latest run,
36196
- * only when it is READY, with the run context each card is labelled with. Token pages. Mirrors ai.api.v1.
36197
- */
36198
- ListProjectInsightCards(
36199
- request: ListProjectInsightCardsRequest,
36200
- metadata?: Metadata,
36201
- ): Promise<ListProjectInsightCardsResponse>;
36202
35399
  }
36203
35400
 
36204
35401
  export const AIGatewayServiceServiceName = "gateway.web.v1.AIGatewayService";
@@ -36238,8 +35435,8 @@ export class AIGatewayServiceClientImpl implements AIGatewayService {
36238
35435
  this.SetReasoningTrendContribution = this.SetReasoningTrendContribution.bind(this);
36239
35436
  this.GetSessionUsageTrend = this.GetSessionUsageTrend.bind(this);
36240
35437
  this.GetSessionTotalsTrend = this.GetSessionTotalsTrend.bind(this);
35438
+ this.GetSessionAnalysisOverview = this.GetSessionAnalysisOverview.bind(this);
36241
35439
  this.GetSessionAnalysis = this.GetSessionAnalysis.bind(this);
36242
- this.ListSessionInsights = this.ListSessionInsights.bind(this);
36243
35440
  this.GetSessionScoreTrend = this.GetSessionScoreTrend.bind(this);
36244
35441
  this.GetPromptLabelTrend = this.GetPromptLabelTrend.bind(this);
36245
35442
  this.GetLabelCatalog = this.GetLabelCatalog.bind(this);
@@ -36251,7 +35448,6 @@ export class AIGatewayServiceClientImpl implements AIGatewayService {
36251
35448
  this.ListIssueCosts = this.ListIssueCosts.bind(this);
36252
35449
  this.GetSessionIssues = this.GetSessionIssues.bind(this);
36253
35450
  this.ListIssueSessions = this.ListIssueSessions.bind(this);
36254
- this.ListProjectInsightCards = this.ListProjectInsightCards.bind(this);
36255
35451
  }
36256
35452
  ListSessions(request: ListSessionsRequest, metadata?: Metadata): Promise<ListSessionsResponse> {
36257
35453
  const data = ListSessionsRequest.encode(request).finish();
@@ -36454,18 +35650,21 @@ export class AIGatewayServiceClientImpl implements AIGatewayService {
36454
35650
  return promise.then((data) => GetSessionTotalsTrendResponse.decode(new BinaryReader(data)));
36455
35651
  }
36456
35652
 
35653
+ GetSessionAnalysisOverview(
35654
+ request: GetSessionAnalysisOverviewRequest,
35655
+ metadata?: Metadata,
35656
+ ): Promise<GetSessionAnalysisOverviewResponse> {
35657
+ const data = GetSessionAnalysisOverviewRequest.encode(request).finish();
35658
+ const promise = this.rpc.request(this.service, "GetSessionAnalysisOverview", data, metadata);
35659
+ return promise.then((data) => GetSessionAnalysisOverviewResponse.decode(new BinaryReader(data)));
35660
+ }
35661
+
36457
35662
  GetSessionAnalysis(request: GetSessionAnalysisRequest, metadata?: Metadata): Promise<GetSessionAnalysisResponse> {
36458
35663
  const data = GetSessionAnalysisRequest.encode(request).finish();
36459
35664
  const promise = this.rpc.request(this.service, "GetSessionAnalysis", data, metadata);
36460
35665
  return promise.then((data) => GetSessionAnalysisResponse.decode(new BinaryReader(data)));
36461
35666
  }
36462
35667
 
36463
- ListSessionInsights(request: ListSessionInsightsRequest, metadata?: Metadata): Promise<ListSessionInsightsResponse> {
36464
- const data = ListSessionInsightsRequest.encode(request).finish();
36465
- const promise = this.rpc.request(this.service, "ListSessionInsights", data, metadata);
36466
- return promise.then((data) => ListSessionInsightsResponse.decode(new BinaryReader(data)));
36467
- }
36468
-
36469
35668
  GetSessionScoreTrend(
36470
35669
  request: GetSessionScoreTrendRequest,
36471
35670
  metadata?: Metadata,
@@ -36543,15 +35742,6 @@ export class AIGatewayServiceClientImpl implements AIGatewayService {
36543
35742
  const promise = this.rpc.request(this.service, "ListIssueSessions", data, metadata);
36544
35743
  return promise.then((data) => ListIssueSessionsResponse.decode(new BinaryReader(data)));
36545
35744
  }
36546
-
36547
- ListProjectInsightCards(
36548
- request: ListProjectInsightCardsRequest,
36549
- metadata?: Metadata,
36550
- ): Promise<ListProjectInsightCardsResponse> {
36551
- const data = ListProjectInsightCardsRequest.encode(request).finish();
36552
- const promise = this.rpc.request(this.service, "ListProjectInsightCards", data, metadata);
36553
- return promise.then((data) => ListProjectInsightCardsResponse.decode(new BinaryReader(data)));
36554
- }
36555
35745
  }
36556
35746
 
36557
35747
  interface Rpc {