@miradorlabs/web-grpc 3.20.0 → 3.21.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
|
@@ -1627,6 +1627,35 @@ export interface ProjectOverviewSlice {
|
|
|
1627
1627
|
subscriptionCostUsd: number;
|
|
1628
1628
|
}
|
|
1629
1629
|
|
|
1630
|
+
export interface ProjectSummariesRequest {
|
|
1631
|
+
organizationId: string;
|
|
1632
|
+
projectIds: string[];
|
|
1633
|
+
activeAfter: Date | undefined;
|
|
1634
|
+
}
|
|
1635
|
+
|
|
1636
|
+
export interface ProjectSummaries {
|
|
1637
|
+
projects: ProjectSummary[];
|
|
1638
|
+
}
|
|
1639
|
+
|
|
1640
|
+
export interface ProjectSummary {
|
|
1641
|
+
projectId: string;
|
|
1642
|
+
sessions: number;
|
|
1643
|
+
pullRequestsMerged: number;
|
|
1644
|
+
repositories: number;
|
|
1645
|
+
sessionTokens: number;
|
|
1646
|
+
unpricedTokens: number;
|
|
1647
|
+
/** over all history; absent = never active */
|
|
1648
|
+
lastActivityAt: Date | undefined;
|
|
1649
|
+
actors: ProjectSummaryActor[];
|
|
1650
|
+
byModel: ProjectOverviewSlice[];
|
|
1651
|
+
}
|
|
1652
|
+
|
|
1653
|
+
export interface ProjectSummaryActor {
|
|
1654
|
+
sourceSystem: string;
|
|
1655
|
+
userId: string;
|
|
1656
|
+
apiKeyId: string;
|
|
1657
|
+
}
|
|
1658
|
+
|
|
1630
1659
|
export interface ProjectSessionRef {
|
|
1631
1660
|
sessionId: string;
|
|
1632
1661
|
sourceSystem: string;
|
|
@@ -12880,6 +12909,536 @@ export const ProjectOverviewSlice: MessageFns<ProjectOverviewSlice> = {
|
|
|
12880
12909
|
},
|
|
12881
12910
|
};
|
|
12882
12911
|
|
|
12912
|
+
function createBaseProjectSummariesRequest(): ProjectSummariesRequest {
|
|
12913
|
+
return { organizationId: "", projectIds: [], activeAfter: undefined };
|
|
12914
|
+
}
|
|
12915
|
+
|
|
12916
|
+
export const ProjectSummariesRequest: MessageFns<ProjectSummariesRequest> = {
|
|
12917
|
+
encode(message: ProjectSummariesRequest, writer: BinaryWriter = new BinaryWriter()): BinaryWriter {
|
|
12918
|
+
if (message.organizationId !== "") {
|
|
12919
|
+
writer.uint32(10).string(message.organizationId);
|
|
12920
|
+
}
|
|
12921
|
+
for (const v of message.projectIds) {
|
|
12922
|
+
writer.uint32(18).string(v!);
|
|
12923
|
+
}
|
|
12924
|
+
if (message.activeAfter !== undefined) {
|
|
12925
|
+
Timestamp.encode(toTimestamp(message.activeAfter), writer.uint32(26).fork()).join();
|
|
12926
|
+
}
|
|
12927
|
+
return writer;
|
|
12928
|
+
},
|
|
12929
|
+
|
|
12930
|
+
decode(input: BinaryReader | Uint8Array, length?: number): ProjectSummariesRequest {
|
|
12931
|
+
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
|
|
12932
|
+
const previousRecursionDepth = (reader as any).__tsProtoDecodeDepth ?? 0;
|
|
12933
|
+
if (previousRecursionDepth >= 100) {
|
|
12934
|
+
throw new globalThis.Error("protobuf decode recursion limit exceeded");
|
|
12935
|
+
}
|
|
12936
|
+
(reader as any).__tsProtoDecodeDepth = previousRecursionDepth + 1;
|
|
12937
|
+
try {
|
|
12938
|
+
const end = length === undefined ? reader.len : reader.pos + length;
|
|
12939
|
+
const message = createBaseProjectSummariesRequest();
|
|
12940
|
+
while (reader.pos < end) {
|
|
12941
|
+
const tag = reader.uint32();
|
|
12942
|
+
switch (tag >>> 3) {
|
|
12943
|
+
case 1: {
|
|
12944
|
+
if (tag !== 10) {
|
|
12945
|
+
break;
|
|
12946
|
+
}
|
|
12947
|
+
|
|
12948
|
+
message.organizationId = reader.string();
|
|
12949
|
+
continue;
|
|
12950
|
+
}
|
|
12951
|
+
case 2: {
|
|
12952
|
+
if (tag !== 18) {
|
|
12953
|
+
break;
|
|
12954
|
+
}
|
|
12955
|
+
|
|
12956
|
+
message.projectIds.push(reader.string());
|
|
12957
|
+
continue;
|
|
12958
|
+
}
|
|
12959
|
+
case 3: {
|
|
12960
|
+
if (tag !== 26) {
|
|
12961
|
+
break;
|
|
12962
|
+
}
|
|
12963
|
+
|
|
12964
|
+
message.activeAfter = fromTimestamp(Timestamp.decode(reader, reader.uint32()));
|
|
12965
|
+
continue;
|
|
12966
|
+
}
|
|
12967
|
+
}
|
|
12968
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
12969
|
+
break;
|
|
12970
|
+
}
|
|
12971
|
+
reader.skip(tag & 7);
|
|
12972
|
+
}
|
|
12973
|
+
return message;
|
|
12974
|
+
} finally {
|
|
12975
|
+
(reader as any).__tsProtoDecodeDepth = previousRecursionDepth;
|
|
12976
|
+
}
|
|
12977
|
+
},
|
|
12978
|
+
|
|
12979
|
+
fromJSON(object: any): ProjectSummariesRequest {
|
|
12980
|
+
return {
|
|
12981
|
+
organizationId: isSet(object.organizationId)
|
|
12982
|
+
? globalThis.String(object.organizationId)
|
|
12983
|
+
: isSet(object.organization_id)
|
|
12984
|
+
? globalThis.String(object.organization_id)
|
|
12985
|
+
: "",
|
|
12986
|
+
projectIds: globalThis.Array.isArray(object?.projectIds)
|
|
12987
|
+
? object.projectIds.map((e: any) => globalThis.String(e))
|
|
12988
|
+
: globalThis.Array.isArray(object?.project_ids)
|
|
12989
|
+
? object.project_ids.map((e: any) => globalThis.String(e))
|
|
12990
|
+
: [],
|
|
12991
|
+
activeAfter: isSet(object.activeAfter)
|
|
12992
|
+
? fromJsonTimestamp(object.activeAfter)
|
|
12993
|
+
: isSet(object.active_after)
|
|
12994
|
+
? fromJsonTimestamp(object.active_after)
|
|
12995
|
+
: undefined,
|
|
12996
|
+
};
|
|
12997
|
+
},
|
|
12998
|
+
|
|
12999
|
+
toJSON(message: ProjectSummariesRequest): unknown {
|
|
13000
|
+
const obj: any = {};
|
|
13001
|
+
if (message.organizationId !== "") {
|
|
13002
|
+
obj.organizationId = message.organizationId;
|
|
13003
|
+
}
|
|
13004
|
+
if (message.projectIds?.length) {
|
|
13005
|
+
obj.projectIds = message.projectIds;
|
|
13006
|
+
}
|
|
13007
|
+
if (message.activeAfter !== undefined) {
|
|
13008
|
+
obj.activeAfter = message.activeAfter.toISOString();
|
|
13009
|
+
}
|
|
13010
|
+
return obj;
|
|
13011
|
+
},
|
|
13012
|
+
|
|
13013
|
+
create<I extends Exact<DeepPartial<ProjectSummariesRequest>, I>>(base?: I): ProjectSummariesRequest {
|
|
13014
|
+
return ProjectSummariesRequest.fromPartial(base ?? ({} as any));
|
|
13015
|
+
},
|
|
13016
|
+
fromPartial<I extends Exact<DeepPartial<ProjectSummariesRequest>, I>>(object: I): ProjectSummariesRequest {
|
|
13017
|
+
const message = createBaseProjectSummariesRequest();
|
|
13018
|
+
message.organizationId = object.organizationId ?? "";
|
|
13019
|
+
message.projectIds = object.projectIds?.map((e) => e) || [];
|
|
13020
|
+
message.activeAfter = object.activeAfter ?? undefined;
|
|
13021
|
+
return message;
|
|
13022
|
+
},
|
|
13023
|
+
};
|
|
13024
|
+
|
|
13025
|
+
function createBaseProjectSummaries(): ProjectSummaries {
|
|
13026
|
+
return { projects: [] };
|
|
13027
|
+
}
|
|
13028
|
+
|
|
13029
|
+
export const ProjectSummaries: MessageFns<ProjectSummaries> = {
|
|
13030
|
+
encode(message: ProjectSummaries, writer: BinaryWriter = new BinaryWriter()): BinaryWriter {
|
|
13031
|
+
for (const v of message.projects) {
|
|
13032
|
+
ProjectSummary.encode(v!, writer.uint32(10).fork()).join();
|
|
13033
|
+
}
|
|
13034
|
+
return writer;
|
|
13035
|
+
},
|
|
13036
|
+
|
|
13037
|
+
decode(input: BinaryReader | Uint8Array, length?: number): ProjectSummaries {
|
|
13038
|
+
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
|
|
13039
|
+
const previousRecursionDepth = (reader as any).__tsProtoDecodeDepth ?? 0;
|
|
13040
|
+
if (previousRecursionDepth >= 100) {
|
|
13041
|
+
throw new globalThis.Error("protobuf decode recursion limit exceeded");
|
|
13042
|
+
}
|
|
13043
|
+
(reader as any).__tsProtoDecodeDepth = previousRecursionDepth + 1;
|
|
13044
|
+
try {
|
|
13045
|
+
const end = length === undefined ? reader.len : reader.pos + length;
|
|
13046
|
+
const message = createBaseProjectSummaries();
|
|
13047
|
+
while (reader.pos < end) {
|
|
13048
|
+
const tag = reader.uint32();
|
|
13049
|
+
switch (tag >>> 3) {
|
|
13050
|
+
case 1: {
|
|
13051
|
+
if (tag !== 10) {
|
|
13052
|
+
break;
|
|
13053
|
+
}
|
|
13054
|
+
|
|
13055
|
+
message.projects.push(ProjectSummary.decode(reader, reader.uint32()));
|
|
13056
|
+
continue;
|
|
13057
|
+
}
|
|
13058
|
+
}
|
|
13059
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
13060
|
+
break;
|
|
13061
|
+
}
|
|
13062
|
+
reader.skip(tag & 7);
|
|
13063
|
+
}
|
|
13064
|
+
return message;
|
|
13065
|
+
} finally {
|
|
13066
|
+
(reader as any).__tsProtoDecodeDepth = previousRecursionDepth;
|
|
13067
|
+
}
|
|
13068
|
+
},
|
|
13069
|
+
|
|
13070
|
+
fromJSON(object: any): ProjectSummaries {
|
|
13071
|
+
return {
|
|
13072
|
+
projects: globalThis.Array.isArray(object?.projects)
|
|
13073
|
+
? object.projects.map((e: any) => ProjectSummary.fromJSON(e))
|
|
13074
|
+
: [],
|
|
13075
|
+
};
|
|
13076
|
+
},
|
|
13077
|
+
|
|
13078
|
+
toJSON(message: ProjectSummaries): unknown {
|
|
13079
|
+
const obj: any = {};
|
|
13080
|
+
if (message.projects?.length) {
|
|
13081
|
+
obj.projects = message.projects.map((e) => ProjectSummary.toJSON(e));
|
|
13082
|
+
}
|
|
13083
|
+
return obj;
|
|
13084
|
+
},
|
|
13085
|
+
|
|
13086
|
+
create<I extends Exact<DeepPartial<ProjectSummaries>, I>>(base?: I): ProjectSummaries {
|
|
13087
|
+
return ProjectSummaries.fromPartial(base ?? ({} as any));
|
|
13088
|
+
},
|
|
13089
|
+
fromPartial<I extends Exact<DeepPartial<ProjectSummaries>, I>>(object: I): ProjectSummaries {
|
|
13090
|
+
const message = createBaseProjectSummaries();
|
|
13091
|
+
message.projects = object.projects?.map((e) => ProjectSummary.fromPartial(e)) || [];
|
|
13092
|
+
return message;
|
|
13093
|
+
},
|
|
13094
|
+
};
|
|
13095
|
+
|
|
13096
|
+
function createBaseProjectSummary(): ProjectSummary {
|
|
13097
|
+
return {
|
|
13098
|
+
projectId: "",
|
|
13099
|
+
sessions: 0,
|
|
13100
|
+
pullRequestsMerged: 0,
|
|
13101
|
+
repositories: 0,
|
|
13102
|
+
sessionTokens: 0,
|
|
13103
|
+
unpricedTokens: 0,
|
|
13104
|
+
lastActivityAt: undefined,
|
|
13105
|
+
actors: [],
|
|
13106
|
+
byModel: [],
|
|
13107
|
+
};
|
|
13108
|
+
}
|
|
13109
|
+
|
|
13110
|
+
export const ProjectSummary: MessageFns<ProjectSummary> = {
|
|
13111
|
+
encode(message: ProjectSummary, writer: BinaryWriter = new BinaryWriter()): BinaryWriter {
|
|
13112
|
+
if (message.projectId !== "") {
|
|
13113
|
+
writer.uint32(10).string(message.projectId);
|
|
13114
|
+
}
|
|
13115
|
+
if (message.sessions !== 0) {
|
|
13116
|
+
writer.uint32(16).uint64(message.sessions);
|
|
13117
|
+
}
|
|
13118
|
+
if (message.pullRequestsMerged !== 0) {
|
|
13119
|
+
writer.uint32(24).uint64(message.pullRequestsMerged);
|
|
13120
|
+
}
|
|
13121
|
+
if (message.repositories !== 0) {
|
|
13122
|
+
writer.uint32(32).uint64(message.repositories);
|
|
13123
|
+
}
|
|
13124
|
+
if (message.sessionTokens !== 0) {
|
|
13125
|
+
writer.uint32(40).uint64(message.sessionTokens);
|
|
13126
|
+
}
|
|
13127
|
+
if (message.unpricedTokens !== 0) {
|
|
13128
|
+
writer.uint32(48).uint64(message.unpricedTokens);
|
|
13129
|
+
}
|
|
13130
|
+
if (message.lastActivityAt !== undefined) {
|
|
13131
|
+
Timestamp.encode(toTimestamp(message.lastActivityAt), writer.uint32(58).fork()).join();
|
|
13132
|
+
}
|
|
13133
|
+
for (const v of message.actors) {
|
|
13134
|
+
ProjectSummaryActor.encode(v!, writer.uint32(66).fork()).join();
|
|
13135
|
+
}
|
|
13136
|
+
for (const v of message.byModel) {
|
|
13137
|
+
ProjectOverviewSlice.encode(v!, writer.uint32(74).fork()).join();
|
|
13138
|
+
}
|
|
13139
|
+
return writer;
|
|
13140
|
+
},
|
|
13141
|
+
|
|
13142
|
+
decode(input: BinaryReader | Uint8Array, length?: number): ProjectSummary {
|
|
13143
|
+
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
|
|
13144
|
+
const previousRecursionDepth = (reader as any).__tsProtoDecodeDepth ?? 0;
|
|
13145
|
+
if (previousRecursionDepth >= 100) {
|
|
13146
|
+
throw new globalThis.Error("protobuf decode recursion limit exceeded");
|
|
13147
|
+
}
|
|
13148
|
+
(reader as any).__tsProtoDecodeDepth = previousRecursionDepth + 1;
|
|
13149
|
+
try {
|
|
13150
|
+
const end = length === undefined ? reader.len : reader.pos + length;
|
|
13151
|
+
const message = createBaseProjectSummary();
|
|
13152
|
+
while (reader.pos < end) {
|
|
13153
|
+
const tag = reader.uint32();
|
|
13154
|
+
switch (tag >>> 3) {
|
|
13155
|
+
case 1: {
|
|
13156
|
+
if (tag !== 10) {
|
|
13157
|
+
break;
|
|
13158
|
+
}
|
|
13159
|
+
|
|
13160
|
+
message.projectId = reader.string();
|
|
13161
|
+
continue;
|
|
13162
|
+
}
|
|
13163
|
+
case 2: {
|
|
13164
|
+
if (tag !== 16) {
|
|
13165
|
+
break;
|
|
13166
|
+
}
|
|
13167
|
+
|
|
13168
|
+
message.sessions = longToNumber(reader.uint64());
|
|
13169
|
+
continue;
|
|
13170
|
+
}
|
|
13171
|
+
case 3: {
|
|
13172
|
+
if (tag !== 24) {
|
|
13173
|
+
break;
|
|
13174
|
+
}
|
|
13175
|
+
|
|
13176
|
+
message.pullRequestsMerged = longToNumber(reader.uint64());
|
|
13177
|
+
continue;
|
|
13178
|
+
}
|
|
13179
|
+
case 4: {
|
|
13180
|
+
if (tag !== 32) {
|
|
13181
|
+
break;
|
|
13182
|
+
}
|
|
13183
|
+
|
|
13184
|
+
message.repositories = longToNumber(reader.uint64());
|
|
13185
|
+
continue;
|
|
13186
|
+
}
|
|
13187
|
+
case 5: {
|
|
13188
|
+
if (tag !== 40) {
|
|
13189
|
+
break;
|
|
13190
|
+
}
|
|
13191
|
+
|
|
13192
|
+
message.sessionTokens = longToNumber(reader.uint64());
|
|
13193
|
+
continue;
|
|
13194
|
+
}
|
|
13195
|
+
case 6: {
|
|
13196
|
+
if (tag !== 48) {
|
|
13197
|
+
break;
|
|
13198
|
+
}
|
|
13199
|
+
|
|
13200
|
+
message.unpricedTokens = longToNumber(reader.uint64());
|
|
13201
|
+
continue;
|
|
13202
|
+
}
|
|
13203
|
+
case 7: {
|
|
13204
|
+
if (tag !== 58) {
|
|
13205
|
+
break;
|
|
13206
|
+
}
|
|
13207
|
+
|
|
13208
|
+
message.lastActivityAt = fromTimestamp(Timestamp.decode(reader, reader.uint32()));
|
|
13209
|
+
continue;
|
|
13210
|
+
}
|
|
13211
|
+
case 8: {
|
|
13212
|
+
if (tag !== 66) {
|
|
13213
|
+
break;
|
|
13214
|
+
}
|
|
13215
|
+
|
|
13216
|
+
message.actors.push(ProjectSummaryActor.decode(reader, reader.uint32()));
|
|
13217
|
+
continue;
|
|
13218
|
+
}
|
|
13219
|
+
case 9: {
|
|
13220
|
+
if (tag !== 74) {
|
|
13221
|
+
break;
|
|
13222
|
+
}
|
|
13223
|
+
|
|
13224
|
+
message.byModel.push(ProjectOverviewSlice.decode(reader, reader.uint32()));
|
|
13225
|
+
continue;
|
|
13226
|
+
}
|
|
13227
|
+
}
|
|
13228
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
13229
|
+
break;
|
|
13230
|
+
}
|
|
13231
|
+
reader.skip(tag & 7);
|
|
13232
|
+
}
|
|
13233
|
+
return message;
|
|
13234
|
+
} finally {
|
|
13235
|
+
(reader as any).__tsProtoDecodeDepth = previousRecursionDepth;
|
|
13236
|
+
}
|
|
13237
|
+
},
|
|
13238
|
+
|
|
13239
|
+
fromJSON(object: any): ProjectSummary {
|
|
13240
|
+
return {
|
|
13241
|
+
projectId: isSet(object.projectId)
|
|
13242
|
+
? globalThis.String(object.projectId)
|
|
13243
|
+
: isSet(object.project_id)
|
|
13244
|
+
? globalThis.String(object.project_id)
|
|
13245
|
+
: "",
|
|
13246
|
+
sessions: isSet(object.sessions) ? globalThis.Number(object.sessions) : 0,
|
|
13247
|
+
pullRequestsMerged: isSet(object.pullRequestsMerged)
|
|
13248
|
+
? globalThis.Number(object.pullRequestsMerged)
|
|
13249
|
+
: isSet(object.pull_requests_merged)
|
|
13250
|
+
? globalThis.Number(object.pull_requests_merged)
|
|
13251
|
+
: 0,
|
|
13252
|
+
repositories: isSet(object.repositories) ? globalThis.Number(object.repositories) : 0,
|
|
13253
|
+
sessionTokens: isSet(object.sessionTokens)
|
|
13254
|
+
? globalThis.Number(object.sessionTokens)
|
|
13255
|
+
: isSet(object.session_tokens)
|
|
13256
|
+
? globalThis.Number(object.session_tokens)
|
|
13257
|
+
: 0,
|
|
13258
|
+
unpricedTokens: isSet(object.unpricedTokens)
|
|
13259
|
+
? globalThis.Number(object.unpricedTokens)
|
|
13260
|
+
: isSet(object.unpriced_tokens)
|
|
13261
|
+
? globalThis.Number(object.unpriced_tokens)
|
|
13262
|
+
: 0,
|
|
13263
|
+
lastActivityAt: isSet(object.lastActivityAt)
|
|
13264
|
+
? fromJsonTimestamp(object.lastActivityAt)
|
|
13265
|
+
: isSet(object.last_activity_at)
|
|
13266
|
+
? fromJsonTimestamp(object.last_activity_at)
|
|
13267
|
+
: undefined,
|
|
13268
|
+
actors: globalThis.Array.isArray(object?.actors)
|
|
13269
|
+
? object.actors.map((e: any) => ProjectSummaryActor.fromJSON(e))
|
|
13270
|
+
: [],
|
|
13271
|
+
byModel: globalThis.Array.isArray(object?.byModel)
|
|
13272
|
+
? object.byModel.map((e: any) => ProjectOverviewSlice.fromJSON(e))
|
|
13273
|
+
: globalThis.Array.isArray(object?.by_model)
|
|
13274
|
+
? object.by_model.map((e: any) => ProjectOverviewSlice.fromJSON(e))
|
|
13275
|
+
: [],
|
|
13276
|
+
};
|
|
13277
|
+
},
|
|
13278
|
+
|
|
13279
|
+
toJSON(message: ProjectSummary): unknown {
|
|
13280
|
+
const obj: any = {};
|
|
13281
|
+
if (message.projectId !== "") {
|
|
13282
|
+
obj.projectId = message.projectId;
|
|
13283
|
+
}
|
|
13284
|
+
if (message.sessions !== 0) {
|
|
13285
|
+
obj.sessions = Math.round(message.sessions);
|
|
13286
|
+
}
|
|
13287
|
+
if (message.pullRequestsMerged !== 0) {
|
|
13288
|
+
obj.pullRequestsMerged = Math.round(message.pullRequestsMerged);
|
|
13289
|
+
}
|
|
13290
|
+
if (message.repositories !== 0) {
|
|
13291
|
+
obj.repositories = Math.round(message.repositories);
|
|
13292
|
+
}
|
|
13293
|
+
if (message.sessionTokens !== 0) {
|
|
13294
|
+
obj.sessionTokens = Math.round(message.sessionTokens);
|
|
13295
|
+
}
|
|
13296
|
+
if (message.unpricedTokens !== 0) {
|
|
13297
|
+
obj.unpricedTokens = Math.round(message.unpricedTokens);
|
|
13298
|
+
}
|
|
13299
|
+
if (message.lastActivityAt !== undefined) {
|
|
13300
|
+
obj.lastActivityAt = message.lastActivityAt.toISOString();
|
|
13301
|
+
}
|
|
13302
|
+
if (message.actors?.length) {
|
|
13303
|
+
obj.actors = message.actors.map((e) => ProjectSummaryActor.toJSON(e));
|
|
13304
|
+
}
|
|
13305
|
+
if (message.byModel?.length) {
|
|
13306
|
+
obj.byModel = message.byModel.map((e) => ProjectOverviewSlice.toJSON(e));
|
|
13307
|
+
}
|
|
13308
|
+
return obj;
|
|
13309
|
+
},
|
|
13310
|
+
|
|
13311
|
+
create<I extends Exact<DeepPartial<ProjectSummary>, I>>(base?: I): ProjectSummary {
|
|
13312
|
+
return ProjectSummary.fromPartial(base ?? ({} as any));
|
|
13313
|
+
},
|
|
13314
|
+
fromPartial<I extends Exact<DeepPartial<ProjectSummary>, I>>(object: I): ProjectSummary {
|
|
13315
|
+
const message = createBaseProjectSummary();
|
|
13316
|
+
message.projectId = object.projectId ?? "";
|
|
13317
|
+
message.sessions = object.sessions ?? 0;
|
|
13318
|
+
message.pullRequestsMerged = object.pullRequestsMerged ?? 0;
|
|
13319
|
+
message.repositories = object.repositories ?? 0;
|
|
13320
|
+
message.sessionTokens = object.sessionTokens ?? 0;
|
|
13321
|
+
message.unpricedTokens = object.unpricedTokens ?? 0;
|
|
13322
|
+
message.lastActivityAt = object.lastActivityAt ?? undefined;
|
|
13323
|
+
message.actors = object.actors?.map((e) => ProjectSummaryActor.fromPartial(e)) || [];
|
|
13324
|
+
message.byModel = object.byModel?.map((e) => ProjectOverviewSlice.fromPartial(e)) || [];
|
|
13325
|
+
return message;
|
|
13326
|
+
},
|
|
13327
|
+
};
|
|
13328
|
+
|
|
13329
|
+
function createBaseProjectSummaryActor(): ProjectSummaryActor {
|
|
13330
|
+
return { sourceSystem: "", userId: "", apiKeyId: "" };
|
|
13331
|
+
}
|
|
13332
|
+
|
|
13333
|
+
export const ProjectSummaryActor: MessageFns<ProjectSummaryActor> = {
|
|
13334
|
+
encode(message: ProjectSummaryActor, writer: BinaryWriter = new BinaryWriter()): BinaryWriter {
|
|
13335
|
+
if (message.sourceSystem !== "") {
|
|
13336
|
+
writer.uint32(10).string(message.sourceSystem);
|
|
13337
|
+
}
|
|
13338
|
+
if (message.userId !== "") {
|
|
13339
|
+
writer.uint32(18).string(message.userId);
|
|
13340
|
+
}
|
|
13341
|
+
if (message.apiKeyId !== "") {
|
|
13342
|
+
writer.uint32(26).string(message.apiKeyId);
|
|
13343
|
+
}
|
|
13344
|
+
return writer;
|
|
13345
|
+
},
|
|
13346
|
+
|
|
13347
|
+
decode(input: BinaryReader | Uint8Array, length?: number): ProjectSummaryActor {
|
|
13348
|
+
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
|
|
13349
|
+
const previousRecursionDepth = (reader as any).__tsProtoDecodeDepth ?? 0;
|
|
13350
|
+
if (previousRecursionDepth >= 100) {
|
|
13351
|
+
throw new globalThis.Error("protobuf decode recursion limit exceeded");
|
|
13352
|
+
}
|
|
13353
|
+
(reader as any).__tsProtoDecodeDepth = previousRecursionDepth + 1;
|
|
13354
|
+
try {
|
|
13355
|
+
const end = length === undefined ? reader.len : reader.pos + length;
|
|
13356
|
+
const message = createBaseProjectSummaryActor();
|
|
13357
|
+
while (reader.pos < end) {
|
|
13358
|
+
const tag = reader.uint32();
|
|
13359
|
+
switch (tag >>> 3) {
|
|
13360
|
+
case 1: {
|
|
13361
|
+
if (tag !== 10) {
|
|
13362
|
+
break;
|
|
13363
|
+
}
|
|
13364
|
+
|
|
13365
|
+
message.sourceSystem = reader.string();
|
|
13366
|
+
continue;
|
|
13367
|
+
}
|
|
13368
|
+
case 2: {
|
|
13369
|
+
if (tag !== 18) {
|
|
13370
|
+
break;
|
|
13371
|
+
}
|
|
13372
|
+
|
|
13373
|
+
message.userId = reader.string();
|
|
13374
|
+
continue;
|
|
13375
|
+
}
|
|
13376
|
+
case 3: {
|
|
13377
|
+
if (tag !== 26) {
|
|
13378
|
+
break;
|
|
13379
|
+
}
|
|
13380
|
+
|
|
13381
|
+
message.apiKeyId = reader.string();
|
|
13382
|
+
continue;
|
|
13383
|
+
}
|
|
13384
|
+
}
|
|
13385
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
13386
|
+
break;
|
|
13387
|
+
}
|
|
13388
|
+
reader.skip(tag & 7);
|
|
13389
|
+
}
|
|
13390
|
+
return message;
|
|
13391
|
+
} finally {
|
|
13392
|
+
(reader as any).__tsProtoDecodeDepth = previousRecursionDepth;
|
|
13393
|
+
}
|
|
13394
|
+
},
|
|
13395
|
+
|
|
13396
|
+
fromJSON(object: any): ProjectSummaryActor {
|
|
13397
|
+
return {
|
|
13398
|
+
sourceSystem: isSet(object.sourceSystem)
|
|
13399
|
+
? globalThis.String(object.sourceSystem)
|
|
13400
|
+
: isSet(object.source_system)
|
|
13401
|
+
? globalThis.String(object.source_system)
|
|
13402
|
+
: "",
|
|
13403
|
+
userId: isSet(object.userId)
|
|
13404
|
+
? globalThis.String(object.userId)
|
|
13405
|
+
: isSet(object.user_id)
|
|
13406
|
+
? globalThis.String(object.user_id)
|
|
13407
|
+
: "",
|
|
13408
|
+
apiKeyId: isSet(object.apiKeyId)
|
|
13409
|
+
? globalThis.String(object.apiKeyId)
|
|
13410
|
+
: isSet(object.api_key_id)
|
|
13411
|
+
? globalThis.String(object.api_key_id)
|
|
13412
|
+
: "",
|
|
13413
|
+
};
|
|
13414
|
+
},
|
|
13415
|
+
|
|
13416
|
+
toJSON(message: ProjectSummaryActor): unknown {
|
|
13417
|
+
const obj: any = {};
|
|
13418
|
+
if (message.sourceSystem !== "") {
|
|
13419
|
+
obj.sourceSystem = message.sourceSystem;
|
|
13420
|
+
}
|
|
13421
|
+
if (message.userId !== "") {
|
|
13422
|
+
obj.userId = message.userId;
|
|
13423
|
+
}
|
|
13424
|
+
if (message.apiKeyId !== "") {
|
|
13425
|
+
obj.apiKeyId = message.apiKeyId;
|
|
13426
|
+
}
|
|
13427
|
+
return obj;
|
|
13428
|
+
},
|
|
13429
|
+
|
|
13430
|
+
create<I extends Exact<DeepPartial<ProjectSummaryActor>, I>>(base?: I): ProjectSummaryActor {
|
|
13431
|
+
return ProjectSummaryActor.fromPartial(base ?? ({} as any));
|
|
13432
|
+
},
|
|
13433
|
+
fromPartial<I extends Exact<DeepPartial<ProjectSummaryActor>, I>>(object: I): ProjectSummaryActor {
|
|
13434
|
+
const message = createBaseProjectSummaryActor();
|
|
13435
|
+
message.sourceSystem = object.sourceSystem ?? "";
|
|
13436
|
+
message.userId = object.userId ?? "";
|
|
13437
|
+
message.apiKeyId = object.apiKeyId ?? "";
|
|
13438
|
+
return message;
|
|
13439
|
+
},
|
|
13440
|
+
};
|
|
13441
|
+
|
|
12883
13442
|
function createBaseProjectSessionRef(): ProjectSessionRef {
|
|
12884
13443
|
return { sessionId: "", sourceSystem: "", costUsd: 0, modelCalls: 0, lastActivityAt: undefined };
|
|
12885
13444
|
}
|
|
@@ -19098,6 +19657,11 @@ export interface AIGatewayService {
|
|
|
19098
19657
|
* and top sessions by cost.
|
|
19099
19658
|
*/
|
|
19100
19659
|
StreamProjectOverview(request: ProjectOverviewRequest, metadata?: Metadata): Observable<ProjectOverview>;
|
|
19660
|
+
/**
|
|
19661
|
+
* Live organization home cards: one summary per requested project (zeros when it has no AI activity) —
|
|
19662
|
+
* conversations last active in the window, their principals and git counts, and the window's burn by model.
|
|
19663
|
+
*/
|
|
19664
|
+
StreamProjectSummaries(request: ProjectSummariesRequest, metadata?: Metadata): Observable<ProjectSummaries>;
|
|
19101
19665
|
/** Per-file working-state feed (keyset-paginated) behind the unlanded-work funnel. */
|
|
19102
19666
|
ListFiles(request: ListFilesRequest, metadata?: Metadata): Promise<ListFilesResponse>;
|
|
19103
19667
|
/**
|
|
@@ -19162,6 +19726,7 @@ export class AIGatewayServiceClientImpl implements AIGatewayService {
|
|
|
19162
19726
|
this.StreamDailyActivity = this.StreamDailyActivity.bind(this);
|
|
19163
19727
|
this.StreamActivityRhythm = this.StreamActivityRhythm.bind(this);
|
|
19164
19728
|
this.StreamProjectOverview = this.StreamProjectOverview.bind(this);
|
|
19729
|
+
this.StreamProjectSummaries = this.StreamProjectSummaries.bind(this);
|
|
19165
19730
|
this.ListFiles = this.ListFiles.bind(this);
|
|
19166
19731
|
this.StreamFilesSummary = this.StreamFilesSummary.bind(this);
|
|
19167
19732
|
this.ListModelPrices = this.ListModelPrices.bind(this);
|
|
@@ -19267,6 +19832,12 @@ export class AIGatewayServiceClientImpl implements AIGatewayService {
|
|
|
19267
19832
|
return result.pipe(map((data) => ProjectOverview.decode(new BinaryReader(data))));
|
|
19268
19833
|
}
|
|
19269
19834
|
|
|
19835
|
+
StreamProjectSummaries(request: ProjectSummariesRequest, metadata?: Metadata): Observable<ProjectSummaries> {
|
|
19836
|
+
const data = ProjectSummariesRequest.encode(request).finish();
|
|
19837
|
+
const result = this.rpc.serverStreamingRequest(this.service, "StreamProjectSummaries", data, metadata);
|
|
19838
|
+
return result.pipe(map((data) => ProjectSummaries.decode(new BinaryReader(data))));
|
|
19839
|
+
}
|
|
19840
|
+
|
|
19270
19841
|
ListFiles(request: ListFilesRequest, metadata?: Metadata): Promise<ListFilesResponse> {
|
|
19271
19842
|
const data = ListFilesRequest.encode(request).finish();
|
|
19272
19843
|
const promise = this.rpc.request(this.service, "ListFiles", data, metadata);
|
|
@@ -351,6 +351,28 @@ function deserialize_gateway_web_v1_ProjectOverviewRequest(buffer_arg) {
|
|
|
351
351
|
return proto_gateway_web_v1_ai_gateway_pb.ProjectOverviewRequest.deserializeBinary(new Uint8Array(buffer_arg));
|
|
352
352
|
}
|
|
353
353
|
|
|
354
|
+
function serialize_gateway_web_v1_ProjectSummaries(arg) {
|
|
355
|
+
if (!(arg instanceof proto_gateway_web_v1_ai_gateway_pb.ProjectSummaries)) {
|
|
356
|
+
throw new Error('Expected argument of type gateway.web.v1.ProjectSummaries');
|
|
357
|
+
}
|
|
358
|
+
return Buffer.from(arg.serializeBinary());
|
|
359
|
+
}
|
|
360
|
+
|
|
361
|
+
function deserialize_gateway_web_v1_ProjectSummaries(buffer_arg) {
|
|
362
|
+
return proto_gateway_web_v1_ai_gateway_pb.ProjectSummaries.deserializeBinary(new Uint8Array(buffer_arg));
|
|
363
|
+
}
|
|
364
|
+
|
|
365
|
+
function serialize_gateway_web_v1_ProjectSummariesRequest(arg) {
|
|
366
|
+
if (!(arg instanceof proto_gateway_web_v1_ai_gateway_pb.ProjectSummariesRequest)) {
|
|
367
|
+
throw new Error('Expected argument of type gateway.web.v1.ProjectSummariesRequest');
|
|
368
|
+
}
|
|
369
|
+
return Buffer.from(arg.serializeBinary());
|
|
370
|
+
}
|
|
371
|
+
|
|
372
|
+
function deserialize_gateway_web_v1_ProjectSummariesRequest(buffer_arg) {
|
|
373
|
+
return proto_gateway_web_v1_ai_gateway_pb.ProjectSummariesRequest.deserializeBinary(new Uint8Array(buffer_arg));
|
|
374
|
+
}
|
|
375
|
+
|
|
354
376
|
function serialize_gateway_web_v1_ResourceRankingsRequest(arg) {
|
|
355
377
|
if (!(arg instanceof proto_gateway_web_v1_ai_gateway_pb.ResourceRankingsRequest)) {
|
|
356
378
|
throw new Error('Expected argument of type gateway.web.v1.ResourceRankingsRequest');
|
|
@@ -711,6 +733,19 @@ streamProjectOverview: {
|
|
|
711
733
|
responseSerialize: serialize_gateway_web_v1_ProjectOverview,
|
|
712
734
|
responseDeserialize: deserialize_gateway_web_v1_ProjectOverview,
|
|
713
735
|
},
|
|
736
|
+
// Live organization home cards: one summary per requested project (zeros when it has no AI activity) —
|
|
737
|
+
// conversations last active in the window, their principals and git counts, and the window's burn by model.
|
|
738
|
+
streamProjectSummaries: {
|
|
739
|
+
path: '/gateway.web.v1.AIGatewayService/StreamProjectSummaries',
|
|
740
|
+
requestStream: false,
|
|
741
|
+
responseStream: true,
|
|
742
|
+
requestType: proto_gateway_web_v1_ai_gateway_pb.ProjectSummariesRequest,
|
|
743
|
+
responseType: proto_gateway_web_v1_ai_gateway_pb.ProjectSummaries,
|
|
744
|
+
requestSerialize: serialize_gateway_web_v1_ProjectSummariesRequest,
|
|
745
|
+
requestDeserialize: deserialize_gateway_web_v1_ProjectSummariesRequest,
|
|
746
|
+
responseSerialize: serialize_gateway_web_v1_ProjectSummaries,
|
|
747
|
+
responseDeserialize: deserialize_gateway_web_v1_ProjectSummaries,
|
|
748
|
+
},
|
|
714
749
|
// Per-file working-state feed (keyset-paginated) behind the unlanded-work funnel.
|
|
715
750
|
listFiles: {
|
|
716
751
|
path: '/gateway.web.v1.AIGatewayService/ListFiles',
|