@miradorlabs/web-grpc 3.3.0 → 3.4.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.
@@ -12,6 +12,52 @@ import { ResponseStatus } from "../../common/v1/status";
12
12
 
13
13
  export const protobufPackage = "gateway.web.v1";
14
14
 
15
+ /** AIReferenceNameScope mirrors telemetry.api.v1.AIReferenceNameScope. */
16
+ export enum AIReferenceNameScope {
17
+ /** AI_REFERENCE_NAME_SCOPE_UNSPECIFIED - The org's own names (ORGANIZATION). */
18
+ AI_REFERENCE_NAME_SCOPE_UNSPECIFIED = 0,
19
+ /** AI_REFERENCE_NAME_SCOPE_ORGANIZATION - Every name the org's own telemetry reported, recorded or not. */
20
+ AI_REFERENCE_NAME_SCOPE_ORGANIZATION = 1,
21
+ /**
22
+ * AI_REFERENCE_NAME_SCOPE_ALL - The org's names plus every other name the registry holds (the price catalogs' spellings among them).
23
+ * An unobserved name carries observed = false and only its "price:<source>" sources.
24
+ */
25
+ AI_REFERENCE_NAME_SCOPE_ALL = 2,
26
+ UNRECOGNIZED = -1,
27
+ }
28
+
29
+ export function aIReferenceNameScopeFromJSON(object: any): AIReferenceNameScope {
30
+ switch (object) {
31
+ case 0:
32
+ case "AI_REFERENCE_NAME_SCOPE_UNSPECIFIED":
33
+ return AIReferenceNameScope.AI_REFERENCE_NAME_SCOPE_UNSPECIFIED;
34
+ case 1:
35
+ case "AI_REFERENCE_NAME_SCOPE_ORGANIZATION":
36
+ return AIReferenceNameScope.AI_REFERENCE_NAME_SCOPE_ORGANIZATION;
37
+ case 2:
38
+ case "AI_REFERENCE_NAME_SCOPE_ALL":
39
+ return AIReferenceNameScope.AI_REFERENCE_NAME_SCOPE_ALL;
40
+ case -1:
41
+ case "UNRECOGNIZED":
42
+ default:
43
+ return AIReferenceNameScope.UNRECOGNIZED;
44
+ }
45
+ }
46
+
47
+ export function aIReferenceNameScopeToJSON(object: AIReferenceNameScope): string {
48
+ switch (object) {
49
+ case AIReferenceNameScope.AI_REFERENCE_NAME_SCOPE_UNSPECIFIED:
50
+ return "AI_REFERENCE_NAME_SCOPE_UNSPECIFIED";
51
+ case AIReferenceNameScope.AI_REFERENCE_NAME_SCOPE_ORGANIZATION:
52
+ return "AI_REFERENCE_NAME_SCOPE_ORGANIZATION";
53
+ case AIReferenceNameScope.AI_REFERENCE_NAME_SCOPE_ALL:
54
+ return "AI_REFERENCE_NAME_SCOPE_ALL";
55
+ case AIReferenceNameScope.UNRECOGNIZED:
56
+ default:
57
+ return "UNRECOGNIZED";
58
+ }
59
+ }
60
+
15
61
  /** AIReferenceNameOrigin mirrors telemetry.api.v1.AIReferenceNameOrigin. */
16
62
  export enum AIReferenceNameOrigin {
17
63
  AI_REFERENCE_NAME_ORIGIN_UNSPECIFIED = 0,
@@ -147,14 +193,52 @@ export interface UpdatePrincipalResponse {
147
193
  principal: AIPrincipal | undefined;
148
194
  }
149
195
 
150
- export interface ListAIReferenceNamesRequest {
196
+ export interface ListAIProvidersRequest {
197
+ organizationId: string;
198
+ /** Required, except with scope ALL. */
199
+ projectId: string;
200
+ scope: AIReferenceNameScope;
201
+ }
202
+
203
+ export interface ListAIProvidersResponse {
204
+ status: ResponseStatus | undefined;
205
+ providers: AIReferenceName[];
206
+ }
207
+
208
+ export interface ListAIModelsRequest {
209
+ organizationId: string;
210
+ /** Required, except with scope ALL. */
211
+ projectId: string;
212
+ scope: AIReferenceNameScope;
213
+ }
214
+
215
+ export interface ListAIModelsResponse {
216
+ status: ResponseStatus | undefined;
217
+ models: AIReferenceName[];
218
+ }
219
+
220
+ export interface ListAIEffortsRequest {
221
+ organizationId: string;
222
+ /** Required, except with scope ALL. */
223
+ projectId: string;
224
+ scope: AIReferenceNameScope;
225
+ }
226
+
227
+ export interface ListAIEffortsResponse {
228
+ status: ResponseStatus | undefined;
229
+ efforts: AIReferenceName[];
230
+ }
231
+
232
+ export interface ListAIBillersRequest {
151
233
  organizationId: string;
234
+ /** Required, except with scope ALL. */
152
235
  projectId: string;
236
+ scope: AIReferenceNameScope;
153
237
  }
154
238
 
155
- export interface ListAIReferenceNamesResponse {
239
+ export interface ListAIBillersResponse {
156
240
  status: ResponseStatus | undefined;
157
- names: AIReferenceName[];
241
+ billers: AIReferenceName[];
158
242
  }
159
243
 
160
244
  /** AIReferenceName mirrors telemetry.api.v1.AIReferenceName: one raw name's display name. */
@@ -165,27 +249,11 @@ export interface AIReferenceName {
165
249
  sourceSystems: string[];
166
250
  origin: AIReferenceNameOrigin;
167
251
  /** Unset for an UNREGISTERED name. */
168
- updatedAt: Date | undefined;
169
- }
170
-
171
- /** ListAllAIReferenceNamesRequest reads a whole global name table (AdminGatewayService, staff only). */
172
- export interface ListAllAIReferenceNamesRequest {
173
- }
174
-
175
- /** UpdateAIReferenceNameRequest sets one global name's display name (AdminGatewayService, staff only). */
176
- export interface UpdateAIReferenceNameRequest {
177
- /** Required, except that "" is a valid effort name. */
178
- name: string;
179
- /**
180
- * Required, with a letter or digit. Stored as its lowercase slug ("GPT 6 Sol" -> "gpt-6-sol"), like every
181
- * display name the registry holds.
182
- */
183
- displayName: string;
184
- }
185
-
186
- export interface UpdateAIReferenceNameResponse {
187
- status: ResponseStatus | undefined;
188
- name: AIReferenceName | undefined;
252
+ updatedAt:
253
+ | Date
254
+ | undefined;
255
+ /** The org's own data carries the name. False only for a name a scope ALL read adds from the registry. */
256
+ observed: boolean;
189
257
  }
190
258
 
191
259
  function createBaseListPrincipalsRequest(): ListPrincipalsRequest {
@@ -921,22 +989,25 @@ export const UpdatePrincipalResponse: MessageFns<UpdatePrincipalResponse> = {
921
989
  },
922
990
  };
923
991
 
924
- function createBaseListAIReferenceNamesRequest(): ListAIReferenceNamesRequest {
925
- return { organizationId: "", projectId: "" };
992
+ function createBaseListAIProvidersRequest(): ListAIProvidersRequest {
993
+ return { organizationId: "", projectId: "", scope: 0 };
926
994
  }
927
995
 
928
- export const ListAIReferenceNamesRequest: MessageFns<ListAIReferenceNamesRequest> = {
929
- encode(message: ListAIReferenceNamesRequest, writer: BinaryWriter = new BinaryWriter()): BinaryWriter {
996
+ export const ListAIProvidersRequest: MessageFns<ListAIProvidersRequest> = {
997
+ encode(message: ListAIProvidersRequest, writer: BinaryWriter = new BinaryWriter()): BinaryWriter {
930
998
  if (message.organizationId !== "") {
931
999
  writer.uint32(10).string(message.organizationId);
932
1000
  }
933
1001
  if (message.projectId !== "") {
934
1002
  writer.uint32(18).string(message.projectId);
935
1003
  }
1004
+ if (message.scope !== 0) {
1005
+ writer.uint32(24).int32(message.scope);
1006
+ }
936
1007
  return writer;
937
1008
  },
938
1009
 
939
- decode(input: BinaryReader | Uint8Array, length?: number): ListAIReferenceNamesRequest {
1010
+ decode(input: BinaryReader | Uint8Array, length?: number): ListAIProvidersRequest {
940
1011
  const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
941
1012
  const previousRecursionDepth = (reader as any).__tsProtoDecodeDepth ?? 0;
942
1013
  if (previousRecursionDepth >= 100) {
@@ -945,7 +1016,7 @@ export const ListAIReferenceNamesRequest: MessageFns<ListAIReferenceNamesRequest
945
1016
  (reader as any).__tsProtoDecodeDepth = previousRecursionDepth + 1;
946
1017
  try {
947
1018
  const end = length === undefined ? reader.len : reader.pos + length;
948
- const message = createBaseListAIReferenceNamesRequest();
1019
+ const message = createBaseListAIProvidersRequest();
949
1020
  while (reader.pos < end) {
950
1021
  const tag = reader.uint32();
951
1022
  switch (tag >>> 3) {
@@ -965,6 +1036,14 @@ export const ListAIReferenceNamesRequest: MessageFns<ListAIReferenceNamesRequest
965
1036
  message.projectId = reader.string();
966
1037
  continue;
967
1038
  }
1039
+ case 3: {
1040
+ if (tag !== 24) {
1041
+ break;
1042
+ }
1043
+
1044
+ message.scope = reader.int32() as any;
1045
+ continue;
1046
+ }
968
1047
  }
969
1048
  if ((tag & 7) === 4 || tag === 0) {
970
1049
  break;
@@ -977,7 +1056,7 @@ export const ListAIReferenceNamesRequest: MessageFns<ListAIReferenceNamesRequest
977
1056
  }
978
1057
  },
979
1058
 
980
- fromJSON(object: any): ListAIReferenceNamesRequest {
1059
+ fromJSON(object: any): ListAIProvidersRequest {
981
1060
  return {
982
1061
  organizationId: isSet(object.organizationId)
983
1062
  ? globalThis.String(object.organizationId)
@@ -989,10 +1068,11 @@ export const ListAIReferenceNamesRequest: MessageFns<ListAIReferenceNamesRequest
989
1068
  : isSet(object.project_id)
990
1069
  ? globalThis.String(object.project_id)
991
1070
  : "",
1071
+ scope: isSet(object.scope) ? aIReferenceNameScopeFromJSON(object.scope) : 0,
992
1072
  };
993
1073
  },
994
1074
 
995
- toJSON(message: ListAIReferenceNamesRequest): unknown {
1075
+ toJSON(message: ListAIProvidersRequest): unknown {
996
1076
  const obj: any = {};
997
1077
  if (message.organizationId !== "") {
998
1078
  obj.organizationId = message.organizationId;
@@ -1000,36 +1080,40 @@ export const ListAIReferenceNamesRequest: MessageFns<ListAIReferenceNamesRequest
1000
1080
  if (message.projectId !== "") {
1001
1081
  obj.projectId = message.projectId;
1002
1082
  }
1083
+ if (message.scope !== 0) {
1084
+ obj.scope = aIReferenceNameScopeToJSON(message.scope);
1085
+ }
1003
1086
  return obj;
1004
1087
  },
1005
1088
 
1006
- create<I extends Exact<DeepPartial<ListAIReferenceNamesRequest>, I>>(base?: I): ListAIReferenceNamesRequest {
1007
- return ListAIReferenceNamesRequest.fromPartial(base ?? ({} as any));
1089
+ create<I extends Exact<DeepPartial<ListAIProvidersRequest>, I>>(base?: I): ListAIProvidersRequest {
1090
+ return ListAIProvidersRequest.fromPartial(base ?? ({} as any));
1008
1091
  },
1009
- fromPartial<I extends Exact<DeepPartial<ListAIReferenceNamesRequest>, I>>(object: I): ListAIReferenceNamesRequest {
1010
- const message = createBaseListAIReferenceNamesRequest();
1092
+ fromPartial<I extends Exact<DeepPartial<ListAIProvidersRequest>, I>>(object: I): ListAIProvidersRequest {
1093
+ const message = createBaseListAIProvidersRequest();
1011
1094
  message.organizationId = object.organizationId ?? "";
1012
1095
  message.projectId = object.projectId ?? "";
1096
+ message.scope = object.scope ?? 0;
1013
1097
  return message;
1014
1098
  },
1015
1099
  };
1016
1100
 
1017
- function createBaseListAIReferenceNamesResponse(): ListAIReferenceNamesResponse {
1018
- return { status: undefined, names: [] };
1101
+ function createBaseListAIProvidersResponse(): ListAIProvidersResponse {
1102
+ return { status: undefined, providers: [] };
1019
1103
  }
1020
1104
 
1021
- export const ListAIReferenceNamesResponse: MessageFns<ListAIReferenceNamesResponse> = {
1022
- encode(message: ListAIReferenceNamesResponse, writer: BinaryWriter = new BinaryWriter()): BinaryWriter {
1105
+ export const ListAIProvidersResponse: MessageFns<ListAIProvidersResponse> = {
1106
+ encode(message: ListAIProvidersResponse, writer: BinaryWriter = new BinaryWriter()): BinaryWriter {
1023
1107
  if (message.status !== undefined) {
1024
1108
  ResponseStatus.encode(message.status, writer.uint32(10).fork()).join();
1025
1109
  }
1026
- for (const v of message.names) {
1110
+ for (const v of message.providers) {
1027
1111
  AIReferenceName.encode(v!, writer.uint32(18).fork()).join();
1028
1112
  }
1029
1113
  return writer;
1030
1114
  },
1031
1115
 
1032
- decode(input: BinaryReader | Uint8Array, length?: number): ListAIReferenceNamesResponse {
1116
+ decode(input: BinaryReader | Uint8Array, length?: number): ListAIProvidersResponse {
1033
1117
  const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
1034
1118
  const previousRecursionDepth = (reader as any).__tsProtoDecodeDepth ?? 0;
1035
1119
  if (previousRecursionDepth >= 100) {
@@ -1038,7 +1122,7 @@ export const ListAIReferenceNamesResponse: MessageFns<ListAIReferenceNamesRespon
1038
1122
  (reader as any).__tsProtoDecodeDepth = previousRecursionDepth + 1;
1039
1123
  try {
1040
1124
  const end = length === undefined ? reader.len : reader.pos + length;
1041
- const message = createBaseListAIReferenceNamesResponse();
1125
+ const message = createBaseListAIProvidersResponse();
1042
1126
  while (reader.pos < end) {
1043
1127
  const tag = reader.uint32();
1044
1128
  switch (tag >>> 3) {
@@ -1055,7 +1139,7 @@ export const ListAIReferenceNamesResponse: MessageFns<ListAIReferenceNamesRespon
1055
1139
  break;
1056
1140
  }
1057
1141
 
1058
- message.names.push(AIReferenceName.decode(reader, reader.uint32()));
1142
+ message.providers.push(AIReferenceName.decode(reader, reader.uint32()));
1059
1143
  continue;
1060
1144
  }
1061
1145
  }
@@ -1070,62 +1154,58 @@ export const ListAIReferenceNamesResponse: MessageFns<ListAIReferenceNamesRespon
1070
1154
  }
1071
1155
  },
1072
1156
 
1073
- fromJSON(object: any): ListAIReferenceNamesResponse {
1157
+ fromJSON(object: any): ListAIProvidersResponse {
1074
1158
  return {
1075
1159
  status: isSet(object.status) ? ResponseStatus.fromJSON(object.status) : undefined,
1076
- names: globalThis.Array.isArray(object?.names) ? object.names.map((e: any) => AIReferenceName.fromJSON(e)) : [],
1160
+ providers: globalThis.Array.isArray(object?.providers)
1161
+ ? object.providers.map((e: any) => AIReferenceName.fromJSON(e))
1162
+ : [],
1077
1163
  };
1078
1164
  },
1079
1165
 
1080
- toJSON(message: ListAIReferenceNamesResponse): unknown {
1166
+ toJSON(message: ListAIProvidersResponse): unknown {
1081
1167
  const obj: any = {};
1082
1168
  if (message.status !== undefined) {
1083
1169
  obj.status = ResponseStatus.toJSON(message.status);
1084
1170
  }
1085
- if (message.names?.length) {
1086
- obj.names = message.names.map((e) => AIReferenceName.toJSON(e));
1171
+ if (message.providers?.length) {
1172
+ obj.providers = message.providers.map((e) => AIReferenceName.toJSON(e));
1087
1173
  }
1088
1174
  return obj;
1089
1175
  },
1090
1176
 
1091
- create<I extends Exact<DeepPartial<ListAIReferenceNamesResponse>, I>>(base?: I): ListAIReferenceNamesResponse {
1092
- return ListAIReferenceNamesResponse.fromPartial(base ?? ({} as any));
1177
+ create<I extends Exact<DeepPartial<ListAIProvidersResponse>, I>>(base?: I): ListAIProvidersResponse {
1178
+ return ListAIProvidersResponse.fromPartial(base ?? ({} as any));
1093
1179
  },
1094
- fromPartial<I extends Exact<DeepPartial<ListAIReferenceNamesResponse>, I>>(object: I): ListAIReferenceNamesResponse {
1095
- const message = createBaseListAIReferenceNamesResponse();
1180
+ fromPartial<I extends Exact<DeepPartial<ListAIProvidersResponse>, I>>(object: I): ListAIProvidersResponse {
1181
+ const message = createBaseListAIProvidersResponse();
1096
1182
  message.status = (object.status !== undefined && object.status !== null)
1097
1183
  ? ResponseStatus.fromPartial(object.status)
1098
1184
  : undefined;
1099
- message.names = object.names?.map((e) => AIReferenceName.fromPartial(e)) || [];
1185
+ message.providers = object.providers?.map((e) => AIReferenceName.fromPartial(e)) || [];
1100
1186
  return message;
1101
1187
  },
1102
1188
  };
1103
1189
 
1104
- function createBaseAIReferenceName(): AIReferenceName {
1105
- return { name: "", displayName: "", sourceSystems: [], origin: 0, updatedAt: undefined };
1190
+ function createBaseListAIModelsRequest(): ListAIModelsRequest {
1191
+ return { organizationId: "", projectId: "", scope: 0 };
1106
1192
  }
1107
1193
 
1108
- export const AIReferenceName: MessageFns<AIReferenceName> = {
1109
- encode(message: AIReferenceName, writer: BinaryWriter = new BinaryWriter()): BinaryWriter {
1110
- if (message.name !== "") {
1111
- writer.uint32(10).string(message.name);
1112
- }
1113
- if (message.displayName !== "") {
1114
- writer.uint32(18).string(message.displayName);
1115
- }
1116
- for (const v of message.sourceSystems) {
1117
- writer.uint32(26).string(v!);
1194
+ export const ListAIModelsRequest: MessageFns<ListAIModelsRequest> = {
1195
+ encode(message: ListAIModelsRequest, writer: BinaryWriter = new BinaryWriter()): BinaryWriter {
1196
+ if (message.organizationId !== "") {
1197
+ writer.uint32(10).string(message.organizationId);
1118
1198
  }
1119
- if (message.origin !== 0) {
1120
- writer.uint32(32).int32(message.origin);
1199
+ if (message.projectId !== "") {
1200
+ writer.uint32(18).string(message.projectId);
1121
1201
  }
1122
- if (message.updatedAt !== undefined) {
1123
- Timestamp.encode(toTimestamp(message.updatedAt), writer.uint32(42).fork()).join();
1202
+ if (message.scope !== 0) {
1203
+ writer.uint32(24).int32(message.scope);
1124
1204
  }
1125
1205
  return writer;
1126
1206
  },
1127
1207
 
1128
- decode(input: BinaryReader | Uint8Array, length?: number): AIReferenceName {
1208
+ decode(input: BinaryReader | Uint8Array, length?: number): ListAIModelsRequest {
1129
1209
  const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
1130
1210
  const previousRecursionDepth = (reader as any).__tsProtoDecodeDepth ?? 0;
1131
1211
  if (previousRecursionDepth >= 100) {
@@ -1134,7 +1214,7 @@ export const AIReferenceName: MessageFns<AIReferenceName> = {
1134
1214
  (reader as any).__tsProtoDecodeDepth = previousRecursionDepth + 1;
1135
1215
  try {
1136
1216
  const end = length === undefined ? reader.len : reader.pos + length;
1137
- const message = createBaseAIReferenceName();
1217
+ const message = createBaseListAIModelsRequest();
1138
1218
  while (reader.pos < end) {
1139
1219
  const tag = reader.uint32();
1140
1220
  switch (tag >>> 3) {
@@ -1143,7 +1223,7 @@ export const AIReferenceName: MessageFns<AIReferenceName> = {
1143
1223
  break;
1144
1224
  }
1145
1225
 
1146
- message.name = reader.string();
1226
+ message.organizationId = reader.string();
1147
1227
  continue;
1148
1228
  }
1149
1229
  case 2: {
@@ -1151,31 +1231,15 @@ export const AIReferenceName: MessageFns<AIReferenceName> = {
1151
1231
  break;
1152
1232
  }
1153
1233
 
1154
- message.displayName = reader.string();
1234
+ message.projectId = reader.string();
1155
1235
  continue;
1156
1236
  }
1157
1237
  case 3: {
1158
- if (tag !== 26) {
1159
- break;
1160
- }
1161
-
1162
- message.sourceSystems.push(reader.string());
1163
- continue;
1164
- }
1165
- case 4: {
1166
- if (tag !== 32) {
1167
- break;
1168
- }
1169
-
1170
- message.origin = reader.int32() as any;
1171
- continue;
1172
- }
1173
- case 5: {
1174
- if (tag !== 42) {
1238
+ if (tag !== 24) {
1175
1239
  break;
1176
1240
  }
1177
1241
 
1178
- message.updatedAt = fromTimestamp(Timestamp.decode(reader, reader.uint32()));
1242
+ message.scope = reader.int32() as any;
1179
1243
  continue;
1180
1244
  }
1181
1245
  }
@@ -1190,72 +1254,64 @@ export const AIReferenceName: MessageFns<AIReferenceName> = {
1190
1254
  }
1191
1255
  },
1192
1256
 
1193
- fromJSON(object: any): AIReferenceName {
1257
+ fromJSON(object: any): ListAIModelsRequest {
1194
1258
  return {
1195
- name: isSet(object.name) ? globalThis.String(object.name) : "",
1196
- displayName: isSet(object.displayName)
1197
- ? globalThis.String(object.displayName)
1198
- : isSet(object.display_name)
1199
- ? globalThis.String(object.display_name)
1259
+ organizationId: isSet(object.organizationId)
1260
+ ? globalThis.String(object.organizationId)
1261
+ : isSet(object.organization_id)
1262
+ ? globalThis.String(object.organization_id)
1200
1263
  : "",
1201
- sourceSystems: globalThis.Array.isArray(object?.sourceSystems)
1202
- ? object.sourceSystems.map((e: any) => globalThis.String(e))
1203
- : globalThis.Array.isArray(object?.source_systems)
1204
- ? object.source_systems.map((e: any) => globalThis.String(e))
1205
- : [],
1206
- origin: isSet(object.origin) ? aIReferenceNameOriginFromJSON(object.origin) : 0,
1207
- updatedAt: isSet(object.updatedAt)
1208
- ? fromJsonTimestamp(object.updatedAt)
1209
- : isSet(object.updated_at)
1210
- ? fromJsonTimestamp(object.updated_at)
1211
- : undefined,
1264
+ projectId: isSet(object.projectId)
1265
+ ? globalThis.String(object.projectId)
1266
+ : isSet(object.project_id)
1267
+ ? globalThis.String(object.project_id)
1268
+ : "",
1269
+ scope: isSet(object.scope) ? aIReferenceNameScopeFromJSON(object.scope) : 0,
1212
1270
  };
1213
1271
  },
1214
1272
 
1215
- toJSON(message: AIReferenceName): unknown {
1273
+ toJSON(message: ListAIModelsRequest): unknown {
1216
1274
  const obj: any = {};
1217
- if (message.name !== "") {
1218
- obj.name = message.name;
1219
- }
1220
- if (message.displayName !== "") {
1221
- obj.displayName = message.displayName;
1222
- }
1223
- if (message.sourceSystems?.length) {
1224
- obj.sourceSystems = message.sourceSystems;
1275
+ if (message.organizationId !== "") {
1276
+ obj.organizationId = message.organizationId;
1225
1277
  }
1226
- if (message.origin !== 0) {
1227
- obj.origin = aIReferenceNameOriginToJSON(message.origin);
1278
+ if (message.projectId !== "") {
1279
+ obj.projectId = message.projectId;
1228
1280
  }
1229
- if (message.updatedAt !== undefined) {
1230
- obj.updatedAt = message.updatedAt.toISOString();
1281
+ if (message.scope !== 0) {
1282
+ obj.scope = aIReferenceNameScopeToJSON(message.scope);
1231
1283
  }
1232
1284
  return obj;
1233
1285
  },
1234
1286
 
1235
- create<I extends Exact<DeepPartial<AIReferenceName>, I>>(base?: I): AIReferenceName {
1236
- return AIReferenceName.fromPartial(base ?? ({} as any));
1287
+ create<I extends Exact<DeepPartial<ListAIModelsRequest>, I>>(base?: I): ListAIModelsRequest {
1288
+ return ListAIModelsRequest.fromPartial(base ?? ({} as any));
1237
1289
  },
1238
- fromPartial<I extends Exact<DeepPartial<AIReferenceName>, I>>(object: I): AIReferenceName {
1239
- const message = createBaseAIReferenceName();
1240
- message.name = object.name ?? "";
1241
- message.displayName = object.displayName ?? "";
1242
- message.sourceSystems = object.sourceSystems?.map((e) => e) || [];
1243
- message.origin = object.origin ?? 0;
1244
- message.updatedAt = object.updatedAt ?? undefined;
1290
+ fromPartial<I extends Exact<DeepPartial<ListAIModelsRequest>, I>>(object: I): ListAIModelsRequest {
1291
+ const message = createBaseListAIModelsRequest();
1292
+ message.organizationId = object.organizationId ?? "";
1293
+ message.projectId = object.projectId ?? "";
1294
+ message.scope = object.scope ?? 0;
1245
1295
  return message;
1246
1296
  },
1247
1297
  };
1248
1298
 
1249
- function createBaseListAllAIReferenceNamesRequest(): ListAllAIReferenceNamesRequest {
1250
- return {};
1299
+ function createBaseListAIModelsResponse(): ListAIModelsResponse {
1300
+ return { status: undefined, models: [] };
1251
1301
  }
1252
1302
 
1253
- export const ListAllAIReferenceNamesRequest: MessageFns<ListAllAIReferenceNamesRequest> = {
1254
- encode(_: ListAllAIReferenceNamesRequest, writer: BinaryWriter = new BinaryWriter()): BinaryWriter {
1303
+ export const ListAIModelsResponse: MessageFns<ListAIModelsResponse> = {
1304
+ encode(message: ListAIModelsResponse, writer: BinaryWriter = new BinaryWriter()): BinaryWriter {
1305
+ if (message.status !== undefined) {
1306
+ ResponseStatus.encode(message.status, writer.uint32(10).fork()).join();
1307
+ }
1308
+ for (const v of message.models) {
1309
+ AIReferenceName.encode(v!, writer.uint32(18).fork()).join();
1310
+ }
1255
1311
  return writer;
1256
1312
  },
1257
1313
 
1258
- decode(input: BinaryReader | Uint8Array, length?: number): ListAllAIReferenceNamesRequest {
1314
+ decode(input: BinaryReader | Uint8Array, length?: number): ListAIModelsResponse {
1259
1315
  const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
1260
1316
  const previousRecursionDepth = (reader as any).__tsProtoDecodeDepth ?? 0;
1261
1317
  if (previousRecursionDepth >= 100) {
@@ -1264,10 +1320,26 @@ export const ListAllAIReferenceNamesRequest: MessageFns<ListAllAIReferenceNamesR
1264
1320
  (reader as any).__tsProtoDecodeDepth = previousRecursionDepth + 1;
1265
1321
  try {
1266
1322
  const end = length === undefined ? reader.len : reader.pos + length;
1267
- const message = createBaseListAllAIReferenceNamesRequest();
1323
+ const message = createBaseListAIModelsResponse();
1268
1324
  while (reader.pos < end) {
1269
1325
  const tag = reader.uint32();
1270
1326
  switch (tag >>> 3) {
1327
+ case 1: {
1328
+ if (tag !== 10) {
1329
+ break;
1330
+ }
1331
+
1332
+ message.status = ResponseStatus.decode(reader, reader.uint32());
1333
+ continue;
1334
+ }
1335
+ case 2: {
1336
+ if (tag !== 18) {
1337
+ break;
1338
+ }
1339
+
1340
+ message.models.push(AIReferenceName.decode(reader, reader.uint32()));
1341
+ continue;
1342
+ }
1271
1343
  }
1272
1344
  if ((tag & 7) === 4 || tag === 0) {
1273
1345
  break;
@@ -1280,40 +1352,58 @@ export const ListAllAIReferenceNamesRequest: MessageFns<ListAllAIReferenceNamesR
1280
1352
  }
1281
1353
  },
1282
1354
 
1283
- fromJSON(_: any): ListAllAIReferenceNamesRequest {
1284
- return {};
1355
+ fromJSON(object: any): ListAIModelsResponse {
1356
+ return {
1357
+ status: isSet(object.status) ? ResponseStatus.fromJSON(object.status) : undefined,
1358
+ models: globalThis.Array.isArray(object?.models)
1359
+ ? object.models.map((e: any) => AIReferenceName.fromJSON(e))
1360
+ : [],
1361
+ };
1285
1362
  },
1286
1363
 
1287
- toJSON(_: ListAllAIReferenceNamesRequest): unknown {
1364
+ toJSON(message: ListAIModelsResponse): unknown {
1288
1365
  const obj: any = {};
1366
+ if (message.status !== undefined) {
1367
+ obj.status = ResponseStatus.toJSON(message.status);
1368
+ }
1369
+ if (message.models?.length) {
1370
+ obj.models = message.models.map((e) => AIReferenceName.toJSON(e));
1371
+ }
1289
1372
  return obj;
1290
1373
  },
1291
1374
 
1292
- create<I extends Exact<DeepPartial<ListAllAIReferenceNamesRequest>, I>>(base?: I): ListAllAIReferenceNamesRequest {
1293
- return ListAllAIReferenceNamesRequest.fromPartial(base ?? ({} as any));
1375
+ create<I extends Exact<DeepPartial<ListAIModelsResponse>, I>>(base?: I): ListAIModelsResponse {
1376
+ return ListAIModelsResponse.fromPartial(base ?? ({} as any));
1294
1377
  },
1295
- fromPartial<I extends Exact<DeepPartial<ListAllAIReferenceNamesRequest>, I>>(_: I): ListAllAIReferenceNamesRequest {
1296
- const message = createBaseListAllAIReferenceNamesRequest();
1378
+ fromPartial<I extends Exact<DeepPartial<ListAIModelsResponse>, I>>(object: I): ListAIModelsResponse {
1379
+ const message = createBaseListAIModelsResponse();
1380
+ message.status = (object.status !== undefined && object.status !== null)
1381
+ ? ResponseStatus.fromPartial(object.status)
1382
+ : undefined;
1383
+ message.models = object.models?.map((e) => AIReferenceName.fromPartial(e)) || [];
1297
1384
  return message;
1298
1385
  },
1299
1386
  };
1300
1387
 
1301
- function createBaseUpdateAIReferenceNameRequest(): UpdateAIReferenceNameRequest {
1302
- return { name: "", displayName: "" };
1388
+ function createBaseListAIEffortsRequest(): ListAIEffortsRequest {
1389
+ return { organizationId: "", projectId: "", scope: 0 };
1303
1390
  }
1304
1391
 
1305
- export const UpdateAIReferenceNameRequest: MessageFns<UpdateAIReferenceNameRequest> = {
1306
- encode(message: UpdateAIReferenceNameRequest, writer: BinaryWriter = new BinaryWriter()): BinaryWriter {
1307
- if (message.name !== "") {
1308
- writer.uint32(10).string(message.name);
1392
+ export const ListAIEffortsRequest: MessageFns<ListAIEffortsRequest> = {
1393
+ encode(message: ListAIEffortsRequest, writer: BinaryWriter = new BinaryWriter()): BinaryWriter {
1394
+ if (message.organizationId !== "") {
1395
+ writer.uint32(10).string(message.organizationId);
1309
1396
  }
1310
- if (message.displayName !== "") {
1311
- writer.uint32(18).string(message.displayName);
1397
+ if (message.projectId !== "") {
1398
+ writer.uint32(18).string(message.projectId);
1399
+ }
1400
+ if (message.scope !== 0) {
1401
+ writer.uint32(24).int32(message.scope);
1312
1402
  }
1313
1403
  return writer;
1314
1404
  },
1315
1405
 
1316
- decode(input: BinaryReader | Uint8Array, length?: number): UpdateAIReferenceNameRequest {
1406
+ decode(input: BinaryReader | Uint8Array, length?: number): ListAIEffortsRequest {
1317
1407
  const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
1318
1408
  const previousRecursionDepth = (reader as any).__tsProtoDecodeDepth ?? 0;
1319
1409
  if (previousRecursionDepth >= 100) {
@@ -1322,7 +1412,7 @@ export const UpdateAIReferenceNameRequest: MessageFns<UpdateAIReferenceNameReque
1322
1412
  (reader as any).__tsProtoDecodeDepth = previousRecursionDepth + 1;
1323
1413
  try {
1324
1414
  const end = length === undefined ? reader.len : reader.pos + length;
1325
- const message = createBaseUpdateAIReferenceNameRequest();
1415
+ const message = createBaseListAIEffortsRequest();
1326
1416
  while (reader.pos < end) {
1327
1417
  const tag = reader.uint32();
1328
1418
  switch (tag >>> 3) {
@@ -1331,7 +1421,7 @@ export const UpdateAIReferenceNameRequest: MessageFns<UpdateAIReferenceNameReque
1331
1421
  break;
1332
1422
  }
1333
1423
 
1334
- message.name = reader.string();
1424
+ message.organizationId = reader.string();
1335
1425
  continue;
1336
1426
  }
1337
1427
  case 2: {
@@ -1339,7 +1429,15 @@ export const UpdateAIReferenceNameRequest: MessageFns<UpdateAIReferenceNameReque
1339
1429
  break;
1340
1430
  }
1341
1431
 
1342
- message.displayName = reader.string();
1432
+ message.projectId = reader.string();
1433
+ continue;
1434
+ }
1435
+ case 3: {
1436
+ if (tag !== 24) {
1437
+ break;
1438
+ }
1439
+
1440
+ message.scope = reader.int32() as any;
1343
1441
  continue;
1344
1442
  }
1345
1443
  }
@@ -1354,55 +1452,64 @@ export const UpdateAIReferenceNameRequest: MessageFns<UpdateAIReferenceNameReque
1354
1452
  }
1355
1453
  },
1356
1454
 
1357
- fromJSON(object: any): UpdateAIReferenceNameRequest {
1455
+ fromJSON(object: any): ListAIEffortsRequest {
1358
1456
  return {
1359
- name: isSet(object.name) ? globalThis.String(object.name) : "",
1360
- displayName: isSet(object.displayName)
1361
- ? globalThis.String(object.displayName)
1362
- : isSet(object.display_name)
1363
- ? globalThis.String(object.display_name)
1457
+ organizationId: isSet(object.organizationId)
1458
+ ? globalThis.String(object.organizationId)
1459
+ : isSet(object.organization_id)
1460
+ ? globalThis.String(object.organization_id)
1461
+ : "",
1462
+ projectId: isSet(object.projectId)
1463
+ ? globalThis.String(object.projectId)
1464
+ : isSet(object.project_id)
1465
+ ? globalThis.String(object.project_id)
1364
1466
  : "",
1467
+ scope: isSet(object.scope) ? aIReferenceNameScopeFromJSON(object.scope) : 0,
1365
1468
  };
1366
1469
  },
1367
1470
 
1368
- toJSON(message: UpdateAIReferenceNameRequest): unknown {
1471
+ toJSON(message: ListAIEffortsRequest): unknown {
1369
1472
  const obj: any = {};
1370
- if (message.name !== "") {
1371
- obj.name = message.name;
1473
+ if (message.organizationId !== "") {
1474
+ obj.organizationId = message.organizationId;
1372
1475
  }
1373
- if (message.displayName !== "") {
1374
- obj.displayName = message.displayName;
1476
+ if (message.projectId !== "") {
1477
+ obj.projectId = message.projectId;
1478
+ }
1479
+ if (message.scope !== 0) {
1480
+ obj.scope = aIReferenceNameScopeToJSON(message.scope);
1375
1481
  }
1376
1482
  return obj;
1377
1483
  },
1378
1484
 
1379
- create<I extends Exact<DeepPartial<UpdateAIReferenceNameRequest>, I>>(base?: I): UpdateAIReferenceNameRequest {
1380
- return UpdateAIReferenceNameRequest.fromPartial(base ?? ({} as any));
1485
+ create<I extends Exact<DeepPartial<ListAIEffortsRequest>, I>>(base?: I): ListAIEffortsRequest {
1486
+ return ListAIEffortsRequest.fromPartial(base ?? ({} as any));
1381
1487
  },
1382
- fromPartial<I extends Exact<DeepPartial<UpdateAIReferenceNameRequest>, I>>(object: I): UpdateAIReferenceNameRequest {
1383
- const message = createBaseUpdateAIReferenceNameRequest();
1384
- message.name = object.name ?? "";
1385
- message.displayName = object.displayName ?? "";
1488
+ fromPartial<I extends Exact<DeepPartial<ListAIEffortsRequest>, I>>(object: I): ListAIEffortsRequest {
1489
+ const message = createBaseListAIEffortsRequest();
1490
+ message.organizationId = object.organizationId ?? "";
1491
+ message.projectId = object.projectId ?? "";
1492
+ message.scope = object.scope ?? 0;
1386
1493
  return message;
1387
1494
  },
1388
1495
  };
1389
1496
 
1390
- function createBaseUpdateAIReferenceNameResponse(): UpdateAIReferenceNameResponse {
1391
- return { status: undefined, name: undefined };
1497
+ function createBaseListAIEffortsResponse(): ListAIEffortsResponse {
1498
+ return { status: undefined, efforts: [] };
1392
1499
  }
1393
1500
 
1394
- export const UpdateAIReferenceNameResponse: MessageFns<UpdateAIReferenceNameResponse> = {
1395
- encode(message: UpdateAIReferenceNameResponse, writer: BinaryWriter = new BinaryWriter()): BinaryWriter {
1501
+ export const ListAIEffortsResponse: MessageFns<ListAIEffortsResponse> = {
1502
+ encode(message: ListAIEffortsResponse, writer: BinaryWriter = new BinaryWriter()): BinaryWriter {
1396
1503
  if (message.status !== undefined) {
1397
1504
  ResponseStatus.encode(message.status, writer.uint32(10).fork()).join();
1398
1505
  }
1399
- if (message.name !== undefined) {
1400
- AIReferenceName.encode(message.name, writer.uint32(18).fork()).join();
1506
+ for (const v of message.efforts) {
1507
+ AIReferenceName.encode(v!, writer.uint32(18).fork()).join();
1401
1508
  }
1402
1509
  return writer;
1403
1510
  },
1404
1511
 
1405
- decode(input: BinaryReader | Uint8Array, length?: number): UpdateAIReferenceNameResponse {
1512
+ decode(input: BinaryReader | Uint8Array, length?: number): ListAIEffortsResponse {
1406
1513
  const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
1407
1514
  const previousRecursionDepth = (reader as any).__tsProtoDecodeDepth ?? 0;
1408
1515
  if (previousRecursionDepth >= 100) {
@@ -1411,7 +1518,7 @@ export const UpdateAIReferenceNameResponse: MessageFns<UpdateAIReferenceNameResp
1411
1518
  (reader as any).__tsProtoDecodeDepth = previousRecursionDepth + 1;
1412
1519
  try {
1413
1520
  const end = length === undefined ? reader.len : reader.pos + length;
1414
- const message = createBaseUpdateAIReferenceNameResponse();
1521
+ const message = createBaseListAIEffortsResponse();
1415
1522
  while (reader.pos < end) {
1416
1523
  const tag = reader.uint32();
1417
1524
  switch (tag >>> 3) {
@@ -1428,7 +1535,7 @@ export const UpdateAIReferenceNameResponse: MessageFns<UpdateAIReferenceNameResp
1428
1535
  break;
1429
1536
  }
1430
1537
 
1431
- message.name = AIReferenceName.decode(reader, reader.uint32());
1538
+ message.efforts.push(AIReferenceName.decode(reader, reader.uint32()));
1432
1539
  continue;
1433
1540
  }
1434
1541
  }
@@ -1443,58 +1550,412 @@ export const UpdateAIReferenceNameResponse: MessageFns<UpdateAIReferenceNameResp
1443
1550
  }
1444
1551
  },
1445
1552
 
1446
- fromJSON(object: any): UpdateAIReferenceNameResponse {
1553
+ fromJSON(object: any): ListAIEffortsResponse {
1447
1554
  return {
1448
1555
  status: isSet(object.status) ? ResponseStatus.fromJSON(object.status) : undefined,
1449
- name: isSet(object.name) ? AIReferenceName.fromJSON(object.name) : undefined,
1556
+ efforts: globalThis.Array.isArray(object?.efforts)
1557
+ ? object.efforts.map((e: any) => AIReferenceName.fromJSON(e))
1558
+ : [],
1450
1559
  };
1451
1560
  },
1452
1561
 
1453
- toJSON(message: UpdateAIReferenceNameResponse): unknown {
1562
+ toJSON(message: ListAIEffortsResponse): unknown {
1454
1563
  const obj: any = {};
1455
1564
  if (message.status !== undefined) {
1456
1565
  obj.status = ResponseStatus.toJSON(message.status);
1457
1566
  }
1458
- if (message.name !== undefined) {
1459
- obj.name = AIReferenceName.toJSON(message.name);
1567
+ if (message.efforts?.length) {
1568
+ obj.efforts = message.efforts.map((e) => AIReferenceName.toJSON(e));
1460
1569
  }
1461
1570
  return obj;
1462
1571
  },
1463
1572
 
1464
- create<I extends Exact<DeepPartial<UpdateAIReferenceNameResponse>, I>>(base?: I): UpdateAIReferenceNameResponse {
1465
- return UpdateAIReferenceNameResponse.fromPartial(base ?? ({} as any));
1573
+ create<I extends Exact<DeepPartial<ListAIEffortsResponse>, I>>(base?: I): ListAIEffortsResponse {
1574
+ return ListAIEffortsResponse.fromPartial(base ?? ({} as any));
1466
1575
  },
1467
- fromPartial<I extends Exact<DeepPartial<UpdateAIReferenceNameResponse>, I>>(
1468
- object: I,
1469
- ): UpdateAIReferenceNameResponse {
1470
- const message = createBaseUpdateAIReferenceNameResponse();
1576
+ fromPartial<I extends Exact<DeepPartial<ListAIEffortsResponse>, I>>(object: I): ListAIEffortsResponse {
1577
+ const message = createBaseListAIEffortsResponse();
1471
1578
  message.status = (object.status !== undefined && object.status !== null)
1472
1579
  ? ResponseStatus.fromPartial(object.status)
1473
1580
  : undefined;
1474
- message.name = (object.name !== undefined && object.name !== null)
1475
- ? AIReferenceName.fromPartial(object.name)
1476
- : undefined;
1581
+ message.efforts = object.efforts?.map((e) => AIReferenceName.fromPartial(e)) || [];
1582
+ return message;
1583
+ },
1584
+ };
1585
+
1586
+ function createBaseListAIBillersRequest(): ListAIBillersRequest {
1587
+ return { organizationId: "", projectId: "", scope: 0 };
1588
+ }
1589
+
1590
+ export const ListAIBillersRequest: MessageFns<ListAIBillersRequest> = {
1591
+ encode(message: ListAIBillersRequest, writer: BinaryWriter = new BinaryWriter()): BinaryWriter {
1592
+ if (message.organizationId !== "") {
1593
+ writer.uint32(10).string(message.organizationId);
1594
+ }
1595
+ if (message.projectId !== "") {
1596
+ writer.uint32(18).string(message.projectId);
1597
+ }
1598
+ if (message.scope !== 0) {
1599
+ writer.uint32(24).int32(message.scope);
1600
+ }
1601
+ return writer;
1602
+ },
1603
+
1604
+ decode(input: BinaryReader | Uint8Array, length?: number): ListAIBillersRequest {
1605
+ const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
1606
+ const previousRecursionDepth = (reader as any).__tsProtoDecodeDepth ?? 0;
1607
+ if (previousRecursionDepth >= 100) {
1608
+ throw new globalThis.Error("protobuf decode recursion limit exceeded");
1609
+ }
1610
+ (reader as any).__tsProtoDecodeDepth = previousRecursionDepth + 1;
1611
+ try {
1612
+ const end = length === undefined ? reader.len : reader.pos + length;
1613
+ const message = createBaseListAIBillersRequest();
1614
+ while (reader.pos < end) {
1615
+ const tag = reader.uint32();
1616
+ switch (tag >>> 3) {
1617
+ case 1: {
1618
+ if (tag !== 10) {
1619
+ break;
1620
+ }
1621
+
1622
+ message.organizationId = reader.string();
1623
+ continue;
1624
+ }
1625
+ case 2: {
1626
+ if (tag !== 18) {
1627
+ break;
1628
+ }
1629
+
1630
+ message.projectId = reader.string();
1631
+ continue;
1632
+ }
1633
+ case 3: {
1634
+ if (tag !== 24) {
1635
+ break;
1636
+ }
1637
+
1638
+ message.scope = reader.int32() as any;
1639
+ continue;
1640
+ }
1641
+ }
1642
+ if ((tag & 7) === 4 || tag === 0) {
1643
+ break;
1644
+ }
1645
+ reader.skip(tag & 7);
1646
+ }
1647
+ return message;
1648
+ } finally {
1649
+ (reader as any).__tsProtoDecodeDepth = previousRecursionDepth;
1650
+ }
1651
+ },
1652
+
1653
+ fromJSON(object: any): ListAIBillersRequest {
1654
+ return {
1655
+ organizationId: isSet(object.organizationId)
1656
+ ? globalThis.String(object.organizationId)
1657
+ : isSet(object.organization_id)
1658
+ ? globalThis.String(object.organization_id)
1659
+ : "",
1660
+ projectId: isSet(object.projectId)
1661
+ ? globalThis.String(object.projectId)
1662
+ : isSet(object.project_id)
1663
+ ? globalThis.String(object.project_id)
1664
+ : "",
1665
+ scope: isSet(object.scope) ? aIReferenceNameScopeFromJSON(object.scope) : 0,
1666
+ };
1667
+ },
1668
+
1669
+ toJSON(message: ListAIBillersRequest): unknown {
1670
+ const obj: any = {};
1671
+ if (message.organizationId !== "") {
1672
+ obj.organizationId = message.organizationId;
1673
+ }
1674
+ if (message.projectId !== "") {
1675
+ obj.projectId = message.projectId;
1676
+ }
1677
+ if (message.scope !== 0) {
1678
+ obj.scope = aIReferenceNameScopeToJSON(message.scope);
1679
+ }
1680
+ return obj;
1681
+ },
1682
+
1683
+ create<I extends Exact<DeepPartial<ListAIBillersRequest>, I>>(base?: I): ListAIBillersRequest {
1684
+ return ListAIBillersRequest.fromPartial(base ?? ({} as any));
1685
+ },
1686
+ fromPartial<I extends Exact<DeepPartial<ListAIBillersRequest>, I>>(object: I): ListAIBillersRequest {
1687
+ const message = createBaseListAIBillersRequest();
1688
+ message.organizationId = object.organizationId ?? "";
1689
+ message.projectId = object.projectId ?? "";
1690
+ message.scope = object.scope ?? 0;
1691
+ return message;
1692
+ },
1693
+ };
1694
+
1695
+ function createBaseListAIBillersResponse(): ListAIBillersResponse {
1696
+ return { status: undefined, billers: [] };
1697
+ }
1698
+
1699
+ export const ListAIBillersResponse: MessageFns<ListAIBillersResponse> = {
1700
+ encode(message: ListAIBillersResponse, writer: BinaryWriter = new BinaryWriter()): BinaryWriter {
1701
+ if (message.status !== undefined) {
1702
+ ResponseStatus.encode(message.status, writer.uint32(10).fork()).join();
1703
+ }
1704
+ for (const v of message.billers) {
1705
+ AIReferenceName.encode(v!, writer.uint32(18).fork()).join();
1706
+ }
1707
+ return writer;
1708
+ },
1709
+
1710
+ decode(input: BinaryReader | Uint8Array, length?: number): ListAIBillersResponse {
1711
+ const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
1712
+ const previousRecursionDepth = (reader as any).__tsProtoDecodeDepth ?? 0;
1713
+ if (previousRecursionDepth >= 100) {
1714
+ throw new globalThis.Error("protobuf decode recursion limit exceeded");
1715
+ }
1716
+ (reader as any).__tsProtoDecodeDepth = previousRecursionDepth + 1;
1717
+ try {
1718
+ const end = length === undefined ? reader.len : reader.pos + length;
1719
+ const message = createBaseListAIBillersResponse();
1720
+ while (reader.pos < end) {
1721
+ const tag = reader.uint32();
1722
+ switch (tag >>> 3) {
1723
+ case 1: {
1724
+ if (tag !== 10) {
1725
+ break;
1726
+ }
1727
+
1728
+ message.status = ResponseStatus.decode(reader, reader.uint32());
1729
+ continue;
1730
+ }
1731
+ case 2: {
1732
+ if (tag !== 18) {
1733
+ break;
1734
+ }
1735
+
1736
+ message.billers.push(AIReferenceName.decode(reader, reader.uint32()));
1737
+ continue;
1738
+ }
1739
+ }
1740
+ if ((tag & 7) === 4 || tag === 0) {
1741
+ break;
1742
+ }
1743
+ reader.skip(tag & 7);
1744
+ }
1745
+ return message;
1746
+ } finally {
1747
+ (reader as any).__tsProtoDecodeDepth = previousRecursionDepth;
1748
+ }
1749
+ },
1750
+
1751
+ fromJSON(object: any): ListAIBillersResponse {
1752
+ return {
1753
+ status: isSet(object.status) ? ResponseStatus.fromJSON(object.status) : undefined,
1754
+ billers: globalThis.Array.isArray(object?.billers)
1755
+ ? object.billers.map((e: any) => AIReferenceName.fromJSON(e))
1756
+ : [],
1757
+ };
1758
+ },
1759
+
1760
+ toJSON(message: ListAIBillersResponse): unknown {
1761
+ const obj: any = {};
1762
+ if (message.status !== undefined) {
1763
+ obj.status = ResponseStatus.toJSON(message.status);
1764
+ }
1765
+ if (message.billers?.length) {
1766
+ obj.billers = message.billers.map((e) => AIReferenceName.toJSON(e));
1767
+ }
1768
+ return obj;
1769
+ },
1770
+
1771
+ create<I extends Exact<DeepPartial<ListAIBillersResponse>, I>>(base?: I): ListAIBillersResponse {
1772
+ return ListAIBillersResponse.fromPartial(base ?? ({} as any));
1773
+ },
1774
+ fromPartial<I extends Exact<DeepPartial<ListAIBillersResponse>, I>>(object: I): ListAIBillersResponse {
1775
+ const message = createBaseListAIBillersResponse();
1776
+ message.status = (object.status !== undefined && object.status !== null)
1777
+ ? ResponseStatus.fromPartial(object.status)
1778
+ : undefined;
1779
+ message.billers = object.billers?.map((e) => AIReferenceName.fromPartial(e)) || [];
1780
+ return message;
1781
+ },
1782
+ };
1783
+
1784
+ function createBaseAIReferenceName(): AIReferenceName {
1785
+ return { name: "", displayName: "", sourceSystems: [], origin: 0, updatedAt: undefined, observed: false };
1786
+ }
1787
+
1788
+ export const AIReferenceName: MessageFns<AIReferenceName> = {
1789
+ encode(message: AIReferenceName, writer: BinaryWriter = new BinaryWriter()): BinaryWriter {
1790
+ if (message.name !== "") {
1791
+ writer.uint32(10).string(message.name);
1792
+ }
1793
+ if (message.displayName !== "") {
1794
+ writer.uint32(18).string(message.displayName);
1795
+ }
1796
+ for (const v of message.sourceSystems) {
1797
+ writer.uint32(26).string(v!);
1798
+ }
1799
+ if (message.origin !== 0) {
1800
+ writer.uint32(32).int32(message.origin);
1801
+ }
1802
+ if (message.updatedAt !== undefined) {
1803
+ Timestamp.encode(toTimestamp(message.updatedAt), writer.uint32(42).fork()).join();
1804
+ }
1805
+ if (message.observed !== false) {
1806
+ writer.uint32(48).bool(message.observed);
1807
+ }
1808
+ return writer;
1809
+ },
1810
+
1811
+ decode(input: BinaryReader | Uint8Array, length?: number): AIReferenceName {
1812
+ const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
1813
+ const previousRecursionDepth = (reader as any).__tsProtoDecodeDepth ?? 0;
1814
+ if (previousRecursionDepth >= 100) {
1815
+ throw new globalThis.Error("protobuf decode recursion limit exceeded");
1816
+ }
1817
+ (reader as any).__tsProtoDecodeDepth = previousRecursionDepth + 1;
1818
+ try {
1819
+ const end = length === undefined ? reader.len : reader.pos + length;
1820
+ const message = createBaseAIReferenceName();
1821
+ while (reader.pos < end) {
1822
+ const tag = reader.uint32();
1823
+ switch (tag >>> 3) {
1824
+ case 1: {
1825
+ if (tag !== 10) {
1826
+ break;
1827
+ }
1828
+
1829
+ message.name = reader.string();
1830
+ continue;
1831
+ }
1832
+ case 2: {
1833
+ if (tag !== 18) {
1834
+ break;
1835
+ }
1836
+
1837
+ message.displayName = reader.string();
1838
+ continue;
1839
+ }
1840
+ case 3: {
1841
+ if (tag !== 26) {
1842
+ break;
1843
+ }
1844
+
1845
+ message.sourceSystems.push(reader.string());
1846
+ continue;
1847
+ }
1848
+ case 4: {
1849
+ if (tag !== 32) {
1850
+ break;
1851
+ }
1852
+
1853
+ message.origin = reader.int32() as any;
1854
+ continue;
1855
+ }
1856
+ case 5: {
1857
+ if (tag !== 42) {
1858
+ break;
1859
+ }
1860
+
1861
+ message.updatedAt = fromTimestamp(Timestamp.decode(reader, reader.uint32()));
1862
+ continue;
1863
+ }
1864
+ case 6: {
1865
+ if (tag !== 48) {
1866
+ break;
1867
+ }
1868
+
1869
+ message.observed = reader.bool();
1870
+ continue;
1871
+ }
1872
+ }
1873
+ if ((tag & 7) === 4 || tag === 0) {
1874
+ break;
1875
+ }
1876
+ reader.skip(tag & 7);
1877
+ }
1878
+ return message;
1879
+ } finally {
1880
+ (reader as any).__tsProtoDecodeDepth = previousRecursionDepth;
1881
+ }
1882
+ },
1883
+
1884
+ fromJSON(object: any): AIReferenceName {
1885
+ return {
1886
+ name: isSet(object.name) ? globalThis.String(object.name) : "",
1887
+ displayName: isSet(object.displayName)
1888
+ ? globalThis.String(object.displayName)
1889
+ : isSet(object.display_name)
1890
+ ? globalThis.String(object.display_name)
1891
+ : "",
1892
+ sourceSystems: globalThis.Array.isArray(object?.sourceSystems)
1893
+ ? object.sourceSystems.map((e: any) => globalThis.String(e))
1894
+ : globalThis.Array.isArray(object?.source_systems)
1895
+ ? object.source_systems.map((e: any) => globalThis.String(e))
1896
+ : [],
1897
+ origin: isSet(object.origin) ? aIReferenceNameOriginFromJSON(object.origin) : 0,
1898
+ updatedAt: isSet(object.updatedAt)
1899
+ ? fromJsonTimestamp(object.updatedAt)
1900
+ : isSet(object.updated_at)
1901
+ ? fromJsonTimestamp(object.updated_at)
1902
+ : undefined,
1903
+ observed: isSet(object.observed) ? globalThis.Boolean(object.observed) : false,
1904
+ };
1905
+ },
1906
+
1907
+ toJSON(message: AIReferenceName): unknown {
1908
+ const obj: any = {};
1909
+ if (message.name !== "") {
1910
+ obj.name = message.name;
1911
+ }
1912
+ if (message.displayName !== "") {
1913
+ obj.displayName = message.displayName;
1914
+ }
1915
+ if (message.sourceSystems?.length) {
1916
+ obj.sourceSystems = message.sourceSystems;
1917
+ }
1918
+ if (message.origin !== 0) {
1919
+ obj.origin = aIReferenceNameOriginToJSON(message.origin);
1920
+ }
1921
+ if (message.updatedAt !== undefined) {
1922
+ obj.updatedAt = message.updatedAt.toISOString();
1923
+ }
1924
+ if (message.observed !== false) {
1925
+ obj.observed = message.observed;
1926
+ }
1927
+ return obj;
1928
+ },
1929
+
1930
+ create<I extends Exact<DeepPartial<AIReferenceName>, I>>(base?: I): AIReferenceName {
1931
+ return AIReferenceName.fromPartial(base ?? ({} as any));
1932
+ },
1933
+ fromPartial<I extends Exact<DeepPartial<AIReferenceName>, I>>(object: I): AIReferenceName {
1934
+ const message = createBaseAIReferenceName();
1935
+ message.name = object.name ?? "";
1936
+ message.displayName = object.displayName ?? "";
1937
+ message.sourceSystems = object.sourceSystems?.map((e) => e) || [];
1938
+ message.origin = object.origin ?? 0;
1939
+ message.updatedAt = object.updatedAt ?? undefined;
1940
+ message.observed = object.observed ?? false;
1477
1941
  return message;
1478
1942
  },
1479
1943
  };
1480
1944
 
1481
1945
  /**
1482
1946
  * ReferenceGatewayService is the frontend-facing surface for the AI reference data an org reads: its
1483
- * principals (writes org-admin only) and the provider / model / effort / billing-party display names. The
1947
+ * principals (writes org-admin only) and the provider / model / effort / biller display names. The
1484
1948
  * name tables are global: each List returns the names the org's own telemetry reported, mapped through
1485
- * them; Mirador staff edit them through AdminGatewayService. It proxies telemetry.api.v1.AIReferenceService.
1949
+ * them (scope ALL: every recorded name); Mirador staff edit them through AdminGatewayService. It proxies telemetry.api.v1.AIReferenceService.
1486
1950
  */
1487
1951
  export interface ReferenceGatewayService {
1488
1952
  ListPrincipals(request: ListPrincipalsRequest, metadata?: Metadata): Promise<ListPrincipalsResponse>;
1489
1953
  UpdatePrincipal(request: UpdatePrincipalRequest, metadata?: Metadata): Promise<UpdatePrincipalResponse>;
1490
- /** Every stored name of the table has an entry, recorded or not. */
1491
- ListAIProviders(request: ListAIReferenceNamesRequest, metadata?: Metadata): Promise<ListAIReferenceNamesResponse>;
1492
- ListAIModels(request: ListAIReferenceNamesRequest, metadata?: Metadata): Promise<ListAIReferenceNamesResponse>;
1493
- ListAIEfforts(request: ListAIReferenceNamesRequest, metadata?: Metadata): Promise<ListAIReferenceNamesResponse>;
1494
- ListAIBillingParties(
1495
- request: ListAIReferenceNamesRequest,
1496
- metadata?: Metadata,
1497
- ): Promise<ListAIReferenceNamesResponse>;
1954
+ /** Any org member reads the name tables. Every stored name of the table has an entry, recorded or not. */
1955
+ ListAIProviders(request: ListAIProvidersRequest, metadata?: Metadata): Promise<ListAIProvidersResponse>;
1956
+ ListAIModels(request: ListAIModelsRequest, metadata?: Metadata): Promise<ListAIModelsResponse>;
1957
+ ListAIEfforts(request: ListAIEffortsRequest, metadata?: Metadata): Promise<ListAIEffortsResponse>;
1958
+ ListAIBillers(request: ListAIBillersRequest, metadata?: Metadata): Promise<ListAIBillersResponse>;
1498
1959
  }
1499
1960
 
1500
1961
  export const ReferenceGatewayServiceServiceName = "gateway.web.v1.ReferenceGatewayService";
@@ -1509,7 +1970,7 @@ export class ReferenceGatewayServiceClientImpl implements ReferenceGatewayServic
1509
1970
  this.ListAIProviders = this.ListAIProviders.bind(this);
1510
1971
  this.ListAIModels = this.ListAIModels.bind(this);
1511
1972
  this.ListAIEfforts = this.ListAIEfforts.bind(this);
1512
- this.ListAIBillingParties = this.ListAIBillingParties.bind(this);
1973
+ this.ListAIBillers = this.ListAIBillers.bind(this);
1513
1974
  }
1514
1975
  ListPrincipals(request: ListPrincipalsRequest, metadata?: Metadata): Promise<ListPrincipalsResponse> {
1515
1976
  const data = ListPrincipalsRequest.encode(request).finish();
@@ -1523,31 +1984,28 @@ export class ReferenceGatewayServiceClientImpl implements ReferenceGatewayServic
1523
1984
  return promise.then((data) => UpdatePrincipalResponse.decode(new BinaryReader(data)));
1524
1985
  }
1525
1986
 
1526
- ListAIProviders(request: ListAIReferenceNamesRequest, metadata?: Metadata): Promise<ListAIReferenceNamesResponse> {
1527
- const data = ListAIReferenceNamesRequest.encode(request).finish();
1987
+ ListAIProviders(request: ListAIProvidersRequest, metadata?: Metadata): Promise<ListAIProvidersResponse> {
1988
+ const data = ListAIProvidersRequest.encode(request).finish();
1528
1989
  const promise = this.rpc.request(this.service, "ListAIProviders", data, metadata);
1529
- return promise.then((data) => ListAIReferenceNamesResponse.decode(new BinaryReader(data)));
1990
+ return promise.then((data) => ListAIProvidersResponse.decode(new BinaryReader(data)));
1530
1991
  }
1531
1992
 
1532
- ListAIModels(request: ListAIReferenceNamesRequest, metadata?: Metadata): Promise<ListAIReferenceNamesResponse> {
1533
- const data = ListAIReferenceNamesRequest.encode(request).finish();
1993
+ ListAIModels(request: ListAIModelsRequest, metadata?: Metadata): Promise<ListAIModelsResponse> {
1994
+ const data = ListAIModelsRequest.encode(request).finish();
1534
1995
  const promise = this.rpc.request(this.service, "ListAIModels", data, metadata);
1535
- return promise.then((data) => ListAIReferenceNamesResponse.decode(new BinaryReader(data)));
1996
+ return promise.then((data) => ListAIModelsResponse.decode(new BinaryReader(data)));
1536
1997
  }
1537
1998
 
1538
- ListAIEfforts(request: ListAIReferenceNamesRequest, metadata?: Metadata): Promise<ListAIReferenceNamesResponse> {
1539
- const data = ListAIReferenceNamesRequest.encode(request).finish();
1999
+ ListAIEfforts(request: ListAIEffortsRequest, metadata?: Metadata): Promise<ListAIEffortsResponse> {
2000
+ const data = ListAIEffortsRequest.encode(request).finish();
1540
2001
  const promise = this.rpc.request(this.service, "ListAIEfforts", data, metadata);
1541
- return promise.then((data) => ListAIReferenceNamesResponse.decode(new BinaryReader(data)));
2002
+ return promise.then((data) => ListAIEffortsResponse.decode(new BinaryReader(data)));
1542
2003
  }
1543
2004
 
1544
- ListAIBillingParties(
1545
- request: ListAIReferenceNamesRequest,
1546
- metadata?: Metadata,
1547
- ): Promise<ListAIReferenceNamesResponse> {
1548
- const data = ListAIReferenceNamesRequest.encode(request).finish();
1549
- const promise = this.rpc.request(this.service, "ListAIBillingParties", data, metadata);
1550
- return promise.then((data) => ListAIReferenceNamesResponse.decode(new BinaryReader(data)));
2005
+ ListAIBillers(request: ListAIBillersRequest, metadata?: Metadata): Promise<ListAIBillersResponse> {
2006
+ const data = ListAIBillersRequest.encode(request).finish();
2007
+ const promise = this.rpc.request(this.service, "ListAIBillers", data, metadata);
2008
+ return promise.then((data) => ListAIBillersResponse.decode(new BinaryReader(data)));
1551
2009
  }
1552
2010
  }
1553
2011