@miradorlabs/web-grpc 2.75.0 → 2.77.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.
|
@@ -186,6 +186,45 @@ export function timeseriesStyleToJSON(object: TimeseriesStyle): string {
|
|
|
186
186
|
}
|
|
187
187
|
}
|
|
188
188
|
|
|
189
|
+
export enum StatReduction {
|
|
190
|
+
/** STAT_REDUCTION_UNSPECIFIED - Sum of each series' latest value. */
|
|
191
|
+
STAT_REDUCTION_UNSPECIFIED = 0,
|
|
192
|
+
/**
|
|
193
|
+
* STAT_REDUCTION_COUNT - Number of series whose latest value is non-zero. A client that merges
|
|
194
|
+
* series (e.g. the principals seated to one organization member) counts the
|
|
195
|
+
* merged ones.
|
|
196
|
+
*/
|
|
197
|
+
STAT_REDUCTION_COUNT = 1,
|
|
198
|
+
UNRECOGNIZED = -1,
|
|
199
|
+
}
|
|
200
|
+
|
|
201
|
+
export function statReductionFromJSON(object: any): StatReduction {
|
|
202
|
+
switch (object) {
|
|
203
|
+
case 0:
|
|
204
|
+
case "STAT_REDUCTION_UNSPECIFIED":
|
|
205
|
+
return StatReduction.STAT_REDUCTION_UNSPECIFIED;
|
|
206
|
+
case 1:
|
|
207
|
+
case "STAT_REDUCTION_COUNT":
|
|
208
|
+
return StatReduction.STAT_REDUCTION_COUNT;
|
|
209
|
+
case -1:
|
|
210
|
+
case "UNRECOGNIZED":
|
|
211
|
+
default:
|
|
212
|
+
return StatReduction.UNRECOGNIZED;
|
|
213
|
+
}
|
|
214
|
+
}
|
|
215
|
+
|
|
216
|
+
export function statReductionToJSON(object: StatReduction): string {
|
|
217
|
+
switch (object) {
|
|
218
|
+
case StatReduction.STAT_REDUCTION_UNSPECIFIED:
|
|
219
|
+
return "STAT_REDUCTION_UNSPECIFIED";
|
|
220
|
+
case StatReduction.STAT_REDUCTION_COUNT:
|
|
221
|
+
return "STAT_REDUCTION_COUNT";
|
|
222
|
+
case StatReduction.UNRECOGNIZED:
|
|
223
|
+
default:
|
|
224
|
+
return "UNRECOGNIZED";
|
|
225
|
+
}
|
|
226
|
+
}
|
|
227
|
+
|
|
189
228
|
export interface StreamMetricsRequest {
|
|
190
229
|
/** Verified against the caller's identity before proxying. */
|
|
191
230
|
organizationId: string;
|
|
@@ -400,6 +439,11 @@ export interface Widget {
|
|
|
400
439
|
timeseriesStyle: TimeseriesStyle;
|
|
401
440
|
/** MARKDOWN widgets only: the rendered content (≤16 KiB). */
|
|
402
441
|
markdown: string;
|
|
442
|
+
/**
|
|
443
|
+
* STAT only: how the figure reduces the query's series. UNSPECIFIED sums
|
|
444
|
+
* each series' latest value.
|
|
445
|
+
*/
|
|
446
|
+
statReduction: StatReduction;
|
|
403
447
|
}
|
|
404
448
|
|
|
405
449
|
/**
|
|
@@ -463,7 +507,7 @@ export interface DashboardSummary {
|
|
|
463
507
|
|
|
464
508
|
/**
|
|
465
509
|
* UpdateDashboardRequest replaces the dashboard document. A version mismatch
|
|
466
|
-
*
|
|
510
|
+
* reports STATUS_CODE_CONFLICT and the caller re-fetches, merges, retries.
|
|
467
511
|
*/
|
|
468
512
|
export interface UpdateDashboardRequest {
|
|
469
513
|
/** Verified against the caller's identity before proxying. */
|
|
@@ -493,6 +537,47 @@ export interface DeleteDashboardResponse {
|
|
|
493
537
|
status: ResponseStatus | undefined;
|
|
494
538
|
}
|
|
495
539
|
|
|
540
|
+
/**
|
|
541
|
+
* DashboardTemplate is a starter dashboard document, identified by a stable,
|
|
542
|
+
* product-prefixed id (e.g. `terma.spend-tokens`) that is never renamed.
|
|
543
|
+
*/
|
|
544
|
+
export interface DashboardTemplate {
|
|
545
|
+
id: string;
|
|
546
|
+
name: string;
|
|
547
|
+
description: string;
|
|
548
|
+
defaultTimeWindow: AnalyticsTimeWindow;
|
|
549
|
+
widgets: Widget[];
|
|
550
|
+
}
|
|
551
|
+
|
|
552
|
+
export interface ListDashboardTemplatesRequest {
|
|
553
|
+
/** Verified against the caller's identity before proxying. */
|
|
554
|
+
organizationId: string;
|
|
555
|
+
}
|
|
556
|
+
|
|
557
|
+
export interface ListDashboardTemplatesResponse {
|
|
558
|
+
status: ResponseStatus | undefined;
|
|
559
|
+
templates: DashboardTemplate[];
|
|
560
|
+
}
|
|
561
|
+
|
|
562
|
+
export interface CreateDashboardFromTemplateRequest {
|
|
563
|
+
/** Verified against the caller's identity before proxying. */
|
|
564
|
+
organizationId: string;
|
|
565
|
+
projectId: string;
|
|
566
|
+
templateId: string;
|
|
567
|
+
/** Unset = the template's. */
|
|
568
|
+
name?: string | undefined;
|
|
569
|
+
description?:
|
|
570
|
+
| string
|
|
571
|
+
| undefined;
|
|
572
|
+
/** UNSPECIFIED = the template's. */
|
|
573
|
+
defaultTimeWindow: AnalyticsTimeWindow;
|
|
574
|
+
}
|
|
575
|
+
|
|
576
|
+
export interface CreateDashboardFromTemplateResponse {
|
|
577
|
+
status: ResponseStatus | undefined;
|
|
578
|
+
dashboard: Dashboard | undefined;
|
|
579
|
+
}
|
|
580
|
+
|
|
496
581
|
export interface StreamDashboardDataRequest {
|
|
497
582
|
/** Verified against the caller's identity before proxying. */
|
|
498
583
|
organizationId: string;
|
|
@@ -3053,6 +3138,7 @@ function createBaseWidget(): Widget {
|
|
|
3053
3138
|
timeInterval: 0,
|
|
3054
3139
|
timeseriesStyle: 0,
|
|
3055
3140
|
markdown: "",
|
|
3141
|
+
statReduction: 0,
|
|
3056
3142
|
};
|
|
3057
3143
|
}
|
|
3058
3144
|
|
|
@@ -3085,6 +3171,9 @@ export const Widget: MessageFns<Widget> = {
|
|
|
3085
3171
|
if (message.markdown !== "") {
|
|
3086
3172
|
writer.uint32(74).string(message.markdown);
|
|
3087
3173
|
}
|
|
3174
|
+
if (message.statReduction !== 0) {
|
|
3175
|
+
writer.uint32(80).int32(message.statReduction);
|
|
3176
|
+
}
|
|
3088
3177
|
return writer;
|
|
3089
3178
|
},
|
|
3090
3179
|
|
|
@@ -3173,6 +3262,14 @@ export const Widget: MessageFns<Widget> = {
|
|
|
3173
3262
|
message.markdown = reader.string();
|
|
3174
3263
|
continue;
|
|
3175
3264
|
}
|
|
3265
|
+
case 10: {
|
|
3266
|
+
if (tag !== 80) {
|
|
3267
|
+
break;
|
|
3268
|
+
}
|
|
3269
|
+
|
|
3270
|
+
message.statReduction = reader.int32() as any;
|
|
3271
|
+
continue;
|
|
3272
|
+
}
|
|
3176
3273
|
}
|
|
3177
3274
|
if ((tag & 7) === 4 || tag === 0) {
|
|
3178
3275
|
break;
|
|
@@ -3212,6 +3309,11 @@ export const Widget: MessageFns<Widget> = {
|
|
|
3212
3309
|
? timeseriesStyleFromJSON(object.timeseries_style)
|
|
3213
3310
|
: 0,
|
|
3214
3311
|
markdown: isSet(object.markdown) ? globalThis.String(object.markdown) : "",
|
|
3312
|
+
statReduction: isSet(object.statReduction)
|
|
3313
|
+
? statReductionFromJSON(object.statReduction)
|
|
3314
|
+
: isSet(object.stat_reduction)
|
|
3315
|
+
? statReductionFromJSON(object.stat_reduction)
|
|
3316
|
+
: 0,
|
|
3215
3317
|
};
|
|
3216
3318
|
},
|
|
3217
3319
|
|
|
@@ -3244,6 +3346,9 @@ export const Widget: MessageFns<Widget> = {
|
|
|
3244
3346
|
if (message.markdown !== "") {
|
|
3245
3347
|
obj.markdown = message.markdown;
|
|
3246
3348
|
}
|
|
3349
|
+
if (message.statReduction !== 0) {
|
|
3350
|
+
obj.statReduction = statReductionToJSON(message.statReduction);
|
|
3351
|
+
}
|
|
3247
3352
|
return obj;
|
|
3248
3353
|
},
|
|
3249
3354
|
|
|
@@ -3263,6 +3368,7 @@ export const Widget: MessageFns<Widget> = {
|
|
|
3263
3368
|
message.timeInterval = object.timeInterval ?? 0;
|
|
3264
3369
|
message.timeseriesStyle = object.timeseriesStyle ?? 0;
|
|
3265
3370
|
message.markdown = object.markdown ?? "";
|
|
3371
|
+
message.statReduction = object.statReduction ?? 0;
|
|
3266
3372
|
return message;
|
|
3267
3373
|
},
|
|
3268
3374
|
};
|
|
@@ -4658,31 +4764,31 @@ export const DeleteDashboardResponse: MessageFns<DeleteDashboardResponse> = {
|
|
|
4658
4764
|
},
|
|
4659
4765
|
};
|
|
4660
4766
|
|
|
4661
|
-
function
|
|
4662
|
-
return {
|
|
4767
|
+
function createBaseDashboardTemplate(): DashboardTemplate {
|
|
4768
|
+
return { id: "", name: "", description: "", defaultTimeWindow: 0, widgets: [] };
|
|
4663
4769
|
}
|
|
4664
4770
|
|
|
4665
|
-
export const
|
|
4666
|
-
encode(message:
|
|
4667
|
-
if (message.
|
|
4668
|
-
writer.uint32(10).string(message.
|
|
4771
|
+
export const DashboardTemplate: MessageFns<DashboardTemplate> = {
|
|
4772
|
+
encode(message: DashboardTemplate, writer: BinaryWriter = new BinaryWriter()): BinaryWriter {
|
|
4773
|
+
if (message.id !== "") {
|
|
4774
|
+
writer.uint32(10).string(message.id);
|
|
4669
4775
|
}
|
|
4670
|
-
if (message.
|
|
4671
|
-
writer.uint32(18).string(message.
|
|
4776
|
+
if (message.name !== "") {
|
|
4777
|
+
writer.uint32(18).string(message.name);
|
|
4672
4778
|
}
|
|
4673
|
-
if (message.
|
|
4674
|
-
writer.uint32(26).string(message.
|
|
4779
|
+
if (message.description !== "") {
|
|
4780
|
+
writer.uint32(26).string(message.description);
|
|
4675
4781
|
}
|
|
4676
|
-
|
|
4677
|
-
writer.uint32(
|
|
4782
|
+
if (message.defaultTimeWindow !== 0) {
|
|
4783
|
+
writer.uint32(32).int32(message.defaultTimeWindow);
|
|
4678
4784
|
}
|
|
4679
|
-
|
|
4680
|
-
|
|
4785
|
+
for (const v of message.widgets) {
|
|
4786
|
+
Widget.encode(v!, writer.uint32(42).fork()).join();
|
|
4681
4787
|
}
|
|
4682
4788
|
return writer;
|
|
4683
4789
|
},
|
|
4684
4790
|
|
|
4685
|
-
decode(input: BinaryReader | Uint8Array, length?: number):
|
|
4791
|
+
decode(input: BinaryReader | Uint8Array, length?: number): DashboardTemplate {
|
|
4686
4792
|
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
|
|
4687
4793
|
const previousRecursionDepth = (reader as any).__tsProtoDecodeDepth ?? 0;
|
|
4688
4794
|
if (previousRecursionDepth >= 100) {
|
|
@@ -4691,7 +4797,7 @@ export const StreamDashboardDataRequest: MessageFns<StreamDashboardDataRequest>
|
|
|
4691
4797
|
(reader as any).__tsProtoDecodeDepth = previousRecursionDepth + 1;
|
|
4692
4798
|
try {
|
|
4693
4799
|
const end = length === undefined ? reader.len : reader.pos + length;
|
|
4694
|
-
const message =
|
|
4800
|
+
const message = createBaseDashboardTemplate();
|
|
4695
4801
|
while (reader.pos < end) {
|
|
4696
4802
|
const tag = reader.uint32();
|
|
4697
4803
|
switch (tag >>> 3) {
|
|
@@ -4700,7 +4806,7 @@ export const StreamDashboardDataRequest: MessageFns<StreamDashboardDataRequest>
|
|
|
4700
4806
|
break;
|
|
4701
4807
|
}
|
|
4702
4808
|
|
|
4703
|
-
message.
|
|
4809
|
+
message.id = reader.string();
|
|
4704
4810
|
continue;
|
|
4705
4811
|
}
|
|
4706
4812
|
case 2: {
|
|
@@ -4708,7 +4814,7 @@ export const StreamDashboardDataRequest: MessageFns<StreamDashboardDataRequest>
|
|
|
4708
4814
|
break;
|
|
4709
4815
|
}
|
|
4710
4816
|
|
|
4711
|
-
message.
|
|
4817
|
+
message.name = reader.string();
|
|
4712
4818
|
continue;
|
|
4713
4819
|
}
|
|
4714
4820
|
case 3: {
|
|
@@ -4716,15 +4822,15 @@ export const StreamDashboardDataRequest: MessageFns<StreamDashboardDataRequest>
|
|
|
4716
4822
|
break;
|
|
4717
4823
|
}
|
|
4718
4824
|
|
|
4719
|
-
message.
|
|
4825
|
+
message.description = reader.string();
|
|
4720
4826
|
continue;
|
|
4721
4827
|
}
|
|
4722
4828
|
case 4: {
|
|
4723
|
-
if (tag !==
|
|
4829
|
+
if (tag !== 32) {
|
|
4724
4830
|
break;
|
|
4725
4831
|
}
|
|
4726
4832
|
|
|
4727
|
-
message.
|
|
4833
|
+
message.defaultTimeWindow = reader.int32() as any;
|
|
4728
4834
|
continue;
|
|
4729
4835
|
}
|
|
4730
4836
|
case 5: {
|
|
@@ -4732,7 +4838,7 @@ export const StreamDashboardDataRequest: MessageFns<StreamDashboardDataRequest>
|
|
|
4732
4838
|
break;
|
|
4733
4839
|
}
|
|
4734
4840
|
|
|
4735
|
-
message.
|
|
4841
|
+
message.widgets.push(Widget.decode(reader, reader.uint32()));
|
|
4736
4842
|
continue;
|
|
4737
4843
|
}
|
|
4738
4844
|
}
|
|
@@ -4747,97 +4853,67 @@ export const StreamDashboardDataRequest: MessageFns<StreamDashboardDataRequest>
|
|
|
4747
4853
|
}
|
|
4748
4854
|
},
|
|
4749
4855
|
|
|
4750
|
-
fromJSON(object: any):
|
|
4856
|
+
fromJSON(object: any): DashboardTemplate {
|
|
4751
4857
|
return {
|
|
4752
|
-
|
|
4753
|
-
|
|
4754
|
-
|
|
4755
|
-
|
|
4756
|
-
|
|
4757
|
-
|
|
4758
|
-
?
|
|
4759
|
-
:
|
|
4760
|
-
|
|
4761
|
-
: "",
|
|
4762
|
-
dashboardId: isSet(object.dashboardId)
|
|
4763
|
-
? globalThis.String(object.dashboardId)
|
|
4764
|
-
: isSet(object.dashboard_id)
|
|
4765
|
-
? globalThis.String(object.dashboard_id)
|
|
4766
|
-
: "",
|
|
4767
|
-
widgetIds: globalThis.Array.isArray(object?.widgetIds)
|
|
4768
|
-
? object.widgetIds.map((e: any) => globalThis.String(e))
|
|
4769
|
-
: globalThis.Array.isArray(object?.widget_ids)
|
|
4770
|
-
? object.widget_ids.map((e: any) => globalThis.String(e))
|
|
4771
|
-
: [],
|
|
4772
|
-
timeRange: isSet(object.timeRange)
|
|
4773
|
-
? TimeRange.fromJSON(object.timeRange)
|
|
4774
|
-
: isSet(object.time_range)
|
|
4775
|
-
? TimeRange.fromJSON(object.time_range)
|
|
4776
|
-
: undefined,
|
|
4858
|
+
id: isSet(object.id) ? globalThis.String(object.id) : "",
|
|
4859
|
+
name: isSet(object.name) ? globalThis.String(object.name) : "",
|
|
4860
|
+
description: isSet(object.description) ? globalThis.String(object.description) : "",
|
|
4861
|
+
defaultTimeWindow: isSet(object.defaultTimeWindow)
|
|
4862
|
+
? analyticsTimeWindowFromJSON(object.defaultTimeWindow)
|
|
4863
|
+
: isSet(object.default_time_window)
|
|
4864
|
+
? analyticsTimeWindowFromJSON(object.default_time_window)
|
|
4865
|
+
: 0,
|
|
4866
|
+
widgets: globalThis.Array.isArray(object?.widgets) ? object.widgets.map((e: any) => Widget.fromJSON(e)) : [],
|
|
4777
4867
|
};
|
|
4778
4868
|
},
|
|
4779
4869
|
|
|
4780
|
-
toJSON(message:
|
|
4870
|
+
toJSON(message: DashboardTemplate): unknown {
|
|
4781
4871
|
const obj: any = {};
|
|
4782
|
-
if (message.
|
|
4783
|
-
obj.
|
|
4872
|
+
if (message.id !== "") {
|
|
4873
|
+
obj.id = message.id;
|
|
4784
4874
|
}
|
|
4785
|
-
if (message.
|
|
4786
|
-
obj.
|
|
4875
|
+
if (message.name !== "") {
|
|
4876
|
+
obj.name = message.name;
|
|
4787
4877
|
}
|
|
4788
|
-
if (message.
|
|
4789
|
-
obj.
|
|
4878
|
+
if (message.description !== "") {
|
|
4879
|
+
obj.description = message.description;
|
|
4790
4880
|
}
|
|
4791
|
-
if (message.
|
|
4792
|
-
obj.
|
|
4881
|
+
if (message.defaultTimeWindow !== 0) {
|
|
4882
|
+
obj.defaultTimeWindow = analyticsTimeWindowToJSON(message.defaultTimeWindow);
|
|
4793
4883
|
}
|
|
4794
|
-
if (message.
|
|
4795
|
-
obj.
|
|
4884
|
+
if (message.widgets?.length) {
|
|
4885
|
+
obj.widgets = message.widgets.map((e) => Widget.toJSON(e));
|
|
4796
4886
|
}
|
|
4797
4887
|
return obj;
|
|
4798
4888
|
},
|
|
4799
4889
|
|
|
4800
|
-
create<I extends Exact<DeepPartial<
|
|
4801
|
-
return
|
|
4890
|
+
create<I extends Exact<DeepPartial<DashboardTemplate>, I>>(base?: I): DashboardTemplate {
|
|
4891
|
+
return DashboardTemplate.fromPartial(base ?? ({} as any));
|
|
4802
4892
|
},
|
|
4803
|
-
fromPartial<I extends Exact<DeepPartial<
|
|
4804
|
-
const message =
|
|
4805
|
-
message.
|
|
4806
|
-
message.
|
|
4807
|
-
message.
|
|
4808
|
-
message.
|
|
4809
|
-
message.
|
|
4810
|
-
? TimeRange.fromPartial(object.timeRange)
|
|
4811
|
-
: undefined;
|
|
4893
|
+
fromPartial<I extends Exact<DeepPartial<DashboardTemplate>, I>>(object: I): DashboardTemplate {
|
|
4894
|
+
const message = createBaseDashboardTemplate();
|
|
4895
|
+
message.id = object.id ?? "";
|
|
4896
|
+
message.name = object.name ?? "";
|
|
4897
|
+
message.description = object.description ?? "";
|
|
4898
|
+
message.defaultTimeWindow = object.defaultTimeWindow ?? 0;
|
|
4899
|
+
message.widgets = object.widgets?.map((e) => Widget.fromPartial(e)) || [];
|
|
4812
4900
|
return message;
|
|
4813
4901
|
},
|
|
4814
4902
|
};
|
|
4815
4903
|
|
|
4816
|
-
function
|
|
4817
|
-
return {
|
|
4904
|
+
function createBaseListDashboardTemplatesRequest(): ListDashboardTemplatesRequest {
|
|
4905
|
+
return { organizationId: "" };
|
|
4818
4906
|
}
|
|
4819
4907
|
|
|
4820
|
-
export const
|
|
4821
|
-
encode(message:
|
|
4822
|
-
if (message.
|
|
4823
|
-
writer.uint32(10).string(message.
|
|
4824
|
-
}
|
|
4825
|
-
if (message.queryIndex !== 0) {
|
|
4826
|
-
writer.uint32(16).int32(message.queryIndex);
|
|
4827
|
-
}
|
|
4828
|
-
if (message.snapshot !== undefined) {
|
|
4829
|
-
QuerySnapshot.encode(message.snapshot, writer.uint32(26).fork()).join();
|
|
4830
|
-
}
|
|
4831
|
-
if (message.update !== undefined) {
|
|
4832
|
-
QuerySeriesUpdate.encode(message.update, writer.uint32(34).fork()).join();
|
|
4833
|
-
}
|
|
4834
|
-
if (message.error !== undefined) {
|
|
4835
|
-
WidgetQueryError.encode(message.error, writer.uint32(42).fork()).join();
|
|
4908
|
+
export const ListDashboardTemplatesRequest: MessageFns<ListDashboardTemplatesRequest> = {
|
|
4909
|
+
encode(message: ListDashboardTemplatesRequest, writer: BinaryWriter = new BinaryWriter()): BinaryWriter {
|
|
4910
|
+
if (message.organizationId !== "") {
|
|
4911
|
+
writer.uint32(10).string(message.organizationId);
|
|
4836
4912
|
}
|
|
4837
4913
|
return writer;
|
|
4838
4914
|
},
|
|
4839
4915
|
|
|
4840
|
-
decode(input: BinaryReader | Uint8Array, length?: number):
|
|
4916
|
+
decode(input: BinaryReader | Uint8Array, length?: number): ListDashboardTemplatesRequest {
|
|
4841
4917
|
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
|
|
4842
4918
|
const previousRecursionDepth = (reader as any).__tsProtoDecodeDepth ?? 0;
|
|
4843
4919
|
if (previousRecursionDepth >= 100) {
|
|
@@ -4846,7 +4922,7 @@ export const DashboardDataEnvelope: MessageFns<DashboardDataEnvelope> = {
|
|
|
4846
4922
|
(reader as any).__tsProtoDecodeDepth = previousRecursionDepth + 1;
|
|
4847
4923
|
try {
|
|
4848
4924
|
const end = length === undefined ? reader.len : reader.pos + length;
|
|
4849
|
-
const message =
|
|
4925
|
+
const message = createBaseListDashboardTemplatesRequest();
|
|
4850
4926
|
while (reader.pos < end) {
|
|
4851
4927
|
const tag = reader.uint32();
|
|
4852
4928
|
switch (tag >>> 3) {
|
|
@@ -4855,39 +4931,7 @@ export const DashboardDataEnvelope: MessageFns<DashboardDataEnvelope> = {
|
|
|
4855
4931
|
break;
|
|
4856
4932
|
}
|
|
4857
4933
|
|
|
4858
|
-
message.
|
|
4859
|
-
continue;
|
|
4860
|
-
}
|
|
4861
|
-
case 2: {
|
|
4862
|
-
if (tag !== 16) {
|
|
4863
|
-
break;
|
|
4864
|
-
}
|
|
4865
|
-
|
|
4866
|
-
message.queryIndex = reader.int32();
|
|
4867
|
-
continue;
|
|
4868
|
-
}
|
|
4869
|
-
case 3: {
|
|
4870
|
-
if (tag !== 26) {
|
|
4871
|
-
break;
|
|
4872
|
-
}
|
|
4873
|
-
|
|
4874
|
-
message.snapshot = QuerySnapshot.decode(reader, reader.uint32());
|
|
4875
|
-
continue;
|
|
4876
|
-
}
|
|
4877
|
-
case 4: {
|
|
4878
|
-
if (tag !== 34) {
|
|
4879
|
-
break;
|
|
4880
|
-
}
|
|
4881
|
-
|
|
4882
|
-
message.update = QuerySeriesUpdate.decode(reader, reader.uint32());
|
|
4883
|
-
continue;
|
|
4884
|
-
}
|
|
4885
|
-
case 5: {
|
|
4886
|
-
if (tag !== 42) {
|
|
4887
|
-
break;
|
|
4888
|
-
}
|
|
4889
|
-
|
|
4890
|
-
message.error = WidgetQueryError.decode(reader, reader.uint32());
|
|
4934
|
+
message.organizationId = reader.string();
|
|
4891
4935
|
continue;
|
|
4892
4936
|
}
|
|
4893
4937
|
}
|
|
@@ -4902,45 +4946,679 @@ export const DashboardDataEnvelope: MessageFns<DashboardDataEnvelope> = {
|
|
|
4902
4946
|
}
|
|
4903
4947
|
},
|
|
4904
4948
|
|
|
4905
|
-
fromJSON(object: any):
|
|
4949
|
+
fromJSON(object: any): ListDashboardTemplatesRequest {
|
|
4906
4950
|
return {
|
|
4907
|
-
|
|
4908
|
-
? globalThis.String(object.
|
|
4909
|
-
: isSet(object.
|
|
4910
|
-
? globalThis.String(object.
|
|
4951
|
+
organizationId: isSet(object.organizationId)
|
|
4952
|
+
? globalThis.String(object.organizationId)
|
|
4953
|
+
: isSet(object.organization_id)
|
|
4954
|
+
? globalThis.String(object.organization_id)
|
|
4911
4955
|
: "",
|
|
4912
|
-
queryIndex: isSet(object.queryIndex)
|
|
4913
|
-
? globalThis.Number(object.queryIndex)
|
|
4914
|
-
: isSet(object.query_index)
|
|
4915
|
-
? globalThis.Number(object.query_index)
|
|
4916
|
-
: 0,
|
|
4917
|
-
snapshot: isSet(object.snapshot) ? QuerySnapshot.fromJSON(object.snapshot) : undefined,
|
|
4918
|
-
update: isSet(object.update) ? QuerySeriesUpdate.fromJSON(object.update) : undefined,
|
|
4919
|
-
error: isSet(object.error) ? WidgetQueryError.fromJSON(object.error) : undefined,
|
|
4920
4956
|
};
|
|
4921
4957
|
},
|
|
4922
4958
|
|
|
4923
|
-
toJSON(message:
|
|
4959
|
+
toJSON(message: ListDashboardTemplatesRequest): unknown {
|
|
4924
4960
|
const obj: any = {};
|
|
4925
|
-
if (message.
|
|
4926
|
-
obj.
|
|
4927
|
-
}
|
|
4928
|
-
if (message.queryIndex !== 0) {
|
|
4929
|
-
obj.queryIndex = Math.round(message.queryIndex);
|
|
4930
|
-
}
|
|
4931
|
-
if (message.snapshot !== undefined) {
|
|
4932
|
-
obj.snapshot = QuerySnapshot.toJSON(message.snapshot);
|
|
4933
|
-
}
|
|
4934
|
-
if (message.update !== undefined) {
|
|
4935
|
-
obj.update = QuerySeriesUpdate.toJSON(message.update);
|
|
4936
|
-
}
|
|
4937
|
-
if (message.error !== undefined) {
|
|
4938
|
-
obj.error = WidgetQueryError.toJSON(message.error);
|
|
4961
|
+
if (message.organizationId !== "") {
|
|
4962
|
+
obj.organizationId = message.organizationId;
|
|
4939
4963
|
}
|
|
4940
4964
|
return obj;
|
|
4941
4965
|
},
|
|
4942
4966
|
|
|
4943
|
-
create<I extends Exact<DeepPartial<
|
|
4967
|
+
create<I extends Exact<DeepPartial<ListDashboardTemplatesRequest>, I>>(base?: I): ListDashboardTemplatesRequest {
|
|
4968
|
+
return ListDashboardTemplatesRequest.fromPartial(base ?? ({} as any));
|
|
4969
|
+
},
|
|
4970
|
+
fromPartial<I extends Exact<DeepPartial<ListDashboardTemplatesRequest>, I>>(
|
|
4971
|
+
object: I,
|
|
4972
|
+
): ListDashboardTemplatesRequest {
|
|
4973
|
+
const message = createBaseListDashboardTemplatesRequest();
|
|
4974
|
+
message.organizationId = object.organizationId ?? "";
|
|
4975
|
+
return message;
|
|
4976
|
+
},
|
|
4977
|
+
};
|
|
4978
|
+
|
|
4979
|
+
function createBaseListDashboardTemplatesResponse(): ListDashboardTemplatesResponse {
|
|
4980
|
+
return { status: undefined, templates: [] };
|
|
4981
|
+
}
|
|
4982
|
+
|
|
4983
|
+
export const ListDashboardTemplatesResponse: MessageFns<ListDashboardTemplatesResponse> = {
|
|
4984
|
+
encode(message: ListDashboardTemplatesResponse, writer: BinaryWriter = new BinaryWriter()): BinaryWriter {
|
|
4985
|
+
if (message.status !== undefined) {
|
|
4986
|
+
ResponseStatus.encode(message.status, writer.uint32(10).fork()).join();
|
|
4987
|
+
}
|
|
4988
|
+
for (const v of message.templates) {
|
|
4989
|
+
DashboardTemplate.encode(v!, writer.uint32(18).fork()).join();
|
|
4990
|
+
}
|
|
4991
|
+
return writer;
|
|
4992
|
+
},
|
|
4993
|
+
|
|
4994
|
+
decode(input: BinaryReader | Uint8Array, length?: number): ListDashboardTemplatesResponse {
|
|
4995
|
+
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
|
|
4996
|
+
const previousRecursionDepth = (reader as any).__tsProtoDecodeDepth ?? 0;
|
|
4997
|
+
if (previousRecursionDepth >= 100) {
|
|
4998
|
+
throw new globalThis.Error("protobuf decode recursion limit exceeded");
|
|
4999
|
+
}
|
|
5000
|
+
(reader as any).__tsProtoDecodeDepth = previousRecursionDepth + 1;
|
|
5001
|
+
try {
|
|
5002
|
+
const end = length === undefined ? reader.len : reader.pos + length;
|
|
5003
|
+
const message = createBaseListDashboardTemplatesResponse();
|
|
5004
|
+
while (reader.pos < end) {
|
|
5005
|
+
const tag = reader.uint32();
|
|
5006
|
+
switch (tag >>> 3) {
|
|
5007
|
+
case 1: {
|
|
5008
|
+
if (tag !== 10) {
|
|
5009
|
+
break;
|
|
5010
|
+
}
|
|
5011
|
+
|
|
5012
|
+
message.status = ResponseStatus.decode(reader, reader.uint32());
|
|
5013
|
+
continue;
|
|
5014
|
+
}
|
|
5015
|
+
case 2: {
|
|
5016
|
+
if (tag !== 18) {
|
|
5017
|
+
break;
|
|
5018
|
+
}
|
|
5019
|
+
|
|
5020
|
+
message.templates.push(DashboardTemplate.decode(reader, reader.uint32()));
|
|
5021
|
+
continue;
|
|
5022
|
+
}
|
|
5023
|
+
}
|
|
5024
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
5025
|
+
break;
|
|
5026
|
+
}
|
|
5027
|
+
reader.skip(tag & 7);
|
|
5028
|
+
}
|
|
5029
|
+
return message;
|
|
5030
|
+
} finally {
|
|
5031
|
+
(reader as any).__tsProtoDecodeDepth = previousRecursionDepth;
|
|
5032
|
+
}
|
|
5033
|
+
},
|
|
5034
|
+
|
|
5035
|
+
fromJSON(object: any): ListDashboardTemplatesResponse {
|
|
5036
|
+
return {
|
|
5037
|
+
status: isSet(object.status) ? ResponseStatus.fromJSON(object.status) : undefined,
|
|
5038
|
+
templates: globalThis.Array.isArray(object?.templates)
|
|
5039
|
+
? object.templates.map((e: any) => DashboardTemplate.fromJSON(e))
|
|
5040
|
+
: [],
|
|
5041
|
+
};
|
|
5042
|
+
},
|
|
5043
|
+
|
|
5044
|
+
toJSON(message: ListDashboardTemplatesResponse): unknown {
|
|
5045
|
+
const obj: any = {};
|
|
5046
|
+
if (message.status !== undefined) {
|
|
5047
|
+
obj.status = ResponseStatus.toJSON(message.status);
|
|
5048
|
+
}
|
|
5049
|
+
if (message.templates?.length) {
|
|
5050
|
+
obj.templates = message.templates.map((e) => DashboardTemplate.toJSON(e));
|
|
5051
|
+
}
|
|
5052
|
+
return obj;
|
|
5053
|
+
},
|
|
5054
|
+
|
|
5055
|
+
create<I extends Exact<DeepPartial<ListDashboardTemplatesResponse>, I>>(base?: I): ListDashboardTemplatesResponse {
|
|
5056
|
+
return ListDashboardTemplatesResponse.fromPartial(base ?? ({} as any));
|
|
5057
|
+
},
|
|
5058
|
+
fromPartial<I extends Exact<DeepPartial<ListDashboardTemplatesResponse>, I>>(
|
|
5059
|
+
object: I,
|
|
5060
|
+
): ListDashboardTemplatesResponse {
|
|
5061
|
+
const message = createBaseListDashboardTemplatesResponse();
|
|
5062
|
+
message.status = (object.status !== undefined && object.status !== null)
|
|
5063
|
+
? ResponseStatus.fromPartial(object.status)
|
|
5064
|
+
: undefined;
|
|
5065
|
+
message.templates = object.templates?.map((e) => DashboardTemplate.fromPartial(e)) || [];
|
|
5066
|
+
return message;
|
|
5067
|
+
},
|
|
5068
|
+
};
|
|
5069
|
+
|
|
5070
|
+
function createBaseCreateDashboardFromTemplateRequest(): CreateDashboardFromTemplateRequest {
|
|
5071
|
+
return {
|
|
5072
|
+
organizationId: "",
|
|
5073
|
+
projectId: "",
|
|
5074
|
+
templateId: "",
|
|
5075
|
+
name: undefined,
|
|
5076
|
+
description: undefined,
|
|
5077
|
+
defaultTimeWindow: 0,
|
|
5078
|
+
};
|
|
5079
|
+
}
|
|
5080
|
+
|
|
5081
|
+
export const CreateDashboardFromTemplateRequest: MessageFns<CreateDashboardFromTemplateRequest> = {
|
|
5082
|
+
encode(message: CreateDashboardFromTemplateRequest, writer: BinaryWriter = new BinaryWriter()): BinaryWriter {
|
|
5083
|
+
if (message.organizationId !== "") {
|
|
5084
|
+
writer.uint32(10).string(message.organizationId);
|
|
5085
|
+
}
|
|
5086
|
+
if (message.projectId !== "") {
|
|
5087
|
+
writer.uint32(18).string(message.projectId);
|
|
5088
|
+
}
|
|
5089
|
+
if (message.templateId !== "") {
|
|
5090
|
+
writer.uint32(26).string(message.templateId);
|
|
5091
|
+
}
|
|
5092
|
+
if (message.name !== undefined) {
|
|
5093
|
+
writer.uint32(34).string(message.name);
|
|
5094
|
+
}
|
|
5095
|
+
if (message.description !== undefined) {
|
|
5096
|
+
writer.uint32(42).string(message.description);
|
|
5097
|
+
}
|
|
5098
|
+
if (message.defaultTimeWindow !== 0) {
|
|
5099
|
+
writer.uint32(48).int32(message.defaultTimeWindow);
|
|
5100
|
+
}
|
|
5101
|
+
return writer;
|
|
5102
|
+
},
|
|
5103
|
+
|
|
5104
|
+
decode(input: BinaryReader | Uint8Array, length?: number): CreateDashboardFromTemplateRequest {
|
|
5105
|
+
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
|
|
5106
|
+
const previousRecursionDepth = (reader as any).__tsProtoDecodeDepth ?? 0;
|
|
5107
|
+
if (previousRecursionDepth >= 100) {
|
|
5108
|
+
throw new globalThis.Error("protobuf decode recursion limit exceeded");
|
|
5109
|
+
}
|
|
5110
|
+
(reader as any).__tsProtoDecodeDepth = previousRecursionDepth + 1;
|
|
5111
|
+
try {
|
|
5112
|
+
const end = length === undefined ? reader.len : reader.pos + length;
|
|
5113
|
+
const message = createBaseCreateDashboardFromTemplateRequest();
|
|
5114
|
+
while (reader.pos < end) {
|
|
5115
|
+
const tag = reader.uint32();
|
|
5116
|
+
switch (tag >>> 3) {
|
|
5117
|
+
case 1: {
|
|
5118
|
+
if (tag !== 10) {
|
|
5119
|
+
break;
|
|
5120
|
+
}
|
|
5121
|
+
|
|
5122
|
+
message.organizationId = reader.string();
|
|
5123
|
+
continue;
|
|
5124
|
+
}
|
|
5125
|
+
case 2: {
|
|
5126
|
+
if (tag !== 18) {
|
|
5127
|
+
break;
|
|
5128
|
+
}
|
|
5129
|
+
|
|
5130
|
+
message.projectId = reader.string();
|
|
5131
|
+
continue;
|
|
5132
|
+
}
|
|
5133
|
+
case 3: {
|
|
5134
|
+
if (tag !== 26) {
|
|
5135
|
+
break;
|
|
5136
|
+
}
|
|
5137
|
+
|
|
5138
|
+
message.templateId = reader.string();
|
|
5139
|
+
continue;
|
|
5140
|
+
}
|
|
5141
|
+
case 4: {
|
|
5142
|
+
if (tag !== 34) {
|
|
5143
|
+
break;
|
|
5144
|
+
}
|
|
5145
|
+
|
|
5146
|
+
message.name = reader.string();
|
|
5147
|
+
continue;
|
|
5148
|
+
}
|
|
5149
|
+
case 5: {
|
|
5150
|
+
if (tag !== 42) {
|
|
5151
|
+
break;
|
|
5152
|
+
}
|
|
5153
|
+
|
|
5154
|
+
message.description = reader.string();
|
|
5155
|
+
continue;
|
|
5156
|
+
}
|
|
5157
|
+
case 6: {
|
|
5158
|
+
if (tag !== 48) {
|
|
5159
|
+
break;
|
|
5160
|
+
}
|
|
5161
|
+
|
|
5162
|
+
message.defaultTimeWindow = reader.int32() as any;
|
|
5163
|
+
continue;
|
|
5164
|
+
}
|
|
5165
|
+
}
|
|
5166
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
5167
|
+
break;
|
|
5168
|
+
}
|
|
5169
|
+
reader.skip(tag & 7);
|
|
5170
|
+
}
|
|
5171
|
+
return message;
|
|
5172
|
+
} finally {
|
|
5173
|
+
(reader as any).__tsProtoDecodeDepth = previousRecursionDepth;
|
|
5174
|
+
}
|
|
5175
|
+
},
|
|
5176
|
+
|
|
5177
|
+
fromJSON(object: any): CreateDashboardFromTemplateRequest {
|
|
5178
|
+
return {
|
|
5179
|
+
organizationId: isSet(object.organizationId)
|
|
5180
|
+
? globalThis.String(object.organizationId)
|
|
5181
|
+
: isSet(object.organization_id)
|
|
5182
|
+
? globalThis.String(object.organization_id)
|
|
5183
|
+
: "",
|
|
5184
|
+
projectId: isSet(object.projectId)
|
|
5185
|
+
? globalThis.String(object.projectId)
|
|
5186
|
+
: isSet(object.project_id)
|
|
5187
|
+
? globalThis.String(object.project_id)
|
|
5188
|
+
: "",
|
|
5189
|
+
templateId: isSet(object.templateId)
|
|
5190
|
+
? globalThis.String(object.templateId)
|
|
5191
|
+
: isSet(object.template_id)
|
|
5192
|
+
? globalThis.String(object.template_id)
|
|
5193
|
+
: "",
|
|
5194
|
+
name: isSet(object.name) ? globalThis.String(object.name) : undefined,
|
|
5195
|
+
description: isSet(object.description) ? globalThis.String(object.description) : undefined,
|
|
5196
|
+
defaultTimeWindow: isSet(object.defaultTimeWindow)
|
|
5197
|
+
? analyticsTimeWindowFromJSON(object.defaultTimeWindow)
|
|
5198
|
+
: isSet(object.default_time_window)
|
|
5199
|
+
? analyticsTimeWindowFromJSON(object.default_time_window)
|
|
5200
|
+
: 0,
|
|
5201
|
+
};
|
|
5202
|
+
},
|
|
5203
|
+
|
|
5204
|
+
toJSON(message: CreateDashboardFromTemplateRequest): unknown {
|
|
5205
|
+
const obj: any = {};
|
|
5206
|
+
if (message.organizationId !== "") {
|
|
5207
|
+
obj.organizationId = message.organizationId;
|
|
5208
|
+
}
|
|
5209
|
+
if (message.projectId !== "") {
|
|
5210
|
+
obj.projectId = message.projectId;
|
|
5211
|
+
}
|
|
5212
|
+
if (message.templateId !== "") {
|
|
5213
|
+
obj.templateId = message.templateId;
|
|
5214
|
+
}
|
|
5215
|
+
if (message.name !== undefined) {
|
|
5216
|
+
obj.name = message.name;
|
|
5217
|
+
}
|
|
5218
|
+
if (message.description !== undefined) {
|
|
5219
|
+
obj.description = message.description;
|
|
5220
|
+
}
|
|
5221
|
+
if (message.defaultTimeWindow !== 0) {
|
|
5222
|
+
obj.defaultTimeWindow = analyticsTimeWindowToJSON(message.defaultTimeWindow);
|
|
5223
|
+
}
|
|
5224
|
+
return obj;
|
|
5225
|
+
},
|
|
5226
|
+
|
|
5227
|
+
create<I extends Exact<DeepPartial<CreateDashboardFromTemplateRequest>, I>>(
|
|
5228
|
+
base?: I,
|
|
5229
|
+
): CreateDashboardFromTemplateRequest {
|
|
5230
|
+
return CreateDashboardFromTemplateRequest.fromPartial(base ?? ({} as any));
|
|
5231
|
+
},
|
|
5232
|
+
fromPartial<I extends Exact<DeepPartial<CreateDashboardFromTemplateRequest>, I>>(
|
|
5233
|
+
object: I,
|
|
5234
|
+
): CreateDashboardFromTemplateRequest {
|
|
5235
|
+
const message = createBaseCreateDashboardFromTemplateRequest();
|
|
5236
|
+
message.organizationId = object.organizationId ?? "";
|
|
5237
|
+
message.projectId = object.projectId ?? "";
|
|
5238
|
+
message.templateId = object.templateId ?? "";
|
|
5239
|
+
message.name = object.name ?? undefined;
|
|
5240
|
+
message.description = object.description ?? undefined;
|
|
5241
|
+
message.defaultTimeWindow = object.defaultTimeWindow ?? 0;
|
|
5242
|
+
return message;
|
|
5243
|
+
},
|
|
5244
|
+
};
|
|
5245
|
+
|
|
5246
|
+
function createBaseCreateDashboardFromTemplateResponse(): CreateDashboardFromTemplateResponse {
|
|
5247
|
+
return { status: undefined, dashboard: undefined };
|
|
5248
|
+
}
|
|
5249
|
+
|
|
5250
|
+
export const CreateDashboardFromTemplateResponse: MessageFns<CreateDashboardFromTemplateResponse> = {
|
|
5251
|
+
encode(message: CreateDashboardFromTemplateResponse, writer: BinaryWriter = new BinaryWriter()): BinaryWriter {
|
|
5252
|
+
if (message.status !== undefined) {
|
|
5253
|
+
ResponseStatus.encode(message.status, writer.uint32(10).fork()).join();
|
|
5254
|
+
}
|
|
5255
|
+
if (message.dashboard !== undefined) {
|
|
5256
|
+
Dashboard.encode(message.dashboard, writer.uint32(18).fork()).join();
|
|
5257
|
+
}
|
|
5258
|
+
return writer;
|
|
5259
|
+
},
|
|
5260
|
+
|
|
5261
|
+
decode(input: BinaryReader | Uint8Array, length?: number): CreateDashboardFromTemplateResponse {
|
|
5262
|
+
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
|
|
5263
|
+
const previousRecursionDepth = (reader as any).__tsProtoDecodeDepth ?? 0;
|
|
5264
|
+
if (previousRecursionDepth >= 100) {
|
|
5265
|
+
throw new globalThis.Error("protobuf decode recursion limit exceeded");
|
|
5266
|
+
}
|
|
5267
|
+
(reader as any).__tsProtoDecodeDepth = previousRecursionDepth + 1;
|
|
5268
|
+
try {
|
|
5269
|
+
const end = length === undefined ? reader.len : reader.pos + length;
|
|
5270
|
+
const message = createBaseCreateDashboardFromTemplateResponse();
|
|
5271
|
+
while (reader.pos < end) {
|
|
5272
|
+
const tag = reader.uint32();
|
|
5273
|
+
switch (tag >>> 3) {
|
|
5274
|
+
case 1: {
|
|
5275
|
+
if (tag !== 10) {
|
|
5276
|
+
break;
|
|
5277
|
+
}
|
|
5278
|
+
|
|
5279
|
+
message.status = ResponseStatus.decode(reader, reader.uint32());
|
|
5280
|
+
continue;
|
|
5281
|
+
}
|
|
5282
|
+
case 2: {
|
|
5283
|
+
if (tag !== 18) {
|
|
5284
|
+
break;
|
|
5285
|
+
}
|
|
5286
|
+
|
|
5287
|
+
message.dashboard = Dashboard.decode(reader, reader.uint32());
|
|
5288
|
+
continue;
|
|
5289
|
+
}
|
|
5290
|
+
}
|
|
5291
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
5292
|
+
break;
|
|
5293
|
+
}
|
|
5294
|
+
reader.skip(tag & 7);
|
|
5295
|
+
}
|
|
5296
|
+
return message;
|
|
5297
|
+
} finally {
|
|
5298
|
+
(reader as any).__tsProtoDecodeDepth = previousRecursionDepth;
|
|
5299
|
+
}
|
|
5300
|
+
},
|
|
5301
|
+
|
|
5302
|
+
fromJSON(object: any): CreateDashboardFromTemplateResponse {
|
|
5303
|
+
return {
|
|
5304
|
+
status: isSet(object.status) ? ResponseStatus.fromJSON(object.status) : undefined,
|
|
5305
|
+
dashboard: isSet(object.dashboard) ? Dashboard.fromJSON(object.dashboard) : undefined,
|
|
5306
|
+
};
|
|
5307
|
+
},
|
|
5308
|
+
|
|
5309
|
+
toJSON(message: CreateDashboardFromTemplateResponse): unknown {
|
|
5310
|
+
const obj: any = {};
|
|
5311
|
+
if (message.status !== undefined) {
|
|
5312
|
+
obj.status = ResponseStatus.toJSON(message.status);
|
|
5313
|
+
}
|
|
5314
|
+
if (message.dashboard !== undefined) {
|
|
5315
|
+
obj.dashboard = Dashboard.toJSON(message.dashboard);
|
|
5316
|
+
}
|
|
5317
|
+
return obj;
|
|
5318
|
+
},
|
|
5319
|
+
|
|
5320
|
+
create<I extends Exact<DeepPartial<CreateDashboardFromTemplateResponse>, I>>(
|
|
5321
|
+
base?: I,
|
|
5322
|
+
): CreateDashboardFromTemplateResponse {
|
|
5323
|
+
return CreateDashboardFromTemplateResponse.fromPartial(base ?? ({} as any));
|
|
5324
|
+
},
|
|
5325
|
+
fromPartial<I extends Exact<DeepPartial<CreateDashboardFromTemplateResponse>, I>>(
|
|
5326
|
+
object: I,
|
|
5327
|
+
): CreateDashboardFromTemplateResponse {
|
|
5328
|
+
const message = createBaseCreateDashboardFromTemplateResponse();
|
|
5329
|
+
message.status = (object.status !== undefined && object.status !== null)
|
|
5330
|
+
? ResponseStatus.fromPartial(object.status)
|
|
5331
|
+
: undefined;
|
|
5332
|
+
message.dashboard = (object.dashboard !== undefined && object.dashboard !== null)
|
|
5333
|
+
? Dashboard.fromPartial(object.dashboard)
|
|
5334
|
+
: undefined;
|
|
5335
|
+
return message;
|
|
5336
|
+
},
|
|
5337
|
+
};
|
|
5338
|
+
|
|
5339
|
+
function createBaseStreamDashboardDataRequest(): StreamDashboardDataRequest {
|
|
5340
|
+
return { organizationId: "", projectId: "", dashboardId: "", widgetIds: [], timeRange: undefined };
|
|
5341
|
+
}
|
|
5342
|
+
|
|
5343
|
+
export const StreamDashboardDataRequest: MessageFns<StreamDashboardDataRequest> = {
|
|
5344
|
+
encode(message: StreamDashboardDataRequest, writer: BinaryWriter = new BinaryWriter()): BinaryWriter {
|
|
5345
|
+
if (message.organizationId !== "") {
|
|
5346
|
+
writer.uint32(10).string(message.organizationId);
|
|
5347
|
+
}
|
|
5348
|
+
if (message.projectId !== "") {
|
|
5349
|
+
writer.uint32(18).string(message.projectId);
|
|
5350
|
+
}
|
|
5351
|
+
if (message.dashboardId !== "") {
|
|
5352
|
+
writer.uint32(26).string(message.dashboardId);
|
|
5353
|
+
}
|
|
5354
|
+
for (const v of message.widgetIds) {
|
|
5355
|
+
writer.uint32(34).string(v!);
|
|
5356
|
+
}
|
|
5357
|
+
if (message.timeRange !== undefined) {
|
|
5358
|
+
TimeRange.encode(message.timeRange, writer.uint32(42).fork()).join();
|
|
5359
|
+
}
|
|
5360
|
+
return writer;
|
|
5361
|
+
},
|
|
5362
|
+
|
|
5363
|
+
decode(input: BinaryReader | Uint8Array, length?: number): StreamDashboardDataRequest {
|
|
5364
|
+
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
|
|
5365
|
+
const previousRecursionDepth = (reader as any).__tsProtoDecodeDepth ?? 0;
|
|
5366
|
+
if (previousRecursionDepth >= 100) {
|
|
5367
|
+
throw new globalThis.Error("protobuf decode recursion limit exceeded");
|
|
5368
|
+
}
|
|
5369
|
+
(reader as any).__tsProtoDecodeDepth = previousRecursionDepth + 1;
|
|
5370
|
+
try {
|
|
5371
|
+
const end = length === undefined ? reader.len : reader.pos + length;
|
|
5372
|
+
const message = createBaseStreamDashboardDataRequest();
|
|
5373
|
+
while (reader.pos < end) {
|
|
5374
|
+
const tag = reader.uint32();
|
|
5375
|
+
switch (tag >>> 3) {
|
|
5376
|
+
case 1: {
|
|
5377
|
+
if (tag !== 10) {
|
|
5378
|
+
break;
|
|
5379
|
+
}
|
|
5380
|
+
|
|
5381
|
+
message.organizationId = reader.string();
|
|
5382
|
+
continue;
|
|
5383
|
+
}
|
|
5384
|
+
case 2: {
|
|
5385
|
+
if (tag !== 18) {
|
|
5386
|
+
break;
|
|
5387
|
+
}
|
|
5388
|
+
|
|
5389
|
+
message.projectId = reader.string();
|
|
5390
|
+
continue;
|
|
5391
|
+
}
|
|
5392
|
+
case 3: {
|
|
5393
|
+
if (tag !== 26) {
|
|
5394
|
+
break;
|
|
5395
|
+
}
|
|
5396
|
+
|
|
5397
|
+
message.dashboardId = reader.string();
|
|
5398
|
+
continue;
|
|
5399
|
+
}
|
|
5400
|
+
case 4: {
|
|
5401
|
+
if (tag !== 34) {
|
|
5402
|
+
break;
|
|
5403
|
+
}
|
|
5404
|
+
|
|
5405
|
+
message.widgetIds.push(reader.string());
|
|
5406
|
+
continue;
|
|
5407
|
+
}
|
|
5408
|
+
case 5: {
|
|
5409
|
+
if (tag !== 42) {
|
|
5410
|
+
break;
|
|
5411
|
+
}
|
|
5412
|
+
|
|
5413
|
+
message.timeRange = TimeRange.decode(reader, reader.uint32());
|
|
5414
|
+
continue;
|
|
5415
|
+
}
|
|
5416
|
+
}
|
|
5417
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
5418
|
+
break;
|
|
5419
|
+
}
|
|
5420
|
+
reader.skip(tag & 7);
|
|
5421
|
+
}
|
|
5422
|
+
return message;
|
|
5423
|
+
} finally {
|
|
5424
|
+
(reader as any).__tsProtoDecodeDepth = previousRecursionDepth;
|
|
5425
|
+
}
|
|
5426
|
+
},
|
|
5427
|
+
|
|
5428
|
+
fromJSON(object: any): StreamDashboardDataRequest {
|
|
5429
|
+
return {
|
|
5430
|
+
organizationId: isSet(object.organizationId)
|
|
5431
|
+
? globalThis.String(object.organizationId)
|
|
5432
|
+
: isSet(object.organization_id)
|
|
5433
|
+
? globalThis.String(object.organization_id)
|
|
5434
|
+
: "",
|
|
5435
|
+
projectId: isSet(object.projectId)
|
|
5436
|
+
? globalThis.String(object.projectId)
|
|
5437
|
+
: isSet(object.project_id)
|
|
5438
|
+
? globalThis.String(object.project_id)
|
|
5439
|
+
: "",
|
|
5440
|
+
dashboardId: isSet(object.dashboardId)
|
|
5441
|
+
? globalThis.String(object.dashboardId)
|
|
5442
|
+
: isSet(object.dashboard_id)
|
|
5443
|
+
? globalThis.String(object.dashboard_id)
|
|
5444
|
+
: "",
|
|
5445
|
+
widgetIds: globalThis.Array.isArray(object?.widgetIds)
|
|
5446
|
+
? object.widgetIds.map((e: any) => globalThis.String(e))
|
|
5447
|
+
: globalThis.Array.isArray(object?.widget_ids)
|
|
5448
|
+
? object.widget_ids.map((e: any) => globalThis.String(e))
|
|
5449
|
+
: [],
|
|
5450
|
+
timeRange: isSet(object.timeRange)
|
|
5451
|
+
? TimeRange.fromJSON(object.timeRange)
|
|
5452
|
+
: isSet(object.time_range)
|
|
5453
|
+
? TimeRange.fromJSON(object.time_range)
|
|
5454
|
+
: undefined,
|
|
5455
|
+
};
|
|
5456
|
+
},
|
|
5457
|
+
|
|
5458
|
+
toJSON(message: StreamDashboardDataRequest): unknown {
|
|
5459
|
+
const obj: any = {};
|
|
5460
|
+
if (message.organizationId !== "") {
|
|
5461
|
+
obj.organizationId = message.organizationId;
|
|
5462
|
+
}
|
|
5463
|
+
if (message.projectId !== "") {
|
|
5464
|
+
obj.projectId = message.projectId;
|
|
5465
|
+
}
|
|
5466
|
+
if (message.dashboardId !== "") {
|
|
5467
|
+
obj.dashboardId = message.dashboardId;
|
|
5468
|
+
}
|
|
5469
|
+
if (message.widgetIds?.length) {
|
|
5470
|
+
obj.widgetIds = message.widgetIds;
|
|
5471
|
+
}
|
|
5472
|
+
if (message.timeRange !== undefined) {
|
|
5473
|
+
obj.timeRange = TimeRange.toJSON(message.timeRange);
|
|
5474
|
+
}
|
|
5475
|
+
return obj;
|
|
5476
|
+
},
|
|
5477
|
+
|
|
5478
|
+
create<I extends Exact<DeepPartial<StreamDashboardDataRequest>, I>>(base?: I): StreamDashboardDataRequest {
|
|
5479
|
+
return StreamDashboardDataRequest.fromPartial(base ?? ({} as any));
|
|
5480
|
+
},
|
|
5481
|
+
fromPartial<I extends Exact<DeepPartial<StreamDashboardDataRequest>, I>>(object: I): StreamDashboardDataRequest {
|
|
5482
|
+
const message = createBaseStreamDashboardDataRequest();
|
|
5483
|
+
message.organizationId = object.organizationId ?? "";
|
|
5484
|
+
message.projectId = object.projectId ?? "";
|
|
5485
|
+
message.dashboardId = object.dashboardId ?? "";
|
|
5486
|
+
message.widgetIds = object.widgetIds?.map((e) => e) || [];
|
|
5487
|
+
message.timeRange = (object.timeRange !== undefined && object.timeRange !== null)
|
|
5488
|
+
? TimeRange.fromPartial(object.timeRange)
|
|
5489
|
+
: undefined;
|
|
5490
|
+
return message;
|
|
5491
|
+
},
|
|
5492
|
+
};
|
|
5493
|
+
|
|
5494
|
+
function createBaseDashboardDataEnvelope(): DashboardDataEnvelope {
|
|
5495
|
+
return { widgetId: "", queryIndex: 0, snapshot: undefined, update: undefined, error: undefined };
|
|
5496
|
+
}
|
|
5497
|
+
|
|
5498
|
+
export const DashboardDataEnvelope: MessageFns<DashboardDataEnvelope> = {
|
|
5499
|
+
encode(message: DashboardDataEnvelope, writer: BinaryWriter = new BinaryWriter()): BinaryWriter {
|
|
5500
|
+
if (message.widgetId !== "") {
|
|
5501
|
+
writer.uint32(10).string(message.widgetId);
|
|
5502
|
+
}
|
|
5503
|
+
if (message.queryIndex !== 0) {
|
|
5504
|
+
writer.uint32(16).int32(message.queryIndex);
|
|
5505
|
+
}
|
|
5506
|
+
if (message.snapshot !== undefined) {
|
|
5507
|
+
QuerySnapshot.encode(message.snapshot, writer.uint32(26).fork()).join();
|
|
5508
|
+
}
|
|
5509
|
+
if (message.update !== undefined) {
|
|
5510
|
+
QuerySeriesUpdate.encode(message.update, writer.uint32(34).fork()).join();
|
|
5511
|
+
}
|
|
5512
|
+
if (message.error !== undefined) {
|
|
5513
|
+
WidgetQueryError.encode(message.error, writer.uint32(42).fork()).join();
|
|
5514
|
+
}
|
|
5515
|
+
return writer;
|
|
5516
|
+
},
|
|
5517
|
+
|
|
5518
|
+
decode(input: BinaryReader | Uint8Array, length?: number): DashboardDataEnvelope {
|
|
5519
|
+
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
|
|
5520
|
+
const previousRecursionDepth = (reader as any).__tsProtoDecodeDepth ?? 0;
|
|
5521
|
+
if (previousRecursionDepth >= 100) {
|
|
5522
|
+
throw new globalThis.Error("protobuf decode recursion limit exceeded");
|
|
5523
|
+
}
|
|
5524
|
+
(reader as any).__tsProtoDecodeDepth = previousRecursionDepth + 1;
|
|
5525
|
+
try {
|
|
5526
|
+
const end = length === undefined ? reader.len : reader.pos + length;
|
|
5527
|
+
const message = createBaseDashboardDataEnvelope();
|
|
5528
|
+
while (reader.pos < end) {
|
|
5529
|
+
const tag = reader.uint32();
|
|
5530
|
+
switch (tag >>> 3) {
|
|
5531
|
+
case 1: {
|
|
5532
|
+
if (tag !== 10) {
|
|
5533
|
+
break;
|
|
5534
|
+
}
|
|
5535
|
+
|
|
5536
|
+
message.widgetId = reader.string();
|
|
5537
|
+
continue;
|
|
5538
|
+
}
|
|
5539
|
+
case 2: {
|
|
5540
|
+
if (tag !== 16) {
|
|
5541
|
+
break;
|
|
5542
|
+
}
|
|
5543
|
+
|
|
5544
|
+
message.queryIndex = reader.int32();
|
|
5545
|
+
continue;
|
|
5546
|
+
}
|
|
5547
|
+
case 3: {
|
|
5548
|
+
if (tag !== 26) {
|
|
5549
|
+
break;
|
|
5550
|
+
}
|
|
5551
|
+
|
|
5552
|
+
message.snapshot = QuerySnapshot.decode(reader, reader.uint32());
|
|
5553
|
+
continue;
|
|
5554
|
+
}
|
|
5555
|
+
case 4: {
|
|
5556
|
+
if (tag !== 34) {
|
|
5557
|
+
break;
|
|
5558
|
+
}
|
|
5559
|
+
|
|
5560
|
+
message.update = QuerySeriesUpdate.decode(reader, reader.uint32());
|
|
5561
|
+
continue;
|
|
5562
|
+
}
|
|
5563
|
+
case 5: {
|
|
5564
|
+
if (tag !== 42) {
|
|
5565
|
+
break;
|
|
5566
|
+
}
|
|
5567
|
+
|
|
5568
|
+
message.error = WidgetQueryError.decode(reader, reader.uint32());
|
|
5569
|
+
continue;
|
|
5570
|
+
}
|
|
5571
|
+
}
|
|
5572
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
5573
|
+
break;
|
|
5574
|
+
}
|
|
5575
|
+
reader.skip(tag & 7);
|
|
5576
|
+
}
|
|
5577
|
+
return message;
|
|
5578
|
+
} finally {
|
|
5579
|
+
(reader as any).__tsProtoDecodeDepth = previousRecursionDepth;
|
|
5580
|
+
}
|
|
5581
|
+
},
|
|
5582
|
+
|
|
5583
|
+
fromJSON(object: any): DashboardDataEnvelope {
|
|
5584
|
+
return {
|
|
5585
|
+
widgetId: isSet(object.widgetId)
|
|
5586
|
+
? globalThis.String(object.widgetId)
|
|
5587
|
+
: isSet(object.widget_id)
|
|
5588
|
+
? globalThis.String(object.widget_id)
|
|
5589
|
+
: "",
|
|
5590
|
+
queryIndex: isSet(object.queryIndex)
|
|
5591
|
+
? globalThis.Number(object.queryIndex)
|
|
5592
|
+
: isSet(object.query_index)
|
|
5593
|
+
? globalThis.Number(object.query_index)
|
|
5594
|
+
: 0,
|
|
5595
|
+
snapshot: isSet(object.snapshot) ? QuerySnapshot.fromJSON(object.snapshot) : undefined,
|
|
5596
|
+
update: isSet(object.update) ? QuerySeriesUpdate.fromJSON(object.update) : undefined,
|
|
5597
|
+
error: isSet(object.error) ? WidgetQueryError.fromJSON(object.error) : undefined,
|
|
5598
|
+
};
|
|
5599
|
+
},
|
|
5600
|
+
|
|
5601
|
+
toJSON(message: DashboardDataEnvelope): unknown {
|
|
5602
|
+
const obj: any = {};
|
|
5603
|
+
if (message.widgetId !== "") {
|
|
5604
|
+
obj.widgetId = message.widgetId;
|
|
5605
|
+
}
|
|
5606
|
+
if (message.queryIndex !== 0) {
|
|
5607
|
+
obj.queryIndex = Math.round(message.queryIndex);
|
|
5608
|
+
}
|
|
5609
|
+
if (message.snapshot !== undefined) {
|
|
5610
|
+
obj.snapshot = QuerySnapshot.toJSON(message.snapshot);
|
|
5611
|
+
}
|
|
5612
|
+
if (message.update !== undefined) {
|
|
5613
|
+
obj.update = QuerySeriesUpdate.toJSON(message.update);
|
|
5614
|
+
}
|
|
5615
|
+
if (message.error !== undefined) {
|
|
5616
|
+
obj.error = WidgetQueryError.toJSON(message.error);
|
|
5617
|
+
}
|
|
5618
|
+
return obj;
|
|
5619
|
+
},
|
|
5620
|
+
|
|
5621
|
+
create<I extends Exact<DeepPartial<DashboardDataEnvelope>, I>>(base?: I): DashboardDataEnvelope {
|
|
4944
5622
|
return DashboardDataEnvelope.fromPartial(base ?? ({} as any));
|
|
4945
5623
|
},
|
|
4946
5624
|
fromPartial<I extends Exact<DeepPartial<DashboardDataEnvelope>, I>>(object: I): DashboardDataEnvelope {
|
|
@@ -5594,6 +6272,22 @@ export interface MetricGatewayService {
|
|
|
5594
6272
|
ListDashboards(request: ListDashboardsRequest, metadata?: Metadata): Promise<ListDashboardsResponse>;
|
|
5595
6273
|
UpdateDashboard(request: UpdateDashboardRequest, metadata?: Metadata): Promise<UpdateDashboardResponse>;
|
|
5596
6274
|
DeleteDashboard(request: DeleteDashboardRequest, metadata?: Metadata): Promise<DeleteDashboardResponse>;
|
|
6275
|
+
/**
|
|
6276
|
+
* Starter dashboards for this gateway's product, with full widgets for
|
|
6277
|
+
* previews. A product with none lists empty.
|
|
6278
|
+
*/
|
|
6279
|
+
ListDashboardTemplates(
|
|
6280
|
+
request: ListDashboardTemplatesRequest,
|
|
6281
|
+
metadata?: Metadata,
|
|
6282
|
+
): Promise<ListDashboardTemplatesResponse>;
|
|
6283
|
+
/**
|
|
6284
|
+
* Creates a plain copy of a template in the project; an unknown id (or one
|
|
6285
|
+
* of another product) reports STATUS_CODE_NOT_FOUND.
|
|
6286
|
+
*/
|
|
6287
|
+
CreateDashboardFromTemplate(
|
|
6288
|
+
request: CreateDashboardFromTemplateRequest,
|
|
6289
|
+
metadata?: Metadata,
|
|
6290
|
+
): Promise<CreateDashboardFromTemplateResponse>;
|
|
5597
6291
|
/**
|
|
5598
6292
|
* One stream per dashboard view: every widget query runs server-side and
|
|
5599
6293
|
* all results multiplex onto this stream tagged with widget_id. Per-widget
|
|
@@ -5632,6 +6326,8 @@ export class MetricGatewayServiceClientImpl implements MetricGatewayService {
|
|
|
5632
6326
|
this.ListDashboards = this.ListDashboards.bind(this);
|
|
5633
6327
|
this.UpdateDashboard = this.UpdateDashboard.bind(this);
|
|
5634
6328
|
this.DeleteDashboard = this.DeleteDashboard.bind(this);
|
|
6329
|
+
this.ListDashboardTemplates = this.ListDashboardTemplates.bind(this);
|
|
6330
|
+
this.CreateDashboardFromTemplate = this.CreateDashboardFromTemplate.bind(this);
|
|
5635
6331
|
this.StreamDashboardData = this.StreamDashboardData.bind(this);
|
|
5636
6332
|
this.StreamDashboardPreviews = this.StreamDashboardPreviews.bind(this);
|
|
5637
6333
|
}
|
|
@@ -5692,6 +6388,24 @@ export class MetricGatewayServiceClientImpl implements MetricGatewayService {
|
|
|
5692
6388
|
return promise.then((data) => DeleteDashboardResponse.decode(new BinaryReader(data)));
|
|
5693
6389
|
}
|
|
5694
6390
|
|
|
6391
|
+
ListDashboardTemplates(
|
|
6392
|
+
request: ListDashboardTemplatesRequest,
|
|
6393
|
+
metadata?: Metadata,
|
|
6394
|
+
): Promise<ListDashboardTemplatesResponse> {
|
|
6395
|
+
const data = ListDashboardTemplatesRequest.encode(request).finish();
|
|
6396
|
+
const promise = this.rpc.request(this.service, "ListDashboardTemplates", data, metadata);
|
|
6397
|
+
return promise.then((data) => ListDashboardTemplatesResponse.decode(new BinaryReader(data)));
|
|
6398
|
+
}
|
|
6399
|
+
|
|
6400
|
+
CreateDashboardFromTemplate(
|
|
6401
|
+
request: CreateDashboardFromTemplateRequest,
|
|
6402
|
+
metadata?: Metadata,
|
|
6403
|
+
): Promise<CreateDashboardFromTemplateResponse> {
|
|
6404
|
+
const data = CreateDashboardFromTemplateRequest.encode(request).finish();
|
|
6405
|
+
const promise = this.rpc.request(this.service, "CreateDashboardFromTemplate", data, metadata);
|
|
6406
|
+
return promise.then((data) => CreateDashboardFromTemplateResponse.decode(new BinaryReader(data)));
|
|
6407
|
+
}
|
|
6408
|
+
|
|
5695
6409
|
StreamDashboardData(request: StreamDashboardDataRequest, metadata?: Metadata): Observable<DashboardDataEnvelope> {
|
|
5696
6410
|
const data = StreamDashboardDataRequest.encode(request).finish();
|
|
5697
6411
|
const result = this.rpc.serverStreamingRequest(this.service, "StreamDashboardData", data, metadata);
|