@miradorlabs/web-grpc 3.38.1 → 3.40.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 +6 -3
- package/google/protobuf/duration.ts +6 -3
- package/google/protobuf/timestamp.ts +6 -3
- package/package.json +1 -1
- package/proto/gateway/common/v1/attribute_value.ts +6 -3
- package/proto/gateway/common/v1/status.ts +6 -3
- package/proto/gateway/common/v1/types.ts +6 -3
- package/proto/gateway/web/v1/account_gateway.ts +6 -3
- package/proto/gateway/web/v1/admin_gateway.ts +1189 -89
- package/proto/gateway/web/v1/admin_gateway_grpc_pb.js +36 -0
- package/proto/gateway/web/v1/admin_gateway_pb.js +1779 -57
- package/proto/gateway/web/v1/ai_gateway.ts +6 -3
- package/proto/gateway/web/v1/attribute_value.ts +6 -3
- package/proto/gateway/web/v1/beta_gateway.ts +6 -3
- package/proto/gateway/web/v1/chain_gateway.ts +6 -3
- package/proto/gateway/web/v1/common.ts +1 -1
- package/proto/gateway/web/v1/derived_metric_gateway.ts +6 -3
- package/proto/gateway/web/v1/github_connector.ts +6 -3
- package/proto/gateway/web/v1/integration_gateway.ts +6 -3
- package/proto/gateway/web/v1/log_gateway.ts +6 -3
- package/proto/gateway/web/v1/market_gateway.ts +6 -3
- package/proto/gateway/web/v1/metric_gateway.ts +6 -3
- package/proto/gateway/web/v1/oauth_gateway.ts +6 -3
- package/proto/gateway/web/v1/plan_gateway.ts +6 -3
- package/proto/gateway/web/v1/policy_gateway.ts +6 -3
- package/proto/gateway/web/v1/reference_gateway.ts +6 -3
- package/proto/gateway/web/v1/rule_gateway.ts +6 -3
- package/proto/gateway/web/v1/slo_gateway.ts +6 -3
- package/proto/gateway/web/v1/trace_gateway.ts +6 -3
- package/proto/gateway/web/v1/trace_measure_gateway.ts +6 -3
|
@@ -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.18.
|
|
3
|
+
// protoc-gen-ts_proto v2.18.1
|
|
4
4
|
// protoc v3.21.12
|
|
5
5
|
// source: proto/gateway/web/v1/admin_gateway.proto
|
|
6
6
|
|
|
@@ -16,12 +16,135 @@ import {
|
|
|
16
16
|
relayHeartbeatSortToJSON,
|
|
17
17
|
} from "./ai_gateway";
|
|
18
18
|
import { InviteCodeState, inviteCodeStateFromJSON, inviteCodeStateToJSON } from "./beta_gateway";
|
|
19
|
-
import {
|
|
19
|
+
import {
|
|
20
|
+
AIPrincipalKind,
|
|
21
|
+
aIPrincipalKindFromJSON,
|
|
22
|
+
aIPrincipalKindToJSON,
|
|
23
|
+
AIReferenceGroupFilter,
|
|
24
|
+
AIReferenceName,
|
|
25
|
+
} from "./reference_gateway";
|
|
26
|
+
import { Pagination } from "./trace_gateway";
|
|
20
27
|
|
|
21
28
|
export const protobufPackage = "gateway.web.v1";
|
|
22
29
|
|
|
23
30
|
export const protobufFileName = "proto/gateway/web/v1/admin_gateway.proto";
|
|
24
31
|
|
|
32
|
+
/** AdminUsageDimension mirrors ai.api.v1.AdminUsageDimension: one dimension a usage group is keyed by. */
|
|
33
|
+
export enum AdminUsageDimension {
|
|
34
|
+
ADMIN_USAGE_DIMENSION_UNSPECIFIED = 0,
|
|
35
|
+
ADMIN_USAGE_DIMENSION_ORGANIZATION = 1,
|
|
36
|
+
/** ADMIN_USAGE_DIMENSION_PRINCIPAL - The usage's principal as reported: its user id, else its api key id, else unattributed. */
|
|
37
|
+
ADMIN_USAGE_DIMENSION_PRINCIPAL = 2,
|
|
38
|
+
/** ADMIN_USAGE_DIMENSION_SOURCE - The source system (harness) as stored. */
|
|
39
|
+
ADMIN_USAGE_DIMENSION_SOURCE = 3,
|
|
40
|
+
/** ADMIN_USAGE_DIMENSION_MODEL - The model as stored, not its display name. */
|
|
41
|
+
ADMIN_USAGE_DIMENSION_MODEL = 4,
|
|
42
|
+
/** ADMIN_USAGE_DIMENSION_DAY - The UTC day. */
|
|
43
|
+
ADMIN_USAGE_DIMENSION_DAY = 5,
|
|
44
|
+
UNRECOGNIZED = -1,
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
export function adminUsageDimensionFromJSON(object: any): AdminUsageDimension {
|
|
48
|
+
switch (object) {
|
|
49
|
+
case 0:
|
|
50
|
+
case "ADMIN_USAGE_DIMENSION_UNSPECIFIED":
|
|
51
|
+
return AdminUsageDimension.ADMIN_USAGE_DIMENSION_UNSPECIFIED;
|
|
52
|
+
case 1:
|
|
53
|
+
case "ADMIN_USAGE_DIMENSION_ORGANIZATION":
|
|
54
|
+
return AdminUsageDimension.ADMIN_USAGE_DIMENSION_ORGANIZATION;
|
|
55
|
+
case 2:
|
|
56
|
+
case "ADMIN_USAGE_DIMENSION_PRINCIPAL":
|
|
57
|
+
return AdminUsageDimension.ADMIN_USAGE_DIMENSION_PRINCIPAL;
|
|
58
|
+
case 3:
|
|
59
|
+
case "ADMIN_USAGE_DIMENSION_SOURCE":
|
|
60
|
+
return AdminUsageDimension.ADMIN_USAGE_DIMENSION_SOURCE;
|
|
61
|
+
case 4:
|
|
62
|
+
case "ADMIN_USAGE_DIMENSION_MODEL":
|
|
63
|
+
return AdminUsageDimension.ADMIN_USAGE_DIMENSION_MODEL;
|
|
64
|
+
case 5:
|
|
65
|
+
case "ADMIN_USAGE_DIMENSION_DAY":
|
|
66
|
+
return AdminUsageDimension.ADMIN_USAGE_DIMENSION_DAY;
|
|
67
|
+
case -1:
|
|
68
|
+
case "UNRECOGNIZED":
|
|
69
|
+
default:
|
|
70
|
+
return AdminUsageDimension.UNRECOGNIZED;
|
|
71
|
+
}
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
export function adminUsageDimensionToJSON(object: AdminUsageDimension): string {
|
|
75
|
+
switch (object) {
|
|
76
|
+
case AdminUsageDimension.ADMIN_USAGE_DIMENSION_UNSPECIFIED:
|
|
77
|
+
return "ADMIN_USAGE_DIMENSION_UNSPECIFIED";
|
|
78
|
+
case AdminUsageDimension.ADMIN_USAGE_DIMENSION_ORGANIZATION:
|
|
79
|
+
return "ADMIN_USAGE_DIMENSION_ORGANIZATION";
|
|
80
|
+
case AdminUsageDimension.ADMIN_USAGE_DIMENSION_PRINCIPAL:
|
|
81
|
+
return "ADMIN_USAGE_DIMENSION_PRINCIPAL";
|
|
82
|
+
case AdminUsageDimension.ADMIN_USAGE_DIMENSION_SOURCE:
|
|
83
|
+
return "ADMIN_USAGE_DIMENSION_SOURCE";
|
|
84
|
+
case AdminUsageDimension.ADMIN_USAGE_DIMENSION_MODEL:
|
|
85
|
+
return "ADMIN_USAGE_DIMENSION_MODEL";
|
|
86
|
+
case AdminUsageDimension.ADMIN_USAGE_DIMENSION_DAY:
|
|
87
|
+
return "ADMIN_USAGE_DIMENSION_DAY";
|
|
88
|
+
case AdminUsageDimension.UNRECOGNIZED:
|
|
89
|
+
default:
|
|
90
|
+
return "UNRECOGNIZED";
|
|
91
|
+
}
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
/** AdminUsageGroupSort mirrors ai.api.v1.AdminUsageGroupSort; ties break on the group key ascending. */
|
|
95
|
+
export enum AdminUsageGroupSort {
|
|
96
|
+
ADMIN_USAGE_GROUP_SORT_UNSPECIFIED = 0,
|
|
97
|
+
ADMIN_USAGE_GROUP_SORT_COST_DESC = 1,
|
|
98
|
+
/** ADMIN_USAGE_GROUP_SORT_TOKENS_DESC - input_tokens + output_tokens, so cache reads and writes count (they are part of input). */
|
|
99
|
+
ADMIN_USAGE_GROUP_SORT_TOKENS_DESC = 2,
|
|
100
|
+
ADMIN_USAGE_GROUP_SORT_CALLS_DESC = 3,
|
|
101
|
+
/** ADMIN_USAGE_GROUP_SORT_GROUP_ASC - The group key ascending, in group_by order: a day series reads in date order. */
|
|
102
|
+
ADMIN_USAGE_GROUP_SORT_GROUP_ASC = 4,
|
|
103
|
+
UNRECOGNIZED = -1,
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
export function adminUsageGroupSortFromJSON(object: any): AdminUsageGroupSort {
|
|
107
|
+
switch (object) {
|
|
108
|
+
case 0:
|
|
109
|
+
case "ADMIN_USAGE_GROUP_SORT_UNSPECIFIED":
|
|
110
|
+
return AdminUsageGroupSort.ADMIN_USAGE_GROUP_SORT_UNSPECIFIED;
|
|
111
|
+
case 1:
|
|
112
|
+
case "ADMIN_USAGE_GROUP_SORT_COST_DESC":
|
|
113
|
+
return AdminUsageGroupSort.ADMIN_USAGE_GROUP_SORT_COST_DESC;
|
|
114
|
+
case 2:
|
|
115
|
+
case "ADMIN_USAGE_GROUP_SORT_TOKENS_DESC":
|
|
116
|
+
return AdminUsageGroupSort.ADMIN_USAGE_GROUP_SORT_TOKENS_DESC;
|
|
117
|
+
case 3:
|
|
118
|
+
case "ADMIN_USAGE_GROUP_SORT_CALLS_DESC":
|
|
119
|
+
return AdminUsageGroupSort.ADMIN_USAGE_GROUP_SORT_CALLS_DESC;
|
|
120
|
+
case 4:
|
|
121
|
+
case "ADMIN_USAGE_GROUP_SORT_GROUP_ASC":
|
|
122
|
+
return AdminUsageGroupSort.ADMIN_USAGE_GROUP_SORT_GROUP_ASC;
|
|
123
|
+
case -1:
|
|
124
|
+
case "UNRECOGNIZED":
|
|
125
|
+
default:
|
|
126
|
+
return AdminUsageGroupSort.UNRECOGNIZED;
|
|
127
|
+
}
|
|
128
|
+
}
|
|
129
|
+
|
|
130
|
+
export function adminUsageGroupSortToJSON(object: AdminUsageGroupSort): string {
|
|
131
|
+
switch (object) {
|
|
132
|
+
case AdminUsageGroupSort.ADMIN_USAGE_GROUP_SORT_UNSPECIFIED:
|
|
133
|
+
return "ADMIN_USAGE_GROUP_SORT_UNSPECIFIED";
|
|
134
|
+
case AdminUsageGroupSort.ADMIN_USAGE_GROUP_SORT_COST_DESC:
|
|
135
|
+
return "ADMIN_USAGE_GROUP_SORT_COST_DESC";
|
|
136
|
+
case AdminUsageGroupSort.ADMIN_USAGE_GROUP_SORT_TOKENS_DESC:
|
|
137
|
+
return "ADMIN_USAGE_GROUP_SORT_TOKENS_DESC";
|
|
138
|
+
case AdminUsageGroupSort.ADMIN_USAGE_GROUP_SORT_CALLS_DESC:
|
|
139
|
+
return "ADMIN_USAGE_GROUP_SORT_CALLS_DESC";
|
|
140
|
+
case AdminUsageGroupSort.ADMIN_USAGE_GROUP_SORT_GROUP_ASC:
|
|
141
|
+
return "ADMIN_USAGE_GROUP_SORT_GROUP_ASC";
|
|
142
|
+
case AdminUsageGroupSort.UNRECOGNIZED:
|
|
143
|
+
default:
|
|
144
|
+
return "UNRECOGNIZED";
|
|
145
|
+
}
|
|
146
|
+
}
|
|
147
|
+
|
|
25
148
|
export interface GetAdminStatusRequest {
|
|
26
149
|
}
|
|
27
150
|
|
|
@@ -257,6 +380,13 @@ export interface AdminRelayHeartbeat {
|
|
|
257
380
|
* reported, never zero; an empty map is a beat that carried none.
|
|
258
381
|
*/
|
|
259
382
|
counters: { [key: string]: number };
|
|
383
|
+
/**
|
|
384
|
+
* Of the latest heartbeat: script, homebrew, npm, npm_project, source, verbatim; "" = not reported (a relay too old
|
|
385
|
+
* to report one, or one that could not find its own binary).
|
|
386
|
+
*/
|
|
387
|
+
installMethod: string;
|
|
388
|
+
/** Of the latest heartbeat: on, off, unsupported, verbatim; "" = not reported (a relay too old to report one). */
|
|
389
|
+
updateAuto: string;
|
|
260
390
|
}
|
|
261
391
|
|
|
262
392
|
export interface AdminRelayHeartbeat_CountersEntry {
|
|
@@ -264,6 +394,103 @@ export interface AdminRelayHeartbeat_CountersEntry {
|
|
|
264
394
|
value: number;
|
|
265
395
|
}
|
|
266
396
|
|
|
397
|
+
export interface ListAdminUsageGroupsRequest {
|
|
398
|
+
/**
|
|
399
|
+
* The window is [start_time, end_time) in whole UTC days: both UTC midnights, end after start, at most 92 days
|
|
400
|
+
* apart, within 1970-01-01 to 2149-06-06; anything else is a validation error.
|
|
401
|
+
*/
|
|
402
|
+
startTime: Date | undefined;
|
|
403
|
+
endTime:
|
|
404
|
+
| Date
|
|
405
|
+
| undefined;
|
|
406
|
+
/**
|
|
407
|
+
* The dimensions a row is grouped by, each at most once; empty is one row, the totals. UNSPECIFIED, an unknown
|
|
408
|
+
* value or a repeat is a validation error.
|
|
409
|
+
*/
|
|
410
|
+
groupBy: AdminUsageDimension[];
|
|
411
|
+
filter:
|
|
412
|
+
| AdminUsageGroupFilter
|
|
413
|
+
| undefined;
|
|
414
|
+
/** Unspecified is ADMIN_USAGE_GROUP_SORT_COST_DESC; an unknown value is a validation error. */
|
|
415
|
+
sort: AdminUsageGroupSort;
|
|
416
|
+
/** 1-indexed; below 1 = 1. A page past the last returns the last page: read pagination.page. */
|
|
417
|
+
page: number;
|
|
418
|
+
/** The server default (50) when 0, coerced to 1000 above it; negative is a validation error. */
|
|
419
|
+
perPage: number;
|
|
420
|
+
}
|
|
421
|
+
|
|
422
|
+
export interface ListAdminUsageGroupsResponse {
|
|
423
|
+
status: ResponseStatus | undefined;
|
|
424
|
+
groups: AdminUsageGroup[];
|
|
425
|
+
/**
|
|
426
|
+
* total_count is the groups the window and filter hold, exact, computed on every request (a refresh between two
|
|
427
|
+
* pages can move groups across them); anchor_timestamp is unset.
|
|
428
|
+
*/
|
|
429
|
+
pagination:
|
|
430
|
+
| Pagination
|
|
431
|
+
| undefined;
|
|
432
|
+
/**
|
|
433
|
+
* The newest daily-activity refresh among the slices read (its run's start), whatever the page. It is no
|
|
434
|
+
* completeness mark: a day the job no longer refreshes keeps its last run's figures. Unset when no slice matched.
|
|
435
|
+
*/
|
|
436
|
+
refreshedAt: Date | undefined;
|
|
437
|
+
}
|
|
438
|
+
|
|
439
|
+
/**
|
|
440
|
+
* AdminUsageGroupFilter mirrors ai.api.v1.AdminUsageGroupFilter: fields AND, a repeated field matches any of its
|
|
441
|
+
* values, and an unset or empty field does not filter.
|
|
442
|
+
*/
|
|
443
|
+
export interface AdminUsageGroupFilter {
|
|
444
|
+
/** Canonical UUIDs, at most 100; a malformed id is a validation error. */
|
|
445
|
+
organizationIds: string[];
|
|
446
|
+
/**
|
|
447
|
+
* Stored user ids, matched exactly, at most 100, each non-empty and at most 256 bytes. For a session the Terma CLI
|
|
448
|
+
* relayed this is the Mirador account user id the CLI claims (the relay's account_user_id); otherwise it is the
|
|
449
|
+
* harness's own id.
|
|
450
|
+
*/
|
|
451
|
+
userIds: string[];
|
|
452
|
+
}
|
|
453
|
+
|
|
454
|
+
/**
|
|
455
|
+
* AdminUsageGroup mirrors ai.api.v1.AdminUsageGroup. A key field is set only for a dimension in group_by, where ''
|
|
456
|
+
* means the slices reported none (no model). Distinct counts are not additive across groups. A group can hold no
|
|
457
|
+
* tokens or cost: usage that is only sessions, files or git activity still counts.
|
|
458
|
+
*/
|
|
459
|
+
export interface AdminUsageGroup {
|
|
460
|
+
organizationId: string;
|
|
461
|
+
/** USER for a user id, API_KEY for an api key id, UNSPECIFIED (with principal_id '') for unattributed usage. */
|
|
462
|
+
principalKind: AIPrincipalKind;
|
|
463
|
+
/**
|
|
464
|
+
* As reported, for display: a Mirador account user id is client-claimed through the Terma CLI, and a harness's
|
|
465
|
+
* own id names no Mirador user.
|
|
466
|
+
*/
|
|
467
|
+
principalId: string;
|
|
468
|
+
sourceSystem: string;
|
|
469
|
+
model: string;
|
|
470
|
+
/** the UTC midnight */
|
|
471
|
+
day:
|
|
472
|
+
| Date
|
|
473
|
+
| undefined;
|
|
474
|
+
/** includes cache reads and writes */
|
|
475
|
+
inputTokens: number;
|
|
476
|
+
outputTokens: number;
|
|
477
|
+
cacheReadTokens: number;
|
|
478
|
+
cacheWriteTokens: number;
|
|
479
|
+
costUsd: number;
|
|
480
|
+
/** The part of cost_usd billed to a subscription. */
|
|
481
|
+
subscriptionCostUsd: number;
|
|
482
|
+
modelCalls: number;
|
|
483
|
+
toolCalls: number;
|
|
484
|
+
userMessages: number;
|
|
485
|
+
/**
|
|
486
|
+
* Distinct (source system, session) pairs across the fleet: a session reported to two projects counts once.
|
|
487
|
+
* Approximate past a few thousand (about 0.5%).
|
|
488
|
+
*/
|
|
489
|
+
sessions: number;
|
|
490
|
+
/** Distinct stored user ids among the group's usage, exact; ids, not people. */
|
|
491
|
+
userIdCount: number;
|
|
492
|
+
}
|
|
493
|
+
|
|
267
494
|
export interface ResolveOrgDetailsRequest {
|
|
268
495
|
/** UUIDs, at most 1000; a malformed id is a validation error. */
|
|
269
496
|
organizationIds: string[];
|
|
@@ -2925,6 +3152,8 @@ function createBaseAdminRelayHeartbeat(): AdminRelayHeartbeat {
|
|
|
2925
3152
|
exitReason: "",
|
|
2926
3153
|
miradorApiKeyId: "",
|
|
2927
3154
|
counters: {},
|
|
3155
|
+
installMethod: "",
|
|
3156
|
+
updateAuto: "",
|
|
2928
3157
|
};
|
|
2929
3158
|
}
|
|
2930
3159
|
|
|
@@ -2966,6 +3195,12 @@ export const AdminRelayHeartbeat: MessageFns<AdminRelayHeartbeat> = {
|
|
|
2966
3195
|
globalThis.Object.entries(message.counters).forEach(([key, value]: [string, number]) => {
|
|
2967
3196
|
AdminRelayHeartbeat_CountersEntry.encode({ key: key as any, value }, writer.uint32(98).fork()).join();
|
|
2968
3197
|
});
|
|
3198
|
+
if (message.installMethod !== "") {
|
|
3199
|
+
writer.uint32(106).string(message.installMethod);
|
|
3200
|
+
}
|
|
3201
|
+
if (message.updateAuto !== "") {
|
|
3202
|
+
writer.uint32(114).string(message.updateAuto);
|
|
3203
|
+
}
|
|
2969
3204
|
return writer;
|
|
2970
3205
|
},
|
|
2971
3206
|
|
|
@@ -3081,6 +3316,22 @@ export const AdminRelayHeartbeat: MessageFns<AdminRelayHeartbeat> = {
|
|
|
3081
3316
|
}
|
|
3082
3317
|
continue;
|
|
3083
3318
|
}
|
|
3319
|
+
case 13: {
|
|
3320
|
+
if (tag !== 106) {
|
|
3321
|
+
break;
|
|
3322
|
+
}
|
|
3323
|
+
|
|
3324
|
+
message.installMethod = reader.string();
|
|
3325
|
+
continue;
|
|
3326
|
+
}
|
|
3327
|
+
case 14: {
|
|
3328
|
+
if (tag !== 114) {
|
|
3329
|
+
break;
|
|
3330
|
+
}
|
|
3331
|
+
|
|
3332
|
+
message.updateAuto = reader.string();
|
|
3333
|
+
continue;
|
|
3334
|
+
}
|
|
3084
3335
|
}
|
|
3085
3336
|
if ((tag & 7) === 4 || tag === 0) {
|
|
3086
3337
|
break;
|
|
@@ -3156,6 +3407,16 @@ export const AdminRelayHeartbeat: MessageFns<AdminRelayHeartbeat> = {
|
|
|
3156
3407
|
{},
|
|
3157
3408
|
)
|
|
3158
3409
|
: {},
|
|
3410
|
+
installMethod: isSet(object.installMethod)
|
|
3411
|
+
? globalThis.String(object.installMethod)
|
|
3412
|
+
: isSet(object.install_method)
|
|
3413
|
+
? globalThis.String(object.install_method)
|
|
3414
|
+
: "",
|
|
3415
|
+
updateAuto: isSet(object.updateAuto)
|
|
3416
|
+
? globalThis.String(object.updateAuto)
|
|
3417
|
+
: isSet(object.update_auto)
|
|
3418
|
+
? globalThis.String(object.update_auto)
|
|
3419
|
+
: "",
|
|
3159
3420
|
};
|
|
3160
3421
|
},
|
|
3161
3422
|
|
|
@@ -3203,6 +3464,12 @@ export const AdminRelayHeartbeat: MessageFns<AdminRelayHeartbeat> = {
|
|
|
3203
3464
|
});
|
|
3204
3465
|
}
|
|
3205
3466
|
}
|
|
3467
|
+
if (message.installMethod !== "") {
|
|
3468
|
+
obj.installMethod = message.installMethod;
|
|
3469
|
+
}
|
|
3470
|
+
if (message.updateAuto !== "") {
|
|
3471
|
+
obj.updateAuto = message.updateAuto;
|
|
3472
|
+
}
|
|
3206
3473
|
return obj;
|
|
3207
3474
|
},
|
|
3208
3475
|
|
|
@@ -3231,6 +3498,8 @@ export const AdminRelayHeartbeat: MessageFns<AdminRelayHeartbeat> = {
|
|
|
3231
3498
|
},
|
|
3232
3499
|
{},
|
|
3233
3500
|
);
|
|
3501
|
+
message.installMethod = object.installMethod ?? "";
|
|
3502
|
+
message.updateAuto = object.updateAuto ?? "";
|
|
3234
3503
|
return message;
|
|
3235
3504
|
},
|
|
3236
3505
|
};
|
|
@@ -3324,19 +3593,37 @@ export const AdminRelayHeartbeat_CountersEntry: MessageFns<AdminRelayHeartbeat_C
|
|
|
3324
3593
|
},
|
|
3325
3594
|
};
|
|
3326
3595
|
|
|
3327
|
-
function
|
|
3328
|
-
return {
|
|
3596
|
+
function createBaseListAdminUsageGroupsRequest(): ListAdminUsageGroupsRequest {
|
|
3597
|
+
return { startTime: undefined, endTime: undefined, groupBy: [], filter: undefined, sort: 0, page: 0, perPage: 0 };
|
|
3329
3598
|
}
|
|
3330
3599
|
|
|
3331
|
-
export const
|
|
3332
|
-
encode(message:
|
|
3333
|
-
|
|
3334
|
-
writer.uint32(10).
|
|
3600
|
+
export const ListAdminUsageGroupsRequest: MessageFns<ListAdminUsageGroupsRequest> = {
|
|
3601
|
+
encode(message: ListAdminUsageGroupsRequest, writer: BinaryWriter = new BinaryWriter()): BinaryWriter {
|
|
3602
|
+
if (message.startTime !== undefined) {
|
|
3603
|
+
Timestamp.encode(toTimestamp(message.startTime), writer.uint32(10).fork()).join();
|
|
3604
|
+
}
|
|
3605
|
+
if (message.endTime !== undefined) {
|
|
3606
|
+
Timestamp.encode(toTimestamp(message.endTime), writer.uint32(18).fork()).join();
|
|
3607
|
+
}
|
|
3608
|
+
for (const v of message.groupBy) {
|
|
3609
|
+
writer.uint32(24).int32(v!);
|
|
3610
|
+
}
|
|
3611
|
+
if (message.filter !== undefined) {
|
|
3612
|
+
AdminUsageGroupFilter.encode(message.filter, writer.uint32(34).fork()).join();
|
|
3613
|
+
}
|
|
3614
|
+
if (message.sort !== 0) {
|
|
3615
|
+
writer.uint32(40).int32(message.sort);
|
|
3616
|
+
}
|
|
3617
|
+
if (message.page !== 0) {
|
|
3618
|
+
writer.uint32(48).int32(message.page);
|
|
3619
|
+
}
|
|
3620
|
+
if (message.perPage !== 0) {
|
|
3621
|
+
writer.uint32(56).int32(message.perPage);
|
|
3335
3622
|
}
|
|
3336
3623
|
return writer;
|
|
3337
3624
|
},
|
|
3338
3625
|
|
|
3339
|
-
decode(input: BinaryReader | Uint8Array, length?: number):
|
|
3626
|
+
decode(input: BinaryReader | Uint8Array, length?: number): ListAdminUsageGroupsRequest {
|
|
3340
3627
|
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
|
|
3341
3628
|
const previousRecursionDepth = (reader as any).__tsProtoDecodeDepth ?? 0;
|
|
3342
3629
|
if (previousRecursionDepth >= 100) {
|
|
@@ -3345,7 +3632,7 @@ export const ResolveOrgDetailsRequest: MessageFns<ResolveOrgDetailsRequest> = {
|
|
|
3345
3632
|
(reader as any).__tsProtoDecodeDepth = previousRecursionDepth + 1;
|
|
3346
3633
|
try {
|
|
3347
3634
|
const end = length === undefined ? reader.len : reader.pos + length;
|
|
3348
|
-
const message =
|
|
3635
|
+
const message = createBaseListAdminUsageGroupsRequest();
|
|
3349
3636
|
while (reader.pos < end) {
|
|
3350
3637
|
const tag = reader.uint32();
|
|
3351
3638
|
switch (tag >>> 3) {
|
|
@@ -3354,7 +3641,65 @@ export const ResolveOrgDetailsRequest: MessageFns<ResolveOrgDetailsRequest> = {
|
|
|
3354
3641
|
break;
|
|
3355
3642
|
}
|
|
3356
3643
|
|
|
3357
|
-
message.
|
|
3644
|
+
message.startTime = fromTimestamp(Timestamp.decode(reader, reader.uint32()));
|
|
3645
|
+
continue;
|
|
3646
|
+
}
|
|
3647
|
+
case 2: {
|
|
3648
|
+
if (tag !== 18) {
|
|
3649
|
+
break;
|
|
3650
|
+
}
|
|
3651
|
+
|
|
3652
|
+
message.endTime = fromTimestamp(Timestamp.decode(reader, reader.uint32()));
|
|
3653
|
+
continue;
|
|
3654
|
+
}
|
|
3655
|
+
case 3: {
|
|
3656
|
+
if (tag === 24) {
|
|
3657
|
+
message.groupBy.push(reader.int32() as any);
|
|
3658
|
+
|
|
3659
|
+
continue;
|
|
3660
|
+
}
|
|
3661
|
+
|
|
3662
|
+
if (tag === 26) {
|
|
3663
|
+
const end2 = reader.uint32() + reader.pos;
|
|
3664
|
+
while (reader.pos < end2) {
|
|
3665
|
+
message.groupBy.push(reader.int32() as any);
|
|
3666
|
+
}
|
|
3667
|
+
|
|
3668
|
+
continue;
|
|
3669
|
+
}
|
|
3670
|
+
|
|
3671
|
+
break;
|
|
3672
|
+
}
|
|
3673
|
+
case 4: {
|
|
3674
|
+
if (tag !== 34) {
|
|
3675
|
+
break;
|
|
3676
|
+
}
|
|
3677
|
+
|
|
3678
|
+
message.filter = AdminUsageGroupFilter.decode(reader, reader.uint32());
|
|
3679
|
+
continue;
|
|
3680
|
+
}
|
|
3681
|
+
case 5: {
|
|
3682
|
+
if (tag !== 40) {
|
|
3683
|
+
break;
|
|
3684
|
+
}
|
|
3685
|
+
|
|
3686
|
+
message.sort = reader.int32() as any;
|
|
3687
|
+
continue;
|
|
3688
|
+
}
|
|
3689
|
+
case 6: {
|
|
3690
|
+
if (tag !== 48) {
|
|
3691
|
+
break;
|
|
3692
|
+
}
|
|
3693
|
+
|
|
3694
|
+
message.page = reader.int32();
|
|
3695
|
+
continue;
|
|
3696
|
+
}
|
|
3697
|
+
case 7: {
|
|
3698
|
+
if (tag !== 56) {
|
|
3699
|
+
break;
|
|
3700
|
+
}
|
|
3701
|
+
|
|
3702
|
+
message.perPage = reader.int32();
|
|
3358
3703
|
continue;
|
|
3359
3704
|
}
|
|
3360
3705
|
}
|
|
@@ -3369,50 +3714,100 @@ export const ResolveOrgDetailsRequest: MessageFns<ResolveOrgDetailsRequest> = {
|
|
|
3369
3714
|
}
|
|
3370
3715
|
},
|
|
3371
3716
|
|
|
3372
|
-
fromJSON(object: any):
|
|
3717
|
+
fromJSON(object: any): ListAdminUsageGroupsRequest {
|
|
3373
3718
|
return {
|
|
3374
|
-
|
|
3375
|
-
? object.
|
|
3376
|
-
:
|
|
3377
|
-
? object.
|
|
3719
|
+
startTime: isSet(object.startTime)
|
|
3720
|
+
? fromJsonTimestamp(object.startTime)
|
|
3721
|
+
: isSet(object.start_time)
|
|
3722
|
+
? fromJsonTimestamp(object.start_time)
|
|
3723
|
+
: undefined,
|
|
3724
|
+
endTime: isSet(object.endTime)
|
|
3725
|
+
? fromJsonTimestamp(object.endTime)
|
|
3726
|
+
: isSet(object.end_time)
|
|
3727
|
+
? fromJsonTimestamp(object.end_time)
|
|
3728
|
+
: undefined,
|
|
3729
|
+
groupBy: globalThis.Array.isArray(object?.groupBy)
|
|
3730
|
+
? object.groupBy.map((e: any) => adminUsageDimensionFromJSON(e))
|
|
3731
|
+
: globalThis.Array.isArray(object?.group_by)
|
|
3732
|
+
? object.group_by.map((e: any) => adminUsageDimensionFromJSON(e))
|
|
3378
3733
|
: [],
|
|
3734
|
+
filter: isSet(object.filter) ? AdminUsageGroupFilter.fromJSON(object.filter) : undefined,
|
|
3735
|
+
sort: isSet(object.sort) ? adminUsageGroupSortFromJSON(object.sort) : 0,
|
|
3736
|
+
page: isSet(object.page) ? globalThis.Number(object.page) : 0,
|
|
3737
|
+
perPage: isSet(object.perPage)
|
|
3738
|
+
? globalThis.Number(object.perPage)
|
|
3739
|
+
: isSet(object.per_page)
|
|
3740
|
+
? globalThis.Number(object.per_page)
|
|
3741
|
+
: 0,
|
|
3379
3742
|
};
|
|
3380
3743
|
},
|
|
3381
3744
|
|
|
3382
|
-
toJSON(message:
|
|
3745
|
+
toJSON(message: ListAdminUsageGroupsRequest): unknown {
|
|
3383
3746
|
const obj: any = {};
|
|
3384
|
-
if (message.
|
|
3385
|
-
obj.
|
|
3747
|
+
if (message.startTime !== undefined) {
|
|
3748
|
+
obj.startTime = message.startTime.toISOString();
|
|
3749
|
+
}
|
|
3750
|
+
if (message.endTime !== undefined) {
|
|
3751
|
+
obj.endTime = message.endTime.toISOString();
|
|
3752
|
+
}
|
|
3753
|
+
if (message.groupBy?.length) {
|
|
3754
|
+
obj.groupBy = message.groupBy.map((e) => adminUsageDimensionToJSON(e));
|
|
3755
|
+
}
|
|
3756
|
+
if (message.filter !== undefined) {
|
|
3757
|
+
obj.filter = AdminUsageGroupFilter.toJSON(message.filter);
|
|
3758
|
+
}
|
|
3759
|
+
if (message.sort !== 0) {
|
|
3760
|
+
obj.sort = adminUsageGroupSortToJSON(message.sort);
|
|
3761
|
+
}
|
|
3762
|
+
if (message.page !== 0) {
|
|
3763
|
+
obj.page = Math.round(message.page);
|
|
3764
|
+
}
|
|
3765
|
+
if (message.perPage !== 0) {
|
|
3766
|
+
obj.perPage = Math.round(message.perPage);
|
|
3386
3767
|
}
|
|
3387
3768
|
return obj;
|
|
3388
3769
|
},
|
|
3389
3770
|
|
|
3390
|
-
create<I extends Exact<DeepPartial<
|
|
3391
|
-
return
|
|
3771
|
+
create<I extends Exact<DeepPartial<ListAdminUsageGroupsRequest>, I>>(base?: I): ListAdminUsageGroupsRequest {
|
|
3772
|
+
return ListAdminUsageGroupsRequest.fromPartial(base ?? ({} as any));
|
|
3392
3773
|
},
|
|
3393
|
-
fromPartial<I extends Exact<DeepPartial<
|
|
3394
|
-
const message =
|
|
3395
|
-
message.
|
|
3774
|
+
fromPartial<I extends Exact<DeepPartial<ListAdminUsageGroupsRequest>, I>>(object: I): ListAdminUsageGroupsRequest {
|
|
3775
|
+
const message = createBaseListAdminUsageGroupsRequest();
|
|
3776
|
+
message.startTime = object.startTime ?? undefined;
|
|
3777
|
+
message.endTime = object.endTime ?? undefined;
|
|
3778
|
+
message.groupBy = object.groupBy?.map((e) => e) || [];
|
|
3779
|
+
message.filter = (object.filter !== undefined && object.filter !== null)
|
|
3780
|
+
? AdminUsageGroupFilter.fromPartial(object.filter)
|
|
3781
|
+
: undefined;
|
|
3782
|
+
message.sort = object.sort ?? 0;
|
|
3783
|
+
message.page = object.page ?? 0;
|
|
3784
|
+
message.perPage = object.perPage ?? 0;
|
|
3396
3785
|
return message;
|
|
3397
3786
|
},
|
|
3398
3787
|
};
|
|
3399
3788
|
|
|
3400
|
-
function
|
|
3401
|
-
return { status: undefined,
|
|
3789
|
+
function createBaseListAdminUsageGroupsResponse(): ListAdminUsageGroupsResponse {
|
|
3790
|
+
return { status: undefined, groups: [], pagination: undefined, refreshedAt: undefined };
|
|
3402
3791
|
}
|
|
3403
3792
|
|
|
3404
|
-
export const
|
|
3405
|
-
encode(message:
|
|
3793
|
+
export const ListAdminUsageGroupsResponse: MessageFns<ListAdminUsageGroupsResponse> = {
|
|
3794
|
+
encode(message: ListAdminUsageGroupsResponse, writer: BinaryWriter = new BinaryWriter()): BinaryWriter {
|
|
3406
3795
|
if (message.status !== undefined) {
|
|
3407
3796
|
ResponseStatus.encode(message.status, writer.uint32(10).fork()).join();
|
|
3408
3797
|
}
|
|
3409
|
-
for (const v of message.
|
|
3410
|
-
|
|
3798
|
+
for (const v of message.groups) {
|
|
3799
|
+
AdminUsageGroup.encode(v!, writer.uint32(18).fork()).join();
|
|
3800
|
+
}
|
|
3801
|
+
if (message.pagination !== undefined) {
|
|
3802
|
+
Pagination.encode(message.pagination, writer.uint32(26).fork()).join();
|
|
3803
|
+
}
|
|
3804
|
+
if (message.refreshedAt !== undefined) {
|
|
3805
|
+
Timestamp.encode(toTimestamp(message.refreshedAt), writer.uint32(34).fork()).join();
|
|
3411
3806
|
}
|
|
3412
3807
|
return writer;
|
|
3413
3808
|
},
|
|
3414
3809
|
|
|
3415
|
-
decode(input: BinaryReader | Uint8Array, length?: number):
|
|
3810
|
+
decode(input: BinaryReader | Uint8Array, length?: number): ListAdminUsageGroupsResponse {
|
|
3416
3811
|
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
|
|
3417
3812
|
const previousRecursionDepth = (reader as any).__tsProtoDecodeDepth ?? 0;
|
|
3418
3813
|
if (previousRecursionDepth >= 100) {
|
|
@@ -3421,7 +3816,7 @@ export const ResolveOrgDetailsResponse: MessageFns<ResolveOrgDetailsResponse> =
|
|
|
3421
3816
|
(reader as any).__tsProtoDecodeDepth = previousRecursionDepth + 1;
|
|
3422
3817
|
try {
|
|
3423
3818
|
const end = length === undefined ? reader.len : reader.pos + length;
|
|
3424
|
-
const message =
|
|
3819
|
+
const message = createBaseListAdminUsageGroupsResponse();
|
|
3425
3820
|
while (reader.pos < end) {
|
|
3426
3821
|
const tag = reader.uint32();
|
|
3427
3822
|
switch (tag >>> 3) {
|
|
@@ -3438,7 +3833,23 @@ export const ResolveOrgDetailsResponse: MessageFns<ResolveOrgDetailsResponse> =
|
|
|
3438
3833
|
break;
|
|
3439
3834
|
}
|
|
3440
3835
|
|
|
3441
|
-
message.
|
|
3836
|
+
message.groups.push(AdminUsageGroup.decode(reader, reader.uint32()));
|
|
3837
|
+
continue;
|
|
3838
|
+
}
|
|
3839
|
+
case 3: {
|
|
3840
|
+
if (tag !== 26) {
|
|
3841
|
+
break;
|
|
3842
|
+
}
|
|
3843
|
+
|
|
3844
|
+
message.pagination = Pagination.decode(reader, reader.uint32());
|
|
3845
|
+
continue;
|
|
3846
|
+
}
|
|
3847
|
+
case 4: {
|
|
3848
|
+
if (tag !== 34) {
|
|
3849
|
+
break;
|
|
3850
|
+
}
|
|
3851
|
+
|
|
3852
|
+
message.refreshedAt = fromTimestamp(Timestamp.decode(reader, reader.uint32()));
|
|
3442
3853
|
continue;
|
|
3443
3854
|
}
|
|
3444
3855
|
}
|
|
@@ -3453,55 +3864,71 @@ export const ResolveOrgDetailsResponse: MessageFns<ResolveOrgDetailsResponse> =
|
|
|
3453
3864
|
}
|
|
3454
3865
|
},
|
|
3455
3866
|
|
|
3456
|
-
fromJSON(object: any):
|
|
3867
|
+
fromJSON(object: any): ListAdminUsageGroupsResponse {
|
|
3457
3868
|
return {
|
|
3458
3869
|
status: isSet(object.status) ? ResponseStatus.fromJSON(object.status) : undefined,
|
|
3459
|
-
|
|
3460
|
-
? object.
|
|
3870
|
+
groups: globalThis.Array.isArray(object?.groups)
|
|
3871
|
+
? object.groups.map((e: any) => AdminUsageGroup.fromJSON(e))
|
|
3461
3872
|
: [],
|
|
3873
|
+
pagination: isSet(object.pagination) ? Pagination.fromJSON(object.pagination) : undefined,
|
|
3874
|
+
refreshedAt: isSet(object.refreshedAt)
|
|
3875
|
+
? fromJsonTimestamp(object.refreshedAt)
|
|
3876
|
+
: isSet(object.refreshed_at)
|
|
3877
|
+
? fromJsonTimestamp(object.refreshed_at)
|
|
3878
|
+
: undefined,
|
|
3462
3879
|
};
|
|
3463
3880
|
},
|
|
3464
3881
|
|
|
3465
|
-
toJSON(message:
|
|
3882
|
+
toJSON(message: ListAdminUsageGroupsResponse): unknown {
|
|
3466
3883
|
const obj: any = {};
|
|
3467
3884
|
if (message.status !== undefined) {
|
|
3468
3885
|
obj.status = ResponseStatus.toJSON(message.status);
|
|
3469
3886
|
}
|
|
3470
|
-
if (message.
|
|
3471
|
-
obj.
|
|
3887
|
+
if (message.groups?.length) {
|
|
3888
|
+
obj.groups = message.groups.map((e) => AdminUsageGroup.toJSON(e));
|
|
3889
|
+
}
|
|
3890
|
+
if (message.pagination !== undefined) {
|
|
3891
|
+
obj.pagination = Pagination.toJSON(message.pagination);
|
|
3892
|
+
}
|
|
3893
|
+
if (message.refreshedAt !== undefined) {
|
|
3894
|
+
obj.refreshedAt = message.refreshedAt.toISOString();
|
|
3472
3895
|
}
|
|
3473
3896
|
return obj;
|
|
3474
3897
|
},
|
|
3475
3898
|
|
|
3476
|
-
create<I extends Exact<DeepPartial<
|
|
3477
|
-
return
|
|
3899
|
+
create<I extends Exact<DeepPartial<ListAdminUsageGroupsResponse>, I>>(base?: I): ListAdminUsageGroupsResponse {
|
|
3900
|
+
return ListAdminUsageGroupsResponse.fromPartial(base ?? ({} as any));
|
|
3478
3901
|
},
|
|
3479
|
-
fromPartial<I extends Exact<DeepPartial<
|
|
3480
|
-
const message =
|
|
3902
|
+
fromPartial<I extends Exact<DeepPartial<ListAdminUsageGroupsResponse>, I>>(object: I): ListAdminUsageGroupsResponse {
|
|
3903
|
+
const message = createBaseListAdminUsageGroupsResponse();
|
|
3481
3904
|
message.status = (object.status !== undefined && object.status !== null)
|
|
3482
3905
|
? ResponseStatus.fromPartial(object.status)
|
|
3483
3906
|
: undefined;
|
|
3484
|
-
message.
|
|
3907
|
+
message.groups = object.groups?.map((e) => AdminUsageGroup.fromPartial(e)) || [];
|
|
3908
|
+
message.pagination = (object.pagination !== undefined && object.pagination !== null)
|
|
3909
|
+
? Pagination.fromPartial(object.pagination)
|
|
3910
|
+
: undefined;
|
|
3911
|
+
message.refreshedAt = object.refreshedAt ?? undefined;
|
|
3485
3912
|
return message;
|
|
3486
3913
|
},
|
|
3487
3914
|
};
|
|
3488
3915
|
|
|
3489
|
-
function
|
|
3490
|
-
return {
|
|
3916
|
+
function createBaseAdminUsageGroupFilter(): AdminUsageGroupFilter {
|
|
3917
|
+
return { organizationIds: [], userIds: [] };
|
|
3491
3918
|
}
|
|
3492
3919
|
|
|
3493
|
-
export const
|
|
3494
|
-
encode(message:
|
|
3495
|
-
|
|
3496
|
-
writer.uint32(10).string(
|
|
3920
|
+
export const AdminUsageGroupFilter: MessageFns<AdminUsageGroupFilter> = {
|
|
3921
|
+
encode(message: AdminUsageGroupFilter, writer: BinaryWriter = new BinaryWriter()): BinaryWriter {
|
|
3922
|
+
for (const v of message.organizationIds) {
|
|
3923
|
+
writer.uint32(10).string(v!);
|
|
3497
3924
|
}
|
|
3498
|
-
|
|
3499
|
-
writer.uint32(18).string(
|
|
3925
|
+
for (const v of message.userIds) {
|
|
3926
|
+
writer.uint32(18).string(v!);
|
|
3500
3927
|
}
|
|
3501
3928
|
return writer;
|
|
3502
3929
|
},
|
|
3503
3930
|
|
|
3504
|
-
decode(input: BinaryReader | Uint8Array, length?: number):
|
|
3931
|
+
decode(input: BinaryReader | Uint8Array, length?: number): AdminUsageGroupFilter {
|
|
3505
3932
|
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
|
|
3506
3933
|
const previousRecursionDepth = (reader as any).__tsProtoDecodeDepth ?? 0;
|
|
3507
3934
|
if (previousRecursionDepth >= 100) {
|
|
@@ -3510,7 +3937,7 @@ export const OrgDetails: MessageFns<OrgDetails> = {
|
|
|
3510
3937
|
(reader as any).__tsProtoDecodeDepth = previousRecursionDepth + 1;
|
|
3511
3938
|
try {
|
|
3512
3939
|
const end = length === undefined ? reader.len : reader.pos + length;
|
|
3513
|
-
const message =
|
|
3940
|
+
const message = createBaseAdminUsageGroupFilter();
|
|
3514
3941
|
while (reader.pos < end) {
|
|
3515
3942
|
const tag = reader.uint32();
|
|
3516
3943
|
switch (tag >>> 3) {
|
|
@@ -3519,7 +3946,7 @@ export const OrgDetails: MessageFns<OrgDetails> = {
|
|
|
3519
3946
|
break;
|
|
3520
3947
|
}
|
|
3521
3948
|
|
|
3522
|
-
message.
|
|
3949
|
+
message.organizationIds.push(reader.string());
|
|
3523
3950
|
continue;
|
|
3524
3951
|
}
|
|
3525
3952
|
case 2: {
|
|
@@ -3527,7 +3954,7 @@ export const OrgDetails: MessageFns<OrgDetails> = {
|
|
|
3527
3954
|
break;
|
|
3528
3955
|
}
|
|
3529
3956
|
|
|
3530
|
-
message.
|
|
3957
|
+
message.userIds.push(reader.string());
|
|
3531
3958
|
continue;
|
|
3532
3959
|
}
|
|
3533
3960
|
}
|
|
@@ -3542,55 +3969,709 @@ export const OrgDetails: MessageFns<OrgDetails> = {
|
|
|
3542
3969
|
}
|
|
3543
3970
|
},
|
|
3544
3971
|
|
|
3545
|
-
fromJSON(object: any):
|
|
3972
|
+
fromJSON(object: any): AdminUsageGroupFilter {
|
|
3546
3973
|
return {
|
|
3547
|
-
|
|
3548
|
-
? globalThis.String(
|
|
3549
|
-
:
|
|
3550
|
-
? globalThis.String(
|
|
3551
|
-
:
|
|
3552
|
-
|
|
3974
|
+
organizationIds: globalThis.Array.isArray(object?.organizationIds)
|
|
3975
|
+
? object.organizationIds.map((e: any) => globalThis.String(e))
|
|
3976
|
+
: globalThis.Array.isArray(object?.organization_ids)
|
|
3977
|
+
? object.organization_ids.map((e: any) => globalThis.String(e))
|
|
3978
|
+
: [],
|
|
3979
|
+
userIds: globalThis.Array.isArray(object?.userIds)
|
|
3980
|
+
? object.userIds.map((e: any) => globalThis.String(e))
|
|
3981
|
+
: globalThis.Array.isArray(object?.user_ids)
|
|
3982
|
+
? object.user_ids.map((e: any) => globalThis.String(e))
|
|
3983
|
+
: [],
|
|
3553
3984
|
};
|
|
3554
3985
|
},
|
|
3555
3986
|
|
|
3556
|
-
toJSON(message:
|
|
3987
|
+
toJSON(message: AdminUsageGroupFilter): unknown {
|
|
3557
3988
|
const obj: any = {};
|
|
3558
|
-
if (message.
|
|
3559
|
-
obj.
|
|
3989
|
+
if (message.organizationIds?.length) {
|
|
3990
|
+
obj.organizationIds = message.organizationIds;
|
|
3560
3991
|
}
|
|
3561
|
-
if (message.
|
|
3562
|
-
obj.
|
|
3992
|
+
if (message.userIds?.length) {
|
|
3993
|
+
obj.userIds = message.userIds;
|
|
3563
3994
|
}
|
|
3564
3995
|
return obj;
|
|
3565
3996
|
},
|
|
3566
3997
|
|
|
3567
|
-
create<I extends Exact<DeepPartial<
|
|
3568
|
-
return
|
|
3998
|
+
create<I extends Exact<DeepPartial<AdminUsageGroupFilter>, I>>(base?: I): AdminUsageGroupFilter {
|
|
3999
|
+
return AdminUsageGroupFilter.fromPartial(base ?? ({} as any));
|
|
3569
4000
|
},
|
|
3570
|
-
fromPartial<I extends Exact<DeepPartial<
|
|
3571
|
-
const message =
|
|
3572
|
-
message.
|
|
3573
|
-
message.
|
|
4001
|
+
fromPartial<I extends Exact<DeepPartial<AdminUsageGroupFilter>, I>>(object: I): AdminUsageGroupFilter {
|
|
4002
|
+
const message = createBaseAdminUsageGroupFilter();
|
|
4003
|
+
message.organizationIds = object.organizationIds?.map((e) => e) || [];
|
|
4004
|
+
message.userIds = object.userIds?.map((e) => e) || [];
|
|
3574
4005
|
return message;
|
|
3575
4006
|
},
|
|
3576
4007
|
};
|
|
3577
4008
|
|
|
3578
|
-
function
|
|
3579
|
-
return {
|
|
4009
|
+
function createBaseAdminUsageGroup(): AdminUsageGroup {
|
|
4010
|
+
return {
|
|
4011
|
+
organizationId: "",
|
|
4012
|
+
principalKind: 0,
|
|
4013
|
+
principalId: "",
|
|
4014
|
+
sourceSystem: "",
|
|
4015
|
+
model: "",
|
|
4016
|
+
day: undefined,
|
|
4017
|
+
inputTokens: 0,
|
|
4018
|
+
outputTokens: 0,
|
|
4019
|
+
cacheReadTokens: 0,
|
|
4020
|
+
cacheWriteTokens: 0,
|
|
4021
|
+
costUsd: 0,
|
|
4022
|
+
subscriptionCostUsd: 0,
|
|
4023
|
+
modelCalls: 0,
|
|
4024
|
+
toolCalls: 0,
|
|
4025
|
+
userMessages: 0,
|
|
4026
|
+
sessions: 0,
|
|
4027
|
+
userIdCount: 0,
|
|
4028
|
+
};
|
|
3580
4029
|
}
|
|
3581
4030
|
|
|
3582
|
-
export const
|
|
3583
|
-
encode(message:
|
|
3584
|
-
|
|
3585
|
-
writer.uint32(10).string(
|
|
4031
|
+
export const AdminUsageGroup: MessageFns<AdminUsageGroup> = {
|
|
4032
|
+
encode(message: AdminUsageGroup, writer: BinaryWriter = new BinaryWriter()): BinaryWriter {
|
|
4033
|
+
if (message.organizationId !== "") {
|
|
4034
|
+
writer.uint32(10).string(message.organizationId);
|
|
3586
4035
|
}
|
|
3587
|
-
|
|
3588
|
-
|
|
3589
|
-
|
|
3590
|
-
|
|
3591
|
-
|
|
3592
|
-
|
|
3593
|
-
if (
|
|
4036
|
+
if (message.principalKind !== 0) {
|
|
4037
|
+
writer.uint32(16).int32(message.principalKind);
|
|
4038
|
+
}
|
|
4039
|
+
if (message.principalId !== "") {
|
|
4040
|
+
writer.uint32(26).string(message.principalId);
|
|
4041
|
+
}
|
|
4042
|
+
if (message.sourceSystem !== "") {
|
|
4043
|
+
writer.uint32(34).string(message.sourceSystem);
|
|
4044
|
+
}
|
|
4045
|
+
if (message.model !== "") {
|
|
4046
|
+
writer.uint32(42).string(message.model);
|
|
4047
|
+
}
|
|
4048
|
+
if (message.day !== undefined) {
|
|
4049
|
+
Timestamp.encode(toTimestamp(message.day), writer.uint32(50).fork()).join();
|
|
4050
|
+
}
|
|
4051
|
+
if (message.inputTokens !== 0) {
|
|
4052
|
+
writer.uint32(56).uint64(message.inputTokens);
|
|
4053
|
+
}
|
|
4054
|
+
if (message.outputTokens !== 0) {
|
|
4055
|
+
writer.uint32(64).uint64(message.outputTokens);
|
|
4056
|
+
}
|
|
4057
|
+
if (message.cacheReadTokens !== 0) {
|
|
4058
|
+
writer.uint32(72).uint64(message.cacheReadTokens);
|
|
4059
|
+
}
|
|
4060
|
+
if (message.cacheWriteTokens !== 0) {
|
|
4061
|
+
writer.uint32(80).uint64(message.cacheWriteTokens);
|
|
4062
|
+
}
|
|
4063
|
+
if (message.costUsd !== 0) {
|
|
4064
|
+
writer.uint32(89).double(message.costUsd);
|
|
4065
|
+
}
|
|
4066
|
+
if (message.subscriptionCostUsd !== 0) {
|
|
4067
|
+
writer.uint32(97).double(message.subscriptionCostUsd);
|
|
4068
|
+
}
|
|
4069
|
+
if (message.modelCalls !== 0) {
|
|
4070
|
+
writer.uint32(104).uint64(message.modelCalls);
|
|
4071
|
+
}
|
|
4072
|
+
if (message.toolCalls !== 0) {
|
|
4073
|
+
writer.uint32(112).uint64(message.toolCalls);
|
|
4074
|
+
}
|
|
4075
|
+
if (message.userMessages !== 0) {
|
|
4076
|
+
writer.uint32(120).uint64(message.userMessages);
|
|
4077
|
+
}
|
|
4078
|
+
if (message.sessions !== 0) {
|
|
4079
|
+
writer.uint32(128).uint64(message.sessions);
|
|
4080
|
+
}
|
|
4081
|
+
if (message.userIdCount !== 0) {
|
|
4082
|
+
writer.uint32(136).uint64(message.userIdCount);
|
|
4083
|
+
}
|
|
4084
|
+
return writer;
|
|
4085
|
+
},
|
|
4086
|
+
|
|
4087
|
+
decode(input: BinaryReader | Uint8Array, length?: number): AdminUsageGroup {
|
|
4088
|
+
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
|
|
4089
|
+
const previousRecursionDepth = (reader as any).__tsProtoDecodeDepth ?? 0;
|
|
4090
|
+
if (previousRecursionDepth >= 100) {
|
|
4091
|
+
throw new globalThis.Error("protobuf decode recursion limit exceeded");
|
|
4092
|
+
}
|
|
4093
|
+
(reader as any).__tsProtoDecodeDepth = previousRecursionDepth + 1;
|
|
4094
|
+
try {
|
|
4095
|
+
const end = length === undefined ? reader.len : reader.pos + length;
|
|
4096
|
+
const message = createBaseAdminUsageGroup();
|
|
4097
|
+
while (reader.pos < end) {
|
|
4098
|
+
const tag = reader.uint32();
|
|
4099
|
+
switch (tag >>> 3) {
|
|
4100
|
+
case 1: {
|
|
4101
|
+
if (tag !== 10) {
|
|
4102
|
+
break;
|
|
4103
|
+
}
|
|
4104
|
+
|
|
4105
|
+
message.organizationId = reader.string();
|
|
4106
|
+
continue;
|
|
4107
|
+
}
|
|
4108
|
+
case 2: {
|
|
4109
|
+
if (tag !== 16) {
|
|
4110
|
+
break;
|
|
4111
|
+
}
|
|
4112
|
+
|
|
4113
|
+
message.principalKind = reader.int32() as any;
|
|
4114
|
+
continue;
|
|
4115
|
+
}
|
|
4116
|
+
case 3: {
|
|
4117
|
+
if (tag !== 26) {
|
|
4118
|
+
break;
|
|
4119
|
+
}
|
|
4120
|
+
|
|
4121
|
+
message.principalId = reader.string();
|
|
4122
|
+
continue;
|
|
4123
|
+
}
|
|
4124
|
+
case 4: {
|
|
4125
|
+
if (tag !== 34) {
|
|
4126
|
+
break;
|
|
4127
|
+
}
|
|
4128
|
+
|
|
4129
|
+
message.sourceSystem = reader.string();
|
|
4130
|
+
continue;
|
|
4131
|
+
}
|
|
4132
|
+
case 5: {
|
|
4133
|
+
if (tag !== 42) {
|
|
4134
|
+
break;
|
|
4135
|
+
}
|
|
4136
|
+
|
|
4137
|
+
message.model = reader.string();
|
|
4138
|
+
continue;
|
|
4139
|
+
}
|
|
4140
|
+
case 6: {
|
|
4141
|
+
if (tag !== 50) {
|
|
4142
|
+
break;
|
|
4143
|
+
}
|
|
4144
|
+
|
|
4145
|
+
message.day = fromTimestamp(Timestamp.decode(reader, reader.uint32()));
|
|
4146
|
+
continue;
|
|
4147
|
+
}
|
|
4148
|
+
case 7: {
|
|
4149
|
+
if (tag !== 56) {
|
|
4150
|
+
break;
|
|
4151
|
+
}
|
|
4152
|
+
|
|
4153
|
+
message.inputTokens = longToNumber(reader.uint64());
|
|
4154
|
+
continue;
|
|
4155
|
+
}
|
|
4156
|
+
case 8: {
|
|
4157
|
+
if (tag !== 64) {
|
|
4158
|
+
break;
|
|
4159
|
+
}
|
|
4160
|
+
|
|
4161
|
+
message.outputTokens = longToNumber(reader.uint64());
|
|
4162
|
+
continue;
|
|
4163
|
+
}
|
|
4164
|
+
case 9: {
|
|
4165
|
+
if (tag !== 72) {
|
|
4166
|
+
break;
|
|
4167
|
+
}
|
|
4168
|
+
|
|
4169
|
+
message.cacheReadTokens = longToNumber(reader.uint64());
|
|
4170
|
+
continue;
|
|
4171
|
+
}
|
|
4172
|
+
case 10: {
|
|
4173
|
+
if (tag !== 80) {
|
|
4174
|
+
break;
|
|
4175
|
+
}
|
|
4176
|
+
|
|
4177
|
+
message.cacheWriteTokens = longToNumber(reader.uint64());
|
|
4178
|
+
continue;
|
|
4179
|
+
}
|
|
4180
|
+
case 11: {
|
|
4181
|
+
if (tag !== 89) {
|
|
4182
|
+
break;
|
|
4183
|
+
}
|
|
4184
|
+
|
|
4185
|
+
message.costUsd = reader.double();
|
|
4186
|
+
continue;
|
|
4187
|
+
}
|
|
4188
|
+
case 12: {
|
|
4189
|
+
if (tag !== 97) {
|
|
4190
|
+
break;
|
|
4191
|
+
}
|
|
4192
|
+
|
|
4193
|
+
message.subscriptionCostUsd = reader.double();
|
|
4194
|
+
continue;
|
|
4195
|
+
}
|
|
4196
|
+
case 13: {
|
|
4197
|
+
if (tag !== 104) {
|
|
4198
|
+
break;
|
|
4199
|
+
}
|
|
4200
|
+
|
|
4201
|
+
message.modelCalls = longToNumber(reader.uint64());
|
|
4202
|
+
continue;
|
|
4203
|
+
}
|
|
4204
|
+
case 14: {
|
|
4205
|
+
if (tag !== 112) {
|
|
4206
|
+
break;
|
|
4207
|
+
}
|
|
4208
|
+
|
|
4209
|
+
message.toolCalls = longToNumber(reader.uint64());
|
|
4210
|
+
continue;
|
|
4211
|
+
}
|
|
4212
|
+
case 15: {
|
|
4213
|
+
if (tag !== 120) {
|
|
4214
|
+
break;
|
|
4215
|
+
}
|
|
4216
|
+
|
|
4217
|
+
message.userMessages = longToNumber(reader.uint64());
|
|
4218
|
+
continue;
|
|
4219
|
+
}
|
|
4220
|
+
case 16: {
|
|
4221
|
+
if (tag !== 128) {
|
|
4222
|
+
break;
|
|
4223
|
+
}
|
|
4224
|
+
|
|
4225
|
+
message.sessions = longToNumber(reader.uint64());
|
|
4226
|
+
continue;
|
|
4227
|
+
}
|
|
4228
|
+
case 17: {
|
|
4229
|
+
if (tag !== 136) {
|
|
4230
|
+
break;
|
|
4231
|
+
}
|
|
4232
|
+
|
|
4233
|
+
message.userIdCount = longToNumber(reader.uint64());
|
|
4234
|
+
continue;
|
|
4235
|
+
}
|
|
4236
|
+
}
|
|
4237
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
4238
|
+
break;
|
|
4239
|
+
}
|
|
4240
|
+
reader.skip(tag & 7);
|
|
4241
|
+
}
|
|
4242
|
+
return message;
|
|
4243
|
+
} finally {
|
|
4244
|
+
(reader as any).__tsProtoDecodeDepth = previousRecursionDepth;
|
|
4245
|
+
}
|
|
4246
|
+
},
|
|
4247
|
+
|
|
4248
|
+
fromJSON(object: any): AdminUsageGroup {
|
|
4249
|
+
return {
|
|
4250
|
+
organizationId: isSet(object.organizationId)
|
|
4251
|
+
? globalThis.String(object.organizationId)
|
|
4252
|
+
: isSet(object.organization_id)
|
|
4253
|
+
? globalThis.String(object.organization_id)
|
|
4254
|
+
: "",
|
|
4255
|
+
principalKind: isSet(object.principalKind)
|
|
4256
|
+
? aIPrincipalKindFromJSON(object.principalKind)
|
|
4257
|
+
: isSet(object.principal_kind)
|
|
4258
|
+
? aIPrincipalKindFromJSON(object.principal_kind)
|
|
4259
|
+
: 0,
|
|
4260
|
+
principalId: isSet(object.principalId)
|
|
4261
|
+
? globalThis.String(object.principalId)
|
|
4262
|
+
: isSet(object.principal_id)
|
|
4263
|
+
? globalThis.String(object.principal_id)
|
|
4264
|
+
: "",
|
|
4265
|
+
sourceSystem: isSet(object.sourceSystem)
|
|
4266
|
+
? globalThis.String(object.sourceSystem)
|
|
4267
|
+
: isSet(object.source_system)
|
|
4268
|
+
? globalThis.String(object.source_system)
|
|
4269
|
+
: "",
|
|
4270
|
+
model: isSet(object.model) ? globalThis.String(object.model) : "",
|
|
4271
|
+
day: isSet(object.day) ? fromJsonTimestamp(object.day) : undefined,
|
|
4272
|
+
inputTokens: isSet(object.inputTokens)
|
|
4273
|
+
? globalThis.Number(object.inputTokens)
|
|
4274
|
+
: isSet(object.input_tokens)
|
|
4275
|
+
? globalThis.Number(object.input_tokens)
|
|
4276
|
+
: 0,
|
|
4277
|
+
outputTokens: isSet(object.outputTokens)
|
|
4278
|
+
? globalThis.Number(object.outputTokens)
|
|
4279
|
+
: isSet(object.output_tokens)
|
|
4280
|
+
? globalThis.Number(object.output_tokens)
|
|
4281
|
+
: 0,
|
|
4282
|
+
cacheReadTokens: isSet(object.cacheReadTokens)
|
|
4283
|
+
? globalThis.Number(object.cacheReadTokens)
|
|
4284
|
+
: isSet(object.cache_read_tokens)
|
|
4285
|
+
? globalThis.Number(object.cache_read_tokens)
|
|
4286
|
+
: 0,
|
|
4287
|
+
cacheWriteTokens: isSet(object.cacheWriteTokens)
|
|
4288
|
+
? globalThis.Number(object.cacheWriteTokens)
|
|
4289
|
+
: isSet(object.cache_write_tokens)
|
|
4290
|
+
? globalThis.Number(object.cache_write_tokens)
|
|
4291
|
+
: 0,
|
|
4292
|
+
costUsd: isSet(object.costUsd)
|
|
4293
|
+
? globalThis.Number(object.costUsd)
|
|
4294
|
+
: isSet(object.cost_usd)
|
|
4295
|
+
? globalThis.Number(object.cost_usd)
|
|
4296
|
+
: 0,
|
|
4297
|
+
subscriptionCostUsd: isSet(object.subscriptionCostUsd)
|
|
4298
|
+
? globalThis.Number(object.subscriptionCostUsd)
|
|
4299
|
+
: isSet(object.subscription_cost_usd)
|
|
4300
|
+
? globalThis.Number(object.subscription_cost_usd)
|
|
4301
|
+
: 0,
|
|
4302
|
+
modelCalls: isSet(object.modelCalls)
|
|
4303
|
+
? globalThis.Number(object.modelCalls)
|
|
4304
|
+
: isSet(object.model_calls)
|
|
4305
|
+
? globalThis.Number(object.model_calls)
|
|
4306
|
+
: 0,
|
|
4307
|
+
toolCalls: isSet(object.toolCalls)
|
|
4308
|
+
? globalThis.Number(object.toolCalls)
|
|
4309
|
+
: isSet(object.tool_calls)
|
|
4310
|
+
? globalThis.Number(object.tool_calls)
|
|
4311
|
+
: 0,
|
|
4312
|
+
userMessages: isSet(object.userMessages)
|
|
4313
|
+
? globalThis.Number(object.userMessages)
|
|
4314
|
+
: isSet(object.user_messages)
|
|
4315
|
+
? globalThis.Number(object.user_messages)
|
|
4316
|
+
: 0,
|
|
4317
|
+
sessions: isSet(object.sessions) ? globalThis.Number(object.sessions) : 0,
|
|
4318
|
+
userIdCount: isSet(object.userIdCount)
|
|
4319
|
+
? globalThis.Number(object.userIdCount)
|
|
4320
|
+
: isSet(object.user_id_count)
|
|
4321
|
+
? globalThis.Number(object.user_id_count)
|
|
4322
|
+
: 0,
|
|
4323
|
+
};
|
|
4324
|
+
},
|
|
4325
|
+
|
|
4326
|
+
toJSON(message: AdminUsageGroup): unknown {
|
|
4327
|
+
const obj: any = {};
|
|
4328
|
+
if (message.organizationId !== "") {
|
|
4329
|
+
obj.organizationId = message.organizationId;
|
|
4330
|
+
}
|
|
4331
|
+
if (message.principalKind !== 0) {
|
|
4332
|
+
obj.principalKind = aIPrincipalKindToJSON(message.principalKind);
|
|
4333
|
+
}
|
|
4334
|
+
if (message.principalId !== "") {
|
|
4335
|
+
obj.principalId = message.principalId;
|
|
4336
|
+
}
|
|
4337
|
+
if (message.sourceSystem !== "") {
|
|
4338
|
+
obj.sourceSystem = message.sourceSystem;
|
|
4339
|
+
}
|
|
4340
|
+
if (message.model !== "") {
|
|
4341
|
+
obj.model = message.model;
|
|
4342
|
+
}
|
|
4343
|
+
if (message.day !== undefined) {
|
|
4344
|
+
obj.day = message.day.toISOString();
|
|
4345
|
+
}
|
|
4346
|
+
if (message.inputTokens !== 0) {
|
|
4347
|
+
obj.inputTokens = Math.round(message.inputTokens);
|
|
4348
|
+
}
|
|
4349
|
+
if (message.outputTokens !== 0) {
|
|
4350
|
+
obj.outputTokens = Math.round(message.outputTokens);
|
|
4351
|
+
}
|
|
4352
|
+
if (message.cacheReadTokens !== 0) {
|
|
4353
|
+
obj.cacheReadTokens = Math.round(message.cacheReadTokens);
|
|
4354
|
+
}
|
|
4355
|
+
if (message.cacheWriteTokens !== 0) {
|
|
4356
|
+
obj.cacheWriteTokens = Math.round(message.cacheWriteTokens);
|
|
4357
|
+
}
|
|
4358
|
+
if (message.costUsd !== 0) {
|
|
4359
|
+
obj.costUsd = floatToJson(message.costUsd);
|
|
4360
|
+
}
|
|
4361
|
+
if (message.subscriptionCostUsd !== 0) {
|
|
4362
|
+
obj.subscriptionCostUsd = floatToJson(message.subscriptionCostUsd);
|
|
4363
|
+
}
|
|
4364
|
+
if (message.modelCalls !== 0) {
|
|
4365
|
+
obj.modelCalls = Math.round(message.modelCalls);
|
|
4366
|
+
}
|
|
4367
|
+
if (message.toolCalls !== 0) {
|
|
4368
|
+
obj.toolCalls = Math.round(message.toolCalls);
|
|
4369
|
+
}
|
|
4370
|
+
if (message.userMessages !== 0) {
|
|
4371
|
+
obj.userMessages = Math.round(message.userMessages);
|
|
4372
|
+
}
|
|
4373
|
+
if (message.sessions !== 0) {
|
|
4374
|
+
obj.sessions = Math.round(message.sessions);
|
|
4375
|
+
}
|
|
4376
|
+
if (message.userIdCount !== 0) {
|
|
4377
|
+
obj.userIdCount = Math.round(message.userIdCount);
|
|
4378
|
+
}
|
|
4379
|
+
return obj;
|
|
4380
|
+
},
|
|
4381
|
+
|
|
4382
|
+
create<I extends Exact<DeepPartial<AdminUsageGroup>, I>>(base?: I): AdminUsageGroup {
|
|
4383
|
+
return AdminUsageGroup.fromPartial(base ?? ({} as any));
|
|
4384
|
+
},
|
|
4385
|
+
fromPartial<I extends Exact<DeepPartial<AdminUsageGroup>, I>>(object: I): AdminUsageGroup {
|
|
4386
|
+
const message = createBaseAdminUsageGroup();
|
|
4387
|
+
message.organizationId = object.organizationId ?? "";
|
|
4388
|
+
message.principalKind = object.principalKind ?? 0;
|
|
4389
|
+
message.principalId = object.principalId ?? "";
|
|
4390
|
+
message.sourceSystem = object.sourceSystem ?? "";
|
|
4391
|
+
message.model = object.model ?? "";
|
|
4392
|
+
message.day = object.day ?? undefined;
|
|
4393
|
+
message.inputTokens = object.inputTokens ?? 0;
|
|
4394
|
+
message.outputTokens = object.outputTokens ?? 0;
|
|
4395
|
+
message.cacheReadTokens = object.cacheReadTokens ?? 0;
|
|
4396
|
+
message.cacheWriteTokens = object.cacheWriteTokens ?? 0;
|
|
4397
|
+
message.costUsd = object.costUsd ?? 0;
|
|
4398
|
+
message.subscriptionCostUsd = object.subscriptionCostUsd ?? 0;
|
|
4399
|
+
message.modelCalls = object.modelCalls ?? 0;
|
|
4400
|
+
message.toolCalls = object.toolCalls ?? 0;
|
|
4401
|
+
message.userMessages = object.userMessages ?? 0;
|
|
4402
|
+
message.sessions = object.sessions ?? 0;
|
|
4403
|
+
message.userIdCount = object.userIdCount ?? 0;
|
|
4404
|
+
return message;
|
|
4405
|
+
},
|
|
4406
|
+
};
|
|
4407
|
+
|
|
4408
|
+
function createBaseResolveOrgDetailsRequest(): ResolveOrgDetailsRequest {
|
|
4409
|
+
return { organizationIds: [] };
|
|
4410
|
+
}
|
|
4411
|
+
|
|
4412
|
+
export const ResolveOrgDetailsRequest: MessageFns<ResolveOrgDetailsRequest> = {
|
|
4413
|
+
encode(message: ResolveOrgDetailsRequest, writer: BinaryWriter = new BinaryWriter()): BinaryWriter {
|
|
4414
|
+
for (const v of message.organizationIds) {
|
|
4415
|
+
writer.uint32(10).string(v!);
|
|
4416
|
+
}
|
|
4417
|
+
return writer;
|
|
4418
|
+
},
|
|
4419
|
+
|
|
4420
|
+
decode(input: BinaryReader | Uint8Array, length?: number): ResolveOrgDetailsRequest {
|
|
4421
|
+
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
|
|
4422
|
+
const previousRecursionDepth = (reader as any).__tsProtoDecodeDepth ?? 0;
|
|
4423
|
+
if (previousRecursionDepth >= 100) {
|
|
4424
|
+
throw new globalThis.Error("protobuf decode recursion limit exceeded");
|
|
4425
|
+
}
|
|
4426
|
+
(reader as any).__tsProtoDecodeDepth = previousRecursionDepth + 1;
|
|
4427
|
+
try {
|
|
4428
|
+
const end = length === undefined ? reader.len : reader.pos + length;
|
|
4429
|
+
const message = createBaseResolveOrgDetailsRequest();
|
|
4430
|
+
while (reader.pos < end) {
|
|
4431
|
+
const tag = reader.uint32();
|
|
4432
|
+
switch (tag >>> 3) {
|
|
4433
|
+
case 1: {
|
|
4434
|
+
if (tag !== 10) {
|
|
4435
|
+
break;
|
|
4436
|
+
}
|
|
4437
|
+
|
|
4438
|
+
message.organizationIds.push(reader.string());
|
|
4439
|
+
continue;
|
|
4440
|
+
}
|
|
4441
|
+
}
|
|
4442
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
4443
|
+
break;
|
|
4444
|
+
}
|
|
4445
|
+
reader.skip(tag & 7);
|
|
4446
|
+
}
|
|
4447
|
+
return message;
|
|
4448
|
+
} finally {
|
|
4449
|
+
(reader as any).__tsProtoDecodeDepth = previousRecursionDepth;
|
|
4450
|
+
}
|
|
4451
|
+
},
|
|
4452
|
+
|
|
4453
|
+
fromJSON(object: any): ResolveOrgDetailsRequest {
|
|
4454
|
+
return {
|
|
4455
|
+
organizationIds: globalThis.Array.isArray(object?.organizationIds)
|
|
4456
|
+
? object.organizationIds.map((e: any) => globalThis.String(e))
|
|
4457
|
+
: globalThis.Array.isArray(object?.organization_ids)
|
|
4458
|
+
? object.organization_ids.map((e: any) => globalThis.String(e))
|
|
4459
|
+
: [],
|
|
4460
|
+
};
|
|
4461
|
+
},
|
|
4462
|
+
|
|
4463
|
+
toJSON(message: ResolveOrgDetailsRequest): unknown {
|
|
4464
|
+
const obj: any = {};
|
|
4465
|
+
if (message.organizationIds?.length) {
|
|
4466
|
+
obj.organizationIds = message.organizationIds;
|
|
4467
|
+
}
|
|
4468
|
+
return obj;
|
|
4469
|
+
},
|
|
4470
|
+
|
|
4471
|
+
create<I extends Exact<DeepPartial<ResolveOrgDetailsRequest>, I>>(base?: I): ResolveOrgDetailsRequest {
|
|
4472
|
+
return ResolveOrgDetailsRequest.fromPartial(base ?? ({} as any));
|
|
4473
|
+
},
|
|
4474
|
+
fromPartial<I extends Exact<DeepPartial<ResolveOrgDetailsRequest>, I>>(object: I): ResolveOrgDetailsRequest {
|
|
4475
|
+
const message = createBaseResolveOrgDetailsRequest();
|
|
4476
|
+
message.organizationIds = object.organizationIds?.map((e) => e) || [];
|
|
4477
|
+
return message;
|
|
4478
|
+
},
|
|
4479
|
+
};
|
|
4480
|
+
|
|
4481
|
+
function createBaseResolveOrgDetailsResponse(): ResolveOrgDetailsResponse {
|
|
4482
|
+
return { status: undefined, organizations: [] };
|
|
4483
|
+
}
|
|
4484
|
+
|
|
4485
|
+
export const ResolveOrgDetailsResponse: MessageFns<ResolveOrgDetailsResponse> = {
|
|
4486
|
+
encode(message: ResolveOrgDetailsResponse, writer: BinaryWriter = new BinaryWriter()): BinaryWriter {
|
|
4487
|
+
if (message.status !== undefined) {
|
|
4488
|
+
ResponseStatus.encode(message.status, writer.uint32(10).fork()).join();
|
|
4489
|
+
}
|
|
4490
|
+
for (const v of message.organizations) {
|
|
4491
|
+
OrgDetails.encode(v!, writer.uint32(18).fork()).join();
|
|
4492
|
+
}
|
|
4493
|
+
return writer;
|
|
4494
|
+
},
|
|
4495
|
+
|
|
4496
|
+
decode(input: BinaryReader | Uint8Array, length?: number): ResolveOrgDetailsResponse {
|
|
4497
|
+
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
|
|
4498
|
+
const previousRecursionDepth = (reader as any).__tsProtoDecodeDepth ?? 0;
|
|
4499
|
+
if (previousRecursionDepth >= 100) {
|
|
4500
|
+
throw new globalThis.Error("protobuf decode recursion limit exceeded");
|
|
4501
|
+
}
|
|
4502
|
+
(reader as any).__tsProtoDecodeDepth = previousRecursionDepth + 1;
|
|
4503
|
+
try {
|
|
4504
|
+
const end = length === undefined ? reader.len : reader.pos + length;
|
|
4505
|
+
const message = createBaseResolveOrgDetailsResponse();
|
|
4506
|
+
while (reader.pos < end) {
|
|
4507
|
+
const tag = reader.uint32();
|
|
4508
|
+
switch (tag >>> 3) {
|
|
4509
|
+
case 1: {
|
|
4510
|
+
if (tag !== 10) {
|
|
4511
|
+
break;
|
|
4512
|
+
}
|
|
4513
|
+
|
|
4514
|
+
message.status = ResponseStatus.decode(reader, reader.uint32());
|
|
4515
|
+
continue;
|
|
4516
|
+
}
|
|
4517
|
+
case 2: {
|
|
4518
|
+
if (tag !== 18) {
|
|
4519
|
+
break;
|
|
4520
|
+
}
|
|
4521
|
+
|
|
4522
|
+
message.organizations.push(OrgDetails.decode(reader, reader.uint32()));
|
|
4523
|
+
continue;
|
|
4524
|
+
}
|
|
4525
|
+
}
|
|
4526
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
4527
|
+
break;
|
|
4528
|
+
}
|
|
4529
|
+
reader.skip(tag & 7);
|
|
4530
|
+
}
|
|
4531
|
+
return message;
|
|
4532
|
+
} finally {
|
|
4533
|
+
(reader as any).__tsProtoDecodeDepth = previousRecursionDepth;
|
|
4534
|
+
}
|
|
4535
|
+
},
|
|
4536
|
+
|
|
4537
|
+
fromJSON(object: any): ResolveOrgDetailsResponse {
|
|
4538
|
+
return {
|
|
4539
|
+
status: isSet(object.status) ? ResponseStatus.fromJSON(object.status) : undefined,
|
|
4540
|
+
organizations: globalThis.Array.isArray(object?.organizations)
|
|
4541
|
+
? object.organizations.map((e: any) => OrgDetails.fromJSON(e))
|
|
4542
|
+
: [],
|
|
4543
|
+
};
|
|
4544
|
+
},
|
|
4545
|
+
|
|
4546
|
+
toJSON(message: ResolveOrgDetailsResponse): unknown {
|
|
4547
|
+
const obj: any = {};
|
|
4548
|
+
if (message.status !== undefined) {
|
|
4549
|
+
obj.status = ResponseStatus.toJSON(message.status);
|
|
4550
|
+
}
|
|
4551
|
+
if (message.organizations?.length) {
|
|
4552
|
+
obj.organizations = message.organizations.map((e) => OrgDetails.toJSON(e));
|
|
4553
|
+
}
|
|
4554
|
+
return obj;
|
|
4555
|
+
},
|
|
4556
|
+
|
|
4557
|
+
create<I extends Exact<DeepPartial<ResolveOrgDetailsResponse>, I>>(base?: I): ResolveOrgDetailsResponse {
|
|
4558
|
+
return ResolveOrgDetailsResponse.fromPartial(base ?? ({} as any));
|
|
4559
|
+
},
|
|
4560
|
+
fromPartial<I extends Exact<DeepPartial<ResolveOrgDetailsResponse>, I>>(object: I): ResolveOrgDetailsResponse {
|
|
4561
|
+
const message = createBaseResolveOrgDetailsResponse();
|
|
4562
|
+
message.status = (object.status !== undefined && object.status !== null)
|
|
4563
|
+
? ResponseStatus.fromPartial(object.status)
|
|
4564
|
+
: undefined;
|
|
4565
|
+
message.organizations = object.organizations?.map((e) => OrgDetails.fromPartial(e)) || [];
|
|
4566
|
+
return message;
|
|
4567
|
+
},
|
|
4568
|
+
};
|
|
4569
|
+
|
|
4570
|
+
function createBaseOrgDetails(): OrgDetails {
|
|
4571
|
+
return { organizationId: "", name: "" };
|
|
4572
|
+
}
|
|
4573
|
+
|
|
4574
|
+
export const OrgDetails: MessageFns<OrgDetails> = {
|
|
4575
|
+
encode(message: OrgDetails, writer: BinaryWriter = new BinaryWriter()): BinaryWriter {
|
|
4576
|
+
if (message.organizationId !== "") {
|
|
4577
|
+
writer.uint32(10).string(message.organizationId);
|
|
4578
|
+
}
|
|
4579
|
+
if (message.name !== "") {
|
|
4580
|
+
writer.uint32(18).string(message.name);
|
|
4581
|
+
}
|
|
4582
|
+
return writer;
|
|
4583
|
+
},
|
|
4584
|
+
|
|
4585
|
+
decode(input: BinaryReader | Uint8Array, length?: number): OrgDetails {
|
|
4586
|
+
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
|
|
4587
|
+
const previousRecursionDepth = (reader as any).__tsProtoDecodeDepth ?? 0;
|
|
4588
|
+
if (previousRecursionDepth >= 100) {
|
|
4589
|
+
throw new globalThis.Error("protobuf decode recursion limit exceeded");
|
|
4590
|
+
}
|
|
4591
|
+
(reader as any).__tsProtoDecodeDepth = previousRecursionDepth + 1;
|
|
4592
|
+
try {
|
|
4593
|
+
const end = length === undefined ? reader.len : reader.pos + length;
|
|
4594
|
+
const message = createBaseOrgDetails();
|
|
4595
|
+
while (reader.pos < end) {
|
|
4596
|
+
const tag = reader.uint32();
|
|
4597
|
+
switch (tag >>> 3) {
|
|
4598
|
+
case 1: {
|
|
4599
|
+
if (tag !== 10) {
|
|
4600
|
+
break;
|
|
4601
|
+
}
|
|
4602
|
+
|
|
4603
|
+
message.organizationId = reader.string();
|
|
4604
|
+
continue;
|
|
4605
|
+
}
|
|
4606
|
+
case 2: {
|
|
4607
|
+
if (tag !== 18) {
|
|
4608
|
+
break;
|
|
4609
|
+
}
|
|
4610
|
+
|
|
4611
|
+
message.name = reader.string();
|
|
4612
|
+
continue;
|
|
4613
|
+
}
|
|
4614
|
+
}
|
|
4615
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
4616
|
+
break;
|
|
4617
|
+
}
|
|
4618
|
+
reader.skip(tag & 7);
|
|
4619
|
+
}
|
|
4620
|
+
return message;
|
|
4621
|
+
} finally {
|
|
4622
|
+
(reader as any).__tsProtoDecodeDepth = previousRecursionDepth;
|
|
4623
|
+
}
|
|
4624
|
+
},
|
|
4625
|
+
|
|
4626
|
+
fromJSON(object: any): OrgDetails {
|
|
4627
|
+
return {
|
|
4628
|
+
organizationId: isSet(object.organizationId)
|
|
4629
|
+
? globalThis.String(object.organizationId)
|
|
4630
|
+
: isSet(object.organization_id)
|
|
4631
|
+
? globalThis.String(object.organization_id)
|
|
4632
|
+
: "",
|
|
4633
|
+
name: isSet(object.name) ? globalThis.String(object.name) : "",
|
|
4634
|
+
};
|
|
4635
|
+
},
|
|
4636
|
+
|
|
4637
|
+
toJSON(message: OrgDetails): unknown {
|
|
4638
|
+
const obj: any = {};
|
|
4639
|
+
if (message.organizationId !== "") {
|
|
4640
|
+
obj.organizationId = message.organizationId;
|
|
4641
|
+
}
|
|
4642
|
+
if (message.name !== "") {
|
|
4643
|
+
obj.name = message.name;
|
|
4644
|
+
}
|
|
4645
|
+
return obj;
|
|
4646
|
+
},
|
|
4647
|
+
|
|
4648
|
+
create<I extends Exact<DeepPartial<OrgDetails>, I>>(base?: I): OrgDetails {
|
|
4649
|
+
return OrgDetails.fromPartial(base ?? ({} as any));
|
|
4650
|
+
},
|
|
4651
|
+
fromPartial<I extends Exact<DeepPartial<OrgDetails>, I>>(object: I): OrgDetails {
|
|
4652
|
+
const message = createBaseOrgDetails();
|
|
4653
|
+
message.organizationId = object.organizationId ?? "";
|
|
4654
|
+
message.name = object.name ?? "";
|
|
4655
|
+
return message;
|
|
4656
|
+
},
|
|
4657
|
+
};
|
|
4658
|
+
|
|
4659
|
+
function createBaseResolveProjectDetailsRequest(): ResolveProjectDetailsRequest {
|
|
4660
|
+
return { projectIds: [] };
|
|
4661
|
+
}
|
|
4662
|
+
|
|
4663
|
+
export const ResolveProjectDetailsRequest: MessageFns<ResolveProjectDetailsRequest> = {
|
|
4664
|
+
encode(message: ResolveProjectDetailsRequest, writer: BinaryWriter = new BinaryWriter()): BinaryWriter {
|
|
4665
|
+
for (const v of message.projectIds) {
|
|
4666
|
+
writer.uint32(10).string(v!);
|
|
4667
|
+
}
|
|
4668
|
+
return writer;
|
|
4669
|
+
},
|
|
4670
|
+
|
|
4671
|
+
decode(input: BinaryReader | Uint8Array, length?: number): ResolveProjectDetailsRequest {
|
|
4672
|
+
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
|
|
4673
|
+
const previousRecursionDepth = (reader as any).__tsProtoDecodeDepth ?? 0;
|
|
4674
|
+
if (previousRecursionDepth >= 100) {
|
|
3594
4675
|
throw new globalThis.Error("protobuf decode recursion limit exceeded");
|
|
3595
4676
|
}
|
|
3596
4677
|
(reader as any).__tsProtoDecodeDepth = previousRecursionDepth + 1;
|
|
@@ -4157,6 +5238,11 @@ export interface AdminGatewayService {
|
|
|
4157
5238
|
request: ListAdminRelayHeartbeatsRequest,
|
|
4158
5239
|
metadata?: Metadata,
|
|
4159
5240
|
): Promise<ListAdminRelayHeartbeatsResponse>;
|
|
5241
|
+
/**
|
|
5242
|
+
* AI usage summed across every organization over whole UTC days, grouped by the dimensions asked for (none is one
|
|
5243
|
+
* row, the totals), numbered pages; it proxies ai.api.v1.AIAdminService.ListUsageGroups. Rows carry ids, not names.
|
|
5244
|
+
*/
|
|
5245
|
+
ListUsageGroups(request: ListAdminUsageGroupsRequest, metadata?: Metadata): Promise<ListAdminUsageGroupsResponse>;
|
|
4160
5246
|
/**
|
|
4161
5247
|
* ResolveOrgDetails resolves organization ids to their names, in batch, across every organization of this gateway's
|
|
4162
5248
|
* product. Unknown ids, and ids of another product, are left out; it never errors on them. A malformed id, or more
|
|
@@ -4201,6 +5287,7 @@ export class AdminGatewayServiceClientImpl implements AdminGatewayService {
|
|
|
4201
5287
|
this.ConfirmAIEfforts = this.ConfirmAIEfforts.bind(this);
|
|
4202
5288
|
this.ConfirmAIBillers = this.ConfirmAIBillers.bind(this);
|
|
4203
5289
|
this.ListRelayHeartbeats = this.ListRelayHeartbeats.bind(this);
|
|
5290
|
+
this.ListUsageGroups = this.ListUsageGroups.bind(this);
|
|
4204
5291
|
this.ResolveOrgDetails = this.ResolveOrgDetails.bind(this);
|
|
4205
5292
|
this.ResolveProjectDetails = this.ResolveProjectDetails.bind(this);
|
|
4206
5293
|
this.ResolveUserDetails = this.ResolveUserDetails.bind(this);
|
|
@@ -4286,6 +5373,12 @@ export class AdminGatewayServiceClientImpl implements AdminGatewayService {
|
|
|
4286
5373
|
return promise.then((data) => ListAdminRelayHeartbeatsResponse.decode(new BinaryReader(data)));
|
|
4287
5374
|
}
|
|
4288
5375
|
|
|
5376
|
+
ListUsageGroups(request: ListAdminUsageGroupsRequest, metadata?: Metadata): Promise<ListAdminUsageGroupsResponse> {
|
|
5377
|
+
const data = ListAdminUsageGroupsRequest.encode(request).finish();
|
|
5378
|
+
const promise = this.rpc.request(this.service, "ListUsageGroups", data, metadata);
|
|
5379
|
+
return promise.then((data) => ListAdminUsageGroupsResponse.decode(new BinaryReader(data)));
|
|
5380
|
+
}
|
|
5381
|
+
|
|
4289
5382
|
ResolveOrgDetails(request: ResolveOrgDetailsRequest, metadata?: Metadata): Promise<ResolveOrgDetailsResponse> {
|
|
4290
5383
|
const data = ResolveOrgDetailsRequest.encode(request).finish();
|
|
4291
5384
|
const promise = this.rpc.request(this.service, "ResolveOrgDetails", data, metadata);
|
|
@@ -4312,6 +5405,10 @@ interface Rpc {
|
|
|
4312
5405
|
request(service: string, method: string, data: Uint8Array, metadata?: Metadata): Promise<Uint8Array>;
|
|
4313
5406
|
}
|
|
4314
5407
|
|
|
5408
|
+
function floatToJson(value: number | null | undefined): number | string | null | undefined {
|
|
5409
|
+
return typeof value === "number" && !globalThis.Number.isFinite(value) ? globalThis.String(value) : value;
|
|
5410
|
+
}
|
|
5411
|
+
|
|
4315
5412
|
type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined;
|
|
4316
5413
|
|
|
4317
5414
|
export type DeepPartial<T> = T extends Builtin ? T
|
|
@@ -4321,8 +5418,11 @@ export type DeepPartial<T> = T extends Builtin ? T
|
|
|
4321
5418
|
: Partial<T>;
|
|
4322
5419
|
|
|
4323
5420
|
type KeysOfUnion<T> = T extends T ? keyof T : never;
|
|
4324
|
-
export type Exact<P, I
|
|
4325
|
-
:
|
|
5421
|
+
export type Exact<P, I> = P extends Builtin ? P
|
|
5422
|
+
:
|
|
5423
|
+
& P
|
|
5424
|
+
& { [K in keyof P as Extract<K, keyof I>]: Exact<P[K], I[K & keyof I]> }
|
|
5425
|
+
& { [K in Exclude<keyof I, KeysOfUnion<P>>]: never };
|
|
4326
5426
|
|
|
4327
5427
|
function toTimestamp(date: Date): Timestamp {
|
|
4328
5428
|
const seconds = Math.trunc(date.getTime() / 1_000);
|