@miradorlabs/web-grpc 2.74.0 → 2.76.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/package.json +1 -1
- package/proto/gateway/web/v1/ai_gateway.ts +121 -0
- package/proto/gateway/web/v1/ai_gateway_pb.js +154 -3
- package/proto/gateway/web/v1/metric_gateway.ts +826 -177
- package/proto/gateway/web/v1/metric_gateway_grpc_pb.js +70 -0
- package/proto/gateway/web/v1/metric_gateway_pb.js +1249 -0
|
@@ -463,7 +463,7 @@ export interface DashboardSummary {
|
|
|
463
463
|
|
|
464
464
|
/**
|
|
465
465
|
* UpdateDashboardRequest replaces the dashboard document. A version mismatch
|
|
466
|
-
*
|
|
466
|
+
* reports STATUS_CODE_CONFLICT and the caller re-fetches, merges, retries.
|
|
467
467
|
*/
|
|
468
468
|
export interface UpdateDashboardRequest {
|
|
469
469
|
/** Verified against the caller's identity before proxying. */
|
|
@@ -493,6 +493,47 @@ export interface DeleteDashboardResponse {
|
|
|
493
493
|
status: ResponseStatus | undefined;
|
|
494
494
|
}
|
|
495
495
|
|
|
496
|
+
/**
|
|
497
|
+
* DashboardTemplate is a starter dashboard document, identified by a stable,
|
|
498
|
+
* product-prefixed id (e.g. `terma.spend-tokens`) that is never renamed.
|
|
499
|
+
*/
|
|
500
|
+
export interface DashboardTemplate {
|
|
501
|
+
id: string;
|
|
502
|
+
name: string;
|
|
503
|
+
description: string;
|
|
504
|
+
defaultTimeWindow: AnalyticsTimeWindow;
|
|
505
|
+
widgets: Widget[];
|
|
506
|
+
}
|
|
507
|
+
|
|
508
|
+
export interface ListDashboardTemplatesRequest {
|
|
509
|
+
/** Verified against the caller's identity before proxying. */
|
|
510
|
+
organizationId: string;
|
|
511
|
+
}
|
|
512
|
+
|
|
513
|
+
export interface ListDashboardTemplatesResponse {
|
|
514
|
+
status: ResponseStatus | undefined;
|
|
515
|
+
templates: DashboardTemplate[];
|
|
516
|
+
}
|
|
517
|
+
|
|
518
|
+
export interface CreateDashboardFromTemplateRequest {
|
|
519
|
+
/** Verified against the caller's identity before proxying. */
|
|
520
|
+
organizationId: string;
|
|
521
|
+
projectId: string;
|
|
522
|
+
templateId: string;
|
|
523
|
+
/** Unset = the template's. */
|
|
524
|
+
name?: string | undefined;
|
|
525
|
+
description?:
|
|
526
|
+
| string
|
|
527
|
+
| undefined;
|
|
528
|
+
/** UNSPECIFIED = the template's. */
|
|
529
|
+
defaultTimeWindow: AnalyticsTimeWindow;
|
|
530
|
+
}
|
|
531
|
+
|
|
532
|
+
export interface CreateDashboardFromTemplateResponse {
|
|
533
|
+
status: ResponseStatus | undefined;
|
|
534
|
+
dashboard: Dashboard | undefined;
|
|
535
|
+
}
|
|
536
|
+
|
|
496
537
|
export interface StreamDashboardDataRequest {
|
|
497
538
|
/** Verified against the caller's identity before proxying. */
|
|
498
539
|
organizationId: string;
|
|
@@ -4658,31 +4699,31 @@ export const DeleteDashboardResponse: MessageFns<DeleteDashboardResponse> = {
|
|
|
4658
4699
|
},
|
|
4659
4700
|
};
|
|
4660
4701
|
|
|
4661
|
-
function
|
|
4662
|
-
return {
|
|
4702
|
+
function createBaseDashboardTemplate(): DashboardTemplate {
|
|
4703
|
+
return { id: "", name: "", description: "", defaultTimeWindow: 0, widgets: [] };
|
|
4663
4704
|
}
|
|
4664
4705
|
|
|
4665
|
-
export const
|
|
4666
|
-
encode(message:
|
|
4667
|
-
if (message.
|
|
4668
|
-
writer.uint32(10).string(message.
|
|
4706
|
+
export const DashboardTemplate: MessageFns<DashboardTemplate> = {
|
|
4707
|
+
encode(message: DashboardTemplate, writer: BinaryWriter = new BinaryWriter()): BinaryWriter {
|
|
4708
|
+
if (message.id !== "") {
|
|
4709
|
+
writer.uint32(10).string(message.id);
|
|
4669
4710
|
}
|
|
4670
|
-
if (message.
|
|
4671
|
-
writer.uint32(18).string(message.
|
|
4711
|
+
if (message.name !== "") {
|
|
4712
|
+
writer.uint32(18).string(message.name);
|
|
4672
4713
|
}
|
|
4673
|
-
if (message.
|
|
4674
|
-
writer.uint32(26).string(message.
|
|
4714
|
+
if (message.description !== "") {
|
|
4715
|
+
writer.uint32(26).string(message.description);
|
|
4675
4716
|
}
|
|
4676
|
-
|
|
4677
|
-
writer.uint32(
|
|
4717
|
+
if (message.defaultTimeWindow !== 0) {
|
|
4718
|
+
writer.uint32(32).int32(message.defaultTimeWindow);
|
|
4678
4719
|
}
|
|
4679
|
-
|
|
4680
|
-
|
|
4720
|
+
for (const v of message.widgets) {
|
|
4721
|
+
Widget.encode(v!, writer.uint32(42).fork()).join();
|
|
4681
4722
|
}
|
|
4682
4723
|
return writer;
|
|
4683
4724
|
},
|
|
4684
4725
|
|
|
4685
|
-
decode(input: BinaryReader | Uint8Array, length?: number):
|
|
4726
|
+
decode(input: BinaryReader | Uint8Array, length?: number): DashboardTemplate {
|
|
4686
4727
|
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
|
|
4687
4728
|
const previousRecursionDepth = (reader as any).__tsProtoDecodeDepth ?? 0;
|
|
4688
4729
|
if (previousRecursionDepth >= 100) {
|
|
@@ -4691,7 +4732,7 @@ export const StreamDashboardDataRequest: MessageFns<StreamDashboardDataRequest>
|
|
|
4691
4732
|
(reader as any).__tsProtoDecodeDepth = previousRecursionDepth + 1;
|
|
4692
4733
|
try {
|
|
4693
4734
|
const end = length === undefined ? reader.len : reader.pos + length;
|
|
4694
|
-
const message =
|
|
4735
|
+
const message = createBaseDashboardTemplate();
|
|
4695
4736
|
while (reader.pos < end) {
|
|
4696
4737
|
const tag = reader.uint32();
|
|
4697
4738
|
switch (tag >>> 3) {
|
|
@@ -4700,7 +4741,7 @@ export const StreamDashboardDataRequest: MessageFns<StreamDashboardDataRequest>
|
|
|
4700
4741
|
break;
|
|
4701
4742
|
}
|
|
4702
4743
|
|
|
4703
|
-
message.
|
|
4744
|
+
message.id = reader.string();
|
|
4704
4745
|
continue;
|
|
4705
4746
|
}
|
|
4706
4747
|
case 2: {
|
|
@@ -4708,7 +4749,7 @@ export const StreamDashboardDataRequest: MessageFns<StreamDashboardDataRequest>
|
|
|
4708
4749
|
break;
|
|
4709
4750
|
}
|
|
4710
4751
|
|
|
4711
|
-
message.
|
|
4752
|
+
message.name = reader.string();
|
|
4712
4753
|
continue;
|
|
4713
4754
|
}
|
|
4714
4755
|
case 3: {
|
|
@@ -4716,15 +4757,15 @@ export const StreamDashboardDataRequest: MessageFns<StreamDashboardDataRequest>
|
|
|
4716
4757
|
break;
|
|
4717
4758
|
}
|
|
4718
4759
|
|
|
4719
|
-
message.
|
|
4760
|
+
message.description = reader.string();
|
|
4720
4761
|
continue;
|
|
4721
4762
|
}
|
|
4722
4763
|
case 4: {
|
|
4723
|
-
if (tag !==
|
|
4764
|
+
if (tag !== 32) {
|
|
4724
4765
|
break;
|
|
4725
4766
|
}
|
|
4726
4767
|
|
|
4727
|
-
message.
|
|
4768
|
+
message.defaultTimeWindow = reader.int32() as any;
|
|
4728
4769
|
continue;
|
|
4729
4770
|
}
|
|
4730
4771
|
case 5: {
|
|
@@ -4732,7 +4773,7 @@ export const StreamDashboardDataRequest: MessageFns<StreamDashboardDataRequest>
|
|
|
4732
4773
|
break;
|
|
4733
4774
|
}
|
|
4734
4775
|
|
|
4735
|
-
message.
|
|
4776
|
+
message.widgets.push(Widget.decode(reader, reader.uint32()));
|
|
4736
4777
|
continue;
|
|
4737
4778
|
}
|
|
4738
4779
|
}
|
|
@@ -4747,97 +4788,67 @@ export const StreamDashboardDataRequest: MessageFns<StreamDashboardDataRequest>
|
|
|
4747
4788
|
}
|
|
4748
4789
|
},
|
|
4749
4790
|
|
|
4750
|
-
fromJSON(object: any):
|
|
4791
|
+
fromJSON(object: any): DashboardTemplate {
|
|
4751
4792
|
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,
|
|
4793
|
+
id: isSet(object.id) ? globalThis.String(object.id) : "",
|
|
4794
|
+
name: isSet(object.name) ? globalThis.String(object.name) : "",
|
|
4795
|
+
description: isSet(object.description) ? globalThis.String(object.description) : "",
|
|
4796
|
+
defaultTimeWindow: isSet(object.defaultTimeWindow)
|
|
4797
|
+
? analyticsTimeWindowFromJSON(object.defaultTimeWindow)
|
|
4798
|
+
: isSet(object.default_time_window)
|
|
4799
|
+
? analyticsTimeWindowFromJSON(object.default_time_window)
|
|
4800
|
+
: 0,
|
|
4801
|
+
widgets: globalThis.Array.isArray(object?.widgets) ? object.widgets.map((e: any) => Widget.fromJSON(e)) : [],
|
|
4777
4802
|
};
|
|
4778
4803
|
},
|
|
4779
4804
|
|
|
4780
|
-
toJSON(message:
|
|
4805
|
+
toJSON(message: DashboardTemplate): unknown {
|
|
4781
4806
|
const obj: any = {};
|
|
4782
|
-
if (message.
|
|
4783
|
-
obj.
|
|
4807
|
+
if (message.id !== "") {
|
|
4808
|
+
obj.id = message.id;
|
|
4784
4809
|
}
|
|
4785
|
-
if (message.
|
|
4786
|
-
obj.
|
|
4810
|
+
if (message.name !== "") {
|
|
4811
|
+
obj.name = message.name;
|
|
4787
4812
|
}
|
|
4788
|
-
if (message.
|
|
4789
|
-
obj.
|
|
4813
|
+
if (message.description !== "") {
|
|
4814
|
+
obj.description = message.description;
|
|
4790
4815
|
}
|
|
4791
|
-
if (message.
|
|
4792
|
-
obj.
|
|
4816
|
+
if (message.defaultTimeWindow !== 0) {
|
|
4817
|
+
obj.defaultTimeWindow = analyticsTimeWindowToJSON(message.defaultTimeWindow);
|
|
4793
4818
|
}
|
|
4794
|
-
if (message.
|
|
4795
|
-
obj.
|
|
4819
|
+
if (message.widgets?.length) {
|
|
4820
|
+
obj.widgets = message.widgets.map((e) => Widget.toJSON(e));
|
|
4796
4821
|
}
|
|
4797
4822
|
return obj;
|
|
4798
4823
|
},
|
|
4799
4824
|
|
|
4800
|
-
create<I extends Exact<DeepPartial<
|
|
4801
|
-
return
|
|
4825
|
+
create<I extends Exact<DeepPartial<DashboardTemplate>, I>>(base?: I): DashboardTemplate {
|
|
4826
|
+
return DashboardTemplate.fromPartial(base ?? ({} as any));
|
|
4802
4827
|
},
|
|
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;
|
|
4828
|
+
fromPartial<I extends Exact<DeepPartial<DashboardTemplate>, I>>(object: I): DashboardTemplate {
|
|
4829
|
+
const message = createBaseDashboardTemplate();
|
|
4830
|
+
message.id = object.id ?? "";
|
|
4831
|
+
message.name = object.name ?? "";
|
|
4832
|
+
message.description = object.description ?? "";
|
|
4833
|
+
message.defaultTimeWindow = object.defaultTimeWindow ?? 0;
|
|
4834
|
+
message.widgets = object.widgets?.map((e) => Widget.fromPartial(e)) || [];
|
|
4812
4835
|
return message;
|
|
4813
4836
|
},
|
|
4814
4837
|
};
|
|
4815
4838
|
|
|
4816
|
-
function
|
|
4817
|
-
return {
|
|
4839
|
+
function createBaseListDashboardTemplatesRequest(): ListDashboardTemplatesRequest {
|
|
4840
|
+
return { organizationId: "" };
|
|
4818
4841
|
}
|
|
4819
4842
|
|
|
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();
|
|
4843
|
+
export const ListDashboardTemplatesRequest: MessageFns<ListDashboardTemplatesRequest> = {
|
|
4844
|
+
encode(message: ListDashboardTemplatesRequest, writer: BinaryWriter = new BinaryWriter()): BinaryWriter {
|
|
4845
|
+
if (message.organizationId !== "") {
|
|
4846
|
+
writer.uint32(10).string(message.organizationId);
|
|
4836
4847
|
}
|
|
4837
4848
|
return writer;
|
|
4838
4849
|
},
|
|
4839
4850
|
|
|
4840
|
-
decode(input: BinaryReader | Uint8Array, length?: number):
|
|
4851
|
+
decode(input: BinaryReader | Uint8Array, length?: number): ListDashboardTemplatesRequest {
|
|
4841
4852
|
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
|
|
4842
4853
|
const previousRecursionDepth = (reader as any).__tsProtoDecodeDepth ?? 0;
|
|
4843
4854
|
if (previousRecursionDepth >= 100) {
|
|
@@ -4846,7 +4857,7 @@ export const DashboardDataEnvelope: MessageFns<DashboardDataEnvelope> = {
|
|
|
4846
4857
|
(reader as any).__tsProtoDecodeDepth = previousRecursionDepth + 1;
|
|
4847
4858
|
try {
|
|
4848
4859
|
const end = length === undefined ? reader.len : reader.pos + length;
|
|
4849
|
-
const message =
|
|
4860
|
+
const message = createBaseListDashboardTemplatesRequest();
|
|
4850
4861
|
while (reader.pos < end) {
|
|
4851
4862
|
const tag = reader.uint32();
|
|
4852
4863
|
switch (tag >>> 3) {
|
|
@@ -4855,39 +4866,7 @@ export const DashboardDataEnvelope: MessageFns<DashboardDataEnvelope> = {
|
|
|
4855
4866
|
break;
|
|
4856
4867
|
}
|
|
4857
4868
|
|
|
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());
|
|
4869
|
+
message.organizationId = reader.string();
|
|
4891
4870
|
continue;
|
|
4892
4871
|
}
|
|
4893
4872
|
}
|
|
@@ -4902,77 +4881,52 @@ export const DashboardDataEnvelope: MessageFns<DashboardDataEnvelope> = {
|
|
|
4902
4881
|
}
|
|
4903
4882
|
},
|
|
4904
4883
|
|
|
4905
|
-
fromJSON(object: any):
|
|
4884
|
+
fromJSON(object: any): ListDashboardTemplatesRequest {
|
|
4906
4885
|
return {
|
|
4907
|
-
|
|
4908
|
-
? globalThis.String(object.
|
|
4909
|
-
: isSet(object.
|
|
4910
|
-
? globalThis.String(object.
|
|
4886
|
+
organizationId: isSet(object.organizationId)
|
|
4887
|
+
? globalThis.String(object.organizationId)
|
|
4888
|
+
: isSet(object.organization_id)
|
|
4889
|
+
? globalThis.String(object.organization_id)
|
|
4911
4890
|
: "",
|
|
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
4891
|
};
|
|
4921
4892
|
},
|
|
4922
4893
|
|
|
4923
|
-
toJSON(message:
|
|
4894
|
+
toJSON(message: ListDashboardTemplatesRequest): unknown {
|
|
4924
4895
|
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);
|
|
4896
|
+
if (message.organizationId !== "") {
|
|
4897
|
+
obj.organizationId = message.organizationId;
|
|
4939
4898
|
}
|
|
4940
4899
|
return obj;
|
|
4941
4900
|
},
|
|
4942
4901
|
|
|
4943
|
-
create<I extends Exact<DeepPartial<
|
|
4944
|
-
return
|
|
4902
|
+
create<I extends Exact<DeepPartial<ListDashboardTemplatesRequest>, I>>(base?: I): ListDashboardTemplatesRequest {
|
|
4903
|
+
return ListDashboardTemplatesRequest.fromPartial(base ?? ({} as any));
|
|
4945
4904
|
},
|
|
4946
|
-
fromPartial<I extends Exact<DeepPartial<
|
|
4947
|
-
|
|
4948
|
-
|
|
4949
|
-
message
|
|
4950
|
-
message.
|
|
4951
|
-
? QuerySnapshot.fromPartial(object.snapshot)
|
|
4952
|
-
: undefined;
|
|
4953
|
-
message.update = (object.update !== undefined && object.update !== null)
|
|
4954
|
-
? QuerySeriesUpdate.fromPartial(object.update)
|
|
4955
|
-
: undefined;
|
|
4956
|
-
message.error = (object.error !== undefined && object.error !== null)
|
|
4957
|
-
? WidgetQueryError.fromPartial(object.error)
|
|
4958
|
-
: undefined;
|
|
4905
|
+
fromPartial<I extends Exact<DeepPartial<ListDashboardTemplatesRequest>, I>>(
|
|
4906
|
+
object: I,
|
|
4907
|
+
): ListDashboardTemplatesRequest {
|
|
4908
|
+
const message = createBaseListDashboardTemplatesRequest();
|
|
4909
|
+
message.organizationId = object.organizationId ?? "";
|
|
4959
4910
|
return message;
|
|
4960
4911
|
},
|
|
4961
4912
|
};
|
|
4962
4913
|
|
|
4963
|
-
function
|
|
4964
|
-
return {
|
|
4914
|
+
function createBaseListDashboardTemplatesResponse(): ListDashboardTemplatesResponse {
|
|
4915
|
+
return { status: undefined, templates: [] };
|
|
4965
4916
|
}
|
|
4966
4917
|
|
|
4967
|
-
export const
|
|
4968
|
-
encode(message:
|
|
4969
|
-
if (message.
|
|
4970
|
-
writer.uint32(10).
|
|
4918
|
+
export const ListDashboardTemplatesResponse: MessageFns<ListDashboardTemplatesResponse> = {
|
|
4919
|
+
encode(message: ListDashboardTemplatesResponse, writer: BinaryWriter = new BinaryWriter()): BinaryWriter {
|
|
4920
|
+
if (message.status !== undefined) {
|
|
4921
|
+
ResponseStatus.encode(message.status, writer.uint32(10).fork()).join();
|
|
4922
|
+
}
|
|
4923
|
+
for (const v of message.templates) {
|
|
4924
|
+
DashboardTemplate.encode(v!, writer.uint32(18).fork()).join();
|
|
4971
4925
|
}
|
|
4972
4926
|
return writer;
|
|
4973
4927
|
},
|
|
4974
4928
|
|
|
4975
|
-
decode(input: BinaryReader | Uint8Array, length?: number):
|
|
4929
|
+
decode(input: BinaryReader | Uint8Array, length?: number): ListDashboardTemplatesResponse {
|
|
4976
4930
|
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
|
|
4977
4931
|
const previousRecursionDepth = (reader as any).__tsProtoDecodeDepth ?? 0;
|
|
4978
4932
|
if (previousRecursionDepth >= 100) {
|
|
@@ -4981,7 +4935,7 @@ export const WidgetQueryError: MessageFns<WidgetQueryError> = {
|
|
|
4981
4935
|
(reader as any).__tsProtoDecodeDepth = previousRecursionDepth + 1;
|
|
4982
4936
|
try {
|
|
4983
4937
|
const end = length === undefined ? reader.len : reader.pos + length;
|
|
4984
|
-
const message =
|
|
4938
|
+
const message = createBaseListDashboardTemplatesResponse();
|
|
4985
4939
|
while (reader.pos < end) {
|
|
4986
4940
|
const tag = reader.uint32();
|
|
4987
4941
|
switch (tag >>> 3) {
|
|
@@ -4990,10 +4944,669 @@ export const WidgetQueryError: MessageFns<WidgetQueryError> = {
|
|
|
4990
4944
|
break;
|
|
4991
4945
|
}
|
|
4992
4946
|
|
|
4993
|
-
message.
|
|
4947
|
+
message.status = ResponseStatus.decode(reader, reader.uint32());
|
|
4994
4948
|
continue;
|
|
4995
4949
|
}
|
|
4996
|
-
|
|
4950
|
+
case 2: {
|
|
4951
|
+
if (tag !== 18) {
|
|
4952
|
+
break;
|
|
4953
|
+
}
|
|
4954
|
+
|
|
4955
|
+
message.templates.push(DashboardTemplate.decode(reader, reader.uint32()));
|
|
4956
|
+
continue;
|
|
4957
|
+
}
|
|
4958
|
+
}
|
|
4959
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
4960
|
+
break;
|
|
4961
|
+
}
|
|
4962
|
+
reader.skip(tag & 7);
|
|
4963
|
+
}
|
|
4964
|
+
return message;
|
|
4965
|
+
} finally {
|
|
4966
|
+
(reader as any).__tsProtoDecodeDepth = previousRecursionDepth;
|
|
4967
|
+
}
|
|
4968
|
+
},
|
|
4969
|
+
|
|
4970
|
+
fromJSON(object: any): ListDashboardTemplatesResponse {
|
|
4971
|
+
return {
|
|
4972
|
+
status: isSet(object.status) ? ResponseStatus.fromJSON(object.status) : undefined,
|
|
4973
|
+
templates: globalThis.Array.isArray(object?.templates)
|
|
4974
|
+
? object.templates.map((e: any) => DashboardTemplate.fromJSON(e))
|
|
4975
|
+
: [],
|
|
4976
|
+
};
|
|
4977
|
+
},
|
|
4978
|
+
|
|
4979
|
+
toJSON(message: ListDashboardTemplatesResponse): unknown {
|
|
4980
|
+
const obj: any = {};
|
|
4981
|
+
if (message.status !== undefined) {
|
|
4982
|
+
obj.status = ResponseStatus.toJSON(message.status);
|
|
4983
|
+
}
|
|
4984
|
+
if (message.templates?.length) {
|
|
4985
|
+
obj.templates = message.templates.map((e) => DashboardTemplate.toJSON(e));
|
|
4986
|
+
}
|
|
4987
|
+
return obj;
|
|
4988
|
+
},
|
|
4989
|
+
|
|
4990
|
+
create<I extends Exact<DeepPartial<ListDashboardTemplatesResponse>, I>>(base?: I): ListDashboardTemplatesResponse {
|
|
4991
|
+
return ListDashboardTemplatesResponse.fromPartial(base ?? ({} as any));
|
|
4992
|
+
},
|
|
4993
|
+
fromPartial<I extends Exact<DeepPartial<ListDashboardTemplatesResponse>, I>>(
|
|
4994
|
+
object: I,
|
|
4995
|
+
): ListDashboardTemplatesResponse {
|
|
4996
|
+
const message = createBaseListDashboardTemplatesResponse();
|
|
4997
|
+
message.status = (object.status !== undefined && object.status !== null)
|
|
4998
|
+
? ResponseStatus.fromPartial(object.status)
|
|
4999
|
+
: undefined;
|
|
5000
|
+
message.templates = object.templates?.map((e) => DashboardTemplate.fromPartial(e)) || [];
|
|
5001
|
+
return message;
|
|
5002
|
+
},
|
|
5003
|
+
};
|
|
5004
|
+
|
|
5005
|
+
function createBaseCreateDashboardFromTemplateRequest(): CreateDashboardFromTemplateRequest {
|
|
5006
|
+
return {
|
|
5007
|
+
organizationId: "",
|
|
5008
|
+
projectId: "",
|
|
5009
|
+
templateId: "",
|
|
5010
|
+
name: undefined,
|
|
5011
|
+
description: undefined,
|
|
5012
|
+
defaultTimeWindow: 0,
|
|
5013
|
+
};
|
|
5014
|
+
}
|
|
5015
|
+
|
|
5016
|
+
export const CreateDashboardFromTemplateRequest: MessageFns<CreateDashboardFromTemplateRequest> = {
|
|
5017
|
+
encode(message: CreateDashboardFromTemplateRequest, writer: BinaryWriter = new BinaryWriter()): BinaryWriter {
|
|
5018
|
+
if (message.organizationId !== "") {
|
|
5019
|
+
writer.uint32(10).string(message.organizationId);
|
|
5020
|
+
}
|
|
5021
|
+
if (message.projectId !== "") {
|
|
5022
|
+
writer.uint32(18).string(message.projectId);
|
|
5023
|
+
}
|
|
5024
|
+
if (message.templateId !== "") {
|
|
5025
|
+
writer.uint32(26).string(message.templateId);
|
|
5026
|
+
}
|
|
5027
|
+
if (message.name !== undefined) {
|
|
5028
|
+
writer.uint32(34).string(message.name);
|
|
5029
|
+
}
|
|
5030
|
+
if (message.description !== undefined) {
|
|
5031
|
+
writer.uint32(42).string(message.description);
|
|
5032
|
+
}
|
|
5033
|
+
if (message.defaultTimeWindow !== 0) {
|
|
5034
|
+
writer.uint32(48).int32(message.defaultTimeWindow);
|
|
5035
|
+
}
|
|
5036
|
+
return writer;
|
|
5037
|
+
},
|
|
5038
|
+
|
|
5039
|
+
decode(input: BinaryReader | Uint8Array, length?: number): CreateDashboardFromTemplateRequest {
|
|
5040
|
+
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
|
|
5041
|
+
const previousRecursionDepth = (reader as any).__tsProtoDecodeDepth ?? 0;
|
|
5042
|
+
if (previousRecursionDepth >= 100) {
|
|
5043
|
+
throw new globalThis.Error("protobuf decode recursion limit exceeded");
|
|
5044
|
+
}
|
|
5045
|
+
(reader as any).__tsProtoDecodeDepth = previousRecursionDepth + 1;
|
|
5046
|
+
try {
|
|
5047
|
+
const end = length === undefined ? reader.len : reader.pos + length;
|
|
5048
|
+
const message = createBaseCreateDashboardFromTemplateRequest();
|
|
5049
|
+
while (reader.pos < end) {
|
|
5050
|
+
const tag = reader.uint32();
|
|
5051
|
+
switch (tag >>> 3) {
|
|
5052
|
+
case 1: {
|
|
5053
|
+
if (tag !== 10) {
|
|
5054
|
+
break;
|
|
5055
|
+
}
|
|
5056
|
+
|
|
5057
|
+
message.organizationId = reader.string();
|
|
5058
|
+
continue;
|
|
5059
|
+
}
|
|
5060
|
+
case 2: {
|
|
5061
|
+
if (tag !== 18) {
|
|
5062
|
+
break;
|
|
5063
|
+
}
|
|
5064
|
+
|
|
5065
|
+
message.projectId = reader.string();
|
|
5066
|
+
continue;
|
|
5067
|
+
}
|
|
5068
|
+
case 3: {
|
|
5069
|
+
if (tag !== 26) {
|
|
5070
|
+
break;
|
|
5071
|
+
}
|
|
5072
|
+
|
|
5073
|
+
message.templateId = reader.string();
|
|
5074
|
+
continue;
|
|
5075
|
+
}
|
|
5076
|
+
case 4: {
|
|
5077
|
+
if (tag !== 34) {
|
|
5078
|
+
break;
|
|
5079
|
+
}
|
|
5080
|
+
|
|
5081
|
+
message.name = reader.string();
|
|
5082
|
+
continue;
|
|
5083
|
+
}
|
|
5084
|
+
case 5: {
|
|
5085
|
+
if (tag !== 42) {
|
|
5086
|
+
break;
|
|
5087
|
+
}
|
|
5088
|
+
|
|
5089
|
+
message.description = reader.string();
|
|
5090
|
+
continue;
|
|
5091
|
+
}
|
|
5092
|
+
case 6: {
|
|
5093
|
+
if (tag !== 48) {
|
|
5094
|
+
break;
|
|
5095
|
+
}
|
|
5096
|
+
|
|
5097
|
+
message.defaultTimeWindow = reader.int32() as any;
|
|
5098
|
+
continue;
|
|
5099
|
+
}
|
|
5100
|
+
}
|
|
5101
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
5102
|
+
break;
|
|
5103
|
+
}
|
|
5104
|
+
reader.skip(tag & 7);
|
|
5105
|
+
}
|
|
5106
|
+
return message;
|
|
5107
|
+
} finally {
|
|
5108
|
+
(reader as any).__tsProtoDecodeDepth = previousRecursionDepth;
|
|
5109
|
+
}
|
|
5110
|
+
},
|
|
5111
|
+
|
|
5112
|
+
fromJSON(object: any): CreateDashboardFromTemplateRequest {
|
|
5113
|
+
return {
|
|
5114
|
+
organizationId: isSet(object.organizationId)
|
|
5115
|
+
? globalThis.String(object.organizationId)
|
|
5116
|
+
: isSet(object.organization_id)
|
|
5117
|
+
? globalThis.String(object.organization_id)
|
|
5118
|
+
: "",
|
|
5119
|
+
projectId: isSet(object.projectId)
|
|
5120
|
+
? globalThis.String(object.projectId)
|
|
5121
|
+
: isSet(object.project_id)
|
|
5122
|
+
? globalThis.String(object.project_id)
|
|
5123
|
+
: "",
|
|
5124
|
+
templateId: isSet(object.templateId)
|
|
5125
|
+
? globalThis.String(object.templateId)
|
|
5126
|
+
: isSet(object.template_id)
|
|
5127
|
+
? globalThis.String(object.template_id)
|
|
5128
|
+
: "",
|
|
5129
|
+
name: isSet(object.name) ? globalThis.String(object.name) : undefined,
|
|
5130
|
+
description: isSet(object.description) ? globalThis.String(object.description) : undefined,
|
|
5131
|
+
defaultTimeWindow: isSet(object.defaultTimeWindow)
|
|
5132
|
+
? analyticsTimeWindowFromJSON(object.defaultTimeWindow)
|
|
5133
|
+
: isSet(object.default_time_window)
|
|
5134
|
+
? analyticsTimeWindowFromJSON(object.default_time_window)
|
|
5135
|
+
: 0,
|
|
5136
|
+
};
|
|
5137
|
+
},
|
|
5138
|
+
|
|
5139
|
+
toJSON(message: CreateDashboardFromTemplateRequest): unknown {
|
|
5140
|
+
const obj: any = {};
|
|
5141
|
+
if (message.organizationId !== "") {
|
|
5142
|
+
obj.organizationId = message.organizationId;
|
|
5143
|
+
}
|
|
5144
|
+
if (message.projectId !== "") {
|
|
5145
|
+
obj.projectId = message.projectId;
|
|
5146
|
+
}
|
|
5147
|
+
if (message.templateId !== "") {
|
|
5148
|
+
obj.templateId = message.templateId;
|
|
5149
|
+
}
|
|
5150
|
+
if (message.name !== undefined) {
|
|
5151
|
+
obj.name = message.name;
|
|
5152
|
+
}
|
|
5153
|
+
if (message.description !== undefined) {
|
|
5154
|
+
obj.description = message.description;
|
|
5155
|
+
}
|
|
5156
|
+
if (message.defaultTimeWindow !== 0) {
|
|
5157
|
+
obj.defaultTimeWindow = analyticsTimeWindowToJSON(message.defaultTimeWindow);
|
|
5158
|
+
}
|
|
5159
|
+
return obj;
|
|
5160
|
+
},
|
|
5161
|
+
|
|
5162
|
+
create<I extends Exact<DeepPartial<CreateDashboardFromTemplateRequest>, I>>(
|
|
5163
|
+
base?: I,
|
|
5164
|
+
): CreateDashboardFromTemplateRequest {
|
|
5165
|
+
return CreateDashboardFromTemplateRequest.fromPartial(base ?? ({} as any));
|
|
5166
|
+
},
|
|
5167
|
+
fromPartial<I extends Exact<DeepPartial<CreateDashboardFromTemplateRequest>, I>>(
|
|
5168
|
+
object: I,
|
|
5169
|
+
): CreateDashboardFromTemplateRequest {
|
|
5170
|
+
const message = createBaseCreateDashboardFromTemplateRequest();
|
|
5171
|
+
message.organizationId = object.organizationId ?? "";
|
|
5172
|
+
message.projectId = object.projectId ?? "";
|
|
5173
|
+
message.templateId = object.templateId ?? "";
|
|
5174
|
+
message.name = object.name ?? undefined;
|
|
5175
|
+
message.description = object.description ?? undefined;
|
|
5176
|
+
message.defaultTimeWindow = object.defaultTimeWindow ?? 0;
|
|
5177
|
+
return message;
|
|
5178
|
+
},
|
|
5179
|
+
};
|
|
5180
|
+
|
|
5181
|
+
function createBaseCreateDashboardFromTemplateResponse(): CreateDashboardFromTemplateResponse {
|
|
5182
|
+
return { status: undefined, dashboard: undefined };
|
|
5183
|
+
}
|
|
5184
|
+
|
|
5185
|
+
export const CreateDashboardFromTemplateResponse: MessageFns<CreateDashboardFromTemplateResponse> = {
|
|
5186
|
+
encode(message: CreateDashboardFromTemplateResponse, writer: BinaryWriter = new BinaryWriter()): BinaryWriter {
|
|
5187
|
+
if (message.status !== undefined) {
|
|
5188
|
+
ResponseStatus.encode(message.status, writer.uint32(10).fork()).join();
|
|
5189
|
+
}
|
|
5190
|
+
if (message.dashboard !== undefined) {
|
|
5191
|
+
Dashboard.encode(message.dashboard, writer.uint32(18).fork()).join();
|
|
5192
|
+
}
|
|
5193
|
+
return writer;
|
|
5194
|
+
},
|
|
5195
|
+
|
|
5196
|
+
decode(input: BinaryReader | Uint8Array, length?: number): CreateDashboardFromTemplateResponse {
|
|
5197
|
+
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
|
|
5198
|
+
const previousRecursionDepth = (reader as any).__tsProtoDecodeDepth ?? 0;
|
|
5199
|
+
if (previousRecursionDepth >= 100) {
|
|
5200
|
+
throw new globalThis.Error("protobuf decode recursion limit exceeded");
|
|
5201
|
+
}
|
|
5202
|
+
(reader as any).__tsProtoDecodeDepth = previousRecursionDepth + 1;
|
|
5203
|
+
try {
|
|
5204
|
+
const end = length === undefined ? reader.len : reader.pos + length;
|
|
5205
|
+
const message = createBaseCreateDashboardFromTemplateResponse();
|
|
5206
|
+
while (reader.pos < end) {
|
|
5207
|
+
const tag = reader.uint32();
|
|
5208
|
+
switch (tag >>> 3) {
|
|
5209
|
+
case 1: {
|
|
5210
|
+
if (tag !== 10) {
|
|
5211
|
+
break;
|
|
5212
|
+
}
|
|
5213
|
+
|
|
5214
|
+
message.status = ResponseStatus.decode(reader, reader.uint32());
|
|
5215
|
+
continue;
|
|
5216
|
+
}
|
|
5217
|
+
case 2: {
|
|
5218
|
+
if (tag !== 18) {
|
|
5219
|
+
break;
|
|
5220
|
+
}
|
|
5221
|
+
|
|
5222
|
+
message.dashboard = Dashboard.decode(reader, reader.uint32());
|
|
5223
|
+
continue;
|
|
5224
|
+
}
|
|
5225
|
+
}
|
|
5226
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
5227
|
+
break;
|
|
5228
|
+
}
|
|
5229
|
+
reader.skip(tag & 7);
|
|
5230
|
+
}
|
|
5231
|
+
return message;
|
|
5232
|
+
} finally {
|
|
5233
|
+
(reader as any).__tsProtoDecodeDepth = previousRecursionDepth;
|
|
5234
|
+
}
|
|
5235
|
+
},
|
|
5236
|
+
|
|
5237
|
+
fromJSON(object: any): CreateDashboardFromTemplateResponse {
|
|
5238
|
+
return {
|
|
5239
|
+
status: isSet(object.status) ? ResponseStatus.fromJSON(object.status) : undefined,
|
|
5240
|
+
dashboard: isSet(object.dashboard) ? Dashboard.fromJSON(object.dashboard) : undefined,
|
|
5241
|
+
};
|
|
5242
|
+
},
|
|
5243
|
+
|
|
5244
|
+
toJSON(message: CreateDashboardFromTemplateResponse): unknown {
|
|
5245
|
+
const obj: any = {};
|
|
5246
|
+
if (message.status !== undefined) {
|
|
5247
|
+
obj.status = ResponseStatus.toJSON(message.status);
|
|
5248
|
+
}
|
|
5249
|
+
if (message.dashboard !== undefined) {
|
|
5250
|
+
obj.dashboard = Dashboard.toJSON(message.dashboard);
|
|
5251
|
+
}
|
|
5252
|
+
return obj;
|
|
5253
|
+
},
|
|
5254
|
+
|
|
5255
|
+
create<I extends Exact<DeepPartial<CreateDashboardFromTemplateResponse>, I>>(
|
|
5256
|
+
base?: I,
|
|
5257
|
+
): CreateDashboardFromTemplateResponse {
|
|
5258
|
+
return CreateDashboardFromTemplateResponse.fromPartial(base ?? ({} as any));
|
|
5259
|
+
},
|
|
5260
|
+
fromPartial<I extends Exact<DeepPartial<CreateDashboardFromTemplateResponse>, I>>(
|
|
5261
|
+
object: I,
|
|
5262
|
+
): CreateDashboardFromTemplateResponse {
|
|
5263
|
+
const message = createBaseCreateDashboardFromTemplateResponse();
|
|
5264
|
+
message.status = (object.status !== undefined && object.status !== null)
|
|
5265
|
+
? ResponseStatus.fromPartial(object.status)
|
|
5266
|
+
: undefined;
|
|
5267
|
+
message.dashboard = (object.dashboard !== undefined && object.dashboard !== null)
|
|
5268
|
+
? Dashboard.fromPartial(object.dashboard)
|
|
5269
|
+
: undefined;
|
|
5270
|
+
return message;
|
|
5271
|
+
},
|
|
5272
|
+
};
|
|
5273
|
+
|
|
5274
|
+
function createBaseStreamDashboardDataRequest(): StreamDashboardDataRequest {
|
|
5275
|
+
return { organizationId: "", projectId: "", dashboardId: "", widgetIds: [], timeRange: undefined };
|
|
5276
|
+
}
|
|
5277
|
+
|
|
5278
|
+
export const StreamDashboardDataRequest: MessageFns<StreamDashboardDataRequest> = {
|
|
5279
|
+
encode(message: StreamDashboardDataRequest, writer: BinaryWriter = new BinaryWriter()): BinaryWriter {
|
|
5280
|
+
if (message.organizationId !== "") {
|
|
5281
|
+
writer.uint32(10).string(message.organizationId);
|
|
5282
|
+
}
|
|
5283
|
+
if (message.projectId !== "") {
|
|
5284
|
+
writer.uint32(18).string(message.projectId);
|
|
5285
|
+
}
|
|
5286
|
+
if (message.dashboardId !== "") {
|
|
5287
|
+
writer.uint32(26).string(message.dashboardId);
|
|
5288
|
+
}
|
|
5289
|
+
for (const v of message.widgetIds) {
|
|
5290
|
+
writer.uint32(34).string(v!);
|
|
5291
|
+
}
|
|
5292
|
+
if (message.timeRange !== undefined) {
|
|
5293
|
+
TimeRange.encode(message.timeRange, writer.uint32(42).fork()).join();
|
|
5294
|
+
}
|
|
5295
|
+
return writer;
|
|
5296
|
+
},
|
|
5297
|
+
|
|
5298
|
+
decode(input: BinaryReader | Uint8Array, length?: number): StreamDashboardDataRequest {
|
|
5299
|
+
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
|
|
5300
|
+
const previousRecursionDepth = (reader as any).__tsProtoDecodeDepth ?? 0;
|
|
5301
|
+
if (previousRecursionDepth >= 100) {
|
|
5302
|
+
throw new globalThis.Error("protobuf decode recursion limit exceeded");
|
|
5303
|
+
}
|
|
5304
|
+
(reader as any).__tsProtoDecodeDepth = previousRecursionDepth + 1;
|
|
5305
|
+
try {
|
|
5306
|
+
const end = length === undefined ? reader.len : reader.pos + length;
|
|
5307
|
+
const message = createBaseStreamDashboardDataRequest();
|
|
5308
|
+
while (reader.pos < end) {
|
|
5309
|
+
const tag = reader.uint32();
|
|
5310
|
+
switch (tag >>> 3) {
|
|
5311
|
+
case 1: {
|
|
5312
|
+
if (tag !== 10) {
|
|
5313
|
+
break;
|
|
5314
|
+
}
|
|
5315
|
+
|
|
5316
|
+
message.organizationId = reader.string();
|
|
5317
|
+
continue;
|
|
5318
|
+
}
|
|
5319
|
+
case 2: {
|
|
5320
|
+
if (tag !== 18) {
|
|
5321
|
+
break;
|
|
5322
|
+
}
|
|
5323
|
+
|
|
5324
|
+
message.projectId = reader.string();
|
|
5325
|
+
continue;
|
|
5326
|
+
}
|
|
5327
|
+
case 3: {
|
|
5328
|
+
if (tag !== 26) {
|
|
5329
|
+
break;
|
|
5330
|
+
}
|
|
5331
|
+
|
|
5332
|
+
message.dashboardId = reader.string();
|
|
5333
|
+
continue;
|
|
5334
|
+
}
|
|
5335
|
+
case 4: {
|
|
5336
|
+
if (tag !== 34) {
|
|
5337
|
+
break;
|
|
5338
|
+
}
|
|
5339
|
+
|
|
5340
|
+
message.widgetIds.push(reader.string());
|
|
5341
|
+
continue;
|
|
5342
|
+
}
|
|
5343
|
+
case 5: {
|
|
5344
|
+
if (tag !== 42) {
|
|
5345
|
+
break;
|
|
5346
|
+
}
|
|
5347
|
+
|
|
5348
|
+
message.timeRange = TimeRange.decode(reader, reader.uint32());
|
|
5349
|
+
continue;
|
|
5350
|
+
}
|
|
5351
|
+
}
|
|
5352
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
5353
|
+
break;
|
|
5354
|
+
}
|
|
5355
|
+
reader.skip(tag & 7);
|
|
5356
|
+
}
|
|
5357
|
+
return message;
|
|
5358
|
+
} finally {
|
|
5359
|
+
(reader as any).__tsProtoDecodeDepth = previousRecursionDepth;
|
|
5360
|
+
}
|
|
5361
|
+
},
|
|
5362
|
+
|
|
5363
|
+
fromJSON(object: any): StreamDashboardDataRequest {
|
|
5364
|
+
return {
|
|
5365
|
+
organizationId: isSet(object.organizationId)
|
|
5366
|
+
? globalThis.String(object.organizationId)
|
|
5367
|
+
: isSet(object.organization_id)
|
|
5368
|
+
? globalThis.String(object.organization_id)
|
|
5369
|
+
: "",
|
|
5370
|
+
projectId: isSet(object.projectId)
|
|
5371
|
+
? globalThis.String(object.projectId)
|
|
5372
|
+
: isSet(object.project_id)
|
|
5373
|
+
? globalThis.String(object.project_id)
|
|
5374
|
+
: "",
|
|
5375
|
+
dashboardId: isSet(object.dashboardId)
|
|
5376
|
+
? globalThis.String(object.dashboardId)
|
|
5377
|
+
: isSet(object.dashboard_id)
|
|
5378
|
+
? globalThis.String(object.dashboard_id)
|
|
5379
|
+
: "",
|
|
5380
|
+
widgetIds: globalThis.Array.isArray(object?.widgetIds)
|
|
5381
|
+
? object.widgetIds.map((e: any) => globalThis.String(e))
|
|
5382
|
+
: globalThis.Array.isArray(object?.widget_ids)
|
|
5383
|
+
? object.widget_ids.map((e: any) => globalThis.String(e))
|
|
5384
|
+
: [],
|
|
5385
|
+
timeRange: isSet(object.timeRange)
|
|
5386
|
+
? TimeRange.fromJSON(object.timeRange)
|
|
5387
|
+
: isSet(object.time_range)
|
|
5388
|
+
? TimeRange.fromJSON(object.time_range)
|
|
5389
|
+
: undefined,
|
|
5390
|
+
};
|
|
5391
|
+
},
|
|
5392
|
+
|
|
5393
|
+
toJSON(message: StreamDashboardDataRequest): unknown {
|
|
5394
|
+
const obj: any = {};
|
|
5395
|
+
if (message.organizationId !== "") {
|
|
5396
|
+
obj.organizationId = message.organizationId;
|
|
5397
|
+
}
|
|
5398
|
+
if (message.projectId !== "") {
|
|
5399
|
+
obj.projectId = message.projectId;
|
|
5400
|
+
}
|
|
5401
|
+
if (message.dashboardId !== "") {
|
|
5402
|
+
obj.dashboardId = message.dashboardId;
|
|
5403
|
+
}
|
|
5404
|
+
if (message.widgetIds?.length) {
|
|
5405
|
+
obj.widgetIds = message.widgetIds;
|
|
5406
|
+
}
|
|
5407
|
+
if (message.timeRange !== undefined) {
|
|
5408
|
+
obj.timeRange = TimeRange.toJSON(message.timeRange);
|
|
5409
|
+
}
|
|
5410
|
+
return obj;
|
|
5411
|
+
},
|
|
5412
|
+
|
|
5413
|
+
create<I extends Exact<DeepPartial<StreamDashboardDataRequest>, I>>(base?: I): StreamDashboardDataRequest {
|
|
5414
|
+
return StreamDashboardDataRequest.fromPartial(base ?? ({} as any));
|
|
5415
|
+
},
|
|
5416
|
+
fromPartial<I extends Exact<DeepPartial<StreamDashboardDataRequest>, I>>(object: I): StreamDashboardDataRequest {
|
|
5417
|
+
const message = createBaseStreamDashboardDataRequest();
|
|
5418
|
+
message.organizationId = object.organizationId ?? "";
|
|
5419
|
+
message.projectId = object.projectId ?? "";
|
|
5420
|
+
message.dashboardId = object.dashboardId ?? "";
|
|
5421
|
+
message.widgetIds = object.widgetIds?.map((e) => e) || [];
|
|
5422
|
+
message.timeRange = (object.timeRange !== undefined && object.timeRange !== null)
|
|
5423
|
+
? TimeRange.fromPartial(object.timeRange)
|
|
5424
|
+
: undefined;
|
|
5425
|
+
return message;
|
|
5426
|
+
},
|
|
5427
|
+
};
|
|
5428
|
+
|
|
5429
|
+
function createBaseDashboardDataEnvelope(): DashboardDataEnvelope {
|
|
5430
|
+
return { widgetId: "", queryIndex: 0, snapshot: undefined, update: undefined, error: undefined };
|
|
5431
|
+
}
|
|
5432
|
+
|
|
5433
|
+
export const DashboardDataEnvelope: MessageFns<DashboardDataEnvelope> = {
|
|
5434
|
+
encode(message: DashboardDataEnvelope, writer: BinaryWriter = new BinaryWriter()): BinaryWriter {
|
|
5435
|
+
if (message.widgetId !== "") {
|
|
5436
|
+
writer.uint32(10).string(message.widgetId);
|
|
5437
|
+
}
|
|
5438
|
+
if (message.queryIndex !== 0) {
|
|
5439
|
+
writer.uint32(16).int32(message.queryIndex);
|
|
5440
|
+
}
|
|
5441
|
+
if (message.snapshot !== undefined) {
|
|
5442
|
+
QuerySnapshot.encode(message.snapshot, writer.uint32(26).fork()).join();
|
|
5443
|
+
}
|
|
5444
|
+
if (message.update !== undefined) {
|
|
5445
|
+
QuerySeriesUpdate.encode(message.update, writer.uint32(34).fork()).join();
|
|
5446
|
+
}
|
|
5447
|
+
if (message.error !== undefined) {
|
|
5448
|
+
WidgetQueryError.encode(message.error, writer.uint32(42).fork()).join();
|
|
5449
|
+
}
|
|
5450
|
+
return writer;
|
|
5451
|
+
},
|
|
5452
|
+
|
|
5453
|
+
decode(input: BinaryReader | Uint8Array, length?: number): DashboardDataEnvelope {
|
|
5454
|
+
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
|
|
5455
|
+
const previousRecursionDepth = (reader as any).__tsProtoDecodeDepth ?? 0;
|
|
5456
|
+
if (previousRecursionDepth >= 100) {
|
|
5457
|
+
throw new globalThis.Error("protobuf decode recursion limit exceeded");
|
|
5458
|
+
}
|
|
5459
|
+
(reader as any).__tsProtoDecodeDepth = previousRecursionDepth + 1;
|
|
5460
|
+
try {
|
|
5461
|
+
const end = length === undefined ? reader.len : reader.pos + length;
|
|
5462
|
+
const message = createBaseDashboardDataEnvelope();
|
|
5463
|
+
while (reader.pos < end) {
|
|
5464
|
+
const tag = reader.uint32();
|
|
5465
|
+
switch (tag >>> 3) {
|
|
5466
|
+
case 1: {
|
|
5467
|
+
if (tag !== 10) {
|
|
5468
|
+
break;
|
|
5469
|
+
}
|
|
5470
|
+
|
|
5471
|
+
message.widgetId = reader.string();
|
|
5472
|
+
continue;
|
|
5473
|
+
}
|
|
5474
|
+
case 2: {
|
|
5475
|
+
if (tag !== 16) {
|
|
5476
|
+
break;
|
|
5477
|
+
}
|
|
5478
|
+
|
|
5479
|
+
message.queryIndex = reader.int32();
|
|
5480
|
+
continue;
|
|
5481
|
+
}
|
|
5482
|
+
case 3: {
|
|
5483
|
+
if (tag !== 26) {
|
|
5484
|
+
break;
|
|
5485
|
+
}
|
|
5486
|
+
|
|
5487
|
+
message.snapshot = QuerySnapshot.decode(reader, reader.uint32());
|
|
5488
|
+
continue;
|
|
5489
|
+
}
|
|
5490
|
+
case 4: {
|
|
5491
|
+
if (tag !== 34) {
|
|
5492
|
+
break;
|
|
5493
|
+
}
|
|
5494
|
+
|
|
5495
|
+
message.update = QuerySeriesUpdate.decode(reader, reader.uint32());
|
|
5496
|
+
continue;
|
|
5497
|
+
}
|
|
5498
|
+
case 5: {
|
|
5499
|
+
if (tag !== 42) {
|
|
5500
|
+
break;
|
|
5501
|
+
}
|
|
5502
|
+
|
|
5503
|
+
message.error = WidgetQueryError.decode(reader, reader.uint32());
|
|
5504
|
+
continue;
|
|
5505
|
+
}
|
|
5506
|
+
}
|
|
5507
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
5508
|
+
break;
|
|
5509
|
+
}
|
|
5510
|
+
reader.skip(tag & 7);
|
|
5511
|
+
}
|
|
5512
|
+
return message;
|
|
5513
|
+
} finally {
|
|
5514
|
+
(reader as any).__tsProtoDecodeDepth = previousRecursionDepth;
|
|
5515
|
+
}
|
|
5516
|
+
},
|
|
5517
|
+
|
|
5518
|
+
fromJSON(object: any): DashboardDataEnvelope {
|
|
5519
|
+
return {
|
|
5520
|
+
widgetId: isSet(object.widgetId)
|
|
5521
|
+
? globalThis.String(object.widgetId)
|
|
5522
|
+
: isSet(object.widget_id)
|
|
5523
|
+
? globalThis.String(object.widget_id)
|
|
5524
|
+
: "",
|
|
5525
|
+
queryIndex: isSet(object.queryIndex)
|
|
5526
|
+
? globalThis.Number(object.queryIndex)
|
|
5527
|
+
: isSet(object.query_index)
|
|
5528
|
+
? globalThis.Number(object.query_index)
|
|
5529
|
+
: 0,
|
|
5530
|
+
snapshot: isSet(object.snapshot) ? QuerySnapshot.fromJSON(object.snapshot) : undefined,
|
|
5531
|
+
update: isSet(object.update) ? QuerySeriesUpdate.fromJSON(object.update) : undefined,
|
|
5532
|
+
error: isSet(object.error) ? WidgetQueryError.fromJSON(object.error) : undefined,
|
|
5533
|
+
};
|
|
5534
|
+
},
|
|
5535
|
+
|
|
5536
|
+
toJSON(message: DashboardDataEnvelope): unknown {
|
|
5537
|
+
const obj: any = {};
|
|
5538
|
+
if (message.widgetId !== "") {
|
|
5539
|
+
obj.widgetId = message.widgetId;
|
|
5540
|
+
}
|
|
5541
|
+
if (message.queryIndex !== 0) {
|
|
5542
|
+
obj.queryIndex = Math.round(message.queryIndex);
|
|
5543
|
+
}
|
|
5544
|
+
if (message.snapshot !== undefined) {
|
|
5545
|
+
obj.snapshot = QuerySnapshot.toJSON(message.snapshot);
|
|
5546
|
+
}
|
|
5547
|
+
if (message.update !== undefined) {
|
|
5548
|
+
obj.update = QuerySeriesUpdate.toJSON(message.update);
|
|
5549
|
+
}
|
|
5550
|
+
if (message.error !== undefined) {
|
|
5551
|
+
obj.error = WidgetQueryError.toJSON(message.error);
|
|
5552
|
+
}
|
|
5553
|
+
return obj;
|
|
5554
|
+
},
|
|
5555
|
+
|
|
5556
|
+
create<I extends Exact<DeepPartial<DashboardDataEnvelope>, I>>(base?: I): DashboardDataEnvelope {
|
|
5557
|
+
return DashboardDataEnvelope.fromPartial(base ?? ({} as any));
|
|
5558
|
+
},
|
|
5559
|
+
fromPartial<I extends Exact<DeepPartial<DashboardDataEnvelope>, I>>(object: I): DashboardDataEnvelope {
|
|
5560
|
+
const message = createBaseDashboardDataEnvelope();
|
|
5561
|
+
message.widgetId = object.widgetId ?? "";
|
|
5562
|
+
message.queryIndex = object.queryIndex ?? 0;
|
|
5563
|
+
message.snapshot = (object.snapshot !== undefined && object.snapshot !== null)
|
|
5564
|
+
? QuerySnapshot.fromPartial(object.snapshot)
|
|
5565
|
+
: undefined;
|
|
5566
|
+
message.update = (object.update !== undefined && object.update !== null)
|
|
5567
|
+
? QuerySeriesUpdate.fromPartial(object.update)
|
|
5568
|
+
: undefined;
|
|
5569
|
+
message.error = (object.error !== undefined && object.error !== null)
|
|
5570
|
+
? WidgetQueryError.fromPartial(object.error)
|
|
5571
|
+
: undefined;
|
|
5572
|
+
return message;
|
|
5573
|
+
},
|
|
5574
|
+
};
|
|
5575
|
+
|
|
5576
|
+
function createBaseWidgetQueryError(): WidgetQueryError {
|
|
5577
|
+
return { message: "" };
|
|
5578
|
+
}
|
|
5579
|
+
|
|
5580
|
+
export const WidgetQueryError: MessageFns<WidgetQueryError> = {
|
|
5581
|
+
encode(message: WidgetQueryError, writer: BinaryWriter = new BinaryWriter()): BinaryWriter {
|
|
5582
|
+
if (message.message !== "") {
|
|
5583
|
+
writer.uint32(10).string(message.message);
|
|
5584
|
+
}
|
|
5585
|
+
return writer;
|
|
5586
|
+
},
|
|
5587
|
+
|
|
5588
|
+
decode(input: BinaryReader | Uint8Array, length?: number): WidgetQueryError {
|
|
5589
|
+
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
|
|
5590
|
+
const previousRecursionDepth = (reader as any).__tsProtoDecodeDepth ?? 0;
|
|
5591
|
+
if (previousRecursionDepth >= 100) {
|
|
5592
|
+
throw new globalThis.Error("protobuf decode recursion limit exceeded");
|
|
5593
|
+
}
|
|
5594
|
+
(reader as any).__tsProtoDecodeDepth = previousRecursionDepth + 1;
|
|
5595
|
+
try {
|
|
5596
|
+
const end = length === undefined ? reader.len : reader.pos + length;
|
|
5597
|
+
const message = createBaseWidgetQueryError();
|
|
5598
|
+
while (reader.pos < end) {
|
|
5599
|
+
const tag = reader.uint32();
|
|
5600
|
+
switch (tag >>> 3) {
|
|
5601
|
+
case 1: {
|
|
5602
|
+
if (tag !== 10) {
|
|
5603
|
+
break;
|
|
5604
|
+
}
|
|
5605
|
+
|
|
5606
|
+
message.message = reader.string();
|
|
5607
|
+
continue;
|
|
5608
|
+
}
|
|
5609
|
+
}
|
|
4997
5610
|
if ((tag & 7) === 4 || tag === 0) {
|
|
4998
5611
|
break;
|
|
4999
5612
|
}
|
|
@@ -5594,6 +6207,22 @@ export interface MetricGatewayService {
|
|
|
5594
6207
|
ListDashboards(request: ListDashboardsRequest, metadata?: Metadata): Promise<ListDashboardsResponse>;
|
|
5595
6208
|
UpdateDashboard(request: UpdateDashboardRequest, metadata?: Metadata): Promise<UpdateDashboardResponse>;
|
|
5596
6209
|
DeleteDashboard(request: DeleteDashboardRequest, metadata?: Metadata): Promise<DeleteDashboardResponse>;
|
|
6210
|
+
/**
|
|
6211
|
+
* Starter dashboards for this gateway's product, with full widgets for
|
|
6212
|
+
* previews. A product with none lists empty.
|
|
6213
|
+
*/
|
|
6214
|
+
ListDashboardTemplates(
|
|
6215
|
+
request: ListDashboardTemplatesRequest,
|
|
6216
|
+
metadata?: Metadata,
|
|
6217
|
+
): Promise<ListDashboardTemplatesResponse>;
|
|
6218
|
+
/**
|
|
6219
|
+
* Creates a plain copy of a template in the project; an unknown id (or one
|
|
6220
|
+
* of another product) reports STATUS_CODE_NOT_FOUND.
|
|
6221
|
+
*/
|
|
6222
|
+
CreateDashboardFromTemplate(
|
|
6223
|
+
request: CreateDashboardFromTemplateRequest,
|
|
6224
|
+
metadata?: Metadata,
|
|
6225
|
+
): Promise<CreateDashboardFromTemplateResponse>;
|
|
5597
6226
|
/**
|
|
5598
6227
|
* One stream per dashboard view: every widget query runs server-side and
|
|
5599
6228
|
* all results multiplex onto this stream tagged with widget_id. Per-widget
|
|
@@ -5632,6 +6261,8 @@ export class MetricGatewayServiceClientImpl implements MetricGatewayService {
|
|
|
5632
6261
|
this.ListDashboards = this.ListDashboards.bind(this);
|
|
5633
6262
|
this.UpdateDashboard = this.UpdateDashboard.bind(this);
|
|
5634
6263
|
this.DeleteDashboard = this.DeleteDashboard.bind(this);
|
|
6264
|
+
this.ListDashboardTemplates = this.ListDashboardTemplates.bind(this);
|
|
6265
|
+
this.CreateDashboardFromTemplate = this.CreateDashboardFromTemplate.bind(this);
|
|
5635
6266
|
this.StreamDashboardData = this.StreamDashboardData.bind(this);
|
|
5636
6267
|
this.StreamDashboardPreviews = this.StreamDashboardPreviews.bind(this);
|
|
5637
6268
|
}
|
|
@@ -5692,6 +6323,24 @@ export class MetricGatewayServiceClientImpl implements MetricGatewayService {
|
|
|
5692
6323
|
return promise.then((data) => DeleteDashboardResponse.decode(new BinaryReader(data)));
|
|
5693
6324
|
}
|
|
5694
6325
|
|
|
6326
|
+
ListDashboardTemplates(
|
|
6327
|
+
request: ListDashboardTemplatesRequest,
|
|
6328
|
+
metadata?: Metadata,
|
|
6329
|
+
): Promise<ListDashboardTemplatesResponse> {
|
|
6330
|
+
const data = ListDashboardTemplatesRequest.encode(request).finish();
|
|
6331
|
+
const promise = this.rpc.request(this.service, "ListDashboardTemplates", data, metadata);
|
|
6332
|
+
return promise.then((data) => ListDashboardTemplatesResponse.decode(new BinaryReader(data)));
|
|
6333
|
+
}
|
|
6334
|
+
|
|
6335
|
+
CreateDashboardFromTemplate(
|
|
6336
|
+
request: CreateDashboardFromTemplateRequest,
|
|
6337
|
+
metadata?: Metadata,
|
|
6338
|
+
): Promise<CreateDashboardFromTemplateResponse> {
|
|
6339
|
+
const data = CreateDashboardFromTemplateRequest.encode(request).finish();
|
|
6340
|
+
const promise = this.rpc.request(this.service, "CreateDashboardFromTemplate", data, metadata);
|
|
6341
|
+
return promise.then((data) => CreateDashboardFromTemplateResponse.decode(new BinaryReader(data)));
|
|
6342
|
+
}
|
|
6343
|
+
|
|
5695
6344
|
StreamDashboardData(request: StreamDashboardDataRequest, metadata?: Metadata): Observable<DashboardDataEnvelope> {
|
|
5696
6345
|
const data = StreamDashboardDataRequest.encode(request).finish();
|
|
5697
6346
|
const result = this.rpc.serverStreamingRequest(this.service, "StreamDashboardData", data, metadata);
|