@miradorlabs/web-grpc 4.32.0 → 4.34.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,192 @@
1
+ // GENERATED CODE -- DO NOT EDIT!
2
+
3
+ 'use strict';
4
+ var grpc = require('@grpc/grpc-js');
5
+ var proto_gateway_web_v1_ai_insights_gateway_pb = require('../../../../proto/gateway/web/v1/ai_insights_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
+ var proto_gateway_web_v1_ai_gateway_pb = require('../../../../proto/gateway/web/v1/ai_gateway_pb.js');
10
+
11
+ function serialize_gateway_web_v1_BatchGetInsightRatingsRequest(arg) {
12
+ if (!(arg instanceof proto_gateway_web_v1_ai_insights_gateway_pb.BatchGetInsightRatingsRequest)) {
13
+ throw new Error('Expected argument of type gateway.web.v1.BatchGetInsightRatingsRequest');
14
+ }
15
+ return Buffer.from(arg.serializeBinary());
16
+ }
17
+
18
+ function deserialize_gateway_web_v1_BatchGetInsightRatingsRequest(buffer_arg) {
19
+ return proto_gateway_web_v1_ai_insights_gateway_pb.BatchGetInsightRatingsRequest.deserializeBinary(new Uint8Array(buffer_arg));
20
+ }
21
+
22
+ function serialize_gateway_web_v1_BatchGetInsightRatingsResponse(arg) {
23
+ if (!(arg instanceof proto_gateway_web_v1_ai_insights_gateway_pb.BatchGetInsightRatingsResponse)) {
24
+ throw new Error('Expected argument of type gateway.web.v1.BatchGetInsightRatingsResponse');
25
+ }
26
+ return Buffer.from(arg.serializeBinary());
27
+ }
28
+
29
+ function deserialize_gateway_web_v1_BatchGetInsightRatingsResponse(buffer_arg) {
30
+ return proto_gateway_web_v1_ai_insights_gateway_pb.BatchGetInsightRatingsResponse.deserializeBinary(new Uint8Array(buffer_arg));
31
+ }
32
+
33
+ function serialize_gateway_web_v1_DeleteInsightRatingRequest(arg) {
34
+ if (!(arg instanceof proto_gateway_web_v1_ai_insights_gateway_pb.DeleteInsightRatingRequest)) {
35
+ throw new Error('Expected argument of type gateway.web.v1.DeleteInsightRatingRequest');
36
+ }
37
+ return Buffer.from(arg.serializeBinary());
38
+ }
39
+
40
+ function deserialize_gateway_web_v1_DeleteInsightRatingRequest(buffer_arg) {
41
+ return proto_gateway_web_v1_ai_insights_gateway_pb.DeleteInsightRatingRequest.deserializeBinary(new Uint8Array(buffer_arg));
42
+ }
43
+
44
+ function serialize_gateway_web_v1_DeleteInsightRatingResponse(arg) {
45
+ if (!(arg instanceof proto_gateway_web_v1_ai_insights_gateway_pb.DeleteInsightRatingResponse)) {
46
+ throw new Error('Expected argument of type gateway.web.v1.DeleteInsightRatingResponse');
47
+ }
48
+ return Buffer.from(arg.serializeBinary());
49
+ }
50
+
51
+ function deserialize_gateway_web_v1_DeleteInsightRatingResponse(buffer_arg) {
52
+ return proto_gateway_web_v1_ai_insights_gateway_pb.DeleteInsightRatingResponse.deserializeBinary(new Uint8Array(buffer_arg));
53
+ }
54
+
55
+ function serialize_gateway_web_v1_ListProjectInsightCardsRequest(arg) {
56
+ if (!(arg instanceof proto_gateway_web_v1_ai_insights_gateway_pb.ListProjectInsightCardsRequest)) {
57
+ throw new Error('Expected argument of type gateway.web.v1.ListProjectInsightCardsRequest');
58
+ }
59
+ return Buffer.from(arg.serializeBinary());
60
+ }
61
+
62
+ function deserialize_gateway_web_v1_ListProjectInsightCardsRequest(buffer_arg) {
63
+ return proto_gateway_web_v1_ai_insights_gateway_pb.ListProjectInsightCardsRequest.deserializeBinary(new Uint8Array(buffer_arg));
64
+ }
65
+
66
+ function serialize_gateway_web_v1_ListProjectInsightCardsResponse(arg) {
67
+ if (!(arg instanceof proto_gateway_web_v1_ai_insights_gateway_pb.ListProjectInsightCardsResponse)) {
68
+ throw new Error('Expected argument of type gateway.web.v1.ListProjectInsightCardsResponse');
69
+ }
70
+ return Buffer.from(arg.serializeBinary());
71
+ }
72
+
73
+ function deserialize_gateway_web_v1_ListProjectInsightCardsResponse(buffer_arg) {
74
+ return proto_gateway_web_v1_ai_insights_gateway_pb.ListProjectInsightCardsResponse.deserializeBinary(new Uint8Array(buffer_arg));
75
+ }
76
+
77
+ function serialize_gateway_web_v1_ListSessionInsightsRequest(arg) {
78
+ if (!(arg instanceof proto_gateway_web_v1_ai_insights_gateway_pb.ListSessionInsightsRequest)) {
79
+ throw new Error('Expected argument of type gateway.web.v1.ListSessionInsightsRequest');
80
+ }
81
+ return Buffer.from(arg.serializeBinary());
82
+ }
83
+
84
+ function deserialize_gateway_web_v1_ListSessionInsightsRequest(buffer_arg) {
85
+ return proto_gateway_web_v1_ai_insights_gateway_pb.ListSessionInsightsRequest.deserializeBinary(new Uint8Array(buffer_arg));
86
+ }
87
+
88
+ function serialize_gateway_web_v1_ListSessionInsightsResponse(arg) {
89
+ if (!(arg instanceof proto_gateway_web_v1_ai_insights_gateway_pb.ListSessionInsightsResponse)) {
90
+ throw new Error('Expected argument of type gateway.web.v1.ListSessionInsightsResponse');
91
+ }
92
+ return Buffer.from(arg.serializeBinary());
93
+ }
94
+
95
+ function deserialize_gateway_web_v1_ListSessionInsightsResponse(buffer_arg) {
96
+ return proto_gateway_web_v1_ai_insights_gateway_pb.ListSessionInsightsResponse.deserializeBinary(new Uint8Array(buffer_arg));
97
+ }
98
+
99
+ function serialize_gateway_web_v1_SetInsightRatingRequest(arg) {
100
+ if (!(arg instanceof proto_gateway_web_v1_ai_insights_gateway_pb.SetInsightRatingRequest)) {
101
+ throw new Error('Expected argument of type gateway.web.v1.SetInsightRatingRequest');
102
+ }
103
+ return Buffer.from(arg.serializeBinary());
104
+ }
105
+
106
+ function deserialize_gateway_web_v1_SetInsightRatingRequest(buffer_arg) {
107
+ return proto_gateway_web_v1_ai_insights_gateway_pb.SetInsightRatingRequest.deserializeBinary(new Uint8Array(buffer_arg));
108
+ }
109
+
110
+ function serialize_gateway_web_v1_SetInsightRatingResponse(arg) {
111
+ if (!(arg instanceof proto_gateway_web_v1_ai_insights_gateway_pb.SetInsightRatingResponse)) {
112
+ throw new Error('Expected argument of type gateway.web.v1.SetInsightRatingResponse');
113
+ }
114
+ return Buffer.from(arg.serializeBinary());
115
+ }
116
+
117
+ function deserialize_gateway_web_v1_SetInsightRatingResponse(buffer_arg) {
118
+ return proto_gateway_web_v1_ai_insights_gateway_pb.SetInsightRatingResponse.deserializeBinary(new Uint8Array(buffer_arg));
119
+ }
120
+
121
+
122
+ // AIInsightsGatewayService serves a project's insight cards: session insights and project insight cards. Mirrors
123
+ // ai.api.v1.AIInsightsService. AIGatewayService.GetSessionAnalysis still serves one session's insights with its score.
124
+ // A person rates any card they can read with the ratings RPCs, and reads and changes only their own ratings.
125
+ var AIInsightsGatewayServiceService = exports.AIInsightsGatewayServiceService = {
126
+ // A project's insights one at a time, newest analysis first: a person's most recent insights with filter.user_ids,
127
+ // the team's without. Mirrors ai.api.v1.
128
+ listSessionInsights: {
129
+ path: '/gateway.web.v1.AIInsightsGatewayService/ListSessionInsights',
130
+ requestStream: false,
131
+ responseStream: false,
132
+ requestType: proto_gateway_web_v1_ai_insights_gateway_pb.ListSessionInsightsRequest,
133
+ responseType: proto_gateway_web_v1_ai_insights_gateway_pb.ListSessionInsightsResponse,
134
+ requestSerialize: serialize_gateway_web_v1_ListSessionInsightsRequest,
135
+ requestDeserialize: deserialize_gateway_web_v1_ListSessionInsightsRequest,
136
+ responseSerialize: serialize_gateway_web_v1_ListSessionInsightsResponse,
137
+ responseDeserialize: deserialize_gateway_web_v1_ListSessionInsightsResponse,
138
+ },
139
+ // The project's cards across local days, newest local day first and rank order within a day: each day's latest run,
140
+ // only when it is READY, with the run context each card is labelled with. Token pages. Mirrors ai.api.v1.
141
+ listProjectInsightCards: {
142
+ path: '/gateway.web.v1.AIInsightsGatewayService/ListProjectInsightCards',
143
+ requestStream: false,
144
+ responseStream: false,
145
+ requestType: proto_gateway_web_v1_ai_insights_gateway_pb.ListProjectInsightCardsRequest,
146
+ responseType: proto_gateway_web_v1_ai_insights_gateway_pb.ListProjectInsightCardsResponse,
147
+ requestSerialize: serialize_gateway_web_v1_ListProjectInsightCardsRequest,
148
+ requestDeserialize: deserialize_gateway_web_v1_ListProjectInsightCardsRequest,
149
+ responseSerialize: serialize_gateway_web_v1_ListProjectInsightCardsResponse,
150
+ responseDeserialize: deserialize_gateway_web_v1_ListProjectInsightCardsResponse,
151
+ },
152
+ // The caller's ratings of up to 100 of the project's insights; an insight they have not rated is left out rather
153
+ // than an error (unlike AIP-231). Mirrors ai.api.v1.
154
+ batchGetInsightRatings: {
155
+ path: '/gateway.web.v1.AIInsightsGatewayService/BatchGetInsightRatings',
156
+ requestStream: false,
157
+ responseStream: false,
158
+ requestType: proto_gateway_web_v1_ai_insights_gateway_pb.BatchGetInsightRatingsRequest,
159
+ responseType: proto_gateway_web_v1_ai_insights_gateway_pb.BatchGetInsightRatingsResponse,
160
+ requestSerialize: serialize_gateway_web_v1_BatchGetInsightRatingsRequest,
161
+ requestDeserialize: deserialize_gateway_web_v1_BatchGetInsightRatingsRequest,
162
+ responseSerialize: serialize_gateway_web_v1_BatchGetInsightRatingsResponse,
163
+ responseDeserialize: deserialize_gateway_web_v1_BatchGetInsightRatingsResponse,
164
+ },
165
+ // Records the caller's rating of one of their organization's project's insights, replacing any earlier one. An
166
+ // insight or score a re-analysis or regrade replaced, or one the project does not have, is a NOT_FOUND status. Mirrors ai.api.v1.
167
+ setInsightRating: {
168
+ path: '/gateway.web.v1.AIInsightsGatewayService/SetInsightRating',
169
+ requestStream: false,
170
+ responseStream: false,
171
+ requestType: proto_gateway_web_v1_ai_insights_gateway_pb.SetInsightRatingRequest,
172
+ responseType: proto_gateway_web_v1_ai_insights_gateway_pb.SetInsightRatingResponse,
173
+ requestSerialize: serialize_gateway_web_v1_SetInsightRatingRequest,
174
+ requestDeserialize: deserialize_gateway_web_v1_SetInsightRatingRequest,
175
+ responseSerialize: serialize_gateway_web_v1_SetInsightRatingResponse,
176
+ responseDeserialize: deserialize_gateway_web_v1_SetInsightRatingResponse,
177
+ },
178
+ // Removes the caller's rating of one insight; removing one that does not exist succeeds. Mirrors ai.api.v1.
179
+ deleteInsightRating: {
180
+ path: '/gateway.web.v1.AIInsightsGatewayService/DeleteInsightRating',
181
+ requestStream: false,
182
+ responseStream: false,
183
+ requestType: proto_gateway_web_v1_ai_insights_gateway_pb.DeleteInsightRatingRequest,
184
+ responseType: proto_gateway_web_v1_ai_insights_gateway_pb.DeleteInsightRatingResponse,
185
+ requestSerialize: serialize_gateway_web_v1_DeleteInsightRatingRequest,
186
+ requestDeserialize: deserialize_gateway_web_v1_DeleteInsightRatingRequest,
187
+ responseSerialize: serialize_gateway_web_v1_DeleteInsightRatingResponse,
188
+ responseDeserialize: deserialize_gateway_web_v1_DeleteInsightRatingResponse,
189
+ },
190
+ };
191
+
192
+ exports.AIInsightsGatewayServiceClient = grpc.makeGenericClientConstructor(AIInsightsGatewayServiceService, 'AIInsightsGatewayService');