@miradorlabs/web-grpc 2.65.0 → 2.66.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.65.0",
3
+ "version": "2.66.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",
@@ -1587,6 +1587,14 @@ export interface AIFileRow {
1587
1587
  sessionId: string[];
1588
1588
  unlandedCostUsd: number;
1589
1589
  unlandedOutputTokens: number;
1590
+ /**
1591
+ * total_cost_usd is this file's share over ALL its edited turns (landed + unlanded);
1592
+ * landed = total_cost_usd - unlanded_cost_usd. subscription_* is the subscription-facility slice,
1593
+ * so Net = Notional - Subscription on either axis.
1594
+ */
1595
+ totalCostUsd: number;
1596
+ subscriptionTotalCostUsd: number;
1597
+ subscriptionUnlandedCostUsd: number;
1590
1598
  }
1591
1599
 
1592
1600
  export interface FilesSummaryRequest {
@@ -1621,6 +1629,9 @@ export interface FileTierBucket {
1621
1629
  outputTokens: number;
1622
1630
  oldestAge: Duration | undefined;
1623
1631
  filesUnverified: number;
1632
+ /** subscription-facility slice of the tier's unlanded cost (observed / inferred); Net subtracts these. */
1633
+ subscriptionCostUsd: number;
1634
+ subscriptionCostUsdUnverified: number;
1624
1635
  }
1625
1636
 
1626
1637
  export interface FileGroup {
@@ -13246,6 +13257,9 @@ function createBaseAIFileRow(): AIFileRow {
13246
13257
  sessionId: [],
13247
13258
  unlandedCostUsd: 0,
13248
13259
  unlandedOutputTokens: 0,
13260
+ totalCostUsd: 0,
13261
+ subscriptionTotalCostUsd: 0,
13262
+ subscriptionUnlandedCostUsd: 0,
13249
13263
  };
13250
13264
  }
13251
13265
 
@@ -13308,6 +13322,15 @@ export const AIFileRow: MessageFns<AIFileRow> = {
13308
13322
  if (message.unlandedOutputTokens !== 0) {
13309
13323
  writer.uint32(152).uint64(message.unlandedOutputTokens);
13310
13324
  }
13325
+ if (message.totalCostUsd !== 0) {
13326
+ writer.uint32(161).double(message.totalCostUsd);
13327
+ }
13328
+ if (message.subscriptionTotalCostUsd !== 0) {
13329
+ writer.uint32(169).double(message.subscriptionTotalCostUsd);
13330
+ }
13331
+ if (message.subscriptionUnlandedCostUsd !== 0) {
13332
+ writer.uint32(177).double(message.subscriptionUnlandedCostUsd);
13333
+ }
13311
13334
  return writer;
13312
13335
  },
13313
13336
 
@@ -13476,6 +13499,30 @@ export const AIFileRow: MessageFns<AIFileRow> = {
13476
13499
  message.unlandedOutputTokens = longToNumber(reader.uint64());
13477
13500
  continue;
13478
13501
  }
13502
+ case 20: {
13503
+ if (tag !== 161) {
13504
+ break;
13505
+ }
13506
+
13507
+ message.totalCostUsd = reader.double();
13508
+ continue;
13509
+ }
13510
+ case 21: {
13511
+ if (tag !== 169) {
13512
+ break;
13513
+ }
13514
+
13515
+ message.subscriptionTotalCostUsd = reader.double();
13516
+ continue;
13517
+ }
13518
+ case 22: {
13519
+ if (tag !== 177) {
13520
+ break;
13521
+ }
13522
+
13523
+ message.subscriptionUnlandedCostUsd = reader.double();
13524
+ continue;
13525
+ }
13479
13526
  }
13480
13527
  if ((tag & 7) === 4 || tag === 0) {
13481
13528
  break;
@@ -13565,6 +13612,21 @@ export const AIFileRow: MessageFns<AIFileRow> = {
13565
13612
  : isSet(object.unlanded_output_tokens)
13566
13613
  ? globalThis.Number(object.unlanded_output_tokens)
13567
13614
  : 0,
13615
+ totalCostUsd: isSet(object.totalCostUsd)
13616
+ ? globalThis.Number(object.totalCostUsd)
13617
+ : isSet(object.total_cost_usd)
13618
+ ? globalThis.Number(object.total_cost_usd)
13619
+ : 0,
13620
+ subscriptionTotalCostUsd: isSet(object.subscriptionTotalCostUsd)
13621
+ ? globalThis.Number(object.subscriptionTotalCostUsd)
13622
+ : isSet(object.subscription_total_cost_usd)
13623
+ ? globalThis.Number(object.subscription_total_cost_usd)
13624
+ : 0,
13625
+ subscriptionUnlandedCostUsd: isSet(object.subscriptionUnlandedCostUsd)
13626
+ ? globalThis.Number(object.subscriptionUnlandedCostUsd)
13627
+ : isSet(object.subscription_unlanded_cost_usd)
13628
+ ? globalThis.Number(object.subscription_unlanded_cost_usd)
13629
+ : 0,
13568
13630
  };
13569
13631
  },
13570
13632
 
@@ -13627,6 +13689,15 @@ export const AIFileRow: MessageFns<AIFileRow> = {
13627
13689
  if (message.unlandedOutputTokens !== 0) {
13628
13690
  obj.unlandedOutputTokens = Math.round(message.unlandedOutputTokens);
13629
13691
  }
13692
+ if (message.totalCostUsd !== 0) {
13693
+ obj.totalCostUsd = message.totalCostUsd;
13694
+ }
13695
+ if (message.subscriptionTotalCostUsd !== 0) {
13696
+ obj.subscriptionTotalCostUsd = message.subscriptionTotalCostUsd;
13697
+ }
13698
+ if (message.subscriptionUnlandedCostUsd !== 0) {
13699
+ obj.subscriptionUnlandedCostUsd = message.subscriptionUnlandedCostUsd;
13700
+ }
13630
13701
  return obj;
13631
13702
  },
13632
13703
 
@@ -13654,6 +13725,9 @@ export const AIFileRow: MessageFns<AIFileRow> = {
13654
13725
  message.sessionId = object.sessionId?.map((e) => e) || [];
13655
13726
  message.unlandedCostUsd = object.unlandedCostUsd ?? 0;
13656
13727
  message.unlandedOutputTokens = object.unlandedOutputTokens ?? 0;
13728
+ message.totalCostUsd = object.totalCostUsd ?? 0;
13729
+ message.subscriptionTotalCostUsd = object.subscriptionTotalCostUsd ?? 0;
13730
+ message.subscriptionUnlandedCostUsd = object.subscriptionUnlandedCostUsd ?? 0;
13657
13731
  return message;
13658
13732
  },
13659
13733
  };
@@ -14095,6 +14169,8 @@ function createBaseFileTierBucket(): FileTierBucket {
14095
14169
  outputTokens: 0,
14096
14170
  oldestAge: undefined,
14097
14171
  filesUnverified: 0,
14172
+ subscriptionCostUsd: 0,
14173
+ subscriptionCostUsdUnverified: 0,
14098
14174
  };
14099
14175
  }
14100
14176
 
@@ -14124,6 +14200,12 @@ export const FileTierBucket: MessageFns<FileTierBucket> = {
14124
14200
  if (message.filesUnverified !== 0) {
14125
14201
  writer.uint32(64).uint64(message.filesUnverified);
14126
14202
  }
14203
+ if (message.subscriptionCostUsd !== 0) {
14204
+ writer.uint32(73).double(message.subscriptionCostUsd);
14205
+ }
14206
+ if (message.subscriptionCostUsdUnverified !== 0) {
14207
+ writer.uint32(81).double(message.subscriptionCostUsdUnverified);
14208
+ }
14127
14209
  return writer;
14128
14210
  },
14129
14211
 
@@ -14204,6 +14286,22 @@ export const FileTierBucket: MessageFns<FileTierBucket> = {
14204
14286
  message.filesUnverified = longToNumber(reader.uint64());
14205
14287
  continue;
14206
14288
  }
14289
+ case 9: {
14290
+ if (tag !== 73) {
14291
+ break;
14292
+ }
14293
+
14294
+ message.subscriptionCostUsd = reader.double();
14295
+ continue;
14296
+ }
14297
+ case 10: {
14298
+ if (tag !== 81) {
14299
+ break;
14300
+ }
14301
+
14302
+ message.subscriptionCostUsdUnverified = reader.double();
14303
+ continue;
14304
+ }
14207
14305
  }
14208
14306
  if ((tag & 7) === 4 || tag === 0) {
14209
14307
  break;
@@ -14246,6 +14344,16 @@ export const FileTierBucket: MessageFns<FileTierBucket> = {
14246
14344
  : isSet(object.files_unverified)
14247
14345
  ? globalThis.Number(object.files_unverified)
14248
14346
  : 0,
14347
+ subscriptionCostUsd: isSet(object.subscriptionCostUsd)
14348
+ ? globalThis.Number(object.subscriptionCostUsd)
14349
+ : isSet(object.subscription_cost_usd)
14350
+ ? globalThis.Number(object.subscription_cost_usd)
14351
+ : 0,
14352
+ subscriptionCostUsdUnverified: isSet(object.subscriptionCostUsdUnverified)
14353
+ ? globalThis.Number(object.subscriptionCostUsdUnverified)
14354
+ : isSet(object.subscription_cost_usd_unverified)
14355
+ ? globalThis.Number(object.subscription_cost_usd_unverified)
14356
+ : 0,
14249
14357
  };
14250
14358
  },
14251
14359
 
@@ -14275,6 +14383,12 @@ export const FileTierBucket: MessageFns<FileTierBucket> = {
14275
14383
  if (message.filesUnverified !== 0) {
14276
14384
  obj.filesUnverified = Math.round(message.filesUnverified);
14277
14385
  }
14386
+ if (message.subscriptionCostUsd !== 0) {
14387
+ obj.subscriptionCostUsd = message.subscriptionCostUsd;
14388
+ }
14389
+ if (message.subscriptionCostUsdUnverified !== 0) {
14390
+ obj.subscriptionCostUsdUnverified = message.subscriptionCostUsdUnverified;
14391
+ }
14278
14392
  return obj;
14279
14393
  },
14280
14394
 
@@ -14293,6 +14407,8 @@ export const FileTierBucket: MessageFns<FileTierBucket> = {
14293
14407
  ? Duration.fromPartial(object.oldestAge)
14294
14408
  : undefined;
14295
14409
  message.filesUnverified = object.filesUnverified ?? 0;
14410
+ message.subscriptionCostUsd = object.subscriptionCostUsd ?? 0;
14411
+ message.subscriptionCostUsdUnverified = object.subscriptionCostUsdUnverified ?? 0;
14296
14412
  return message;
14297
14413
  },
14298
14414
  };
@@ -23586,7 +23586,10 @@ discardReason: jspb.Message.getFieldWithDefault(msg, 15, ""),
23586
23586
  editCount: jspb.Message.getFieldWithDefault(msg, 16, 0),
23587
23587
  sessionIdList: (f = jspb.Message.getRepeatedField(msg, 17)) == null ? undefined : f,
23588
23588
  unlandedCostUsd: jspb.Message.getFloatingPointFieldWithDefault(msg, 18, 0.0),
23589
- unlandedOutputTokens: jspb.Message.getFieldWithDefault(msg, 19, 0)
23589
+ unlandedOutputTokens: jspb.Message.getFieldWithDefault(msg, 19, 0),
23590
+ totalCostUsd: jspb.Message.getFloatingPointFieldWithDefault(msg, 20, 0.0),
23591
+ subscriptionTotalCostUsd: jspb.Message.getFloatingPointFieldWithDefault(msg, 21, 0.0),
23592
+ subscriptionUnlandedCostUsd: jspb.Message.getFloatingPointFieldWithDefault(msg, 22, 0.0)
23590
23593
  };
23591
23594
 
23592
23595
  if (includeInstance) {
@@ -23705,6 +23708,18 @@ proto.gateway.web.v1.AIFileRow.deserializeBinaryFromReader = function(msg, reade
23705
23708
  var value = /** @type {number} */ (reader.readUint64());
23706
23709
  msg.setUnlandedOutputTokens(value);
23707
23710
  break;
23711
+ case 20:
23712
+ var value = /** @type {number} */ (reader.readDouble());
23713
+ msg.setTotalCostUsd(value);
23714
+ break;
23715
+ case 21:
23716
+ var value = /** @type {number} */ (reader.readDouble());
23717
+ msg.setSubscriptionTotalCostUsd(value);
23718
+ break;
23719
+ case 22:
23720
+ var value = /** @type {number} */ (reader.readDouble());
23721
+ msg.setSubscriptionUnlandedCostUsd(value);
23722
+ break;
23708
23723
  default:
23709
23724
  reader.skipField();
23710
23725
  break;
@@ -23873,6 +23888,27 @@ proto.gateway.web.v1.AIFileRow.serializeBinaryToWriter = function(message, write
23873
23888
  f
23874
23889
  );
23875
23890
  }
23891
+ f = message.getTotalCostUsd();
23892
+ if (f !== 0.0) {
23893
+ writer.writeDouble(
23894
+ 20,
23895
+ f
23896
+ );
23897
+ }
23898
+ f = message.getSubscriptionTotalCostUsd();
23899
+ if (f !== 0.0) {
23900
+ writer.writeDouble(
23901
+ 21,
23902
+ f
23903
+ );
23904
+ }
23905
+ f = message.getSubscriptionUnlandedCostUsd();
23906
+ if (f !== 0.0) {
23907
+ writer.writeDouble(
23908
+ 22,
23909
+ f
23910
+ );
23911
+ }
23876
23912
  };
23877
23913
 
23878
23914
 
@@ -24351,6 +24387,60 @@ proto.gateway.web.v1.AIFileRow.prototype.setUnlandedOutputTokens = function(valu
24351
24387
  };
24352
24388
 
24353
24389
 
24390
+ /**
24391
+ * optional double total_cost_usd = 20;
24392
+ * @return {number}
24393
+ */
24394
+ proto.gateway.web.v1.AIFileRow.prototype.getTotalCostUsd = function() {
24395
+ return /** @type {number} */ (jspb.Message.getFloatingPointFieldWithDefault(this, 20, 0.0));
24396
+ };
24397
+
24398
+
24399
+ /**
24400
+ * @param {number} value
24401
+ * @return {!proto.gateway.web.v1.AIFileRow} returns this
24402
+ */
24403
+ proto.gateway.web.v1.AIFileRow.prototype.setTotalCostUsd = function(value) {
24404
+ return jspb.Message.setProto3FloatField(this, 20, value);
24405
+ };
24406
+
24407
+
24408
+ /**
24409
+ * optional double subscription_total_cost_usd = 21;
24410
+ * @return {number}
24411
+ */
24412
+ proto.gateway.web.v1.AIFileRow.prototype.getSubscriptionTotalCostUsd = function() {
24413
+ return /** @type {number} */ (jspb.Message.getFloatingPointFieldWithDefault(this, 21, 0.0));
24414
+ };
24415
+
24416
+
24417
+ /**
24418
+ * @param {number} value
24419
+ * @return {!proto.gateway.web.v1.AIFileRow} returns this
24420
+ */
24421
+ proto.gateway.web.v1.AIFileRow.prototype.setSubscriptionTotalCostUsd = function(value) {
24422
+ return jspb.Message.setProto3FloatField(this, 21, value);
24423
+ };
24424
+
24425
+
24426
+ /**
24427
+ * optional double subscription_unlanded_cost_usd = 22;
24428
+ * @return {number}
24429
+ */
24430
+ proto.gateway.web.v1.AIFileRow.prototype.getSubscriptionUnlandedCostUsd = function() {
24431
+ return /** @type {number} */ (jspb.Message.getFloatingPointFieldWithDefault(this, 22, 0.0));
24432
+ };
24433
+
24434
+
24435
+ /**
24436
+ * @param {number} value
24437
+ * @return {!proto.gateway.web.v1.AIFileRow} returns this
24438
+ */
24439
+ proto.gateway.web.v1.AIFileRow.prototype.setSubscriptionUnlandedCostUsd = function(value) {
24440
+ return jspb.Message.setProto3FloatField(this, 22, value);
24441
+ };
24442
+
24443
+
24354
24444
 
24355
24445
 
24356
24446
 
@@ -25329,7 +25419,9 @@ costUsd: jspb.Message.getFloatingPointFieldWithDefault(msg, 4, 0.0),
25329
25419
  costUsdUnverified: jspb.Message.getFloatingPointFieldWithDefault(msg, 5, 0.0),
25330
25420
  outputTokens: jspb.Message.getFieldWithDefault(msg, 6, 0),
25331
25421
  oldestAge: (f = msg.getOldestAge()) && google_protobuf_duration_pb.Duration.toObject(includeInstance, f),
25332
- filesUnverified: jspb.Message.getFieldWithDefault(msg, 8, 0)
25422
+ filesUnverified: jspb.Message.getFieldWithDefault(msg, 8, 0),
25423
+ subscriptionCostUsd: jspb.Message.getFloatingPointFieldWithDefault(msg, 9, 0.0),
25424
+ subscriptionCostUsdUnverified: jspb.Message.getFloatingPointFieldWithDefault(msg, 10, 0.0)
25333
25425
  };
25334
25426
 
25335
25427
  if (includeInstance) {
@@ -25399,6 +25491,14 @@ proto.gateway.web.v1.FileTierBucket.deserializeBinaryFromReader = function(msg,
25399
25491
  var value = /** @type {number} */ (reader.readUint64());
25400
25492
  msg.setFilesUnverified(value);
25401
25493
  break;
25494
+ case 9:
25495
+ var value = /** @type {number} */ (reader.readDouble());
25496
+ msg.setSubscriptionCostUsd(value);
25497
+ break;
25498
+ case 10:
25499
+ var value = /** @type {number} */ (reader.readDouble());
25500
+ msg.setSubscriptionCostUsdUnverified(value);
25501
+ break;
25402
25502
  default:
25403
25503
  reader.skipField();
25404
25504
  break;
@@ -25485,6 +25585,20 @@ proto.gateway.web.v1.FileTierBucket.serializeBinaryToWriter = function(message,
25485
25585
  f
25486
25586
  );
25487
25587
  }
25588
+ f = message.getSubscriptionCostUsd();
25589
+ if (f !== 0.0) {
25590
+ writer.writeDouble(
25591
+ 9,
25592
+ f
25593
+ );
25594
+ }
25595
+ f = message.getSubscriptionCostUsdUnverified();
25596
+ if (f !== 0.0) {
25597
+ writer.writeDouble(
25598
+ 10,
25599
+ f
25600
+ );
25601
+ }
25488
25602
  };
25489
25603
 
25490
25604
 
@@ -25651,6 +25765,42 @@ proto.gateway.web.v1.FileTierBucket.prototype.setFilesUnverified = function(valu
25651
25765
  };
25652
25766
 
25653
25767
 
25768
+ /**
25769
+ * optional double subscription_cost_usd = 9;
25770
+ * @return {number}
25771
+ */
25772
+ proto.gateway.web.v1.FileTierBucket.prototype.getSubscriptionCostUsd = function() {
25773
+ return /** @type {number} */ (jspb.Message.getFloatingPointFieldWithDefault(this, 9, 0.0));
25774
+ };
25775
+
25776
+
25777
+ /**
25778
+ * @param {number} value
25779
+ * @return {!proto.gateway.web.v1.FileTierBucket} returns this
25780
+ */
25781
+ proto.gateway.web.v1.FileTierBucket.prototype.setSubscriptionCostUsd = function(value) {
25782
+ return jspb.Message.setProto3FloatField(this, 9, value);
25783
+ };
25784
+
25785
+
25786
+ /**
25787
+ * optional double subscription_cost_usd_unverified = 10;
25788
+ * @return {number}
25789
+ */
25790
+ proto.gateway.web.v1.FileTierBucket.prototype.getSubscriptionCostUsdUnverified = function() {
25791
+ return /** @type {number} */ (jspb.Message.getFloatingPointFieldWithDefault(this, 10, 0.0));
25792
+ };
25793
+
25794
+
25795
+ /**
25796
+ * @param {number} value
25797
+ * @return {!proto.gateway.web.v1.FileTierBucket} returns this
25798
+ */
25799
+ proto.gateway.web.v1.FileTierBucket.prototype.setSubscriptionCostUsdUnverified = function(value) {
25800
+ return jspb.Message.setProto3FloatField(this, 10, value);
25801
+ };
25802
+
25803
+
25654
25804
 
25655
25805
 
25656
25806