@miradorlabs/web-grpc 3.33.0 → 3.35.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/google/api/field_behavior.ts +1 -1
- package/google/protobuf/descriptor.ts +1 -1
- package/google/protobuf/duration.ts +1 -1
- package/google/protobuf/timestamp.ts +32 -10
- package/package.json +1 -1
- package/proto/gateway/common/v1/attribute_value.ts +1 -1
- package/proto/gateway/common/v1/status.ts +1 -1
- package/proto/gateway/common/v1/types.ts +1 -1
- package/proto/gateway/web/v1/account_gateway.ts +1 -1
- package/proto/gateway/web/v1/admin_gateway.ts +1773 -132
- package/proto/gateway/web/v1/admin_gateway_grpc_pb.js +146 -0
- package/proto/gateway/web/v1/admin_gateway_pb.js +2865 -0
- package/proto/gateway/web/v1/ai_gateway.ts +1016 -186
- package/proto/gateway/web/v1/ai_gateway_grpc_pb.js +36 -0
- package/proto/gateway/web/v1/ai_gateway_pb.js +1593 -118
- package/proto/gateway/web/v1/attribute_value.ts +1 -1
- package/proto/gateway/web/v1/beta_gateway.ts +1 -1
- package/proto/gateway/web/v1/chain_gateway.ts +1 -1
- package/proto/gateway/web/v1/common.ts +1 -1
- package/proto/gateway/web/v1/derived_metric_gateway.ts +1 -1
- package/proto/gateway/web/v1/github_connector.ts +1 -1
- package/proto/gateway/web/v1/integration_gateway.ts +1 -1
- package/proto/gateway/web/v1/log_gateway.ts +1 -1
- package/proto/gateway/web/v1/market_gateway.ts +1 -1
- package/proto/gateway/web/v1/metric_gateway.ts +1 -1
- package/proto/gateway/web/v1/oauth_gateway.ts +1 -1
- package/proto/gateway/web/v1/plan_gateway.ts +1 -1
- package/proto/gateway/web/v1/policy_gateway.ts +1 -1
- package/proto/gateway/web/v1/reference_gateway.ts +1 -1
- package/proto/gateway/web/v1/rule_gateway.ts +1 -1
- package/proto/gateway/web/v1/slo_gateway.ts +1 -1
- package/proto/gateway/web/v1/trace_gateway.ts +1 -1
- package/proto/gateway/web/v1/trace_measure_gateway.ts +1 -1
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
// Code generated by protoc-gen-ts_proto. DO NOT EDIT.
|
|
2
2
|
// versions:
|
|
3
|
-
// protoc-gen-ts_proto v2.15.
|
|
3
|
+
// protoc-gen-ts_proto v2.15.3
|
|
4
4
|
// protoc v3.21.12
|
|
5
5
|
// source: proto/gateway/web/v1/admin_gateway.proto
|
|
6
6
|
|
|
@@ -9,6 +9,12 @@ import { BinaryReader, BinaryWriter } from "@bufbuild/protobuf/wire";
|
|
|
9
9
|
import type { Metadata } from "@grpc/grpc-js";
|
|
10
10
|
import { Timestamp } from "../../../../google/protobuf/timestamp";
|
|
11
11
|
import { ResponseStatus } from "../../common/v1/status";
|
|
12
|
+
import {
|
|
13
|
+
RelayHeartbeatFilter,
|
|
14
|
+
RelayHeartbeatSort,
|
|
15
|
+
relayHeartbeatSortFromJSON,
|
|
16
|
+
relayHeartbeatSortToJSON,
|
|
17
|
+
} from "./ai_gateway";
|
|
12
18
|
import { InviteCodeState, inviteCodeStateFromJSON, inviteCodeStateToJSON } from "./beta_gateway";
|
|
13
19
|
import { AIReferenceGroupFilter, AIReferenceName } from "./reference_gateway";
|
|
14
20
|
|
|
@@ -188,6 +194,124 @@ export interface ConfirmAIBillersResponse {
|
|
|
188
194
|
confirmedNameCount: number;
|
|
189
195
|
}
|
|
190
196
|
|
|
197
|
+
export interface ListAdminRelayHeartbeatsRequest {
|
|
198
|
+
filter:
|
|
199
|
+
| RelayHeartbeatFilter
|
|
200
|
+
| undefined;
|
|
201
|
+
/** Unspecified is RELAY_HEARTBEAT_SORT_LAST_SEEN_DESC; an unknown value is a validation error. */
|
|
202
|
+
sort: RelayHeartbeatSort;
|
|
203
|
+
/** The server default (100) when 0, coerced to 1000 above it; negative is a validation error. */
|
|
204
|
+
pageSize: number;
|
|
205
|
+
/**
|
|
206
|
+
* Opaque keyset cursor from a prior response's next_page_token; empty starts at the most recently seen
|
|
207
|
+
* relay. Valid only with the scope, sort and filter that produced it (the page size may change); any other token
|
|
208
|
+
* is a validation error. Weakly consistent: the order key (last_seen) moves forward as
|
|
209
|
+
* heartbeats arrive, so a relay that beats while the caller pages moves ahead of the cursor and is missed until
|
|
210
|
+
* a refresh.
|
|
211
|
+
*/
|
|
212
|
+
pageToken: string;
|
|
213
|
+
}
|
|
214
|
+
|
|
215
|
+
export interface ListAdminRelayHeartbeatsResponse {
|
|
216
|
+
status: ResponseStatus | undefined;
|
|
217
|
+
relayHeartbeats: AdminRelayHeartbeat[];
|
|
218
|
+
/** Empty once the last page has been returned. */
|
|
219
|
+
nextPageToken: string;
|
|
220
|
+
}
|
|
221
|
+
|
|
222
|
+
/**
|
|
223
|
+
* AdminRelayHeartbeat mirrors telemetry.api.v1.AdminRelayHeartbeat. One relay machine for staff: RelayHeartbeat's
|
|
224
|
+
* summary plus the latest heartbeat's metadata and counters. The gateway stamps the organization, project, first and
|
|
225
|
+
* last seen and key id; the rest is what the relay reported, for display only. Every latest field is from one
|
|
226
|
+
* heartbeat, the last the gateway received.
|
|
227
|
+
*/
|
|
228
|
+
export interface AdminRelayHeartbeat {
|
|
229
|
+
organizationId: string;
|
|
230
|
+
projectId: string;
|
|
231
|
+
/** terma.user.id as the relay reported it; "" = signed out or an older relay. Client-claimed: display only. */
|
|
232
|
+
accountUserId: string;
|
|
233
|
+
hostName: string;
|
|
234
|
+
/** first heartbeat the gateway received */
|
|
235
|
+
firstSeen:
|
|
236
|
+
| Date
|
|
237
|
+
| undefined;
|
|
238
|
+
/** latest heartbeat the gateway received */
|
|
239
|
+
lastSeen:
|
|
240
|
+
| Date
|
|
241
|
+
| undefined;
|
|
242
|
+
/** of the latest heartbeat (by received time) */
|
|
243
|
+
termaVersion: string;
|
|
244
|
+
/** of the latest heartbeat: service, hook, manual, verbatim */
|
|
245
|
+
launch: string;
|
|
246
|
+
/** of the latest heartbeat: start, interval, setup, exit, verbatim */
|
|
247
|
+
reason: string;
|
|
248
|
+
/** of the latest heartbeat, verbatim; "" unless the relay stopped */
|
|
249
|
+
exitReason: string;
|
|
250
|
+
/** the key that signed the latest heartbeat */
|
|
251
|
+
miradorApiKeyId: string;
|
|
252
|
+
/**
|
|
253
|
+
* The latest heartbeat's terma.relay.heartbeat.counter.<name> ints by <name> (received.logs, dropped.no_key.traces,
|
|
254
|
+
* ...): figures since the beat before it that carried counters, not lifetime totals. A missing name was not
|
|
255
|
+
* reported, never zero; an empty map is a beat that carried none.
|
|
256
|
+
*/
|
|
257
|
+
counters: { [key: string]: number };
|
|
258
|
+
}
|
|
259
|
+
|
|
260
|
+
export interface AdminRelayHeartbeat_CountersEntry {
|
|
261
|
+
key: string;
|
|
262
|
+
value: number;
|
|
263
|
+
}
|
|
264
|
+
|
|
265
|
+
export interface ResolveOrgDetailsRequest {
|
|
266
|
+
/** UUIDs, at most 1000; a malformed id is a validation error. */
|
|
267
|
+
organizationIds: string[];
|
|
268
|
+
}
|
|
269
|
+
|
|
270
|
+
export interface ResolveOrgDetailsResponse {
|
|
271
|
+
status: ResponseStatus | undefined;
|
|
272
|
+
organizations: OrgDetails[];
|
|
273
|
+
}
|
|
274
|
+
|
|
275
|
+
export interface OrgDetails {
|
|
276
|
+
organizationId: string;
|
|
277
|
+
name: string;
|
|
278
|
+
}
|
|
279
|
+
|
|
280
|
+
export interface ResolveProjectDetailsRequest {
|
|
281
|
+
/** UUIDs, at most 1000; a malformed id is a validation error. */
|
|
282
|
+
projectIds: string[];
|
|
283
|
+
}
|
|
284
|
+
|
|
285
|
+
export interface ResolveProjectDetailsResponse {
|
|
286
|
+
status: ResponseStatus | undefined;
|
|
287
|
+
projects: ProjectDetails[];
|
|
288
|
+
}
|
|
289
|
+
|
|
290
|
+
/** A deleted project still resolves: its name is the one it had. */
|
|
291
|
+
export interface ProjectDetails {
|
|
292
|
+
projectId: string;
|
|
293
|
+
organizationId: string;
|
|
294
|
+
name: string;
|
|
295
|
+
}
|
|
296
|
+
|
|
297
|
+
export interface ResolveUserDetailsRequest {
|
|
298
|
+
/** The Mirador account user UUID (terma.user.id). */
|
|
299
|
+
userId: string;
|
|
300
|
+
}
|
|
301
|
+
|
|
302
|
+
export interface ResolveUserDetailsResponse {
|
|
303
|
+
status: ResponseStatus | undefined;
|
|
304
|
+
user: UserDetails | undefined;
|
|
305
|
+
}
|
|
306
|
+
|
|
307
|
+
export interface UserDetails {
|
|
308
|
+
userId: string;
|
|
309
|
+
/** The primary email, or the first address when the user has no primary one. */
|
|
310
|
+
email: string;
|
|
311
|
+
/** The first and last name joined; empty when neither is set. */
|
|
312
|
+
name: string;
|
|
313
|
+
}
|
|
314
|
+
|
|
191
315
|
function createBaseGetAdminStatusRequest(): GetAdminStatusRequest {
|
|
192
316
|
return {};
|
|
193
317
|
}
|
|
@@ -2541,151 +2665,1664 @@ export const ConfirmAIBillersResponse: MessageFns<ConfirmAIBillersResponse> = {
|
|
|
2541
2665
|
},
|
|
2542
2666
|
};
|
|
2543
2667
|
|
|
2544
|
-
|
|
2545
|
-
|
|
2546
|
-
* Mirador staff (a verified mirador.org primary email) may use. The gateway's admin gate admits every RPC
|
|
2547
|
-
* here except GetAdminStatus, which tells the frontend whether to show the admin tools at all.
|
|
2548
|
-
*/
|
|
2549
|
-
export interface AdminGatewayService {
|
|
2550
|
-
/** GetAdminStatus reports whether the authenticated caller may use the admin tools. */
|
|
2551
|
-
GetAdminStatus(request: GetAdminStatusRequest, metadata?: Metadata): Promise<GetAdminStatusResponse>;
|
|
2552
|
-
/** Beta invite codes for this gateway's product. */
|
|
2553
|
-
GenerateInviteCodes(request: GenerateInviteCodesRequest, metadata?: Metadata): Promise<GenerateInviteCodesResponse>;
|
|
2554
|
-
ListInviteCodes(request: ListInviteCodesRequest, metadata?: Metadata): Promise<ListInviteCodesResponse>;
|
|
2555
|
-
/** SendInviteCodeEmail emails one available code to an address and records when and to whom it was sent. */
|
|
2556
|
-
SendInviteCodeEmail(request: SendInviteCodeEmailRequest, metadata?: Metadata): Promise<SendInviteCodeEmailResponse>;
|
|
2557
|
-
/**
|
|
2558
|
-
* Staff set a global AI name's display name for every organization. An update makes the name MANUAL; the
|
|
2559
|
-
* model processor never overwrites it. The tables are read through ReferenceGatewayService.
|
|
2560
|
-
*/
|
|
2561
|
-
UpdateAIProvider(request: UpdateAIProviderRequest, metadata?: Metadata): Promise<UpdateAIProviderResponse>;
|
|
2562
|
-
UpdateAIModel(request: UpdateAIModelRequest, metadata?: Metadata): Promise<UpdateAIModelResponse>;
|
|
2563
|
-
UpdateAIEffort(request: UpdateAIEffortRequest, metadata?: Metadata): Promise<UpdateAIEffortResponse>;
|
|
2564
|
-
UpdateAIBiller(request: UpdateAIBillerRequest, metadata?: Metadata): Promise<UpdateAIBillerResponse>;
|
|
2565
|
-
/**
|
|
2566
|
-
* Each Confirm<X> confirms every unreviewed name in the groups a List<X>Groups filter keeps (on every page),
|
|
2567
|
-
* as one Update<X> per name would; it proxies telemetry.api.v1.TelemetryAdminService's Confirm<X>. It
|
|
2568
|
-
* confirms what matches when it runs: compare confirmed_name_count with the count shown. Names are global: an
|
|
2569
|
-
* unset observation also confirms groups none of the organizations reported. Observation OBSERVED keeps only
|
|
2570
|
-
* the groups they reported, and still confirms every unreviewed name in them, including a spelling in the same
|
|
2571
|
-
* group none of them reported.
|
|
2572
|
-
*/
|
|
2573
|
-
ConfirmAIProviders(request: ConfirmAIProvidersRequest, metadata?: Metadata): Promise<ConfirmAIProvidersResponse>;
|
|
2574
|
-
ConfirmAIModels(request: ConfirmAIModelsRequest, metadata?: Metadata): Promise<ConfirmAIModelsResponse>;
|
|
2575
|
-
ConfirmAIEfforts(request: ConfirmAIEffortsRequest, metadata?: Metadata): Promise<ConfirmAIEffortsResponse>;
|
|
2576
|
-
ConfirmAIBillers(request: ConfirmAIBillersRequest, metadata?: Metadata): Promise<ConfirmAIBillersResponse>;
|
|
2668
|
+
function createBaseListAdminRelayHeartbeatsRequest(): ListAdminRelayHeartbeatsRequest {
|
|
2669
|
+
return { filter: undefined, sort: 0, pageSize: 0, pageToken: "" };
|
|
2577
2670
|
}
|
|
2578
2671
|
|
|
2579
|
-
export const
|
|
2580
|
-
|
|
2581
|
-
|
|
2582
|
-
|
|
2583
|
-
|
|
2584
|
-
|
|
2585
|
-
|
|
2586
|
-
|
|
2587
|
-
|
|
2588
|
-
|
|
2589
|
-
|
|
2590
|
-
|
|
2591
|
-
|
|
2592
|
-
|
|
2593
|
-
|
|
2594
|
-
|
|
2595
|
-
this.ConfirmAIModels = this.ConfirmAIModels.bind(this);
|
|
2596
|
-
this.ConfirmAIEfforts = this.ConfirmAIEfforts.bind(this);
|
|
2597
|
-
this.ConfirmAIBillers = this.ConfirmAIBillers.bind(this);
|
|
2598
|
-
}
|
|
2599
|
-
GetAdminStatus(request: GetAdminStatusRequest, metadata?: Metadata): Promise<GetAdminStatusResponse> {
|
|
2600
|
-
const data = GetAdminStatusRequest.encode(request).finish();
|
|
2601
|
-
const promise = this.rpc.request(this.service, "GetAdminStatus", data, metadata);
|
|
2602
|
-
return promise.then((data) => GetAdminStatusResponse.decode(new BinaryReader(data)));
|
|
2603
|
-
}
|
|
2604
|
-
|
|
2605
|
-
GenerateInviteCodes(request: GenerateInviteCodesRequest, metadata?: Metadata): Promise<GenerateInviteCodesResponse> {
|
|
2606
|
-
const data = GenerateInviteCodesRequest.encode(request).finish();
|
|
2607
|
-
const promise = this.rpc.request(this.service, "GenerateInviteCodes", data, metadata);
|
|
2608
|
-
return promise.then((data) => GenerateInviteCodesResponse.decode(new BinaryReader(data)));
|
|
2609
|
-
}
|
|
2610
|
-
|
|
2611
|
-
ListInviteCodes(request: ListInviteCodesRequest, metadata?: Metadata): Promise<ListInviteCodesResponse> {
|
|
2612
|
-
const data = ListInviteCodesRequest.encode(request).finish();
|
|
2613
|
-
const promise = this.rpc.request(this.service, "ListInviteCodes", data, metadata);
|
|
2614
|
-
return promise.then((data) => ListInviteCodesResponse.decode(new BinaryReader(data)));
|
|
2615
|
-
}
|
|
2616
|
-
|
|
2617
|
-
SendInviteCodeEmail(request: SendInviteCodeEmailRequest, metadata?: Metadata): Promise<SendInviteCodeEmailResponse> {
|
|
2618
|
-
const data = SendInviteCodeEmailRequest.encode(request).finish();
|
|
2619
|
-
const promise = this.rpc.request(this.service, "SendInviteCodeEmail", data, metadata);
|
|
2620
|
-
return promise.then((data) => SendInviteCodeEmailResponse.decode(new BinaryReader(data)));
|
|
2621
|
-
}
|
|
2672
|
+
export const ListAdminRelayHeartbeatsRequest: MessageFns<ListAdminRelayHeartbeatsRequest> = {
|
|
2673
|
+
encode(message: ListAdminRelayHeartbeatsRequest, writer: BinaryWriter = new BinaryWriter()): BinaryWriter {
|
|
2674
|
+
if (message.filter !== undefined) {
|
|
2675
|
+
RelayHeartbeatFilter.encode(message.filter, writer.uint32(10).fork()).join();
|
|
2676
|
+
}
|
|
2677
|
+
if (message.sort !== 0) {
|
|
2678
|
+
writer.uint32(16).int32(message.sort);
|
|
2679
|
+
}
|
|
2680
|
+
if (message.pageSize !== 0) {
|
|
2681
|
+
writer.uint32(24).int32(message.pageSize);
|
|
2682
|
+
}
|
|
2683
|
+
if (message.pageToken !== "") {
|
|
2684
|
+
writer.uint32(34).string(message.pageToken);
|
|
2685
|
+
}
|
|
2686
|
+
return writer;
|
|
2687
|
+
},
|
|
2622
2688
|
|
|
2623
|
-
|
|
2624
|
-
const
|
|
2625
|
-
const
|
|
2626
|
-
|
|
2627
|
-
|
|
2689
|
+
decode(input: BinaryReader | Uint8Array, length?: number): ListAdminRelayHeartbeatsRequest {
|
|
2690
|
+
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
|
|
2691
|
+
const previousRecursionDepth = (reader as any).__tsProtoDecodeDepth ?? 0;
|
|
2692
|
+
if (previousRecursionDepth >= 100) {
|
|
2693
|
+
throw new globalThis.Error("protobuf decode recursion limit exceeded");
|
|
2694
|
+
}
|
|
2695
|
+
(reader as any).__tsProtoDecodeDepth = previousRecursionDepth + 1;
|
|
2696
|
+
try {
|
|
2697
|
+
const end = length === undefined ? reader.len : reader.pos + length;
|
|
2698
|
+
const message = createBaseListAdminRelayHeartbeatsRequest();
|
|
2699
|
+
while (reader.pos < end) {
|
|
2700
|
+
const tag = reader.uint32();
|
|
2701
|
+
switch (tag >>> 3) {
|
|
2702
|
+
case 1: {
|
|
2703
|
+
if (tag !== 10) {
|
|
2704
|
+
break;
|
|
2705
|
+
}
|
|
2628
2706
|
|
|
2629
|
-
|
|
2630
|
-
|
|
2631
|
-
|
|
2632
|
-
|
|
2633
|
-
|
|
2707
|
+
message.filter = RelayHeartbeatFilter.decode(reader, reader.uint32());
|
|
2708
|
+
continue;
|
|
2709
|
+
}
|
|
2710
|
+
case 2: {
|
|
2711
|
+
if (tag !== 16) {
|
|
2712
|
+
break;
|
|
2713
|
+
}
|
|
2634
2714
|
|
|
2635
|
-
|
|
2636
|
-
|
|
2637
|
-
|
|
2638
|
-
|
|
2639
|
-
|
|
2715
|
+
message.sort = reader.int32() as any;
|
|
2716
|
+
continue;
|
|
2717
|
+
}
|
|
2718
|
+
case 3: {
|
|
2719
|
+
if (tag !== 24) {
|
|
2720
|
+
break;
|
|
2721
|
+
}
|
|
2640
2722
|
|
|
2641
|
-
|
|
2642
|
-
|
|
2643
|
-
|
|
2644
|
-
|
|
2645
|
-
|
|
2723
|
+
message.pageSize = reader.int32();
|
|
2724
|
+
continue;
|
|
2725
|
+
}
|
|
2726
|
+
case 4: {
|
|
2727
|
+
if (tag !== 34) {
|
|
2728
|
+
break;
|
|
2729
|
+
}
|
|
2646
2730
|
|
|
2647
|
-
|
|
2648
|
-
|
|
2649
|
-
|
|
2650
|
-
|
|
2651
|
-
|
|
2731
|
+
message.pageToken = reader.string();
|
|
2732
|
+
continue;
|
|
2733
|
+
}
|
|
2734
|
+
}
|
|
2735
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
2736
|
+
break;
|
|
2737
|
+
}
|
|
2738
|
+
reader.skip(tag & 7);
|
|
2739
|
+
}
|
|
2740
|
+
return message;
|
|
2741
|
+
} finally {
|
|
2742
|
+
(reader as any).__tsProtoDecodeDepth = previousRecursionDepth;
|
|
2743
|
+
}
|
|
2744
|
+
},
|
|
2652
2745
|
|
|
2653
|
-
|
|
2654
|
-
|
|
2655
|
-
|
|
2656
|
-
|
|
2657
|
-
|
|
2746
|
+
fromJSON(object: any): ListAdminRelayHeartbeatsRequest {
|
|
2747
|
+
return {
|
|
2748
|
+
filter: isSet(object.filter) ? RelayHeartbeatFilter.fromJSON(object.filter) : undefined,
|
|
2749
|
+
sort: isSet(object.sort) ? relayHeartbeatSortFromJSON(object.sort) : 0,
|
|
2750
|
+
pageSize: isSet(object.pageSize)
|
|
2751
|
+
? globalThis.Number(object.pageSize)
|
|
2752
|
+
: isSet(object.page_size)
|
|
2753
|
+
? globalThis.Number(object.page_size)
|
|
2754
|
+
: 0,
|
|
2755
|
+
pageToken: isSet(object.pageToken)
|
|
2756
|
+
? globalThis.String(object.pageToken)
|
|
2757
|
+
: isSet(object.page_token)
|
|
2758
|
+
? globalThis.String(object.page_token)
|
|
2759
|
+
: "",
|
|
2760
|
+
};
|
|
2761
|
+
},
|
|
2658
2762
|
|
|
2659
|
-
|
|
2660
|
-
const
|
|
2661
|
-
|
|
2662
|
-
|
|
2663
|
-
|
|
2763
|
+
toJSON(message: ListAdminRelayHeartbeatsRequest): unknown {
|
|
2764
|
+
const obj: any = {};
|
|
2765
|
+
if (message.filter !== undefined) {
|
|
2766
|
+
obj.filter = RelayHeartbeatFilter.toJSON(message.filter);
|
|
2767
|
+
}
|
|
2768
|
+
if (message.sort !== 0) {
|
|
2769
|
+
obj.sort = relayHeartbeatSortToJSON(message.sort);
|
|
2770
|
+
}
|
|
2771
|
+
if (message.pageSize !== 0) {
|
|
2772
|
+
obj.pageSize = Math.round(message.pageSize);
|
|
2773
|
+
}
|
|
2774
|
+
if (message.pageToken !== "") {
|
|
2775
|
+
obj.pageToken = message.pageToken;
|
|
2776
|
+
}
|
|
2777
|
+
return obj;
|
|
2778
|
+
},
|
|
2664
2779
|
|
|
2665
|
-
|
|
2666
|
-
|
|
2667
|
-
|
|
2668
|
-
|
|
2669
|
-
|
|
2670
|
-
|
|
2780
|
+
create<I extends Exact<DeepPartial<ListAdminRelayHeartbeatsRequest>, I>>(base?: I): ListAdminRelayHeartbeatsRequest {
|
|
2781
|
+
return ListAdminRelayHeartbeatsRequest.fromPartial(base ?? ({} as any));
|
|
2782
|
+
},
|
|
2783
|
+
fromPartial<I extends Exact<DeepPartial<ListAdminRelayHeartbeatsRequest>, I>>(
|
|
2784
|
+
object: I,
|
|
2785
|
+
): ListAdminRelayHeartbeatsRequest {
|
|
2786
|
+
const message = createBaseListAdminRelayHeartbeatsRequest();
|
|
2787
|
+
message.filter = (object.filter !== undefined && object.filter !== null)
|
|
2788
|
+
? RelayHeartbeatFilter.fromPartial(object.filter)
|
|
2789
|
+
: undefined;
|
|
2790
|
+
message.sort = object.sort ?? 0;
|
|
2791
|
+
message.pageSize = object.pageSize ?? 0;
|
|
2792
|
+
message.pageToken = object.pageToken ?? "";
|
|
2793
|
+
return message;
|
|
2794
|
+
},
|
|
2795
|
+
};
|
|
2671
2796
|
|
|
2672
|
-
|
|
2673
|
-
|
|
2797
|
+
function createBaseListAdminRelayHeartbeatsResponse(): ListAdminRelayHeartbeatsResponse {
|
|
2798
|
+
return { status: undefined, relayHeartbeats: [], nextPageToken: "" };
|
|
2674
2799
|
}
|
|
2675
2800
|
|
|
2676
|
-
|
|
2677
|
-
|
|
2678
|
-
|
|
2679
|
-
|
|
2680
|
-
|
|
2681
|
-
|
|
2682
|
-
|
|
2683
|
-
|
|
2684
|
-
|
|
2685
|
-
|
|
2686
|
-
|
|
2801
|
+
export const ListAdminRelayHeartbeatsResponse: MessageFns<ListAdminRelayHeartbeatsResponse> = {
|
|
2802
|
+
encode(message: ListAdminRelayHeartbeatsResponse, writer: BinaryWriter = new BinaryWriter()): BinaryWriter {
|
|
2803
|
+
if (message.status !== undefined) {
|
|
2804
|
+
ResponseStatus.encode(message.status, writer.uint32(10).fork()).join();
|
|
2805
|
+
}
|
|
2806
|
+
for (const v of message.relayHeartbeats) {
|
|
2807
|
+
AdminRelayHeartbeat.encode(v!, writer.uint32(18).fork()).join();
|
|
2808
|
+
}
|
|
2809
|
+
if (message.nextPageToken !== "") {
|
|
2810
|
+
writer.uint32(26).string(message.nextPageToken);
|
|
2811
|
+
}
|
|
2812
|
+
return writer;
|
|
2813
|
+
},
|
|
2687
2814
|
|
|
2688
|
-
|
|
2815
|
+
decode(input: BinaryReader | Uint8Array, length?: number): ListAdminRelayHeartbeatsResponse {
|
|
2816
|
+
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
|
|
2817
|
+
const previousRecursionDepth = (reader as any).__tsProtoDecodeDepth ?? 0;
|
|
2818
|
+
if (previousRecursionDepth >= 100) {
|
|
2819
|
+
throw new globalThis.Error("protobuf decode recursion limit exceeded");
|
|
2820
|
+
}
|
|
2821
|
+
(reader as any).__tsProtoDecodeDepth = previousRecursionDepth + 1;
|
|
2822
|
+
try {
|
|
2823
|
+
const end = length === undefined ? reader.len : reader.pos + length;
|
|
2824
|
+
const message = createBaseListAdminRelayHeartbeatsResponse();
|
|
2825
|
+
while (reader.pos < end) {
|
|
2826
|
+
const tag = reader.uint32();
|
|
2827
|
+
switch (tag >>> 3) {
|
|
2828
|
+
case 1: {
|
|
2829
|
+
if (tag !== 10) {
|
|
2830
|
+
break;
|
|
2831
|
+
}
|
|
2832
|
+
|
|
2833
|
+
message.status = ResponseStatus.decode(reader, reader.uint32());
|
|
2834
|
+
continue;
|
|
2835
|
+
}
|
|
2836
|
+
case 2: {
|
|
2837
|
+
if (tag !== 18) {
|
|
2838
|
+
break;
|
|
2839
|
+
}
|
|
2840
|
+
|
|
2841
|
+
message.relayHeartbeats.push(AdminRelayHeartbeat.decode(reader, reader.uint32()));
|
|
2842
|
+
continue;
|
|
2843
|
+
}
|
|
2844
|
+
case 3: {
|
|
2845
|
+
if (tag !== 26) {
|
|
2846
|
+
break;
|
|
2847
|
+
}
|
|
2848
|
+
|
|
2849
|
+
message.nextPageToken = reader.string();
|
|
2850
|
+
continue;
|
|
2851
|
+
}
|
|
2852
|
+
}
|
|
2853
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
2854
|
+
break;
|
|
2855
|
+
}
|
|
2856
|
+
reader.skip(tag & 7);
|
|
2857
|
+
}
|
|
2858
|
+
return message;
|
|
2859
|
+
} finally {
|
|
2860
|
+
(reader as any).__tsProtoDecodeDepth = previousRecursionDepth;
|
|
2861
|
+
}
|
|
2862
|
+
},
|
|
2863
|
+
|
|
2864
|
+
fromJSON(object: any): ListAdminRelayHeartbeatsResponse {
|
|
2865
|
+
return {
|
|
2866
|
+
status: isSet(object.status) ? ResponseStatus.fromJSON(object.status) : undefined,
|
|
2867
|
+
relayHeartbeats: globalThis.Array.isArray(object?.relayHeartbeats)
|
|
2868
|
+
? object.relayHeartbeats.map((e: any) => AdminRelayHeartbeat.fromJSON(e))
|
|
2869
|
+
: globalThis.Array.isArray(object?.relay_heartbeats)
|
|
2870
|
+
? object.relay_heartbeats.map((e: any) => AdminRelayHeartbeat.fromJSON(e))
|
|
2871
|
+
: [],
|
|
2872
|
+
nextPageToken: isSet(object.nextPageToken)
|
|
2873
|
+
? globalThis.String(object.nextPageToken)
|
|
2874
|
+
: isSet(object.next_page_token)
|
|
2875
|
+
? globalThis.String(object.next_page_token)
|
|
2876
|
+
: "",
|
|
2877
|
+
};
|
|
2878
|
+
},
|
|
2879
|
+
|
|
2880
|
+
toJSON(message: ListAdminRelayHeartbeatsResponse): unknown {
|
|
2881
|
+
const obj: any = {};
|
|
2882
|
+
if (message.status !== undefined) {
|
|
2883
|
+
obj.status = ResponseStatus.toJSON(message.status);
|
|
2884
|
+
}
|
|
2885
|
+
if (message.relayHeartbeats?.length) {
|
|
2886
|
+
obj.relayHeartbeats = message.relayHeartbeats.map((e) => AdminRelayHeartbeat.toJSON(e));
|
|
2887
|
+
}
|
|
2888
|
+
if (message.nextPageToken !== "") {
|
|
2889
|
+
obj.nextPageToken = message.nextPageToken;
|
|
2890
|
+
}
|
|
2891
|
+
return obj;
|
|
2892
|
+
},
|
|
2893
|
+
|
|
2894
|
+
create<I extends Exact<DeepPartial<ListAdminRelayHeartbeatsResponse>, I>>(
|
|
2895
|
+
base?: I,
|
|
2896
|
+
): ListAdminRelayHeartbeatsResponse {
|
|
2897
|
+
return ListAdminRelayHeartbeatsResponse.fromPartial(base ?? ({} as any));
|
|
2898
|
+
},
|
|
2899
|
+
fromPartial<I extends Exact<DeepPartial<ListAdminRelayHeartbeatsResponse>, I>>(
|
|
2900
|
+
object: I,
|
|
2901
|
+
): ListAdminRelayHeartbeatsResponse {
|
|
2902
|
+
const message = createBaseListAdminRelayHeartbeatsResponse();
|
|
2903
|
+
message.status = (object.status !== undefined && object.status !== null)
|
|
2904
|
+
? ResponseStatus.fromPartial(object.status)
|
|
2905
|
+
: undefined;
|
|
2906
|
+
message.relayHeartbeats = object.relayHeartbeats?.map((e) => AdminRelayHeartbeat.fromPartial(e)) || [];
|
|
2907
|
+
message.nextPageToken = object.nextPageToken ?? "";
|
|
2908
|
+
return message;
|
|
2909
|
+
},
|
|
2910
|
+
};
|
|
2911
|
+
|
|
2912
|
+
function createBaseAdminRelayHeartbeat(): AdminRelayHeartbeat {
|
|
2913
|
+
return {
|
|
2914
|
+
organizationId: "",
|
|
2915
|
+
projectId: "",
|
|
2916
|
+
accountUserId: "",
|
|
2917
|
+
hostName: "",
|
|
2918
|
+
firstSeen: undefined,
|
|
2919
|
+
lastSeen: undefined,
|
|
2920
|
+
termaVersion: "",
|
|
2921
|
+
launch: "",
|
|
2922
|
+
reason: "",
|
|
2923
|
+
exitReason: "",
|
|
2924
|
+
miradorApiKeyId: "",
|
|
2925
|
+
counters: {},
|
|
2926
|
+
};
|
|
2927
|
+
}
|
|
2928
|
+
|
|
2929
|
+
export const AdminRelayHeartbeat: MessageFns<AdminRelayHeartbeat> = {
|
|
2930
|
+
encode(message: AdminRelayHeartbeat, writer: BinaryWriter = new BinaryWriter()): BinaryWriter {
|
|
2931
|
+
if (message.organizationId !== "") {
|
|
2932
|
+
writer.uint32(10).string(message.organizationId);
|
|
2933
|
+
}
|
|
2934
|
+
if (message.projectId !== "") {
|
|
2935
|
+
writer.uint32(18).string(message.projectId);
|
|
2936
|
+
}
|
|
2937
|
+
if (message.accountUserId !== "") {
|
|
2938
|
+
writer.uint32(26).string(message.accountUserId);
|
|
2939
|
+
}
|
|
2940
|
+
if (message.hostName !== "") {
|
|
2941
|
+
writer.uint32(34).string(message.hostName);
|
|
2942
|
+
}
|
|
2943
|
+
if (message.firstSeen !== undefined) {
|
|
2944
|
+
Timestamp.encode(toTimestamp(message.firstSeen), writer.uint32(42).fork()).join();
|
|
2945
|
+
}
|
|
2946
|
+
if (message.lastSeen !== undefined) {
|
|
2947
|
+
Timestamp.encode(toTimestamp(message.lastSeen), writer.uint32(50).fork()).join();
|
|
2948
|
+
}
|
|
2949
|
+
if (message.termaVersion !== "") {
|
|
2950
|
+
writer.uint32(58).string(message.termaVersion);
|
|
2951
|
+
}
|
|
2952
|
+
if (message.launch !== "") {
|
|
2953
|
+
writer.uint32(66).string(message.launch);
|
|
2954
|
+
}
|
|
2955
|
+
if (message.reason !== "") {
|
|
2956
|
+
writer.uint32(74).string(message.reason);
|
|
2957
|
+
}
|
|
2958
|
+
if (message.exitReason !== "") {
|
|
2959
|
+
writer.uint32(82).string(message.exitReason);
|
|
2960
|
+
}
|
|
2961
|
+
if (message.miradorApiKeyId !== "") {
|
|
2962
|
+
writer.uint32(90).string(message.miradorApiKeyId);
|
|
2963
|
+
}
|
|
2964
|
+
globalThis.Object.entries(message.counters).forEach(([key, value]: [string, number]) => {
|
|
2965
|
+
AdminRelayHeartbeat_CountersEntry.encode({ key: key as any, value }, writer.uint32(98).fork()).join();
|
|
2966
|
+
});
|
|
2967
|
+
return writer;
|
|
2968
|
+
},
|
|
2969
|
+
|
|
2970
|
+
decode(input: BinaryReader | Uint8Array, length?: number): AdminRelayHeartbeat {
|
|
2971
|
+
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
|
|
2972
|
+
const previousRecursionDepth = (reader as any).__tsProtoDecodeDepth ?? 0;
|
|
2973
|
+
if (previousRecursionDepth >= 100) {
|
|
2974
|
+
throw new globalThis.Error("protobuf decode recursion limit exceeded");
|
|
2975
|
+
}
|
|
2976
|
+
(reader as any).__tsProtoDecodeDepth = previousRecursionDepth + 1;
|
|
2977
|
+
try {
|
|
2978
|
+
const end = length === undefined ? reader.len : reader.pos + length;
|
|
2979
|
+
const message = createBaseAdminRelayHeartbeat();
|
|
2980
|
+
while (reader.pos < end) {
|
|
2981
|
+
const tag = reader.uint32();
|
|
2982
|
+
switch (tag >>> 3) {
|
|
2983
|
+
case 1: {
|
|
2984
|
+
if (tag !== 10) {
|
|
2985
|
+
break;
|
|
2986
|
+
}
|
|
2987
|
+
|
|
2988
|
+
message.organizationId = reader.string();
|
|
2989
|
+
continue;
|
|
2990
|
+
}
|
|
2991
|
+
case 2: {
|
|
2992
|
+
if (tag !== 18) {
|
|
2993
|
+
break;
|
|
2994
|
+
}
|
|
2995
|
+
|
|
2996
|
+
message.projectId = reader.string();
|
|
2997
|
+
continue;
|
|
2998
|
+
}
|
|
2999
|
+
case 3: {
|
|
3000
|
+
if (tag !== 26) {
|
|
3001
|
+
break;
|
|
3002
|
+
}
|
|
3003
|
+
|
|
3004
|
+
message.accountUserId = reader.string();
|
|
3005
|
+
continue;
|
|
3006
|
+
}
|
|
3007
|
+
case 4: {
|
|
3008
|
+
if (tag !== 34) {
|
|
3009
|
+
break;
|
|
3010
|
+
}
|
|
3011
|
+
|
|
3012
|
+
message.hostName = reader.string();
|
|
3013
|
+
continue;
|
|
3014
|
+
}
|
|
3015
|
+
case 5: {
|
|
3016
|
+
if (tag !== 42) {
|
|
3017
|
+
break;
|
|
3018
|
+
}
|
|
3019
|
+
|
|
3020
|
+
message.firstSeen = fromTimestamp(Timestamp.decode(reader, reader.uint32()));
|
|
3021
|
+
continue;
|
|
3022
|
+
}
|
|
3023
|
+
case 6: {
|
|
3024
|
+
if (tag !== 50) {
|
|
3025
|
+
break;
|
|
3026
|
+
}
|
|
3027
|
+
|
|
3028
|
+
message.lastSeen = fromTimestamp(Timestamp.decode(reader, reader.uint32()));
|
|
3029
|
+
continue;
|
|
3030
|
+
}
|
|
3031
|
+
case 7: {
|
|
3032
|
+
if (tag !== 58) {
|
|
3033
|
+
break;
|
|
3034
|
+
}
|
|
3035
|
+
|
|
3036
|
+
message.termaVersion = reader.string();
|
|
3037
|
+
continue;
|
|
3038
|
+
}
|
|
3039
|
+
case 8: {
|
|
3040
|
+
if (tag !== 66) {
|
|
3041
|
+
break;
|
|
3042
|
+
}
|
|
3043
|
+
|
|
3044
|
+
message.launch = reader.string();
|
|
3045
|
+
continue;
|
|
3046
|
+
}
|
|
3047
|
+
case 9: {
|
|
3048
|
+
if (tag !== 74) {
|
|
3049
|
+
break;
|
|
3050
|
+
}
|
|
3051
|
+
|
|
3052
|
+
message.reason = reader.string();
|
|
3053
|
+
continue;
|
|
3054
|
+
}
|
|
3055
|
+
case 10: {
|
|
3056
|
+
if (tag !== 82) {
|
|
3057
|
+
break;
|
|
3058
|
+
}
|
|
3059
|
+
|
|
3060
|
+
message.exitReason = reader.string();
|
|
3061
|
+
continue;
|
|
3062
|
+
}
|
|
3063
|
+
case 11: {
|
|
3064
|
+
if (tag !== 90) {
|
|
3065
|
+
break;
|
|
3066
|
+
}
|
|
3067
|
+
|
|
3068
|
+
message.miradorApiKeyId = reader.string();
|
|
3069
|
+
continue;
|
|
3070
|
+
}
|
|
3071
|
+
case 12: {
|
|
3072
|
+
if (tag !== 98) {
|
|
3073
|
+
break;
|
|
3074
|
+
}
|
|
3075
|
+
|
|
3076
|
+
const entry12 = AdminRelayHeartbeat_CountersEntry.decode(reader, reader.uint32());
|
|
3077
|
+
if (entry12.value !== undefined) {
|
|
3078
|
+
message.counters[entry12.key] = entry12.value;
|
|
3079
|
+
}
|
|
3080
|
+
continue;
|
|
3081
|
+
}
|
|
3082
|
+
}
|
|
3083
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
3084
|
+
break;
|
|
3085
|
+
}
|
|
3086
|
+
reader.skip(tag & 7);
|
|
3087
|
+
}
|
|
3088
|
+
return message;
|
|
3089
|
+
} finally {
|
|
3090
|
+
(reader as any).__tsProtoDecodeDepth = previousRecursionDepth;
|
|
3091
|
+
}
|
|
3092
|
+
},
|
|
3093
|
+
|
|
3094
|
+
fromJSON(object: any): AdminRelayHeartbeat {
|
|
3095
|
+
return {
|
|
3096
|
+
organizationId: isSet(object.organizationId)
|
|
3097
|
+
? globalThis.String(object.organizationId)
|
|
3098
|
+
: isSet(object.organization_id)
|
|
3099
|
+
? globalThis.String(object.organization_id)
|
|
3100
|
+
: "",
|
|
3101
|
+
projectId: isSet(object.projectId)
|
|
3102
|
+
? globalThis.String(object.projectId)
|
|
3103
|
+
: isSet(object.project_id)
|
|
3104
|
+
? globalThis.String(object.project_id)
|
|
3105
|
+
: "",
|
|
3106
|
+
accountUserId: isSet(object.accountUserId)
|
|
3107
|
+
? globalThis.String(object.accountUserId)
|
|
3108
|
+
: isSet(object.account_user_id)
|
|
3109
|
+
? globalThis.String(object.account_user_id)
|
|
3110
|
+
: "",
|
|
3111
|
+
hostName: isSet(object.hostName)
|
|
3112
|
+
? globalThis.String(object.hostName)
|
|
3113
|
+
: isSet(object.host_name)
|
|
3114
|
+
? globalThis.String(object.host_name)
|
|
3115
|
+
: "",
|
|
3116
|
+
firstSeen: isSet(object.firstSeen)
|
|
3117
|
+
? fromJsonTimestamp(object.firstSeen)
|
|
3118
|
+
: isSet(object.first_seen)
|
|
3119
|
+
? fromJsonTimestamp(object.first_seen)
|
|
3120
|
+
: undefined,
|
|
3121
|
+
lastSeen: isSet(object.lastSeen)
|
|
3122
|
+
? fromJsonTimestamp(object.lastSeen)
|
|
3123
|
+
: isSet(object.last_seen)
|
|
3124
|
+
? fromJsonTimestamp(object.last_seen)
|
|
3125
|
+
: undefined,
|
|
3126
|
+
termaVersion: isSet(object.termaVersion)
|
|
3127
|
+
? globalThis.String(object.termaVersion)
|
|
3128
|
+
: isSet(object.terma_version)
|
|
3129
|
+
? globalThis.String(object.terma_version)
|
|
3130
|
+
: "",
|
|
3131
|
+
launch: isSet(object.launch) ? globalThis.String(object.launch) : "",
|
|
3132
|
+
reason: isSet(object.reason) ? globalThis.String(object.reason) : "",
|
|
3133
|
+
exitReason: isSet(object.exitReason)
|
|
3134
|
+
? globalThis.String(object.exitReason)
|
|
3135
|
+
: isSet(object.exit_reason)
|
|
3136
|
+
? globalThis.String(object.exit_reason)
|
|
3137
|
+
: "",
|
|
3138
|
+
miradorApiKeyId: isSet(object.miradorApiKeyId)
|
|
3139
|
+
? globalThis.String(object.miradorApiKeyId)
|
|
3140
|
+
: isSet(object.mirador_api_key_id)
|
|
3141
|
+
? globalThis.String(object.mirador_api_key_id)
|
|
3142
|
+
: "",
|
|
3143
|
+
counters: isObject(object.counters)
|
|
3144
|
+
? (globalThis.Object.entries(object.counters) as [string, any][]).reduce(
|
|
3145
|
+
(acc: { [key: string]: number }, [key, value]: [string, any]) => {
|
|
3146
|
+
globalThis.Object.defineProperty(acc, key, {
|
|
3147
|
+
value: globalThis.Number(value),
|
|
3148
|
+
enumerable: true,
|
|
3149
|
+
configurable: true,
|
|
3150
|
+
writable: true,
|
|
3151
|
+
});
|
|
3152
|
+
return acc;
|
|
3153
|
+
},
|
|
3154
|
+
{},
|
|
3155
|
+
)
|
|
3156
|
+
: {},
|
|
3157
|
+
};
|
|
3158
|
+
},
|
|
3159
|
+
|
|
3160
|
+
toJSON(message: AdminRelayHeartbeat): unknown {
|
|
3161
|
+
const obj: any = {};
|
|
3162
|
+
if (message.organizationId !== "") {
|
|
3163
|
+
obj.organizationId = message.organizationId;
|
|
3164
|
+
}
|
|
3165
|
+
if (message.projectId !== "") {
|
|
3166
|
+
obj.projectId = message.projectId;
|
|
3167
|
+
}
|
|
3168
|
+
if (message.accountUserId !== "") {
|
|
3169
|
+
obj.accountUserId = message.accountUserId;
|
|
3170
|
+
}
|
|
3171
|
+
if (message.hostName !== "") {
|
|
3172
|
+
obj.hostName = message.hostName;
|
|
3173
|
+
}
|
|
3174
|
+
if (message.firstSeen !== undefined) {
|
|
3175
|
+
obj.firstSeen = message.firstSeen.toISOString();
|
|
3176
|
+
}
|
|
3177
|
+
if (message.lastSeen !== undefined) {
|
|
3178
|
+
obj.lastSeen = message.lastSeen.toISOString();
|
|
3179
|
+
}
|
|
3180
|
+
if (message.termaVersion !== "") {
|
|
3181
|
+
obj.termaVersion = message.termaVersion;
|
|
3182
|
+
}
|
|
3183
|
+
if (message.launch !== "") {
|
|
3184
|
+
obj.launch = message.launch;
|
|
3185
|
+
}
|
|
3186
|
+
if (message.reason !== "") {
|
|
3187
|
+
obj.reason = message.reason;
|
|
3188
|
+
}
|
|
3189
|
+
if (message.exitReason !== "") {
|
|
3190
|
+
obj.exitReason = message.exitReason;
|
|
3191
|
+
}
|
|
3192
|
+
if (message.miradorApiKeyId !== "") {
|
|
3193
|
+
obj.miradorApiKeyId = message.miradorApiKeyId;
|
|
3194
|
+
}
|
|
3195
|
+
if (message.counters) {
|
|
3196
|
+
const entries = globalThis.Object.entries(message.counters) as [string, number][];
|
|
3197
|
+
if (entries.length > 0) {
|
|
3198
|
+
obj.counters = {};
|
|
3199
|
+
entries.forEach(([k, v]) => {
|
|
3200
|
+
obj.counters[k] = Math.round(v);
|
|
3201
|
+
});
|
|
3202
|
+
}
|
|
3203
|
+
}
|
|
3204
|
+
return obj;
|
|
3205
|
+
},
|
|
3206
|
+
|
|
3207
|
+
create<I extends Exact<DeepPartial<AdminRelayHeartbeat>, I>>(base?: I): AdminRelayHeartbeat {
|
|
3208
|
+
return AdminRelayHeartbeat.fromPartial(base ?? ({} as any));
|
|
3209
|
+
},
|
|
3210
|
+
fromPartial<I extends Exact<DeepPartial<AdminRelayHeartbeat>, I>>(object: I): AdminRelayHeartbeat {
|
|
3211
|
+
const message = createBaseAdminRelayHeartbeat();
|
|
3212
|
+
message.organizationId = object.organizationId ?? "";
|
|
3213
|
+
message.projectId = object.projectId ?? "";
|
|
3214
|
+
message.accountUserId = object.accountUserId ?? "";
|
|
3215
|
+
message.hostName = object.hostName ?? "";
|
|
3216
|
+
message.firstSeen = object.firstSeen ?? undefined;
|
|
3217
|
+
message.lastSeen = object.lastSeen ?? undefined;
|
|
3218
|
+
message.termaVersion = object.termaVersion ?? "";
|
|
3219
|
+
message.launch = object.launch ?? "";
|
|
3220
|
+
message.reason = object.reason ?? "";
|
|
3221
|
+
message.exitReason = object.exitReason ?? "";
|
|
3222
|
+
message.miradorApiKeyId = object.miradorApiKeyId ?? "";
|
|
3223
|
+
message.counters = (globalThis.Object.entries(object.counters ?? {}) as [string, number][]).reduce(
|
|
3224
|
+
(acc: { [key: string]: number }, [key, value]: [string, number]) => {
|
|
3225
|
+
if (value !== undefined) {
|
|
3226
|
+
acc[key] = globalThis.Number(value);
|
|
3227
|
+
}
|
|
3228
|
+
return acc;
|
|
3229
|
+
},
|
|
3230
|
+
{},
|
|
3231
|
+
);
|
|
3232
|
+
return message;
|
|
3233
|
+
},
|
|
3234
|
+
};
|
|
3235
|
+
|
|
3236
|
+
function createBaseAdminRelayHeartbeat_CountersEntry(): AdminRelayHeartbeat_CountersEntry {
|
|
3237
|
+
return { key: "", value: 0 };
|
|
3238
|
+
}
|
|
3239
|
+
|
|
3240
|
+
export const AdminRelayHeartbeat_CountersEntry: MessageFns<AdminRelayHeartbeat_CountersEntry> = {
|
|
3241
|
+
encode(message: AdminRelayHeartbeat_CountersEntry, writer: BinaryWriter = new BinaryWriter()): BinaryWriter {
|
|
3242
|
+
if (message.key !== "") {
|
|
3243
|
+
writer.uint32(10).string(message.key);
|
|
3244
|
+
}
|
|
3245
|
+
if (message.value !== 0) {
|
|
3246
|
+
writer.uint32(16).int64(message.value);
|
|
3247
|
+
}
|
|
3248
|
+
return writer;
|
|
3249
|
+
},
|
|
3250
|
+
|
|
3251
|
+
decode(input: BinaryReader | Uint8Array, length?: number): AdminRelayHeartbeat_CountersEntry {
|
|
3252
|
+
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
|
|
3253
|
+
const previousRecursionDepth = (reader as any).__tsProtoDecodeDepth ?? 0;
|
|
3254
|
+
if (previousRecursionDepth >= 100) {
|
|
3255
|
+
throw new globalThis.Error("protobuf decode recursion limit exceeded");
|
|
3256
|
+
}
|
|
3257
|
+
(reader as any).__tsProtoDecodeDepth = previousRecursionDepth + 1;
|
|
3258
|
+
try {
|
|
3259
|
+
const end = length === undefined ? reader.len : reader.pos + length;
|
|
3260
|
+
const message = createBaseAdminRelayHeartbeat_CountersEntry();
|
|
3261
|
+
while (reader.pos < end) {
|
|
3262
|
+
const tag = reader.uint32();
|
|
3263
|
+
switch (tag >>> 3) {
|
|
3264
|
+
case 1: {
|
|
3265
|
+
if (tag !== 10) {
|
|
3266
|
+
break;
|
|
3267
|
+
}
|
|
3268
|
+
|
|
3269
|
+
message.key = reader.string();
|
|
3270
|
+
continue;
|
|
3271
|
+
}
|
|
3272
|
+
case 2: {
|
|
3273
|
+
if (tag !== 16) {
|
|
3274
|
+
break;
|
|
3275
|
+
}
|
|
3276
|
+
|
|
3277
|
+
message.value = longToNumber(reader.int64());
|
|
3278
|
+
continue;
|
|
3279
|
+
}
|
|
3280
|
+
}
|
|
3281
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
3282
|
+
break;
|
|
3283
|
+
}
|
|
3284
|
+
reader.skip(tag & 7);
|
|
3285
|
+
}
|
|
3286
|
+
return message;
|
|
3287
|
+
} finally {
|
|
3288
|
+
(reader as any).__tsProtoDecodeDepth = previousRecursionDepth;
|
|
3289
|
+
}
|
|
3290
|
+
},
|
|
3291
|
+
|
|
3292
|
+
fromJSON(object: any): AdminRelayHeartbeat_CountersEntry {
|
|
3293
|
+
return {
|
|
3294
|
+
key: isSet(object.key) ? globalThis.String(object.key) : "",
|
|
3295
|
+
value: isSet(object.value) ? globalThis.Number(object.value) : 0,
|
|
3296
|
+
};
|
|
3297
|
+
},
|
|
3298
|
+
|
|
3299
|
+
toJSON(message: AdminRelayHeartbeat_CountersEntry): unknown {
|
|
3300
|
+
const obj: any = {};
|
|
3301
|
+
if (message.key !== "") {
|
|
3302
|
+
obj.key = message.key;
|
|
3303
|
+
}
|
|
3304
|
+
if (message.value !== 0) {
|
|
3305
|
+
obj.value = Math.round(message.value);
|
|
3306
|
+
}
|
|
3307
|
+
return obj;
|
|
3308
|
+
},
|
|
3309
|
+
|
|
3310
|
+
create<I extends Exact<DeepPartial<AdminRelayHeartbeat_CountersEntry>, I>>(
|
|
3311
|
+
base?: I,
|
|
3312
|
+
): AdminRelayHeartbeat_CountersEntry {
|
|
3313
|
+
return AdminRelayHeartbeat_CountersEntry.fromPartial(base ?? ({} as any));
|
|
3314
|
+
},
|
|
3315
|
+
fromPartial<I extends Exact<DeepPartial<AdminRelayHeartbeat_CountersEntry>, I>>(
|
|
3316
|
+
object: I,
|
|
3317
|
+
): AdminRelayHeartbeat_CountersEntry {
|
|
3318
|
+
const message = createBaseAdminRelayHeartbeat_CountersEntry();
|
|
3319
|
+
message.key = object.key ?? "";
|
|
3320
|
+
message.value = object.value ?? 0;
|
|
3321
|
+
return message;
|
|
3322
|
+
},
|
|
3323
|
+
};
|
|
3324
|
+
|
|
3325
|
+
function createBaseResolveOrgDetailsRequest(): ResolveOrgDetailsRequest {
|
|
3326
|
+
return { organizationIds: [] };
|
|
3327
|
+
}
|
|
3328
|
+
|
|
3329
|
+
export const ResolveOrgDetailsRequest: MessageFns<ResolveOrgDetailsRequest> = {
|
|
3330
|
+
encode(message: ResolveOrgDetailsRequest, writer: BinaryWriter = new BinaryWriter()): BinaryWriter {
|
|
3331
|
+
for (const v of message.organizationIds) {
|
|
3332
|
+
writer.uint32(10).string(v!);
|
|
3333
|
+
}
|
|
3334
|
+
return writer;
|
|
3335
|
+
},
|
|
3336
|
+
|
|
3337
|
+
decode(input: BinaryReader | Uint8Array, length?: number): ResolveOrgDetailsRequest {
|
|
3338
|
+
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
|
|
3339
|
+
const previousRecursionDepth = (reader as any).__tsProtoDecodeDepth ?? 0;
|
|
3340
|
+
if (previousRecursionDepth >= 100) {
|
|
3341
|
+
throw new globalThis.Error("protobuf decode recursion limit exceeded");
|
|
3342
|
+
}
|
|
3343
|
+
(reader as any).__tsProtoDecodeDepth = previousRecursionDepth + 1;
|
|
3344
|
+
try {
|
|
3345
|
+
const end = length === undefined ? reader.len : reader.pos + length;
|
|
3346
|
+
const message = createBaseResolveOrgDetailsRequest();
|
|
3347
|
+
while (reader.pos < end) {
|
|
3348
|
+
const tag = reader.uint32();
|
|
3349
|
+
switch (tag >>> 3) {
|
|
3350
|
+
case 1: {
|
|
3351
|
+
if (tag !== 10) {
|
|
3352
|
+
break;
|
|
3353
|
+
}
|
|
3354
|
+
|
|
3355
|
+
message.organizationIds.push(reader.string());
|
|
3356
|
+
continue;
|
|
3357
|
+
}
|
|
3358
|
+
}
|
|
3359
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
3360
|
+
break;
|
|
3361
|
+
}
|
|
3362
|
+
reader.skip(tag & 7);
|
|
3363
|
+
}
|
|
3364
|
+
return message;
|
|
3365
|
+
} finally {
|
|
3366
|
+
(reader as any).__tsProtoDecodeDepth = previousRecursionDepth;
|
|
3367
|
+
}
|
|
3368
|
+
},
|
|
3369
|
+
|
|
3370
|
+
fromJSON(object: any): ResolveOrgDetailsRequest {
|
|
3371
|
+
return {
|
|
3372
|
+
organizationIds: globalThis.Array.isArray(object?.organizationIds)
|
|
3373
|
+
? object.organizationIds.map((e: any) => globalThis.String(e))
|
|
3374
|
+
: globalThis.Array.isArray(object?.organization_ids)
|
|
3375
|
+
? object.organization_ids.map((e: any) => globalThis.String(e))
|
|
3376
|
+
: [],
|
|
3377
|
+
};
|
|
3378
|
+
},
|
|
3379
|
+
|
|
3380
|
+
toJSON(message: ResolveOrgDetailsRequest): unknown {
|
|
3381
|
+
const obj: any = {};
|
|
3382
|
+
if (message.organizationIds?.length) {
|
|
3383
|
+
obj.organizationIds = message.organizationIds;
|
|
3384
|
+
}
|
|
3385
|
+
return obj;
|
|
3386
|
+
},
|
|
3387
|
+
|
|
3388
|
+
create<I extends Exact<DeepPartial<ResolveOrgDetailsRequest>, I>>(base?: I): ResolveOrgDetailsRequest {
|
|
3389
|
+
return ResolveOrgDetailsRequest.fromPartial(base ?? ({} as any));
|
|
3390
|
+
},
|
|
3391
|
+
fromPartial<I extends Exact<DeepPartial<ResolveOrgDetailsRequest>, I>>(object: I): ResolveOrgDetailsRequest {
|
|
3392
|
+
const message = createBaseResolveOrgDetailsRequest();
|
|
3393
|
+
message.organizationIds = object.organizationIds?.map((e) => e) || [];
|
|
3394
|
+
return message;
|
|
3395
|
+
},
|
|
3396
|
+
};
|
|
3397
|
+
|
|
3398
|
+
function createBaseResolveOrgDetailsResponse(): ResolveOrgDetailsResponse {
|
|
3399
|
+
return { status: undefined, organizations: [] };
|
|
3400
|
+
}
|
|
3401
|
+
|
|
3402
|
+
export const ResolveOrgDetailsResponse: MessageFns<ResolveOrgDetailsResponse> = {
|
|
3403
|
+
encode(message: ResolveOrgDetailsResponse, writer: BinaryWriter = new BinaryWriter()): BinaryWriter {
|
|
3404
|
+
if (message.status !== undefined) {
|
|
3405
|
+
ResponseStatus.encode(message.status, writer.uint32(10).fork()).join();
|
|
3406
|
+
}
|
|
3407
|
+
for (const v of message.organizations) {
|
|
3408
|
+
OrgDetails.encode(v!, writer.uint32(18).fork()).join();
|
|
3409
|
+
}
|
|
3410
|
+
return writer;
|
|
3411
|
+
},
|
|
3412
|
+
|
|
3413
|
+
decode(input: BinaryReader | Uint8Array, length?: number): ResolveOrgDetailsResponse {
|
|
3414
|
+
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
|
|
3415
|
+
const previousRecursionDepth = (reader as any).__tsProtoDecodeDepth ?? 0;
|
|
3416
|
+
if (previousRecursionDepth >= 100) {
|
|
3417
|
+
throw new globalThis.Error("protobuf decode recursion limit exceeded");
|
|
3418
|
+
}
|
|
3419
|
+
(reader as any).__tsProtoDecodeDepth = previousRecursionDepth + 1;
|
|
3420
|
+
try {
|
|
3421
|
+
const end = length === undefined ? reader.len : reader.pos + length;
|
|
3422
|
+
const message = createBaseResolveOrgDetailsResponse();
|
|
3423
|
+
while (reader.pos < end) {
|
|
3424
|
+
const tag = reader.uint32();
|
|
3425
|
+
switch (tag >>> 3) {
|
|
3426
|
+
case 1: {
|
|
3427
|
+
if (tag !== 10) {
|
|
3428
|
+
break;
|
|
3429
|
+
}
|
|
3430
|
+
|
|
3431
|
+
message.status = ResponseStatus.decode(reader, reader.uint32());
|
|
3432
|
+
continue;
|
|
3433
|
+
}
|
|
3434
|
+
case 2: {
|
|
3435
|
+
if (tag !== 18) {
|
|
3436
|
+
break;
|
|
3437
|
+
}
|
|
3438
|
+
|
|
3439
|
+
message.organizations.push(OrgDetails.decode(reader, reader.uint32()));
|
|
3440
|
+
continue;
|
|
3441
|
+
}
|
|
3442
|
+
}
|
|
3443
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
3444
|
+
break;
|
|
3445
|
+
}
|
|
3446
|
+
reader.skip(tag & 7);
|
|
3447
|
+
}
|
|
3448
|
+
return message;
|
|
3449
|
+
} finally {
|
|
3450
|
+
(reader as any).__tsProtoDecodeDepth = previousRecursionDepth;
|
|
3451
|
+
}
|
|
3452
|
+
},
|
|
3453
|
+
|
|
3454
|
+
fromJSON(object: any): ResolveOrgDetailsResponse {
|
|
3455
|
+
return {
|
|
3456
|
+
status: isSet(object.status) ? ResponseStatus.fromJSON(object.status) : undefined,
|
|
3457
|
+
organizations: globalThis.Array.isArray(object?.organizations)
|
|
3458
|
+
? object.organizations.map((e: any) => OrgDetails.fromJSON(e))
|
|
3459
|
+
: [],
|
|
3460
|
+
};
|
|
3461
|
+
},
|
|
3462
|
+
|
|
3463
|
+
toJSON(message: ResolveOrgDetailsResponse): unknown {
|
|
3464
|
+
const obj: any = {};
|
|
3465
|
+
if (message.status !== undefined) {
|
|
3466
|
+
obj.status = ResponseStatus.toJSON(message.status);
|
|
3467
|
+
}
|
|
3468
|
+
if (message.organizations?.length) {
|
|
3469
|
+
obj.organizations = message.organizations.map((e) => OrgDetails.toJSON(e));
|
|
3470
|
+
}
|
|
3471
|
+
return obj;
|
|
3472
|
+
},
|
|
3473
|
+
|
|
3474
|
+
create<I extends Exact<DeepPartial<ResolveOrgDetailsResponse>, I>>(base?: I): ResolveOrgDetailsResponse {
|
|
3475
|
+
return ResolveOrgDetailsResponse.fromPartial(base ?? ({} as any));
|
|
3476
|
+
},
|
|
3477
|
+
fromPartial<I extends Exact<DeepPartial<ResolveOrgDetailsResponse>, I>>(object: I): ResolveOrgDetailsResponse {
|
|
3478
|
+
const message = createBaseResolveOrgDetailsResponse();
|
|
3479
|
+
message.status = (object.status !== undefined && object.status !== null)
|
|
3480
|
+
? ResponseStatus.fromPartial(object.status)
|
|
3481
|
+
: undefined;
|
|
3482
|
+
message.organizations = object.organizations?.map((e) => OrgDetails.fromPartial(e)) || [];
|
|
3483
|
+
return message;
|
|
3484
|
+
},
|
|
3485
|
+
};
|
|
3486
|
+
|
|
3487
|
+
function createBaseOrgDetails(): OrgDetails {
|
|
3488
|
+
return { organizationId: "", name: "" };
|
|
3489
|
+
}
|
|
3490
|
+
|
|
3491
|
+
export const OrgDetails: MessageFns<OrgDetails> = {
|
|
3492
|
+
encode(message: OrgDetails, writer: BinaryWriter = new BinaryWriter()): BinaryWriter {
|
|
3493
|
+
if (message.organizationId !== "") {
|
|
3494
|
+
writer.uint32(10).string(message.organizationId);
|
|
3495
|
+
}
|
|
3496
|
+
if (message.name !== "") {
|
|
3497
|
+
writer.uint32(18).string(message.name);
|
|
3498
|
+
}
|
|
3499
|
+
return writer;
|
|
3500
|
+
},
|
|
3501
|
+
|
|
3502
|
+
decode(input: BinaryReader | Uint8Array, length?: number): OrgDetails {
|
|
3503
|
+
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
|
|
3504
|
+
const previousRecursionDepth = (reader as any).__tsProtoDecodeDepth ?? 0;
|
|
3505
|
+
if (previousRecursionDepth >= 100) {
|
|
3506
|
+
throw new globalThis.Error("protobuf decode recursion limit exceeded");
|
|
3507
|
+
}
|
|
3508
|
+
(reader as any).__tsProtoDecodeDepth = previousRecursionDepth + 1;
|
|
3509
|
+
try {
|
|
3510
|
+
const end = length === undefined ? reader.len : reader.pos + length;
|
|
3511
|
+
const message = createBaseOrgDetails();
|
|
3512
|
+
while (reader.pos < end) {
|
|
3513
|
+
const tag = reader.uint32();
|
|
3514
|
+
switch (tag >>> 3) {
|
|
3515
|
+
case 1: {
|
|
3516
|
+
if (tag !== 10) {
|
|
3517
|
+
break;
|
|
3518
|
+
}
|
|
3519
|
+
|
|
3520
|
+
message.organizationId = reader.string();
|
|
3521
|
+
continue;
|
|
3522
|
+
}
|
|
3523
|
+
case 2: {
|
|
3524
|
+
if (tag !== 18) {
|
|
3525
|
+
break;
|
|
3526
|
+
}
|
|
3527
|
+
|
|
3528
|
+
message.name = reader.string();
|
|
3529
|
+
continue;
|
|
3530
|
+
}
|
|
3531
|
+
}
|
|
3532
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
3533
|
+
break;
|
|
3534
|
+
}
|
|
3535
|
+
reader.skip(tag & 7);
|
|
3536
|
+
}
|
|
3537
|
+
return message;
|
|
3538
|
+
} finally {
|
|
3539
|
+
(reader as any).__tsProtoDecodeDepth = previousRecursionDepth;
|
|
3540
|
+
}
|
|
3541
|
+
},
|
|
3542
|
+
|
|
3543
|
+
fromJSON(object: any): OrgDetails {
|
|
3544
|
+
return {
|
|
3545
|
+
organizationId: isSet(object.organizationId)
|
|
3546
|
+
? globalThis.String(object.organizationId)
|
|
3547
|
+
: isSet(object.organization_id)
|
|
3548
|
+
? globalThis.String(object.organization_id)
|
|
3549
|
+
: "",
|
|
3550
|
+
name: isSet(object.name) ? globalThis.String(object.name) : "",
|
|
3551
|
+
};
|
|
3552
|
+
},
|
|
3553
|
+
|
|
3554
|
+
toJSON(message: OrgDetails): unknown {
|
|
3555
|
+
const obj: any = {};
|
|
3556
|
+
if (message.organizationId !== "") {
|
|
3557
|
+
obj.organizationId = message.organizationId;
|
|
3558
|
+
}
|
|
3559
|
+
if (message.name !== "") {
|
|
3560
|
+
obj.name = message.name;
|
|
3561
|
+
}
|
|
3562
|
+
return obj;
|
|
3563
|
+
},
|
|
3564
|
+
|
|
3565
|
+
create<I extends Exact<DeepPartial<OrgDetails>, I>>(base?: I): OrgDetails {
|
|
3566
|
+
return OrgDetails.fromPartial(base ?? ({} as any));
|
|
3567
|
+
},
|
|
3568
|
+
fromPartial<I extends Exact<DeepPartial<OrgDetails>, I>>(object: I): OrgDetails {
|
|
3569
|
+
const message = createBaseOrgDetails();
|
|
3570
|
+
message.organizationId = object.organizationId ?? "";
|
|
3571
|
+
message.name = object.name ?? "";
|
|
3572
|
+
return message;
|
|
3573
|
+
},
|
|
3574
|
+
};
|
|
3575
|
+
|
|
3576
|
+
function createBaseResolveProjectDetailsRequest(): ResolveProjectDetailsRequest {
|
|
3577
|
+
return { projectIds: [] };
|
|
3578
|
+
}
|
|
3579
|
+
|
|
3580
|
+
export const ResolveProjectDetailsRequest: MessageFns<ResolveProjectDetailsRequest> = {
|
|
3581
|
+
encode(message: ResolveProjectDetailsRequest, writer: BinaryWriter = new BinaryWriter()): BinaryWriter {
|
|
3582
|
+
for (const v of message.projectIds) {
|
|
3583
|
+
writer.uint32(10).string(v!);
|
|
3584
|
+
}
|
|
3585
|
+
return writer;
|
|
3586
|
+
},
|
|
3587
|
+
|
|
3588
|
+
decode(input: BinaryReader | Uint8Array, length?: number): ResolveProjectDetailsRequest {
|
|
3589
|
+
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
|
|
3590
|
+
const previousRecursionDepth = (reader as any).__tsProtoDecodeDepth ?? 0;
|
|
3591
|
+
if (previousRecursionDepth >= 100) {
|
|
3592
|
+
throw new globalThis.Error("protobuf decode recursion limit exceeded");
|
|
3593
|
+
}
|
|
3594
|
+
(reader as any).__tsProtoDecodeDepth = previousRecursionDepth + 1;
|
|
3595
|
+
try {
|
|
3596
|
+
const end = length === undefined ? reader.len : reader.pos + length;
|
|
3597
|
+
const message = createBaseResolveProjectDetailsRequest();
|
|
3598
|
+
while (reader.pos < end) {
|
|
3599
|
+
const tag = reader.uint32();
|
|
3600
|
+
switch (tag >>> 3) {
|
|
3601
|
+
case 1: {
|
|
3602
|
+
if (tag !== 10) {
|
|
3603
|
+
break;
|
|
3604
|
+
}
|
|
3605
|
+
|
|
3606
|
+
message.projectIds.push(reader.string());
|
|
3607
|
+
continue;
|
|
3608
|
+
}
|
|
3609
|
+
}
|
|
3610
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
3611
|
+
break;
|
|
3612
|
+
}
|
|
3613
|
+
reader.skip(tag & 7);
|
|
3614
|
+
}
|
|
3615
|
+
return message;
|
|
3616
|
+
} finally {
|
|
3617
|
+
(reader as any).__tsProtoDecodeDepth = previousRecursionDepth;
|
|
3618
|
+
}
|
|
3619
|
+
},
|
|
3620
|
+
|
|
3621
|
+
fromJSON(object: any): ResolveProjectDetailsRequest {
|
|
3622
|
+
return {
|
|
3623
|
+
projectIds: globalThis.Array.isArray(object?.projectIds)
|
|
3624
|
+
? object.projectIds.map((e: any) => globalThis.String(e))
|
|
3625
|
+
: globalThis.Array.isArray(object?.project_ids)
|
|
3626
|
+
? object.project_ids.map((e: any) => globalThis.String(e))
|
|
3627
|
+
: [],
|
|
3628
|
+
};
|
|
3629
|
+
},
|
|
3630
|
+
|
|
3631
|
+
toJSON(message: ResolveProjectDetailsRequest): unknown {
|
|
3632
|
+
const obj: any = {};
|
|
3633
|
+
if (message.projectIds?.length) {
|
|
3634
|
+
obj.projectIds = message.projectIds;
|
|
3635
|
+
}
|
|
3636
|
+
return obj;
|
|
3637
|
+
},
|
|
3638
|
+
|
|
3639
|
+
create<I extends Exact<DeepPartial<ResolveProjectDetailsRequest>, I>>(base?: I): ResolveProjectDetailsRequest {
|
|
3640
|
+
return ResolveProjectDetailsRequest.fromPartial(base ?? ({} as any));
|
|
3641
|
+
},
|
|
3642
|
+
fromPartial<I extends Exact<DeepPartial<ResolveProjectDetailsRequest>, I>>(object: I): ResolveProjectDetailsRequest {
|
|
3643
|
+
const message = createBaseResolveProjectDetailsRequest();
|
|
3644
|
+
message.projectIds = object.projectIds?.map((e) => e) || [];
|
|
3645
|
+
return message;
|
|
3646
|
+
},
|
|
3647
|
+
};
|
|
3648
|
+
|
|
3649
|
+
function createBaseResolveProjectDetailsResponse(): ResolveProjectDetailsResponse {
|
|
3650
|
+
return { status: undefined, projects: [] };
|
|
3651
|
+
}
|
|
3652
|
+
|
|
3653
|
+
export const ResolveProjectDetailsResponse: MessageFns<ResolveProjectDetailsResponse> = {
|
|
3654
|
+
encode(message: ResolveProjectDetailsResponse, writer: BinaryWriter = new BinaryWriter()): BinaryWriter {
|
|
3655
|
+
if (message.status !== undefined) {
|
|
3656
|
+
ResponseStatus.encode(message.status, writer.uint32(10).fork()).join();
|
|
3657
|
+
}
|
|
3658
|
+
for (const v of message.projects) {
|
|
3659
|
+
ProjectDetails.encode(v!, writer.uint32(18).fork()).join();
|
|
3660
|
+
}
|
|
3661
|
+
return writer;
|
|
3662
|
+
},
|
|
3663
|
+
|
|
3664
|
+
decode(input: BinaryReader | Uint8Array, length?: number): ResolveProjectDetailsResponse {
|
|
3665
|
+
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
|
|
3666
|
+
const previousRecursionDepth = (reader as any).__tsProtoDecodeDepth ?? 0;
|
|
3667
|
+
if (previousRecursionDepth >= 100) {
|
|
3668
|
+
throw new globalThis.Error("protobuf decode recursion limit exceeded");
|
|
3669
|
+
}
|
|
3670
|
+
(reader as any).__tsProtoDecodeDepth = previousRecursionDepth + 1;
|
|
3671
|
+
try {
|
|
3672
|
+
const end = length === undefined ? reader.len : reader.pos + length;
|
|
3673
|
+
const message = createBaseResolveProjectDetailsResponse();
|
|
3674
|
+
while (reader.pos < end) {
|
|
3675
|
+
const tag = reader.uint32();
|
|
3676
|
+
switch (tag >>> 3) {
|
|
3677
|
+
case 1: {
|
|
3678
|
+
if (tag !== 10) {
|
|
3679
|
+
break;
|
|
3680
|
+
}
|
|
3681
|
+
|
|
3682
|
+
message.status = ResponseStatus.decode(reader, reader.uint32());
|
|
3683
|
+
continue;
|
|
3684
|
+
}
|
|
3685
|
+
case 2: {
|
|
3686
|
+
if (tag !== 18) {
|
|
3687
|
+
break;
|
|
3688
|
+
}
|
|
3689
|
+
|
|
3690
|
+
message.projects.push(ProjectDetails.decode(reader, reader.uint32()));
|
|
3691
|
+
continue;
|
|
3692
|
+
}
|
|
3693
|
+
}
|
|
3694
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
3695
|
+
break;
|
|
3696
|
+
}
|
|
3697
|
+
reader.skip(tag & 7);
|
|
3698
|
+
}
|
|
3699
|
+
return message;
|
|
3700
|
+
} finally {
|
|
3701
|
+
(reader as any).__tsProtoDecodeDepth = previousRecursionDepth;
|
|
3702
|
+
}
|
|
3703
|
+
},
|
|
3704
|
+
|
|
3705
|
+
fromJSON(object: any): ResolveProjectDetailsResponse {
|
|
3706
|
+
return {
|
|
3707
|
+
status: isSet(object.status) ? ResponseStatus.fromJSON(object.status) : undefined,
|
|
3708
|
+
projects: globalThis.Array.isArray(object?.projects)
|
|
3709
|
+
? object.projects.map((e: any) => ProjectDetails.fromJSON(e))
|
|
3710
|
+
: [],
|
|
3711
|
+
};
|
|
3712
|
+
},
|
|
3713
|
+
|
|
3714
|
+
toJSON(message: ResolveProjectDetailsResponse): unknown {
|
|
3715
|
+
const obj: any = {};
|
|
3716
|
+
if (message.status !== undefined) {
|
|
3717
|
+
obj.status = ResponseStatus.toJSON(message.status);
|
|
3718
|
+
}
|
|
3719
|
+
if (message.projects?.length) {
|
|
3720
|
+
obj.projects = message.projects.map((e) => ProjectDetails.toJSON(e));
|
|
3721
|
+
}
|
|
3722
|
+
return obj;
|
|
3723
|
+
},
|
|
3724
|
+
|
|
3725
|
+
create<I extends Exact<DeepPartial<ResolveProjectDetailsResponse>, I>>(base?: I): ResolveProjectDetailsResponse {
|
|
3726
|
+
return ResolveProjectDetailsResponse.fromPartial(base ?? ({} as any));
|
|
3727
|
+
},
|
|
3728
|
+
fromPartial<I extends Exact<DeepPartial<ResolveProjectDetailsResponse>, I>>(
|
|
3729
|
+
object: I,
|
|
3730
|
+
): ResolveProjectDetailsResponse {
|
|
3731
|
+
const message = createBaseResolveProjectDetailsResponse();
|
|
3732
|
+
message.status = (object.status !== undefined && object.status !== null)
|
|
3733
|
+
? ResponseStatus.fromPartial(object.status)
|
|
3734
|
+
: undefined;
|
|
3735
|
+
message.projects = object.projects?.map((e) => ProjectDetails.fromPartial(e)) || [];
|
|
3736
|
+
return message;
|
|
3737
|
+
},
|
|
3738
|
+
};
|
|
3739
|
+
|
|
3740
|
+
function createBaseProjectDetails(): ProjectDetails {
|
|
3741
|
+
return { projectId: "", organizationId: "", name: "" };
|
|
3742
|
+
}
|
|
3743
|
+
|
|
3744
|
+
export const ProjectDetails: MessageFns<ProjectDetails> = {
|
|
3745
|
+
encode(message: ProjectDetails, writer: BinaryWriter = new BinaryWriter()): BinaryWriter {
|
|
3746
|
+
if (message.projectId !== "") {
|
|
3747
|
+
writer.uint32(10).string(message.projectId);
|
|
3748
|
+
}
|
|
3749
|
+
if (message.organizationId !== "") {
|
|
3750
|
+
writer.uint32(18).string(message.organizationId);
|
|
3751
|
+
}
|
|
3752
|
+
if (message.name !== "") {
|
|
3753
|
+
writer.uint32(26).string(message.name);
|
|
3754
|
+
}
|
|
3755
|
+
return writer;
|
|
3756
|
+
},
|
|
3757
|
+
|
|
3758
|
+
decode(input: BinaryReader | Uint8Array, length?: number): ProjectDetails {
|
|
3759
|
+
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
|
|
3760
|
+
const previousRecursionDepth = (reader as any).__tsProtoDecodeDepth ?? 0;
|
|
3761
|
+
if (previousRecursionDepth >= 100) {
|
|
3762
|
+
throw new globalThis.Error("protobuf decode recursion limit exceeded");
|
|
3763
|
+
}
|
|
3764
|
+
(reader as any).__tsProtoDecodeDepth = previousRecursionDepth + 1;
|
|
3765
|
+
try {
|
|
3766
|
+
const end = length === undefined ? reader.len : reader.pos + length;
|
|
3767
|
+
const message = createBaseProjectDetails();
|
|
3768
|
+
while (reader.pos < end) {
|
|
3769
|
+
const tag = reader.uint32();
|
|
3770
|
+
switch (tag >>> 3) {
|
|
3771
|
+
case 1: {
|
|
3772
|
+
if (tag !== 10) {
|
|
3773
|
+
break;
|
|
3774
|
+
}
|
|
3775
|
+
|
|
3776
|
+
message.projectId = reader.string();
|
|
3777
|
+
continue;
|
|
3778
|
+
}
|
|
3779
|
+
case 2: {
|
|
3780
|
+
if (tag !== 18) {
|
|
3781
|
+
break;
|
|
3782
|
+
}
|
|
3783
|
+
|
|
3784
|
+
message.organizationId = reader.string();
|
|
3785
|
+
continue;
|
|
3786
|
+
}
|
|
3787
|
+
case 3: {
|
|
3788
|
+
if (tag !== 26) {
|
|
3789
|
+
break;
|
|
3790
|
+
}
|
|
3791
|
+
|
|
3792
|
+
message.name = reader.string();
|
|
3793
|
+
continue;
|
|
3794
|
+
}
|
|
3795
|
+
}
|
|
3796
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
3797
|
+
break;
|
|
3798
|
+
}
|
|
3799
|
+
reader.skip(tag & 7);
|
|
3800
|
+
}
|
|
3801
|
+
return message;
|
|
3802
|
+
} finally {
|
|
3803
|
+
(reader as any).__tsProtoDecodeDepth = previousRecursionDepth;
|
|
3804
|
+
}
|
|
3805
|
+
},
|
|
3806
|
+
|
|
3807
|
+
fromJSON(object: any): ProjectDetails {
|
|
3808
|
+
return {
|
|
3809
|
+
projectId: isSet(object.projectId)
|
|
3810
|
+
? globalThis.String(object.projectId)
|
|
3811
|
+
: isSet(object.project_id)
|
|
3812
|
+
? globalThis.String(object.project_id)
|
|
3813
|
+
: "",
|
|
3814
|
+
organizationId: isSet(object.organizationId)
|
|
3815
|
+
? globalThis.String(object.organizationId)
|
|
3816
|
+
: isSet(object.organization_id)
|
|
3817
|
+
? globalThis.String(object.organization_id)
|
|
3818
|
+
: "",
|
|
3819
|
+
name: isSet(object.name) ? globalThis.String(object.name) : "",
|
|
3820
|
+
};
|
|
3821
|
+
},
|
|
3822
|
+
|
|
3823
|
+
toJSON(message: ProjectDetails): unknown {
|
|
3824
|
+
const obj: any = {};
|
|
3825
|
+
if (message.projectId !== "") {
|
|
3826
|
+
obj.projectId = message.projectId;
|
|
3827
|
+
}
|
|
3828
|
+
if (message.organizationId !== "") {
|
|
3829
|
+
obj.organizationId = message.organizationId;
|
|
3830
|
+
}
|
|
3831
|
+
if (message.name !== "") {
|
|
3832
|
+
obj.name = message.name;
|
|
3833
|
+
}
|
|
3834
|
+
return obj;
|
|
3835
|
+
},
|
|
3836
|
+
|
|
3837
|
+
create<I extends Exact<DeepPartial<ProjectDetails>, I>>(base?: I): ProjectDetails {
|
|
3838
|
+
return ProjectDetails.fromPartial(base ?? ({} as any));
|
|
3839
|
+
},
|
|
3840
|
+
fromPartial<I extends Exact<DeepPartial<ProjectDetails>, I>>(object: I): ProjectDetails {
|
|
3841
|
+
const message = createBaseProjectDetails();
|
|
3842
|
+
message.projectId = object.projectId ?? "";
|
|
3843
|
+
message.organizationId = object.organizationId ?? "";
|
|
3844
|
+
message.name = object.name ?? "";
|
|
3845
|
+
return message;
|
|
3846
|
+
},
|
|
3847
|
+
};
|
|
3848
|
+
|
|
3849
|
+
function createBaseResolveUserDetailsRequest(): ResolveUserDetailsRequest {
|
|
3850
|
+
return { userId: "" };
|
|
3851
|
+
}
|
|
3852
|
+
|
|
3853
|
+
export const ResolveUserDetailsRequest: MessageFns<ResolveUserDetailsRequest> = {
|
|
3854
|
+
encode(message: ResolveUserDetailsRequest, writer: BinaryWriter = new BinaryWriter()): BinaryWriter {
|
|
3855
|
+
if (message.userId !== "") {
|
|
3856
|
+
writer.uint32(10).string(message.userId);
|
|
3857
|
+
}
|
|
3858
|
+
return writer;
|
|
3859
|
+
},
|
|
3860
|
+
|
|
3861
|
+
decode(input: BinaryReader | Uint8Array, length?: number): ResolveUserDetailsRequest {
|
|
3862
|
+
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
|
|
3863
|
+
const previousRecursionDepth = (reader as any).__tsProtoDecodeDepth ?? 0;
|
|
3864
|
+
if (previousRecursionDepth >= 100) {
|
|
3865
|
+
throw new globalThis.Error("protobuf decode recursion limit exceeded");
|
|
3866
|
+
}
|
|
3867
|
+
(reader as any).__tsProtoDecodeDepth = previousRecursionDepth + 1;
|
|
3868
|
+
try {
|
|
3869
|
+
const end = length === undefined ? reader.len : reader.pos + length;
|
|
3870
|
+
const message = createBaseResolveUserDetailsRequest();
|
|
3871
|
+
while (reader.pos < end) {
|
|
3872
|
+
const tag = reader.uint32();
|
|
3873
|
+
switch (tag >>> 3) {
|
|
3874
|
+
case 1: {
|
|
3875
|
+
if (tag !== 10) {
|
|
3876
|
+
break;
|
|
3877
|
+
}
|
|
3878
|
+
|
|
3879
|
+
message.userId = reader.string();
|
|
3880
|
+
continue;
|
|
3881
|
+
}
|
|
3882
|
+
}
|
|
3883
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
3884
|
+
break;
|
|
3885
|
+
}
|
|
3886
|
+
reader.skip(tag & 7);
|
|
3887
|
+
}
|
|
3888
|
+
return message;
|
|
3889
|
+
} finally {
|
|
3890
|
+
(reader as any).__tsProtoDecodeDepth = previousRecursionDepth;
|
|
3891
|
+
}
|
|
3892
|
+
},
|
|
3893
|
+
|
|
3894
|
+
fromJSON(object: any): ResolveUserDetailsRequest {
|
|
3895
|
+
return {
|
|
3896
|
+
userId: isSet(object.userId)
|
|
3897
|
+
? globalThis.String(object.userId)
|
|
3898
|
+
: isSet(object.user_id)
|
|
3899
|
+
? globalThis.String(object.user_id)
|
|
3900
|
+
: "",
|
|
3901
|
+
};
|
|
3902
|
+
},
|
|
3903
|
+
|
|
3904
|
+
toJSON(message: ResolveUserDetailsRequest): unknown {
|
|
3905
|
+
const obj: any = {};
|
|
3906
|
+
if (message.userId !== "") {
|
|
3907
|
+
obj.userId = message.userId;
|
|
3908
|
+
}
|
|
3909
|
+
return obj;
|
|
3910
|
+
},
|
|
3911
|
+
|
|
3912
|
+
create<I extends Exact<DeepPartial<ResolveUserDetailsRequest>, I>>(base?: I): ResolveUserDetailsRequest {
|
|
3913
|
+
return ResolveUserDetailsRequest.fromPartial(base ?? ({} as any));
|
|
3914
|
+
},
|
|
3915
|
+
fromPartial<I extends Exact<DeepPartial<ResolveUserDetailsRequest>, I>>(object: I): ResolveUserDetailsRequest {
|
|
3916
|
+
const message = createBaseResolveUserDetailsRequest();
|
|
3917
|
+
message.userId = object.userId ?? "";
|
|
3918
|
+
return message;
|
|
3919
|
+
},
|
|
3920
|
+
};
|
|
3921
|
+
|
|
3922
|
+
function createBaseResolveUserDetailsResponse(): ResolveUserDetailsResponse {
|
|
3923
|
+
return { status: undefined, user: undefined };
|
|
3924
|
+
}
|
|
3925
|
+
|
|
3926
|
+
export const ResolveUserDetailsResponse: MessageFns<ResolveUserDetailsResponse> = {
|
|
3927
|
+
encode(message: ResolveUserDetailsResponse, writer: BinaryWriter = new BinaryWriter()): BinaryWriter {
|
|
3928
|
+
if (message.status !== undefined) {
|
|
3929
|
+
ResponseStatus.encode(message.status, writer.uint32(10).fork()).join();
|
|
3930
|
+
}
|
|
3931
|
+
if (message.user !== undefined) {
|
|
3932
|
+
UserDetails.encode(message.user, writer.uint32(18).fork()).join();
|
|
3933
|
+
}
|
|
3934
|
+
return writer;
|
|
3935
|
+
},
|
|
3936
|
+
|
|
3937
|
+
decode(input: BinaryReader | Uint8Array, length?: number): ResolveUserDetailsResponse {
|
|
3938
|
+
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
|
|
3939
|
+
const previousRecursionDepth = (reader as any).__tsProtoDecodeDepth ?? 0;
|
|
3940
|
+
if (previousRecursionDepth >= 100) {
|
|
3941
|
+
throw new globalThis.Error("protobuf decode recursion limit exceeded");
|
|
3942
|
+
}
|
|
3943
|
+
(reader as any).__tsProtoDecodeDepth = previousRecursionDepth + 1;
|
|
3944
|
+
try {
|
|
3945
|
+
const end = length === undefined ? reader.len : reader.pos + length;
|
|
3946
|
+
const message = createBaseResolveUserDetailsResponse();
|
|
3947
|
+
while (reader.pos < end) {
|
|
3948
|
+
const tag = reader.uint32();
|
|
3949
|
+
switch (tag >>> 3) {
|
|
3950
|
+
case 1: {
|
|
3951
|
+
if (tag !== 10) {
|
|
3952
|
+
break;
|
|
3953
|
+
}
|
|
3954
|
+
|
|
3955
|
+
message.status = ResponseStatus.decode(reader, reader.uint32());
|
|
3956
|
+
continue;
|
|
3957
|
+
}
|
|
3958
|
+
case 2: {
|
|
3959
|
+
if (tag !== 18) {
|
|
3960
|
+
break;
|
|
3961
|
+
}
|
|
3962
|
+
|
|
3963
|
+
message.user = UserDetails.decode(reader, reader.uint32());
|
|
3964
|
+
continue;
|
|
3965
|
+
}
|
|
3966
|
+
}
|
|
3967
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
3968
|
+
break;
|
|
3969
|
+
}
|
|
3970
|
+
reader.skip(tag & 7);
|
|
3971
|
+
}
|
|
3972
|
+
return message;
|
|
3973
|
+
} finally {
|
|
3974
|
+
(reader as any).__tsProtoDecodeDepth = previousRecursionDepth;
|
|
3975
|
+
}
|
|
3976
|
+
},
|
|
3977
|
+
|
|
3978
|
+
fromJSON(object: any): ResolveUserDetailsResponse {
|
|
3979
|
+
return {
|
|
3980
|
+
status: isSet(object.status) ? ResponseStatus.fromJSON(object.status) : undefined,
|
|
3981
|
+
user: isSet(object.user) ? UserDetails.fromJSON(object.user) : undefined,
|
|
3982
|
+
};
|
|
3983
|
+
},
|
|
3984
|
+
|
|
3985
|
+
toJSON(message: ResolveUserDetailsResponse): unknown {
|
|
3986
|
+
const obj: any = {};
|
|
3987
|
+
if (message.status !== undefined) {
|
|
3988
|
+
obj.status = ResponseStatus.toJSON(message.status);
|
|
3989
|
+
}
|
|
3990
|
+
if (message.user !== undefined) {
|
|
3991
|
+
obj.user = UserDetails.toJSON(message.user);
|
|
3992
|
+
}
|
|
3993
|
+
return obj;
|
|
3994
|
+
},
|
|
3995
|
+
|
|
3996
|
+
create<I extends Exact<DeepPartial<ResolveUserDetailsResponse>, I>>(base?: I): ResolveUserDetailsResponse {
|
|
3997
|
+
return ResolveUserDetailsResponse.fromPartial(base ?? ({} as any));
|
|
3998
|
+
},
|
|
3999
|
+
fromPartial<I extends Exact<DeepPartial<ResolveUserDetailsResponse>, I>>(object: I): ResolveUserDetailsResponse {
|
|
4000
|
+
const message = createBaseResolveUserDetailsResponse();
|
|
4001
|
+
message.status = (object.status !== undefined && object.status !== null)
|
|
4002
|
+
? ResponseStatus.fromPartial(object.status)
|
|
4003
|
+
: undefined;
|
|
4004
|
+
message.user = (object.user !== undefined && object.user !== null)
|
|
4005
|
+
? UserDetails.fromPartial(object.user)
|
|
4006
|
+
: undefined;
|
|
4007
|
+
return message;
|
|
4008
|
+
},
|
|
4009
|
+
};
|
|
4010
|
+
|
|
4011
|
+
function createBaseUserDetails(): UserDetails {
|
|
4012
|
+
return { userId: "", email: "", name: "" };
|
|
4013
|
+
}
|
|
4014
|
+
|
|
4015
|
+
export const UserDetails: MessageFns<UserDetails> = {
|
|
4016
|
+
encode(message: UserDetails, writer: BinaryWriter = new BinaryWriter()): BinaryWriter {
|
|
4017
|
+
if (message.userId !== "") {
|
|
4018
|
+
writer.uint32(10).string(message.userId);
|
|
4019
|
+
}
|
|
4020
|
+
if (message.email !== "") {
|
|
4021
|
+
writer.uint32(18).string(message.email);
|
|
4022
|
+
}
|
|
4023
|
+
if (message.name !== "") {
|
|
4024
|
+
writer.uint32(26).string(message.name);
|
|
4025
|
+
}
|
|
4026
|
+
return writer;
|
|
4027
|
+
},
|
|
4028
|
+
|
|
4029
|
+
decode(input: BinaryReader | Uint8Array, length?: number): UserDetails {
|
|
4030
|
+
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
|
|
4031
|
+
const previousRecursionDepth = (reader as any).__tsProtoDecodeDepth ?? 0;
|
|
4032
|
+
if (previousRecursionDepth >= 100) {
|
|
4033
|
+
throw new globalThis.Error("protobuf decode recursion limit exceeded");
|
|
4034
|
+
}
|
|
4035
|
+
(reader as any).__tsProtoDecodeDepth = previousRecursionDepth + 1;
|
|
4036
|
+
try {
|
|
4037
|
+
const end = length === undefined ? reader.len : reader.pos + length;
|
|
4038
|
+
const message = createBaseUserDetails();
|
|
4039
|
+
while (reader.pos < end) {
|
|
4040
|
+
const tag = reader.uint32();
|
|
4041
|
+
switch (tag >>> 3) {
|
|
4042
|
+
case 1: {
|
|
4043
|
+
if (tag !== 10) {
|
|
4044
|
+
break;
|
|
4045
|
+
}
|
|
4046
|
+
|
|
4047
|
+
message.userId = reader.string();
|
|
4048
|
+
continue;
|
|
4049
|
+
}
|
|
4050
|
+
case 2: {
|
|
4051
|
+
if (tag !== 18) {
|
|
4052
|
+
break;
|
|
4053
|
+
}
|
|
4054
|
+
|
|
4055
|
+
message.email = reader.string();
|
|
4056
|
+
continue;
|
|
4057
|
+
}
|
|
4058
|
+
case 3: {
|
|
4059
|
+
if (tag !== 26) {
|
|
4060
|
+
break;
|
|
4061
|
+
}
|
|
4062
|
+
|
|
4063
|
+
message.name = reader.string();
|
|
4064
|
+
continue;
|
|
4065
|
+
}
|
|
4066
|
+
}
|
|
4067
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
4068
|
+
break;
|
|
4069
|
+
}
|
|
4070
|
+
reader.skip(tag & 7);
|
|
4071
|
+
}
|
|
4072
|
+
return message;
|
|
4073
|
+
} finally {
|
|
4074
|
+
(reader as any).__tsProtoDecodeDepth = previousRecursionDepth;
|
|
4075
|
+
}
|
|
4076
|
+
},
|
|
4077
|
+
|
|
4078
|
+
fromJSON(object: any): UserDetails {
|
|
4079
|
+
return {
|
|
4080
|
+
userId: isSet(object.userId)
|
|
4081
|
+
? globalThis.String(object.userId)
|
|
4082
|
+
: isSet(object.user_id)
|
|
4083
|
+
? globalThis.String(object.user_id)
|
|
4084
|
+
: "",
|
|
4085
|
+
email: isSet(object.email) ? globalThis.String(object.email) : "",
|
|
4086
|
+
name: isSet(object.name) ? globalThis.String(object.name) : "",
|
|
4087
|
+
};
|
|
4088
|
+
},
|
|
4089
|
+
|
|
4090
|
+
toJSON(message: UserDetails): unknown {
|
|
4091
|
+
const obj: any = {};
|
|
4092
|
+
if (message.userId !== "") {
|
|
4093
|
+
obj.userId = message.userId;
|
|
4094
|
+
}
|
|
4095
|
+
if (message.email !== "") {
|
|
4096
|
+
obj.email = message.email;
|
|
4097
|
+
}
|
|
4098
|
+
if (message.name !== "") {
|
|
4099
|
+
obj.name = message.name;
|
|
4100
|
+
}
|
|
4101
|
+
return obj;
|
|
4102
|
+
},
|
|
4103
|
+
|
|
4104
|
+
create<I extends Exact<DeepPartial<UserDetails>, I>>(base?: I): UserDetails {
|
|
4105
|
+
return UserDetails.fromPartial(base ?? ({} as any));
|
|
4106
|
+
},
|
|
4107
|
+
fromPartial<I extends Exact<DeepPartial<UserDetails>, I>>(object: I): UserDetails {
|
|
4108
|
+
const message = createBaseUserDetails();
|
|
4109
|
+
message.userId = object.userId ?? "";
|
|
4110
|
+
message.email = object.email ?? "";
|
|
4111
|
+
message.name = object.name ?? "";
|
|
4112
|
+
return message;
|
|
4113
|
+
},
|
|
4114
|
+
};
|
|
4115
|
+
|
|
4116
|
+
/**
|
|
4117
|
+
* AdminGatewayService is the browser-facing surface of the admin tools, across every domain, which only
|
|
4118
|
+
* Mirador staff (a verified mirador.org primary email) may use. The gateway's admin gate admits every RPC
|
|
4119
|
+
* here except GetAdminStatus, which tells the frontend whether to show the admin tools at all.
|
|
4120
|
+
*/
|
|
4121
|
+
export interface AdminGatewayService {
|
|
4122
|
+
/** GetAdminStatus reports whether the authenticated caller may use the admin tools. */
|
|
4123
|
+
GetAdminStatus(request: GetAdminStatusRequest, metadata?: Metadata): Promise<GetAdminStatusResponse>;
|
|
4124
|
+
/** Beta invite codes for this gateway's product. */
|
|
4125
|
+
GenerateInviteCodes(request: GenerateInviteCodesRequest, metadata?: Metadata): Promise<GenerateInviteCodesResponse>;
|
|
4126
|
+
ListInviteCodes(request: ListInviteCodesRequest, metadata?: Metadata): Promise<ListInviteCodesResponse>;
|
|
4127
|
+
/** SendInviteCodeEmail emails one available code to an address and records when and to whom it was sent. */
|
|
4128
|
+
SendInviteCodeEmail(request: SendInviteCodeEmailRequest, metadata?: Metadata): Promise<SendInviteCodeEmailResponse>;
|
|
4129
|
+
/**
|
|
4130
|
+
* Staff set a global AI name's display name for every organization. An update makes the name MANUAL; the
|
|
4131
|
+
* model processor never overwrites it. The tables are read through ReferenceGatewayService.
|
|
4132
|
+
*/
|
|
4133
|
+
UpdateAIProvider(request: UpdateAIProviderRequest, metadata?: Metadata): Promise<UpdateAIProviderResponse>;
|
|
4134
|
+
UpdateAIModel(request: UpdateAIModelRequest, metadata?: Metadata): Promise<UpdateAIModelResponse>;
|
|
4135
|
+
UpdateAIEffort(request: UpdateAIEffortRequest, metadata?: Metadata): Promise<UpdateAIEffortResponse>;
|
|
4136
|
+
UpdateAIBiller(request: UpdateAIBillerRequest, metadata?: Metadata): Promise<UpdateAIBillerResponse>;
|
|
4137
|
+
/**
|
|
4138
|
+
* Each Confirm<X> confirms every unreviewed name in the groups a List<X>Groups filter keeps (on every page),
|
|
4139
|
+
* as one Update<X> per name would; it proxies telemetry.api.v1.TelemetryAdminService's Confirm<X>. It
|
|
4140
|
+
* confirms what matches when it runs: compare confirmed_name_count with the count shown. Names are global: an
|
|
4141
|
+
* unset observation also confirms groups none of the organizations reported. Observation OBSERVED keeps only
|
|
4142
|
+
* the groups they reported, and still confirms every unreviewed name in them, including a spelling in the same
|
|
4143
|
+
* group none of them reported.
|
|
4144
|
+
*/
|
|
4145
|
+
ConfirmAIProviders(request: ConfirmAIProvidersRequest, metadata?: Metadata): Promise<ConfirmAIProvidersResponse>;
|
|
4146
|
+
ConfirmAIModels(request: ConfirmAIModelsRequest, metadata?: Metadata): Promise<ConfirmAIModelsResponse>;
|
|
4147
|
+
ConfirmAIEfforts(request: ConfirmAIEffortsRequest, metadata?: Metadata): Promise<ConfirmAIEffortsResponse>;
|
|
4148
|
+
ConfirmAIBillers(request: ConfirmAIBillersRequest, metadata?: Metadata): Promise<ConfirmAIBillersResponse>;
|
|
4149
|
+
/**
|
|
4150
|
+
* Every Terma relay across the fleet with its latest heartbeat in full, one row per (organization, project, user,
|
|
4151
|
+
* host), most recently seen first (keyset-paginated); it proxies
|
|
4152
|
+
* telemetry.api.v1.TelemetryAdminService.ListRelayHeartbeats. Rows carry ids, not names.
|
|
4153
|
+
*/
|
|
4154
|
+
ListRelayHeartbeats(
|
|
4155
|
+
request: ListAdminRelayHeartbeatsRequest,
|
|
4156
|
+
metadata?: Metadata,
|
|
4157
|
+
): Promise<ListAdminRelayHeartbeatsResponse>;
|
|
4158
|
+
/**
|
|
4159
|
+
* ResolveOrgDetails resolves organization ids to their names, in batch, across every organization of this gateway's
|
|
4160
|
+
* product. Unknown ids, and ids of another product, are left out; it never errors on them. A malformed id, or more
|
|
4161
|
+
* than 1000 ids, is a validation error. It proxies account.api.v1.AccountAdminService.ResolveOrgDetails.
|
|
4162
|
+
*/
|
|
4163
|
+
ResolveOrgDetails(request: ResolveOrgDetailsRequest, metadata?: Metadata): Promise<ResolveOrgDetailsResponse>;
|
|
4164
|
+
/**
|
|
4165
|
+
* ResolveProjectDetails resolves project (team) ids to their names, in batch, across every organization of this
|
|
4166
|
+
* gateway's product, deleted projects included. Unknown ids, and ids of another product, are left out; it never
|
|
4167
|
+
* errors on them. A malformed id, or more than 1000 ids, is a validation error. It proxies
|
|
4168
|
+
* account.api.v1.AccountAdminService.ResolveProjectDetails.
|
|
4169
|
+
*/
|
|
4170
|
+
ResolveProjectDetails(
|
|
4171
|
+
request: ResolveProjectDetailsRequest,
|
|
4172
|
+
metadata?: Metadata,
|
|
4173
|
+
): Promise<ResolveProjectDetailsResponse>;
|
|
4174
|
+
/**
|
|
4175
|
+
* ResolveUserDetails resolves one user's email address and name, on demand. An unknown user, or one of another
|
|
4176
|
+
* product, is NOT_FOUND; a malformed or empty id is a validation error; a user directory outage is UNAVAILABLE. It
|
|
4177
|
+
* proxies account.api.v1.AccountAdminService.ResolveUserDetails.
|
|
4178
|
+
*/
|
|
4179
|
+
ResolveUserDetails(request: ResolveUserDetailsRequest, metadata?: Metadata): Promise<ResolveUserDetailsResponse>;
|
|
4180
|
+
}
|
|
4181
|
+
|
|
4182
|
+
export const AdminGatewayServiceServiceName = "gateway.web.v1.AdminGatewayService";
|
|
4183
|
+
export class AdminGatewayServiceClientImpl implements AdminGatewayService {
|
|
4184
|
+
private readonly rpc: Rpc;
|
|
4185
|
+
private readonly service: string;
|
|
4186
|
+
constructor(rpc: Rpc, opts?: { service?: string }) {
|
|
4187
|
+
this.service = opts?.service || AdminGatewayServiceServiceName;
|
|
4188
|
+
this.rpc = rpc;
|
|
4189
|
+
this.GetAdminStatus = this.GetAdminStatus.bind(this);
|
|
4190
|
+
this.GenerateInviteCodes = this.GenerateInviteCodes.bind(this);
|
|
4191
|
+
this.ListInviteCodes = this.ListInviteCodes.bind(this);
|
|
4192
|
+
this.SendInviteCodeEmail = this.SendInviteCodeEmail.bind(this);
|
|
4193
|
+
this.UpdateAIProvider = this.UpdateAIProvider.bind(this);
|
|
4194
|
+
this.UpdateAIModel = this.UpdateAIModel.bind(this);
|
|
4195
|
+
this.UpdateAIEffort = this.UpdateAIEffort.bind(this);
|
|
4196
|
+
this.UpdateAIBiller = this.UpdateAIBiller.bind(this);
|
|
4197
|
+
this.ConfirmAIProviders = this.ConfirmAIProviders.bind(this);
|
|
4198
|
+
this.ConfirmAIModels = this.ConfirmAIModels.bind(this);
|
|
4199
|
+
this.ConfirmAIEfforts = this.ConfirmAIEfforts.bind(this);
|
|
4200
|
+
this.ConfirmAIBillers = this.ConfirmAIBillers.bind(this);
|
|
4201
|
+
this.ListRelayHeartbeats = this.ListRelayHeartbeats.bind(this);
|
|
4202
|
+
this.ResolveOrgDetails = this.ResolveOrgDetails.bind(this);
|
|
4203
|
+
this.ResolveProjectDetails = this.ResolveProjectDetails.bind(this);
|
|
4204
|
+
this.ResolveUserDetails = this.ResolveUserDetails.bind(this);
|
|
4205
|
+
}
|
|
4206
|
+
GetAdminStatus(request: GetAdminStatusRequest, metadata?: Metadata): Promise<GetAdminStatusResponse> {
|
|
4207
|
+
const data = GetAdminStatusRequest.encode(request).finish();
|
|
4208
|
+
const promise = this.rpc.request(this.service, "GetAdminStatus", data, metadata);
|
|
4209
|
+
return promise.then((data) => GetAdminStatusResponse.decode(new BinaryReader(data)));
|
|
4210
|
+
}
|
|
4211
|
+
|
|
4212
|
+
GenerateInviteCodes(request: GenerateInviteCodesRequest, metadata?: Metadata): Promise<GenerateInviteCodesResponse> {
|
|
4213
|
+
const data = GenerateInviteCodesRequest.encode(request).finish();
|
|
4214
|
+
const promise = this.rpc.request(this.service, "GenerateInviteCodes", data, metadata);
|
|
4215
|
+
return promise.then((data) => GenerateInviteCodesResponse.decode(new BinaryReader(data)));
|
|
4216
|
+
}
|
|
4217
|
+
|
|
4218
|
+
ListInviteCodes(request: ListInviteCodesRequest, metadata?: Metadata): Promise<ListInviteCodesResponse> {
|
|
4219
|
+
const data = ListInviteCodesRequest.encode(request).finish();
|
|
4220
|
+
const promise = this.rpc.request(this.service, "ListInviteCodes", data, metadata);
|
|
4221
|
+
return promise.then((data) => ListInviteCodesResponse.decode(new BinaryReader(data)));
|
|
4222
|
+
}
|
|
4223
|
+
|
|
4224
|
+
SendInviteCodeEmail(request: SendInviteCodeEmailRequest, metadata?: Metadata): Promise<SendInviteCodeEmailResponse> {
|
|
4225
|
+
const data = SendInviteCodeEmailRequest.encode(request).finish();
|
|
4226
|
+
const promise = this.rpc.request(this.service, "SendInviteCodeEmail", data, metadata);
|
|
4227
|
+
return promise.then((data) => SendInviteCodeEmailResponse.decode(new BinaryReader(data)));
|
|
4228
|
+
}
|
|
4229
|
+
|
|
4230
|
+
UpdateAIProvider(request: UpdateAIProviderRequest, metadata?: Metadata): Promise<UpdateAIProviderResponse> {
|
|
4231
|
+
const data = UpdateAIProviderRequest.encode(request).finish();
|
|
4232
|
+
const promise = this.rpc.request(this.service, "UpdateAIProvider", data, metadata);
|
|
4233
|
+
return promise.then((data) => UpdateAIProviderResponse.decode(new BinaryReader(data)));
|
|
4234
|
+
}
|
|
4235
|
+
|
|
4236
|
+
UpdateAIModel(request: UpdateAIModelRequest, metadata?: Metadata): Promise<UpdateAIModelResponse> {
|
|
4237
|
+
const data = UpdateAIModelRequest.encode(request).finish();
|
|
4238
|
+
const promise = this.rpc.request(this.service, "UpdateAIModel", data, metadata);
|
|
4239
|
+
return promise.then((data) => UpdateAIModelResponse.decode(new BinaryReader(data)));
|
|
4240
|
+
}
|
|
4241
|
+
|
|
4242
|
+
UpdateAIEffort(request: UpdateAIEffortRequest, metadata?: Metadata): Promise<UpdateAIEffortResponse> {
|
|
4243
|
+
const data = UpdateAIEffortRequest.encode(request).finish();
|
|
4244
|
+
const promise = this.rpc.request(this.service, "UpdateAIEffort", data, metadata);
|
|
4245
|
+
return promise.then((data) => UpdateAIEffortResponse.decode(new BinaryReader(data)));
|
|
4246
|
+
}
|
|
4247
|
+
|
|
4248
|
+
UpdateAIBiller(request: UpdateAIBillerRequest, metadata?: Metadata): Promise<UpdateAIBillerResponse> {
|
|
4249
|
+
const data = UpdateAIBillerRequest.encode(request).finish();
|
|
4250
|
+
const promise = this.rpc.request(this.service, "UpdateAIBiller", data, metadata);
|
|
4251
|
+
return promise.then((data) => UpdateAIBillerResponse.decode(new BinaryReader(data)));
|
|
4252
|
+
}
|
|
4253
|
+
|
|
4254
|
+
ConfirmAIProviders(request: ConfirmAIProvidersRequest, metadata?: Metadata): Promise<ConfirmAIProvidersResponse> {
|
|
4255
|
+
const data = ConfirmAIProvidersRequest.encode(request).finish();
|
|
4256
|
+
const promise = this.rpc.request(this.service, "ConfirmAIProviders", data, metadata);
|
|
4257
|
+
return promise.then((data) => ConfirmAIProvidersResponse.decode(new BinaryReader(data)));
|
|
4258
|
+
}
|
|
4259
|
+
|
|
4260
|
+
ConfirmAIModels(request: ConfirmAIModelsRequest, metadata?: Metadata): Promise<ConfirmAIModelsResponse> {
|
|
4261
|
+
const data = ConfirmAIModelsRequest.encode(request).finish();
|
|
4262
|
+
const promise = this.rpc.request(this.service, "ConfirmAIModels", data, metadata);
|
|
4263
|
+
return promise.then((data) => ConfirmAIModelsResponse.decode(new BinaryReader(data)));
|
|
4264
|
+
}
|
|
4265
|
+
|
|
4266
|
+
ConfirmAIEfforts(request: ConfirmAIEffortsRequest, metadata?: Metadata): Promise<ConfirmAIEffortsResponse> {
|
|
4267
|
+
const data = ConfirmAIEffortsRequest.encode(request).finish();
|
|
4268
|
+
const promise = this.rpc.request(this.service, "ConfirmAIEfforts", data, metadata);
|
|
4269
|
+
return promise.then((data) => ConfirmAIEffortsResponse.decode(new BinaryReader(data)));
|
|
4270
|
+
}
|
|
4271
|
+
|
|
4272
|
+
ConfirmAIBillers(request: ConfirmAIBillersRequest, metadata?: Metadata): Promise<ConfirmAIBillersResponse> {
|
|
4273
|
+
const data = ConfirmAIBillersRequest.encode(request).finish();
|
|
4274
|
+
const promise = this.rpc.request(this.service, "ConfirmAIBillers", data, metadata);
|
|
4275
|
+
return promise.then((data) => ConfirmAIBillersResponse.decode(new BinaryReader(data)));
|
|
4276
|
+
}
|
|
4277
|
+
|
|
4278
|
+
ListRelayHeartbeats(
|
|
4279
|
+
request: ListAdminRelayHeartbeatsRequest,
|
|
4280
|
+
metadata?: Metadata,
|
|
4281
|
+
): Promise<ListAdminRelayHeartbeatsResponse> {
|
|
4282
|
+
const data = ListAdminRelayHeartbeatsRequest.encode(request).finish();
|
|
4283
|
+
const promise = this.rpc.request(this.service, "ListRelayHeartbeats", data, metadata);
|
|
4284
|
+
return promise.then((data) => ListAdminRelayHeartbeatsResponse.decode(new BinaryReader(data)));
|
|
4285
|
+
}
|
|
4286
|
+
|
|
4287
|
+
ResolveOrgDetails(request: ResolveOrgDetailsRequest, metadata?: Metadata): Promise<ResolveOrgDetailsResponse> {
|
|
4288
|
+
const data = ResolveOrgDetailsRequest.encode(request).finish();
|
|
4289
|
+
const promise = this.rpc.request(this.service, "ResolveOrgDetails", data, metadata);
|
|
4290
|
+
return promise.then((data) => ResolveOrgDetailsResponse.decode(new BinaryReader(data)));
|
|
4291
|
+
}
|
|
4292
|
+
|
|
4293
|
+
ResolveProjectDetails(
|
|
4294
|
+
request: ResolveProjectDetailsRequest,
|
|
4295
|
+
metadata?: Metadata,
|
|
4296
|
+
): Promise<ResolveProjectDetailsResponse> {
|
|
4297
|
+
const data = ResolveProjectDetailsRequest.encode(request).finish();
|
|
4298
|
+
const promise = this.rpc.request(this.service, "ResolveProjectDetails", data, metadata);
|
|
4299
|
+
return promise.then((data) => ResolveProjectDetailsResponse.decode(new BinaryReader(data)));
|
|
4300
|
+
}
|
|
4301
|
+
|
|
4302
|
+
ResolveUserDetails(request: ResolveUserDetailsRequest, metadata?: Metadata): Promise<ResolveUserDetailsResponse> {
|
|
4303
|
+
const data = ResolveUserDetailsRequest.encode(request).finish();
|
|
4304
|
+
const promise = this.rpc.request(this.service, "ResolveUserDetails", data, metadata);
|
|
4305
|
+
return promise.then((data) => ResolveUserDetailsResponse.decode(new BinaryReader(data)));
|
|
4306
|
+
}
|
|
4307
|
+
}
|
|
4308
|
+
|
|
4309
|
+
interface Rpc {
|
|
4310
|
+
request(service: string, method: string, data: Uint8Array, metadata?: Metadata): Promise<Uint8Array>;
|
|
4311
|
+
}
|
|
4312
|
+
|
|
4313
|
+
type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined;
|
|
4314
|
+
|
|
4315
|
+
export type DeepPartial<T> = T extends Builtin ? T
|
|
4316
|
+
: T extends globalThis.Array<infer U> ? globalThis.Array<DeepPartial<U>>
|
|
4317
|
+
: T extends ReadonlyArray<infer U> ? ReadonlyArray<DeepPartial<U>>
|
|
4318
|
+
: T extends {} ? { [K in keyof T]?: DeepPartial<T[K]> }
|
|
4319
|
+
: Partial<T>;
|
|
4320
|
+
|
|
4321
|
+
type KeysOfUnion<T> = T extends T ? keyof T : never;
|
|
4322
|
+
export type Exact<P, I extends P> = P extends Builtin ? P
|
|
4323
|
+
: P & { [K in keyof P]: Exact<P[K], I[K]> } & { [K in Exclude<keyof I, KeysOfUnion<P>>]: never };
|
|
4324
|
+
|
|
4325
|
+
function toTimestamp(date: Date): Timestamp {
|
|
2689
4326
|
const seconds = Math.trunc(date.getTime() / 1_000);
|
|
2690
4327
|
const nanos = (date.getTime() % 1_000) * 1_000_000;
|
|
2691
4328
|
return { seconds, nanos };
|
|
@@ -2718,6 +4355,10 @@ function longToNumber(int64: { toString(): string }): number {
|
|
|
2718
4355
|
return num;
|
|
2719
4356
|
}
|
|
2720
4357
|
|
|
4358
|
+
function isObject(value: any): boolean {
|
|
4359
|
+
return typeof value === "object" && value !== null;
|
|
4360
|
+
}
|
|
4361
|
+
|
|
2721
4362
|
function isSet(value: any): boolean {
|
|
2722
4363
|
return value !== null && value !== undefined;
|
|
2723
4364
|
}
|