@miradorlabs/web-grpc 2.2.0 → 2.3.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.
@@ -4,8 +4,108 @@
4
4
  var grpc = require('@grpc/grpc-js');
5
5
  var proto_gateway_web_v1_metric_gateway_pb = require('../../../../proto/gateway/web/v1/metric_gateway_pb.js');
6
6
  var google_protobuf_timestamp_pb = require('google-protobuf/google/protobuf/timestamp_pb.js');
7
+ var proto_gateway_common_v1_status_pb = require('../../../../proto/gateway/common/v1/status_pb.js');
7
8
  var proto_gateway_web_v1_trace_gateway_pb = require('../../../../proto/gateway/web/v1/trace_gateway_pb.js');
8
9
 
10
+ function serialize_gateway_web_v1_CreateDashboardRequest(arg) {
11
+ if (!(arg instanceof proto_gateway_web_v1_metric_gateway_pb.CreateDashboardRequest)) {
12
+ throw new Error('Expected argument of type gateway.web.v1.CreateDashboardRequest');
13
+ }
14
+ return Buffer.from(arg.serializeBinary());
15
+ }
16
+
17
+ function deserialize_gateway_web_v1_CreateDashboardRequest(buffer_arg) {
18
+ return proto_gateway_web_v1_metric_gateway_pb.CreateDashboardRequest.deserializeBinary(new Uint8Array(buffer_arg));
19
+ }
20
+
21
+ function serialize_gateway_web_v1_CreateDashboardResponse(arg) {
22
+ if (!(arg instanceof proto_gateway_web_v1_metric_gateway_pb.CreateDashboardResponse)) {
23
+ throw new Error('Expected argument of type gateway.web.v1.CreateDashboardResponse');
24
+ }
25
+ return Buffer.from(arg.serializeBinary());
26
+ }
27
+
28
+ function deserialize_gateway_web_v1_CreateDashboardResponse(buffer_arg) {
29
+ return proto_gateway_web_v1_metric_gateway_pb.CreateDashboardResponse.deserializeBinary(new Uint8Array(buffer_arg));
30
+ }
31
+
32
+ function serialize_gateway_web_v1_DashboardDataEnvelope(arg) {
33
+ if (!(arg instanceof proto_gateway_web_v1_metric_gateway_pb.DashboardDataEnvelope)) {
34
+ throw new Error('Expected argument of type gateway.web.v1.DashboardDataEnvelope');
35
+ }
36
+ return Buffer.from(arg.serializeBinary());
37
+ }
38
+
39
+ function deserialize_gateway_web_v1_DashboardDataEnvelope(buffer_arg) {
40
+ return proto_gateway_web_v1_metric_gateway_pb.DashboardDataEnvelope.deserializeBinary(new Uint8Array(buffer_arg));
41
+ }
42
+
43
+ function serialize_gateway_web_v1_DeleteDashboardRequest(arg) {
44
+ if (!(arg instanceof proto_gateway_web_v1_metric_gateway_pb.DeleteDashboardRequest)) {
45
+ throw new Error('Expected argument of type gateway.web.v1.DeleteDashboardRequest');
46
+ }
47
+ return Buffer.from(arg.serializeBinary());
48
+ }
49
+
50
+ function deserialize_gateway_web_v1_DeleteDashboardRequest(buffer_arg) {
51
+ return proto_gateway_web_v1_metric_gateway_pb.DeleteDashboardRequest.deserializeBinary(new Uint8Array(buffer_arg));
52
+ }
53
+
54
+ function serialize_gateway_web_v1_DeleteDashboardResponse(arg) {
55
+ if (!(arg instanceof proto_gateway_web_v1_metric_gateway_pb.DeleteDashboardResponse)) {
56
+ throw new Error('Expected argument of type gateway.web.v1.DeleteDashboardResponse');
57
+ }
58
+ return Buffer.from(arg.serializeBinary());
59
+ }
60
+
61
+ function deserialize_gateway_web_v1_DeleteDashboardResponse(buffer_arg) {
62
+ return proto_gateway_web_v1_metric_gateway_pb.DeleteDashboardResponse.deserializeBinary(new Uint8Array(buffer_arg));
63
+ }
64
+
65
+ function serialize_gateway_web_v1_GetDashboardRequest(arg) {
66
+ if (!(arg instanceof proto_gateway_web_v1_metric_gateway_pb.GetDashboardRequest)) {
67
+ throw new Error('Expected argument of type gateway.web.v1.GetDashboardRequest');
68
+ }
69
+ return Buffer.from(arg.serializeBinary());
70
+ }
71
+
72
+ function deserialize_gateway_web_v1_GetDashboardRequest(buffer_arg) {
73
+ return proto_gateway_web_v1_metric_gateway_pb.GetDashboardRequest.deserializeBinary(new Uint8Array(buffer_arg));
74
+ }
75
+
76
+ function serialize_gateway_web_v1_GetDashboardResponse(arg) {
77
+ if (!(arg instanceof proto_gateway_web_v1_metric_gateway_pb.GetDashboardResponse)) {
78
+ throw new Error('Expected argument of type gateway.web.v1.GetDashboardResponse');
79
+ }
80
+ return Buffer.from(arg.serializeBinary());
81
+ }
82
+
83
+ function deserialize_gateway_web_v1_GetDashboardResponse(buffer_arg) {
84
+ return proto_gateway_web_v1_metric_gateway_pb.GetDashboardResponse.deserializeBinary(new Uint8Array(buffer_arg));
85
+ }
86
+
87
+ function serialize_gateway_web_v1_ListDashboardsRequest(arg) {
88
+ if (!(arg instanceof proto_gateway_web_v1_metric_gateway_pb.ListDashboardsRequest)) {
89
+ throw new Error('Expected argument of type gateway.web.v1.ListDashboardsRequest');
90
+ }
91
+ return Buffer.from(arg.serializeBinary());
92
+ }
93
+
94
+ function deserialize_gateway_web_v1_ListDashboardsRequest(buffer_arg) {
95
+ return proto_gateway_web_v1_metric_gateway_pb.ListDashboardsRequest.deserializeBinary(new Uint8Array(buffer_arg));
96
+ }
97
+
98
+ function serialize_gateway_web_v1_ListDashboardsResponse(arg) {
99
+ if (!(arg instanceof proto_gateway_web_v1_metric_gateway_pb.ListDashboardsResponse)) {
100
+ throw new Error('Expected argument of type gateway.web.v1.ListDashboardsResponse');
101
+ }
102
+ return Buffer.from(arg.serializeBinary());
103
+ }
104
+
105
+ function deserialize_gateway_web_v1_ListDashboardsResponse(buffer_arg) {
106
+ return proto_gateway_web_v1_metric_gateway_pb.ListDashboardsResponse.deserializeBinary(new Uint8Array(buffer_arg));
107
+ }
108
+
9
109
  function serialize_gateway_web_v1_MetricAttributeEnvelope(arg) {
10
110
  if (!(arg instanceof proto_gateway_web_v1_metric_gateway_pb.MetricAttributeEnvelope)) {
11
111
  throw new Error('Expected argument of type gateway.web.v1.MetricAttributeEnvelope');
@@ -39,6 +139,17 @@ function deserialize_gateway_web_v1_QueryDataEnvelope(buffer_arg) {
39
139
  return proto_gateway_web_v1_metric_gateway_pb.QueryDataEnvelope.deserializeBinary(new Uint8Array(buffer_arg));
40
140
  }
41
141
 
142
+ function serialize_gateway_web_v1_StreamDashboardDataRequest(arg) {
143
+ if (!(arg instanceof proto_gateway_web_v1_metric_gateway_pb.StreamDashboardDataRequest)) {
144
+ throw new Error('Expected argument of type gateway.web.v1.StreamDashboardDataRequest');
145
+ }
146
+ return Buffer.from(arg.serializeBinary());
147
+ }
148
+
149
+ function deserialize_gateway_web_v1_StreamDashboardDataRequest(buffer_arg) {
150
+ return proto_gateway_web_v1_metric_gateway_pb.StreamDashboardDataRequest.deserializeBinary(new Uint8Array(buffer_arg));
151
+ }
152
+
42
153
  function serialize_gateway_web_v1_StreamMetricAttributesRequest(arg) {
43
154
  if (!(arg instanceof proto_gateway_web_v1_metric_gateway_pb.StreamMetricAttributesRequest)) {
44
155
  throw new Error('Expected argument of type gateway.web.v1.StreamMetricAttributesRequest');
@@ -72,14 +183,37 @@ function deserialize_gateway_web_v1_StreamQueryRequest(buffer_arg) {
72
183
  return proto_gateway_web_v1_metric_gateway_pb.StreamQueryRequest.deserializeBinary(new Uint8Array(buffer_arg));
73
184
  }
74
185
 
186
+ function serialize_gateway_web_v1_UpdateDashboardRequest(arg) {
187
+ if (!(arg instanceof proto_gateway_web_v1_metric_gateway_pb.UpdateDashboardRequest)) {
188
+ throw new Error('Expected argument of type gateway.web.v1.UpdateDashboardRequest');
189
+ }
190
+ return Buffer.from(arg.serializeBinary());
191
+ }
192
+
193
+ function deserialize_gateway_web_v1_UpdateDashboardRequest(buffer_arg) {
194
+ return proto_gateway_web_v1_metric_gateway_pb.UpdateDashboardRequest.deserializeBinary(new Uint8Array(buffer_arg));
195
+ }
196
+
197
+ function serialize_gateway_web_v1_UpdateDashboardResponse(arg) {
198
+ if (!(arg instanceof proto_gateway_web_v1_metric_gateway_pb.UpdateDashboardResponse)) {
199
+ throw new Error('Expected argument of type gateway.web.v1.UpdateDashboardResponse');
200
+ }
201
+ return Buffer.from(arg.serializeBinary());
202
+ }
203
+
204
+ function deserialize_gateway_web_v1_UpdateDashboardResponse(buffer_arg) {
205
+ return proto_gateway_web_v1_metric_gateway_pb.UpdateDashboardResponse.deserializeBinary(new Uint8Array(buffer_arg));
206
+ }
207
+
75
208
 
76
209
  // MetricGatewayService is the web surface of telemetry.api.v1 MetricService — the types
77
- // are domain-isolated copies converted in gateways/internal/convert. Every RPC
78
- // is a server stream: snapshot first, then live updates.
210
+ // are domain-isolated copies converted in gateways/internal/convert. It covers the
211
+ // metric catalog, ad-hoc queries, and Postgres-backed dashboards that compose those
212
+ // queries. Every streaming RPC emits a snapshot first, then live updates.
79
213
  //
80
214
  // StreamQuery executes one MetricQuery — the same message a dashboard widget
81
- // stores (dashboard_gateway.proto) — so the metrics explorer, the widget
82
- // editor preview, and a saved dashboard all run through one query path.
215
+ // stores — so the metrics explorer, the widget editor preview, and a saved
216
+ // dashboard all run through one query path.
83
217
  var MetricGatewayServiceService = exports.MetricGatewayServiceService = {
84
218
  streamMetrics: {
85
219
  path: '/gateway.web.v1.MetricGatewayService/StreamMetrics',
@@ -117,6 +251,76 @@ streamQuery: {
117
251
  responseSerialize: serialize_gateway_web_v1_QueryDataEnvelope,
118
252
  responseDeserialize: deserialize_gateway_web_v1_QueryDataEnvelope,
119
253
  },
254
+ createDashboard: {
255
+ path: '/gateway.web.v1.MetricGatewayService/CreateDashboard',
256
+ requestStream: false,
257
+ responseStream: false,
258
+ requestType: proto_gateway_web_v1_metric_gateway_pb.CreateDashboardRequest,
259
+ responseType: proto_gateway_web_v1_metric_gateway_pb.CreateDashboardResponse,
260
+ requestSerialize: serialize_gateway_web_v1_CreateDashboardRequest,
261
+ requestDeserialize: deserialize_gateway_web_v1_CreateDashboardRequest,
262
+ responseSerialize: serialize_gateway_web_v1_CreateDashboardResponse,
263
+ responseDeserialize: deserialize_gateway_web_v1_CreateDashboardResponse,
264
+ },
265
+ getDashboard: {
266
+ path: '/gateway.web.v1.MetricGatewayService/GetDashboard',
267
+ requestStream: false,
268
+ responseStream: false,
269
+ requestType: proto_gateway_web_v1_metric_gateway_pb.GetDashboardRequest,
270
+ responseType: proto_gateway_web_v1_metric_gateway_pb.GetDashboardResponse,
271
+ requestSerialize: serialize_gateway_web_v1_GetDashboardRequest,
272
+ requestDeserialize: deserialize_gateway_web_v1_GetDashboardRequest,
273
+ responseSerialize: serialize_gateway_web_v1_GetDashboardResponse,
274
+ responseDeserialize: deserialize_gateway_web_v1_GetDashboardResponse,
275
+ },
276
+ listDashboards: {
277
+ path: '/gateway.web.v1.MetricGatewayService/ListDashboards',
278
+ requestStream: false,
279
+ responseStream: false,
280
+ requestType: proto_gateway_web_v1_metric_gateway_pb.ListDashboardsRequest,
281
+ responseType: proto_gateway_web_v1_metric_gateway_pb.ListDashboardsResponse,
282
+ requestSerialize: serialize_gateway_web_v1_ListDashboardsRequest,
283
+ requestDeserialize: deserialize_gateway_web_v1_ListDashboardsRequest,
284
+ responseSerialize: serialize_gateway_web_v1_ListDashboardsResponse,
285
+ responseDeserialize: deserialize_gateway_web_v1_ListDashboardsResponse,
286
+ },
287
+ updateDashboard: {
288
+ path: '/gateway.web.v1.MetricGatewayService/UpdateDashboard',
289
+ requestStream: false,
290
+ responseStream: false,
291
+ requestType: proto_gateway_web_v1_metric_gateway_pb.UpdateDashboardRequest,
292
+ responseType: proto_gateway_web_v1_metric_gateway_pb.UpdateDashboardResponse,
293
+ requestSerialize: serialize_gateway_web_v1_UpdateDashboardRequest,
294
+ requestDeserialize: deserialize_gateway_web_v1_UpdateDashboardRequest,
295
+ responseSerialize: serialize_gateway_web_v1_UpdateDashboardResponse,
296
+ responseDeserialize: deserialize_gateway_web_v1_UpdateDashboardResponse,
297
+ },
298
+ deleteDashboard: {
299
+ path: '/gateway.web.v1.MetricGatewayService/DeleteDashboard',
300
+ requestStream: false,
301
+ responseStream: false,
302
+ requestType: proto_gateway_web_v1_metric_gateway_pb.DeleteDashboardRequest,
303
+ responseType: proto_gateway_web_v1_metric_gateway_pb.DeleteDashboardResponse,
304
+ requestSerialize: serialize_gateway_web_v1_DeleteDashboardRequest,
305
+ requestDeserialize: deserialize_gateway_web_v1_DeleteDashboardRequest,
306
+ responseSerialize: serialize_gateway_web_v1_DeleteDashboardResponse,
307
+ responseDeserialize: deserialize_gateway_web_v1_DeleteDashboardResponse,
308
+ },
309
+ // One stream per dashboard view: every widget query runs server-side and
310
+ // all results multiplex onto this stream tagged with widget_id. Per-widget
311
+ // failures are in-band and retried; the stream ends only on terminal
312
+ // conditions.
313
+ streamDashboardData: {
314
+ path: '/gateway.web.v1.MetricGatewayService/StreamDashboardData',
315
+ requestStream: false,
316
+ responseStream: true,
317
+ requestType: proto_gateway_web_v1_metric_gateway_pb.StreamDashboardDataRequest,
318
+ responseType: proto_gateway_web_v1_metric_gateway_pb.DashboardDataEnvelope,
319
+ requestSerialize: serialize_gateway_web_v1_StreamDashboardDataRequest,
320
+ requestDeserialize: deserialize_gateway_web_v1_StreamDashboardDataRequest,
321
+ responseSerialize: serialize_gateway_web_v1_DashboardDataEnvelope,
322
+ responseDeserialize: deserialize_gateway_web_v1_DashboardDataEnvelope,
323
+ },
120
324
  };
121
325
 
122
326
  exports.MetricGatewayServiceClient = grpc.makeGenericClientConstructor(MetricGatewayServiceService, 'MetricGatewayService');