@miradorlabs/web-grpc 4.32.0 → 4.33.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.
|
@@ -3318,6 +3318,87 @@ export interface SessionTotalsBucket {
|
|
|
3318
3318
|
subscriptionFacilityUsd: number;
|
|
3319
3319
|
}
|
|
3320
3320
|
|
|
3321
|
+
export interface GetSessionAnalysisOverviewRequest {
|
|
3322
|
+
organizationId: string;
|
|
3323
|
+
projectId: string;
|
|
3324
|
+
/**
|
|
3325
|
+
* The window's start, which is scope: the sessions last active at or after it. At most 35 days before the
|
|
3326
|
+
* server's clock, else INVALID_ARGUMENT; a start in the future answers an empty overview.
|
|
3327
|
+
*/
|
|
3328
|
+
activeAfter:
|
|
3329
|
+
| Date
|
|
3330
|
+
| undefined;
|
|
3331
|
+
/** Which of the window's sessions to roll up; unset rolls up the whole project. */
|
|
3332
|
+
filter: SessionAnalysisOverviewFilter | undefined;
|
|
3333
|
+
}
|
|
3334
|
+
|
|
3335
|
+
/**
|
|
3336
|
+
* SessionAnalysisOverviewFilter narrows the sessions. Fields AND; a repeated field matches any of its values; an
|
|
3337
|
+
* unset or empty field does not filter. Each list holds at most 500 entries, else INVALID_ARGUMENT.
|
|
3338
|
+
*/
|
|
3339
|
+
export interface SessionAnalysisOverviewFilter {
|
|
3340
|
+
/**
|
|
3341
|
+
* The session's actor (its user id, else its api key id, as the summary shows it), as SessionFilter.principals
|
|
3342
|
+
* matches it: a user matches its user id, an api key only a session with no user id, an empty id a session with
|
|
3343
|
+
* neither; each on its source system when one is given. A principal of an unspecified kind is INVALID_ARGUMENT.
|
|
3344
|
+
* An empty list reads the whole project, so a caller does not query a person with no principals.
|
|
3345
|
+
*/
|
|
3346
|
+
principals: DailyActivityPrincipal[];
|
|
3347
|
+
/** Exact source systems. */
|
|
3348
|
+
sourceSystems: string[];
|
|
3349
|
+
}
|
|
3350
|
+
|
|
3351
|
+
export interface GetSessionAnalysisOverviewResponse {
|
|
3352
|
+
status:
|
|
3353
|
+
| ResponseStatus
|
|
3354
|
+
| undefined;
|
|
3355
|
+
/**
|
|
3356
|
+
* Sessions as ListSessions lists them for the same principals, source systems and active_after: its
|
|
3357
|
+
* pagination.total_count.
|
|
3358
|
+
*/
|
|
3359
|
+
sessions: number;
|
|
3360
|
+
/**
|
|
3361
|
+
* One row per work type key with at least one session, ordered by key, read in one statement with `sessions`:
|
|
3362
|
+
* the rows add up to the labelled sessions, at most `sessions`. A session with no label, or whose label names
|
|
3363
|
+
* no work type (""), is in no row.
|
|
3364
|
+
*/
|
|
3365
|
+
workTypeCounts: SessionWorkTypeCount[];
|
|
3366
|
+
/**
|
|
3367
|
+
* The sessions that carry a score (AISessionSummary.session_score), ordered by last_activity_at descending, then
|
|
3368
|
+
* source_system and session_id ascending, as ListSessions orders by recency; at most 20.
|
|
3369
|
+
*/
|
|
3370
|
+
scoredSessions: ScoredSession[];
|
|
3371
|
+
/** How many of the sessions carry a score; scored_sessions holds the first 20 of them. */
|
|
3372
|
+
scoredSessionCount: number;
|
|
3373
|
+
}
|
|
3374
|
+
|
|
3375
|
+
/** SessionWorkTypeCount is how many sessions carry one work type (AISessionSummary.work_type) as their latest label. */
|
|
3376
|
+
export interface SessionWorkTypeCount {
|
|
3377
|
+
workType: string;
|
|
3378
|
+
sessions: number;
|
|
3379
|
+
/**
|
|
3380
|
+
* The latest last_activity_at among those sessions, so a caller can order work types with equal counts by how
|
|
3381
|
+
* recently each was worked on.
|
|
3382
|
+
*/
|
|
3383
|
+
lastActivityAt: Date | undefined;
|
|
3384
|
+
}
|
|
3385
|
+
|
|
3386
|
+
/**
|
|
3387
|
+
* ScoredSession is one session with its score, and what a caller needs to name it and open it. Each field is
|
|
3388
|
+
* AISessionSummary's of the same name.
|
|
3389
|
+
*/
|
|
3390
|
+
export interface ScoredSession {
|
|
3391
|
+
sourceSystem: string;
|
|
3392
|
+
sessionId: string;
|
|
3393
|
+
lastActivityAt: Date | undefined;
|
|
3394
|
+
title: string;
|
|
3395
|
+
clients: string[];
|
|
3396
|
+
/** 0-100, from the session's latest grading read from its current session_version. */
|
|
3397
|
+
sessionScore: number;
|
|
3398
|
+
/** UNSPECIFIED when the score predates the scorer recording its template. */
|
|
3399
|
+
sessionScoreRubric: AISessionScoreRubric;
|
|
3400
|
+
}
|
|
3401
|
+
|
|
3321
3402
|
export interface GetSessionAnalysisRequest {
|
|
3322
3403
|
organizationId: string;
|
|
3323
3404
|
projectId: string;
|
|
@@ -24200,6 +24281,687 @@ export const SessionTotalsBucket: MessageFns<SessionTotalsBucket> = {
|
|
|
24200
24281
|
},
|
|
24201
24282
|
};
|
|
24202
24283
|
|
|
24284
|
+
function createBaseGetSessionAnalysisOverviewRequest(): GetSessionAnalysisOverviewRequest {
|
|
24285
|
+
return { organizationId: "", projectId: "", activeAfter: undefined, filter: undefined };
|
|
24286
|
+
}
|
|
24287
|
+
|
|
24288
|
+
export const GetSessionAnalysisOverviewRequest: MessageFns<GetSessionAnalysisOverviewRequest> = {
|
|
24289
|
+
encode(message: GetSessionAnalysisOverviewRequest, writer: BinaryWriter = new BinaryWriter()): BinaryWriter {
|
|
24290
|
+
if (message.organizationId !== "") {
|
|
24291
|
+
writer.uint32(10).string(message.organizationId);
|
|
24292
|
+
}
|
|
24293
|
+
if (message.projectId !== "") {
|
|
24294
|
+
writer.uint32(18).string(message.projectId);
|
|
24295
|
+
}
|
|
24296
|
+
if (message.activeAfter !== undefined) {
|
|
24297
|
+
Timestamp.encode(toTimestamp(message.activeAfter), writer.uint32(26).fork()).join();
|
|
24298
|
+
}
|
|
24299
|
+
if (message.filter !== undefined) {
|
|
24300
|
+
SessionAnalysisOverviewFilter.encode(message.filter, writer.uint32(34).fork()).join();
|
|
24301
|
+
}
|
|
24302
|
+
return writer;
|
|
24303
|
+
},
|
|
24304
|
+
|
|
24305
|
+
decode(input: BinaryReader | Uint8Array, length?: number): GetSessionAnalysisOverviewRequest {
|
|
24306
|
+
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
|
|
24307
|
+
const previousRecursionDepth = (reader as any).__tsProtoDecodeDepth ?? 0;
|
|
24308
|
+
if (previousRecursionDepth >= 100) {
|
|
24309
|
+
throw new globalThis.Error("protobuf decode recursion limit exceeded");
|
|
24310
|
+
}
|
|
24311
|
+
(reader as any).__tsProtoDecodeDepth = previousRecursionDepth + 1;
|
|
24312
|
+
try {
|
|
24313
|
+
const end = length === undefined ? reader.len : reader.pos + length;
|
|
24314
|
+
const message = createBaseGetSessionAnalysisOverviewRequest();
|
|
24315
|
+
while (reader.pos < end) {
|
|
24316
|
+
const tag = reader.uint32();
|
|
24317
|
+
switch (tag >>> 3) {
|
|
24318
|
+
case 1: {
|
|
24319
|
+
if (tag !== 10) {
|
|
24320
|
+
break;
|
|
24321
|
+
}
|
|
24322
|
+
|
|
24323
|
+
message.organizationId = reader.string();
|
|
24324
|
+
continue;
|
|
24325
|
+
}
|
|
24326
|
+
case 2: {
|
|
24327
|
+
if (tag !== 18) {
|
|
24328
|
+
break;
|
|
24329
|
+
}
|
|
24330
|
+
|
|
24331
|
+
message.projectId = reader.string();
|
|
24332
|
+
continue;
|
|
24333
|
+
}
|
|
24334
|
+
case 3: {
|
|
24335
|
+
if (tag !== 26) {
|
|
24336
|
+
break;
|
|
24337
|
+
}
|
|
24338
|
+
|
|
24339
|
+
message.activeAfter = fromTimestamp(Timestamp.decode(reader, reader.uint32()));
|
|
24340
|
+
continue;
|
|
24341
|
+
}
|
|
24342
|
+
case 4: {
|
|
24343
|
+
if (tag !== 34) {
|
|
24344
|
+
break;
|
|
24345
|
+
}
|
|
24346
|
+
|
|
24347
|
+
message.filter = SessionAnalysisOverviewFilter.decode(reader, reader.uint32());
|
|
24348
|
+
continue;
|
|
24349
|
+
}
|
|
24350
|
+
}
|
|
24351
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
24352
|
+
break;
|
|
24353
|
+
}
|
|
24354
|
+
reader.skip(tag & 7);
|
|
24355
|
+
}
|
|
24356
|
+
return message;
|
|
24357
|
+
} finally {
|
|
24358
|
+
(reader as any).__tsProtoDecodeDepth = previousRecursionDepth;
|
|
24359
|
+
}
|
|
24360
|
+
},
|
|
24361
|
+
|
|
24362
|
+
fromJSON(object: any): GetSessionAnalysisOverviewRequest {
|
|
24363
|
+
return {
|
|
24364
|
+
organizationId: isSet(object.organizationId)
|
|
24365
|
+
? globalThis.String(object.organizationId)
|
|
24366
|
+
: isSet(object.organization_id)
|
|
24367
|
+
? globalThis.String(object.organization_id)
|
|
24368
|
+
: "",
|
|
24369
|
+
projectId: isSet(object.projectId)
|
|
24370
|
+
? globalThis.String(object.projectId)
|
|
24371
|
+
: isSet(object.project_id)
|
|
24372
|
+
? globalThis.String(object.project_id)
|
|
24373
|
+
: "",
|
|
24374
|
+
activeAfter: isSet(object.activeAfter)
|
|
24375
|
+
? fromJsonTimestamp(object.activeAfter)
|
|
24376
|
+
: isSet(object.active_after)
|
|
24377
|
+
? fromJsonTimestamp(object.active_after)
|
|
24378
|
+
: undefined,
|
|
24379
|
+
filter: isSet(object.filter) ? SessionAnalysisOverviewFilter.fromJSON(object.filter) : undefined,
|
|
24380
|
+
};
|
|
24381
|
+
},
|
|
24382
|
+
|
|
24383
|
+
toJSON(message: GetSessionAnalysisOverviewRequest): unknown {
|
|
24384
|
+
const obj: any = {};
|
|
24385
|
+
if (message.organizationId !== "") {
|
|
24386
|
+
obj.organizationId = message.organizationId;
|
|
24387
|
+
}
|
|
24388
|
+
if (message.projectId !== "") {
|
|
24389
|
+
obj.projectId = message.projectId;
|
|
24390
|
+
}
|
|
24391
|
+
if (message.activeAfter !== undefined) {
|
|
24392
|
+
obj.activeAfter = message.activeAfter.toISOString();
|
|
24393
|
+
}
|
|
24394
|
+
if (message.filter !== undefined) {
|
|
24395
|
+
obj.filter = SessionAnalysisOverviewFilter.toJSON(message.filter);
|
|
24396
|
+
}
|
|
24397
|
+
return obj;
|
|
24398
|
+
},
|
|
24399
|
+
|
|
24400
|
+
create<I extends Exact<DeepPartial<GetSessionAnalysisOverviewRequest>, I>>(
|
|
24401
|
+
base?: I,
|
|
24402
|
+
): GetSessionAnalysisOverviewRequest {
|
|
24403
|
+
return GetSessionAnalysisOverviewRequest.fromPartial(base ?? ({} as any));
|
|
24404
|
+
},
|
|
24405
|
+
fromPartial<I extends Exact<DeepPartial<GetSessionAnalysisOverviewRequest>, I>>(
|
|
24406
|
+
object: I,
|
|
24407
|
+
): GetSessionAnalysisOverviewRequest {
|
|
24408
|
+
const message = createBaseGetSessionAnalysisOverviewRequest();
|
|
24409
|
+
message.organizationId = object.organizationId ?? "";
|
|
24410
|
+
message.projectId = object.projectId ?? "";
|
|
24411
|
+
message.activeAfter = object.activeAfter ?? undefined;
|
|
24412
|
+
message.filter = (object.filter !== undefined && object.filter !== null)
|
|
24413
|
+
? SessionAnalysisOverviewFilter.fromPartial(object.filter)
|
|
24414
|
+
: undefined;
|
|
24415
|
+
return message;
|
|
24416
|
+
},
|
|
24417
|
+
};
|
|
24418
|
+
|
|
24419
|
+
function createBaseSessionAnalysisOverviewFilter(): SessionAnalysisOverviewFilter {
|
|
24420
|
+
return { principals: [], sourceSystems: [] };
|
|
24421
|
+
}
|
|
24422
|
+
|
|
24423
|
+
export const SessionAnalysisOverviewFilter: MessageFns<SessionAnalysisOverviewFilter> = {
|
|
24424
|
+
encode(message: SessionAnalysisOverviewFilter, writer: BinaryWriter = new BinaryWriter()): BinaryWriter {
|
|
24425
|
+
for (const v of message.principals) {
|
|
24426
|
+
DailyActivityPrincipal.encode(v!, writer.uint32(10).fork()).join();
|
|
24427
|
+
}
|
|
24428
|
+
for (const v of message.sourceSystems) {
|
|
24429
|
+
writer.uint32(18).string(v!);
|
|
24430
|
+
}
|
|
24431
|
+
return writer;
|
|
24432
|
+
},
|
|
24433
|
+
|
|
24434
|
+
decode(input: BinaryReader | Uint8Array, length?: number): SessionAnalysisOverviewFilter {
|
|
24435
|
+
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
|
|
24436
|
+
const previousRecursionDepth = (reader as any).__tsProtoDecodeDepth ?? 0;
|
|
24437
|
+
if (previousRecursionDepth >= 100) {
|
|
24438
|
+
throw new globalThis.Error("protobuf decode recursion limit exceeded");
|
|
24439
|
+
}
|
|
24440
|
+
(reader as any).__tsProtoDecodeDepth = previousRecursionDepth + 1;
|
|
24441
|
+
try {
|
|
24442
|
+
const end = length === undefined ? reader.len : reader.pos + length;
|
|
24443
|
+
const message = createBaseSessionAnalysisOverviewFilter();
|
|
24444
|
+
while (reader.pos < end) {
|
|
24445
|
+
const tag = reader.uint32();
|
|
24446
|
+
switch (tag >>> 3) {
|
|
24447
|
+
case 1: {
|
|
24448
|
+
if (tag !== 10) {
|
|
24449
|
+
break;
|
|
24450
|
+
}
|
|
24451
|
+
|
|
24452
|
+
message.principals.push(DailyActivityPrincipal.decode(reader, reader.uint32()));
|
|
24453
|
+
continue;
|
|
24454
|
+
}
|
|
24455
|
+
case 2: {
|
|
24456
|
+
if (tag !== 18) {
|
|
24457
|
+
break;
|
|
24458
|
+
}
|
|
24459
|
+
|
|
24460
|
+
message.sourceSystems.push(reader.string());
|
|
24461
|
+
continue;
|
|
24462
|
+
}
|
|
24463
|
+
}
|
|
24464
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
24465
|
+
break;
|
|
24466
|
+
}
|
|
24467
|
+
reader.skip(tag & 7);
|
|
24468
|
+
}
|
|
24469
|
+
return message;
|
|
24470
|
+
} finally {
|
|
24471
|
+
(reader as any).__tsProtoDecodeDepth = previousRecursionDepth;
|
|
24472
|
+
}
|
|
24473
|
+
},
|
|
24474
|
+
|
|
24475
|
+
fromJSON(object: any): SessionAnalysisOverviewFilter {
|
|
24476
|
+
return {
|
|
24477
|
+
principals: globalThis.Array.isArray(object?.principals)
|
|
24478
|
+
? object.principals.map((e: any) => DailyActivityPrincipal.fromJSON(e))
|
|
24479
|
+
: [],
|
|
24480
|
+
sourceSystems: globalThis.Array.isArray(object?.sourceSystems)
|
|
24481
|
+
? object.sourceSystems.map((e: any) => globalThis.String(e))
|
|
24482
|
+
: globalThis.Array.isArray(object?.source_systems)
|
|
24483
|
+
? object.source_systems.map((e: any) => globalThis.String(e))
|
|
24484
|
+
: [],
|
|
24485
|
+
};
|
|
24486
|
+
},
|
|
24487
|
+
|
|
24488
|
+
toJSON(message: SessionAnalysisOverviewFilter): unknown {
|
|
24489
|
+
const obj: any = {};
|
|
24490
|
+
if (message.principals?.length) {
|
|
24491
|
+
obj.principals = message.principals.map((e) => DailyActivityPrincipal.toJSON(e));
|
|
24492
|
+
}
|
|
24493
|
+
if (message.sourceSystems?.length) {
|
|
24494
|
+
obj.sourceSystems = message.sourceSystems;
|
|
24495
|
+
}
|
|
24496
|
+
return obj;
|
|
24497
|
+
},
|
|
24498
|
+
|
|
24499
|
+
create<I extends Exact<DeepPartial<SessionAnalysisOverviewFilter>, I>>(base?: I): SessionAnalysisOverviewFilter {
|
|
24500
|
+
return SessionAnalysisOverviewFilter.fromPartial(base ?? ({} as any));
|
|
24501
|
+
},
|
|
24502
|
+
fromPartial<I extends Exact<DeepPartial<SessionAnalysisOverviewFilter>, I>>(
|
|
24503
|
+
object: I,
|
|
24504
|
+
): SessionAnalysisOverviewFilter {
|
|
24505
|
+
const message = createBaseSessionAnalysisOverviewFilter();
|
|
24506
|
+
message.principals = object.principals?.map((e) => DailyActivityPrincipal.fromPartial(e)) || [];
|
|
24507
|
+
message.sourceSystems = object.sourceSystems?.map((e) => e) || [];
|
|
24508
|
+
return message;
|
|
24509
|
+
},
|
|
24510
|
+
};
|
|
24511
|
+
|
|
24512
|
+
function createBaseGetSessionAnalysisOverviewResponse(): GetSessionAnalysisOverviewResponse {
|
|
24513
|
+
return { status: undefined, sessions: 0, workTypeCounts: [], scoredSessions: [], scoredSessionCount: 0 };
|
|
24514
|
+
}
|
|
24515
|
+
|
|
24516
|
+
export const GetSessionAnalysisOverviewResponse: MessageFns<GetSessionAnalysisOverviewResponse> = {
|
|
24517
|
+
encode(message: GetSessionAnalysisOverviewResponse, writer: BinaryWriter = new BinaryWriter()): BinaryWriter {
|
|
24518
|
+
if (message.status !== undefined) {
|
|
24519
|
+
ResponseStatus.encode(message.status, writer.uint32(10).fork()).join();
|
|
24520
|
+
}
|
|
24521
|
+
if (message.sessions !== 0) {
|
|
24522
|
+
writer.uint32(16).uint64(message.sessions);
|
|
24523
|
+
}
|
|
24524
|
+
for (const v of message.workTypeCounts) {
|
|
24525
|
+
SessionWorkTypeCount.encode(v!, writer.uint32(26).fork()).join();
|
|
24526
|
+
}
|
|
24527
|
+
for (const v of message.scoredSessions) {
|
|
24528
|
+
ScoredSession.encode(v!, writer.uint32(34).fork()).join();
|
|
24529
|
+
}
|
|
24530
|
+
if (message.scoredSessionCount !== 0) {
|
|
24531
|
+
writer.uint32(40).uint64(message.scoredSessionCount);
|
|
24532
|
+
}
|
|
24533
|
+
return writer;
|
|
24534
|
+
},
|
|
24535
|
+
|
|
24536
|
+
decode(input: BinaryReader | Uint8Array, length?: number): GetSessionAnalysisOverviewResponse {
|
|
24537
|
+
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
|
|
24538
|
+
const previousRecursionDepth = (reader as any).__tsProtoDecodeDepth ?? 0;
|
|
24539
|
+
if (previousRecursionDepth >= 100) {
|
|
24540
|
+
throw new globalThis.Error("protobuf decode recursion limit exceeded");
|
|
24541
|
+
}
|
|
24542
|
+
(reader as any).__tsProtoDecodeDepth = previousRecursionDepth + 1;
|
|
24543
|
+
try {
|
|
24544
|
+
const end = length === undefined ? reader.len : reader.pos + length;
|
|
24545
|
+
const message = createBaseGetSessionAnalysisOverviewResponse();
|
|
24546
|
+
while (reader.pos < end) {
|
|
24547
|
+
const tag = reader.uint32();
|
|
24548
|
+
switch (tag >>> 3) {
|
|
24549
|
+
case 1: {
|
|
24550
|
+
if (tag !== 10) {
|
|
24551
|
+
break;
|
|
24552
|
+
}
|
|
24553
|
+
|
|
24554
|
+
message.status = ResponseStatus.decode(reader, reader.uint32());
|
|
24555
|
+
continue;
|
|
24556
|
+
}
|
|
24557
|
+
case 2: {
|
|
24558
|
+
if (tag !== 16) {
|
|
24559
|
+
break;
|
|
24560
|
+
}
|
|
24561
|
+
|
|
24562
|
+
message.sessions = longToNumber(reader.uint64());
|
|
24563
|
+
continue;
|
|
24564
|
+
}
|
|
24565
|
+
case 3: {
|
|
24566
|
+
if (tag !== 26) {
|
|
24567
|
+
break;
|
|
24568
|
+
}
|
|
24569
|
+
|
|
24570
|
+
message.workTypeCounts.push(SessionWorkTypeCount.decode(reader, reader.uint32()));
|
|
24571
|
+
continue;
|
|
24572
|
+
}
|
|
24573
|
+
case 4: {
|
|
24574
|
+
if (tag !== 34) {
|
|
24575
|
+
break;
|
|
24576
|
+
}
|
|
24577
|
+
|
|
24578
|
+
message.scoredSessions.push(ScoredSession.decode(reader, reader.uint32()));
|
|
24579
|
+
continue;
|
|
24580
|
+
}
|
|
24581
|
+
case 5: {
|
|
24582
|
+
if (tag !== 40) {
|
|
24583
|
+
break;
|
|
24584
|
+
}
|
|
24585
|
+
|
|
24586
|
+
message.scoredSessionCount = longToNumber(reader.uint64());
|
|
24587
|
+
continue;
|
|
24588
|
+
}
|
|
24589
|
+
}
|
|
24590
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
24591
|
+
break;
|
|
24592
|
+
}
|
|
24593
|
+
reader.skip(tag & 7);
|
|
24594
|
+
}
|
|
24595
|
+
return message;
|
|
24596
|
+
} finally {
|
|
24597
|
+
(reader as any).__tsProtoDecodeDepth = previousRecursionDepth;
|
|
24598
|
+
}
|
|
24599
|
+
},
|
|
24600
|
+
|
|
24601
|
+
fromJSON(object: any): GetSessionAnalysisOverviewResponse {
|
|
24602
|
+
return {
|
|
24603
|
+
status: isSet(object.status) ? ResponseStatus.fromJSON(object.status) : undefined,
|
|
24604
|
+
sessions: isSet(object.sessions) ? globalThis.Number(object.sessions) : 0,
|
|
24605
|
+
workTypeCounts: globalThis.Array.isArray(object?.workTypeCounts)
|
|
24606
|
+
? object.workTypeCounts.map((e: any) => SessionWorkTypeCount.fromJSON(e))
|
|
24607
|
+
: globalThis.Array.isArray(object?.work_type_counts)
|
|
24608
|
+
? object.work_type_counts.map((e: any) => SessionWorkTypeCount.fromJSON(e))
|
|
24609
|
+
: [],
|
|
24610
|
+
scoredSessions: globalThis.Array.isArray(object?.scoredSessions)
|
|
24611
|
+
? object.scoredSessions.map((e: any) => ScoredSession.fromJSON(e))
|
|
24612
|
+
: globalThis.Array.isArray(object?.scored_sessions)
|
|
24613
|
+
? object.scored_sessions.map((e: any) => ScoredSession.fromJSON(e))
|
|
24614
|
+
: [],
|
|
24615
|
+
scoredSessionCount: isSet(object.scoredSessionCount)
|
|
24616
|
+
? globalThis.Number(object.scoredSessionCount)
|
|
24617
|
+
: isSet(object.scored_session_count)
|
|
24618
|
+
? globalThis.Number(object.scored_session_count)
|
|
24619
|
+
: 0,
|
|
24620
|
+
};
|
|
24621
|
+
},
|
|
24622
|
+
|
|
24623
|
+
toJSON(message: GetSessionAnalysisOverviewResponse): unknown {
|
|
24624
|
+
const obj: any = {};
|
|
24625
|
+
if (message.status !== undefined) {
|
|
24626
|
+
obj.status = ResponseStatus.toJSON(message.status);
|
|
24627
|
+
}
|
|
24628
|
+
if (message.sessions !== 0) {
|
|
24629
|
+
obj.sessions = Math.round(message.sessions);
|
|
24630
|
+
}
|
|
24631
|
+
if (message.workTypeCounts?.length) {
|
|
24632
|
+
obj.workTypeCounts = message.workTypeCounts.map((e) => SessionWorkTypeCount.toJSON(e));
|
|
24633
|
+
}
|
|
24634
|
+
if (message.scoredSessions?.length) {
|
|
24635
|
+
obj.scoredSessions = message.scoredSessions.map((e) => ScoredSession.toJSON(e));
|
|
24636
|
+
}
|
|
24637
|
+
if (message.scoredSessionCount !== 0) {
|
|
24638
|
+
obj.scoredSessionCount = Math.round(message.scoredSessionCount);
|
|
24639
|
+
}
|
|
24640
|
+
return obj;
|
|
24641
|
+
},
|
|
24642
|
+
|
|
24643
|
+
create<I extends Exact<DeepPartial<GetSessionAnalysisOverviewResponse>, I>>(
|
|
24644
|
+
base?: I,
|
|
24645
|
+
): GetSessionAnalysisOverviewResponse {
|
|
24646
|
+
return GetSessionAnalysisOverviewResponse.fromPartial(base ?? ({} as any));
|
|
24647
|
+
},
|
|
24648
|
+
fromPartial<I extends Exact<DeepPartial<GetSessionAnalysisOverviewResponse>, I>>(
|
|
24649
|
+
object: I,
|
|
24650
|
+
): GetSessionAnalysisOverviewResponse {
|
|
24651
|
+
const message = createBaseGetSessionAnalysisOverviewResponse();
|
|
24652
|
+
message.status = (object.status !== undefined && object.status !== null)
|
|
24653
|
+
? ResponseStatus.fromPartial(object.status)
|
|
24654
|
+
: undefined;
|
|
24655
|
+
message.sessions = object.sessions ?? 0;
|
|
24656
|
+
message.workTypeCounts = object.workTypeCounts?.map((e) => SessionWorkTypeCount.fromPartial(e)) || [];
|
|
24657
|
+
message.scoredSessions = object.scoredSessions?.map((e) => ScoredSession.fromPartial(e)) || [];
|
|
24658
|
+
message.scoredSessionCount = object.scoredSessionCount ?? 0;
|
|
24659
|
+
return message;
|
|
24660
|
+
},
|
|
24661
|
+
};
|
|
24662
|
+
|
|
24663
|
+
function createBaseSessionWorkTypeCount(): SessionWorkTypeCount {
|
|
24664
|
+
return { workType: "", sessions: 0, lastActivityAt: undefined };
|
|
24665
|
+
}
|
|
24666
|
+
|
|
24667
|
+
export const SessionWorkTypeCount: MessageFns<SessionWorkTypeCount> = {
|
|
24668
|
+
encode(message: SessionWorkTypeCount, writer: BinaryWriter = new BinaryWriter()): BinaryWriter {
|
|
24669
|
+
if (message.workType !== "") {
|
|
24670
|
+
writer.uint32(10).string(message.workType);
|
|
24671
|
+
}
|
|
24672
|
+
if (message.sessions !== 0) {
|
|
24673
|
+
writer.uint32(16).uint64(message.sessions);
|
|
24674
|
+
}
|
|
24675
|
+
if (message.lastActivityAt !== undefined) {
|
|
24676
|
+
Timestamp.encode(toTimestamp(message.lastActivityAt), writer.uint32(26).fork()).join();
|
|
24677
|
+
}
|
|
24678
|
+
return writer;
|
|
24679
|
+
},
|
|
24680
|
+
|
|
24681
|
+
decode(input: BinaryReader | Uint8Array, length?: number): SessionWorkTypeCount {
|
|
24682
|
+
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
|
|
24683
|
+
const previousRecursionDepth = (reader as any).__tsProtoDecodeDepth ?? 0;
|
|
24684
|
+
if (previousRecursionDepth >= 100) {
|
|
24685
|
+
throw new globalThis.Error("protobuf decode recursion limit exceeded");
|
|
24686
|
+
}
|
|
24687
|
+
(reader as any).__tsProtoDecodeDepth = previousRecursionDepth + 1;
|
|
24688
|
+
try {
|
|
24689
|
+
const end = length === undefined ? reader.len : reader.pos + length;
|
|
24690
|
+
const message = createBaseSessionWorkTypeCount();
|
|
24691
|
+
while (reader.pos < end) {
|
|
24692
|
+
const tag = reader.uint32();
|
|
24693
|
+
switch (tag >>> 3) {
|
|
24694
|
+
case 1: {
|
|
24695
|
+
if (tag !== 10) {
|
|
24696
|
+
break;
|
|
24697
|
+
}
|
|
24698
|
+
|
|
24699
|
+
message.workType = reader.string();
|
|
24700
|
+
continue;
|
|
24701
|
+
}
|
|
24702
|
+
case 2: {
|
|
24703
|
+
if (tag !== 16) {
|
|
24704
|
+
break;
|
|
24705
|
+
}
|
|
24706
|
+
|
|
24707
|
+
message.sessions = longToNumber(reader.uint64());
|
|
24708
|
+
continue;
|
|
24709
|
+
}
|
|
24710
|
+
case 3: {
|
|
24711
|
+
if (tag !== 26) {
|
|
24712
|
+
break;
|
|
24713
|
+
}
|
|
24714
|
+
|
|
24715
|
+
message.lastActivityAt = fromTimestamp(Timestamp.decode(reader, reader.uint32()));
|
|
24716
|
+
continue;
|
|
24717
|
+
}
|
|
24718
|
+
}
|
|
24719
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
24720
|
+
break;
|
|
24721
|
+
}
|
|
24722
|
+
reader.skip(tag & 7);
|
|
24723
|
+
}
|
|
24724
|
+
return message;
|
|
24725
|
+
} finally {
|
|
24726
|
+
(reader as any).__tsProtoDecodeDepth = previousRecursionDepth;
|
|
24727
|
+
}
|
|
24728
|
+
},
|
|
24729
|
+
|
|
24730
|
+
fromJSON(object: any): SessionWorkTypeCount {
|
|
24731
|
+
return {
|
|
24732
|
+
workType: isSet(object.workType)
|
|
24733
|
+
? globalThis.String(object.workType)
|
|
24734
|
+
: isSet(object.work_type)
|
|
24735
|
+
? globalThis.String(object.work_type)
|
|
24736
|
+
: "",
|
|
24737
|
+
sessions: isSet(object.sessions) ? globalThis.Number(object.sessions) : 0,
|
|
24738
|
+
lastActivityAt: isSet(object.lastActivityAt)
|
|
24739
|
+
? fromJsonTimestamp(object.lastActivityAt)
|
|
24740
|
+
: isSet(object.last_activity_at)
|
|
24741
|
+
? fromJsonTimestamp(object.last_activity_at)
|
|
24742
|
+
: undefined,
|
|
24743
|
+
};
|
|
24744
|
+
},
|
|
24745
|
+
|
|
24746
|
+
toJSON(message: SessionWorkTypeCount): unknown {
|
|
24747
|
+
const obj: any = {};
|
|
24748
|
+
if (message.workType !== "") {
|
|
24749
|
+
obj.workType = message.workType;
|
|
24750
|
+
}
|
|
24751
|
+
if (message.sessions !== 0) {
|
|
24752
|
+
obj.sessions = Math.round(message.sessions);
|
|
24753
|
+
}
|
|
24754
|
+
if (message.lastActivityAt !== undefined) {
|
|
24755
|
+
obj.lastActivityAt = message.lastActivityAt.toISOString();
|
|
24756
|
+
}
|
|
24757
|
+
return obj;
|
|
24758
|
+
},
|
|
24759
|
+
|
|
24760
|
+
create<I extends Exact<DeepPartial<SessionWorkTypeCount>, I>>(base?: I): SessionWorkTypeCount {
|
|
24761
|
+
return SessionWorkTypeCount.fromPartial(base ?? ({} as any));
|
|
24762
|
+
},
|
|
24763
|
+
fromPartial<I extends Exact<DeepPartial<SessionWorkTypeCount>, I>>(object: I): SessionWorkTypeCount {
|
|
24764
|
+
const message = createBaseSessionWorkTypeCount();
|
|
24765
|
+
message.workType = object.workType ?? "";
|
|
24766
|
+
message.sessions = object.sessions ?? 0;
|
|
24767
|
+
message.lastActivityAt = object.lastActivityAt ?? undefined;
|
|
24768
|
+
return message;
|
|
24769
|
+
},
|
|
24770
|
+
};
|
|
24771
|
+
|
|
24772
|
+
function createBaseScoredSession(): ScoredSession {
|
|
24773
|
+
return {
|
|
24774
|
+
sourceSystem: "",
|
|
24775
|
+
sessionId: "",
|
|
24776
|
+
lastActivityAt: undefined,
|
|
24777
|
+
title: "",
|
|
24778
|
+
clients: [],
|
|
24779
|
+
sessionScore: 0,
|
|
24780
|
+
sessionScoreRubric: 0,
|
|
24781
|
+
};
|
|
24782
|
+
}
|
|
24783
|
+
|
|
24784
|
+
export const ScoredSession: MessageFns<ScoredSession> = {
|
|
24785
|
+
encode(message: ScoredSession, writer: BinaryWriter = new BinaryWriter()): BinaryWriter {
|
|
24786
|
+
if (message.sourceSystem !== "") {
|
|
24787
|
+
writer.uint32(10).string(message.sourceSystem);
|
|
24788
|
+
}
|
|
24789
|
+
if (message.sessionId !== "") {
|
|
24790
|
+
writer.uint32(18).string(message.sessionId);
|
|
24791
|
+
}
|
|
24792
|
+
if (message.lastActivityAt !== undefined) {
|
|
24793
|
+
Timestamp.encode(toTimestamp(message.lastActivityAt), writer.uint32(26).fork()).join();
|
|
24794
|
+
}
|
|
24795
|
+
if (message.title !== "") {
|
|
24796
|
+
writer.uint32(34).string(message.title);
|
|
24797
|
+
}
|
|
24798
|
+
for (const v of message.clients) {
|
|
24799
|
+
writer.uint32(42).string(v!);
|
|
24800
|
+
}
|
|
24801
|
+
if (message.sessionScore !== 0) {
|
|
24802
|
+
writer.uint32(48).int32(message.sessionScore);
|
|
24803
|
+
}
|
|
24804
|
+
if (message.sessionScoreRubric !== 0) {
|
|
24805
|
+
writer.uint32(56).int32(message.sessionScoreRubric);
|
|
24806
|
+
}
|
|
24807
|
+
return writer;
|
|
24808
|
+
},
|
|
24809
|
+
|
|
24810
|
+
decode(input: BinaryReader | Uint8Array, length?: number): ScoredSession {
|
|
24811
|
+
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
|
|
24812
|
+
const previousRecursionDepth = (reader as any).__tsProtoDecodeDepth ?? 0;
|
|
24813
|
+
if (previousRecursionDepth >= 100) {
|
|
24814
|
+
throw new globalThis.Error("protobuf decode recursion limit exceeded");
|
|
24815
|
+
}
|
|
24816
|
+
(reader as any).__tsProtoDecodeDepth = previousRecursionDepth + 1;
|
|
24817
|
+
try {
|
|
24818
|
+
const end = length === undefined ? reader.len : reader.pos + length;
|
|
24819
|
+
const message = createBaseScoredSession();
|
|
24820
|
+
while (reader.pos < end) {
|
|
24821
|
+
const tag = reader.uint32();
|
|
24822
|
+
switch (tag >>> 3) {
|
|
24823
|
+
case 1: {
|
|
24824
|
+
if (tag !== 10) {
|
|
24825
|
+
break;
|
|
24826
|
+
}
|
|
24827
|
+
|
|
24828
|
+
message.sourceSystem = reader.string();
|
|
24829
|
+
continue;
|
|
24830
|
+
}
|
|
24831
|
+
case 2: {
|
|
24832
|
+
if (tag !== 18) {
|
|
24833
|
+
break;
|
|
24834
|
+
}
|
|
24835
|
+
|
|
24836
|
+
message.sessionId = reader.string();
|
|
24837
|
+
continue;
|
|
24838
|
+
}
|
|
24839
|
+
case 3: {
|
|
24840
|
+
if (tag !== 26) {
|
|
24841
|
+
break;
|
|
24842
|
+
}
|
|
24843
|
+
|
|
24844
|
+
message.lastActivityAt = fromTimestamp(Timestamp.decode(reader, reader.uint32()));
|
|
24845
|
+
continue;
|
|
24846
|
+
}
|
|
24847
|
+
case 4: {
|
|
24848
|
+
if (tag !== 34) {
|
|
24849
|
+
break;
|
|
24850
|
+
}
|
|
24851
|
+
|
|
24852
|
+
message.title = reader.string();
|
|
24853
|
+
continue;
|
|
24854
|
+
}
|
|
24855
|
+
case 5: {
|
|
24856
|
+
if (tag !== 42) {
|
|
24857
|
+
break;
|
|
24858
|
+
}
|
|
24859
|
+
|
|
24860
|
+
message.clients.push(reader.string());
|
|
24861
|
+
continue;
|
|
24862
|
+
}
|
|
24863
|
+
case 6: {
|
|
24864
|
+
if (tag !== 48) {
|
|
24865
|
+
break;
|
|
24866
|
+
}
|
|
24867
|
+
|
|
24868
|
+
message.sessionScore = reader.int32();
|
|
24869
|
+
continue;
|
|
24870
|
+
}
|
|
24871
|
+
case 7: {
|
|
24872
|
+
if (tag !== 56) {
|
|
24873
|
+
break;
|
|
24874
|
+
}
|
|
24875
|
+
|
|
24876
|
+
message.sessionScoreRubric = reader.int32() as any;
|
|
24877
|
+
continue;
|
|
24878
|
+
}
|
|
24879
|
+
}
|
|
24880
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
24881
|
+
break;
|
|
24882
|
+
}
|
|
24883
|
+
reader.skip(tag & 7);
|
|
24884
|
+
}
|
|
24885
|
+
return message;
|
|
24886
|
+
} finally {
|
|
24887
|
+
(reader as any).__tsProtoDecodeDepth = previousRecursionDepth;
|
|
24888
|
+
}
|
|
24889
|
+
},
|
|
24890
|
+
|
|
24891
|
+
fromJSON(object: any): ScoredSession {
|
|
24892
|
+
return {
|
|
24893
|
+
sourceSystem: isSet(object.sourceSystem)
|
|
24894
|
+
? globalThis.String(object.sourceSystem)
|
|
24895
|
+
: isSet(object.source_system)
|
|
24896
|
+
? globalThis.String(object.source_system)
|
|
24897
|
+
: "",
|
|
24898
|
+
sessionId: isSet(object.sessionId)
|
|
24899
|
+
? globalThis.String(object.sessionId)
|
|
24900
|
+
: isSet(object.session_id)
|
|
24901
|
+
? globalThis.String(object.session_id)
|
|
24902
|
+
: "",
|
|
24903
|
+
lastActivityAt: isSet(object.lastActivityAt)
|
|
24904
|
+
? fromJsonTimestamp(object.lastActivityAt)
|
|
24905
|
+
: isSet(object.last_activity_at)
|
|
24906
|
+
? fromJsonTimestamp(object.last_activity_at)
|
|
24907
|
+
: undefined,
|
|
24908
|
+
title: isSet(object.title) ? globalThis.String(object.title) : "",
|
|
24909
|
+
clients: globalThis.Array.isArray(object?.clients) ? object.clients.map((e: any) => globalThis.String(e)) : [],
|
|
24910
|
+
sessionScore: isSet(object.sessionScore)
|
|
24911
|
+
? globalThis.Number(object.sessionScore)
|
|
24912
|
+
: isSet(object.session_score)
|
|
24913
|
+
? globalThis.Number(object.session_score)
|
|
24914
|
+
: 0,
|
|
24915
|
+
sessionScoreRubric: isSet(object.sessionScoreRubric)
|
|
24916
|
+
? aISessionScoreRubricFromJSON(object.sessionScoreRubric)
|
|
24917
|
+
: isSet(object.session_score_rubric)
|
|
24918
|
+
? aISessionScoreRubricFromJSON(object.session_score_rubric)
|
|
24919
|
+
: 0,
|
|
24920
|
+
};
|
|
24921
|
+
},
|
|
24922
|
+
|
|
24923
|
+
toJSON(message: ScoredSession): unknown {
|
|
24924
|
+
const obj: any = {};
|
|
24925
|
+
if (message.sourceSystem !== "") {
|
|
24926
|
+
obj.sourceSystem = message.sourceSystem;
|
|
24927
|
+
}
|
|
24928
|
+
if (message.sessionId !== "") {
|
|
24929
|
+
obj.sessionId = message.sessionId;
|
|
24930
|
+
}
|
|
24931
|
+
if (message.lastActivityAt !== undefined) {
|
|
24932
|
+
obj.lastActivityAt = message.lastActivityAt.toISOString();
|
|
24933
|
+
}
|
|
24934
|
+
if (message.title !== "") {
|
|
24935
|
+
obj.title = message.title;
|
|
24936
|
+
}
|
|
24937
|
+
if (message.clients?.length) {
|
|
24938
|
+
obj.clients = message.clients;
|
|
24939
|
+
}
|
|
24940
|
+
if (message.sessionScore !== 0) {
|
|
24941
|
+
obj.sessionScore = Math.round(message.sessionScore);
|
|
24942
|
+
}
|
|
24943
|
+
if (message.sessionScoreRubric !== 0) {
|
|
24944
|
+
obj.sessionScoreRubric = aISessionScoreRubricToJSON(message.sessionScoreRubric);
|
|
24945
|
+
}
|
|
24946
|
+
return obj;
|
|
24947
|
+
},
|
|
24948
|
+
|
|
24949
|
+
create<I extends Exact<DeepPartial<ScoredSession>, I>>(base?: I): ScoredSession {
|
|
24950
|
+
return ScoredSession.fromPartial(base ?? ({} as any));
|
|
24951
|
+
},
|
|
24952
|
+
fromPartial<I extends Exact<DeepPartial<ScoredSession>, I>>(object: I): ScoredSession {
|
|
24953
|
+
const message = createBaseScoredSession();
|
|
24954
|
+
message.sourceSystem = object.sourceSystem ?? "";
|
|
24955
|
+
message.sessionId = object.sessionId ?? "";
|
|
24956
|
+
message.lastActivityAt = object.lastActivityAt ?? undefined;
|
|
24957
|
+
message.title = object.title ?? "";
|
|
24958
|
+
message.clients = object.clients?.map((e) => e) || [];
|
|
24959
|
+
message.sessionScore = object.sessionScore ?? 0;
|
|
24960
|
+
message.sessionScoreRubric = object.sessionScoreRubric ?? 0;
|
|
24961
|
+
return message;
|
|
24962
|
+
},
|
|
24963
|
+
};
|
|
24964
|
+
|
|
24203
24965
|
function createBaseGetSessionAnalysisRequest(): GetSessionAnalysisRequest {
|
|
24204
24966
|
return { organizationId: "", projectId: "", sourceSystem: "", sessionId: "" };
|
|
24205
24967
|
}
|
|
@@ -36099,6 +36861,15 @@ export interface AIGatewayService {
|
|
|
36099
36861
|
request: GetSessionTotalsTrendRequest,
|
|
36100
36862
|
metadata?: Metadata,
|
|
36101
36863
|
): Promise<GetSessionTotalsTrendResponse>;
|
|
36864
|
+
/**
|
|
36865
|
+
* The sessions ListSessions lists for the same principals, source systems and active_after, rolled up from what
|
|
36866
|
+
* the analysis jobs wrote: how many sessions, how many carry each work type, and the latest 20 that carry a score
|
|
36867
|
+
* with how many do. Mirrors ai.api.v1.
|
|
36868
|
+
*/
|
|
36869
|
+
GetSessionAnalysisOverview(
|
|
36870
|
+
request: GetSessionAnalysisOverviewRequest,
|
|
36871
|
+
metadata?: Metadata,
|
|
36872
|
+
): Promise<GetSessionAnalysisOverviewResponse>;
|
|
36102
36873
|
/**
|
|
36103
36874
|
* One session's latest score against the scorer's rubric, with each criterion's assessment and improvement, and
|
|
36104
36875
|
* its latest insights with their cause and action; each part absent until its job has run. Mirrors ai.api.v1.
|
|
@@ -36238,6 +37009,7 @@ export class AIGatewayServiceClientImpl implements AIGatewayService {
|
|
|
36238
37009
|
this.SetReasoningTrendContribution = this.SetReasoningTrendContribution.bind(this);
|
|
36239
37010
|
this.GetSessionUsageTrend = this.GetSessionUsageTrend.bind(this);
|
|
36240
37011
|
this.GetSessionTotalsTrend = this.GetSessionTotalsTrend.bind(this);
|
|
37012
|
+
this.GetSessionAnalysisOverview = this.GetSessionAnalysisOverview.bind(this);
|
|
36241
37013
|
this.GetSessionAnalysis = this.GetSessionAnalysis.bind(this);
|
|
36242
37014
|
this.ListSessionInsights = this.ListSessionInsights.bind(this);
|
|
36243
37015
|
this.GetSessionScoreTrend = this.GetSessionScoreTrend.bind(this);
|
|
@@ -36454,6 +37226,15 @@ export class AIGatewayServiceClientImpl implements AIGatewayService {
|
|
|
36454
37226
|
return promise.then((data) => GetSessionTotalsTrendResponse.decode(new BinaryReader(data)));
|
|
36455
37227
|
}
|
|
36456
37228
|
|
|
37229
|
+
GetSessionAnalysisOverview(
|
|
37230
|
+
request: GetSessionAnalysisOverviewRequest,
|
|
37231
|
+
metadata?: Metadata,
|
|
37232
|
+
): Promise<GetSessionAnalysisOverviewResponse> {
|
|
37233
|
+
const data = GetSessionAnalysisOverviewRequest.encode(request).finish();
|
|
37234
|
+
const promise = this.rpc.request(this.service, "GetSessionAnalysisOverview", data, metadata);
|
|
37235
|
+
return promise.then((data) => GetSessionAnalysisOverviewResponse.decode(new BinaryReader(data)));
|
|
37236
|
+
}
|
|
37237
|
+
|
|
36457
37238
|
GetSessionAnalysis(request: GetSessionAnalysisRequest, metadata?: Metadata): Promise<GetSessionAnalysisResponse> {
|
|
36458
37239
|
const data = GetSessionAnalysisRequest.encode(request).finish();
|
|
36459
37240
|
const promise = this.rpc.request(this.service, "GetSessionAnalysis", data, metadata);
|