@sniipwebmaster/realtime-message-client-grpcweb 21.18.3

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,315 @@
1
+ /**
2
+ * @fileoverview gRPC-Web generated client stub for realtimemessageapi
3
+ * @enhanceable
4
+ * @public
5
+ */
6
+
7
+ // GENERATED CODE -- DO NOT EDIT!
8
+
9
+
10
+ /* eslint-disable */
11
+ // @ts-nocheck
12
+
13
+
14
+
15
+ const grpc = {};
16
+ grpc.web = require('grpc-web');
17
+
18
+
19
+ var google_api_annotations_pb = require('./google/api/annotations_pb.js')
20
+
21
+ var google_protobuf_empty_pb = require('google-protobuf/google/protobuf/empty_pb.js')
22
+
23
+ var protoc$gen$openapiv2_options_annotations_pb = require('./protoc-gen-openapiv2/options/annotations_pb.js')
24
+ const proto = {};
25
+ proto.realtimemessageapi = require('./service_pb.js');
26
+
27
+ /**
28
+ * @param {string} hostname
29
+ * @param {?Object} credentials
30
+ * @param {?Object} options
31
+ * @constructor
32
+ * @struct
33
+ * @final
34
+ */
35
+ proto.realtimemessageapi.RealTimeMessageServiceClient =
36
+ function(hostname, credentials, options) {
37
+ if (!options) options = {};
38
+ options['format'] = 'text';
39
+
40
+ /**
41
+ * @private @const {!grpc.web.GrpcWebClientBase} The client
42
+ */
43
+ this.client_ = new grpc.web.GrpcWebClientBase(options);
44
+
45
+ /**
46
+ * @private @const {string} The hostname
47
+ */
48
+ this.hostname_ = hostname;
49
+
50
+ };
51
+
52
+
53
+ /**
54
+ * @param {string} hostname
55
+ * @param {?Object} credentials
56
+ * @param {?Object} options
57
+ * @constructor
58
+ * @struct
59
+ * @final
60
+ */
61
+ proto.realtimemessageapi.RealTimeMessageServicePromiseClient =
62
+ function(hostname, credentials, options) {
63
+ if (!options) options = {};
64
+ options['format'] = 'text';
65
+
66
+ /**
67
+ * @private @const {!grpc.web.GrpcWebClientBase} The client
68
+ */
69
+ this.client_ = new grpc.web.GrpcWebClientBase(options);
70
+
71
+ /**
72
+ * @private @const {string} The hostname
73
+ */
74
+ this.hostname_ = hostname;
75
+
76
+ };
77
+
78
+
79
+ /**
80
+ * @const
81
+ * @type {!grpc.web.MethodDescriptor<
82
+ * !proto.google.protobuf.Empty,
83
+ * !proto.realtimemessageapi.ResponseCode>}
84
+ */
85
+ const methodDescriptor_RealTimeMessageService_Health = new grpc.web.MethodDescriptor(
86
+ '/realtimemessageapi.RealTimeMessageService/Health',
87
+ grpc.web.MethodType.UNARY,
88
+ google_protobuf_empty_pb.Empty,
89
+ proto.realtimemessageapi.ResponseCode,
90
+ /**
91
+ * @param {!proto.google.protobuf.Empty} request
92
+ * @return {!Uint8Array}
93
+ */
94
+ function(request) {
95
+ return request.serializeBinary();
96
+ },
97
+ proto.realtimemessageapi.ResponseCode.deserializeBinary
98
+ );
99
+
100
+
101
+ /**
102
+ * @const
103
+ * @type {!grpc.web.AbstractClientBase.MethodInfo<
104
+ * !proto.google.protobuf.Empty,
105
+ * !proto.realtimemessageapi.ResponseCode>}
106
+ */
107
+ const methodInfo_RealTimeMessageService_Health = new grpc.web.AbstractClientBase.MethodInfo(
108
+ proto.realtimemessageapi.ResponseCode,
109
+ /**
110
+ * @param {!proto.google.protobuf.Empty} request
111
+ * @return {!Uint8Array}
112
+ */
113
+ function(request) {
114
+ return request.serializeBinary();
115
+ },
116
+ proto.realtimemessageapi.ResponseCode.deserializeBinary
117
+ );
118
+
119
+
120
+ /**
121
+ * @param {!proto.google.protobuf.Empty} request The
122
+ * request proto
123
+ * @param {?Object<string, string>} metadata User defined
124
+ * call metadata
125
+ * @param {function(?grpc.web.Error, ?proto.realtimemessageapi.ResponseCode)}
126
+ * callback The callback function(error, response)
127
+ * @return {!grpc.web.ClientReadableStream<!proto.realtimemessageapi.ResponseCode>|undefined}
128
+ * The XHR Node Readable Stream
129
+ */
130
+ proto.realtimemessageapi.RealTimeMessageServiceClient.prototype.health =
131
+ function(request, metadata, callback) {
132
+ return this.client_.rpcCall(this.hostname_ +
133
+ '/realtimemessageapi.RealTimeMessageService/Health',
134
+ request,
135
+ metadata || {},
136
+ methodDescriptor_RealTimeMessageService_Health,
137
+ callback);
138
+ };
139
+
140
+
141
+ /**
142
+ * @param {!proto.google.protobuf.Empty} request The
143
+ * request proto
144
+ * @param {?Object<string, string>} metadata User defined
145
+ * call metadata
146
+ * @return {!Promise<!proto.realtimemessageapi.ResponseCode>}
147
+ * Promise that resolves to the response
148
+ */
149
+ proto.realtimemessageapi.RealTimeMessageServicePromiseClient.prototype.health =
150
+ function(request, metadata) {
151
+ return this.client_.unaryCall(this.hostname_ +
152
+ '/realtimemessageapi.RealTimeMessageService/Health',
153
+ request,
154
+ metadata || {},
155
+ methodDescriptor_RealTimeMessageService_Health);
156
+ };
157
+
158
+
159
+ /**
160
+ * @const
161
+ * @type {!grpc.web.MethodDescriptor<
162
+ * !proto.realtimemessageapi.EmptyRequest,
163
+ * !proto.realtimemessageapi.Event>}
164
+ */
165
+ const methodDescriptor_RealTimeMessageService_EventsSubscription = new grpc.web.MethodDescriptor(
166
+ '/realtimemessageapi.RealTimeMessageService/EventsSubscription',
167
+ grpc.web.MethodType.SERVER_STREAMING,
168
+ proto.realtimemessageapi.EmptyRequest,
169
+ proto.realtimemessageapi.Event,
170
+ /**
171
+ * @param {!proto.realtimemessageapi.EmptyRequest} request
172
+ * @return {!Uint8Array}
173
+ */
174
+ function(request) {
175
+ return request.serializeBinary();
176
+ },
177
+ proto.realtimemessageapi.Event.deserializeBinary
178
+ );
179
+
180
+
181
+ /**
182
+ * @const
183
+ * @type {!grpc.web.AbstractClientBase.MethodInfo<
184
+ * !proto.realtimemessageapi.EmptyRequest,
185
+ * !proto.realtimemessageapi.Event>}
186
+ */
187
+ const methodInfo_RealTimeMessageService_EventsSubscription = new grpc.web.AbstractClientBase.MethodInfo(
188
+ proto.realtimemessageapi.Event,
189
+ /**
190
+ * @param {!proto.realtimemessageapi.EmptyRequest} request
191
+ * @return {!Uint8Array}
192
+ */
193
+ function(request) {
194
+ return request.serializeBinary();
195
+ },
196
+ proto.realtimemessageapi.Event.deserializeBinary
197
+ );
198
+
199
+
200
+ /**
201
+ * @param {!proto.realtimemessageapi.EmptyRequest} request The request proto
202
+ * @param {?Object<string, string>} metadata User defined
203
+ * call metadata
204
+ * @return {!grpc.web.ClientReadableStream<!proto.realtimemessageapi.Event>}
205
+ * The XHR Node Readable Stream
206
+ */
207
+ proto.realtimemessageapi.RealTimeMessageServiceClient.prototype.eventsSubscription =
208
+ function(request, metadata) {
209
+ return this.client_.serverStreaming(this.hostname_ +
210
+ '/realtimemessageapi.RealTimeMessageService/EventsSubscription',
211
+ request,
212
+ metadata || {},
213
+ methodDescriptor_RealTimeMessageService_EventsSubscription);
214
+ };
215
+
216
+
217
+ /**
218
+ * @param {!proto.realtimemessageapi.EmptyRequest} request The request proto
219
+ * @param {?Object<string, string>} metadata User defined
220
+ * call metadata
221
+ * @return {!grpc.web.ClientReadableStream<!proto.realtimemessageapi.Event>}
222
+ * The XHR Node Readable Stream
223
+ */
224
+ proto.realtimemessageapi.RealTimeMessageServicePromiseClient.prototype.eventsSubscription =
225
+ function(request, metadata) {
226
+ return this.client_.serverStreaming(this.hostname_ +
227
+ '/realtimemessageapi.RealTimeMessageService/EventsSubscription',
228
+ request,
229
+ metadata || {},
230
+ methodDescriptor_RealTimeMessageService_EventsSubscription);
231
+ };
232
+
233
+
234
+ /**
235
+ * @const
236
+ * @type {!grpc.web.MethodDescriptor<
237
+ * !proto.google.protobuf.Empty,
238
+ * !proto.realtimemessageapi.ResponseCode>}
239
+ */
240
+ const methodDescriptor_RealTimeMessageService_LocalHealth = new grpc.web.MethodDescriptor(
241
+ '/realtimemessageapi.RealTimeMessageService/LocalHealth',
242
+ grpc.web.MethodType.UNARY,
243
+ google_protobuf_empty_pb.Empty,
244
+ proto.realtimemessageapi.ResponseCode,
245
+ /**
246
+ * @param {!proto.google.protobuf.Empty} request
247
+ * @return {!Uint8Array}
248
+ */
249
+ function(request) {
250
+ return request.serializeBinary();
251
+ },
252
+ proto.realtimemessageapi.ResponseCode.deserializeBinary
253
+ );
254
+
255
+
256
+ /**
257
+ * @const
258
+ * @type {!grpc.web.AbstractClientBase.MethodInfo<
259
+ * !proto.google.protobuf.Empty,
260
+ * !proto.realtimemessageapi.ResponseCode>}
261
+ */
262
+ const methodInfo_RealTimeMessageService_LocalHealth = new grpc.web.AbstractClientBase.MethodInfo(
263
+ proto.realtimemessageapi.ResponseCode,
264
+ /**
265
+ * @param {!proto.google.protobuf.Empty} request
266
+ * @return {!Uint8Array}
267
+ */
268
+ function(request) {
269
+ return request.serializeBinary();
270
+ },
271
+ proto.realtimemessageapi.ResponseCode.deserializeBinary
272
+ );
273
+
274
+
275
+ /**
276
+ * @param {!proto.google.protobuf.Empty} request The
277
+ * request proto
278
+ * @param {?Object<string, string>} metadata User defined
279
+ * call metadata
280
+ * @param {function(?grpc.web.Error, ?proto.realtimemessageapi.ResponseCode)}
281
+ * callback The callback function(error, response)
282
+ * @return {!grpc.web.ClientReadableStream<!proto.realtimemessageapi.ResponseCode>|undefined}
283
+ * The XHR Node Readable Stream
284
+ */
285
+ proto.realtimemessageapi.RealTimeMessageServiceClient.prototype.localHealth =
286
+ function(request, metadata, callback) {
287
+ return this.client_.rpcCall(this.hostname_ +
288
+ '/realtimemessageapi.RealTimeMessageService/LocalHealth',
289
+ request,
290
+ metadata || {},
291
+ methodDescriptor_RealTimeMessageService_LocalHealth,
292
+ callback);
293
+ };
294
+
295
+
296
+ /**
297
+ * @param {!proto.google.protobuf.Empty} request The
298
+ * request proto
299
+ * @param {?Object<string, string>} metadata User defined
300
+ * call metadata
301
+ * @return {!Promise<!proto.realtimemessageapi.ResponseCode>}
302
+ * Promise that resolves to the response
303
+ */
304
+ proto.realtimemessageapi.RealTimeMessageServicePromiseClient.prototype.localHealth =
305
+ function(request, metadata) {
306
+ return this.client_.unaryCall(this.hostname_ +
307
+ '/realtimemessageapi.RealTimeMessageService/LocalHealth',
308
+ request,
309
+ metadata || {},
310
+ methodDescriptor_RealTimeMessageService_LocalHealth);
311
+ };
312
+
313
+
314
+ module.exports = proto.realtimemessageapi;
315
+