@miradorlabs/web-grpc 2.62.0 → 2.64.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.
|
@@ -681,6 +681,98 @@ export function aIFileGroupByToJSON(object: AIFileGroupBy): string {
|
|
|
681
681
|
}
|
|
682
682
|
}
|
|
683
683
|
|
|
684
|
+
/** AIFundingMode mirrors telemetry.api.v1.AIFundingMode. */
|
|
685
|
+
export enum AIFundingMode {
|
|
686
|
+
AI_FUNDING_MODE_UNSPECIFIED = 0,
|
|
687
|
+
AI_FUNDING_MODE_SUBSCRIPTION = 1,
|
|
688
|
+
AI_FUNDING_MODE_PREPAID_CREDITS = 2,
|
|
689
|
+
AI_FUNDING_MODE_API_METERED = 3,
|
|
690
|
+
AI_FUNDING_MODE_UNKNOWN = 4,
|
|
691
|
+
UNRECOGNIZED = -1,
|
|
692
|
+
}
|
|
693
|
+
|
|
694
|
+
export function aIFundingModeFromJSON(object: any): AIFundingMode {
|
|
695
|
+
switch (object) {
|
|
696
|
+
case 0:
|
|
697
|
+
case "AI_FUNDING_MODE_UNSPECIFIED":
|
|
698
|
+
return AIFundingMode.AI_FUNDING_MODE_UNSPECIFIED;
|
|
699
|
+
case 1:
|
|
700
|
+
case "AI_FUNDING_MODE_SUBSCRIPTION":
|
|
701
|
+
return AIFundingMode.AI_FUNDING_MODE_SUBSCRIPTION;
|
|
702
|
+
case 2:
|
|
703
|
+
case "AI_FUNDING_MODE_PREPAID_CREDITS":
|
|
704
|
+
return AIFundingMode.AI_FUNDING_MODE_PREPAID_CREDITS;
|
|
705
|
+
case 3:
|
|
706
|
+
case "AI_FUNDING_MODE_API_METERED":
|
|
707
|
+
return AIFundingMode.AI_FUNDING_MODE_API_METERED;
|
|
708
|
+
case 4:
|
|
709
|
+
case "AI_FUNDING_MODE_UNKNOWN":
|
|
710
|
+
return AIFundingMode.AI_FUNDING_MODE_UNKNOWN;
|
|
711
|
+
case -1:
|
|
712
|
+
case "UNRECOGNIZED":
|
|
713
|
+
default:
|
|
714
|
+
return AIFundingMode.UNRECOGNIZED;
|
|
715
|
+
}
|
|
716
|
+
}
|
|
717
|
+
|
|
718
|
+
export function aIFundingModeToJSON(object: AIFundingMode): string {
|
|
719
|
+
switch (object) {
|
|
720
|
+
case AIFundingMode.AI_FUNDING_MODE_UNSPECIFIED:
|
|
721
|
+
return "AI_FUNDING_MODE_UNSPECIFIED";
|
|
722
|
+
case AIFundingMode.AI_FUNDING_MODE_SUBSCRIPTION:
|
|
723
|
+
return "AI_FUNDING_MODE_SUBSCRIPTION";
|
|
724
|
+
case AIFundingMode.AI_FUNDING_MODE_PREPAID_CREDITS:
|
|
725
|
+
return "AI_FUNDING_MODE_PREPAID_CREDITS";
|
|
726
|
+
case AIFundingMode.AI_FUNDING_MODE_API_METERED:
|
|
727
|
+
return "AI_FUNDING_MODE_API_METERED";
|
|
728
|
+
case AIFundingMode.AI_FUNDING_MODE_UNKNOWN:
|
|
729
|
+
return "AI_FUNDING_MODE_UNKNOWN";
|
|
730
|
+
case AIFundingMode.UNRECOGNIZED:
|
|
731
|
+
default:
|
|
732
|
+
return "UNRECOGNIZED";
|
|
733
|
+
}
|
|
734
|
+
}
|
|
735
|
+
|
|
736
|
+
/** AIEntitlementRole mirrors telemetry.api.v1.AIEntitlementRole. */
|
|
737
|
+
export enum AIEntitlementRole {
|
|
738
|
+
AI_ENTITLEMENT_ROLE_UNSPECIFIED = 0,
|
|
739
|
+
AI_ENTITLEMENT_ROLE_ALLOWANCE = 1,
|
|
740
|
+
AI_ENTITLEMENT_ROLE_SPEND_CAP = 2,
|
|
741
|
+
UNRECOGNIZED = -1,
|
|
742
|
+
}
|
|
743
|
+
|
|
744
|
+
export function aIEntitlementRoleFromJSON(object: any): AIEntitlementRole {
|
|
745
|
+
switch (object) {
|
|
746
|
+
case 0:
|
|
747
|
+
case "AI_ENTITLEMENT_ROLE_UNSPECIFIED":
|
|
748
|
+
return AIEntitlementRole.AI_ENTITLEMENT_ROLE_UNSPECIFIED;
|
|
749
|
+
case 1:
|
|
750
|
+
case "AI_ENTITLEMENT_ROLE_ALLOWANCE":
|
|
751
|
+
return AIEntitlementRole.AI_ENTITLEMENT_ROLE_ALLOWANCE;
|
|
752
|
+
case 2:
|
|
753
|
+
case "AI_ENTITLEMENT_ROLE_SPEND_CAP":
|
|
754
|
+
return AIEntitlementRole.AI_ENTITLEMENT_ROLE_SPEND_CAP;
|
|
755
|
+
case -1:
|
|
756
|
+
case "UNRECOGNIZED":
|
|
757
|
+
default:
|
|
758
|
+
return AIEntitlementRole.UNRECOGNIZED;
|
|
759
|
+
}
|
|
760
|
+
}
|
|
761
|
+
|
|
762
|
+
export function aIEntitlementRoleToJSON(object: AIEntitlementRole): string {
|
|
763
|
+
switch (object) {
|
|
764
|
+
case AIEntitlementRole.AI_ENTITLEMENT_ROLE_UNSPECIFIED:
|
|
765
|
+
return "AI_ENTITLEMENT_ROLE_UNSPECIFIED";
|
|
766
|
+
case AIEntitlementRole.AI_ENTITLEMENT_ROLE_ALLOWANCE:
|
|
767
|
+
return "AI_ENTITLEMENT_ROLE_ALLOWANCE";
|
|
768
|
+
case AIEntitlementRole.AI_ENTITLEMENT_ROLE_SPEND_CAP:
|
|
769
|
+
return "AI_ENTITLEMENT_ROLE_SPEND_CAP";
|
|
770
|
+
case AIEntitlementRole.UNRECOGNIZED:
|
|
771
|
+
default:
|
|
772
|
+
return "UNRECOGNIZED";
|
|
773
|
+
}
|
|
774
|
+
}
|
|
775
|
+
|
|
684
776
|
export interface ListSessionsRequest {
|
|
685
777
|
organizationId: string;
|
|
686
778
|
projectId: string;
|
|
@@ -866,6 +958,11 @@ export interface AISessionEvent {
|
|
|
866
958
|
version: number;
|
|
867
959
|
/** Opaque keyset cursor for this event's position. */
|
|
868
960
|
cursor: string;
|
|
961
|
+
/**
|
|
962
|
+
* The funding facility observed for this event at ingest (a per-event facility lens, not a reconciled
|
|
963
|
+
* figure). '' / unrecognized map to UNSPECIFIED.
|
|
964
|
+
*/
|
|
965
|
+
fundingMode: AIFundingMode;
|
|
869
966
|
}
|
|
870
967
|
|
|
871
968
|
export interface AIContentPart {
|
|
@@ -970,7 +1067,11 @@ export interface SessionTimelinePoint {
|
|
|
970
1067
|
provider: string;
|
|
971
1068
|
finishReason: string;
|
|
972
1069
|
durationMs?: number | undefined;
|
|
973
|
-
usage:
|
|
1070
|
+
usage:
|
|
1071
|
+
| AITokenUsage
|
|
1072
|
+
| undefined;
|
|
1073
|
+
/** Funding facility observed on this event (lens, not reconciled) so the timeline can tint by facility. */
|
|
1074
|
+
fundingMode: AIFundingMode;
|
|
974
1075
|
}
|
|
975
1076
|
|
|
976
1077
|
export interface ListPrincipalsRequest {
|
|
@@ -1241,13 +1342,28 @@ export interface BurnRateSparkPoint {
|
|
|
1241
1342
|
rate: BurnRateMeasures | undefined;
|
|
1242
1343
|
}
|
|
1243
1344
|
|
|
1244
|
-
/**
|
|
1345
|
+
/**
|
|
1346
|
+
* BurnRateMeasures — usd_per_hour = bucket cost x 60 (NOTIONAL, gross list price); tokens_per_min =
|
|
1347
|
+
* cache-inclusive input + output. subscription_facility_usd_per_hour is the slice observed on the
|
|
1348
|
+
* subscription funding facility at ingest (a LENS, like AIFacilityCostBreakdown.subscription_facility_usd —
|
|
1349
|
+
* NOT reconciled subsidised dollars; the "_facility_" is load-bearing). The burn card may present
|
|
1350
|
+
* usd_per_hour minus this as a metered-view rate, but that is a display lens, not settled billing.
|
|
1351
|
+
*/
|
|
1245
1352
|
export interface BurnRateMeasures {
|
|
1246
1353
|
usdPerHour: number;
|
|
1247
1354
|
tokensPerMin: number;
|
|
1248
1355
|
modelCalls: number;
|
|
1249
1356
|
costUnavailableCount: number;
|
|
1250
1357
|
usageUnavailableCount: number;
|
|
1358
|
+
subscriptionFacilityUsdPerHour: number;
|
|
1359
|
+
/**
|
|
1360
|
+
* Per-minute token rate by kind, so the burn card watches each tick live. tokens_per_min stays the
|
|
1361
|
+
* cache-inclusive input + output headline; input already includes cache_read (these are the raw columns).
|
|
1362
|
+
*/
|
|
1363
|
+
inputTokensPerMin: number;
|
|
1364
|
+
outputTokensPerMin: number;
|
|
1365
|
+
cacheReadTokensPerMin: number;
|
|
1366
|
+
cacheWriteTokensPerMin: number;
|
|
1251
1367
|
}
|
|
1252
1368
|
|
|
1253
1369
|
export interface DailyActivityRequest {
|
|
@@ -1560,6 +1676,83 @@ export interface AITokenUsage {
|
|
|
1560
1676
|
cacheReadTokens: number;
|
|
1561
1677
|
cacheWriteTokens: number;
|
|
1562
1678
|
providerCostUsd: number;
|
|
1679
|
+
/**
|
|
1680
|
+
* Session cost sliced by the funding facility observed on each event at ingest (a LENS, not a
|
|
1681
|
+
* reconciled billable figure). Populated only on a session summary's usage; nil elsewhere.
|
|
1682
|
+
*/
|
|
1683
|
+
facilityCostBreakdown: AIFacilityCostBreakdown | undefined;
|
|
1684
|
+
}
|
|
1685
|
+
|
|
1686
|
+
/**
|
|
1687
|
+
* AIFacilityCostBreakdown mirrors telemetry.api.v1.AIFacilityCostBreakdown: a session's provider cost
|
|
1688
|
+
* partitioned by the funding facility observed on each model_call at ingest. A LENS on where spend
|
|
1689
|
+
* landed, NOT a reconciled billable/subsidised answer — a subscription facility can still incur
|
|
1690
|
+
* metered overage, and the facility is the one observed at ingest. Over ai_events FINAL (deduplicated).
|
|
1691
|
+
*/
|
|
1692
|
+
export interface AIFacilityCostBreakdown {
|
|
1693
|
+
/** sum of provider cost over priced model_calls — the gross */
|
|
1694
|
+
notionalUsd: number;
|
|
1695
|
+
/** _facility_usd = cost by OBSERVED facility, NOT reconciled billable dollars (name is load-bearing). */
|
|
1696
|
+
subscriptionFacilityUsd: number;
|
|
1697
|
+
prepaidCreditsFacilityUsd: number;
|
|
1698
|
+
apiMeteredFacilityUsd: number;
|
|
1699
|
+
/** unstamped or observed-unknown, one bucket */
|
|
1700
|
+
unknownFacilityUsd: number;
|
|
1701
|
+
pricedCalls: number;
|
|
1702
|
+
/** an unpriced call is not free, just uncosted */
|
|
1703
|
+
totalCalls: number;
|
|
1704
|
+
}
|
|
1705
|
+
|
|
1706
|
+
export interface StreamEntitlementsRequest {
|
|
1707
|
+
organizationId: string;
|
|
1708
|
+
projectId: string;
|
|
1709
|
+
}
|
|
1710
|
+
|
|
1711
|
+
/**
|
|
1712
|
+
* EntitlementsSnapshot is one tick of the funding-usage board (first frame = full snapshot). Streams
|
|
1713
|
+
* carry no ResponseStatus.
|
|
1714
|
+
*/
|
|
1715
|
+
export interface EntitlementsSnapshot {
|
|
1716
|
+
seats: SeatEntitlement[];
|
|
1717
|
+
asOf: Date | undefined;
|
|
1718
|
+
}
|
|
1719
|
+
|
|
1720
|
+
/**
|
|
1721
|
+
* SeatEntitlement mirrors telemetry.api.v1.SeatEntitlement: one entitlement owner's latest observed
|
|
1722
|
+
* funding state. Seat-scoped ((source_system, account_id)); principal_id/name best-effort. Seat-scoped:
|
|
1723
|
+
* windows are one seat's usage bars, never a team-pool sum. credits_balance_raw is verbatim, not USD.
|
|
1724
|
+
*/
|
|
1725
|
+
export interface SeatEntitlement {
|
|
1726
|
+
sourceSystem: string;
|
|
1727
|
+
accountId: string;
|
|
1728
|
+
principalId: string;
|
|
1729
|
+
principalName: string;
|
|
1730
|
+
fundingMode: AIFundingMode;
|
|
1731
|
+
windows: EntitlementWindow[];
|
|
1732
|
+
/** As-of entitlement-state time (keyed on terma source_time), NOT ingest time. */
|
|
1733
|
+
eventTime: Date | undefined;
|
|
1734
|
+
creditsBalanceRaw?: string | undefined;
|
|
1735
|
+
creditsUnlimited?:
|
|
1736
|
+
| boolean
|
|
1737
|
+
| undefined;
|
|
1738
|
+
/** harness plan label verbatim ("Max 20x" / "Max 5x" / "Codex seat") */
|
|
1739
|
+
planType: string;
|
|
1740
|
+
seatTier: string;
|
|
1741
|
+
/** raw provenance for the registered/observed/inferred toggle */
|
|
1742
|
+
evidenceSource: string;
|
|
1743
|
+
}
|
|
1744
|
+
|
|
1745
|
+
/**
|
|
1746
|
+
* EntitlementWindow mirrors telemetry.api.v1.EntitlementWindow: one usage % bar. used_pct is nullable
|
|
1747
|
+
* (unset = unobserved, never 0). kind is the harness window discriminator verbatim; window_seconds is
|
|
1748
|
+
* the window's total span (unset = unobserved).
|
|
1749
|
+
*/
|
|
1750
|
+
export interface EntitlementWindow {
|
|
1751
|
+
kind: string;
|
|
1752
|
+
usedPct?: number | undefined;
|
|
1753
|
+
resetsAt: Date | undefined;
|
|
1754
|
+
role: AIEntitlementRole;
|
|
1755
|
+
windowSeconds?: number | undefined;
|
|
1563
1756
|
}
|
|
1564
1757
|
|
|
1565
1758
|
function createBaseListSessionsRequest(): ListSessionsRequest {
|
|
@@ -3689,6 +3882,7 @@ function createBaseAISessionEvent(): AISessionEvent {
|
|
|
3689
3882
|
logicalEventId: "",
|
|
3690
3883
|
version: 0,
|
|
3691
3884
|
cursor: "",
|
|
3885
|
+
fundingMode: 0,
|
|
3692
3886
|
};
|
|
3693
3887
|
}
|
|
3694
3888
|
|
|
@@ -3748,6 +3942,9 @@ export const AISessionEvent: MessageFns<AISessionEvent> = {
|
|
|
3748
3942
|
if (message.cursor !== "") {
|
|
3749
3943
|
writer.uint32(146).string(message.cursor);
|
|
3750
3944
|
}
|
|
3945
|
+
if (message.fundingMode !== 0) {
|
|
3946
|
+
writer.uint32(152).int32(message.fundingMode);
|
|
3947
|
+
}
|
|
3751
3948
|
return writer;
|
|
3752
3949
|
},
|
|
3753
3950
|
|
|
@@ -3908,6 +4105,14 @@ export const AISessionEvent: MessageFns<AISessionEvent> = {
|
|
|
3908
4105
|
message.cursor = reader.string();
|
|
3909
4106
|
continue;
|
|
3910
4107
|
}
|
|
4108
|
+
case 19: {
|
|
4109
|
+
if (tag !== 152) {
|
|
4110
|
+
break;
|
|
4111
|
+
}
|
|
4112
|
+
|
|
4113
|
+
message.fundingMode = reader.int32() as any;
|
|
4114
|
+
continue;
|
|
4115
|
+
}
|
|
3911
4116
|
}
|
|
3912
4117
|
if ((tag & 7) === 4 || tag === 0) {
|
|
3913
4118
|
break;
|
|
@@ -3978,6 +4183,11 @@ export const AISessionEvent: MessageFns<AISessionEvent> = {
|
|
|
3978
4183
|
: "",
|
|
3979
4184
|
version: isSet(object.version) ? globalThis.Number(object.version) : 0,
|
|
3980
4185
|
cursor: isSet(object.cursor) ? globalThis.String(object.cursor) : "",
|
|
4186
|
+
fundingMode: isSet(object.fundingMode)
|
|
4187
|
+
? aIFundingModeFromJSON(object.fundingMode)
|
|
4188
|
+
: isSet(object.funding_mode)
|
|
4189
|
+
? aIFundingModeFromJSON(object.funding_mode)
|
|
4190
|
+
: 0,
|
|
3981
4191
|
};
|
|
3982
4192
|
},
|
|
3983
4193
|
|
|
@@ -4037,6 +4247,9 @@ export const AISessionEvent: MessageFns<AISessionEvent> = {
|
|
|
4037
4247
|
if (message.cursor !== "") {
|
|
4038
4248
|
obj.cursor = message.cursor;
|
|
4039
4249
|
}
|
|
4250
|
+
if (message.fundingMode !== 0) {
|
|
4251
|
+
obj.fundingMode = aIFundingModeToJSON(message.fundingMode);
|
|
4252
|
+
}
|
|
4040
4253
|
return obj;
|
|
4041
4254
|
},
|
|
4042
4255
|
|
|
@@ -4065,6 +4278,7 @@ export const AISessionEvent: MessageFns<AISessionEvent> = {
|
|
|
4065
4278
|
message.logicalEventId = object.logicalEventId ?? "";
|
|
4066
4279
|
message.version = object.version ?? 0;
|
|
4067
4280
|
message.cursor = object.cursor ?? "";
|
|
4281
|
+
message.fundingMode = object.fundingMode ?? 0;
|
|
4068
4282
|
return message;
|
|
4069
4283
|
},
|
|
4070
4284
|
};
|
|
@@ -5241,6 +5455,7 @@ function createBaseSessionTimelinePoint(): SessionTimelinePoint {
|
|
|
5241
5455
|
finishReason: "",
|
|
5242
5456
|
durationMs: undefined,
|
|
5243
5457
|
usage: undefined,
|
|
5458
|
+
fundingMode: 0,
|
|
5244
5459
|
};
|
|
5245
5460
|
}
|
|
5246
5461
|
|
|
@@ -5273,6 +5488,9 @@ export const SessionTimelinePoint: MessageFns<SessionTimelinePoint> = {
|
|
|
5273
5488
|
if (message.usage !== undefined) {
|
|
5274
5489
|
AITokenUsage.encode(message.usage, writer.uint32(74).fork()).join();
|
|
5275
5490
|
}
|
|
5491
|
+
if (message.fundingMode !== 0) {
|
|
5492
|
+
writer.uint32(80).int32(message.fundingMode);
|
|
5493
|
+
}
|
|
5276
5494
|
return writer;
|
|
5277
5495
|
},
|
|
5278
5496
|
|
|
@@ -5361,6 +5579,14 @@ export const SessionTimelinePoint: MessageFns<SessionTimelinePoint> = {
|
|
|
5361
5579
|
message.usage = AITokenUsage.decode(reader, reader.uint32());
|
|
5362
5580
|
continue;
|
|
5363
5581
|
}
|
|
5582
|
+
case 10: {
|
|
5583
|
+
if (tag !== 80) {
|
|
5584
|
+
break;
|
|
5585
|
+
}
|
|
5586
|
+
|
|
5587
|
+
message.fundingMode = reader.int32() as any;
|
|
5588
|
+
continue;
|
|
5589
|
+
}
|
|
5364
5590
|
}
|
|
5365
5591
|
if ((tag & 7) === 4 || tag === 0) {
|
|
5366
5592
|
break;
|
|
@@ -5400,6 +5626,11 @@ export const SessionTimelinePoint: MessageFns<SessionTimelinePoint> = {
|
|
|
5400
5626
|
? globalThis.Number(object.duration_ms)
|
|
5401
5627
|
: undefined,
|
|
5402
5628
|
usage: isSet(object.usage) ? AITokenUsage.fromJSON(object.usage) : undefined,
|
|
5629
|
+
fundingMode: isSet(object.fundingMode)
|
|
5630
|
+
? aIFundingModeFromJSON(object.fundingMode)
|
|
5631
|
+
: isSet(object.funding_mode)
|
|
5632
|
+
? aIFundingModeFromJSON(object.funding_mode)
|
|
5633
|
+
: 0,
|
|
5403
5634
|
};
|
|
5404
5635
|
},
|
|
5405
5636
|
|
|
@@ -5432,6 +5663,9 @@ export const SessionTimelinePoint: MessageFns<SessionTimelinePoint> = {
|
|
|
5432
5663
|
if (message.usage !== undefined) {
|
|
5433
5664
|
obj.usage = AITokenUsage.toJSON(message.usage);
|
|
5434
5665
|
}
|
|
5666
|
+
if (message.fundingMode !== 0) {
|
|
5667
|
+
obj.fundingMode = aIFundingModeToJSON(message.fundingMode);
|
|
5668
|
+
}
|
|
5435
5669
|
return obj;
|
|
5436
5670
|
},
|
|
5437
5671
|
|
|
@@ -5451,6 +5685,7 @@ export const SessionTimelinePoint: MessageFns<SessionTimelinePoint> = {
|
|
|
5451
5685
|
message.usage = (object.usage !== undefined && object.usage !== null)
|
|
5452
5686
|
? AITokenUsage.fromPartial(object.usage)
|
|
5453
5687
|
: undefined;
|
|
5688
|
+
message.fundingMode = object.fundingMode ?? 0;
|
|
5454
5689
|
return message;
|
|
5455
5690
|
},
|
|
5456
5691
|
};
|
|
@@ -9396,7 +9631,18 @@ export const BurnRateSparkPoint: MessageFns<BurnRateSparkPoint> = {
|
|
|
9396
9631
|
};
|
|
9397
9632
|
|
|
9398
9633
|
function createBaseBurnRateMeasures(): BurnRateMeasures {
|
|
9399
|
-
return {
|
|
9634
|
+
return {
|
|
9635
|
+
usdPerHour: 0,
|
|
9636
|
+
tokensPerMin: 0,
|
|
9637
|
+
modelCalls: 0,
|
|
9638
|
+
costUnavailableCount: 0,
|
|
9639
|
+
usageUnavailableCount: 0,
|
|
9640
|
+
subscriptionFacilityUsdPerHour: 0,
|
|
9641
|
+
inputTokensPerMin: 0,
|
|
9642
|
+
outputTokensPerMin: 0,
|
|
9643
|
+
cacheReadTokensPerMin: 0,
|
|
9644
|
+
cacheWriteTokensPerMin: 0,
|
|
9645
|
+
};
|
|
9400
9646
|
}
|
|
9401
9647
|
|
|
9402
9648
|
export const BurnRateMeasures: MessageFns<BurnRateMeasures> = {
|
|
@@ -9416,6 +9662,21 @@ export const BurnRateMeasures: MessageFns<BurnRateMeasures> = {
|
|
|
9416
9662
|
if (message.usageUnavailableCount !== 0) {
|
|
9417
9663
|
writer.uint32(40).uint64(message.usageUnavailableCount);
|
|
9418
9664
|
}
|
|
9665
|
+
if (message.subscriptionFacilityUsdPerHour !== 0) {
|
|
9666
|
+
writer.uint32(49).double(message.subscriptionFacilityUsdPerHour);
|
|
9667
|
+
}
|
|
9668
|
+
if (message.inputTokensPerMin !== 0) {
|
|
9669
|
+
writer.uint32(57).double(message.inputTokensPerMin);
|
|
9670
|
+
}
|
|
9671
|
+
if (message.outputTokensPerMin !== 0) {
|
|
9672
|
+
writer.uint32(65).double(message.outputTokensPerMin);
|
|
9673
|
+
}
|
|
9674
|
+
if (message.cacheReadTokensPerMin !== 0) {
|
|
9675
|
+
writer.uint32(73).double(message.cacheReadTokensPerMin);
|
|
9676
|
+
}
|
|
9677
|
+
if (message.cacheWriteTokensPerMin !== 0) {
|
|
9678
|
+
writer.uint32(81).double(message.cacheWriteTokensPerMin);
|
|
9679
|
+
}
|
|
9419
9680
|
return writer;
|
|
9420
9681
|
},
|
|
9421
9682
|
|
|
@@ -9472,6 +9733,46 @@ export const BurnRateMeasures: MessageFns<BurnRateMeasures> = {
|
|
|
9472
9733
|
message.usageUnavailableCount = longToNumber(reader.uint64());
|
|
9473
9734
|
continue;
|
|
9474
9735
|
}
|
|
9736
|
+
case 6: {
|
|
9737
|
+
if (tag !== 49) {
|
|
9738
|
+
break;
|
|
9739
|
+
}
|
|
9740
|
+
|
|
9741
|
+
message.subscriptionFacilityUsdPerHour = reader.double();
|
|
9742
|
+
continue;
|
|
9743
|
+
}
|
|
9744
|
+
case 7: {
|
|
9745
|
+
if (tag !== 57) {
|
|
9746
|
+
break;
|
|
9747
|
+
}
|
|
9748
|
+
|
|
9749
|
+
message.inputTokensPerMin = reader.double();
|
|
9750
|
+
continue;
|
|
9751
|
+
}
|
|
9752
|
+
case 8: {
|
|
9753
|
+
if (tag !== 65) {
|
|
9754
|
+
break;
|
|
9755
|
+
}
|
|
9756
|
+
|
|
9757
|
+
message.outputTokensPerMin = reader.double();
|
|
9758
|
+
continue;
|
|
9759
|
+
}
|
|
9760
|
+
case 9: {
|
|
9761
|
+
if (tag !== 73) {
|
|
9762
|
+
break;
|
|
9763
|
+
}
|
|
9764
|
+
|
|
9765
|
+
message.cacheReadTokensPerMin = reader.double();
|
|
9766
|
+
continue;
|
|
9767
|
+
}
|
|
9768
|
+
case 10: {
|
|
9769
|
+
if (tag !== 81) {
|
|
9770
|
+
break;
|
|
9771
|
+
}
|
|
9772
|
+
|
|
9773
|
+
message.cacheWriteTokensPerMin = reader.double();
|
|
9774
|
+
continue;
|
|
9775
|
+
}
|
|
9475
9776
|
}
|
|
9476
9777
|
if ((tag & 7) === 4 || tag === 0) {
|
|
9477
9778
|
break;
|
|
@@ -9511,6 +9812,31 @@ export const BurnRateMeasures: MessageFns<BurnRateMeasures> = {
|
|
|
9511
9812
|
: isSet(object.usage_unavailable_count)
|
|
9512
9813
|
? globalThis.Number(object.usage_unavailable_count)
|
|
9513
9814
|
: 0,
|
|
9815
|
+
subscriptionFacilityUsdPerHour: isSet(object.subscriptionFacilityUsdPerHour)
|
|
9816
|
+
? globalThis.Number(object.subscriptionFacilityUsdPerHour)
|
|
9817
|
+
: isSet(object.subscription_facility_usd_per_hour)
|
|
9818
|
+
? globalThis.Number(object.subscription_facility_usd_per_hour)
|
|
9819
|
+
: 0,
|
|
9820
|
+
inputTokensPerMin: isSet(object.inputTokensPerMin)
|
|
9821
|
+
? globalThis.Number(object.inputTokensPerMin)
|
|
9822
|
+
: isSet(object.input_tokens_per_min)
|
|
9823
|
+
? globalThis.Number(object.input_tokens_per_min)
|
|
9824
|
+
: 0,
|
|
9825
|
+
outputTokensPerMin: isSet(object.outputTokensPerMin)
|
|
9826
|
+
? globalThis.Number(object.outputTokensPerMin)
|
|
9827
|
+
: isSet(object.output_tokens_per_min)
|
|
9828
|
+
? globalThis.Number(object.output_tokens_per_min)
|
|
9829
|
+
: 0,
|
|
9830
|
+
cacheReadTokensPerMin: isSet(object.cacheReadTokensPerMin)
|
|
9831
|
+
? globalThis.Number(object.cacheReadTokensPerMin)
|
|
9832
|
+
: isSet(object.cache_read_tokens_per_min)
|
|
9833
|
+
? globalThis.Number(object.cache_read_tokens_per_min)
|
|
9834
|
+
: 0,
|
|
9835
|
+
cacheWriteTokensPerMin: isSet(object.cacheWriteTokensPerMin)
|
|
9836
|
+
? globalThis.Number(object.cacheWriteTokensPerMin)
|
|
9837
|
+
: isSet(object.cache_write_tokens_per_min)
|
|
9838
|
+
? globalThis.Number(object.cache_write_tokens_per_min)
|
|
9839
|
+
: 0,
|
|
9514
9840
|
};
|
|
9515
9841
|
},
|
|
9516
9842
|
|
|
@@ -9531,6 +9857,21 @@ export const BurnRateMeasures: MessageFns<BurnRateMeasures> = {
|
|
|
9531
9857
|
if (message.usageUnavailableCount !== 0) {
|
|
9532
9858
|
obj.usageUnavailableCount = Math.round(message.usageUnavailableCount);
|
|
9533
9859
|
}
|
|
9860
|
+
if (message.subscriptionFacilityUsdPerHour !== 0) {
|
|
9861
|
+
obj.subscriptionFacilityUsdPerHour = message.subscriptionFacilityUsdPerHour;
|
|
9862
|
+
}
|
|
9863
|
+
if (message.inputTokensPerMin !== 0) {
|
|
9864
|
+
obj.inputTokensPerMin = message.inputTokensPerMin;
|
|
9865
|
+
}
|
|
9866
|
+
if (message.outputTokensPerMin !== 0) {
|
|
9867
|
+
obj.outputTokensPerMin = message.outputTokensPerMin;
|
|
9868
|
+
}
|
|
9869
|
+
if (message.cacheReadTokensPerMin !== 0) {
|
|
9870
|
+
obj.cacheReadTokensPerMin = message.cacheReadTokensPerMin;
|
|
9871
|
+
}
|
|
9872
|
+
if (message.cacheWriteTokensPerMin !== 0) {
|
|
9873
|
+
obj.cacheWriteTokensPerMin = message.cacheWriteTokensPerMin;
|
|
9874
|
+
}
|
|
9534
9875
|
return obj;
|
|
9535
9876
|
},
|
|
9536
9877
|
|
|
@@ -9544,6 +9885,11 @@ export const BurnRateMeasures: MessageFns<BurnRateMeasures> = {
|
|
|
9544
9885
|
message.modelCalls = object.modelCalls ?? 0;
|
|
9545
9886
|
message.costUnavailableCount = object.costUnavailableCount ?? 0;
|
|
9546
9887
|
message.usageUnavailableCount = object.usageUnavailableCount ?? 0;
|
|
9888
|
+
message.subscriptionFacilityUsdPerHour = object.subscriptionFacilityUsdPerHour ?? 0;
|
|
9889
|
+
message.inputTokensPerMin = object.inputTokensPerMin ?? 0;
|
|
9890
|
+
message.outputTokensPerMin = object.outputTokensPerMin ?? 0;
|
|
9891
|
+
message.cacheReadTokensPerMin = object.cacheReadTokensPerMin ?? 0;
|
|
9892
|
+
message.cacheWriteTokensPerMin = object.cacheWriteTokensPerMin ?? 0;
|
|
9547
9893
|
return message;
|
|
9548
9894
|
},
|
|
9549
9895
|
};
|
|
@@ -14795,7 +15141,14 @@ export const AIModelPrice: MessageFns<AIModelPrice> = {
|
|
|
14795
15141
|
};
|
|
14796
15142
|
|
|
14797
15143
|
function createBaseAITokenUsage(): AITokenUsage {
|
|
14798
|
-
return {
|
|
15144
|
+
return {
|
|
15145
|
+
inputTokens: 0,
|
|
15146
|
+
outputTokens: 0,
|
|
15147
|
+
cacheReadTokens: 0,
|
|
15148
|
+
cacheWriteTokens: 0,
|
|
15149
|
+
providerCostUsd: 0,
|
|
15150
|
+
facilityCostBreakdown: undefined,
|
|
15151
|
+
};
|
|
14799
15152
|
}
|
|
14800
15153
|
|
|
14801
15154
|
export const AITokenUsage: MessageFns<AITokenUsage> = {
|
|
@@ -14815,6 +15168,9 @@ export const AITokenUsage: MessageFns<AITokenUsage> = {
|
|
|
14815
15168
|
if (message.providerCostUsd !== 0) {
|
|
14816
15169
|
writer.uint32(41).double(message.providerCostUsd);
|
|
14817
15170
|
}
|
|
15171
|
+
if (message.facilityCostBreakdown !== undefined) {
|
|
15172
|
+
AIFacilityCostBreakdown.encode(message.facilityCostBreakdown, writer.uint32(50).fork()).join();
|
|
15173
|
+
}
|
|
14818
15174
|
return writer;
|
|
14819
15175
|
},
|
|
14820
15176
|
|
|
@@ -14871,6 +15227,14 @@ export const AITokenUsage: MessageFns<AITokenUsage> = {
|
|
|
14871
15227
|
message.providerCostUsd = reader.double();
|
|
14872
15228
|
continue;
|
|
14873
15229
|
}
|
|
15230
|
+
case 6: {
|
|
15231
|
+
if (tag !== 50) {
|
|
15232
|
+
break;
|
|
15233
|
+
}
|
|
15234
|
+
|
|
15235
|
+
message.facilityCostBreakdown = AIFacilityCostBreakdown.decode(reader, reader.uint32());
|
|
15236
|
+
continue;
|
|
15237
|
+
}
|
|
14874
15238
|
}
|
|
14875
15239
|
if ((tag & 7) === 4 || tag === 0) {
|
|
14876
15240
|
break;
|
|
@@ -14910,6 +15274,11 @@ export const AITokenUsage: MessageFns<AITokenUsage> = {
|
|
|
14910
15274
|
: isSet(object.provider_cost_usd)
|
|
14911
15275
|
? globalThis.Number(object.provider_cost_usd)
|
|
14912
15276
|
: 0,
|
|
15277
|
+
facilityCostBreakdown: isSet(object.facilityCostBreakdown)
|
|
15278
|
+
? AIFacilityCostBreakdown.fromJSON(object.facilityCostBreakdown)
|
|
15279
|
+
: isSet(object.facility_cost_breakdown)
|
|
15280
|
+
? AIFacilityCostBreakdown.fromJSON(object.facility_cost_breakdown)
|
|
15281
|
+
: undefined,
|
|
14913
15282
|
};
|
|
14914
15283
|
},
|
|
14915
15284
|
|
|
@@ -14930,6 +15299,9 @@ export const AITokenUsage: MessageFns<AITokenUsage> = {
|
|
|
14930
15299
|
if (message.providerCostUsd !== 0) {
|
|
14931
15300
|
obj.providerCostUsd = message.providerCostUsd;
|
|
14932
15301
|
}
|
|
15302
|
+
if (message.facilityCostBreakdown !== undefined) {
|
|
15303
|
+
obj.facilityCostBreakdown = AIFacilityCostBreakdown.toJSON(message.facilityCostBreakdown);
|
|
15304
|
+
}
|
|
14933
15305
|
return obj;
|
|
14934
15306
|
},
|
|
14935
15307
|
|
|
@@ -14943,107 +15315,949 @@ export const AITokenUsage: MessageFns<AITokenUsage> = {
|
|
|
14943
15315
|
message.cacheReadTokens = object.cacheReadTokens ?? 0;
|
|
14944
15316
|
message.cacheWriteTokens = object.cacheWriteTokens ?? 0;
|
|
14945
15317
|
message.providerCostUsd = object.providerCostUsd ?? 0;
|
|
15318
|
+
message.facilityCostBreakdown =
|
|
15319
|
+
(object.facilityCostBreakdown !== undefined && object.facilityCostBreakdown !== null)
|
|
15320
|
+
? AIFacilityCostBreakdown.fromPartial(object.facilityCostBreakdown)
|
|
15321
|
+
: undefined;
|
|
14946
15322
|
return message;
|
|
14947
15323
|
},
|
|
14948
15324
|
};
|
|
14949
15325
|
|
|
14950
|
-
|
|
14951
|
-
|
|
14952
|
-
|
|
14953
|
-
|
|
14954
|
-
|
|
14955
|
-
|
|
14956
|
-
|
|
14957
|
-
|
|
14958
|
-
|
|
14959
|
-
|
|
14960
|
-
|
|
14961
|
-
|
|
14962
|
-
|
|
14963
|
-
|
|
14964
|
-
|
|
14965
|
-
|
|
14966
|
-
|
|
14967
|
-
|
|
14968
|
-
|
|
14969
|
-
|
|
14970
|
-
|
|
14971
|
-
|
|
14972
|
-
|
|
14973
|
-
|
|
14974
|
-
|
|
14975
|
-
|
|
14976
|
-
|
|
14977
|
-
|
|
14978
|
-
|
|
14979
|
-
|
|
14980
|
-
|
|
14981
|
-
|
|
14982
|
-
|
|
14983
|
-
|
|
14984
|
-
|
|
14985
|
-
|
|
14986
|
-
|
|
14987
|
-
|
|
14988
|
-
|
|
14989
|
-
|
|
14990
|
-
|
|
14991
|
-
|
|
14992
|
-
|
|
14993
|
-
|
|
14994
|
-
|
|
14995
|
-
|
|
14996
|
-
|
|
14997
|
-
|
|
14998
|
-
|
|
14999
|
-
|
|
15000
|
-
|
|
15001
|
-
|
|
15002
|
-
|
|
15003
|
-
|
|
15004
|
-
|
|
15005
|
-
|
|
15006
|
-
|
|
15007
|
-
|
|
15008
|
-
|
|
15009
|
-
|
|
15010
|
-
|
|
15011
|
-
|
|
15012
|
-
|
|
15013
|
-
|
|
15014
|
-
|
|
15015
|
-
|
|
15016
|
-
|
|
15017
|
-
|
|
15018
|
-
|
|
15019
|
-
|
|
15020
|
-
|
|
15021
|
-
|
|
15022
|
-
|
|
15023
|
-
|
|
15024
|
-
|
|
15025
|
-
|
|
15026
|
-
|
|
15027
|
-
|
|
15028
|
-
|
|
15029
|
-
|
|
15030
|
-
|
|
15031
|
-
|
|
15032
|
-
|
|
15033
|
-
|
|
15034
|
-
|
|
15035
|
-
|
|
15036
|
-
|
|
15037
|
-
|
|
15038
|
-
|
|
15039
|
-
|
|
15040
|
-
|
|
15326
|
+
function createBaseAIFacilityCostBreakdown(): AIFacilityCostBreakdown {
|
|
15327
|
+
return {
|
|
15328
|
+
notionalUsd: 0,
|
|
15329
|
+
subscriptionFacilityUsd: 0,
|
|
15330
|
+
prepaidCreditsFacilityUsd: 0,
|
|
15331
|
+
apiMeteredFacilityUsd: 0,
|
|
15332
|
+
unknownFacilityUsd: 0,
|
|
15333
|
+
pricedCalls: 0,
|
|
15334
|
+
totalCalls: 0,
|
|
15335
|
+
};
|
|
15336
|
+
}
|
|
15337
|
+
|
|
15338
|
+
export const AIFacilityCostBreakdown: MessageFns<AIFacilityCostBreakdown> = {
|
|
15339
|
+
encode(message: AIFacilityCostBreakdown, writer: BinaryWriter = new BinaryWriter()): BinaryWriter {
|
|
15340
|
+
if (message.notionalUsd !== 0) {
|
|
15341
|
+
writer.uint32(9).double(message.notionalUsd);
|
|
15342
|
+
}
|
|
15343
|
+
if (message.subscriptionFacilityUsd !== 0) {
|
|
15344
|
+
writer.uint32(17).double(message.subscriptionFacilityUsd);
|
|
15345
|
+
}
|
|
15346
|
+
if (message.prepaidCreditsFacilityUsd !== 0) {
|
|
15347
|
+
writer.uint32(25).double(message.prepaidCreditsFacilityUsd);
|
|
15348
|
+
}
|
|
15349
|
+
if (message.apiMeteredFacilityUsd !== 0) {
|
|
15350
|
+
writer.uint32(33).double(message.apiMeteredFacilityUsd);
|
|
15351
|
+
}
|
|
15352
|
+
if (message.unknownFacilityUsd !== 0) {
|
|
15353
|
+
writer.uint32(41).double(message.unknownFacilityUsd);
|
|
15354
|
+
}
|
|
15355
|
+
if (message.pricedCalls !== 0) {
|
|
15356
|
+
writer.uint32(48).uint64(message.pricedCalls);
|
|
15357
|
+
}
|
|
15358
|
+
if (message.totalCalls !== 0) {
|
|
15359
|
+
writer.uint32(56).uint64(message.totalCalls);
|
|
15360
|
+
}
|
|
15361
|
+
return writer;
|
|
15362
|
+
},
|
|
15363
|
+
|
|
15364
|
+
decode(input: BinaryReader | Uint8Array, length?: number): AIFacilityCostBreakdown {
|
|
15365
|
+
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
|
|
15366
|
+
const previousRecursionDepth = (reader as any).__tsProtoDecodeDepth ?? 0;
|
|
15367
|
+
if (previousRecursionDepth >= 100) {
|
|
15368
|
+
throw new globalThis.Error("protobuf decode recursion limit exceeded");
|
|
15369
|
+
}
|
|
15370
|
+
(reader as any).__tsProtoDecodeDepth = previousRecursionDepth + 1;
|
|
15371
|
+
try {
|
|
15372
|
+
const end = length === undefined ? reader.len : reader.pos + length;
|
|
15373
|
+
const message = createBaseAIFacilityCostBreakdown();
|
|
15374
|
+
while (reader.pos < end) {
|
|
15375
|
+
const tag = reader.uint32();
|
|
15376
|
+
switch (tag >>> 3) {
|
|
15377
|
+
case 1: {
|
|
15378
|
+
if (tag !== 9) {
|
|
15379
|
+
break;
|
|
15380
|
+
}
|
|
15381
|
+
|
|
15382
|
+
message.notionalUsd = reader.double();
|
|
15383
|
+
continue;
|
|
15384
|
+
}
|
|
15385
|
+
case 2: {
|
|
15386
|
+
if (tag !== 17) {
|
|
15387
|
+
break;
|
|
15388
|
+
}
|
|
15389
|
+
|
|
15390
|
+
message.subscriptionFacilityUsd = reader.double();
|
|
15391
|
+
continue;
|
|
15392
|
+
}
|
|
15393
|
+
case 3: {
|
|
15394
|
+
if (tag !== 25) {
|
|
15395
|
+
break;
|
|
15396
|
+
}
|
|
15397
|
+
|
|
15398
|
+
message.prepaidCreditsFacilityUsd = reader.double();
|
|
15399
|
+
continue;
|
|
15400
|
+
}
|
|
15401
|
+
case 4: {
|
|
15402
|
+
if (tag !== 33) {
|
|
15403
|
+
break;
|
|
15404
|
+
}
|
|
15405
|
+
|
|
15406
|
+
message.apiMeteredFacilityUsd = reader.double();
|
|
15407
|
+
continue;
|
|
15408
|
+
}
|
|
15409
|
+
case 5: {
|
|
15410
|
+
if (tag !== 41) {
|
|
15411
|
+
break;
|
|
15412
|
+
}
|
|
15413
|
+
|
|
15414
|
+
message.unknownFacilityUsd = reader.double();
|
|
15415
|
+
continue;
|
|
15416
|
+
}
|
|
15417
|
+
case 6: {
|
|
15418
|
+
if (tag !== 48) {
|
|
15419
|
+
break;
|
|
15420
|
+
}
|
|
15421
|
+
|
|
15422
|
+
message.pricedCalls = longToNumber(reader.uint64());
|
|
15423
|
+
continue;
|
|
15424
|
+
}
|
|
15425
|
+
case 7: {
|
|
15426
|
+
if (tag !== 56) {
|
|
15427
|
+
break;
|
|
15428
|
+
}
|
|
15429
|
+
|
|
15430
|
+
message.totalCalls = longToNumber(reader.uint64());
|
|
15431
|
+
continue;
|
|
15432
|
+
}
|
|
15433
|
+
}
|
|
15434
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
15435
|
+
break;
|
|
15436
|
+
}
|
|
15437
|
+
reader.skip(tag & 7);
|
|
15438
|
+
}
|
|
15439
|
+
return message;
|
|
15440
|
+
} finally {
|
|
15441
|
+
(reader as any).__tsProtoDecodeDepth = previousRecursionDepth;
|
|
15442
|
+
}
|
|
15443
|
+
},
|
|
15444
|
+
|
|
15445
|
+
fromJSON(object: any): AIFacilityCostBreakdown {
|
|
15446
|
+
return {
|
|
15447
|
+
notionalUsd: isSet(object.notionalUsd)
|
|
15448
|
+
? globalThis.Number(object.notionalUsd)
|
|
15449
|
+
: isSet(object.notional_usd)
|
|
15450
|
+
? globalThis.Number(object.notional_usd)
|
|
15451
|
+
: 0,
|
|
15452
|
+
subscriptionFacilityUsd: isSet(object.subscriptionFacilityUsd)
|
|
15453
|
+
? globalThis.Number(object.subscriptionFacilityUsd)
|
|
15454
|
+
: isSet(object.subscription_facility_usd)
|
|
15455
|
+
? globalThis.Number(object.subscription_facility_usd)
|
|
15456
|
+
: 0,
|
|
15457
|
+
prepaidCreditsFacilityUsd: isSet(object.prepaidCreditsFacilityUsd)
|
|
15458
|
+
? globalThis.Number(object.prepaidCreditsFacilityUsd)
|
|
15459
|
+
: isSet(object.prepaid_credits_facility_usd)
|
|
15460
|
+
? globalThis.Number(object.prepaid_credits_facility_usd)
|
|
15461
|
+
: 0,
|
|
15462
|
+
apiMeteredFacilityUsd: isSet(object.apiMeteredFacilityUsd)
|
|
15463
|
+
? globalThis.Number(object.apiMeteredFacilityUsd)
|
|
15464
|
+
: isSet(object.api_metered_facility_usd)
|
|
15465
|
+
? globalThis.Number(object.api_metered_facility_usd)
|
|
15466
|
+
: 0,
|
|
15467
|
+
unknownFacilityUsd: isSet(object.unknownFacilityUsd)
|
|
15468
|
+
? globalThis.Number(object.unknownFacilityUsd)
|
|
15469
|
+
: isSet(object.unknown_facility_usd)
|
|
15470
|
+
? globalThis.Number(object.unknown_facility_usd)
|
|
15471
|
+
: 0,
|
|
15472
|
+
pricedCalls: isSet(object.pricedCalls)
|
|
15473
|
+
? globalThis.Number(object.pricedCalls)
|
|
15474
|
+
: isSet(object.priced_calls)
|
|
15475
|
+
? globalThis.Number(object.priced_calls)
|
|
15476
|
+
: 0,
|
|
15477
|
+
totalCalls: isSet(object.totalCalls)
|
|
15478
|
+
? globalThis.Number(object.totalCalls)
|
|
15479
|
+
: isSet(object.total_calls)
|
|
15480
|
+
? globalThis.Number(object.total_calls)
|
|
15481
|
+
: 0,
|
|
15482
|
+
};
|
|
15483
|
+
},
|
|
15484
|
+
|
|
15485
|
+
toJSON(message: AIFacilityCostBreakdown): unknown {
|
|
15486
|
+
const obj: any = {};
|
|
15487
|
+
if (message.notionalUsd !== 0) {
|
|
15488
|
+
obj.notionalUsd = message.notionalUsd;
|
|
15489
|
+
}
|
|
15490
|
+
if (message.subscriptionFacilityUsd !== 0) {
|
|
15491
|
+
obj.subscriptionFacilityUsd = message.subscriptionFacilityUsd;
|
|
15492
|
+
}
|
|
15493
|
+
if (message.prepaidCreditsFacilityUsd !== 0) {
|
|
15494
|
+
obj.prepaidCreditsFacilityUsd = message.prepaidCreditsFacilityUsd;
|
|
15495
|
+
}
|
|
15496
|
+
if (message.apiMeteredFacilityUsd !== 0) {
|
|
15497
|
+
obj.apiMeteredFacilityUsd = message.apiMeteredFacilityUsd;
|
|
15498
|
+
}
|
|
15499
|
+
if (message.unknownFacilityUsd !== 0) {
|
|
15500
|
+
obj.unknownFacilityUsd = message.unknownFacilityUsd;
|
|
15501
|
+
}
|
|
15502
|
+
if (message.pricedCalls !== 0) {
|
|
15503
|
+
obj.pricedCalls = Math.round(message.pricedCalls);
|
|
15504
|
+
}
|
|
15505
|
+
if (message.totalCalls !== 0) {
|
|
15506
|
+
obj.totalCalls = Math.round(message.totalCalls);
|
|
15507
|
+
}
|
|
15508
|
+
return obj;
|
|
15509
|
+
},
|
|
15510
|
+
|
|
15511
|
+
create<I extends Exact<DeepPartial<AIFacilityCostBreakdown>, I>>(base?: I): AIFacilityCostBreakdown {
|
|
15512
|
+
return AIFacilityCostBreakdown.fromPartial(base ?? ({} as any));
|
|
15513
|
+
},
|
|
15514
|
+
fromPartial<I extends Exact<DeepPartial<AIFacilityCostBreakdown>, I>>(object: I): AIFacilityCostBreakdown {
|
|
15515
|
+
const message = createBaseAIFacilityCostBreakdown();
|
|
15516
|
+
message.notionalUsd = object.notionalUsd ?? 0;
|
|
15517
|
+
message.subscriptionFacilityUsd = object.subscriptionFacilityUsd ?? 0;
|
|
15518
|
+
message.prepaidCreditsFacilityUsd = object.prepaidCreditsFacilityUsd ?? 0;
|
|
15519
|
+
message.apiMeteredFacilityUsd = object.apiMeteredFacilityUsd ?? 0;
|
|
15520
|
+
message.unknownFacilityUsd = object.unknownFacilityUsd ?? 0;
|
|
15521
|
+
message.pricedCalls = object.pricedCalls ?? 0;
|
|
15522
|
+
message.totalCalls = object.totalCalls ?? 0;
|
|
15523
|
+
return message;
|
|
15524
|
+
},
|
|
15525
|
+
};
|
|
15526
|
+
|
|
15527
|
+
function createBaseStreamEntitlementsRequest(): StreamEntitlementsRequest {
|
|
15528
|
+
return { organizationId: "", projectId: "" };
|
|
15529
|
+
}
|
|
15530
|
+
|
|
15531
|
+
export const StreamEntitlementsRequest: MessageFns<StreamEntitlementsRequest> = {
|
|
15532
|
+
encode(message: StreamEntitlementsRequest, writer: BinaryWriter = new BinaryWriter()): BinaryWriter {
|
|
15533
|
+
if (message.organizationId !== "") {
|
|
15534
|
+
writer.uint32(10).string(message.organizationId);
|
|
15535
|
+
}
|
|
15536
|
+
if (message.projectId !== "") {
|
|
15537
|
+
writer.uint32(18).string(message.projectId);
|
|
15538
|
+
}
|
|
15539
|
+
return writer;
|
|
15540
|
+
},
|
|
15541
|
+
|
|
15542
|
+
decode(input: BinaryReader | Uint8Array, length?: number): StreamEntitlementsRequest {
|
|
15543
|
+
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
|
|
15544
|
+
const previousRecursionDepth = (reader as any).__tsProtoDecodeDepth ?? 0;
|
|
15545
|
+
if (previousRecursionDepth >= 100) {
|
|
15546
|
+
throw new globalThis.Error("protobuf decode recursion limit exceeded");
|
|
15547
|
+
}
|
|
15548
|
+
(reader as any).__tsProtoDecodeDepth = previousRecursionDepth + 1;
|
|
15549
|
+
try {
|
|
15550
|
+
const end = length === undefined ? reader.len : reader.pos + length;
|
|
15551
|
+
const message = createBaseStreamEntitlementsRequest();
|
|
15552
|
+
while (reader.pos < end) {
|
|
15553
|
+
const tag = reader.uint32();
|
|
15554
|
+
switch (tag >>> 3) {
|
|
15555
|
+
case 1: {
|
|
15556
|
+
if (tag !== 10) {
|
|
15557
|
+
break;
|
|
15558
|
+
}
|
|
15559
|
+
|
|
15560
|
+
message.organizationId = reader.string();
|
|
15561
|
+
continue;
|
|
15562
|
+
}
|
|
15563
|
+
case 2: {
|
|
15564
|
+
if (tag !== 18) {
|
|
15565
|
+
break;
|
|
15566
|
+
}
|
|
15567
|
+
|
|
15568
|
+
message.projectId = reader.string();
|
|
15569
|
+
continue;
|
|
15570
|
+
}
|
|
15571
|
+
}
|
|
15572
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
15573
|
+
break;
|
|
15574
|
+
}
|
|
15575
|
+
reader.skip(tag & 7);
|
|
15576
|
+
}
|
|
15577
|
+
return message;
|
|
15578
|
+
} finally {
|
|
15579
|
+
(reader as any).__tsProtoDecodeDepth = previousRecursionDepth;
|
|
15580
|
+
}
|
|
15581
|
+
},
|
|
15582
|
+
|
|
15583
|
+
fromJSON(object: any): StreamEntitlementsRequest {
|
|
15584
|
+
return {
|
|
15585
|
+
organizationId: isSet(object.organizationId)
|
|
15586
|
+
? globalThis.String(object.organizationId)
|
|
15587
|
+
: isSet(object.organization_id)
|
|
15588
|
+
? globalThis.String(object.organization_id)
|
|
15589
|
+
: "",
|
|
15590
|
+
projectId: isSet(object.projectId)
|
|
15591
|
+
? globalThis.String(object.projectId)
|
|
15592
|
+
: isSet(object.project_id)
|
|
15593
|
+
? globalThis.String(object.project_id)
|
|
15594
|
+
: "",
|
|
15595
|
+
};
|
|
15596
|
+
},
|
|
15597
|
+
|
|
15598
|
+
toJSON(message: StreamEntitlementsRequest): unknown {
|
|
15599
|
+
const obj: any = {};
|
|
15600
|
+
if (message.organizationId !== "") {
|
|
15601
|
+
obj.organizationId = message.organizationId;
|
|
15602
|
+
}
|
|
15603
|
+
if (message.projectId !== "") {
|
|
15604
|
+
obj.projectId = message.projectId;
|
|
15605
|
+
}
|
|
15606
|
+
return obj;
|
|
15607
|
+
},
|
|
15608
|
+
|
|
15609
|
+
create<I extends Exact<DeepPartial<StreamEntitlementsRequest>, I>>(base?: I): StreamEntitlementsRequest {
|
|
15610
|
+
return StreamEntitlementsRequest.fromPartial(base ?? ({} as any));
|
|
15611
|
+
},
|
|
15612
|
+
fromPartial<I extends Exact<DeepPartial<StreamEntitlementsRequest>, I>>(object: I): StreamEntitlementsRequest {
|
|
15613
|
+
const message = createBaseStreamEntitlementsRequest();
|
|
15614
|
+
message.organizationId = object.organizationId ?? "";
|
|
15615
|
+
message.projectId = object.projectId ?? "";
|
|
15616
|
+
return message;
|
|
15617
|
+
},
|
|
15618
|
+
};
|
|
15619
|
+
|
|
15620
|
+
function createBaseEntitlementsSnapshot(): EntitlementsSnapshot {
|
|
15621
|
+
return { seats: [], asOf: undefined };
|
|
15622
|
+
}
|
|
15623
|
+
|
|
15624
|
+
export const EntitlementsSnapshot: MessageFns<EntitlementsSnapshot> = {
|
|
15625
|
+
encode(message: EntitlementsSnapshot, writer: BinaryWriter = new BinaryWriter()): BinaryWriter {
|
|
15626
|
+
for (const v of message.seats) {
|
|
15627
|
+
SeatEntitlement.encode(v!, writer.uint32(10).fork()).join();
|
|
15628
|
+
}
|
|
15629
|
+
if (message.asOf !== undefined) {
|
|
15630
|
+
Timestamp.encode(toTimestamp(message.asOf), writer.uint32(18).fork()).join();
|
|
15631
|
+
}
|
|
15632
|
+
return writer;
|
|
15633
|
+
},
|
|
15634
|
+
|
|
15635
|
+
decode(input: BinaryReader | Uint8Array, length?: number): EntitlementsSnapshot {
|
|
15636
|
+
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
|
|
15637
|
+
const previousRecursionDepth = (reader as any).__tsProtoDecodeDepth ?? 0;
|
|
15638
|
+
if (previousRecursionDepth >= 100) {
|
|
15639
|
+
throw new globalThis.Error("protobuf decode recursion limit exceeded");
|
|
15640
|
+
}
|
|
15641
|
+
(reader as any).__tsProtoDecodeDepth = previousRecursionDepth + 1;
|
|
15642
|
+
try {
|
|
15643
|
+
const end = length === undefined ? reader.len : reader.pos + length;
|
|
15644
|
+
const message = createBaseEntitlementsSnapshot();
|
|
15645
|
+
while (reader.pos < end) {
|
|
15646
|
+
const tag = reader.uint32();
|
|
15647
|
+
switch (tag >>> 3) {
|
|
15648
|
+
case 1: {
|
|
15649
|
+
if (tag !== 10) {
|
|
15650
|
+
break;
|
|
15651
|
+
}
|
|
15652
|
+
|
|
15653
|
+
message.seats.push(SeatEntitlement.decode(reader, reader.uint32()));
|
|
15654
|
+
continue;
|
|
15655
|
+
}
|
|
15656
|
+
case 2: {
|
|
15657
|
+
if (tag !== 18) {
|
|
15658
|
+
break;
|
|
15659
|
+
}
|
|
15660
|
+
|
|
15661
|
+
message.asOf = fromTimestamp(Timestamp.decode(reader, reader.uint32()));
|
|
15662
|
+
continue;
|
|
15663
|
+
}
|
|
15664
|
+
}
|
|
15665
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
15666
|
+
break;
|
|
15667
|
+
}
|
|
15668
|
+
reader.skip(tag & 7);
|
|
15669
|
+
}
|
|
15670
|
+
return message;
|
|
15671
|
+
} finally {
|
|
15672
|
+
(reader as any).__tsProtoDecodeDepth = previousRecursionDepth;
|
|
15673
|
+
}
|
|
15674
|
+
},
|
|
15675
|
+
|
|
15676
|
+
fromJSON(object: any): EntitlementsSnapshot {
|
|
15677
|
+
return {
|
|
15678
|
+
seats: globalThis.Array.isArray(object?.seats) ? object.seats.map((e: any) => SeatEntitlement.fromJSON(e)) : [],
|
|
15679
|
+
asOf: isSet(object.asOf)
|
|
15680
|
+
? fromJsonTimestamp(object.asOf)
|
|
15681
|
+
: isSet(object.as_of)
|
|
15682
|
+
? fromJsonTimestamp(object.as_of)
|
|
15683
|
+
: undefined,
|
|
15684
|
+
};
|
|
15685
|
+
},
|
|
15686
|
+
|
|
15687
|
+
toJSON(message: EntitlementsSnapshot): unknown {
|
|
15688
|
+
const obj: any = {};
|
|
15689
|
+
if (message.seats?.length) {
|
|
15690
|
+
obj.seats = message.seats.map((e) => SeatEntitlement.toJSON(e));
|
|
15691
|
+
}
|
|
15692
|
+
if (message.asOf !== undefined) {
|
|
15693
|
+
obj.asOf = message.asOf.toISOString();
|
|
15694
|
+
}
|
|
15695
|
+
return obj;
|
|
15696
|
+
},
|
|
15697
|
+
|
|
15698
|
+
create<I extends Exact<DeepPartial<EntitlementsSnapshot>, I>>(base?: I): EntitlementsSnapshot {
|
|
15699
|
+
return EntitlementsSnapshot.fromPartial(base ?? ({} as any));
|
|
15700
|
+
},
|
|
15701
|
+
fromPartial<I extends Exact<DeepPartial<EntitlementsSnapshot>, I>>(object: I): EntitlementsSnapshot {
|
|
15702
|
+
const message = createBaseEntitlementsSnapshot();
|
|
15703
|
+
message.seats = object.seats?.map((e) => SeatEntitlement.fromPartial(e)) || [];
|
|
15704
|
+
message.asOf = object.asOf ?? undefined;
|
|
15705
|
+
return message;
|
|
15706
|
+
},
|
|
15707
|
+
};
|
|
15708
|
+
|
|
15709
|
+
function createBaseSeatEntitlement(): SeatEntitlement {
|
|
15710
|
+
return {
|
|
15711
|
+
sourceSystem: "",
|
|
15712
|
+
accountId: "",
|
|
15713
|
+
principalId: "",
|
|
15714
|
+
principalName: "",
|
|
15715
|
+
fundingMode: 0,
|
|
15716
|
+
windows: [],
|
|
15717
|
+
eventTime: undefined,
|
|
15718
|
+
creditsBalanceRaw: undefined,
|
|
15719
|
+
creditsUnlimited: undefined,
|
|
15720
|
+
planType: "",
|
|
15721
|
+
seatTier: "",
|
|
15722
|
+
evidenceSource: "",
|
|
15723
|
+
};
|
|
15724
|
+
}
|
|
15725
|
+
|
|
15726
|
+
export const SeatEntitlement: MessageFns<SeatEntitlement> = {
|
|
15727
|
+
encode(message: SeatEntitlement, writer: BinaryWriter = new BinaryWriter()): BinaryWriter {
|
|
15728
|
+
if (message.sourceSystem !== "") {
|
|
15729
|
+
writer.uint32(10).string(message.sourceSystem);
|
|
15730
|
+
}
|
|
15731
|
+
if (message.accountId !== "") {
|
|
15732
|
+
writer.uint32(18).string(message.accountId);
|
|
15733
|
+
}
|
|
15734
|
+
if (message.principalId !== "") {
|
|
15735
|
+
writer.uint32(26).string(message.principalId);
|
|
15736
|
+
}
|
|
15737
|
+
if (message.principalName !== "") {
|
|
15738
|
+
writer.uint32(34).string(message.principalName);
|
|
15739
|
+
}
|
|
15740
|
+
if (message.fundingMode !== 0) {
|
|
15741
|
+
writer.uint32(40).int32(message.fundingMode);
|
|
15742
|
+
}
|
|
15743
|
+
for (const v of message.windows) {
|
|
15744
|
+
EntitlementWindow.encode(v!, writer.uint32(50).fork()).join();
|
|
15745
|
+
}
|
|
15746
|
+
if (message.eventTime !== undefined) {
|
|
15747
|
+
Timestamp.encode(toTimestamp(message.eventTime), writer.uint32(58).fork()).join();
|
|
15748
|
+
}
|
|
15749
|
+
if (message.creditsBalanceRaw !== undefined) {
|
|
15750
|
+
writer.uint32(66).string(message.creditsBalanceRaw);
|
|
15751
|
+
}
|
|
15752
|
+
if (message.creditsUnlimited !== undefined) {
|
|
15753
|
+
writer.uint32(72).bool(message.creditsUnlimited);
|
|
15754
|
+
}
|
|
15755
|
+
if (message.planType !== "") {
|
|
15756
|
+
writer.uint32(82).string(message.planType);
|
|
15757
|
+
}
|
|
15758
|
+
if (message.seatTier !== "") {
|
|
15759
|
+
writer.uint32(90).string(message.seatTier);
|
|
15760
|
+
}
|
|
15761
|
+
if (message.evidenceSource !== "") {
|
|
15762
|
+
writer.uint32(98).string(message.evidenceSource);
|
|
15763
|
+
}
|
|
15764
|
+
return writer;
|
|
15765
|
+
},
|
|
15766
|
+
|
|
15767
|
+
decode(input: BinaryReader | Uint8Array, length?: number): SeatEntitlement {
|
|
15768
|
+
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
|
|
15769
|
+
const previousRecursionDepth = (reader as any).__tsProtoDecodeDepth ?? 0;
|
|
15770
|
+
if (previousRecursionDepth >= 100) {
|
|
15771
|
+
throw new globalThis.Error("protobuf decode recursion limit exceeded");
|
|
15772
|
+
}
|
|
15773
|
+
(reader as any).__tsProtoDecodeDepth = previousRecursionDepth + 1;
|
|
15774
|
+
try {
|
|
15775
|
+
const end = length === undefined ? reader.len : reader.pos + length;
|
|
15776
|
+
const message = createBaseSeatEntitlement();
|
|
15777
|
+
while (reader.pos < end) {
|
|
15778
|
+
const tag = reader.uint32();
|
|
15779
|
+
switch (tag >>> 3) {
|
|
15780
|
+
case 1: {
|
|
15781
|
+
if (tag !== 10) {
|
|
15782
|
+
break;
|
|
15783
|
+
}
|
|
15784
|
+
|
|
15785
|
+
message.sourceSystem = reader.string();
|
|
15786
|
+
continue;
|
|
15787
|
+
}
|
|
15788
|
+
case 2: {
|
|
15789
|
+
if (tag !== 18) {
|
|
15790
|
+
break;
|
|
15791
|
+
}
|
|
15792
|
+
|
|
15793
|
+
message.accountId = reader.string();
|
|
15794
|
+
continue;
|
|
15795
|
+
}
|
|
15796
|
+
case 3: {
|
|
15797
|
+
if (tag !== 26) {
|
|
15798
|
+
break;
|
|
15799
|
+
}
|
|
15800
|
+
|
|
15801
|
+
message.principalId = reader.string();
|
|
15802
|
+
continue;
|
|
15803
|
+
}
|
|
15804
|
+
case 4: {
|
|
15805
|
+
if (tag !== 34) {
|
|
15806
|
+
break;
|
|
15807
|
+
}
|
|
15808
|
+
|
|
15809
|
+
message.principalName = reader.string();
|
|
15810
|
+
continue;
|
|
15811
|
+
}
|
|
15812
|
+
case 5: {
|
|
15813
|
+
if (tag !== 40) {
|
|
15814
|
+
break;
|
|
15815
|
+
}
|
|
15816
|
+
|
|
15817
|
+
message.fundingMode = reader.int32() as any;
|
|
15818
|
+
continue;
|
|
15819
|
+
}
|
|
15820
|
+
case 6: {
|
|
15821
|
+
if (tag !== 50) {
|
|
15822
|
+
break;
|
|
15823
|
+
}
|
|
15824
|
+
|
|
15825
|
+
message.windows.push(EntitlementWindow.decode(reader, reader.uint32()));
|
|
15826
|
+
continue;
|
|
15827
|
+
}
|
|
15828
|
+
case 7: {
|
|
15829
|
+
if (tag !== 58) {
|
|
15830
|
+
break;
|
|
15831
|
+
}
|
|
15832
|
+
|
|
15833
|
+
message.eventTime = fromTimestamp(Timestamp.decode(reader, reader.uint32()));
|
|
15834
|
+
continue;
|
|
15835
|
+
}
|
|
15836
|
+
case 8: {
|
|
15837
|
+
if (tag !== 66) {
|
|
15838
|
+
break;
|
|
15839
|
+
}
|
|
15840
|
+
|
|
15841
|
+
message.creditsBalanceRaw = reader.string();
|
|
15842
|
+
continue;
|
|
15843
|
+
}
|
|
15844
|
+
case 9: {
|
|
15845
|
+
if (tag !== 72) {
|
|
15846
|
+
break;
|
|
15847
|
+
}
|
|
15848
|
+
|
|
15849
|
+
message.creditsUnlimited = reader.bool();
|
|
15850
|
+
continue;
|
|
15851
|
+
}
|
|
15852
|
+
case 10: {
|
|
15853
|
+
if (tag !== 82) {
|
|
15854
|
+
break;
|
|
15855
|
+
}
|
|
15856
|
+
|
|
15857
|
+
message.planType = reader.string();
|
|
15858
|
+
continue;
|
|
15859
|
+
}
|
|
15860
|
+
case 11: {
|
|
15861
|
+
if (tag !== 90) {
|
|
15862
|
+
break;
|
|
15863
|
+
}
|
|
15864
|
+
|
|
15865
|
+
message.seatTier = reader.string();
|
|
15866
|
+
continue;
|
|
15867
|
+
}
|
|
15868
|
+
case 12: {
|
|
15869
|
+
if (tag !== 98) {
|
|
15870
|
+
break;
|
|
15871
|
+
}
|
|
15872
|
+
|
|
15873
|
+
message.evidenceSource = reader.string();
|
|
15874
|
+
continue;
|
|
15875
|
+
}
|
|
15876
|
+
}
|
|
15877
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
15878
|
+
break;
|
|
15879
|
+
}
|
|
15880
|
+
reader.skip(tag & 7);
|
|
15881
|
+
}
|
|
15882
|
+
return message;
|
|
15883
|
+
} finally {
|
|
15884
|
+
(reader as any).__tsProtoDecodeDepth = previousRecursionDepth;
|
|
15885
|
+
}
|
|
15886
|
+
},
|
|
15887
|
+
|
|
15888
|
+
fromJSON(object: any): SeatEntitlement {
|
|
15889
|
+
return {
|
|
15890
|
+
sourceSystem: isSet(object.sourceSystem)
|
|
15891
|
+
? globalThis.String(object.sourceSystem)
|
|
15892
|
+
: isSet(object.source_system)
|
|
15893
|
+
? globalThis.String(object.source_system)
|
|
15894
|
+
: "",
|
|
15895
|
+
accountId: isSet(object.accountId)
|
|
15896
|
+
? globalThis.String(object.accountId)
|
|
15897
|
+
: isSet(object.account_id)
|
|
15898
|
+
? globalThis.String(object.account_id)
|
|
15899
|
+
: "",
|
|
15900
|
+
principalId: isSet(object.principalId)
|
|
15901
|
+
? globalThis.String(object.principalId)
|
|
15902
|
+
: isSet(object.principal_id)
|
|
15903
|
+
? globalThis.String(object.principal_id)
|
|
15904
|
+
: "",
|
|
15905
|
+
principalName: isSet(object.principalName)
|
|
15906
|
+
? globalThis.String(object.principalName)
|
|
15907
|
+
: isSet(object.principal_name)
|
|
15908
|
+
? globalThis.String(object.principal_name)
|
|
15909
|
+
: "",
|
|
15910
|
+
fundingMode: isSet(object.fundingMode)
|
|
15911
|
+
? aIFundingModeFromJSON(object.fundingMode)
|
|
15912
|
+
: isSet(object.funding_mode)
|
|
15913
|
+
? aIFundingModeFromJSON(object.funding_mode)
|
|
15914
|
+
: 0,
|
|
15915
|
+
windows: globalThis.Array.isArray(object?.windows)
|
|
15916
|
+
? object.windows.map((e: any) => EntitlementWindow.fromJSON(e))
|
|
15917
|
+
: [],
|
|
15918
|
+
eventTime: isSet(object.eventTime)
|
|
15919
|
+
? fromJsonTimestamp(object.eventTime)
|
|
15920
|
+
: isSet(object.event_time)
|
|
15921
|
+
? fromJsonTimestamp(object.event_time)
|
|
15922
|
+
: undefined,
|
|
15923
|
+
creditsBalanceRaw: isSet(object.creditsBalanceRaw)
|
|
15924
|
+
? globalThis.String(object.creditsBalanceRaw)
|
|
15925
|
+
: isSet(object.credits_balance_raw)
|
|
15926
|
+
? globalThis.String(object.credits_balance_raw)
|
|
15927
|
+
: undefined,
|
|
15928
|
+
creditsUnlimited: isSet(object.creditsUnlimited)
|
|
15929
|
+
? globalThis.Boolean(object.creditsUnlimited)
|
|
15930
|
+
: isSet(object.credits_unlimited)
|
|
15931
|
+
? globalThis.Boolean(object.credits_unlimited)
|
|
15932
|
+
: undefined,
|
|
15933
|
+
planType: isSet(object.planType)
|
|
15934
|
+
? globalThis.String(object.planType)
|
|
15935
|
+
: isSet(object.plan_type)
|
|
15936
|
+
? globalThis.String(object.plan_type)
|
|
15937
|
+
: "",
|
|
15938
|
+
seatTier: isSet(object.seatTier)
|
|
15939
|
+
? globalThis.String(object.seatTier)
|
|
15940
|
+
: isSet(object.seat_tier)
|
|
15941
|
+
? globalThis.String(object.seat_tier)
|
|
15942
|
+
: "",
|
|
15943
|
+
evidenceSource: isSet(object.evidenceSource)
|
|
15944
|
+
? globalThis.String(object.evidenceSource)
|
|
15945
|
+
: isSet(object.evidence_source)
|
|
15946
|
+
? globalThis.String(object.evidence_source)
|
|
15947
|
+
: "",
|
|
15948
|
+
};
|
|
15949
|
+
},
|
|
15950
|
+
|
|
15951
|
+
toJSON(message: SeatEntitlement): unknown {
|
|
15952
|
+
const obj: any = {};
|
|
15953
|
+
if (message.sourceSystem !== "") {
|
|
15954
|
+
obj.sourceSystem = message.sourceSystem;
|
|
15955
|
+
}
|
|
15956
|
+
if (message.accountId !== "") {
|
|
15957
|
+
obj.accountId = message.accountId;
|
|
15958
|
+
}
|
|
15959
|
+
if (message.principalId !== "") {
|
|
15960
|
+
obj.principalId = message.principalId;
|
|
15961
|
+
}
|
|
15962
|
+
if (message.principalName !== "") {
|
|
15963
|
+
obj.principalName = message.principalName;
|
|
15964
|
+
}
|
|
15965
|
+
if (message.fundingMode !== 0) {
|
|
15966
|
+
obj.fundingMode = aIFundingModeToJSON(message.fundingMode);
|
|
15967
|
+
}
|
|
15968
|
+
if (message.windows?.length) {
|
|
15969
|
+
obj.windows = message.windows.map((e) => EntitlementWindow.toJSON(e));
|
|
15970
|
+
}
|
|
15971
|
+
if (message.eventTime !== undefined) {
|
|
15972
|
+
obj.eventTime = message.eventTime.toISOString();
|
|
15973
|
+
}
|
|
15974
|
+
if (message.creditsBalanceRaw !== undefined) {
|
|
15975
|
+
obj.creditsBalanceRaw = message.creditsBalanceRaw;
|
|
15976
|
+
}
|
|
15977
|
+
if (message.creditsUnlimited !== undefined) {
|
|
15978
|
+
obj.creditsUnlimited = message.creditsUnlimited;
|
|
15979
|
+
}
|
|
15980
|
+
if (message.planType !== "") {
|
|
15981
|
+
obj.planType = message.planType;
|
|
15982
|
+
}
|
|
15983
|
+
if (message.seatTier !== "") {
|
|
15984
|
+
obj.seatTier = message.seatTier;
|
|
15985
|
+
}
|
|
15986
|
+
if (message.evidenceSource !== "") {
|
|
15987
|
+
obj.evidenceSource = message.evidenceSource;
|
|
15988
|
+
}
|
|
15989
|
+
return obj;
|
|
15990
|
+
},
|
|
15991
|
+
|
|
15992
|
+
create<I extends Exact<DeepPartial<SeatEntitlement>, I>>(base?: I): SeatEntitlement {
|
|
15993
|
+
return SeatEntitlement.fromPartial(base ?? ({} as any));
|
|
15994
|
+
},
|
|
15995
|
+
fromPartial<I extends Exact<DeepPartial<SeatEntitlement>, I>>(object: I): SeatEntitlement {
|
|
15996
|
+
const message = createBaseSeatEntitlement();
|
|
15997
|
+
message.sourceSystem = object.sourceSystem ?? "";
|
|
15998
|
+
message.accountId = object.accountId ?? "";
|
|
15999
|
+
message.principalId = object.principalId ?? "";
|
|
16000
|
+
message.principalName = object.principalName ?? "";
|
|
16001
|
+
message.fundingMode = object.fundingMode ?? 0;
|
|
16002
|
+
message.windows = object.windows?.map((e) => EntitlementWindow.fromPartial(e)) || [];
|
|
16003
|
+
message.eventTime = object.eventTime ?? undefined;
|
|
16004
|
+
message.creditsBalanceRaw = object.creditsBalanceRaw ?? undefined;
|
|
16005
|
+
message.creditsUnlimited = object.creditsUnlimited ?? undefined;
|
|
16006
|
+
message.planType = object.planType ?? "";
|
|
16007
|
+
message.seatTier = object.seatTier ?? "";
|
|
16008
|
+
message.evidenceSource = object.evidenceSource ?? "";
|
|
16009
|
+
return message;
|
|
16010
|
+
},
|
|
16011
|
+
};
|
|
16012
|
+
|
|
16013
|
+
function createBaseEntitlementWindow(): EntitlementWindow {
|
|
16014
|
+
return { kind: "", usedPct: undefined, resetsAt: undefined, role: 0, windowSeconds: undefined };
|
|
16015
|
+
}
|
|
16016
|
+
|
|
16017
|
+
export const EntitlementWindow: MessageFns<EntitlementWindow> = {
|
|
16018
|
+
encode(message: EntitlementWindow, writer: BinaryWriter = new BinaryWriter()): BinaryWriter {
|
|
16019
|
+
if (message.kind !== "") {
|
|
16020
|
+
writer.uint32(10).string(message.kind);
|
|
16021
|
+
}
|
|
16022
|
+
if (message.usedPct !== undefined) {
|
|
16023
|
+
writer.uint32(17).double(message.usedPct);
|
|
16024
|
+
}
|
|
16025
|
+
if (message.resetsAt !== undefined) {
|
|
16026
|
+
Timestamp.encode(toTimestamp(message.resetsAt), writer.uint32(26).fork()).join();
|
|
16027
|
+
}
|
|
16028
|
+
if (message.role !== 0) {
|
|
16029
|
+
writer.uint32(32).int32(message.role);
|
|
16030
|
+
}
|
|
16031
|
+
if (message.windowSeconds !== undefined) {
|
|
16032
|
+
writer.uint32(40).uint32(message.windowSeconds);
|
|
16033
|
+
}
|
|
16034
|
+
return writer;
|
|
16035
|
+
},
|
|
16036
|
+
|
|
16037
|
+
decode(input: BinaryReader | Uint8Array, length?: number): EntitlementWindow {
|
|
16038
|
+
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
|
|
16039
|
+
const previousRecursionDepth = (reader as any).__tsProtoDecodeDepth ?? 0;
|
|
16040
|
+
if (previousRecursionDepth >= 100) {
|
|
16041
|
+
throw new globalThis.Error("protobuf decode recursion limit exceeded");
|
|
16042
|
+
}
|
|
16043
|
+
(reader as any).__tsProtoDecodeDepth = previousRecursionDepth + 1;
|
|
16044
|
+
try {
|
|
16045
|
+
const end = length === undefined ? reader.len : reader.pos + length;
|
|
16046
|
+
const message = createBaseEntitlementWindow();
|
|
16047
|
+
while (reader.pos < end) {
|
|
16048
|
+
const tag = reader.uint32();
|
|
16049
|
+
switch (tag >>> 3) {
|
|
16050
|
+
case 1: {
|
|
16051
|
+
if (tag !== 10) {
|
|
16052
|
+
break;
|
|
16053
|
+
}
|
|
16054
|
+
|
|
16055
|
+
message.kind = reader.string();
|
|
16056
|
+
continue;
|
|
16057
|
+
}
|
|
16058
|
+
case 2: {
|
|
16059
|
+
if (tag !== 17) {
|
|
16060
|
+
break;
|
|
16061
|
+
}
|
|
16062
|
+
|
|
16063
|
+
message.usedPct = reader.double();
|
|
16064
|
+
continue;
|
|
16065
|
+
}
|
|
16066
|
+
case 3: {
|
|
16067
|
+
if (tag !== 26) {
|
|
16068
|
+
break;
|
|
16069
|
+
}
|
|
16070
|
+
|
|
16071
|
+
message.resetsAt = fromTimestamp(Timestamp.decode(reader, reader.uint32()));
|
|
16072
|
+
continue;
|
|
16073
|
+
}
|
|
16074
|
+
case 4: {
|
|
16075
|
+
if (tag !== 32) {
|
|
16076
|
+
break;
|
|
16077
|
+
}
|
|
16078
|
+
|
|
16079
|
+
message.role = reader.int32() as any;
|
|
16080
|
+
continue;
|
|
16081
|
+
}
|
|
16082
|
+
case 5: {
|
|
16083
|
+
if (tag !== 40) {
|
|
16084
|
+
break;
|
|
16085
|
+
}
|
|
16086
|
+
|
|
16087
|
+
message.windowSeconds = reader.uint32();
|
|
16088
|
+
continue;
|
|
16089
|
+
}
|
|
16090
|
+
}
|
|
16091
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
16092
|
+
break;
|
|
16093
|
+
}
|
|
16094
|
+
reader.skip(tag & 7);
|
|
16095
|
+
}
|
|
16096
|
+
return message;
|
|
16097
|
+
} finally {
|
|
16098
|
+
(reader as any).__tsProtoDecodeDepth = previousRecursionDepth;
|
|
16099
|
+
}
|
|
16100
|
+
},
|
|
16101
|
+
|
|
16102
|
+
fromJSON(object: any): EntitlementWindow {
|
|
16103
|
+
return {
|
|
16104
|
+
kind: isSet(object.kind) ? globalThis.String(object.kind) : "",
|
|
16105
|
+
usedPct: isSet(object.usedPct)
|
|
16106
|
+
? globalThis.Number(object.usedPct)
|
|
16107
|
+
: isSet(object.used_pct)
|
|
16108
|
+
? globalThis.Number(object.used_pct)
|
|
16109
|
+
: undefined,
|
|
16110
|
+
resetsAt: isSet(object.resetsAt)
|
|
16111
|
+
? fromJsonTimestamp(object.resetsAt)
|
|
16112
|
+
: isSet(object.resets_at)
|
|
16113
|
+
? fromJsonTimestamp(object.resets_at)
|
|
16114
|
+
: undefined,
|
|
16115
|
+
role: isSet(object.role) ? aIEntitlementRoleFromJSON(object.role) : 0,
|
|
16116
|
+
windowSeconds: isSet(object.windowSeconds)
|
|
16117
|
+
? globalThis.Number(object.windowSeconds)
|
|
16118
|
+
: isSet(object.window_seconds)
|
|
16119
|
+
? globalThis.Number(object.window_seconds)
|
|
16120
|
+
: undefined,
|
|
16121
|
+
};
|
|
16122
|
+
},
|
|
16123
|
+
|
|
16124
|
+
toJSON(message: EntitlementWindow): unknown {
|
|
16125
|
+
const obj: any = {};
|
|
16126
|
+
if (message.kind !== "") {
|
|
16127
|
+
obj.kind = message.kind;
|
|
16128
|
+
}
|
|
16129
|
+
if (message.usedPct !== undefined) {
|
|
16130
|
+
obj.usedPct = message.usedPct;
|
|
16131
|
+
}
|
|
16132
|
+
if (message.resetsAt !== undefined) {
|
|
16133
|
+
obj.resetsAt = message.resetsAt.toISOString();
|
|
16134
|
+
}
|
|
16135
|
+
if (message.role !== 0) {
|
|
16136
|
+
obj.role = aIEntitlementRoleToJSON(message.role);
|
|
16137
|
+
}
|
|
16138
|
+
if (message.windowSeconds !== undefined) {
|
|
16139
|
+
obj.windowSeconds = Math.round(message.windowSeconds);
|
|
16140
|
+
}
|
|
16141
|
+
return obj;
|
|
16142
|
+
},
|
|
16143
|
+
|
|
16144
|
+
create<I extends Exact<DeepPartial<EntitlementWindow>, I>>(base?: I): EntitlementWindow {
|
|
16145
|
+
return EntitlementWindow.fromPartial(base ?? ({} as any));
|
|
16146
|
+
},
|
|
16147
|
+
fromPartial<I extends Exact<DeepPartial<EntitlementWindow>, I>>(object: I): EntitlementWindow {
|
|
16148
|
+
const message = createBaseEntitlementWindow();
|
|
16149
|
+
message.kind = object.kind ?? "";
|
|
16150
|
+
message.usedPct = object.usedPct ?? undefined;
|
|
16151
|
+
message.resetsAt = object.resetsAt ?? undefined;
|
|
16152
|
+
message.role = object.role ?? 0;
|
|
16153
|
+
message.windowSeconds = object.windowSeconds ?? undefined;
|
|
16154
|
+
return message;
|
|
16155
|
+
},
|
|
16156
|
+
};
|
|
16157
|
+
|
|
16158
|
+
/**
|
|
16159
|
+
* AIGatewayService is the frontend-facing proxy over telemetry.api.v1.AIService.
|
|
16160
|
+
* It stamps the authorized organization/project and forwards telemetry-api-shaped messages.
|
|
16161
|
+
*/
|
|
16162
|
+
export interface AIGatewayService {
|
|
16163
|
+
/**
|
|
16164
|
+
* One numbered page of the conversation catalog (sessions folded to
|
|
16165
|
+
* one rollup by source_system + session_id), ranked by sort. Weakly consistent
|
|
16166
|
+
* (latest-state, no frozen snapshot).
|
|
16167
|
+
*/
|
|
16168
|
+
ListSessions(request: ListSessionsRequest, metadata?: Metadata): Promise<ListSessionsResponse>;
|
|
16169
|
+
/**
|
|
16170
|
+
* Keeps the first conversation page live: the whole top-N page re-derived each tick
|
|
16171
|
+
* as one SessionsSnapshot, replacing client state wholesale (not a delta feed).
|
|
16172
|
+
*/
|
|
16173
|
+
StreamSessions(request: StreamSessionsRequest, metadata?: Metadata): Observable<SessionsSnapshot>;
|
|
16174
|
+
/** Live sidebar rollup (session_id + source_system): re-derived and re-emitted whole each tick. */
|
|
16175
|
+
StreamSessionSummary(request: GetSessionSummaryRequest, metadata?: Metadata): Observable<AISessionSummary>;
|
|
16176
|
+
ListSessionEvents(request: ListSessionEventsRequest, metadata?: Metadata): Promise<ListSessionEventsResponse>;
|
|
16177
|
+
StreamSessionEvents(request: StreamSessionEventsRequest, metadata?: Metadata): Observable<AISessionEventEnvelope>;
|
|
16178
|
+
/**
|
|
16179
|
+
* Live, backend-computed, per-event token series for one session (replacement snapshots):
|
|
16180
|
+
* one content-free point per logical event + whole-session totals; point count is capped.
|
|
16181
|
+
*/
|
|
16182
|
+
StreamSessionTokenTimeline(
|
|
16183
|
+
request: SessionTokenTimelineRequest,
|
|
16184
|
+
metadata?: Metadata,
|
|
16185
|
+
): Observable<SessionTokenTimeline>;
|
|
16186
|
+
/** Live "Files changed" card: per file the latest-observed git change-type + exact --numstat churn. */
|
|
16187
|
+
StreamSessionFileChanges(request: SessionFileChangesRequest, metadata?: Metadata): Observable<SessionFileChanges>;
|
|
16188
|
+
ListPrincipals(request: ListPrincipalsRequest, metadata?: Metadata): Promise<ListPrincipalsResponse>;
|
|
16189
|
+
UpdatePrincipal(request: UpdatePrincipalRequest, metadata?: Metadata): Promise<UpdatePrincipalResponse>;
|
|
16190
|
+
/** Filtered, keyset-paginated drill-down feed of git/GitHub actions (newest first). */
|
|
16191
|
+
ListGitActivities(request: ListGitActivitiesRequest, metadata?: Metadata): Promise<ListGitActivitiesResponse>;
|
|
16192
|
+
/**
|
|
16193
|
+
* Live stream of the filtered git/GitHub feed (UPSERT per activity keyed by
|
|
16194
|
+
* activity_id, a nonterminal GitActivitiesSnapshotCompleted, then open until cancel).
|
|
16195
|
+
*/
|
|
16196
|
+
StreamGitActivities(request: StreamGitActivitiesRequest, metadata?: Metadata): Observable<GitActivityFrame>;
|
|
16197
|
+
/**
|
|
16198
|
+
* Live stream of the git dashboard's overview: a full windowed, dimension-sliced rollup of the filtered
|
|
16199
|
+
* git activities (whole-window totals ride each frame), re-derived each tick.
|
|
16200
|
+
*/
|
|
16201
|
+
StreamGitActivitySummary(request: GitActivitySummaryRequest, metadata?: Metadata): Observable<GitActivitySummary>;
|
|
16202
|
+
/**
|
|
16203
|
+
* Live token burn calendar: a windowed, dimension-sliced token/cost trend series
|
|
16204
|
+
* plus whole-window totals.
|
|
16205
|
+
*/
|
|
16206
|
+
StreamTokenActivitySummary(
|
|
16207
|
+
request: TokenActivitySummaryRequest,
|
|
16208
|
+
metadata?: Metadata,
|
|
16209
|
+
): Observable<TokenActivitySummary>;
|
|
16210
|
+
/**
|
|
16211
|
+
* Live "burn rate now" gauge: the trailing-60s cost/hr + tokens/min (total plus a per-dimension
|
|
16212
|
+
* breakdown) and a fixed 60-minute one-minute rolling sparkline of that rate. Fixed horizon, fast
|
|
16213
|
+
* refresh; first frame is a full snapshot.
|
|
16214
|
+
*/
|
|
16215
|
+
StreamBurnRate(request: BurnRateRequest, metadata?: Metadata): Observable<BurnRate>;
|
|
16216
|
+
/**
|
|
16217
|
+
* Live token-burn calendar over an inclusive UTC [start_date, end_date] range: one complete row per
|
|
16218
|
+
* covered day off the precomputed daily rollup. Covered empty days are zero; uncomputed history is
|
|
16219
|
+
* omitted; today is provisional.
|
|
16220
|
+
*/
|
|
16221
|
+
StreamDailyActivity(request: DailyActivityRequest, metadata?: Metadata): Observable<DailyActivity>;
|
|
16222
|
+
/**
|
|
16223
|
+
* Live weekly activity rhythm: a sparse (weekday, hour) heatmap over a bounded sliding window in an
|
|
16224
|
+
* explicit IANA time zone. Every latest logical event counts; settled model calls add token/cost.
|
|
16225
|
+
*/
|
|
16226
|
+
StreamActivityRhythm(request: ActivityRhythmRequest, metadata?: Metadata): Observable<ActivityRhythm>;
|
|
16227
|
+
/**
|
|
16228
|
+
* Live stream of one project's dashboard bundle: headline totals, model/provider/source mix,
|
|
16229
|
+
* and top sessions by cost.
|
|
16230
|
+
*/
|
|
16231
|
+
StreamProjectOverview(request: ProjectOverviewRequest, metadata?: Metadata): Observable<ProjectOverview>;
|
|
16232
|
+
/** Per-file working-state feed (keyset-paginated) behind the unlanded-work funnel. */
|
|
16233
|
+
ListFiles(request: ListFilesRequest, metadata?: Metadata): Promise<ListFilesResponse>;
|
|
16234
|
+
/**
|
|
16235
|
+
* Live stream of the unlanded-work funnel: aging tiers + discarded (git-invisible churn), observed vs
|
|
16236
|
+
* unverified, a complete snapshot re-derived each tick.
|
|
16237
|
+
*/
|
|
16238
|
+
StreamFilesSummary(request: FilesSummaryRequest, metadata?: Metadata): Observable<FilesSummary>;
|
|
16239
|
+
/** Latest observed list price per (source, provider, model) from the global catalog. */
|
|
16240
|
+
ListModelPrices(request: ListModelPricesRequest, metadata?: Metadata): Promise<ListModelPricesResponse>;
|
|
16241
|
+
/**
|
|
16242
|
+
* Every stored observation for the filtered models over a time range, oldest first —
|
|
16243
|
+
* the rows ListModelPrices collapses. filter.model is required.
|
|
16244
|
+
*/
|
|
16245
|
+
ListModelPriceHistory(
|
|
16246
|
+
request: ListModelPriceHistoryRequest,
|
|
16247
|
+
metadata?: Metadata,
|
|
16248
|
+
): Promise<ListModelPriceHistoryResponse>;
|
|
15041
16249
|
/**
|
|
15042
16250
|
* Top-N most-used resources of one kind (skills / tools / files / URLs / bash commands) over a
|
|
15043
16251
|
* sliding window, each with the prior equal-length window's count for a trend delta and distinct
|
|
15044
16252
|
* sessions. Mirrors telemetry.api.v1.
|
|
15045
16253
|
*/
|
|
15046
16254
|
ListResourceRankings(request: ResourceRankingsRequest, metadata?: Metadata): Promise<ResourceRankingsResponse>;
|
|
16255
|
+
/**
|
|
16256
|
+
* Per-seat entitlement usage board: every entitlement owner's latest observed funding facility and
|
|
16257
|
+
* per-harness usage % windows. Stream-first (first frame = full snapshot), seat-scoped. Mirrors
|
|
16258
|
+
* telemetry.api.v1.
|
|
16259
|
+
*/
|
|
16260
|
+
StreamEntitlements(request: StreamEntitlementsRequest, metadata?: Metadata): Observable<EntitlementsSnapshot>;
|
|
15047
16261
|
}
|
|
15048
16262
|
|
|
15049
16263
|
export const AIGatewayServiceServiceName = "gateway.web.v1.AIGatewayService";
|
|
@@ -15075,6 +16289,7 @@ export class AIGatewayServiceClientImpl implements AIGatewayService {
|
|
|
15075
16289
|
this.ListModelPrices = this.ListModelPrices.bind(this);
|
|
15076
16290
|
this.ListModelPriceHistory = this.ListModelPriceHistory.bind(this);
|
|
15077
16291
|
this.ListResourceRankings = this.ListResourceRankings.bind(this);
|
|
16292
|
+
this.StreamEntitlements = this.StreamEntitlements.bind(this);
|
|
15078
16293
|
}
|
|
15079
16294
|
ListSessions(request: ListSessionsRequest, metadata?: Metadata): Promise<ListSessionsResponse> {
|
|
15080
16295
|
const data = ListSessionsRequest.encode(request).finish();
|
|
@@ -15216,6 +16431,12 @@ export class AIGatewayServiceClientImpl implements AIGatewayService {
|
|
|
15216
16431
|
const promise = this.rpc.request(this.service, "ListResourceRankings", data, metadata);
|
|
15217
16432
|
return promise.then((data) => ResourceRankingsResponse.decode(new BinaryReader(data)));
|
|
15218
16433
|
}
|
|
16434
|
+
|
|
16435
|
+
StreamEntitlements(request: StreamEntitlementsRequest, metadata?: Metadata): Observable<EntitlementsSnapshot> {
|
|
16436
|
+
const data = StreamEntitlementsRequest.encode(request).finish();
|
|
16437
|
+
const result = this.rpc.serverStreamingRequest(this.service, "StreamEntitlements", data, metadata);
|
|
16438
|
+
return result.pipe(map((data) => EntitlementsSnapshot.decode(new BinaryReader(data))));
|
|
16439
|
+
}
|
|
15219
16440
|
}
|
|
15220
16441
|
|
|
15221
16442
|
interface Rpc {
|