@miradorlabs/web-grpc 2.58.0 → 2.59.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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@miradorlabs/web-grpc",
3
- "version": "2.58.0",
3
+ "version": "2.59.0",
4
4
  "description": "Generated gRPC (grpc-js) client stubs for the Mirador web gateway.",
5
5
  "main": "index.js",
6
6
  "types": "index.d.ts",
@@ -432,6 +432,63 @@ export function aITokenActivityDimensionToJSON(object: AITokenActivityDimension)
432
432
  }
433
433
  }
434
434
 
435
+ export enum AIResourceDimension {
436
+ AI_RESOURCE_DIMENSION_UNSPECIFIED = 0,
437
+ AI_RESOURCE_DIMENSION_SKILL = 1,
438
+ AI_RESOURCE_DIMENSION_TOOL = 2,
439
+ AI_RESOURCE_DIMENSION_FILE = 3,
440
+ AI_RESOURCE_DIMENSION_URL = 4,
441
+ AI_RESOURCE_DIMENSION_COMMAND = 5,
442
+ UNRECOGNIZED = -1,
443
+ }
444
+
445
+ export function aIResourceDimensionFromJSON(object: any): AIResourceDimension {
446
+ switch (object) {
447
+ case 0:
448
+ case "AI_RESOURCE_DIMENSION_UNSPECIFIED":
449
+ return AIResourceDimension.AI_RESOURCE_DIMENSION_UNSPECIFIED;
450
+ case 1:
451
+ case "AI_RESOURCE_DIMENSION_SKILL":
452
+ return AIResourceDimension.AI_RESOURCE_DIMENSION_SKILL;
453
+ case 2:
454
+ case "AI_RESOURCE_DIMENSION_TOOL":
455
+ return AIResourceDimension.AI_RESOURCE_DIMENSION_TOOL;
456
+ case 3:
457
+ case "AI_RESOURCE_DIMENSION_FILE":
458
+ return AIResourceDimension.AI_RESOURCE_DIMENSION_FILE;
459
+ case 4:
460
+ case "AI_RESOURCE_DIMENSION_URL":
461
+ return AIResourceDimension.AI_RESOURCE_DIMENSION_URL;
462
+ case 5:
463
+ case "AI_RESOURCE_DIMENSION_COMMAND":
464
+ return AIResourceDimension.AI_RESOURCE_DIMENSION_COMMAND;
465
+ case -1:
466
+ case "UNRECOGNIZED":
467
+ default:
468
+ return AIResourceDimension.UNRECOGNIZED;
469
+ }
470
+ }
471
+
472
+ export function aIResourceDimensionToJSON(object: AIResourceDimension): string {
473
+ switch (object) {
474
+ case AIResourceDimension.AI_RESOURCE_DIMENSION_UNSPECIFIED:
475
+ return "AI_RESOURCE_DIMENSION_UNSPECIFIED";
476
+ case AIResourceDimension.AI_RESOURCE_DIMENSION_SKILL:
477
+ return "AI_RESOURCE_DIMENSION_SKILL";
478
+ case AIResourceDimension.AI_RESOURCE_DIMENSION_TOOL:
479
+ return "AI_RESOURCE_DIMENSION_TOOL";
480
+ case AIResourceDimension.AI_RESOURCE_DIMENSION_FILE:
481
+ return "AI_RESOURCE_DIMENSION_FILE";
482
+ case AIResourceDimension.AI_RESOURCE_DIMENSION_URL:
483
+ return "AI_RESOURCE_DIMENSION_URL";
484
+ case AIResourceDimension.AI_RESOURCE_DIMENSION_COMMAND:
485
+ return "AI_RESOURCE_DIMENSION_COMMAND";
486
+ case AIResourceDimension.UNRECOGNIZED:
487
+ default:
488
+ return "UNRECOGNIZED";
489
+ }
490
+ }
491
+
435
492
  export enum AIFileLifecycle {
436
493
  AI_FILE_LIFECYCLE_UNSPECIFIED = 0,
437
494
  AI_FILE_LIFECYCLE_UNLANDED = 1,
@@ -1289,6 +1346,31 @@ export interface ProjectSessionRef {
1289
1346
  lastActivityAt: Date | undefined;
1290
1347
  }
1291
1348
 
1349
+ export interface ResourceRankingsRequest {
1350
+ organizationId: string;
1351
+ projectId: string;
1352
+ filter: AISessionFilter | undefined;
1353
+ dimension: AIResourceDimension;
1354
+ timeWindow: AnalyticsTimeWindow;
1355
+ topN: number;
1356
+ }
1357
+
1358
+ export interface ResourceRankingsResponse {
1359
+ status: ResponseStatus | undefined;
1360
+ rankings: ResourceRanking[];
1361
+ dimension: AIResourceDimension;
1362
+ windowStart: Date | undefined;
1363
+ windowEnd: Date | undefined;
1364
+ asOf: Date | undefined;
1365
+ }
1366
+
1367
+ export interface ResourceRanking {
1368
+ key: string;
1369
+ count: number;
1370
+ priorCount: number;
1371
+ sessionCount: number;
1372
+ }
1373
+
1292
1374
  export interface AIFileFilter {
1293
1375
  repositoryKey: string[];
1294
1376
  ref: string[];
@@ -11047,6 +11129,470 @@ export const ProjectSessionRef: MessageFns<ProjectSessionRef> = {
11047
11129
  },
11048
11130
  };
11049
11131
 
11132
+ function createBaseResourceRankingsRequest(): ResourceRankingsRequest {
11133
+ return { organizationId: "", projectId: "", filter: undefined, dimension: 0, timeWindow: 0, topN: 0 };
11134
+ }
11135
+
11136
+ export const ResourceRankingsRequest: MessageFns<ResourceRankingsRequest> = {
11137
+ encode(message: ResourceRankingsRequest, writer: BinaryWriter = new BinaryWriter()): BinaryWriter {
11138
+ if (message.organizationId !== "") {
11139
+ writer.uint32(10).string(message.organizationId);
11140
+ }
11141
+ if (message.projectId !== "") {
11142
+ writer.uint32(18).string(message.projectId);
11143
+ }
11144
+ if (message.filter !== undefined) {
11145
+ AISessionFilter.encode(message.filter, writer.uint32(26).fork()).join();
11146
+ }
11147
+ if (message.dimension !== 0) {
11148
+ writer.uint32(32).int32(message.dimension);
11149
+ }
11150
+ if (message.timeWindow !== 0) {
11151
+ writer.uint32(40).int32(message.timeWindow);
11152
+ }
11153
+ if (message.topN !== 0) {
11154
+ writer.uint32(48).int32(message.topN);
11155
+ }
11156
+ return writer;
11157
+ },
11158
+
11159
+ decode(input: BinaryReader | Uint8Array, length?: number): ResourceRankingsRequest {
11160
+ const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
11161
+ const previousRecursionDepth = (reader as any).__tsProtoDecodeDepth ?? 0;
11162
+ if (previousRecursionDepth >= 100) {
11163
+ throw new globalThis.Error("protobuf decode recursion limit exceeded");
11164
+ }
11165
+ (reader as any).__tsProtoDecodeDepth = previousRecursionDepth + 1;
11166
+ try {
11167
+ const end = length === undefined ? reader.len : reader.pos + length;
11168
+ const message = createBaseResourceRankingsRequest();
11169
+ while (reader.pos < end) {
11170
+ const tag = reader.uint32();
11171
+ switch (tag >>> 3) {
11172
+ case 1: {
11173
+ if (tag !== 10) {
11174
+ break;
11175
+ }
11176
+
11177
+ message.organizationId = reader.string();
11178
+ continue;
11179
+ }
11180
+ case 2: {
11181
+ if (tag !== 18) {
11182
+ break;
11183
+ }
11184
+
11185
+ message.projectId = reader.string();
11186
+ continue;
11187
+ }
11188
+ case 3: {
11189
+ if (tag !== 26) {
11190
+ break;
11191
+ }
11192
+
11193
+ message.filter = AISessionFilter.decode(reader, reader.uint32());
11194
+ continue;
11195
+ }
11196
+ case 4: {
11197
+ if (tag !== 32) {
11198
+ break;
11199
+ }
11200
+
11201
+ message.dimension = reader.int32() as any;
11202
+ continue;
11203
+ }
11204
+ case 5: {
11205
+ if (tag !== 40) {
11206
+ break;
11207
+ }
11208
+
11209
+ message.timeWindow = reader.int32() as any;
11210
+ continue;
11211
+ }
11212
+ case 6: {
11213
+ if (tag !== 48) {
11214
+ break;
11215
+ }
11216
+
11217
+ message.topN = reader.int32();
11218
+ continue;
11219
+ }
11220
+ }
11221
+ if ((tag & 7) === 4 || tag === 0) {
11222
+ break;
11223
+ }
11224
+ reader.skip(tag & 7);
11225
+ }
11226
+ return message;
11227
+ } finally {
11228
+ (reader as any).__tsProtoDecodeDepth = previousRecursionDepth;
11229
+ }
11230
+ },
11231
+
11232
+ fromJSON(object: any): ResourceRankingsRequest {
11233
+ return {
11234
+ organizationId: isSet(object.organizationId)
11235
+ ? globalThis.String(object.organizationId)
11236
+ : isSet(object.organization_id)
11237
+ ? globalThis.String(object.organization_id)
11238
+ : "",
11239
+ projectId: isSet(object.projectId)
11240
+ ? globalThis.String(object.projectId)
11241
+ : isSet(object.project_id)
11242
+ ? globalThis.String(object.project_id)
11243
+ : "",
11244
+ filter: isSet(object.filter) ? AISessionFilter.fromJSON(object.filter) : undefined,
11245
+ dimension: isSet(object.dimension) ? aIResourceDimensionFromJSON(object.dimension) : 0,
11246
+ timeWindow: isSet(object.timeWindow)
11247
+ ? analyticsTimeWindowFromJSON(object.timeWindow)
11248
+ : isSet(object.time_window)
11249
+ ? analyticsTimeWindowFromJSON(object.time_window)
11250
+ : 0,
11251
+ topN: isSet(object.topN)
11252
+ ? globalThis.Number(object.topN)
11253
+ : isSet(object.top_n)
11254
+ ? globalThis.Number(object.top_n)
11255
+ : 0,
11256
+ };
11257
+ },
11258
+
11259
+ toJSON(message: ResourceRankingsRequest): unknown {
11260
+ const obj: any = {};
11261
+ if (message.organizationId !== "") {
11262
+ obj.organizationId = message.organizationId;
11263
+ }
11264
+ if (message.projectId !== "") {
11265
+ obj.projectId = message.projectId;
11266
+ }
11267
+ if (message.filter !== undefined) {
11268
+ obj.filter = AISessionFilter.toJSON(message.filter);
11269
+ }
11270
+ if (message.dimension !== 0) {
11271
+ obj.dimension = aIResourceDimensionToJSON(message.dimension);
11272
+ }
11273
+ if (message.timeWindow !== 0) {
11274
+ obj.timeWindow = analyticsTimeWindowToJSON(message.timeWindow);
11275
+ }
11276
+ if (message.topN !== 0) {
11277
+ obj.topN = Math.round(message.topN);
11278
+ }
11279
+ return obj;
11280
+ },
11281
+
11282
+ create<I extends Exact<DeepPartial<ResourceRankingsRequest>, I>>(base?: I): ResourceRankingsRequest {
11283
+ return ResourceRankingsRequest.fromPartial(base ?? ({} as any));
11284
+ },
11285
+ fromPartial<I extends Exact<DeepPartial<ResourceRankingsRequest>, I>>(object: I): ResourceRankingsRequest {
11286
+ const message = createBaseResourceRankingsRequest();
11287
+ message.organizationId = object.organizationId ?? "";
11288
+ message.projectId = object.projectId ?? "";
11289
+ message.filter = (object.filter !== undefined && object.filter !== null)
11290
+ ? AISessionFilter.fromPartial(object.filter)
11291
+ : undefined;
11292
+ message.dimension = object.dimension ?? 0;
11293
+ message.timeWindow = object.timeWindow ?? 0;
11294
+ message.topN = object.topN ?? 0;
11295
+ return message;
11296
+ },
11297
+ };
11298
+
11299
+ function createBaseResourceRankingsResponse(): ResourceRankingsResponse {
11300
+ return {
11301
+ status: undefined,
11302
+ rankings: [],
11303
+ dimension: 0,
11304
+ windowStart: undefined,
11305
+ windowEnd: undefined,
11306
+ asOf: undefined,
11307
+ };
11308
+ }
11309
+
11310
+ export const ResourceRankingsResponse: MessageFns<ResourceRankingsResponse> = {
11311
+ encode(message: ResourceRankingsResponse, writer: BinaryWriter = new BinaryWriter()): BinaryWriter {
11312
+ if (message.status !== undefined) {
11313
+ ResponseStatus.encode(message.status, writer.uint32(10).fork()).join();
11314
+ }
11315
+ for (const v of message.rankings) {
11316
+ ResourceRanking.encode(v!, writer.uint32(18).fork()).join();
11317
+ }
11318
+ if (message.dimension !== 0) {
11319
+ writer.uint32(24).int32(message.dimension);
11320
+ }
11321
+ if (message.windowStart !== undefined) {
11322
+ Timestamp.encode(toTimestamp(message.windowStart), writer.uint32(34).fork()).join();
11323
+ }
11324
+ if (message.windowEnd !== undefined) {
11325
+ Timestamp.encode(toTimestamp(message.windowEnd), writer.uint32(42).fork()).join();
11326
+ }
11327
+ if (message.asOf !== undefined) {
11328
+ Timestamp.encode(toTimestamp(message.asOf), writer.uint32(50).fork()).join();
11329
+ }
11330
+ return writer;
11331
+ },
11332
+
11333
+ decode(input: BinaryReader | Uint8Array, length?: number): ResourceRankingsResponse {
11334
+ const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
11335
+ const previousRecursionDepth = (reader as any).__tsProtoDecodeDepth ?? 0;
11336
+ if (previousRecursionDepth >= 100) {
11337
+ throw new globalThis.Error("protobuf decode recursion limit exceeded");
11338
+ }
11339
+ (reader as any).__tsProtoDecodeDepth = previousRecursionDepth + 1;
11340
+ try {
11341
+ const end = length === undefined ? reader.len : reader.pos + length;
11342
+ const message = createBaseResourceRankingsResponse();
11343
+ while (reader.pos < end) {
11344
+ const tag = reader.uint32();
11345
+ switch (tag >>> 3) {
11346
+ case 1: {
11347
+ if (tag !== 10) {
11348
+ break;
11349
+ }
11350
+
11351
+ message.status = ResponseStatus.decode(reader, reader.uint32());
11352
+ continue;
11353
+ }
11354
+ case 2: {
11355
+ if (tag !== 18) {
11356
+ break;
11357
+ }
11358
+
11359
+ message.rankings.push(ResourceRanking.decode(reader, reader.uint32()));
11360
+ continue;
11361
+ }
11362
+ case 3: {
11363
+ if (tag !== 24) {
11364
+ break;
11365
+ }
11366
+
11367
+ message.dimension = reader.int32() as any;
11368
+ continue;
11369
+ }
11370
+ case 4: {
11371
+ if (tag !== 34) {
11372
+ break;
11373
+ }
11374
+
11375
+ message.windowStart = fromTimestamp(Timestamp.decode(reader, reader.uint32()));
11376
+ continue;
11377
+ }
11378
+ case 5: {
11379
+ if (tag !== 42) {
11380
+ break;
11381
+ }
11382
+
11383
+ message.windowEnd = fromTimestamp(Timestamp.decode(reader, reader.uint32()));
11384
+ continue;
11385
+ }
11386
+ case 6: {
11387
+ if (tag !== 50) {
11388
+ break;
11389
+ }
11390
+
11391
+ message.asOf = fromTimestamp(Timestamp.decode(reader, reader.uint32()));
11392
+ continue;
11393
+ }
11394
+ }
11395
+ if ((tag & 7) === 4 || tag === 0) {
11396
+ break;
11397
+ }
11398
+ reader.skip(tag & 7);
11399
+ }
11400
+ return message;
11401
+ } finally {
11402
+ (reader as any).__tsProtoDecodeDepth = previousRecursionDepth;
11403
+ }
11404
+ },
11405
+
11406
+ fromJSON(object: any): ResourceRankingsResponse {
11407
+ return {
11408
+ status: isSet(object.status) ? ResponseStatus.fromJSON(object.status) : undefined,
11409
+ rankings: globalThis.Array.isArray(object?.rankings)
11410
+ ? object.rankings.map((e: any) => ResourceRanking.fromJSON(e))
11411
+ : [],
11412
+ dimension: isSet(object.dimension) ? aIResourceDimensionFromJSON(object.dimension) : 0,
11413
+ windowStart: isSet(object.windowStart)
11414
+ ? fromJsonTimestamp(object.windowStart)
11415
+ : isSet(object.window_start)
11416
+ ? fromJsonTimestamp(object.window_start)
11417
+ : undefined,
11418
+ windowEnd: isSet(object.windowEnd)
11419
+ ? fromJsonTimestamp(object.windowEnd)
11420
+ : isSet(object.window_end)
11421
+ ? fromJsonTimestamp(object.window_end)
11422
+ : undefined,
11423
+ asOf: isSet(object.asOf)
11424
+ ? fromJsonTimestamp(object.asOf)
11425
+ : isSet(object.as_of)
11426
+ ? fromJsonTimestamp(object.as_of)
11427
+ : undefined,
11428
+ };
11429
+ },
11430
+
11431
+ toJSON(message: ResourceRankingsResponse): unknown {
11432
+ const obj: any = {};
11433
+ if (message.status !== undefined) {
11434
+ obj.status = ResponseStatus.toJSON(message.status);
11435
+ }
11436
+ if (message.rankings?.length) {
11437
+ obj.rankings = message.rankings.map((e) => ResourceRanking.toJSON(e));
11438
+ }
11439
+ if (message.dimension !== 0) {
11440
+ obj.dimension = aIResourceDimensionToJSON(message.dimension);
11441
+ }
11442
+ if (message.windowStart !== undefined) {
11443
+ obj.windowStart = message.windowStart.toISOString();
11444
+ }
11445
+ if (message.windowEnd !== undefined) {
11446
+ obj.windowEnd = message.windowEnd.toISOString();
11447
+ }
11448
+ if (message.asOf !== undefined) {
11449
+ obj.asOf = message.asOf.toISOString();
11450
+ }
11451
+ return obj;
11452
+ },
11453
+
11454
+ create<I extends Exact<DeepPartial<ResourceRankingsResponse>, I>>(base?: I): ResourceRankingsResponse {
11455
+ return ResourceRankingsResponse.fromPartial(base ?? ({} as any));
11456
+ },
11457
+ fromPartial<I extends Exact<DeepPartial<ResourceRankingsResponse>, I>>(object: I): ResourceRankingsResponse {
11458
+ const message = createBaseResourceRankingsResponse();
11459
+ message.status = (object.status !== undefined && object.status !== null)
11460
+ ? ResponseStatus.fromPartial(object.status)
11461
+ : undefined;
11462
+ message.rankings = object.rankings?.map((e) => ResourceRanking.fromPartial(e)) || [];
11463
+ message.dimension = object.dimension ?? 0;
11464
+ message.windowStart = object.windowStart ?? undefined;
11465
+ message.windowEnd = object.windowEnd ?? undefined;
11466
+ message.asOf = object.asOf ?? undefined;
11467
+ return message;
11468
+ },
11469
+ };
11470
+
11471
+ function createBaseResourceRanking(): ResourceRanking {
11472
+ return { key: "", count: 0, priorCount: 0, sessionCount: 0 };
11473
+ }
11474
+
11475
+ export const ResourceRanking: MessageFns<ResourceRanking> = {
11476
+ encode(message: ResourceRanking, writer: BinaryWriter = new BinaryWriter()): BinaryWriter {
11477
+ if (message.key !== "") {
11478
+ writer.uint32(10).string(message.key);
11479
+ }
11480
+ if (message.count !== 0) {
11481
+ writer.uint32(16).uint64(message.count);
11482
+ }
11483
+ if (message.priorCount !== 0) {
11484
+ writer.uint32(24).uint64(message.priorCount);
11485
+ }
11486
+ if (message.sessionCount !== 0) {
11487
+ writer.uint32(32).uint64(message.sessionCount);
11488
+ }
11489
+ return writer;
11490
+ },
11491
+
11492
+ decode(input: BinaryReader | Uint8Array, length?: number): ResourceRanking {
11493
+ const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
11494
+ const previousRecursionDepth = (reader as any).__tsProtoDecodeDepth ?? 0;
11495
+ if (previousRecursionDepth >= 100) {
11496
+ throw new globalThis.Error("protobuf decode recursion limit exceeded");
11497
+ }
11498
+ (reader as any).__tsProtoDecodeDepth = previousRecursionDepth + 1;
11499
+ try {
11500
+ const end = length === undefined ? reader.len : reader.pos + length;
11501
+ const message = createBaseResourceRanking();
11502
+ while (reader.pos < end) {
11503
+ const tag = reader.uint32();
11504
+ switch (tag >>> 3) {
11505
+ case 1: {
11506
+ if (tag !== 10) {
11507
+ break;
11508
+ }
11509
+
11510
+ message.key = reader.string();
11511
+ continue;
11512
+ }
11513
+ case 2: {
11514
+ if (tag !== 16) {
11515
+ break;
11516
+ }
11517
+
11518
+ message.count = longToNumber(reader.uint64());
11519
+ continue;
11520
+ }
11521
+ case 3: {
11522
+ if (tag !== 24) {
11523
+ break;
11524
+ }
11525
+
11526
+ message.priorCount = longToNumber(reader.uint64());
11527
+ continue;
11528
+ }
11529
+ case 4: {
11530
+ if (tag !== 32) {
11531
+ break;
11532
+ }
11533
+
11534
+ message.sessionCount = longToNumber(reader.uint64());
11535
+ continue;
11536
+ }
11537
+ }
11538
+ if ((tag & 7) === 4 || tag === 0) {
11539
+ break;
11540
+ }
11541
+ reader.skip(tag & 7);
11542
+ }
11543
+ return message;
11544
+ } finally {
11545
+ (reader as any).__tsProtoDecodeDepth = previousRecursionDepth;
11546
+ }
11547
+ },
11548
+
11549
+ fromJSON(object: any): ResourceRanking {
11550
+ return {
11551
+ key: isSet(object.key) ? globalThis.String(object.key) : "",
11552
+ count: isSet(object.count) ? globalThis.Number(object.count) : 0,
11553
+ priorCount: isSet(object.priorCount)
11554
+ ? globalThis.Number(object.priorCount)
11555
+ : isSet(object.prior_count)
11556
+ ? globalThis.Number(object.prior_count)
11557
+ : 0,
11558
+ sessionCount: isSet(object.sessionCount)
11559
+ ? globalThis.Number(object.sessionCount)
11560
+ : isSet(object.session_count)
11561
+ ? globalThis.Number(object.session_count)
11562
+ : 0,
11563
+ };
11564
+ },
11565
+
11566
+ toJSON(message: ResourceRanking): unknown {
11567
+ const obj: any = {};
11568
+ if (message.key !== "") {
11569
+ obj.key = message.key;
11570
+ }
11571
+ if (message.count !== 0) {
11572
+ obj.count = Math.round(message.count);
11573
+ }
11574
+ if (message.priorCount !== 0) {
11575
+ obj.priorCount = Math.round(message.priorCount);
11576
+ }
11577
+ if (message.sessionCount !== 0) {
11578
+ obj.sessionCount = Math.round(message.sessionCount);
11579
+ }
11580
+ return obj;
11581
+ },
11582
+
11583
+ create<I extends Exact<DeepPartial<ResourceRanking>, I>>(base?: I): ResourceRanking {
11584
+ return ResourceRanking.fromPartial(base ?? ({} as any));
11585
+ },
11586
+ fromPartial<I extends Exact<DeepPartial<ResourceRanking>, I>>(object: I): ResourceRanking {
11587
+ const message = createBaseResourceRanking();
11588
+ message.key = object.key ?? "";
11589
+ message.count = object.count ?? 0;
11590
+ message.priorCount = object.priorCount ?? 0;
11591
+ message.sessionCount = object.sessionCount ?? 0;
11592
+ return message;
11593
+ },
11594
+ };
11595
+
11050
11596
  function createBaseAIFileFilter(): AIFileFilter {
11051
11597
  return {
11052
11598
  repositoryKey: [],
@@ -13833,6 +14379,12 @@ export interface AIGatewayService {
13833
14379
  request: ListModelPriceHistoryRequest,
13834
14380
  metadata?: Metadata,
13835
14381
  ): Promise<ListModelPriceHistoryResponse>;
14382
+ /**
14383
+ * Top-N most-used resources of one kind (skills / tools / files / URLs / bash commands) over a
14384
+ * sliding window, each with the prior equal-length window's count for a trend delta and distinct
14385
+ * sessions. Mirrors telemetry.api.v1.
14386
+ */
14387
+ ListResourceRankings(request: ResourceRankingsRequest, metadata?: Metadata): Promise<ResourceRankingsResponse>;
13836
14388
  }
13837
14389
 
13838
14390
  export const AIGatewayServiceServiceName = "gateway.web.v1.AIGatewayService";
@@ -13862,6 +14414,7 @@ export class AIGatewayServiceClientImpl implements AIGatewayService {
13862
14414
  this.StreamFilesSummary = this.StreamFilesSummary.bind(this);
13863
14415
  this.ListModelPrices = this.ListModelPrices.bind(this);
13864
14416
  this.ListModelPriceHistory = this.ListModelPriceHistory.bind(this);
14417
+ this.ListResourceRankings = this.ListResourceRankings.bind(this);
13865
14418
  }
13866
14419
  ListSessions(request: ListSessionsRequest, metadata?: Metadata): Promise<ListSessionsResponse> {
13867
14420
  const data = ListSessionsRequest.encode(request).finish();
@@ -13991,6 +14544,12 @@ export class AIGatewayServiceClientImpl implements AIGatewayService {
13991
14544
  const promise = this.rpc.request(this.service, "ListModelPriceHistory", data, metadata);
13992
14545
  return promise.then((data) => ListModelPriceHistoryResponse.decode(new BinaryReader(data)));
13993
14546
  }
14547
+
14548
+ ListResourceRankings(request: ResourceRankingsRequest, metadata?: Metadata): Promise<ResourceRankingsResponse> {
14549
+ const data = ResourceRankingsRequest.encode(request).finish();
14550
+ const promise = this.rpc.request(this.service, "ListResourceRankings", data, metadata);
14551
+ return promise.then((data) => ResourceRankingsResponse.decode(new BinaryReader(data)));
14552
+ }
13994
14553
  }
13995
14554
 
13996
14555
  interface Rpc {
@@ -316,6 +316,28 @@ function deserialize_gateway_web_v1_ProjectOverviewRequest(buffer_arg) {
316
316
  return proto_gateway_web_v1_ai_gateway_pb.ProjectOverviewRequest.deserializeBinary(new Uint8Array(buffer_arg));
317
317
  }
318
318
 
319
+ function serialize_gateway_web_v1_ResourceRankingsRequest(arg) {
320
+ if (!(arg instanceof proto_gateway_web_v1_ai_gateway_pb.ResourceRankingsRequest)) {
321
+ throw new Error('Expected argument of type gateway.web.v1.ResourceRankingsRequest');
322
+ }
323
+ return Buffer.from(arg.serializeBinary());
324
+ }
325
+
326
+ function deserialize_gateway_web_v1_ResourceRankingsRequest(buffer_arg) {
327
+ return proto_gateway_web_v1_ai_gateway_pb.ResourceRankingsRequest.deserializeBinary(new Uint8Array(buffer_arg));
328
+ }
329
+
330
+ function serialize_gateway_web_v1_ResourceRankingsResponse(arg) {
331
+ if (!(arg instanceof proto_gateway_web_v1_ai_gateway_pb.ResourceRankingsResponse)) {
332
+ throw new Error('Expected argument of type gateway.web.v1.ResourceRankingsResponse');
333
+ }
334
+ return Buffer.from(arg.serializeBinary());
335
+ }
336
+
337
+ function deserialize_gateway_web_v1_ResourceRankingsResponse(buffer_arg) {
338
+ return proto_gateway_web_v1_ai_gateway_pb.ResourceRankingsResponse.deserializeBinary(new Uint8Array(buffer_arg));
339
+ }
340
+
319
341
  function serialize_gateway_web_v1_SessionFileChanges(arg) {
320
342
  if (!(arg instanceof proto_gateway_web_v1_ai_gateway_pb.SessionFileChanges)) {
321
343
  throw new Error('Expected argument of type gateway.web.v1.SessionFileChanges');
@@ -701,6 +723,20 @@ listModelPriceHistory: {
701
723
  responseSerialize: serialize_gateway_web_v1_ListModelPriceHistoryResponse,
702
724
  responseDeserialize: deserialize_gateway_web_v1_ListModelPriceHistoryResponse,
703
725
  },
726
+ // Top-N most-used resources of one kind (skills / tools / files / URLs / bash commands) over a
727
+ // sliding window, each with the prior equal-length window's count for a trend delta and distinct
728
+ // sessions. Mirrors telemetry.api.v1.
729
+ listResourceRankings: {
730
+ path: '/gateway.web.v1.AIGatewayService/ListResourceRankings',
731
+ requestStream: false,
732
+ responseStream: false,
733
+ requestType: proto_gateway_web_v1_ai_gateway_pb.ResourceRankingsRequest,
734
+ responseType: proto_gateway_web_v1_ai_gateway_pb.ResourceRankingsResponse,
735
+ requestSerialize: serialize_gateway_web_v1_ResourceRankingsRequest,
736
+ requestDeserialize: deserialize_gateway_web_v1_ResourceRankingsRequest,
737
+ responseSerialize: serialize_gateway_web_v1_ResourceRankingsResponse,
738
+ responseDeserialize: deserialize_gateway_web_v1_ResourceRankingsResponse,
739
+ },
704
740
  };
705
741
 
706
742
  exports.AIGatewayServiceClient = grpc.makeGenericClientConstructor(AIGatewayServiceService, 'AIGatewayService');