@miradorlabs/web-grpc 3.47.0 → 3.49.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,86 @@
1
+ // GENERATED CODE -- DO NOT EDIT!
2
+
3
+ 'use strict';
4
+ var grpc = require('@grpc/grpc-js');
5
+ var proto_gateway_web_v1_notification_gateway_pb = require('../../../../proto/gateway/web/v1/notification_gateway_pb.js');
6
+ var google_api_field_behavior_pb = require('../../../../google/api/field_behavior_pb.js');
7
+ var google_protobuf_timestamp_pb = require('google-protobuf/google/protobuf/timestamp_pb.js');
8
+ var proto_gateway_common_v1_status_pb = require('../../../../proto/gateway/common/v1/status_pb.js');
9
+
10
+ function serialize_gateway_web_v1_ListAlertsRequest(arg) {
11
+ if (!(arg instanceof proto_gateway_web_v1_notification_gateway_pb.ListAlertsRequest)) {
12
+ throw new Error('Expected argument of type gateway.web.v1.ListAlertsRequest');
13
+ }
14
+ return Buffer.from(arg.serializeBinary());
15
+ }
16
+
17
+ function deserialize_gateway_web_v1_ListAlertsRequest(buffer_arg) {
18
+ return proto_gateway_web_v1_notification_gateway_pb.ListAlertsRequest.deserializeBinary(new Uint8Array(buffer_arg));
19
+ }
20
+
21
+ function serialize_gateway_web_v1_ListAlertsResponse(arg) {
22
+ if (!(arg instanceof proto_gateway_web_v1_notification_gateway_pb.ListAlertsResponse)) {
23
+ throw new Error('Expected argument of type gateway.web.v1.ListAlertsResponse');
24
+ }
25
+ return Buffer.from(arg.serializeBinary());
26
+ }
27
+
28
+ function deserialize_gateway_web_v1_ListAlertsResponse(buffer_arg) {
29
+ return proto_gateway_web_v1_notification_gateway_pb.ListAlertsResponse.deserializeBinary(new Uint8Array(buffer_arg));
30
+ }
31
+
32
+ function serialize_gateway_web_v1_MarkAlertsReadRequest(arg) {
33
+ if (!(arg instanceof proto_gateway_web_v1_notification_gateway_pb.MarkAlertsReadRequest)) {
34
+ throw new Error('Expected argument of type gateway.web.v1.MarkAlertsReadRequest');
35
+ }
36
+ return Buffer.from(arg.serializeBinary());
37
+ }
38
+
39
+ function deserialize_gateway_web_v1_MarkAlertsReadRequest(buffer_arg) {
40
+ return proto_gateway_web_v1_notification_gateway_pb.MarkAlertsReadRequest.deserializeBinary(new Uint8Array(buffer_arg));
41
+ }
42
+
43
+ function serialize_gateway_web_v1_MarkAlertsReadResponse(arg) {
44
+ if (!(arg instanceof proto_gateway_web_v1_notification_gateway_pb.MarkAlertsReadResponse)) {
45
+ throw new Error('Expected argument of type gateway.web.v1.MarkAlertsReadResponse');
46
+ }
47
+ return Buffer.from(arg.serializeBinary());
48
+ }
49
+
50
+ function deserialize_gateway_web_v1_MarkAlertsReadResponse(buffer_arg) {
51
+ return proto_gateway_web_v1_notification_gateway_pb.MarkAlertsReadResponse.deserializeBinary(new Uint8Array(buffer_arg));
52
+ }
53
+
54
+
55
+ // NotificationGatewayService mirrors notification.api.v1.NotificationService: the organization's in-app alerts, which
56
+ // every member sees, with the signed-in member's own read state. Poll ListAlerts for the bell (on load, on window focus
57
+ // and every 30-60 s); there is no stream.
58
+ var NotificationGatewayServiceService = exports.NotificationGatewayServiceService = {
59
+ // ListAlerts pages the organization's alerts newest first; pages never overlap. Paging is weakly consistent: an
60
+ // alert that becomes visible behind the cursor during a walk shows up on the next walk from the first page.
61
+ listAlerts: {
62
+ path: '/gateway.web.v1.NotificationGatewayService/ListAlerts',
63
+ requestStream: false,
64
+ responseStream: false,
65
+ requestType: proto_gateway_web_v1_notification_gateway_pb.ListAlertsRequest,
66
+ responseType: proto_gateway_web_v1_notification_gateway_pb.ListAlertsResponse,
67
+ requestSerialize: serialize_gateway_web_v1_ListAlertsRequest,
68
+ requestDeserialize: deserialize_gateway_web_v1_ListAlertsRequest,
69
+ responseSerialize: serialize_gateway_web_v1_ListAlertsResponse,
70
+ responseDeserialize: deserialize_gateway_web_v1_ListAlertsResponse,
71
+ },
72
+ // MarkAlertsRead marks alerts read for the signed-in member and returns the new unread count.
73
+ markAlertsRead: {
74
+ path: '/gateway.web.v1.NotificationGatewayService/MarkAlertsRead',
75
+ requestStream: false,
76
+ responseStream: false,
77
+ requestType: proto_gateway_web_v1_notification_gateway_pb.MarkAlertsReadRequest,
78
+ responseType: proto_gateway_web_v1_notification_gateway_pb.MarkAlertsReadResponse,
79
+ requestSerialize: serialize_gateway_web_v1_MarkAlertsReadRequest,
80
+ requestDeserialize: deserialize_gateway_web_v1_MarkAlertsReadRequest,
81
+ responseSerialize: serialize_gateway_web_v1_MarkAlertsReadResponse,
82
+ responseDeserialize: deserialize_gateway_web_v1_MarkAlertsReadResponse,
83
+ },
84
+ };
85
+
86
+ exports.NotificationGatewayServiceClient = grpc.makeGenericClientConstructor(NotificationGatewayServiceService, 'NotificationGatewayService');