@miradorlabs/web-grpc 3.35.0 → 3.36.1

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": "3.35.0",
3
+ "version": "3.36.1",
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",
@@ -454,8 +454,6 @@ export enum AISpendForecastDimension {
454
454
  AI_SPEND_FORECAST_DIMENSION_MODEL = 1,
455
455
  AI_SPEND_FORECAST_DIMENSION_PROVIDER = 2,
456
456
  AI_SPEND_FORECAST_DIMENSION_SOURCE_SYSTEM = 3,
457
- AI_SPEND_FORECAST_DIMENSION_USER = 4,
458
- AI_SPEND_FORECAST_DIMENSION_API_KEY = 5,
459
457
  UNRECOGNIZED = -1,
460
458
  }
461
459
 
@@ -473,12 +471,6 @@ export function aISpendForecastDimensionFromJSON(object: any): AISpendForecastDi
473
471
  case 3:
474
472
  case "AI_SPEND_FORECAST_DIMENSION_SOURCE_SYSTEM":
475
473
  return AISpendForecastDimension.AI_SPEND_FORECAST_DIMENSION_SOURCE_SYSTEM;
476
- case 4:
477
- case "AI_SPEND_FORECAST_DIMENSION_USER":
478
- return AISpendForecastDimension.AI_SPEND_FORECAST_DIMENSION_USER;
479
- case 5:
480
- case "AI_SPEND_FORECAST_DIMENSION_API_KEY":
481
- return AISpendForecastDimension.AI_SPEND_FORECAST_DIMENSION_API_KEY;
482
474
  case -1:
483
475
  case "UNRECOGNIZED":
484
476
  default:
@@ -496,10 +488,6 @@ export function aISpendForecastDimensionToJSON(object: AISpendForecastDimension)
496
488
  return "AI_SPEND_FORECAST_DIMENSION_PROVIDER";
497
489
  case AISpendForecastDimension.AI_SPEND_FORECAST_DIMENSION_SOURCE_SYSTEM:
498
490
  return "AI_SPEND_FORECAST_DIMENSION_SOURCE_SYSTEM";
499
- case AISpendForecastDimension.AI_SPEND_FORECAST_DIMENSION_USER:
500
- return "AI_SPEND_FORECAST_DIMENSION_USER";
501
- case AISpendForecastDimension.AI_SPEND_FORECAST_DIMENSION_API_KEY:
502
- return "AI_SPEND_FORECAST_DIMENSION_API_KEY";
503
491
  case AISpendForecastDimension.UNRECOGNIZED:
504
492
  default:
505
493
  return "UNRECOGNIZED";
@@ -1692,14 +1680,23 @@ export interface SpendForecastRequest {
1692
1680
  filter: SpendForecastFilter | undefined;
1693
1681
  }
1694
1682
 
1695
- /** SpendForecastFilter narrows the cost a forecast counts. An empty list does not filter. */
1683
+ /**
1684
+ * SpendForecastFilter narrows the cost a forecast counts: OR within a list, AND across lists, and an empty list does
1685
+ * not filter. source_systems and principals select as DailyActivityRequest.Filter's do, at most 500 entries each.
1686
+ */
1696
1687
  export interface SpendForecastFilter {
1697
1688
  /**
1698
- * OR within the list. UNKNOWN selects every cost off the three named facilities (observed-unknown, never-stamped
1699
- * or an unrecognized facility); UNSPECIFIED is rejected.
1689
+ * UNKNOWN selects every cost off the three named facilities (observed-unknown, never-stamped or an unrecognized
1690
+ * facility); UNSPECIFIED is rejected.
1700
1691
  * [API_METERED, PREPAID_CREDITS, UNKNOWN] is the cost not drawn on a subscription facility.
1701
1692
  */
1702
1693
  fundingModes: AIFundingMode[];
1694
+ sourceSystems: string[];
1695
+ /**
1696
+ * Cost belongs to its user id, else its api key: an api-key principal matches only cost with no user id. A
1697
+ * principal with an empty id selects cost that recorded neither.
1698
+ */
1699
+ principals: DailyActivityPrincipal[];
1703
1700
  }
1704
1701
 
1705
1702
  /**
@@ -1731,7 +1728,17 @@ export interface SpendForecast {
1731
1728
  * projection.expected_usd exactly; a group's low_usd and high_usd do not sum to total's.
1732
1729
  */
1733
1730
  breakdowns: SpendForecastBreakdown[];
1734
- asOf: Date | undefined;
1731
+ asOf:
1732
+ | Date
1733
+ | undefined;
1734
+ /**
1735
+ * The cost per principal, attributed as filter.principals selects it (user id, else api key), for principals with
1736
+ * cost in the month or the replayed history (one absent spent nothing), ascending by (source_system, kind, id).
1737
+ * Partitions total's month_to_date_usd and projection.expected_usd exactly; the entry with kind API_KEY and an
1738
+ * empty id is the cost that recorded neither id. Sent back as a filter principal an entry selects its own cost; one
1739
+ * with an empty source_system needs source_systems [""] beside it, as a filter's empty source means any.
1740
+ */
1741
+ principals: SpendForecastPrincipal[];
1735
1742
  }
1736
1743
 
1737
1744
  export interface SpendForecastBreakdown {
@@ -1746,6 +1753,12 @@ export interface SpendForecastGroup {
1746
1753
  measures: SpendForecastMeasures | undefined;
1747
1754
  }
1748
1755
 
1756
+ /** SpendForecastPrincipal is one principal's cost, on the source system that reported it. */
1757
+ export interface SpendForecastPrincipal {
1758
+ principal: DailyActivityPrincipal | undefined;
1759
+ measures: SpendForecastMeasures | undefined;
1760
+ }
1761
+
1749
1762
  export interface SpendForecastMeasures {
1750
1763
  monthToDateUsd: number;
1751
1764
  /** absent when history_weeks is 0 */
@@ -2107,6 +2120,7 @@ export interface AIFileRow {
2107
2120
  lastPushedAt: Date | undefined;
2108
2121
  discardedAt: Date | undefined;
2109
2122
  discardReason: string;
2123
+ /** The kept checkout copies' stored edit counts summed; 4294967295 means at least that many. */
2110
2124
  editCount: number;
2111
2125
  /** unique, sorted by (source_system, session_id) */
2112
2126
  sessions: AISessionRef[];
@@ -2184,8 +2198,10 @@ export interface FileTiers {
2184
2198
  }
2185
2199
 
2186
2200
  export interface FileTierBucket {
2201
+ /** distinct (repository_key, ref, path) with a copy in the bucket */
2187
2202
  files: number;
2188
2203
  branches: number;
2204
+ /** distinct (source_system, session_id) across the bucket's copies */
2189
2205
  sessions: number;
2190
2206
  costUsd: number;
2191
2207
  outputTokens: number;
@@ -12048,7 +12064,7 @@ export const SpendForecastRequest: MessageFns<SpendForecastRequest> = {
12048
12064
  };
12049
12065
 
12050
12066
  function createBaseSpendForecastFilter(): SpendForecastFilter {
12051
- return { fundingModes: [] };
12067
+ return { fundingModes: [], sourceSystems: [], principals: [] };
12052
12068
  }
12053
12069
 
12054
12070
  export const SpendForecastFilter: MessageFns<SpendForecastFilter> = {
@@ -12056,6 +12072,12 @@ export const SpendForecastFilter: MessageFns<SpendForecastFilter> = {
12056
12072
  for (const v of message.fundingModes) {
12057
12073
  writer.uint32(8).int32(v!);
12058
12074
  }
12075
+ for (const v of message.sourceSystems) {
12076
+ writer.uint32(18).string(v!);
12077
+ }
12078
+ for (const v of message.principals) {
12079
+ DailyActivityPrincipal.encode(v!, writer.uint32(26).fork()).join();
12080
+ }
12059
12081
  return writer;
12060
12082
  },
12061
12083
 
@@ -12090,6 +12112,22 @@ export const SpendForecastFilter: MessageFns<SpendForecastFilter> = {
12090
12112
 
12091
12113
  break;
12092
12114
  }
12115
+ case 2: {
12116
+ if (tag !== 18) {
12117
+ break;
12118
+ }
12119
+
12120
+ message.sourceSystems.push(reader.string());
12121
+ continue;
12122
+ }
12123
+ case 3: {
12124
+ if (tag !== 26) {
12125
+ break;
12126
+ }
12127
+
12128
+ message.principals.push(DailyActivityPrincipal.decode(reader, reader.uint32()));
12129
+ continue;
12130
+ }
12093
12131
  }
12094
12132
  if ((tag & 7) === 4 || tag === 0) {
12095
12133
  break;
@@ -12109,6 +12147,14 @@ export const SpendForecastFilter: MessageFns<SpendForecastFilter> = {
12109
12147
  : globalThis.Array.isArray(object?.funding_modes)
12110
12148
  ? object.funding_modes.map((e: any) => aIFundingModeFromJSON(e))
12111
12149
  : [],
12150
+ sourceSystems: globalThis.Array.isArray(object?.sourceSystems)
12151
+ ? object.sourceSystems.map((e: any) => globalThis.String(e))
12152
+ : globalThis.Array.isArray(object?.source_systems)
12153
+ ? object.source_systems.map((e: any) => globalThis.String(e))
12154
+ : [],
12155
+ principals: globalThis.Array.isArray(object?.principals)
12156
+ ? object.principals.map((e: any) => DailyActivityPrincipal.fromJSON(e))
12157
+ : [],
12112
12158
  };
12113
12159
  },
12114
12160
 
@@ -12117,6 +12163,12 @@ export const SpendForecastFilter: MessageFns<SpendForecastFilter> = {
12117
12163
  if (message.fundingModes?.length) {
12118
12164
  obj.fundingModes = message.fundingModes.map((e) => aIFundingModeToJSON(e));
12119
12165
  }
12166
+ if (message.sourceSystems?.length) {
12167
+ obj.sourceSystems = message.sourceSystems;
12168
+ }
12169
+ if (message.principals?.length) {
12170
+ obj.principals = message.principals.map((e) => DailyActivityPrincipal.toJSON(e));
12171
+ }
12120
12172
  return obj;
12121
12173
  },
12122
12174
 
@@ -12126,6 +12178,8 @@ export const SpendForecastFilter: MessageFns<SpendForecastFilter> = {
12126
12178
  fromPartial<I extends Exact<DeepPartial<SpendForecastFilter>, I>>(object: I): SpendForecastFilter {
12127
12179
  const message = createBaseSpendForecastFilter();
12128
12180
  message.fundingModes = object.fundingModes?.map((e) => e) || [];
12181
+ message.sourceSystems = object.sourceSystems?.map((e) => e) || [];
12182
+ message.principals = object.principals?.map((e) => DailyActivityPrincipal.fromPartial(e)) || [];
12129
12183
  return message;
12130
12184
  },
12131
12185
  };
@@ -12140,6 +12194,7 @@ function createBaseSpendForecast(): SpendForecast {
12140
12194
  total: undefined,
12141
12195
  breakdowns: [],
12142
12196
  asOf: undefined,
12197
+ principals: [],
12143
12198
  };
12144
12199
  }
12145
12200
 
@@ -12169,6 +12224,9 @@ export const SpendForecast: MessageFns<SpendForecast> = {
12169
12224
  if (message.asOf !== undefined) {
12170
12225
  Timestamp.encode(toTimestamp(message.asOf), writer.uint32(66).fork()).join();
12171
12226
  }
12227
+ for (const v of message.principals) {
12228
+ SpendForecastPrincipal.encode(v!, writer.uint32(74).fork()).join();
12229
+ }
12172
12230
  return writer;
12173
12231
  },
12174
12232
 
@@ -12249,6 +12307,14 @@ export const SpendForecast: MessageFns<SpendForecast> = {
12249
12307
  message.asOf = fromTimestamp(Timestamp.decode(reader, reader.uint32()));
12250
12308
  continue;
12251
12309
  }
12310
+ case 9: {
12311
+ if (tag !== 74) {
12312
+ break;
12313
+ }
12314
+
12315
+ message.principals.push(SpendForecastPrincipal.decode(reader, reader.uint32()));
12316
+ continue;
12317
+ }
12252
12318
  }
12253
12319
  if ((tag & 7) === 4 || tag === 0) {
12254
12320
  break;
@@ -12293,6 +12359,9 @@ export const SpendForecast: MessageFns<SpendForecast> = {
12293
12359
  : isSet(object.as_of)
12294
12360
  ? fromJsonTimestamp(object.as_of)
12295
12361
  : undefined,
12362
+ principals: globalThis.Array.isArray(object?.principals)
12363
+ ? object.principals.map((e: any) => SpendForecastPrincipal.fromJSON(e))
12364
+ : [],
12296
12365
  };
12297
12366
  },
12298
12367
 
@@ -12322,6 +12391,9 @@ export const SpendForecast: MessageFns<SpendForecast> = {
12322
12391
  if (message.asOf !== undefined) {
12323
12392
  obj.asOf = message.asOf.toISOString();
12324
12393
  }
12394
+ if (message.principals?.length) {
12395
+ obj.principals = message.principals.map((e) => SpendForecastPrincipal.toJSON(e));
12396
+ }
12325
12397
  return obj;
12326
12398
  },
12327
12399
 
@@ -12340,6 +12412,7 @@ export const SpendForecast: MessageFns<SpendForecast> = {
12340
12412
  : undefined;
12341
12413
  message.breakdowns = object.breakdowns?.map((e) => SpendForecastBreakdown.fromPartial(e)) || [];
12342
12414
  message.asOf = object.asOf ?? undefined;
12415
+ message.principals = object.principals?.map((e) => SpendForecastPrincipal.fromPartial(e)) || [];
12343
12416
  return message;
12344
12417
  },
12345
12418
  };
@@ -12518,6 +12591,95 @@ export const SpendForecastGroup: MessageFns<SpendForecastGroup> = {
12518
12591
  },
12519
12592
  };
12520
12593
 
12594
+ function createBaseSpendForecastPrincipal(): SpendForecastPrincipal {
12595
+ return { principal: undefined, measures: undefined };
12596
+ }
12597
+
12598
+ export const SpendForecastPrincipal: MessageFns<SpendForecastPrincipal> = {
12599
+ encode(message: SpendForecastPrincipal, writer: BinaryWriter = new BinaryWriter()): BinaryWriter {
12600
+ if (message.principal !== undefined) {
12601
+ DailyActivityPrincipal.encode(message.principal, writer.uint32(10).fork()).join();
12602
+ }
12603
+ if (message.measures !== undefined) {
12604
+ SpendForecastMeasures.encode(message.measures, writer.uint32(18).fork()).join();
12605
+ }
12606
+ return writer;
12607
+ },
12608
+
12609
+ decode(input: BinaryReader | Uint8Array, length?: number): SpendForecastPrincipal {
12610
+ const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
12611
+ const previousRecursionDepth = (reader as any).__tsProtoDecodeDepth ?? 0;
12612
+ if (previousRecursionDepth >= 100) {
12613
+ throw new globalThis.Error("protobuf decode recursion limit exceeded");
12614
+ }
12615
+ (reader as any).__tsProtoDecodeDepth = previousRecursionDepth + 1;
12616
+ try {
12617
+ const end = length === undefined ? reader.len : reader.pos + length;
12618
+ const message = createBaseSpendForecastPrincipal();
12619
+ while (reader.pos < end) {
12620
+ const tag = reader.uint32();
12621
+ switch (tag >>> 3) {
12622
+ case 1: {
12623
+ if (tag !== 10) {
12624
+ break;
12625
+ }
12626
+
12627
+ message.principal = DailyActivityPrincipal.decode(reader, reader.uint32());
12628
+ continue;
12629
+ }
12630
+ case 2: {
12631
+ if (tag !== 18) {
12632
+ break;
12633
+ }
12634
+
12635
+ message.measures = SpendForecastMeasures.decode(reader, reader.uint32());
12636
+ continue;
12637
+ }
12638
+ }
12639
+ if ((tag & 7) === 4 || tag === 0) {
12640
+ break;
12641
+ }
12642
+ reader.skip(tag & 7);
12643
+ }
12644
+ return message;
12645
+ } finally {
12646
+ (reader as any).__tsProtoDecodeDepth = previousRecursionDepth;
12647
+ }
12648
+ },
12649
+
12650
+ fromJSON(object: any): SpendForecastPrincipal {
12651
+ return {
12652
+ principal: isSet(object.principal) ? DailyActivityPrincipal.fromJSON(object.principal) : undefined,
12653
+ measures: isSet(object.measures) ? SpendForecastMeasures.fromJSON(object.measures) : undefined,
12654
+ };
12655
+ },
12656
+
12657
+ toJSON(message: SpendForecastPrincipal): unknown {
12658
+ const obj: any = {};
12659
+ if (message.principal !== undefined) {
12660
+ obj.principal = DailyActivityPrincipal.toJSON(message.principal);
12661
+ }
12662
+ if (message.measures !== undefined) {
12663
+ obj.measures = SpendForecastMeasures.toJSON(message.measures);
12664
+ }
12665
+ return obj;
12666
+ },
12667
+
12668
+ create<I extends Exact<DeepPartial<SpendForecastPrincipal>, I>>(base?: I): SpendForecastPrincipal {
12669
+ return SpendForecastPrincipal.fromPartial(base ?? ({} as any));
12670
+ },
12671
+ fromPartial<I extends Exact<DeepPartial<SpendForecastPrincipal>, I>>(object: I): SpendForecastPrincipal {
12672
+ const message = createBaseSpendForecastPrincipal();
12673
+ message.principal = (object.principal !== undefined && object.principal !== null)
12674
+ ? DailyActivityPrincipal.fromPartial(object.principal)
12675
+ : undefined;
12676
+ message.measures = (object.measures !== undefined && object.measures !== null)
12677
+ ? SpendForecastMeasures.fromPartial(object.measures)
12678
+ : undefined;
12679
+ return message;
12680
+ },
12681
+ };
12682
+
12521
12683
  function createBaseSpendForecastMeasures(): SpendForecastMeasures {
12522
12684
  return { monthToDateUsd: 0, projection: undefined };
12523
12685
  }
@@ -22557,9 +22719,9 @@ export interface AIGatewayService {
22557
22719
  StreamDailyActivity(request: DailyActivityRequest, metadata?: Metadata): Observable<DailyActivity>;
22558
22720
  /**
22559
22721
  * Live current-UTC-month spend forecast: month-to-date cost and the projected month-end total (a band from
22560
- * replaying recent weeks), for the project and per model, provider, source system, user and api key, off the
22561
- * same daily rollup as StreamDailyActivity; filter.funding_modes forecasts the cost on the listed funding modes. Mirrors
22562
- * telemetry.api.v1.
22722
+ * replaying recent weeks), for the project, per model, provider and source system, and per principal, off the
22723
+ * same daily rollup as StreamDailyActivity; the filter narrows it by funding mode, source system and principal.
22724
+ * Mirrors telemetry.api.v1.
22563
22725
  */
22564
22726
  StreamSpendForecast(request: SpendForecastRequest, metadata?: Metadata): Observable<SpendForecast>;
22565
22727
  /**
@@ -22579,8 +22741,8 @@ export interface AIGatewayService {
22579
22741
  StreamProjectSummaries(request: ProjectSummariesRequest, metadata?: Metadata): Observable<ProjectSummaries>;
22580
22742
  /**
22581
22743
  * Per-file working-state feed (keyset-paginated) behind the unlanded-work funnel: one row per
22582
- * (repository_key, ref, path) the AI edited (with filter.sessions or filter.paths, one they name), its
22583
- * most-edited checkout copy among those the filter keeps. Mirrors telemetry.api.v1.
22744
+ * (repository_key, ref, path) the AI edited (with filter.sessions or filter.paths, one they name): its kept
22745
+ * checkout copies' edits, costs and tokens added up, its state from the most-edited copy. Mirrors telemetry.api.v1.
22584
22746
  */
22585
22747
  ListFiles(request: ListFilesRequest, metadata?: Metadata): Promise<ListFilesResponse>;
22586
22748
  /**
@@ -22590,7 +22752,8 @@ export interface AIGatewayService {
22590
22752
  ListFileDirectories(request: ListFileDirectoriesRequest, metadata?: Metadata): Promise<ListFileDirectoriesResponse>;
22591
22753
  /**
22592
22754
  * Live stream of the unlanded-work funnel: aging tiers + discarded (git-invisible churn), a complete
22593
- * snapshot re-derived each tick. Counts every checkout copy, edited or not.
22755
+ * snapshot re-derived each tick. Every checkout copy, edited or not, lands in its own bucket; files and
22756
+ * sessions are distinct counts, so they do not add up across buckets or groups. Mirrors telemetry.api.v1.
22594
22757
  */
22595
22758
  StreamFilesSummary(request: FilesSummaryRequest, metadata?: Metadata): Observable<FilesSummary>;
22596
22759
  /** Latest observed list price per catalog listing from the global catalog, under stored names. */
@@ -774,9 +774,9 @@ streamDailyActivity: {
774
774
  responseDeserialize: deserialize_gateway_web_v1_DailyActivity,
775
775
  },
776
776
  // Live current-UTC-month spend forecast: month-to-date cost and the projected month-end total (a band from
777
- // replaying recent weeks), for the project and per model, provider, source system, user and api key, off the
778
- // same daily rollup as StreamDailyActivity; filter.funding_modes forecasts the cost on the listed funding modes. Mirrors
779
- // telemetry.api.v1.
777
+ // replaying recent weeks), for the project, per model, provider and source system, and per principal, off the
778
+ // same daily rollup as StreamDailyActivity; the filter narrows it by funding mode, source system and principal.
779
+ // Mirrors telemetry.api.v1.
780
780
  streamSpendForecast: {
781
781
  path: '/gateway.web.v1.AIGatewayService/StreamSpendForecast',
782
782
  requestStream: false,
@@ -828,8 +828,8 @@ streamProjectSummaries: {
828
828
  responseDeserialize: deserialize_gateway_web_v1_ProjectSummaries,
829
829
  },
830
830
  // Per-file working-state feed (keyset-paginated) behind the unlanded-work funnel: one row per
831
- // (repository_key, ref, path) the AI edited (with filter.sessions or filter.paths, one they name), its
832
- // most-edited checkout copy among those the filter keeps. Mirrors telemetry.api.v1.
831
+ // (repository_key, ref, path) the AI edited (with filter.sessions or filter.paths, one they name): its kept
832
+ // checkout copies' edits, costs and tokens added up, its state from the most-edited copy. Mirrors telemetry.api.v1.
833
833
  listFiles: {
834
834
  path: '/gateway.web.v1.AIGatewayService/ListFiles',
835
835
  requestStream: false,
@@ -855,7 +855,8 @@ listFileDirectories: {
855
855
  responseDeserialize: deserialize_gateway_web_v1_ListFileDirectoriesResponse,
856
856
  },
857
857
  // Live stream of the unlanded-work funnel: aging tiers + discarded (git-invisible churn), a complete
858
- // snapshot re-derived each tick. Counts every checkout copy, edited or not.
858
+ // snapshot re-derived each tick. Every checkout copy, edited or not, lands in its own bucket; files and
859
+ // sessions are distinct counts, so they do not add up across buckets or groups. Mirrors telemetry.api.v1.
859
860
  streamFilesSummary: {
860
861
  path: '/gateway.web.v1.AIGatewayService/StreamFilesSummary',
861
862
  requestStream: false,
@@ -151,6 +151,7 @@ goog.exportSymbol('proto.gateway.web.v1.SpendForecastBreakdown', null, global);
151
151
  goog.exportSymbol('proto.gateway.web.v1.SpendForecastFilter', null, global);
152
152
  goog.exportSymbol('proto.gateway.web.v1.SpendForecastGroup', null, global);
153
153
  goog.exportSymbol('proto.gateway.web.v1.SpendForecastMeasures', null, global);
154
+ goog.exportSymbol('proto.gateway.web.v1.SpendForecastPrincipal', null, global);
154
155
  goog.exportSymbol('proto.gateway.web.v1.SpendForecastRequest', null, global);
155
156
  goog.exportSymbol('proto.gateway.web.v1.SpendProjection', null, global);
156
157
  goog.exportSymbol('proto.gateway.web.v1.StreamEntitlementsRequest', null, global);
@@ -1401,6 +1402,27 @@ if (goog.DEBUG && !COMPILED) {
1401
1402
  */
1402
1403
  proto.gateway.web.v1.SpendForecastGroup.displayName = 'proto.gateway.web.v1.SpendForecastGroup';
1403
1404
  }
1405
+ /**
1406
+ * Generated by JsPbCodeGenerator.
1407
+ * @param {Array=} opt_data Optional initial data array, typically from a
1408
+ * server response, or constructed directly in Javascript. The array is used
1409
+ * in place and becomes part of the constructed object. It is not cloned.
1410
+ * If no data is provided, the constructed object will be empty, but still
1411
+ * valid.
1412
+ * @extends {jspb.Message}
1413
+ * @constructor
1414
+ */
1415
+ proto.gateway.web.v1.SpendForecastPrincipal = function(opt_data) {
1416
+ jspb.Message.initialize(this, opt_data, 0, -1, null, null);
1417
+ };
1418
+ goog.inherits(proto.gateway.web.v1.SpendForecastPrincipal, jspb.Message);
1419
+ if (goog.DEBUG && !COMPILED) {
1420
+ /**
1421
+ * @public
1422
+ * @override
1423
+ */
1424
+ proto.gateway.web.v1.SpendForecastPrincipal.displayName = 'proto.gateway.web.v1.SpendForecastPrincipal';
1425
+ }
1404
1426
  /**
1405
1427
  * Generated by JsPbCodeGenerator.
1406
1428
  * @param {Array=} opt_data Optional initial data array, typically from a
@@ -20956,7 +20978,7 @@ proto.gateway.web.v1.SpendForecastRequest.prototype.hasFilter = function() {
20956
20978
  * @private {!Array<number>}
20957
20979
  * @const
20958
20980
  */
20959
- proto.gateway.web.v1.SpendForecastFilter.repeatedFields_ = [1];
20981
+ proto.gateway.web.v1.SpendForecastFilter.repeatedFields_ = [1,2,3];
20960
20982
 
20961
20983
 
20962
20984
 
@@ -20989,7 +21011,10 @@ proto.gateway.web.v1.SpendForecastFilter.prototype.toObject = function(opt_inclu
20989
21011
  */
20990
21012
  proto.gateway.web.v1.SpendForecastFilter.toObject = function(includeInstance, msg) {
20991
21013
  var f, obj = {
20992
- fundingModesList: (f = jspb.Message.getRepeatedField(msg, 1)) == null ? undefined : f
21014
+ fundingModesList: (f = jspb.Message.getRepeatedField(msg, 1)) == null ? undefined : f,
21015
+ sourceSystemsList: (f = jspb.Message.getRepeatedField(msg, 2)) == null ? undefined : f,
21016
+ principalsList: jspb.Message.toObjectList(msg.getPrincipalsList(),
21017
+ proto.gateway.web.v1.DailyActivityPrincipal.toObject, includeInstance)
20993
21018
  };
20994
21019
 
20995
21020
  if (includeInstance) {
@@ -21029,6 +21054,15 @@ proto.gateway.web.v1.SpendForecastFilter.deserializeBinaryFromReader = function(
21029
21054
  case 1:
21030
21055
  reader.readPackableEnumInto(msg.getFundingModesList());
21031
21056
  break;
21057
+ case 2:
21058
+ var value = /** @type {string} */ (reader.readStringRequireUtf8());
21059
+ msg.addSourceSystems(value);
21060
+ break;
21061
+ case 3:
21062
+ var value = new proto.gateway.web.v1.DailyActivityPrincipal;
21063
+ reader.readMessage(value,proto.gateway.web.v1.DailyActivityPrincipal.deserializeBinaryFromReader);
21064
+ msg.addPrincipals(value);
21065
+ break;
21032
21066
  default:
21033
21067
  reader.skipField();
21034
21068
  break;
@@ -21065,6 +21099,21 @@ proto.gateway.web.v1.SpendForecastFilter.serializeBinaryToWriter = function(mess
21065
21099
  f
21066
21100
  );
21067
21101
  }
21102
+ f = message.getSourceSystemsList();
21103
+ if (f.length > 0) {
21104
+ writer.writeRepeatedString(
21105
+ 2,
21106
+ f
21107
+ );
21108
+ }
21109
+ f = message.getPrincipalsList();
21110
+ if (f.length > 0) {
21111
+ writer.writeRepeatedMessage(
21112
+ 3,
21113
+ f,
21114
+ proto.gateway.web.v1.DailyActivityPrincipal.serializeBinaryToWriter
21115
+ );
21116
+ }
21068
21117
  };
21069
21118
 
21070
21119
 
@@ -21105,13 +21154,88 @@ proto.gateway.web.v1.SpendForecastFilter.prototype.clearFundingModesList = funct
21105
21154
  };
21106
21155
 
21107
21156
 
21157
+ /**
21158
+ * repeated string source_systems = 2;
21159
+ * @return {!Array<string>}
21160
+ */
21161
+ proto.gateway.web.v1.SpendForecastFilter.prototype.getSourceSystemsList = function() {
21162
+ return /** @type {!Array<string>} */ (jspb.Message.getRepeatedField(this, 2));
21163
+ };
21164
+
21165
+
21166
+ /**
21167
+ * @param {!Array<string>} value
21168
+ * @return {!proto.gateway.web.v1.SpendForecastFilter} returns this
21169
+ */
21170
+ proto.gateway.web.v1.SpendForecastFilter.prototype.setSourceSystemsList = function(value) {
21171
+ return jspb.Message.setField(this, 2, value || []);
21172
+ };
21173
+
21174
+
21175
+ /**
21176
+ * @param {string} value
21177
+ * @param {number=} opt_index
21178
+ * @return {!proto.gateway.web.v1.SpendForecastFilter} returns this
21179
+ */
21180
+ proto.gateway.web.v1.SpendForecastFilter.prototype.addSourceSystems = function(value, opt_index) {
21181
+ return jspb.Message.addToRepeatedField(this, 2, value, opt_index);
21182
+ };
21183
+
21184
+
21185
+ /**
21186
+ * Clears the list making it empty but non-null.
21187
+ * @return {!proto.gateway.web.v1.SpendForecastFilter} returns this
21188
+ */
21189
+ proto.gateway.web.v1.SpendForecastFilter.prototype.clearSourceSystemsList = function() {
21190
+ return this.setSourceSystemsList([]);
21191
+ };
21192
+
21193
+
21194
+ /**
21195
+ * repeated DailyActivityPrincipal principals = 3;
21196
+ * @return {!Array<!proto.gateway.web.v1.DailyActivityPrincipal>}
21197
+ */
21198
+ proto.gateway.web.v1.SpendForecastFilter.prototype.getPrincipalsList = function() {
21199
+ return /** @type{!Array<!proto.gateway.web.v1.DailyActivityPrincipal>} */ (
21200
+ jspb.Message.getRepeatedWrapperField(this, proto.gateway.web.v1.DailyActivityPrincipal, 3));
21201
+ };
21202
+
21203
+
21204
+ /**
21205
+ * @param {!Array<!proto.gateway.web.v1.DailyActivityPrincipal>} value
21206
+ * @return {!proto.gateway.web.v1.SpendForecastFilter} returns this
21207
+ */
21208
+ proto.gateway.web.v1.SpendForecastFilter.prototype.setPrincipalsList = function(value) {
21209
+ return jspb.Message.setRepeatedWrapperField(this, 3, value);
21210
+ };
21211
+
21212
+
21213
+ /**
21214
+ * @param {!proto.gateway.web.v1.DailyActivityPrincipal=} opt_value
21215
+ * @param {number=} opt_index
21216
+ * @return {!proto.gateway.web.v1.DailyActivityPrincipal}
21217
+ */
21218
+ proto.gateway.web.v1.SpendForecastFilter.prototype.addPrincipals = function(opt_value, opt_index) {
21219
+ return jspb.Message.addToRepeatedWrapperField(this, 3, opt_value, proto.gateway.web.v1.DailyActivityPrincipal, opt_index);
21220
+ };
21221
+
21222
+
21223
+ /**
21224
+ * Clears the list making it empty but non-null.
21225
+ * @return {!proto.gateway.web.v1.SpendForecastFilter} returns this
21226
+ */
21227
+ proto.gateway.web.v1.SpendForecastFilter.prototype.clearPrincipalsList = function() {
21228
+ return this.setPrincipalsList([]);
21229
+ };
21230
+
21231
+
21108
21232
 
21109
21233
  /**
21110
21234
  * List of repeated fields within this message type.
21111
21235
  * @private {!Array<number>}
21112
21236
  * @const
21113
21237
  */
21114
- proto.gateway.web.v1.SpendForecast.repeatedFields_ = [7];
21238
+ proto.gateway.web.v1.SpendForecast.repeatedFields_ = [7,9];
21115
21239
 
21116
21240
 
21117
21241
 
@@ -21152,7 +21276,9 @@ historyWeeks: jspb.Message.getFieldWithDefault(msg, 5, 0),
21152
21276
  total: (f = msg.getTotal()) && proto.gateway.web.v1.SpendForecastMeasures.toObject(includeInstance, f),
21153
21277
  breakdownsList: jspb.Message.toObjectList(msg.getBreakdownsList(),
21154
21278
  proto.gateway.web.v1.SpendForecastBreakdown.toObject, includeInstance),
21155
- asOf: (f = msg.getAsOf()) && google_protobuf_timestamp_pb.Timestamp.toObject(includeInstance, f)
21279
+ asOf: (f = msg.getAsOf()) && google_protobuf_timestamp_pb.Timestamp.toObject(includeInstance, f),
21280
+ principalsList: jspb.Message.toObjectList(msg.getPrincipalsList(),
21281
+ proto.gateway.web.v1.SpendForecastPrincipal.toObject, includeInstance)
21156
21282
  };
21157
21283
 
21158
21284
  if (includeInstance) {
@@ -21224,6 +21350,11 @@ proto.gateway.web.v1.SpendForecast.deserializeBinaryFromReader = function(msg, r
21224
21350
  reader.readMessage(value,google_protobuf_timestamp_pb.Timestamp.deserializeBinaryFromReader);
21225
21351
  msg.setAsOf(value);
21226
21352
  break;
21353
+ case 9:
21354
+ var value = new proto.gateway.web.v1.SpendForecastPrincipal;
21355
+ reader.readMessage(value,proto.gateway.web.v1.SpendForecastPrincipal.deserializeBinaryFromReader);
21356
+ msg.addPrincipals(value);
21357
+ break;
21227
21358
  default:
21228
21359
  reader.skipField();
21229
21360
  break;
@@ -21312,6 +21443,14 @@ proto.gateway.web.v1.SpendForecast.serializeBinaryToWriter = function(message, w
21312
21443
  google_protobuf_timestamp_pb.Timestamp.serializeBinaryToWriter
21313
21444
  );
21314
21445
  }
21446
+ f = message.getPrincipalsList();
21447
+ if (f.length > 0) {
21448
+ writer.writeRepeatedMessage(
21449
+ 9,
21450
+ f,
21451
+ proto.gateway.web.v1.SpendForecastPrincipal.serializeBinaryToWriter
21452
+ );
21453
+ }
21315
21454
  };
21316
21455
 
21317
21456
 
@@ -21517,6 +21656,44 @@ proto.gateway.web.v1.SpendForecast.prototype.hasAsOf = function() {
21517
21656
  };
21518
21657
 
21519
21658
 
21659
+ /**
21660
+ * repeated SpendForecastPrincipal principals = 9;
21661
+ * @return {!Array<!proto.gateway.web.v1.SpendForecastPrincipal>}
21662
+ */
21663
+ proto.gateway.web.v1.SpendForecast.prototype.getPrincipalsList = function() {
21664
+ return /** @type{!Array<!proto.gateway.web.v1.SpendForecastPrincipal>} */ (
21665
+ jspb.Message.getRepeatedWrapperField(this, proto.gateway.web.v1.SpendForecastPrincipal, 9));
21666
+ };
21667
+
21668
+
21669
+ /**
21670
+ * @param {!Array<!proto.gateway.web.v1.SpendForecastPrincipal>} value
21671
+ * @return {!proto.gateway.web.v1.SpendForecast} returns this
21672
+ */
21673
+ proto.gateway.web.v1.SpendForecast.prototype.setPrincipalsList = function(value) {
21674
+ return jspb.Message.setRepeatedWrapperField(this, 9, value);
21675
+ };
21676
+
21677
+
21678
+ /**
21679
+ * @param {!proto.gateway.web.v1.SpendForecastPrincipal=} opt_value
21680
+ * @param {number=} opt_index
21681
+ * @return {!proto.gateway.web.v1.SpendForecastPrincipal}
21682
+ */
21683
+ proto.gateway.web.v1.SpendForecast.prototype.addPrincipals = function(opt_value, opt_index) {
21684
+ return jspb.Message.addToRepeatedWrapperField(this, 9, opt_value, proto.gateway.web.v1.SpendForecastPrincipal, opt_index);
21685
+ };
21686
+
21687
+
21688
+ /**
21689
+ * Clears the list making it empty but non-null.
21690
+ * @return {!proto.gateway.web.v1.SpendForecast} returns this
21691
+ */
21692
+ proto.gateway.web.v1.SpendForecast.prototype.clearPrincipalsList = function() {
21693
+ return this.setPrincipalsList([]);
21694
+ };
21695
+
21696
+
21520
21697
 
21521
21698
  /**
21522
21699
  * List of repeated fields within this message type.
@@ -21891,6 +22068,208 @@ proto.gateway.web.v1.SpendForecastGroup.prototype.hasMeasures = function() {
21891
22068
 
21892
22069
 
21893
22070
 
22071
+ if (jspb.Message.GENERATE_TO_OBJECT) {
22072
+ /**
22073
+ * Creates an object representation of this proto.
22074
+ * Field names that are reserved in JavaScript and will be renamed to pb_name.
22075
+ * Optional fields that are not set will be set to undefined.
22076
+ * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
22077
+ * For the list of reserved names please see:
22078
+ * net/proto2/compiler/js/internal/generator.cc#kKeyword.
22079
+ * @param {boolean=} opt_includeInstance Deprecated. whether to include the
22080
+ * JSPB instance for transitional soy proto support:
22081
+ * http://goto/soy-param-migration
22082
+ * @return {!Object}
22083
+ */
22084
+ proto.gateway.web.v1.SpendForecastPrincipal.prototype.toObject = function(opt_includeInstance) {
22085
+ return proto.gateway.web.v1.SpendForecastPrincipal.toObject(opt_includeInstance, this);
22086
+ };
22087
+
22088
+
22089
+ /**
22090
+ * Static version of the {@see toObject} method.
22091
+ * @param {boolean|undefined} includeInstance Deprecated. Whether to include
22092
+ * the JSPB instance for transitional soy proto support:
22093
+ * http://goto/soy-param-migration
22094
+ * @param {!proto.gateway.web.v1.SpendForecastPrincipal} msg The msg instance to transform.
22095
+ * @return {!Object}
22096
+ * @suppress {unusedLocalVariables} f is only used for nested messages
22097
+ */
22098
+ proto.gateway.web.v1.SpendForecastPrincipal.toObject = function(includeInstance, msg) {
22099
+ var f, obj = {
22100
+ principal: (f = msg.getPrincipal()) && proto.gateway.web.v1.DailyActivityPrincipal.toObject(includeInstance, f),
22101
+ measures: (f = msg.getMeasures()) && proto.gateway.web.v1.SpendForecastMeasures.toObject(includeInstance, f)
22102
+ };
22103
+
22104
+ if (includeInstance) {
22105
+ obj.$jspbMessageInstance = msg;
22106
+ }
22107
+ return obj;
22108
+ };
22109
+ }
22110
+
22111
+
22112
+ /**
22113
+ * Deserializes binary data (in protobuf wire format).
22114
+ * @param {jspb.binary.bytesource.ByteSource} bytes The bytes to deserialize.
22115
+ * @return {!proto.gateway.web.v1.SpendForecastPrincipal}
22116
+ */
22117
+ proto.gateway.web.v1.SpendForecastPrincipal.deserializeBinary = function(bytes) {
22118
+ var reader = new jspb.BinaryReader(bytes);
22119
+ var msg = new proto.gateway.web.v1.SpendForecastPrincipal;
22120
+ return proto.gateway.web.v1.SpendForecastPrincipal.deserializeBinaryFromReader(msg, reader);
22121
+ };
22122
+
22123
+
22124
+ /**
22125
+ * Deserializes binary data (in protobuf wire format) from the
22126
+ * given reader into the given message object.
22127
+ * @param {!proto.gateway.web.v1.SpendForecastPrincipal} msg The message object to deserialize into.
22128
+ * @param {!jspb.BinaryReader} reader The BinaryReader to use.
22129
+ * @return {!proto.gateway.web.v1.SpendForecastPrincipal}
22130
+ */
22131
+ proto.gateway.web.v1.SpendForecastPrincipal.deserializeBinaryFromReader = function(msg, reader) {
22132
+ while (reader.nextField()) {
22133
+ if (reader.isEndGroup()) {
22134
+ break;
22135
+ }
22136
+ var field = reader.getFieldNumber();
22137
+ switch (field) {
22138
+ case 1:
22139
+ var value = new proto.gateway.web.v1.DailyActivityPrincipal;
22140
+ reader.readMessage(value,proto.gateway.web.v1.DailyActivityPrincipal.deserializeBinaryFromReader);
22141
+ msg.setPrincipal(value);
22142
+ break;
22143
+ case 2:
22144
+ var value = new proto.gateway.web.v1.SpendForecastMeasures;
22145
+ reader.readMessage(value,proto.gateway.web.v1.SpendForecastMeasures.deserializeBinaryFromReader);
22146
+ msg.setMeasures(value);
22147
+ break;
22148
+ default:
22149
+ reader.skipField();
22150
+ break;
22151
+ }
22152
+ }
22153
+ return msg;
22154
+ };
22155
+
22156
+
22157
+ /**
22158
+ * Serializes the message to binary data (in protobuf wire format).
22159
+ * @return {!Uint8Array}
22160
+ */
22161
+ proto.gateway.web.v1.SpendForecastPrincipal.prototype.serializeBinary = function() {
22162
+ var writer = new jspb.BinaryWriter();
22163
+ proto.gateway.web.v1.SpendForecastPrincipal.serializeBinaryToWriter(this, writer);
22164
+ return writer.getResultBuffer();
22165
+ };
22166
+
22167
+
22168
+ /**
22169
+ * Serializes the given message to binary data (in protobuf wire
22170
+ * format), writing to the given BinaryWriter.
22171
+ * @param {!proto.gateway.web.v1.SpendForecastPrincipal} message
22172
+ * @param {!jspb.BinaryWriter} writer
22173
+ * @suppress {unusedLocalVariables} f is only used for nested messages
22174
+ */
22175
+ proto.gateway.web.v1.SpendForecastPrincipal.serializeBinaryToWriter = function(message, writer) {
22176
+ var f = undefined;
22177
+ f = message.getPrincipal();
22178
+ if (f != null) {
22179
+ writer.writeMessage(
22180
+ 1,
22181
+ f,
22182
+ proto.gateway.web.v1.DailyActivityPrincipal.serializeBinaryToWriter
22183
+ );
22184
+ }
22185
+ f = message.getMeasures();
22186
+ if (f != null) {
22187
+ writer.writeMessage(
22188
+ 2,
22189
+ f,
22190
+ proto.gateway.web.v1.SpendForecastMeasures.serializeBinaryToWriter
22191
+ );
22192
+ }
22193
+ };
22194
+
22195
+
22196
+ /**
22197
+ * optional DailyActivityPrincipal principal = 1;
22198
+ * @return {?proto.gateway.web.v1.DailyActivityPrincipal}
22199
+ */
22200
+ proto.gateway.web.v1.SpendForecastPrincipal.prototype.getPrincipal = function() {
22201
+ return /** @type{?proto.gateway.web.v1.DailyActivityPrincipal} */ (
22202
+ jspb.Message.getWrapperField(this, proto.gateway.web.v1.DailyActivityPrincipal, 1));
22203
+ };
22204
+
22205
+
22206
+ /**
22207
+ * @param {?proto.gateway.web.v1.DailyActivityPrincipal|undefined} value
22208
+ * @return {!proto.gateway.web.v1.SpendForecastPrincipal} returns this
22209
+ */
22210
+ proto.gateway.web.v1.SpendForecastPrincipal.prototype.setPrincipal = function(value) {
22211
+ return jspb.Message.setWrapperField(this, 1, value);
22212
+ };
22213
+
22214
+
22215
+ /**
22216
+ * Clears the message field making it undefined.
22217
+ * @return {!proto.gateway.web.v1.SpendForecastPrincipal} returns this
22218
+ */
22219
+ proto.gateway.web.v1.SpendForecastPrincipal.prototype.clearPrincipal = function() {
22220
+ return this.setPrincipal(undefined);
22221
+ };
22222
+
22223
+
22224
+ /**
22225
+ * Returns whether this field is set.
22226
+ * @return {boolean}
22227
+ */
22228
+ proto.gateway.web.v1.SpendForecastPrincipal.prototype.hasPrincipal = function() {
22229
+ return jspb.Message.getField(this, 1) != null;
22230
+ };
22231
+
22232
+
22233
+ /**
22234
+ * optional SpendForecastMeasures measures = 2;
22235
+ * @return {?proto.gateway.web.v1.SpendForecastMeasures}
22236
+ */
22237
+ proto.gateway.web.v1.SpendForecastPrincipal.prototype.getMeasures = function() {
22238
+ return /** @type{?proto.gateway.web.v1.SpendForecastMeasures} */ (
22239
+ jspb.Message.getWrapperField(this, proto.gateway.web.v1.SpendForecastMeasures, 2));
22240
+ };
22241
+
22242
+
22243
+ /**
22244
+ * @param {?proto.gateway.web.v1.SpendForecastMeasures|undefined} value
22245
+ * @return {!proto.gateway.web.v1.SpendForecastPrincipal} returns this
22246
+ */
22247
+ proto.gateway.web.v1.SpendForecastPrincipal.prototype.setMeasures = function(value) {
22248
+ return jspb.Message.setWrapperField(this, 2, value);
22249
+ };
22250
+
22251
+
22252
+ /**
22253
+ * Clears the message field making it undefined.
22254
+ * @return {!proto.gateway.web.v1.SpendForecastPrincipal} returns this
22255
+ */
22256
+ proto.gateway.web.v1.SpendForecastPrincipal.prototype.clearMeasures = function() {
22257
+ return this.setMeasures(undefined);
22258
+ };
22259
+
22260
+
22261
+ /**
22262
+ * Returns whether this field is set.
22263
+ * @return {boolean}
22264
+ */
22265
+ proto.gateway.web.v1.SpendForecastPrincipal.prototype.hasMeasures = function() {
22266
+ return jspb.Message.getField(this, 2) != null;
22267
+ };
22268
+
22269
+
22270
+
22271
+
22272
+
21894
22273
  if (jspb.Message.GENERATE_TO_OBJECT) {
21895
22274
  /**
21896
22275
  * Creates an object representation of this proto.
@@ -40975,9 +41354,7 @@ proto.gateway.web.v1.AISpendForecastDimension = {
40975
41354
  AI_SPEND_FORECAST_DIMENSION_UNSPECIFIED: 0,
40976
41355
  AI_SPEND_FORECAST_DIMENSION_MODEL: 1,
40977
41356
  AI_SPEND_FORECAST_DIMENSION_PROVIDER: 2,
40978
- AI_SPEND_FORECAST_DIMENSION_SOURCE_SYSTEM: 3,
40979
- AI_SPEND_FORECAST_DIMENSION_USER: 4,
40980
- AI_SPEND_FORECAST_DIMENSION_API_KEY: 5
41357
+ AI_SPEND_FORECAST_DIMENSION_SOURCE_SYSTEM: 3
40981
41358
  };
40982
41359
 
40983
41360
  /**