@se-uulm/snowballr-grpc-client 0.2.0 → 0.2.1-alpha.2fd7ace
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.
- package/dist/authentication.d.ts +216 -0
- package/dist/{authentication.ts → authentication.js} +50 -155
- package/dist/base.d.ts +139 -0
- package/dist/{base.ts → base.js} +43 -108
- package/dist/criterion.d.ts +170 -0
- package/dist/{criterion.ts → criterion.js} +33 -122
- package/dist/export.d.ts +84 -0
- package/dist/{export.ts → export.js} +19 -65
- package/dist/fetcher.d.ts +161 -0
- package/dist/{fetcher.ts → fetcher.js} +30 -140
- package/dist/google/protobuf/{field_mask.ts → field_mask.d.ts} +10 -73
- package/dist/google/protobuf/field_mask.js +117 -0
- package/dist/google/protobuf/{timestamp.ts → timestamp.d.ts} +13 -111
- package/dist/google/protobuf/timestamp.js +166 -0
- package/dist/{main.client.ts → main.client.d.ts} +135 -362
- package/dist/main.client.js +1690 -0
- package/dist/main.d.ts +10 -0
- package/dist/{main.ts → main.js} +60 -54
- package/dist/paper.d.ts +217 -0
- package/dist/{paper.ts → paper.js} +41 -187
- package/dist/project.d.ts +866 -0
- package/dist/{project.ts → project.js} +195 -641
- package/dist/review.d.ts +153 -0
- package/dist/{review.ts → review.js} +33 -105
- package/dist/user.d.ts +157 -0
- package/dist/{user.ts → user.js} +33 -93
- package/dist/user_settings.d.ts +74 -0
- package/dist/{user_settings.ts → user_settings.js} +16 -59
- package/package.json +15 -6
|
@@ -0,0 +1,1690 @@
|
|
|
1
|
+
// @generated by protobuf-ts 2.11.1 with parameter generate_dependencies,output_javascript
|
|
2
|
+
// @generated from protobuf file "main.proto" (package "snowballr", syntax proto3)
|
|
3
|
+
// tslint:disable
|
|
4
|
+
//
|
|
5
|
+
/// Main file of the SnowballR service. Contains all RPCs.
|
|
6
|
+
//
|
|
7
|
+
import { SnowballR } from "./main.js";
|
|
8
|
+
import { stackIntercept } from "@protobuf-ts/runtime-rpc";
|
|
9
|
+
/**
|
|
10
|
+
* This service contains the complete set of API calls that the SnowballR web application uses to
|
|
11
|
+
* communicate with the backend.
|
|
12
|
+
*
|
|
13
|
+
* ## Overview
|
|
14
|
+
*
|
|
15
|
+
* SnowballR is a tool designed to assist with scientific research by organizing
|
|
16
|
+
* and managing structured literature reviews (SLRs). The application is split into
|
|
17
|
+
* a web frontend and a backend on a central server.
|
|
18
|
+
* The frontend is a web application that runs in the user's browser.
|
|
19
|
+
* The backend runs on a server and contains most, if not all, of the application logic.
|
|
20
|
+
* It tracks all data by accessing a database and makes requests to external resources like paper databases.
|
|
21
|
+
*
|
|
22
|
+
* ~~~mermaid
|
|
23
|
+
* architecture-beta
|
|
24
|
+
* group frontend(internet)[Frontend]
|
|
25
|
+
* service browser(internet)[Browser] in frontend
|
|
26
|
+
*
|
|
27
|
+
* group backend(server)[Backend]
|
|
28
|
+
* service server(server)[SnowballR Server] in backend
|
|
29
|
+
* service db(database)[Database] in backend
|
|
30
|
+
*
|
|
31
|
+
* group external(internet)[External Resources]
|
|
32
|
+
* service fetcher1(internet)[External Paper Database 1] in external
|
|
33
|
+
* service fetcher2(internet)[External Paper Database 2] in external
|
|
34
|
+
*
|
|
35
|
+
* junction j1 in external
|
|
36
|
+
* junction j2 in external
|
|
37
|
+
*
|
|
38
|
+
* browser:R --> L:server
|
|
39
|
+
*
|
|
40
|
+
* server:B --> T:db
|
|
41
|
+
* server:R -- L:j1
|
|
42
|
+
*
|
|
43
|
+
* j1:R -- L:j2
|
|
44
|
+
* j1:B --> T:fetcher1
|
|
45
|
+
* j2:B --> T:fetcher2
|
|
46
|
+
* ~~~
|
|
47
|
+
*
|
|
48
|
+
* ## Authentication
|
|
49
|
+
*
|
|
50
|
+
* A padlock icon in the top-right of a service method description indicates
|
|
51
|
+
* whether a call **requires** the user to be **authenticated**. This will
|
|
52
|
+
* happen automatically using an HTTP-only cookie set by the server during
|
|
53
|
+
* registration or login. If the authentication fails, an `UNAUTHENTICATED` error will
|
|
54
|
+
* be returned in all cases.
|
|
55
|
+
*
|
|
56
|
+
* ## Error Handling
|
|
57
|
+
*
|
|
58
|
+
* Furthermore, the server **may** respond with the `UNAVAILABLE` error
|
|
59
|
+
* code at any time if it is unable to process a request. It **may** also
|
|
60
|
+
* respond with the `INTERNAL` error code if some unknown server-side errors occur.
|
|
61
|
+
* If the [field mask](https://protobuf.dev/reference/java/api-docs/com/google/protobuf/FieldMask)
|
|
62
|
+
* is empty or contains an invalid format the server returns an `INVALID_ARGUMENT` error.
|
|
63
|
+
* This includes cases where the mask specifies fields that are not defined in the target object type.
|
|
64
|
+
* The error description provides additional details.
|
|
65
|
+
*
|
|
66
|
+
* Each error **should** come with a meaningful description, detailing the nature
|
|
67
|
+
* of the error that occurred.
|
|
68
|
+
*
|
|
69
|
+
* ## Update Semantics
|
|
70
|
+
*
|
|
71
|
+
* Updates are applied atomically. If one part of an update request cannot
|
|
72
|
+
* be fulfilled, the entire update fails and no changes are persisted.
|
|
73
|
+
* If the field mask specifies a field that is not allowed to be updated, the update request is rejected.
|
|
74
|
+
* In this case, the server responds with an `INVALID_ARGUMENT` error.
|
|
75
|
+
*
|
|
76
|
+
* ## Enums and Guarantees
|
|
77
|
+
*
|
|
78
|
+
* Each enum contains an `_UNSPECIFIED` variant to indicate that no meaningful value was set.
|
|
79
|
+
* If any other variant is present, the field is considered to be **specified**.
|
|
80
|
+
*
|
|
81
|
+
* The word **guaranteed** may only convey meaning in the context of this
|
|
82
|
+
* contract. Due to the nature of the underlying network communication, results
|
|
83
|
+
* can never really be **guaranteed**, so proper error handling is advised anyway. In the
|
|
84
|
+
* following context, **guaranteed** denotes a situation in which the client shall
|
|
85
|
+
* be able to safely make assumptions about a successfully received message.
|
|
86
|
+
*
|
|
87
|
+
* ## Entities and Relationships
|
|
88
|
+
*
|
|
89
|
+
* The following figure shows the relationships between the entities/concepts of the
|
|
90
|
+
* SnowballR application. It does not depict the actual database schema used by SnowballR's
|
|
91
|
+
* backend; rather, it provides a broader understanding.
|
|
92
|
+
*
|
|
93
|
+
* ~~~mermaid
|
|
94
|
+
* erDiagram
|
|
95
|
+
* direction LR
|
|
96
|
+
*
|
|
97
|
+
* Project 0+ -- 0+ User : "member of"
|
|
98
|
+
* Project 1 -- 1 ProjectSettings : has
|
|
99
|
+
* Project 1 -- 0+ ProjectPaper : contains
|
|
100
|
+
* Project 1 -- 0+ Criterion : contains
|
|
101
|
+
*
|
|
102
|
+
* ProjectSettings 0+ -- 1+ Fetcher : "fetches from"
|
|
103
|
+
*
|
|
104
|
+
* ProjectPaper 1 -- 0+ Review : has
|
|
105
|
+
* ProjectPaper 1 -- 1 Paper : "refers to"
|
|
106
|
+
*
|
|
107
|
+
* Review 0+ -- 1 User : by
|
|
108
|
+
* Review 0+ -- 0+ Criterion : "ticks off"
|
|
109
|
+
*
|
|
110
|
+
* User 1 -- 1 UserSettings : has
|
|
111
|
+
* User 0+ -- 0+ Paper : "on reading-list of"
|
|
112
|
+
* ~~~
|
|
113
|
+
*
|
|
114
|
+
* **Disclaimer:**
|
|
115
|
+
*
|
|
116
|
+
* Access control for these calls has not yet been fully worked out. Consequently,
|
|
117
|
+
* the required role for any call may change at any time.
|
|
118
|
+
*
|
|
119
|
+
*
|
|
120
|
+
* @generated from protobuf service snowballr.SnowballR
|
|
121
|
+
*/
|
|
122
|
+
export class SnowballRClient {
|
|
123
|
+
constructor(_transport) {
|
|
124
|
+
this._transport = _transport;
|
|
125
|
+
this.typeName = SnowballR.typeName;
|
|
126
|
+
this.methods = SnowballR.methods;
|
|
127
|
+
this.options = SnowballR.options;
|
|
128
|
+
}
|
|
129
|
+
/**
|
|
130
|
+
* Get all available fetchers from which a paper may be sourced by the backend.
|
|
131
|
+
* Each source is identified by a unique ID and is later used to specify
|
|
132
|
+
* which APIs will be used by a project to collect papers. The list is
|
|
133
|
+
* **guaranteed to be non-empty** but **may change** at any time.
|
|
134
|
+
*
|
|
135
|
+
* ## Errors
|
|
136
|
+
* | Error Code | Description |
|
|
137
|
+
* | :--- | :--- |
|
|
138
|
+
* | `UNAUTHENTICATED` | The user is not signed in. |
|
|
139
|
+
*
|
|
140
|
+
* @auth
|
|
141
|
+
*
|
|
142
|
+
* @generated from protobuf rpc: GetAvailableFetchers
|
|
143
|
+
*/
|
|
144
|
+
getAvailableFetchers(input, options) {
|
|
145
|
+
const method = this.methods[0], opt = this._transport.mergeOptions(options);
|
|
146
|
+
return stackIntercept("unary", this._transport, method, opt, input);
|
|
147
|
+
}
|
|
148
|
+
/**
|
|
149
|
+
* Create an account. The provided email address **must not already be registered**,
|
|
150
|
+
* and no field may be blank. If successful, login tokens are
|
|
151
|
+
* provided, which are used automatically for subsequent calls.
|
|
152
|
+
*
|
|
153
|
+
* The password string is **required** to
|
|
154
|
+
*
|
|
155
|
+
* - be at least **eight characters long**,
|
|
156
|
+
* - contain at least **two lower-case letters**,
|
|
157
|
+
* - contain at least **two upper-case letters**,
|
|
158
|
+
* - contain at least **two digits**,
|
|
159
|
+
* - and contain at least **two special characters**.
|
|
160
|
+
*
|
|
161
|
+
* ## Errors
|
|
162
|
+
* | Error Code | Description |
|
|
163
|
+
* | :--- | :--- |
|
|
164
|
+
* | `INVALID_ARGUMENT` | At least one input did not meet the requirements: The `email` must be a valid email address, the `password` must meet the previously stated criteria, and the `first_name` and `last_name` must not be left blank. |
|
|
165
|
+
* | `ALREADY_EXISTS` | An account with the provided email address is already registered. |
|
|
166
|
+
* | `INTERNAL` | The verification email could not be sent. |
|
|
167
|
+
*
|
|
168
|
+
* @generated from protobuf rpc: Register
|
|
169
|
+
*/
|
|
170
|
+
register(input, options) {
|
|
171
|
+
const method = this.methods[1], opt = this._transport.mergeOptions(options);
|
|
172
|
+
return stackIntercept("unary", this._transport, method, opt, input);
|
|
173
|
+
}
|
|
174
|
+
/**
|
|
175
|
+
* After registering, a user receives a verification token via email.
|
|
176
|
+
* This call is then used to submit that token, confirming the ownership of the
|
|
177
|
+
* email address and activating the user account.
|
|
178
|
+
*
|
|
179
|
+
* ## Errors
|
|
180
|
+
* | Error Code | Description |
|
|
181
|
+
* | :--- | :--- |
|
|
182
|
+
* | `INVALID_ARGUMENT` | No token was provided. |
|
|
183
|
+
* | `NOT_FOUND` | The provided token is invalid, could not be found, or has expired. |
|
|
184
|
+
*
|
|
185
|
+
* @generated from protobuf rpc: VerifyEmail
|
|
186
|
+
*/
|
|
187
|
+
verifyEmail(input, options) {
|
|
188
|
+
const method = this.methods[2], opt = this._transport.mergeOptions(options);
|
|
189
|
+
return stackIntercept("unary", this._transport, method, opt, input);
|
|
190
|
+
}
|
|
191
|
+
/**
|
|
192
|
+
* If the provided email address and password exactly match those of a user in the server's database and
|
|
193
|
+
* the user's email address has been verified, a new set of login tokens is
|
|
194
|
+
* provided to authenticate as that user. Old access and refresh tokens will remain valid.
|
|
195
|
+
* These credentials are handled automatically and do not require any further attention.
|
|
196
|
+
*
|
|
197
|
+
* ## Errors
|
|
198
|
+
* | Error Code | Description |
|
|
199
|
+
* | :--- | :--- |
|
|
200
|
+
* | `INVALID_ARGUMENT` | The email address is not a valid email address or no password was provided. |
|
|
201
|
+
* | `UNAUTHENTICATED` | The email address is not registered (anymore) or verified, or the password is incorrect. |
|
|
202
|
+
*
|
|
203
|
+
* @generated from protobuf rpc: Login
|
|
204
|
+
*/
|
|
205
|
+
login(input, options) {
|
|
206
|
+
const method = this.methods[3], opt = this._transport.mergeOptions(options);
|
|
207
|
+
return stackIntercept("unary", this._transport, method, opt, input);
|
|
208
|
+
}
|
|
209
|
+
/**
|
|
210
|
+
* Revoke access through the currently used set of access and refresh tokens.
|
|
211
|
+
* Other token pairs may not be affected.
|
|
212
|
+
*
|
|
213
|
+
* ## Errors
|
|
214
|
+
* | Error Code | Description |
|
|
215
|
+
* | :--- | :--- |
|
|
216
|
+
* | `UNAUTHENTICATED` | The user is not signed in. |
|
|
217
|
+
*
|
|
218
|
+
* @auth
|
|
219
|
+
*
|
|
220
|
+
* @generated from protobuf rpc: Logout
|
|
221
|
+
*/
|
|
222
|
+
logout(input, options) {
|
|
223
|
+
const method = this.methods[4], opt = this._transport.mergeOptions(options);
|
|
224
|
+
return stackIntercept("unary", this._transport, method, opt, input);
|
|
225
|
+
}
|
|
226
|
+
/**
|
|
227
|
+
* Acquire the client's authentication status. The result is **guaranteed to
|
|
228
|
+
* be specified**.
|
|
229
|
+
*
|
|
230
|
+
* ## Errors
|
|
231
|
+
* No additional errors may occur.
|
|
232
|
+
*
|
|
233
|
+
* @generated from protobuf rpc: GetAuthenticationStatus
|
|
234
|
+
*/
|
|
235
|
+
getAuthenticationStatus(input, options) {
|
|
236
|
+
const method = this.methods[5], opt = this._transport.mergeOptions(options);
|
|
237
|
+
return stackIntercept("unary", this._transport, method, opt, input);
|
|
238
|
+
}
|
|
239
|
+
/**
|
|
240
|
+
* Upon presentation of a valid refresh token, a new set of login tokens
|
|
241
|
+
* is issued, authenticating the owner of the token. This new pair is
|
|
242
|
+
* **guaranteed to contain valid credentials**. The refresh token **may
|
|
243
|
+
* change** too. These credentials are handled automatically and do not require any
|
|
244
|
+
* further attention.
|
|
245
|
+
*
|
|
246
|
+
* Use this call if the access token has expired, as it does not require the user to be authenticated using an access
|
|
247
|
+
* token. Instead, the validity of the accompanying refresh token — which is
|
|
248
|
+
* also set by [Register](#service-snowballr.SnowballR-Register) and [Login](#service-snowballr.SnowballR-Login) — is confirmed.
|
|
249
|
+
*
|
|
250
|
+
* ## Errors
|
|
251
|
+
* | Error Code | Description |
|
|
252
|
+
* | :--- | :--- |
|
|
253
|
+
* | `UNAUTHENTICATED` | The refresh token is invalid. |
|
|
254
|
+
*
|
|
255
|
+
* @auth
|
|
256
|
+
*
|
|
257
|
+
* @generated from protobuf rpc: RenewSession
|
|
258
|
+
*/
|
|
259
|
+
renewSession(input, options) {
|
|
260
|
+
const method = this.methods[6], opt = this._transport.mergeOptions(options);
|
|
261
|
+
return stackIntercept("unary", this._transport, method, opt, input);
|
|
262
|
+
}
|
|
263
|
+
/**
|
|
264
|
+
* If the provided email address belongs to an active user, the server sends a
|
|
265
|
+
* challenge/token to that address. This token must then be sent
|
|
266
|
+
* alongside a new password
|
|
267
|
+
* (see [ResetPassword](#service-snowballr.SnowballR-ResetPassword)) in order
|
|
268
|
+
* to update a lost or forgotten password.
|
|
269
|
+
*
|
|
270
|
+
* ## Errors
|
|
271
|
+
* | Error Code | Description |
|
|
272
|
+
* | :--- | :--- |
|
|
273
|
+
* | `INVALID_ARGUMENT` | The email address is not a valid email address. If the email address is valid, but has not yet been registered, this error does not occur. |
|
|
274
|
+
* | `INTERNAL` | The verification email could not be sent. |
|
|
275
|
+
*
|
|
276
|
+
* @generated from protobuf rpc: RequestPasswordReset
|
|
277
|
+
*/
|
|
278
|
+
requestPasswordReset(input, options) {
|
|
279
|
+
const method = this.methods[7], opt = this._transport.mergeOptions(options);
|
|
280
|
+
return stackIntercept("unary", this._transport, method, opt, input);
|
|
281
|
+
}
|
|
282
|
+
/**
|
|
283
|
+
* After requesting a password reset email using
|
|
284
|
+
* [RequestPasswordReset](#service-snowballr.SnowballR-RequestPasswordReset),
|
|
285
|
+
* this call may be used to actually set the new password. To verify the
|
|
286
|
+
* ownership of the account, the token sent via email must also be provided
|
|
287
|
+
* and valid. The new password must follow the same rules as during
|
|
288
|
+
* [registration](#service-snowballr.SnowballR-Register).
|
|
289
|
+
*
|
|
290
|
+
* ## Errors
|
|
291
|
+
* | Error Code | Description |
|
|
292
|
+
* | :--- | :--- |
|
|
293
|
+
* | `INVALID_ARGUMENT` | Either the provided token is invalid, or the new password does not meet the rules specified in [Register](#service-snowballr.SnowballR-Register). |
|
|
294
|
+
* | `FAILED_PRECONDITION` | The user is not active (i.e., in state `USER_STATUS_ACTIVE`). |
|
|
295
|
+
* | `UNAUTHENTICATED` | The provided token could not be found or has expired. |
|
|
296
|
+
*
|
|
297
|
+
* @generated from protobuf rpc: ResetPassword
|
|
298
|
+
*/
|
|
299
|
+
resetPassword(input, options) {
|
|
300
|
+
const method = this.methods[8], opt = this._transport.mergeOptions(options);
|
|
301
|
+
return stackIntercept("unary", this._transport, method, opt, input);
|
|
302
|
+
}
|
|
303
|
+
/**
|
|
304
|
+
* Set a new password using the old password.
|
|
305
|
+
* The new password must follow the same rules as during
|
|
306
|
+
* [registration](#service-snowballr.SnowballR-Register). This serves no
|
|
307
|
+
* recovery purpose and is for user convenience only.
|
|
308
|
+
*
|
|
309
|
+
* ## Errors
|
|
310
|
+
* | Error Code | Description |
|
|
311
|
+
* | :--- | :--- |
|
|
312
|
+
* | `INVALID_ARGUMENT` | Either the provided old password is incorrect, or the new password does not meet the rules specified in [Register](#service-snowballr.SnowballR-Register). |
|
|
313
|
+
* | `FAILED_PRECONDITION` | The user is not active (i.e., in state `USER_STATUS_ACTIVE`). |
|
|
314
|
+
* | `UNAUTHENTICATED` | The user is not signed in. |
|
|
315
|
+
*
|
|
316
|
+
* @auth
|
|
317
|
+
*
|
|
318
|
+
* @generated from protobuf rpc: ChangePassword
|
|
319
|
+
*/
|
|
320
|
+
changePassword(input, options) {
|
|
321
|
+
const method = this.methods[9], opt = this._transport.mergeOptions(options);
|
|
322
|
+
return stackIntercept("unary", this._transport, method, opt, input);
|
|
323
|
+
}
|
|
324
|
+
/**
|
|
325
|
+
* Get all registered users.
|
|
326
|
+
*
|
|
327
|
+
* ## Errors
|
|
328
|
+
* | Error Code | Description |
|
|
329
|
+
* | :--- | :--- |
|
|
330
|
+
* | `PERMISSION_DENIED` | The calling user is not a server admin. |
|
|
331
|
+
* | `UNAUTHENTICATED` | The user is not signed in. |
|
|
332
|
+
*
|
|
333
|
+
* @auth
|
|
334
|
+
*
|
|
335
|
+
* @generated from protobuf rpc: GetAllUsers
|
|
336
|
+
*/
|
|
337
|
+
getAllUsers(input, options) {
|
|
338
|
+
const method = this.methods[10], opt = this._transport.mergeOptions(options);
|
|
339
|
+
return stackIntercept("unary", this._transport, method, opt, input);
|
|
340
|
+
}
|
|
341
|
+
/**
|
|
342
|
+
* Get the user who is currently logged in by looking up the provided access
|
|
343
|
+
* token. **If the user is properly authenticated, this call is guaranteed to return a valid
|
|
344
|
+
* user.**
|
|
345
|
+
*
|
|
346
|
+
* ## Errors
|
|
347
|
+
* | Error Code | Description |
|
|
348
|
+
* | :--- | :--- |
|
|
349
|
+
* | `UNAUTHENTICATED` | The user is not signed in. |
|
|
350
|
+
*
|
|
351
|
+
* @auth
|
|
352
|
+
*
|
|
353
|
+
* @generated from protobuf rpc: GetCurrentUser
|
|
354
|
+
*/
|
|
355
|
+
getCurrentUser(input, options) {
|
|
356
|
+
const method = this.methods[11], opt = this._transport.mergeOptions(options);
|
|
357
|
+
return stackIntercept("unary", this._transport, method, opt, input);
|
|
358
|
+
}
|
|
359
|
+
/**
|
|
360
|
+
* Get a user by their ID.
|
|
361
|
+
*
|
|
362
|
+
* ## Errors
|
|
363
|
+
* | Error Code | Description |
|
|
364
|
+
* | :--- | :--- |
|
|
365
|
+
* | `INVALID_ARGUMENT` | The user ID is not a valid UUID. |
|
|
366
|
+
* | `NOT_FOUND` | No user with the provided ID was found. |
|
|
367
|
+
* | `PERMISSION_DENIED` | The calling user is neither a server admin nor a member of the same project as the requested user. |
|
|
368
|
+
* | `UNAUTHENTICATED` | The user is not signed in. |
|
|
369
|
+
*
|
|
370
|
+
* @auth
|
|
371
|
+
*
|
|
372
|
+
* @generated from protobuf rpc: GetUserById
|
|
373
|
+
*/
|
|
374
|
+
getUserById(input, options) {
|
|
375
|
+
const method = this.methods[12], opt = this._transport.mergeOptions(options);
|
|
376
|
+
return stackIntercept("unary", this._transport, method, opt, input);
|
|
377
|
+
}
|
|
378
|
+
/**
|
|
379
|
+
* Get the user with the specified email address.
|
|
380
|
+
*
|
|
381
|
+
* ## Errors
|
|
382
|
+
* | Error Code | Description |
|
|
383
|
+
* | :--- | :--- |
|
|
384
|
+
* | `INVALID_ARGUMENT` | The email address is not a valid email address. |
|
|
385
|
+
* | `NOT_FOUND` | No user with the provided email address was found. |
|
|
386
|
+
* | `PERMISSION_DENIED` | The calling user is neither a server admin nor a member of the same project as the requested user. |
|
|
387
|
+
* | `UNAUTHENTICATED` | The user is not signed in. |
|
|
388
|
+
*
|
|
389
|
+
* @auth
|
|
390
|
+
*
|
|
391
|
+
* @generated from protobuf rpc: GetUserByEmail
|
|
392
|
+
*/
|
|
393
|
+
getUserByEmail(input, options) {
|
|
394
|
+
const method = this.methods[13], opt = this._transport.mergeOptions(options);
|
|
395
|
+
return stackIntercept("unary", this._transport, method, opt, input);
|
|
396
|
+
}
|
|
397
|
+
/**
|
|
398
|
+
* Update all attributes specified in the field mask for the user with the
|
|
399
|
+
* provided ID, except the `status` field. A server admin may update the `role` field using this call.
|
|
400
|
+
* The updated user is returned and **guaranteed to be specified**.
|
|
401
|
+
*
|
|
402
|
+
* ## Errors
|
|
403
|
+
* | Error Code | Description |
|
|
404
|
+
* | :--- | :--- |
|
|
405
|
+
* | `INVALID_ARGUMENT` | At least one (updated) user detail did not meet the requirements: The `id` must be a valid UUID, the `email` must be a valid email address, the `first_name` and `last_name` must not be left blank, and the `role` must be specified. |
|
|
406
|
+
* | `NOT_FOUND` | No user with the provided ID was found. |
|
|
407
|
+
* | `ALREADY_EXISTS` | Another user with the provided email address already exists. |
|
|
408
|
+
* | `PERMISSION_DENIED` | The calling user is neither a server admin nor the requested user themselves. |
|
|
409
|
+
* | `FAILED_PRECONDITION` | The user is not active (i.e., in state `USER_STATUS_ACTIVE`). |
|
|
410
|
+
* | `UNAUTHENTICATED` | The user is not signed in. |
|
|
411
|
+
*
|
|
412
|
+
* @auth
|
|
413
|
+
*
|
|
414
|
+
* @generated from protobuf rpc: UpdateUser
|
|
415
|
+
*/
|
|
416
|
+
updateUser(input, options) {
|
|
417
|
+
const method = this.methods[14], opt = this._transport.mergeOptions(options);
|
|
418
|
+
return stackIntercept("unary", this._transport, method, opt, input);
|
|
419
|
+
}
|
|
420
|
+
/**
|
|
421
|
+
* Prevent the user with the provided ID from logging in. They are not fully
|
|
422
|
+
* deleted from the database but are no longer considered an **active** user.
|
|
423
|
+
*
|
|
424
|
+
* ## Errors
|
|
425
|
+
* | Error Code | Description |
|
|
426
|
+
* | :--- | :--- |
|
|
427
|
+
* | `INVALID_ARGUMENT` | The user ID is not a valid UUID. |
|
|
428
|
+
* | `NOT_FOUND` | No user with the provided ID was found. |
|
|
429
|
+
* | `PERMISSION_DENIED` | The calling user is neither a server admin nor the requested user themselves. |
|
|
430
|
+
* | `FAILED_PRECONDITION` | The user to be deleted is a server admin or the last project admin in any non-deleted project. |
|
|
431
|
+
* | `UNAUTHENTICATED` | The user is not signed in. |
|
|
432
|
+
*
|
|
433
|
+
* @auth
|
|
434
|
+
*
|
|
435
|
+
* @generated from protobuf rpc: SoftDeleteUser
|
|
436
|
+
*/
|
|
437
|
+
softDeleteUser(input, options) {
|
|
438
|
+
const method = this.methods[15], opt = this._transport.mergeOptions(options);
|
|
439
|
+
return stackIntercept("unary", this._transport, method, opt, input);
|
|
440
|
+
}
|
|
441
|
+
/**
|
|
442
|
+
* Allow a previously soft-deleted user to log in again.
|
|
443
|
+
* The calling user is **required to be an admin**.
|
|
444
|
+
*
|
|
445
|
+
* ## Errors
|
|
446
|
+
* | Error Code | Description |
|
|
447
|
+
* | :--- | :--- |
|
|
448
|
+
* | `INVALID_ARGUMENT` | The user ID is not a valid UUID. |
|
|
449
|
+
* | `NOT_FOUND` | No user with the provided ID was found. |
|
|
450
|
+
* | `PERMISSION_DENIED` | The calling user is not a server admin. |
|
|
451
|
+
* | `FAILED_PRECONDITION` | The user to be restored is not deleted (i.e., not in state `USER_STATUS_DELETED`). |
|
|
452
|
+
* | `UNAUTHENTICATED` | The user is not signed in. |
|
|
453
|
+
*
|
|
454
|
+
* @auth
|
|
455
|
+
*
|
|
456
|
+
* @generated from protobuf rpc: SoftUndeleteUser
|
|
457
|
+
*/
|
|
458
|
+
softUndeleteUser(input, options) {
|
|
459
|
+
const method = this.methods[16], opt = this._transport.mergeOptions(options);
|
|
460
|
+
return stackIntercept("unary", this._transport, method, opt, input);
|
|
461
|
+
}
|
|
462
|
+
/**
|
|
463
|
+
* Get the user-specific settings for the calling user. The user settings are returned and **guaranteed to be specified**.
|
|
464
|
+
*
|
|
465
|
+
* ## Errors
|
|
466
|
+
* | Error Code | Description |
|
|
467
|
+
* | :--- | :--- |
|
|
468
|
+
* | `NOT_FOUND` | No user settings were found for the calling user. |
|
|
469
|
+
* | `UNAUTHENTICATED` | The user is not signed in. |
|
|
470
|
+
*
|
|
471
|
+
* @auth
|
|
472
|
+
*
|
|
473
|
+
* @generated from protobuf rpc: GetUserSettings
|
|
474
|
+
*/
|
|
475
|
+
getUserSettings(input, options) {
|
|
476
|
+
const method = this.methods[17], opt = this._transport.mergeOptions(options);
|
|
477
|
+
return stackIntercept("unary", this._transport, method, opt, input);
|
|
478
|
+
}
|
|
479
|
+
/**
|
|
480
|
+
* Update all attributes specified in the field mask for the user settings of the calling user.
|
|
481
|
+
* The updated user settings are returned and **guaranteed to be specified**.
|
|
482
|
+
*
|
|
483
|
+
* ## Errors
|
|
484
|
+
* | Error Code | Description |
|
|
485
|
+
* | :--- | :--- |
|
|
486
|
+
* | `INVALID_ARGUMENT` | At least one updated setting did not meet the requirements. |
|
|
487
|
+
* | `FAILED_PRECONDITION` | The user is not active (i.e., in state `USER_STATUS_ACTIVE`). |
|
|
488
|
+
* | `UNAUTHENTICATED` | The user is not signed in. |
|
|
489
|
+
*
|
|
490
|
+
* @auth
|
|
491
|
+
*
|
|
492
|
+
* @generated from protobuf rpc: UpdateUserSettings
|
|
493
|
+
*/
|
|
494
|
+
updateUserSettings(input, options) {
|
|
495
|
+
const method = this.methods[18], opt = this._transport.mergeOptions(options);
|
|
496
|
+
return stackIntercept("unary", this._transport, method, opt, input);
|
|
497
|
+
}
|
|
498
|
+
/**
|
|
499
|
+
* Get all project papers that the calling user can review. It is not
|
|
500
|
+
* guaranteed that the returned papers belong to the same project.
|
|
501
|
+
* The returned paper list **may be empty** if no papers can be reviewed.
|
|
502
|
+
*
|
|
503
|
+
* ## Errors
|
|
504
|
+
* | Error Code | Description |
|
|
505
|
+
* | :--- | :--- |
|
|
506
|
+
* | `UNAUTHENTICATED` | The user is not signed in. |
|
|
507
|
+
*
|
|
508
|
+
* @auth
|
|
509
|
+
*
|
|
510
|
+
* @generated from protobuf rpc: GetAllPapersToReview
|
|
511
|
+
*/
|
|
512
|
+
getAllPapersToReview(input, options) {
|
|
513
|
+
const method = this.methods[19], opt = this._transport.mergeOptions(options);
|
|
514
|
+
return stackIntercept("unary", this._transport, method, opt, input);
|
|
515
|
+
}
|
|
516
|
+
/**
|
|
517
|
+
* Get all project papers from the project identified by its ID that
|
|
518
|
+
* the calling user can review.
|
|
519
|
+
* The returned paper list **may be empty** if no papers can be reviewed.
|
|
520
|
+
*
|
|
521
|
+
* ## Errors
|
|
522
|
+
* | Error Code | Description |
|
|
523
|
+
* | :--- | :--- |
|
|
524
|
+
* | `INVALID_ARGUMENT` | The project ID is not a valid UUID. |
|
|
525
|
+
* | `NOT_FOUND` | No project with the provided ID was found. |
|
|
526
|
+
* | `PERMISSION_DENIED` | The calling user is neither a server admin nor a member of the project. |
|
|
527
|
+
* | `UNAUTHENTICATED` | The user is not signed in. |
|
|
528
|
+
*
|
|
529
|
+
* @auth
|
|
530
|
+
*
|
|
531
|
+
* @generated from protobuf rpc: GetPapersToReviewForProject
|
|
532
|
+
*/
|
|
533
|
+
getPapersToReviewForProject(input, options) {
|
|
534
|
+
const method = this.methods[20], opt = this._transport.mergeOptions(options);
|
|
535
|
+
return stackIntercept("unary", this._transport, method, opt, input);
|
|
536
|
+
}
|
|
537
|
+
/**
|
|
538
|
+
* Get the project paper with the succeeding local ID (`local_id`) of the project paper
|
|
539
|
+
* identified by the provided global ID (`id`). It is **guaranteed** that the
|
|
540
|
+
* returned paper is in the same project as the provided one.
|
|
541
|
+
*
|
|
542
|
+
* ## Errors
|
|
543
|
+
* | Error Code | Description |
|
|
544
|
+
* | :--- | :--- |
|
|
545
|
+
* | `INVALID_ARGUMENT` | The project paper ID is not a valid UUID. |
|
|
546
|
+
* | `NOT_FOUND` | No project paper with the provided ID was found. |
|
|
547
|
+
* | `PERMISSION_DENIED` | The calling user is neither a server admin nor a member of the project the project paper belongs to. |
|
|
548
|
+
* | `FAILED_PRECONDITION` | There is no next project paper in the project. |
|
|
549
|
+
* | `UNAUTHENTICATED` | The user is not signed in. |
|
|
550
|
+
*
|
|
551
|
+
* @auth
|
|
552
|
+
*
|
|
553
|
+
* @generated from protobuf rpc: GetNextPaper
|
|
554
|
+
*/
|
|
555
|
+
getNextPaper(input, options) {
|
|
556
|
+
const method = this.methods[21], opt = this._transport.mergeOptions(options);
|
|
557
|
+
return stackIntercept("unary", this._transport, method, opt, input);
|
|
558
|
+
}
|
|
559
|
+
/**
|
|
560
|
+
* Get the next project paper that the calling user can review. Papers with
|
|
561
|
+
* lower local IDs are preferred. It is **guaranteed** that the returned paper
|
|
562
|
+
* is in the same project as the provided one.
|
|
563
|
+
*
|
|
564
|
+
* ## Errors
|
|
565
|
+
* | Error Code | Description |
|
|
566
|
+
* | :--- | :--- |
|
|
567
|
+
* | `INVALID_ARGUMENT` | The project paper ID is not a valid UUID. |
|
|
568
|
+
* | `NOT_FOUND` | No project paper with the provided ID was found. |
|
|
569
|
+
* | `PERMISSION_DENIED` | The calling user is neither a server admin nor a member of the project the project paper belongs to. |
|
|
570
|
+
* | `FAILED_PRECONDITION` | There is no next project paper available to review in the project. |
|
|
571
|
+
* | `UNAUTHENTICATED` | The user is not signed in. |
|
|
572
|
+
*
|
|
573
|
+
* @auth
|
|
574
|
+
*
|
|
575
|
+
* @generated from protobuf rpc: GetNextPaperToReview
|
|
576
|
+
*/
|
|
577
|
+
getNextPaperToReview(input, options) {
|
|
578
|
+
const method = this.methods[22], opt = this._transport.mergeOptions(options);
|
|
579
|
+
return stackIntercept("unary", this._transport, method, opt, input);
|
|
580
|
+
}
|
|
581
|
+
/**
|
|
582
|
+
* Get the project paper with the previous local ID (`local_id`) of the project paper
|
|
583
|
+
* identified by the provided global ID (`id`). It is **guaranteed** that the
|
|
584
|
+
* returned paper is in the same project as the provided one.
|
|
585
|
+
*
|
|
586
|
+
* ## Errors
|
|
587
|
+
* | Error Code | Description |
|
|
588
|
+
* | :--- | :--- |
|
|
589
|
+
* | `INVALID_ARGUMENT` | The project paper ID is not a valid UUID. |
|
|
590
|
+
* | `NOT_FOUND` | No project paper with the provided ID was found. |
|
|
591
|
+
* | `PERMISSION_DENIED` | The calling user is neither a server admin nor a member of the project the project paper belongs to. |
|
|
592
|
+
* | `FAILED_PRECONDITION` | There is no previous project paper in the project. |
|
|
593
|
+
* | `UNAUTHENTICATED` | The user is not signed in. |
|
|
594
|
+
*
|
|
595
|
+
* @auth
|
|
596
|
+
*
|
|
597
|
+
* @generated from protobuf rpc: GetPreviousPaper
|
|
598
|
+
*/
|
|
599
|
+
getPreviousPaper(input, options) {
|
|
600
|
+
const method = this.methods[23], opt = this._transport.mergeOptions(options);
|
|
601
|
+
return stackIntercept("unary", this._transport, method, opt, input);
|
|
602
|
+
}
|
|
603
|
+
/**
|
|
604
|
+
* Get the list of papers on the reading list of the calling user.
|
|
605
|
+
*
|
|
606
|
+
* ## Errors
|
|
607
|
+
* | Error Code | Description |
|
|
608
|
+
* | :--- | :--- |
|
|
609
|
+
* | `UNAUTHENTICATED` | The user is not signed in. |
|
|
610
|
+
*
|
|
611
|
+
* @auth
|
|
612
|
+
*
|
|
613
|
+
* @generated from protobuf rpc: GetReadingList
|
|
614
|
+
*/
|
|
615
|
+
getReadingList(input, options) {
|
|
616
|
+
const method = this.methods[24], opt = this._transport.mergeOptions(options);
|
|
617
|
+
return stackIntercept("unary", this._transport, method, opt, input);
|
|
618
|
+
}
|
|
619
|
+
/**
|
|
620
|
+
* Return whether the paper with the provided ID is on the calling
|
|
621
|
+
* user's reading list.
|
|
622
|
+
*
|
|
623
|
+
* ## Errors
|
|
624
|
+
* | Error Code | Description |
|
|
625
|
+
* | :--- | :--- |
|
|
626
|
+
* | `INVALID_ARGUMENT` | The paper ID is not a valid UUID. |
|
|
627
|
+
* | `NOT_FOUND` | No paper with the provided ID was found. |
|
|
628
|
+
* | `UNAUTHENTICATED` | The user is not signed in. |
|
|
629
|
+
*
|
|
630
|
+
* @auth
|
|
631
|
+
*
|
|
632
|
+
* @generated from protobuf rpc: IsPaperOnReadingList
|
|
633
|
+
*/
|
|
634
|
+
isPaperOnReadingList(input, options) {
|
|
635
|
+
const method = this.methods[25], opt = this._transport.mergeOptions(options);
|
|
636
|
+
return stackIntercept("unary", this._transport, method, opt, input);
|
|
637
|
+
}
|
|
638
|
+
/**
|
|
639
|
+
* Add the paper with the provided ID to the calling user's reading list. If
|
|
640
|
+
* the paper is already on the reading list, nothing will be changed
|
|
641
|
+
* and no error will be returned.
|
|
642
|
+
*
|
|
643
|
+
* ## Errors
|
|
644
|
+
* | Error Code | Description |
|
|
645
|
+
* | :--- | :--- |
|
|
646
|
+
* | `INVALID_ARGUMENT` | The paper ID is not a valid UUID. |
|
|
647
|
+
* | `NOT_FOUND` | No paper with the provided ID was found. |
|
|
648
|
+
* | `UNAUTHENTICATED` | The user is not signed in. |
|
|
649
|
+
*
|
|
650
|
+
* @auth
|
|
651
|
+
*
|
|
652
|
+
* @generated from protobuf rpc: AddPaperToReadingList
|
|
653
|
+
*/
|
|
654
|
+
addPaperToReadingList(input, options) {
|
|
655
|
+
const method = this.methods[26], opt = this._transport.mergeOptions(options);
|
|
656
|
+
return stackIntercept("unary", this._transport, method, opt, input);
|
|
657
|
+
}
|
|
658
|
+
/**
|
|
659
|
+
* Remove the paper with the provided ID from the calling user's reading
|
|
660
|
+
* list.
|
|
661
|
+
*
|
|
662
|
+
* ## Errors
|
|
663
|
+
* | Error Code | Description |
|
|
664
|
+
* | :--- | :--- |
|
|
665
|
+
* | `INVALID_ARGUMENT` | The paper ID is not a valid UUID. |
|
|
666
|
+
* | `NOT_FOUND` | No paper with the provided ID was found. |
|
|
667
|
+
* | `UNAUTHENTICATED` | The user is not signed in. |
|
|
668
|
+
*
|
|
669
|
+
* @auth
|
|
670
|
+
*
|
|
671
|
+
* @generated from protobuf rpc: RemovePaperFromReadingList
|
|
672
|
+
*/
|
|
673
|
+
removePaperFromReadingList(input, options) {
|
|
674
|
+
const method = this.methods[27], opt = this._transport.mergeOptions(options);
|
|
675
|
+
return stackIntercept("unary", this._transport, method, opt, input);
|
|
676
|
+
}
|
|
677
|
+
/**
|
|
678
|
+
* Get a list of users that match the search query and can be invited.
|
|
679
|
+
* If the query is too short or no users match, an empty list is returned.
|
|
680
|
+
* If a project is specified, i.e., a project ID is given, all current members
|
|
681
|
+
* of that project are excluded from the candidate list. In case no project with the given ID exists,
|
|
682
|
+
* no project members are filtered out from the candidate list. The calling user is always excluded
|
|
683
|
+
* from the candidate list.
|
|
684
|
+
*
|
|
685
|
+
* ## Errors
|
|
686
|
+
* | Error Code | Description |
|
|
687
|
+
* | :--- | :--- |
|
|
688
|
+
* | `UNAUTHENTICATED` | The user is not signed in. |
|
|
689
|
+
*
|
|
690
|
+
* @auth
|
|
691
|
+
*
|
|
692
|
+
* @generated from protobuf rpc: GetInviteCandidates
|
|
693
|
+
*/
|
|
694
|
+
getInviteCandidates(input, options) {
|
|
695
|
+
const method = this.methods[28], opt = this._transport.mergeOptions(options);
|
|
696
|
+
return stackIntercept("unary", this._transport, method, opt, input);
|
|
697
|
+
}
|
|
698
|
+
/**
|
|
699
|
+
* Invite a user to a project. If the user is already a project member or invitee, nothing happens.
|
|
700
|
+
* The provided project must be active, meaning it is neither deleted nor archived.
|
|
701
|
+
* An invitation email is sent to the specified email address.
|
|
702
|
+
* The recipient may need to register first and then accept the invitation.
|
|
703
|
+
* The calling user is **required to be a project admin**.
|
|
704
|
+
*
|
|
705
|
+
* ## Errors
|
|
706
|
+
* | Error Code | Description |
|
|
707
|
+
* | :--- | :--- |
|
|
708
|
+
* | `INVALID_ARGUMENT` | The email address is not a valid email address, or the project ID is not a valid UUID. |
|
|
709
|
+
* | `NOT_FOUND` | No project with the provided ID was found. |
|
|
710
|
+
* | `PERMISSION_DENIED` | The calling user is neither a server admin nor a project admin of the project. |
|
|
711
|
+
* | `FAILED_PRECONDITION` | The project is not active (i.e., archived or deleted). |
|
|
712
|
+
* | `INTERNAL` | The invitation email could not be sent. |
|
|
713
|
+
* | `UNAUTHENTICATED` | The user is not signed in. |
|
|
714
|
+
*
|
|
715
|
+
* @auth
|
|
716
|
+
*
|
|
717
|
+
* @generated from protobuf rpc: InviteUserToProject
|
|
718
|
+
*/
|
|
719
|
+
inviteUserToProject(input, options) {
|
|
720
|
+
const method = this.methods[29], opt = this._transport.mergeOptions(options);
|
|
721
|
+
return stackIntercept("unary", this._transport, method, opt, input);
|
|
722
|
+
}
|
|
723
|
+
/**
|
|
724
|
+
* Accept a project invitation. After inviting a user to a project, the invited user
|
|
725
|
+
* receives an email containing the link to accept the invitation. This call is used to
|
|
726
|
+
* accept that invitation.
|
|
727
|
+
*
|
|
728
|
+
* ## Errors
|
|
729
|
+
* | Error Code | Description |
|
|
730
|
+
* | :--- | :--- |
|
|
731
|
+
* | `INVALID_ARGUMENT` | No token was provided. |
|
|
732
|
+
* | `NOT_FOUND` | The provided token is invalid, could not be found, or has expired. |
|
|
733
|
+
* | `FAILED_PRECONDITION` | The user is not registered or not active (i.e., not in state `USER_STATUS_ACTIVE`). |
|
|
734
|
+
*
|
|
735
|
+
* @generated from protobuf rpc: AcceptProjectInvitation
|
|
736
|
+
*/
|
|
737
|
+
acceptProjectInvitation(input, options) {
|
|
738
|
+
const method = this.methods[30], opt = this._transport.mergeOptions(options);
|
|
739
|
+
return stackIntercept("unary", this._transport, method, opt, input);
|
|
740
|
+
}
|
|
741
|
+
/**
|
|
742
|
+
* Get a list of all users with a pending invitation to the specified project.
|
|
743
|
+
* If the `id` field of the returned user is specified, it is **guaranteed** that the user exists.
|
|
744
|
+
* If the field is blank, the user was invited by email and has not yet registered.
|
|
745
|
+
*
|
|
746
|
+
* ## Errors
|
|
747
|
+
* | Error Code | Description |
|
|
748
|
+
* | :--- | :--- |
|
|
749
|
+
* | `INVALID_ARGUMENT` | The project ID is not a valid UUID. |
|
|
750
|
+
* | `NOT_FOUND` | No project with the provided ID was found. |
|
|
751
|
+
* | `PERMISSION_DENIED` | The calling user is neither a server admin nor a member of the project. |
|
|
752
|
+
* | `UNAUTHENTICATED` | The user is not signed in. |
|
|
753
|
+
*
|
|
754
|
+
* @auth
|
|
755
|
+
*
|
|
756
|
+
* @generated from protobuf rpc: GetPendingInvitationsForProject
|
|
757
|
+
*/
|
|
758
|
+
getPendingInvitationsForProject(input, options) {
|
|
759
|
+
const method = this.methods[31], opt = this._transport.mergeOptions(options);
|
|
760
|
+
return stackIntercept("unary", this._transport, method, opt, input);
|
|
761
|
+
}
|
|
762
|
+
/**
|
|
763
|
+
* Get a list of all members of the specified project. The calling user is
|
|
764
|
+
* included. Pending invitations are excluded.
|
|
765
|
+
*
|
|
766
|
+
* ## Errors
|
|
767
|
+
* | Error Code | Description |
|
|
768
|
+
* | :--- | :--- |
|
|
769
|
+
* | `INVALID_ARGUMENT` | The project ID is not a valid UUID. |
|
|
770
|
+
* | `NOT_FOUND` | No project with the provided ID was found. |
|
|
771
|
+
* | `PERMISSION_DENIED` | The calling user is neither a server admin nor a member of the project. |
|
|
772
|
+
* | `UNAUTHENTICATED` | The user is not signed in. |
|
|
773
|
+
*
|
|
774
|
+
* @auth
|
|
775
|
+
*
|
|
776
|
+
* @generated from protobuf rpc: GetProjectMembers
|
|
777
|
+
*/
|
|
778
|
+
getProjectMembers(input, options) {
|
|
779
|
+
const method = this.methods[32], opt = this._transport.mergeOptions(options);
|
|
780
|
+
return stackIntercept("unary", this._transport, method, opt, input);
|
|
781
|
+
}
|
|
782
|
+
/**
|
|
783
|
+
* Remove the specified user or invitee from the specified project. If the user is not part
|
|
784
|
+
* of the project, nothing happens. The calling user is **required to be a
|
|
785
|
+
* project admin**. If there is only one project admin, then the user cannot be removed from the project.
|
|
786
|
+
*
|
|
787
|
+
* ## Errors
|
|
788
|
+
* | Error Code | Description |
|
|
789
|
+
* | :--- | :--- |
|
|
790
|
+
* | `INVALID_ARGUMENT` | The project ID is not a valid UUID or the user's email address is not a valid email address. |
|
|
791
|
+
* | `NOT_FOUND` | No project with the provided project ID or user with the provided user ID was found. |
|
|
792
|
+
* | `PERMISSION_DENIED` | The calling user is neither a server admin nor a project admin of the project, nor the project member themselves. |
|
|
793
|
+
* | `FAILED_PRECONDITION` | The project member to be removed is the last project admin in the project. |
|
|
794
|
+
* | `UNAUTHENTICATED` | The user is not signed in. |
|
|
795
|
+
*
|
|
796
|
+
* @auth
|
|
797
|
+
*
|
|
798
|
+
* @generated from protobuf rpc: RemoveProjectMember
|
|
799
|
+
*/
|
|
800
|
+
removeProjectMember(input, options) {
|
|
801
|
+
const method = this.methods[33], opt = this._transport.mergeOptions(options);
|
|
802
|
+
return stackIntercept("unary", this._transport, method, opt, input);
|
|
803
|
+
}
|
|
804
|
+
/**
|
|
805
|
+
* Change the role of the user with the provided ID within the specified project.
|
|
806
|
+
* The new role **must be specified**.
|
|
807
|
+
* The calling user is **required to be a project admin**.
|
|
808
|
+
*
|
|
809
|
+
* ## Errors
|
|
810
|
+
* | Error Code | Description |
|
|
811
|
+
* | :--- | :--- |
|
|
812
|
+
* | `INVALID_ARGUMENT` | The project ID or the user ID is not a valid UUID, or the provided new role is not specified. |
|
|
813
|
+
* | `NOT_FOUND` | No project with the provided ID or user with the provided ID was found. |
|
|
814
|
+
* | `PERMISSION_DENIED` | The calling user is neither a server admin nor a project admin of the project. |
|
|
815
|
+
* | `FAILED_PRECONDITION` | The user to be updated is not a member of the specified project or is the last project admin and should be demoted to a project member. |
|
|
816
|
+
* | `UNAUTHENTICATED` | The user is not signed in. |
|
|
817
|
+
*
|
|
818
|
+
* @auth
|
|
819
|
+
*
|
|
820
|
+
* @generated from protobuf rpc: UpdateProjectMemberRole
|
|
821
|
+
*/
|
|
822
|
+
updateProjectMemberRole(input, options) {
|
|
823
|
+
const method = this.methods[34], opt = this._transport.mergeOptions(options);
|
|
824
|
+
return stackIntercept("unary", this._transport, method, opt, input);
|
|
825
|
+
}
|
|
826
|
+
/**
|
|
827
|
+
* Get a list of all active projects.
|
|
828
|
+
*
|
|
829
|
+
* ## Errors
|
|
830
|
+
* | Error Code | Description |
|
|
831
|
+
* | :--- | :--- |
|
|
832
|
+
* | `PERMISSION_DENIED` | The calling user is not a server admin. |
|
|
833
|
+
* | `UNAUTHENTICATED` | The user is not signed in. |
|
|
834
|
+
*
|
|
835
|
+
* @auth
|
|
836
|
+
*
|
|
837
|
+
* @generated from protobuf rpc: GetAllProjects
|
|
838
|
+
*/
|
|
839
|
+
getAllProjects(input, options) {
|
|
840
|
+
const method = this.methods[35], opt = this._transport.mergeOptions(options);
|
|
841
|
+
return stackIntercept("unary", this._transport, method, opt, input);
|
|
842
|
+
}
|
|
843
|
+
/**
|
|
844
|
+
* Get a list of all projects that are marked as deleted.
|
|
845
|
+
*
|
|
846
|
+
* ## Errors
|
|
847
|
+
* | Error Code | Description |
|
|
848
|
+
* | :--- | :--- |
|
|
849
|
+
* | `PERMISSION_DENIED` | The calling user is not a server admin. |
|
|
850
|
+
* | `UNAUTHENTICATED` | The user is not signed in. |
|
|
851
|
+
*
|
|
852
|
+
* @auth
|
|
853
|
+
*
|
|
854
|
+
* @generated from protobuf rpc: GetAllDeletedProjects
|
|
855
|
+
*/
|
|
856
|
+
getAllDeletedProjects(input, options) {
|
|
857
|
+
const method = this.methods[36], opt = this._transport.mergeOptions(options);
|
|
858
|
+
return stackIntercept("unary", this._transport, method, opt, input);
|
|
859
|
+
}
|
|
860
|
+
/**
|
|
861
|
+
* Get a list of all projects the specified user is a member of and that are
|
|
862
|
+
* marked as deleted.
|
|
863
|
+
*
|
|
864
|
+
* ## Errors
|
|
865
|
+
* | Error Code | Description |
|
|
866
|
+
* | :--- | :--- |
|
|
867
|
+
* | `INVALID_ARGUMENT` | The user ID is not a valid UUID. |
|
|
868
|
+
* | `NOT_FOUND` | No user with the provided ID was found. |
|
|
869
|
+
* | `PERMISSION_DENIED` | The calling user is neither a server admin nor the calling user. |
|
|
870
|
+
* | `UNAUTHENTICATED` | The user is not signed in. |
|
|
871
|
+
*
|
|
872
|
+
* @auth
|
|
873
|
+
*
|
|
874
|
+
* @generated from protobuf rpc: GetAllDeletedProjectsForUser
|
|
875
|
+
*/
|
|
876
|
+
getAllDeletedProjectsForUser(input, options) {
|
|
877
|
+
const method = this.methods[37], opt = this._transport.mergeOptions(options);
|
|
878
|
+
return stackIntercept("unary", this._transport, method, opt, input);
|
|
879
|
+
}
|
|
880
|
+
/**
|
|
881
|
+
* Get a list of all projects that are marked as archived.
|
|
882
|
+
*
|
|
883
|
+
* ## Errors
|
|
884
|
+
* | Error Code | Description |
|
|
885
|
+
* | :--- | :--- |
|
|
886
|
+
* | `PERMISSION_DENIED` | The calling user is not a server admin. |
|
|
887
|
+
* | `UNAUTHENTICATED` | The user is not signed in. |
|
|
888
|
+
*
|
|
889
|
+
* @auth
|
|
890
|
+
*
|
|
891
|
+
* @generated from protobuf rpc: GetAllArchivedProjects
|
|
892
|
+
*/
|
|
893
|
+
getAllArchivedProjects(input, options) {
|
|
894
|
+
const method = this.methods[38], opt = this._transport.mergeOptions(options);
|
|
895
|
+
return stackIntercept("unary", this._transport, method, opt, input);
|
|
896
|
+
}
|
|
897
|
+
/**
|
|
898
|
+
* Get a list of all active projects the specified user is a member of.
|
|
899
|
+
* Projects that the user is invited to are excluded.
|
|
900
|
+
*
|
|
901
|
+
* ## Errors
|
|
902
|
+
* | Error Code | Description |
|
|
903
|
+
* | :--- | :--- |
|
|
904
|
+
* | `INVALID_ARGUMENT` | The user ID is not a valid UUID. |
|
|
905
|
+
* | `NOT_FOUND` | No user with the provided ID was found. |
|
|
906
|
+
* | `PERMISSION_DENIED` | The calling user is neither a server admin nor the calling user. |
|
|
907
|
+
* | `UNAUTHENTICATED` | The user is not signed in. |
|
|
908
|
+
*
|
|
909
|
+
* @auth
|
|
910
|
+
*
|
|
911
|
+
* @generated from protobuf rpc: GetAllProjectsForUser
|
|
912
|
+
*/
|
|
913
|
+
getAllProjectsForUser(input, options) {
|
|
914
|
+
const method = this.methods[39], opt = this._transport.mergeOptions(options);
|
|
915
|
+
return stackIntercept("unary", this._transport, method, opt, input);
|
|
916
|
+
}
|
|
917
|
+
/**
|
|
918
|
+
* Get a list of all projects the specified user is a member of and that are
|
|
919
|
+
* marked as archived.
|
|
920
|
+
*
|
|
921
|
+
* ## Errors
|
|
922
|
+
* | Error Code | Description |
|
|
923
|
+
* | :--- | :--- |
|
|
924
|
+
* | `INVALID_ARGUMENT` | The user ID is not a valid UUID. |
|
|
925
|
+
* | `NOT_FOUND` | No user with the provided ID was found. |
|
|
926
|
+
* | `PERMISSION_DENIED` | The calling user is neither a server admin nor the calling user. |
|
|
927
|
+
* | `UNAUTHENTICATED` | The user is not signed in. |
|
|
928
|
+
*
|
|
929
|
+
* @auth
|
|
930
|
+
*
|
|
931
|
+
* @generated from protobuf rpc: GetAllArchivedProjectsForUser
|
|
932
|
+
*/
|
|
933
|
+
getAllArchivedProjectsForUser(input, options) {
|
|
934
|
+
const method = this.methods[40], opt = this._transport.mergeOptions(options);
|
|
935
|
+
return stackIntercept("unary", this._transport, method, opt, input);
|
|
936
|
+
}
|
|
937
|
+
/**
|
|
938
|
+
* Create a new project. All fields **must be specified** and **non-blank**.
|
|
939
|
+
* The calling user is automatically a member of that project with the
|
|
940
|
+
* **project admin** role (`MEMBER_ROLE_ADMIN`).
|
|
941
|
+
* The project is created with the initial settings defined in the
|
|
942
|
+
* [user settings](#service-snowballr.SnowballR-GetUserSettings) of the calling user.
|
|
943
|
+
* If the project was successfully created, it is returned and **guaranteed to be specified**.
|
|
944
|
+
*
|
|
945
|
+
* ## Errors
|
|
946
|
+
* | Error Code | Description |
|
|
947
|
+
* | :--- | :--- |
|
|
948
|
+
* | `INVALID_ARGUMENT` | The provided project name was blank. |
|
|
949
|
+
* | `NOT_FOUND` | No user settings were found for the calling user. |
|
|
950
|
+
* | `UNAUTHENTICATED` | The user is not signed in. |
|
|
951
|
+
*
|
|
952
|
+
* @auth
|
|
953
|
+
*
|
|
954
|
+
* @generated from protobuf rpc: CreateProject
|
|
955
|
+
*/
|
|
956
|
+
createProject(input, options) {
|
|
957
|
+
const method = this.methods[41], opt = this._transport.mergeOptions(options);
|
|
958
|
+
return stackIntercept("unary", this._transport, method, opt, input);
|
|
959
|
+
}
|
|
960
|
+
/**
|
|
961
|
+
* Get a project by its ID.
|
|
962
|
+
*
|
|
963
|
+
* ## Errors
|
|
964
|
+
* | Error Code | Description |
|
|
965
|
+
* | :--- | :--- |
|
|
966
|
+
* | `INVALID_ARGUMENT` | The project ID is not a valid UUID. |
|
|
967
|
+
* | `NOT_FOUND` | No project with the provided ID was found. |
|
|
968
|
+
* | `PERMISSION_DENIED` | The calling user is neither a server admin nor a member of the project. |
|
|
969
|
+
* | `UNAUTHENTICATED` | The user is not signed in. |
|
|
970
|
+
*
|
|
971
|
+
* @auth
|
|
972
|
+
*
|
|
973
|
+
* @generated from protobuf rpc: GetProjectById
|
|
974
|
+
*/
|
|
975
|
+
getProjectById(input, options) {
|
|
976
|
+
const method = this.methods[42], opt = this._transport.mergeOptions(options);
|
|
977
|
+
return stackIntercept("unary", this._transport, method, opt, input);
|
|
978
|
+
}
|
|
979
|
+
/**
|
|
980
|
+
* Update all attributes specified in the field mask for the project with the provided ID,
|
|
981
|
+
* except the fields `current_stage` and `max_stage`. The updated project
|
|
982
|
+
* is returned and **guaranteed to be specified**. The calling user is
|
|
983
|
+
* **required to be a project admin**.
|
|
984
|
+
*
|
|
985
|
+
* The following rules apply:
|
|
986
|
+
*
|
|
987
|
+
* - If `status` = `PROJECT_STATUS_DELETED`: No updates are allowed.
|
|
988
|
+
* - If `status` = `PROJECT_STATUS_ARCHIVED`: Only update of the `status` field is allowed.
|
|
989
|
+
* - If `status` = `PROJECT_STATUS_ACTIVE`: All non-immutable fields may be updated.
|
|
990
|
+
* - If `status` = `PROJECT_STATUS_ACTIVE_LOCKED`: All non-immutable fields, except the slr (project) settings, may be updated.
|
|
991
|
+
* - The value `PROJECT_STATUS_DELETED` is not allowed when updating a project, as the [SoftDeleteProject](#service-snowballr.SnowballR-SoftDeleteProject) call must be used instead.
|
|
992
|
+
*
|
|
993
|
+
* >**Note:** If the project is locked and the request sets `status` to `PROJECT_STATUS_ACTIVE`, no error is returned and the server keeps the state as `PROJECT_STATUS_ACTIVE_LOCKED`.
|
|
994
|
+
* Similarly, if the project is active and the request sets `status` to `PROJECT_STATUS_ACTIVE_LOCKED`, no error is returned and the server keeps the state as `PROJECT_STATUS_ACTIVE`.
|
|
995
|
+
*
|
|
996
|
+
* ## Errors
|
|
997
|
+
* | Error Code | Description |
|
|
998
|
+
* | :--- | :--- |
|
|
999
|
+
* | `INVALID_ARGUMENT` | At least one (updated) project detail did not meet the requirements: The `id` must be a valid UUID, the `name` must not be left blank, the `status` must be specified and the project settings must be valid. The `status` needs to follow the rules outlined above. |
|
|
1000
|
+
* | `NOT_FOUND` | No project with the provided ID was found. |
|
|
1001
|
+
* | `PERMISSION_DENIED` | The calling user is neither a server admin nor a project admin of the project. |
|
|
1002
|
+
* | `FAILED_PRECONDITION` | The project is not in the appropriate state for the requested change. |
|
|
1003
|
+
* | `UNAUTHENTICATED` | The user is not signed in. |
|
|
1004
|
+
*
|
|
1005
|
+
* @auth
|
|
1006
|
+
*
|
|
1007
|
+
* @generated from protobuf rpc: UpdateProject
|
|
1008
|
+
*/
|
|
1009
|
+
updateProject(input, options) {
|
|
1010
|
+
const method = this.methods[43], opt = this._transport.mergeOptions(options);
|
|
1011
|
+
return stackIntercept("unary", this._transport, method, opt, input);
|
|
1012
|
+
}
|
|
1013
|
+
/**
|
|
1014
|
+
* Get all available export formats that the backend supports.
|
|
1015
|
+
* Each export format is identified by a unique string and can be used to specify the format
|
|
1016
|
+
* for the [ExportProject](#service-snowballr.SnowballR-ExportProject) call. The list is
|
|
1017
|
+
* **guaranteed to be non-empty** but **may change** at any time.
|
|
1018
|
+
*
|
|
1019
|
+
* @generated from protobuf rpc: GetAvailableExportFormats
|
|
1020
|
+
*/
|
|
1021
|
+
getAvailableExportFormats(input, options) {
|
|
1022
|
+
const method = this.methods[44], opt = this._transport.mergeOptions(options);
|
|
1023
|
+
return stackIntercept("unary", this._transport, method, opt, input);
|
|
1024
|
+
}
|
|
1025
|
+
/**
|
|
1026
|
+
* Export the specified project in the specified format. A blob and a file name is returned.
|
|
1027
|
+
* This includes everything necessary for the project to be reimported and remain indistinguishable from the original.
|
|
1028
|
+
*
|
|
1029
|
+
* The filename includes the file extension so that the client doesn't have to figure out the file format. This could be
|
|
1030
|
+
* e.g. "demo_project-2025-11-10-00-25-31.json".
|
|
1031
|
+
*
|
|
1032
|
+
* ## Errors
|
|
1033
|
+
* | Error Code | Description |
|
|
1034
|
+
* | :--- | :--- |
|
|
1035
|
+
* | `INVALID_ARGUMENT` | The project ID is not a valid UUID or the format is not a valid export format. |
|
|
1036
|
+
* | `NOT_FOUND` | No project with the provided ID was found. |
|
|
1037
|
+
* | `PERMISSION_DENIED` | The calling user is neither a server admin nor a member of the project. |
|
|
1038
|
+
* | `UNAUTHENTICATED` | The user is not signed in. |
|
|
1039
|
+
*
|
|
1040
|
+
* @auth
|
|
1041
|
+
*
|
|
1042
|
+
* @generated from protobuf rpc: ExportProject
|
|
1043
|
+
*/
|
|
1044
|
+
exportProject(input, options) {
|
|
1045
|
+
const method = this.methods[45], opt = this._transport.mergeOptions(options);
|
|
1046
|
+
return stackIntercept("unary", this._transport, method, opt, input);
|
|
1047
|
+
}
|
|
1048
|
+
/**
|
|
1049
|
+
* Mark the specified project as deleted. It is not permanently removed from the database and can be restored later.
|
|
1050
|
+
* The calling user is **required to be a project admin**.
|
|
1051
|
+
*
|
|
1052
|
+
* ## Errors
|
|
1053
|
+
* | Error Code | Description |
|
|
1054
|
+
* | :--- | :--- |
|
|
1055
|
+
* | `INVALID_ARGUMENT` | The project ID is not a valid UUID. |
|
|
1056
|
+
* | `NOT_FOUND` | No project with the provided ID was found. |
|
|
1057
|
+
* | `PERMISSION_DENIED` | The calling user is neither a server admin nor a project admin of the project. |
|
|
1058
|
+
* | `UNAUTHENTICATED` | The user is not signed in. |
|
|
1059
|
+
*
|
|
1060
|
+
* @auth
|
|
1061
|
+
*
|
|
1062
|
+
* @generated from protobuf rpc: SoftDeleteProject
|
|
1063
|
+
*/
|
|
1064
|
+
softDeleteProject(input, options) {
|
|
1065
|
+
const method = this.methods[46], opt = this._transport.mergeOptions(options);
|
|
1066
|
+
return stackIntercept("unary", this._transport, method, opt, input);
|
|
1067
|
+
}
|
|
1068
|
+
/**
|
|
1069
|
+
* Restore a previously deleted project to the **active** state.
|
|
1070
|
+
* The calling user is **required to be a project admin**.
|
|
1071
|
+
*
|
|
1072
|
+
* ## Errors
|
|
1073
|
+
* | Error Code | Description |
|
|
1074
|
+
* | :--- | :--- |
|
|
1075
|
+
* | `INVALID_ARGUMENT` | The project ID is not a valid UUID. |
|
|
1076
|
+
* | `NOT_FOUND` | No project with the provided ID was found. |
|
|
1077
|
+
* | `PERMISSION_DENIED` | The calling user is neither a server admin nor a project admin of the project. |
|
|
1078
|
+
* | `FAILED_PRECONDITION` | The project to be restored is not deleted (i.e., not in state `PROJECT_STATUS_DELETED`). |
|
|
1079
|
+
* | `UNAUTHENTICATED` | The user is not signed in. |
|
|
1080
|
+
*
|
|
1081
|
+
* @auth
|
|
1082
|
+
*
|
|
1083
|
+
* @generated from protobuf rpc: SoftUndeleteProject
|
|
1084
|
+
*/
|
|
1085
|
+
softUndeleteProject(input, options) {
|
|
1086
|
+
const method = this.methods[47], opt = this._transport.mergeOptions(options);
|
|
1087
|
+
return stackIntercept("unary", this._transport, method, opt, input);
|
|
1088
|
+
}
|
|
1089
|
+
/**
|
|
1090
|
+
* Get information about the specified project.
|
|
1091
|
+
* The response only includes attributes specified in the field mask or all attributes when the field mask is not
|
|
1092
|
+
* specified or has an empty path list.
|
|
1093
|
+
*
|
|
1094
|
+
* ## Errors
|
|
1095
|
+
* | Error Code | Description |
|
|
1096
|
+
* | :--- | :--- |
|
|
1097
|
+
* | `INVALID_ARGUMENT` | The project ID is not a valid UUID. |
|
|
1098
|
+
* | `NOT_FOUND` | No project with the provided ID was found. |
|
|
1099
|
+
* | `PERMISSION_DENIED` | The calling user is neither a server admin nor a member of the project. |
|
|
1100
|
+
* | `UNAUTHENTICATED` | The user is not signed in. |
|
|
1101
|
+
*
|
|
1102
|
+
* @auth
|
|
1103
|
+
*
|
|
1104
|
+
* @generated from protobuf rpc: GetProjectInformation
|
|
1105
|
+
*/
|
|
1106
|
+
getProjectInformation(input, options) {
|
|
1107
|
+
const method = this.methods[48], opt = this._transport.mergeOptions(options);
|
|
1108
|
+
return stackIntercept("unary", this._transport, method, opt, input);
|
|
1109
|
+
}
|
|
1110
|
+
/**
|
|
1111
|
+
* Get the distribution of paper decisions within a project's stage, meaning
|
|
1112
|
+
* it returns the number of papers for each possible `PaperDecision` in the
|
|
1113
|
+
* specified stage.
|
|
1114
|
+
*
|
|
1115
|
+
* ## Errors
|
|
1116
|
+
* | Error Code | Description |
|
|
1117
|
+
* | :--- | :--- |
|
|
1118
|
+
* | `INVALID_ARGUMENT` | The project ID is not a valid UUID. |
|
|
1119
|
+
* | `NOT_FOUND` | No project with the provided ID was found or the specified stage does not exist. |
|
|
1120
|
+
* | `PERMISSION_DENIED` | The calling user is neither a server admin nor a member of the project. |
|
|
1121
|
+
* | `UNAUTHENTICATED` | The user is not signed in. |
|
|
1122
|
+
*
|
|
1123
|
+
* @auth
|
|
1124
|
+
*
|
|
1125
|
+
* @generated from protobuf rpc: GetDecisionStatisticsForStage
|
|
1126
|
+
*/
|
|
1127
|
+
getDecisionStatisticsForStage(input, options) {
|
|
1128
|
+
const method = this.methods[49], opt = this._transport.mergeOptions(options);
|
|
1129
|
+
return stackIntercept("unary", this._transport, method, opt, input);
|
|
1130
|
+
}
|
|
1131
|
+
/**
|
|
1132
|
+
* Get a criterion by its ID.
|
|
1133
|
+
*
|
|
1134
|
+
* ## Errors
|
|
1135
|
+
* | Error Code | Description |
|
|
1136
|
+
* | :--- | :--- |
|
|
1137
|
+
* | `INVALID_ARGUMENT` | The criterion ID is not a valid UUID. |
|
|
1138
|
+
* | `NOT_FOUND` | No criterion with the provided ID was found. |
|
|
1139
|
+
* | `PERMISSION_DENIED` | If the criterion is a user-criterion, the calling user is not the original creator of the criterion. If the criterion is a project-criterion, the user is not a member of the project the criterion belongs to. |
|
|
1140
|
+
* | `UNAUTHENTICATED` | The user is not signed in. |
|
|
1141
|
+
*
|
|
1142
|
+
* @auth
|
|
1143
|
+
*
|
|
1144
|
+
* @generated from protobuf rpc: GetCriterionById
|
|
1145
|
+
*/
|
|
1146
|
+
getCriterionById(input, options) {
|
|
1147
|
+
const method = this.methods[50], opt = this._transport.mergeOptions(options);
|
|
1148
|
+
return stackIntercept("unary", this._transport, method, opt, input);
|
|
1149
|
+
}
|
|
1150
|
+
/**
|
|
1151
|
+
* Get all criteria associated with a given project.
|
|
1152
|
+
*
|
|
1153
|
+
* ## Errors
|
|
1154
|
+
* | Error Code | Description |
|
|
1155
|
+
* | :--- | :--- |
|
|
1156
|
+
* | `INVALID_ARGUMENT` | The project ID is not a valid UUID. |
|
|
1157
|
+
* | `NOT_FOUND` | No project with the provided ID was found. |
|
|
1158
|
+
* | `PERMISSION_DENIED` | The calling user is neither a server admin nor a member of the project. |
|
|
1159
|
+
* | `UNAUTHENTICATED` | The user is not signed in. |
|
|
1160
|
+
*
|
|
1161
|
+
* @auth
|
|
1162
|
+
*
|
|
1163
|
+
* @generated from protobuf rpc: GetAllCriteriaForProject
|
|
1164
|
+
*/
|
|
1165
|
+
getAllCriteriaForProject(input, options) {
|
|
1166
|
+
const method = this.methods[51], opt = this._transport.mergeOptions(options);
|
|
1167
|
+
return stackIntercept("unary", this._transport, method, opt, input);
|
|
1168
|
+
}
|
|
1169
|
+
/**
|
|
1170
|
+
* Create a new criterion. All fields **must be specified** and
|
|
1171
|
+
* **non-blank**. If the criterion is successfully created, it is returned and **guaranteed to be specified**.
|
|
1172
|
+
*
|
|
1173
|
+
* A user-criterion is created by leaving the `project_id` empty. For a project-criterion,
|
|
1174
|
+
* this field must be set and refer to a valid project in the **active** state.
|
|
1175
|
+
* When creating a project-criterion, the calling user is **required to be a project admin**.
|
|
1176
|
+
*
|
|
1177
|
+
* ## Errors
|
|
1178
|
+
* | Error Code | Description |
|
|
1179
|
+
* | :--- | :--- |
|
|
1180
|
+
* | `INVALID_ARGUMENT` | At least one input did not meet the requirements: All fields (except `project_id`) must not be blank and if the `project_id` is given, it must be a valid UUID. |
|
|
1181
|
+
* | `NOT_FOUND` | A project ID is given but does not refer to an existing project. |
|
|
1182
|
+
* | `PERMISSION_DENIED` | A project ID is given but the calling user is neither a server admin nor a project admin of the project the criterion should belong to. |
|
|
1183
|
+
* | `FAILED_PRECONDITION` | A project ID is given but does not refer to an active project (i.e., it is archived or deleted). |
|
|
1184
|
+
* | `UNAUTHENTICATED` | The user is not signed in. |
|
|
1185
|
+
*
|
|
1186
|
+
* @auth
|
|
1187
|
+
*
|
|
1188
|
+
* @generated from protobuf rpc: CreateCriterion
|
|
1189
|
+
*/
|
|
1190
|
+
createCriterion(input, options) {
|
|
1191
|
+
const method = this.methods[52], opt = this._transport.mergeOptions(options);
|
|
1192
|
+
return stackIntercept("unary", this._transport, method, opt, input);
|
|
1193
|
+
}
|
|
1194
|
+
/**
|
|
1195
|
+
* Update all attributes specified in the field mask for the criterion with the given ID.
|
|
1196
|
+
* The updated criterion is returned and **guaranteed to be specified**.
|
|
1197
|
+
* If the updated criterion is a user-criterion, the calling user
|
|
1198
|
+
* is **required to be the creator of the criterion**. If it is a
|
|
1199
|
+
* project-criterion, the calling user is **required to be a project admin**.
|
|
1200
|
+
*
|
|
1201
|
+
* ## Errors
|
|
1202
|
+
* | Error Code | Description |
|
|
1203
|
+
* | :--- | :--- |
|
|
1204
|
+
* | `INVALID_ARGUMENT` | At least one (updated) criterion detail did not meet the requirements: All fields (except `project_id`) must not be blank and if the `project_id` is given, it must be a valid UUID. |
|
|
1205
|
+
* | `NOT_FOUND` | No criterion with the provided ID was found or a project ID is given but does not refer to an existing project. |
|
|
1206
|
+
* | `PERMISSION_DENIED` | If the criterion is a user-criterion, the calling user is not the original creator of the criterion. If the criterion is a project-criterion, the calling user is neither a server admin nor a project admin of the project the criterion belongs to. |
|
|
1207
|
+
* | `FAILED_PRECONDITION` | A project ID is given but does not refer to an active project (i.e., it is archived or deleted). |
|
|
1208
|
+
* | `UNAUTHENTICATED` | The user is not signed in. |
|
|
1209
|
+
*
|
|
1210
|
+
* @auth
|
|
1211
|
+
*
|
|
1212
|
+
* @generated from protobuf rpc: UpdateCriterion
|
|
1213
|
+
*/
|
|
1214
|
+
updateCriterion(input, options) {
|
|
1215
|
+
const method = this.methods[53], opt = this._transport.mergeOptions(options);
|
|
1216
|
+
return stackIntercept("unary", this._transport, method, opt, input);
|
|
1217
|
+
}
|
|
1218
|
+
/**
|
|
1219
|
+
* Permanently delete the specified criterion. All references to it will also
|
|
1220
|
+
* be removed. **This cannot be undone**.
|
|
1221
|
+
* If the deleted criterion is a user-criterion, the calling user
|
|
1222
|
+
* is **required to be the creator of the criterion**. If it is a
|
|
1223
|
+
* project-criterion, the calling user is **required to be a project admin**.
|
|
1224
|
+
*
|
|
1225
|
+
* ## Errors
|
|
1226
|
+
* | Error Code | Description |
|
|
1227
|
+
* | :--- | :--- |
|
|
1228
|
+
* | `INVALID_ARGUMENT` | If the criterion is a project-criterion, the project ID is not a valid UUID. |
|
|
1229
|
+
* | `NOT_FOUND` | No criterion with the provided ID was found. |
|
|
1230
|
+
* | `PERMISSION_DENIED` | If the criterion is a user-criterion, the calling user is not the original creator of the criterion. If the criterion is a project-criterion, the calling user is neither a server admin nor a project admin of the project the criterion belongs to. |
|
|
1231
|
+
* | `UNAUTHENTICATED` | The user is not signed in. |
|
|
1232
|
+
*
|
|
1233
|
+
* @auth
|
|
1234
|
+
*
|
|
1235
|
+
* @generated from protobuf rpc: DeleteCriterion
|
|
1236
|
+
*/
|
|
1237
|
+
deleteCriterion(input, options) {
|
|
1238
|
+
const method = this.methods[54], opt = this._transport.mergeOptions(options);
|
|
1239
|
+
return stackIntercept("unary", this._transport, method, opt, input);
|
|
1240
|
+
}
|
|
1241
|
+
/**
|
|
1242
|
+
* Get a project paper by its ID.
|
|
1243
|
+
*
|
|
1244
|
+
* ## Errors
|
|
1245
|
+
* | Error Code | Description |
|
|
1246
|
+
* | :--- | :--- |
|
|
1247
|
+
* | `INVALID_ARGUMENT` | The project paper ID is not a valid UUID. |
|
|
1248
|
+
* | `NOT_FOUND` | No project paper with the provided ID was found. |
|
|
1249
|
+
* | `PERMISSION_DENIED` | The calling user is neither a server admin nor a member of the project the project paper belongs to. |
|
|
1250
|
+
* | `UNAUTHENTICATED` | The user is not signed in. |
|
|
1251
|
+
*
|
|
1252
|
+
* @auth
|
|
1253
|
+
*
|
|
1254
|
+
* @generated from protobuf rpc: GetProjectPaperById
|
|
1255
|
+
*/
|
|
1256
|
+
getProjectPaperById(input, options) {
|
|
1257
|
+
const method = this.methods[55], opt = this._transport.mergeOptions(options);
|
|
1258
|
+
return stackIntercept("unary", this._transport, method, opt, input);
|
|
1259
|
+
}
|
|
1260
|
+
/**
|
|
1261
|
+
* Get a project paper using the project ID and the relative ID (`local_id`) within that
|
|
1262
|
+
* project. The relative ID is only **unique within its project**, not globally.
|
|
1263
|
+
* Prefer [GetProjectPaperById](#service-snowballr.SnowballR-GetProjectPaperById) wherever possible.
|
|
1264
|
+
*
|
|
1265
|
+
* ## Errors
|
|
1266
|
+
* | Error Code | Description |
|
|
1267
|
+
* | :--- | :--- |
|
|
1268
|
+
* | `INVALID_ARGUMENT` | The project ID is not a valid UUID or the relative ID is not a non-negative Long number. |
|
|
1269
|
+
* | `NOT_FOUND` | No project paper with the provided relative ID was found. Either the project does not exist or the relative ID was not found within the project. |
|
|
1270
|
+
* | `PERMISSION_DENIED` | The calling user is neither a server admin nor a member of the project the project paper belongs to. |
|
|
1271
|
+
* | `UNAUTHENTICATED` | The user is not signed in. |
|
|
1272
|
+
*
|
|
1273
|
+
* @auth
|
|
1274
|
+
*
|
|
1275
|
+
* @generated from protobuf rpc: GetProjectPaperByRelativeId
|
|
1276
|
+
*/
|
|
1277
|
+
getProjectPaperByRelativeId(input, options) {
|
|
1278
|
+
const method = this.methods[56], opt = this._transport.mergeOptions(options);
|
|
1279
|
+
return stackIntercept("unary", this._transport, method, opt, input);
|
|
1280
|
+
}
|
|
1281
|
+
/**
|
|
1282
|
+
* Get all project papers associated with the given project.
|
|
1283
|
+
*
|
|
1284
|
+
* ## Errors
|
|
1285
|
+
* | Error Code | Description |
|
|
1286
|
+
* | :--- | :--- |
|
|
1287
|
+
* | `INVALID_ARGUMENT` | The project ID is not a valid UUID. |
|
|
1288
|
+
* | `NOT_FOUND` | No project with the provided ID was found. |
|
|
1289
|
+
* | `PERMISSION_DENIED` | The calling user is neither a server admin nor a member of the project. |
|
|
1290
|
+
* | `UNAUTHENTICATED` | The user is not signed in. |
|
|
1291
|
+
*
|
|
1292
|
+
* @auth
|
|
1293
|
+
*
|
|
1294
|
+
* @generated from protobuf rpc: GetAllProjectPapersForProject
|
|
1295
|
+
*/
|
|
1296
|
+
getAllProjectPapersForProject(input, options) {
|
|
1297
|
+
const method = this.methods[57], opt = this._transport.mergeOptions(options);
|
|
1298
|
+
return stackIntercept("unary", this._transport, method, opt, input);
|
|
1299
|
+
}
|
|
1300
|
+
/**
|
|
1301
|
+
* Add the provided paper to the given project at the specified stage.
|
|
1302
|
+
* The stage must be non-negative and less than or equal to the project's `max_stage`.
|
|
1303
|
+
* The calling user is **required to be a project admin**.
|
|
1304
|
+
*
|
|
1305
|
+
* ## Errors
|
|
1306
|
+
* | Error Code | Description |
|
|
1307
|
+
* | :--- | :--- |
|
|
1308
|
+
* | `INVALID_ARGUMENT` | The project ID or paper ID is not a valid UUID, or the provided stage either is not a valid number or does not exist in the project, i.e., the stage was less than zero or greater than `max_stage`. |
|
|
1309
|
+
* | `NOT_FOUND` | No project with the provided project ID or paper with the provided paper ID was found. |
|
|
1310
|
+
* | `ALREADY_EXISTS` | The provided paper already exists within the project. |
|
|
1311
|
+
* | `PERMISSION_DENIED` | The calling user is neither a server admin nor a project admin of the project. |
|
|
1312
|
+
* | `FAILED_PRECONDITION` | The project is not active (i.e., archived or deleted). |
|
|
1313
|
+
* | `UNAUTHENTICATED` | The user is not signed in. |
|
|
1314
|
+
*
|
|
1315
|
+
* @auth
|
|
1316
|
+
*
|
|
1317
|
+
* @generated from protobuf rpc: AddPaperToProject
|
|
1318
|
+
*/
|
|
1319
|
+
addPaperToProject(input, options) {
|
|
1320
|
+
const method = this.methods[58], opt = this._transport.mergeOptions(options);
|
|
1321
|
+
return stackIntercept("unary", this._transport, method, opt, input);
|
|
1322
|
+
}
|
|
1323
|
+
/**
|
|
1324
|
+
* Update all attributes specified in the field mask for the project paper with the provided ID,
|
|
1325
|
+
* except the fields `local_id`, `decision`, `stage`, and `reviews`. Furthermore, the underlying paper
|
|
1326
|
+
* cannot be modified; use the [UpdatePaper](#service-snowballr.SnowballR-UpdatePaper) call for this. The updated
|
|
1327
|
+
* project paper is returned and **guaranteed to be specified**.
|
|
1328
|
+
* The calling user is **required to be a project admin**.
|
|
1329
|
+
*
|
|
1330
|
+
* ## Errors
|
|
1331
|
+
* | Error Code | Description |
|
|
1332
|
+
* | :--- | :--- |
|
|
1333
|
+
* | `INVALID_ARGUMENT` | The project paper ID or paper ID is not a valid UUID. |
|
|
1334
|
+
* | `NOT_FOUND` | No project paper with the provided ID or paper with the provided ID was found. |
|
|
1335
|
+
* | `PERMISSION_DENIED` | The calling user is neither a server admin nor a project admin of the project the project paper belongs to. |
|
|
1336
|
+
* | `UNAUTHENTICATED` | The user is not signed in. |
|
|
1337
|
+
*
|
|
1338
|
+
* @auth
|
|
1339
|
+
*
|
|
1340
|
+
* @generated from protobuf rpc: UpdateProjectPaper
|
|
1341
|
+
*/
|
|
1342
|
+
updateProjectPaper(input, options) {
|
|
1343
|
+
const method = this.methods[59], opt = this._transport.mergeOptions(options);
|
|
1344
|
+
return stackIntercept("unary", this._transport, method, opt, input);
|
|
1345
|
+
}
|
|
1346
|
+
/**
|
|
1347
|
+
* Permanently remove the specified project paper from the project. All
|
|
1348
|
+
* references to this project paper will also be deleted. **This cannot be
|
|
1349
|
+
* undone**.
|
|
1350
|
+
* The calling user is **required to be a project admin**.
|
|
1351
|
+
*
|
|
1352
|
+
* ## Errors
|
|
1353
|
+
* | Error Code | Description |
|
|
1354
|
+
* | :--- | :--- |
|
|
1355
|
+
* | `INVALID_ARGUMENT` | The project paper ID is not a valid UUID. |
|
|
1356
|
+
* | `NOT_FOUND` | No project paper with the provided ID was found. |
|
|
1357
|
+
* | `PERMISSION_DENIED` | The calling user is neither a server admin nor a project admin of the project the project paper belongs to. |
|
|
1358
|
+
* | `UNAUTHENTICATED` | The user is not signed in. |
|
|
1359
|
+
*
|
|
1360
|
+
* @auth
|
|
1361
|
+
*
|
|
1362
|
+
* @generated from protobuf rpc: RemovePaperFromProject
|
|
1363
|
+
*/
|
|
1364
|
+
removePaperFromProject(input, options) {
|
|
1365
|
+
const method = this.methods[60], opt = this._transport.mergeOptions(options);
|
|
1366
|
+
return stackIntercept("unary", this._transport, method, opt, input);
|
|
1367
|
+
}
|
|
1368
|
+
/**
|
|
1369
|
+
* Get a review by its ID.
|
|
1370
|
+
*
|
|
1371
|
+
* ## Errors
|
|
1372
|
+
* | Error Code | Description |
|
|
1373
|
+
* | :--- | :--- |
|
|
1374
|
+
* | `INVALID_ARGUMENT` | The review ID is not a valid UUID. |
|
|
1375
|
+
* | `NOT_FOUND` | No review with the provided ID was found. |
|
|
1376
|
+
* | `PERMISSION_DENIED` | The calling user is neither a server admin nor a member of the project the review belongs to. |
|
|
1377
|
+
* | `UNAUTHENTICATED` | The user is not signed in. |
|
|
1378
|
+
*
|
|
1379
|
+
* @auth
|
|
1380
|
+
*
|
|
1381
|
+
* @generated from protobuf rpc: GetReviewById
|
|
1382
|
+
*/
|
|
1383
|
+
getReviewById(input, options) {
|
|
1384
|
+
const method = this.methods[61], opt = this._transport.mergeOptions(options);
|
|
1385
|
+
return stackIntercept("unary", this._transport, method, opt, input);
|
|
1386
|
+
}
|
|
1387
|
+
/**
|
|
1388
|
+
* Get all reviews for the specific project paper.
|
|
1389
|
+
*
|
|
1390
|
+
* ## Errors
|
|
1391
|
+
* | Error Code | Description |
|
|
1392
|
+
* | :--- | :--- |
|
|
1393
|
+
* | `INVALID_ARGUMENT` | The project paper ID is not a valid UUID. |
|
|
1394
|
+
* | `NOT_FOUND` | No project paper with the provided ID was found. |
|
|
1395
|
+
* | `PERMISSION_DENIED` | The calling user is neither a server admin nor a member of the project the project paper belongs to. |
|
|
1396
|
+
* | `UNAUTHENTICATED` | The user is not signed in. |
|
|
1397
|
+
*
|
|
1398
|
+
* @auth
|
|
1399
|
+
*
|
|
1400
|
+
* @generated from protobuf rpc: GetAllReviewsForProjectPaper
|
|
1401
|
+
*/
|
|
1402
|
+
getAllReviewsForProjectPaper(input, options) {
|
|
1403
|
+
const method = this.methods[62], opt = this._transport.mergeOptions(options);
|
|
1404
|
+
return stackIntercept("unary", this._transport, method, opt, input);
|
|
1405
|
+
}
|
|
1406
|
+
/**
|
|
1407
|
+
* Create a new review for the specific project paper. All fields **must be
|
|
1408
|
+
* specified** and **non-blank**. The field `selected_criteria_ids` **may be empty**. The
|
|
1409
|
+
* calling user must not currently have another review for this project paper.
|
|
1410
|
+
* The paper must also be currently `UNREVIEWED` or `IN_REVIEW`, i.e., not finally decided. The user also
|
|
1411
|
+
* has to be a member of the same project the project paper belongs to. If the review is successfully created,
|
|
1412
|
+
* it is returned and **guaranteed to be specified**.
|
|
1413
|
+
*
|
|
1414
|
+
* ## Errors
|
|
1415
|
+
* | Error Code | Description |
|
|
1416
|
+
* | :--- | :--- |
|
|
1417
|
+
* | `INVALID_ARGUMENT` | At least one input did not meet the requirements: The project paper ID must be a valid UUID, the decision must be specified, and if given, the selected criteria IDs must be a list of valid UUIDs. |
|
|
1418
|
+
* | `NOT_FOUND` | No project paper with the provided ID was found. |
|
|
1419
|
+
* | `ALREADY_EXISTS` | The user has already created a review for the specified project paper. |
|
|
1420
|
+
* | `PERMISSION_DENIED` | The calling user is neither a server admin nor a member of the project the project paper belongs to. |
|
|
1421
|
+
* | `FAILED_PRECONDITION` | The project paper is not in the `PAPER_DECISION_UNREVIEWED` or `PAPER_DECISION_IN_REVIEW` state, or the project is not active (i.e., it is archived or deleted). |
|
|
1422
|
+
* | `UNAUTHENTICATED` | The user is not signed in. |
|
|
1423
|
+
*
|
|
1424
|
+
* @auth
|
|
1425
|
+
*
|
|
1426
|
+
* @generated from protobuf rpc: CreateReview
|
|
1427
|
+
*/
|
|
1428
|
+
createReview(input, options) {
|
|
1429
|
+
const method = this.methods[63], opt = this._transport.mergeOptions(options);
|
|
1430
|
+
return stackIntercept("unary", this._transport, method, opt, input);
|
|
1431
|
+
}
|
|
1432
|
+
/**
|
|
1433
|
+
* Update all attributes specified in the field mask for the review with the given ID, except the `user_id` field.
|
|
1434
|
+
* The updated review is returned and **guaranteed to be specified**. Only the
|
|
1435
|
+
* owner of a review is allowed to update a review and must be a member of the project the review is in.
|
|
1436
|
+
* A user is the owner of a review if the review's `user_id` matches the user's `id`.
|
|
1437
|
+
*
|
|
1438
|
+
* ## Errors
|
|
1439
|
+
* | Error Code | Description |
|
|
1440
|
+
* | :--- | :--- |
|
|
1441
|
+
* | `INVALID_ARGUMENT` | At least one (updated) review detail did not meet the requirements: The review ID must be a valid UUID, the decision must be specified, and if given, the selected criteria IDs must be a list of valid UUIDs. |
|
|
1442
|
+
* | `NOT_FOUND` | No review with the provided ID was found. |
|
|
1443
|
+
* | `PERMISSION_DENIED` | The calling user is neither a server admin, the owner of the review, nor in the same project as the review. |
|
|
1444
|
+
* | `FAILED_PRECONDITION` | The project paper is in a state in which no further modifications to the review are allowed, or the project is not active (i.e., it is archived or deleted). |
|
|
1445
|
+
* | `UNAUTHENTICATED` | The user is not signed in. |
|
|
1446
|
+
*
|
|
1447
|
+
* @auth
|
|
1448
|
+
*
|
|
1449
|
+
* @generated from protobuf rpc: UpdateReview
|
|
1450
|
+
*/
|
|
1451
|
+
updateReview(input, options) {
|
|
1452
|
+
const method = this.methods[64], opt = this._transport.mergeOptions(options);
|
|
1453
|
+
return stackIntercept("unary", this._transport, method, opt, input);
|
|
1454
|
+
}
|
|
1455
|
+
/**
|
|
1456
|
+
* Permanently remove the specified review from the project paper. **This
|
|
1457
|
+
* cannot be undone**. Only the owner of a review is allowed to delete a
|
|
1458
|
+
* review. The owner of the review must be a member of the project the
|
|
1459
|
+
* review is in, in order to remove it. A user is the owner of a review if the
|
|
1460
|
+
* review's `user_id` matches the user's `id`.
|
|
1461
|
+
*
|
|
1462
|
+
* ## Errors
|
|
1463
|
+
* | Error Code | Description |
|
|
1464
|
+
* | :--- | :--- |
|
|
1465
|
+
* | `INVALID_ARGUMENT` | The review ID is not a valid UUID. |
|
|
1466
|
+
* | `NOT_FOUND` | No review with the provided ID was found. |
|
|
1467
|
+
* | `PERMISSION_DENIED` | The calling user is neither a server admin, the owner of the review, nor in the same project as the review. |
|
|
1468
|
+
* | `FAILED_PRECONDITION` | The project paper is in a state in which no deletions of reviews are allowed anymore, or the project is not active (i.e., it is archived or deleted). |
|
|
1469
|
+
* | `UNAUTHENTICATED` | The user is not signed in. |
|
|
1470
|
+
*
|
|
1471
|
+
* @auth
|
|
1472
|
+
*
|
|
1473
|
+
* @generated from protobuf rpc: DeleteReview
|
|
1474
|
+
*/
|
|
1475
|
+
deleteReview(input, options) {
|
|
1476
|
+
const method = this.methods[65], opt = this._transport.mergeOptions(options);
|
|
1477
|
+
return stackIntercept("unary", this._transport, method, opt, input);
|
|
1478
|
+
}
|
|
1479
|
+
/**
|
|
1480
|
+
* Get a paper by its ID.
|
|
1481
|
+
*
|
|
1482
|
+
* ## Errors
|
|
1483
|
+
* | Error Code | Description |
|
|
1484
|
+
* | :--- | :--- |
|
|
1485
|
+
* | `INVALID_ARGUMENT` | The paper ID is not a valid UUID. |
|
|
1486
|
+
* | `NOT_FOUND` | No paper with the provided ID was found. |
|
|
1487
|
+
* | `UNAUTHENTICATED` | The user is not signed in. |
|
|
1488
|
+
*
|
|
1489
|
+
* @auth
|
|
1490
|
+
*
|
|
1491
|
+
* @generated from protobuf rpc: GetPaperById
|
|
1492
|
+
*/
|
|
1493
|
+
getPaperById(input, options) {
|
|
1494
|
+
const method = this.methods[66], opt = this._transport.mergeOptions(options);
|
|
1495
|
+
return stackIntercept("unary", this._transport, method, opt, input);
|
|
1496
|
+
}
|
|
1497
|
+
/**
|
|
1498
|
+
* Search the local database for papers using a search string in order to find
|
|
1499
|
+
* candidates for addition to the specified project. The search is performed
|
|
1500
|
+
* only within the papers that are already in the local database and not yet
|
|
1501
|
+
* added to the specified project.
|
|
1502
|
+
*
|
|
1503
|
+
* The client can use these search results to add papers to the project using
|
|
1504
|
+
* the [AddPaperToProject](#service-snowballr.SnowballR-AddPaperToProject)
|
|
1505
|
+
* call.
|
|
1506
|
+
*
|
|
1507
|
+
* There are no restrictions on the search query in terms of valid values,
|
|
1508
|
+
* except the length.
|
|
1509
|
+
* The backend is fully responsible for deciding which paper attributes the
|
|
1510
|
+
* query is matched against and is supposed to provide the best results for
|
|
1511
|
+
* the given query.
|
|
1512
|
+
*
|
|
1513
|
+
* ## Errors
|
|
1514
|
+
* | Error Code | Description |
|
|
1515
|
+
* | :--- | :--- |
|
|
1516
|
+
* | `INVALID_ARGUMENT` | The project ID is not a valid UUID or the search query is either blank or exceeds its maximum length. |
|
|
1517
|
+
* | `NOT_FOUND` | No project with the provided ID was found. |
|
|
1518
|
+
* | `PERMISSION_DENIED` | The calling user is neither a server admin nor a member of the specified project. |
|
|
1519
|
+
* | `UNAUTHENTICATED` | The user is not signed in. |
|
|
1520
|
+
*
|
|
1521
|
+
* @auth
|
|
1522
|
+
*
|
|
1523
|
+
* @generated from protobuf rpc: SearchLocalProjectPaperCandidates
|
|
1524
|
+
*/
|
|
1525
|
+
searchLocalProjectPaperCandidates(input, options) {
|
|
1526
|
+
const method = this.methods[67], opt = this._transport.mergeOptions(options);
|
|
1527
|
+
return stackIntercept("unary", this._transport, method, opt, input);
|
|
1528
|
+
}
|
|
1529
|
+
/**
|
|
1530
|
+
* Search for papers that match the search query using all available fetchers
|
|
1531
|
+
* of the specified project in order to find candidates for addition to the
|
|
1532
|
+
* project. The search is performed only on papers that are found by the
|
|
1533
|
+
* fetchers, but not yet added to the specified project.
|
|
1534
|
+
*
|
|
1535
|
+
* Fetcher papers that already exist in the local database include their
|
|
1536
|
+
* respective IDs, while papers that do not exist have an empty `id` field in
|
|
1537
|
+
* the search results. The client can use this information to first add papers
|
|
1538
|
+
* that do not exist in the local database to the database using the
|
|
1539
|
+
* [CreatePaper](#service-snowballr.SnowballR-CreatePaper) call and then add
|
|
1540
|
+
* them to the project using the
|
|
1541
|
+
* [AddPaperToProject](#service-snowballr.SnowballR-AddPaperToProject) call.
|
|
1542
|
+
*
|
|
1543
|
+
* There are no restrictions on the search query in terms of valid values,
|
|
1544
|
+
* except the length.
|
|
1545
|
+
* The backend is fully responsible for deciding which paper attributes the
|
|
1546
|
+
* query is matched against and is supposed to provide the best results for
|
|
1547
|
+
* the given query.
|
|
1548
|
+
*
|
|
1549
|
+
* ## Errors
|
|
1550
|
+
* | Error Code | Description |
|
|
1551
|
+
* | :--- | :--- |
|
|
1552
|
+
* | `INVALID_ARGUMENT` | The project ID is not a valid UUID or the search query is either blank or exceeds its maximum length. |
|
|
1553
|
+
* | `NOT_FOUND` | No project with the provided ID was found. |
|
|
1554
|
+
* | `PERMISSION_DENIED` | The calling user is neither a server admin nor a member of the specified project. |
|
|
1555
|
+
* | `UNAUTHENTICATED` | The user is not signed in. |
|
|
1556
|
+
*
|
|
1557
|
+
* @auth
|
|
1558
|
+
*
|
|
1559
|
+
* @generated from protobuf rpc: SearchFetcherProjectPaperCandidates
|
|
1560
|
+
*/
|
|
1561
|
+
searchFetcherProjectPaperCandidates(input, options) {
|
|
1562
|
+
const method = this.methods[68], opt = this._transport.mergeOptions(options);
|
|
1563
|
+
return stackIntercept("unary", this._transport, method, opt, input);
|
|
1564
|
+
}
|
|
1565
|
+
/**
|
|
1566
|
+
* Create a new paper. The `id` field will be ignored and set by
|
|
1567
|
+
* the server. The created paper is returned and **guaranteed to be specified**.
|
|
1568
|
+
*
|
|
1569
|
+
* Validation details:
|
|
1570
|
+
*
|
|
1571
|
+
* - only the `title` is required, in the sense that it must not be blank
|
|
1572
|
+
* - text fields: `external_id`, `title`, `abstrakt`, `publisher`, `publication_name` and `publication_type`
|
|
1573
|
+
* - valid year range: 0 to this year + 1, i.e., if this year is 2025, the maximum year value is 2026
|
|
1574
|
+
* - valid author list: each author must be valid and the list must not exceed its maximum length
|
|
1575
|
+
* - valid author: `first_name` and `last_name` must both be non-blank and must not exceed their maximum length.
|
|
1576
|
+
*
|
|
1577
|
+
* ## Errors
|
|
1578
|
+
* | Error Code | Description |
|
|
1579
|
+
* | :--- | :--- |
|
|
1580
|
+
* | `INVALID_ARGUMENT` | At least one of the text fields exceeds its maximum length, the title is blank, the year is invalid, or the author list is invalid. For more details, see above. |
|
|
1581
|
+
* | `ALREADY_EXISTS` | The paper with the provided information already exists or is too similar to an existing paper. |
|
|
1582
|
+
* | `UNAUTHENTICATED` | The user is not signed in. |
|
|
1583
|
+
*
|
|
1584
|
+
* @auth
|
|
1585
|
+
*
|
|
1586
|
+
* @generated from protobuf rpc: CreatePaper
|
|
1587
|
+
*/
|
|
1588
|
+
createPaper(input, options) {
|
|
1589
|
+
const method = this.methods[69], opt = this._transport.mergeOptions(options);
|
|
1590
|
+
return stackIntercept("unary", this._transport, method, opt, input);
|
|
1591
|
+
}
|
|
1592
|
+
/**
|
|
1593
|
+
* Update all attributes specified in the field mask for the paper with the given ID, except the field `has_pdf`.
|
|
1594
|
+
* The updated paper is returned and **guaranteed to be specified**.
|
|
1595
|
+
*
|
|
1596
|
+
* For validation details, see [CreatePaper](#service-snowballr.SnowballR-CreatePaper).
|
|
1597
|
+
*
|
|
1598
|
+
* ## Errors
|
|
1599
|
+
* | Error Code | Description |
|
|
1600
|
+
* | :--- | :--- |
|
|
1601
|
+
* | `INVALID_ARGUMENT` | At least one of the text fields exceeds its maximum length, the title is blank, the paper ID is not a valid UUID, the year is invalid, or the author list is invalid. For more details, see [CreatePaper](#service-snowballr.SnowballR-CreatePaper). |
|
|
1602
|
+
* | `NOT_FOUND` | No paper with the provided ID was found. |
|
|
1603
|
+
* | `ALREADY_EXISTS` | The paper with the provided information already exists or is too similar to an existing paper. |
|
|
1604
|
+
* | `UNAUTHENTICATED` | The user is not signed in. |
|
|
1605
|
+
*
|
|
1606
|
+
* @auth
|
|
1607
|
+
*
|
|
1608
|
+
* @generated from protobuf rpc: UpdatePaper
|
|
1609
|
+
*/
|
|
1610
|
+
updatePaper(input, options) {
|
|
1611
|
+
const method = this.methods[70], opt = this._transport.mergeOptions(options);
|
|
1612
|
+
return stackIntercept("unary", this._transport, method, opt, input);
|
|
1613
|
+
}
|
|
1614
|
+
/**
|
|
1615
|
+
* Get a list of papers that are referring to the provided paper, i.e., the papers that cite this paper.
|
|
1616
|
+
*
|
|
1617
|
+
* ## Errors
|
|
1618
|
+
* | Error Code | Description |
|
|
1619
|
+
* | :--- | :--- |
|
|
1620
|
+
* | `INVALID_ARGUMENT` | The paper ID is not a valid UUID. |
|
|
1621
|
+
* | `NOT_FOUND` | No paper with the provided ID was found. |
|
|
1622
|
+
* | `UNAUTHENTICATED` | The user is not signed in. |
|
|
1623
|
+
*
|
|
1624
|
+
* @auth
|
|
1625
|
+
*
|
|
1626
|
+
* @generated from protobuf rpc: GetForwardReferencedPapers
|
|
1627
|
+
*/
|
|
1628
|
+
getForwardReferencedPapers(input, options) {
|
|
1629
|
+
const method = this.methods[71], opt = this._transport.mergeOptions(options);
|
|
1630
|
+
return stackIntercept("unary", this._transport, method, opt, input);
|
|
1631
|
+
}
|
|
1632
|
+
/**
|
|
1633
|
+
* Get a list of papers that are referred to by the provided paper, i.e., the references of this paper.
|
|
1634
|
+
*
|
|
1635
|
+
* ## Errors
|
|
1636
|
+
* | Error Code | Description |
|
|
1637
|
+
* | :--- | :--- |
|
|
1638
|
+
* | `INVALID_ARGUMENT` | The paper ID is not a valid UUID. |
|
|
1639
|
+
* | `NOT_FOUND` | No paper with the provided ID was found. |
|
|
1640
|
+
* | `UNAUTHENTICATED` | The user is not signed in. |
|
|
1641
|
+
*
|
|
1642
|
+
* @auth
|
|
1643
|
+
*
|
|
1644
|
+
* @generated from protobuf rpc: GetBackwardReferencedPapers
|
|
1645
|
+
*/
|
|
1646
|
+
getBackwardReferencedPapers(input, options) {
|
|
1647
|
+
const method = this.methods[72], opt = this._transport.mergeOptions(options);
|
|
1648
|
+
return stackIntercept("unary", this._transport, method, opt, input);
|
|
1649
|
+
}
|
|
1650
|
+
/**
|
|
1651
|
+
* Get a paper's PDF as a blob.
|
|
1652
|
+
*
|
|
1653
|
+
* ## Errors
|
|
1654
|
+
* | Error Code | Description |
|
|
1655
|
+
* | :--- | :--- |
|
|
1656
|
+
* | `INVALID_ARGUMENT` | The paper ID is not a valid UUID. |
|
|
1657
|
+
* | `NOT_FOUND` | No paper with the provided ID was found. |
|
|
1658
|
+
* | `FAILED_PRECONDITION` | The paper has no attached PDF (see [Paper.has_pdf](#message-snowballr.Paper)). |
|
|
1659
|
+
* | `UNAUTHENTICATED` | The user is not signed in. |
|
|
1660
|
+
*
|
|
1661
|
+
* @auth
|
|
1662
|
+
*
|
|
1663
|
+
* @generated from protobuf rpc: GetPaperPdf
|
|
1664
|
+
*/
|
|
1665
|
+
getPaperPdf(input, options) {
|
|
1666
|
+
const method = this.methods[73], opt = this._transport.mergeOptions(options);
|
|
1667
|
+
return stackIntercept("unary", this._transport, method, opt, input);
|
|
1668
|
+
}
|
|
1669
|
+
/**
|
|
1670
|
+
* Set or overwrite the PDF for the specified paper. This call may also be
|
|
1671
|
+
* used to remove the PDF of a paper by omitting the `pdf` field.
|
|
1672
|
+
* The paper's `has_pdf` field is automatically updated by the server.
|
|
1673
|
+
*
|
|
1674
|
+
* ## Errors
|
|
1675
|
+
* | Error Code | Description |
|
|
1676
|
+
* | :--- | :--- |
|
|
1677
|
+
* | `INVALID_ARGUMENT` | The PDF is not in the correct format, or the paper ID is not a valid UUID. |
|
|
1678
|
+
* | `NOT_FOUND` | No paper with the provided ID was found. |
|
|
1679
|
+
* | `RESOURCE_EXHAUSTED` | The PDF was rejected by the server, e.g., because it is too large. |
|
|
1680
|
+
* | `UNAUTHENTICATED` | The user is not signed in. |
|
|
1681
|
+
*
|
|
1682
|
+
* @auth
|
|
1683
|
+
*
|
|
1684
|
+
* @generated from protobuf rpc: SetPaperPdf
|
|
1685
|
+
*/
|
|
1686
|
+
setPaperPdf(input, options) {
|
|
1687
|
+
const method = this.methods[74], opt = this._transport.mergeOptions(options);
|
|
1688
|
+
return stackIntercept("unary", this._transport, method, opt, input);
|
|
1689
|
+
}
|
|
1690
|
+
}
|