@miradorlabs/web-grpc 2.42.0 → 2.48.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.
- package/google/protobuf/duration.ts +209 -0
- package/google/protobuf/timestamp.ts +1 -1
- package/package.json +1 -1
- package/proto/gateway/common/v1/attribute_value.ts +1 -1
- package/proto/gateway/common/v1/attribute_value_pb.js +7 -13
- package/proto/gateway/common/v1/status.ts +1 -1
- package/proto/gateway/common/v1/status_pb.js +3 -9
- package/proto/gateway/common/v1/types.ts +1 -1
- package/proto/gateway/common/v1/types_pb.js +3 -9
- package/proto/gateway/web/v1/account_gateway.ts +1 -1
- package/proto/gateway/web/v1/account_gateway_pb.js +178 -184
- package/proto/gateway/web/v1/ai_gateway.ts +3777 -133
- package/proto/gateway/web/v1/ai_gateway_grpc_pb.js +194 -2
- package/proto/gateway/web/v1/ai_gateway_pb.js +10059 -3223
- package/proto/gateway/web/v1/attribute_value.ts +1 -1
- package/proto/gateway/web/v1/attribute_value_pb.js +7 -13
- package/proto/gateway/web/v1/chain_gateway.ts +1 -1
- package/proto/gateway/web/v1/chain_gateway_pb.js +102 -108
- package/proto/gateway/web/v1/common.ts +1 -1
- package/proto/gateway/web/v1/common_pb.js +1 -7
- package/proto/gateway/web/v1/derived_metric_gateway.ts +1 -1
- package/proto/gateway/web/v1/derived_metric_gateway_pb.js +63 -64
- package/proto/gateway/web/v1/integration_gateway.ts +1 -1
- package/proto/gateway/web/v1/integration_gateway_pb.js +65 -66
- package/proto/gateway/web/v1/log_gateway.ts +1 -1
- package/proto/gateway/web/v1/log_gateway_pb.js +46 -42
- package/proto/gateway/web/v1/market_gateway.ts +1 -1
- package/proto/gateway/web/v1/market_gateway_pb.js +11 -17
- package/proto/gateway/web/v1/metric_gateway.ts +1 -1
- package/proto/gateway/web/v1/metric_gateway_pb.js +107 -103
- package/proto/gateway/web/v1/oauth_gateway.ts +1 -1
- package/proto/gateway/web/v1/oauth_gateway_pb.js +52 -58
- package/proto/gateway/web/v1/plan_gateway.ts +1 -1
- package/proto/gateway/web/v1/plan_gateway_pb.js +26 -32
- package/proto/gateway/web/v1/rule_gateway.ts +1 -1
- package/proto/gateway/web/v1/rule_gateway_pb.js +131 -137
- package/proto/gateway/web/v1/slo_gateway.ts +1 -1
- package/proto/gateway/web/v1/slo_gateway_pb.js +122 -123
- package/proto/gateway/web/v1/trace_gateway.ts +1 -1
- package/proto/gateway/web/v1/trace_gateway_pb.js +142 -114
- package/proto/gateway/web/v1/trace_measure_gateway.ts +1 -1
- package/proto/gateway/web/v1/trace_measure_gateway_pb.js +20 -24
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
// Code generated by protoc-gen-ts_proto. DO NOT EDIT.
|
|
2
2
|
// versions:
|
|
3
|
-
// protoc-gen-ts_proto v2.12.
|
|
3
|
+
// protoc-gen-ts_proto v2.12.3
|
|
4
4
|
// protoc v3.21.12
|
|
5
5
|
// source: proto/gateway/web/v1/ai_gateway.proto
|
|
6
6
|
|
|
@@ -9,8 +9,17 @@ import { BinaryReader, BinaryWriter } from "@bufbuild/protobuf/wire";
|
|
|
9
9
|
import type { Metadata } from "@grpc/grpc-js";
|
|
10
10
|
import { Observable } from "rxjs";
|
|
11
11
|
import { map } from "rxjs/operators";
|
|
12
|
+
import { Duration } from "../../../../google/protobuf/duration";
|
|
12
13
|
import { Timestamp } from "../../../../google/protobuf/timestamp";
|
|
13
14
|
import { ResponseStatus } from "../../common/v1/status";
|
|
15
|
+
import {
|
|
16
|
+
AnalyticsTimeInterval,
|
|
17
|
+
analyticsTimeIntervalFromJSON,
|
|
18
|
+
analyticsTimeIntervalToJSON,
|
|
19
|
+
AnalyticsTimeWindow,
|
|
20
|
+
analyticsTimeWindowFromJSON,
|
|
21
|
+
analyticsTimeWindowToJSON,
|
|
22
|
+
} from "./trace_gateway";
|
|
14
23
|
|
|
15
24
|
export const protobufPackage = "gateway.web.v1";
|
|
16
25
|
|
|
@@ -254,14 +263,273 @@ export function aIGitOutcomeToJSON(object: AIGitOutcome): string {
|
|
|
254
263
|
}
|
|
255
264
|
}
|
|
256
265
|
|
|
266
|
+
export enum AIGitActivityDimension {
|
|
267
|
+
AI_GIT_ACTIVITY_DIMENSION_UNSPECIFIED = 0,
|
|
268
|
+
AI_GIT_ACTIVITY_DIMENSION_SOURCE_SYSTEM = 1,
|
|
269
|
+
AI_GIT_ACTIVITY_DIMENSION_REPOSITORY = 2,
|
|
270
|
+
AI_GIT_ACTIVITY_DIMENSION_ACTION = 3,
|
|
271
|
+
AI_GIT_ACTIVITY_DIMENSION_OUTCOME = 4,
|
|
272
|
+
AI_GIT_ACTIVITY_DIMENSION_SESSION = 5,
|
|
273
|
+
UNRECOGNIZED = -1,
|
|
274
|
+
}
|
|
275
|
+
|
|
276
|
+
export function aIGitActivityDimensionFromJSON(object: any): AIGitActivityDimension {
|
|
277
|
+
switch (object) {
|
|
278
|
+
case 0:
|
|
279
|
+
case "AI_GIT_ACTIVITY_DIMENSION_UNSPECIFIED":
|
|
280
|
+
return AIGitActivityDimension.AI_GIT_ACTIVITY_DIMENSION_UNSPECIFIED;
|
|
281
|
+
case 1:
|
|
282
|
+
case "AI_GIT_ACTIVITY_DIMENSION_SOURCE_SYSTEM":
|
|
283
|
+
return AIGitActivityDimension.AI_GIT_ACTIVITY_DIMENSION_SOURCE_SYSTEM;
|
|
284
|
+
case 2:
|
|
285
|
+
case "AI_GIT_ACTIVITY_DIMENSION_REPOSITORY":
|
|
286
|
+
return AIGitActivityDimension.AI_GIT_ACTIVITY_DIMENSION_REPOSITORY;
|
|
287
|
+
case 3:
|
|
288
|
+
case "AI_GIT_ACTIVITY_DIMENSION_ACTION":
|
|
289
|
+
return AIGitActivityDimension.AI_GIT_ACTIVITY_DIMENSION_ACTION;
|
|
290
|
+
case 4:
|
|
291
|
+
case "AI_GIT_ACTIVITY_DIMENSION_OUTCOME":
|
|
292
|
+
return AIGitActivityDimension.AI_GIT_ACTIVITY_DIMENSION_OUTCOME;
|
|
293
|
+
case 5:
|
|
294
|
+
case "AI_GIT_ACTIVITY_DIMENSION_SESSION":
|
|
295
|
+
return AIGitActivityDimension.AI_GIT_ACTIVITY_DIMENSION_SESSION;
|
|
296
|
+
case -1:
|
|
297
|
+
case "UNRECOGNIZED":
|
|
298
|
+
default:
|
|
299
|
+
return AIGitActivityDimension.UNRECOGNIZED;
|
|
300
|
+
}
|
|
301
|
+
}
|
|
302
|
+
|
|
303
|
+
export function aIGitActivityDimensionToJSON(object: AIGitActivityDimension): string {
|
|
304
|
+
switch (object) {
|
|
305
|
+
case AIGitActivityDimension.AI_GIT_ACTIVITY_DIMENSION_UNSPECIFIED:
|
|
306
|
+
return "AI_GIT_ACTIVITY_DIMENSION_UNSPECIFIED";
|
|
307
|
+
case AIGitActivityDimension.AI_GIT_ACTIVITY_DIMENSION_SOURCE_SYSTEM:
|
|
308
|
+
return "AI_GIT_ACTIVITY_DIMENSION_SOURCE_SYSTEM";
|
|
309
|
+
case AIGitActivityDimension.AI_GIT_ACTIVITY_DIMENSION_REPOSITORY:
|
|
310
|
+
return "AI_GIT_ACTIVITY_DIMENSION_REPOSITORY";
|
|
311
|
+
case AIGitActivityDimension.AI_GIT_ACTIVITY_DIMENSION_ACTION:
|
|
312
|
+
return "AI_GIT_ACTIVITY_DIMENSION_ACTION";
|
|
313
|
+
case AIGitActivityDimension.AI_GIT_ACTIVITY_DIMENSION_OUTCOME:
|
|
314
|
+
return "AI_GIT_ACTIVITY_DIMENSION_OUTCOME";
|
|
315
|
+
case AIGitActivityDimension.AI_GIT_ACTIVITY_DIMENSION_SESSION:
|
|
316
|
+
return "AI_GIT_ACTIVITY_DIMENSION_SESSION";
|
|
317
|
+
case AIGitActivityDimension.UNRECOGNIZED:
|
|
318
|
+
default:
|
|
319
|
+
return "UNRECOGNIZED";
|
|
320
|
+
}
|
|
321
|
+
}
|
|
322
|
+
|
|
323
|
+
export enum AIFileLifecycle {
|
|
324
|
+
AI_FILE_LIFECYCLE_UNSPECIFIED = 0,
|
|
325
|
+
AI_FILE_LIFECYCLE_UNLANDED = 1,
|
|
326
|
+
AI_FILE_LIFECYCLE_CHANGED_SINCE_COMMIT = 2,
|
|
327
|
+
AI_FILE_LIFECYCLE_COMMITTED_NOT_PUSHED = 3,
|
|
328
|
+
AI_FILE_LIFECYCLE_PUSHED = 4,
|
|
329
|
+
AI_FILE_LIFECYCLE_DISCARDED = 5,
|
|
330
|
+
UNRECOGNIZED = -1,
|
|
331
|
+
}
|
|
332
|
+
|
|
333
|
+
export function aIFileLifecycleFromJSON(object: any): AIFileLifecycle {
|
|
334
|
+
switch (object) {
|
|
335
|
+
case 0:
|
|
336
|
+
case "AI_FILE_LIFECYCLE_UNSPECIFIED":
|
|
337
|
+
return AIFileLifecycle.AI_FILE_LIFECYCLE_UNSPECIFIED;
|
|
338
|
+
case 1:
|
|
339
|
+
case "AI_FILE_LIFECYCLE_UNLANDED":
|
|
340
|
+
return AIFileLifecycle.AI_FILE_LIFECYCLE_UNLANDED;
|
|
341
|
+
case 2:
|
|
342
|
+
case "AI_FILE_LIFECYCLE_CHANGED_SINCE_COMMIT":
|
|
343
|
+
return AIFileLifecycle.AI_FILE_LIFECYCLE_CHANGED_SINCE_COMMIT;
|
|
344
|
+
case 3:
|
|
345
|
+
case "AI_FILE_LIFECYCLE_COMMITTED_NOT_PUSHED":
|
|
346
|
+
return AIFileLifecycle.AI_FILE_LIFECYCLE_COMMITTED_NOT_PUSHED;
|
|
347
|
+
case 4:
|
|
348
|
+
case "AI_FILE_LIFECYCLE_PUSHED":
|
|
349
|
+
return AIFileLifecycle.AI_FILE_LIFECYCLE_PUSHED;
|
|
350
|
+
case 5:
|
|
351
|
+
case "AI_FILE_LIFECYCLE_DISCARDED":
|
|
352
|
+
return AIFileLifecycle.AI_FILE_LIFECYCLE_DISCARDED;
|
|
353
|
+
case -1:
|
|
354
|
+
case "UNRECOGNIZED":
|
|
355
|
+
default:
|
|
356
|
+
return AIFileLifecycle.UNRECOGNIZED;
|
|
357
|
+
}
|
|
358
|
+
}
|
|
359
|
+
|
|
360
|
+
export function aIFileLifecycleToJSON(object: AIFileLifecycle): string {
|
|
361
|
+
switch (object) {
|
|
362
|
+
case AIFileLifecycle.AI_FILE_LIFECYCLE_UNSPECIFIED:
|
|
363
|
+
return "AI_FILE_LIFECYCLE_UNSPECIFIED";
|
|
364
|
+
case AIFileLifecycle.AI_FILE_LIFECYCLE_UNLANDED:
|
|
365
|
+
return "AI_FILE_LIFECYCLE_UNLANDED";
|
|
366
|
+
case AIFileLifecycle.AI_FILE_LIFECYCLE_CHANGED_SINCE_COMMIT:
|
|
367
|
+
return "AI_FILE_LIFECYCLE_CHANGED_SINCE_COMMIT";
|
|
368
|
+
case AIFileLifecycle.AI_FILE_LIFECYCLE_COMMITTED_NOT_PUSHED:
|
|
369
|
+
return "AI_FILE_LIFECYCLE_COMMITTED_NOT_PUSHED";
|
|
370
|
+
case AIFileLifecycle.AI_FILE_LIFECYCLE_PUSHED:
|
|
371
|
+
return "AI_FILE_LIFECYCLE_PUSHED";
|
|
372
|
+
case AIFileLifecycle.AI_FILE_LIFECYCLE_DISCARDED:
|
|
373
|
+
return "AI_FILE_LIFECYCLE_DISCARDED";
|
|
374
|
+
case AIFileLifecycle.UNRECOGNIZED:
|
|
375
|
+
default:
|
|
376
|
+
return "UNRECOGNIZED";
|
|
377
|
+
}
|
|
378
|
+
}
|
|
379
|
+
|
|
380
|
+
export enum AIFileTier {
|
|
381
|
+
AI_FILE_TIER_UNSPECIFIED = 0,
|
|
382
|
+
AI_FILE_TIER_ACTIVE = 1,
|
|
383
|
+
AI_FILE_TIER_OPEN = 2,
|
|
384
|
+
AI_FILE_TIER_STALE = 3,
|
|
385
|
+
AI_FILE_TIER_ABANDONED_HORIZON = 4,
|
|
386
|
+
UNRECOGNIZED = -1,
|
|
387
|
+
}
|
|
388
|
+
|
|
389
|
+
export function aIFileTierFromJSON(object: any): AIFileTier {
|
|
390
|
+
switch (object) {
|
|
391
|
+
case 0:
|
|
392
|
+
case "AI_FILE_TIER_UNSPECIFIED":
|
|
393
|
+
return AIFileTier.AI_FILE_TIER_UNSPECIFIED;
|
|
394
|
+
case 1:
|
|
395
|
+
case "AI_FILE_TIER_ACTIVE":
|
|
396
|
+
return AIFileTier.AI_FILE_TIER_ACTIVE;
|
|
397
|
+
case 2:
|
|
398
|
+
case "AI_FILE_TIER_OPEN":
|
|
399
|
+
return AIFileTier.AI_FILE_TIER_OPEN;
|
|
400
|
+
case 3:
|
|
401
|
+
case "AI_FILE_TIER_STALE":
|
|
402
|
+
return AIFileTier.AI_FILE_TIER_STALE;
|
|
403
|
+
case 4:
|
|
404
|
+
case "AI_FILE_TIER_ABANDONED_HORIZON":
|
|
405
|
+
return AIFileTier.AI_FILE_TIER_ABANDONED_HORIZON;
|
|
406
|
+
case -1:
|
|
407
|
+
case "UNRECOGNIZED":
|
|
408
|
+
default:
|
|
409
|
+
return AIFileTier.UNRECOGNIZED;
|
|
410
|
+
}
|
|
411
|
+
}
|
|
412
|
+
|
|
413
|
+
export function aIFileTierToJSON(object: AIFileTier): string {
|
|
414
|
+
switch (object) {
|
|
415
|
+
case AIFileTier.AI_FILE_TIER_UNSPECIFIED:
|
|
416
|
+
return "AI_FILE_TIER_UNSPECIFIED";
|
|
417
|
+
case AIFileTier.AI_FILE_TIER_ACTIVE:
|
|
418
|
+
return "AI_FILE_TIER_ACTIVE";
|
|
419
|
+
case AIFileTier.AI_FILE_TIER_OPEN:
|
|
420
|
+
return "AI_FILE_TIER_OPEN";
|
|
421
|
+
case AIFileTier.AI_FILE_TIER_STALE:
|
|
422
|
+
return "AI_FILE_TIER_STALE";
|
|
423
|
+
case AIFileTier.AI_FILE_TIER_ABANDONED_HORIZON:
|
|
424
|
+
return "AI_FILE_TIER_ABANDONED_HORIZON";
|
|
425
|
+
case AIFileTier.UNRECOGNIZED:
|
|
426
|
+
default:
|
|
427
|
+
return "UNRECOGNIZED";
|
|
428
|
+
}
|
|
429
|
+
}
|
|
430
|
+
|
|
431
|
+
export enum AIFileConfidence {
|
|
432
|
+
AI_FILE_CONFIDENCE_UNSPECIFIED = 0,
|
|
433
|
+
AI_FILE_CONFIDENCE_OBSERVED = 1,
|
|
434
|
+
AI_FILE_CONFIDENCE_INFERRED = 2,
|
|
435
|
+
UNRECOGNIZED = -1,
|
|
436
|
+
}
|
|
437
|
+
|
|
438
|
+
export function aIFileConfidenceFromJSON(object: any): AIFileConfidence {
|
|
439
|
+
switch (object) {
|
|
440
|
+
case 0:
|
|
441
|
+
case "AI_FILE_CONFIDENCE_UNSPECIFIED":
|
|
442
|
+
return AIFileConfidence.AI_FILE_CONFIDENCE_UNSPECIFIED;
|
|
443
|
+
case 1:
|
|
444
|
+
case "AI_FILE_CONFIDENCE_OBSERVED":
|
|
445
|
+
return AIFileConfidence.AI_FILE_CONFIDENCE_OBSERVED;
|
|
446
|
+
case 2:
|
|
447
|
+
case "AI_FILE_CONFIDENCE_INFERRED":
|
|
448
|
+
return AIFileConfidence.AI_FILE_CONFIDENCE_INFERRED;
|
|
449
|
+
case -1:
|
|
450
|
+
case "UNRECOGNIZED":
|
|
451
|
+
default:
|
|
452
|
+
return AIFileConfidence.UNRECOGNIZED;
|
|
453
|
+
}
|
|
454
|
+
}
|
|
455
|
+
|
|
456
|
+
export function aIFileConfidenceToJSON(object: AIFileConfidence): string {
|
|
457
|
+
switch (object) {
|
|
458
|
+
case AIFileConfidence.AI_FILE_CONFIDENCE_UNSPECIFIED:
|
|
459
|
+
return "AI_FILE_CONFIDENCE_UNSPECIFIED";
|
|
460
|
+
case AIFileConfidence.AI_FILE_CONFIDENCE_OBSERVED:
|
|
461
|
+
return "AI_FILE_CONFIDENCE_OBSERVED";
|
|
462
|
+
case AIFileConfidence.AI_FILE_CONFIDENCE_INFERRED:
|
|
463
|
+
return "AI_FILE_CONFIDENCE_INFERRED";
|
|
464
|
+
case AIFileConfidence.UNRECOGNIZED:
|
|
465
|
+
default:
|
|
466
|
+
return "UNRECOGNIZED";
|
|
467
|
+
}
|
|
468
|
+
}
|
|
469
|
+
|
|
470
|
+
export enum AIFileStateGroupBy {
|
|
471
|
+
AI_FILE_STATE_GROUP_BY_UNSPECIFIED = 0,
|
|
472
|
+
AI_FILE_STATE_GROUP_BY_REPOSITORY = 1,
|
|
473
|
+
AI_FILE_STATE_GROUP_BY_REF = 2,
|
|
474
|
+
AI_FILE_STATE_GROUP_BY_SESSION = 3,
|
|
475
|
+
UNRECOGNIZED = -1,
|
|
476
|
+
}
|
|
477
|
+
|
|
478
|
+
export function aIFileStateGroupByFromJSON(object: any): AIFileStateGroupBy {
|
|
479
|
+
switch (object) {
|
|
480
|
+
case 0:
|
|
481
|
+
case "AI_FILE_STATE_GROUP_BY_UNSPECIFIED":
|
|
482
|
+
return AIFileStateGroupBy.AI_FILE_STATE_GROUP_BY_UNSPECIFIED;
|
|
483
|
+
case 1:
|
|
484
|
+
case "AI_FILE_STATE_GROUP_BY_REPOSITORY":
|
|
485
|
+
return AIFileStateGroupBy.AI_FILE_STATE_GROUP_BY_REPOSITORY;
|
|
486
|
+
case 2:
|
|
487
|
+
case "AI_FILE_STATE_GROUP_BY_REF":
|
|
488
|
+
return AIFileStateGroupBy.AI_FILE_STATE_GROUP_BY_REF;
|
|
489
|
+
case 3:
|
|
490
|
+
case "AI_FILE_STATE_GROUP_BY_SESSION":
|
|
491
|
+
return AIFileStateGroupBy.AI_FILE_STATE_GROUP_BY_SESSION;
|
|
492
|
+
case -1:
|
|
493
|
+
case "UNRECOGNIZED":
|
|
494
|
+
default:
|
|
495
|
+
return AIFileStateGroupBy.UNRECOGNIZED;
|
|
496
|
+
}
|
|
497
|
+
}
|
|
498
|
+
|
|
499
|
+
export function aIFileStateGroupByToJSON(object: AIFileStateGroupBy): string {
|
|
500
|
+
switch (object) {
|
|
501
|
+
case AIFileStateGroupBy.AI_FILE_STATE_GROUP_BY_UNSPECIFIED:
|
|
502
|
+
return "AI_FILE_STATE_GROUP_BY_UNSPECIFIED";
|
|
503
|
+
case AIFileStateGroupBy.AI_FILE_STATE_GROUP_BY_REPOSITORY:
|
|
504
|
+
return "AI_FILE_STATE_GROUP_BY_REPOSITORY";
|
|
505
|
+
case AIFileStateGroupBy.AI_FILE_STATE_GROUP_BY_REF:
|
|
506
|
+
return "AI_FILE_STATE_GROUP_BY_REF";
|
|
507
|
+
case AIFileStateGroupBy.AI_FILE_STATE_GROUP_BY_SESSION:
|
|
508
|
+
return "AI_FILE_STATE_GROUP_BY_SESSION";
|
|
509
|
+
case AIFileStateGroupBy.UNRECOGNIZED:
|
|
510
|
+
default:
|
|
511
|
+
return "UNRECOGNIZED";
|
|
512
|
+
}
|
|
513
|
+
}
|
|
514
|
+
|
|
257
515
|
export interface ListSessionsRequest {
|
|
258
516
|
organizationId: string;
|
|
259
517
|
projectId: string;
|
|
518
|
+
/**
|
|
519
|
+
* Structured filter, built directly by the frontend (AIP-160 is a REST
|
|
520
|
+
* api-gateway concern and never reaches this proto).
|
|
521
|
+
*/
|
|
260
522
|
filter: AISessionFilter | undefined;
|
|
261
523
|
pageSize: number;
|
|
262
524
|
pageToken: string;
|
|
263
525
|
}
|
|
264
526
|
|
|
527
|
+
/**
|
|
528
|
+
* AISessionFilter selects sessions. Non-empty fields are ANDed; within a repeated
|
|
529
|
+
* field the values are ORed (any-of). id fields match by equality; model is
|
|
530
|
+
* membership. started_after/started_before are a half-open window over the
|
|
531
|
+
* session start time.
|
|
532
|
+
*/
|
|
265
533
|
export interface AISessionFilter {
|
|
266
534
|
sourceSystem: string[];
|
|
267
535
|
userId: string[];
|
|
@@ -302,6 +570,34 @@ export interface AISession {
|
|
|
302
570
|
gitOrgs: string[];
|
|
303
571
|
repositories: string[];
|
|
304
572
|
filesTouched: number;
|
|
573
|
+
/** Content-derived rollup version; stale-frame guard for StreamSessions clients. */
|
|
574
|
+
sessionVersion: number;
|
|
575
|
+
/**
|
|
576
|
+
* Ingest-time creation (frozen) / latest ingest time — gateway wall-clock, not
|
|
577
|
+
* provider event time.
|
|
578
|
+
*/
|
|
579
|
+
createdAt: Date | undefined;
|
|
580
|
+
updatedAt: Date | undefined;
|
|
581
|
+
}
|
|
582
|
+
|
|
583
|
+
export interface StreamSessionsRequest {
|
|
584
|
+
organizationId: string;
|
|
585
|
+
projectId: string;
|
|
586
|
+
/** Same structured filter as ListSessions (started_after/before live inside it). */
|
|
587
|
+
filter: AISessionFilter | undefined;
|
|
588
|
+
}
|
|
589
|
+
|
|
590
|
+
/**
|
|
591
|
+
* SessionFrame mirrors telemetry.api.v1.SessionFrame: an UPSERT of one session
|
|
592
|
+
* (keyed by routing_key + source_system) or a nonterminal
|
|
593
|
+
* SessionsSnapshotCompleted. Streams carry no ResponseStatus.
|
|
594
|
+
*/
|
|
595
|
+
export interface SessionFrame {
|
|
596
|
+
upsert?: AISession | undefined;
|
|
597
|
+
snapshotCompleted?: SessionsSnapshotCompleted | undefined;
|
|
598
|
+
}
|
|
599
|
+
|
|
600
|
+
export interface SessionsSnapshotCompleted {
|
|
305
601
|
}
|
|
306
602
|
|
|
307
603
|
export interface ListSessionEventsRequest {
|
|
@@ -358,6 +654,7 @@ export interface AIContentPart {
|
|
|
358
654
|
export interface ListPrincipalsRequest {
|
|
359
655
|
organizationId: string;
|
|
360
656
|
projectId: string;
|
|
657
|
+
/** Structured filter (both optional, ANDed): kind and source_system, exact match. */
|
|
361
658
|
kind?: AIPrincipalKind | undefined;
|
|
362
659
|
sourceSystem: string;
|
|
363
660
|
pageSize: number;
|
|
@@ -368,6 +665,8 @@ export interface ListPrincipalsResponse {
|
|
|
368
665
|
status: ResponseStatus | undefined;
|
|
369
666
|
principals: AIPrincipal[];
|
|
370
667
|
nextPageToken: string;
|
|
668
|
+
/** Exact total for the filter, computed on the first page only. */
|
|
669
|
+
totalCount?: number | undefined;
|
|
371
670
|
}
|
|
372
671
|
|
|
373
672
|
export interface AIPrincipal {
|
|
@@ -392,23 +691,37 @@ export interface UpdatePrincipalResponse {
|
|
|
392
691
|
principal: AIPrincipal | undefined;
|
|
393
692
|
}
|
|
394
693
|
|
|
694
|
+
/**
|
|
695
|
+
* AIGitActivityFilter mirrors telemetry.api.v1.AIGitActivityFilter. session_id is
|
|
696
|
+
* the durable session identity from AISession.session_id; fields AND, repeated
|
|
697
|
+
* values OR (any-of); empty = unconstrained. event_time bounds are REQUIRED when
|
|
698
|
+
* session_id is empty.
|
|
699
|
+
*/
|
|
700
|
+
export interface AIGitActivityFilter {
|
|
701
|
+
sessionId: string[];
|
|
702
|
+
sourceSystem: string[];
|
|
703
|
+
eventTimeAfter?: Date | undefined;
|
|
704
|
+
eventTimeBefore?: Date | undefined;
|
|
705
|
+
}
|
|
706
|
+
|
|
395
707
|
export interface ListGitActivitiesRequest {
|
|
396
708
|
organizationId: string;
|
|
397
709
|
projectId: string;
|
|
398
|
-
|
|
399
|
-
|
|
710
|
+
filter: AIGitActivityFilter | undefined;
|
|
711
|
+
pageSize: number;
|
|
712
|
+
pageToken: string;
|
|
400
713
|
}
|
|
401
714
|
|
|
402
715
|
export interface ListGitActivitiesResponse {
|
|
403
716
|
status: ResponseStatus | undefined;
|
|
404
717
|
activities: AIGitActivity[];
|
|
718
|
+
nextPageToken: string;
|
|
405
719
|
}
|
|
406
720
|
|
|
407
721
|
export interface StreamGitActivitiesRequest {
|
|
408
722
|
organizationId: string;
|
|
409
723
|
projectId: string;
|
|
410
|
-
|
|
411
|
-
sourceSystem: string;
|
|
724
|
+
filter: AIGitActivityFilter | undefined;
|
|
412
725
|
}
|
|
413
726
|
|
|
414
727
|
/**
|
|
@@ -458,12 +771,164 @@ export interface AIGitActivity {
|
|
|
458
771
|
activityId: string;
|
|
459
772
|
}
|
|
460
773
|
|
|
774
|
+
export interface GitActivitySummaryRequest {
|
|
775
|
+
organizationId: string;
|
|
776
|
+
projectId: string;
|
|
777
|
+
/**
|
|
778
|
+
* filter's session_id / source_system apply; its event-time bounds are ignored
|
|
779
|
+
* (time_window is the range).
|
|
780
|
+
*/
|
|
781
|
+
filter:
|
|
782
|
+
| AIGitActivityFilter
|
|
783
|
+
| undefined;
|
|
784
|
+
/** the range; UNSPECIFIED is rejected */
|
|
785
|
+
timeWindow: AnalyticsTimeWindow;
|
|
786
|
+
/** bucket width */
|
|
787
|
+
timeInterval: AnalyticsTimeInterval;
|
|
788
|
+
groupBy: AIGitActivityDimension;
|
|
789
|
+
}
|
|
790
|
+
|
|
791
|
+
export interface GetGitActivitySummaryResponse {
|
|
792
|
+
status: ResponseStatus | undefined;
|
|
793
|
+
summary: GitActivitySummary | undefined;
|
|
794
|
+
}
|
|
795
|
+
|
|
796
|
+
/**
|
|
797
|
+
* GitActivitySummary is the windowed, dimension-sliced trend series plus the
|
|
798
|
+
* whole-window totals. Unary carries it inside GetGitActivitySummaryResponse; each
|
|
799
|
+
* stream frame is a complete re-derived snapshot (streams carry no ResponseStatus).
|
|
800
|
+
*/
|
|
801
|
+
export interface GitActivitySummary {
|
|
802
|
+
buckets: GitActivitySummaryBucket[];
|
|
803
|
+
totals: GitActivityMeasures | undefined;
|
|
804
|
+
windowStart: Date | undefined;
|
|
805
|
+
windowEnd: Date | undefined;
|
|
806
|
+
groupBy: AIGitActivityDimension;
|
|
807
|
+
}
|
|
808
|
+
|
|
809
|
+
export interface GitActivitySummaryBucket {
|
|
810
|
+
bucketStart: Date | undefined;
|
|
811
|
+
groups: GitActivitySummaryGroup[];
|
|
812
|
+
}
|
|
813
|
+
|
|
814
|
+
export interface GitActivitySummaryGroup {
|
|
815
|
+
/** group_by value; empty when group_by is UNSPECIFIED */
|
|
816
|
+
key: string;
|
|
817
|
+
measures: GitActivityMeasures | undefined;
|
|
818
|
+
}
|
|
819
|
+
|
|
820
|
+
export interface GitActivityMeasures {
|
|
821
|
+
total: number;
|
|
822
|
+
branchesCreated: number;
|
|
823
|
+
commits: number;
|
|
824
|
+
pushes: number;
|
|
825
|
+
pullRequestsCreated: number;
|
|
826
|
+
pullRequestsMerged: number;
|
|
827
|
+
filesChanged: number;
|
|
828
|
+
insertions: number;
|
|
829
|
+
deletions: number;
|
|
830
|
+
distinctRepositories: number;
|
|
831
|
+
distinctSessions: number;
|
|
832
|
+
}
|
|
833
|
+
|
|
834
|
+
export interface AIFileStateFilter {
|
|
835
|
+
repositoryKey: string[];
|
|
836
|
+
ref: string[];
|
|
837
|
+
state: AIFileLifecycle[];
|
|
838
|
+
tier: AIFileTier[];
|
|
839
|
+
sessionId: string[];
|
|
840
|
+
minAge?: Duration | undefined;
|
|
841
|
+
activeAfter?: Date | undefined;
|
|
842
|
+
activeBefore?: Date | undefined;
|
|
843
|
+
abandonedHorizon?: Duration | undefined;
|
|
844
|
+
}
|
|
845
|
+
|
|
846
|
+
export interface ListFileStatesRequest {
|
|
847
|
+
organizationId: string;
|
|
848
|
+
projectId: string;
|
|
849
|
+
filter: AIFileStateFilter | undefined;
|
|
850
|
+
pageSize: number;
|
|
851
|
+
pageToken: string;
|
|
852
|
+
}
|
|
853
|
+
|
|
854
|
+
export interface ListFileStatesResponse {
|
|
855
|
+
status: ResponseStatus | undefined;
|
|
856
|
+
files: AIFileStateRow[];
|
|
857
|
+
nextPageToken: string;
|
|
858
|
+
}
|
|
859
|
+
|
|
860
|
+
export interface AIFileStateRow {
|
|
861
|
+
repositoryKey: string;
|
|
862
|
+
ref: string;
|
|
863
|
+
path: string;
|
|
864
|
+
oldPath: string;
|
|
865
|
+
state: AIFileLifecycle;
|
|
866
|
+
tier: AIFileTier;
|
|
867
|
+
confidence: AIFileConfidence;
|
|
868
|
+
firstEditedAt: Date | undefined;
|
|
869
|
+
lastEditedAt: Date | undefined;
|
|
870
|
+
lastStagedAt: Date | undefined;
|
|
871
|
+
lastCommittedAt: Date | undefined;
|
|
872
|
+
lastCommitSha: string;
|
|
873
|
+
lastPushedAt: Date | undefined;
|
|
874
|
+
discardedAt: Date | undefined;
|
|
875
|
+
discardReason: string;
|
|
876
|
+
editCount: number;
|
|
877
|
+
sessionId: string[];
|
|
878
|
+
unlandedCostUsd: number;
|
|
879
|
+
unlandedOutputTokens: number;
|
|
880
|
+
}
|
|
881
|
+
|
|
882
|
+
export interface FileStateSummaryRequest {
|
|
883
|
+
organizationId: string;
|
|
884
|
+
projectId: string;
|
|
885
|
+
filter: AIFileStateFilter | undefined;
|
|
886
|
+
abandonedHorizon?: Duration | undefined;
|
|
887
|
+
groupBy: AIFileStateGroupBy;
|
|
888
|
+
}
|
|
889
|
+
|
|
890
|
+
export interface GetFileStateSummaryResponse {
|
|
891
|
+
status: ResponseStatus | undefined;
|
|
892
|
+
summary: FileStateSummary | undefined;
|
|
893
|
+
}
|
|
894
|
+
|
|
895
|
+
export interface FileStateSummary {
|
|
896
|
+
totals: FileStateTiers | undefined;
|
|
897
|
+
groups: FileStateGroup[];
|
|
898
|
+
asOf: Date | undefined;
|
|
899
|
+
groupBy: AIFileStateGroupBy;
|
|
900
|
+
}
|
|
901
|
+
|
|
902
|
+
export interface FileStateTiers {
|
|
903
|
+
active: FileStateTierBucket | undefined;
|
|
904
|
+
open: FileStateTierBucket | undefined;
|
|
905
|
+
stale: FileStateTierBucket | undefined;
|
|
906
|
+
abandonedHorizon: FileStateTierBucket | undefined;
|
|
907
|
+
discarded: FileStateTierBucket | undefined;
|
|
908
|
+
}
|
|
909
|
+
|
|
910
|
+
export interface FileStateTierBucket {
|
|
911
|
+
files: number;
|
|
912
|
+
branches: number;
|
|
913
|
+
sessions: number;
|
|
914
|
+
costUsd: number;
|
|
915
|
+
costUsdUnverified: number;
|
|
916
|
+
outputTokens: number;
|
|
917
|
+
oldestAge: Duration | undefined;
|
|
918
|
+
filesUnverified: number;
|
|
919
|
+
}
|
|
920
|
+
|
|
921
|
+
export interface FileStateGroup {
|
|
922
|
+
key: string;
|
|
923
|
+
tiers: FileStateTiers | undefined;
|
|
924
|
+
}
|
|
925
|
+
|
|
461
926
|
export interface AITokenUsage {
|
|
462
927
|
inputTokens: number;
|
|
463
928
|
outputTokens: number;
|
|
464
929
|
cacheReadTokens: number;
|
|
465
930
|
cacheWriteTokens: number;
|
|
466
|
-
|
|
931
|
+
providerCostUsd: number;
|
|
467
932
|
}
|
|
468
933
|
|
|
469
934
|
function createBaseListSessionsRequest(): ListSessionsRequest {
|
|
@@ -940,6 +1405,9 @@ function createBaseAISession(): AISession {
|
|
|
940
1405
|
gitOrgs: [],
|
|
941
1406
|
repositories: [],
|
|
942
1407
|
filesTouched: 0,
|
|
1408
|
+
sessionVersion: 0,
|
|
1409
|
+
createdAt: undefined,
|
|
1410
|
+
updatedAt: undefined,
|
|
943
1411
|
};
|
|
944
1412
|
}
|
|
945
1413
|
|
|
@@ -1014,6 +1482,15 @@ export const AISession: MessageFns<AISession> = {
|
|
|
1014
1482
|
if (message.filesTouched !== 0) {
|
|
1015
1483
|
writer.uint32(184).uint64(message.filesTouched);
|
|
1016
1484
|
}
|
|
1485
|
+
if (message.sessionVersion !== 0) {
|
|
1486
|
+
writer.uint32(192).uint64(message.sessionVersion);
|
|
1487
|
+
}
|
|
1488
|
+
if (message.createdAt !== undefined) {
|
|
1489
|
+
Timestamp.encode(toTimestamp(message.createdAt), writer.uint32(202).fork()).join();
|
|
1490
|
+
}
|
|
1491
|
+
if (message.updatedAt !== undefined) {
|
|
1492
|
+
Timestamp.encode(toTimestamp(message.updatedAt), writer.uint32(210).fork()).join();
|
|
1493
|
+
}
|
|
1017
1494
|
return writer;
|
|
1018
1495
|
},
|
|
1019
1496
|
|
|
@@ -1214,6 +1691,30 @@ export const AISession: MessageFns<AISession> = {
|
|
|
1214
1691
|
message.filesTouched = longToNumber(reader.uint64());
|
|
1215
1692
|
continue;
|
|
1216
1693
|
}
|
|
1694
|
+
case 24: {
|
|
1695
|
+
if (tag !== 192) {
|
|
1696
|
+
break;
|
|
1697
|
+
}
|
|
1698
|
+
|
|
1699
|
+
message.sessionVersion = longToNumber(reader.uint64());
|
|
1700
|
+
continue;
|
|
1701
|
+
}
|
|
1702
|
+
case 25: {
|
|
1703
|
+
if (tag !== 202) {
|
|
1704
|
+
break;
|
|
1705
|
+
}
|
|
1706
|
+
|
|
1707
|
+
message.createdAt = fromTimestamp(Timestamp.decode(reader, reader.uint32()));
|
|
1708
|
+
continue;
|
|
1709
|
+
}
|
|
1710
|
+
case 26: {
|
|
1711
|
+
if (tag !== 210) {
|
|
1712
|
+
break;
|
|
1713
|
+
}
|
|
1714
|
+
|
|
1715
|
+
message.updatedAt = fromTimestamp(Timestamp.decode(reader, reader.uint32()));
|
|
1716
|
+
continue;
|
|
1717
|
+
}
|
|
1217
1718
|
}
|
|
1218
1719
|
if ((tag & 7) === 4 || tag === 0) {
|
|
1219
1720
|
break;
|
|
@@ -1325,6 +1826,21 @@ export const AISession: MessageFns<AISession> = {
|
|
|
1325
1826
|
: isSet(object.files_touched)
|
|
1326
1827
|
? globalThis.Number(object.files_touched)
|
|
1327
1828
|
: 0,
|
|
1829
|
+
sessionVersion: isSet(object.sessionVersion)
|
|
1830
|
+
? globalThis.Number(object.sessionVersion)
|
|
1831
|
+
: isSet(object.session_version)
|
|
1832
|
+
? globalThis.Number(object.session_version)
|
|
1833
|
+
: 0,
|
|
1834
|
+
createdAt: isSet(object.createdAt)
|
|
1835
|
+
? fromJsonTimestamp(object.createdAt)
|
|
1836
|
+
: isSet(object.created_at)
|
|
1837
|
+
? fromJsonTimestamp(object.created_at)
|
|
1838
|
+
: undefined,
|
|
1839
|
+
updatedAt: isSet(object.updatedAt)
|
|
1840
|
+
? fromJsonTimestamp(object.updatedAt)
|
|
1841
|
+
: isSet(object.updated_at)
|
|
1842
|
+
? fromJsonTimestamp(object.updated_at)
|
|
1843
|
+
: undefined,
|
|
1328
1844
|
};
|
|
1329
1845
|
},
|
|
1330
1846
|
|
|
@@ -1399,6 +1915,15 @@ export const AISession: MessageFns<AISession> = {
|
|
|
1399
1915
|
if (message.filesTouched !== 0) {
|
|
1400
1916
|
obj.filesTouched = Math.round(message.filesTouched);
|
|
1401
1917
|
}
|
|
1918
|
+
if (message.sessionVersion !== 0) {
|
|
1919
|
+
obj.sessionVersion = Math.round(message.sessionVersion);
|
|
1920
|
+
}
|
|
1921
|
+
if (message.createdAt !== undefined) {
|
|
1922
|
+
obj.createdAt = message.createdAt.toISOString();
|
|
1923
|
+
}
|
|
1924
|
+
if (message.updatedAt !== undefined) {
|
|
1925
|
+
obj.updatedAt = message.updatedAt.toISOString();
|
|
1926
|
+
}
|
|
1402
1927
|
return obj;
|
|
1403
1928
|
},
|
|
1404
1929
|
|
|
@@ -1432,32 +1957,32 @@ export const AISession: MessageFns<AISession> = {
|
|
|
1432
1957
|
message.gitOrgs = object.gitOrgs?.map((e) => e) || [];
|
|
1433
1958
|
message.repositories = object.repositories?.map((e) => e) || [];
|
|
1434
1959
|
message.filesTouched = object.filesTouched ?? 0;
|
|
1960
|
+
message.sessionVersion = object.sessionVersion ?? 0;
|
|
1961
|
+
message.createdAt = object.createdAt ?? undefined;
|
|
1962
|
+
message.updatedAt = object.updatedAt ?? undefined;
|
|
1435
1963
|
return message;
|
|
1436
1964
|
},
|
|
1437
1965
|
};
|
|
1438
1966
|
|
|
1439
|
-
function
|
|
1440
|
-
return { organizationId: "", projectId: "",
|
|
1967
|
+
function createBaseStreamSessionsRequest(): StreamSessionsRequest {
|
|
1968
|
+
return { organizationId: "", projectId: "", filter: undefined };
|
|
1441
1969
|
}
|
|
1442
1970
|
|
|
1443
|
-
export const
|
|
1444
|
-
encode(message:
|
|
1971
|
+
export const StreamSessionsRequest: MessageFns<StreamSessionsRequest> = {
|
|
1972
|
+
encode(message: StreamSessionsRequest, writer: BinaryWriter = new BinaryWriter()): BinaryWriter {
|
|
1445
1973
|
if (message.organizationId !== "") {
|
|
1446
1974
|
writer.uint32(10).string(message.organizationId);
|
|
1447
1975
|
}
|
|
1448
1976
|
if (message.projectId !== "") {
|
|
1449
1977
|
writer.uint32(18).string(message.projectId);
|
|
1450
1978
|
}
|
|
1451
|
-
if (message.
|
|
1452
|
-
writer.uint32(26).
|
|
1453
|
-
}
|
|
1454
|
-
if (message.sourceSystem !== "") {
|
|
1455
|
-
writer.uint32(34).string(message.sourceSystem);
|
|
1979
|
+
if (message.filter !== undefined) {
|
|
1980
|
+
AISessionFilter.encode(message.filter, writer.uint32(26).fork()).join();
|
|
1456
1981
|
}
|
|
1457
1982
|
return writer;
|
|
1458
1983
|
},
|
|
1459
1984
|
|
|
1460
|
-
decode(input: BinaryReader | Uint8Array, length?: number):
|
|
1985
|
+
decode(input: BinaryReader | Uint8Array, length?: number): StreamSessionsRequest {
|
|
1461
1986
|
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
|
|
1462
1987
|
const previousRecursionDepth = (reader as any).__tsProtoDecodeDepth ?? 0;
|
|
1463
1988
|
if (previousRecursionDepth >= 100) {
|
|
@@ -1466,7 +1991,7 @@ export const ListSessionEventsRequest: MessageFns<ListSessionEventsRequest> = {
|
|
|
1466
1991
|
(reader as any).__tsProtoDecodeDepth = previousRecursionDepth + 1;
|
|
1467
1992
|
try {
|
|
1468
1993
|
const end = length === undefined ? reader.len : reader.pos + length;
|
|
1469
|
-
const message =
|
|
1994
|
+
const message = createBaseStreamSessionsRequest();
|
|
1470
1995
|
while (reader.pos < end) {
|
|
1471
1996
|
const tag = reader.uint32();
|
|
1472
1997
|
switch (tag >>> 3) {
|
|
@@ -1491,15 +2016,7 @@ export const ListSessionEventsRequest: MessageFns<ListSessionEventsRequest> = {
|
|
|
1491
2016
|
break;
|
|
1492
2017
|
}
|
|
1493
2018
|
|
|
1494
|
-
message.
|
|
1495
|
-
continue;
|
|
1496
|
-
}
|
|
1497
|
-
case 4: {
|
|
1498
|
-
if (tag !== 34) {
|
|
1499
|
-
break;
|
|
1500
|
-
}
|
|
1501
|
-
|
|
1502
|
-
message.sourceSystem = reader.string();
|
|
2019
|
+
message.filter = AISessionFilter.decode(reader, reader.uint32());
|
|
1503
2020
|
continue;
|
|
1504
2021
|
}
|
|
1505
2022
|
}
|
|
@@ -1514,7 +2031,7 @@ export const ListSessionEventsRequest: MessageFns<ListSessionEventsRequest> = {
|
|
|
1514
2031
|
}
|
|
1515
2032
|
},
|
|
1516
2033
|
|
|
1517
|
-
fromJSON(object: any):
|
|
2034
|
+
fromJSON(object: any): StreamSessionsRequest {
|
|
1518
2035
|
return {
|
|
1519
2036
|
organizationId: isSet(object.organizationId)
|
|
1520
2037
|
? globalThis.String(object.organizationId)
|
|
@@ -1526,20 +2043,287 @@ export const ListSessionEventsRequest: MessageFns<ListSessionEventsRequest> = {
|
|
|
1526
2043
|
: isSet(object.project_id)
|
|
1527
2044
|
? globalThis.String(object.project_id)
|
|
1528
2045
|
: "",
|
|
1529
|
-
|
|
1530
|
-
? globalThis.String(object.routingKey)
|
|
1531
|
-
: isSet(object.routing_key)
|
|
1532
|
-
? globalThis.String(object.routing_key)
|
|
1533
|
-
: "",
|
|
1534
|
-
sourceSystem: isSet(object.sourceSystem)
|
|
1535
|
-
? globalThis.String(object.sourceSystem)
|
|
1536
|
-
: isSet(object.source_system)
|
|
1537
|
-
? globalThis.String(object.source_system)
|
|
1538
|
-
: "",
|
|
2046
|
+
filter: isSet(object.filter) ? AISessionFilter.fromJSON(object.filter) : undefined,
|
|
1539
2047
|
};
|
|
1540
2048
|
},
|
|
1541
2049
|
|
|
1542
|
-
toJSON(message:
|
|
2050
|
+
toJSON(message: StreamSessionsRequest): unknown {
|
|
2051
|
+
const obj: any = {};
|
|
2052
|
+
if (message.organizationId !== "") {
|
|
2053
|
+
obj.organizationId = message.organizationId;
|
|
2054
|
+
}
|
|
2055
|
+
if (message.projectId !== "") {
|
|
2056
|
+
obj.projectId = message.projectId;
|
|
2057
|
+
}
|
|
2058
|
+
if (message.filter !== undefined) {
|
|
2059
|
+
obj.filter = AISessionFilter.toJSON(message.filter);
|
|
2060
|
+
}
|
|
2061
|
+
return obj;
|
|
2062
|
+
},
|
|
2063
|
+
|
|
2064
|
+
create<I extends Exact<DeepPartial<StreamSessionsRequest>, I>>(base?: I): StreamSessionsRequest {
|
|
2065
|
+
return StreamSessionsRequest.fromPartial(base ?? ({} as any));
|
|
2066
|
+
},
|
|
2067
|
+
fromPartial<I extends Exact<DeepPartial<StreamSessionsRequest>, I>>(object: I): StreamSessionsRequest {
|
|
2068
|
+
const message = createBaseStreamSessionsRequest();
|
|
2069
|
+
message.organizationId = object.organizationId ?? "";
|
|
2070
|
+
message.projectId = object.projectId ?? "";
|
|
2071
|
+
message.filter = (object.filter !== undefined && object.filter !== null)
|
|
2072
|
+
? AISessionFilter.fromPartial(object.filter)
|
|
2073
|
+
: undefined;
|
|
2074
|
+
return message;
|
|
2075
|
+
},
|
|
2076
|
+
};
|
|
2077
|
+
|
|
2078
|
+
function createBaseSessionFrame(): SessionFrame {
|
|
2079
|
+
return { upsert: undefined, snapshotCompleted: undefined };
|
|
2080
|
+
}
|
|
2081
|
+
|
|
2082
|
+
export const SessionFrame: MessageFns<SessionFrame> = {
|
|
2083
|
+
encode(message: SessionFrame, writer: BinaryWriter = new BinaryWriter()): BinaryWriter {
|
|
2084
|
+
if (message.upsert !== undefined) {
|
|
2085
|
+
AISession.encode(message.upsert, writer.uint32(10).fork()).join();
|
|
2086
|
+
}
|
|
2087
|
+
if (message.snapshotCompleted !== undefined) {
|
|
2088
|
+
SessionsSnapshotCompleted.encode(message.snapshotCompleted, writer.uint32(18).fork()).join();
|
|
2089
|
+
}
|
|
2090
|
+
return writer;
|
|
2091
|
+
},
|
|
2092
|
+
|
|
2093
|
+
decode(input: BinaryReader | Uint8Array, length?: number): SessionFrame {
|
|
2094
|
+
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
|
|
2095
|
+
const previousRecursionDepth = (reader as any).__tsProtoDecodeDepth ?? 0;
|
|
2096
|
+
if (previousRecursionDepth >= 100) {
|
|
2097
|
+
throw new globalThis.Error("protobuf decode recursion limit exceeded");
|
|
2098
|
+
}
|
|
2099
|
+
(reader as any).__tsProtoDecodeDepth = previousRecursionDepth + 1;
|
|
2100
|
+
try {
|
|
2101
|
+
const end = length === undefined ? reader.len : reader.pos + length;
|
|
2102
|
+
const message = createBaseSessionFrame();
|
|
2103
|
+
while (reader.pos < end) {
|
|
2104
|
+
const tag = reader.uint32();
|
|
2105
|
+
switch (tag >>> 3) {
|
|
2106
|
+
case 1: {
|
|
2107
|
+
if (tag !== 10) {
|
|
2108
|
+
break;
|
|
2109
|
+
}
|
|
2110
|
+
|
|
2111
|
+
message.upsert = AISession.decode(reader, reader.uint32());
|
|
2112
|
+
continue;
|
|
2113
|
+
}
|
|
2114
|
+
case 2: {
|
|
2115
|
+
if (tag !== 18) {
|
|
2116
|
+
break;
|
|
2117
|
+
}
|
|
2118
|
+
|
|
2119
|
+
message.snapshotCompleted = SessionsSnapshotCompleted.decode(reader, reader.uint32());
|
|
2120
|
+
continue;
|
|
2121
|
+
}
|
|
2122
|
+
}
|
|
2123
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
2124
|
+
break;
|
|
2125
|
+
}
|
|
2126
|
+
reader.skip(tag & 7);
|
|
2127
|
+
}
|
|
2128
|
+
return message;
|
|
2129
|
+
} finally {
|
|
2130
|
+
(reader as any).__tsProtoDecodeDepth = previousRecursionDepth;
|
|
2131
|
+
}
|
|
2132
|
+
},
|
|
2133
|
+
|
|
2134
|
+
fromJSON(object: any): SessionFrame {
|
|
2135
|
+
return {
|
|
2136
|
+
upsert: isSet(object.upsert) ? AISession.fromJSON(object.upsert) : undefined,
|
|
2137
|
+
snapshotCompleted: isSet(object.snapshotCompleted)
|
|
2138
|
+
? SessionsSnapshotCompleted.fromJSON(object.snapshotCompleted)
|
|
2139
|
+
: isSet(object.snapshot_completed)
|
|
2140
|
+
? SessionsSnapshotCompleted.fromJSON(object.snapshot_completed)
|
|
2141
|
+
: undefined,
|
|
2142
|
+
};
|
|
2143
|
+
},
|
|
2144
|
+
|
|
2145
|
+
toJSON(message: SessionFrame): unknown {
|
|
2146
|
+
const obj: any = {};
|
|
2147
|
+
if (message.upsert !== undefined) {
|
|
2148
|
+
obj.upsert = AISession.toJSON(message.upsert);
|
|
2149
|
+
}
|
|
2150
|
+
if (message.snapshotCompleted !== undefined) {
|
|
2151
|
+
obj.snapshotCompleted = SessionsSnapshotCompleted.toJSON(message.snapshotCompleted);
|
|
2152
|
+
}
|
|
2153
|
+
return obj;
|
|
2154
|
+
},
|
|
2155
|
+
|
|
2156
|
+
create<I extends Exact<DeepPartial<SessionFrame>, I>>(base?: I): SessionFrame {
|
|
2157
|
+
return SessionFrame.fromPartial(base ?? ({} as any));
|
|
2158
|
+
},
|
|
2159
|
+
fromPartial<I extends Exact<DeepPartial<SessionFrame>, I>>(object: I): SessionFrame {
|
|
2160
|
+
const message = createBaseSessionFrame();
|
|
2161
|
+
message.upsert = (object.upsert !== undefined && object.upsert !== null)
|
|
2162
|
+
? AISession.fromPartial(object.upsert)
|
|
2163
|
+
: undefined;
|
|
2164
|
+
message.snapshotCompleted = (object.snapshotCompleted !== undefined && object.snapshotCompleted !== null)
|
|
2165
|
+
? SessionsSnapshotCompleted.fromPartial(object.snapshotCompleted)
|
|
2166
|
+
: undefined;
|
|
2167
|
+
return message;
|
|
2168
|
+
},
|
|
2169
|
+
};
|
|
2170
|
+
|
|
2171
|
+
function createBaseSessionsSnapshotCompleted(): SessionsSnapshotCompleted {
|
|
2172
|
+
return {};
|
|
2173
|
+
}
|
|
2174
|
+
|
|
2175
|
+
export const SessionsSnapshotCompleted: MessageFns<SessionsSnapshotCompleted> = {
|
|
2176
|
+
encode(_: SessionsSnapshotCompleted, writer: BinaryWriter = new BinaryWriter()): BinaryWriter {
|
|
2177
|
+
return writer;
|
|
2178
|
+
},
|
|
2179
|
+
|
|
2180
|
+
decode(input: BinaryReader | Uint8Array, length?: number): SessionsSnapshotCompleted {
|
|
2181
|
+
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
|
|
2182
|
+
const previousRecursionDepth = (reader as any).__tsProtoDecodeDepth ?? 0;
|
|
2183
|
+
if (previousRecursionDepth >= 100) {
|
|
2184
|
+
throw new globalThis.Error("protobuf decode recursion limit exceeded");
|
|
2185
|
+
}
|
|
2186
|
+
(reader as any).__tsProtoDecodeDepth = previousRecursionDepth + 1;
|
|
2187
|
+
try {
|
|
2188
|
+
const end = length === undefined ? reader.len : reader.pos + length;
|
|
2189
|
+
const message = createBaseSessionsSnapshotCompleted();
|
|
2190
|
+
while (reader.pos < end) {
|
|
2191
|
+
const tag = reader.uint32();
|
|
2192
|
+
switch (tag >>> 3) {
|
|
2193
|
+
}
|
|
2194
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
2195
|
+
break;
|
|
2196
|
+
}
|
|
2197
|
+
reader.skip(tag & 7);
|
|
2198
|
+
}
|
|
2199
|
+
return message;
|
|
2200
|
+
} finally {
|
|
2201
|
+
(reader as any).__tsProtoDecodeDepth = previousRecursionDepth;
|
|
2202
|
+
}
|
|
2203
|
+
},
|
|
2204
|
+
|
|
2205
|
+
fromJSON(_: any): SessionsSnapshotCompleted {
|
|
2206
|
+
return {};
|
|
2207
|
+
},
|
|
2208
|
+
|
|
2209
|
+
toJSON(_: SessionsSnapshotCompleted): unknown {
|
|
2210
|
+
const obj: any = {};
|
|
2211
|
+
return obj;
|
|
2212
|
+
},
|
|
2213
|
+
|
|
2214
|
+
create<I extends Exact<DeepPartial<SessionsSnapshotCompleted>, I>>(base?: I): SessionsSnapshotCompleted {
|
|
2215
|
+
return SessionsSnapshotCompleted.fromPartial(base ?? ({} as any));
|
|
2216
|
+
},
|
|
2217
|
+
fromPartial<I extends Exact<DeepPartial<SessionsSnapshotCompleted>, I>>(_: I): SessionsSnapshotCompleted {
|
|
2218
|
+
const message = createBaseSessionsSnapshotCompleted();
|
|
2219
|
+
return message;
|
|
2220
|
+
},
|
|
2221
|
+
};
|
|
2222
|
+
|
|
2223
|
+
function createBaseListSessionEventsRequest(): ListSessionEventsRequest {
|
|
2224
|
+
return { organizationId: "", projectId: "", routingKey: "", sourceSystem: "" };
|
|
2225
|
+
}
|
|
2226
|
+
|
|
2227
|
+
export const ListSessionEventsRequest: MessageFns<ListSessionEventsRequest> = {
|
|
2228
|
+
encode(message: ListSessionEventsRequest, writer: BinaryWriter = new BinaryWriter()): BinaryWriter {
|
|
2229
|
+
if (message.organizationId !== "") {
|
|
2230
|
+
writer.uint32(10).string(message.organizationId);
|
|
2231
|
+
}
|
|
2232
|
+
if (message.projectId !== "") {
|
|
2233
|
+
writer.uint32(18).string(message.projectId);
|
|
2234
|
+
}
|
|
2235
|
+
if (message.routingKey !== "") {
|
|
2236
|
+
writer.uint32(26).string(message.routingKey);
|
|
2237
|
+
}
|
|
2238
|
+
if (message.sourceSystem !== "") {
|
|
2239
|
+
writer.uint32(34).string(message.sourceSystem);
|
|
2240
|
+
}
|
|
2241
|
+
return writer;
|
|
2242
|
+
},
|
|
2243
|
+
|
|
2244
|
+
decode(input: BinaryReader | Uint8Array, length?: number): ListSessionEventsRequest {
|
|
2245
|
+
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
|
|
2246
|
+
const previousRecursionDepth = (reader as any).__tsProtoDecodeDepth ?? 0;
|
|
2247
|
+
if (previousRecursionDepth >= 100) {
|
|
2248
|
+
throw new globalThis.Error("protobuf decode recursion limit exceeded");
|
|
2249
|
+
}
|
|
2250
|
+
(reader as any).__tsProtoDecodeDepth = previousRecursionDepth + 1;
|
|
2251
|
+
try {
|
|
2252
|
+
const end = length === undefined ? reader.len : reader.pos + length;
|
|
2253
|
+
const message = createBaseListSessionEventsRequest();
|
|
2254
|
+
while (reader.pos < end) {
|
|
2255
|
+
const tag = reader.uint32();
|
|
2256
|
+
switch (tag >>> 3) {
|
|
2257
|
+
case 1: {
|
|
2258
|
+
if (tag !== 10) {
|
|
2259
|
+
break;
|
|
2260
|
+
}
|
|
2261
|
+
|
|
2262
|
+
message.organizationId = reader.string();
|
|
2263
|
+
continue;
|
|
2264
|
+
}
|
|
2265
|
+
case 2: {
|
|
2266
|
+
if (tag !== 18) {
|
|
2267
|
+
break;
|
|
2268
|
+
}
|
|
2269
|
+
|
|
2270
|
+
message.projectId = reader.string();
|
|
2271
|
+
continue;
|
|
2272
|
+
}
|
|
2273
|
+
case 3: {
|
|
2274
|
+
if (tag !== 26) {
|
|
2275
|
+
break;
|
|
2276
|
+
}
|
|
2277
|
+
|
|
2278
|
+
message.routingKey = reader.string();
|
|
2279
|
+
continue;
|
|
2280
|
+
}
|
|
2281
|
+
case 4: {
|
|
2282
|
+
if (tag !== 34) {
|
|
2283
|
+
break;
|
|
2284
|
+
}
|
|
2285
|
+
|
|
2286
|
+
message.sourceSystem = reader.string();
|
|
2287
|
+
continue;
|
|
2288
|
+
}
|
|
2289
|
+
}
|
|
2290
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
2291
|
+
break;
|
|
2292
|
+
}
|
|
2293
|
+
reader.skip(tag & 7);
|
|
2294
|
+
}
|
|
2295
|
+
return message;
|
|
2296
|
+
} finally {
|
|
2297
|
+
(reader as any).__tsProtoDecodeDepth = previousRecursionDepth;
|
|
2298
|
+
}
|
|
2299
|
+
},
|
|
2300
|
+
|
|
2301
|
+
fromJSON(object: any): ListSessionEventsRequest {
|
|
2302
|
+
return {
|
|
2303
|
+
organizationId: isSet(object.organizationId)
|
|
2304
|
+
? globalThis.String(object.organizationId)
|
|
2305
|
+
: isSet(object.organization_id)
|
|
2306
|
+
? globalThis.String(object.organization_id)
|
|
2307
|
+
: "",
|
|
2308
|
+
projectId: isSet(object.projectId)
|
|
2309
|
+
? globalThis.String(object.projectId)
|
|
2310
|
+
: isSet(object.project_id)
|
|
2311
|
+
? globalThis.String(object.project_id)
|
|
2312
|
+
: "",
|
|
2313
|
+
routingKey: isSet(object.routingKey)
|
|
2314
|
+
? globalThis.String(object.routingKey)
|
|
2315
|
+
: isSet(object.routing_key)
|
|
2316
|
+
? globalThis.String(object.routing_key)
|
|
2317
|
+
: "",
|
|
2318
|
+
sourceSystem: isSet(object.sourceSystem)
|
|
2319
|
+
? globalThis.String(object.sourceSystem)
|
|
2320
|
+
: isSet(object.source_system)
|
|
2321
|
+
? globalThis.String(object.source_system)
|
|
2322
|
+
: "",
|
|
2323
|
+
};
|
|
2324
|
+
},
|
|
2325
|
+
|
|
2326
|
+
toJSON(message: ListSessionEventsRequest): unknown {
|
|
1543
2327
|
const obj: any = {};
|
|
1544
2328
|
if (message.organizationId !== "") {
|
|
1545
2329
|
obj.organizationId = message.organizationId;
|
|
@@ -2554,7 +3338,7 @@ export const ListPrincipalsRequest: MessageFns<ListPrincipalsRequest> = {
|
|
|
2554
3338
|
};
|
|
2555
3339
|
|
|
2556
3340
|
function createBaseListPrincipalsResponse(): ListPrincipalsResponse {
|
|
2557
|
-
return { status: undefined, principals: [], nextPageToken: "" };
|
|
3341
|
+
return { status: undefined, principals: [], nextPageToken: "", totalCount: undefined };
|
|
2558
3342
|
}
|
|
2559
3343
|
|
|
2560
3344
|
export const ListPrincipalsResponse: MessageFns<ListPrincipalsResponse> = {
|
|
@@ -2568,6 +3352,9 @@ export const ListPrincipalsResponse: MessageFns<ListPrincipalsResponse> = {
|
|
|
2568
3352
|
if (message.nextPageToken !== "") {
|
|
2569
3353
|
writer.uint32(26).string(message.nextPageToken);
|
|
2570
3354
|
}
|
|
3355
|
+
if (message.totalCount !== undefined) {
|
|
3356
|
+
writer.uint32(32).int64(message.totalCount);
|
|
3357
|
+
}
|
|
2571
3358
|
return writer;
|
|
2572
3359
|
},
|
|
2573
3360
|
|
|
@@ -2608,6 +3395,14 @@ export const ListPrincipalsResponse: MessageFns<ListPrincipalsResponse> = {
|
|
|
2608
3395
|
message.nextPageToken = reader.string();
|
|
2609
3396
|
continue;
|
|
2610
3397
|
}
|
|
3398
|
+
case 4: {
|
|
3399
|
+
if (tag !== 32) {
|
|
3400
|
+
break;
|
|
3401
|
+
}
|
|
3402
|
+
|
|
3403
|
+
message.totalCount = longToNumber(reader.int64());
|
|
3404
|
+
continue;
|
|
3405
|
+
}
|
|
2611
3406
|
}
|
|
2612
3407
|
if ((tag & 7) === 4 || tag === 0) {
|
|
2613
3408
|
break;
|
|
@@ -2631,6 +3426,11 @@ export const ListPrincipalsResponse: MessageFns<ListPrincipalsResponse> = {
|
|
|
2631
3426
|
: isSet(object.next_page_token)
|
|
2632
3427
|
? globalThis.String(object.next_page_token)
|
|
2633
3428
|
: "",
|
|
3429
|
+
totalCount: isSet(object.totalCount)
|
|
3430
|
+
? globalThis.Number(object.totalCount)
|
|
3431
|
+
: isSet(object.total_count)
|
|
3432
|
+
? globalThis.Number(object.total_count)
|
|
3433
|
+
: undefined,
|
|
2634
3434
|
};
|
|
2635
3435
|
},
|
|
2636
3436
|
|
|
@@ -2645,7 +3445,10 @@ export const ListPrincipalsResponse: MessageFns<ListPrincipalsResponse> = {
|
|
|
2645
3445
|
if (message.nextPageToken !== "") {
|
|
2646
3446
|
obj.nextPageToken = message.nextPageToken;
|
|
2647
3447
|
}
|
|
2648
|
-
|
|
3448
|
+
if (message.totalCount !== undefined) {
|
|
3449
|
+
obj.totalCount = Math.round(message.totalCount);
|
|
3450
|
+
}
|
|
3451
|
+
return obj;
|
|
2649
3452
|
},
|
|
2650
3453
|
|
|
2651
3454
|
create<I extends Exact<DeepPartial<ListPrincipalsResponse>, I>>(base?: I): ListPrincipalsResponse {
|
|
@@ -2658,6 +3461,7 @@ export const ListPrincipalsResponse: MessageFns<ListPrincipalsResponse> = {
|
|
|
2658
3461
|
: undefined;
|
|
2659
3462
|
message.principals = object.principals?.map((e) => AIPrincipal.fromPartial(e)) || [];
|
|
2660
3463
|
message.nextPageToken = object.nextPageToken ?? "";
|
|
3464
|
+
message.totalCount = object.totalCount ?? undefined;
|
|
2661
3465
|
return message;
|
|
2662
3466
|
},
|
|
2663
3467
|
};
|
|
@@ -3049,8 +3853,141 @@ export const UpdatePrincipalResponse: MessageFns<UpdatePrincipalResponse> = {
|
|
|
3049
3853
|
},
|
|
3050
3854
|
};
|
|
3051
3855
|
|
|
3856
|
+
function createBaseAIGitActivityFilter(): AIGitActivityFilter {
|
|
3857
|
+
return { sessionId: [], sourceSystem: [], eventTimeAfter: undefined, eventTimeBefore: undefined };
|
|
3858
|
+
}
|
|
3859
|
+
|
|
3860
|
+
export const AIGitActivityFilter: MessageFns<AIGitActivityFilter> = {
|
|
3861
|
+
encode(message: AIGitActivityFilter, writer: BinaryWriter = new BinaryWriter()): BinaryWriter {
|
|
3862
|
+
for (const v of message.sessionId) {
|
|
3863
|
+
writer.uint32(10).string(v!);
|
|
3864
|
+
}
|
|
3865
|
+
for (const v of message.sourceSystem) {
|
|
3866
|
+
writer.uint32(18).string(v!);
|
|
3867
|
+
}
|
|
3868
|
+
if (message.eventTimeAfter !== undefined) {
|
|
3869
|
+
Timestamp.encode(toTimestamp(message.eventTimeAfter), writer.uint32(26).fork()).join();
|
|
3870
|
+
}
|
|
3871
|
+
if (message.eventTimeBefore !== undefined) {
|
|
3872
|
+
Timestamp.encode(toTimestamp(message.eventTimeBefore), writer.uint32(34).fork()).join();
|
|
3873
|
+
}
|
|
3874
|
+
return writer;
|
|
3875
|
+
},
|
|
3876
|
+
|
|
3877
|
+
decode(input: BinaryReader | Uint8Array, length?: number): AIGitActivityFilter {
|
|
3878
|
+
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
|
|
3879
|
+
const previousRecursionDepth = (reader as any).__tsProtoDecodeDepth ?? 0;
|
|
3880
|
+
if (previousRecursionDepth >= 100) {
|
|
3881
|
+
throw new globalThis.Error("protobuf decode recursion limit exceeded");
|
|
3882
|
+
}
|
|
3883
|
+
(reader as any).__tsProtoDecodeDepth = previousRecursionDepth + 1;
|
|
3884
|
+
try {
|
|
3885
|
+
const end = length === undefined ? reader.len : reader.pos + length;
|
|
3886
|
+
const message = createBaseAIGitActivityFilter();
|
|
3887
|
+
while (reader.pos < end) {
|
|
3888
|
+
const tag = reader.uint32();
|
|
3889
|
+
switch (tag >>> 3) {
|
|
3890
|
+
case 1: {
|
|
3891
|
+
if (tag !== 10) {
|
|
3892
|
+
break;
|
|
3893
|
+
}
|
|
3894
|
+
|
|
3895
|
+
message.sessionId.push(reader.string());
|
|
3896
|
+
continue;
|
|
3897
|
+
}
|
|
3898
|
+
case 2: {
|
|
3899
|
+
if (tag !== 18) {
|
|
3900
|
+
break;
|
|
3901
|
+
}
|
|
3902
|
+
|
|
3903
|
+
message.sourceSystem.push(reader.string());
|
|
3904
|
+
continue;
|
|
3905
|
+
}
|
|
3906
|
+
case 3: {
|
|
3907
|
+
if (tag !== 26) {
|
|
3908
|
+
break;
|
|
3909
|
+
}
|
|
3910
|
+
|
|
3911
|
+
message.eventTimeAfter = fromTimestamp(Timestamp.decode(reader, reader.uint32()));
|
|
3912
|
+
continue;
|
|
3913
|
+
}
|
|
3914
|
+
case 4: {
|
|
3915
|
+
if (tag !== 34) {
|
|
3916
|
+
break;
|
|
3917
|
+
}
|
|
3918
|
+
|
|
3919
|
+
message.eventTimeBefore = fromTimestamp(Timestamp.decode(reader, reader.uint32()));
|
|
3920
|
+
continue;
|
|
3921
|
+
}
|
|
3922
|
+
}
|
|
3923
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
3924
|
+
break;
|
|
3925
|
+
}
|
|
3926
|
+
reader.skip(tag & 7);
|
|
3927
|
+
}
|
|
3928
|
+
return message;
|
|
3929
|
+
} finally {
|
|
3930
|
+
(reader as any).__tsProtoDecodeDepth = previousRecursionDepth;
|
|
3931
|
+
}
|
|
3932
|
+
},
|
|
3933
|
+
|
|
3934
|
+
fromJSON(object: any): AIGitActivityFilter {
|
|
3935
|
+
return {
|
|
3936
|
+
sessionId: globalThis.Array.isArray(object?.sessionId)
|
|
3937
|
+
? object.sessionId.map((e: any) => globalThis.String(e))
|
|
3938
|
+
: globalThis.Array.isArray(object?.session_id)
|
|
3939
|
+
? object.session_id.map((e: any) => globalThis.String(e))
|
|
3940
|
+
: [],
|
|
3941
|
+
sourceSystem: globalThis.Array.isArray(object?.sourceSystem)
|
|
3942
|
+
? object.sourceSystem.map((e: any) => globalThis.String(e))
|
|
3943
|
+
: globalThis.Array.isArray(object?.source_system)
|
|
3944
|
+
? object.source_system.map((e: any) => globalThis.String(e))
|
|
3945
|
+
: [],
|
|
3946
|
+
eventTimeAfter: isSet(object.eventTimeAfter)
|
|
3947
|
+
? fromJsonTimestamp(object.eventTimeAfter)
|
|
3948
|
+
: isSet(object.event_time_after)
|
|
3949
|
+
? fromJsonTimestamp(object.event_time_after)
|
|
3950
|
+
: undefined,
|
|
3951
|
+
eventTimeBefore: isSet(object.eventTimeBefore)
|
|
3952
|
+
? fromJsonTimestamp(object.eventTimeBefore)
|
|
3953
|
+
: isSet(object.event_time_before)
|
|
3954
|
+
? fromJsonTimestamp(object.event_time_before)
|
|
3955
|
+
: undefined,
|
|
3956
|
+
};
|
|
3957
|
+
},
|
|
3958
|
+
|
|
3959
|
+
toJSON(message: AIGitActivityFilter): unknown {
|
|
3960
|
+
const obj: any = {};
|
|
3961
|
+
if (message.sessionId?.length) {
|
|
3962
|
+
obj.sessionId = message.sessionId;
|
|
3963
|
+
}
|
|
3964
|
+
if (message.sourceSystem?.length) {
|
|
3965
|
+
obj.sourceSystem = message.sourceSystem;
|
|
3966
|
+
}
|
|
3967
|
+
if (message.eventTimeAfter !== undefined) {
|
|
3968
|
+
obj.eventTimeAfter = message.eventTimeAfter.toISOString();
|
|
3969
|
+
}
|
|
3970
|
+
if (message.eventTimeBefore !== undefined) {
|
|
3971
|
+
obj.eventTimeBefore = message.eventTimeBefore.toISOString();
|
|
3972
|
+
}
|
|
3973
|
+
return obj;
|
|
3974
|
+
},
|
|
3975
|
+
|
|
3976
|
+
create<I extends Exact<DeepPartial<AIGitActivityFilter>, I>>(base?: I): AIGitActivityFilter {
|
|
3977
|
+
return AIGitActivityFilter.fromPartial(base ?? ({} as any));
|
|
3978
|
+
},
|
|
3979
|
+
fromPartial<I extends Exact<DeepPartial<AIGitActivityFilter>, I>>(object: I): AIGitActivityFilter {
|
|
3980
|
+
const message = createBaseAIGitActivityFilter();
|
|
3981
|
+
message.sessionId = object.sessionId?.map((e) => e) || [];
|
|
3982
|
+
message.sourceSystem = object.sourceSystem?.map((e) => e) || [];
|
|
3983
|
+
message.eventTimeAfter = object.eventTimeAfter ?? undefined;
|
|
3984
|
+
message.eventTimeBefore = object.eventTimeBefore ?? undefined;
|
|
3985
|
+
return message;
|
|
3986
|
+
},
|
|
3987
|
+
};
|
|
3988
|
+
|
|
3052
3989
|
function createBaseListGitActivitiesRequest(): ListGitActivitiesRequest {
|
|
3053
|
-
return { organizationId: "", projectId: "",
|
|
3990
|
+
return { organizationId: "", projectId: "", filter: undefined, pageSize: 0, pageToken: "" };
|
|
3054
3991
|
}
|
|
3055
3992
|
|
|
3056
3993
|
export const ListGitActivitiesRequest: MessageFns<ListGitActivitiesRequest> = {
|
|
@@ -3061,11 +3998,14 @@ export const ListGitActivitiesRequest: MessageFns<ListGitActivitiesRequest> = {
|
|
|
3061
3998
|
if (message.projectId !== "") {
|
|
3062
3999
|
writer.uint32(18).string(message.projectId);
|
|
3063
4000
|
}
|
|
3064
|
-
if (message.
|
|
3065
|
-
writer.uint32(26).
|
|
4001
|
+
if (message.filter !== undefined) {
|
|
4002
|
+
AIGitActivityFilter.encode(message.filter, writer.uint32(26).fork()).join();
|
|
3066
4003
|
}
|
|
3067
|
-
if (message.
|
|
3068
|
-
writer.uint32(
|
|
4004
|
+
if (message.pageSize !== 0) {
|
|
4005
|
+
writer.uint32(32).int32(message.pageSize);
|
|
4006
|
+
}
|
|
4007
|
+
if (message.pageToken !== "") {
|
|
4008
|
+
writer.uint32(42).string(message.pageToken);
|
|
3069
4009
|
}
|
|
3070
4010
|
return writer;
|
|
3071
4011
|
},
|
|
@@ -3104,15 +4044,23 @@ export const ListGitActivitiesRequest: MessageFns<ListGitActivitiesRequest> = {
|
|
|
3104
4044
|
break;
|
|
3105
4045
|
}
|
|
3106
4046
|
|
|
3107
|
-
message.
|
|
4047
|
+
message.filter = AIGitActivityFilter.decode(reader, reader.uint32());
|
|
3108
4048
|
continue;
|
|
3109
4049
|
}
|
|
3110
4050
|
case 4: {
|
|
3111
|
-
if (tag !==
|
|
4051
|
+
if (tag !== 32) {
|
|
3112
4052
|
break;
|
|
3113
4053
|
}
|
|
3114
4054
|
|
|
3115
|
-
message.
|
|
4055
|
+
message.pageSize = reader.int32();
|
|
4056
|
+
continue;
|
|
4057
|
+
}
|
|
4058
|
+
case 5: {
|
|
4059
|
+
if (tag !== 42) {
|
|
4060
|
+
break;
|
|
4061
|
+
}
|
|
4062
|
+
|
|
4063
|
+
message.pageToken = reader.string();
|
|
3116
4064
|
continue;
|
|
3117
4065
|
}
|
|
3118
4066
|
}
|
|
@@ -3139,15 +4087,16 @@ export const ListGitActivitiesRequest: MessageFns<ListGitActivitiesRequest> = {
|
|
|
3139
4087
|
: isSet(object.project_id)
|
|
3140
4088
|
? globalThis.String(object.project_id)
|
|
3141
4089
|
: "",
|
|
3142
|
-
|
|
3143
|
-
|
|
3144
|
-
|
|
3145
|
-
|
|
3146
|
-
|
|
3147
|
-
|
|
3148
|
-
|
|
3149
|
-
|
|
3150
|
-
|
|
4090
|
+
filter: isSet(object.filter) ? AIGitActivityFilter.fromJSON(object.filter) : undefined,
|
|
4091
|
+
pageSize: isSet(object.pageSize)
|
|
4092
|
+
? globalThis.Number(object.pageSize)
|
|
4093
|
+
: isSet(object.page_size)
|
|
4094
|
+
? globalThis.Number(object.page_size)
|
|
4095
|
+
: 0,
|
|
4096
|
+
pageToken: isSet(object.pageToken)
|
|
4097
|
+
? globalThis.String(object.pageToken)
|
|
4098
|
+
: isSet(object.page_token)
|
|
4099
|
+
? globalThis.String(object.page_token)
|
|
3151
4100
|
: "",
|
|
3152
4101
|
};
|
|
3153
4102
|
},
|
|
@@ -3160,11 +4109,14 @@ export const ListGitActivitiesRequest: MessageFns<ListGitActivitiesRequest> = {
|
|
|
3160
4109
|
if (message.projectId !== "") {
|
|
3161
4110
|
obj.projectId = message.projectId;
|
|
3162
4111
|
}
|
|
3163
|
-
if (message.
|
|
3164
|
-
obj.
|
|
4112
|
+
if (message.filter !== undefined) {
|
|
4113
|
+
obj.filter = AIGitActivityFilter.toJSON(message.filter);
|
|
3165
4114
|
}
|
|
3166
|
-
if (message.
|
|
3167
|
-
obj.
|
|
4115
|
+
if (message.pageSize !== 0) {
|
|
4116
|
+
obj.pageSize = Math.round(message.pageSize);
|
|
4117
|
+
}
|
|
4118
|
+
if (message.pageToken !== "") {
|
|
4119
|
+
obj.pageToken = message.pageToken;
|
|
3168
4120
|
}
|
|
3169
4121
|
return obj;
|
|
3170
4122
|
},
|
|
@@ -3176,14 +4128,17 @@ export const ListGitActivitiesRequest: MessageFns<ListGitActivitiesRequest> = {
|
|
|
3176
4128
|
const message = createBaseListGitActivitiesRequest();
|
|
3177
4129
|
message.organizationId = object.organizationId ?? "";
|
|
3178
4130
|
message.projectId = object.projectId ?? "";
|
|
3179
|
-
message.
|
|
3180
|
-
|
|
4131
|
+
message.filter = (object.filter !== undefined && object.filter !== null)
|
|
4132
|
+
? AIGitActivityFilter.fromPartial(object.filter)
|
|
4133
|
+
: undefined;
|
|
4134
|
+
message.pageSize = object.pageSize ?? 0;
|
|
4135
|
+
message.pageToken = object.pageToken ?? "";
|
|
3181
4136
|
return message;
|
|
3182
4137
|
},
|
|
3183
4138
|
};
|
|
3184
4139
|
|
|
3185
4140
|
function createBaseListGitActivitiesResponse(): ListGitActivitiesResponse {
|
|
3186
|
-
return { status: undefined, activities: [] };
|
|
4141
|
+
return { status: undefined, activities: [], nextPageToken: "" };
|
|
3187
4142
|
}
|
|
3188
4143
|
|
|
3189
4144
|
export const ListGitActivitiesResponse: MessageFns<ListGitActivitiesResponse> = {
|
|
@@ -3194,6 +4149,9 @@ export const ListGitActivitiesResponse: MessageFns<ListGitActivitiesResponse> =
|
|
|
3194
4149
|
for (const v of message.activities) {
|
|
3195
4150
|
AIGitActivity.encode(v!, writer.uint32(18).fork()).join();
|
|
3196
4151
|
}
|
|
4152
|
+
if (message.nextPageToken !== "") {
|
|
4153
|
+
writer.uint32(26).string(message.nextPageToken);
|
|
4154
|
+
}
|
|
3197
4155
|
return writer;
|
|
3198
4156
|
},
|
|
3199
4157
|
|
|
@@ -3226,6 +4184,14 @@ export const ListGitActivitiesResponse: MessageFns<ListGitActivitiesResponse> =
|
|
|
3226
4184
|
message.activities.push(AIGitActivity.decode(reader, reader.uint32()));
|
|
3227
4185
|
continue;
|
|
3228
4186
|
}
|
|
4187
|
+
case 3: {
|
|
4188
|
+
if (tag !== 26) {
|
|
4189
|
+
break;
|
|
4190
|
+
}
|
|
4191
|
+
|
|
4192
|
+
message.nextPageToken = reader.string();
|
|
4193
|
+
continue;
|
|
4194
|
+
}
|
|
3229
4195
|
}
|
|
3230
4196
|
if ((tag & 7) === 4 || tag === 0) {
|
|
3231
4197
|
break;
|
|
@@ -3244,6 +4210,11 @@ export const ListGitActivitiesResponse: MessageFns<ListGitActivitiesResponse> =
|
|
|
3244
4210
|
activities: globalThis.Array.isArray(object?.activities)
|
|
3245
4211
|
? object.activities.map((e: any) => AIGitActivity.fromJSON(e))
|
|
3246
4212
|
: [],
|
|
4213
|
+
nextPageToken: isSet(object.nextPageToken)
|
|
4214
|
+
? globalThis.String(object.nextPageToken)
|
|
4215
|
+
: isSet(object.next_page_token)
|
|
4216
|
+
? globalThis.String(object.next_page_token)
|
|
4217
|
+
: "",
|
|
3247
4218
|
};
|
|
3248
4219
|
},
|
|
3249
4220
|
|
|
@@ -3255,6 +4226,9 @@ export const ListGitActivitiesResponse: MessageFns<ListGitActivitiesResponse> =
|
|
|
3255
4226
|
if (message.activities?.length) {
|
|
3256
4227
|
obj.activities = message.activities.map((e) => AIGitActivity.toJSON(e));
|
|
3257
4228
|
}
|
|
4229
|
+
if (message.nextPageToken !== "") {
|
|
4230
|
+
obj.nextPageToken = message.nextPageToken;
|
|
4231
|
+
}
|
|
3258
4232
|
return obj;
|
|
3259
4233
|
},
|
|
3260
4234
|
|
|
@@ -3267,12 +4241,13 @@ export const ListGitActivitiesResponse: MessageFns<ListGitActivitiesResponse> =
|
|
|
3267
4241
|
? ResponseStatus.fromPartial(object.status)
|
|
3268
4242
|
: undefined;
|
|
3269
4243
|
message.activities = object.activities?.map((e) => AIGitActivity.fromPartial(e)) || [];
|
|
4244
|
+
message.nextPageToken = object.nextPageToken ?? "";
|
|
3270
4245
|
return message;
|
|
3271
4246
|
},
|
|
3272
4247
|
};
|
|
3273
4248
|
|
|
3274
4249
|
function createBaseStreamGitActivitiesRequest(): StreamGitActivitiesRequest {
|
|
3275
|
-
return { organizationId: "", projectId: "",
|
|
4250
|
+
return { organizationId: "", projectId: "", filter: undefined };
|
|
3276
4251
|
}
|
|
3277
4252
|
|
|
3278
4253
|
export const StreamGitActivitiesRequest: MessageFns<StreamGitActivitiesRequest> = {
|
|
@@ -3283,11 +4258,8 @@ export const StreamGitActivitiesRequest: MessageFns<StreamGitActivitiesRequest>
|
|
|
3283
4258
|
if (message.projectId !== "") {
|
|
3284
4259
|
writer.uint32(18).string(message.projectId);
|
|
3285
4260
|
}
|
|
3286
|
-
if (message.
|
|
3287
|
-
writer.uint32(26).
|
|
3288
|
-
}
|
|
3289
|
-
if (message.sourceSystem !== "") {
|
|
3290
|
-
writer.uint32(34).string(message.sourceSystem);
|
|
4261
|
+
if (message.filter !== undefined) {
|
|
4262
|
+
AIGitActivityFilter.encode(message.filter, writer.uint32(26).fork()).join();
|
|
3291
4263
|
}
|
|
3292
4264
|
return writer;
|
|
3293
4265
|
},
|
|
@@ -3326,15 +4298,7 @@ export const StreamGitActivitiesRequest: MessageFns<StreamGitActivitiesRequest>
|
|
|
3326
4298
|
break;
|
|
3327
4299
|
}
|
|
3328
4300
|
|
|
3329
|
-
message.
|
|
3330
|
-
continue;
|
|
3331
|
-
}
|
|
3332
|
-
case 4: {
|
|
3333
|
-
if (tag !== 34) {
|
|
3334
|
-
break;
|
|
3335
|
-
}
|
|
3336
|
-
|
|
3337
|
-
message.sourceSystem = reader.string();
|
|
4301
|
+
message.filter = AIGitActivityFilter.decode(reader, reader.uint32());
|
|
3338
4302
|
continue;
|
|
3339
4303
|
}
|
|
3340
4304
|
}
|
|
@@ -3361,16 +4325,7 @@ export const StreamGitActivitiesRequest: MessageFns<StreamGitActivitiesRequest>
|
|
|
3361
4325
|
: isSet(object.project_id)
|
|
3362
4326
|
? globalThis.String(object.project_id)
|
|
3363
4327
|
: "",
|
|
3364
|
-
|
|
3365
|
-
? globalThis.String(object.routingKey)
|
|
3366
|
-
: isSet(object.routing_key)
|
|
3367
|
-
? globalThis.String(object.routing_key)
|
|
3368
|
-
: "",
|
|
3369
|
-
sourceSystem: isSet(object.sourceSystem)
|
|
3370
|
-
? globalThis.String(object.sourceSystem)
|
|
3371
|
-
: isSet(object.source_system)
|
|
3372
|
-
? globalThis.String(object.source_system)
|
|
3373
|
-
: "",
|
|
4328
|
+
filter: isSet(object.filter) ? AIGitActivityFilter.fromJSON(object.filter) : undefined,
|
|
3374
4329
|
};
|
|
3375
4330
|
},
|
|
3376
4331
|
|
|
@@ -3382,11 +4337,8 @@ export const StreamGitActivitiesRequest: MessageFns<StreamGitActivitiesRequest>
|
|
|
3382
4337
|
if (message.projectId !== "") {
|
|
3383
4338
|
obj.projectId = message.projectId;
|
|
3384
4339
|
}
|
|
3385
|
-
if (message.
|
|
3386
|
-
obj.
|
|
3387
|
-
}
|
|
3388
|
-
if (message.sourceSystem !== "") {
|
|
3389
|
-
obj.sourceSystem = message.sourceSystem;
|
|
4340
|
+
if (message.filter !== undefined) {
|
|
4341
|
+
obj.filter = AIGitActivityFilter.toJSON(message.filter);
|
|
3390
4342
|
}
|
|
3391
4343
|
return obj;
|
|
3392
4344
|
},
|
|
@@ -3398,8 +4350,9 @@ export const StreamGitActivitiesRequest: MessageFns<StreamGitActivitiesRequest>
|
|
|
3398
4350
|
const message = createBaseStreamGitActivitiesRequest();
|
|
3399
4351
|
message.organizationId = object.organizationId ?? "";
|
|
3400
4352
|
message.projectId = object.projectId ?? "";
|
|
3401
|
-
message.
|
|
3402
|
-
|
|
4353
|
+
message.filter = (object.filter !== undefined && object.filter !== null)
|
|
4354
|
+
? AIGitActivityFilter.fromPartial(object.filter)
|
|
4355
|
+
: undefined;
|
|
3403
4356
|
return message;
|
|
3404
4357
|
},
|
|
3405
4358
|
};
|
|
@@ -4194,31 +5147,34 @@ export const AIGitActivity: MessageFns<AIGitActivity> = {
|
|
|
4194
5147
|
},
|
|
4195
5148
|
};
|
|
4196
5149
|
|
|
4197
|
-
function
|
|
4198
|
-
return {
|
|
5150
|
+
function createBaseGitActivitySummaryRequest(): GitActivitySummaryRequest {
|
|
5151
|
+
return { organizationId: "", projectId: "", filter: undefined, timeWindow: 0, timeInterval: 0, groupBy: 0 };
|
|
4199
5152
|
}
|
|
4200
5153
|
|
|
4201
|
-
export const
|
|
4202
|
-
encode(message:
|
|
4203
|
-
if (message.
|
|
4204
|
-
writer.uint32(
|
|
5154
|
+
export const GitActivitySummaryRequest: MessageFns<GitActivitySummaryRequest> = {
|
|
5155
|
+
encode(message: GitActivitySummaryRequest, writer: BinaryWriter = new BinaryWriter()): BinaryWriter {
|
|
5156
|
+
if (message.organizationId !== "") {
|
|
5157
|
+
writer.uint32(10).string(message.organizationId);
|
|
4205
5158
|
}
|
|
4206
|
-
if (message.
|
|
4207
|
-
writer.uint32(
|
|
5159
|
+
if (message.projectId !== "") {
|
|
5160
|
+
writer.uint32(18).string(message.projectId);
|
|
4208
5161
|
}
|
|
4209
|
-
if (message.
|
|
4210
|
-
writer.uint32(
|
|
5162
|
+
if (message.filter !== undefined) {
|
|
5163
|
+
AIGitActivityFilter.encode(message.filter, writer.uint32(26).fork()).join();
|
|
4211
5164
|
}
|
|
4212
|
-
if (message.
|
|
4213
|
-
writer.uint32(32).
|
|
5165
|
+
if (message.timeWindow !== 0) {
|
|
5166
|
+
writer.uint32(32).int32(message.timeWindow);
|
|
5167
|
+
}
|
|
5168
|
+
if (message.timeInterval !== 0) {
|
|
5169
|
+
writer.uint32(40).int32(message.timeInterval);
|
|
4214
5170
|
}
|
|
4215
|
-
if (message.
|
|
4216
|
-
writer.uint32(
|
|
5171
|
+
if (message.groupBy !== 0) {
|
|
5172
|
+
writer.uint32(48).int32(message.groupBy);
|
|
4217
5173
|
}
|
|
4218
5174
|
return writer;
|
|
4219
5175
|
},
|
|
4220
5176
|
|
|
4221
|
-
decode(input: BinaryReader | Uint8Array, length?: number):
|
|
5177
|
+
decode(input: BinaryReader | Uint8Array, length?: number): GitActivitySummaryRequest {
|
|
4222
5178
|
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
|
|
4223
5179
|
const previousRecursionDepth = (reader as any).__tsProtoDecodeDepth ?? 0;
|
|
4224
5180
|
if (previousRecursionDepth >= 100) {
|
|
@@ -4227,32 +5183,32 @@ export const AITokenUsage: MessageFns<AITokenUsage> = {
|
|
|
4227
5183
|
(reader as any).__tsProtoDecodeDepth = previousRecursionDepth + 1;
|
|
4228
5184
|
try {
|
|
4229
5185
|
const end = length === undefined ? reader.len : reader.pos + length;
|
|
4230
|
-
const message =
|
|
5186
|
+
const message = createBaseGitActivitySummaryRequest();
|
|
4231
5187
|
while (reader.pos < end) {
|
|
4232
5188
|
const tag = reader.uint32();
|
|
4233
5189
|
switch (tag >>> 3) {
|
|
4234
5190
|
case 1: {
|
|
4235
|
-
if (tag !==
|
|
5191
|
+
if (tag !== 10) {
|
|
4236
5192
|
break;
|
|
4237
5193
|
}
|
|
4238
5194
|
|
|
4239
|
-
message.
|
|
5195
|
+
message.organizationId = reader.string();
|
|
4240
5196
|
continue;
|
|
4241
5197
|
}
|
|
4242
5198
|
case 2: {
|
|
4243
|
-
if (tag !==
|
|
5199
|
+
if (tag !== 18) {
|
|
4244
5200
|
break;
|
|
4245
5201
|
}
|
|
4246
5202
|
|
|
4247
|
-
message.
|
|
5203
|
+
message.projectId = reader.string();
|
|
4248
5204
|
continue;
|
|
4249
5205
|
}
|
|
4250
5206
|
case 3: {
|
|
4251
|
-
if (tag !==
|
|
5207
|
+
if (tag !== 26) {
|
|
4252
5208
|
break;
|
|
4253
5209
|
}
|
|
4254
5210
|
|
|
4255
|
-
message.
|
|
5211
|
+
message.filter = AIGitActivityFilter.decode(reader, reader.uint32());
|
|
4256
5212
|
continue;
|
|
4257
5213
|
}
|
|
4258
5214
|
case 4: {
|
|
@@ -4260,7 +5216,7 @@ export const AITokenUsage: MessageFns<AITokenUsage> = {
|
|
|
4260
5216
|
break;
|
|
4261
5217
|
}
|
|
4262
5218
|
|
|
4263
|
-
message.
|
|
5219
|
+
message.timeWindow = reader.int32() as any;
|
|
4264
5220
|
continue;
|
|
4265
5221
|
}
|
|
4266
5222
|
case 5: {
|
|
@@ -4268,7 +5224,15 @@ export const AITokenUsage: MessageFns<AITokenUsage> = {
|
|
|
4268
5224
|
break;
|
|
4269
5225
|
}
|
|
4270
5226
|
|
|
4271
|
-
message.
|
|
5227
|
+
message.timeInterval = reader.int32() as any;
|
|
5228
|
+
continue;
|
|
5229
|
+
}
|
|
5230
|
+
case 6: {
|
|
5231
|
+
if (tag !== 48) {
|
|
5232
|
+
break;
|
|
5233
|
+
}
|
|
5234
|
+
|
|
5235
|
+
message.groupBy = reader.int32() as any;
|
|
4272
5236
|
continue;
|
|
4273
5237
|
}
|
|
4274
5238
|
}
|
|
@@ -4283,12 +5247,2620 @@ export const AITokenUsage: MessageFns<AITokenUsage> = {
|
|
|
4283
5247
|
}
|
|
4284
5248
|
},
|
|
4285
5249
|
|
|
4286
|
-
fromJSON(object: any):
|
|
5250
|
+
fromJSON(object: any): GitActivitySummaryRequest {
|
|
4287
5251
|
return {
|
|
4288
|
-
|
|
4289
|
-
? globalThis.
|
|
4290
|
-
: isSet(object.
|
|
4291
|
-
? globalThis.
|
|
5252
|
+
organizationId: isSet(object.organizationId)
|
|
5253
|
+
? globalThis.String(object.organizationId)
|
|
5254
|
+
: isSet(object.organization_id)
|
|
5255
|
+
? globalThis.String(object.organization_id)
|
|
5256
|
+
: "",
|
|
5257
|
+
projectId: isSet(object.projectId)
|
|
5258
|
+
? globalThis.String(object.projectId)
|
|
5259
|
+
: isSet(object.project_id)
|
|
5260
|
+
? globalThis.String(object.project_id)
|
|
5261
|
+
: "",
|
|
5262
|
+
filter: isSet(object.filter) ? AIGitActivityFilter.fromJSON(object.filter) : undefined,
|
|
5263
|
+
timeWindow: isSet(object.timeWindow)
|
|
5264
|
+
? analyticsTimeWindowFromJSON(object.timeWindow)
|
|
5265
|
+
: isSet(object.time_window)
|
|
5266
|
+
? analyticsTimeWindowFromJSON(object.time_window)
|
|
5267
|
+
: 0,
|
|
5268
|
+
timeInterval: isSet(object.timeInterval)
|
|
5269
|
+
? analyticsTimeIntervalFromJSON(object.timeInterval)
|
|
5270
|
+
: isSet(object.time_interval)
|
|
5271
|
+
? analyticsTimeIntervalFromJSON(object.time_interval)
|
|
5272
|
+
: 0,
|
|
5273
|
+
groupBy: isSet(object.groupBy)
|
|
5274
|
+
? aIGitActivityDimensionFromJSON(object.groupBy)
|
|
5275
|
+
: isSet(object.group_by)
|
|
5276
|
+
? aIGitActivityDimensionFromJSON(object.group_by)
|
|
5277
|
+
: 0,
|
|
5278
|
+
};
|
|
5279
|
+
},
|
|
5280
|
+
|
|
5281
|
+
toJSON(message: GitActivitySummaryRequest): unknown {
|
|
5282
|
+
const obj: any = {};
|
|
5283
|
+
if (message.organizationId !== "") {
|
|
5284
|
+
obj.organizationId = message.organizationId;
|
|
5285
|
+
}
|
|
5286
|
+
if (message.projectId !== "") {
|
|
5287
|
+
obj.projectId = message.projectId;
|
|
5288
|
+
}
|
|
5289
|
+
if (message.filter !== undefined) {
|
|
5290
|
+
obj.filter = AIGitActivityFilter.toJSON(message.filter);
|
|
5291
|
+
}
|
|
5292
|
+
if (message.timeWindow !== 0) {
|
|
5293
|
+
obj.timeWindow = analyticsTimeWindowToJSON(message.timeWindow);
|
|
5294
|
+
}
|
|
5295
|
+
if (message.timeInterval !== 0) {
|
|
5296
|
+
obj.timeInterval = analyticsTimeIntervalToJSON(message.timeInterval);
|
|
5297
|
+
}
|
|
5298
|
+
if (message.groupBy !== 0) {
|
|
5299
|
+
obj.groupBy = aIGitActivityDimensionToJSON(message.groupBy);
|
|
5300
|
+
}
|
|
5301
|
+
return obj;
|
|
5302
|
+
},
|
|
5303
|
+
|
|
5304
|
+
create<I extends Exact<DeepPartial<GitActivitySummaryRequest>, I>>(base?: I): GitActivitySummaryRequest {
|
|
5305
|
+
return GitActivitySummaryRequest.fromPartial(base ?? ({} as any));
|
|
5306
|
+
},
|
|
5307
|
+
fromPartial<I extends Exact<DeepPartial<GitActivitySummaryRequest>, I>>(object: I): GitActivitySummaryRequest {
|
|
5308
|
+
const message = createBaseGitActivitySummaryRequest();
|
|
5309
|
+
message.organizationId = object.organizationId ?? "";
|
|
5310
|
+
message.projectId = object.projectId ?? "";
|
|
5311
|
+
message.filter = (object.filter !== undefined && object.filter !== null)
|
|
5312
|
+
? AIGitActivityFilter.fromPartial(object.filter)
|
|
5313
|
+
: undefined;
|
|
5314
|
+
message.timeWindow = object.timeWindow ?? 0;
|
|
5315
|
+
message.timeInterval = object.timeInterval ?? 0;
|
|
5316
|
+
message.groupBy = object.groupBy ?? 0;
|
|
5317
|
+
return message;
|
|
5318
|
+
},
|
|
5319
|
+
};
|
|
5320
|
+
|
|
5321
|
+
function createBaseGetGitActivitySummaryResponse(): GetGitActivitySummaryResponse {
|
|
5322
|
+
return { status: undefined, summary: undefined };
|
|
5323
|
+
}
|
|
5324
|
+
|
|
5325
|
+
export const GetGitActivitySummaryResponse: MessageFns<GetGitActivitySummaryResponse> = {
|
|
5326
|
+
encode(message: GetGitActivitySummaryResponse, writer: BinaryWriter = new BinaryWriter()): BinaryWriter {
|
|
5327
|
+
if (message.status !== undefined) {
|
|
5328
|
+
ResponseStatus.encode(message.status, writer.uint32(10).fork()).join();
|
|
5329
|
+
}
|
|
5330
|
+
if (message.summary !== undefined) {
|
|
5331
|
+
GitActivitySummary.encode(message.summary, writer.uint32(18).fork()).join();
|
|
5332
|
+
}
|
|
5333
|
+
return writer;
|
|
5334
|
+
},
|
|
5335
|
+
|
|
5336
|
+
decode(input: BinaryReader | Uint8Array, length?: number): GetGitActivitySummaryResponse {
|
|
5337
|
+
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
|
|
5338
|
+
const previousRecursionDepth = (reader as any).__tsProtoDecodeDepth ?? 0;
|
|
5339
|
+
if (previousRecursionDepth >= 100) {
|
|
5340
|
+
throw new globalThis.Error("protobuf decode recursion limit exceeded");
|
|
5341
|
+
}
|
|
5342
|
+
(reader as any).__tsProtoDecodeDepth = previousRecursionDepth + 1;
|
|
5343
|
+
try {
|
|
5344
|
+
const end = length === undefined ? reader.len : reader.pos + length;
|
|
5345
|
+
const message = createBaseGetGitActivitySummaryResponse();
|
|
5346
|
+
while (reader.pos < end) {
|
|
5347
|
+
const tag = reader.uint32();
|
|
5348
|
+
switch (tag >>> 3) {
|
|
5349
|
+
case 1: {
|
|
5350
|
+
if (tag !== 10) {
|
|
5351
|
+
break;
|
|
5352
|
+
}
|
|
5353
|
+
|
|
5354
|
+
message.status = ResponseStatus.decode(reader, reader.uint32());
|
|
5355
|
+
continue;
|
|
5356
|
+
}
|
|
5357
|
+
case 2: {
|
|
5358
|
+
if (tag !== 18) {
|
|
5359
|
+
break;
|
|
5360
|
+
}
|
|
5361
|
+
|
|
5362
|
+
message.summary = GitActivitySummary.decode(reader, reader.uint32());
|
|
5363
|
+
continue;
|
|
5364
|
+
}
|
|
5365
|
+
}
|
|
5366
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
5367
|
+
break;
|
|
5368
|
+
}
|
|
5369
|
+
reader.skip(tag & 7);
|
|
5370
|
+
}
|
|
5371
|
+
return message;
|
|
5372
|
+
} finally {
|
|
5373
|
+
(reader as any).__tsProtoDecodeDepth = previousRecursionDepth;
|
|
5374
|
+
}
|
|
5375
|
+
},
|
|
5376
|
+
|
|
5377
|
+
fromJSON(object: any): GetGitActivitySummaryResponse {
|
|
5378
|
+
return {
|
|
5379
|
+
status: isSet(object.status) ? ResponseStatus.fromJSON(object.status) : undefined,
|
|
5380
|
+
summary: isSet(object.summary) ? GitActivitySummary.fromJSON(object.summary) : undefined,
|
|
5381
|
+
};
|
|
5382
|
+
},
|
|
5383
|
+
|
|
5384
|
+
toJSON(message: GetGitActivitySummaryResponse): unknown {
|
|
5385
|
+
const obj: any = {};
|
|
5386
|
+
if (message.status !== undefined) {
|
|
5387
|
+
obj.status = ResponseStatus.toJSON(message.status);
|
|
5388
|
+
}
|
|
5389
|
+
if (message.summary !== undefined) {
|
|
5390
|
+
obj.summary = GitActivitySummary.toJSON(message.summary);
|
|
5391
|
+
}
|
|
5392
|
+
return obj;
|
|
5393
|
+
},
|
|
5394
|
+
|
|
5395
|
+
create<I extends Exact<DeepPartial<GetGitActivitySummaryResponse>, I>>(base?: I): GetGitActivitySummaryResponse {
|
|
5396
|
+
return GetGitActivitySummaryResponse.fromPartial(base ?? ({} as any));
|
|
5397
|
+
},
|
|
5398
|
+
fromPartial<I extends Exact<DeepPartial<GetGitActivitySummaryResponse>, I>>(
|
|
5399
|
+
object: I,
|
|
5400
|
+
): GetGitActivitySummaryResponse {
|
|
5401
|
+
const message = createBaseGetGitActivitySummaryResponse();
|
|
5402
|
+
message.status = (object.status !== undefined && object.status !== null)
|
|
5403
|
+
? ResponseStatus.fromPartial(object.status)
|
|
5404
|
+
: undefined;
|
|
5405
|
+
message.summary = (object.summary !== undefined && object.summary !== null)
|
|
5406
|
+
? GitActivitySummary.fromPartial(object.summary)
|
|
5407
|
+
: undefined;
|
|
5408
|
+
return message;
|
|
5409
|
+
},
|
|
5410
|
+
};
|
|
5411
|
+
|
|
5412
|
+
function createBaseGitActivitySummary(): GitActivitySummary {
|
|
5413
|
+
return { buckets: [], totals: undefined, windowStart: undefined, windowEnd: undefined, groupBy: 0 };
|
|
5414
|
+
}
|
|
5415
|
+
|
|
5416
|
+
export const GitActivitySummary: MessageFns<GitActivitySummary> = {
|
|
5417
|
+
encode(message: GitActivitySummary, writer: BinaryWriter = new BinaryWriter()): BinaryWriter {
|
|
5418
|
+
for (const v of message.buckets) {
|
|
5419
|
+
GitActivitySummaryBucket.encode(v!, writer.uint32(10).fork()).join();
|
|
5420
|
+
}
|
|
5421
|
+
if (message.totals !== undefined) {
|
|
5422
|
+
GitActivityMeasures.encode(message.totals, writer.uint32(18).fork()).join();
|
|
5423
|
+
}
|
|
5424
|
+
if (message.windowStart !== undefined) {
|
|
5425
|
+
Timestamp.encode(toTimestamp(message.windowStart), writer.uint32(26).fork()).join();
|
|
5426
|
+
}
|
|
5427
|
+
if (message.windowEnd !== undefined) {
|
|
5428
|
+
Timestamp.encode(toTimestamp(message.windowEnd), writer.uint32(34).fork()).join();
|
|
5429
|
+
}
|
|
5430
|
+
if (message.groupBy !== 0) {
|
|
5431
|
+
writer.uint32(40).int32(message.groupBy);
|
|
5432
|
+
}
|
|
5433
|
+
return writer;
|
|
5434
|
+
},
|
|
5435
|
+
|
|
5436
|
+
decode(input: BinaryReader | Uint8Array, length?: number): GitActivitySummary {
|
|
5437
|
+
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
|
|
5438
|
+
const previousRecursionDepth = (reader as any).__tsProtoDecodeDepth ?? 0;
|
|
5439
|
+
if (previousRecursionDepth >= 100) {
|
|
5440
|
+
throw new globalThis.Error("protobuf decode recursion limit exceeded");
|
|
5441
|
+
}
|
|
5442
|
+
(reader as any).__tsProtoDecodeDepth = previousRecursionDepth + 1;
|
|
5443
|
+
try {
|
|
5444
|
+
const end = length === undefined ? reader.len : reader.pos + length;
|
|
5445
|
+
const message = createBaseGitActivitySummary();
|
|
5446
|
+
while (reader.pos < end) {
|
|
5447
|
+
const tag = reader.uint32();
|
|
5448
|
+
switch (tag >>> 3) {
|
|
5449
|
+
case 1: {
|
|
5450
|
+
if (tag !== 10) {
|
|
5451
|
+
break;
|
|
5452
|
+
}
|
|
5453
|
+
|
|
5454
|
+
message.buckets.push(GitActivitySummaryBucket.decode(reader, reader.uint32()));
|
|
5455
|
+
continue;
|
|
5456
|
+
}
|
|
5457
|
+
case 2: {
|
|
5458
|
+
if (tag !== 18) {
|
|
5459
|
+
break;
|
|
5460
|
+
}
|
|
5461
|
+
|
|
5462
|
+
message.totals = GitActivityMeasures.decode(reader, reader.uint32());
|
|
5463
|
+
continue;
|
|
5464
|
+
}
|
|
5465
|
+
case 3: {
|
|
5466
|
+
if (tag !== 26) {
|
|
5467
|
+
break;
|
|
5468
|
+
}
|
|
5469
|
+
|
|
5470
|
+
message.windowStart = fromTimestamp(Timestamp.decode(reader, reader.uint32()));
|
|
5471
|
+
continue;
|
|
5472
|
+
}
|
|
5473
|
+
case 4: {
|
|
5474
|
+
if (tag !== 34) {
|
|
5475
|
+
break;
|
|
5476
|
+
}
|
|
5477
|
+
|
|
5478
|
+
message.windowEnd = fromTimestamp(Timestamp.decode(reader, reader.uint32()));
|
|
5479
|
+
continue;
|
|
5480
|
+
}
|
|
5481
|
+
case 5: {
|
|
5482
|
+
if (tag !== 40) {
|
|
5483
|
+
break;
|
|
5484
|
+
}
|
|
5485
|
+
|
|
5486
|
+
message.groupBy = reader.int32() as any;
|
|
5487
|
+
continue;
|
|
5488
|
+
}
|
|
5489
|
+
}
|
|
5490
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
5491
|
+
break;
|
|
5492
|
+
}
|
|
5493
|
+
reader.skip(tag & 7);
|
|
5494
|
+
}
|
|
5495
|
+
return message;
|
|
5496
|
+
} finally {
|
|
5497
|
+
(reader as any).__tsProtoDecodeDepth = previousRecursionDepth;
|
|
5498
|
+
}
|
|
5499
|
+
},
|
|
5500
|
+
|
|
5501
|
+
fromJSON(object: any): GitActivitySummary {
|
|
5502
|
+
return {
|
|
5503
|
+
buckets: globalThis.Array.isArray(object?.buckets)
|
|
5504
|
+
? object.buckets.map((e: any) => GitActivitySummaryBucket.fromJSON(e))
|
|
5505
|
+
: [],
|
|
5506
|
+
totals: isSet(object.totals) ? GitActivityMeasures.fromJSON(object.totals) : undefined,
|
|
5507
|
+
windowStart: isSet(object.windowStart)
|
|
5508
|
+
? fromJsonTimestamp(object.windowStart)
|
|
5509
|
+
: isSet(object.window_start)
|
|
5510
|
+
? fromJsonTimestamp(object.window_start)
|
|
5511
|
+
: undefined,
|
|
5512
|
+
windowEnd: isSet(object.windowEnd)
|
|
5513
|
+
? fromJsonTimestamp(object.windowEnd)
|
|
5514
|
+
: isSet(object.window_end)
|
|
5515
|
+
? fromJsonTimestamp(object.window_end)
|
|
5516
|
+
: undefined,
|
|
5517
|
+
groupBy: isSet(object.groupBy)
|
|
5518
|
+
? aIGitActivityDimensionFromJSON(object.groupBy)
|
|
5519
|
+
: isSet(object.group_by)
|
|
5520
|
+
? aIGitActivityDimensionFromJSON(object.group_by)
|
|
5521
|
+
: 0,
|
|
5522
|
+
};
|
|
5523
|
+
},
|
|
5524
|
+
|
|
5525
|
+
toJSON(message: GitActivitySummary): unknown {
|
|
5526
|
+
const obj: any = {};
|
|
5527
|
+
if (message.buckets?.length) {
|
|
5528
|
+
obj.buckets = message.buckets.map((e) => GitActivitySummaryBucket.toJSON(e));
|
|
5529
|
+
}
|
|
5530
|
+
if (message.totals !== undefined) {
|
|
5531
|
+
obj.totals = GitActivityMeasures.toJSON(message.totals);
|
|
5532
|
+
}
|
|
5533
|
+
if (message.windowStart !== undefined) {
|
|
5534
|
+
obj.windowStart = message.windowStart.toISOString();
|
|
5535
|
+
}
|
|
5536
|
+
if (message.windowEnd !== undefined) {
|
|
5537
|
+
obj.windowEnd = message.windowEnd.toISOString();
|
|
5538
|
+
}
|
|
5539
|
+
if (message.groupBy !== 0) {
|
|
5540
|
+
obj.groupBy = aIGitActivityDimensionToJSON(message.groupBy);
|
|
5541
|
+
}
|
|
5542
|
+
return obj;
|
|
5543
|
+
},
|
|
5544
|
+
|
|
5545
|
+
create<I extends Exact<DeepPartial<GitActivitySummary>, I>>(base?: I): GitActivitySummary {
|
|
5546
|
+
return GitActivitySummary.fromPartial(base ?? ({} as any));
|
|
5547
|
+
},
|
|
5548
|
+
fromPartial<I extends Exact<DeepPartial<GitActivitySummary>, I>>(object: I): GitActivitySummary {
|
|
5549
|
+
const message = createBaseGitActivitySummary();
|
|
5550
|
+
message.buckets = object.buckets?.map((e) => GitActivitySummaryBucket.fromPartial(e)) || [];
|
|
5551
|
+
message.totals = (object.totals !== undefined && object.totals !== null)
|
|
5552
|
+
? GitActivityMeasures.fromPartial(object.totals)
|
|
5553
|
+
: undefined;
|
|
5554
|
+
message.windowStart = object.windowStart ?? undefined;
|
|
5555
|
+
message.windowEnd = object.windowEnd ?? undefined;
|
|
5556
|
+
message.groupBy = object.groupBy ?? 0;
|
|
5557
|
+
return message;
|
|
5558
|
+
},
|
|
5559
|
+
};
|
|
5560
|
+
|
|
5561
|
+
function createBaseGitActivitySummaryBucket(): GitActivitySummaryBucket {
|
|
5562
|
+
return { bucketStart: undefined, groups: [] };
|
|
5563
|
+
}
|
|
5564
|
+
|
|
5565
|
+
export const GitActivitySummaryBucket: MessageFns<GitActivitySummaryBucket> = {
|
|
5566
|
+
encode(message: GitActivitySummaryBucket, writer: BinaryWriter = new BinaryWriter()): BinaryWriter {
|
|
5567
|
+
if (message.bucketStart !== undefined) {
|
|
5568
|
+
Timestamp.encode(toTimestamp(message.bucketStart), writer.uint32(10).fork()).join();
|
|
5569
|
+
}
|
|
5570
|
+
for (const v of message.groups) {
|
|
5571
|
+
GitActivitySummaryGroup.encode(v!, writer.uint32(18).fork()).join();
|
|
5572
|
+
}
|
|
5573
|
+
return writer;
|
|
5574
|
+
},
|
|
5575
|
+
|
|
5576
|
+
decode(input: BinaryReader | Uint8Array, length?: number): GitActivitySummaryBucket {
|
|
5577
|
+
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
|
|
5578
|
+
const previousRecursionDepth = (reader as any).__tsProtoDecodeDepth ?? 0;
|
|
5579
|
+
if (previousRecursionDepth >= 100) {
|
|
5580
|
+
throw new globalThis.Error("protobuf decode recursion limit exceeded");
|
|
5581
|
+
}
|
|
5582
|
+
(reader as any).__tsProtoDecodeDepth = previousRecursionDepth + 1;
|
|
5583
|
+
try {
|
|
5584
|
+
const end = length === undefined ? reader.len : reader.pos + length;
|
|
5585
|
+
const message = createBaseGitActivitySummaryBucket();
|
|
5586
|
+
while (reader.pos < end) {
|
|
5587
|
+
const tag = reader.uint32();
|
|
5588
|
+
switch (tag >>> 3) {
|
|
5589
|
+
case 1: {
|
|
5590
|
+
if (tag !== 10) {
|
|
5591
|
+
break;
|
|
5592
|
+
}
|
|
5593
|
+
|
|
5594
|
+
message.bucketStart = fromTimestamp(Timestamp.decode(reader, reader.uint32()));
|
|
5595
|
+
continue;
|
|
5596
|
+
}
|
|
5597
|
+
case 2: {
|
|
5598
|
+
if (tag !== 18) {
|
|
5599
|
+
break;
|
|
5600
|
+
}
|
|
5601
|
+
|
|
5602
|
+
message.groups.push(GitActivitySummaryGroup.decode(reader, reader.uint32()));
|
|
5603
|
+
continue;
|
|
5604
|
+
}
|
|
5605
|
+
}
|
|
5606
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
5607
|
+
break;
|
|
5608
|
+
}
|
|
5609
|
+
reader.skip(tag & 7);
|
|
5610
|
+
}
|
|
5611
|
+
return message;
|
|
5612
|
+
} finally {
|
|
5613
|
+
(reader as any).__tsProtoDecodeDepth = previousRecursionDepth;
|
|
5614
|
+
}
|
|
5615
|
+
},
|
|
5616
|
+
|
|
5617
|
+
fromJSON(object: any): GitActivitySummaryBucket {
|
|
5618
|
+
return {
|
|
5619
|
+
bucketStart: isSet(object.bucketStart)
|
|
5620
|
+
? fromJsonTimestamp(object.bucketStart)
|
|
5621
|
+
: isSet(object.bucket_start)
|
|
5622
|
+
? fromJsonTimestamp(object.bucket_start)
|
|
5623
|
+
: undefined,
|
|
5624
|
+
groups: globalThis.Array.isArray(object?.groups)
|
|
5625
|
+
? object.groups.map((e: any) => GitActivitySummaryGroup.fromJSON(e))
|
|
5626
|
+
: [],
|
|
5627
|
+
};
|
|
5628
|
+
},
|
|
5629
|
+
|
|
5630
|
+
toJSON(message: GitActivitySummaryBucket): unknown {
|
|
5631
|
+
const obj: any = {};
|
|
5632
|
+
if (message.bucketStart !== undefined) {
|
|
5633
|
+
obj.bucketStart = message.bucketStart.toISOString();
|
|
5634
|
+
}
|
|
5635
|
+
if (message.groups?.length) {
|
|
5636
|
+
obj.groups = message.groups.map((e) => GitActivitySummaryGroup.toJSON(e));
|
|
5637
|
+
}
|
|
5638
|
+
return obj;
|
|
5639
|
+
},
|
|
5640
|
+
|
|
5641
|
+
create<I extends Exact<DeepPartial<GitActivitySummaryBucket>, I>>(base?: I): GitActivitySummaryBucket {
|
|
5642
|
+
return GitActivitySummaryBucket.fromPartial(base ?? ({} as any));
|
|
5643
|
+
},
|
|
5644
|
+
fromPartial<I extends Exact<DeepPartial<GitActivitySummaryBucket>, I>>(object: I): GitActivitySummaryBucket {
|
|
5645
|
+
const message = createBaseGitActivitySummaryBucket();
|
|
5646
|
+
message.bucketStart = object.bucketStart ?? undefined;
|
|
5647
|
+
message.groups = object.groups?.map((e) => GitActivitySummaryGroup.fromPartial(e)) || [];
|
|
5648
|
+
return message;
|
|
5649
|
+
},
|
|
5650
|
+
};
|
|
5651
|
+
|
|
5652
|
+
function createBaseGitActivitySummaryGroup(): GitActivitySummaryGroup {
|
|
5653
|
+
return { key: "", measures: undefined };
|
|
5654
|
+
}
|
|
5655
|
+
|
|
5656
|
+
export const GitActivitySummaryGroup: MessageFns<GitActivitySummaryGroup> = {
|
|
5657
|
+
encode(message: GitActivitySummaryGroup, writer: BinaryWriter = new BinaryWriter()): BinaryWriter {
|
|
5658
|
+
if (message.key !== "") {
|
|
5659
|
+
writer.uint32(10).string(message.key);
|
|
5660
|
+
}
|
|
5661
|
+
if (message.measures !== undefined) {
|
|
5662
|
+
GitActivityMeasures.encode(message.measures, writer.uint32(18).fork()).join();
|
|
5663
|
+
}
|
|
5664
|
+
return writer;
|
|
5665
|
+
},
|
|
5666
|
+
|
|
5667
|
+
decode(input: BinaryReader | Uint8Array, length?: number): GitActivitySummaryGroup {
|
|
5668
|
+
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
|
|
5669
|
+
const previousRecursionDepth = (reader as any).__tsProtoDecodeDepth ?? 0;
|
|
5670
|
+
if (previousRecursionDepth >= 100) {
|
|
5671
|
+
throw new globalThis.Error("protobuf decode recursion limit exceeded");
|
|
5672
|
+
}
|
|
5673
|
+
(reader as any).__tsProtoDecodeDepth = previousRecursionDepth + 1;
|
|
5674
|
+
try {
|
|
5675
|
+
const end = length === undefined ? reader.len : reader.pos + length;
|
|
5676
|
+
const message = createBaseGitActivitySummaryGroup();
|
|
5677
|
+
while (reader.pos < end) {
|
|
5678
|
+
const tag = reader.uint32();
|
|
5679
|
+
switch (tag >>> 3) {
|
|
5680
|
+
case 1: {
|
|
5681
|
+
if (tag !== 10) {
|
|
5682
|
+
break;
|
|
5683
|
+
}
|
|
5684
|
+
|
|
5685
|
+
message.key = reader.string();
|
|
5686
|
+
continue;
|
|
5687
|
+
}
|
|
5688
|
+
case 2: {
|
|
5689
|
+
if (tag !== 18) {
|
|
5690
|
+
break;
|
|
5691
|
+
}
|
|
5692
|
+
|
|
5693
|
+
message.measures = GitActivityMeasures.decode(reader, reader.uint32());
|
|
5694
|
+
continue;
|
|
5695
|
+
}
|
|
5696
|
+
}
|
|
5697
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
5698
|
+
break;
|
|
5699
|
+
}
|
|
5700
|
+
reader.skip(tag & 7);
|
|
5701
|
+
}
|
|
5702
|
+
return message;
|
|
5703
|
+
} finally {
|
|
5704
|
+
(reader as any).__tsProtoDecodeDepth = previousRecursionDepth;
|
|
5705
|
+
}
|
|
5706
|
+
},
|
|
5707
|
+
|
|
5708
|
+
fromJSON(object: any): GitActivitySummaryGroup {
|
|
5709
|
+
return {
|
|
5710
|
+
key: isSet(object.key) ? globalThis.String(object.key) : "",
|
|
5711
|
+
measures: isSet(object.measures) ? GitActivityMeasures.fromJSON(object.measures) : undefined,
|
|
5712
|
+
};
|
|
5713
|
+
},
|
|
5714
|
+
|
|
5715
|
+
toJSON(message: GitActivitySummaryGroup): unknown {
|
|
5716
|
+
const obj: any = {};
|
|
5717
|
+
if (message.key !== "") {
|
|
5718
|
+
obj.key = message.key;
|
|
5719
|
+
}
|
|
5720
|
+
if (message.measures !== undefined) {
|
|
5721
|
+
obj.measures = GitActivityMeasures.toJSON(message.measures);
|
|
5722
|
+
}
|
|
5723
|
+
return obj;
|
|
5724
|
+
},
|
|
5725
|
+
|
|
5726
|
+
create<I extends Exact<DeepPartial<GitActivitySummaryGroup>, I>>(base?: I): GitActivitySummaryGroup {
|
|
5727
|
+
return GitActivitySummaryGroup.fromPartial(base ?? ({} as any));
|
|
5728
|
+
},
|
|
5729
|
+
fromPartial<I extends Exact<DeepPartial<GitActivitySummaryGroup>, I>>(object: I): GitActivitySummaryGroup {
|
|
5730
|
+
const message = createBaseGitActivitySummaryGroup();
|
|
5731
|
+
message.key = object.key ?? "";
|
|
5732
|
+
message.measures = (object.measures !== undefined && object.measures !== null)
|
|
5733
|
+
? GitActivityMeasures.fromPartial(object.measures)
|
|
5734
|
+
: undefined;
|
|
5735
|
+
return message;
|
|
5736
|
+
},
|
|
5737
|
+
};
|
|
5738
|
+
|
|
5739
|
+
function createBaseGitActivityMeasures(): GitActivityMeasures {
|
|
5740
|
+
return {
|
|
5741
|
+
total: 0,
|
|
5742
|
+
branchesCreated: 0,
|
|
5743
|
+
commits: 0,
|
|
5744
|
+
pushes: 0,
|
|
5745
|
+
pullRequestsCreated: 0,
|
|
5746
|
+
pullRequestsMerged: 0,
|
|
5747
|
+
filesChanged: 0,
|
|
5748
|
+
insertions: 0,
|
|
5749
|
+
deletions: 0,
|
|
5750
|
+
distinctRepositories: 0,
|
|
5751
|
+
distinctSessions: 0,
|
|
5752
|
+
};
|
|
5753
|
+
}
|
|
5754
|
+
|
|
5755
|
+
export const GitActivityMeasures: MessageFns<GitActivityMeasures> = {
|
|
5756
|
+
encode(message: GitActivityMeasures, writer: BinaryWriter = new BinaryWriter()): BinaryWriter {
|
|
5757
|
+
if (message.total !== 0) {
|
|
5758
|
+
writer.uint32(8).uint64(message.total);
|
|
5759
|
+
}
|
|
5760
|
+
if (message.branchesCreated !== 0) {
|
|
5761
|
+
writer.uint32(16).uint64(message.branchesCreated);
|
|
5762
|
+
}
|
|
5763
|
+
if (message.commits !== 0) {
|
|
5764
|
+
writer.uint32(24).uint64(message.commits);
|
|
5765
|
+
}
|
|
5766
|
+
if (message.pushes !== 0) {
|
|
5767
|
+
writer.uint32(32).uint64(message.pushes);
|
|
5768
|
+
}
|
|
5769
|
+
if (message.pullRequestsCreated !== 0) {
|
|
5770
|
+
writer.uint32(40).uint64(message.pullRequestsCreated);
|
|
5771
|
+
}
|
|
5772
|
+
if (message.pullRequestsMerged !== 0) {
|
|
5773
|
+
writer.uint32(48).uint64(message.pullRequestsMerged);
|
|
5774
|
+
}
|
|
5775
|
+
if (message.filesChanged !== 0) {
|
|
5776
|
+
writer.uint32(56).uint64(message.filesChanged);
|
|
5777
|
+
}
|
|
5778
|
+
if (message.insertions !== 0) {
|
|
5779
|
+
writer.uint32(64).uint64(message.insertions);
|
|
5780
|
+
}
|
|
5781
|
+
if (message.deletions !== 0) {
|
|
5782
|
+
writer.uint32(72).uint64(message.deletions);
|
|
5783
|
+
}
|
|
5784
|
+
if (message.distinctRepositories !== 0) {
|
|
5785
|
+
writer.uint32(80).uint64(message.distinctRepositories);
|
|
5786
|
+
}
|
|
5787
|
+
if (message.distinctSessions !== 0) {
|
|
5788
|
+
writer.uint32(88).uint64(message.distinctSessions);
|
|
5789
|
+
}
|
|
5790
|
+
return writer;
|
|
5791
|
+
},
|
|
5792
|
+
|
|
5793
|
+
decode(input: BinaryReader | Uint8Array, length?: number): GitActivityMeasures {
|
|
5794
|
+
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
|
|
5795
|
+
const previousRecursionDepth = (reader as any).__tsProtoDecodeDepth ?? 0;
|
|
5796
|
+
if (previousRecursionDepth >= 100) {
|
|
5797
|
+
throw new globalThis.Error("protobuf decode recursion limit exceeded");
|
|
5798
|
+
}
|
|
5799
|
+
(reader as any).__tsProtoDecodeDepth = previousRecursionDepth + 1;
|
|
5800
|
+
try {
|
|
5801
|
+
const end = length === undefined ? reader.len : reader.pos + length;
|
|
5802
|
+
const message = createBaseGitActivityMeasures();
|
|
5803
|
+
while (reader.pos < end) {
|
|
5804
|
+
const tag = reader.uint32();
|
|
5805
|
+
switch (tag >>> 3) {
|
|
5806
|
+
case 1: {
|
|
5807
|
+
if (tag !== 8) {
|
|
5808
|
+
break;
|
|
5809
|
+
}
|
|
5810
|
+
|
|
5811
|
+
message.total = longToNumber(reader.uint64());
|
|
5812
|
+
continue;
|
|
5813
|
+
}
|
|
5814
|
+
case 2: {
|
|
5815
|
+
if (tag !== 16) {
|
|
5816
|
+
break;
|
|
5817
|
+
}
|
|
5818
|
+
|
|
5819
|
+
message.branchesCreated = longToNumber(reader.uint64());
|
|
5820
|
+
continue;
|
|
5821
|
+
}
|
|
5822
|
+
case 3: {
|
|
5823
|
+
if (tag !== 24) {
|
|
5824
|
+
break;
|
|
5825
|
+
}
|
|
5826
|
+
|
|
5827
|
+
message.commits = longToNumber(reader.uint64());
|
|
5828
|
+
continue;
|
|
5829
|
+
}
|
|
5830
|
+
case 4: {
|
|
5831
|
+
if (tag !== 32) {
|
|
5832
|
+
break;
|
|
5833
|
+
}
|
|
5834
|
+
|
|
5835
|
+
message.pushes = longToNumber(reader.uint64());
|
|
5836
|
+
continue;
|
|
5837
|
+
}
|
|
5838
|
+
case 5: {
|
|
5839
|
+
if (tag !== 40) {
|
|
5840
|
+
break;
|
|
5841
|
+
}
|
|
5842
|
+
|
|
5843
|
+
message.pullRequestsCreated = longToNumber(reader.uint64());
|
|
5844
|
+
continue;
|
|
5845
|
+
}
|
|
5846
|
+
case 6: {
|
|
5847
|
+
if (tag !== 48) {
|
|
5848
|
+
break;
|
|
5849
|
+
}
|
|
5850
|
+
|
|
5851
|
+
message.pullRequestsMerged = longToNumber(reader.uint64());
|
|
5852
|
+
continue;
|
|
5853
|
+
}
|
|
5854
|
+
case 7: {
|
|
5855
|
+
if (tag !== 56) {
|
|
5856
|
+
break;
|
|
5857
|
+
}
|
|
5858
|
+
|
|
5859
|
+
message.filesChanged = longToNumber(reader.uint64());
|
|
5860
|
+
continue;
|
|
5861
|
+
}
|
|
5862
|
+
case 8: {
|
|
5863
|
+
if (tag !== 64) {
|
|
5864
|
+
break;
|
|
5865
|
+
}
|
|
5866
|
+
|
|
5867
|
+
message.insertions = longToNumber(reader.uint64());
|
|
5868
|
+
continue;
|
|
5869
|
+
}
|
|
5870
|
+
case 9: {
|
|
5871
|
+
if (tag !== 72) {
|
|
5872
|
+
break;
|
|
5873
|
+
}
|
|
5874
|
+
|
|
5875
|
+
message.deletions = longToNumber(reader.uint64());
|
|
5876
|
+
continue;
|
|
5877
|
+
}
|
|
5878
|
+
case 10: {
|
|
5879
|
+
if (tag !== 80) {
|
|
5880
|
+
break;
|
|
5881
|
+
}
|
|
5882
|
+
|
|
5883
|
+
message.distinctRepositories = longToNumber(reader.uint64());
|
|
5884
|
+
continue;
|
|
5885
|
+
}
|
|
5886
|
+
case 11: {
|
|
5887
|
+
if (tag !== 88) {
|
|
5888
|
+
break;
|
|
5889
|
+
}
|
|
5890
|
+
|
|
5891
|
+
message.distinctSessions = longToNumber(reader.uint64());
|
|
5892
|
+
continue;
|
|
5893
|
+
}
|
|
5894
|
+
}
|
|
5895
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
5896
|
+
break;
|
|
5897
|
+
}
|
|
5898
|
+
reader.skip(tag & 7);
|
|
5899
|
+
}
|
|
5900
|
+
return message;
|
|
5901
|
+
} finally {
|
|
5902
|
+
(reader as any).__tsProtoDecodeDepth = previousRecursionDepth;
|
|
5903
|
+
}
|
|
5904
|
+
},
|
|
5905
|
+
|
|
5906
|
+
fromJSON(object: any): GitActivityMeasures {
|
|
5907
|
+
return {
|
|
5908
|
+
total: isSet(object.total) ? globalThis.Number(object.total) : 0,
|
|
5909
|
+
branchesCreated: isSet(object.branchesCreated)
|
|
5910
|
+
? globalThis.Number(object.branchesCreated)
|
|
5911
|
+
: isSet(object.branches_created)
|
|
5912
|
+
? globalThis.Number(object.branches_created)
|
|
5913
|
+
: 0,
|
|
5914
|
+
commits: isSet(object.commits) ? globalThis.Number(object.commits) : 0,
|
|
5915
|
+
pushes: isSet(object.pushes) ? globalThis.Number(object.pushes) : 0,
|
|
5916
|
+
pullRequestsCreated: isSet(object.pullRequestsCreated)
|
|
5917
|
+
? globalThis.Number(object.pullRequestsCreated)
|
|
5918
|
+
: isSet(object.pull_requests_created)
|
|
5919
|
+
? globalThis.Number(object.pull_requests_created)
|
|
5920
|
+
: 0,
|
|
5921
|
+
pullRequestsMerged: isSet(object.pullRequestsMerged)
|
|
5922
|
+
? globalThis.Number(object.pullRequestsMerged)
|
|
5923
|
+
: isSet(object.pull_requests_merged)
|
|
5924
|
+
? globalThis.Number(object.pull_requests_merged)
|
|
5925
|
+
: 0,
|
|
5926
|
+
filesChanged: isSet(object.filesChanged)
|
|
5927
|
+
? globalThis.Number(object.filesChanged)
|
|
5928
|
+
: isSet(object.files_changed)
|
|
5929
|
+
? globalThis.Number(object.files_changed)
|
|
5930
|
+
: 0,
|
|
5931
|
+
insertions: isSet(object.insertions) ? globalThis.Number(object.insertions) : 0,
|
|
5932
|
+
deletions: isSet(object.deletions) ? globalThis.Number(object.deletions) : 0,
|
|
5933
|
+
distinctRepositories: isSet(object.distinctRepositories)
|
|
5934
|
+
? globalThis.Number(object.distinctRepositories)
|
|
5935
|
+
: isSet(object.distinct_repositories)
|
|
5936
|
+
? globalThis.Number(object.distinct_repositories)
|
|
5937
|
+
: 0,
|
|
5938
|
+
distinctSessions: isSet(object.distinctSessions)
|
|
5939
|
+
? globalThis.Number(object.distinctSessions)
|
|
5940
|
+
: isSet(object.distinct_sessions)
|
|
5941
|
+
? globalThis.Number(object.distinct_sessions)
|
|
5942
|
+
: 0,
|
|
5943
|
+
};
|
|
5944
|
+
},
|
|
5945
|
+
|
|
5946
|
+
toJSON(message: GitActivityMeasures): unknown {
|
|
5947
|
+
const obj: any = {};
|
|
5948
|
+
if (message.total !== 0) {
|
|
5949
|
+
obj.total = Math.round(message.total);
|
|
5950
|
+
}
|
|
5951
|
+
if (message.branchesCreated !== 0) {
|
|
5952
|
+
obj.branchesCreated = Math.round(message.branchesCreated);
|
|
5953
|
+
}
|
|
5954
|
+
if (message.commits !== 0) {
|
|
5955
|
+
obj.commits = Math.round(message.commits);
|
|
5956
|
+
}
|
|
5957
|
+
if (message.pushes !== 0) {
|
|
5958
|
+
obj.pushes = Math.round(message.pushes);
|
|
5959
|
+
}
|
|
5960
|
+
if (message.pullRequestsCreated !== 0) {
|
|
5961
|
+
obj.pullRequestsCreated = Math.round(message.pullRequestsCreated);
|
|
5962
|
+
}
|
|
5963
|
+
if (message.pullRequestsMerged !== 0) {
|
|
5964
|
+
obj.pullRequestsMerged = Math.round(message.pullRequestsMerged);
|
|
5965
|
+
}
|
|
5966
|
+
if (message.filesChanged !== 0) {
|
|
5967
|
+
obj.filesChanged = Math.round(message.filesChanged);
|
|
5968
|
+
}
|
|
5969
|
+
if (message.insertions !== 0) {
|
|
5970
|
+
obj.insertions = Math.round(message.insertions);
|
|
5971
|
+
}
|
|
5972
|
+
if (message.deletions !== 0) {
|
|
5973
|
+
obj.deletions = Math.round(message.deletions);
|
|
5974
|
+
}
|
|
5975
|
+
if (message.distinctRepositories !== 0) {
|
|
5976
|
+
obj.distinctRepositories = Math.round(message.distinctRepositories);
|
|
5977
|
+
}
|
|
5978
|
+
if (message.distinctSessions !== 0) {
|
|
5979
|
+
obj.distinctSessions = Math.round(message.distinctSessions);
|
|
5980
|
+
}
|
|
5981
|
+
return obj;
|
|
5982
|
+
},
|
|
5983
|
+
|
|
5984
|
+
create<I extends Exact<DeepPartial<GitActivityMeasures>, I>>(base?: I): GitActivityMeasures {
|
|
5985
|
+
return GitActivityMeasures.fromPartial(base ?? ({} as any));
|
|
5986
|
+
},
|
|
5987
|
+
fromPartial<I extends Exact<DeepPartial<GitActivityMeasures>, I>>(object: I): GitActivityMeasures {
|
|
5988
|
+
const message = createBaseGitActivityMeasures();
|
|
5989
|
+
message.total = object.total ?? 0;
|
|
5990
|
+
message.branchesCreated = object.branchesCreated ?? 0;
|
|
5991
|
+
message.commits = object.commits ?? 0;
|
|
5992
|
+
message.pushes = object.pushes ?? 0;
|
|
5993
|
+
message.pullRequestsCreated = object.pullRequestsCreated ?? 0;
|
|
5994
|
+
message.pullRequestsMerged = object.pullRequestsMerged ?? 0;
|
|
5995
|
+
message.filesChanged = object.filesChanged ?? 0;
|
|
5996
|
+
message.insertions = object.insertions ?? 0;
|
|
5997
|
+
message.deletions = object.deletions ?? 0;
|
|
5998
|
+
message.distinctRepositories = object.distinctRepositories ?? 0;
|
|
5999
|
+
message.distinctSessions = object.distinctSessions ?? 0;
|
|
6000
|
+
return message;
|
|
6001
|
+
},
|
|
6002
|
+
};
|
|
6003
|
+
|
|
6004
|
+
function createBaseAIFileStateFilter(): AIFileStateFilter {
|
|
6005
|
+
return {
|
|
6006
|
+
repositoryKey: [],
|
|
6007
|
+
ref: [],
|
|
6008
|
+
state: [],
|
|
6009
|
+
tier: [],
|
|
6010
|
+
sessionId: [],
|
|
6011
|
+
minAge: undefined,
|
|
6012
|
+
activeAfter: undefined,
|
|
6013
|
+
activeBefore: undefined,
|
|
6014
|
+
abandonedHorizon: undefined,
|
|
6015
|
+
};
|
|
6016
|
+
}
|
|
6017
|
+
|
|
6018
|
+
export const AIFileStateFilter: MessageFns<AIFileStateFilter> = {
|
|
6019
|
+
encode(message: AIFileStateFilter, writer: BinaryWriter = new BinaryWriter()): BinaryWriter {
|
|
6020
|
+
for (const v of message.repositoryKey) {
|
|
6021
|
+
writer.uint32(10).string(v!);
|
|
6022
|
+
}
|
|
6023
|
+
for (const v of message.ref) {
|
|
6024
|
+
writer.uint32(18).string(v!);
|
|
6025
|
+
}
|
|
6026
|
+
writer.uint32(26).fork();
|
|
6027
|
+
for (const v of message.state) {
|
|
6028
|
+
writer.int32(v);
|
|
6029
|
+
}
|
|
6030
|
+
writer.join();
|
|
6031
|
+
writer.uint32(34).fork();
|
|
6032
|
+
for (const v of message.tier) {
|
|
6033
|
+
writer.int32(v);
|
|
6034
|
+
}
|
|
6035
|
+
writer.join();
|
|
6036
|
+
for (const v of message.sessionId) {
|
|
6037
|
+
writer.uint32(42).string(v!);
|
|
6038
|
+
}
|
|
6039
|
+
if (message.minAge !== undefined) {
|
|
6040
|
+
Duration.encode(message.minAge, writer.uint32(50).fork()).join();
|
|
6041
|
+
}
|
|
6042
|
+
if (message.activeAfter !== undefined) {
|
|
6043
|
+
Timestamp.encode(toTimestamp(message.activeAfter), writer.uint32(58).fork()).join();
|
|
6044
|
+
}
|
|
6045
|
+
if (message.activeBefore !== undefined) {
|
|
6046
|
+
Timestamp.encode(toTimestamp(message.activeBefore), writer.uint32(66).fork()).join();
|
|
6047
|
+
}
|
|
6048
|
+
if (message.abandonedHorizon !== undefined) {
|
|
6049
|
+
Duration.encode(message.abandonedHorizon, writer.uint32(74).fork()).join();
|
|
6050
|
+
}
|
|
6051
|
+
return writer;
|
|
6052
|
+
},
|
|
6053
|
+
|
|
6054
|
+
decode(input: BinaryReader | Uint8Array, length?: number): AIFileStateFilter {
|
|
6055
|
+
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
|
|
6056
|
+
const previousRecursionDepth = (reader as any).__tsProtoDecodeDepth ?? 0;
|
|
6057
|
+
if (previousRecursionDepth >= 100) {
|
|
6058
|
+
throw new globalThis.Error("protobuf decode recursion limit exceeded");
|
|
6059
|
+
}
|
|
6060
|
+
(reader as any).__tsProtoDecodeDepth = previousRecursionDepth + 1;
|
|
6061
|
+
try {
|
|
6062
|
+
const end = length === undefined ? reader.len : reader.pos + length;
|
|
6063
|
+
const message = createBaseAIFileStateFilter();
|
|
6064
|
+
while (reader.pos < end) {
|
|
6065
|
+
const tag = reader.uint32();
|
|
6066
|
+
switch (tag >>> 3) {
|
|
6067
|
+
case 1: {
|
|
6068
|
+
if (tag !== 10) {
|
|
6069
|
+
break;
|
|
6070
|
+
}
|
|
6071
|
+
|
|
6072
|
+
message.repositoryKey.push(reader.string());
|
|
6073
|
+
continue;
|
|
6074
|
+
}
|
|
6075
|
+
case 2: {
|
|
6076
|
+
if (tag !== 18) {
|
|
6077
|
+
break;
|
|
6078
|
+
}
|
|
6079
|
+
|
|
6080
|
+
message.ref.push(reader.string());
|
|
6081
|
+
continue;
|
|
6082
|
+
}
|
|
6083
|
+
case 3: {
|
|
6084
|
+
if (tag === 24) {
|
|
6085
|
+
message.state.push(reader.int32() as any);
|
|
6086
|
+
|
|
6087
|
+
continue;
|
|
6088
|
+
}
|
|
6089
|
+
|
|
6090
|
+
if (tag === 26) {
|
|
6091
|
+
const end2 = reader.uint32() + reader.pos;
|
|
6092
|
+
while (reader.pos < end2) {
|
|
6093
|
+
message.state.push(reader.int32() as any);
|
|
6094
|
+
}
|
|
6095
|
+
|
|
6096
|
+
continue;
|
|
6097
|
+
}
|
|
6098
|
+
|
|
6099
|
+
break;
|
|
6100
|
+
}
|
|
6101
|
+
case 4: {
|
|
6102
|
+
if (tag === 32) {
|
|
6103
|
+
message.tier.push(reader.int32() as any);
|
|
6104
|
+
|
|
6105
|
+
continue;
|
|
6106
|
+
}
|
|
6107
|
+
|
|
6108
|
+
if (tag === 34) {
|
|
6109
|
+
const end2 = reader.uint32() + reader.pos;
|
|
6110
|
+
while (reader.pos < end2) {
|
|
6111
|
+
message.tier.push(reader.int32() as any);
|
|
6112
|
+
}
|
|
6113
|
+
|
|
6114
|
+
continue;
|
|
6115
|
+
}
|
|
6116
|
+
|
|
6117
|
+
break;
|
|
6118
|
+
}
|
|
6119
|
+
case 5: {
|
|
6120
|
+
if (tag !== 42) {
|
|
6121
|
+
break;
|
|
6122
|
+
}
|
|
6123
|
+
|
|
6124
|
+
message.sessionId.push(reader.string());
|
|
6125
|
+
continue;
|
|
6126
|
+
}
|
|
6127
|
+
case 6: {
|
|
6128
|
+
if (tag !== 50) {
|
|
6129
|
+
break;
|
|
6130
|
+
}
|
|
6131
|
+
|
|
6132
|
+
message.minAge = Duration.decode(reader, reader.uint32());
|
|
6133
|
+
continue;
|
|
6134
|
+
}
|
|
6135
|
+
case 7: {
|
|
6136
|
+
if (tag !== 58) {
|
|
6137
|
+
break;
|
|
6138
|
+
}
|
|
6139
|
+
|
|
6140
|
+
message.activeAfter = fromTimestamp(Timestamp.decode(reader, reader.uint32()));
|
|
6141
|
+
continue;
|
|
6142
|
+
}
|
|
6143
|
+
case 8: {
|
|
6144
|
+
if (tag !== 66) {
|
|
6145
|
+
break;
|
|
6146
|
+
}
|
|
6147
|
+
|
|
6148
|
+
message.activeBefore = fromTimestamp(Timestamp.decode(reader, reader.uint32()));
|
|
6149
|
+
continue;
|
|
6150
|
+
}
|
|
6151
|
+
case 9: {
|
|
6152
|
+
if (tag !== 74) {
|
|
6153
|
+
break;
|
|
6154
|
+
}
|
|
6155
|
+
|
|
6156
|
+
message.abandonedHorizon = Duration.decode(reader, reader.uint32());
|
|
6157
|
+
continue;
|
|
6158
|
+
}
|
|
6159
|
+
}
|
|
6160
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
6161
|
+
break;
|
|
6162
|
+
}
|
|
6163
|
+
reader.skip(tag & 7);
|
|
6164
|
+
}
|
|
6165
|
+
return message;
|
|
6166
|
+
} finally {
|
|
6167
|
+
(reader as any).__tsProtoDecodeDepth = previousRecursionDepth;
|
|
6168
|
+
}
|
|
6169
|
+
},
|
|
6170
|
+
|
|
6171
|
+
fromJSON(object: any): AIFileStateFilter {
|
|
6172
|
+
return {
|
|
6173
|
+
repositoryKey: globalThis.Array.isArray(object?.repositoryKey)
|
|
6174
|
+
? object.repositoryKey.map((e: any) => globalThis.String(e))
|
|
6175
|
+
: globalThis.Array.isArray(object?.repository_key)
|
|
6176
|
+
? object.repository_key.map((e: any) => globalThis.String(e))
|
|
6177
|
+
: [],
|
|
6178
|
+
ref: globalThis.Array.isArray(object?.ref) ? object.ref.map((e: any) => globalThis.String(e)) : [],
|
|
6179
|
+
state: globalThis.Array.isArray(object?.state) ? object.state.map((e: any) => aIFileLifecycleFromJSON(e)) : [],
|
|
6180
|
+
tier: globalThis.Array.isArray(object?.tier) ? object.tier.map((e: any) => aIFileTierFromJSON(e)) : [],
|
|
6181
|
+
sessionId: globalThis.Array.isArray(object?.sessionId)
|
|
6182
|
+
? object.sessionId.map((e: any) => globalThis.String(e))
|
|
6183
|
+
: globalThis.Array.isArray(object?.session_id)
|
|
6184
|
+
? object.session_id.map((e: any) => globalThis.String(e))
|
|
6185
|
+
: [],
|
|
6186
|
+
minAge: isSet(object.minAge)
|
|
6187
|
+
? Duration.fromJSON(object.minAge)
|
|
6188
|
+
: isSet(object.min_age)
|
|
6189
|
+
? Duration.fromJSON(object.min_age)
|
|
6190
|
+
: undefined,
|
|
6191
|
+
activeAfter: isSet(object.activeAfter)
|
|
6192
|
+
? fromJsonTimestamp(object.activeAfter)
|
|
6193
|
+
: isSet(object.active_after)
|
|
6194
|
+
? fromJsonTimestamp(object.active_after)
|
|
6195
|
+
: undefined,
|
|
6196
|
+
activeBefore: isSet(object.activeBefore)
|
|
6197
|
+
? fromJsonTimestamp(object.activeBefore)
|
|
6198
|
+
: isSet(object.active_before)
|
|
6199
|
+
? fromJsonTimestamp(object.active_before)
|
|
6200
|
+
: undefined,
|
|
6201
|
+
abandonedHorizon: isSet(object.abandonedHorizon)
|
|
6202
|
+
? Duration.fromJSON(object.abandonedHorizon)
|
|
6203
|
+
: isSet(object.abandoned_horizon)
|
|
6204
|
+
? Duration.fromJSON(object.abandoned_horizon)
|
|
6205
|
+
: undefined,
|
|
6206
|
+
};
|
|
6207
|
+
},
|
|
6208
|
+
|
|
6209
|
+
toJSON(message: AIFileStateFilter): unknown {
|
|
6210
|
+
const obj: any = {};
|
|
6211
|
+
if (message.repositoryKey?.length) {
|
|
6212
|
+
obj.repositoryKey = message.repositoryKey;
|
|
6213
|
+
}
|
|
6214
|
+
if (message.ref?.length) {
|
|
6215
|
+
obj.ref = message.ref;
|
|
6216
|
+
}
|
|
6217
|
+
if (message.state?.length) {
|
|
6218
|
+
obj.state = message.state.map((e) => aIFileLifecycleToJSON(e));
|
|
6219
|
+
}
|
|
6220
|
+
if (message.tier?.length) {
|
|
6221
|
+
obj.tier = message.tier.map((e) => aIFileTierToJSON(e));
|
|
6222
|
+
}
|
|
6223
|
+
if (message.sessionId?.length) {
|
|
6224
|
+
obj.sessionId = message.sessionId;
|
|
6225
|
+
}
|
|
6226
|
+
if (message.minAge !== undefined) {
|
|
6227
|
+
obj.minAge = Duration.toJSON(message.minAge);
|
|
6228
|
+
}
|
|
6229
|
+
if (message.activeAfter !== undefined) {
|
|
6230
|
+
obj.activeAfter = message.activeAfter.toISOString();
|
|
6231
|
+
}
|
|
6232
|
+
if (message.activeBefore !== undefined) {
|
|
6233
|
+
obj.activeBefore = message.activeBefore.toISOString();
|
|
6234
|
+
}
|
|
6235
|
+
if (message.abandonedHorizon !== undefined) {
|
|
6236
|
+
obj.abandonedHorizon = Duration.toJSON(message.abandonedHorizon);
|
|
6237
|
+
}
|
|
6238
|
+
return obj;
|
|
6239
|
+
},
|
|
6240
|
+
|
|
6241
|
+
create<I extends Exact<DeepPartial<AIFileStateFilter>, I>>(base?: I): AIFileStateFilter {
|
|
6242
|
+
return AIFileStateFilter.fromPartial(base ?? ({} as any));
|
|
6243
|
+
},
|
|
6244
|
+
fromPartial<I extends Exact<DeepPartial<AIFileStateFilter>, I>>(object: I): AIFileStateFilter {
|
|
6245
|
+
const message = createBaseAIFileStateFilter();
|
|
6246
|
+
message.repositoryKey = object.repositoryKey?.map((e) => e) || [];
|
|
6247
|
+
message.ref = object.ref?.map((e) => e) || [];
|
|
6248
|
+
message.state = object.state?.map((e) => e) || [];
|
|
6249
|
+
message.tier = object.tier?.map((e) => e) || [];
|
|
6250
|
+
message.sessionId = object.sessionId?.map((e) => e) || [];
|
|
6251
|
+
message.minAge = (object.minAge !== undefined && object.minAge !== null)
|
|
6252
|
+
? Duration.fromPartial(object.minAge)
|
|
6253
|
+
: undefined;
|
|
6254
|
+
message.activeAfter = object.activeAfter ?? undefined;
|
|
6255
|
+
message.activeBefore = object.activeBefore ?? undefined;
|
|
6256
|
+
message.abandonedHorizon = (object.abandonedHorizon !== undefined && object.abandonedHorizon !== null)
|
|
6257
|
+
? Duration.fromPartial(object.abandonedHorizon)
|
|
6258
|
+
: undefined;
|
|
6259
|
+
return message;
|
|
6260
|
+
},
|
|
6261
|
+
};
|
|
6262
|
+
|
|
6263
|
+
function createBaseListFileStatesRequest(): ListFileStatesRequest {
|
|
6264
|
+
return { organizationId: "", projectId: "", filter: undefined, pageSize: 0, pageToken: "" };
|
|
6265
|
+
}
|
|
6266
|
+
|
|
6267
|
+
export const ListFileStatesRequest: MessageFns<ListFileStatesRequest> = {
|
|
6268
|
+
encode(message: ListFileStatesRequest, writer: BinaryWriter = new BinaryWriter()): BinaryWriter {
|
|
6269
|
+
if (message.organizationId !== "") {
|
|
6270
|
+
writer.uint32(10).string(message.organizationId);
|
|
6271
|
+
}
|
|
6272
|
+
if (message.projectId !== "") {
|
|
6273
|
+
writer.uint32(18).string(message.projectId);
|
|
6274
|
+
}
|
|
6275
|
+
if (message.filter !== undefined) {
|
|
6276
|
+
AIFileStateFilter.encode(message.filter, writer.uint32(26).fork()).join();
|
|
6277
|
+
}
|
|
6278
|
+
if (message.pageSize !== 0) {
|
|
6279
|
+
writer.uint32(32).int32(message.pageSize);
|
|
6280
|
+
}
|
|
6281
|
+
if (message.pageToken !== "") {
|
|
6282
|
+
writer.uint32(42).string(message.pageToken);
|
|
6283
|
+
}
|
|
6284
|
+
return writer;
|
|
6285
|
+
},
|
|
6286
|
+
|
|
6287
|
+
decode(input: BinaryReader | Uint8Array, length?: number): ListFileStatesRequest {
|
|
6288
|
+
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
|
|
6289
|
+
const previousRecursionDepth = (reader as any).__tsProtoDecodeDepth ?? 0;
|
|
6290
|
+
if (previousRecursionDepth >= 100) {
|
|
6291
|
+
throw new globalThis.Error("protobuf decode recursion limit exceeded");
|
|
6292
|
+
}
|
|
6293
|
+
(reader as any).__tsProtoDecodeDepth = previousRecursionDepth + 1;
|
|
6294
|
+
try {
|
|
6295
|
+
const end = length === undefined ? reader.len : reader.pos + length;
|
|
6296
|
+
const message = createBaseListFileStatesRequest();
|
|
6297
|
+
while (reader.pos < end) {
|
|
6298
|
+
const tag = reader.uint32();
|
|
6299
|
+
switch (tag >>> 3) {
|
|
6300
|
+
case 1: {
|
|
6301
|
+
if (tag !== 10) {
|
|
6302
|
+
break;
|
|
6303
|
+
}
|
|
6304
|
+
|
|
6305
|
+
message.organizationId = reader.string();
|
|
6306
|
+
continue;
|
|
6307
|
+
}
|
|
6308
|
+
case 2: {
|
|
6309
|
+
if (tag !== 18) {
|
|
6310
|
+
break;
|
|
6311
|
+
}
|
|
6312
|
+
|
|
6313
|
+
message.projectId = reader.string();
|
|
6314
|
+
continue;
|
|
6315
|
+
}
|
|
6316
|
+
case 3: {
|
|
6317
|
+
if (tag !== 26) {
|
|
6318
|
+
break;
|
|
6319
|
+
}
|
|
6320
|
+
|
|
6321
|
+
message.filter = AIFileStateFilter.decode(reader, reader.uint32());
|
|
6322
|
+
continue;
|
|
6323
|
+
}
|
|
6324
|
+
case 4: {
|
|
6325
|
+
if (tag !== 32) {
|
|
6326
|
+
break;
|
|
6327
|
+
}
|
|
6328
|
+
|
|
6329
|
+
message.pageSize = reader.int32();
|
|
6330
|
+
continue;
|
|
6331
|
+
}
|
|
6332
|
+
case 5: {
|
|
6333
|
+
if (tag !== 42) {
|
|
6334
|
+
break;
|
|
6335
|
+
}
|
|
6336
|
+
|
|
6337
|
+
message.pageToken = reader.string();
|
|
6338
|
+
continue;
|
|
6339
|
+
}
|
|
6340
|
+
}
|
|
6341
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
6342
|
+
break;
|
|
6343
|
+
}
|
|
6344
|
+
reader.skip(tag & 7);
|
|
6345
|
+
}
|
|
6346
|
+
return message;
|
|
6347
|
+
} finally {
|
|
6348
|
+
(reader as any).__tsProtoDecodeDepth = previousRecursionDepth;
|
|
6349
|
+
}
|
|
6350
|
+
},
|
|
6351
|
+
|
|
6352
|
+
fromJSON(object: any): ListFileStatesRequest {
|
|
6353
|
+
return {
|
|
6354
|
+
organizationId: isSet(object.organizationId)
|
|
6355
|
+
? globalThis.String(object.organizationId)
|
|
6356
|
+
: isSet(object.organization_id)
|
|
6357
|
+
? globalThis.String(object.organization_id)
|
|
6358
|
+
: "",
|
|
6359
|
+
projectId: isSet(object.projectId)
|
|
6360
|
+
? globalThis.String(object.projectId)
|
|
6361
|
+
: isSet(object.project_id)
|
|
6362
|
+
? globalThis.String(object.project_id)
|
|
6363
|
+
: "",
|
|
6364
|
+
filter: isSet(object.filter) ? AIFileStateFilter.fromJSON(object.filter) : undefined,
|
|
6365
|
+
pageSize: isSet(object.pageSize)
|
|
6366
|
+
? globalThis.Number(object.pageSize)
|
|
6367
|
+
: isSet(object.page_size)
|
|
6368
|
+
? globalThis.Number(object.page_size)
|
|
6369
|
+
: 0,
|
|
6370
|
+
pageToken: isSet(object.pageToken)
|
|
6371
|
+
? globalThis.String(object.pageToken)
|
|
6372
|
+
: isSet(object.page_token)
|
|
6373
|
+
? globalThis.String(object.page_token)
|
|
6374
|
+
: "",
|
|
6375
|
+
};
|
|
6376
|
+
},
|
|
6377
|
+
|
|
6378
|
+
toJSON(message: ListFileStatesRequest): unknown {
|
|
6379
|
+
const obj: any = {};
|
|
6380
|
+
if (message.organizationId !== "") {
|
|
6381
|
+
obj.organizationId = message.organizationId;
|
|
6382
|
+
}
|
|
6383
|
+
if (message.projectId !== "") {
|
|
6384
|
+
obj.projectId = message.projectId;
|
|
6385
|
+
}
|
|
6386
|
+
if (message.filter !== undefined) {
|
|
6387
|
+
obj.filter = AIFileStateFilter.toJSON(message.filter);
|
|
6388
|
+
}
|
|
6389
|
+
if (message.pageSize !== 0) {
|
|
6390
|
+
obj.pageSize = Math.round(message.pageSize);
|
|
6391
|
+
}
|
|
6392
|
+
if (message.pageToken !== "") {
|
|
6393
|
+
obj.pageToken = message.pageToken;
|
|
6394
|
+
}
|
|
6395
|
+
return obj;
|
|
6396
|
+
},
|
|
6397
|
+
|
|
6398
|
+
create<I extends Exact<DeepPartial<ListFileStatesRequest>, I>>(base?: I): ListFileStatesRequest {
|
|
6399
|
+
return ListFileStatesRequest.fromPartial(base ?? ({} as any));
|
|
6400
|
+
},
|
|
6401
|
+
fromPartial<I extends Exact<DeepPartial<ListFileStatesRequest>, I>>(object: I): ListFileStatesRequest {
|
|
6402
|
+
const message = createBaseListFileStatesRequest();
|
|
6403
|
+
message.organizationId = object.organizationId ?? "";
|
|
6404
|
+
message.projectId = object.projectId ?? "";
|
|
6405
|
+
message.filter = (object.filter !== undefined && object.filter !== null)
|
|
6406
|
+
? AIFileStateFilter.fromPartial(object.filter)
|
|
6407
|
+
: undefined;
|
|
6408
|
+
message.pageSize = object.pageSize ?? 0;
|
|
6409
|
+
message.pageToken = object.pageToken ?? "";
|
|
6410
|
+
return message;
|
|
6411
|
+
},
|
|
6412
|
+
};
|
|
6413
|
+
|
|
6414
|
+
function createBaseListFileStatesResponse(): ListFileStatesResponse {
|
|
6415
|
+
return { status: undefined, files: [], nextPageToken: "" };
|
|
6416
|
+
}
|
|
6417
|
+
|
|
6418
|
+
export const ListFileStatesResponse: MessageFns<ListFileStatesResponse> = {
|
|
6419
|
+
encode(message: ListFileStatesResponse, writer: BinaryWriter = new BinaryWriter()): BinaryWriter {
|
|
6420
|
+
if (message.status !== undefined) {
|
|
6421
|
+
ResponseStatus.encode(message.status, writer.uint32(10).fork()).join();
|
|
6422
|
+
}
|
|
6423
|
+
for (const v of message.files) {
|
|
6424
|
+
AIFileStateRow.encode(v!, writer.uint32(18).fork()).join();
|
|
6425
|
+
}
|
|
6426
|
+
if (message.nextPageToken !== "") {
|
|
6427
|
+
writer.uint32(26).string(message.nextPageToken);
|
|
6428
|
+
}
|
|
6429
|
+
return writer;
|
|
6430
|
+
},
|
|
6431
|
+
|
|
6432
|
+
decode(input: BinaryReader | Uint8Array, length?: number): ListFileStatesResponse {
|
|
6433
|
+
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
|
|
6434
|
+
const previousRecursionDepth = (reader as any).__tsProtoDecodeDepth ?? 0;
|
|
6435
|
+
if (previousRecursionDepth >= 100) {
|
|
6436
|
+
throw new globalThis.Error("protobuf decode recursion limit exceeded");
|
|
6437
|
+
}
|
|
6438
|
+
(reader as any).__tsProtoDecodeDepth = previousRecursionDepth + 1;
|
|
6439
|
+
try {
|
|
6440
|
+
const end = length === undefined ? reader.len : reader.pos + length;
|
|
6441
|
+
const message = createBaseListFileStatesResponse();
|
|
6442
|
+
while (reader.pos < end) {
|
|
6443
|
+
const tag = reader.uint32();
|
|
6444
|
+
switch (tag >>> 3) {
|
|
6445
|
+
case 1: {
|
|
6446
|
+
if (tag !== 10) {
|
|
6447
|
+
break;
|
|
6448
|
+
}
|
|
6449
|
+
|
|
6450
|
+
message.status = ResponseStatus.decode(reader, reader.uint32());
|
|
6451
|
+
continue;
|
|
6452
|
+
}
|
|
6453
|
+
case 2: {
|
|
6454
|
+
if (tag !== 18) {
|
|
6455
|
+
break;
|
|
6456
|
+
}
|
|
6457
|
+
|
|
6458
|
+
message.files.push(AIFileStateRow.decode(reader, reader.uint32()));
|
|
6459
|
+
continue;
|
|
6460
|
+
}
|
|
6461
|
+
case 3: {
|
|
6462
|
+
if (tag !== 26) {
|
|
6463
|
+
break;
|
|
6464
|
+
}
|
|
6465
|
+
|
|
6466
|
+
message.nextPageToken = reader.string();
|
|
6467
|
+
continue;
|
|
6468
|
+
}
|
|
6469
|
+
}
|
|
6470
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
6471
|
+
break;
|
|
6472
|
+
}
|
|
6473
|
+
reader.skip(tag & 7);
|
|
6474
|
+
}
|
|
6475
|
+
return message;
|
|
6476
|
+
} finally {
|
|
6477
|
+
(reader as any).__tsProtoDecodeDepth = previousRecursionDepth;
|
|
6478
|
+
}
|
|
6479
|
+
},
|
|
6480
|
+
|
|
6481
|
+
fromJSON(object: any): ListFileStatesResponse {
|
|
6482
|
+
return {
|
|
6483
|
+
status: isSet(object.status) ? ResponseStatus.fromJSON(object.status) : undefined,
|
|
6484
|
+
files: globalThis.Array.isArray(object?.files) ? object.files.map((e: any) => AIFileStateRow.fromJSON(e)) : [],
|
|
6485
|
+
nextPageToken: isSet(object.nextPageToken)
|
|
6486
|
+
? globalThis.String(object.nextPageToken)
|
|
6487
|
+
: isSet(object.next_page_token)
|
|
6488
|
+
? globalThis.String(object.next_page_token)
|
|
6489
|
+
: "",
|
|
6490
|
+
};
|
|
6491
|
+
},
|
|
6492
|
+
|
|
6493
|
+
toJSON(message: ListFileStatesResponse): unknown {
|
|
6494
|
+
const obj: any = {};
|
|
6495
|
+
if (message.status !== undefined) {
|
|
6496
|
+
obj.status = ResponseStatus.toJSON(message.status);
|
|
6497
|
+
}
|
|
6498
|
+
if (message.files?.length) {
|
|
6499
|
+
obj.files = message.files.map((e) => AIFileStateRow.toJSON(e));
|
|
6500
|
+
}
|
|
6501
|
+
if (message.nextPageToken !== "") {
|
|
6502
|
+
obj.nextPageToken = message.nextPageToken;
|
|
6503
|
+
}
|
|
6504
|
+
return obj;
|
|
6505
|
+
},
|
|
6506
|
+
|
|
6507
|
+
create<I extends Exact<DeepPartial<ListFileStatesResponse>, I>>(base?: I): ListFileStatesResponse {
|
|
6508
|
+
return ListFileStatesResponse.fromPartial(base ?? ({} as any));
|
|
6509
|
+
},
|
|
6510
|
+
fromPartial<I extends Exact<DeepPartial<ListFileStatesResponse>, I>>(object: I): ListFileStatesResponse {
|
|
6511
|
+
const message = createBaseListFileStatesResponse();
|
|
6512
|
+
message.status = (object.status !== undefined && object.status !== null)
|
|
6513
|
+
? ResponseStatus.fromPartial(object.status)
|
|
6514
|
+
: undefined;
|
|
6515
|
+
message.files = object.files?.map((e) => AIFileStateRow.fromPartial(e)) || [];
|
|
6516
|
+
message.nextPageToken = object.nextPageToken ?? "";
|
|
6517
|
+
return message;
|
|
6518
|
+
},
|
|
6519
|
+
};
|
|
6520
|
+
|
|
6521
|
+
function createBaseAIFileStateRow(): AIFileStateRow {
|
|
6522
|
+
return {
|
|
6523
|
+
repositoryKey: "",
|
|
6524
|
+
ref: "",
|
|
6525
|
+
path: "",
|
|
6526
|
+
oldPath: "",
|
|
6527
|
+
state: 0,
|
|
6528
|
+
tier: 0,
|
|
6529
|
+
confidence: 0,
|
|
6530
|
+
firstEditedAt: undefined,
|
|
6531
|
+
lastEditedAt: undefined,
|
|
6532
|
+
lastStagedAt: undefined,
|
|
6533
|
+
lastCommittedAt: undefined,
|
|
6534
|
+
lastCommitSha: "",
|
|
6535
|
+
lastPushedAt: undefined,
|
|
6536
|
+
discardedAt: undefined,
|
|
6537
|
+
discardReason: "",
|
|
6538
|
+
editCount: 0,
|
|
6539
|
+
sessionId: [],
|
|
6540
|
+
unlandedCostUsd: 0,
|
|
6541
|
+
unlandedOutputTokens: 0,
|
|
6542
|
+
};
|
|
6543
|
+
}
|
|
6544
|
+
|
|
6545
|
+
export const AIFileStateRow: MessageFns<AIFileStateRow> = {
|
|
6546
|
+
encode(message: AIFileStateRow, writer: BinaryWriter = new BinaryWriter()): BinaryWriter {
|
|
6547
|
+
if (message.repositoryKey !== "") {
|
|
6548
|
+
writer.uint32(10).string(message.repositoryKey);
|
|
6549
|
+
}
|
|
6550
|
+
if (message.ref !== "") {
|
|
6551
|
+
writer.uint32(18).string(message.ref);
|
|
6552
|
+
}
|
|
6553
|
+
if (message.path !== "") {
|
|
6554
|
+
writer.uint32(26).string(message.path);
|
|
6555
|
+
}
|
|
6556
|
+
if (message.oldPath !== "") {
|
|
6557
|
+
writer.uint32(34).string(message.oldPath);
|
|
6558
|
+
}
|
|
6559
|
+
if (message.state !== 0) {
|
|
6560
|
+
writer.uint32(40).int32(message.state);
|
|
6561
|
+
}
|
|
6562
|
+
if (message.tier !== 0) {
|
|
6563
|
+
writer.uint32(48).int32(message.tier);
|
|
6564
|
+
}
|
|
6565
|
+
if (message.confidence !== 0) {
|
|
6566
|
+
writer.uint32(56).int32(message.confidence);
|
|
6567
|
+
}
|
|
6568
|
+
if (message.firstEditedAt !== undefined) {
|
|
6569
|
+
Timestamp.encode(toTimestamp(message.firstEditedAt), writer.uint32(66).fork()).join();
|
|
6570
|
+
}
|
|
6571
|
+
if (message.lastEditedAt !== undefined) {
|
|
6572
|
+
Timestamp.encode(toTimestamp(message.lastEditedAt), writer.uint32(74).fork()).join();
|
|
6573
|
+
}
|
|
6574
|
+
if (message.lastStagedAt !== undefined) {
|
|
6575
|
+
Timestamp.encode(toTimestamp(message.lastStagedAt), writer.uint32(82).fork()).join();
|
|
6576
|
+
}
|
|
6577
|
+
if (message.lastCommittedAt !== undefined) {
|
|
6578
|
+
Timestamp.encode(toTimestamp(message.lastCommittedAt), writer.uint32(90).fork()).join();
|
|
6579
|
+
}
|
|
6580
|
+
if (message.lastCommitSha !== "") {
|
|
6581
|
+
writer.uint32(98).string(message.lastCommitSha);
|
|
6582
|
+
}
|
|
6583
|
+
if (message.lastPushedAt !== undefined) {
|
|
6584
|
+
Timestamp.encode(toTimestamp(message.lastPushedAt), writer.uint32(106).fork()).join();
|
|
6585
|
+
}
|
|
6586
|
+
if (message.discardedAt !== undefined) {
|
|
6587
|
+
Timestamp.encode(toTimestamp(message.discardedAt), writer.uint32(114).fork()).join();
|
|
6588
|
+
}
|
|
6589
|
+
if (message.discardReason !== "") {
|
|
6590
|
+
writer.uint32(122).string(message.discardReason);
|
|
6591
|
+
}
|
|
6592
|
+
if (message.editCount !== 0) {
|
|
6593
|
+
writer.uint32(128).uint32(message.editCount);
|
|
6594
|
+
}
|
|
6595
|
+
for (const v of message.sessionId) {
|
|
6596
|
+
writer.uint32(138).string(v!);
|
|
6597
|
+
}
|
|
6598
|
+
if (message.unlandedCostUsd !== 0) {
|
|
6599
|
+
writer.uint32(145).double(message.unlandedCostUsd);
|
|
6600
|
+
}
|
|
6601
|
+
if (message.unlandedOutputTokens !== 0) {
|
|
6602
|
+
writer.uint32(152).uint64(message.unlandedOutputTokens);
|
|
6603
|
+
}
|
|
6604
|
+
return writer;
|
|
6605
|
+
},
|
|
6606
|
+
|
|
6607
|
+
decode(input: BinaryReader | Uint8Array, length?: number): AIFileStateRow {
|
|
6608
|
+
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
|
|
6609
|
+
const previousRecursionDepth = (reader as any).__tsProtoDecodeDepth ?? 0;
|
|
6610
|
+
if (previousRecursionDepth >= 100) {
|
|
6611
|
+
throw new globalThis.Error("protobuf decode recursion limit exceeded");
|
|
6612
|
+
}
|
|
6613
|
+
(reader as any).__tsProtoDecodeDepth = previousRecursionDepth + 1;
|
|
6614
|
+
try {
|
|
6615
|
+
const end = length === undefined ? reader.len : reader.pos + length;
|
|
6616
|
+
const message = createBaseAIFileStateRow();
|
|
6617
|
+
while (reader.pos < end) {
|
|
6618
|
+
const tag = reader.uint32();
|
|
6619
|
+
switch (tag >>> 3) {
|
|
6620
|
+
case 1: {
|
|
6621
|
+
if (tag !== 10) {
|
|
6622
|
+
break;
|
|
6623
|
+
}
|
|
6624
|
+
|
|
6625
|
+
message.repositoryKey = reader.string();
|
|
6626
|
+
continue;
|
|
6627
|
+
}
|
|
6628
|
+
case 2: {
|
|
6629
|
+
if (tag !== 18) {
|
|
6630
|
+
break;
|
|
6631
|
+
}
|
|
6632
|
+
|
|
6633
|
+
message.ref = reader.string();
|
|
6634
|
+
continue;
|
|
6635
|
+
}
|
|
6636
|
+
case 3: {
|
|
6637
|
+
if (tag !== 26) {
|
|
6638
|
+
break;
|
|
6639
|
+
}
|
|
6640
|
+
|
|
6641
|
+
message.path = reader.string();
|
|
6642
|
+
continue;
|
|
6643
|
+
}
|
|
6644
|
+
case 4: {
|
|
6645
|
+
if (tag !== 34) {
|
|
6646
|
+
break;
|
|
6647
|
+
}
|
|
6648
|
+
|
|
6649
|
+
message.oldPath = reader.string();
|
|
6650
|
+
continue;
|
|
6651
|
+
}
|
|
6652
|
+
case 5: {
|
|
6653
|
+
if (tag !== 40) {
|
|
6654
|
+
break;
|
|
6655
|
+
}
|
|
6656
|
+
|
|
6657
|
+
message.state = reader.int32() as any;
|
|
6658
|
+
continue;
|
|
6659
|
+
}
|
|
6660
|
+
case 6: {
|
|
6661
|
+
if (tag !== 48) {
|
|
6662
|
+
break;
|
|
6663
|
+
}
|
|
6664
|
+
|
|
6665
|
+
message.tier = reader.int32() as any;
|
|
6666
|
+
continue;
|
|
6667
|
+
}
|
|
6668
|
+
case 7: {
|
|
6669
|
+
if (tag !== 56) {
|
|
6670
|
+
break;
|
|
6671
|
+
}
|
|
6672
|
+
|
|
6673
|
+
message.confidence = reader.int32() as any;
|
|
6674
|
+
continue;
|
|
6675
|
+
}
|
|
6676
|
+
case 8: {
|
|
6677
|
+
if (tag !== 66) {
|
|
6678
|
+
break;
|
|
6679
|
+
}
|
|
6680
|
+
|
|
6681
|
+
message.firstEditedAt = fromTimestamp(Timestamp.decode(reader, reader.uint32()));
|
|
6682
|
+
continue;
|
|
6683
|
+
}
|
|
6684
|
+
case 9: {
|
|
6685
|
+
if (tag !== 74) {
|
|
6686
|
+
break;
|
|
6687
|
+
}
|
|
6688
|
+
|
|
6689
|
+
message.lastEditedAt = fromTimestamp(Timestamp.decode(reader, reader.uint32()));
|
|
6690
|
+
continue;
|
|
6691
|
+
}
|
|
6692
|
+
case 10: {
|
|
6693
|
+
if (tag !== 82) {
|
|
6694
|
+
break;
|
|
6695
|
+
}
|
|
6696
|
+
|
|
6697
|
+
message.lastStagedAt = fromTimestamp(Timestamp.decode(reader, reader.uint32()));
|
|
6698
|
+
continue;
|
|
6699
|
+
}
|
|
6700
|
+
case 11: {
|
|
6701
|
+
if (tag !== 90) {
|
|
6702
|
+
break;
|
|
6703
|
+
}
|
|
6704
|
+
|
|
6705
|
+
message.lastCommittedAt = fromTimestamp(Timestamp.decode(reader, reader.uint32()));
|
|
6706
|
+
continue;
|
|
6707
|
+
}
|
|
6708
|
+
case 12: {
|
|
6709
|
+
if (tag !== 98) {
|
|
6710
|
+
break;
|
|
6711
|
+
}
|
|
6712
|
+
|
|
6713
|
+
message.lastCommitSha = reader.string();
|
|
6714
|
+
continue;
|
|
6715
|
+
}
|
|
6716
|
+
case 13: {
|
|
6717
|
+
if (tag !== 106) {
|
|
6718
|
+
break;
|
|
6719
|
+
}
|
|
6720
|
+
|
|
6721
|
+
message.lastPushedAt = fromTimestamp(Timestamp.decode(reader, reader.uint32()));
|
|
6722
|
+
continue;
|
|
6723
|
+
}
|
|
6724
|
+
case 14: {
|
|
6725
|
+
if (tag !== 114) {
|
|
6726
|
+
break;
|
|
6727
|
+
}
|
|
6728
|
+
|
|
6729
|
+
message.discardedAt = fromTimestamp(Timestamp.decode(reader, reader.uint32()));
|
|
6730
|
+
continue;
|
|
6731
|
+
}
|
|
6732
|
+
case 15: {
|
|
6733
|
+
if (tag !== 122) {
|
|
6734
|
+
break;
|
|
6735
|
+
}
|
|
6736
|
+
|
|
6737
|
+
message.discardReason = reader.string();
|
|
6738
|
+
continue;
|
|
6739
|
+
}
|
|
6740
|
+
case 16: {
|
|
6741
|
+
if (tag !== 128) {
|
|
6742
|
+
break;
|
|
6743
|
+
}
|
|
6744
|
+
|
|
6745
|
+
message.editCount = reader.uint32();
|
|
6746
|
+
continue;
|
|
6747
|
+
}
|
|
6748
|
+
case 17: {
|
|
6749
|
+
if (tag !== 138) {
|
|
6750
|
+
break;
|
|
6751
|
+
}
|
|
6752
|
+
|
|
6753
|
+
message.sessionId.push(reader.string());
|
|
6754
|
+
continue;
|
|
6755
|
+
}
|
|
6756
|
+
case 18: {
|
|
6757
|
+
if (tag !== 145) {
|
|
6758
|
+
break;
|
|
6759
|
+
}
|
|
6760
|
+
|
|
6761
|
+
message.unlandedCostUsd = reader.double();
|
|
6762
|
+
continue;
|
|
6763
|
+
}
|
|
6764
|
+
case 19: {
|
|
6765
|
+
if (tag !== 152) {
|
|
6766
|
+
break;
|
|
6767
|
+
}
|
|
6768
|
+
|
|
6769
|
+
message.unlandedOutputTokens = longToNumber(reader.uint64());
|
|
6770
|
+
continue;
|
|
6771
|
+
}
|
|
6772
|
+
}
|
|
6773
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
6774
|
+
break;
|
|
6775
|
+
}
|
|
6776
|
+
reader.skip(tag & 7);
|
|
6777
|
+
}
|
|
6778
|
+
return message;
|
|
6779
|
+
} finally {
|
|
6780
|
+
(reader as any).__tsProtoDecodeDepth = previousRecursionDepth;
|
|
6781
|
+
}
|
|
6782
|
+
},
|
|
6783
|
+
|
|
6784
|
+
fromJSON(object: any): AIFileStateRow {
|
|
6785
|
+
return {
|
|
6786
|
+
repositoryKey: isSet(object.repositoryKey)
|
|
6787
|
+
? globalThis.String(object.repositoryKey)
|
|
6788
|
+
: isSet(object.repository_key)
|
|
6789
|
+
? globalThis.String(object.repository_key)
|
|
6790
|
+
: "",
|
|
6791
|
+
ref: isSet(object.ref) ? globalThis.String(object.ref) : "",
|
|
6792
|
+
path: isSet(object.path) ? globalThis.String(object.path) : "",
|
|
6793
|
+
oldPath: isSet(object.oldPath)
|
|
6794
|
+
? globalThis.String(object.oldPath)
|
|
6795
|
+
: isSet(object.old_path)
|
|
6796
|
+
? globalThis.String(object.old_path)
|
|
6797
|
+
: "",
|
|
6798
|
+
state: isSet(object.state) ? aIFileLifecycleFromJSON(object.state) : 0,
|
|
6799
|
+
tier: isSet(object.tier) ? aIFileTierFromJSON(object.tier) : 0,
|
|
6800
|
+
confidence: isSet(object.confidence) ? aIFileConfidenceFromJSON(object.confidence) : 0,
|
|
6801
|
+
firstEditedAt: isSet(object.firstEditedAt)
|
|
6802
|
+
? fromJsonTimestamp(object.firstEditedAt)
|
|
6803
|
+
: isSet(object.first_edited_at)
|
|
6804
|
+
? fromJsonTimestamp(object.first_edited_at)
|
|
6805
|
+
: undefined,
|
|
6806
|
+
lastEditedAt: isSet(object.lastEditedAt)
|
|
6807
|
+
? fromJsonTimestamp(object.lastEditedAt)
|
|
6808
|
+
: isSet(object.last_edited_at)
|
|
6809
|
+
? fromJsonTimestamp(object.last_edited_at)
|
|
6810
|
+
: undefined,
|
|
6811
|
+
lastStagedAt: isSet(object.lastStagedAt)
|
|
6812
|
+
? fromJsonTimestamp(object.lastStagedAt)
|
|
6813
|
+
: isSet(object.last_staged_at)
|
|
6814
|
+
? fromJsonTimestamp(object.last_staged_at)
|
|
6815
|
+
: undefined,
|
|
6816
|
+
lastCommittedAt: isSet(object.lastCommittedAt)
|
|
6817
|
+
? fromJsonTimestamp(object.lastCommittedAt)
|
|
6818
|
+
: isSet(object.last_committed_at)
|
|
6819
|
+
? fromJsonTimestamp(object.last_committed_at)
|
|
6820
|
+
: undefined,
|
|
6821
|
+
lastCommitSha: isSet(object.lastCommitSha)
|
|
6822
|
+
? globalThis.String(object.lastCommitSha)
|
|
6823
|
+
: isSet(object.last_commit_sha)
|
|
6824
|
+
? globalThis.String(object.last_commit_sha)
|
|
6825
|
+
: "",
|
|
6826
|
+
lastPushedAt: isSet(object.lastPushedAt)
|
|
6827
|
+
? fromJsonTimestamp(object.lastPushedAt)
|
|
6828
|
+
: isSet(object.last_pushed_at)
|
|
6829
|
+
? fromJsonTimestamp(object.last_pushed_at)
|
|
6830
|
+
: undefined,
|
|
6831
|
+
discardedAt: isSet(object.discardedAt)
|
|
6832
|
+
? fromJsonTimestamp(object.discardedAt)
|
|
6833
|
+
: isSet(object.discarded_at)
|
|
6834
|
+
? fromJsonTimestamp(object.discarded_at)
|
|
6835
|
+
: undefined,
|
|
6836
|
+
discardReason: isSet(object.discardReason)
|
|
6837
|
+
? globalThis.String(object.discardReason)
|
|
6838
|
+
: isSet(object.discard_reason)
|
|
6839
|
+
? globalThis.String(object.discard_reason)
|
|
6840
|
+
: "",
|
|
6841
|
+
editCount: isSet(object.editCount)
|
|
6842
|
+
? globalThis.Number(object.editCount)
|
|
6843
|
+
: isSet(object.edit_count)
|
|
6844
|
+
? globalThis.Number(object.edit_count)
|
|
6845
|
+
: 0,
|
|
6846
|
+
sessionId: globalThis.Array.isArray(object?.sessionId)
|
|
6847
|
+
? object.sessionId.map((e: any) => globalThis.String(e))
|
|
6848
|
+
: globalThis.Array.isArray(object?.session_id)
|
|
6849
|
+
? object.session_id.map((e: any) => globalThis.String(e))
|
|
6850
|
+
: [],
|
|
6851
|
+
unlandedCostUsd: isSet(object.unlandedCostUsd)
|
|
6852
|
+
? globalThis.Number(object.unlandedCostUsd)
|
|
6853
|
+
: isSet(object.unlanded_cost_usd)
|
|
6854
|
+
? globalThis.Number(object.unlanded_cost_usd)
|
|
6855
|
+
: 0,
|
|
6856
|
+
unlandedOutputTokens: isSet(object.unlandedOutputTokens)
|
|
6857
|
+
? globalThis.Number(object.unlandedOutputTokens)
|
|
6858
|
+
: isSet(object.unlanded_output_tokens)
|
|
6859
|
+
? globalThis.Number(object.unlanded_output_tokens)
|
|
6860
|
+
: 0,
|
|
6861
|
+
};
|
|
6862
|
+
},
|
|
6863
|
+
|
|
6864
|
+
toJSON(message: AIFileStateRow): unknown {
|
|
6865
|
+
const obj: any = {};
|
|
6866
|
+
if (message.repositoryKey !== "") {
|
|
6867
|
+
obj.repositoryKey = message.repositoryKey;
|
|
6868
|
+
}
|
|
6869
|
+
if (message.ref !== "") {
|
|
6870
|
+
obj.ref = message.ref;
|
|
6871
|
+
}
|
|
6872
|
+
if (message.path !== "") {
|
|
6873
|
+
obj.path = message.path;
|
|
6874
|
+
}
|
|
6875
|
+
if (message.oldPath !== "") {
|
|
6876
|
+
obj.oldPath = message.oldPath;
|
|
6877
|
+
}
|
|
6878
|
+
if (message.state !== 0) {
|
|
6879
|
+
obj.state = aIFileLifecycleToJSON(message.state);
|
|
6880
|
+
}
|
|
6881
|
+
if (message.tier !== 0) {
|
|
6882
|
+
obj.tier = aIFileTierToJSON(message.tier);
|
|
6883
|
+
}
|
|
6884
|
+
if (message.confidence !== 0) {
|
|
6885
|
+
obj.confidence = aIFileConfidenceToJSON(message.confidence);
|
|
6886
|
+
}
|
|
6887
|
+
if (message.firstEditedAt !== undefined) {
|
|
6888
|
+
obj.firstEditedAt = message.firstEditedAt.toISOString();
|
|
6889
|
+
}
|
|
6890
|
+
if (message.lastEditedAt !== undefined) {
|
|
6891
|
+
obj.lastEditedAt = message.lastEditedAt.toISOString();
|
|
6892
|
+
}
|
|
6893
|
+
if (message.lastStagedAt !== undefined) {
|
|
6894
|
+
obj.lastStagedAt = message.lastStagedAt.toISOString();
|
|
6895
|
+
}
|
|
6896
|
+
if (message.lastCommittedAt !== undefined) {
|
|
6897
|
+
obj.lastCommittedAt = message.lastCommittedAt.toISOString();
|
|
6898
|
+
}
|
|
6899
|
+
if (message.lastCommitSha !== "") {
|
|
6900
|
+
obj.lastCommitSha = message.lastCommitSha;
|
|
6901
|
+
}
|
|
6902
|
+
if (message.lastPushedAt !== undefined) {
|
|
6903
|
+
obj.lastPushedAt = message.lastPushedAt.toISOString();
|
|
6904
|
+
}
|
|
6905
|
+
if (message.discardedAt !== undefined) {
|
|
6906
|
+
obj.discardedAt = message.discardedAt.toISOString();
|
|
6907
|
+
}
|
|
6908
|
+
if (message.discardReason !== "") {
|
|
6909
|
+
obj.discardReason = message.discardReason;
|
|
6910
|
+
}
|
|
6911
|
+
if (message.editCount !== 0) {
|
|
6912
|
+
obj.editCount = Math.round(message.editCount);
|
|
6913
|
+
}
|
|
6914
|
+
if (message.sessionId?.length) {
|
|
6915
|
+
obj.sessionId = message.sessionId;
|
|
6916
|
+
}
|
|
6917
|
+
if (message.unlandedCostUsd !== 0) {
|
|
6918
|
+
obj.unlandedCostUsd = message.unlandedCostUsd;
|
|
6919
|
+
}
|
|
6920
|
+
if (message.unlandedOutputTokens !== 0) {
|
|
6921
|
+
obj.unlandedOutputTokens = Math.round(message.unlandedOutputTokens);
|
|
6922
|
+
}
|
|
6923
|
+
return obj;
|
|
6924
|
+
},
|
|
6925
|
+
|
|
6926
|
+
create<I extends Exact<DeepPartial<AIFileStateRow>, I>>(base?: I): AIFileStateRow {
|
|
6927
|
+
return AIFileStateRow.fromPartial(base ?? ({} as any));
|
|
6928
|
+
},
|
|
6929
|
+
fromPartial<I extends Exact<DeepPartial<AIFileStateRow>, I>>(object: I): AIFileStateRow {
|
|
6930
|
+
const message = createBaseAIFileStateRow();
|
|
6931
|
+
message.repositoryKey = object.repositoryKey ?? "";
|
|
6932
|
+
message.ref = object.ref ?? "";
|
|
6933
|
+
message.path = object.path ?? "";
|
|
6934
|
+
message.oldPath = object.oldPath ?? "";
|
|
6935
|
+
message.state = object.state ?? 0;
|
|
6936
|
+
message.tier = object.tier ?? 0;
|
|
6937
|
+
message.confidence = object.confidence ?? 0;
|
|
6938
|
+
message.firstEditedAt = object.firstEditedAt ?? undefined;
|
|
6939
|
+
message.lastEditedAt = object.lastEditedAt ?? undefined;
|
|
6940
|
+
message.lastStagedAt = object.lastStagedAt ?? undefined;
|
|
6941
|
+
message.lastCommittedAt = object.lastCommittedAt ?? undefined;
|
|
6942
|
+
message.lastCommitSha = object.lastCommitSha ?? "";
|
|
6943
|
+
message.lastPushedAt = object.lastPushedAt ?? undefined;
|
|
6944
|
+
message.discardedAt = object.discardedAt ?? undefined;
|
|
6945
|
+
message.discardReason = object.discardReason ?? "";
|
|
6946
|
+
message.editCount = object.editCount ?? 0;
|
|
6947
|
+
message.sessionId = object.sessionId?.map((e) => e) || [];
|
|
6948
|
+
message.unlandedCostUsd = object.unlandedCostUsd ?? 0;
|
|
6949
|
+
message.unlandedOutputTokens = object.unlandedOutputTokens ?? 0;
|
|
6950
|
+
return message;
|
|
6951
|
+
},
|
|
6952
|
+
};
|
|
6953
|
+
|
|
6954
|
+
function createBaseFileStateSummaryRequest(): FileStateSummaryRequest {
|
|
6955
|
+
return { organizationId: "", projectId: "", filter: undefined, abandonedHorizon: undefined, groupBy: 0 };
|
|
6956
|
+
}
|
|
6957
|
+
|
|
6958
|
+
export const FileStateSummaryRequest: MessageFns<FileStateSummaryRequest> = {
|
|
6959
|
+
encode(message: FileStateSummaryRequest, writer: BinaryWriter = new BinaryWriter()): BinaryWriter {
|
|
6960
|
+
if (message.organizationId !== "") {
|
|
6961
|
+
writer.uint32(10).string(message.organizationId);
|
|
6962
|
+
}
|
|
6963
|
+
if (message.projectId !== "") {
|
|
6964
|
+
writer.uint32(18).string(message.projectId);
|
|
6965
|
+
}
|
|
6966
|
+
if (message.filter !== undefined) {
|
|
6967
|
+
AIFileStateFilter.encode(message.filter, writer.uint32(26).fork()).join();
|
|
6968
|
+
}
|
|
6969
|
+
if (message.abandonedHorizon !== undefined) {
|
|
6970
|
+
Duration.encode(message.abandonedHorizon, writer.uint32(34).fork()).join();
|
|
6971
|
+
}
|
|
6972
|
+
if (message.groupBy !== 0) {
|
|
6973
|
+
writer.uint32(40).int32(message.groupBy);
|
|
6974
|
+
}
|
|
6975
|
+
return writer;
|
|
6976
|
+
},
|
|
6977
|
+
|
|
6978
|
+
decode(input: BinaryReader | Uint8Array, length?: number): FileStateSummaryRequest {
|
|
6979
|
+
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
|
|
6980
|
+
const previousRecursionDepth = (reader as any).__tsProtoDecodeDepth ?? 0;
|
|
6981
|
+
if (previousRecursionDepth >= 100) {
|
|
6982
|
+
throw new globalThis.Error("protobuf decode recursion limit exceeded");
|
|
6983
|
+
}
|
|
6984
|
+
(reader as any).__tsProtoDecodeDepth = previousRecursionDepth + 1;
|
|
6985
|
+
try {
|
|
6986
|
+
const end = length === undefined ? reader.len : reader.pos + length;
|
|
6987
|
+
const message = createBaseFileStateSummaryRequest();
|
|
6988
|
+
while (reader.pos < end) {
|
|
6989
|
+
const tag = reader.uint32();
|
|
6990
|
+
switch (tag >>> 3) {
|
|
6991
|
+
case 1: {
|
|
6992
|
+
if (tag !== 10) {
|
|
6993
|
+
break;
|
|
6994
|
+
}
|
|
6995
|
+
|
|
6996
|
+
message.organizationId = reader.string();
|
|
6997
|
+
continue;
|
|
6998
|
+
}
|
|
6999
|
+
case 2: {
|
|
7000
|
+
if (tag !== 18) {
|
|
7001
|
+
break;
|
|
7002
|
+
}
|
|
7003
|
+
|
|
7004
|
+
message.projectId = reader.string();
|
|
7005
|
+
continue;
|
|
7006
|
+
}
|
|
7007
|
+
case 3: {
|
|
7008
|
+
if (tag !== 26) {
|
|
7009
|
+
break;
|
|
7010
|
+
}
|
|
7011
|
+
|
|
7012
|
+
message.filter = AIFileStateFilter.decode(reader, reader.uint32());
|
|
7013
|
+
continue;
|
|
7014
|
+
}
|
|
7015
|
+
case 4: {
|
|
7016
|
+
if (tag !== 34) {
|
|
7017
|
+
break;
|
|
7018
|
+
}
|
|
7019
|
+
|
|
7020
|
+
message.abandonedHorizon = Duration.decode(reader, reader.uint32());
|
|
7021
|
+
continue;
|
|
7022
|
+
}
|
|
7023
|
+
case 5: {
|
|
7024
|
+
if (tag !== 40) {
|
|
7025
|
+
break;
|
|
7026
|
+
}
|
|
7027
|
+
|
|
7028
|
+
message.groupBy = reader.int32() as any;
|
|
7029
|
+
continue;
|
|
7030
|
+
}
|
|
7031
|
+
}
|
|
7032
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
7033
|
+
break;
|
|
7034
|
+
}
|
|
7035
|
+
reader.skip(tag & 7);
|
|
7036
|
+
}
|
|
7037
|
+
return message;
|
|
7038
|
+
} finally {
|
|
7039
|
+
(reader as any).__tsProtoDecodeDepth = previousRecursionDepth;
|
|
7040
|
+
}
|
|
7041
|
+
},
|
|
7042
|
+
|
|
7043
|
+
fromJSON(object: any): FileStateSummaryRequest {
|
|
7044
|
+
return {
|
|
7045
|
+
organizationId: isSet(object.organizationId)
|
|
7046
|
+
? globalThis.String(object.organizationId)
|
|
7047
|
+
: isSet(object.organization_id)
|
|
7048
|
+
? globalThis.String(object.organization_id)
|
|
7049
|
+
: "",
|
|
7050
|
+
projectId: isSet(object.projectId)
|
|
7051
|
+
? globalThis.String(object.projectId)
|
|
7052
|
+
: isSet(object.project_id)
|
|
7053
|
+
? globalThis.String(object.project_id)
|
|
7054
|
+
: "",
|
|
7055
|
+
filter: isSet(object.filter) ? AIFileStateFilter.fromJSON(object.filter) : undefined,
|
|
7056
|
+
abandonedHorizon: isSet(object.abandonedHorizon)
|
|
7057
|
+
? Duration.fromJSON(object.abandonedHorizon)
|
|
7058
|
+
: isSet(object.abandoned_horizon)
|
|
7059
|
+
? Duration.fromJSON(object.abandoned_horizon)
|
|
7060
|
+
: undefined,
|
|
7061
|
+
groupBy: isSet(object.groupBy)
|
|
7062
|
+
? aIFileStateGroupByFromJSON(object.groupBy)
|
|
7063
|
+
: isSet(object.group_by)
|
|
7064
|
+
? aIFileStateGroupByFromJSON(object.group_by)
|
|
7065
|
+
: 0,
|
|
7066
|
+
};
|
|
7067
|
+
},
|
|
7068
|
+
|
|
7069
|
+
toJSON(message: FileStateSummaryRequest): unknown {
|
|
7070
|
+
const obj: any = {};
|
|
7071
|
+
if (message.organizationId !== "") {
|
|
7072
|
+
obj.organizationId = message.organizationId;
|
|
7073
|
+
}
|
|
7074
|
+
if (message.projectId !== "") {
|
|
7075
|
+
obj.projectId = message.projectId;
|
|
7076
|
+
}
|
|
7077
|
+
if (message.filter !== undefined) {
|
|
7078
|
+
obj.filter = AIFileStateFilter.toJSON(message.filter);
|
|
7079
|
+
}
|
|
7080
|
+
if (message.abandonedHorizon !== undefined) {
|
|
7081
|
+
obj.abandonedHorizon = Duration.toJSON(message.abandonedHorizon);
|
|
7082
|
+
}
|
|
7083
|
+
if (message.groupBy !== 0) {
|
|
7084
|
+
obj.groupBy = aIFileStateGroupByToJSON(message.groupBy);
|
|
7085
|
+
}
|
|
7086
|
+
return obj;
|
|
7087
|
+
},
|
|
7088
|
+
|
|
7089
|
+
create<I extends Exact<DeepPartial<FileStateSummaryRequest>, I>>(base?: I): FileStateSummaryRequest {
|
|
7090
|
+
return FileStateSummaryRequest.fromPartial(base ?? ({} as any));
|
|
7091
|
+
},
|
|
7092
|
+
fromPartial<I extends Exact<DeepPartial<FileStateSummaryRequest>, I>>(object: I): FileStateSummaryRequest {
|
|
7093
|
+
const message = createBaseFileStateSummaryRequest();
|
|
7094
|
+
message.organizationId = object.organizationId ?? "";
|
|
7095
|
+
message.projectId = object.projectId ?? "";
|
|
7096
|
+
message.filter = (object.filter !== undefined && object.filter !== null)
|
|
7097
|
+
? AIFileStateFilter.fromPartial(object.filter)
|
|
7098
|
+
: undefined;
|
|
7099
|
+
message.abandonedHorizon = (object.abandonedHorizon !== undefined && object.abandonedHorizon !== null)
|
|
7100
|
+
? Duration.fromPartial(object.abandonedHorizon)
|
|
7101
|
+
: undefined;
|
|
7102
|
+
message.groupBy = object.groupBy ?? 0;
|
|
7103
|
+
return message;
|
|
7104
|
+
},
|
|
7105
|
+
};
|
|
7106
|
+
|
|
7107
|
+
function createBaseGetFileStateSummaryResponse(): GetFileStateSummaryResponse {
|
|
7108
|
+
return { status: undefined, summary: undefined };
|
|
7109
|
+
}
|
|
7110
|
+
|
|
7111
|
+
export const GetFileStateSummaryResponse: MessageFns<GetFileStateSummaryResponse> = {
|
|
7112
|
+
encode(message: GetFileStateSummaryResponse, writer: BinaryWriter = new BinaryWriter()): BinaryWriter {
|
|
7113
|
+
if (message.status !== undefined) {
|
|
7114
|
+
ResponseStatus.encode(message.status, writer.uint32(10).fork()).join();
|
|
7115
|
+
}
|
|
7116
|
+
if (message.summary !== undefined) {
|
|
7117
|
+
FileStateSummary.encode(message.summary, writer.uint32(18).fork()).join();
|
|
7118
|
+
}
|
|
7119
|
+
return writer;
|
|
7120
|
+
},
|
|
7121
|
+
|
|
7122
|
+
decode(input: BinaryReader | Uint8Array, length?: number): GetFileStateSummaryResponse {
|
|
7123
|
+
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
|
|
7124
|
+
const previousRecursionDepth = (reader as any).__tsProtoDecodeDepth ?? 0;
|
|
7125
|
+
if (previousRecursionDepth >= 100) {
|
|
7126
|
+
throw new globalThis.Error("protobuf decode recursion limit exceeded");
|
|
7127
|
+
}
|
|
7128
|
+
(reader as any).__tsProtoDecodeDepth = previousRecursionDepth + 1;
|
|
7129
|
+
try {
|
|
7130
|
+
const end = length === undefined ? reader.len : reader.pos + length;
|
|
7131
|
+
const message = createBaseGetFileStateSummaryResponse();
|
|
7132
|
+
while (reader.pos < end) {
|
|
7133
|
+
const tag = reader.uint32();
|
|
7134
|
+
switch (tag >>> 3) {
|
|
7135
|
+
case 1: {
|
|
7136
|
+
if (tag !== 10) {
|
|
7137
|
+
break;
|
|
7138
|
+
}
|
|
7139
|
+
|
|
7140
|
+
message.status = ResponseStatus.decode(reader, reader.uint32());
|
|
7141
|
+
continue;
|
|
7142
|
+
}
|
|
7143
|
+
case 2: {
|
|
7144
|
+
if (tag !== 18) {
|
|
7145
|
+
break;
|
|
7146
|
+
}
|
|
7147
|
+
|
|
7148
|
+
message.summary = FileStateSummary.decode(reader, reader.uint32());
|
|
7149
|
+
continue;
|
|
7150
|
+
}
|
|
7151
|
+
}
|
|
7152
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
7153
|
+
break;
|
|
7154
|
+
}
|
|
7155
|
+
reader.skip(tag & 7);
|
|
7156
|
+
}
|
|
7157
|
+
return message;
|
|
7158
|
+
} finally {
|
|
7159
|
+
(reader as any).__tsProtoDecodeDepth = previousRecursionDepth;
|
|
7160
|
+
}
|
|
7161
|
+
},
|
|
7162
|
+
|
|
7163
|
+
fromJSON(object: any): GetFileStateSummaryResponse {
|
|
7164
|
+
return {
|
|
7165
|
+
status: isSet(object.status) ? ResponseStatus.fromJSON(object.status) : undefined,
|
|
7166
|
+
summary: isSet(object.summary) ? FileStateSummary.fromJSON(object.summary) : undefined,
|
|
7167
|
+
};
|
|
7168
|
+
},
|
|
7169
|
+
|
|
7170
|
+
toJSON(message: GetFileStateSummaryResponse): unknown {
|
|
7171
|
+
const obj: any = {};
|
|
7172
|
+
if (message.status !== undefined) {
|
|
7173
|
+
obj.status = ResponseStatus.toJSON(message.status);
|
|
7174
|
+
}
|
|
7175
|
+
if (message.summary !== undefined) {
|
|
7176
|
+
obj.summary = FileStateSummary.toJSON(message.summary);
|
|
7177
|
+
}
|
|
7178
|
+
return obj;
|
|
7179
|
+
},
|
|
7180
|
+
|
|
7181
|
+
create<I extends Exact<DeepPartial<GetFileStateSummaryResponse>, I>>(base?: I): GetFileStateSummaryResponse {
|
|
7182
|
+
return GetFileStateSummaryResponse.fromPartial(base ?? ({} as any));
|
|
7183
|
+
},
|
|
7184
|
+
fromPartial<I extends Exact<DeepPartial<GetFileStateSummaryResponse>, I>>(object: I): GetFileStateSummaryResponse {
|
|
7185
|
+
const message = createBaseGetFileStateSummaryResponse();
|
|
7186
|
+
message.status = (object.status !== undefined && object.status !== null)
|
|
7187
|
+
? ResponseStatus.fromPartial(object.status)
|
|
7188
|
+
: undefined;
|
|
7189
|
+
message.summary = (object.summary !== undefined && object.summary !== null)
|
|
7190
|
+
? FileStateSummary.fromPartial(object.summary)
|
|
7191
|
+
: undefined;
|
|
7192
|
+
return message;
|
|
7193
|
+
},
|
|
7194
|
+
};
|
|
7195
|
+
|
|
7196
|
+
function createBaseFileStateSummary(): FileStateSummary {
|
|
7197
|
+
return { totals: undefined, groups: [], asOf: undefined, groupBy: 0 };
|
|
7198
|
+
}
|
|
7199
|
+
|
|
7200
|
+
export const FileStateSummary: MessageFns<FileStateSummary> = {
|
|
7201
|
+
encode(message: FileStateSummary, writer: BinaryWriter = new BinaryWriter()): BinaryWriter {
|
|
7202
|
+
if (message.totals !== undefined) {
|
|
7203
|
+
FileStateTiers.encode(message.totals, writer.uint32(10).fork()).join();
|
|
7204
|
+
}
|
|
7205
|
+
for (const v of message.groups) {
|
|
7206
|
+
FileStateGroup.encode(v!, writer.uint32(18).fork()).join();
|
|
7207
|
+
}
|
|
7208
|
+
if (message.asOf !== undefined) {
|
|
7209
|
+
Timestamp.encode(toTimestamp(message.asOf), writer.uint32(26).fork()).join();
|
|
7210
|
+
}
|
|
7211
|
+
if (message.groupBy !== 0) {
|
|
7212
|
+
writer.uint32(32).int32(message.groupBy);
|
|
7213
|
+
}
|
|
7214
|
+
return writer;
|
|
7215
|
+
},
|
|
7216
|
+
|
|
7217
|
+
decode(input: BinaryReader | Uint8Array, length?: number): FileStateSummary {
|
|
7218
|
+
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
|
|
7219
|
+
const previousRecursionDepth = (reader as any).__tsProtoDecodeDepth ?? 0;
|
|
7220
|
+
if (previousRecursionDepth >= 100) {
|
|
7221
|
+
throw new globalThis.Error("protobuf decode recursion limit exceeded");
|
|
7222
|
+
}
|
|
7223
|
+
(reader as any).__tsProtoDecodeDepth = previousRecursionDepth + 1;
|
|
7224
|
+
try {
|
|
7225
|
+
const end = length === undefined ? reader.len : reader.pos + length;
|
|
7226
|
+
const message = createBaseFileStateSummary();
|
|
7227
|
+
while (reader.pos < end) {
|
|
7228
|
+
const tag = reader.uint32();
|
|
7229
|
+
switch (tag >>> 3) {
|
|
7230
|
+
case 1: {
|
|
7231
|
+
if (tag !== 10) {
|
|
7232
|
+
break;
|
|
7233
|
+
}
|
|
7234
|
+
|
|
7235
|
+
message.totals = FileStateTiers.decode(reader, reader.uint32());
|
|
7236
|
+
continue;
|
|
7237
|
+
}
|
|
7238
|
+
case 2: {
|
|
7239
|
+
if (tag !== 18) {
|
|
7240
|
+
break;
|
|
7241
|
+
}
|
|
7242
|
+
|
|
7243
|
+
message.groups.push(FileStateGroup.decode(reader, reader.uint32()));
|
|
7244
|
+
continue;
|
|
7245
|
+
}
|
|
7246
|
+
case 3: {
|
|
7247
|
+
if (tag !== 26) {
|
|
7248
|
+
break;
|
|
7249
|
+
}
|
|
7250
|
+
|
|
7251
|
+
message.asOf = fromTimestamp(Timestamp.decode(reader, reader.uint32()));
|
|
7252
|
+
continue;
|
|
7253
|
+
}
|
|
7254
|
+
case 4: {
|
|
7255
|
+
if (tag !== 32) {
|
|
7256
|
+
break;
|
|
7257
|
+
}
|
|
7258
|
+
|
|
7259
|
+
message.groupBy = reader.int32() as any;
|
|
7260
|
+
continue;
|
|
7261
|
+
}
|
|
7262
|
+
}
|
|
7263
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
7264
|
+
break;
|
|
7265
|
+
}
|
|
7266
|
+
reader.skip(tag & 7);
|
|
7267
|
+
}
|
|
7268
|
+
return message;
|
|
7269
|
+
} finally {
|
|
7270
|
+
(reader as any).__tsProtoDecodeDepth = previousRecursionDepth;
|
|
7271
|
+
}
|
|
7272
|
+
},
|
|
7273
|
+
|
|
7274
|
+
fromJSON(object: any): FileStateSummary {
|
|
7275
|
+
return {
|
|
7276
|
+
totals: isSet(object.totals) ? FileStateTiers.fromJSON(object.totals) : undefined,
|
|
7277
|
+
groups: globalThis.Array.isArray(object?.groups) ? object.groups.map((e: any) => FileStateGroup.fromJSON(e)) : [],
|
|
7278
|
+
asOf: isSet(object.asOf)
|
|
7279
|
+
? fromJsonTimestamp(object.asOf)
|
|
7280
|
+
: isSet(object.as_of)
|
|
7281
|
+
? fromJsonTimestamp(object.as_of)
|
|
7282
|
+
: undefined,
|
|
7283
|
+
groupBy: isSet(object.groupBy)
|
|
7284
|
+
? aIFileStateGroupByFromJSON(object.groupBy)
|
|
7285
|
+
: isSet(object.group_by)
|
|
7286
|
+
? aIFileStateGroupByFromJSON(object.group_by)
|
|
7287
|
+
: 0,
|
|
7288
|
+
};
|
|
7289
|
+
},
|
|
7290
|
+
|
|
7291
|
+
toJSON(message: FileStateSummary): unknown {
|
|
7292
|
+
const obj: any = {};
|
|
7293
|
+
if (message.totals !== undefined) {
|
|
7294
|
+
obj.totals = FileStateTiers.toJSON(message.totals);
|
|
7295
|
+
}
|
|
7296
|
+
if (message.groups?.length) {
|
|
7297
|
+
obj.groups = message.groups.map((e) => FileStateGroup.toJSON(e));
|
|
7298
|
+
}
|
|
7299
|
+
if (message.asOf !== undefined) {
|
|
7300
|
+
obj.asOf = message.asOf.toISOString();
|
|
7301
|
+
}
|
|
7302
|
+
if (message.groupBy !== 0) {
|
|
7303
|
+
obj.groupBy = aIFileStateGroupByToJSON(message.groupBy);
|
|
7304
|
+
}
|
|
7305
|
+
return obj;
|
|
7306
|
+
},
|
|
7307
|
+
|
|
7308
|
+
create<I extends Exact<DeepPartial<FileStateSummary>, I>>(base?: I): FileStateSummary {
|
|
7309
|
+
return FileStateSummary.fromPartial(base ?? ({} as any));
|
|
7310
|
+
},
|
|
7311
|
+
fromPartial<I extends Exact<DeepPartial<FileStateSummary>, I>>(object: I): FileStateSummary {
|
|
7312
|
+
const message = createBaseFileStateSummary();
|
|
7313
|
+
message.totals = (object.totals !== undefined && object.totals !== null)
|
|
7314
|
+
? FileStateTiers.fromPartial(object.totals)
|
|
7315
|
+
: undefined;
|
|
7316
|
+
message.groups = object.groups?.map((e) => FileStateGroup.fromPartial(e)) || [];
|
|
7317
|
+
message.asOf = object.asOf ?? undefined;
|
|
7318
|
+
message.groupBy = object.groupBy ?? 0;
|
|
7319
|
+
return message;
|
|
7320
|
+
},
|
|
7321
|
+
};
|
|
7322
|
+
|
|
7323
|
+
function createBaseFileStateTiers(): FileStateTiers {
|
|
7324
|
+
return { active: undefined, open: undefined, stale: undefined, abandonedHorizon: undefined, discarded: undefined };
|
|
7325
|
+
}
|
|
7326
|
+
|
|
7327
|
+
export const FileStateTiers: MessageFns<FileStateTiers> = {
|
|
7328
|
+
encode(message: FileStateTiers, writer: BinaryWriter = new BinaryWriter()): BinaryWriter {
|
|
7329
|
+
if (message.active !== undefined) {
|
|
7330
|
+
FileStateTierBucket.encode(message.active, writer.uint32(10).fork()).join();
|
|
7331
|
+
}
|
|
7332
|
+
if (message.open !== undefined) {
|
|
7333
|
+
FileStateTierBucket.encode(message.open, writer.uint32(18).fork()).join();
|
|
7334
|
+
}
|
|
7335
|
+
if (message.stale !== undefined) {
|
|
7336
|
+
FileStateTierBucket.encode(message.stale, writer.uint32(26).fork()).join();
|
|
7337
|
+
}
|
|
7338
|
+
if (message.abandonedHorizon !== undefined) {
|
|
7339
|
+
FileStateTierBucket.encode(message.abandonedHorizon, writer.uint32(34).fork()).join();
|
|
7340
|
+
}
|
|
7341
|
+
if (message.discarded !== undefined) {
|
|
7342
|
+
FileStateTierBucket.encode(message.discarded, writer.uint32(42).fork()).join();
|
|
7343
|
+
}
|
|
7344
|
+
return writer;
|
|
7345
|
+
},
|
|
7346
|
+
|
|
7347
|
+
decode(input: BinaryReader | Uint8Array, length?: number): FileStateTiers {
|
|
7348
|
+
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
|
|
7349
|
+
const previousRecursionDepth = (reader as any).__tsProtoDecodeDepth ?? 0;
|
|
7350
|
+
if (previousRecursionDepth >= 100) {
|
|
7351
|
+
throw new globalThis.Error("protobuf decode recursion limit exceeded");
|
|
7352
|
+
}
|
|
7353
|
+
(reader as any).__tsProtoDecodeDepth = previousRecursionDepth + 1;
|
|
7354
|
+
try {
|
|
7355
|
+
const end = length === undefined ? reader.len : reader.pos + length;
|
|
7356
|
+
const message = createBaseFileStateTiers();
|
|
7357
|
+
while (reader.pos < end) {
|
|
7358
|
+
const tag = reader.uint32();
|
|
7359
|
+
switch (tag >>> 3) {
|
|
7360
|
+
case 1: {
|
|
7361
|
+
if (tag !== 10) {
|
|
7362
|
+
break;
|
|
7363
|
+
}
|
|
7364
|
+
|
|
7365
|
+
message.active = FileStateTierBucket.decode(reader, reader.uint32());
|
|
7366
|
+
continue;
|
|
7367
|
+
}
|
|
7368
|
+
case 2: {
|
|
7369
|
+
if (tag !== 18) {
|
|
7370
|
+
break;
|
|
7371
|
+
}
|
|
7372
|
+
|
|
7373
|
+
message.open = FileStateTierBucket.decode(reader, reader.uint32());
|
|
7374
|
+
continue;
|
|
7375
|
+
}
|
|
7376
|
+
case 3: {
|
|
7377
|
+
if (tag !== 26) {
|
|
7378
|
+
break;
|
|
7379
|
+
}
|
|
7380
|
+
|
|
7381
|
+
message.stale = FileStateTierBucket.decode(reader, reader.uint32());
|
|
7382
|
+
continue;
|
|
7383
|
+
}
|
|
7384
|
+
case 4: {
|
|
7385
|
+
if (tag !== 34) {
|
|
7386
|
+
break;
|
|
7387
|
+
}
|
|
7388
|
+
|
|
7389
|
+
message.abandonedHorizon = FileStateTierBucket.decode(reader, reader.uint32());
|
|
7390
|
+
continue;
|
|
7391
|
+
}
|
|
7392
|
+
case 5: {
|
|
7393
|
+
if (tag !== 42) {
|
|
7394
|
+
break;
|
|
7395
|
+
}
|
|
7396
|
+
|
|
7397
|
+
message.discarded = FileStateTierBucket.decode(reader, reader.uint32());
|
|
7398
|
+
continue;
|
|
7399
|
+
}
|
|
7400
|
+
}
|
|
7401
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
7402
|
+
break;
|
|
7403
|
+
}
|
|
7404
|
+
reader.skip(tag & 7);
|
|
7405
|
+
}
|
|
7406
|
+
return message;
|
|
7407
|
+
} finally {
|
|
7408
|
+
(reader as any).__tsProtoDecodeDepth = previousRecursionDepth;
|
|
7409
|
+
}
|
|
7410
|
+
},
|
|
7411
|
+
|
|
7412
|
+
fromJSON(object: any): FileStateTiers {
|
|
7413
|
+
return {
|
|
7414
|
+
active: isSet(object.active) ? FileStateTierBucket.fromJSON(object.active) : undefined,
|
|
7415
|
+
open: isSet(object.open) ? FileStateTierBucket.fromJSON(object.open) : undefined,
|
|
7416
|
+
stale: isSet(object.stale) ? FileStateTierBucket.fromJSON(object.stale) : undefined,
|
|
7417
|
+
abandonedHorizon: isSet(object.abandonedHorizon)
|
|
7418
|
+
? FileStateTierBucket.fromJSON(object.abandonedHorizon)
|
|
7419
|
+
: isSet(object.abandoned_horizon)
|
|
7420
|
+
? FileStateTierBucket.fromJSON(object.abandoned_horizon)
|
|
7421
|
+
: undefined,
|
|
7422
|
+
discarded: isSet(object.discarded) ? FileStateTierBucket.fromJSON(object.discarded) : undefined,
|
|
7423
|
+
};
|
|
7424
|
+
},
|
|
7425
|
+
|
|
7426
|
+
toJSON(message: FileStateTiers): unknown {
|
|
7427
|
+
const obj: any = {};
|
|
7428
|
+
if (message.active !== undefined) {
|
|
7429
|
+
obj.active = FileStateTierBucket.toJSON(message.active);
|
|
7430
|
+
}
|
|
7431
|
+
if (message.open !== undefined) {
|
|
7432
|
+
obj.open = FileStateTierBucket.toJSON(message.open);
|
|
7433
|
+
}
|
|
7434
|
+
if (message.stale !== undefined) {
|
|
7435
|
+
obj.stale = FileStateTierBucket.toJSON(message.stale);
|
|
7436
|
+
}
|
|
7437
|
+
if (message.abandonedHorizon !== undefined) {
|
|
7438
|
+
obj.abandonedHorizon = FileStateTierBucket.toJSON(message.abandonedHorizon);
|
|
7439
|
+
}
|
|
7440
|
+
if (message.discarded !== undefined) {
|
|
7441
|
+
obj.discarded = FileStateTierBucket.toJSON(message.discarded);
|
|
7442
|
+
}
|
|
7443
|
+
return obj;
|
|
7444
|
+
},
|
|
7445
|
+
|
|
7446
|
+
create<I extends Exact<DeepPartial<FileStateTiers>, I>>(base?: I): FileStateTiers {
|
|
7447
|
+
return FileStateTiers.fromPartial(base ?? ({} as any));
|
|
7448
|
+
},
|
|
7449
|
+
fromPartial<I extends Exact<DeepPartial<FileStateTiers>, I>>(object: I): FileStateTiers {
|
|
7450
|
+
const message = createBaseFileStateTiers();
|
|
7451
|
+
message.active = (object.active !== undefined && object.active !== null)
|
|
7452
|
+
? FileStateTierBucket.fromPartial(object.active)
|
|
7453
|
+
: undefined;
|
|
7454
|
+
message.open = (object.open !== undefined && object.open !== null)
|
|
7455
|
+
? FileStateTierBucket.fromPartial(object.open)
|
|
7456
|
+
: undefined;
|
|
7457
|
+
message.stale = (object.stale !== undefined && object.stale !== null)
|
|
7458
|
+
? FileStateTierBucket.fromPartial(object.stale)
|
|
7459
|
+
: undefined;
|
|
7460
|
+
message.abandonedHorizon = (object.abandonedHorizon !== undefined && object.abandonedHorizon !== null)
|
|
7461
|
+
? FileStateTierBucket.fromPartial(object.abandonedHorizon)
|
|
7462
|
+
: undefined;
|
|
7463
|
+
message.discarded = (object.discarded !== undefined && object.discarded !== null)
|
|
7464
|
+
? FileStateTierBucket.fromPartial(object.discarded)
|
|
7465
|
+
: undefined;
|
|
7466
|
+
return message;
|
|
7467
|
+
},
|
|
7468
|
+
};
|
|
7469
|
+
|
|
7470
|
+
function createBaseFileStateTierBucket(): FileStateTierBucket {
|
|
7471
|
+
return {
|
|
7472
|
+
files: 0,
|
|
7473
|
+
branches: 0,
|
|
7474
|
+
sessions: 0,
|
|
7475
|
+
costUsd: 0,
|
|
7476
|
+
costUsdUnverified: 0,
|
|
7477
|
+
outputTokens: 0,
|
|
7478
|
+
oldestAge: undefined,
|
|
7479
|
+
filesUnverified: 0,
|
|
7480
|
+
};
|
|
7481
|
+
}
|
|
7482
|
+
|
|
7483
|
+
export const FileStateTierBucket: MessageFns<FileStateTierBucket> = {
|
|
7484
|
+
encode(message: FileStateTierBucket, writer: BinaryWriter = new BinaryWriter()): BinaryWriter {
|
|
7485
|
+
if (message.files !== 0) {
|
|
7486
|
+
writer.uint32(8).uint64(message.files);
|
|
7487
|
+
}
|
|
7488
|
+
if (message.branches !== 0) {
|
|
7489
|
+
writer.uint32(16).uint64(message.branches);
|
|
7490
|
+
}
|
|
7491
|
+
if (message.sessions !== 0) {
|
|
7492
|
+
writer.uint32(24).uint64(message.sessions);
|
|
7493
|
+
}
|
|
7494
|
+
if (message.costUsd !== 0) {
|
|
7495
|
+
writer.uint32(33).double(message.costUsd);
|
|
7496
|
+
}
|
|
7497
|
+
if (message.costUsdUnverified !== 0) {
|
|
7498
|
+
writer.uint32(41).double(message.costUsdUnverified);
|
|
7499
|
+
}
|
|
7500
|
+
if (message.outputTokens !== 0) {
|
|
7501
|
+
writer.uint32(48).uint64(message.outputTokens);
|
|
7502
|
+
}
|
|
7503
|
+
if (message.oldestAge !== undefined) {
|
|
7504
|
+
Duration.encode(message.oldestAge, writer.uint32(58).fork()).join();
|
|
7505
|
+
}
|
|
7506
|
+
if (message.filesUnverified !== 0) {
|
|
7507
|
+
writer.uint32(64).uint64(message.filesUnverified);
|
|
7508
|
+
}
|
|
7509
|
+
return writer;
|
|
7510
|
+
},
|
|
7511
|
+
|
|
7512
|
+
decode(input: BinaryReader | Uint8Array, length?: number): FileStateTierBucket {
|
|
7513
|
+
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
|
|
7514
|
+
const previousRecursionDepth = (reader as any).__tsProtoDecodeDepth ?? 0;
|
|
7515
|
+
if (previousRecursionDepth >= 100) {
|
|
7516
|
+
throw new globalThis.Error("protobuf decode recursion limit exceeded");
|
|
7517
|
+
}
|
|
7518
|
+
(reader as any).__tsProtoDecodeDepth = previousRecursionDepth + 1;
|
|
7519
|
+
try {
|
|
7520
|
+
const end = length === undefined ? reader.len : reader.pos + length;
|
|
7521
|
+
const message = createBaseFileStateTierBucket();
|
|
7522
|
+
while (reader.pos < end) {
|
|
7523
|
+
const tag = reader.uint32();
|
|
7524
|
+
switch (tag >>> 3) {
|
|
7525
|
+
case 1: {
|
|
7526
|
+
if (tag !== 8) {
|
|
7527
|
+
break;
|
|
7528
|
+
}
|
|
7529
|
+
|
|
7530
|
+
message.files = longToNumber(reader.uint64());
|
|
7531
|
+
continue;
|
|
7532
|
+
}
|
|
7533
|
+
case 2: {
|
|
7534
|
+
if (tag !== 16) {
|
|
7535
|
+
break;
|
|
7536
|
+
}
|
|
7537
|
+
|
|
7538
|
+
message.branches = longToNumber(reader.uint64());
|
|
7539
|
+
continue;
|
|
7540
|
+
}
|
|
7541
|
+
case 3: {
|
|
7542
|
+
if (tag !== 24) {
|
|
7543
|
+
break;
|
|
7544
|
+
}
|
|
7545
|
+
|
|
7546
|
+
message.sessions = longToNumber(reader.uint64());
|
|
7547
|
+
continue;
|
|
7548
|
+
}
|
|
7549
|
+
case 4: {
|
|
7550
|
+
if (tag !== 33) {
|
|
7551
|
+
break;
|
|
7552
|
+
}
|
|
7553
|
+
|
|
7554
|
+
message.costUsd = reader.double();
|
|
7555
|
+
continue;
|
|
7556
|
+
}
|
|
7557
|
+
case 5: {
|
|
7558
|
+
if (tag !== 41) {
|
|
7559
|
+
break;
|
|
7560
|
+
}
|
|
7561
|
+
|
|
7562
|
+
message.costUsdUnverified = reader.double();
|
|
7563
|
+
continue;
|
|
7564
|
+
}
|
|
7565
|
+
case 6: {
|
|
7566
|
+
if (tag !== 48) {
|
|
7567
|
+
break;
|
|
7568
|
+
}
|
|
7569
|
+
|
|
7570
|
+
message.outputTokens = longToNumber(reader.uint64());
|
|
7571
|
+
continue;
|
|
7572
|
+
}
|
|
7573
|
+
case 7: {
|
|
7574
|
+
if (tag !== 58) {
|
|
7575
|
+
break;
|
|
7576
|
+
}
|
|
7577
|
+
|
|
7578
|
+
message.oldestAge = Duration.decode(reader, reader.uint32());
|
|
7579
|
+
continue;
|
|
7580
|
+
}
|
|
7581
|
+
case 8: {
|
|
7582
|
+
if (tag !== 64) {
|
|
7583
|
+
break;
|
|
7584
|
+
}
|
|
7585
|
+
|
|
7586
|
+
message.filesUnverified = longToNumber(reader.uint64());
|
|
7587
|
+
continue;
|
|
7588
|
+
}
|
|
7589
|
+
}
|
|
7590
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
7591
|
+
break;
|
|
7592
|
+
}
|
|
7593
|
+
reader.skip(tag & 7);
|
|
7594
|
+
}
|
|
7595
|
+
return message;
|
|
7596
|
+
} finally {
|
|
7597
|
+
(reader as any).__tsProtoDecodeDepth = previousRecursionDepth;
|
|
7598
|
+
}
|
|
7599
|
+
},
|
|
7600
|
+
|
|
7601
|
+
fromJSON(object: any): FileStateTierBucket {
|
|
7602
|
+
return {
|
|
7603
|
+
files: isSet(object.files) ? globalThis.Number(object.files) : 0,
|
|
7604
|
+
branches: isSet(object.branches) ? globalThis.Number(object.branches) : 0,
|
|
7605
|
+
sessions: isSet(object.sessions) ? globalThis.Number(object.sessions) : 0,
|
|
7606
|
+
costUsd: isSet(object.costUsd)
|
|
7607
|
+
? globalThis.Number(object.costUsd)
|
|
7608
|
+
: isSet(object.cost_usd)
|
|
7609
|
+
? globalThis.Number(object.cost_usd)
|
|
7610
|
+
: 0,
|
|
7611
|
+
costUsdUnverified: isSet(object.costUsdUnverified)
|
|
7612
|
+
? globalThis.Number(object.costUsdUnverified)
|
|
7613
|
+
: isSet(object.cost_usd_unverified)
|
|
7614
|
+
? globalThis.Number(object.cost_usd_unverified)
|
|
7615
|
+
: 0,
|
|
7616
|
+
outputTokens: isSet(object.outputTokens)
|
|
7617
|
+
? globalThis.Number(object.outputTokens)
|
|
7618
|
+
: isSet(object.output_tokens)
|
|
7619
|
+
? globalThis.Number(object.output_tokens)
|
|
7620
|
+
: 0,
|
|
7621
|
+
oldestAge: isSet(object.oldestAge)
|
|
7622
|
+
? Duration.fromJSON(object.oldestAge)
|
|
7623
|
+
: isSet(object.oldest_age)
|
|
7624
|
+
? Duration.fromJSON(object.oldest_age)
|
|
7625
|
+
: undefined,
|
|
7626
|
+
filesUnverified: isSet(object.filesUnverified)
|
|
7627
|
+
? globalThis.Number(object.filesUnverified)
|
|
7628
|
+
: isSet(object.files_unverified)
|
|
7629
|
+
? globalThis.Number(object.files_unverified)
|
|
7630
|
+
: 0,
|
|
7631
|
+
};
|
|
7632
|
+
},
|
|
7633
|
+
|
|
7634
|
+
toJSON(message: FileStateTierBucket): unknown {
|
|
7635
|
+
const obj: any = {};
|
|
7636
|
+
if (message.files !== 0) {
|
|
7637
|
+
obj.files = Math.round(message.files);
|
|
7638
|
+
}
|
|
7639
|
+
if (message.branches !== 0) {
|
|
7640
|
+
obj.branches = Math.round(message.branches);
|
|
7641
|
+
}
|
|
7642
|
+
if (message.sessions !== 0) {
|
|
7643
|
+
obj.sessions = Math.round(message.sessions);
|
|
7644
|
+
}
|
|
7645
|
+
if (message.costUsd !== 0) {
|
|
7646
|
+
obj.costUsd = message.costUsd;
|
|
7647
|
+
}
|
|
7648
|
+
if (message.costUsdUnverified !== 0) {
|
|
7649
|
+
obj.costUsdUnverified = message.costUsdUnverified;
|
|
7650
|
+
}
|
|
7651
|
+
if (message.outputTokens !== 0) {
|
|
7652
|
+
obj.outputTokens = Math.round(message.outputTokens);
|
|
7653
|
+
}
|
|
7654
|
+
if (message.oldestAge !== undefined) {
|
|
7655
|
+
obj.oldestAge = Duration.toJSON(message.oldestAge);
|
|
7656
|
+
}
|
|
7657
|
+
if (message.filesUnverified !== 0) {
|
|
7658
|
+
obj.filesUnverified = Math.round(message.filesUnverified);
|
|
7659
|
+
}
|
|
7660
|
+
return obj;
|
|
7661
|
+
},
|
|
7662
|
+
|
|
7663
|
+
create<I extends Exact<DeepPartial<FileStateTierBucket>, I>>(base?: I): FileStateTierBucket {
|
|
7664
|
+
return FileStateTierBucket.fromPartial(base ?? ({} as any));
|
|
7665
|
+
},
|
|
7666
|
+
fromPartial<I extends Exact<DeepPartial<FileStateTierBucket>, I>>(object: I): FileStateTierBucket {
|
|
7667
|
+
const message = createBaseFileStateTierBucket();
|
|
7668
|
+
message.files = object.files ?? 0;
|
|
7669
|
+
message.branches = object.branches ?? 0;
|
|
7670
|
+
message.sessions = object.sessions ?? 0;
|
|
7671
|
+
message.costUsd = object.costUsd ?? 0;
|
|
7672
|
+
message.costUsdUnverified = object.costUsdUnverified ?? 0;
|
|
7673
|
+
message.outputTokens = object.outputTokens ?? 0;
|
|
7674
|
+
message.oldestAge = (object.oldestAge !== undefined && object.oldestAge !== null)
|
|
7675
|
+
? Duration.fromPartial(object.oldestAge)
|
|
7676
|
+
: undefined;
|
|
7677
|
+
message.filesUnverified = object.filesUnverified ?? 0;
|
|
7678
|
+
return message;
|
|
7679
|
+
},
|
|
7680
|
+
};
|
|
7681
|
+
|
|
7682
|
+
function createBaseFileStateGroup(): FileStateGroup {
|
|
7683
|
+
return { key: "", tiers: undefined };
|
|
7684
|
+
}
|
|
7685
|
+
|
|
7686
|
+
export const FileStateGroup: MessageFns<FileStateGroup> = {
|
|
7687
|
+
encode(message: FileStateGroup, writer: BinaryWriter = new BinaryWriter()): BinaryWriter {
|
|
7688
|
+
if (message.key !== "") {
|
|
7689
|
+
writer.uint32(10).string(message.key);
|
|
7690
|
+
}
|
|
7691
|
+
if (message.tiers !== undefined) {
|
|
7692
|
+
FileStateTiers.encode(message.tiers, writer.uint32(18).fork()).join();
|
|
7693
|
+
}
|
|
7694
|
+
return writer;
|
|
7695
|
+
},
|
|
7696
|
+
|
|
7697
|
+
decode(input: BinaryReader | Uint8Array, length?: number): FileStateGroup {
|
|
7698
|
+
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
|
|
7699
|
+
const previousRecursionDepth = (reader as any).__tsProtoDecodeDepth ?? 0;
|
|
7700
|
+
if (previousRecursionDepth >= 100) {
|
|
7701
|
+
throw new globalThis.Error("protobuf decode recursion limit exceeded");
|
|
7702
|
+
}
|
|
7703
|
+
(reader as any).__tsProtoDecodeDepth = previousRecursionDepth + 1;
|
|
7704
|
+
try {
|
|
7705
|
+
const end = length === undefined ? reader.len : reader.pos + length;
|
|
7706
|
+
const message = createBaseFileStateGroup();
|
|
7707
|
+
while (reader.pos < end) {
|
|
7708
|
+
const tag = reader.uint32();
|
|
7709
|
+
switch (tag >>> 3) {
|
|
7710
|
+
case 1: {
|
|
7711
|
+
if (tag !== 10) {
|
|
7712
|
+
break;
|
|
7713
|
+
}
|
|
7714
|
+
|
|
7715
|
+
message.key = reader.string();
|
|
7716
|
+
continue;
|
|
7717
|
+
}
|
|
7718
|
+
case 2: {
|
|
7719
|
+
if (tag !== 18) {
|
|
7720
|
+
break;
|
|
7721
|
+
}
|
|
7722
|
+
|
|
7723
|
+
message.tiers = FileStateTiers.decode(reader, reader.uint32());
|
|
7724
|
+
continue;
|
|
7725
|
+
}
|
|
7726
|
+
}
|
|
7727
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
7728
|
+
break;
|
|
7729
|
+
}
|
|
7730
|
+
reader.skip(tag & 7);
|
|
7731
|
+
}
|
|
7732
|
+
return message;
|
|
7733
|
+
} finally {
|
|
7734
|
+
(reader as any).__tsProtoDecodeDepth = previousRecursionDepth;
|
|
7735
|
+
}
|
|
7736
|
+
},
|
|
7737
|
+
|
|
7738
|
+
fromJSON(object: any): FileStateGroup {
|
|
7739
|
+
return {
|
|
7740
|
+
key: isSet(object.key) ? globalThis.String(object.key) : "",
|
|
7741
|
+
tiers: isSet(object.tiers) ? FileStateTiers.fromJSON(object.tiers) : undefined,
|
|
7742
|
+
};
|
|
7743
|
+
},
|
|
7744
|
+
|
|
7745
|
+
toJSON(message: FileStateGroup): unknown {
|
|
7746
|
+
const obj: any = {};
|
|
7747
|
+
if (message.key !== "") {
|
|
7748
|
+
obj.key = message.key;
|
|
7749
|
+
}
|
|
7750
|
+
if (message.tiers !== undefined) {
|
|
7751
|
+
obj.tiers = FileStateTiers.toJSON(message.tiers);
|
|
7752
|
+
}
|
|
7753
|
+
return obj;
|
|
7754
|
+
},
|
|
7755
|
+
|
|
7756
|
+
create<I extends Exact<DeepPartial<FileStateGroup>, I>>(base?: I): FileStateGroup {
|
|
7757
|
+
return FileStateGroup.fromPartial(base ?? ({} as any));
|
|
7758
|
+
},
|
|
7759
|
+
fromPartial<I extends Exact<DeepPartial<FileStateGroup>, I>>(object: I): FileStateGroup {
|
|
7760
|
+
const message = createBaseFileStateGroup();
|
|
7761
|
+
message.key = object.key ?? "";
|
|
7762
|
+
message.tiers = (object.tiers !== undefined && object.tiers !== null)
|
|
7763
|
+
? FileStateTiers.fromPartial(object.tiers)
|
|
7764
|
+
: undefined;
|
|
7765
|
+
return message;
|
|
7766
|
+
},
|
|
7767
|
+
};
|
|
7768
|
+
|
|
7769
|
+
function createBaseAITokenUsage(): AITokenUsage {
|
|
7770
|
+
return { inputTokens: 0, outputTokens: 0, cacheReadTokens: 0, cacheWriteTokens: 0, providerCostUsd: 0 };
|
|
7771
|
+
}
|
|
7772
|
+
|
|
7773
|
+
export const AITokenUsage: MessageFns<AITokenUsage> = {
|
|
7774
|
+
encode(message: AITokenUsage, writer: BinaryWriter = new BinaryWriter()): BinaryWriter {
|
|
7775
|
+
if (message.inputTokens !== 0) {
|
|
7776
|
+
writer.uint32(8).uint64(message.inputTokens);
|
|
7777
|
+
}
|
|
7778
|
+
if (message.outputTokens !== 0) {
|
|
7779
|
+
writer.uint32(16).uint64(message.outputTokens);
|
|
7780
|
+
}
|
|
7781
|
+
if (message.cacheReadTokens !== 0) {
|
|
7782
|
+
writer.uint32(24).uint64(message.cacheReadTokens);
|
|
7783
|
+
}
|
|
7784
|
+
if (message.cacheWriteTokens !== 0) {
|
|
7785
|
+
writer.uint32(32).uint64(message.cacheWriteTokens);
|
|
7786
|
+
}
|
|
7787
|
+
if (message.providerCostUsd !== 0) {
|
|
7788
|
+
writer.uint32(41).double(message.providerCostUsd);
|
|
7789
|
+
}
|
|
7790
|
+
return writer;
|
|
7791
|
+
},
|
|
7792
|
+
|
|
7793
|
+
decode(input: BinaryReader | Uint8Array, length?: number): AITokenUsage {
|
|
7794
|
+
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
|
|
7795
|
+
const previousRecursionDepth = (reader as any).__tsProtoDecodeDepth ?? 0;
|
|
7796
|
+
if (previousRecursionDepth >= 100) {
|
|
7797
|
+
throw new globalThis.Error("protobuf decode recursion limit exceeded");
|
|
7798
|
+
}
|
|
7799
|
+
(reader as any).__tsProtoDecodeDepth = previousRecursionDepth + 1;
|
|
7800
|
+
try {
|
|
7801
|
+
const end = length === undefined ? reader.len : reader.pos + length;
|
|
7802
|
+
const message = createBaseAITokenUsage();
|
|
7803
|
+
while (reader.pos < end) {
|
|
7804
|
+
const tag = reader.uint32();
|
|
7805
|
+
switch (tag >>> 3) {
|
|
7806
|
+
case 1: {
|
|
7807
|
+
if (tag !== 8) {
|
|
7808
|
+
break;
|
|
7809
|
+
}
|
|
7810
|
+
|
|
7811
|
+
message.inputTokens = longToNumber(reader.uint64());
|
|
7812
|
+
continue;
|
|
7813
|
+
}
|
|
7814
|
+
case 2: {
|
|
7815
|
+
if (tag !== 16) {
|
|
7816
|
+
break;
|
|
7817
|
+
}
|
|
7818
|
+
|
|
7819
|
+
message.outputTokens = longToNumber(reader.uint64());
|
|
7820
|
+
continue;
|
|
7821
|
+
}
|
|
7822
|
+
case 3: {
|
|
7823
|
+
if (tag !== 24) {
|
|
7824
|
+
break;
|
|
7825
|
+
}
|
|
7826
|
+
|
|
7827
|
+
message.cacheReadTokens = longToNumber(reader.uint64());
|
|
7828
|
+
continue;
|
|
7829
|
+
}
|
|
7830
|
+
case 4: {
|
|
7831
|
+
if (tag !== 32) {
|
|
7832
|
+
break;
|
|
7833
|
+
}
|
|
7834
|
+
|
|
7835
|
+
message.cacheWriteTokens = longToNumber(reader.uint64());
|
|
7836
|
+
continue;
|
|
7837
|
+
}
|
|
7838
|
+
case 5: {
|
|
7839
|
+
if (tag !== 41) {
|
|
7840
|
+
break;
|
|
7841
|
+
}
|
|
7842
|
+
|
|
7843
|
+
message.providerCostUsd = reader.double();
|
|
7844
|
+
continue;
|
|
7845
|
+
}
|
|
7846
|
+
}
|
|
7847
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
7848
|
+
break;
|
|
7849
|
+
}
|
|
7850
|
+
reader.skip(tag & 7);
|
|
7851
|
+
}
|
|
7852
|
+
return message;
|
|
7853
|
+
} finally {
|
|
7854
|
+
(reader as any).__tsProtoDecodeDepth = previousRecursionDepth;
|
|
7855
|
+
}
|
|
7856
|
+
},
|
|
7857
|
+
|
|
7858
|
+
fromJSON(object: any): AITokenUsage {
|
|
7859
|
+
return {
|
|
7860
|
+
inputTokens: isSet(object.inputTokens)
|
|
7861
|
+
? globalThis.Number(object.inputTokens)
|
|
7862
|
+
: isSet(object.input_tokens)
|
|
7863
|
+
? globalThis.Number(object.input_tokens)
|
|
4292
7864
|
: 0,
|
|
4293
7865
|
outputTokens: isSet(object.outputTokens)
|
|
4294
7866
|
? globalThis.Number(object.outputTokens)
|
|
@@ -4305,10 +7877,10 @@ export const AITokenUsage: MessageFns<AITokenUsage> = {
|
|
|
4305
7877
|
: isSet(object.cache_write_tokens)
|
|
4306
7878
|
? globalThis.Number(object.cache_write_tokens)
|
|
4307
7879
|
: 0,
|
|
4308
|
-
|
|
4309
|
-
? globalThis.Number(object.
|
|
4310
|
-
: isSet(object.
|
|
4311
|
-
? globalThis.Number(object.
|
|
7880
|
+
providerCostUsd: isSet(object.providerCostUsd)
|
|
7881
|
+
? globalThis.Number(object.providerCostUsd)
|
|
7882
|
+
: isSet(object.provider_cost_usd)
|
|
7883
|
+
? globalThis.Number(object.provider_cost_usd)
|
|
4312
7884
|
: 0,
|
|
4313
7885
|
};
|
|
4314
7886
|
},
|
|
@@ -4327,8 +7899,8 @@ export const AITokenUsage: MessageFns<AITokenUsage> = {
|
|
|
4327
7899
|
if (message.cacheWriteTokens !== 0) {
|
|
4328
7900
|
obj.cacheWriteTokens = Math.round(message.cacheWriteTokens);
|
|
4329
7901
|
}
|
|
4330
|
-
if (message.
|
|
4331
|
-
obj.
|
|
7902
|
+
if (message.providerCostUsd !== 0) {
|
|
7903
|
+
obj.providerCostUsd = message.providerCostUsd;
|
|
4332
7904
|
}
|
|
4333
7905
|
return obj;
|
|
4334
7906
|
},
|
|
@@ -4342,7 +7914,7 @@ export const AITokenUsage: MessageFns<AITokenUsage> = {
|
|
|
4342
7914
|
message.outputTokens = object.outputTokens ?? 0;
|
|
4343
7915
|
message.cacheReadTokens = object.cacheReadTokens ?? 0;
|
|
4344
7916
|
message.cacheWriteTokens = object.cacheWriteTokens ?? 0;
|
|
4345
|
-
message.
|
|
7917
|
+
message.providerCostUsd = object.providerCostUsd ?? 0;
|
|
4346
7918
|
return message;
|
|
4347
7919
|
},
|
|
4348
7920
|
};
|
|
@@ -4357,16 +7929,43 @@ export const AITokenUsage: MessageFns<AITokenUsage> = {
|
|
|
4357
7929
|
*/
|
|
4358
7930
|
export interface AIGatewayService {
|
|
4359
7931
|
ListSessions(request: ListSessionsRequest, metadata?: Metadata): Promise<ListSessionsResponse>;
|
|
7932
|
+
/**
|
|
7933
|
+
* Live UPSERT catalog over the same slice as ListSessions (same filter): an
|
|
7934
|
+
* UPSERT per session keyed by routing_key + source_system, a nonterminal
|
|
7935
|
+
* SessionsSnapshotCompleted, then new sessions as created + rollup updates until
|
|
7936
|
+
* cancel. UPSERT-only (no removal frame): a session whose rollup shifts out of the
|
|
7937
|
+
* filter simply stops being re-sent, so this notifies about currently-matching rows
|
|
7938
|
+
* rather than maintaining a filtered catalog. Best-effort live delta; ListSessions
|
|
7939
|
+
* is the authoritative catalog.
|
|
7940
|
+
*/
|
|
7941
|
+
StreamSessions(request: StreamSessionsRequest, metadata?: Metadata): Observable<SessionFrame>;
|
|
4360
7942
|
ListSessionEvents(request: ListSessionEventsRequest, metadata?: Metadata): Promise<ListSessionEventsResponse>;
|
|
4361
7943
|
StreamSessionEvents(request: StreamSessionEventsRequest, metadata?: Metadata): Observable<AISessionEventEnvelope>;
|
|
4362
7944
|
ListPrincipals(request: ListPrincipalsRequest, metadata?: Metadata): Promise<ListPrincipalsResponse>;
|
|
4363
7945
|
UpdatePrincipal(request: UpdatePrincipalRequest, metadata?: Metadata): Promise<UpdatePrincipalResponse>;
|
|
7946
|
+
/** Filtered, keyset-paginated drill-down feed of git/GitHub actions (newest first). */
|
|
4364
7947
|
ListGitActivities(request: ListGitActivitiesRequest, metadata?: Metadata): Promise<ListGitActivitiesResponse>;
|
|
4365
7948
|
/**
|
|
4366
|
-
* Live stream of
|
|
7949
|
+
* Live stream of the filtered git/GitHub feed (UPSERT per activity keyed by
|
|
4367
7950
|
* activity_id, a nonterminal GitActivitiesSnapshotCompleted, then open until cancel).
|
|
4368
7951
|
*/
|
|
4369
7952
|
StreamGitActivities(request: StreamGitActivitiesRequest, metadata?: Metadata): Observable<GitActivityFrame>;
|
|
7953
|
+
/**
|
|
7954
|
+
* Time-bucketed rollup of the filtered git activities, sliced by one dimension —
|
|
7955
|
+
* the git dashboard's overview; whole-window totals ride the response.
|
|
7956
|
+
*/
|
|
7957
|
+
GetGitActivitySummary(
|
|
7958
|
+
request: GitActivitySummaryRequest,
|
|
7959
|
+
metadata?: Metadata,
|
|
7960
|
+
): Promise<GetGitActivitySummaryResponse>;
|
|
7961
|
+
/** Live stream of that rollup: a full windowed snapshot re-derived each tick. */
|
|
7962
|
+
StreamGitActivitySummary(request: GitActivitySummaryRequest, metadata?: Metadata): Observable<GitActivitySummary>;
|
|
7963
|
+
/** Per-file working-state feed (keyset-paginated) behind the unlanded-work funnel. */
|
|
7964
|
+
ListFileStates(request: ListFileStatesRequest, metadata?: Metadata): Promise<ListFileStatesResponse>;
|
|
7965
|
+
/** The unlanded-work funnel: aging tiers + discarded (git-invisible churn), observed vs unverified. */
|
|
7966
|
+
GetFileStateSummary(request: FileStateSummaryRequest, metadata?: Metadata): Promise<GetFileStateSummaryResponse>;
|
|
7967
|
+
/** Live stream of the funnel: a complete snapshot re-derived each tick. */
|
|
7968
|
+
StreamFileStateSummary(request: FileStateSummaryRequest, metadata?: Metadata): Observable<FileStateSummary>;
|
|
4370
7969
|
}
|
|
4371
7970
|
|
|
4372
7971
|
export const AIGatewayServiceServiceName = "gateway.web.v1.AIGatewayService";
|
|
@@ -4377,12 +7976,18 @@ export class AIGatewayServiceClientImpl implements AIGatewayService {
|
|
|
4377
7976
|
this.service = opts?.service || AIGatewayServiceServiceName;
|
|
4378
7977
|
this.rpc = rpc;
|
|
4379
7978
|
this.ListSessions = this.ListSessions.bind(this);
|
|
7979
|
+
this.StreamSessions = this.StreamSessions.bind(this);
|
|
4380
7980
|
this.ListSessionEvents = this.ListSessionEvents.bind(this);
|
|
4381
7981
|
this.StreamSessionEvents = this.StreamSessionEvents.bind(this);
|
|
4382
7982
|
this.ListPrincipals = this.ListPrincipals.bind(this);
|
|
4383
7983
|
this.UpdatePrincipal = this.UpdatePrincipal.bind(this);
|
|
4384
7984
|
this.ListGitActivities = this.ListGitActivities.bind(this);
|
|
4385
7985
|
this.StreamGitActivities = this.StreamGitActivities.bind(this);
|
|
7986
|
+
this.GetGitActivitySummary = this.GetGitActivitySummary.bind(this);
|
|
7987
|
+
this.StreamGitActivitySummary = this.StreamGitActivitySummary.bind(this);
|
|
7988
|
+
this.ListFileStates = this.ListFileStates.bind(this);
|
|
7989
|
+
this.GetFileStateSummary = this.GetFileStateSummary.bind(this);
|
|
7990
|
+
this.StreamFileStateSummary = this.StreamFileStateSummary.bind(this);
|
|
4386
7991
|
}
|
|
4387
7992
|
ListSessions(request: ListSessionsRequest, metadata?: Metadata): Promise<ListSessionsResponse> {
|
|
4388
7993
|
const data = ListSessionsRequest.encode(request).finish();
|
|
@@ -4390,6 +7995,12 @@ export class AIGatewayServiceClientImpl implements AIGatewayService {
|
|
|
4390
7995
|
return promise.then((data) => ListSessionsResponse.decode(new BinaryReader(data)));
|
|
4391
7996
|
}
|
|
4392
7997
|
|
|
7998
|
+
StreamSessions(request: StreamSessionsRequest, metadata?: Metadata): Observable<SessionFrame> {
|
|
7999
|
+
const data = StreamSessionsRequest.encode(request).finish();
|
|
8000
|
+
const result = this.rpc.serverStreamingRequest(this.service, "StreamSessions", data, metadata);
|
|
8001
|
+
return result.pipe(map((data) => SessionFrame.decode(new BinaryReader(data))));
|
|
8002
|
+
}
|
|
8003
|
+
|
|
4393
8004
|
ListSessionEvents(request: ListSessionEventsRequest, metadata?: Metadata): Promise<ListSessionEventsResponse> {
|
|
4394
8005
|
const data = ListSessionEventsRequest.encode(request).finish();
|
|
4395
8006
|
const promise = this.rpc.request(this.service, "ListSessionEvents", data, metadata);
|
|
@@ -4425,6 +8036,39 @@ export class AIGatewayServiceClientImpl implements AIGatewayService {
|
|
|
4425
8036
|
const result = this.rpc.serverStreamingRequest(this.service, "StreamGitActivities", data, metadata);
|
|
4426
8037
|
return result.pipe(map((data) => GitActivityFrame.decode(new BinaryReader(data))));
|
|
4427
8038
|
}
|
|
8039
|
+
|
|
8040
|
+
GetGitActivitySummary(
|
|
8041
|
+
request: GitActivitySummaryRequest,
|
|
8042
|
+
metadata?: Metadata,
|
|
8043
|
+
): Promise<GetGitActivitySummaryResponse> {
|
|
8044
|
+
const data = GitActivitySummaryRequest.encode(request).finish();
|
|
8045
|
+
const promise = this.rpc.request(this.service, "GetGitActivitySummary", data, metadata);
|
|
8046
|
+
return promise.then((data) => GetGitActivitySummaryResponse.decode(new BinaryReader(data)));
|
|
8047
|
+
}
|
|
8048
|
+
|
|
8049
|
+
StreamGitActivitySummary(request: GitActivitySummaryRequest, metadata?: Metadata): Observable<GitActivitySummary> {
|
|
8050
|
+
const data = GitActivitySummaryRequest.encode(request).finish();
|
|
8051
|
+
const result = this.rpc.serverStreamingRequest(this.service, "StreamGitActivitySummary", data, metadata);
|
|
8052
|
+
return result.pipe(map((data) => GitActivitySummary.decode(new BinaryReader(data))));
|
|
8053
|
+
}
|
|
8054
|
+
|
|
8055
|
+
ListFileStates(request: ListFileStatesRequest, metadata?: Metadata): Promise<ListFileStatesResponse> {
|
|
8056
|
+
const data = ListFileStatesRequest.encode(request).finish();
|
|
8057
|
+
const promise = this.rpc.request(this.service, "ListFileStates", data, metadata);
|
|
8058
|
+
return promise.then((data) => ListFileStatesResponse.decode(new BinaryReader(data)));
|
|
8059
|
+
}
|
|
8060
|
+
|
|
8061
|
+
GetFileStateSummary(request: FileStateSummaryRequest, metadata?: Metadata): Promise<GetFileStateSummaryResponse> {
|
|
8062
|
+
const data = FileStateSummaryRequest.encode(request).finish();
|
|
8063
|
+
const promise = this.rpc.request(this.service, "GetFileStateSummary", data, metadata);
|
|
8064
|
+
return promise.then((data) => GetFileStateSummaryResponse.decode(new BinaryReader(data)));
|
|
8065
|
+
}
|
|
8066
|
+
|
|
8067
|
+
StreamFileStateSummary(request: FileStateSummaryRequest, metadata?: Metadata): Observable<FileStateSummary> {
|
|
8068
|
+
const data = FileStateSummaryRequest.encode(request).finish();
|
|
8069
|
+
const result = this.rpc.serverStreamingRequest(this.service, "StreamFileStateSummary", data, metadata);
|
|
8070
|
+
return result.pipe(map((data) => FileStateSummary.decode(new BinaryReader(data))));
|
|
8071
|
+
}
|
|
4428
8072
|
}
|
|
4429
8073
|
|
|
4430
8074
|
interface Rpc {
|