@miradorlabs/web-grpc 2.0.0 → 2.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,220 @@
1
+ // GENERATED CODE -- DO NOT EDIT!
2
+
3
+ 'use strict';
4
+ var grpc = require('@grpc/grpc-js');
5
+ var proto_gateway_web_v1_dashboard_gateway_pb = require('../../../../proto/gateway/web/v1/dashboard_gateway_pb.js');
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');
8
+ var proto_gateway_web_v1_metric_gateway_pb = require('../../../../proto/gateway/web/v1/metric_gateway_pb.js');
9
+ var proto_gateway_web_v1_trace_gateway_pb = require('../../../../proto/gateway/web/v1/trace_gateway_pb.js');
10
+
11
+ function serialize_gateway_web_v1_CreateDashboardRequest(arg) {
12
+ if (!(arg instanceof proto_gateway_web_v1_dashboard_gateway_pb.CreateDashboardRequest)) {
13
+ throw new Error('Expected argument of type gateway.web.v1.CreateDashboardRequest');
14
+ }
15
+ return Buffer.from(arg.serializeBinary());
16
+ }
17
+
18
+ function deserialize_gateway_web_v1_CreateDashboardRequest(buffer_arg) {
19
+ return proto_gateway_web_v1_dashboard_gateway_pb.CreateDashboardRequest.deserializeBinary(new Uint8Array(buffer_arg));
20
+ }
21
+
22
+ function serialize_gateway_web_v1_CreateDashboardResponse(arg) {
23
+ if (!(arg instanceof proto_gateway_web_v1_dashboard_gateway_pb.CreateDashboardResponse)) {
24
+ throw new Error('Expected argument of type gateway.web.v1.CreateDashboardResponse');
25
+ }
26
+ return Buffer.from(arg.serializeBinary());
27
+ }
28
+
29
+ function deserialize_gateway_web_v1_CreateDashboardResponse(buffer_arg) {
30
+ return proto_gateway_web_v1_dashboard_gateway_pb.CreateDashboardResponse.deserializeBinary(new Uint8Array(buffer_arg));
31
+ }
32
+
33
+ function serialize_gateway_web_v1_DashboardDataEnvelope(arg) {
34
+ if (!(arg instanceof proto_gateway_web_v1_dashboard_gateway_pb.DashboardDataEnvelope)) {
35
+ throw new Error('Expected argument of type gateway.web.v1.DashboardDataEnvelope');
36
+ }
37
+ return Buffer.from(arg.serializeBinary());
38
+ }
39
+
40
+ function deserialize_gateway_web_v1_DashboardDataEnvelope(buffer_arg) {
41
+ return proto_gateway_web_v1_dashboard_gateway_pb.DashboardDataEnvelope.deserializeBinary(new Uint8Array(buffer_arg));
42
+ }
43
+
44
+ function serialize_gateway_web_v1_DeleteDashboardRequest(arg) {
45
+ if (!(arg instanceof proto_gateway_web_v1_dashboard_gateway_pb.DeleteDashboardRequest)) {
46
+ throw new Error('Expected argument of type gateway.web.v1.DeleteDashboardRequest');
47
+ }
48
+ return Buffer.from(arg.serializeBinary());
49
+ }
50
+
51
+ function deserialize_gateway_web_v1_DeleteDashboardRequest(buffer_arg) {
52
+ return proto_gateway_web_v1_dashboard_gateway_pb.DeleteDashboardRequest.deserializeBinary(new Uint8Array(buffer_arg));
53
+ }
54
+
55
+ function serialize_gateway_web_v1_DeleteDashboardResponse(arg) {
56
+ if (!(arg instanceof proto_gateway_web_v1_dashboard_gateway_pb.DeleteDashboardResponse)) {
57
+ throw new Error('Expected argument of type gateway.web.v1.DeleteDashboardResponse');
58
+ }
59
+ return Buffer.from(arg.serializeBinary());
60
+ }
61
+
62
+ function deserialize_gateway_web_v1_DeleteDashboardResponse(buffer_arg) {
63
+ return proto_gateway_web_v1_dashboard_gateway_pb.DeleteDashboardResponse.deserializeBinary(new Uint8Array(buffer_arg));
64
+ }
65
+
66
+ function serialize_gateway_web_v1_GetDashboardRequest(arg) {
67
+ if (!(arg instanceof proto_gateway_web_v1_dashboard_gateway_pb.GetDashboardRequest)) {
68
+ throw new Error('Expected argument of type gateway.web.v1.GetDashboardRequest');
69
+ }
70
+ return Buffer.from(arg.serializeBinary());
71
+ }
72
+
73
+ function deserialize_gateway_web_v1_GetDashboardRequest(buffer_arg) {
74
+ return proto_gateway_web_v1_dashboard_gateway_pb.GetDashboardRequest.deserializeBinary(new Uint8Array(buffer_arg));
75
+ }
76
+
77
+ function serialize_gateway_web_v1_GetDashboardResponse(arg) {
78
+ if (!(arg instanceof proto_gateway_web_v1_dashboard_gateway_pb.GetDashboardResponse)) {
79
+ throw new Error('Expected argument of type gateway.web.v1.GetDashboardResponse');
80
+ }
81
+ return Buffer.from(arg.serializeBinary());
82
+ }
83
+
84
+ function deserialize_gateway_web_v1_GetDashboardResponse(buffer_arg) {
85
+ return proto_gateway_web_v1_dashboard_gateway_pb.GetDashboardResponse.deserializeBinary(new Uint8Array(buffer_arg));
86
+ }
87
+
88
+ function serialize_gateway_web_v1_ListDashboardsRequest(arg) {
89
+ if (!(arg instanceof proto_gateway_web_v1_dashboard_gateway_pb.ListDashboardsRequest)) {
90
+ throw new Error('Expected argument of type gateway.web.v1.ListDashboardsRequest');
91
+ }
92
+ return Buffer.from(arg.serializeBinary());
93
+ }
94
+
95
+ function deserialize_gateway_web_v1_ListDashboardsRequest(buffer_arg) {
96
+ return proto_gateway_web_v1_dashboard_gateway_pb.ListDashboardsRequest.deserializeBinary(new Uint8Array(buffer_arg));
97
+ }
98
+
99
+ function serialize_gateway_web_v1_ListDashboardsResponse(arg) {
100
+ if (!(arg instanceof proto_gateway_web_v1_dashboard_gateway_pb.ListDashboardsResponse)) {
101
+ throw new Error('Expected argument of type gateway.web.v1.ListDashboardsResponse');
102
+ }
103
+ return Buffer.from(arg.serializeBinary());
104
+ }
105
+
106
+ function deserialize_gateway_web_v1_ListDashboardsResponse(buffer_arg) {
107
+ return proto_gateway_web_v1_dashboard_gateway_pb.ListDashboardsResponse.deserializeBinary(new Uint8Array(buffer_arg));
108
+ }
109
+
110
+ function serialize_gateway_web_v1_StreamDashboardDataRequest(arg) {
111
+ if (!(arg instanceof proto_gateway_web_v1_dashboard_gateway_pb.StreamDashboardDataRequest)) {
112
+ throw new Error('Expected argument of type gateway.web.v1.StreamDashboardDataRequest');
113
+ }
114
+ return Buffer.from(arg.serializeBinary());
115
+ }
116
+
117
+ function deserialize_gateway_web_v1_StreamDashboardDataRequest(buffer_arg) {
118
+ return proto_gateway_web_v1_dashboard_gateway_pb.StreamDashboardDataRequest.deserializeBinary(new Uint8Array(buffer_arg));
119
+ }
120
+
121
+ function serialize_gateway_web_v1_UpdateDashboardRequest(arg) {
122
+ if (!(arg instanceof proto_gateway_web_v1_dashboard_gateway_pb.UpdateDashboardRequest)) {
123
+ throw new Error('Expected argument of type gateway.web.v1.UpdateDashboardRequest');
124
+ }
125
+ return Buffer.from(arg.serializeBinary());
126
+ }
127
+
128
+ function deserialize_gateway_web_v1_UpdateDashboardRequest(buffer_arg) {
129
+ return proto_gateway_web_v1_dashboard_gateway_pb.UpdateDashboardRequest.deserializeBinary(new Uint8Array(buffer_arg));
130
+ }
131
+
132
+ function serialize_gateway_web_v1_UpdateDashboardResponse(arg) {
133
+ if (!(arg instanceof proto_gateway_web_v1_dashboard_gateway_pb.UpdateDashboardResponse)) {
134
+ throw new Error('Expected argument of type gateway.web.v1.UpdateDashboardResponse');
135
+ }
136
+ return Buffer.from(arg.serializeBinary());
137
+ }
138
+
139
+ function deserialize_gateway_web_v1_UpdateDashboardResponse(buffer_arg) {
140
+ return proto_gateway_web_v1_dashboard_gateway_pb.UpdateDashboardResponse.deserializeBinary(new Uint8Array(buffer_arg));
141
+ }
142
+
143
+
144
+ // DashboardGatewayService is the web surface of the telemetry
145
+ // dashboard service — Postgres-backed dashboard CRUD plus the single
146
+ // multiplexed stream that feeds a dashboard view.
147
+ var DashboardGatewayServiceService = exports.DashboardGatewayServiceService = {
148
+ createDashboard: {
149
+ path: '/gateway.web.v1.DashboardGatewayService/CreateDashboard',
150
+ requestStream: false,
151
+ responseStream: false,
152
+ requestType: proto_gateway_web_v1_dashboard_gateway_pb.CreateDashboardRequest,
153
+ responseType: proto_gateway_web_v1_dashboard_gateway_pb.CreateDashboardResponse,
154
+ requestSerialize: serialize_gateway_web_v1_CreateDashboardRequest,
155
+ requestDeserialize: deserialize_gateway_web_v1_CreateDashboardRequest,
156
+ responseSerialize: serialize_gateway_web_v1_CreateDashboardResponse,
157
+ responseDeserialize: deserialize_gateway_web_v1_CreateDashboardResponse,
158
+ },
159
+ getDashboard: {
160
+ path: '/gateway.web.v1.DashboardGatewayService/GetDashboard',
161
+ requestStream: false,
162
+ responseStream: false,
163
+ requestType: proto_gateway_web_v1_dashboard_gateway_pb.GetDashboardRequest,
164
+ responseType: proto_gateway_web_v1_dashboard_gateway_pb.GetDashboardResponse,
165
+ requestSerialize: serialize_gateway_web_v1_GetDashboardRequest,
166
+ requestDeserialize: deserialize_gateway_web_v1_GetDashboardRequest,
167
+ responseSerialize: serialize_gateway_web_v1_GetDashboardResponse,
168
+ responseDeserialize: deserialize_gateway_web_v1_GetDashboardResponse,
169
+ },
170
+ listDashboards: {
171
+ path: '/gateway.web.v1.DashboardGatewayService/ListDashboards',
172
+ requestStream: false,
173
+ responseStream: false,
174
+ requestType: proto_gateway_web_v1_dashboard_gateway_pb.ListDashboardsRequest,
175
+ responseType: proto_gateway_web_v1_dashboard_gateway_pb.ListDashboardsResponse,
176
+ requestSerialize: serialize_gateway_web_v1_ListDashboardsRequest,
177
+ requestDeserialize: deserialize_gateway_web_v1_ListDashboardsRequest,
178
+ responseSerialize: serialize_gateway_web_v1_ListDashboardsResponse,
179
+ responseDeserialize: deserialize_gateway_web_v1_ListDashboardsResponse,
180
+ },
181
+ updateDashboard: {
182
+ path: '/gateway.web.v1.DashboardGatewayService/UpdateDashboard',
183
+ requestStream: false,
184
+ responseStream: false,
185
+ requestType: proto_gateway_web_v1_dashboard_gateway_pb.UpdateDashboardRequest,
186
+ responseType: proto_gateway_web_v1_dashboard_gateway_pb.UpdateDashboardResponse,
187
+ requestSerialize: serialize_gateway_web_v1_UpdateDashboardRequest,
188
+ requestDeserialize: deserialize_gateway_web_v1_UpdateDashboardRequest,
189
+ responseSerialize: serialize_gateway_web_v1_UpdateDashboardResponse,
190
+ responseDeserialize: deserialize_gateway_web_v1_UpdateDashboardResponse,
191
+ },
192
+ deleteDashboard: {
193
+ path: '/gateway.web.v1.DashboardGatewayService/DeleteDashboard',
194
+ requestStream: false,
195
+ responseStream: false,
196
+ requestType: proto_gateway_web_v1_dashboard_gateway_pb.DeleteDashboardRequest,
197
+ responseType: proto_gateway_web_v1_dashboard_gateway_pb.DeleteDashboardResponse,
198
+ requestSerialize: serialize_gateway_web_v1_DeleteDashboardRequest,
199
+ requestDeserialize: deserialize_gateway_web_v1_DeleteDashboardRequest,
200
+ responseSerialize: serialize_gateway_web_v1_DeleteDashboardResponse,
201
+ responseDeserialize: deserialize_gateway_web_v1_DeleteDashboardResponse,
202
+ },
203
+ // One stream per dashboard view: every widget query runs server-side and
204
+ // all results multiplex onto this stream tagged with widget_id. Per-widget
205
+ // failures are in-band and retried; the stream ends only on terminal
206
+ // conditions.
207
+ streamDashboardData: {
208
+ path: '/gateway.web.v1.DashboardGatewayService/StreamDashboardData',
209
+ requestStream: false,
210
+ responseStream: true,
211
+ requestType: proto_gateway_web_v1_dashboard_gateway_pb.StreamDashboardDataRequest,
212
+ responseType: proto_gateway_web_v1_dashboard_gateway_pb.DashboardDataEnvelope,
213
+ requestSerialize: serialize_gateway_web_v1_StreamDashboardDataRequest,
214
+ requestDeserialize: deserialize_gateway_web_v1_StreamDashboardDataRequest,
215
+ responseSerialize: serialize_gateway_web_v1_DashboardDataEnvelope,
216
+ responseDeserialize: deserialize_gateway_web_v1_DashboardDataEnvelope,
217
+ },
218
+ };
219
+
220
+ exports.DashboardGatewayServiceClient = grpc.makeGenericClientConstructor(DashboardGatewayServiceService, 'DashboardGatewayService');