@miradorlabs/web-grpc 2.45.0 → 2.49.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/package.json +1 -1
- package/proto/gateway/common/v1/attribute_value_pb.js +7 -13
- package/proto/gateway/common/v1/status_pb.js +3 -9
- package/proto/gateway/common/v1/types_pb.js +3 -9
- package/proto/gateway/web/v1/account_gateway_pb.js +178 -184
- package/proto/gateway/web/v1/ai_gateway.ts +4008 -130
- package/proto/gateway/web/v1/ai_gateway_grpc_pb.js +190 -4
- package/proto/gateway/web/v1/ai_gateway_pb.js +10926 -3614
- package/proto/gateway/web/v1/attribute_value_pb.js +7 -13
- package/proto/gateway/web/v1/chain_gateway_pb.js +102 -108
- package/proto/gateway/web/v1/common_pb.js +1 -7
- package/proto/gateway/web/v1/derived_metric_gateway_pb.js +63 -64
- package/proto/gateway/web/v1/integration_gateway_pb.js +65 -66
- package/proto/gateway/web/v1/log_gateway_pb.js +46 -42
- package/proto/gateway/web/v1/market_gateway_pb.js +11 -17
- package/proto/gateway/web/v1/metric_gateway_pb.js +107 -103
- package/proto/gateway/web/v1/oauth_gateway_pb.js +52 -58
- package/proto/gateway/web/v1/plan_gateway_pb.js +26 -32
- package/proto/gateway/web/v1/rule_gateway_pb.js +131 -137
- package/proto/gateway/web/v1/slo_gateway_pb.js +122 -123
- package/proto/gateway/web/v1/trace_gateway_pb.js +142 -114
- package/proto/gateway/web/v1/trace_measure_gateway_pb.js +20 -24
|
@@ -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,6 +263,255 @@ 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;
|
|
@@ -433,23 +691,37 @@ export interface UpdatePrincipalResponse {
|
|
|
433
691
|
principal: AIPrincipal | undefined;
|
|
434
692
|
}
|
|
435
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
|
+
|
|
436
707
|
export interface ListGitActivitiesRequest {
|
|
437
708
|
organizationId: string;
|
|
438
709
|
projectId: string;
|
|
439
|
-
|
|
440
|
-
|
|
710
|
+
filter: AIGitActivityFilter | undefined;
|
|
711
|
+
pageSize: number;
|
|
712
|
+
pageToken: string;
|
|
441
713
|
}
|
|
442
714
|
|
|
443
715
|
export interface ListGitActivitiesResponse {
|
|
444
716
|
status: ResponseStatus | undefined;
|
|
445
717
|
activities: AIGitActivity[];
|
|
718
|
+
nextPageToken: string;
|
|
446
719
|
}
|
|
447
720
|
|
|
448
721
|
export interface StreamGitActivitiesRequest {
|
|
449
722
|
organizationId: string;
|
|
450
723
|
projectId: string;
|
|
451
|
-
|
|
452
|
-
sourceSystem: string;
|
|
724
|
+
filter: AIGitActivityFilter | undefined;
|
|
453
725
|
}
|
|
454
726
|
|
|
455
727
|
/**
|
|
@@ -499,12 +771,197 @@ export interface AIGitActivity {
|
|
|
499
771
|
activityId: string;
|
|
500
772
|
}
|
|
501
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
|
+
|
|
926
|
+
export interface ListModelPricesRequest {
|
|
927
|
+
organizationId: string;
|
|
928
|
+
projectId: string;
|
|
929
|
+
/** Structured filter. Unset or empty = the full latest catalog (still paginated). */
|
|
930
|
+
filter: AIModelPriceFilter | undefined;
|
|
931
|
+
pageSize: number;
|
|
932
|
+
pageToken: string;
|
|
933
|
+
}
|
|
934
|
+
|
|
935
|
+
export interface AIModelPriceFilter {
|
|
936
|
+
source: string[];
|
|
937
|
+
provider: string[];
|
|
938
|
+
model: string[];
|
|
939
|
+
}
|
|
940
|
+
|
|
941
|
+
export interface ListModelPricesResponse {
|
|
942
|
+
status: ResponseStatus | undefined;
|
|
943
|
+
prices: AIModelPrice[];
|
|
944
|
+
nextPageToken: string;
|
|
945
|
+
totalCount?: number | undefined;
|
|
946
|
+
}
|
|
947
|
+
|
|
948
|
+
export interface AIModelPrice {
|
|
949
|
+
source: string;
|
|
950
|
+
provider: string;
|
|
951
|
+
model: string;
|
|
952
|
+
scrapedAt: Date | undefined;
|
|
953
|
+
inputUsdPerMtok: number;
|
|
954
|
+
outputUsdPerMtok: number;
|
|
955
|
+
cacheReadUsdPerMtok: number;
|
|
956
|
+
cacheWriteUsdPerMtok: number;
|
|
957
|
+
}
|
|
958
|
+
|
|
502
959
|
export interface AITokenUsage {
|
|
503
960
|
inputTokens: number;
|
|
504
961
|
outputTokens: number;
|
|
505
962
|
cacheReadTokens: number;
|
|
506
963
|
cacheWriteTokens: number;
|
|
507
|
-
|
|
964
|
+
providerCostUsd: number;
|
|
508
965
|
}
|
|
509
966
|
|
|
510
967
|
function createBaseListSessionsRequest(): ListSessionsRequest {
|
|
@@ -3429,28 +3886,28 @@ export const UpdatePrincipalResponse: MessageFns<UpdatePrincipalResponse> = {
|
|
|
3429
3886
|
},
|
|
3430
3887
|
};
|
|
3431
3888
|
|
|
3432
|
-
function
|
|
3433
|
-
return {
|
|
3889
|
+
function createBaseAIGitActivityFilter(): AIGitActivityFilter {
|
|
3890
|
+
return { sessionId: [], sourceSystem: [], eventTimeAfter: undefined, eventTimeBefore: undefined };
|
|
3434
3891
|
}
|
|
3435
3892
|
|
|
3436
|
-
export const
|
|
3437
|
-
encode(message:
|
|
3438
|
-
|
|
3439
|
-
writer.uint32(10).string(
|
|
3893
|
+
export const AIGitActivityFilter: MessageFns<AIGitActivityFilter> = {
|
|
3894
|
+
encode(message: AIGitActivityFilter, writer: BinaryWriter = new BinaryWriter()): BinaryWriter {
|
|
3895
|
+
for (const v of message.sessionId) {
|
|
3896
|
+
writer.uint32(10).string(v!);
|
|
3440
3897
|
}
|
|
3441
|
-
|
|
3442
|
-
writer.uint32(18).string(
|
|
3898
|
+
for (const v of message.sourceSystem) {
|
|
3899
|
+
writer.uint32(18).string(v!);
|
|
3443
3900
|
}
|
|
3444
|
-
if (message.
|
|
3445
|
-
writer.uint32(26).
|
|
3901
|
+
if (message.eventTimeAfter !== undefined) {
|
|
3902
|
+
Timestamp.encode(toTimestamp(message.eventTimeAfter), writer.uint32(26).fork()).join();
|
|
3446
3903
|
}
|
|
3447
|
-
if (message.
|
|
3448
|
-
writer.uint32(34).
|
|
3904
|
+
if (message.eventTimeBefore !== undefined) {
|
|
3905
|
+
Timestamp.encode(toTimestamp(message.eventTimeBefore), writer.uint32(34).fork()).join();
|
|
3449
3906
|
}
|
|
3450
3907
|
return writer;
|
|
3451
3908
|
},
|
|
3452
3909
|
|
|
3453
|
-
decode(input: BinaryReader | Uint8Array, length?: number):
|
|
3910
|
+
decode(input: BinaryReader | Uint8Array, length?: number): AIGitActivityFilter {
|
|
3454
3911
|
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
|
|
3455
3912
|
const previousRecursionDepth = (reader as any).__tsProtoDecodeDepth ?? 0;
|
|
3456
3913
|
if (previousRecursionDepth >= 100) {
|
|
@@ -3459,7 +3916,7 @@ export const ListGitActivitiesRequest: MessageFns<ListGitActivitiesRequest> = {
|
|
|
3459
3916
|
(reader as any).__tsProtoDecodeDepth = previousRecursionDepth + 1;
|
|
3460
3917
|
try {
|
|
3461
3918
|
const end = length === undefined ? reader.len : reader.pos + length;
|
|
3462
|
-
const message =
|
|
3919
|
+
const message = createBaseAIGitActivityFilter();
|
|
3463
3920
|
while (reader.pos < end) {
|
|
3464
3921
|
const tag = reader.uint32();
|
|
3465
3922
|
switch (tag >>> 3) {
|
|
@@ -3468,7 +3925,7 @@ export const ListGitActivitiesRequest: MessageFns<ListGitActivitiesRequest> = {
|
|
|
3468
3925
|
break;
|
|
3469
3926
|
}
|
|
3470
3927
|
|
|
3471
|
-
message.
|
|
3928
|
+
message.sessionId.push(reader.string());
|
|
3472
3929
|
continue;
|
|
3473
3930
|
}
|
|
3474
3931
|
case 2: {
|
|
@@ -3476,7 +3933,7 @@ export const ListGitActivitiesRequest: MessageFns<ListGitActivitiesRequest> = {
|
|
|
3476
3933
|
break;
|
|
3477
3934
|
}
|
|
3478
3935
|
|
|
3479
|
-
message.
|
|
3936
|
+
message.sourceSystem.push(reader.string());
|
|
3480
3937
|
continue;
|
|
3481
3938
|
}
|
|
3482
3939
|
case 3: {
|
|
@@ -3484,7 +3941,7 @@ export const ListGitActivitiesRequest: MessageFns<ListGitActivitiesRequest> = {
|
|
|
3484
3941
|
break;
|
|
3485
3942
|
}
|
|
3486
3943
|
|
|
3487
|
-
message.
|
|
3944
|
+
message.eventTimeAfter = fromTimestamp(Timestamp.decode(reader, reader.uint32()));
|
|
3488
3945
|
continue;
|
|
3489
3946
|
}
|
|
3490
3947
|
case 4: {
|
|
@@ -3492,7 +3949,7 @@ export const ListGitActivitiesRequest: MessageFns<ListGitActivitiesRequest> = {
|
|
|
3492
3949
|
break;
|
|
3493
3950
|
}
|
|
3494
3951
|
|
|
3495
|
-
message.
|
|
3952
|
+
message.eventTimeBefore = fromTimestamp(Timestamp.decode(reader, reader.uint32()));
|
|
3496
3953
|
continue;
|
|
3497
3954
|
}
|
|
3498
3955
|
}
|
|
@@ -3507,63 +3964,214 @@ export const ListGitActivitiesRequest: MessageFns<ListGitActivitiesRequest> = {
|
|
|
3507
3964
|
}
|
|
3508
3965
|
},
|
|
3509
3966
|
|
|
3510
|
-
fromJSON(object: any):
|
|
3967
|
+
fromJSON(object: any): AIGitActivityFilter {
|
|
3511
3968
|
return {
|
|
3512
|
-
|
|
3513
|
-
? globalThis.String(
|
|
3514
|
-
:
|
|
3515
|
-
? globalThis.String(
|
|
3516
|
-
:
|
|
3517
|
-
|
|
3518
|
-
? globalThis.String(
|
|
3519
|
-
:
|
|
3520
|
-
? globalThis.String(
|
|
3521
|
-
:
|
|
3522
|
-
|
|
3523
|
-
?
|
|
3524
|
-
: isSet(object.
|
|
3525
|
-
?
|
|
3526
|
-
:
|
|
3527
|
-
|
|
3528
|
-
?
|
|
3529
|
-
: isSet(object.
|
|
3530
|
-
?
|
|
3531
|
-
:
|
|
3969
|
+
sessionId: globalThis.Array.isArray(object?.sessionId)
|
|
3970
|
+
? object.sessionId.map((e: any) => globalThis.String(e))
|
|
3971
|
+
: globalThis.Array.isArray(object?.session_id)
|
|
3972
|
+
? object.session_id.map((e: any) => globalThis.String(e))
|
|
3973
|
+
: [],
|
|
3974
|
+
sourceSystem: globalThis.Array.isArray(object?.sourceSystem)
|
|
3975
|
+
? object.sourceSystem.map((e: any) => globalThis.String(e))
|
|
3976
|
+
: globalThis.Array.isArray(object?.source_system)
|
|
3977
|
+
? object.source_system.map((e: any) => globalThis.String(e))
|
|
3978
|
+
: [],
|
|
3979
|
+
eventTimeAfter: isSet(object.eventTimeAfter)
|
|
3980
|
+
? fromJsonTimestamp(object.eventTimeAfter)
|
|
3981
|
+
: isSet(object.event_time_after)
|
|
3982
|
+
? fromJsonTimestamp(object.event_time_after)
|
|
3983
|
+
: undefined,
|
|
3984
|
+
eventTimeBefore: isSet(object.eventTimeBefore)
|
|
3985
|
+
? fromJsonTimestamp(object.eventTimeBefore)
|
|
3986
|
+
: isSet(object.event_time_before)
|
|
3987
|
+
? fromJsonTimestamp(object.event_time_before)
|
|
3988
|
+
: undefined,
|
|
3532
3989
|
};
|
|
3533
3990
|
},
|
|
3534
3991
|
|
|
3535
|
-
toJSON(message:
|
|
3992
|
+
toJSON(message: AIGitActivityFilter): unknown {
|
|
3536
3993
|
const obj: any = {};
|
|
3537
|
-
if (message.
|
|
3538
|
-
obj.
|
|
3994
|
+
if (message.sessionId?.length) {
|
|
3995
|
+
obj.sessionId = message.sessionId;
|
|
3539
3996
|
}
|
|
3540
|
-
if (message.
|
|
3541
|
-
obj.
|
|
3997
|
+
if (message.sourceSystem?.length) {
|
|
3998
|
+
obj.sourceSystem = message.sourceSystem;
|
|
3542
3999
|
}
|
|
3543
|
-
if (message.
|
|
3544
|
-
obj.
|
|
4000
|
+
if (message.eventTimeAfter !== undefined) {
|
|
4001
|
+
obj.eventTimeAfter = message.eventTimeAfter.toISOString();
|
|
3545
4002
|
}
|
|
3546
|
-
if (message.
|
|
3547
|
-
obj.
|
|
4003
|
+
if (message.eventTimeBefore !== undefined) {
|
|
4004
|
+
obj.eventTimeBefore = message.eventTimeBefore.toISOString();
|
|
3548
4005
|
}
|
|
3549
4006
|
return obj;
|
|
3550
4007
|
},
|
|
3551
4008
|
|
|
3552
|
-
create<I extends Exact<DeepPartial<
|
|
3553
|
-
return
|
|
4009
|
+
create<I extends Exact<DeepPartial<AIGitActivityFilter>, I>>(base?: I): AIGitActivityFilter {
|
|
4010
|
+
return AIGitActivityFilter.fromPartial(base ?? ({} as any));
|
|
4011
|
+
},
|
|
4012
|
+
fromPartial<I extends Exact<DeepPartial<AIGitActivityFilter>, I>>(object: I): AIGitActivityFilter {
|
|
4013
|
+
const message = createBaseAIGitActivityFilter();
|
|
4014
|
+
message.sessionId = object.sessionId?.map((e) => e) || [];
|
|
4015
|
+
message.sourceSystem = object.sourceSystem?.map((e) => e) || [];
|
|
4016
|
+
message.eventTimeAfter = object.eventTimeAfter ?? undefined;
|
|
4017
|
+
message.eventTimeBefore = object.eventTimeBefore ?? undefined;
|
|
4018
|
+
return message;
|
|
4019
|
+
},
|
|
4020
|
+
};
|
|
4021
|
+
|
|
4022
|
+
function createBaseListGitActivitiesRequest(): ListGitActivitiesRequest {
|
|
4023
|
+
return { organizationId: "", projectId: "", filter: undefined, pageSize: 0, pageToken: "" };
|
|
4024
|
+
}
|
|
4025
|
+
|
|
4026
|
+
export const ListGitActivitiesRequest: MessageFns<ListGitActivitiesRequest> = {
|
|
4027
|
+
encode(message: ListGitActivitiesRequest, writer: BinaryWriter = new BinaryWriter()): BinaryWriter {
|
|
4028
|
+
if (message.organizationId !== "") {
|
|
4029
|
+
writer.uint32(10).string(message.organizationId);
|
|
4030
|
+
}
|
|
4031
|
+
if (message.projectId !== "") {
|
|
4032
|
+
writer.uint32(18).string(message.projectId);
|
|
4033
|
+
}
|
|
4034
|
+
if (message.filter !== undefined) {
|
|
4035
|
+
AIGitActivityFilter.encode(message.filter, writer.uint32(26).fork()).join();
|
|
4036
|
+
}
|
|
4037
|
+
if (message.pageSize !== 0) {
|
|
4038
|
+
writer.uint32(32).int32(message.pageSize);
|
|
4039
|
+
}
|
|
4040
|
+
if (message.pageToken !== "") {
|
|
4041
|
+
writer.uint32(42).string(message.pageToken);
|
|
4042
|
+
}
|
|
4043
|
+
return writer;
|
|
4044
|
+
},
|
|
4045
|
+
|
|
4046
|
+
decode(input: BinaryReader | Uint8Array, length?: number): ListGitActivitiesRequest {
|
|
4047
|
+
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
|
|
4048
|
+
const previousRecursionDepth = (reader as any).__tsProtoDecodeDepth ?? 0;
|
|
4049
|
+
if (previousRecursionDepth >= 100) {
|
|
4050
|
+
throw new globalThis.Error("protobuf decode recursion limit exceeded");
|
|
4051
|
+
}
|
|
4052
|
+
(reader as any).__tsProtoDecodeDepth = previousRecursionDepth + 1;
|
|
4053
|
+
try {
|
|
4054
|
+
const end = length === undefined ? reader.len : reader.pos + length;
|
|
4055
|
+
const message = createBaseListGitActivitiesRequest();
|
|
4056
|
+
while (reader.pos < end) {
|
|
4057
|
+
const tag = reader.uint32();
|
|
4058
|
+
switch (tag >>> 3) {
|
|
4059
|
+
case 1: {
|
|
4060
|
+
if (tag !== 10) {
|
|
4061
|
+
break;
|
|
4062
|
+
}
|
|
4063
|
+
|
|
4064
|
+
message.organizationId = reader.string();
|
|
4065
|
+
continue;
|
|
4066
|
+
}
|
|
4067
|
+
case 2: {
|
|
4068
|
+
if (tag !== 18) {
|
|
4069
|
+
break;
|
|
4070
|
+
}
|
|
4071
|
+
|
|
4072
|
+
message.projectId = reader.string();
|
|
4073
|
+
continue;
|
|
4074
|
+
}
|
|
4075
|
+
case 3: {
|
|
4076
|
+
if (tag !== 26) {
|
|
4077
|
+
break;
|
|
4078
|
+
}
|
|
4079
|
+
|
|
4080
|
+
message.filter = AIGitActivityFilter.decode(reader, reader.uint32());
|
|
4081
|
+
continue;
|
|
4082
|
+
}
|
|
4083
|
+
case 4: {
|
|
4084
|
+
if (tag !== 32) {
|
|
4085
|
+
break;
|
|
4086
|
+
}
|
|
4087
|
+
|
|
4088
|
+
message.pageSize = reader.int32();
|
|
4089
|
+
continue;
|
|
4090
|
+
}
|
|
4091
|
+
case 5: {
|
|
4092
|
+
if (tag !== 42) {
|
|
4093
|
+
break;
|
|
4094
|
+
}
|
|
4095
|
+
|
|
4096
|
+
message.pageToken = reader.string();
|
|
4097
|
+
continue;
|
|
4098
|
+
}
|
|
4099
|
+
}
|
|
4100
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
4101
|
+
break;
|
|
4102
|
+
}
|
|
4103
|
+
reader.skip(tag & 7);
|
|
4104
|
+
}
|
|
4105
|
+
return message;
|
|
4106
|
+
} finally {
|
|
4107
|
+
(reader as any).__tsProtoDecodeDepth = previousRecursionDepth;
|
|
4108
|
+
}
|
|
4109
|
+
},
|
|
4110
|
+
|
|
4111
|
+
fromJSON(object: any): ListGitActivitiesRequest {
|
|
4112
|
+
return {
|
|
4113
|
+
organizationId: isSet(object.organizationId)
|
|
4114
|
+
? globalThis.String(object.organizationId)
|
|
4115
|
+
: isSet(object.organization_id)
|
|
4116
|
+
? globalThis.String(object.organization_id)
|
|
4117
|
+
: "",
|
|
4118
|
+
projectId: isSet(object.projectId)
|
|
4119
|
+
? globalThis.String(object.projectId)
|
|
4120
|
+
: isSet(object.project_id)
|
|
4121
|
+
? globalThis.String(object.project_id)
|
|
4122
|
+
: "",
|
|
4123
|
+
filter: isSet(object.filter) ? AIGitActivityFilter.fromJSON(object.filter) : undefined,
|
|
4124
|
+
pageSize: isSet(object.pageSize)
|
|
4125
|
+
? globalThis.Number(object.pageSize)
|
|
4126
|
+
: isSet(object.page_size)
|
|
4127
|
+
? globalThis.Number(object.page_size)
|
|
4128
|
+
: 0,
|
|
4129
|
+
pageToken: isSet(object.pageToken)
|
|
4130
|
+
? globalThis.String(object.pageToken)
|
|
4131
|
+
: isSet(object.page_token)
|
|
4132
|
+
? globalThis.String(object.page_token)
|
|
4133
|
+
: "",
|
|
4134
|
+
};
|
|
4135
|
+
},
|
|
4136
|
+
|
|
4137
|
+
toJSON(message: ListGitActivitiesRequest): unknown {
|
|
4138
|
+
const obj: any = {};
|
|
4139
|
+
if (message.organizationId !== "") {
|
|
4140
|
+
obj.organizationId = message.organizationId;
|
|
4141
|
+
}
|
|
4142
|
+
if (message.projectId !== "") {
|
|
4143
|
+
obj.projectId = message.projectId;
|
|
4144
|
+
}
|
|
4145
|
+
if (message.filter !== undefined) {
|
|
4146
|
+
obj.filter = AIGitActivityFilter.toJSON(message.filter);
|
|
4147
|
+
}
|
|
4148
|
+
if (message.pageSize !== 0) {
|
|
4149
|
+
obj.pageSize = Math.round(message.pageSize);
|
|
4150
|
+
}
|
|
4151
|
+
if (message.pageToken !== "") {
|
|
4152
|
+
obj.pageToken = message.pageToken;
|
|
4153
|
+
}
|
|
4154
|
+
return obj;
|
|
4155
|
+
},
|
|
4156
|
+
|
|
4157
|
+
create<I extends Exact<DeepPartial<ListGitActivitiesRequest>, I>>(base?: I): ListGitActivitiesRequest {
|
|
4158
|
+
return ListGitActivitiesRequest.fromPartial(base ?? ({} as any));
|
|
3554
4159
|
},
|
|
3555
4160
|
fromPartial<I extends Exact<DeepPartial<ListGitActivitiesRequest>, I>>(object: I): ListGitActivitiesRequest {
|
|
3556
4161
|
const message = createBaseListGitActivitiesRequest();
|
|
3557
4162
|
message.organizationId = object.organizationId ?? "";
|
|
3558
4163
|
message.projectId = object.projectId ?? "";
|
|
3559
|
-
message.
|
|
3560
|
-
|
|
4164
|
+
message.filter = (object.filter !== undefined && object.filter !== null)
|
|
4165
|
+
? AIGitActivityFilter.fromPartial(object.filter)
|
|
4166
|
+
: undefined;
|
|
4167
|
+
message.pageSize = object.pageSize ?? 0;
|
|
4168
|
+
message.pageToken = object.pageToken ?? "";
|
|
3561
4169
|
return message;
|
|
3562
4170
|
},
|
|
3563
4171
|
};
|
|
3564
4172
|
|
|
3565
4173
|
function createBaseListGitActivitiesResponse(): ListGitActivitiesResponse {
|
|
3566
|
-
return { status: undefined, activities: [] };
|
|
4174
|
+
return { status: undefined, activities: [], nextPageToken: "" };
|
|
3567
4175
|
}
|
|
3568
4176
|
|
|
3569
4177
|
export const ListGitActivitiesResponse: MessageFns<ListGitActivitiesResponse> = {
|
|
@@ -3574,6 +4182,9 @@ export const ListGitActivitiesResponse: MessageFns<ListGitActivitiesResponse> =
|
|
|
3574
4182
|
for (const v of message.activities) {
|
|
3575
4183
|
AIGitActivity.encode(v!, writer.uint32(18).fork()).join();
|
|
3576
4184
|
}
|
|
4185
|
+
if (message.nextPageToken !== "") {
|
|
4186
|
+
writer.uint32(26).string(message.nextPageToken);
|
|
4187
|
+
}
|
|
3577
4188
|
return writer;
|
|
3578
4189
|
},
|
|
3579
4190
|
|
|
@@ -3606,6 +4217,14 @@ export const ListGitActivitiesResponse: MessageFns<ListGitActivitiesResponse> =
|
|
|
3606
4217
|
message.activities.push(AIGitActivity.decode(reader, reader.uint32()));
|
|
3607
4218
|
continue;
|
|
3608
4219
|
}
|
|
4220
|
+
case 3: {
|
|
4221
|
+
if (tag !== 26) {
|
|
4222
|
+
break;
|
|
4223
|
+
}
|
|
4224
|
+
|
|
4225
|
+
message.nextPageToken = reader.string();
|
|
4226
|
+
continue;
|
|
4227
|
+
}
|
|
3609
4228
|
}
|
|
3610
4229
|
if ((tag & 7) === 4 || tag === 0) {
|
|
3611
4230
|
break;
|
|
@@ -3624,6 +4243,11 @@ export const ListGitActivitiesResponse: MessageFns<ListGitActivitiesResponse> =
|
|
|
3624
4243
|
activities: globalThis.Array.isArray(object?.activities)
|
|
3625
4244
|
? object.activities.map((e: any) => AIGitActivity.fromJSON(e))
|
|
3626
4245
|
: [],
|
|
4246
|
+
nextPageToken: isSet(object.nextPageToken)
|
|
4247
|
+
? globalThis.String(object.nextPageToken)
|
|
4248
|
+
: isSet(object.next_page_token)
|
|
4249
|
+
? globalThis.String(object.next_page_token)
|
|
4250
|
+
: "",
|
|
3627
4251
|
};
|
|
3628
4252
|
},
|
|
3629
4253
|
|
|
@@ -3635,6 +4259,9 @@ export const ListGitActivitiesResponse: MessageFns<ListGitActivitiesResponse> =
|
|
|
3635
4259
|
if (message.activities?.length) {
|
|
3636
4260
|
obj.activities = message.activities.map((e) => AIGitActivity.toJSON(e));
|
|
3637
4261
|
}
|
|
4262
|
+
if (message.nextPageToken !== "") {
|
|
4263
|
+
obj.nextPageToken = message.nextPageToken;
|
|
4264
|
+
}
|
|
3638
4265
|
return obj;
|
|
3639
4266
|
},
|
|
3640
4267
|
|
|
@@ -3647,12 +4274,13 @@ export const ListGitActivitiesResponse: MessageFns<ListGitActivitiesResponse> =
|
|
|
3647
4274
|
? ResponseStatus.fromPartial(object.status)
|
|
3648
4275
|
: undefined;
|
|
3649
4276
|
message.activities = object.activities?.map((e) => AIGitActivity.fromPartial(e)) || [];
|
|
4277
|
+
message.nextPageToken = object.nextPageToken ?? "";
|
|
3650
4278
|
return message;
|
|
3651
4279
|
},
|
|
3652
4280
|
};
|
|
3653
4281
|
|
|
3654
4282
|
function createBaseStreamGitActivitiesRequest(): StreamGitActivitiesRequest {
|
|
3655
|
-
return { organizationId: "", projectId: "",
|
|
4283
|
+
return { organizationId: "", projectId: "", filter: undefined };
|
|
3656
4284
|
}
|
|
3657
4285
|
|
|
3658
4286
|
export const StreamGitActivitiesRequest: MessageFns<StreamGitActivitiesRequest> = {
|
|
@@ -3663,11 +4291,8 @@ export const StreamGitActivitiesRequest: MessageFns<StreamGitActivitiesRequest>
|
|
|
3663
4291
|
if (message.projectId !== "") {
|
|
3664
4292
|
writer.uint32(18).string(message.projectId);
|
|
3665
4293
|
}
|
|
3666
|
-
if (message.
|
|
3667
|
-
writer.uint32(26).
|
|
3668
|
-
}
|
|
3669
|
-
if (message.sourceSystem !== "") {
|
|
3670
|
-
writer.uint32(34).string(message.sourceSystem);
|
|
4294
|
+
if (message.filter !== undefined) {
|
|
4295
|
+
AIGitActivityFilter.encode(message.filter, writer.uint32(26).fork()).join();
|
|
3671
4296
|
}
|
|
3672
4297
|
return writer;
|
|
3673
4298
|
},
|
|
@@ -3706,15 +4331,7 @@ export const StreamGitActivitiesRequest: MessageFns<StreamGitActivitiesRequest>
|
|
|
3706
4331
|
break;
|
|
3707
4332
|
}
|
|
3708
4333
|
|
|
3709
|
-
message.
|
|
3710
|
-
continue;
|
|
3711
|
-
}
|
|
3712
|
-
case 4: {
|
|
3713
|
-
if (tag !== 34) {
|
|
3714
|
-
break;
|
|
3715
|
-
}
|
|
3716
|
-
|
|
3717
|
-
message.sourceSystem = reader.string();
|
|
4334
|
+
message.filter = AIGitActivityFilter.decode(reader, reader.uint32());
|
|
3718
4335
|
continue;
|
|
3719
4336
|
}
|
|
3720
4337
|
}
|
|
@@ -3741,16 +4358,7 @@ export const StreamGitActivitiesRequest: MessageFns<StreamGitActivitiesRequest>
|
|
|
3741
4358
|
: isSet(object.project_id)
|
|
3742
4359
|
? globalThis.String(object.project_id)
|
|
3743
4360
|
: "",
|
|
3744
|
-
|
|
3745
|
-
? globalThis.String(object.routingKey)
|
|
3746
|
-
: isSet(object.routing_key)
|
|
3747
|
-
? globalThis.String(object.routing_key)
|
|
3748
|
-
: "",
|
|
3749
|
-
sourceSystem: isSet(object.sourceSystem)
|
|
3750
|
-
? globalThis.String(object.sourceSystem)
|
|
3751
|
-
: isSet(object.source_system)
|
|
3752
|
-
? globalThis.String(object.source_system)
|
|
3753
|
-
: "",
|
|
4361
|
+
filter: isSet(object.filter) ? AIGitActivityFilter.fromJSON(object.filter) : undefined,
|
|
3754
4362
|
};
|
|
3755
4363
|
},
|
|
3756
4364
|
|
|
@@ -3762,11 +4370,8 @@ export const StreamGitActivitiesRequest: MessageFns<StreamGitActivitiesRequest>
|
|
|
3762
4370
|
if (message.projectId !== "") {
|
|
3763
4371
|
obj.projectId = message.projectId;
|
|
3764
4372
|
}
|
|
3765
|
-
if (message.
|
|
3766
|
-
obj.
|
|
3767
|
-
}
|
|
3768
|
-
if (message.sourceSystem !== "") {
|
|
3769
|
-
obj.sourceSystem = message.sourceSystem;
|
|
4373
|
+
if (message.filter !== undefined) {
|
|
4374
|
+
obj.filter = AIGitActivityFilter.toJSON(message.filter);
|
|
3770
4375
|
}
|
|
3771
4376
|
return obj;
|
|
3772
4377
|
},
|
|
@@ -3778,8 +4383,9 @@ export const StreamGitActivitiesRequest: MessageFns<StreamGitActivitiesRequest>
|
|
|
3778
4383
|
const message = createBaseStreamGitActivitiesRequest();
|
|
3779
4384
|
message.organizationId = object.organizationId ?? "";
|
|
3780
4385
|
message.projectId = object.projectId ?? "";
|
|
3781
|
-
message.
|
|
3782
|
-
|
|
4386
|
+
message.filter = (object.filter !== undefined && object.filter !== null)
|
|
4387
|
+
? AIGitActivityFilter.fromPartial(object.filter)
|
|
4388
|
+
: undefined;
|
|
3783
4389
|
return message;
|
|
3784
4390
|
},
|
|
3785
4391
|
};
|
|
@@ -4574,31 +5180,34 @@ export const AIGitActivity: MessageFns<AIGitActivity> = {
|
|
|
4574
5180
|
},
|
|
4575
5181
|
};
|
|
4576
5182
|
|
|
4577
|
-
function
|
|
4578
|
-
return {
|
|
5183
|
+
function createBaseGitActivitySummaryRequest(): GitActivitySummaryRequest {
|
|
5184
|
+
return { organizationId: "", projectId: "", filter: undefined, timeWindow: 0, timeInterval: 0, groupBy: 0 };
|
|
4579
5185
|
}
|
|
4580
5186
|
|
|
4581
|
-
export const
|
|
4582
|
-
encode(message:
|
|
4583
|
-
if (message.
|
|
4584
|
-
writer.uint32(
|
|
5187
|
+
export const GitActivitySummaryRequest: MessageFns<GitActivitySummaryRequest> = {
|
|
5188
|
+
encode(message: GitActivitySummaryRequest, writer: BinaryWriter = new BinaryWriter()): BinaryWriter {
|
|
5189
|
+
if (message.organizationId !== "") {
|
|
5190
|
+
writer.uint32(10).string(message.organizationId);
|
|
4585
5191
|
}
|
|
4586
|
-
if (message.
|
|
4587
|
-
writer.uint32(
|
|
5192
|
+
if (message.projectId !== "") {
|
|
5193
|
+
writer.uint32(18).string(message.projectId);
|
|
4588
5194
|
}
|
|
4589
|
-
if (message.
|
|
4590
|
-
writer.uint32(
|
|
5195
|
+
if (message.filter !== undefined) {
|
|
5196
|
+
AIGitActivityFilter.encode(message.filter, writer.uint32(26).fork()).join();
|
|
4591
5197
|
}
|
|
4592
|
-
if (message.
|
|
4593
|
-
writer.uint32(32).
|
|
5198
|
+
if (message.timeWindow !== 0) {
|
|
5199
|
+
writer.uint32(32).int32(message.timeWindow);
|
|
4594
5200
|
}
|
|
4595
|
-
if (message.
|
|
4596
|
-
writer.uint32(40).
|
|
5201
|
+
if (message.timeInterval !== 0) {
|
|
5202
|
+
writer.uint32(40).int32(message.timeInterval);
|
|
5203
|
+
}
|
|
5204
|
+
if (message.groupBy !== 0) {
|
|
5205
|
+
writer.uint32(48).int32(message.groupBy);
|
|
4597
5206
|
}
|
|
4598
5207
|
return writer;
|
|
4599
5208
|
},
|
|
4600
5209
|
|
|
4601
|
-
decode(input: BinaryReader | Uint8Array, length?: number):
|
|
5210
|
+
decode(input: BinaryReader | Uint8Array, length?: number): GitActivitySummaryRequest {
|
|
4602
5211
|
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
|
|
4603
5212
|
const previousRecursionDepth = (reader as any).__tsProtoDecodeDepth ?? 0;
|
|
4604
5213
|
if (previousRecursionDepth >= 100) {
|
|
@@ -4607,32 +5216,32 @@ export const AITokenUsage: MessageFns<AITokenUsage> = {
|
|
|
4607
5216
|
(reader as any).__tsProtoDecodeDepth = previousRecursionDepth + 1;
|
|
4608
5217
|
try {
|
|
4609
5218
|
const end = length === undefined ? reader.len : reader.pos + length;
|
|
4610
|
-
const message =
|
|
5219
|
+
const message = createBaseGitActivitySummaryRequest();
|
|
4611
5220
|
while (reader.pos < end) {
|
|
4612
5221
|
const tag = reader.uint32();
|
|
4613
5222
|
switch (tag >>> 3) {
|
|
4614
5223
|
case 1: {
|
|
4615
|
-
if (tag !==
|
|
5224
|
+
if (tag !== 10) {
|
|
4616
5225
|
break;
|
|
4617
5226
|
}
|
|
4618
5227
|
|
|
4619
|
-
message.
|
|
5228
|
+
message.organizationId = reader.string();
|
|
4620
5229
|
continue;
|
|
4621
5230
|
}
|
|
4622
5231
|
case 2: {
|
|
4623
|
-
if (tag !==
|
|
5232
|
+
if (tag !== 18) {
|
|
4624
5233
|
break;
|
|
4625
5234
|
}
|
|
4626
5235
|
|
|
4627
|
-
message.
|
|
5236
|
+
message.projectId = reader.string();
|
|
4628
5237
|
continue;
|
|
4629
5238
|
}
|
|
4630
5239
|
case 3: {
|
|
4631
|
-
if (tag !==
|
|
5240
|
+
if (tag !== 26) {
|
|
4632
5241
|
break;
|
|
4633
5242
|
}
|
|
4634
5243
|
|
|
4635
|
-
message.
|
|
5244
|
+
message.filter = AIGitActivityFilter.decode(reader, reader.uint32());
|
|
4636
5245
|
continue;
|
|
4637
5246
|
}
|
|
4638
5247
|
case 4: {
|
|
@@ -4640,7 +5249,7 @@ export const AITokenUsage: MessageFns<AITokenUsage> = {
|
|
|
4640
5249
|
break;
|
|
4641
5250
|
}
|
|
4642
5251
|
|
|
4643
|
-
message.
|
|
5252
|
+
message.timeWindow = reader.int32() as any;
|
|
4644
5253
|
continue;
|
|
4645
5254
|
}
|
|
4646
5255
|
case 5: {
|
|
@@ -4648,7 +5257,15 @@ export const AITokenUsage: MessageFns<AITokenUsage> = {
|
|
|
4648
5257
|
break;
|
|
4649
5258
|
}
|
|
4650
5259
|
|
|
4651
|
-
message.
|
|
5260
|
+
message.timeInterval = reader.int32() as any;
|
|
5261
|
+
continue;
|
|
5262
|
+
}
|
|
5263
|
+
case 6: {
|
|
5264
|
+
if (tag !== 48) {
|
|
5265
|
+
break;
|
|
5266
|
+
}
|
|
5267
|
+
|
|
5268
|
+
message.groupBy = reader.int32() as any;
|
|
4652
5269
|
continue;
|
|
4653
5270
|
}
|
|
4654
5271
|
}
|
|
@@ -4663,14 +5280,3211 @@ export const AITokenUsage: MessageFns<AITokenUsage> = {
|
|
|
4663
5280
|
}
|
|
4664
5281
|
},
|
|
4665
5282
|
|
|
4666
|
-
fromJSON(object: any):
|
|
5283
|
+
fromJSON(object: any): GitActivitySummaryRequest {
|
|
4667
5284
|
return {
|
|
4668
|
-
|
|
4669
|
-
? globalThis.
|
|
4670
|
-
: isSet(object.
|
|
4671
|
-
? globalThis.
|
|
5285
|
+
organizationId: isSet(object.organizationId)
|
|
5286
|
+
? globalThis.String(object.organizationId)
|
|
5287
|
+
: isSet(object.organization_id)
|
|
5288
|
+
? globalThis.String(object.organization_id)
|
|
5289
|
+
: "",
|
|
5290
|
+
projectId: isSet(object.projectId)
|
|
5291
|
+
? globalThis.String(object.projectId)
|
|
5292
|
+
: isSet(object.project_id)
|
|
5293
|
+
? globalThis.String(object.project_id)
|
|
5294
|
+
: "",
|
|
5295
|
+
filter: isSet(object.filter) ? AIGitActivityFilter.fromJSON(object.filter) : undefined,
|
|
5296
|
+
timeWindow: isSet(object.timeWindow)
|
|
5297
|
+
? analyticsTimeWindowFromJSON(object.timeWindow)
|
|
5298
|
+
: isSet(object.time_window)
|
|
5299
|
+
? analyticsTimeWindowFromJSON(object.time_window)
|
|
4672
5300
|
: 0,
|
|
4673
|
-
|
|
5301
|
+
timeInterval: isSet(object.timeInterval)
|
|
5302
|
+
? analyticsTimeIntervalFromJSON(object.timeInterval)
|
|
5303
|
+
: isSet(object.time_interval)
|
|
5304
|
+
? analyticsTimeIntervalFromJSON(object.time_interval)
|
|
5305
|
+
: 0,
|
|
5306
|
+
groupBy: isSet(object.groupBy)
|
|
5307
|
+
? aIGitActivityDimensionFromJSON(object.groupBy)
|
|
5308
|
+
: isSet(object.group_by)
|
|
5309
|
+
? aIGitActivityDimensionFromJSON(object.group_by)
|
|
5310
|
+
: 0,
|
|
5311
|
+
};
|
|
5312
|
+
},
|
|
5313
|
+
|
|
5314
|
+
toJSON(message: GitActivitySummaryRequest): unknown {
|
|
5315
|
+
const obj: any = {};
|
|
5316
|
+
if (message.organizationId !== "") {
|
|
5317
|
+
obj.organizationId = message.organizationId;
|
|
5318
|
+
}
|
|
5319
|
+
if (message.projectId !== "") {
|
|
5320
|
+
obj.projectId = message.projectId;
|
|
5321
|
+
}
|
|
5322
|
+
if (message.filter !== undefined) {
|
|
5323
|
+
obj.filter = AIGitActivityFilter.toJSON(message.filter);
|
|
5324
|
+
}
|
|
5325
|
+
if (message.timeWindow !== 0) {
|
|
5326
|
+
obj.timeWindow = analyticsTimeWindowToJSON(message.timeWindow);
|
|
5327
|
+
}
|
|
5328
|
+
if (message.timeInterval !== 0) {
|
|
5329
|
+
obj.timeInterval = analyticsTimeIntervalToJSON(message.timeInterval);
|
|
5330
|
+
}
|
|
5331
|
+
if (message.groupBy !== 0) {
|
|
5332
|
+
obj.groupBy = aIGitActivityDimensionToJSON(message.groupBy);
|
|
5333
|
+
}
|
|
5334
|
+
return obj;
|
|
5335
|
+
},
|
|
5336
|
+
|
|
5337
|
+
create<I extends Exact<DeepPartial<GitActivitySummaryRequest>, I>>(base?: I): GitActivitySummaryRequest {
|
|
5338
|
+
return GitActivitySummaryRequest.fromPartial(base ?? ({} as any));
|
|
5339
|
+
},
|
|
5340
|
+
fromPartial<I extends Exact<DeepPartial<GitActivitySummaryRequest>, I>>(object: I): GitActivitySummaryRequest {
|
|
5341
|
+
const message = createBaseGitActivitySummaryRequest();
|
|
5342
|
+
message.organizationId = object.organizationId ?? "";
|
|
5343
|
+
message.projectId = object.projectId ?? "";
|
|
5344
|
+
message.filter = (object.filter !== undefined && object.filter !== null)
|
|
5345
|
+
? AIGitActivityFilter.fromPartial(object.filter)
|
|
5346
|
+
: undefined;
|
|
5347
|
+
message.timeWindow = object.timeWindow ?? 0;
|
|
5348
|
+
message.timeInterval = object.timeInterval ?? 0;
|
|
5349
|
+
message.groupBy = object.groupBy ?? 0;
|
|
5350
|
+
return message;
|
|
5351
|
+
},
|
|
5352
|
+
};
|
|
5353
|
+
|
|
5354
|
+
function createBaseGetGitActivitySummaryResponse(): GetGitActivitySummaryResponse {
|
|
5355
|
+
return { status: undefined, summary: undefined };
|
|
5356
|
+
}
|
|
5357
|
+
|
|
5358
|
+
export const GetGitActivitySummaryResponse: MessageFns<GetGitActivitySummaryResponse> = {
|
|
5359
|
+
encode(message: GetGitActivitySummaryResponse, writer: BinaryWriter = new BinaryWriter()): BinaryWriter {
|
|
5360
|
+
if (message.status !== undefined) {
|
|
5361
|
+
ResponseStatus.encode(message.status, writer.uint32(10).fork()).join();
|
|
5362
|
+
}
|
|
5363
|
+
if (message.summary !== undefined) {
|
|
5364
|
+
GitActivitySummary.encode(message.summary, writer.uint32(18).fork()).join();
|
|
5365
|
+
}
|
|
5366
|
+
return writer;
|
|
5367
|
+
},
|
|
5368
|
+
|
|
5369
|
+
decode(input: BinaryReader | Uint8Array, length?: number): GetGitActivitySummaryResponse {
|
|
5370
|
+
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
|
|
5371
|
+
const previousRecursionDepth = (reader as any).__tsProtoDecodeDepth ?? 0;
|
|
5372
|
+
if (previousRecursionDepth >= 100) {
|
|
5373
|
+
throw new globalThis.Error("protobuf decode recursion limit exceeded");
|
|
5374
|
+
}
|
|
5375
|
+
(reader as any).__tsProtoDecodeDepth = previousRecursionDepth + 1;
|
|
5376
|
+
try {
|
|
5377
|
+
const end = length === undefined ? reader.len : reader.pos + length;
|
|
5378
|
+
const message = createBaseGetGitActivitySummaryResponse();
|
|
5379
|
+
while (reader.pos < end) {
|
|
5380
|
+
const tag = reader.uint32();
|
|
5381
|
+
switch (tag >>> 3) {
|
|
5382
|
+
case 1: {
|
|
5383
|
+
if (tag !== 10) {
|
|
5384
|
+
break;
|
|
5385
|
+
}
|
|
5386
|
+
|
|
5387
|
+
message.status = ResponseStatus.decode(reader, reader.uint32());
|
|
5388
|
+
continue;
|
|
5389
|
+
}
|
|
5390
|
+
case 2: {
|
|
5391
|
+
if (tag !== 18) {
|
|
5392
|
+
break;
|
|
5393
|
+
}
|
|
5394
|
+
|
|
5395
|
+
message.summary = GitActivitySummary.decode(reader, reader.uint32());
|
|
5396
|
+
continue;
|
|
5397
|
+
}
|
|
5398
|
+
}
|
|
5399
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
5400
|
+
break;
|
|
5401
|
+
}
|
|
5402
|
+
reader.skip(tag & 7);
|
|
5403
|
+
}
|
|
5404
|
+
return message;
|
|
5405
|
+
} finally {
|
|
5406
|
+
(reader as any).__tsProtoDecodeDepth = previousRecursionDepth;
|
|
5407
|
+
}
|
|
5408
|
+
},
|
|
5409
|
+
|
|
5410
|
+
fromJSON(object: any): GetGitActivitySummaryResponse {
|
|
5411
|
+
return {
|
|
5412
|
+
status: isSet(object.status) ? ResponseStatus.fromJSON(object.status) : undefined,
|
|
5413
|
+
summary: isSet(object.summary) ? GitActivitySummary.fromJSON(object.summary) : undefined,
|
|
5414
|
+
};
|
|
5415
|
+
},
|
|
5416
|
+
|
|
5417
|
+
toJSON(message: GetGitActivitySummaryResponse): unknown {
|
|
5418
|
+
const obj: any = {};
|
|
5419
|
+
if (message.status !== undefined) {
|
|
5420
|
+
obj.status = ResponseStatus.toJSON(message.status);
|
|
5421
|
+
}
|
|
5422
|
+
if (message.summary !== undefined) {
|
|
5423
|
+
obj.summary = GitActivitySummary.toJSON(message.summary);
|
|
5424
|
+
}
|
|
5425
|
+
return obj;
|
|
5426
|
+
},
|
|
5427
|
+
|
|
5428
|
+
create<I extends Exact<DeepPartial<GetGitActivitySummaryResponse>, I>>(base?: I): GetGitActivitySummaryResponse {
|
|
5429
|
+
return GetGitActivitySummaryResponse.fromPartial(base ?? ({} as any));
|
|
5430
|
+
},
|
|
5431
|
+
fromPartial<I extends Exact<DeepPartial<GetGitActivitySummaryResponse>, I>>(
|
|
5432
|
+
object: I,
|
|
5433
|
+
): GetGitActivitySummaryResponse {
|
|
5434
|
+
const message = createBaseGetGitActivitySummaryResponse();
|
|
5435
|
+
message.status = (object.status !== undefined && object.status !== null)
|
|
5436
|
+
? ResponseStatus.fromPartial(object.status)
|
|
5437
|
+
: undefined;
|
|
5438
|
+
message.summary = (object.summary !== undefined && object.summary !== null)
|
|
5439
|
+
? GitActivitySummary.fromPartial(object.summary)
|
|
5440
|
+
: undefined;
|
|
5441
|
+
return message;
|
|
5442
|
+
},
|
|
5443
|
+
};
|
|
5444
|
+
|
|
5445
|
+
function createBaseGitActivitySummary(): GitActivitySummary {
|
|
5446
|
+
return { buckets: [], totals: undefined, windowStart: undefined, windowEnd: undefined, groupBy: 0 };
|
|
5447
|
+
}
|
|
5448
|
+
|
|
5449
|
+
export const GitActivitySummary: MessageFns<GitActivitySummary> = {
|
|
5450
|
+
encode(message: GitActivitySummary, writer: BinaryWriter = new BinaryWriter()): BinaryWriter {
|
|
5451
|
+
for (const v of message.buckets) {
|
|
5452
|
+
GitActivitySummaryBucket.encode(v!, writer.uint32(10).fork()).join();
|
|
5453
|
+
}
|
|
5454
|
+
if (message.totals !== undefined) {
|
|
5455
|
+
GitActivityMeasures.encode(message.totals, writer.uint32(18).fork()).join();
|
|
5456
|
+
}
|
|
5457
|
+
if (message.windowStart !== undefined) {
|
|
5458
|
+
Timestamp.encode(toTimestamp(message.windowStart), writer.uint32(26).fork()).join();
|
|
5459
|
+
}
|
|
5460
|
+
if (message.windowEnd !== undefined) {
|
|
5461
|
+
Timestamp.encode(toTimestamp(message.windowEnd), writer.uint32(34).fork()).join();
|
|
5462
|
+
}
|
|
5463
|
+
if (message.groupBy !== 0) {
|
|
5464
|
+
writer.uint32(40).int32(message.groupBy);
|
|
5465
|
+
}
|
|
5466
|
+
return writer;
|
|
5467
|
+
},
|
|
5468
|
+
|
|
5469
|
+
decode(input: BinaryReader | Uint8Array, length?: number): GitActivitySummary {
|
|
5470
|
+
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
|
|
5471
|
+
const previousRecursionDepth = (reader as any).__tsProtoDecodeDepth ?? 0;
|
|
5472
|
+
if (previousRecursionDepth >= 100) {
|
|
5473
|
+
throw new globalThis.Error("protobuf decode recursion limit exceeded");
|
|
5474
|
+
}
|
|
5475
|
+
(reader as any).__tsProtoDecodeDepth = previousRecursionDepth + 1;
|
|
5476
|
+
try {
|
|
5477
|
+
const end = length === undefined ? reader.len : reader.pos + length;
|
|
5478
|
+
const message = createBaseGitActivitySummary();
|
|
5479
|
+
while (reader.pos < end) {
|
|
5480
|
+
const tag = reader.uint32();
|
|
5481
|
+
switch (tag >>> 3) {
|
|
5482
|
+
case 1: {
|
|
5483
|
+
if (tag !== 10) {
|
|
5484
|
+
break;
|
|
5485
|
+
}
|
|
5486
|
+
|
|
5487
|
+
message.buckets.push(GitActivitySummaryBucket.decode(reader, reader.uint32()));
|
|
5488
|
+
continue;
|
|
5489
|
+
}
|
|
5490
|
+
case 2: {
|
|
5491
|
+
if (tag !== 18) {
|
|
5492
|
+
break;
|
|
5493
|
+
}
|
|
5494
|
+
|
|
5495
|
+
message.totals = GitActivityMeasures.decode(reader, reader.uint32());
|
|
5496
|
+
continue;
|
|
5497
|
+
}
|
|
5498
|
+
case 3: {
|
|
5499
|
+
if (tag !== 26) {
|
|
5500
|
+
break;
|
|
5501
|
+
}
|
|
5502
|
+
|
|
5503
|
+
message.windowStart = fromTimestamp(Timestamp.decode(reader, reader.uint32()));
|
|
5504
|
+
continue;
|
|
5505
|
+
}
|
|
5506
|
+
case 4: {
|
|
5507
|
+
if (tag !== 34) {
|
|
5508
|
+
break;
|
|
5509
|
+
}
|
|
5510
|
+
|
|
5511
|
+
message.windowEnd = fromTimestamp(Timestamp.decode(reader, reader.uint32()));
|
|
5512
|
+
continue;
|
|
5513
|
+
}
|
|
5514
|
+
case 5: {
|
|
5515
|
+
if (tag !== 40) {
|
|
5516
|
+
break;
|
|
5517
|
+
}
|
|
5518
|
+
|
|
5519
|
+
message.groupBy = reader.int32() as any;
|
|
5520
|
+
continue;
|
|
5521
|
+
}
|
|
5522
|
+
}
|
|
5523
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
5524
|
+
break;
|
|
5525
|
+
}
|
|
5526
|
+
reader.skip(tag & 7);
|
|
5527
|
+
}
|
|
5528
|
+
return message;
|
|
5529
|
+
} finally {
|
|
5530
|
+
(reader as any).__tsProtoDecodeDepth = previousRecursionDepth;
|
|
5531
|
+
}
|
|
5532
|
+
},
|
|
5533
|
+
|
|
5534
|
+
fromJSON(object: any): GitActivitySummary {
|
|
5535
|
+
return {
|
|
5536
|
+
buckets: globalThis.Array.isArray(object?.buckets)
|
|
5537
|
+
? object.buckets.map((e: any) => GitActivitySummaryBucket.fromJSON(e))
|
|
5538
|
+
: [],
|
|
5539
|
+
totals: isSet(object.totals) ? GitActivityMeasures.fromJSON(object.totals) : undefined,
|
|
5540
|
+
windowStart: isSet(object.windowStart)
|
|
5541
|
+
? fromJsonTimestamp(object.windowStart)
|
|
5542
|
+
: isSet(object.window_start)
|
|
5543
|
+
? fromJsonTimestamp(object.window_start)
|
|
5544
|
+
: undefined,
|
|
5545
|
+
windowEnd: isSet(object.windowEnd)
|
|
5546
|
+
? fromJsonTimestamp(object.windowEnd)
|
|
5547
|
+
: isSet(object.window_end)
|
|
5548
|
+
? fromJsonTimestamp(object.window_end)
|
|
5549
|
+
: undefined,
|
|
5550
|
+
groupBy: isSet(object.groupBy)
|
|
5551
|
+
? aIGitActivityDimensionFromJSON(object.groupBy)
|
|
5552
|
+
: isSet(object.group_by)
|
|
5553
|
+
? aIGitActivityDimensionFromJSON(object.group_by)
|
|
5554
|
+
: 0,
|
|
5555
|
+
};
|
|
5556
|
+
},
|
|
5557
|
+
|
|
5558
|
+
toJSON(message: GitActivitySummary): unknown {
|
|
5559
|
+
const obj: any = {};
|
|
5560
|
+
if (message.buckets?.length) {
|
|
5561
|
+
obj.buckets = message.buckets.map((e) => GitActivitySummaryBucket.toJSON(e));
|
|
5562
|
+
}
|
|
5563
|
+
if (message.totals !== undefined) {
|
|
5564
|
+
obj.totals = GitActivityMeasures.toJSON(message.totals);
|
|
5565
|
+
}
|
|
5566
|
+
if (message.windowStart !== undefined) {
|
|
5567
|
+
obj.windowStart = message.windowStart.toISOString();
|
|
5568
|
+
}
|
|
5569
|
+
if (message.windowEnd !== undefined) {
|
|
5570
|
+
obj.windowEnd = message.windowEnd.toISOString();
|
|
5571
|
+
}
|
|
5572
|
+
if (message.groupBy !== 0) {
|
|
5573
|
+
obj.groupBy = aIGitActivityDimensionToJSON(message.groupBy);
|
|
5574
|
+
}
|
|
5575
|
+
return obj;
|
|
5576
|
+
},
|
|
5577
|
+
|
|
5578
|
+
create<I extends Exact<DeepPartial<GitActivitySummary>, I>>(base?: I): GitActivitySummary {
|
|
5579
|
+
return GitActivitySummary.fromPartial(base ?? ({} as any));
|
|
5580
|
+
},
|
|
5581
|
+
fromPartial<I extends Exact<DeepPartial<GitActivitySummary>, I>>(object: I): GitActivitySummary {
|
|
5582
|
+
const message = createBaseGitActivitySummary();
|
|
5583
|
+
message.buckets = object.buckets?.map((e) => GitActivitySummaryBucket.fromPartial(e)) || [];
|
|
5584
|
+
message.totals = (object.totals !== undefined && object.totals !== null)
|
|
5585
|
+
? GitActivityMeasures.fromPartial(object.totals)
|
|
5586
|
+
: undefined;
|
|
5587
|
+
message.windowStart = object.windowStart ?? undefined;
|
|
5588
|
+
message.windowEnd = object.windowEnd ?? undefined;
|
|
5589
|
+
message.groupBy = object.groupBy ?? 0;
|
|
5590
|
+
return message;
|
|
5591
|
+
},
|
|
5592
|
+
};
|
|
5593
|
+
|
|
5594
|
+
function createBaseGitActivitySummaryBucket(): GitActivitySummaryBucket {
|
|
5595
|
+
return { bucketStart: undefined, groups: [] };
|
|
5596
|
+
}
|
|
5597
|
+
|
|
5598
|
+
export const GitActivitySummaryBucket: MessageFns<GitActivitySummaryBucket> = {
|
|
5599
|
+
encode(message: GitActivitySummaryBucket, writer: BinaryWriter = new BinaryWriter()): BinaryWriter {
|
|
5600
|
+
if (message.bucketStart !== undefined) {
|
|
5601
|
+
Timestamp.encode(toTimestamp(message.bucketStart), writer.uint32(10).fork()).join();
|
|
5602
|
+
}
|
|
5603
|
+
for (const v of message.groups) {
|
|
5604
|
+
GitActivitySummaryGroup.encode(v!, writer.uint32(18).fork()).join();
|
|
5605
|
+
}
|
|
5606
|
+
return writer;
|
|
5607
|
+
},
|
|
5608
|
+
|
|
5609
|
+
decode(input: BinaryReader | Uint8Array, length?: number): GitActivitySummaryBucket {
|
|
5610
|
+
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
|
|
5611
|
+
const previousRecursionDepth = (reader as any).__tsProtoDecodeDepth ?? 0;
|
|
5612
|
+
if (previousRecursionDepth >= 100) {
|
|
5613
|
+
throw new globalThis.Error("protobuf decode recursion limit exceeded");
|
|
5614
|
+
}
|
|
5615
|
+
(reader as any).__tsProtoDecodeDepth = previousRecursionDepth + 1;
|
|
5616
|
+
try {
|
|
5617
|
+
const end = length === undefined ? reader.len : reader.pos + length;
|
|
5618
|
+
const message = createBaseGitActivitySummaryBucket();
|
|
5619
|
+
while (reader.pos < end) {
|
|
5620
|
+
const tag = reader.uint32();
|
|
5621
|
+
switch (tag >>> 3) {
|
|
5622
|
+
case 1: {
|
|
5623
|
+
if (tag !== 10) {
|
|
5624
|
+
break;
|
|
5625
|
+
}
|
|
5626
|
+
|
|
5627
|
+
message.bucketStart = fromTimestamp(Timestamp.decode(reader, reader.uint32()));
|
|
5628
|
+
continue;
|
|
5629
|
+
}
|
|
5630
|
+
case 2: {
|
|
5631
|
+
if (tag !== 18) {
|
|
5632
|
+
break;
|
|
5633
|
+
}
|
|
5634
|
+
|
|
5635
|
+
message.groups.push(GitActivitySummaryGroup.decode(reader, reader.uint32()));
|
|
5636
|
+
continue;
|
|
5637
|
+
}
|
|
5638
|
+
}
|
|
5639
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
5640
|
+
break;
|
|
5641
|
+
}
|
|
5642
|
+
reader.skip(tag & 7);
|
|
5643
|
+
}
|
|
5644
|
+
return message;
|
|
5645
|
+
} finally {
|
|
5646
|
+
(reader as any).__tsProtoDecodeDepth = previousRecursionDepth;
|
|
5647
|
+
}
|
|
5648
|
+
},
|
|
5649
|
+
|
|
5650
|
+
fromJSON(object: any): GitActivitySummaryBucket {
|
|
5651
|
+
return {
|
|
5652
|
+
bucketStart: isSet(object.bucketStart)
|
|
5653
|
+
? fromJsonTimestamp(object.bucketStart)
|
|
5654
|
+
: isSet(object.bucket_start)
|
|
5655
|
+
? fromJsonTimestamp(object.bucket_start)
|
|
5656
|
+
: undefined,
|
|
5657
|
+
groups: globalThis.Array.isArray(object?.groups)
|
|
5658
|
+
? object.groups.map((e: any) => GitActivitySummaryGroup.fromJSON(e))
|
|
5659
|
+
: [],
|
|
5660
|
+
};
|
|
5661
|
+
},
|
|
5662
|
+
|
|
5663
|
+
toJSON(message: GitActivitySummaryBucket): unknown {
|
|
5664
|
+
const obj: any = {};
|
|
5665
|
+
if (message.bucketStart !== undefined) {
|
|
5666
|
+
obj.bucketStart = message.bucketStart.toISOString();
|
|
5667
|
+
}
|
|
5668
|
+
if (message.groups?.length) {
|
|
5669
|
+
obj.groups = message.groups.map((e) => GitActivitySummaryGroup.toJSON(e));
|
|
5670
|
+
}
|
|
5671
|
+
return obj;
|
|
5672
|
+
},
|
|
5673
|
+
|
|
5674
|
+
create<I extends Exact<DeepPartial<GitActivitySummaryBucket>, I>>(base?: I): GitActivitySummaryBucket {
|
|
5675
|
+
return GitActivitySummaryBucket.fromPartial(base ?? ({} as any));
|
|
5676
|
+
},
|
|
5677
|
+
fromPartial<I extends Exact<DeepPartial<GitActivitySummaryBucket>, I>>(object: I): GitActivitySummaryBucket {
|
|
5678
|
+
const message = createBaseGitActivitySummaryBucket();
|
|
5679
|
+
message.bucketStart = object.bucketStart ?? undefined;
|
|
5680
|
+
message.groups = object.groups?.map((e) => GitActivitySummaryGroup.fromPartial(e)) || [];
|
|
5681
|
+
return message;
|
|
5682
|
+
},
|
|
5683
|
+
};
|
|
5684
|
+
|
|
5685
|
+
function createBaseGitActivitySummaryGroup(): GitActivitySummaryGroup {
|
|
5686
|
+
return { key: "", measures: undefined };
|
|
5687
|
+
}
|
|
5688
|
+
|
|
5689
|
+
export const GitActivitySummaryGroup: MessageFns<GitActivitySummaryGroup> = {
|
|
5690
|
+
encode(message: GitActivitySummaryGroup, writer: BinaryWriter = new BinaryWriter()): BinaryWriter {
|
|
5691
|
+
if (message.key !== "") {
|
|
5692
|
+
writer.uint32(10).string(message.key);
|
|
5693
|
+
}
|
|
5694
|
+
if (message.measures !== undefined) {
|
|
5695
|
+
GitActivityMeasures.encode(message.measures, writer.uint32(18).fork()).join();
|
|
5696
|
+
}
|
|
5697
|
+
return writer;
|
|
5698
|
+
},
|
|
5699
|
+
|
|
5700
|
+
decode(input: BinaryReader | Uint8Array, length?: number): GitActivitySummaryGroup {
|
|
5701
|
+
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
|
|
5702
|
+
const previousRecursionDepth = (reader as any).__tsProtoDecodeDepth ?? 0;
|
|
5703
|
+
if (previousRecursionDepth >= 100) {
|
|
5704
|
+
throw new globalThis.Error("protobuf decode recursion limit exceeded");
|
|
5705
|
+
}
|
|
5706
|
+
(reader as any).__tsProtoDecodeDepth = previousRecursionDepth + 1;
|
|
5707
|
+
try {
|
|
5708
|
+
const end = length === undefined ? reader.len : reader.pos + length;
|
|
5709
|
+
const message = createBaseGitActivitySummaryGroup();
|
|
5710
|
+
while (reader.pos < end) {
|
|
5711
|
+
const tag = reader.uint32();
|
|
5712
|
+
switch (tag >>> 3) {
|
|
5713
|
+
case 1: {
|
|
5714
|
+
if (tag !== 10) {
|
|
5715
|
+
break;
|
|
5716
|
+
}
|
|
5717
|
+
|
|
5718
|
+
message.key = reader.string();
|
|
5719
|
+
continue;
|
|
5720
|
+
}
|
|
5721
|
+
case 2: {
|
|
5722
|
+
if (tag !== 18) {
|
|
5723
|
+
break;
|
|
5724
|
+
}
|
|
5725
|
+
|
|
5726
|
+
message.measures = GitActivityMeasures.decode(reader, reader.uint32());
|
|
5727
|
+
continue;
|
|
5728
|
+
}
|
|
5729
|
+
}
|
|
5730
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
5731
|
+
break;
|
|
5732
|
+
}
|
|
5733
|
+
reader.skip(tag & 7);
|
|
5734
|
+
}
|
|
5735
|
+
return message;
|
|
5736
|
+
} finally {
|
|
5737
|
+
(reader as any).__tsProtoDecodeDepth = previousRecursionDepth;
|
|
5738
|
+
}
|
|
5739
|
+
},
|
|
5740
|
+
|
|
5741
|
+
fromJSON(object: any): GitActivitySummaryGroup {
|
|
5742
|
+
return {
|
|
5743
|
+
key: isSet(object.key) ? globalThis.String(object.key) : "",
|
|
5744
|
+
measures: isSet(object.measures) ? GitActivityMeasures.fromJSON(object.measures) : undefined,
|
|
5745
|
+
};
|
|
5746
|
+
},
|
|
5747
|
+
|
|
5748
|
+
toJSON(message: GitActivitySummaryGroup): unknown {
|
|
5749
|
+
const obj: any = {};
|
|
5750
|
+
if (message.key !== "") {
|
|
5751
|
+
obj.key = message.key;
|
|
5752
|
+
}
|
|
5753
|
+
if (message.measures !== undefined) {
|
|
5754
|
+
obj.measures = GitActivityMeasures.toJSON(message.measures);
|
|
5755
|
+
}
|
|
5756
|
+
return obj;
|
|
5757
|
+
},
|
|
5758
|
+
|
|
5759
|
+
create<I extends Exact<DeepPartial<GitActivitySummaryGroup>, I>>(base?: I): GitActivitySummaryGroup {
|
|
5760
|
+
return GitActivitySummaryGroup.fromPartial(base ?? ({} as any));
|
|
5761
|
+
},
|
|
5762
|
+
fromPartial<I extends Exact<DeepPartial<GitActivitySummaryGroup>, I>>(object: I): GitActivitySummaryGroup {
|
|
5763
|
+
const message = createBaseGitActivitySummaryGroup();
|
|
5764
|
+
message.key = object.key ?? "";
|
|
5765
|
+
message.measures = (object.measures !== undefined && object.measures !== null)
|
|
5766
|
+
? GitActivityMeasures.fromPartial(object.measures)
|
|
5767
|
+
: undefined;
|
|
5768
|
+
return message;
|
|
5769
|
+
},
|
|
5770
|
+
};
|
|
5771
|
+
|
|
5772
|
+
function createBaseGitActivityMeasures(): GitActivityMeasures {
|
|
5773
|
+
return {
|
|
5774
|
+
total: 0,
|
|
5775
|
+
branchesCreated: 0,
|
|
5776
|
+
commits: 0,
|
|
5777
|
+
pushes: 0,
|
|
5778
|
+
pullRequestsCreated: 0,
|
|
5779
|
+
pullRequestsMerged: 0,
|
|
5780
|
+
filesChanged: 0,
|
|
5781
|
+
insertions: 0,
|
|
5782
|
+
deletions: 0,
|
|
5783
|
+
distinctRepositories: 0,
|
|
5784
|
+
distinctSessions: 0,
|
|
5785
|
+
};
|
|
5786
|
+
}
|
|
5787
|
+
|
|
5788
|
+
export const GitActivityMeasures: MessageFns<GitActivityMeasures> = {
|
|
5789
|
+
encode(message: GitActivityMeasures, writer: BinaryWriter = new BinaryWriter()): BinaryWriter {
|
|
5790
|
+
if (message.total !== 0) {
|
|
5791
|
+
writer.uint32(8).uint64(message.total);
|
|
5792
|
+
}
|
|
5793
|
+
if (message.branchesCreated !== 0) {
|
|
5794
|
+
writer.uint32(16).uint64(message.branchesCreated);
|
|
5795
|
+
}
|
|
5796
|
+
if (message.commits !== 0) {
|
|
5797
|
+
writer.uint32(24).uint64(message.commits);
|
|
5798
|
+
}
|
|
5799
|
+
if (message.pushes !== 0) {
|
|
5800
|
+
writer.uint32(32).uint64(message.pushes);
|
|
5801
|
+
}
|
|
5802
|
+
if (message.pullRequestsCreated !== 0) {
|
|
5803
|
+
writer.uint32(40).uint64(message.pullRequestsCreated);
|
|
5804
|
+
}
|
|
5805
|
+
if (message.pullRequestsMerged !== 0) {
|
|
5806
|
+
writer.uint32(48).uint64(message.pullRequestsMerged);
|
|
5807
|
+
}
|
|
5808
|
+
if (message.filesChanged !== 0) {
|
|
5809
|
+
writer.uint32(56).uint64(message.filesChanged);
|
|
5810
|
+
}
|
|
5811
|
+
if (message.insertions !== 0) {
|
|
5812
|
+
writer.uint32(64).uint64(message.insertions);
|
|
5813
|
+
}
|
|
5814
|
+
if (message.deletions !== 0) {
|
|
5815
|
+
writer.uint32(72).uint64(message.deletions);
|
|
5816
|
+
}
|
|
5817
|
+
if (message.distinctRepositories !== 0) {
|
|
5818
|
+
writer.uint32(80).uint64(message.distinctRepositories);
|
|
5819
|
+
}
|
|
5820
|
+
if (message.distinctSessions !== 0) {
|
|
5821
|
+
writer.uint32(88).uint64(message.distinctSessions);
|
|
5822
|
+
}
|
|
5823
|
+
return writer;
|
|
5824
|
+
},
|
|
5825
|
+
|
|
5826
|
+
decode(input: BinaryReader | Uint8Array, length?: number): GitActivityMeasures {
|
|
5827
|
+
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
|
|
5828
|
+
const previousRecursionDepth = (reader as any).__tsProtoDecodeDepth ?? 0;
|
|
5829
|
+
if (previousRecursionDepth >= 100) {
|
|
5830
|
+
throw new globalThis.Error("protobuf decode recursion limit exceeded");
|
|
5831
|
+
}
|
|
5832
|
+
(reader as any).__tsProtoDecodeDepth = previousRecursionDepth + 1;
|
|
5833
|
+
try {
|
|
5834
|
+
const end = length === undefined ? reader.len : reader.pos + length;
|
|
5835
|
+
const message = createBaseGitActivityMeasures();
|
|
5836
|
+
while (reader.pos < end) {
|
|
5837
|
+
const tag = reader.uint32();
|
|
5838
|
+
switch (tag >>> 3) {
|
|
5839
|
+
case 1: {
|
|
5840
|
+
if (tag !== 8) {
|
|
5841
|
+
break;
|
|
5842
|
+
}
|
|
5843
|
+
|
|
5844
|
+
message.total = longToNumber(reader.uint64());
|
|
5845
|
+
continue;
|
|
5846
|
+
}
|
|
5847
|
+
case 2: {
|
|
5848
|
+
if (tag !== 16) {
|
|
5849
|
+
break;
|
|
5850
|
+
}
|
|
5851
|
+
|
|
5852
|
+
message.branchesCreated = longToNumber(reader.uint64());
|
|
5853
|
+
continue;
|
|
5854
|
+
}
|
|
5855
|
+
case 3: {
|
|
5856
|
+
if (tag !== 24) {
|
|
5857
|
+
break;
|
|
5858
|
+
}
|
|
5859
|
+
|
|
5860
|
+
message.commits = longToNumber(reader.uint64());
|
|
5861
|
+
continue;
|
|
5862
|
+
}
|
|
5863
|
+
case 4: {
|
|
5864
|
+
if (tag !== 32) {
|
|
5865
|
+
break;
|
|
5866
|
+
}
|
|
5867
|
+
|
|
5868
|
+
message.pushes = longToNumber(reader.uint64());
|
|
5869
|
+
continue;
|
|
5870
|
+
}
|
|
5871
|
+
case 5: {
|
|
5872
|
+
if (tag !== 40) {
|
|
5873
|
+
break;
|
|
5874
|
+
}
|
|
5875
|
+
|
|
5876
|
+
message.pullRequestsCreated = longToNumber(reader.uint64());
|
|
5877
|
+
continue;
|
|
5878
|
+
}
|
|
5879
|
+
case 6: {
|
|
5880
|
+
if (tag !== 48) {
|
|
5881
|
+
break;
|
|
5882
|
+
}
|
|
5883
|
+
|
|
5884
|
+
message.pullRequestsMerged = longToNumber(reader.uint64());
|
|
5885
|
+
continue;
|
|
5886
|
+
}
|
|
5887
|
+
case 7: {
|
|
5888
|
+
if (tag !== 56) {
|
|
5889
|
+
break;
|
|
5890
|
+
}
|
|
5891
|
+
|
|
5892
|
+
message.filesChanged = longToNumber(reader.uint64());
|
|
5893
|
+
continue;
|
|
5894
|
+
}
|
|
5895
|
+
case 8: {
|
|
5896
|
+
if (tag !== 64) {
|
|
5897
|
+
break;
|
|
5898
|
+
}
|
|
5899
|
+
|
|
5900
|
+
message.insertions = longToNumber(reader.uint64());
|
|
5901
|
+
continue;
|
|
5902
|
+
}
|
|
5903
|
+
case 9: {
|
|
5904
|
+
if (tag !== 72) {
|
|
5905
|
+
break;
|
|
5906
|
+
}
|
|
5907
|
+
|
|
5908
|
+
message.deletions = longToNumber(reader.uint64());
|
|
5909
|
+
continue;
|
|
5910
|
+
}
|
|
5911
|
+
case 10: {
|
|
5912
|
+
if (tag !== 80) {
|
|
5913
|
+
break;
|
|
5914
|
+
}
|
|
5915
|
+
|
|
5916
|
+
message.distinctRepositories = longToNumber(reader.uint64());
|
|
5917
|
+
continue;
|
|
5918
|
+
}
|
|
5919
|
+
case 11: {
|
|
5920
|
+
if (tag !== 88) {
|
|
5921
|
+
break;
|
|
5922
|
+
}
|
|
5923
|
+
|
|
5924
|
+
message.distinctSessions = longToNumber(reader.uint64());
|
|
5925
|
+
continue;
|
|
5926
|
+
}
|
|
5927
|
+
}
|
|
5928
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
5929
|
+
break;
|
|
5930
|
+
}
|
|
5931
|
+
reader.skip(tag & 7);
|
|
5932
|
+
}
|
|
5933
|
+
return message;
|
|
5934
|
+
} finally {
|
|
5935
|
+
(reader as any).__tsProtoDecodeDepth = previousRecursionDepth;
|
|
5936
|
+
}
|
|
5937
|
+
},
|
|
5938
|
+
|
|
5939
|
+
fromJSON(object: any): GitActivityMeasures {
|
|
5940
|
+
return {
|
|
5941
|
+
total: isSet(object.total) ? globalThis.Number(object.total) : 0,
|
|
5942
|
+
branchesCreated: isSet(object.branchesCreated)
|
|
5943
|
+
? globalThis.Number(object.branchesCreated)
|
|
5944
|
+
: isSet(object.branches_created)
|
|
5945
|
+
? globalThis.Number(object.branches_created)
|
|
5946
|
+
: 0,
|
|
5947
|
+
commits: isSet(object.commits) ? globalThis.Number(object.commits) : 0,
|
|
5948
|
+
pushes: isSet(object.pushes) ? globalThis.Number(object.pushes) : 0,
|
|
5949
|
+
pullRequestsCreated: isSet(object.pullRequestsCreated)
|
|
5950
|
+
? globalThis.Number(object.pullRequestsCreated)
|
|
5951
|
+
: isSet(object.pull_requests_created)
|
|
5952
|
+
? globalThis.Number(object.pull_requests_created)
|
|
5953
|
+
: 0,
|
|
5954
|
+
pullRequestsMerged: isSet(object.pullRequestsMerged)
|
|
5955
|
+
? globalThis.Number(object.pullRequestsMerged)
|
|
5956
|
+
: isSet(object.pull_requests_merged)
|
|
5957
|
+
? globalThis.Number(object.pull_requests_merged)
|
|
5958
|
+
: 0,
|
|
5959
|
+
filesChanged: isSet(object.filesChanged)
|
|
5960
|
+
? globalThis.Number(object.filesChanged)
|
|
5961
|
+
: isSet(object.files_changed)
|
|
5962
|
+
? globalThis.Number(object.files_changed)
|
|
5963
|
+
: 0,
|
|
5964
|
+
insertions: isSet(object.insertions) ? globalThis.Number(object.insertions) : 0,
|
|
5965
|
+
deletions: isSet(object.deletions) ? globalThis.Number(object.deletions) : 0,
|
|
5966
|
+
distinctRepositories: isSet(object.distinctRepositories)
|
|
5967
|
+
? globalThis.Number(object.distinctRepositories)
|
|
5968
|
+
: isSet(object.distinct_repositories)
|
|
5969
|
+
? globalThis.Number(object.distinct_repositories)
|
|
5970
|
+
: 0,
|
|
5971
|
+
distinctSessions: isSet(object.distinctSessions)
|
|
5972
|
+
? globalThis.Number(object.distinctSessions)
|
|
5973
|
+
: isSet(object.distinct_sessions)
|
|
5974
|
+
? globalThis.Number(object.distinct_sessions)
|
|
5975
|
+
: 0,
|
|
5976
|
+
};
|
|
5977
|
+
},
|
|
5978
|
+
|
|
5979
|
+
toJSON(message: GitActivityMeasures): unknown {
|
|
5980
|
+
const obj: any = {};
|
|
5981
|
+
if (message.total !== 0) {
|
|
5982
|
+
obj.total = Math.round(message.total);
|
|
5983
|
+
}
|
|
5984
|
+
if (message.branchesCreated !== 0) {
|
|
5985
|
+
obj.branchesCreated = Math.round(message.branchesCreated);
|
|
5986
|
+
}
|
|
5987
|
+
if (message.commits !== 0) {
|
|
5988
|
+
obj.commits = Math.round(message.commits);
|
|
5989
|
+
}
|
|
5990
|
+
if (message.pushes !== 0) {
|
|
5991
|
+
obj.pushes = Math.round(message.pushes);
|
|
5992
|
+
}
|
|
5993
|
+
if (message.pullRequestsCreated !== 0) {
|
|
5994
|
+
obj.pullRequestsCreated = Math.round(message.pullRequestsCreated);
|
|
5995
|
+
}
|
|
5996
|
+
if (message.pullRequestsMerged !== 0) {
|
|
5997
|
+
obj.pullRequestsMerged = Math.round(message.pullRequestsMerged);
|
|
5998
|
+
}
|
|
5999
|
+
if (message.filesChanged !== 0) {
|
|
6000
|
+
obj.filesChanged = Math.round(message.filesChanged);
|
|
6001
|
+
}
|
|
6002
|
+
if (message.insertions !== 0) {
|
|
6003
|
+
obj.insertions = Math.round(message.insertions);
|
|
6004
|
+
}
|
|
6005
|
+
if (message.deletions !== 0) {
|
|
6006
|
+
obj.deletions = Math.round(message.deletions);
|
|
6007
|
+
}
|
|
6008
|
+
if (message.distinctRepositories !== 0) {
|
|
6009
|
+
obj.distinctRepositories = Math.round(message.distinctRepositories);
|
|
6010
|
+
}
|
|
6011
|
+
if (message.distinctSessions !== 0) {
|
|
6012
|
+
obj.distinctSessions = Math.round(message.distinctSessions);
|
|
6013
|
+
}
|
|
6014
|
+
return obj;
|
|
6015
|
+
},
|
|
6016
|
+
|
|
6017
|
+
create<I extends Exact<DeepPartial<GitActivityMeasures>, I>>(base?: I): GitActivityMeasures {
|
|
6018
|
+
return GitActivityMeasures.fromPartial(base ?? ({} as any));
|
|
6019
|
+
},
|
|
6020
|
+
fromPartial<I extends Exact<DeepPartial<GitActivityMeasures>, I>>(object: I): GitActivityMeasures {
|
|
6021
|
+
const message = createBaseGitActivityMeasures();
|
|
6022
|
+
message.total = object.total ?? 0;
|
|
6023
|
+
message.branchesCreated = object.branchesCreated ?? 0;
|
|
6024
|
+
message.commits = object.commits ?? 0;
|
|
6025
|
+
message.pushes = object.pushes ?? 0;
|
|
6026
|
+
message.pullRequestsCreated = object.pullRequestsCreated ?? 0;
|
|
6027
|
+
message.pullRequestsMerged = object.pullRequestsMerged ?? 0;
|
|
6028
|
+
message.filesChanged = object.filesChanged ?? 0;
|
|
6029
|
+
message.insertions = object.insertions ?? 0;
|
|
6030
|
+
message.deletions = object.deletions ?? 0;
|
|
6031
|
+
message.distinctRepositories = object.distinctRepositories ?? 0;
|
|
6032
|
+
message.distinctSessions = object.distinctSessions ?? 0;
|
|
6033
|
+
return message;
|
|
6034
|
+
},
|
|
6035
|
+
};
|
|
6036
|
+
|
|
6037
|
+
function createBaseAIFileStateFilter(): AIFileStateFilter {
|
|
6038
|
+
return {
|
|
6039
|
+
repositoryKey: [],
|
|
6040
|
+
ref: [],
|
|
6041
|
+
state: [],
|
|
6042
|
+
tier: [],
|
|
6043
|
+
sessionId: [],
|
|
6044
|
+
minAge: undefined,
|
|
6045
|
+
activeAfter: undefined,
|
|
6046
|
+
activeBefore: undefined,
|
|
6047
|
+
abandonedHorizon: undefined,
|
|
6048
|
+
};
|
|
6049
|
+
}
|
|
6050
|
+
|
|
6051
|
+
export const AIFileStateFilter: MessageFns<AIFileStateFilter> = {
|
|
6052
|
+
encode(message: AIFileStateFilter, writer: BinaryWriter = new BinaryWriter()): BinaryWriter {
|
|
6053
|
+
for (const v of message.repositoryKey) {
|
|
6054
|
+
writer.uint32(10).string(v!);
|
|
6055
|
+
}
|
|
6056
|
+
for (const v of message.ref) {
|
|
6057
|
+
writer.uint32(18).string(v!);
|
|
6058
|
+
}
|
|
6059
|
+
writer.uint32(26).fork();
|
|
6060
|
+
for (const v of message.state) {
|
|
6061
|
+
writer.int32(v);
|
|
6062
|
+
}
|
|
6063
|
+
writer.join();
|
|
6064
|
+
writer.uint32(34).fork();
|
|
6065
|
+
for (const v of message.tier) {
|
|
6066
|
+
writer.int32(v);
|
|
6067
|
+
}
|
|
6068
|
+
writer.join();
|
|
6069
|
+
for (const v of message.sessionId) {
|
|
6070
|
+
writer.uint32(42).string(v!);
|
|
6071
|
+
}
|
|
6072
|
+
if (message.minAge !== undefined) {
|
|
6073
|
+
Duration.encode(message.minAge, writer.uint32(50).fork()).join();
|
|
6074
|
+
}
|
|
6075
|
+
if (message.activeAfter !== undefined) {
|
|
6076
|
+
Timestamp.encode(toTimestamp(message.activeAfter), writer.uint32(58).fork()).join();
|
|
6077
|
+
}
|
|
6078
|
+
if (message.activeBefore !== undefined) {
|
|
6079
|
+
Timestamp.encode(toTimestamp(message.activeBefore), writer.uint32(66).fork()).join();
|
|
6080
|
+
}
|
|
6081
|
+
if (message.abandonedHorizon !== undefined) {
|
|
6082
|
+
Duration.encode(message.abandonedHorizon, writer.uint32(74).fork()).join();
|
|
6083
|
+
}
|
|
6084
|
+
return writer;
|
|
6085
|
+
},
|
|
6086
|
+
|
|
6087
|
+
decode(input: BinaryReader | Uint8Array, length?: number): AIFileStateFilter {
|
|
6088
|
+
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
|
|
6089
|
+
const previousRecursionDepth = (reader as any).__tsProtoDecodeDepth ?? 0;
|
|
6090
|
+
if (previousRecursionDepth >= 100) {
|
|
6091
|
+
throw new globalThis.Error("protobuf decode recursion limit exceeded");
|
|
6092
|
+
}
|
|
6093
|
+
(reader as any).__tsProtoDecodeDepth = previousRecursionDepth + 1;
|
|
6094
|
+
try {
|
|
6095
|
+
const end = length === undefined ? reader.len : reader.pos + length;
|
|
6096
|
+
const message = createBaseAIFileStateFilter();
|
|
6097
|
+
while (reader.pos < end) {
|
|
6098
|
+
const tag = reader.uint32();
|
|
6099
|
+
switch (tag >>> 3) {
|
|
6100
|
+
case 1: {
|
|
6101
|
+
if (tag !== 10) {
|
|
6102
|
+
break;
|
|
6103
|
+
}
|
|
6104
|
+
|
|
6105
|
+
message.repositoryKey.push(reader.string());
|
|
6106
|
+
continue;
|
|
6107
|
+
}
|
|
6108
|
+
case 2: {
|
|
6109
|
+
if (tag !== 18) {
|
|
6110
|
+
break;
|
|
6111
|
+
}
|
|
6112
|
+
|
|
6113
|
+
message.ref.push(reader.string());
|
|
6114
|
+
continue;
|
|
6115
|
+
}
|
|
6116
|
+
case 3: {
|
|
6117
|
+
if (tag === 24) {
|
|
6118
|
+
message.state.push(reader.int32() as any);
|
|
6119
|
+
|
|
6120
|
+
continue;
|
|
6121
|
+
}
|
|
6122
|
+
|
|
6123
|
+
if (tag === 26) {
|
|
6124
|
+
const end2 = reader.uint32() + reader.pos;
|
|
6125
|
+
while (reader.pos < end2) {
|
|
6126
|
+
message.state.push(reader.int32() as any);
|
|
6127
|
+
}
|
|
6128
|
+
|
|
6129
|
+
continue;
|
|
6130
|
+
}
|
|
6131
|
+
|
|
6132
|
+
break;
|
|
6133
|
+
}
|
|
6134
|
+
case 4: {
|
|
6135
|
+
if (tag === 32) {
|
|
6136
|
+
message.tier.push(reader.int32() as any);
|
|
6137
|
+
|
|
6138
|
+
continue;
|
|
6139
|
+
}
|
|
6140
|
+
|
|
6141
|
+
if (tag === 34) {
|
|
6142
|
+
const end2 = reader.uint32() + reader.pos;
|
|
6143
|
+
while (reader.pos < end2) {
|
|
6144
|
+
message.tier.push(reader.int32() as any);
|
|
6145
|
+
}
|
|
6146
|
+
|
|
6147
|
+
continue;
|
|
6148
|
+
}
|
|
6149
|
+
|
|
6150
|
+
break;
|
|
6151
|
+
}
|
|
6152
|
+
case 5: {
|
|
6153
|
+
if (tag !== 42) {
|
|
6154
|
+
break;
|
|
6155
|
+
}
|
|
6156
|
+
|
|
6157
|
+
message.sessionId.push(reader.string());
|
|
6158
|
+
continue;
|
|
6159
|
+
}
|
|
6160
|
+
case 6: {
|
|
6161
|
+
if (tag !== 50) {
|
|
6162
|
+
break;
|
|
6163
|
+
}
|
|
6164
|
+
|
|
6165
|
+
message.minAge = Duration.decode(reader, reader.uint32());
|
|
6166
|
+
continue;
|
|
6167
|
+
}
|
|
6168
|
+
case 7: {
|
|
6169
|
+
if (tag !== 58) {
|
|
6170
|
+
break;
|
|
6171
|
+
}
|
|
6172
|
+
|
|
6173
|
+
message.activeAfter = fromTimestamp(Timestamp.decode(reader, reader.uint32()));
|
|
6174
|
+
continue;
|
|
6175
|
+
}
|
|
6176
|
+
case 8: {
|
|
6177
|
+
if (tag !== 66) {
|
|
6178
|
+
break;
|
|
6179
|
+
}
|
|
6180
|
+
|
|
6181
|
+
message.activeBefore = fromTimestamp(Timestamp.decode(reader, reader.uint32()));
|
|
6182
|
+
continue;
|
|
6183
|
+
}
|
|
6184
|
+
case 9: {
|
|
6185
|
+
if (tag !== 74) {
|
|
6186
|
+
break;
|
|
6187
|
+
}
|
|
6188
|
+
|
|
6189
|
+
message.abandonedHorizon = Duration.decode(reader, reader.uint32());
|
|
6190
|
+
continue;
|
|
6191
|
+
}
|
|
6192
|
+
}
|
|
6193
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
6194
|
+
break;
|
|
6195
|
+
}
|
|
6196
|
+
reader.skip(tag & 7);
|
|
6197
|
+
}
|
|
6198
|
+
return message;
|
|
6199
|
+
} finally {
|
|
6200
|
+
(reader as any).__tsProtoDecodeDepth = previousRecursionDepth;
|
|
6201
|
+
}
|
|
6202
|
+
},
|
|
6203
|
+
|
|
6204
|
+
fromJSON(object: any): AIFileStateFilter {
|
|
6205
|
+
return {
|
|
6206
|
+
repositoryKey: globalThis.Array.isArray(object?.repositoryKey)
|
|
6207
|
+
? object.repositoryKey.map((e: any) => globalThis.String(e))
|
|
6208
|
+
: globalThis.Array.isArray(object?.repository_key)
|
|
6209
|
+
? object.repository_key.map((e: any) => globalThis.String(e))
|
|
6210
|
+
: [],
|
|
6211
|
+
ref: globalThis.Array.isArray(object?.ref) ? object.ref.map((e: any) => globalThis.String(e)) : [],
|
|
6212
|
+
state: globalThis.Array.isArray(object?.state) ? object.state.map((e: any) => aIFileLifecycleFromJSON(e)) : [],
|
|
6213
|
+
tier: globalThis.Array.isArray(object?.tier) ? object.tier.map((e: any) => aIFileTierFromJSON(e)) : [],
|
|
6214
|
+
sessionId: globalThis.Array.isArray(object?.sessionId)
|
|
6215
|
+
? object.sessionId.map((e: any) => globalThis.String(e))
|
|
6216
|
+
: globalThis.Array.isArray(object?.session_id)
|
|
6217
|
+
? object.session_id.map((e: any) => globalThis.String(e))
|
|
6218
|
+
: [],
|
|
6219
|
+
minAge: isSet(object.minAge)
|
|
6220
|
+
? Duration.fromJSON(object.minAge)
|
|
6221
|
+
: isSet(object.min_age)
|
|
6222
|
+
? Duration.fromJSON(object.min_age)
|
|
6223
|
+
: undefined,
|
|
6224
|
+
activeAfter: isSet(object.activeAfter)
|
|
6225
|
+
? fromJsonTimestamp(object.activeAfter)
|
|
6226
|
+
: isSet(object.active_after)
|
|
6227
|
+
? fromJsonTimestamp(object.active_after)
|
|
6228
|
+
: undefined,
|
|
6229
|
+
activeBefore: isSet(object.activeBefore)
|
|
6230
|
+
? fromJsonTimestamp(object.activeBefore)
|
|
6231
|
+
: isSet(object.active_before)
|
|
6232
|
+
? fromJsonTimestamp(object.active_before)
|
|
6233
|
+
: undefined,
|
|
6234
|
+
abandonedHorizon: isSet(object.abandonedHorizon)
|
|
6235
|
+
? Duration.fromJSON(object.abandonedHorizon)
|
|
6236
|
+
: isSet(object.abandoned_horizon)
|
|
6237
|
+
? Duration.fromJSON(object.abandoned_horizon)
|
|
6238
|
+
: undefined,
|
|
6239
|
+
};
|
|
6240
|
+
},
|
|
6241
|
+
|
|
6242
|
+
toJSON(message: AIFileStateFilter): unknown {
|
|
6243
|
+
const obj: any = {};
|
|
6244
|
+
if (message.repositoryKey?.length) {
|
|
6245
|
+
obj.repositoryKey = message.repositoryKey;
|
|
6246
|
+
}
|
|
6247
|
+
if (message.ref?.length) {
|
|
6248
|
+
obj.ref = message.ref;
|
|
6249
|
+
}
|
|
6250
|
+
if (message.state?.length) {
|
|
6251
|
+
obj.state = message.state.map((e) => aIFileLifecycleToJSON(e));
|
|
6252
|
+
}
|
|
6253
|
+
if (message.tier?.length) {
|
|
6254
|
+
obj.tier = message.tier.map((e) => aIFileTierToJSON(e));
|
|
6255
|
+
}
|
|
6256
|
+
if (message.sessionId?.length) {
|
|
6257
|
+
obj.sessionId = message.sessionId;
|
|
6258
|
+
}
|
|
6259
|
+
if (message.minAge !== undefined) {
|
|
6260
|
+
obj.minAge = Duration.toJSON(message.minAge);
|
|
6261
|
+
}
|
|
6262
|
+
if (message.activeAfter !== undefined) {
|
|
6263
|
+
obj.activeAfter = message.activeAfter.toISOString();
|
|
6264
|
+
}
|
|
6265
|
+
if (message.activeBefore !== undefined) {
|
|
6266
|
+
obj.activeBefore = message.activeBefore.toISOString();
|
|
6267
|
+
}
|
|
6268
|
+
if (message.abandonedHorizon !== undefined) {
|
|
6269
|
+
obj.abandonedHorizon = Duration.toJSON(message.abandonedHorizon);
|
|
6270
|
+
}
|
|
6271
|
+
return obj;
|
|
6272
|
+
},
|
|
6273
|
+
|
|
6274
|
+
create<I extends Exact<DeepPartial<AIFileStateFilter>, I>>(base?: I): AIFileStateFilter {
|
|
6275
|
+
return AIFileStateFilter.fromPartial(base ?? ({} as any));
|
|
6276
|
+
},
|
|
6277
|
+
fromPartial<I extends Exact<DeepPartial<AIFileStateFilter>, I>>(object: I): AIFileStateFilter {
|
|
6278
|
+
const message = createBaseAIFileStateFilter();
|
|
6279
|
+
message.repositoryKey = object.repositoryKey?.map((e) => e) || [];
|
|
6280
|
+
message.ref = object.ref?.map((e) => e) || [];
|
|
6281
|
+
message.state = object.state?.map((e) => e) || [];
|
|
6282
|
+
message.tier = object.tier?.map((e) => e) || [];
|
|
6283
|
+
message.sessionId = object.sessionId?.map((e) => e) || [];
|
|
6284
|
+
message.minAge = (object.minAge !== undefined && object.minAge !== null)
|
|
6285
|
+
? Duration.fromPartial(object.minAge)
|
|
6286
|
+
: undefined;
|
|
6287
|
+
message.activeAfter = object.activeAfter ?? undefined;
|
|
6288
|
+
message.activeBefore = object.activeBefore ?? undefined;
|
|
6289
|
+
message.abandonedHorizon = (object.abandonedHorizon !== undefined && object.abandonedHorizon !== null)
|
|
6290
|
+
? Duration.fromPartial(object.abandonedHorizon)
|
|
6291
|
+
: undefined;
|
|
6292
|
+
return message;
|
|
6293
|
+
},
|
|
6294
|
+
};
|
|
6295
|
+
|
|
6296
|
+
function createBaseListFileStatesRequest(): ListFileStatesRequest {
|
|
6297
|
+
return { organizationId: "", projectId: "", filter: undefined, pageSize: 0, pageToken: "" };
|
|
6298
|
+
}
|
|
6299
|
+
|
|
6300
|
+
export const ListFileStatesRequest: MessageFns<ListFileStatesRequest> = {
|
|
6301
|
+
encode(message: ListFileStatesRequest, writer: BinaryWriter = new BinaryWriter()): BinaryWriter {
|
|
6302
|
+
if (message.organizationId !== "") {
|
|
6303
|
+
writer.uint32(10).string(message.organizationId);
|
|
6304
|
+
}
|
|
6305
|
+
if (message.projectId !== "") {
|
|
6306
|
+
writer.uint32(18).string(message.projectId);
|
|
6307
|
+
}
|
|
6308
|
+
if (message.filter !== undefined) {
|
|
6309
|
+
AIFileStateFilter.encode(message.filter, writer.uint32(26).fork()).join();
|
|
6310
|
+
}
|
|
6311
|
+
if (message.pageSize !== 0) {
|
|
6312
|
+
writer.uint32(32).int32(message.pageSize);
|
|
6313
|
+
}
|
|
6314
|
+
if (message.pageToken !== "") {
|
|
6315
|
+
writer.uint32(42).string(message.pageToken);
|
|
6316
|
+
}
|
|
6317
|
+
return writer;
|
|
6318
|
+
},
|
|
6319
|
+
|
|
6320
|
+
decode(input: BinaryReader | Uint8Array, length?: number): ListFileStatesRequest {
|
|
6321
|
+
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
|
|
6322
|
+
const previousRecursionDepth = (reader as any).__tsProtoDecodeDepth ?? 0;
|
|
6323
|
+
if (previousRecursionDepth >= 100) {
|
|
6324
|
+
throw new globalThis.Error("protobuf decode recursion limit exceeded");
|
|
6325
|
+
}
|
|
6326
|
+
(reader as any).__tsProtoDecodeDepth = previousRecursionDepth + 1;
|
|
6327
|
+
try {
|
|
6328
|
+
const end = length === undefined ? reader.len : reader.pos + length;
|
|
6329
|
+
const message = createBaseListFileStatesRequest();
|
|
6330
|
+
while (reader.pos < end) {
|
|
6331
|
+
const tag = reader.uint32();
|
|
6332
|
+
switch (tag >>> 3) {
|
|
6333
|
+
case 1: {
|
|
6334
|
+
if (tag !== 10) {
|
|
6335
|
+
break;
|
|
6336
|
+
}
|
|
6337
|
+
|
|
6338
|
+
message.organizationId = reader.string();
|
|
6339
|
+
continue;
|
|
6340
|
+
}
|
|
6341
|
+
case 2: {
|
|
6342
|
+
if (tag !== 18) {
|
|
6343
|
+
break;
|
|
6344
|
+
}
|
|
6345
|
+
|
|
6346
|
+
message.projectId = reader.string();
|
|
6347
|
+
continue;
|
|
6348
|
+
}
|
|
6349
|
+
case 3: {
|
|
6350
|
+
if (tag !== 26) {
|
|
6351
|
+
break;
|
|
6352
|
+
}
|
|
6353
|
+
|
|
6354
|
+
message.filter = AIFileStateFilter.decode(reader, reader.uint32());
|
|
6355
|
+
continue;
|
|
6356
|
+
}
|
|
6357
|
+
case 4: {
|
|
6358
|
+
if (tag !== 32) {
|
|
6359
|
+
break;
|
|
6360
|
+
}
|
|
6361
|
+
|
|
6362
|
+
message.pageSize = reader.int32();
|
|
6363
|
+
continue;
|
|
6364
|
+
}
|
|
6365
|
+
case 5: {
|
|
6366
|
+
if (tag !== 42) {
|
|
6367
|
+
break;
|
|
6368
|
+
}
|
|
6369
|
+
|
|
6370
|
+
message.pageToken = reader.string();
|
|
6371
|
+
continue;
|
|
6372
|
+
}
|
|
6373
|
+
}
|
|
6374
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
6375
|
+
break;
|
|
6376
|
+
}
|
|
6377
|
+
reader.skip(tag & 7);
|
|
6378
|
+
}
|
|
6379
|
+
return message;
|
|
6380
|
+
} finally {
|
|
6381
|
+
(reader as any).__tsProtoDecodeDepth = previousRecursionDepth;
|
|
6382
|
+
}
|
|
6383
|
+
},
|
|
6384
|
+
|
|
6385
|
+
fromJSON(object: any): ListFileStatesRequest {
|
|
6386
|
+
return {
|
|
6387
|
+
organizationId: isSet(object.organizationId)
|
|
6388
|
+
? globalThis.String(object.organizationId)
|
|
6389
|
+
: isSet(object.organization_id)
|
|
6390
|
+
? globalThis.String(object.organization_id)
|
|
6391
|
+
: "",
|
|
6392
|
+
projectId: isSet(object.projectId)
|
|
6393
|
+
? globalThis.String(object.projectId)
|
|
6394
|
+
: isSet(object.project_id)
|
|
6395
|
+
? globalThis.String(object.project_id)
|
|
6396
|
+
: "",
|
|
6397
|
+
filter: isSet(object.filter) ? AIFileStateFilter.fromJSON(object.filter) : undefined,
|
|
6398
|
+
pageSize: isSet(object.pageSize)
|
|
6399
|
+
? globalThis.Number(object.pageSize)
|
|
6400
|
+
: isSet(object.page_size)
|
|
6401
|
+
? globalThis.Number(object.page_size)
|
|
6402
|
+
: 0,
|
|
6403
|
+
pageToken: isSet(object.pageToken)
|
|
6404
|
+
? globalThis.String(object.pageToken)
|
|
6405
|
+
: isSet(object.page_token)
|
|
6406
|
+
? globalThis.String(object.page_token)
|
|
6407
|
+
: "",
|
|
6408
|
+
};
|
|
6409
|
+
},
|
|
6410
|
+
|
|
6411
|
+
toJSON(message: ListFileStatesRequest): unknown {
|
|
6412
|
+
const obj: any = {};
|
|
6413
|
+
if (message.organizationId !== "") {
|
|
6414
|
+
obj.organizationId = message.organizationId;
|
|
6415
|
+
}
|
|
6416
|
+
if (message.projectId !== "") {
|
|
6417
|
+
obj.projectId = message.projectId;
|
|
6418
|
+
}
|
|
6419
|
+
if (message.filter !== undefined) {
|
|
6420
|
+
obj.filter = AIFileStateFilter.toJSON(message.filter);
|
|
6421
|
+
}
|
|
6422
|
+
if (message.pageSize !== 0) {
|
|
6423
|
+
obj.pageSize = Math.round(message.pageSize);
|
|
6424
|
+
}
|
|
6425
|
+
if (message.pageToken !== "") {
|
|
6426
|
+
obj.pageToken = message.pageToken;
|
|
6427
|
+
}
|
|
6428
|
+
return obj;
|
|
6429
|
+
},
|
|
6430
|
+
|
|
6431
|
+
create<I extends Exact<DeepPartial<ListFileStatesRequest>, I>>(base?: I): ListFileStatesRequest {
|
|
6432
|
+
return ListFileStatesRequest.fromPartial(base ?? ({} as any));
|
|
6433
|
+
},
|
|
6434
|
+
fromPartial<I extends Exact<DeepPartial<ListFileStatesRequest>, I>>(object: I): ListFileStatesRequest {
|
|
6435
|
+
const message = createBaseListFileStatesRequest();
|
|
6436
|
+
message.organizationId = object.organizationId ?? "";
|
|
6437
|
+
message.projectId = object.projectId ?? "";
|
|
6438
|
+
message.filter = (object.filter !== undefined && object.filter !== null)
|
|
6439
|
+
? AIFileStateFilter.fromPartial(object.filter)
|
|
6440
|
+
: undefined;
|
|
6441
|
+
message.pageSize = object.pageSize ?? 0;
|
|
6442
|
+
message.pageToken = object.pageToken ?? "";
|
|
6443
|
+
return message;
|
|
6444
|
+
},
|
|
6445
|
+
};
|
|
6446
|
+
|
|
6447
|
+
function createBaseListFileStatesResponse(): ListFileStatesResponse {
|
|
6448
|
+
return { status: undefined, files: [], nextPageToken: "" };
|
|
6449
|
+
}
|
|
6450
|
+
|
|
6451
|
+
export const ListFileStatesResponse: MessageFns<ListFileStatesResponse> = {
|
|
6452
|
+
encode(message: ListFileStatesResponse, writer: BinaryWriter = new BinaryWriter()): BinaryWriter {
|
|
6453
|
+
if (message.status !== undefined) {
|
|
6454
|
+
ResponseStatus.encode(message.status, writer.uint32(10).fork()).join();
|
|
6455
|
+
}
|
|
6456
|
+
for (const v of message.files) {
|
|
6457
|
+
AIFileStateRow.encode(v!, writer.uint32(18).fork()).join();
|
|
6458
|
+
}
|
|
6459
|
+
if (message.nextPageToken !== "") {
|
|
6460
|
+
writer.uint32(26).string(message.nextPageToken);
|
|
6461
|
+
}
|
|
6462
|
+
return writer;
|
|
6463
|
+
},
|
|
6464
|
+
|
|
6465
|
+
decode(input: BinaryReader | Uint8Array, length?: number): ListFileStatesResponse {
|
|
6466
|
+
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
|
|
6467
|
+
const previousRecursionDepth = (reader as any).__tsProtoDecodeDepth ?? 0;
|
|
6468
|
+
if (previousRecursionDepth >= 100) {
|
|
6469
|
+
throw new globalThis.Error("protobuf decode recursion limit exceeded");
|
|
6470
|
+
}
|
|
6471
|
+
(reader as any).__tsProtoDecodeDepth = previousRecursionDepth + 1;
|
|
6472
|
+
try {
|
|
6473
|
+
const end = length === undefined ? reader.len : reader.pos + length;
|
|
6474
|
+
const message = createBaseListFileStatesResponse();
|
|
6475
|
+
while (reader.pos < end) {
|
|
6476
|
+
const tag = reader.uint32();
|
|
6477
|
+
switch (tag >>> 3) {
|
|
6478
|
+
case 1: {
|
|
6479
|
+
if (tag !== 10) {
|
|
6480
|
+
break;
|
|
6481
|
+
}
|
|
6482
|
+
|
|
6483
|
+
message.status = ResponseStatus.decode(reader, reader.uint32());
|
|
6484
|
+
continue;
|
|
6485
|
+
}
|
|
6486
|
+
case 2: {
|
|
6487
|
+
if (tag !== 18) {
|
|
6488
|
+
break;
|
|
6489
|
+
}
|
|
6490
|
+
|
|
6491
|
+
message.files.push(AIFileStateRow.decode(reader, reader.uint32()));
|
|
6492
|
+
continue;
|
|
6493
|
+
}
|
|
6494
|
+
case 3: {
|
|
6495
|
+
if (tag !== 26) {
|
|
6496
|
+
break;
|
|
6497
|
+
}
|
|
6498
|
+
|
|
6499
|
+
message.nextPageToken = reader.string();
|
|
6500
|
+
continue;
|
|
6501
|
+
}
|
|
6502
|
+
}
|
|
6503
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
6504
|
+
break;
|
|
6505
|
+
}
|
|
6506
|
+
reader.skip(tag & 7);
|
|
6507
|
+
}
|
|
6508
|
+
return message;
|
|
6509
|
+
} finally {
|
|
6510
|
+
(reader as any).__tsProtoDecodeDepth = previousRecursionDepth;
|
|
6511
|
+
}
|
|
6512
|
+
},
|
|
6513
|
+
|
|
6514
|
+
fromJSON(object: any): ListFileStatesResponse {
|
|
6515
|
+
return {
|
|
6516
|
+
status: isSet(object.status) ? ResponseStatus.fromJSON(object.status) : undefined,
|
|
6517
|
+
files: globalThis.Array.isArray(object?.files) ? object.files.map((e: any) => AIFileStateRow.fromJSON(e)) : [],
|
|
6518
|
+
nextPageToken: isSet(object.nextPageToken)
|
|
6519
|
+
? globalThis.String(object.nextPageToken)
|
|
6520
|
+
: isSet(object.next_page_token)
|
|
6521
|
+
? globalThis.String(object.next_page_token)
|
|
6522
|
+
: "",
|
|
6523
|
+
};
|
|
6524
|
+
},
|
|
6525
|
+
|
|
6526
|
+
toJSON(message: ListFileStatesResponse): unknown {
|
|
6527
|
+
const obj: any = {};
|
|
6528
|
+
if (message.status !== undefined) {
|
|
6529
|
+
obj.status = ResponseStatus.toJSON(message.status);
|
|
6530
|
+
}
|
|
6531
|
+
if (message.files?.length) {
|
|
6532
|
+
obj.files = message.files.map((e) => AIFileStateRow.toJSON(e));
|
|
6533
|
+
}
|
|
6534
|
+
if (message.nextPageToken !== "") {
|
|
6535
|
+
obj.nextPageToken = message.nextPageToken;
|
|
6536
|
+
}
|
|
6537
|
+
return obj;
|
|
6538
|
+
},
|
|
6539
|
+
|
|
6540
|
+
create<I extends Exact<DeepPartial<ListFileStatesResponse>, I>>(base?: I): ListFileStatesResponse {
|
|
6541
|
+
return ListFileStatesResponse.fromPartial(base ?? ({} as any));
|
|
6542
|
+
},
|
|
6543
|
+
fromPartial<I extends Exact<DeepPartial<ListFileStatesResponse>, I>>(object: I): ListFileStatesResponse {
|
|
6544
|
+
const message = createBaseListFileStatesResponse();
|
|
6545
|
+
message.status = (object.status !== undefined && object.status !== null)
|
|
6546
|
+
? ResponseStatus.fromPartial(object.status)
|
|
6547
|
+
: undefined;
|
|
6548
|
+
message.files = object.files?.map((e) => AIFileStateRow.fromPartial(e)) || [];
|
|
6549
|
+
message.nextPageToken = object.nextPageToken ?? "";
|
|
6550
|
+
return message;
|
|
6551
|
+
},
|
|
6552
|
+
};
|
|
6553
|
+
|
|
6554
|
+
function createBaseAIFileStateRow(): AIFileStateRow {
|
|
6555
|
+
return {
|
|
6556
|
+
repositoryKey: "",
|
|
6557
|
+
ref: "",
|
|
6558
|
+
path: "",
|
|
6559
|
+
oldPath: "",
|
|
6560
|
+
state: 0,
|
|
6561
|
+
tier: 0,
|
|
6562
|
+
confidence: 0,
|
|
6563
|
+
firstEditedAt: undefined,
|
|
6564
|
+
lastEditedAt: undefined,
|
|
6565
|
+
lastStagedAt: undefined,
|
|
6566
|
+
lastCommittedAt: undefined,
|
|
6567
|
+
lastCommitSha: "",
|
|
6568
|
+
lastPushedAt: undefined,
|
|
6569
|
+
discardedAt: undefined,
|
|
6570
|
+
discardReason: "",
|
|
6571
|
+
editCount: 0,
|
|
6572
|
+
sessionId: [],
|
|
6573
|
+
unlandedCostUsd: 0,
|
|
6574
|
+
unlandedOutputTokens: 0,
|
|
6575
|
+
};
|
|
6576
|
+
}
|
|
6577
|
+
|
|
6578
|
+
export const AIFileStateRow: MessageFns<AIFileStateRow> = {
|
|
6579
|
+
encode(message: AIFileStateRow, writer: BinaryWriter = new BinaryWriter()): BinaryWriter {
|
|
6580
|
+
if (message.repositoryKey !== "") {
|
|
6581
|
+
writer.uint32(10).string(message.repositoryKey);
|
|
6582
|
+
}
|
|
6583
|
+
if (message.ref !== "") {
|
|
6584
|
+
writer.uint32(18).string(message.ref);
|
|
6585
|
+
}
|
|
6586
|
+
if (message.path !== "") {
|
|
6587
|
+
writer.uint32(26).string(message.path);
|
|
6588
|
+
}
|
|
6589
|
+
if (message.oldPath !== "") {
|
|
6590
|
+
writer.uint32(34).string(message.oldPath);
|
|
6591
|
+
}
|
|
6592
|
+
if (message.state !== 0) {
|
|
6593
|
+
writer.uint32(40).int32(message.state);
|
|
6594
|
+
}
|
|
6595
|
+
if (message.tier !== 0) {
|
|
6596
|
+
writer.uint32(48).int32(message.tier);
|
|
6597
|
+
}
|
|
6598
|
+
if (message.confidence !== 0) {
|
|
6599
|
+
writer.uint32(56).int32(message.confidence);
|
|
6600
|
+
}
|
|
6601
|
+
if (message.firstEditedAt !== undefined) {
|
|
6602
|
+
Timestamp.encode(toTimestamp(message.firstEditedAt), writer.uint32(66).fork()).join();
|
|
6603
|
+
}
|
|
6604
|
+
if (message.lastEditedAt !== undefined) {
|
|
6605
|
+
Timestamp.encode(toTimestamp(message.lastEditedAt), writer.uint32(74).fork()).join();
|
|
6606
|
+
}
|
|
6607
|
+
if (message.lastStagedAt !== undefined) {
|
|
6608
|
+
Timestamp.encode(toTimestamp(message.lastStagedAt), writer.uint32(82).fork()).join();
|
|
6609
|
+
}
|
|
6610
|
+
if (message.lastCommittedAt !== undefined) {
|
|
6611
|
+
Timestamp.encode(toTimestamp(message.lastCommittedAt), writer.uint32(90).fork()).join();
|
|
6612
|
+
}
|
|
6613
|
+
if (message.lastCommitSha !== "") {
|
|
6614
|
+
writer.uint32(98).string(message.lastCommitSha);
|
|
6615
|
+
}
|
|
6616
|
+
if (message.lastPushedAt !== undefined) {
|
|
6617
|
+
Timestamp.encode(toTimestamp(message.lastPushedAt), writer.uint32(106).fork()).join();
|
|
6618
|
+
}
|
|
6619
|
+
if (message.discardedAt !== undefined) {
|
|
6620
|
+
Timestamp.encode(toTimestamp(message.discardedAt), writer.uint32(114).fork()).join();
|
|
6621
|
+
}
|
|
6622
|
+
if (message.discardReason !== "") {
|
|
6623
|
+
writer.uint32(122).string(message.discardReason);
|
|
6624
|
+
}
|
|
6625
|
+
if (message.editCount !== 0) {
|
|
6626
|
+
writer.uint32(128).uint32(message.editCount);
|
|
6627
|
+
}
|
|
6628
|
+
for (const v of message.sessionId) {
|
|
6629
|
+
writer.uint32(138).string(v!);
|
|
6630
|
+
}
|
|
6631
|
+
if (message.unlandedCostUsd !== 0) {
|
|
6632
|
+
writer.uint32(145).double(message.unlandedCostUsd);
|
|
6633
|
+
}
|
|
6634
|
+
if (message.unlandedOutputTokens !== 0) {
|
|
6635
|
+
writer.uint32(152).uint64(message.unlandedOutputTokens);
|
|
6636
|
+
}
|
|
6637
|
+
return writer;
|
|
6638
|
+
},
|
|
6639
|
+
|
|
6640
|
+
decode(input: BinaryReader | Uint8Array, length?: number): AIFileStateRow {
|
|
6641
|
+
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
|
|
6642
|
+
const previousRecursionDepth = (reader as any).__tsProtoDecodeDepth ?? 0;
|
|
6643
|
+
if (previousRecursionDepth >= 100) {
|
|
6644
|
+
throw new globalThis.Error("protobuf decode recursion limit exceeded");
|
|
6645
|
+
}
|
|
6646
|
+
(reader as any).__tsProtoDecodeDepth = previousRecursionDepth + 1;
|
|
6647
|
+
try {
|
|
6648
|
+
const end = length === undefined ? reader.len : reader.pos + length;
|
|
6649
|
+
const message = createBaseAIFileStateRow();
|
|
6650
|
+
while (reader.pos < end) {
|
|
6651
|
+
const tag = reader.uint32();
|
|
6652
|
+
switch (tag >>> 3) {
|
|
6653
|
+
case 1: {
|
|
6654
|
+
if (tag !== 10) {
|
|
6655
|
+
break;
|
|
6656
|
+
}
|
|
6657
|
+
|
|
6658
|
+
message.repositoryKey = reader.string();
|
|
6659
|
+
continue;
|
|
6660
|
+
}
|
|
6661
|
+
case 2: {
|
|
6662
|
+
if (tag !== 18) {
|
|
6663
|
+
break;
|
|
6664
|
+
}
|
|
6665
|
+
|
|
6666
|
+
message.ref = reader.string();
|
|
6667
|
+
continue;
|
|
6668
|
+
}
|
|
6669
|
+
case 3: {
|
|
6670
|
+
if (tag !== 26) {
|
|
6671
|
+
break;
|
|
6672
|
+
}
|
|
6673
|
+
|
|
6674
|
+
message.path = reader.string();
|
|
6675
|
+
continue;
|
|
6676
|
+
}
|
|
6677
|
+
case 4: {
|
|
6678
|
+
if (tag !== 34) {
|
|
6679
|
+
break;
|
|
6680
|
+
}
|
|
6681
|
+
|
|
6682
|
+
message.oldPath = reader.string();
|
|
6683
|
+
continue;
|
|
6684
|
+
}
|
|
6685
|
+
case 5: {
|
|
6686
|
+
if (tag !== 40) {
|
|
6687
|
+
break;
|
|
6688
|
+
}
|
|
6689
|
+
|
|
6690
|
+
message.state = reader.int32() as any;
|
|
6691
|
+
continue;
|
|
6692
|
+
}
|
|
6693
|
+
case 6: {
|
|
6694
|
+
if (tag !== 48) {
|
|
6695
|
+
break;
|
|
6696
|
+
}
|
|
6697
|
+
|
|
6698
|
+
message.tier = reader.int32() as any;
|
|
6699
|
+
continue;
|
|
6700
|
+
}
|
|
6701
|
+
case 7: {
|
|
6702
|
+
if (tag !== 56) {
|
|
6703
|
+
break;
|
|
6704
|
+
}
|
|
6705
|
+
|
|
6706
|
+
message.confidence = reader.int32() as any;
|
|
6707
|
+
continue;
|
|
6708
|
+
}
|
|
6709
|
+
case 8: {
|
|
6710
|
+
if (tag !== 66) {
|
|
6711
|
+
break;
|
|
6712
|
+
}
|
|
6713
|
+
|
|
6714
|
+
message.firstEditedAt = fromTimestamp(Timestamp.decode(reader, reader.uint32()));
|
|
6715
|
+
continue;
|
|
6716
|
+
}
|
|
6717
|
+
case 9: {
|
|
6718
|
+
if (tag !== 74) {
|
|
6719
|
+
break;
|
|
6720
|
+
}
|
|
6721
|
+
|
|
6722
|
+
message.lastEditedAt = fromTimestamp(Timestamp.decode(reader, reader.uint32()));
|
|
6723
|
+
continue;
|
|
6724
|
+
}
|
|
6725
|
+
case 10: {
|
|
6726
|
+
if (tag !== 82) {
|
|
6727
|
+
break;
|
|
6728
|
+
}
|
|
6729
|
+
|
|
6730
|
+
message.lastStagedAt = fromTimestamp(Timestamp.decode(reader, reader.uint32()));
|
|
6731
|
+
continue;
|
|
6732
|
+
}
|
|
6733
|
+
case 11: {
|
|
6734
|
+
if (tag !== 90) {
|
|
6735
|
+
break;
|
|
6736
|
+
}
|
|
6737
|
+
|
|
6738
|
+
message.lastCommittedAt = fromTimestamp(Timestamp.decode(reader, reader.uint32()));
|
|
6739
|
+
continue;
|
|
6740
|
+
}
|
|
6741
|
+
case 12: {
|
|
6742
|
+
if (tag !== 98) {
|
|
6743
|
+
break;
|
|
6744
|
+
}
|
|
6745
|
+
|
|
6746
|
+
message.lastCommitSha = reader.string();
|
|
6747
|
+
continue;
|
|
6748
|
+
}
|
|
6749
|
+
case 13: {
|
|
6750
|
+
if (tag !== 106) {
|
|
6751
|
+
break;
|
|
6752
|
+
}
|
|
6753
|
+
|
|
6754
|
+
message.lastPushedAt = fromTimestamp(Timestamp.decode(reader, reader.uint32()));
|
|
6755
|
+
continue;
|
|
6756
|
+
}
|
|
6757
|
+
case 14: {
|
|
6758
|
+
if (tag !== 114) {
|
|
6759
|
+
break;
|
|
6760
|
+
}
|
|
6761
|
+
|
|
6762
|
+
message.discardedAt = fromTimestamp(Timestamp.decode(reader, reader.uint32()));
|
|
6763
|
+
continue;
|
|
6764
|
+
}
|
|
6765
|
+
case 15: {
|
|
6766
|
+
if (tag !== 122) {
|
|
6767
|
+
break;
|
|
6768
|
+
}
|
|
6769
|
+
|
|
6770
|
+
message.discardReason = reader.string();
|
|
6771
|
+
continue;
|
|
6772
|
+
}
|
|
6773
|
+
case 16: {
|
|
6774
|
+
if (tag !== 128) {
|
|
6775
|
+
break;
|
|
6776
|
+
}
|
|
6777
|
+
|
|
6778
|
+
message.editCount = reader.uint32();
|
|
6779
|
+
continue;
|
|
6780
|
+
}
|
|
6781
|
+
case 17: {
|
|
6782
|
+
if (tag !== 138) {
|
|
6783
|
+
break;
|
|
6784
|
+
}
|
|
6785
|
+
|
|
6786
|
+
message.sessionId.push(reader.string());
|
|
6787
|
+
continue;
|
|
6788
|
+
}
|
|
6789
|
+
case 18: {
|
|
6790
|
+
if (tag !== 145) {
|
|
6791
|
+
break;
|
|
6792
|
+
}
|
|
6793
|
+
|
|
6794
|
+
message.unlandedCostUsd = reader.double();
|
|
6795
|
+
continue;
|
|
6796
|
+
}
|
|
6797
|
+
case 19: {
|
|
6798
|
+
if (tag !== 152) {
|
|
6799
|
+
break;
|
|
6800
|
+
}
|
|
6801
|
+
|
|
6802
|
+
message.unlandedOutputTokens = longToNumber(reader.uint64());
|
|
6803
|
+
continue;
|
|
6804
|
+
}
|
|
6805
|
+
}
|
|
6806
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
6807
|
+
break;
|
|
6808
|
+
}
|
|
6809
|
+
reader.skip(tag & 7);
|
|
6810
|
+
}
|
|
6811
|
+
return message;
|
|
6812
|
+
} finally {
|
|
6813
|
+
(reader as any).__tsProtoDecodeDepth = previousRecursionDepth;
|
|
6814
|
+
}
|
|
6815
|
+
},
|
|
6816
|
+
|
|
6817
|
+
fromJSON(object: any): AIFileStateRow {
|
|
6818
|
+
return {
|
|
6819
|
+
repositoryKey: isSet(object.repositoryKey)
|
|
6820
|
+
? globalThis.String(object.repositoryKey)
|
|
6821
|
+
: isSet(object.repository_key)
|
|
6822
|
+
? globalThis.String(object.repository_key)
|
|
6823
|
+
: "",
|
|
6824
|
+
ref: isSet(object.ref) ? globalThis.String(object.ref) : "",
|
|
6825
|
+
path: isSet(object.path) ? globalThis.String(object.path) : "",
|
|
6826
|
+
oldPath: isSet(object.oldPath)
|
|
6827
|
+
? globalThis.String(object.oldPath)
|
|
6828
|
+
: isSet(object.old_path)
|
|
6829
|
+
? globalThis.String(object.old_path)
|
|
6830
|
+
: "",
|
|
6831
|
+
state: isSet(object.state) ? aIFileLifecycleFromJSON(object.state) : 0,
|
|
6832
|
+
tier: isSet(object.tier) ? aIFileTierFromJSON(object.tier) : 0,
|
|
6833
|
+
confidence: isSet(object.confidence) ? aIFileConfidenceFromJSON(object.confidence) : 0,
|
|
6834
|
+
firstEditedAt: isSet(object.firstEditedAt)
|
|
6835
|
+
? fromJsonTimestamp(object.firstEditedAt)
|
|
6836
|
+
: isSet(object.first_edited_at)
|
|
6837
|
+
? fromJsonTimestamp(object.first_edited_at)
|
|
6838
|
+
: undefined,
|
|
6839
|
+
lastEditedAt: isSet(object.lastEditedAt)
|
|
6840
|
+
? fromJsonTimestamp(object.lastEditedAt)
|
|
6841
|
+
: isSet(object.last_edited_at)
|
|
6842
|
+
? fromJsonTimestamp(object.last_edited_at)
|
|
6843
|
+
: undefined,
|
|
6844
|
+
lastStagedAt: isSet(object.lastStagedAt)
|
|
6845
|
+
? fromJsonTimestamp(object.lastStagedAt)
|
|
6846
|
+
: isSet(object.last_staged_at)
|
|
6847
|
+
? fromJsonTimestamp(object.last_staged_at)
|
|
6848
|
+
: undefined,
|
|
6849
|
+
lastCommittedAt: isSet(object.lastCommittedAt)
|
|
6850
|
+
? fromJsonTimestamp(object.lastCommittedAt)
|
|
6851
|
+
: isSet(object.last_committed_at)
|
|
6852
|
+
? fromJsonTimestamp(object.last_committed_at)
|
|
6853
|
+
: undefined,
|
|
6854
|
+
lastCommitSha: isSet(object.lastCommitSha)
|
|
6855
|
+
? globalThis.String(object.lastCommitSha)
|
|
6856
|
+
: isSet(object.last_commit_sha)
|
|
6857
|
+
? globalThis.String(object.last_commit_sha)
|
|
6858
|
+
: "",
|
|
6859
|
+
lastPushedAt: isSet(object.lastPushedAt)
|
|
6860
|
+
? fromJsonTimestamp(object.lastPushedAt)
|
|
6861
|
+
: isSet(object.last_pushed_at)
|
|
6862
|
+
? fromJsonTimestamp(object.last_pushed_at)
|
|
6863
|
+
: undefined,
|
|
6864
|
+
discardedAt: isSet(object.discardedAt)
|
|
6865
|
+
? fromJsonTimestamp(object.discardedAt)
|
|
6866
|
+
: isSet(object.discarded_at)
|
|
6867
|
+
? fromJsonTimestamp(object.discarded_at)
|
|
6868
|
+
: undefined,
|
|
6869
|
+
discardReason: isSet(object.discardReason)
|
|
6870
|
+
? globalThis.String(object.discardReason)
|
|
6871
|
+
: isSet(object.discard_reason)
|
|
6872
|
+
? globalThis.String(object.discard_reason)
|
|
6873
|
+
: "",
|
|
6874
|
+
editCount: isSet(object.editCount)
|
|
6875
|
+
? globalThis.Number(object.editCount)
|
|
6876
|
+
: isSet(object.edit_count)
|
|
6877
|
+
? globalThis.Number(object.edit_count)
|
|
6878
|
+
: 0,
|
|
6879
|
+
sessionId: globalThis.Array.isArray(object?.sessionId)
|
|
6880
|
+
? object.sessionId.map((e: any) => globalThis.String(e))
|
|
6881
|
+
: globalThis.Array.isArray(object?.session_id)
|
|
6882
|
+
? object.session_id.map((e: any) => globalThis.String(e))
|
|
6883
|
+
: [],
|
|
6884
|
+
unlandedCostUsd: isSet(object.unlandedCostUsd)
|
|
6885
|
+
? globalThis.Number(object.unlandedCostUsd)
|
|
6886
|
+
: isSet(object.unlanded_cost_usd)
|
|
6887
|
+
? globalThis.Number(object.unlanded_cost_usd)
|
|
6888
|
+
: 0,
|
|
6889
|
+
unlandedOutputTokens: isSet(object.unlandedOutputTokens)
|
|
6890
|
+
? globalThis.Number(object.unlandedOutputTokens)
|
|
6891
|
+
: isSet(object.unlanded_output_tokens)
|
|
6892
|
+
? globalThis.Number(object.unlanded_output_tokens)
|
|
6893
|
+
: 0,
|
|
6894
|
+
};
|
|
6895
|
+
},
|
|
6896
|
+
|
|
6897
|
+
toJSON(message: AIFileStateRow): unknown {
|
|
6898
|
+
const obj: any = {};
|
|
6899
|
+
if (message.repositoryKey !== "") {
|
|
6900
|
+
obj.repositoryKey = message.repositoryKey;
|
|
6901
|
+
}
|
|
6902
|
+
if (message.ref !== "") {
|
|
6903
|
+
obj.ref = message.ref;
|
|
6904
|
+
}
|
|
6905
|
+
if (message.path !== "") {
|
|
6906
|
+
obj.path = message.path;
|
|
6907
|
+
}
|
|
6908
|
+
if (message.oldPath !== "") {
|
|
6909
|
+
obj.oldPath = message.oldPath;
|
|
6910
|
+
}
|
|
6911
|
+
if (message.state !== 0) {
|
|
6912
|
+
obj.state = aIFileLifecycleToJSON(message.state);
|
|
6913
|
+
}
|
|
6914
|
+
if (message.tier !== 0) {
|
|
6915
|
+
obj.tier = aIFileTierToJSON(message.tier);
|
|
6916
|
+
}
|
|
6917
|
+
if (message.confidence !== 0) {
|
|
6918
|
+
obj.confidence = aIFileConfidenceToJSON(message.confidence);
|
|
6919
|
+
}
|
|
6920
|
+
if (message.firstEditedAt !== undefined) {
|
|
6921
|
+
obj.firstEditedAt = message.firstEditedAt.toISOString();
|
|
6922
|
+
}
|
|
6923
|
+
if (message.lastEditedAt !== undefined) {
|
|
6924
|
+
obj.lastEditedAt = message.lastEditedAt.toISOString();
|
|
6925
|
+
}
|
|
6926
|
+
if (message.lastStagedAt !== undefined) {
|
|
6927
|
+
obj.lastStagedAt = message.lastStagedAt.toISOString();
|
|
6928
|
+
}
|
|
6929
|
+
if (message.lastCommittedAt !== undefined) {
|
|
6930
|
+
obj.lastCommittedAt = message.lastCommittedAt.toISOString();
|
|
6931
|
+
}
|
|
6932
|
+
if (message.lastCommitSha !== "") {
|
|
6933
|
+
obj.lastCommitSha = message.lastCommitSha;
|
|
6934
|
+
}
|
|
6935
|
+
if (message.lastPushedAt !== undefined) {
|
|
6936
|
+
obj.lastPushedAt = message.lastPushedAt.toISOString();
|
|
6937
|
+
}
|
|
6938
|
+
if (message.discardedAt !== undefined) {
|
|
6939
|
+
obj.discardedAt = message.discardedAt.toISOString();
|
|
6940
|
+
}
|
|
6941
|
+
if (message.discardReason !== "") {
|
|
6942
|
+
obj.discardReason = message.discardReason;
|
|
6943
|
+
}
|
|
6944
|
+
if (message.editCount !== 0) {
|
|
6945
|
+
obj.editCount = Math.round(message.editCount);
|
|
6946
|
+
}
|
|
6947
|
+
if (message.sessionId?.length) {
|
|
6948
|
+
obj.sessionId = message.sessionId;
|
|
6949
|
+
}
|
|
6950
|
+
if (message.unlandedCostUsd !== 0) {
|
|
6951
|
+
obj.unlandedCostUsd = message.unlandedCostUsd;
|
|
6952
|
+
}
|
|
6953
|
+
if (message.unlandedOutputTokens !== 0) {
|
|
6954
|
+
obj.unlandedOutputTokens = Math.round(message.unlandedOutputTokens);
|
|
6955
|
+
}
|
|
6956
|
+
return obj;
|
|
6957
|
+
},
|
|
6958
|
+
|
|
6959
|
+
create<I extends Exact<DeepPartial<AIFileStateRow>, I>>(base?: I): AIFileStateRow {
|
|
6960
|
+
return AIFileStateRow.fromPartial(base ?? ({} as any));
|
|
6961
|
+
},
|
|
6962
|
+
fromPartial<I extends Exact<DeepPartial<AIFileStateRow>, I>>(object: I): AIFileStateRow {
|
|
6963
|
+
const message = createBaseAIFileStateRow();
|
|
6964
|
+
message.repositoryKey = object.repositoryKey ?? "";
|
|
6965
|
+
message.ref = object.ref ?? "";
|
|
6966
|
+
message.path = object.path ?? "";
|
|
6967
|
+
message.oldPath = object.oldPath ?? "";
|
|
6968
|
+
message.state = object.state ?? 0;
|
|
6969
|
+
message.tier = object.tier ?? 0;
|
|
6970
|
+
message.confidence = object.confidence ?? 0;
|
|
6971
|
+
message.firstEditedAt = object.firstEditedAt ?? undefined;
|
|
6972
|
+
message.lastEditedAt = object.lastEditedAt ?? undefined;
|
|
6973
|
+
message.lastStagedAt = object.lastStagedAt ?? undefined;
|
|
6974
|
+
message.lastCommittedAt = object.lastCommittedAt ?? undefined;
|
|
6975
|
+
message.lastCommitSha = object.lastCommitSha ?? "";
|
|
6976
|
+
message.lastPushedAt = object.lastPushedAt ?? undefined;
|
|
6977
|
+
message.discardedAt = object.discardedAt ?? undefined;
|
|
6978
|
+
message.discardReason = object.discardReason ?? "";
|
|
6979
|
+
message.editCount = object.editCount ?? 0;
|
|
6980
|
+
message.sessionId = object.sessionId?.map((e) => e) || [];
|
|
6981
|
+
message.unlandedCostUsd = object.unlandedCostUsd ?? 0;
|
|
6982
|
+
message.unlandedOutputTokens = object.unlandedOutputTokens ?? 0;
|
|
6983
|
+
return message;
|
|
6984
|
+
},
|
|
6985
|
+
};
|
|
6986
|
+
|
|
6987
|
+
function createBaseFileStateSummaryRequest(): FileStateSummaryRequest {
|
|
6988
|
+
return { organizationId: "", projectId: "", filter: undefined, abandonedHorizon: undefined, groupBy: 0 };
|
|
6989
|
+
}
|
|
6990
|
+
|
|
6991
|
+
export const FileStateSummaryRequest: MessageFns<FileStateSummaryRequest> = {
|
|
6992
|
+
encode(message: FileStateSummaryRequest, writer: BinaryWriter = new BinaryWriter()): BinaryWriter {
|
|
6993
|
+
if (message.organizationId !== "") {
|
|
6994
|
+
writer.uint32(10).string(message.organizationId);
|
|
6995
|
+
}
|
|
6996
|
+
if (message.projectId !== "") {
|
|
6997
|
+
writer.uint32(18).string(message.projectId);
|
|
6998
|
+
}
|
|
6999
|
+
if (message.filter !== undefined) {
|
|
7000
|
+
AIFileStateFilter.encode(message.filter, writer.uint32(26).fork()).join();
|
|
7001
|
+
}
|
|
7002
|
+
if (message.abandonedHorizon !== undefined) {
|
|
7003
|
+
Duration.encode(message.abandonedHorizon, writer.uint32(34).fork()).join();
|
|
7004
|
+
}
|
|
7005
|
+
if (message.groupBy !== 0) {
|
|
7006
|
+
writer.uint32(40).int32(message.groupBy);
|
|
7007
|
+
}
|
|
7008
|
+
return writer;
|
|
7009
|
+
},
|
|
7010
|
+
|
|
7011
|
+
decode(input: BinaryReader | Uint8Array, length?: number): FileStateSummaryRequest {
|
|
7012
|
+
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
|
|
7013
|
+
const previousRecursionDepth = (reader as any).__tsProtoDecodeDepth ?? 0;
|
|
7014
|
+
if (previousRecursionDepth >= 100) {
|
|
7015
|
+
throw new globalThis.Error("protobuf decode recursion limit exceeded");
|
|
7016
|
+
}
|
|
7017
|
+
(reader as any).__tsProtoDecodeDepth = previousRecursionDepth + 1;
|
|
7018
|
+
try {
|
|
7019
|
+
const end = length === undefined ? reader.len : reader.pos + length;
|
|
7020
|
+
const message = createBaseFileStateSummaryRequest();
|
|
7021
|
+
while (reader.pos < end) {
|
|
7022
|
+
const tag = reader.uint32();
|
|
7023
|
+
switch (tag >>> 3) {
|
|
7024
|
+
case 1: {
|
|
7025
|
+
if (tag !== 10) {
|
|
7026
|
+
break;
|
|
7027
|
+
}
|
|
7028
|
+
|
|
7029
|
+
message.organizationId = reader.string();
|
|
7030
|
+
continue;
|
|
7031
|
+
}
|
|
7032
|
+
case 2: {
|
|
7033
|
+
if (tag !== 18) {
|
|
7034
|
+
break;
|
|
7035
|
+
}
|
|
7036
|
+
|
|
7037
|
+
message.projectId = reader.string();
|
|
7038
|
+
continue;
|
|
7039
|
+
}
|
|
7040
|
+
case 3: {
|
|
7041
|
+
if (tag !== 26) {
|
|
7042
|
+
break;
|
|
7043
|
+
}
|
|
7044
|
+
|
|
7045
|
+
message.filter = AIFileStateFilter.decode(reader, reader.uint32());
|
|
7046
|
+
continue;
|
|
7047
|
+
}
|
|
7048
|
+
case 4: {
|
|
7049
|
+
if (tag !== 34) {
|
|
7050
|
+
break;
|
|
7051
|
+
}
|
|
7052
|
+
|
|
7053
|
+
message.abandonedHorizon = Duration.decode(reader, reader.uint32());
|
|
7054
|
+
continue;
|
|
7055
|
+
}
|
|
7056
|
+
case 5: {
|
|
7057
|
+
if (tag !== 40) {
|
|
7058
|
+
break;
|
|
7059
|
+
}
|
|
7060
|
+
|
|
7061
|
+
message.groupBy = reader.int32() as any;
|
|
7062
|
+
continue;
|
|
7063
|
+
}
|
|
7064
|
+
}
|
|
7065
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
7066
|
+
break;
|
|
7067
|
+
}
|
|
7068
|
+
reader.skip(tag & 7);
|
|
7069
|
+
}
|
|
7070
|
+
return message;
|
|
7071
|
+
} finally {
|
|
7072
|
+
(reader as any).__tsProtoDecodeDepth = previousRecursionDepth;
|
|
7073
|
+
}
|
|
7074
|
+
},
|
|
7075
|
+
|
|
7076
|
+
fromJSON(object: any): FileStateSummaryRequest {
|
|
7077
|
+
return {
|
|
7078
|
+
organizationId: isSet(object.organizationId)
|
|
7079
|
+
? globalThis.String(object.organizationId)
|
|
7080
|
+
: isSet(object.organization_id)
|
|
7081
|
+
? globalThis.String(object.organization_id)
|
|
7082
|
+
: "",
|
|
7083
|
+
projectId: isSet(object.projectId)
|
|
7084
|
+
? globalThis.String(object.projectId)
|
|
7085
|
+
: isSet(object.project_id)
|
|
7086
|
+
? globalThis.String(object.project_id)
|
|
7087
|
+
: "",
|
|
7088
|
+
filter: isSet(object.filter) ? AIFileStateFilter.fromJSON(object.filter) : undefined,
|
|
7089
|
+
abandonedHorizon: isSet(object.abandonedHorizon)
|
|
7090
|
+
? Duration.fromJSON(object.abandonedHorizon)
|
|
7091
|
+
: isSet(object.abandoned_horizon)
|
|
7092
|
+
? Duration.fromJSON(object.abandoned_horizon)
|
|
7093
|
+
: undefined,
|
|
7094
|
+
groupBy: isSet(object.groupBy)
|
|
7095
|
+
? aIFileStateGroupByFromJSON(object.groupBy)
|
|
7096
|
+
: isSet(object.group_by)
|
|
7097
|
+
? aIFileStateGroupByFromJSON(object.group_by)
|
|
7098
|
+
: 0,
|
|
7099
|
+
};
|
|
7100
|
+
},
|
|
7101
|
+
|
|
7102
|
+
toJSON(message: FileStateSummaryRequest): unknown {
|
|
7103
|
+
const obj: any = {};
|
|
7104
|
+
if (message.organizationId !== "") {
|
|
7105
|
+
obj.organizationId = message.organizationId;
|
|
7106
|
+
}
|
|
7107
|
+
if (message.projectId !== "") {
|
|
7108
|
+
obj.projectId = message.projectId;
|
|
7109
|
+
}
|
|
7110
|
+
if (message.filter !== undefined) {
|
|
7111
|
+
obj.filter = AIFileStateFilter.toJSON(message.filter);
|
|
7112
|
+
}
|
|
7113
|
+
if (message.abandonedHorizon !== undefined) {
|
|
7114
|
+
obj.abandonedHorizon = Duration.toJSON(message.abandonedHorizon);
|
|
7115
|
+
}
|
|
7116
|
+
if (message.groupBy !== 0) {
|
|
7117
|
+
obj.groupBy = aIFileStateGroupByToJSON(message.groupBy);
|
|
7118
|
+
}
|
|
7119
|
+
return obj;
|
|
7120
|
+
},
|
|
7121
|
+
|
|
7122
|
+
create<I extends Exact<DeepPartial<FileStateSummaryRequest>, I>>(base?: I): FileStateSummaryRequest {
|
|
7123
|
+
return FileStateSummaryRequest.fromPartial(base ?? ({} as any));
|
|
7124
|
+
},
|
|
7125
|
+
fromPartial<I extends Exact<DeepPartial<FileStateSummaryRequest>, I>>(object: I): FileStateSummaryRequest {
|
|
7126
|
+
const message = createBaseFileStateSummaryRequest();
|
|
7127
|
+
message.organizationId = object.organizationId ?? "";
|
|
7128
|
+
message.projectId = object.projectId ?? "";
|
|
7129
|
+
message.filter = (object.filter !== undefined && object.filter !== null)
|
|
7130
|
+
? AIFileStateFilter.fromPartial(object.filter)
|
|
7131
|
+
: undefined;
|
|
7132
|
+
message.abandonedHorizon = (object.abandonedHorizon !== undefined && object.abandonedHorizon !== null)
|
|
7133
|
+
? Duration.fromPartial(object.abandonedHorizon)
|
|
7134
|
+
: undefined;
|
|
7135
|
+
message.groupBy = object.groupBy ?? 0;
|
|
7136
|
+
return message;
|
|
7137
|
+
},
|
|
7138
|
+
};
|
|
7139
|
+
|
|
7140
|
+
function createBaseGetFileStateSummaryResponse(): GetFileStateSummaryResponse {
|
|
7141
|
+
return { status: undefined, summary: undefined };
|
|
7142
|
+
}
|
|
7143
|
+
|
|
7144
|
+
export const GetFileStateSummaryResponse: MessageFns<GetFileStateSummaryResponse> = {
|
|
7145
|
+
encode(message: GetFileStateSummaryResponse, writer: BinaryWriter = new BinaryWriter()): BinaryWriter {
|
|
7146
|
+
if (message.status !== undefined) {
|
|
7147
|
+
ResponseStatus.encode(message.status, writer.uint32(10).fork()).join();
|
|
7148
|
+
}
|
|
7149
|
+
if (message.summary !== undefined) {
|
|
7150
|
+
FileStateSummary.encode(message.summary, writer.uint32(18).fork()).join();
|
|
7151
|
+
}
|
|
7152
|
+
return writer;
|
|
7153
|
+
},
|
|
7154
|
+
|
|
7155
|
+
decode(input: BinaryReader | Uint8Array, length?: number): GetFileStateSummaryResponse {
|
|
7156
|
+
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
|
|
7157
|
+
const previousRecursionDepth = (reader as any).__tsProtoDecodeDepth ?? 0;
|
|
7158
|
+
if (previousRecursionDepth >= 100) {
|
|
7159
|
+
throw new globalThis.Error("protobuf decode recursion limit exceeded");
|
|
7160
|
+
}
|
|
7161
|
+
(reader as any).__tsProtoDecodeDepth = previousRecursionDepth + 1;
|
|
7162
|
+
try {
|
|
7163
|
+
const end = length === undefined ? reader.len : reader.pos + length;
|
|
7164
|
+
const message = createBaseGetFileStateSummaryResponse();
|
|
7165
|
+
while (reader.pos < end) {
|
|
7166
|
+
const tag = reader.uint32();
|
|
7167
|
+
switch (tag >>> 3) {
|
|
7168
|
+
case 1: {
|
|
7169
|
+
if (tag !== 10) {
|
|
7170
|
+
break;
|
|
7171
|
+
}
|
|
7172
|
+
|
|
7173
|
+
message.status = ResponseStatus.decode(reader, reader.uint32());
|
|
7174
|
+
continue;
|
|
7175
|
+
}
|
|
7176
|
+
case 2: {
|
|
7177
|
+
if (tag !== 18) {
|
|
7178
|
+
break;
|
|
7179
|
+
}
|
|
7180
|
+
|
|
7181
|
+
message.summary = FileStateSummary.decode(reader, reader.uint32());
|
|
7182
|
+
continue;
|
|
7183
|
+
}
|
|
7184
|
+
}
|
|
7185
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
7186
|
+
break;
|
|
7187
|
+
}
|
|
7188
|
+
reader.skip(tag & 7);
|
|
7189
|
+
}
|
|
7190
|
+
return message;
|
|
7191
|
+
} finally {
|
|
7192
|
+
(reader as any).__tsProtoDecodeDepth = previousRecursionDepth;
|
|
7193
|
+
}
|
|
7194
|
+
},
|
|
7195
|
+
|
|
7196
|
+
fromJSON(object: any): GetFileStateSummaryResponse {
|
|
7197
|
+
return {
|
|
7198
|
+
status: isSet(object.status) ? ResponseStatus.fromJSON(object.status) : undefined,
|
|
7199
|
+
summary: isSet(object.summary) ? FileStateSummary.fromJSON(object.summary) : undefined,
|
|
7200
|
+
};
|
|
7201
|
+
},
|
|
7202
|
+
|
|
7203
|
+
toJSON(message: GetFileStateSummaryResponse): unknown {
|
|
7204
|
+
const obj: any = {};
|
|
7205
|
+
if (message.status !== undefined) {
|
|
7206
|
+
obj.status = ResponseStatus.toJSON(message.status);
|
|
7207
|
+
}
|
|
7208
|
+
if (message.summary !== undefined) {
|
|
7209
|
+
obj.summary = FileStateSummary.toJSON(message.summary);
|
|
7210
|
+
}
|
|
7211
|
+
return obj;
|
|
7212
|
+
},
|
|
7213
|
+
|
|
7214
|
+
create<I extends Exact<DeepPartial<GetFileStateSummaryResponse>, I>>(base?: I): GetFileStateSummaryResponse {
|
|
7215
|
+
return GetFileStateSummaryResponse.fromPartial(base ?? ({} as any));
|
|
7216
|
+
},
|
|
7217
|
+
fromPartial<I extends Exact<DeepPartial<GetFileStateSummaryResponse>, I>>(object: I): GetFileStateSummaryResponse {
|
|
7218
|
+
const message = createBaseGetFileStateSummaryResponse();
|
|
7219
|
+
message.status = (object.status !== undefined && object.status !== null)
|
|
7220
|
+
? ResponseStatus.fromPartial(object.status)
|
|
7221
|
+
: undefined;
|
|
7222
|
+
message.summary = (object.summary !== undefined && object.summary !== null)
|
|
7223
|
+
? FileStateSummary.fromPartial(object.summary)
|
|
7224
|
+
: undefined;
|
|
7225
|
+
return message;
|
|
7226
|
+
},
|
|
7227
|
+
};
|
|
7228
|
+
|
|
7229
|
+
function createBaseFileStateSummary(): FileStateSummary {
|
|
7230
|
+
return { totals: undefined, groups: [], asOf: undefined, groupBy: 0 };
|
|
7231
|
+
}
|
|
7232
|
+
|
|
7233
|
+
export const FileStateSummary: MessageFns<FileStateSummary> = {
|
|
7234
|
+
encode(message: FileStateSummary, writer: BinaryWriter = new BinaryWriter()): BinaryWriter {
|
|
7235
|
+
if (message.totals !== undefined) {
|
|
7236
|
+
FileStateTiers.encode(message.totals, writer.uint32(10).fork()).join();
|
|
7237
|
+
}
|
|
7238
|
+
for (const v of message.groups) {
|
|
7239
|
+
FileStateGroup.encode(v!, writer.uint32(18).fork()).join();
|
|
7240
|
+
}
|
|
7241
|
+
if (message.asOf !== undefined) {
|
|
7242
|
+
Timestamp.encode(toTimestamp(message.asOf), writer.uint32(26).fork()).join();
|
|
7243
|
+
}
|
|
7244
|
+
if (message.groupBy !== 0) {
|
|
7245
|
+
writer.uint32(32).int32(message.groupBy);
|
|
7246
|
+
}
|
|
7247
|
+
return writer;
|
|
7248
|
+
},
|
|
7249
|
+
|
|
7250
|
+
decode(input: BinaryReader | Uint8Array, length?: number): FileStateSummary {
|
|
7251
|
+
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
|
|
7252
|
+
const previousRecursionDepth = (reader as any).__tsProtoDecodeDepth ?? 0;
|
|
7253
|
+
if (previousRecursionDepth >= 100) {
|
|
7254
|
+
throw new globalThis.Error("protobuf decode recursion limit exceeded");
|
|
7255
|
+
}
|
|
7256
|
+
(reader as any).__tsProtoDecodeDepth = previousRecursionDepth + 1;
|
|
7257
|
+
try {
|
|
7258
|
+
const end = length === undefined ? reader.len : reader.pos + length;
|
|
7259
|
+
const message = createBaseFileStateSummary();
|
|
7260
|
+
while (reader.pos < end) {
|
|
7261
|
+
const tag = reader.uint32();
|
|
7262
|
+
switch (tag >>> 3) {
|
|
7263
|
+
case 1: {
|
|
7264
|
+
if (tag !== 10) {
|
|
7265
|
+
break;
|
|
7266
|
+
}
|
|
7267
|
+
|
|
7268
|
+
message.totals = FileStateTiers.decode(reader, reader.uint32());
|
|
7269
|
+
continue;
|
|
7270
|
+
}
|
|
7271
|
+
case 2: {
|
|
7272
|
+
if (tag !== 18) {
|
|
7273
|
+
break;
|
|
7274
|
+
}
|
|
7275
|
+
|
|
7276
|
+
message.groups.push(FileStateGroup.decode(reader, reader.uint32()));
|
|
7277
|
+
continue;
|
|
7278
|
+
}
|
|
7279
|
+
case 3: {
|
|
7280
|
+
if (tag !== 26) {
|
|
7281
|
+
break;
|
|
7282
|
+
}
|
|
7283
|
+
|
|
7284
|
+
message.asOf = fromTimestamp(Timestamp.decode(reader, reader.uint32()));
|
|
7285
|
+
continue;
|
|
7286
|
+
}
|
|
7287
|
+
case 4: {
|
|
7288
|
+
if (tag !== 32) {
|
|
7289
|
+
break;
|
|
7290
|
+
}
|
|
7291
|
+
|
|
7292
|
+
message.groupBy = reader.int32() as any;
|
|
7293
|
+
continue;
|
|
7294
|
+
}
|
|
7295
|
+
}
|
|
7296
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
7297
|
+
break;
|
|
7298
|
+
}
|
|
7299
|
+
reader.skip(tag & 7);
|
|
7300
|
+
}
|
|
7301
|
+
return message;
|
|
7302
|
+
} finally {
|
|
7303
|
+
(reader as any).__tsProtoDecodeDepth = previousRecursionDepth;
|
|
7304
|
+
}
|
|
7305
|
+
},
|
|
7306
|
+
|
|
7307
|
+
fromJSON(object: any): FileStateSummary {
|
|
7308
|
+
return {
|
|
7309
|
+
totals: isSet(object.totals) ? FileStateTiers.fromJSON(object.totals) : undefined,
|
|
7310
|
+
groups: globalThis.Array.isArray(object?.groups) ? object.groups.map((e: any) => FileStateGroup.fromJSON(e)) : [],
|
|
7311
|
+
asOf: isSet(object.asOf)
|
|
7312
|
+
? fromJsonTimestamp(object.asOf)
|
|
7313
|
+
: isSet(object.as_of)
|
|
7314
|
+
? fromJsonTimestamp(object.as_of)
|
|
7315
|
+
: undefined,
|
|
7316
|
+
groupBy: isSet(object.groupBy)
|
|
7317
|
+
? aIFileStateGroupByFromJSON(object.groupBy)
|
|
7318
|
+
: isSet(object.group_by)
|
|
7319
|
+
? aIFileStateGroupByFromJSON(object.group_by)
|
|
7320
|
+
: 0,
|
|
7321
|
+
};
|
|
7322
|
+
},
|
|
7323
|
+
|
|
7324
|
+
toJSON(message: FileStateSummary): unknown {
|
|
7325
|
+
const obj: any = {};
|
|
7326
|
+
if (message.totals !== undefined) {
|
|
7327
|
+
obj.totals = FileStateTiers.toJSON(message.totals);
|
|
7328
|
+
}
|
|
7329
|
+
if (message.groups?.length) {
|
|
7330
|
+
obj.groups = message.groups.map((e) => FileStateGroup.toJSON(e));
|
|
7331
|
+
}
|
|
7332
|
+
if (message.asOf !== undefined) {
|
|
7333
|
+
obj.asOf = message.asOf.toISOString();
|
|
7334
|
+
}
|
|
7335
|
+
if (message.groupBy !== 0) {
|
|
7336
|
+
obj.groupBy = aIFileStateGroupByToJSON(message.groupBy);
|
|
7337
|
+
}
|
|
7338
|
+
return obj;
|
|
7339
|
+
},
|
|
7340
|
+
|
|
7341
|
+
create<I extends Exact<DeepPartial<FileStateSummary>, I>>(base?: I): FileStateSummary {
|
|
7342
|
+
return FileStateSummary.fromPartial(base ?? ({} as any));
|
|
7343
|
+
},
|
|
7344
|
+
fromPartial<I extends Exact<DeepPartial<FileStateSummary>, I>>(object: I): FileStateSummary {
|
|
7345
|
+
const message = createBaseFileStateSummary();
|
|
7346
|
+
message.totals = (object.totals !== undefined && object.totals !== null)
|
|
7347
|
+
? FileStateTiers.fromPartial(object.totals)
|
|
7348
|
+
: undefined;
|
|
7349
|
+
message.groups = object.groups?.map((e) => FileStateGroup.fromPartial(e)) || [];
|
|
7350
|
+
message.asOf = object.asOf ?? undefined;
|
|
7351
|
+
message.groupBy = object.groupBy ?? 0;
|
|
7352
|
+
return message;
|
|
7353
|
+
},
|
|
7354
|
+
};
|
|
7355
|
+
|
|
7356
|
+
function createBaseFileStateTiers(): FileStateTiers {
|
|
7357
|
+
return { active: undefined, open: undefined, stale: undefined, abandonedHorizon: undefined, discarded: undefined };
|
|
7358
|
+
}
|
|
7359
|
+
|
|
7360
|
+
export const FileStateTiers: MessageFns<FileStateTiers> = {
|
|
7361
|
+
encode(message: FileStateTiers, writer: BinaryWriter = new BinaryWriter()): BinaryWriter {
|
|
7362
|
+
if (message.active !== undefined) {
|
|
7363
|
+
FileStateTierBucket.encode(message.active, writer.uint32(10).fork()).join();
|
|
7364
|
+
}
|
|
7365
|
+
if (message.open !== undefined) {
|
|
7366
|
+
FileStateTierBucket.encode(message.open, writer.uint32(18).fork()).join();
|
|
7367
|
+
}
|
|
7368
|
+
if (message.stale !== undefined) {
|
|
7369
|
+
FileStateTierBucket.encode(message.stale, writer.uint32(26).fork()).join();
|
|
7370
|
+
}
|
|
7371
|
+
if (message.abandonedHorizon !== undefined) {
|
|
7372
|
+
FileStateTierBucket.encode(message.abandonedHorizon, writer.uint32(34).fork()).join();
|
|
7373
|
+
}
|
|
7374
|
+
if (message.discarded !== undefined) {
|
|
7375
|
+
FileStateTierBucket.encode(message.discarded, writer.uint32(42).fork()).join();
|
|
7376
|
+
}
|
|
7377
|
+
return writer;
|
|
7378
|
+
},
|
|
7379
|
+
|
|
7380
|
+
decode(input: BinaryReader | Uint8Array, length?: number): FileStateTiers {
|
|
7381
|
+
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
|
|
7382
|
+
const previousRecursionDepth = (reader as any).__tsProtoDecodeDepth ?? 0;
|
|
7383
|
+
if (previousRecursionDepth >= 100) {
|
|
7384
|
+
throw new globalThis.Error("protobuf decode recursion limit exceeded");
|
|
7385
|
+
}
|
|
7386
|
+
(reader as any).__tsProtoDecodeDepth = previousRecursionDepth + 1;
|
|
7387
|
+
try {
|
|
7388
|
+
const end = length === undefined ? reader.len : reader.pos + length;
|
|
7389
|
+
const message = createBaseFileStateTiers();
|
|
7390
|
+
while (reader.pos < end) {
|
|
7391
|
+
const tag = reader.uint32();
|
|
7392
|
+
switch (tag >>> 3) {
|
|
7393
|
+
case 1: {
|
|
7394
|
+
if (tag !== 10) {
|
|
7395
|
+
break;
|
|
7396
|
+
}
|
|
7397
|
+
|
|
7398
|
+
message.active = FileStateTierBucket.decode(reader, reader.uint32());
|
|
7399
|
+
continue;
|
|
7400
|
+
}
|
|
7401
|
+
case 2: {
|
|
7402
|
+
if (tag !== 18) {
|
|
7403
|
+
break;
|
|
7404
|
+
}
|
|
7405
|
+
|
|
7406
|
+
message.open = FileStateTierBucket.decode(reader, reader.uint32());
|
|
7407
|
+
continue;
|
|
7408
|
+
}
|
|
7409
|
+
case 3: {
|
|
7410
|
+
if (tag !== 26) {
|
|
7411
|
+
break;
|
|
7412
|
+
}
|
|
7413
|
+
|
|
7414
|
+
message.stale = FileStateTierBucket.decode(reader, reader.uint32());
|
|
7415
|
+
continue;
|
|
7416
|
+
}
|
|
7417
|
+
case 4: {
|
|
7418
|
+
if (tag !== 34) {
|
|
7419
|
+
break;
|
|
7420
|
+
}
|
|
7421
|
+
|
|
7422
|
+
message.abandonedHorizon = FileStateTierBucket.decode(reader, reader.uint32());
|
|
7423
|
+
continue;
|
|
7424
|
+
}
|
|
7425
|
+
case 5: {
|
|
7426
|
+
if (tag !== 42) {
|
|
7427
|
+
break;
|
|
7428
|
+
}
|
|
7429
|
+
|
|
7430
|
+
message.discarded = FileStateTierBucket.decode(reader, reader.uint32());
|
|
7431
|
+
continue;
|
|
7432
|
+
}
|
|
7433
|
+
}
|
|
7434
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
7435
|
+
break;
|
|
7436
|
+
}
|
|
7437
|
+
reader.skip(tag & 7);
|
|
7438
|
+
}
|
|
7439
|
+
return message;
|
|
7440
|
+
} finally {
|
|
7441
|
+
(reader as any).__tsProtoDecodeDepth = previousRecursionDepth;
|
|
7442
|
+
}
|
|
7443
|
+
},
|
|
7444
|
+
|
|
7445
|
+
fromJSON(object: any): FileStateTiers {
|
|
7446
|
+
return {
|
|
7447
|
+
active: isSet(object.active) ? FileStateTierBucket.fromJSON(object.active) : undefined,
|
|
7448
|
+
open: isSet(object.open) ? FileStateTierBucket.fromJSON(object.open) : undefined,
|
|
7449
|
+
stale: isSet(object.stale) ? FileStateTierBucket.fromJSON(object.stale) : undefined,
|
|
7450
|
+
abandonedHorizon: isSet(object.abandonedHorizon)
|
|
7451
|
+
? FileStateTierBucket.fromJSON(object.abandonedHorizon)
|
|
7452
|
+
: isSet(object.abandoned_horizon)
|
|
7453
|
+
? FileStateTierBucket.fromJSON(object.abandoned_horizon)
|
|
7454
|
+
: undefined,
|
|
7455
|
+
discarded: isSet(object.discarded) ? FileStateTierBucket.fromJSON(object.discarded) : undefined,
|
|
7456
|
+
};
|
|
7457
|
+
},
|
|
7458
|
+
|
|
7459
|
+
toJSON(message: FileStateTiers): unknown {
|
|
7460
|
+
const obj: any = {};
|
|
7461
|
+
if (message.active !== undefined) {
|
|
7462
|
+
obj.active = FileStateTierBucket.toJSON(message.active);
|
|
7463
|
+
}
|
|
7464
|
+
if (message.open !== undefined) {
|
|
7465
|
+
obj.open = FileStateTierBucket.toJSON(message.open);
|
|
7466
|
+
}
|
|
7467
|
+
if (message.stale !== undefined) {
|
|
7468
|
+
obj.stale = FileStateTierBucket.toJSON(message.stale);
|
|
7469
|
+
}
|
|
7470
|
+
if (message.abandonedHorizon !== undefined) {
|
|
7471
|
+
obj.abandonedHorizon = FileStateTierBucket.toJSON(message.abandonedHorizon);
|
|
7472
|
+
}
|
|
7473
|
+
if (message.discarded !== undefined) {
|
|
7474
|
+
obj.discarded = FileStateTierBucket.toJSON(message.discarded);
|
|
7475
|
+
}
|
|
7476
|
+
return obj;
|
|
7477
|
+
},
|
|
7478
|
+
|
|
7479
|
+
create<I extends Exact<DeepPartial<FileStateTiers>, I>>(base?: I): FileStateTiers {
|
|
7480
|
+
return FileStateTiers.fromPartial(base ?? ({} as any));
|
|
7481
|
+
},
|
|
7482
|
+
fromPartial<I extends Exact<DeepPartial<FileStateTiers>, I>>(object: I): FileStateTiers {
|
|
7483
|
+
const message = createBaseFileStateTiers();
|
|
7484
|
+
message.active = (object.active !== undefined && object.active !== null)
|
|
7485
|
+
? FileStateTierBucket.fromPartial(object.active)
|
|
7486
|
+
: undefined;
|
|
7487
|
+
message.open = (object.open !== undefined && object.open !== null)
|
|
7488
|
+
? FileStateTierBucket.fromPartial(object.open)
|
|
7489
|
+
: undefined;
|
|
7490
|
+
message.stale = (object.stale !== undefined && object.stale !== null)
|
|
7491
|
+
? FileStateTierBucket.fromPartial(object.stale)
|
|
7492
|
+
: undefined;
|
|
7493
|
+
message.abandonedHorizon = (object.abandonedHorizon !== undefined && object.abandonedHorizon !== null)
|
|
7494
|
+
? FileStateTierBucket.fromPartial(object.abandonedHorizon)
|
|
7495
|
+
: undefined;
|
|
7496
|
+
message.discarded = (object.discarded !== undefined && object.discarded !== null)
|
|
7497
|
+
? FileStateTierBucket.fromPartial(object.discarded)
|
|
7498
|
+
: undefined;
|
|
7499
|
+
return message;
|
|
7500
|
+
},
|
|
7501
|
+
};
|
|
7502
|
+
|
|
7503
|
+
function createBaseFileStateTierBucket(): FileStateTierBucket {
|
|
7504
|
+
return {
|
|
7505
|
+
files: 0,
|
|
7506
|
+
branches: 0,
|
|
7507
|
+
sessions: 0,
|
|
7508
|
+
costUsd: 0,
|
|
7509
|
+
costUsdUnverified: 0,
|
|
7510
|
+
outputTokens: 0,
|
|
7511
|
+
oldestAge: undefined,
|
|
7512
|
+
filesUnverified: 0,
|
|
7513
|
+
};
|
|
7514
|
+
}
|
|
7515
|
+
|
|
7516
|
+
export const FileStateTierBucket: MessageFns<FileStateTierBucket> = {
|
|
7517
|
+
encode(message: FileStateTierBucket, writer: BinaryWriter = new BinaryWriter()): BinaryWriter {
|
|
7518
|
+
if (message.files !== 0) {
|
|
7519
|
+
writer.uint32(8).uint64(message.files);
|
|
7520
|
+
}
|
|
7521
|
+
if (message.branches !== 0) {
|
|
7522
|
+
writer.uint32(16).uint64(message.branches);
|
|
7523
|
+
}
|
|
7524
|
+
if (message.sessions !== 0) {
|
|
7525
|
+
writer.uint32(24).uint64(message.sessions);
|
|
7526
|
+
}
|
|
7527
|
+
if (message.costUsd !== 0) {
|
|
7528
|
+
writer.uint32(33).double(message.costUsd);
|
|
7529
|
+
}
|
|
7530
|
+
if (message.costUsdUnverified !== 0) {
|
|
7531
|
+
writer.uint32(41).double(message.costUsdUnverified);
|
|
7532
|
+
}
|
|
7533
|
+
if (message.outputTokens !== 0) {
|
|
7534
|
+
writer.uint32(48).uint64(message.outputTokens);
|
|
7535
|
+
}
|
|
7536
|
+
if (message.oldestAge !== undefined) {
|
|
7537
|
+
Duration.encode(message.oldestAge, writer.uint32(58).fork()).join();
|
|
7538
|
+
}
|
|
7539
|
+
if (message.filesUnverified !== 0) {
|
|
7540
|
+
writer.uint32(64).uint64(message.filesUnverified);
|
|
7541
|
+
}
|
|
7542
|
+
return writer;
|
|
7543
|
+
},
|
|
7544
|
+
|
|
7545
|
+
decode(input: BinaryReader | Uint8Array, length?: number): FileStateTierBucket {
|
|
7546
|
+
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
|
|
7547
|
+
const previousRecursionDepth = (reader as any).__tsProtoDecodeDepth ?? 0;
|
|
7548
|
+
if (previousRecursionDepth >= 100) {
|
|
7549
|
+
throw new globalThis.Error("protobuf decode recursion limit exceeded");
|
|
7550
|
+
}
|
|
7551
|
+
(reader as any).__tsProtoDecodeDepth = previousRecursionDepth + 1;
|
|
7552
|
+
try {
|
|
7553
|
+
const end = length === undefined ? reader.len : reader.pos + length;
|
|
7554
|
+
const message = createBaseFileStateTierBucket();
|
|
7555
|
+
while (reader.pos < end) {
|
|
7556
|
+
const tag = reader.uint32();
|
|
7557
|
+
switch (tag >>> 3) {
|
|
7558
|
+
case 1: {
|
|
7559
|
+
if (tag !== 8) {
|
|
7560
|
+
break;
|
|
7561
|
+
}
|
|
7562
|
+
|
|
7563
|
+
message.files = longToNumber(reader.uint64());
|
|
7564
|
+
continue;
|
|
7565
|
+
}
|
|
7566
|
+
case 2: {
|
|
7567
|
+
if (tag !== 16) {
|
|
7568
|
+
break;
|
|
7569
|
+
}
|
|
7570
|
+
|
|
7571
|
+
message.branches = longToNumber(reader.uint64());
|
|
7572
|
+
continue;
|
|
7573
|
+
}
|
|
7574
|
+
case 3: {
|
|
7575
|
+
if (tag !== 24) {
|
|
7576
|
+
break;
|
|
7577
|
+
}
|
|
7578
|
+
|
|
7579
|
+
message.sessions = longToNumber(reader.uint64());
|
|
7580
|
+
continue;
|
|
7581
|
+
}
|
|
7582
|
+
case 4: {
|
|
7583
|
+
if (tag !== 33) {
|
|
7584
|
+
break;
|
|
7585
|
+
}
|
|
7586
|
+
|
|
7587
|
+
message.costUsd = reader.double();
|
|
7588
|
+
continue;
|
|
7589
|
+
}
|
|
7590
|
+
case 5: {
|
|
7591
|
+
if (tag !== 41) {
|
|
7592
|
+
break;
|
|
7593
|
+
}
|
|
7594
|
+
|
|
7595
|
+
message.costUsdUnverified = reader.double();
|
|
7596
|
+
continue;
|
|
7597
|
+
}
|
|
7598
|
+
case 6: {
|
|
7599
|
+
if (tag !== 48) {
|
|
7600
|
+
break;
|
|
7601
|
+
}
|
|
7602
|
+
|
|
7603
|
+
message.outputTokens = longToNumber(reader.uint64());
|
|
7604
|
+
continue;
|
|
7605
|
+
}
|
|
7606
|
+
case 7: {
|
|
7607
|
+
if (tag !== 58) {
|
|
7608
|
+
break;
|
|
7609
|
+
}
|
|
7610
|
+
|
|
7611
|
+
message.oldestAge = Duration.decode(reader, reader.uint32());
|
|
7612
|
+
continue;
|
|
7613
|
+
}
|
|
7614
|
+
case 8: {
|
|
7615
|
+
if (tag !== 64) {
|
|
7616
|
+
break;
|
|
7617
|
+
}
|
|
7618
|
+
|
|
7619
|
+
message.filesUnverified = longToNumber(reader.uint64());
|
|
7620
|
+
continue;
|
|
7621
|
+
}
|
|
7622
|
+
}
|
|
7623
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
7624
|
+
break;
|
|
7625
|
+
}
|
|
7626
|
+
reader.skip(tag & 7);
|
|
7627
|
+
}
|
|
7628
|
+
return message;
|
|
7629
|
+
} finally {
|
|
7630
|
+
(reader as any).__tsProtoDecodeDepth = previousRecursionDepth;
|
|
7631
|
+
}
|
|
7632
|
+
},
|
|
7633
|
+
|
|
7634
|
+
fromJSON(object: any): FileStateTierBucket {
|
|
7635
|
+
return {
|
|
7636
|
+
files: isSet(object.files) ? globalThis.Number(object.files) : 0,
|
|
7637
|
+
branches: isSet(object.branches) ? globalThis.Number(object.branches) : 0,
|
|
7638
|
+
sessions: isSet(object.sessions) ? globalThis.Number(object.sessions) : 0,
|
|
7639
|
+
costUsd: isSet(object.costUsd)
|
|
7640
|
+
? globalThis.Number(object.costUsd)
|
|
7641
|
+
: isSet(object.cost_usd)
|
|
7642
|
+
? globalThis.Number(object.cost_usd)
|
|
7643
|
+
: 0,
|
|
7644
|
+
costUsdUnverified: isSet(object.costUsdUnverified)
|
|
7645
|
+
? globalThis.Number(object.costUsdUnverified)
|
|
7646
|
+
: isSet(object.cost_usd_unverified)
|
|
7647
|
+
? globalThis.Number(object.cost_usd_unverified)
|
|
7648
|
+
: 0,
|
|
7649
|
+
outputTokens: isSet(object.outputTokens)
|
|
7650
|
+
? globalThis.Number(object.outputTokens)
|
|
7651
|
+
: isSet(object.output_tokens)
|
|
7652
|
+
? globalThis.Number(object.output_tokens)
|
|
7653
|
+
: 0,
|
|
7654
|
+
oldestAge: isSet(object.oldestAge)
|
|
7655
|
+
? Duration.fromJSON(object.oldestAge)
|
|
7656
|
+
: isSet(object.oldest_age)
|
|
7657
|
+
? Duration.fromJSON(object.oldest_age)
|
|
7658
|
+
: undefined,
|
|
7659
|
+
filesUnverified: isSet(object.filesUnverified)
|
|
7660
|
+
? globalThis.Number(object.filesUnverified)
|
|
7661
|
+
: isSet(object.files_unverified)
|
|
7662
|
+
? globalThis.Number(object.files_unverified)
|
|
7663
|
+
: 0,
|
|
7664
|
+
};
|
|
7665
|
+
},
|
|
7666
|
+
|
|
7667
|
+
toJSON(message: FileStateTierBucket): unknown {
|
|
7668
|
+
const obj: any = {};
|
|
7669
|
+
if (message.files !== 0) {
|
|
7670
|
+
obj.files = Math.round(message.files);
|
|
7671
|
+
}
|
|
7672
|
+
if (message.branches !== 0) {
|
|
7673
|
+
obj.branches = Math.round(message.branches);
|
|
7674
|
+
}
|
|
7675
|
+
if (message.sessions !== 0) {
|
|
7676
|
+
obj.sessions = Math.round(message.sessions);
|
|
7677
|
+
}
|
|
7678
|
+
if (message.costUsd !== 0) {
|
|
7679
|
+
obj.costUsd = message.costUsd;
|
|
7680
|
+
}
|
|
7681
|
+
if (message.costUsdUnverified !== 0) {
|
|
7682
|
+
obj.costUsdUnverified = message.costUsdUnverified;
|
|
7683
|
+
}
|
|
7684
|
+
if (message.outputTokens !== 0) {
|
|
7685
|
+
obj.outputTokens = Math.round(message.outputTokens);
|
|
7686
|
+
}
|
|
7687
|
+
if (message.oldestAge !== undefined) {
|
|
7688
|
+
obj.oldestAge = Duration.toJSON(message.oldestAge);
|
|
7689
|
+
}
|
|
7690
|
+
if (message.filesUnverified !== 0) {
|
|
7691
|
+
obj.filesUnverified = Math.round(message.filesUnverified);
|
|
7692
|
+
}
|
|
7693
|
+
return obj;
|
|
7694
|
+
},
|
|
7695
|
+
|
|
7696
|
+
create<I extends Exact<DeepPartial<FileStateTierBucket>, I>>(base?: I): FileStateTierBucket {
|
|
7697
|
+
return FileStateTierBucket.fromPartial(base ?? ({} as any));
|
|
7698
|
+
},
|
|
7699
|
+
fromPartial<I extends Exact<DeepPartial<FileStateTierBucket>, I>>(object: I): FileStateTierBucket {
|
|
7700
|
+
const message = createBaseFileStateTierBucket();
|
|
7701
|
+
message.files = object.files ?? 0;
|
|
7702
|
+
message.branches = object.branches ?? 0;
|
|
7703
|
+
message.sessions = object.sessions ?? 0;
|
|
7704
|
+
message.costUsd = object.costUsd ?? 0;
|
|
7705
|
+
message.costUsdUnverified = object.costUsdUnverified ?? 0;
|
|
7706
|
+
message.outputTokens = object.outputTokens ?? 0;
|
|
7707
|
+
message.oldestAge = (object.oldestAge !== undefined && object.oldestAge !== null)
|
|
7708
|
+
? Duration.fromPartial(object.oldestAge)
|
|
7709
|
+
: undefined;
|
|
7710
|
+
message.filesUnverified = object.filesUnverified ?? 0;
|
|
7711
|
+
return message;
|
|
7712
|
+
},
|
|
7713
|
+
};
|
|
7714
|
+
|
|
7715
|
+
function createBaseFileStateGroup(): FileStateGroup {
|
|
7716
|
+
return { key: "", tiers: undefined };
|
|
7717
|
+
}
|
|
7718
|
+
|
|
7719
|
+
export const FileStateGroup: MessageFns<FileStateGroup> = {
|
|
7720
|
+
encode(message: FileStateGroup, writer: BinaryWriter = new BinaryWriter()): BinaryWriter {
|
|
7721
|
+
if (message.key !== "") {
|
|
7722
|
+
writer.uint32(10).string(message.key);
|
|
7723
|
+
}
|
|
7724
|
+
if (message.tiers !== undefined) {
|
|
7725
|
+
FileStateTiers.encode(message.tiers, writer.uint32(18).fork()).join();
|
|
7726
|
+
}
|
|
7727
|
+
return writer;
|
|
7728
|
+
},
|
|
7729
|
+
|
|
7730
|
+
decode(input: BinaryReader | Uint8Array, length?: number): FileStateGroup {
|
|
7731
|
+
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
|
|
7732
|
+
const previousRecursionDepth = (reader as any).__tsProtoDecodeDepth ?? 0;
|
|
7733
|
+
if (previousRecursionDepth >= 100) {
|
|
7734
|
+
throw new globalThis.Error("protobuf decode recursion limit exceeded");
|
|
7735
|
+
}
|
|
7736
|
+
(reader as any).__tsProtoDecodeDepth = previousRecursionDepth + 1;
|
|
7737
|
+
try {
|
|
7738
|
+
const end = length === undefined ? reader.len : reader.pos + length;
|
|
7739
|
+
const message = createBaseFileStateGroup();
|
|
7740
|
+
while (reader.pos < end) {
|
|
7741
|
+
const tag = reader.uint32();
|
|
7742
|
+
switch (tag >>> 3) {
|
|
7743
|
+
case 1: {
|
|
7744
|
+
if (tag !== 10) {
|
|
7745
|
+
break;
|
|
7746
|
+
}
|
|
7747
|
+
|
|
7748
|
+
message.key = reader.string();
|
|
7749
|
+
continue;
|
|
7750
|
+
}
|
|
7751
|
+
case 2: {
|
|
7752
|
+
if (tag !== 18) {
|
|
7753
|
+
break;
|
|
7754
|
+
}
|
|
7755
|
+
|
|
7756
|
+
message.tiers = FileStateTiers.decode(reader, reader.uint32());
|
|
7757
|
+
continue;
|
|
7758
|
+
}
|
|
7759
|
+
}
|
|
7760
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
7761
|
+
break;
|
|
7762
|
+
}
|
|
7763
|
+
reader.skip(tag & 7);
|
|
7764
|
+
}
|
|
7765
|
+
return message;
|
|
7766
|
+
} finally {
|
|
7767
|
+
(reader as any).__tsProtoDecodeDepth = previousRecursionDepth;
|
|
7768
|
+
}
|
|
7769
|
+
},
|
|
7770
|
+
|
|
7771
|
+
fromJSON(object: any): FileStateGroup {
|
|
7772
|
+
return {
|
|
7773
|
+
key: isSet(object.key) ? globalThis.String(object.key) : "",
|
|
7774
|
+
tiers: isSet(object.tiers) ? FileStateTiers.fromJSON(object.tiers) : undefined,
|
|
7775
|
+
};
|
|
7776
|
+
},
|
|
7777
|
+
|
|
7778
|
+
toJSON(message: FileStateGroup): unknown {
|
|
7779
|
+
const obj: any = {};
|
|
7780
|
+
if (message.key !== "") {
|
|
7781
|
+
obj.key = message.key;
|
|
7782
|
+
}
|
|
7783
|
+
if (message.tiers !== undefined) {
|
|
7784
|
+
obj.tiers = FileStateTiers.toJSON(message.tiers);
|
|
7785
|
+
}
|
|
7786
|
+
return obj;
|
|
7787
|
+
},
|
|
7788
|
+
|
|
7789
|
+
create<I extends Exact<DeepPartial<FileStateGroup>, I>>(base?: I): FileStateGroup {
|
|
7790
|
+
return FileStateGroup.fromPartial(base ?? ({} as any));
|
|
7791
|
+
},
|
|
7792
|
+
fromPartial<I extends Exact<DeepPartial<FileStateGroup>, I>>(object: I): FileStateGroup {
|
|
7793
|
+
const message = createBaseFileStateGroup();
|
|
7794
|
+
message.key = object.key ?? "";
|
|
7795
|
+
message.tiers = (object.tiers !== undefined && object.tiers !== null)
|
|
7796
|
+
? FileStateTiers.fromPartial(object.tiers)
|
|
7797
|
+
: undefined;
|
|
7798
|
+
return message;
|
|
7799
|
+
},
|
|
7800
|
+
};
|
|
7801
|
+
|
|
7802
|
+
function createBaseListModelPricesRequest(): ListModelPricesRequest {
|
|
7803
|
+
return { organizationId: "", projectId: "", filter: undefined, pageSize: 0, pageToken: "" };
|
|
7804
|
+
}
|
|
7805
|
+
|
|
7806
|
+
export const ListModelPricesRequest: MessageFns<ListModelPricesRequest> = {
|
|
7807
|
+
encode(message: ListModelPricesRequest, writer: BinaryWriter = new BinaryWriter()): BinaryWriter {
|
|
7808
|
+
if (message.organizationId !== "") {
|
|
7809
|
+
writer.uint32(10).string(message.organizationId);
|
|
7810
|
+
}
|
|
7811
|
+
if (message.projectId !== "") {
|
|
7812
|
+
writer.uint32(18).string(message.projectId);
|
|
7813
|
+
}
|
|
7814
|
+
if (message.filter !== undefined) {
|
|
7815
|
+
AIModelPriceFilter.encode(message.filter, writer.uint32(26).fork()).join();
|
|
7816
|
+
}
|
|
7817
|
+
if (message.pageSize !== 0) {
|
|
7818
|
+
writer.uint32(32).int32(message.pageSize);
|
|
7819
|
+
}
|
|
7820
|
+
if (message.pageToken !== "") {
|
|
7821
|
+
writer.uint32(42).string(message.pageToken);
|
|
7822
|
+
}
|
|
7823
|
+
return writer;
|
|
7824
|
+
},
|
|
7825
|
+
|
|
7826
|
+
decode(input: BinaryReader | Uint8Array, length?: number): ListModelPricesRequest {
|
|
7827
|
+
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
|
|
7828
|
+
const previousRecursionDepth = (reader as any).__tsProtoDecodeDepth ?? 0;
|
|
7829
|
+
if (previousRecursionDepth >= 100) {
|
|
7830
|
+
throw new globalThis.Error("protobuf decode recursion limit exceeded");
|
|
7831
|
+
}
|
|
7832
|
+
(reader as any).__tsProtoDecodeDepth = previousRecursionDepth + 1;
|
|
7833
|
+
try {
|
|
7834
|
+
const end = length === undefined ? reader.len : reader.pos + length;
|
|
7835
|
+
const message = createBaseListModelPricesRequest();
|
|
7836
|
+
while (reader.pos < end) {
|
|
7837
|
+
const tag = reader.uint32();
|
|
7838
|
+
switch (tag >>> 3) {
|
|
7839
|
+
case 1: {
|
|
7840
|
+
if (tag !== 10) {
|
|
7841
|
+
break;
|
|
7842
|
+
}
|
|
7843
|
+
|
|
7844
|
+
message.organizationId = reader.string();
|
|
7845
|
+
continue;
|
|
7846
|
+
}
|
|
7847
|
+
case 2: {
|
|
7848
|
+
if (tag !== 18) {
|
|
7849
|
+
break;
|
|
7850
|
+
}
|
|
7851
|
+
|
|
7852
|
+
message.projectId = reader.string();
|
|
7853
|
+
continue;
|
|
7854
|
+
}
|
|
7855
|
+
case 3: {
|
|
7856
|
+
if (tag !== 26) {
|
|
7857
|
+
break;
|
|
7858
|
+
}
|
|
7859
|
+
|
|
7860
|
+
message.filter = AIModelPriceFilter.decode(reader, reader.uint32());
|
|
7861
|
+
continue;
|
|
7862
|
+
}
|
|
7863
|
+
case 4: {
|
|
7864
|
+
if (tag !== 32) {
|
|
7865
|
+
break;
|
|
7866
|
+
}
|
|
7867
|
+
|
|
7868
|
+
message.pageSize = reader.int32();
|
|
7869
|
+
continue;
|
|
7870
|
+
}
|
|
7871
|
+
case 5: {
|
|
7872
|
+
if (tag !== 42) {
|
|
7873
|
+
break;
|
|
7874
|
+
}
|
|
7875
|
+
|
|
7876
|
+
message.pageToken = reader.string();
|
|
7877
|
+
continue;
|
|
7878
|
+
}
|
|
7879
|
+
}
|
|
7880
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
7881
|
+
break;
|
|
7882
|
+
}
|
|
7883
|
+
reader.skip(tag & 7);
|
|
7884
|
+
}
|
|
7885
|
+
return message;
|
|
7886
|
+
} finally {
|
|
7887
|
+
(reader as any).__tsProtoDecodeDepth = previousRecursionDepth;
|
|
7888
|
+
}
|
|
7889
|
+
},
|
|
7890
|
+
|
|
7891
|
+
fromJSON(object: any): ListModelPricesRequest {
|
|
7892
|
+
return {
|
|
7893
|
+
organizationId: isSet(object.organizationId)
|
|
7894
|
+
? globalThis.String(object.organizationId)
|
|
7895
|
+
: isSet(object.organization_id)
|
|
7896
|
+
? globalThis.String(object.organization_id)
|
|
7897
|
+
: "",
|
|
7898
|
+
projectId: isSet(object.projectId)
|
|
7899
|
+
? globalThis.String(object.projectId)
|
|
7900
|
+
: isSet(object.project_id)
|
|
7901
|
+
? globalThis.String(object.project_id)
|
|
7902
|
+
: "",
|
|
7903
|
+
filter: isSet(object.filter) ? AIModelPriceFilter.fromJSON(object.filter) : undefined,
|
|
7904
|
+
pageSize: isSet(object.pageSize)
|
|
7905
|
+
? globalThis.Number(object.pageSize)
|
|
7906
|
+
: isSet(object.page_size)
|
|
7907
|
+
? globalThis.Number(object.page_size)
|
|
7908
|
+
: 0,
|
|
7909
|
+
pageToken: isSet(object.pageToken)
|
|
7910
|
+
? globalThis.String(object.pageToken)
|
|
7911
|
+
: isSet(object.page_token)
|
|
7912
|
+
? globalThis.String(object.page_token)
|
|
7913
|
+
: "",
|
|
7914
|
+
};
|
|
7915
|
+
},
|
|
7916
|
+
|
|
7917
|
+
toJSON(message: ListModelPricesRequest): unknown {
|
|
7918
|
+
const obj: any = {};
|
|
7919
|
+
if (message.organizationId !== "") {
|
|
7920
|
+
obj.organizationId = message.organizationId;
|
|
7921
|
+
}
|
|
7922
|
+
if (message.projectId !== "") {
|
|
7923
|
+
obj.projectId = message.projectId;
|
|
7924
|
+
}
|
|
7925
|
+
if (message.filter !== undefined) {
|
|
7926
|
+
obj.filter = AIModelPriceFilter.toJSON(message.filter);
|
|
7927
|
+
}
|
|
7928
|
+
if (message.pageSize !== 0) {
|
|
7929
|
+
obj.pageSize = Math.round(message.pageSize);
|
|
7930
|
+
}
|
|
7931
|
+
if (message.pageToken !== "") {
|
|
7932
|
+
obj.pageToken = message.pageToken;
|
|
7933
|
+
}
|
|
7934
|
+
return obj;
|
|
7935
|
+
},
|
|
7936
|
+
|
|
7937
|
+
create<I extends Exact<DeepPartial<ListModelPricesRequest>, I>>(base?: I): ListModelPricesRequest {
|
|
7938
|
+
return ListModelPricesRequest.fromPartial(base ?? ({} as any));
|
|
7939
|
+
},
|
|
7940
|
+
fromPartial<I extends Exact<DeepPartial<ListModelPricesRequest>, I>>(object: I): ListModelPricesRequest {
|
|
7941
|
+
const message = createBaseListModelPricesRequest();
|
|
7942
|
+
message.organizationId = object.organizationId ?? "";
|
|
7943
|
+
message.projectId = object.projectId ?? "";
|
|
7944
|
+
message.filter = (object.filter !== undefined && object.filter !== null)
|
|
7945
|
+
? AIModelPriceFilter.fromPartial(object.filter)
|
|
7946
|
+
: undefined;
|
|
7947
|
+
message.pageSize = object.pageSize ?? 0;
|
|
7948
|
+
message.pageToken = object.pageToken ?? "";
|
|
7949
|
+
return message;
|
|
7950
|
+
},
|
|
7951
|
+
};
|
|
7952
|
+
|
|
7953
|
+
function createBaseAIModelPriceFilter(): AIModelPriceFilter {
|
|
7954
|
+
return { source: [], provider: [], model: [] };
|
|
7955
|
+
}
|
|
7956
|
+
|
|
7957
|
+
export const AIModelPriceFilter: MessageFns<AIModelPriceFilter> = {
|
|
7958
|
+
encode(message: AIModelPriceFilter, writer: BinaryWriter = new BinaryWriter()): BinaryWriter {
|
|
7959
|
+
for (const v of message.source) {
|
|
7960
|
+
writer.uint32(10).string(v!);
|
|
7961
|
+
}
|
|
7962
|
+
for (const v of message.provider) {
|
|
7963
|
+
writer.uint32(18).string(v!);
|
|
7964
|
+
}
|
|
7965
|
+
for (const v of message.model) {
|
|
7966
|
+
writer.uint32(26).string(v!);
|
|
7967
|
+
}
|
|
7968
|
+
return writer;
|
|
7969
|
+
},
|
|
7970
|
+
|
|
7971
|
+
decode(input: BinaryReader | Uint8Array, length?: number): AIModelPriceFilter {
|
|
7972
|
+
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
|
|
7973
|
+
const previousRecursionDepth = (reader as any).__tsProtoDecodeDepth ?? 0;
|
|
7974
|
+
if (previousRecursionDepth >= 100) {
|
|
7975
|
+
throw new globalThis.Error("protobuf decode recursion limit exceeded");
|
|
7976
|
+
}
|
|
7977
|
+
(reader as any).__tsProtoDecodeDepth = previousRecursionDepth + 1;
|
|
7978
|
+
try {
|
|
7979
|
+
const end = length === undefined ? reader.len : reader.pos + length;
|
|
7980
|
+
const message = createBaseAIModelPriceFilter();
|
|
7981
|
+
while (reader.pos < end) {
|
|
7982
|
+
const tag = reader.uint32();
|
|
7983
|
+
switch (tag >>> 3) {
|
|
7984
|
+
case 1: {
|
|
7985
|
+
if (tag !== 10) {
|
|
7986
|
+
break;
|
|
7987
|
+
}
|
|
7988
|
+
|
|
7989
|
+
message.source.push(reader.string());
|
|
7990
|
+
continue;
|
|
7991
|
+
}
|
|
7992
|
+
case 2: {
|
|
7993
|
+
if (tag !== 18) {
|
|
7994
|
+
break;
|
|
7995
|
+
}
|
|
7996
|
+
|
|
7997
|
+
message.provider.push(reader.string());
|
|
7998
|
+
continue;
|
|
7999
|
+
}
|
|
8000
|
+
case 3: {
|
|
8001
|
+
if (tag !== 26) {
|
|
8002
|
+
break;
|
|
8003
|
+
}
|
|
8004
|
+
|
|
8005
|
+
message.model.push(reader.string());
|
|
8006
|
+
continue;
|
|
8007
|
+
}
|
|
8008
|
+
}
|
|
8009
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
8010
|
+
break;
|
|
8011
|
+
}
|
|
8012
|
+
reader.skip(tag & 7);
|
|
8013
|
+
}
|
|
8014
|
+
return message;
|
|
8015
|
+
} finally {
|
|
8016
|
+
(reader as any).__tsProtoDecodeDepth = previousRecursionDepth;
|
|
8017
|
+
}
|
|
8018
|
+
},
|
|
8019
|
+
|
|
8020
|
+
fromJSON(object: any): AIModelPriceFilter {
|
|
8021
|
+
return {
|
|
8022
|
+
source: globalThis.Array.isArray(object?.source) ? object.source.map((e: any) => globalThis.String(e)) : [],
|
|
8023
|
+
provider: globalThis.Array.isArray(object?.provider) ? object.provider.map((e: any) => globalThis.String(e)) : [],
|
|
8024
|
+
model: globalThis.Array.isArray(object?.model) ? object.model.map((e: any) => globalThis.String(e)) : [],
|
|
8025
|
+
};
|
|
8026
|
+
},
|
|
8027
|
+
|
|
8028
|
+
toJSON(message: AIModelPriceFilter): unknown {
|
|
8029
|
+
const obj: any = {};
|
|
8030
|
+
if (message.source?.length) {
|
|
8031
|
+
obj.source = message.source;
|
|
8032
|
+
}
|
|
8033
|
+
if (message.provider?.length) {
|
|
8034
|
+
obj.provider = message.provider;
|
|
8035
|
+
}
|
|
8036
|
+
if (message.model?.length) {
|
|
8037
|
+
obj.model = message.model;
|
|
8038
|
+
}
|
|
8039
|
+
return obj;
|
|
8040
|
+
},
|
|
8041
|
+
|
|
8042
|
+
create<I extends Exact<DeepPartial<AIModelPriceFilter>, I>>(base?: I): AIModelPriceFilter {
|
|
8043
|
+
return AIModelPriceFilter.fromPartial(base ?? ({} as any));
|
|
8044
|
+
},
|
|
8045
|
+
fromPartial<I extends Exact<DeepPartial<AIModelPriceFilter>, I>>(object: I): AIModelPriceFilter {
|
|
8046
|
+
const message = createBaseAIModelPriceFilter();
|
|
8047
|
+
message.source = object.source?.map((e) => e) || [];
|
|
8048
|
+
message.provider = object.provider?.map((e) => e) || [];
|
|
8049
|
+
message.model = object.model?.map((e) => e) || [];
|
|
8050
|
+
return message;
|
|
8051
|
+
},
|
|
8052
|
+
};
|
|
8053
|
+
|
|
8054
|
+
function createBaseListModelPricesResponse(): ListModelPricesResponse {
|
|
8055
|
+
return { status: undefined, prices: [], nextPageToken: "", totalCount: undefined };
|
|
8056
|
+
}
|
|
8057
|
+
|
|
8058
|
+
export const ListModelPricesResponse: MessageFns<ListModelPricesResponse> = {
|
|
8059
|
+
encode(message: ListModelPricesResponse, writer: BinaryWriter = new BinaryWriter()): BinaryWriter {
|
|
8060
|
+
if (message.status !== undefined) {
|
|
8061
|
+
ResponseStatus.encode(message.status, writer.uint32(10).fork()).join();
|
|
8062
|
+
}
|
|
8063
|
+
for (const v of message.prices) {
|
|
8064
|
+
AIModelPrice.encode(v!, writer.uint32(18).fork()).join();
|
|
8065
|
+
}
|
|
8066
|
+
if (message.nextPageToken !== "") {
|
|
8067
|
+
writer.uint32(26).string(message.nextPageToken);
|
|
8068
|
+
}
|
|
8069
|
+
if (message.totalCount !== undefined) {
|
|
8070
|
+
writer.uint32(32).int64(message.totalCount);
|
|
8071
|
+
}
|
|
8072
|
+
return writer;
|
|
8073
|
+
},
|
|
8074
|
+
|
|
8075
|
+
decode(input: BinaryReader | Uint8Array, length?: number): ListModelPricesResponse {
|
|
8076
|
+
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
|
|
8077
|
+
const previousRecursionDepth = (reader as any).__tsProtoDecodeDepth ?? 0;
|
|
8078
|
+
if (previousRecursionDepth >= 100) {
|
|
8079
|
+
throw new globalThis.Error("protobuf decode recursion limit exceeded");
|
|
8080
|
+
}
|
|
8081
|
+
(reader as any).__tsProtoDecodeDepth = previousRecursionDepth + 1;
|
|
8082
|
+
try {
|
|
8083
|
+
const end = length === undefined ? reader.len : reader.pos + length;
|
|
8084
|
+
const message = createBaseListModelPricesResponse();
|
|
8085
|
+
while (reader.pos < end) {
|
|
8086
|
+
const tag = reader.uint32();
|
|
8087
|
+
switch (tag >>> 3) {
|
|
8088
|
+
case 1: {
|
|
8089
|
+
if (tag !== 10) {
|
|
8090
|
+
break;
|
|
8091
|
+
}
|
|
8092
|
+
|
|
8093
|
+
message.status = ResponseStatus.decode(reader, reader.uint32());
|
|
8094
|
+
continue;
|
|
8095
|
+
}
|
|
8096
|
+
case 2: {
|
|
8097
|
+
if (tag !== 18) {
|
|
8098
|
+
break;
|
|
8099
|
+
}
|
|
8100
|
+
|
|
8101
|
+
message.prices.push(AIModelPrice.decode(reader, reader.uint32()));
|
|
8102
|
+
continue;
|
|
8103
|
+
}
|
|
8104
|
+
case 3: {
|
|
8105
|
+
if (tag !== 26) {
|
|
8106
|
+
break;
|
|
8107
|
+
}
|
|
8108
|
+
|
|
8109
|
+
message.nextPageToken = reader.string();
|
|
8110
|
+
continue;
|
|
8111
|
+
}
|
|
8112
|
+
case 4: {
|
|
8113
|
+
if (tag !== 32) {
|
|
8114
|
+
break;
|
|
8115
|
+
}
|
|
8116
|
+
|
|
8117
|
+
message.totalCount = longToNumber(reader.int64());
|
|
8118
|
+
continue;
|
|
8119
|
+
}
|
|
8120
|
+
}
|
|
8121
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
8122
|
+
break;
|
|
8123
|
+
}
|
|
8124
|
+
reader.skip(tag & 7);
|
|
8125
|
+
}
|
|
8126
|
+
return message;
|
|
8127
|
+
} finally {
|
|
8128
|
+
(reader as any).__tsProtoDecodeDepth = previousRecursionDepth;
|
|
8129
|
+
}
|
|
8130
|
+
},
|
|
8131
|
+
|
|
8132
|
+
fromJSON(object: any): ListModelPricesResponse {
|
|
8133
|
+
return {
|
|
8134
|
+
status: isSet(object.status) ? ResponseStatus.fromJSON(object.status) : undefined,
|
|
8135
|
+
prices: globalThis.Array.isArray(object?.prices) ? object.prices.map((e: any) => AIModelPrice.fromJSON(e)) : [],
|
|
8136
|
+
nextPageToken: isSet(object.nextPageToken)
|
|
8137
|
+
? globalThis.String(object.nextPageToken)
|
|
8138
|
+
: isSet(object.next_page_token)
|
|
8139
|
+
? globalThis.String(object.next_page_token)
|
|
8140
|
+
: "",
|
|
8141
|
+
totalCount: isSet(object.totalCount)
|
|
8142
|
+
? globalThis.Number(object.totalCount)
|
|
8143
|
+
: isSet(object.total_count)
|
|
8144
|
+
? globalThis.Number(object.total_count)
|
|
8145
|
+
: undefined,
|
|
8146
|
+
};
|
|
8147
|
+
},
|
|
8148
|
+
|
|
8149
|
+
toJSON(message: ListModelPricesResponse): unknown {
|
|
8150
|
+
const obj: any = {};
|
|
8151
|
+
if (message.status !== undefined) {
|
|
8152
|
+
obj.status = ResponseStatus.toJSON(message.status);
|
|
8153
|
+
}
|
|
8154
|
+
if (message.prices?.length) {
|
|
8155
|
+
obj.prices = message.prices.map((e) => AIModelPrice.toJSON(e));
|
|
8156
|
+
}
|
|
8157
|
+
if (message.nextPageToken !== "") {
|
|
8158
|
+
obj.nextPageToken = message.nextPageToken;
|
|
8159
|
+
}
|
|
8160
|
+
if (message.totalCount !== undefined) {
|
|
8161
|
+
obj.totalCount = Math.round(message.totalCount);
|
|
8162
|
+
}
|
|
8163
|
+
return obj;
|
|
8164
|
+
},
|
|
8165
|
+
|
|
8166
|
+
create<I extends Exact<DeepPartial<ListModelPricesResponse>, I>>(base?: I): ListModelPricesResponse {
|
|
8167
|
+
return ListModelPricesResponse.fromPartial(base ?? ({} as any));
|
|
8168
|
+
},
|
|
8169
|
+
fromPartial<I extends Exact<DeepPartial<ListModelPricesResponse>, I>>(object: I): ListModelPricesResponse {
|
|
8170
|
+
const message = createBaseListModelPricesResponse();
|
|
8171
|
+
message.status = (object.status !== undefined && object.status !== null)
|
|
8172
|
+
? ResponseStatus.fromPartial(object.status)
|
|
8173
|
+
: undefined;
|
|
8174
|
+
message.prices = object.prices?.map((e) => AIModelPrice.fromPartial(e)) || [];
|
|
8175
|
+
message.nextPageToken = object.nextPageToken ?? "";
|
|
8176
|
+
message.totalCount = object.totalCount ?? undefined;
|
|
8177
|
+
return message;
|
|
8178
|
+
},
|
|
8179
|
+
};
|
|
8180
|
+
|
|
8181
|
+
function createBaseAIModelPrice(): AIModelPrice {
|
|
8182
|
+
return {
|
|
8183
|
+
source: "",
|
|
8184
|
+
provider: "",
|
|
8185
|
+
model: "",
|
|
8186
|
+
scrapedAt: undefined,
|
|
8187
|
+
inputUsdPerMtok: 0,
|
|
8188
|
+
outputUsdPerMtok: 0,
|
|
8189
|
+
cacheReadUsdPerMtok: 0,
|
|
8190
|
+
cacheWriteUsdPerMtok: 0,
|
|
8191
|
+
};
|
|
8192
|
+
}
|
|
8193
|
+
|
|
8194
|
+
export const AIModelPrice: MessageFns<AIModelPrice> = {
|
|
8195
|
+
encode(message: AIModelPrice, writer: BinaryWriter = new BinaryWriter()): BinaryWriter {
|
|
8196
|
+
if (message.source !== "") {
|
|
8197
|
+
writer.uint32(10).string(message.source);
|
|
8198
|
+
}
|
|
8199
|
+
if (message.provider !== "") {
|
|
8200
|
+
writer.uint32(18).string(message.provider);
|
|
8201
|
+
}
|
|
8202
|
+
if (message.model !== "") {
|
|
8203
|
+
writer.uint32(26).string(message.model);
|
|
8204
|
+
}
|
|
8205
|
+
if (message.scrapedAt !== undefined) {
|
|
8206
|
+
Timestamp.encode(toTimestamp(message.scrapedAt), writer.uint32(34).fork()).join();
|
|
8207
|
+
}
|
|
8208
|
+
if (message.inputUsdPerMtok !== 0) {
|
|
8209
|
+
writer.uint32(41).double(message.inputUsdPerMtok);
|
|
8210
|
+
}
|
|
8211
|
+
if (message.outputUsdPerMtok !== 0) {
|
|
8212
|
+
writer.uint32(49).double(message.outputUsdPerMtok);
|
|
8213
|
+
}
|
|
8214
|
+
if (message.cacheReadUsdPerMtok !== 0) {
|
|
8215
|
+
writer.uint32(57).double(message.cacheReadUsdPerMtok);
|
|
8216
|
+
}
|
|
8217
|
+
if (message.cacheWriteUsdPerMtok !== 0) {
|
|
8218
|
+
writer.uint32(65).double(message.cacheWriteUsdPerMtok);
|
|
8219
|
+
}
|
|
8220
|
+
return writer;
|
|
8221
|
+
},
|
|
8222
|
+
|
|
8223
|
+
decode(input: BinaryReader | Uint8Array, length?: number): AIModelPrice {
|
|
8224
|
+
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
|
|
8225
|
+
const previousRecursionDepth = (reader as any).__tsProtoDecodeDepth ?? 0;
|
|
8226
|
+
if (previousRecursionDepth >= 100) {
|
|
8227
|
+
throw new globalThis.Error("protobuf decode recursion limit exceeded");
|
|
8228
|
+
}
|
|
8229
|
+
(reader as any).__tsProtoDecodeDepth = previousRecursionDepth + 1;
|
|
8230
|
+
try {
|
|
8231
|
+
const end = length === undefined ? reader.len : reader.pos + length;
|
|
8232
|
+
const message = createBaseAIModelPrice();
|
|
8233
|
+
while (reader.pos < end) {
|
|
8234
|
+
const tag = reader.uint32();
|
|
8235
|
+
switch (tag >>> 3) {
|
|
8236
|
+
case 1: {
|
|
8237
|
+
if (tag !== 10) {
|
|
8238
|
+
break;
|
|
8239
|
+
}
|
|
8240
|
+
|
|
8241
|
+
message.source = reader.string();
|
|
8242
|
+
continue;
|
|
8243
|
+
}
|
|
8244
|
+
case 2: {
|
|
8245
|
+
if (tag !== 18) {
|
|
8246
|
+
break;
|
|
8247
|
+
}
|
|
8248
|
+
|
|
8249
|
+
message.provider = reader.string();
|
|
8250
|
+
continue;
|
|
8251
|
+
}
|
|
8252
|
+
case 3: {
|
|
8253
|
+
if (tag !== 26) {
|
|
8254
|
+
break;
|
|
8255
|
+
}
|
|
8256
|
+
|
|
8257
|
+
message.model = reader.string();
|
|
8258
|
+
continue;
|
|
8259
|
+
}
|
|
8260
|
+
case 4: {
|
|
8261
|
+
if (tag !== 34) {
|
|
8262
|
+
break;
|
|
8263
|
+
}
|
|
8264
|
+
|
|
8265
|
+
message.scrapedAt = fromTimestamp(Timestamp.decode(reader, reader.uint32()));
|
|
8266
|
+
continue;
|
|
8267
|
+
}
|
|
8268
|
+
case 5: {
|
|
8269
|
+
if (tag !== 41) {
|
|
8270
|
+
break;
|
|
8271
|
+
}
|
|
8272
|
+
|
|
8273
|
+
message.inputUsdPerMtok = reader.double();
|
|
8274
|
+
continue;
|
|
8275
|
+
}
|
|
8276
|
+
case 6: {
|
|
8277
|
+
if (tag !== 49) {
|
|
8278
|
+
break;
|
|
8279
|
+
}
|
|
8280
|
+
|
|
8281
|
+
message.outputUsdPerMtok = reader.double();
|
|
8282
|
+
continue;
|
|
8283
|
+
}
|
|
8284
|
+
case 7: {
|
|
8285
|
+
if (tag !== 57) {
|
|
8286
|
+
break;
|
|
8287
|
+
}
|
|
8288
|
+
|
|
8289
|
+
message.cacheReadUsdPerMtok = reader.double();
|
|
8290
|
+
continue;
|
|
8291
|
+
}
|
|
8292
|
+
case 8: {
|
|
8293
|
+
if (tag !== 65) {
|
|
8294
|
+
break;
|
|
8295
|
+
}
|
|
8296
|
+
|
|
8297
|
+
message.cacheWriteUsdPerMtok = reader.double();
|
|
8298
|
+
continue;
|
|
8299
|
+
}
|
|
8300
|
+
}
|
|
8301
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
8302
|
+
break;
|
|
8303
|
+
}
|
|
8304
|
+
reader.skip(tag & 7);
|
|
8305
|
+
}
|
|
8306
|
+
return message;
|
|
8307
|
+
} finally {
|
|
8308
|
+
(reader as any).__tsProtoDecodeDepth = previousRecursionDepth;
|
|
8309
|
+
}
|
|
8310
|
+
},
|
|
8311
|
+
|
|
8312
|
+
fromJSON(object: any): AIModelPrice {
|
|
8313
|
+
return {
|
|
8314
|
+
source: isSet(object.source) ? globalThis.String(object.source) : "",
|
|
8315
|
+
provider: isSet(object.provider) ? globalThis.String(object.provider) : "",
|
|
8316
|
+
model: isSet(object.model) ? globalThis.String(object.model) : "",
|
|
8317
|
+
scrapedAt: isSet(object.scrapedAt)
|
|
8318
|
+
? fromJsonTimestamp(object.scrapedAt)
|
|
8319
|
+
: isSet(object.scraped_at)
|
|
8320
|
+
? fromJsonTimestamp(object.scraped_at)
|
|
8321
|
+
: undefined,
|
|
8322
|
+
inputUsdPerMtok: isSet(object.inputUsdPerMtok)
|
|
8323
|
+
? globalThis.Number(object.inputUsdPerMtok)
|
|
8324
|
+
: isSet(object.input_usd_per_mtok)
|
|
8325
|
+
? globalThis.Number(object.input_usd_per_mtok)
|
|
8326
|
+
: 0,
|
|
8327
|
+
outputUsdPerMtok: isSet(object.outputUsdPerMtok)
|
|
8328
|
+
? globalThis.Number(object.outputUsdPerMtok)
|
|
8329
|
+
: isSet(object.output_usd_per_mtok)
|
|
8330
|
+
? globalThis.Number(object.output_usd_per_mtok)
|
|
8331
|
+
: 0,
|
|
8332
|
+
cacheReadUsdPerMtok: isSet(object.cacheReadUsdPerMtok)
|
|
8333
|
+
? globalThis.Number(object.cacheReadUsdPerMtok)
|
|
8334
|
+
: isSet(object.cache_read_usd_per_mtok)
|
|
8335
|
+
? globalThis.Number(object.cache_read_usd_per_mtok)
|
|
8336
|
+
: 0,
|
|
8337
|
+
cacheWriteUsdPerMtok: isSet(object.cacheWriteUsdPerMtok)
|
|
8338
|
+
? globalThis.Number(object.cacheWriteUsdPerMtok)
|
|
8339
|
+
: isSet(object.cache_write_usd_per_mtok)
|
|
8340
|
+
? globalThis.Number(object.cache_write_usd_per_mtok)
|
|
8341
|
+
: 0,
|
|
8342
|
+
};
|
|
8343
|
+
},
|
|
8344
|
+
|
|
8345
|
+
toJSON(message: AIModelPrice): unknown {
|
|
8346
|
+
const obj: any = {};
|
|
8347
|
+
if (message.source !== "") {
|
|
8348
|
+
obj.source = message.source;
|
|
8349
|
+
}
|
|
8350
|
+
if (message.provider !== "") {
|
|
8351
|
+
obj.provider = message.provider;
|
|
8352
|
+
}
|
|
8353
|
+
if (message.model !== "") {
|
|
8354
|
+
obj.model = message.model;
|
|
8355
|
+
}
|
|
8356
|
+
if (message.scrapedAt !== undefined) {
|
|
8357
|
+
obj.scrapedAt = message.scrapedAt.toISOString();
|
|
8358
|
+
}
|
|
8359
|
+
if (message.inputUsdPerMtok !== 0) {
|
|
8360
|
+
obj.inputUsdPerMtok = message.inputUsdPerMtok;
|
|
8361
|
+
}
|
|
8362
|
+
if (message.outputUsdPerMtok !== 0) {
|
|
8363
|
+
obj.outputUsdPerMtok = message.outputUsdPerMtok;
|
|
8364
|
+
}
|
|
8365
|
+
if (message.cacheReadUsdPerMtok !== 0) {
|
|
8366
|
+
obj.cacheReadUsdPerMtok = message.cacheReadUsdPerMtok;
|
|
8367
|
+
}
|
|
8368
|
+
if (message.cacheWriteUsdPerMtok !== 0) {
|
|
8369
|
+
obj.cacheWriteUsdPerMtok = message.cacheWriteUsdPerMtok;
|
|
8370
|
+
}
|
|
8371
|
+
return obj;
|
|
8372
|
+
},
|
|
8373
|
+
|
|
8374
|
+
create<I extends Exact<DeepPartial<AIModelPrice>, I>>(base?: I): AIModelPrice {
|
|
8375
|
+
return AIModelPrice.fromPartial(base ?? ({} as any));
|
|
8376
|
+
},
|
|
8377
|
+
fromPartial<I extends Exact<DeepPartial<AIModelPrice>, I>>(object: I): AIModelPrice {
|
|
8378
|
+
const message = createBaseAIModelPrice();
|
|
8379
|
+
message.source = object.source ?? "";
|
|
8380
|
+
message.provider = object.provider ?? "";
|
|
8381
|
+
message.model = object.model ?? "";
|
|
8382
|
+
message.scrapedAt = object.scrapedAt ?? undefined;
|
|
8383
|
+
message.inputUsdPerMtok = object.inputUsdPerMtok ?? 0;
|
|
8384
|
+
message.outputUsdPerMtok = object.outputUsdPerMtok ?? 0;
|
|
8385
|
+
message.cacheReadUsdPerMtok = object.cacheReadUsdPerMtok ?? 0;
|
|
8386
|
+
message.cacheWriteUsdPerMtok = object.cacheWriteUsdPerMtok ?? 0;
|
|
8387
|
+
return message;
|
|
8388
|
+
},
|
|
8389
|
+
};
|
|
8390
|
+
|
|
8391
|
+
function createBaseAITokenUsage(): AITokenUsage {
|
|
8392
|
+
return { inputTokens: 0, outputTokens: 0, cacheReadTokens: 0, cacheWriteTokens: 0, providerCostUsd: 0 };
|
|
8393
|
+
}
|
|
8394
|
+
|
|
8395
|
+
export const AITokenUsage: MessageFns<AITokenUsage> = {
|
|
8396
|
+
encode(message: AITokenUsage, writer: BinaryWriter = new BinaryWriter()): BinaryWriter {
|
|
8397
|
+
if (message.inputTokens !== 0) {
|
|
8398
|
+
writer.uint32(8).uint64(message.inputTokens);
|
|
8399
|
+
}
|
|
8400
|
+
if (message.outputTokens !== 0) {
|
|
8401
|
+
writer.uint32(16).uint64(message.outputTokens);
|
|
8402
|
+
}
|
|
8403
|
+
if (message.cacheReadTokens !== 0) {
|
|
8404
|
+
writer.uint32(24).uint64(message.cacheReadTokens);
|
|
8405
|
+
}
|
|
8406
|
+
if (message.cacheWriteTokens !== 0) {
|
|
8407
|
+
writer.uint32(32).uint64(message.cacheWriteTokens);
|
|
8408
|
+
}
|
|
8409
|
+
if (message.providerCostUsd !== 0) {
|
|
8410
|
+
writer.uint32(41).double(message.providerCostUsd);
|
|
8411
|
+
}
|
|
8412
|
+
return writer;
|
|
8413
|
+
},
|
|
8414
|
+
|
|
8415
|
+
decode(input: BinaryReader | Uint8Array, length?: number): AITokenUsage {
|
|
8416
|
+
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
|
|
8417
|
+
const previousRecursionDepth = (reader as any).__tsProtoDecodeDepth ?? 0;
|
|
8418
|
+
if (previousRecursionDepth >= 100) {
|
|
8419
|
+
throw new globalThis.Error("protobuf decode recursion limit exceeded");
|
|
8420
|
+
}
|
|
8421
|
+
(reader as any).__tsProtoDecodeDepth = previousRecursionDepth + 1;
|
|
8422
|
+
try {
|
|
8423
|
+
const end = length === undefined ? reader.len : reader.pos + length;
|
|
8424
|
+
const message = createBaseAITokenUsage();
|
|
8425
|
+
while (reader.pos < end) {
|
|
8426
|
+
const tag = reader.uint32();
|
|
8427
|
+
switch (tag >>> 3) {
|
|
8428
|
+
case 1: {
|
|
8429
|
+
if (tag !== 8) {
|
|
8430
|
+
break;
|
|
8431
|
+
}
|
|
8432
|
+
|
|
8433
|
+
message.inputTokens = longToNumber(reader.uint64());
|
|
8434
|
+
continue;
|
|
8435
|
+
}
|
|
8436
|
+
case 2: {
|
|
8437
|
+
if (tag !== 16) {
|
|
8438
|
+
break;
|
|
8439
|
+
}
|
|
8440
|
+
|
|
8441
|
+
message.outputTokens = longToNumber(reader.uint64());
|
|
8442
|
+
continue;
|
|
8443
|
+
}
|
|
8444
|
+
case 3: {
|
|
8445
|
+
if (tag !== 24) {
|
|
8446
|
+
break;
|
|
8447
|
+
}
|
|
8448
|
+
|
|
8449
|
+
message.cacheReadTokens = longToNumber(reader.uint64());
|
|
8450
|
+
continue;
|
|
8451
|
+
}
|
|
8452
|
+
case 4: {
|
|
8453
|
+
if (tag !== 32) {
|
|
8454
|
+
break;
|
|
8455
|
+
}
|
|
8456
|
+
|
|
8457
|
+
message.cacheWriteTokens = longToNumber(reader.uint64());
|
|
8458
|
+
continue;
|
|
8459
|
+
}
|
|
8460
|
+
case 5: {
|
|
8461
|
+
if (tag !== 41) {
|
|
8462
|
+
break;
|
|
8463
|
+
}
|
|
8464
|
+
|
|
8465
|
+
message.providerCostUsd = reader.double();
|
|
8466
|
+
continue;
|
|
8467
|
+
}
|
|
8468
|
+
}
|
|
8469
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
8470
|
+
break;
|
|
8471
|
+
}
|
|
8472
|
+
reader.skip(tag & 7);
|
|
8473
|
+
}
|
|
8474
|
+
return message;
|
|
8475
|
+
} finally {
|
|
8476
|
+
(reader as any).__tsProtoDecodeDepth = previousRecursionDepth;
|
|
8477
|
+
}
|
|
8478
|
+
},
|
|
8479
|
+
|
|
8480
|
+
fromJSON(object: any): AITokenUsage {
|
|
8481
|
+
return {
|
|
8482
|
+
inputTokens: isSet(object.inputTokens)
|
|
8483
|
+
? globalThis.Number(object.inputTokens)
|
|
8484
|
+
: isSet(object.input_tokens)
|
|
8485
|
+
? globalThis.Number(object.input_tokens)
|
|
8486
|
+
: 0,
|
|
8487
|
+
outputTokens: isSet(object.outputTokens)
|
|
4674
8488
|
? globalThis.Number(object.outputTokens)
|
|
4675
8489
|
: isSet(object.output_tokens)
|
|
4676
8490
|
? globalThis.Number(object.output_tokens)
|
|
@@ -4685,10 +8499,10 @@ export const AITokenUsage: MessageFns<AITokenUsage> = {
|
|
|
4685
8499
|
: isSet(object.cache_write_tokens)
|
|
4686
8500
|
? globalThis.Number(object.cache_write_tokens)
|
|
4687
8501
|
: 0,
|
|
4688
|
-
|
|
4689
|
-
? globalThis.Number(object.
|
|
4690
|
-
: isSet(object.
|
|
4691
|
-
? globalThis.Number(object.
|
|
8502
|
+
providerCostUsd: isSet(object.providerCostUsd)
|
|
8503
|
+
? globalThis.Number(object.providerCostUsd)
|
|
8504
|
+
: isSet(object.provider_cost_usd)
|
|
8505
|
+
? globalThis.Number(object.provider_cost_usd)
|
|
4692
8506
|
: 0,
|
|
4693
8507
|
};
|
|
4694
8508
|
},
|
|
@@ -4707,8 +8521,8 @@ export const AITokenUsage: MessageFns<AITokenUsage> = {
|
|
|
4707
8521
|
if (message.cacheWriteTokens !== 0) {
|
|
4708
8522
|
obj.cacheWriteTokens = Math.round(message.cacheWriteTokens);
|
|
4709
8523
|
}
|
|
4710
|
-
if (message.
|
|
4711
|
-
obj.
|
|
8524
|
+
if (message.providerCostUsd !== 0) {
|
|
8525
|
+
obj.providerCostUsd = message.providerCostUsd;
|
|
4712
8526
|
}
|
|
4713
8527
|
return obj;
|
|
4714
8528
|
},
|
|
@@ -4722,15 +8536,15 @@ export const AITokenUsage: MessageFns<AITokenUsage> = {
|
|
|
4722
8536
|
message.outputTokens = object.outputTokens ?? 0;
|
|
4723
8537
|
message.cacheReadTokens = object.cacheReadTokens ?? 0;
|
|
4724
8538
|
message.cacheWriteTokens = object.cacheWriteTokens ?? 0;
|
|
4725
|
-
message.
|
|
8539
|
+
message.providerCostUsd = object.providerCostUsd ?? 0;
|
|
4726
8540
|
return message;
|
|
4727
8541
|
},
|
|
4728
8542
|
};
|
|
4729
8543
|
|
|
4730
8544
|
/**
|
|
4731
8545
|
* AIGatewayService is the frontend-facing proxy over telemetry.api.v1.AIService:
|
|
4732
|
-
* the AI session catalog, one session's conversational replay,
|
|
4733
|
-
* id->name catalog (read + alias write). A thin proxy — it resolves the caller's
|
|
8546
|
+
* the AI session catalog, one session's conversational replay, the principal
|
|
8547
|
+
* id->name catalog (read + alias write), and the global model-price catalog. A thin proxy — it resolves the caller's
|
|
4734
8548
|
* identity, stamps the authorized organization/project, and forwards. Messages
|
|
4735
8549
|
* duplicate the telemetry-api shape (proto domain isolation); unary responses
|
|
4736
8550
|
* carry ResponseStatus, streams do not.
|
|
@@ -4751,12 +8565,31 @@ export interface AIGatewayService {
|
|
|
4751
8565
|
StreamSessionEvents(request: StreamSessionEventsRequest, metadata?: Metadata): Observable<AISessionEventEnvelope>;
|
|
4752
8566
|
ListPrincipals(request: ListPrincipalsRequest, metadata?: Metadata): Promise<ListPrincipalsResponse>;
|
|
4753
8567
|
UpdatePrincipal(request: UpdatePrincipalRequest, metadata?: Metadata): Promise<UpdatePrincipalResponse>;
|
|
8568
|
+
/** Filtered, keyset-paginated drill-down feed of git/GitHub actions (newest first). */
|
|
4754
8569
|
ListGitActivities(request: ListGitActivitiesRequest, metadata?: Metadata): Promise<ListGitActivitiesResponse>;
|
|
4755
8570
|
/**
|
|
4756
|
-
* Live stream of
|
|
8571
|
+
* Live stream of the filtered git/GitHub feed (UPSERT per activity keyed by
|
|
4757
8572
|
* activity_id, a nonterminal GitActivitiesSnapshotCompleted, then open until cancel).
|
|
4758
8573
|
*/
|
|
4759
8574
|
StreamGitActivities(request: StreamGitActivitiesRequest, metadata?: Metadata): Observable<GitActivityFrame>;
|
|
8575
|
+
/**
|
|
8576
|
+
* Time-bucketed rollup of the filtered git activities, sliced by one dimension —
|
|
8577
|
+
* the git dashboard's overview; whole-window totals ride the response.
|
|
8578
|
+
*/
|
|
8579
|
+
GetGitActivitySummary(
|
|
8580
|
+
request: GitActivitySummaryRequest,
|
|
8581
|
+
metadata?: Metadata,
|
|
8582
|
+
): Promise<GetGitActivitySummaryResponse>;
|
|
8583
|
+
/** Live stream of that rollup: a full windowed snapshot re-derived each tick. */
|
|
8584
|
+
StreamGitActivitySummary(request: GitActivitySummaryRequest, metadata?: Metadata): Observable<GitActivitySummary>;
|
|
8585
|
+
/** Per-file working-state feed (keyset-paginated) behind the unlanded-work funnel. */
|
|
8586
|
+
ListFileStates(request: ListFileStatesRequest, metadata?: Metadata): Promise<ListFileStatesResponse>;
|
|
8587
|
+
/** The unlanded-work funnel: aging tiers + discarded (git-invisible churn), observed vs unverified. */
|
|
8588
|
+
GetFileStateSummary(request: FileStateSummaryRequest, metadata?: Metadata): Promise<GetFileStateSummaryResponse>;
|
|
8589
|
+
/** Live stream of the funnel: a complete snapshot re-derived each tick. */
|
|
8590
|
+
StreamFileStateSummary(request: FileStateSummaryRequest, metadata?: Metadata): Observable<FileStateSummary>;
|
|
8591
|
+
/** Latest observed list price per (source, provider, model) from the global catalog. */
|
|
8592
|
+
ListModelPrices(request: ListModelPricesRequest, metadata?: Metadata): Promise<ListModelPricesResponse>;
|
|
4760
8593
|
}
|
|
4761
8594
|
|
|
4762
8595
|
export const AIGatewayServiceServiceName = "gateway.web.v1.AIGatewayService";
|
|
@@ -4774,6 +8607,12 @@ export class AIGatewayServiceClientImpl implements AIGatewayService {
|
|
|
4774
8607
|
this.UpdatePrincipal = this.UpdatePrincipal.bind(this);
|
|
4775
8608
|
this.ListGitActivities = this.ListGitActivities.bind(this);
|
|
4776
8609
|
this.StreamGitActivities = this.StreamGitActivities.bind(this);
|
|
8610
|
+
this.GetGitActivitySummary = this.GetGitActivitySummary.bind(this);
|
|
8611
|
+
this.StreamGitActivitySummary = this.StreamGitActivitySummary.bind(this);
|
|
8612
|
+
this.ListFileStates = this.ListFileStates.bind(this);
|
|
8613
|
+
this.GetFileStateSummary = this.GetFileStateSummary.bind(this);
|
|
8614
|
+
this.StreamFileStateSummary = this.StreamFileStateSummary.bind(this);
|
|
8615
|
+
this.ListModelPrices = this.ListModelPrices.bind(this);
|
|
4777
8616
|
}
|
|
4778
8617
|
ListSessions(request: ListSessionsRequest, metadata?: Metadata): Promise<ListSessionsResponse> {
|
|
4779
8618
|
const data = ListSessionsRequest.encode(request).finish();
|
|
@@ -4822,6 +8661,45 @@ export class AIGatewayServiceClientImpl implements AIGatewayService {
|
|
|
4822
8661
|
const result = this.rpc.serverStreamingRequest(this.service, "StreamGitActivities", data, metadata);
|
|
4823
8662
|
return result.pipe(map((data) => GitActivityFrame.decode(new BinaryReader(data))));
|
|
4824
8663
|
}
|
|
8664
|
+
|
|
8665
|
+
GetGitActivitySummary(
|
|
8666
|
+
request: GitActivitySummaryRequest,
|
|
8667
|
+
metadata?: Metadata,
|
|
8668
|
+
): Promise<GetGitActivitySummaryResponse> {
|
|
8669
|
+
const data = GitActivitySummaryRequest.encode(request).finish();
|
|
8670
|
+
const promise = this.rpc.request(this.service, "GetGitActivitySummary", data, metadata);
|
|
8671
|
+
return promise.then((data) => GetGitActivitySummaryResponse.decode(new BinaryReader(data)));
|
|
8672
|
+
}
|
|
8673
|
+
|
|
8674
|
+
StreamGitActivitySummary(request: GitActivitySummaryRequest, metadata?: Metadata): Observable<GitActivitySummary> {
|
|
8675
|
+
const data = GitActivitySummaryRequest.encode(request).finish();
|
|
8676
|
+
const result = this.rpc.serverStreamingRequest(this.service, "StreamGitActivitySummary", data, metadata);
|
|
8677
|
+
return result.pipe(map((data) => GitActivitySummary.decode(new BinaryReader(data))));
|
|
8678
|
+
}
|
|
8679
|
+
|
|
8680
|
+
ListFileStates(request: ListFileStatesRequest, metadata?: Metadata): Promise<ListFileStatesResponse> {
|
|
8681
|
+
const data = ListFileStatesRequest.encode(request).finish();
|
|
8682
|
+
const promise = this.rpc.request(this.service, "ListFileStates", data, metadata);
|
|
8683
|
+
return promise.then((data) => ListFileStatesResponse.decode(new BinaryReader(data)));
|
|
8684
|
+
}
|
|
8685
|
+
|
|
8686
|
+
GetFileStateSummary(request: FileStateSummaryRequest, metadata?: Metadata): Promise<GetFileStateSummaryResponse> {
|
|
8687
|
+
const data = FileStateSummaryRequest.encode(request).finish();
|
|
8688
|
+
const promise = this.rpc.request(this.service, "GetFileStateSummary", data, metadata);
|
|
8689
|
+
return promise.then((data) => GetFileStateSummaryResponse.decode(new BinaryReader(data)));
|
|
8690
|
+
}
|
|
8691
|
+
|
|
8692
|
+
StreamFileStateSummary(request: FileStateSummaryRequest, metadata?: Metadata): Observable<FileStateSummary> {
|
|
8693
|
+
const data = FileStateSummaryRequest.encode(request).finish();
|
|
8694
|
+
const result = this.rpc.serverStreamingRequest(this.service, "StreamFileStateSummary", data, metadata);
|
|
8695
|
+
return result.pipe(map((data) => FileStateSummary.decode(new BinaryReader(data))));
|
|
8696
|
+
}
|
|
8697
|
+
|
|
8698
|
+
ListModelPrices(request: ListModelPricesRequest, metadata?: Metadata): Promise<ListModelPricesResponse> {
|
|
8699
|
+
const data = ListModelPricesRequest.encode(request).finish();
|
|
8700
|
+
const promise = this.rpc.request(this.service, "ListModelPrices", data, metadata);
|
|
8701
|
+
return promise.then((data) => ListModelPricesResponse.decode(new BinaryReader(data)));
|
|
8702
|
+
}
|
|
4825
8703
|
}
|
|
4826
8704
|
|
|
4827
8705
|
interface Rpc {
|