@miradorlabs/web-grpc 2.0.0 → 2.2.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/protobuf/timestamp.ts +1 -1
- package/package.json +1 -1
- package/proto/gateway/common/v1/status.ts +8 -1
- package/proto/gateway/common/v1/status_pb.js +2 -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/automation_gateway.ts +1 -1
- package/proto/gateway/web/v1/chain_gateway.ts +1 -1
- package/proto/gateway/web/v1/dashboard_gateway.ts +2519 -0
- package/proto/gateway/web/v1/dashboard_gateway_grpc_pb.js +220 -0
- package/proto/gateway/web/v1/dashboard_gateway_pb.js +4792 -0
- package/proto/gateway/web/v1/market_gateway.ts +1 -1
- package/proto/gateway/web/v1/{telemetry_gateway.ts → metric_gateway.ts} +1030 -405
- package/proto/gateway/web/v1/metric_gateway_grpc_pb.js +122 -0
- package/proto/gateway/web/v1/{telemetry_gateway_pb.js → metric_gateway_pb.js} +1661 -535
- 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/stream_gateway.ts +1 -1
- package/proto/gateway/web/v1/trace_gateway.ts +1544 -1
- package/proto/gateway/web/v1/trace_gateway_pb.js +2796 -113
- package/proto/gateway/web/v1/telemetry_gateway_grpc_pb.js +0 -159
|
@@ -0,0 +1,2519 @@
|
|
|
1
|
+
// Code generated by protoc-gen-ts_proto. DO NOT EDIT.
|
|
2
|
+
// versions:
|
|
3
|
+
// protoc-gen-ts_proto v2.12.0
|
|
4
|
+
// protoc v3.21.12
|
|
5
|
+
// source: proto/gateway/web/v1/dashboard_gateway.proto
|
|
6
|
+
|
|
7
|
+
/* eslint-disable */
|
|
8
|
+
import { BinaryReader, BinaryWriter } from "@bufbuild/protobuf/wire";
|
|
9
|
+
import type { Metadata } from "@grpc/grpc-js";
|
|
10
|
+
import { Observable } from "rxjs";
|
|
11
|
+
import { map } from "rxjs/operators";
|
|
12
|
+
import { Timestamp } from "../../../../google/protobuf/timestamp";
|
|
13
|
+
import { ResponseStatus } from "../../common/v1/status";
|
|
14
|
+
import { MetricQuery, QuerySeriesUpdate, QuerySnapshot, TimeRange } from "./metric_gateway";
|
|
15
|
+
import {
|
|
16
|
+
AnalyticsTimeInterval,
|
|
17
|
+
analyticsTimeIntervalFromJSON,
|
|
18
|
+
analyticsTimeIntervalToJSON,
|
|
19
|
+
AnalyticsTimeWindow,
|
|
20
|
+
analyticsTimeWindowFromJSON,
|
|
21
|
+
analyticsTimeWindowToJSON,
|
|
22
|
+
} from "./trace_gateway";
|
|
23
|
+
|
|
24
|
+
export const protobufPackage = "gateway.web.v1";
|
|
25
|
+
|
|
26
|
+
export enum WidgetType {
|
|
27
|
+
WIDGET_TYPE_UNSPECIFIED = 0,
|
|
28
|
+
/** WIDGET_TYPE_TIMESERIES - Bucketed series over the range. */
|
|
29
|
+
WIDGET_TYPE_TIMESERIES = 1,
|
|
30
|
+
/** WIDGET_TYPE_STAT - Single whole-range value. */
|
|
31
|
+
WIDGET_TYPE_STAT = 2,
|
|
32
|
+
/** WIDGET_TYPE_PIE - Whole-range value per group_by combination. */
|
|
33
|
+
WIDGET_TYPE_PIE = 3,
|
|
34
|
+
/** WIDGET_TYPE_TABLE - Row per group_by combination, column per query. */
|
|
35
|
+
WIDGET_TYPE_TABLE = 4,
|
|
36
|
+
/** WIDGET_TYPE_MARKDOWN - Static text, no queries. */
|
|
37
|
+
WIDGET_TYPE_MARKDOWN = 5,
|
|
38
|
+
UNRECOGNIZED = -1,
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
export function widgetTypeFromJSON(object: any): WidgetType {
|
|
42
|
+
switch (object) {
|
|
43
|
+
case 0:
|
|
44
|
+
case "WIDGET_TYPE_UNSPECIFIED":
|
|
45
|
+
return WidgetType.WIDGET_TYPE_UNSPECIFIED;
|
|
46
|
+
case 1:
|
|
47
|
+
case "WIDGET_TYPE_TIMESERIES":
|
|
48
|
+
return WidgetType.WIDGET_TYPE_TIMESERIES;
|
|
49
|
+
case 2:
|
|
50
|
+
case "WIDGET_TYPE_STAT":
|
|
51
|
+
return WidgetType.WIDGET_TYPE_STAT;
|
|
52
|
+
case 3:
|
|
53
|
+
case "WIDGET_TYPE_PIE":
|
|
54
|
+
return WidgetType.WIDGET_TYPE_PIE;
|
|
55
|
+
case 4:
|
|
56
|
+
case "WIDGET_TYPE_TABLE":
|
|
57
|
+
return WidgetType.WIDGET_TYPE_TABLE;
|
|
58
|
+
case 5:
|
|
59
|
+
case "WIDGET_TYPE_MARKDOWN":
|
|
60
|
+
return WidgetType.WIDGET_TYPE_MARKDOWN;
|
|
61
|
+
case -1:
|
|
62
|
+
case "UNRECOGNIZED":
|
|
63
|
+
default:
|
|
64
|
+
return WidgetType.UNRECOGNIZED;
|
|
65
|
+
}
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
export function widgetTypeToJSON(object: WidgetType): string {
|
|
69
|
+
switch (object) {
|
|
70
|
+
case WidgetType.WIDGET_TYPE_UNSPECIFIED:
|
|
71
|
+
return "WIDGET_TYPE_UNSPECIFIED";
|
|
72
|
+
case WidgetType.WIDGET_TYPE_TIMESERIES:
|
|
73
|
+
return "WIDGET_TYPE_TIMESERIES";
|
|
74
|
+
case WidgetType.WIDGET_TYPE_STAT:
|
|
75
|
+
return "WIDGET_TYPE_STAT";
|
|
76
|
+
case WidgetType.WIDGET_TYPE_PIE:
|
|
77
|
+
return "WIDGET_TYPE_PIE";
|
|
78
|
+
case WidgetType.WIDGET_TYPE_TABLE:
|
|
79
|
+
return "WIDGET_TYPE_TABLE";
|
|
80
|
+
case WidgetType.WIDGET_TYPE_MARKDOWN:
|
|
81
|
+
return "WIDGET_TYPE_MARKDOWN";
|
|
82
|
+
case WidgetType.UNRECOGNIZED:
|
|
83
|
+
default:
|
|
84
|
+
return "UNRECOGNIZED";
|
|
85
|
+
}
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
export enum TimeseriesStyle {
|
|
89
|
+
TIMESERIES_STYLE_UNSPECIFIED = 0,
|
|
90
|
+
TIMESERIES_STYLE_LINE = 1,
|
|
91
|
+
TIMESERIES_STYLE_AREA = 2,
|
|
92
|
+
TIMESERIES_STYLE_BAR = 3,
|
|
93
|
+
TIMESERIES_STYLE_STACKED_BAR = 4,
|
|
94
|
+
UNRECOGNIZED = -1,
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
export function timeseriesStyleFromJSON(object: any): TimeseriesStyle {
|
|
98
|
+
switch (object) {
|
|
99
|
+
case 0:
|
|
100
|
+
case "TIMESERIES_STYLE_UNSPECIFIED":
|
|
101
|
+
return TimeseriesStyle.TIMESERIES_STYLE_UNSPECIFIED;
|
|
102
|
+
case 1:
|
|
103
|
+
case "TIMESERIES_STYLE_LINE":
|
|
104
|
+
return TimeseriesStyle.TIMESERIES_STYLE_LINE;
|
|
105
|
+
case 2:
|
|
106
|
+
case "TIMESERIES_STYLE_AREA":
|
|
107
|
+
return TimeseriesStyle.TIMESERIES_STYLE_AREA;
|
|
108
|
+
case 3:
|
|
109
|
+
case "TIMESERIES_STYLE_BAR":
|
|
110
|
+
return TimeseriesStyle.TIMESERIES_STYLE_BAR;
|
|
111
|
+
case 4:
|
|
112
|
+
case "TIMESERIES_STYLE_STACKED_BAR":
|
|
113
|
+
return TimeseriesStyle.TIMESERIES_STYLE_STACKED_BAR;
|
|
114
|
+
case -1:
|
|
115
|
+
case "UNRECOGNIZED":
|
|
116
|
+
default:
|
|
117
|
+
return TimeseriesStyle.UNRECOGNIZED;
|
|
118
|
+
}
|
|
119
|
+
}
|
|
120
|
+
|
|
121
|
+
export function timeseriesStyleToJSON(object: TimeseriesStyle): string {
|
|
122
|
+
switch (object) {
|
|
123
|
+
case TimeseriesStyle.TIMESERIES_STYLE_UNSPECIFIED:
|
|
124
|
+
return "TIMESERIES_STYLE_UNSPECIFIED";
|
|
125
|
+
case TimeseriesStyle.TIMESERIES_STYLE_LINE:
|
|
126
|
+
return "TIMESERIES_STYLE_LINE";
|
|
127
|
+
case TimeseriesStyle.TIMESERIES_STYLE_AREA:
|
|
128
|
+
return "TIMESERIES_STYLE_AREA";
|
|
129
|
+
case TimeseriesStyle.TIMESERIES_STYLE_BAR:
|
|
130
|
+
return "TIMESERIES_STYLE_BAR";
|
|
131
|
+
case TimeseriesStyle.TIMESERIES_STYLE_STACKED_BAR:
|
|
132
|
+
return "TIMESERIES_STYLE_STACKED_BAR";
|
|
133
|
+
case TimeseriesStyle.UNRECOGNIZED:
|
|
134
|
+
default:
|
|
135
|
+
return "UNRECOGNIZED";
|
|
136
|
+
}
|
|
137
|
+
}
|
|
138
|
+
|
|
139
|
+
/**
|
|
140
|
+
* Dashboard is the saved document. Server-enforced caps: ≤24 widgets per
|
|
141
|
+
* dashboard, ≤4 queries per widget.
|
|
142
|
+
*/
|
|
143
|
+
export interface Dashboard {
|
|
144
|
+
id: string;
|
|
145
|
+
projectId: string;
|
|
146
|
+
name: string;
|
|
147
|
+
description: string;
|
|
148
|
+
/** The view's time range when no override is supplied on the stream request. */
|
|
149
|
+
defaultTimeWindow: AnalyticsTimeWindow;
|
|
150
|
+
widgets: Widget[];
|
|
151
|
+
/** Optimistic lock: incremented on every update; UpdateDashboard must echo it. */
|
|
152
|
+
version: number;
|
|
153
|
+
createdAt: Date | undefined;
|
|
154
|
+
updatedAt: Date | undefined;
|
|
155
|
+
}
|
|
156
|
+
|
|
157
|
+
export interface Widget {
|
|
158
|
+
/**
|
|
159
|
+
* Client-generated, [A-Za-z0-9_-]{1,64}, unique within the dashboard — the
|
|
160
|
+
* correlation key for DashboardDataEnvelope frames.
|
|
161
|
+
*/
|
|
162
|
+
id: string;
|
|
163
|
+
name: string;
|
|
164
|
+
type: WidgetType;
|
|
165
|
+
gridPos:
|
|
166
|
+
| GridPos
|
|
167
|
+
| undefined;
|
|
168
|
+
/**
|
|
169
|
+
* Data queries. TIMESERIES 1-4 (one plotted series set per query), STAT and
|
|
170
|
+
* PIE exactly 1, TABLE 1-4 (one column per query), MARKDOWN none.
|
|
171
|
+
* STAT, PIE, and TABLE queries run with a single whole-range bucket.
|
|
172
|
+
*/
|
|
173
|
+
queries: MetricQuery[];
|
|
174
|
+
/** UNSPECIFIED = follow the view (stream override or dashboard default). */
|
|
175
|
+
timeWindow: AnalyticsTimeWindow;
|
|
176
|
+
/** UNSPECIFIED = server-derived from the effective range. TIMESERIES only. */
|
|
177
|
+
timeInterval: AnalyticsTimeInterval;
|
|
178
|
+
/** TIMESERIES only; UNSPECIFIED renders as LINE. */
|
|
179
|
+
timeseriesStyle: TimeseriesStyle;
|
|
180
|
+
/** MARKDOWN widgets only: the rendered content (≤16 KiB). */
|
|
181
|
+
markdown: string;
|
|
182
|
+
}
|
|
183
|
+
|
|
184
|
+
/**
|
|
185
|
+
* GridPos places a widget on a 12-column grid; y grows downward and h/w are
|
|
186
|
+
* in grid units.
|
|
187
|
+
*/
|
|
188
|
+
export interface GridPos {
|
|
189
|
+
x: number;
|
|
190
|
+
y: number;
|
|
191
|
+
w: number;
|
|
192
|
+
h: number;
|
|
193
|
+
}
|
|
194
|
+
|
|
195
|
+
export interface CreateDashboardRequest {
|
|
196
|
+
/** Verified against the caller's identity before proxying. */
|
|
197
|
+
organizationId: string;
|
|
198
|
+
projectId: string;
|
|
199
|
+
name: string;
|
|
200
|
+
description: string;
|
|
201
|
+
defaultTimeWindow: AnalyticsTimeWindow;
|
|
202
|
+
widgets: Widget[];
|
|
203
|
+
}
|
|
204
|
+
|
|
205
|
+
export interface CreateDashboardResponse {
|
|
206
|
+
status: ResponseStatus | undefined;
|
|
207
|
+
dashboard: Dashboard | undefined;
|
|
208
|
+
}
|
|
209
|
+
|
|
210
|
+
export interface GetDashboardRequest {
|
|
211
|
+
/** Verified against the caller's identity before proxying. */
|
|
212
|
+
organizationId: string;
|
|
213
|
+
projectId: string;
|
|
214
|
+
dashboardId: string;
|
|
215
|
+
}
|
|
216
|
+
|
|
217
|
+
export interface GetDashboardResponse {
|
|
218
|
+
status: ResponseStatus | undefined;
|
|
219
|
+
dashboard: Dashboard | undefined;
|
|
220
|
+
}
|
|
221
|
+
|
|
222
|
+
export interface ListDashboardsRequest {
|
|
223
|
+
/** Verified against the caller's identity before proxying. */
|
|
224
|
+
organizationId: string;
|
|
225
|
+
projectId: string;
|
|
226
|
+
}
|
|
227
|
+
|
|
228
|
+
export interface ListDashboardsResponse {
|
|
229
|
+
status: ResponseStatus | undefined;
|
|
230
|
+
dashboards: DashboardSummary[];
|
|
231
|
+
}
|
|
232
|
+
|
|
233
|
+
/** DashboardSummary lists a dashboard without its widget payload. */
|
|
234
|
+
export interface DashboardSummary {
|
|
235
|
+
id: string;
|
|
236
|
+
name: string;
|
|
237
|
+
description: string;
|
|
238
|
+
widgetCount: number;
|
|
239
|
+
createdAt: Date | undefined;
|
|
240
|
+
updatedAt: Date | undefined;
|
|
241
|
+
}
|
|
242
|
+
|
|
243
|
+
/**
|
|
244
|
+
* UpdateDashboardRequest replaces the dashboard document. A version mismatch
|
|
245
|
+
* fails with FAILED_PRECONDITION and the caller re-fetches, merges, retries.
|
|
246
|
+
*/
|
|
247
|
+
export interface UpdateDashboardRequest {
|
|
248
|
+
/** Verified against the caller's identity before proxying. */
|
|
249
|
+
organizationId: string;
|
|
250
|
+
projectId: string;
|
|
251
|
+
dashboardId: string;
|
|
252
|
+
name: string;
|
|
253
|
+
description: string;
|
|
254
|
+
defaultTimeWindow: AnalyticsTimeWindow;
|
|
255
|
+
widgets: Widget[];
|
|
256
|
+
version: number;
|
|
257
|
+
}
|
|
258
|
+
|
|
259
|
+
export interface UpdateDashboardResponse {
|
|
260
|
+
status: ResponseStatus | undefined;
|
|
261
|
+
dashboard: Dashboard | undefined;
|
|
262
|
+
}
|
|
263
|
+
|
|
264
|
+
export interface DeleteDashboardRequest {
|
|
265
|
+
/** Verified against the caller's identity before proxying. */
|
|
266
|
+
organizationId: string;
|
|
267
|
+
projectId: string;
|
|
268
|
+
dashboardId: string;
|
|
269
|
+
}
|
|
270
|
+
|
|
271
|
+
export interface DeleteDashboardResponse {
|
|
272
|
+
status: ResponseStatus | undefined;
|
|
273
|
+
}
|
|
274
|
+
|
|
275
|
+
export interface StreamDashboardDataRequest {
|
|
276
|
+
/** Verified against the caller's identity before proxying. */
|
|
277
|
+
organizationId: string;
|
|
278
|
+
projectId: string;
|
|
279
|
+
dashboardId: string;
|
|
280
|
+
/**
|
|
281
|
+
* Empty = all data widgets; otherwise only the listed ones (viewport
|
|
282
|
+
* lazy-loading). Unknown ids are ignored.
|
|
283
|
+
*/
|
|
284
|
+
widgetIds: string[];
|
|
285
|
+
/**
|
|
286
|
+
* View-time override; unset = the dashboard's default_time_window. Widgets
|
|
287
|
+
* with a pinned time_window keep it regardless.
|
|
288
|
+
*/
|
|
289
|
+
timeRange: TimeRange | undefined;
|
|
290
|
+
}
|
|
291
|
+
|
|
292
|
+
/**
|
|
293
|
+
* DashboardDataEnvelope tags every frame with the widget and query it belongs
|
|
294
|
+
* to. MARKDOWN widgets never appear — their content rides on the Dashboard.
|
|
295
|
+
*/
|
|
296
|
+
export interface DashboardDataEnvelope {
|
|
297
|
+
widgetId: string;
|
|
298
|
+
/** Index into Widget.queries. */
|
|
299
|
+
queryIndex: number;
|
|
300
|
+
snapshot?: QuerySnapshot | undefined;
|
|
301
|
+
update?:
|
|
302
|
+
| QuerySeriesUpdate
|
|
303
|
+
| undefined;
|
|
304
|
+
/**
|
|
305
|
+
* Non-fatal: the query is retried on the next tick, and a later snapshot
|
|
306
|
+
* for the same widget/query supersedes the error.
|
|
307
|
+
*/
|
|
308
|
+
error?: WidgetQueryError | undefined;
|
|
309
|
+
}
|
|
310
|
+
|
|
311
|
+
export interface WidgetQueryError {
|
|
312
|
+
message: string;
|
|
313
|
+
}
|
|
314
|
+
|
|
315
|
+
function createBaseDashboard(): Dashboard {
|
|
316
|
+
return {
|
|
317
|
+
id: "",
|
|
318
|
+
projectId: "",
|
|
319
|
+
name: "",
|
|
320
|
+
description: "",
|
|
321
|
+
defaultTimeWindow: 0,
|
|
322
|
+
widgets: [],
|
|
323
|
+
version: 0,
|
|
324
|
+
createdAt: undefined,
|
|
325
|
+
updatedAt: undefined,
|
|
326
|
+
};
|
|
327
|
+
}
|
|
328
|
+
|
|
329
|
+
export const Dashboard: MessageFns<Dashboard> = {
|
|
330
|
+
encode(message: Dashboard, writer: BinaryWriter = new BinaryWriter()): BinaryWriter {
|
|
331
|
+
if (message.id !== "") {
|
|
332
|
+
writer.uint32(10).string(message.id);
|
|
333
|
+
}
|
|
334
|
+
if (message.projectId !== "") {
|
|
335
|
+
writer.uint32(18).string(message.projectId);
|
|
336
|
+
}
|
|
337
|
+
if (message.name !== "") {
|
|
338
|
+
writer.uint32(26).string(message.name);
|
|
339
|
+
}
|
|
340
|
+
if (message.description !== "") {
|
|
341
|
+
writer.uint32(34).string(message.description);
|
|
342
|
+
}
|
|
343
|
+
if (message.defaultTimeWindow !== 0) {
|
|
344
|
+
writer.uint32(40).int32(message.defaultTimeWindow);
|
|
345
|
+
}
|
|
346
|
+
for (const v of message.widgets) {
|
|
347
|
+
Widget.encode(v!, writer.uint32(50).fork()).join();
|
|
348
|
+
}
|
|
349
|
+
if (message.version !== 0) {
|
|
350
|
+
writer.uint32(56).int64(message.version);
|
|
351
|
+
}
|
|
352
|
+
if (message.createdAt !== undefined) {
|
|
353
|
+
Timestamp.encode(toTimestamp(message.createdAt), writer.uint32(66).fork()).join();
|
|
354
|
+
}
|
|
355
|
+
if (message.updatedAt !== undefined) {
|
|
356
|
+
Timestamp.encode(toTimestamp(message.updatedAt), writer.uint32(74).fork()).join();
|
|
357
|
+
}
|
|
358
|
+
return writer;
|
|
359
|
+
},
|
|
360
|
+
|
|
361
|
+
decode(input: BinaryReader | Uint8Array, length?: number): Dashboard {
|
|
362
|
+
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
|
|
363
|
+
const end = length === undefined ? reader.len : reader.pos + length;
|
|
364
|
+
const message = createBaseDashboard();
|
|
365
|
+
while (reader.pos < end) {
|
|
366
|
+
const tag = reader.uint32();
|
|
367
|
+
switch (tag >>> 3) {
|
|
368
|
+
case 1: {
|
|
369
|
+
if (tag !== 10) {
|
|
370
|
+
break;
|
|
371
|
+
}
|
|
372
|
+
|
|
373
|
+
message.id = reader.string();
|
|
374
|
+
continue;
|
|
375
|
+
}
|
|
376
|
+
case 2: {
|
|
377
|
+
if (tag !== 18) {
|
|
378
|
+
break;
|
|
379
|
+
}
|
|
380
|
+
|
|
381
|
+
message.projectId = reader.string();
|
|
382
|
+
continue;
|
|
383
|
+
}
|
|
384
|
+
case 3: {
|
|
385
|
+
if (tag !== 26) {
|
|
386
|
+
break;
|
|
387
|
+
}
|
|
388
|
+
|
|
389
|
+
message.name = reader.string();
|
|
390
|
+
continue;
|
|
391
|
+
}
|
|
392
|
+
case 4: {
|
|
393
|
+
if (tag !== 34) {
|
|
394
|
+
break;
|
|
395
|
+
}
|
|
396
|
+
|
|
397
|
+
message.description = reader.string();
|
|
398
|
+
continue;
|
|
399
|
+
}
|
|
400
|
+
case 5: {
|
|
401
|
+
if (tag !== 40) {
|
|
402
|
+
break;
|
|
403
|
+
}
|
|
404
|
+
|
|
405
|
+
message.defaultTimeWindow = reader.int32() as any;
|
|
406
|
+
continue;
|
|
407
|
+
}
|
|
408
|
+
case 6: {
|
|
409
|
+
if (tag !== 50) {
|
|
410
|
+
break;
|
|
411
|
+
}
|
|
412
|
+
|
|
413
|
+
message.widgets.push(Widget.decode(reader, reader.uint32()));
|
|
414
|
+
continue;
|
|
415
|
+
}
|
|
416
|
+
case 7: {
|
|
417
|
+
if (tag !== 56) {
|
|
418
|
+
break;
|
|
419
|
+
}
|
|
420
|
+
|
|
421
|
+
message.version = longToNumber(reader.int64());
|
|
422
|
+
continue;
|
|
423
|
+
}
|
|
424
|
+
case 8: {
|
|
425
|
+
if (tag !== 66) {
|
|
426
|
+
break;
|
|
427
|
+
}
|
|
428
|
+
|
|
429
|
+
message.createdAt = fromTimestamp(Timestamp.decode(reader, reader.uint32()));
|
|
430
|
+
continue;
|
|
431
|
+
}
|
|
432
|
+
case 9: {
|
|
433
|
+
if (tag !== 74) {
|
|
434
|
+
break;
|
|
435
|
+
}
|
|
436
|
+
|
|
437
|
+
message.updatedAt = fromTimestamp(Timestamp.decode(reader, reader.uint32()));
|
|
438
|
+
continue;
|
|
439
|
+
}
|
|
440
|
+
}
|
|
441
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
442
|
+
break;
|
|
443
|
+
}
|
|
444
|
+
reader.skip(tag & 7);
|
|
445
|
+
}
|
|
446
|
+
return message;
|
|
447
|
+
},
|
|
448
|
+
|
|
449
|
+
fromJSON(object: any): Dashboard {
|
|
450
|
+
return {
|
|
451
|
+
id: isSet(object.id) ? globalThis.String(object.id) : "",
|
|
452
|
+
projectId: isSet(object.projectId)
|
|
453
|
+
? globalThis.String(object.projectId)
|
|
454
|
+
: isSet(object.project_id)
|
|
455
|
+
? globalThis.String(object.project_id)
|
|
456
|
+
: "",
|
|
457
|
+
name: isSet(object.name) ? globalThis.String(object.name) : "",
|
|
458
|
+
description: isSet(object.description) ? globalThis.String(object.description) : "",
|
|
459
|
+
defaultTimeWindow: isSet(object.defaultTimeWindow)
|
|
460
|
+
? analyticsTimeWindowFromJSON(object.defaultTimeWindow)
|
|
461
|
+
: isSet(object.default_time_window)
|
|
462
|
+
? analyticsTimeWindowFromJSON(object.default_time_window)
|
|
463
|
+
: 0,
|
|
464
|
+
widgets: globalThis.Array.isArray(object?.widgets) ? object.widgets.map((e: any) => Widget.fromJSON(e)) : [],
|
|
465
|
+
version: isSet(object.version) ? globalThis.Number(object.version) : 0,
|
|
466
|
+
createdAt: isSet(object.createdAt)
|
|
467
|
+
? fromJsonTimestamp(object.createdAt)
|
|
468
|
+
: isSet(object.created_at)
|
|
469
|
+
? fromJsonTimestamp(object.created_at)
|
|
470
|
+
: undefined,
|
|
471
|
+
updatedAt: isSet(object.updatedAt)
|
|
472
|
+
? fromJsonTimestamp(object.updatedAt)
|
|
473
|
+
: isSet(object.updated_at)
|
|
474
|
+
? fromJsonTimestamp(object.updated_at)
|
|
475
|
+
: undefined,
|
|
476
|
+
};
|
|
477
|
+
},
|
|
478
|
+
|
|
479
|
+
toJSON(message: Dashboard): unknown {
|
|
480
|
+
const obj: any = {};
|
|
481
|
+
if (message.id !== "") {
|
|
482
|
+
obj.id = message.id;
|
|
483
|
+
}
|
|
484
|
+
if (message.projectId !== "") {
|
|
485
|
+
obj.projectId = message.projectId;
|
|
486
|
+
}
|
|
487
|
+
if (message.name !== "") {
|
|
488
|
+
obj.name = message.name;
|
|
489
|
+
}
|
|
490
|
+
if (message.description !== "") {
|
|
491
|
+
obj.description = message.description;
|
|
492
|
+
}
|
|
493
|
+
if (message.defaultTimeWindow !== 0) {
|
|
494
|
+
obj.defaultTimeWindow = analyticsTimeWindowToJSON(message.defaultTimeWindow);
|
|
495
|
+
}
|
|
496
|
+
if (message.widgets?.length) {
|
|
497
|
+
obj.widgets = message.widgets.map((e) => Widget.toJSON(e));
|
|
498
|
+
}
|
|
499
|
+
if (message.version !== 0) {
|
|
500
|
+
obj.version = Math.round(message.version);
|
|
501
|
+
}
|
|
502
|
+
if (message.createdAt !== undefined) {
|
|
503
|
+
obj.createdAt = message.createdAt.toISOString();
|
|
504
|
+
}
|
|
505
|
+
if (message.updatedAt !== undefined) {
|
|
506
|
+
obj.updatedAt = message.updatedAt.toISOString();
|
|
507
|
+
}
|
|
508
|
+
return obj;
|
|
509
|
+
},
|
|
510
|
+
|
|
511
|
+
create<I extends Exact<DeepPartial<Dashboard>, I>>(base?: I): Dashboard {
|
|
512
|
+
return Dashboard.fromPartial(base ?? ({} as any));
|
|
513
|
+
},
|
|
514
|
+
fromPartial<I extends Exact<DeepPartial<Dashboard>, I>>(object: I): Dashboard {
|
|
515
|
+
const message = createBaseDashboard();
|
|
516
|
+
message.id = object.id ?? "";
|
|
517
|
+
message.projectId = object.projectId ?? "";
|
|
518
|
+
message.name = object.name ?? "";
|
|
519
|
+
message.description = object.description ?? "";
|
|
520
|
+
message.defaultTimeWindow = object.defaultTimeWindow ?? 0;
|
|
521
|
+
message.widgets = object.widgets?.map((e) => Widget.fromPartial(e)) || [];
|
|
522
|
+
message.version = object.version ?? 0;
|
|
523
|
+
message.createdAt = object.createdAt ?? undefined;
|
|
524
|
+
message.updatedAt = object.updatedAt ?? undefined;
|
|
525
|
+
return message;
|
|
526
|
+
},
|
|
527
|
+
};
|
|
528
|
+
|
|
529
|
+
function createBaseWidget(): Widget {
|
|
530
|
+
return {
|
|
531
|
+
id: "",
|
|
532
|
+
name: "",
|
|
533
|
+
type: 0,
|
|
534
|
+
gridPos: undefined,
|
|
535
|
+
queries: [],
|
|
536
|
+
timeWindow: 0,
|
|
537
|
+
timeInterval: 0,
|
|
538
|
+
timeseriesStyle: 0,
|
|
539
|
+
markdown: "",
|
|
540
|
+
};
|
|
541
|
+
}
|
|
542
|
+
|
|
543
|
+
export const Widget: MessageFns<Widget> = {
|
|
544
|
+
encode(message: Widget, writer: BinaryWriter = new BinaryWriter()): BinaryWriter {
|
|
545
|
+
if (message.id !== "") {
|
|
546
|
+
writer.uint32(10).string(message.id);
|
|
547
|
+
}
|
|
548
|
+
if (message.name !== "") {
|
|
549
|
+
writer.uint32(18).string(message.name);
|
|
550
|
+
}
|
|
551
|
+
if (message.type !== 0) {
|
|
552
|
+
writer.uint32(24).int32(message.type);
|
|
553
|
+
}
|
|
554
|
+
if (message.gridPos !== undefined) {
|
|
555
|
+
GridPos.encode(message.gridPos, writer.uint32(34).fork()).join();
|
|
556
|
+
}
|
|
557
|
+
for (const v of message.queries) {
|
|
558
|
+
MetricQuery.encode(v!, writer.uint32(42).fork()).join();
|
|
559
|
+
}
|
|
560
|
+
if (message.timeWindow !== 0) {
|
|
561
|
+
writer.uint32(48).int32(message.timeWindow);
|
|
562
|
+
}
|
|
563
|
+
if (message.timeInterval !== 0) {
|
|
564
|
+
writer.uint32(56).int32(message.timeInterval);
|
|
565
|
+
}
|
|
566
|
+
if (message.timeseriesStyle !== 0) {
|
|
567
|
+
writer.uint32(64).int32(message.timeseriesStyle);
|
|
568
|
+
}
|
|
569
|
+
if (message.markdown !== "") {
|
|
570
|
+
writer.uint32(74).string(message.markdown);
|
|
571
|
+
}
|
|
572
|
+
return writer;
|
|
573
|
+
},
|
|
574
|
+
|
|
575
|
+
decode(input: BinaryReader | Uint8Array, length?: number): Widget {
|
|
576
|
+
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
|
|
577
|
+
const end = length === undefined ? reader.len : reader.pos + length;
|
|
578
|
+
const message = createBaseWidget();
|
|
579
|
+
while (reader.pos < end) {
|
|
580
|
+
const tag = reader.uint32();
|
|
581
|
+
switch (tag >>> 3) {
|
|
582
|
+
case 1: {
|
|
583
|
+
if (tag !== 10) {
|
|
584
|
+
break;
|
|
585
|
+
}
|
|
586
|
+
|
|
587
|
+
message.id = reader.string();
|
|
588
|
+
continue;
|
|
589
|
+
}
|
|
590
|
+
case 2: {
|
|
591
|
+
if (tag !== 18) {
|
|
592
|
+
break;
|
|
593
|
+
}
|
|
594
|
+
|
|
595
|
+
message.name = reader.string();
|
|
596
|
+
continue;
|
|
597
|
+
}
|
|
598
|
+
case 3: {
|
|
599
|
+
if (tag !== 24) {
|
|
600
|
+
break;
|
|
601
|
+
}
|
|
602
|
+
|
|
603
|
+
message.type = reader.int32() as any;
|
|
604
|
+
continue;
|
|
605
|
+
}
|
|
606
|
+
case 4: {
|
|
607
|
+
if (tag !== 34) {
|
|
608
|
+
break;
|
|
609
|
+
}
|
|
610
|
+
|
|
611
|
+
message.gridPos = GridPos.decode(reader, reader.uint32());
|
|
612
|
+
continue;
|
|
613
|
+
}
|
|
614
|
+
case 5: {
|
|
615
|
+
if (tag !== 42) {
|
|
616
|
+
break;
|
|
617
|
+
}
|
|
618
|
+
|
|
619
|
+
message.queries.push(MetricQuery.decode(reader, reader.uint32()));
|
|
620
|
+
continue;
|
|
621
|
+
}
|
|
622
|
+
case 6: {
|
|
623
|
+
if (tag !== 48) {
|
|
624
|
+
break;
|
|
625
|
+
}
|
|
626
|
+
|
|
627
|
+
message.timeWindow = reader.int32() as any;
|
|
628
|
+
continue;
|
|
629
|
+
}
|
|
630
|
+
case 7: {
|
|
631
|
+
if (tag !== 56) {
|
|
632
|
+
break;
|
|
633
|
+
}
|
|
634
|
+
|
|
635
|
+
message.timeInterval = reader.int32() as any;
|
|
636
|
+
continue;
|
|
637
|
+
}
|
|
638
|
+
case 8: {
|
|
639
|
+
if (tag !== 64) {
|
|
640
|
+
break;
|
|
641
|
+
}
|
|
642
|
+
|
|
643
|
+
message.timeseriesStyle = reader.int32() as any;
|
|
644
|
+
continue;
|
|
645
|
+
}
|
|
646
|
+
case 9: {
|
|
647
|
+
if (tag !== 74) {
|
|
648
|
+
break;
|
|
649
|
+
}
|
|
650
|
+
|
|
651
|
+
message.markdown = reader.string();
|
|
652
|
+
continue;
|
|
653
|
+
}
|
|
654
|
+
}
|
|
655
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
656
|
+
break;
|
|
657
|
+
}
|
|
658
|
+
reader.skip(tag & 7);
|
|
659
|
+
}
|
|
660
|
+
return message;
|
|
661
|
+
},
|
|
662
|
+
|
|
663
|
+
fromJSON(object: any): Widget {
|
|
664
|
+
return {
|
|
665
|
+
id: isSet(object.id) ? globalThis.String(object.id) : "",
|
|
666
|
+
name: isSet(object.name) ? globalThis.String(object.name) : "",
|
|
667
|
+
type: isSet(object.type) ? widgetTypeFromJSON(object.type) : 0,
|
|
668
|
+
gridPos: isSet(object.gridPos)
|
|
669
|
+
? GridPos.fromJSON(object.gridPos)
|
|
670
|
+
: isSet(object.grid_pos)
|
|
671
|
+
? GridPos.fromJSON(object.grid_pos)
|
|
672
|
+
: undefined,
|
|
673
|
+
queries: globalThis.Array.isArray(object?.queries) ? object.queries.map((e: any) => MetricQuery.fromJSON(e)) : [],
|
|
674
|
+
timeWindow: isSet(object.timeWindow)
|
|
675
|
+
? analyticsTimeWindowFromJSON(object.timeWindow)
|
|
676
|
+
: isSet(object.time_window)
|
|
677
|
+
? analyticsTimeWindowFromJSON(object.time_window)
|
|
678
|
+
: 0,
|
|
679
|
+
timeInterval: isSet(object.timeInterval)
|
|
680
|
+
? analyticsTimeIntervalFromJSON(object.timeInterval)
|
|
681
|
+
: isSet(object.time_interval)
|
|
682
|
+
? analyticsTimeIntervalFromJSON(object.time_interval)
|
|
683
|
+
: 0,
|
|
684
|
+
timeseriesStyle: isSet(object.timeseriesStyle)
|
|
685
|
+
? timeseriesStyleFromJSON(object.timeseriesStyle)
|
|
686
|
+
: isSet(object.timeseries_style)
|
|
687
|
+
? timeseriesStyleFromJSON(object.timeseries_style)
|
|
688
|
+
: 0,
|
|
689
|
+
markdown: isSet(object.markdown) ? globalThis.String(object.markdown) : "",
|
|
690
|
+
};
|
|
691
|
+
},
|
|
692
|
+
|
|
693
|
+
toJSON(message: Widget): unknown {
|
|
694
|
+
const obj: any = {};
|
|
695
|
+
if (message.id !== "") {
|
|
696
|
+
obj.id = message.id;
|
|
697
|
+
}
|
|
698
|
+
if (message.name !== "") {
|
|
699
|
+
obj.name = message.name;
|
|
700
|
+
}
|
|
701
|
+
if (message.type !== 0) {
|
|
702
|
+
obj.type = widgetTypeToJSON(message.type);
|
|
703
|
+
}
|
|
704
|
+
if (message.gridPos !== undefined) {
|
|
705
|
+
obj.gridPos = GridPos.toJSON(message.gridPos);
|
|
706
|
+
}
|
|
707
|
+
if (message.queries?.length) {
|
|
708
|
+
obj.queries = message.queries.map((e) => MetricQuery.toJSON(e));
|
|
709
|
+
}
|
|
710
|
+
if (message.timeWindow !== 0) {
|
|
711
|
+
obj.timeWindow = analyticsTimeWindowToJSON(message.timeWindow);
|
|
712
|
+
}
|
|
713
|
+
if (message.timeInterval !== 0) {
|
|
714
|
+
obj.timeInterval = analyticsTimeIntervalToJSON(message.timeInterval);
|
|
715
|
+
}
|
|
716
|
+
if (message.timeseriesStyle !== 0) {
|
|
717
|
+
obj.timeseriesStyle = timeseriesStyleToJSON(message.timeseriesStyle);
|
|
718
|
+
}
|
|
719
|
+
if (message.markdown !== "") {
|
|
720
|
+
obj.markdown = message.markdown;
|
|
721
|
+
}
|
|
722
|
+
return obj;
|
|
723
|
+
},
|
|
724
|
+
|
|
725
|
+
create<I extends Exact<DeepPartial<Widget>, I>>(base?: I): Widget {
|
|
726
|
+
return Widget.fromPartial(base ?? ({} as any));
|
|
727
|
+
},
|
|
728
|
+
fromPartial<I extends Exact<DeepPartial<Widget>, I>>(object: I): Widget {
|
|
729
|
+
const message = createBaseWidget();
|
|
730
|
+
message.id = object.id ?? "";
|
|
731
|
+
message.name = object.name ?? "";
|
|
732
|
+
message.type = object.type ?? 0;
|
|
733
|
+
message.gridPos = (object.gridPos !== undefined && object.gridPos !== null)
|
|
734
|
+
? GridPos.fromPartial(object.gridPos)
|
|
735
|
+
: undefined;
|
|
736
|
+
message.queries = object.queries?.map((e) => MetricQuery.fromPartial(e)) || [];
|
|
737
|
+
message.timeWindow = object.timeWindow ?? 0;
|
|
738
|
+
message.timeInterval = object.timeInterval ?? 0;
|
|
739
|
+
message.timeseriesStyle = object.timeseriesStyle ?? 0;
|
|
740
|
+
message.markdown = object.markdown ?? "";
|
|
741
|
+
return message;
|
|
742
|
+
},
|
|
743
|
+
};
|
|
744
|
+
|
|
745
|
+
function createBaseGridPos(): GridPos {
|
|
746
|
+
return { x: 0, y: 0, w: 0, h: 0 };
|
|
747
|
+
}
|
|
748
|
+
|
|
749
|
+
export const GridPos: MessageFns<GridPos> = {
|
|
750
|
+
encode(message: GridPos, writer: BinaryWriter = new BinaryWriter()): BinaryWriter {
|
|
751
|
+
if (message.x !== 0) {
|
|
752
|
+
writer.uint32(8).int32(message.x);
|
|
753
|
+
}
|
|
754
|
+
if (message.y !== 0) {
|
|
755
|
+
writer.uint32(16).int32(message.y);
|
|
756
|
+
}
|
|
757
|
+
if (message.w !== 0) {
|
|
758
|
+
writer.uint32(24).int32(message.w);
|
|
759
|
+
}
|
|
760
|
+
if (message.h !== 0) {
|
|
761
|
+
writer.uint32(32).int32(message.h);
|
|
762
|
+
}
|
|
763
|
+
return writer;
|
|
764
|
+
},
|
|
765
|
+
|
|
766
|
+
decode(input: BinaryReader | Uint8Array, length?: number): GridPos {
|
|
767
|
+
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
|
|
768
|
+
const end = length === undefined ? reader.len : reader.pos + length;
|
|
769
|
+
const message = createBaseGridPos();
|
|
770
|
+
while (reader.pos < end) {
|
|
771
|
+
const tag = reader.uint32();
|
|
772
|
+
switch (tag >>> 3) {
|
|
773
|
+
case 1: {
|
|
774
|
+
if (tag !== 8) {
|
|
775
|
+
break;
|
|
776
|
+
}
|
|
777
|
+
|
|
778
|
+
message.x = reader.int32();
|
|
779
|
+
continue;
|
|
780
|
+
}
|
|
781
|
+
case 2: {
|
|
782
|
+
if (tag !== 16) {
|
|
783
|
+
break;
|
|
784
|
+
}
|
|
785
|
+
|
|
786
|
+
message.y = reader.int32();
|
|
787
|
+
continue;
|
|
788
|
+
}
|
|
789
|
+
case 3: {
|
|
790
|
+
if (tag !== 24) {
|
|
791
|
+
break;
|
|
792
|
+
}
|
|
793
|
+
|
|
794
|
+
message.w = reader.int32();
|
|
795
|
+
continue;
|
|
796
|
+
}
|
|
797
|
+
case 4: {
|
|
798
|
+
if (tag !== 32) {
|
|
799
|
+
break;
|
|
800
|
+
}
|
|
801
|
+
|
|
802
|
+
message.h = reader.int32();
|
|
803
|
+
continue;
|
|
804
|
+
}
|
|
805
|
+
}
|
|
806
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
807
|
+
break;
|
|
808
|
+
}
|
|
809
|
+
reader.skip(tag & 7);
|
|
810
|
+
}
|
|
811
|
+
return message;
|
|
812
|
+
},
|
|
813
|
+
|
|
814
|
+
fromJSON(object: any): GridPos {
|
|
815
|
+
return {
|
|
816
|
+
x: isSet(object.x) ? globalThis.Number(object.x) : 0,
|
|
817
|
+
y: isSet(object.y) ? globalThis.Number(object.y) : 0,
|
|
818
|
+
w: isSet(object.w) ? globalThis.Number(object.w) : 0,
|
|
819
|
+
h: isSet(object.h) ? globalThis.Number(object.h) : 0,
|
|
820
|
+
};
|
|
821
|
+
},
|
|
822
|
+
|
|
823
|
+
toJSON(message: GridPos): unknown {
|
|
824
|
+
const obj: any = {};
|
|
825
|
+
if (message.x !== 0) {
|
|
826
|
+
obj.x = Math.round(message.x);
|
|
827
|
+
}
|
|
828
|
+
if (message.y !== 0) {
|
|
829
|
+
obj.y = Math.round(message.y);
|
|
830
|
+
}
|
|
831
|
+
if (message.w !== 0) {
|
|
832
|
+
obj.w = Math.round(message.w);
|
|
833
|
+
}
|
|
834
|
+
if (message.h !== 0) {
|
|
835
|
+
obj.h = Math.round(message.h);
|
|
836
|
+
}
|
|
837
|
+
return obj;
|
|
838
|
+
},
|
|
839
|
+
|
|
840
|
+
create<I extends Exact<DeepPartial<GridPos>, I>>(base?: I): GridPos {
|
|
841
|
+
return GridPos.fromPartial(base ?? ({} as any));
|
|
842
|
+
},
|
|
843
|
+
fromPartial<I extends Exact<DeepPartial<GridPos>, I>>(object: I): GridPos {
|
|
844
|
+
const message = createBaseGridPos();
|
|
845
|
+
message.x = object.x ?? 0;
|
|
846
|
+
message.y = object.y ?? 0;
|
|
847
|
+
message.w = object.w ?? 0;
|
|
848
|
+
message.h = object.h ?? 0;
|
|
849
|
+
return message;
|
|
850
|
+
},
|
|
851
|
+
};
|
|
852
|
+
|
|
853
|
+
function createBaseCreateDashboardRequest(): CreateDashboardRequest {
|
|
854
|
+
return { organizationId: "", projectId: "", name: "", description: "", defaultTimeWindow: 0, widgets: [] };
|
|
855
|
+
}
|
|
856
|
+
|
|
857
|
+
export const CreateDashboardRequest: MessageFns<CreateDashboardRequest> = {
|
|
858
|
+
encode(message: CreateDashboardRequest, writer: BinaryWriter = new BinaryWriter()): BinaryWriter {
|
|
859
|
+
if (message.organizationId !== "") {
|
|
860
|
+
writer.uint32(10).string(message.organizationId);
|
|
861
|
+
}
|
|
862
|
+
if (message.projectId !== "") {
|
|
863
|
+
writer.uint32(18).string(message.projectId);
|
|
864
|
+
}
|
|
865
|
+
if (message.name !== "") {
|
|
866
|
+
writer.uint32(26).string(message.name);
|
|
867
|
+
}
|
|
868
|
+
if (message.description !== "") {
|
|
869
|
+
writer.uint32(34).string(message.description);
|
|
870
|
+
}
|
|
871
|
+
if (message.defaultTimeWindow !== 0) {
|
|
872
|
+
writer.uint32(40).int32(message.defaultTimeWindow);
|
|
873
|
+
}
|
|
874
|
+
for (const v of message.widgets) {
|
|
875
|
+
Widget.encode(v!, writer.uint32(50).fork()).join();
|
|
876
|
+
}
|
|
877
|
+
return writer;
|
|
878
|
+
},
|
|
879
|
+
|
|
880
|
+
decode(input: BinaryReader | Uint8Array, length?: number): CreateDashboardRequest {
|
|
881
|
+
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
|
|
882
|
+
const end = length === undefined ? reader.len : reader.pos + length;
|
|
883
|
+
const message = createBaseCreateDashboardRequest();
|
|
884
|
+
while (reader.pos < end) {
|
|
885
|
+
const tag = reader.uint32();
|
|
886
|
+
switch (tag >>> 3) {
|
|
887
|
+
case 1: {
|
|
888
|
+
if (tag !== 10) {
|
|
889
|
+
break;
|
|
890
|
+
}
|
|
891
|
+
|
|
892
|
+
message.organizationId = reader.string();
|
|
893
|
+
continue;
|
|
894
|
+
}
|
|
895
|
+
case 2: {
|
|
896
|
+
if (tag !== 18) {
|
|
897
|
+
break;
|
|
898
|
+
}
|
|
899
|
+
|
|
900
|
+
message.projectId = reader.string();
|
|
901
|
+
continue;
|
|
902
|
+
}
|
|
903
|
+
case 3: {
|
|
904
|
+
if (tag !== 26) {
|
|
905
|
+
break;
|
|
906
|
+
}
|
|
907
|
+
|
|
908
|
+
message.name = reader.string();
|
|
909
|
+
continue;
|
|
910
|
+
}
|
|
911
|
+
case 4: {
|
|
912
|
+
if (tag !== 34) {
|
|
913
|
+
break;
|
|
914
|
+
}
|
|
915
|
+
|
|
916
|
+
message.description = reader.string();
|
|
917
|
+
continue;
|
|
918
|
+
}
|
|
919
|
+
case 5: {
|
|
920
|
+
if (tag !== 40) {
|
|
921
|
+
break;
|
|
922
|
+
}
|
|
923
|
+
|
|
924
|
+
message.defaultTimeWindow = reader.int32() as any;
|
|
925
|
+
continue;
|
|
926
|
+
}
|
|
927
|
+
case 6: {
|
|
928
|
+
if (tag !== 50) {
|
|
929
|
+
break;
|
|
930
|
+
}
|
|
931
|
+
|
|
932
|
+
message.widgets.push(Widget.decode(reader, reader.uint32()));
|
|
933
|
+
continue;
|
|
934
|
+
}
|
|
935
|
+
}
|
|
936
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
937
|
+
break;
|
|
938
|
+
}
|
|
939
|
+
reader.skip(tag & 7);
|
|
940
|
+
}
|
|
941
|
+
return message;
|
|
942
|
+
},
|
|
943
|
+
|
|
944
|
+
fromJSON(object: any): CreateDashboardRequest {
|
|
945
|
+
return {
|
|
946
|
+
organizationId: isSet(object.organizationId)
|
|
947
|
+
? globalThis.String(object.organizationId)
|
|
948
|
+
: isSet(object.organization_id)
|
|
949
|
+
? globalThis.String(object.organization_id)
|
|
950
|
+
: "",
|
|
951
|
+
projectId: isSet(object.projectId)
|
|
952
|
+
? globalThis.String(object.projectId)
|
|
953
|
+
: isSet(object.project_id)
|
|
954
|
+
? globalThis.String(object.project_id)
|
|
955
|
+
: "",
|
|
956
|
+
name: isSet(object.name) ? globalThis.String(object.name) : "",
|
|
957
|
+
description: isSet(object.description) ? globalThis.String(object.description) : "",
|
|
958
|
+
defaultTimeWindow: isSet(object.defaultTimeWindow)
|
|
959
|
+
? analyticsTimeWindowFromJSON(object.defaultTimeWindow)
|
|
960
|
+
: isSet(object.default_time_window)
|
|
961
|
+
? analyticsTimeWindowFromJSON(object.default_time_window)
|
|
962
|
+
: 0,
|
|
963
|
+
widgets: globalThis.Array.isArray(object?.widgets) ? object.widgets.map((e: any) => Widget.fromJSON(e)) : [],
|
|
964
|
+
};
|
|
965
|
+
},
|
|
966
|
+
|
|
967
|
+
toJSON(message: CreateDashboardRequest): unknown {
|
|
968
|
+
const obj: any = {};
|
|
969
|
+
if (message.organizationId !== "") {
|
|
970
|
+
obj.organizationId = message.organizationId;
|
|
971
|
+
}
|
|
972
|
+
if (message.projectId !== "") {
|
|
973
|
+
obj.projectId = message.projectId;
|
|
974
|
+
}
|
|
975
|
+
if (message.name !== "") {
|
|
976
|
+
obj.name = message.name;
|
|
977
|
+
}
|
|
978
|
+
if (message.description !== "") {
|
|
979
|
+
obj.description = message.description;
|
|
980
|
+
}
|
|
981
|
+
if (message.defaultTimeWindow !== 0) {
|
|
982
|
+
obj.defaultTimeWindow = analyticsTimeWindowToJSON(message.defaultTimeWindow);
|
|
983
|
+
}
|
|
984
|
+
if (message.widgets?.length) {
|
|
985
|
+
obj.widgets = message.widgets.map((e) => Widget.toJSON(e));
|
|
986
|
+
}
|
|
987
|
+
return obj;
|
|
988
|
+
},
|
|
989
|
+
|
|
990
|
+
create<I extends Exact<DeepPartial<CreateDashboardRequest>, I>>(base?: I): CreateDashboardRequest {
|
|
991
|
+
return CreateDashboardRequest.fromPartial(base ?? ({} as any));
|
|
992
|
+
},
|
|
993
|
+
fromPartial<I extends Exact<DeepPartial<CreateDashboardRequest>, I>>(object: I): CreateDashboardRequest {
|
|
994
|
+
const message = createBaseCreateDashboardRequest();
|
|
995
|
+
message.organizationId = object.organizationId ?? "";
|
|
996
|
+
message.projectId = object.projectId ?? "";
|
|
997
|
+
message.name = object.name ?? "";
|
|
998
|
+
message.description = object.description ?? "";
|
|
999
|
+
message.defaultTimeWindow = object.defaultTimeWindow ?? 0;
|
|
1000
|
+
message.widgets = object.widgets?.map((e) => Widget.fromPartial(e)) || [];
|
|
1001
|
+
return message;
|
|
1002
|
+
},
|
|
1003
|
+
};
|
|
1004
|
+
|
|
1005
|
+
function createBaseCreateDashboardResponse(): CreateDashboardResponse {
|
|
1006
|
+
return { status: undefined, dashboard: undefined };
|
|
1007
|
+
}
|
|
1008
|
+
|
|
1009
|
+
export const CreateDashboardResponse: MessageFns<CreateDashboardResponse> = {
|
|
1010
|
+
encode(message: CreateDashboardResponse, writer: BinaryWriter = new BinaryWriter()): BinaryWriter {
|
|
1011
|
+
if (message.status !== undefined) {
|
|
1012
|
+
ResponseStatus.encode(message.status, writer.uint32(10).fork()).join();
|
|
1013
|
+
}
|
|
1014
|
+
if (message.dashboard !== undefined) {
|
|
1015
|
+
Dashboard.encode(message.dashboard, writer.uint32(18).fork()).join();
|
|
1016
|
+
}
|
|
1017
|
+
return writer;
|
|
1018
|
+
},
|
|
1019
|
+
|
|
1020
|
+
decode(input: BinaryReader | Uint8Array, length?: number): CreateDashboardResponse {
|
|
1021
|
+
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
|
|
1022
|
+
const end = length === undefined ? reader.len : reader.pos + length;
|
|
1023
|
+
const message = createBaseCreateDashboardResponse();
|
|
1024
|
+
while (reader.pos < end) {
|
|
1025
|
+
const tag = reader.uint32();
|
|
1026
|
+
switch (tag >>> 3) {
|
|
1027
|
+
case 1: {
|
|
1028
|
+
if (tag !== 10) {
|
|
1029
|
+
break;
|
|
1030
|
+
}
|
|
1031
|
+
|
|
1032
|
+
message.status = ResponseStatus.decode(reader, reader.uint32());
|
|
1033
|
+
continue;
|
|
1034
|
+
}
|
|
1035
|
+
case 2: {
|
|
1036
|
+
if (tag !== 18) {
|
|
1037
|
+
break;
|
|
1038
|
+
}
|
|
1039
|
+
|
|
1040
|
+
message.dashboard = Dashboard.decode(reader, reader.uint32());
|
|
1041
|
+
continue;
|
|
1042
|
+
}
|
|
1043
|
+
}
|
|
1044
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
1045
|
+
break;
|
|
1046
|
+
}
|
|
1047
|
+
reader.skip(tag & 7);
|
|
1048
|
+
}
|
|
1049
|
+
return message;
|
|
1050
|
+
},
|
|
1051
|
+
|
|
1052
|
+
fromJSON(object: any): CreateDashboardResponse {
|
|
1053
|
+
return {
|
|
1054
|
+
status: isSet(object.status) ? ResponseStatus.fromJSON(object.status) : undefined,
|
|
1055
|
+
dashboard: isSet(object.dashboard) ? Dashboard.fromJSON(object.dashboard) : undefined,
|
|
1056
|
+
};
|
|
1057
|
+
},
|
|
1058
|
+
|
|
1059
|
+
toJSON(message: CreateDashboardResponse): unknown {
|
|
1060
|
+
const obj: any = {};
|
|
1061
|
+
if (message.status !== undefined) {
|
|
1062
|
+
obj.status = ResponseStatus.toJSON(message.status);
|
|
1063
|
+
}
|
|
1064
|
+
if (message.dashboard !== undefined) {
|
|
1065
|
+
obj.dashboard = Dashboard.toJSON(message.dashboard);
|
|
1066
|
+
}
|
|
1067
|
+
return obj;
|
|
1068
|
+
},
|
|
1069
|
+
|
|
1070
|
+
create<I extends Exact<DeepPartial<CreateDashboardResponse>, I>>(base?: I): CreateDashboardResponse {
|
|
1071
|
+
return CreateDashboardResponse.fromPartial(base ?? ({} as any));
|
|
1072
|
+
},
|
|
1073
|
+
fromPartial<I extends Exact<DeepPartial<CreateDashboardResponse>, I>>(object: I): CreateDashboardResponse {
|
|
1074
|
+
const message = createBaseCreateDashboardResponse();
|
|
1075
|
+
message.status = (object.status !== undefined && object.status !== null)
|
|
1076
|
+
? ResponseStatus.fromPartial(object.status)
|
|
1077
|
+
: undefined;
|
|
1078
|
+
message.dashboard = (object.dashboard !== undefined && object.dashboard !== null)
|
|
1079
|
+
? Dashboard.fromPartial(object.dashboard)
|
|
1080
|
+
: undefined;
|
|
1081
|
+
return message;
|
|
1082
|
+
},
|
|
1083
|
+
};
|
|
1084
|
+
|
|
1085
|
+
function createBaseGetDashboardRequest(): GetDashboardRequest {
|
|
1086
|
+
return { organizationId: "", projectId: "", dashboardId: "" };
|
|
1087
|
+
}
|
|
1088
|
+
|
|
1089
|
+
export const GetDashboardRequest: MessageFns<GetDashboardRequest> = {
|
|
1090
|
+
encode(message: GetDashboardRequest, writer: BinaryWriter = new BinaryWriter()): BinaryWriter {
|
|
1091
|
+
if (message.organizationId !== "") {
|
|
1092
|
+
writer.uint32(10).string(message.organizationId);
|
|
1093
|
+
}
|
|
1094
|
+
if (message.projectId !== "") {
|
|
1095
|
+
writer.uint32(18).string(message.projectId);
|
|
1096
|
+
}
|
|
1097
|
+
if (message.dashboardId !== "") {
|
|
1098
|
+
writer.uint32(26).string(message.dashboardId);
|
|
1099
|
+
}
|
|
1100
|
+
return writer;
|
|
1101
|
+
},
|
|
1102
|
+
|
|
1103
|
+
decode(input: BinaryReader | Uint8Array, length?: number): GetDashboardRequest {
|
|
1104
|
+
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
|
|
1105
|
+
const end = length === undefined ? reader.len : reader.pos + length;
|
|
1106
|
+
const message = createBaseGetDashboardRequest();
|
|
1107
|
+
while (reader.pos < end) {
|
|
1108
|
+
const tag = reader.uint32();
|
|
1109
|
+
switch (tag >>> 3) {
|
|
1110
|
+
case 1: {
|
|
1111
|
+
if (tag !== 10) {
|
|
1112
|
+
break;
|
|
1113
|
+
}
|
|
1114
|
+
|
|
1115
|
+
message.organizationId = reader.string();
|
|
1116
|
+
continue;
|
|
1117
|
+
}
|
|
1118
|
+
case 2: {
|
|
1119
|
+
if (tag !== 18) {
|
|
1120
|
+
break;
|
|
1121
|
+
}
|
|
1122
|
+
|
|
1123
|
+
message.projectId = reader.string();
|
|
1124
|
+
continue;
|
|
1125
|
+
}
|
|
1126
|
+
case 3: {
|
|
1127
|
+
if (tag !== 26) {
|
|
1128
|
+
break;
|
|
1129
|
+
}
|
|
1130
|
+
|
|
1131
|
+
message.dashboardId = reader.string();
|
|
1132
|
+
continue;
|
|
1133
|
+
}
|
|
1134
|
+
}
|
|
1135
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
1136
|
+
break;
|
|
1137
|
+
}
|
|
1138
|
+
reader.skip(tag & 7);
|
|
1139
|
+
}
|
|
1140
|
+
return message;
|
|
1141
|
+
},
|
|
1142
|
+
|
|
1143
|
+
fromJSON(object: any): GetDashboardRequest {
|
|
1144
|
+
return {
|
|
1145
|
+
organizationId: isSet(object.organizationId)
|
|
1146
|
+
? globalThis.String(object.organizationId)
|
|
1147
|
+
: isSet(object.organization_id)
|
|
1148
|
+
? globalThis.String(object.organization_id)
|
|
1149
|
+
: "",
|
|
1150
|
+
projectId: isSet(object.projectId)
|
|
1151
|
+
? globalThis.String(object.projectId)
|
|
1152
|
+
: isSet(object.project_id)
|
|
1153
|
+
? globalThis.String(object.project_id)
|
|
1154
|
+
: "",
|
|
1155
|
+
dashboardId: isSet(object.dashboardId)
|
|
1156
|
+
? globalThis.String(object.dashboardId)
|
|
1157
|
+
: isSet(object.dashboard_id)
|
|
1158
|
+
? globalThis.String(object.dashboard_id)
|
|
1159
|
+
: "",
|
|
1160
|
+
};
|
|
1161
|
+
},
|
|
1162
|
+
|
|
1163
|
+
toJSON(message: GetDashboardRequest): unknown {
|
|
1164
|
+
const obj: any = {};
|
|
1165
|
+
if (message.organizationId !== "") {
|
|
1166
|
+
obj.organizationId = message.organizationId;
|
|
1167
|
+
}
|
|
1168
|
+
if (message.projectId !== "") {
|
|
1169
|
+
obj.projectId = message.projectId;
|
|
1170
|
+
}
|
|
1171
|
+
if (message.dashboardId !== "") {
|
|
1172
|
+
obj.dashboardId = message.dashboardId;
|
|
1173
|
+
}
|
|
1174
|
+
return obj;
|
|
1175
|
+
},
|
|
1176
|
+
|
|
1177
|
+
create<I extends Exact<DeepPartial<GetDashboardRequest>, I>>(base?: I): GetDashboardRequest {
|
|
1178
|
+
return GetDashboardRequest.fromPartial(base ?? ({} as any));
|
|
1179
|
+
},
|
|
1180
|
+
fromPartial<I extends Exact<DeepPartial<GetDashboardRequest>, I>>(object: I): GetDashboardRequest {
|
|
1181
|
+
const message = createBaseGetDashboardRequest();
|
|
1182
|
+
message.organizationId = object.organizationId ?? "";
|
|
1183
|
+
message.projectId = object.projectId ?? "";
|
|
1184
|
+
message.dashboardId = object.dashboardId ?? "";
|
|
1185
|
+
return message;
|
|
1186
|
+
},
|
|
1187
|
+
};
|
|
1188
|
+
|
|
1189
|
+
function createBaseGetDashboardResponse(): GetDashboardResponse {
|
|
1190
|
+
return { status: undefined, dashboard: undefined };
|
|
1191
|
+
}
|
|
1192
|
+
|
|
1193
|
+
export const GetDashboardResponse: MessageFns<GetDashboardResponse> = {
|
|
1194
|
+
encode(message: GetDashboardResponse, writer: BinaryWriter = new BinaryWriter()): BinaryWriter {
|
|
1195
|
+
if (message.status !== undefined) {
|
|
1196
|
+
ResponseStatus.encode(message.status, writer.uint32(10).fork()).join();
|
|
1197
|
+
}
|
|
1198
|
+
if (message.dashboard !== undefined) {
|
|
1199
|
+
Dashboard.encode(message.dashboard, writer.uint32(18).fork()).join();
|
|
1200
|
+
}
|
|
1201
|
+
return writer;
|
|
1202
|
+
},
|
|
1203
|
+
|
|
1204
|
+
decode(input: BinaryReader | Uint8Array, length?: number): GetDashboardResponse {
|
|
1205
|
+
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
|
|
1206
|
+
const end = length === undefined ? reader.len : reader.pos + length;
|
|
1207
|
+
const message = createBaseGetDashboardResponse();
|
|
1208
|
+
while (reader.pos < end) {
|
|
1209
|
+
const tag = reader.uint32();
|
|
1210
|
+
switch (tag >>> 3) {
|
|
1211
|
+
case 1: {
|
|
1212
|
+
if (tag !== 10) {
|
|
1213
|
+
break;
|
|
1214
|
+
}
|
|
1215
|
+
|
|
1216
|
+
message.status = ResponseStatus.decode(reader, reader.uint32());
|
|
1217
|
+
continue;
|
|
1218
|
+
}
|
|
1219
|
+
case 2: {
|
|
1220
|
+
if (tag !== 18) {
|
|
1221
|
+
break;
|
|
1222
|
+
}
|
|
1223
|
+
|
|
1224
|
+
message.dashboard = Dashboard.decode(reader, reader.uint32());
|
|
1225
|
+
continue;
|
|
1226
|
+
}
|
|
1227
|
+
}
|
|
1228
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
1229
|
+
break;
|
|
1230
|
+
}
|
|
1231
|
+
reader.skip(tag & 7);
|
|
1232
|
+
}
|
|
1233
|
+
return message;
|
|
1234
|
+
},
|
|
1235
|
+
|
|
1236
|
+
fromJSON(object: any): GetDashboardResponse {
|
|
1237
|
+
return {
|
|
1238
|
+
status: isSet(object.status) ? ResponseStatus.fromJSON(object.status) : undefined,
|
|
1239
|
+
dashboard: isSet(object.dashboard) ? Dashboard.fromJSON(object.dashboard) : undefined,
|
|
1240
|
+
};
|
|
1241
|
+
},
|
|
1242
|
+
|
|
1243
|
+
toJSON(message: GetDashboardResponse): unknown {
|
|
1244
|
+
const obj: any = {};
|
|
1245
|
+
if (message.status !== undefined) {
|
|
1246
|
+
obj.status = ResponseStatus.toJSON(message.status);
|
|
1247
|
+
}
|
|
1248
|
+
if (message.dashboard !== undefined) {
|
|
1249
|
+
obj.dashboard = Dashboard.toJSON(message.dashboard);
|
|
1250
|
+
}
|
|
1251
|
+
return obj;
|
|
1252
|
+
},
|
|
1253
|
+
|
|
1254
|
+
create<I extends Exact<DeepPartial<GetDashboardResponse>, I>>(base?: I): GetDashboardResponse {
|
|
1255
|
+
return GetDashboardResponse.fromPartial(base ?? ({} as any));
|
|
1256
|
+
},
|
|
1257
|
+
fromPartial<I extends Exact<DeepPartial<GetDashboardResponse>, I>>(object: I): GetDashboardResponse {
|
|
1258
|
+
const message = createBaseGetDashboardResponse();
|
|
1259
|
+
message.status = (object.status !== undefined && object.status !== null)
|
|
1260
|
+
? ResponseStatus.fromPartial(object.status)
|
|
1261
|
+
: undefined;
|
|
1262
|
+
message.dashboard = (object.dashboard !== undefined && object.dashboard !== null)
|
|
1263
|
+
? Dashboard.fromPartial(object.dashboard)
|
|
1264
|
+
: undefined;
|
|
1265
|
+
return message;
|
|
1266
|
+
},
|
|
1267
|
+
};
|
|
1268
|
+
|
|
1269
|
+
function createBaseListDashboardsRequest(): ListDashboardsRequest {
|
|
1270
|
+
return { organizationId: "", projectId: "" };
|
|
1271
|
+
}
|
|
1272
|
+
|
|
1273
|
+
export const ListDashboardsRequest: MessageFns<ListDashboardsRequest> = {
|
|
1274
|
+
encode(message: ListDashboardsRequest, writer: BinaryWriter = new BinaryWriter()): BinaryWriter {
|
|
1275
|
+
if (message.organizationId !== "") {
|
|
1276
|
+
writer.uint32(10).string(message.organizationId);
|
|
1277
|
+
}
|
|
1278
|
+
if (message.projectId !== "") {
|
|
1279
|
+
writer.uint32(18).string(message.projectId);
|
|
1280
|
+
}
|
|
1281
|
+
return writer;
|
|
1282
|
+
},
|
|
1283
|
+
|
|
1284
|
+
decode(input: BinaryReader | Uint8Array, length?: number): ListDashboardsRequest {
|
|
1285
|
+
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
|
|
1286
|
+
const end = length === undefined ? reader.len : reader.pos + length;
|
|
1287
|
+
const message = createBaseListDashboardsRequest();
|
|
1288
|
+
while (reader.pos < end) {
|
|
1289
|
+
const tag = reader.uint32();
|
|
1290
|
+
switch (tag >>> 3) {
|
|
1291
|
+
case 1: {
|
|
1292
|
+
if (tag !== 10) {
|
|
1293
|
+
break;
|
|
1294
|
+
}
|
|
1295
|
+
|
|
1296
|
+
message.organizationId = reader.string();
|
|
1297
|
+
continue;
|
|
1298
|
+
}
|
|
1299
|
+
case 2: {
|
|
1300
|
+
if (tag !== 18) {
|
|
1301
|
+
break;
|
|
1302
|
+
}
|
|
1303
|
+
|
|
1304
|
+
message.projectId = reader.string();
|
|
1305
|
+
continue;
|
|
1306
|
+
}
|
|
1307
|
+
}
|
|
1308
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
1309
|
+
break;
|
|
1310
|
+
}
|
|
1311
|
+
reader.skip(tag & 7);
|
|
1312
|
+
}
|
|
1313
|
+
return message;
|
|
1314
|
+
},
|
|
1315
|
+
|
|
1316
|
+
fromJSON(object: any): ListDashboardsRequest {
|
|
1317
|
+
return {
|
|
1318
|
+
organizationId: isSet(object.organizationId)
|
|
1319
|
+
? globalThis.String(object.organizationId)
|
|
1320
|
+
: isSet(object.organization_id)
|
|
1321
|
+
? globalThis.String(object.organization_id)
|
|
1322
|
+
: "",
|
|
1323
|
+
projectId: isSet(object.projectId)
|
|
1324
|
+
? globalThis.String(object.projectId)
|
|
1325
|
+
: isSet(object.project_id)
|
|
1326
|
+
? globalThis.String(object.project_id)
|
|
1327
|
+
: "",
|
|
1328
|
+
};
|
|
1329
|
+
},
|
|
1330
|
+
|
|
1331
|
+
toJSON(message: ListDashboardsRequest): unknown {
|
|
1332
|
+
const obj: any = {};
|
|
1333
|
+
if (message.organizationId !== "") {
|
|
1334
|
+
obj.organizationId = message.organizationId;
|
|
1335
|
+
}
|
|
1336
|
+
if (message.projectId !== "") {
|
|
1337
|
+
obj.projectId = message.projectId;
|
|
1338
|
+
}
|
|
1339
|
+
return obj;
|
|
1340
|
+
},
|
|
1341
|
+
|
|
1342
|
+
create<I extends Exact<DeepPartial<ListDashboardsRequest>, I>>(base?: I): ListDashboardsRequest {
|
|
1343
|
+
return ListDashboardsRequest.fromPartial(base ?? ({} as any));
|
|
1344
|
+
},
|
|
1345
|
+
fromPartial<I extends Exact<DeepPartial<ListDashboardsRequest>, I>>(object: I): ListDashboardsRequest {
|
|
1346
|
+
const message = createBaseListDashboardsRequest();
|
|
1347
|
+
message.organizationId = object.organizationId ?? "";
|
|
1348
|
+
message.projectId = object.projectId ?? "";
|
|
1349
|
+
return message;
|
|
1350
|
+
},
|
|
1351
|
+
};
|
|
1352
|
+
|
|
1353
|
+
function createBaseListDashboardsResponse(): ListDashboardsResponse {
|
|
1354
|
+
return { status: undefined, dashboards: [] };
|
|
1355
|
+
}
|
|
1356
|
+
|
|
1357
|
+
export const ListDashboardsResponse: MessageFns<ListDashboardsResponse> = {
|
|
1358
|
+
encode(message: ListDashboardsResponse, writer: BinaryWriter = new BinaryWriter()): BinaryWriter {
|
|
1359
|
+
if (message.status !== undefined) {
|
|
1360
|
+
ResponseStatus.encode(message.status, writer.uint32(10).fork()).join();
|
|
1361
|
+
}
|
|
1362
|
+
for (const v of message.dashboards) {
|
|
1363
|
+
DashboardSummary.encode(v!, writer.uint32(18).fork()).join();
|
|
1364
|
+
}
|
|
1365
|
+
return writer;
|
|
1366
|
+
},
|
|
1367
|
+
|
|
1368
|
+
decode(input: BinaryReader | Uint8Array, length?: number): ListDashboardsResponse {
|
|
1369
|
+
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
|
|
1370
|
+
const end = length === undefined ? reader.len : reader.pos + length;
|
|
1371
|
+
const message = createBaseListDashboardsResponse();
|
|
1372
|
+
while (reader.pos < end) {
|
|
1373
|
+
const tag = reader.uint32();
|
|
1374
|
+
switch (tag >>> 3) {
|
|
1375
|
+
case 1: {
|
|
1376
|
+
if (tag !== 10) {
|
|
1377
|
+
break;
|
|
1378
|
+
}
|
|
1379
|
+
|
|
1380
|
+
message.status = ResponseStatus.decode(reader, reader.uint32());
|
|
1381
|
+
continue;
|
|
1382
|
+
}
|
|
1383
|
+
case 2: {
|
|
1384
|
+
if (tag !== 18) {
|
|
1385
|
+
break;
|
|
1386
|
+
}
|
|
1387
|
+
|
|
1388
|
+
message.dashboards.push(DashboardSummary.decode(reader, reader.uint32()));
|
|
1389
|
+
continue;
|
|
1390
|
+
}
|
|
1391
|
+
}
|
|
1392
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
1393
|
+
break;
|
|
1394
|
+
}
|
|
1395
|
+
reader.skip(tag & 7);
|
|
1396
|
+
}
|
|
1397
|
+
return message;
|
|
1398
|
+
},
|
|
1399
|
+
|
|
1400
|
+
fromJSON(object: any): ListDashboardsResponse {
|
|
1401
|
+
return {
|
|
1402
|
+
status: isSet(object.status) ? ResponseStatus.fromJSON(object.status) : undefined,
|
|
1403
|
+
dashboards: globalThis.Array.isArray(object?.dashboards)
|
|
1404
|
+
? object.dashboards.map((e: any) => DashboardSummary.fromJSON(e))
|
|
1405
|
+
: [],
|
|
1406
|
+
};
|
|
1407
|
+
},
|
|
1408
|
+
|
|
1409
|
+
toJSON(message: ListDashboardsResponse): unknown {
|
|
1410
|
+
const obj: any = {};
|
|
1411
|
+
if (message.status !== undefined) {
|
|
1412
|
+
obj.status = ResponseStatus.toJSON(message.status);
|
|
1413
|
+
}
|
|
1414
|
+
if (message.dashboards?.length) {
|
|
1415
|
+
obj.dashboards = message.dashboards.map((e) => DashboardSummary.toJSON(e));
|
|
1416
|
+
}
|
|
1417
|
+
return obj;
|
|
1418
|
+
},
|
|
1419
|
+
|
|
1420
|
+
create<I extends Exact<DeepPartial<ListDashboardsResponse>, I>>(base?: I): ListDashboardsResponse {
|
|
1421
|
+
return ListDashboardsResponse.fromPartial(base ?? ({} as any));
|
|
1422
|
+
},
|
|
1423
|
+
fromPartial<I extends Exact<DeepPartial<ListDashboardsResponse>, I>>(object: I): ListDashboardsResponse {
|
|
1424
|
+
const message = createBaseListDashboardsResponse();
|
|
1425
|
+
message.status = (object.status !== undefined && object.status !== null)
|
|
1426
|
+
? ResponseStatus.fromPartial(object.status)
|
|
1427
|
+
: undefined;
|
|
1428
|
+
message.dashboards = object.dashboards?.map((e) => DashboardSummary.fromPartial(e)) || [];
|
|
1429
|
+
return message;
|
|
1430
|
+
},
|
|
1431
|
+
};
|
|
1432
|
+
|
|
1433
|
+
function createBaseDashboardSummary(): DashboardSummary {
|
|
1434
|
+
return { id: "", name: "", description: "", widgetCount: 0, createdAt: undefined, updatedAt: undefined };
|
|
1435
|
+
}
|
|
1436
|
+
|
|
1437
|
+
export const DashboardSummary: MessageFns<DashboardSummary> = {
|
|
1438
|
+
encode(message: DashboardSummary, writer: BinaryWriter = new BinaryWriter()): BinaryWriter {
|
|
1439
|
+
if (message.id !== "") {
|
|
1440
|
+
writer.uint32(10).string(message.id);
|
|
1441
|
+
}
|
|
1442
|
+
if (message.name !== "") {
|
|
1443
|
+
writer.uint32(18).string(message.name);
|
|
1444
|
+
}
|
|
1445
|
+
if (message.description !== "") {
|
|
1446
|
+
writer.uint32(26).string(message.description);
|
|
1447
|
+
}
|
|
1448
|
+
if (message.widgetCount !== 0) {
|
|
1449
|
+
writer.uint32(32).int32(message.widgetCount);
|
|
1450
|
+
}
|
|
1451
|
+
if (message.createdAt !== undefined) {
|
|
1452
|
+
Timestamp.encode(toTimestamp(message.createdAt), writer.uint32(42).fork()).join();
|
|
1453
|
+
}
|
|
1454
|
+
if (message.updatedAt !== undefined) {
|
|
1455
|
+
Timestamp.encode(toTimestamp(message.updatedAt), writer.uint32(50).fork()).join();
|
|
1456
|
+
}
|
|
1457
|
+
return writer;
|
|
1458
|
+
},
|
|
1459
|
+
|
|
1460
|
+
decode(input: BinaryReader | Uint8Array, length?: number): DashboardSummary {
|
|
1461
|
+
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
|
|
1462
|
+
const end = length === undefined ? reader.len : reader.pos + length;
|
|
1463
|
+
const message = createBaseDashboardSummary();
|
|
1464
|
+
while (reader.pos < end) {
|
|
1465
|
+
const tag = reader.uint32();
|
|
1466
|
+
switch (tag >>> 3) {
|
|
1467
|
+
case 1: {
|
|
1468
|
+
if (tag !== 10) {
|
|
1469
|
+
break;
|
|
1470
|
+
}
|
|
1471
|
+
|
|
1472
|
+
message.id = reader.string();
|
|
1473
|
+
continue;
|
|
1474
|
+
}
|
|
1475
|
+
case 2: {
|
|
1476
|
+
if (tag !== 18) {
|
|
1477
|
+
break;
|
|
1478
|
+
}
|
|
1479
|
+
|
|
1480
|
+
message.name = reader.string();
|
|
1481
|
+
continue;
|
|
1482
|
+
}
|
|
1483
|
+
case 3: {
|
|
1484
|
+
if (tag !== 26) {
|
|
1485
|
+
break;
|
|
1486
|
+
}
|
|
1487
|
+
|
|
1488
|
+
message.description = reader.string();
|
|
1489
|
+
continue;
|
|
1490
|
+
}
|
|
1491
|
+
case 4: {
|
|
1492
|
+
if (tag !== 32) {
|
|
1493
|
+
break;
|
|
1494
|
+
}
|
|
1495
|
+
|
|
1496
|
+
message.widgetCount = reader.int32();
|
|
1497
|
+
continue;
|
|
1498
|
+
}
|
|
1499
|
+
case 5: {
|
|
1500
|
+
if (tag !== 42) {
|
|
1501
|
+
break;
|
|
1502
|
+
}
|
|
1503
|
+
|
|
1504
|
+
message.createdAt = fromTimestamp(Timestamp.decode(reader, reader.uint32()));
|
|
1505
|
+
continue;
|
|
1506
|
+
}
|
|
1507
|
+
case 6: {
|
|
1508
|
+
if (tag !== 50) {
|
|
1509
|
+
break;
|
|
1510
|
+
}
|
|
1511
|
+
|
|
1512
|
+
message.updatedAt = fromTimestamp(Timestamp.decode(reader, reader.uint32()));
|
|
1513
|
+
continue;
|
|
1514
|
+
}
|
|
1515
|
+
}
|
|
1516
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
1517
|
+
break;
|
|
1518
|
+
}
|
|
1519
|
+
reader.skip(tag & 7);
|
|
1520
|
+
}
|
|
1521
|
+
return message;
|
|
1522
|
+
},
|
|
1523
|
+
|
|
1524
|
+
fromJSON(object: any): DashboardSummary {
|
|
1525
|
+
return {
|
|
1526
|
+
id: isSet(object.id) ? globalThis.String(object.id) : "",
|
|
1527
|
+
name: isSet(object.name) ? globalThis.String(object.name) : "",
|
|
1528
|
+
description: isSet(object.description) ? globalThis.String(object.description) : "",
|
|
1529
|
+
widgetCount: isSet(object.widgetCount)
|
|
1530
|
+
? globalThis.Number(object.widgetCount)
|
|
1531
|
+
: isSet(object.widget_count)
|
|
1532
|
+
? globalThis.Number(object.widget_count)
|
|
1533
|
+
: 0,
|
|
1534
|
+
createdAt: isSet(object.createdAt)
|
|
1535
|
+
? fromJsonTimestamp(object.createdAt)
|
|
1536
|
+
: isSet(object.created_at)
|
|
1537
|
+
? fromJsonTimestamp(object.created_at)
|
|
1538
|
+
: undefined,
|
|
1539
|
+
updatedAt: isSet(object.updatedAt)
|
|
1540
|
+
? fromJsonTimestamp(object.updatedAt)
|
|
1541
|
+
: isSet(object.updated_at)
|
|
1542
|
+
? fromJsonTimestamp(object.updated_at)
|
|
1543
|
+
: undefined,
|
|
1544
|
+
};
|
|
1545
|
+
},
|
|
1546
|
+
|
|
1547
|
+
toJSON(message: DashboardSummary): unknown {
|
|
1548
|
+
const obj: any = {};
|
|
1549
|
+
if (message.id !== "") {
|
|
1550
|
+
obj.id = message.id;
|
|
1551
|
+
}
|
|
1552
|
+
if (message.name !== "") {
|
|
1553
|
+
obj.name = message.name;
|
|
1554
|
+
}
|
|
1555
|
+
if (message.description !== "") {
|
|
1556
|
+
obj.description = message.description;
|
|
1557
|
+
}
|
|
1558
|
+
if (message.widgetCount !== 0) {
|
|
1559
|
+
obj.widgetCount = Math.round(message.widgetCount);
|
|
1560
|
+
}
|
|
1561
|
+
if (message.createdAt !== undefined) {
|
|
1562
|
+
obj.createdAt = message.createdAt.toISOString();
|
|
1563
|
+
}
|
|
1564
|
+
if (message.updatedAt !== undefined) {
|
|
1565
|
+
obj.updatedAt = message.updatedAt.toISOString();
|
|
1566
|
+
}
|
|
1567
|
+
return obj;
|
|
1568
|
+
},
|
|
1569
|
+
|
|
1570
|
+
create<I extends Exact<DeepPartial<DashboardSummary>, I>>(base?: I): DashboardSummary {
|
|
1571
|
+
return DashboardSummary.fromPartial(base ?? ({} as any));
|
|
1572
|
+
},
|
|
1573
|
+
fromPartial<I extends Exact<DeepPartial<DashboardSummary>, I>>(object: I): DashboardSummary {
|
|
1574
|
+
const message = createBaseDashboardSummary();
|
|
1575
|
+
message.id = object.id ?? "";
|
|
1576
|
+
message.name = object.name ?? "";
|
|
1577
|
+
message.description = object.description ?? "";
|
|
1578
|
+
message.widgetCount = object.widgetCount ?? 0;
|
|
1579
|
+
message.createdAt = object.createdAt ?? undefined;
|
|
1580
|
+
message.updatedAt = object.updatedAt ?? undefined;
|
|
1581
|
+
return message;
|
|
1582
|
+
},
|
|
1583
|
+
};
|
|
1584
|
+
|
|
1585
|
+
function createBaseUpdateDashboardRequest(): UpdateDashboardRequest {
|
|
1586
|
+
return {
|
|
1587
|
+
organizationId: "",
|
|
1588
|
+
projectId: "",
|
|
1589
|
+
dashboardId: "",
|
|
1590
|
+
name: "",
|
|
1591
|
+
description: "",
|
|
1592
|
+
defaultTimeWindow: 0,
|
|
1593
|
+
widgets: [],
|
|
1594
|
+
version: 0,
|
|
1595
|
+
};
|
|
1596
|
+
}
|
|
1597
|
+
|
|
1598
|
+
export const UpdateDashboardRequest: MessageFns<UpdateDashboardRequest> = {
|
|
1599
|
+
encode(message: UpdateDashboardRequest, writer: BinaryWriter = new BinaryWriter()): BinaryWriter {
|
|
1600
|
+
if (message.organizationId !== "") {
|
|
1601
|
+
writer.uint32(10).string(message.organizationId);
|
|
1602
|
+
}
|
|
1603
|
+
if (message.projectId !== "") {
|
|
1604
|
+
writer.uint32(18).string(message.projectId);
|
|
1605
|
+
}
|
|
1606
|
+
if (message.dashboardId !== "") {
|
|
1607
|
+
writer.uint32(26).string(message.dashboardId);
|
|
1608
|
+
}
|
|
1609
|
+
if (message.name !== "") {
|
|
1610
|
+
writer.uint32(34).string(message.name);
|
|
1611
|
+
}
|
|
1612
|
+
if (message.description !== "") {
|
|
1613
|
+
writer.uint32(42).string(message.description);
|
|
1614
|
+
}
|
|
1615
|
+
if (message.defaultTimeWindow !== 0) {
|
|
1616
|
+
writer.uint32(48).int32(message.defaultTimeWindow);
|
|
1617
|
+
}
|
|
1618
|
+
for (const v of message.widgets) {
|
|
1619
|
+
Widget.encode(v!, writer.uint32(58).fork()).join();
|
|
1620
|
+
}
|
|
1621
|
+
if (message.version !== 0) {
|
|
1622
|
+
writer.uint32(64).int64(message.version);
|
|
1623
|
+
}
|
|
1624
|
+
return writer;
|
|
1625
|
+
},
|
|
1626
|
+
|
|
1627
|
+
decode(input: BinaryReader | Uint8Array, length?: number): UpdateDashboardRequest {
|
|
1628
|
+
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
|
|
1629
|
+
const end = length === undefined ? reader.len : reader.pos + length;
|
|
1630
|
+
const message = createBaseUpdateDashboardRequest();
|
|
1631
|
+
while (reader.pos < end) {
|
|
1632
|
+
const tag = reader.uint32();
|
|
1633
|
+
switch (tag >>> 3) {
|
|
1634
|
+
case 1: {
|
|
1635
|
+
if (tag !== 10) {
|
|
1636
|
+
break;
|
|
1637
|
+
}
|
|
1638
|
+
|
|
1639
|
+
message.organizationId = reader.string();
|
|
1640
|
+
continue;
|
|
1641
|
+
}
|
|
1642
|
+
case 2: {
|
|
1643
|
+
if (tag !== 18) {
|
|
1644
|
+
break;
|
|
1645
|
+
}
|
|
1646
|
+
|
|
1647
|
+
message.projectId = reader.string();
|
|
1648
|
+
continue;
|
|
1649
|
+
}
|
|
1650
|
+
case 3: {
|
|
1651
|
+
if (tag !== 26) {
|
|
1652
|
+
break;
|
|
1653
|
+
}
|
|
1654
|
+
|
|
1655
|
+
message.dashboardId = reader.string();
|
|
1656
|
+
continue;
|
|
1657
|
+
}
|
|
1658
|
+
case 4: {
|
|
1659
|
+
if (tag !== 34) {
|
|
1660
|
+
break;
|
|
1661
|
+
}
|
|
1662
|
+
|
|
1663
|
+
message.name = reader.string();
|
|
1664
|
+
continue;
|
|
1665
|
+
}
|
|
1666
|
+
case 5: {
|
|
1667
|
+
if (tag !== 42) {
|
|
1668
|
+
break;
|
|
1669
|
+
}
|
|
1670
|
+
|
|
1671
|
+
message.description = reader.string();
|
|
1672
|
+
continue;
|
|
1673
|
+
}
|
|
1674
|
+
case 6: {
|
|
1675
|
+
if (tag !== 48) {
|
|
1676
|
+
break;
|
|
1677
|
+
}
|
|
1678
|
+
|
|
1679
|
+
message.defaultTimeWindow = reader.int32() as any;
|
|
1680
|
+
continue;
|
|
1681
|
+
}
|
|
1682
|
+
case 7: {
|
|
1683
|
+
if (tag !== 58) {
|
|
1684
|
+
break;
|
|
1685
|
+
}
|
|
1686
|
+
|
|
1687
|
+
message.widgets.push(Widget.decode(reader, reader.uint32()));
|
|
1688
|
+
continue;
|
|
1689
|
+
}
|
|
1690
|
+
case 8: {
|
|
1691
|
+
if (tag !== 64) {
|
|
1692
|
+
break;
|
|
1693
|
+
}
|
|
1694
|
+
|
|
1695
|
+
message.version = longToNumber(reader.int64());
|
|
1696
|
+
continue;
|
|
1697
|
+
}
|
|
1698
|
+
}
|
|
1699
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
1700
|
+
break;
|
|
1701
|
+
}
|
|
1702
|
+
reader.skip(tag & 7);
|
|
1703
|
+
}
|
|
1704
|
+
return message;
|
|
1705
|
+
},
|
|
1706
|
+
|
|
1707
|
+
fromJSON(object: any): UpdateDashboardRequest {
|
|
1708
|
+
return {
|
|
1709
|
+
organizationId: isSet(object.organizationId)
|
|
1710
|
+
? globalThis.String(object.organizationId)
|
|
1711
|
+
: isSet(object.organization_id)
|
|
1712
|
+
? globalThis.String(object.organization_id)
|
|
1713
|
+
: "",
|
|
1714
|
+
projectId: isSet(object.projectId)
|
|
1715
|
+
? globalThis.String(object.projectId)
|
|
1716
|
+
: isSet(object.project_id)
|
|
1717
|
+
? globalThis.String(object.project_id)
|
|
1718
|
+
: "",
|
|
1719
|
+
dashboardId: isSet(object.dashboardId)
|
|
1720
|
+
? globalThis.String(object.dashboardId)
|
|
1721
|
+
: isSet(object.dashboard_id)
|
|
1722
|
+
? globalThis.String(object.dashboard_id)
|
|
1723
|
+
: "",
|
|
1724
|
+
name: isSet(object.name) ? globalThis.String(object.name) : "",
|
|
1725
|
+
description: isSet(object.description) ? globalThis.String(object.description) : "",
|
|
1726
|
+
defaultTimeWindow: isSet(object.defaultTimeWindow)
|
|
1727
|
+
? analyticsTimeWindowFromJSON(object.defaultTimeWindow)
|
|
1728
|
+
: isSet(object.default_time_window)
|
|
1729
|
+
? analyticsTimeWindowFromJSON(object.default_time_window)
|
|
1730
|
+
: 0,
|
|
1731
|
+
widgets: globalThis.Array.isArray(object?.widgets)
|
|
1732
|
+
? object.widgets.map((e: any) => Widget.fromJSON(e))
|
|
1733
|
+
: [],
|
|
1734
|
+
version: isSet(object.version) ? globalThis.Number(object.version) : 0,
|
|
1735
|
+
};
|
|
1736
|
+
},
|
|
1737
|
+
|
|
1738
|
+
toJSON(message: UpdateDashboardRequest): unknown {
|
|
1739
|
+
const obj: any = {};
|
|
1740
|
+
if (message.organizationId !== "") {
|
|
1741
|
+
obj.organizationId = message.organizationId;
|
|
1742
|
+
}
|
|
1743
|
+
if (message.projectId !== "") {
|
|
1744
|
+
obj.projectId = message.projectId;
|
|
1745
|
+
}
|
|
1746
|
+
if (message.dashboardId !== "") {
|
|
1747
|
+
obj.dashboardId = message.dashboardId;
|
|
1748
|
+
}
|
|
1749
|
+
if (message.name !== "") {
|
|
1750
|
+
obj.name = message.name;
|
|
1751
|
+
}
|
|
1752
|
+
if (message.description !== "") {
|
|
1753
|
+
obj.description = message.description;
|
|
1754
|
+
}
|
|
1755
|
+
if (message.defaultTimeWindow !== 0) {
|
|
1756
|
+
obj.defaultTimeWindow = analyticsTimeWindowToJSON(message.defaultTimeWindow);
|
|
1757
|
+
}
|
|
1758
|
+
if (message.widgets?.length) {
|
|
1759
|
+
obj.widgets = message.widgets.map((e) => Widget.toJSON(e));
|
|
1760
|
+
}
|
|
1761
|
+
if (message.version !== 0) {
|
|
1762
|
+
obj.version = Math.round(message.version);
|
|
1763
|
+
}
|
|
1764
|
+
return obj;
|
|
1765
|
+
},
|
|
1766
|
+
|
|
1767
|
+
create<I extends Exact<DeepPartial<UpdateDashboardRequest>, I>>(base?: I): UpdateDashboardRequest {
|
|
1768
|
+
return UpdateDashboardRequest.fromPartial(base ?? ({} as any));
|
|
1769
|
+
},
|
|
1770
|
+
fromPartial<I extends Exact<DeepPartial<UpdateDashboardRequest>, I>>(object: I): UpdateDashboardRequest {
|
|
1771
|
+
const message = createBaseUpdateDashboardRequest();
|
|
1772
|
+
message.organizationId = object.organizationId ?? "";
|
|
1773
|
+
message.projectId = object.projectId ?? "";
|
|
1774
|
+
message.dashboardId = object.dashboardId ?? "";
|
|
1775
|
+
message.name = object.name ?? "";
|
|
1776
|
+
message.description = object.description ?? "";
|
|
1777
|
+
message.defaultTimeWindow = object.defaultTimeWindow ?? 0;
|
|
1778
|
+
message.widgets = object.widgets?.map((e) => Widget.fromPartial(e)) || [];
|
|
1779
|
+
message.version = object.version ?? 0;
|
|
1780
|
+
return message;
|
|
1781
|
+
},
|
|
1782
|
+
};
|
|
1783
|
+
|
|
1784
|
+
function createBaseUpdateDashboardResponse(): UpdateDashboardResponse {
|
|
1785
|
+
return { status: undefined, dashboard: undefined };
|
|
1786
|
+
}
|
|
1787
|
+
|
|
1788
|
+
export const UpdateDashboardResponse: MessageFns<UpdateDashboardResponse> = {
|
|
1789
|
+
encode(message: UpdateDashboardResponse, writer: BinaryWriter = new BinaryWriter()): BinaryWriter {
|
|
1790
|
+
if (message.status !== undefined) {
|
|
1791
|
+
ResponseStatus.encode(message.status, writer.uint32(10).fork()).join();
|
|
1792
|
+
}
|
|
1793
|
+
if (message.dashboard !== undefined) {
|
|
1794
|
+
Dashboard.encode(message.dashboard, writer.uint32(18).fork()).join();
|
|
1795
|
+
}
|
|
1796
|
+
return writer;
|
|
1797
|
+
},
|
|
1798
|
+
|
|
1799
|
+
decode(input: BinaryReader | Uint8Array, length?: number): UpdateDashboardResponse {
|
|
1800
|
+
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
|
|
1801
|
+
const end = length === undefined ? reader.len : reader.pos + length;
|
|
1802
|
+
const message = createBaseUpdateDashboardResponse();
|
|
1803
|
+
while (reader.pos < end) {
|
|
1804
|
+
const tag = reader.uint32();
|
|
1805
|
+
switch (tag >>> 3) {
|
|
1806
|
+
case 1: {
|
|
1807
|
+
if (tag !== 10) {
|
|
1808
|
+
break;
|
|
1809
|
+
}
|
|
1810
|
+
|
|
1811
|
+
message.status = ResponseStatus.decode(reader, reader.uint32());
|
|
1812
|
+
continue;
|
|
1813
|
+
}
|
|
1814
|
+
case 2: {
|
|
1815
|
+
if (tag !== 18) {
|
|
1816
|
+
break;
|
|
1817
|
+
}
|
|
1818
|
+
|
|
1819
|
+
message.dashboard = Dashboard.decode(reader, reader.uint32());
|
|
1820
|
+
continue;
|
|
1821
|
+
}
|
|
1822
|
+
}
|
|
1823
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
1824
|
+
break;
|
|
1825
|
+
}
|
|
1826
|
+
reader.skip(tag & 7);
|
|
1827
|
+
}
|
|
1828
|
+
return message;
|
|
1829
|
+
},
|
|
1830
|
+
|
|
1831
|
+
fromJSON(object: any): UpdateDashboardResponse {
|
|
1832
|
+
return {
|
|
1833
|
+
status: isSet(object.status) ? ResponseStatus.fromJSON(object.status) : undefined,
|
|
1834
|
+
dashboard: isSet(object.dashboard) ? Dashboard.fromJSON(object.dashboard) : undefined,
|
|
1835
|
+
};
|
|
1836
|
+
},
|
|
1837
|
+
|
|
1838
|
+
toJSON(message: UpdateDashboardResponse): unknown {
|
|
1839
|
+
const obj: any = {};
|
|
1840
|
+
if (message.status !== undefined) {
|
|
1841
|
+
obj.status = ResponseStatus.toJSON(message.status);
|
|
1842
|
+
}
|
|
1843
|
+
if (message.dashboard !== undefined) {
|
|
1844
|
+
obj.dashboard = Dashboard.toJSON(message.dashboard);
|
|
1845
|
+
}
|
|
1846
|
+
return obj;
|
|
1847
|
+
},
|
|
1848
|
+
|
|
1849
|
+
create<I extends Exact<DeepPartial<UpdateDashboardResponse>, I>>(base?: I): UpdateDashboardResponse {
|
|
1850
|
+
return UpdateDashboardResponse.fromPartial(base ?? ({} as any));
|
|
1851
|
+
},
|
|
1852
|
+
fromPartial<I extends Exact<DeepPartial<UpdateDashboardResponse>, I>>(object: I): UpdateDashboardResponse {
|
|
1853
|
+
const message = createBaseUpdateDashboardResponse();
|
|
1854
|
+
message.status = (object.status !== undefined && object.status !== null)
|
|
1855
|
+
? ResponseStatus.fromPartial(object.status)
|
|
1856
|
+
: undefined;
|
|
1857
|
+
message.dashboard = (object.dashboard !== undefined && object.dashboard !== null)
|
|
1858
|
+
? Dashboard.fromPartial(object.dashboard)
|
|
1859
|
+
: undefined;
|
|
1860
|
+
return message;
|
|
1861
|
+
},
|
|
1862
|
+
};
|
|
1863
|
+
|
|
1864
|
+
function createBaseDeleteDashboardRequest(): DeleteDashboardRequest {
|
|
1865
|
+
return { organizationId: "", projectId: "", dashboardId: "" };
|
|
1866
|
+
}
|
|
1867
|
+
|
|
1868
|
+
export const DeleteDashboardRequest: MessageFns<DeleteDashboardRequest> = {
|
|
1869
|
+
encode(message: DeleteDashboardRequest, writer: BinaryWriter = new BinaryWriter()): BinaryWriter {
|
|
1870
|
+
if (message.organizationId !== "") {
|
|
1871
|
+
writer.uint32(10).string(message.organizationId);
|
|
1872
|
+
}
|
|
1873
|
+
if (message.projectId !== "") {
|
|
1874
|
+
writer.uint32(18).string(message.projectId);
|
|
1875
|
+
}
|
|
1876
|
+
if (message.dashboardId !== "") {
|
|
1877
|
+
writer.uint32(26).string(message.dashboardId);
|
|
1878
|
+
}
|
|
1879
|
+
return writer;
|
|
1880
|
+
},
|
|
1881
|
+
|
|
1882
|
+
decode(input: BinaryReader | Uint8Array, length?: number): DeleteDashboardRequest {
|
|
1883
|
+
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
|
|
1884
|
+
const end = length === undefined ? reader.len : reader.pos + length;
|
|
1885
|
+
const message = createBaseDeleteDashboardRequest();
|
|
1886
|
+
while (reader.pos < end) {
|
|
1887
|
+
const tag = reader.uint32();
|
|
1888
|
+
switch (tag >>> 3) {
|
|
1889
|
+
case 1: {
|
|
1890
|
+
if (tag !== 10) {
|
|
1891
|
+
break;
|
|
1892
|
+
}
|
|
1893
|
+
|
|
1894
|
+
message.organizationId = reader.string();
|
|
1895
|
+
continue;
|
|
1896
|
+
}
|
|
1897
|
+
case 2: {
|
|
1898
|
+
if (tag !== 18) {
|
|
1899
|
+
break;
|
|
1900
|
+
}
|
|
1901
|
+
|
|
1902
|
+
message.projectId = reader.string();
|
|
1903
|
+
continue;
|
|
1904
|
+
}
|
|
1905
|
+
case 3: {
|
|
1906
|
+
if (tag !== 26) {
|
|
1907
|
+
break;
|
|
1908
|
+
}
|
|
1909
|
+
|
|
1910
|
+
message.dashboardId = reader.string();
|
|
1911
|
+
continue;
|
|
1912
|
+
}
|
|
1913
|
+
}
|
|
1914
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
1915
|
+
break;
|
|
1916
|
+
}
|
|
1917
|
+
reader.skip(tag & 7);
|
|
1918
|
+
}
|
|
1919
|
+
return message;
|
|
1920
|
+
},
|
|
1921
|
+
|
|
1922
|
+
fromJSON(object: any): DeleteDashboardRequest {
|
|
1923
|
+
return {
|
|
1924
|
+
organizationId: isSet(object.organizationId)
|
|
1925
|
+
? globalThis.String(object.organizationId)
|
|
1926
|
+
: isSet(object.organization_id)
|
|
1927
|
+
? globalThis.String(object.organization_id)
|
|
1928
|
+
: "",
|
|
1929
|
+
projectId: isSet(object.projectId)
|
|
1930
|
+
? globalThis.String(object.projectId)
|
|
1931
|
+
: isSet(object.project_id)
|
|
1932
|
+
? globalThis.String(object.project_id)
|
|
1933
|
+
: "",
|
|
1934
|
+
dashboardId: isSet(object.dashboardId)
|
|
1935
|
+
? globalThis.String(object.dashboardId)
|
|
1936
|
+
: isSet(object.dashboard_id)
|
|
1937
|
+
? globalThis.String(object.dashboard_id)
|
|
1938
|
+
: "",
|
|
1939
|
+
};
|
|
1940
|
+
},
|
|
1941
|
+
|
|
1942
|
+
toJSON(message: DeleteDashboardRequest): unknown {
|
|
1943
|
+
const obj: any = {};
|
|
1944
|
+
if (message.organizationId !== "") {
|
|
1945
|
+
obj.organizationId = message.organizationId;
|
|
1946
|
+
}
|
|
1947
|
+
if (message.projectId !== "") {
|
|
1948
|
+
obj.projectId = message.projectId;
|
|
1949
|
+
}
|
|
1950
|
+
if (message.dashboardId !== "") {
|
|
1951
|
+
obj.dashboardId = message.dashboardId;
|
|
1952
|
+
}
|
|
1953
|
+
return obj;
|
|
1954
|
+
},
|
|
1955
|
+
|
|
1956
|
+
create<I extends Exact<DeepPartial<DeleteDashboardRequest>, I>>(base?: I): DeleteDashboardRequest {
|
|
1957
|
+
return DeleteDashboardRequest.fromPartial(base ?? ({} as any));
|
|
1958
|
+
},
|
|
1959
|
+
fromPartial<I extends Exact<DeepPartial<DeleteDashboardRequest>, I>>(object: I): DeleteDashboardRequest {
|
|
1960
|
+
const message = createBaseDeleteDashboardRequest();
|
|
1961
|
+
message.organizationId = object.organizationId ?? "";
|
|
1962
|
+
message.projectId = object.projectId ?? "";
|
|
1963
|
+
message.dashboardId = object.dashboardId ?? "";
|
|
1964
|
+
return message;
|
|
1965
|
+
},
|
|
1966
|
+
};
|
|
1967
|
+
|
|
1968
|
+
function createBaseDeleteDashboardResponse(): DeleteDashboardResponse {
|
|
1969
|
+
return { status: undefined };
|
|
1970
|
+
}
|
|
1971
|
+
|
|
1972
|
+
export const DeleteDashboardResponse: MessageFns<DeleteDashboardResponse> = {
|
|
1973
|
+
encode(message: DeleteDashboardResponse, writer: BinaryWriter = new BinaryWriter()): BinaryWriter {
|
|
1974
|
+
if (message.status !== undefined) {
|
|
1975
|
+
ResponseStatus.encode(message.status, writer.uint32(10).fork()).join();
|
|
1976
|
+
}
|
|
1977
|
+
return writer;
|
|
1978
|
+
},
|
|
1979
|
+
|
|
1980
|
+
decode(input: BinaryReader | Uint8Array, length?: number): DeleteDashboardResponse {
|
|
1981
|
+
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
|
|
1982
|
+
const end = length === undefined ? reader.len : reader.pos + length;
|
|
1983
|
+
const message = createBaseDeleteDashboardResponse();
|
|
1984
|
+
while (reader.pos < end) {
|
|
1985
|
+
const tag = reader.uint32();
|
|
1986
|
+
switch (tag >>> 3) {
|
|
1987
|
+
case 1: {
|
|
1988
|
+
if (tag !== 10) {
|
|
1989
|
+
break;
|
|
1990
|
+
}
|
|
1991
|
+
|
|
1992
|
+
message.status = ResponseStatus.decode(reader, reader.uint32());
|
|
1993
|
+
continue;
|
|
1994
|
+
}
|
|
1995
|
+
}
|
|
1996
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
1997
|
+
break;
|
|
1998
|
+
}
|
|
1999
|
+
reader.skip(tag & 7);
|
|
2000
|
+
}
|
|
2001
|
+
return message;
|
|
2002
|
+
},
|
|
2003
|
+
|
|
2004
|
+
fromJSON(object: any): DeleteDashboardResponse {
|
|
2005
|
+
return { status: isSet(object.status) ? ResponseStatus.fromJSON(object.status) : undefined };
|
|
2006
|
+
},
|
|
2007
|
+
|
|
2008
|
+
toJSON(message: DeleteDashboardResponse): unknown {
|
|
2009
|
+
const obj: any = {};
|
|
2010
|
+
if (message.status !== undefined) {
|
|
2011
|
+
obj.status = ResponseStatus.toJSON(message.status);
|
|
2012
|
+
}
|
|
2013
|
+
return obj;
|
|
2014
|
+
},
|
|
2015
|
+
|
|
2016
|
+
create<I extends Exact<DeepPartial<DeleteDashboardResponse>, I>>(base?: I): DeleteDashboardResponse {
|
|
2017
|
+
return DeleteDashboardResponse.fromPartial(base ?? ({} as any));
|
|
2018
|
+
},
|
|
2019
|
+
fromPartial<I extends Exact<DeepPartial<DeleteDashboardResponse>, I>>(object: I): DeleteDashboardResponse {
|
|
2020
|
+
const message = createBaseDeleteDashboardResponse();
|
|
2021
|
+
message.status = (object.status !== undefined && object.status !== null)
|
|
2022
|
+
? ResponseStatus.fromPartial(object.status)
|
|
2023
|
+
: undefined;
|
|
2024
|
+
return message;
|
|
2025
|
+
},
|
|
2026
|
+
};
|
|
2027
|
+
|
|
2028
|
+
function createBaseStreamDashboardDataRequest(): StreamDashboardDataRequest {
|
|
2029
|
+
return { organizationId: "", projectId: "", dashboardId: "", widgetIds: [], timeRange: undefined };
|
|
2030
|
+
}
|
|
2031
|
+
|
|
2032
|
+
export const StreamDashboardDataRequest: MessageFns<StreamDashboardDataRequest> = {
|
|
2033
|
+
encode(message: StreamDashboardDataRequest, writer: BinaryWriter = new BinaryWriter()): BinaryWriter {
|
|
2034
|
+
if (message.organizationId !== "") {
|
|
2035
|
+
writer.uint32(10).string(message.organizationId);
|
|
2036
|
+
}
|
|
2037
|
+
if (message.projectId !== "") {
|
|
2038
|
+
writer.uint32(18).string(message.projectId);
|
|
2039
|
+
}
|
|
2040
|
+
if (message.dashboardId !== "") {
|
|
2041
|
+
writer.uint32(26).string(message.dashboardId);
|
|
2042
|
+
}
|
|
2043
|
+
for (const v of message.widgetIds) {
|
|
2044
|
+
writer.uint32(34).string(v!);
|
|
2045
|
+
}
|
|
2046
|
+
if (message.timeRange !== undefined) {
|
|
2047
|
+
TimeRange.encode(message.timeRange, writer.uint32(42).fork()).join();
|
|
2048
|
+
}
|
|
2049
|
+
return writer;
|
|
2050
|
+
},
|
|
2051
|
+
|
|
2052
|
+
decode(input: BinaryReader | Uint8Array, length?: number): StreamDashboardDataRequest {
|
|
2053
|
+
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
|
|
2054
|
+
const end = length === undefined ? reader.len : reader.pos + length;
|
|
2055
|
+
const message = createBaseStreamDashboardDataRequest();
|
|
2056
|
+
while (reader.pos < end) {
|
|
2057
|
+
const tag = reader.uint32();
|
|
2058
|
+
switch (tag >>> 3) {
|
|
2059
|
+
case 1: {
|
|
2060
|
+
if (tag !== 10) {
|
|
2061
|
+
break;
|
|
2062
|
+
}
|
|
2063
|
+
|
|
2064
|
+
message.organizationId = reader.string();
|
|
2065
|
+
continue;
|
|
2066
|
+
}
|
|
2067
|
+
case 2: {
|
|
2068
|
+
if (tag !== 18) {
|
|
2069
|
+
break;
|
|
2070
|
+
}
|
|
2071
|
+
|
|
2072
|
+
message.projectId = reader.string();
|
|
2073
|
+
continue;
|
|
2074
|
+
}
|
|
2075
|
+
case 3: {
|
|
2076
|
+
if (tag !== 26) {
|
|
2077
|
+
break;
|
|
2078
|
+
}
|
|
2079
|
+
|
|
2080
|
+
message.dashboardId = reader.string();
|
|
2081
|
+
continue;
|
|
2082
|
+
}
|
|
2083
|
+
case 4: {
|
|
2084
|
+
if (tag !== 34) {
|
|
2085
|
+
break;
|
|
2086
|
+
}
|
|
2087
|
+
|
|
2088
|
+
message.widgetIds.push(reader.string());
|
|
2089
|
+
continue;
|
|
2090
|
+
}
|
|
2091
|
+
case 5: {
|
|
2092
|
+
if (tag !== 42) {
|
|
2093
|
+
break;
|
|
2094
|
+
}
|
|
2095
|
+
|
|
2096
|
+
message.timeRange = TimeRange.decode(reader, reader.uint32());
|
|
2097
|
+
continue;
|
|
2098
|
+
}
|
|
2099
|
+
}
|
|
2100
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
2101
|
+
break;
|
|
2102
|
+
}
|
|
2103
|
+
reader.skip(tag & 7);
|
|
2104
|
+
}
|
|
2105
|
+
return message;
|
|
2106
|
+
},
|
|
2107
|
+
|
|
2108
|
+
fromJSON(object: any): StreamDashboardDataRequest {
|
|
2109
|
+
return {
|
|
2110
|
+
organizationId: isSet(object.organizationId)
|
|
2111
|
+
? globalThis.String(object.organizationId)
|
|
2112
|
+
: isSet(object.organization_id)
|
|
2113
|
+
? globalThis.String(object.organization_id)
|
|
2114
|
+
: "",
|
|
2115
|
+
projectId: isSet(object.projectId)
|
|
2116
|
+
? globalThis.String(object.projectId)
|
|
2117
|
+
: isSet(object.project_id)
|
|
2118
|
+
? globalThis.String(object.project_id)
|
|
2119
|
+
: "",
|
|
2120
|
+
dashboardId: isSet(object.dashboardId)
|
|
2121
|
+
? globalThis.String(object.dashboardId)
|
|
2122
|
+
: isSet(object.dashboard_id)
|
|
2123
|
+
? globalThis.String(object.dashboard_id)
|
|
2124
|
+
: "",
|
|
2125
|
+
widgetIds: globalThis.Array.isArray(object?.widgetIds)
|
|
2126
|
+
? object.widgetIds.map((e: any) => globalThis.String(e))
|
|
2127
|
+
: globalThis.Array.isArray(object?.widget_ids)
|
|
2128
|
+
? object.widget_ids.map((e: any) => globalThis.String(e))
|
|
2129
|
+
: [],
|
|
2130
|
+
timeRange: isSet(object.timeRange)
|
|
2131
|
+
? TimeRange.fromJSON(object.timeRange)
|
|
2132
|
+
: isSet(object.time_range)
|
|
2133
|
+
? TimeRange.fromJSON(object.time_range)
|
|
2134
|
+
: undefined,
|
|
2135
|
+
};
|
|
2136
|
+
},
|
|
2137
|
+
|
|
2138
|
+
toJSON(message: StreamDashboardDataRequest): unknown {
|
|
2139
|
+
const obj: any = {};
|
|
2140
|
+
if (message.organizationId !== "") {
|
|
2141
|
+
obj.organizationId = message.organizationId;
|
|
2142
|
+
}
|
|
2143
|
+
if (message.projectId !== "") {
|
|
2144
|
+
obj.projectId = message.projectId;
|
|
2145
|
+
}
|
|
2146
|
+
if (message.dashboardId !== "") {
|
|
2147
|
+
obj.dashboardId = message.dashboardId;
|
|
2148
|
+
}
|
|
2149
|
+
if (message.widgetIds?.length) {
|
|
2150
|
+
obj.widgetIds = message.widgetIds;
|
|
2151
|
+
}
|
|
2152
|
+
if (message.timeRange !== undefined) {
|
|
2153
|
+
obj.timeRange = TimeRange.toJSON(message.timeRange);
|
|
2154
|
+
}
|
|
2155
|
+
return obj;
|
|
2156
|
+
},
|
|
2157
|
+
|
|
2158
|
+
create<I extends Exact<DeepPartial<StreamDashboardDataRequest>, I>>(base?: I): StreamDashboardDataRequest {
|
|
2159
|
+
return StreamDashboardDataRequest.fromPartial(base ?? ({} as any));
|
|
2160
|
+
},
|
|
2161
|
+
fromPartial<I extends Exact<DeepPartial<StreamDashboardDataRequest>, I>>(object: I): StreamDashboardDataRequest {
|
|
2162
|
+
const message = createBaseStreamDashboardDataRequest();
|
|
2163
|
+
message.organizationId = object.organizationId ?? "";
|
|
2164
|
+
message.projectId = object.projectId ?? "";
|
|
2165
|
+
message.dashboardId = object.dashboardId ?? "";
|
|
2166
|
+
message.widgetIds = object.widgetIds?.map((e) => e) || [];
|
|
2167
|
+
message.timeRange = (object.timeRange !== undefined && object.timeRange !== null)
|
|
2168
|
+
? TimeRange.fromPartial(object.timeRange)
|
|
2169
|
+
: undefined;
|
|
2170
|
+
return message;
|
|
2171
|
+
},
|
|
2172
|
+
};
|
|
2173
|
+
|
|
2174
|
+
function createBaseDashboardDataEnvelope(): DashboardDataEnvelope {
|
|
2175
|
+
return { widgetId: "", queryIndex: 0, snapshot: undefined, update: undefined, error: undefined };
|
|
2176
|
+
}
|
|
2177
|
+
|
|
2178
|
+
export const DashboardDataEnvelope: MessageFns<DashboardDataEnvelope> = {
|
|
2179
|
+
encode(message: DashboardDataEnvelope, writer: BinaryWriter = new BinaryWriter()): BinaryWriter {
|
|
2180
|
+
if (message.widgetId !== "") {
|
|
2181
|
+
writer.uint32(10).string(message.widgetId);
|
|
2182
|
+
}
|
|
2183
|
+
if (message.queryIndex !== 0) {
|
|
2184
|
+
writer.uint32(16).int32(message.queryIndex);
|
|
2185
|
+
}
|
|
2186
|
+
if (message.snapshot !== undefined) {
|
|
2187
|
+
QuerySnapshot.encode(message.snapshot, writer.uint32(26).fork()).join();
|
|
2188
|
+
}
|
|
2189
|
+
if (message.update !== undefined) {
|
|
2190
|
+
QuerySeriesUpdate.encode(message.update, writer.uint32(34).fork()).join();
|
|
2191
|
+
}
|
|
2192
|
+
if (message.error !== undefined) {
|
|
2193
|
+
WidgetQueryError.encode(message.error, writer.uint32(42).fork()).join();
|
|
2194
|
+
}
|
|
2195
|
+
return writer;
|
|
2196
|
+
},
|
|
2197
|
+
|
|
2198
|
+
decode(input: BinaryReader | Uint8Array, length?: number): DashboardDataEnvelope {
|
|
2199
|
+
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
|
|
2200
|
+
const end = length === undefined ? reader.len : reader.pos + length;
|
|
2201
|
+
const message = createBaseDashboardDataEnvelope();
|
|
2202
|
+
while (reader.pos < end) {
|
|
2203
|
+
const tag = reader.uint32();
|
|
2204
|
+
switch (tag >>> 3) {
|
|
2205
|
+
case 1: {
|
|
2206
|
+
if (tag !== 10) {
|
|
2207
|
+
break;
|
|
2208
|
+
}
|
|
2209
|
+
|
|
2210
|
+
message.widgetId = reader.string();
|
|
2211
|
+
continue;
|
|
2212
|
+
}
|
|
2213
|
+
case 2: {
|
|
2214
|
+
if (tag !== 16) {
|
|
2215
|
+
break;
|
|
2216
|
+
}
|
|
2217
|
+
|
|
2218
|
+
message.queryIndex = reader.int32();
|
|
2219
|
+
continue;
|
|
2220
|
+
}
|
|
2221
|
+
case 3: {
|
|
2222
|
+
if (tag !== 26) {
|
|
2223
|
+
break;
|
|
2224
|
+
}
|
|
2225
|
+
|
|
2226
|
+
message.snapshot = QuerySnapshot.decode(reader, reader.uint32());
|
|
2227
|
+
continue;
|
|
2228
|
+
}
|
|
2229
|
+
case 4: {
|
|
2230
|
+
if (tag !== 34) {
|
|
2231
|
+
break;
|
|
2232
|
+
}
|
|
2233
|
+
|
|
2234
|
+
message.update = QuerySeriesUpdate.decode(reader, reader.uint32());
|
|
2235
|
+
continue;
|
|
2236
|
+
}
|
|
2237
|
+
case 5: {
|
|
2238
|
+
if (tag !== 42) {
|
|
2239
|
+
break;
|
|
2240
|
+
}
|
|
2241
|
+
|
|
2242
|
+
message.error = WidgetQueryError.decode(reader, reader.uint32());
|
|
2243
|
+
continue;
|
|
2244
|
+
}
|
|
2245
|
+
}
|
|
2246
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
2247
|
+
break;
|
|
2248
|
+
}
|
|
2249
|
+
reader.skip(tag & 7);
|
|
2250
|
+
}
|
|
2251
|
+
return message;
|
|
2252
|
+
},
|
|
2253
|
+
|
|
2254
|
+
fromJSON(object: any): DashboardDataEnvelope {
|
|
2255
|
+
return {
|
|
2256
|
+
widgetId: isSet(object.widgetId)
|
|
2257
|
+
? globalThis.String(object.widgetId)
|
|
2258
|
+
: isSet(object.widget_id)
|
|
2259
|
+
? globalThis.String(object.widget_id)
|
|
2260
|
+
: "",
|
|
2261
|
+
queryIndex: isSet(object.queryIndex)
|
|
2262
|
+
? globalThis.Number(object.queryIndex)
|
|
2263
|
+
: isSet(object.query_index)
|
|
2264
|
+
? globalThis.Number(object.query_index)
|
|
2265
|
+
: 0,
|
|
2266
|
+
snapshot: isSet(object.snapshot) ? QuerySnapshot.fromJSON(object.snapshot) : undefined,
|
|
2267
|
+
update: isSet(object.update) ? QuerySeriesUpdate.fromJSON(object.update) : undefined,
|
|
2268
|
+
error: isSet(object.error) ? WidgetQueryError.fromJSON(object.error) : undefined,
|
|
2269
|
+
};
|
|
2270
|
+
},
|
|
2271
|
+
|
|
2272
|
+
toJSON(message: DashboardDataEnvelope): unknown {
|
|
2273
|
+
const obj: any = {};
|
|
2274
|
+
if (message.widgetId !== "") {
|
|
2275
|
+
obj.widgetId = message.widgetId;
|
|
2276
|
+
}
|
|
2277
|
+
if (message.queryIndex !== 0) {
|
|
2278
|
+
obj.queryIndex = Math.round(message.queryIndex);
|
|
2279
|
+
}
|
|
2280
|
+
if (message.snapshot !== undefined) {
|
|
2281
|
+
obj.snapshot = QuerySnapshot.toJSON(message.snapshot);
|
|
2282
|
+
}
|
|
2283
|
+
if (message.update !== undefined) {
|
|
2284
|
+
obj.update = QuerySeriesUpdate.toJSON(message.update);
|
|
2285
|
+
}
|
|
2286
|
+
if (message.error !== undefined) {
|
|
2287
|
+
obj.error = WidgetQueryError.toJSON(message.error);
|
|
2288
|
+
}
|
|
2289
|
+
return obj;
|
|
2290
|
+
},
|
|
2291
|
+
|
|
2292
|
+
create<I extends Exact<DeepPartial<DashboardDataEnvelope>, I>>(base?: I): DashboardDataEnvelope {
|
|
2293
|
+
return DashboardDataEnvelope.fromPartial(base ?? ({} as any));
|
|
2294
|
+
},
|
|
2295
|
+
fromPartial<I extends Exact<DeepPartial<DashboardDataEnvelope>, I>>(object: I): DashboardDataEnvelope {
|
|
2296
|
+
const message = createBaseDashboardDataEnvelope();
|
|
2297
|
+
message.widgetId = object.widgetId ?? "";
|
|
2298
|
+
message.queryIndex = object.queryIndex ?? 0;
|
|
2299
|
+
message.snapshot = (object.snapshot !== undefined && object.snapshot !== null)
|
|
2300
|
+
? QuerySnapshot.fromPartial(object.snapshot)
|
|
2301
|
+
: undefined;
|
|
2302
|
+
message.update = (object.update !== undefined && object.update !== null)
|
|
2303
|
+
? QuerySeriesUpdate.fromPartial(object.update)
|
|
2304
|
+
: undefined;
|
|
2305
|
+
message.error = (object.error !== undefined && object.error !== null)
|
|
2306
|
+
? WidgetQueryError.fromPartial(object.error)
|
|
2307
|
+
: undefined;
|
|
2308
|
+
return message;
|
|
2309
|
+
},
|
|
2310
|
+
};
|
|
2311
|
+
|
|
2312
|
+
function createBaseWidgetQueryError(): WidgetQueryError {
|
|
2313
|
+
return { message: "" };
|
|
2314
|
+
}
|
|
2315
|
+
|
|
2316
|
+
export const WidgetQueryError: MessageFns<WidgetQueryError> = {
|
|
2317
|
+
encode(message: WidgetQueryError, writer: BinaryWriter = new BinaryWriter()): BinaryWriter {
|
|
2318
|
+
if (message.message !== "") {
|
|
2319
|
+
writer.uint32(10).string(message.message);
|
|
2320
|
+
}
|
|
2321
|
+
return writer;
|
|
2322
|
+
},
|
|
2323
|
+
|
|
2324
|
+
decode(input: BinaryReader | Uint8Array, length?: number): WidgetQueryError {
|
|
2325
|
+
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
|
|
2326
|
+
const end = length === undefined ? reader.len : reader.pos + length;
|
|
2327
|
+
const message = createBaseWidgetQueryError();
|
|
2328
|
+
while (reader.pos < end) {
|
|
2329
|
+
const tag = reader.uint32();
|
|
2330
|
+
switch (tag >>> 3) {
|
|
2331
|
+
case 1: {
|
|
2332
|
+
if (tag !== 10) {
|
|
2333
|
+
break;
|
|
2334
|
+
}
|
|
2335
|
+
|
|
2336
|
+
message.message = reader.string();
|
|
2337
|
+
continue;
|
|
2338
|
+
}
|
|
2339
|
+
}
|
|
2340
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
2341
|
+
break;
|
|
2342
|
+
}
|
|
2343
|
+
reader.skip(tag & 7);
|
|
2344
|
+
}
|
|
2345
|
+
return message;
|
|
2346
|
+
},
|
|
2347
|
+
|
|
2348
|
+
fromJSON(object: any): WidgetQueryError {
|
|
2349
|
+
return { message: isSet(object.message) ? globalThis.String(object.message) : "" };
|
|
2350
|
+
},
|
|
2351
|
+
|
|
2352
|
+
toJSON(message: WidgetQueryError): unknown {
|
|
2353
|
+
const obj: any = {};
|
|
2354
|
+
if (message.message !== "") {
|
|
2355
|
+
obj.message = message.message;
|
|
2356
|
+
}
|
|
2357
|
+
return obj;
|
|
2358
|
+
},
|
|
2359
|
+
|
|
2360
|
+
create<I extends Exact<DeepPartial<WidgetQueryError>, I>>(base?: I): WidgetQueryError {
|
|
2361
|
+
return WidgetQueryError.fromPartial(base ?? ({} as any));
|
|
2362
|
+
},
|
|
2363
|
+
fromPartial<I extends Exact<DeepPartial<WidgetQueryError>, I>>(object: I): WidgetQueryError {
|
|
2364
|
+
const message = createBaseWidgetQueryError();
|
|
2365
|
+
message.message = object.message ?? "";
|
|
2366
|
+
return message;
|
|
2367
|
+
},
|
|
2368
|
+
};
|
|
2369
|
+
|
|
2370
|
+
/**
|
|
2371
|
+
* DashboardGatewayService is the web surface of the telemetry
|
|
2372
|
+
* dashboard service — Postgres-backed dashboard CRUD plus the single
|
|
2373
|
+
* multiplexed stream that feeds a dashboard view.
|
|
2374
|
+
*/
|
|
2375
|
+
export interface DashboardGatewayService {
|
|
2376
|
+
CreateDashboard(request: CreateDashboardRequest, metadata?: Metadata): Promise<CreateDashboardResponse>;
|
|
2377
|
+
GetDashboard(request: GetDashboardRequest, metadata?: Metadata): Promise<GetDashboardResponse>;
|
|
2378
|
+
ListDashboards(request: ListDashboardsRequest, metadata?: Metadata): Promise<ListDashboardsResponse>;
|
|
2379
|
+
UpdateDashboard(request: UpdateDashboardRequest, metadata?: Metadata): Promise<UpdateDashboardResponse>;
|
|
2380
|
+
DeleteDashboard(request: DeleteDashboardRequest, metadata?: Metadata): Promise<DeleteDashboardResponse>;
|
|
2381
|
+
/**
|
|
2382
|
+
* One stream per dashboard view: every widget query runs server-side and
|
|
2383
|
+
* all results multiplex onto this stream tagged with widget_id. Per-widget
|
|
2384
|
+
* failures are in-band and retried; the stream ends only on terminal
|
|
2385
|
+
* conditions.
|
|
2386
|
+
*/
|
|
2387
|
+
StreamDashboardData(request: StreamDashboardDataRequest, metadata?: Metadata): Observable<DashboardDataEnvelope>;
|
|
2388
|
+
}
|
|
2389
|
+
|
|
2390
|
+
export const DashboardGatewayServiceServiceName = "gateway.web.v1.DashboardGatewayService";
|
|
2391
|
+
export class DashboardGatewayServiceClientImpl implements DashboardGatewayService {
|
|
2392
|
+
private readonly rpc: Rpc;
|
|
2393
|
+
private readonly service: string;
|
|
2394
|
+
constructor(rpc: Rpc, opts?: { service?: string }) {
|
|
2395
|
+
this.service = opts?.service || DashboardGatewayServiceServiceName;
|
|
2396
|
+
this.rpc = rpc;
|
|
2397
|
+
this.CreateDashboard = this.CreateDashboard.bind(this);
|
|
2398
|
+
this.GetDashboard = this.GetDashboard.bind(this);
|
|
2399
|
+
this.ListDashboards = this.ListDashboards.bind(this);
|
|
2400
|
+
this.UpdateDashboard = this.UpdateDashboard.bind(this);
|
|
2401
|
+
this.DeleteDashboard = this.DeleteDashboard.bind(this);
|
|
2402
|
+
this.StreamDashboardData = this.StreamDashboardData.bind(this);
|
|
2403
|
+
}
|
|
2404
|
+
CreateDashboard(request: CreateDashboardRequest, metadata?: Metadata): Promise<CreateDashboardResponse> {
|
|
2405
|
+
const data = CreateDashboardRequest.encode(request).finish();
|
|
2406
|
+
const promise = this.rpc.request(this.service, "CreateDashboard", data, metadata);
|
|
2407
|
+
return promise.then((data) => CreateDashboardResponse.decode(new BinaryReader(data)));
|
|
2408
|
+
}
|
|
2409
|
+
|
|
2410
|
+
GetDashboard(request: GetDashboardRequest, metadata?: Metadata): Promise<GetDashboardResponse> {
|
|
2411
|
+
const data = GetDashboardRequest.encode(request).finish();
|
|
2412
|
+
const promise = this.rpc.request(this.service, "GetDashboard", data, metadata);
|
|
2413
|
+
return promise.then((data) => GetDashboardResponse.decode(new BinaryReader(data)));
|
|
2414
|
+
}
|
|
2415
|
+
|
|
2416
|
+
ListDashboards(request: ListDashboardsRequest, metadata?: Metadata): Promise<ListDashboardsResponse> {
|
|
2417
|
+
const data = ListDashboardsRequest.encode(request).finish();
|
|
2418
|
+
const promise = this.rpc.request(this.service, "ListDashboards", data, metadata);
|
|
2419
|
+
return promise.then((data) => ListDashboardsResponse.decode(new BinaryReader(data)));
|
|
2420
|
+
}
|
|
2421
|
+
|
|
2422
|
+
UpdateDashboard(request: UpdateDashboardRequest, metadata?: Metadata): Promise<UpdateDashboardResponse> {
|
|
2423
|
+
const data = UpdateDashboardRequest.encode(request).finish();
|
|
2424
|
+
const promise = this.rpc.request(this.service, "UpdateDashboard", data, metadata);
|
|
2425
|
+
return promise.then((data) => UpdateDashboardResponse.decode(new BinaryReader(data)));
|
|
2426
|
+
}
|
|
2427
|
+
|
|
2428
|
+
DeleteDashboard(request: DeleteDashboardRequest, metadata?: Metadata): Promise<DeleteDashboardResponse> {
|
|
2429
|
+
const data = DeleteDashboardRequest.encode(request).finish();
|
|
2430
|
+
const promise = this.rpc.request(this.service, "DeleteDashboard", data, metadata);
|
|
2431
|
+
return promise.then((data) => DeleteDashboardResponse.decode(new BinaryReader(data)));
|
|
2432
|
+
}
|
|
2433
|
+
|
|
2434
|
+
StreamDashboardData(request: StreamDashboardDataRequest, metadata?: Metadata): Observable<DashboardDataEnvelope> {
|
|
2435
|
+
const data = StreamDashboardDataRequest.encode(request).finish();
|
|
2436
|
+
const result = this.rpc.serverStreamingRequest(this.service, "StreamDashboardData", data, metadata);
|
|
2437
|
+
return result.pipe(map((data) => DashboardDataEnvelope.decode(new BinaryReader(data))));
|
|
2438
|
+
}
|
|
2439
|
+
}
|
|
2440
|
+
|
|
2441
|
+
interface Rpc {
|
|
2442
|
+
request(service: string, method: string, data: Uint8Array, metadata?: Metadata): Promise<Uint8Array>;
|
|
2443
|
+
clientStreamingRequest(
|
|
2444
|
+
service: string,
|
|
2445
|
+
method: string,
|
|
2446
|
+
data: Observable<Uint8Array>,
|
|
2447
|
+
metadata?: Metadata,
|
|
2448
|
+
): Promise<Uint8Array>;
|
|
2449
|
+
serverStreamingRequest(
|
|
2450
|
+
service: string,
|
|
2451
|
+
method: string,
|
|
2452
|
+
data: Uint8Array,
|
|
2453
|
+
metadata?: Metadata,
|
|
2454
|
+
): Observable<Uint8Array>;
|
|
2455
|
+
bidirectionalStreamingRequest(
|
|
2456
|
+
service: string,
|
|
2457
|
+
method: string,
|
|
2458
|
+
data: Observable<Uint8Array>,
|
|
2459
|
+
metadata?: Metadata,
|
|
2460
|
+
): Observable<Uint8Array>;
|
|
2461
|
+
}
|
|
2462
|
+
|
|
2463
|
+
type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined;
|
|
2464
|
+
|
|
2465
|
+
export type DeepPartial<T> = T extends Builtin ? T
|
|
2466
|
+
: T extends globalThis.Array<infer U> ? globalThis.Array<DeepPartial<U>>
|
|
2467
|
+
: T extends ReadonlyArray<infer U> ? ReadonlyArray<DeepPartial<U>>
|
|
2468
|
+
: T extends {} ? { [K in keyof T]?: DeepPartial<T[K]> }
|
|
2469
|
+
: Partial<T>;
|
|
2470
|
+
|
|
2471
|
+
type KeysOfUnion<T> = T extends T ? keyof T : never;
|
|
2472
|
+
export type Exact<P, I extends P> = P extends Builtin ? P
|
|
2473
|
+
: P & { [K in keyof P]: Exact<P[K], I[K]> } & { [K in Exclude<keyof I, KeysOfUnion<P>>]: never };
|
|
2474
|
+
|
|
2475
|
+
function toTimestamp(date: Date): Timestamp {
|
|
2476
|
+
const seconds = Math.trunc(date.getTime() / 1_000);
|
|
2477
|
+
const nanos = (date.getTime() % 1_000) * 1_000_000;
|
|
2478
|
+
return { seconds, nanos };
|
|
2479
|
+
}
|
|
2480
|
+
|
|
2481
|
+
function fromTimestamp(t: Timestamp): Date {
|
|
2482
|
+
let millis = (t.seconds || 0) * 1_000;
|
|
2483
|
+
millis += (t.nanos || 0) / 1_000_000;
|
|
2484
|
+
return new globalThis.Date(millis);
|
|
2485
|
+
}
|
|
2486
|
+
|
|
2487
|
+
function fromJsonTimestamp(o: any): Date {
|
|
2488
|
+
if (o instanceof globalThis.Date) {
|
|
2489
|
+
return o;
|
|
2490
|
+
} else if (typeof o === "string") {
|
|
2491
|
+
return new globalThis.Date(o);
|
|
2492
|
+
} else {
|
|
2493
|
+
return fromTimestamp(Timestamp.fromJSON(o));
|
|
2494
|
+
}
|
|
2495
|
+
}
|
|
2496
|
+
|
|
2497
|
+
function longToNumber(int64: { toString(): string }): number {
|
|
2498
|
+
const num = globalThis.Number(int64.toString());
|
|
2499
|
+
if (num > globalThis.Number.MAX_SAFE_INTEGER) {
|
|
2500
|
+
throw new globalThis.Error("Value is larger than Number.MAX_SAFE_INTEGER");
|
|
2501
|
+
}
|
|
2502
|
+
if (num < globalThis.Number.MIN_SAFE_INTEGER) {
|
|
2503
|
+
throw new globalThis.Error("Value is smaller than Number.MIN_SAFE_INTEGER");
|
|
2504
|
+
}
|
|
2505
|
+
return num;
|
|
2506
|
+
}
|
|
2507
|
+
|
|
2508
|
+
function isSet(value: any): boolean {
|
|
2509
|
+
return value !== null && value !== undefined;
|
|
2510
|
+
}
|
|
2511
|
+
|
|
2512
|
+
export interface MessageFns<T> {
|
|
2513
|
+
encode(message: T, writer?: BinaryWriter): BinaryWriter;
|
|
2514
|
+
decode(input: BinaryReader | Uint8Array, length?: number): T;
|
|
2515
|
+
fromJSON(object: any): T;
|
|
2516
|
+
toJSON(message: T): unknown;
|
|
2517
|
+
create<I extends Exact<DeepPartial<T>, I>>(base?: I): T;
|
|
2518
|
+
fromPartial<I extends Exact<DeepPartial<T>, I>>(object: I): T;
|
|
2519
|
+
}
|