@se-uulm/snowballr-grpc-client 0.2.1-alpha.2fd7ace → 0.2.1-alpha.5d467fe

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/README.md CHANGED
@@ -5,3 +5,7 @@ For communication between the backend and frontend, [gRPC](https://grpc.io) is
5
5
  used, whereas the services are defined by Protocol Buffers
6
6
  (see [/proto](./proto/) for the service definition
7
7
  (in [main.proto](./proto/main.proto)) and all required `.proto` files).
8
+
9
+ The API documentation is generated from the `.proto` files with
10
+ [sabledocs](https://github.com/markvincze/sabledocs) (templates in [/docs](./docs/), patches in
11
+ [/patches](./patches/)) as a stage of the backend `Dockerfile`, and served by the backend under `/grpc-docs/`.
@@ -149,21 +149,19 @@ import type { RpcOptions } from "@protobuf-ts/runtime-rpc";
149
149
  * erDiagram
150
150
  * direction LR
151
151
  *
152
- * Project 0+ -- 0+ User : "member of"
153
- * Project 1 -- 1 ProjectSettings : has
154
- * Project 1 -- 0+ ProjectPaper : contains
155
- * Project 1 -- 0+ Criterion : contains
152
+ * Project }o--o{ User : "member of"
153
+ * Project ||--o{ ProjectPaper : contains
154
+ * Project ||--o{ Criterion : contains
156
155
  *
157
- * ProjectSettings 0+ -- 1+ Fetcher : "fetches from"
156
+ * Project }o--|{ Fetcher : "fetches from"
158
157
  *
159
- * ProjectPaper 1 -- 0+ Review : has
160
- * ProjectPaper 1 -- 1 Paper : "refers to"
158
+ * ProjectPaper ||--o{ Review : has
159
+ * ProjectPaper ||--|| Paper : "refers to"
161
160
  *
162
- * Review 0+ -- 1 User : by
163
- * Review 0+ -- 0+ Criterion : "ticks off"
161
+ * Review }o--|| User : by
162
+ * Review }o--o{ Criterion : "ticks off"
164
163
  *
165
- * User 1 -- 1 UserSettings : has
166
- * User 0+ -- 0+ Paper : "on reading-list of"
164
+ * User }o--o{ Paper : "on reading-list of"
167
165
  * ~~~
168
166
  *
169
167
  * **Disclaimer:**
@@ -478,7 +476,9 @@ export interface ISnowballRClient {
478
476
  * ## Errors
479
477
  * | Error Code | Description |
480
478
  * | :--- | :--- |
479
+ * | `NOT_FOUND` | A criterion that was about to be stored in the user's settings was not found. |
481
480
  * | `INVALID_ARGUMENT` | At least one updated setting did not meet the requirements. |
481
+ * | `PERMISSION_DENIED` | The user is not allowed to use at least one of the criteria IDs. |
482
482
  * | `FAILED_PRECONDITION` | The user is not active (i.e., in state `USER_STATUS_ACTIVE`). |
483
483
  * | `UNAUTHENTICATED` | The user is not signed in. |
484
484
  *
@@ -1064,7 +1064,8 @@ export interface ISnowballRClient {
1064
1064
  * **non-blank**. If the criterion is successfully created, it is returned and **guaranteed to be specified**.
1065
1065
  *
1066
1066
  * A user-criterion is created by leaving the `project_id` empty. For a project-criterion,
1067
- * this field must be set and refer to a valid project in the **active** state.
1067
+ * this field must be set and refer to a valid project in the **active** state whose settings are
1068
+ * **not locked** (i.e., the project status must be `PROJECT_STATUS_ACTIVE`).
1068
1069
  * When creating a project-criterion, the calling user is **required to be a project admin**.
1069
1070
  *
1070
1071
  * ## Errors
@@ -1073,7 +1074,7 @@ export interface ISnowballRClient {
1073
1074
  * | `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. |
1074
1075
  * | `NOT_FOUND` | A project ID is given but does not refer to an existing project. |
1075
1076
  * | `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. |
1076
- * | `FAILED_PRECONDITION` | A project ID is given but does not refer to an active project (i.e., it is archived or deleted). |
1077
+ * | `FAILED_PRECONDITION` | A project ID is given but does not refer to an active project (i.e., it is archived or deleted) or the project's settings are locked (i.e., it is in the `PROJECT_STATUS_ACTIVE_LOCKED` state). |
1077
1078
  * | `UNAUTHENTICATED` | The user is not signed in. |
1078
1079
  *
1079
1080
  * @auth
@@ -1086,7 +1087,8 @@ export interface ISnowballRClient {
1086
1087
  * The updated criterion is returned and **guaranteed to be specified**.
1087
1088
  * If the updated criterion is a user-criterion, the calling user
1088
1089
  * is **required to be the creator of the criterion**. If it is a
1089
- * project-criterion, the calling user is **required to be a project admin**.
1090
+ * project-criterion, the calling user is **required to be a project admin** and the project
1091
+ * must be in the **active** state with **unlocked** settings (i.e., `PROJECT_STATUS_ACTIVE`).
1090
1092
  *
1091
1093
  * ## Errors
1092
1094
  * | Error Code | Description |
@@ -1094,7 +1096,7 @@ export interface ISnowballRClient {
1094
1096
  * | `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. |
1095
1097
  * | `NOT_FOUND` | No criterion with the provided ID was found or a project ID is given but does not refer to an existing project. |
1096
1098
  * | `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. |
1097
- * | `FAILED_PRECONDITION` | A project ID is given but does not refer to an active project (i.e., it is archived or deleted). |
1099
+ * | `FAILED_PRECONDITION` | If the criterion is a project-criterion, the project it belongs to is not active (i.e., it is archived or deleted) or its settings are locked (i.e., it is in the `PROJECT_STATUS_ACTIVE_LOCKED` state). |
1098
1100
  * | `UNAUTHENTICATED` | The user is not signed in. |
1099
1101
  *
1100
1102
  * @auth
@@ -1107,14 +1109,16 @@ export interface ISnowballRClient {
1107
1109
  * be removed. **This cannot be undone**.
1108
1110
  * If the deleted criterion is a user-criterion, the calling user
1109
1111
  * is **required to be the creator of the criterion**. If it is a
1110
- * project-criterion, the calling user is **required to be a project admin**.
1112
+ * project-criterion, the calling user is **required to be a project admin** and the project
1113
+ * must be in the **active** state with **unlocked** settings (i.e., `PROJECT_STATUS_ACTIVE`).
1111
1114
  *
1112
1115
  * ## Errors
1113
1116
  * | Error Code | Description |
1114
1117
  * | :--- | :--- |
1115
- * | `INVALID_ARGUMENT` | If the criterion is a project-criterion, the project ID is not a valid UUID. |
1118
+ * | `INVALID_ARGUMENT` | The criterion ID is not a valid UUID. |
1116
1119
  * | `NOT_FOUND` | No criterion with the provided ID was found. |
1117
1120
  * | `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. |
1121
+ * | `FAILED_PRECONDITION` | If the criterion is a project-criterion, the project it belongs to is not active (i.e., it is archived or deleted) or its settings are locked (i.e., it is in the `PROJECT_STATUS_ACTIVE_LOCKED` state). |
1118
1122
  * | `UNAUTHENTICATED` | The user is not signed in. |
1119
1123
  *
1120
1124
  * @auth
@@ -1600,21 +1604,19 @@ export interface ISnowballRClient {
1600
1604
  * erDiagram
1601
1605
  * direction LR
1602
1606
  *
1603
- * Project 0+ -- 0+ User : "member of"
1604
- * Project 1 -- 1 ProjectSettings : has
1605
- * Project 1 -- 0+ ProjectPaper : contains
1606
- * Project 1 -- 0+ Criterion : contains
1607
+ * Project }o--o{ User : "member of"
1608
+ * Project ||--o{ ProjectPaper : contains
1609
+ * Project ||--o{ Criterion : contains
1607
1610
  *
1608
- * ProjectSettings 0+ -- 1+ Fetcher : "fetches from"
1611
+ * Project }o--|{ Fetcher : "fetches from"
1609
1612
  *
1610
- * ProjectPaper 1 -- 0+ Review : has
1611
- * ProjectPaper 1 -- 1 Paper : "refers to"
1613
+ * ProjectPaper ||--o{ Review : has
1614
+ * ProjectPaper ||--|| Paper : "refers to"
1612
1615
  *
1613
- * Review 0+ -- 1 User : by
1614
- * Review 0+ -- 0+ Criterion : "ticks off"
1616
+ * Review }o--|| User : by
1617
+ * Review }o--o{ Criterion : "ticks off"
1615
1618
  *
1616
- * User 1 -- 1 UserSettings : has
1617
- * User 0+ -- 0+ Paper : "on reading-list of"
1619
+ * User }o--o{ Paper : "on reading-list of"
1618
1620
  * ~~~
1619
1621
  *
1620
1622
  * **Disclaimer:**
@@ -1934,7 +1936,9 @@ export declare class SnowballRClient implements ISnowballRClient, ServiceInfo {
1934
1936
  * ## Errors
1935
1937
  * | Error Code | Description |
1936
1938
  * | :--- | :--- |
1939
+ * | `NOT_FOUND` | A criterion that was about to be stored in the user's settings was not found. |
1937
1940
  * | `INVALID_ARGUMENT` | At least one updated setting did not meet the requirements. |
1941
+ * | `PERMISSION_DENIED` | The user is not allowed to use at least one of the criteria IDs. |
1938
1942
  * | `FAILED_PRECONDITION` | The user is not active (i.e., in state `USER_STATUS_ACTIVE`). |
1939
1943
  * | `UNAUTHENTICATED` | The user is not signed in. |
1940
1944
  *
@@ -2520,7 +2524,8 @@ export declare class SnowballRClient implements ISnowballRClient, ServiceInfo {
2520
2524
  * **non-blank**. If the criterion is successfully created, it is returned and **guaranteed to be specified**.
2521
2525
  *
2522
2526
  * A user-criterion is created by leaving the `project_id` empty. For a project-criterion,
2523
- * this field must be set and refer to a valid project in the **active** state.
2527
+ * this field must be set and refer to a valid project in the **active** state whose settings are
2528
+ * **not locked** (i.e., the project status must be `PROJECT_STATUS_ACTIVE`).
2524
2529
  * When creating a project-criterion, the calling user is **required to be a project admin**.
2525
2530
  *
2526
2531
  * ## Errors
@@ -2529,7 +2534,7 @@ export declare class SnowballRClient implements ISnowballRClient, ServiceInfo {
2529
2534
  * | `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. |
2530
2535
  * | `NOT_FOUND` | A project ID is given but does not refer to an existing project. |
2531
2536
  * | `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. |
2532
- * | `FAILED_PRECONDITION` | A project ID is given but does not refer to an active project (i.e., it is archived or deleted). |
2537
+ * | `FAILED_PRECONDITION` | A project ID is given but does not refer to an active project (i.e., it is archived or deleted) or the project's settings are locked (i.e., it is in the `PROJECT_STATUS_ACTIVE_LOCKED` state). |
2533
2538
  * | `UNAUTHENTICATED` | The user is not signed in. |
2534
2539
  *
2535
2540
  * @auth
@@ -2542,7 +2547,8 @@ export declare class SnowballRClient implements ISnowballRClient, ServiceInfo {
2542
2547
  * The updated criterion is returned and **guaranteed to be specified**.
2543
2548
  * If the updated criterion is a user-criterion, the calling user
2544
2549
  * is **required to be the creator of the criterion**. If it is a
2545
- * project-criterion, the calling user is **required to be a project admin**.
2550
+ * project-criterion, the calling user is **required to be a project admin** and the project
2551
+ * must be in the **active** state with **unlocked** settings (i.e., `PROJECT_STATUS_ACTIVE`).
2546
2552
  *
2547
2553
  * ## Errors
2548
2554
  * | Error Code | Description |
@@ -2550,7 +2556,7 @@ export declare class SnowballRClient implements ISnowballRClient, ServiceInfo {
2550
2556
  * | `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. |
2551
2557
  * | `NOT_FOUND` | No criterion with the provided ID was found or a project ID is given but does not refer to an existing project. |
2552
2558
  * | `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. |
2553
- * | `FAILED_PRECONDITION` | A project ID is given but does not refer to an active project (i.e., it is archived or deleted). |
2559
+ * | `FAILED_PRECONDITION` | If the criterion is a project-criterion, the project it belongs to is not active (i.e., it is archived or deleted) or its settings are locked (i.e., it is in the `PROJECT_STATUS_ACTIVE_LOCKED` state). |
2554
2560
  * | `UNAUTHENTICATED` | The user is not signed in. |
2555
2561
  *
2556
2562
  * @auth
@@ -2563,14 +2569,16 @@ export declare class SnowballRClient implements ISnowballRClient, ServiceInfo {
2563
2569
  * be removed. **This cannot be undone**.
2564
2570
  * If the deleted criterion is a user-criterion, the calling user
2565
2571
  * is **required to be the creator of the criterion**. If it is a
2566
- * project-criterion, the calling user is **required to be a project admin**.
2572
+ * project-criterion, the calling user is **required to be a project admin** and the project
2573
+ * must be in the **active** state with **unlocked** settings (i.e., `PROJECT_STATUS_ACTIVE`).
2567
2574
  *
2568
2575
  * ## Errors
2569
2576
  * | Error Code | Description |
2570
2577
  * | :--- | :--- |
2571
- * | `INVALID_ARGUMENT` | If the criterion is a project-criterion, the project ID is not a valid UUID. |
2578
+ * | `INVALID_ARGUMENT` | The criterion ID is not a valid UUID. |
2572
2579
  * | `NOT_FOUND` | No criterion with the provided ID was found. |
2573
2580
  * | `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. |
2581
+ * | `FAILED_PRECONDITION` | If the criterion is a project-criterion, the project it belongs to is not active (i.e., it is archived or deleted) or its settings are locked (i.e., it is in the `PROJECT_STATUS_ACTIVE_LOCKED` state). |
2574
2582
  * | `UNAUTHENTICATED` | The user is not signed in. |
2575
2583
  *
2576
2584
  * @auth
@@ -94,21 +94,19 @@ import { stackIntercept } from "@protobuf-ts/runtime-rpc";
94
94
  * erDiagram
95
95
  * direction LR
96
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
97
+ * Project }o--o{ User : "member of"
98
+ * Project ||--o{ ProjectPaper : contains
99
+ * Project ||--o{ Criterion : contains
101
100
  *
102
- * ProjectSettings 0+ -- 1+ Fetcher : "fetches from"
101
+ * Project }o--|{ Fetcher : "fetches from"
103
102
  *
104
- * ProjectPaper 1 -- 0+ Review : has
105
- * ProjectPaper 1 -- 1 Paper : "refers to"
103
+ * ProjectPaper ||--o{ Review : has
104
+ * ProjectPaper ||--|| Paper : "refers to"
106
105
  *
107
- * Review 0+ -- 1 User : by
108
- * Review 0+ -- 0+ Criterion : "ticks off"
106
+ * Review }o--|| User : by
107
+ * Review }o--o{ Criterion : "ticks off"
109
108
  *
110
- * User 1 -- 1 UserSettings : has
111
- * User 0+ -- 0+ Paper : "on reading-list of"
109
+ * User }o--o{ Paper : "on reading-list of"
112
110
  * ~~~
113
111
  *
114
112
  * **Disclaimer:**
@@ -483,7 +481,9 @@ export class SnowballRClient {
483
481
  * ## Errors
484
482
  * | Error Code | Description |
485
483
  * | :--- | :--- |
484
+ * | `NOT_FOUND` | A criterion that was about to be stored in the user's settings was not found. |
486
485
  * | `INVALID_ARGUMENT` | At least one updated setting did not meet the requirements. |
486
+ * | `PERMISSION_DENIED` | The user is not allowed to use at least one of the criteria IDs. |
487
487
  * | `FAILED_PRECONDITION` | The user is not active (i.e., in state `USER_STATUS_ACTIVE`). |
488
488
  * | `UNAUTHENTICATED` | The user is not signed in. |
489
489
  *
@@ -1171,7 +1171,8 @@ export class SnowballRClient {
1171
1171
  * **non-blank**. If the criterion is successfully created, it is returned and **guaranteed to be specified**.
1172
1172
  *
1173
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.
1174
+ * this field must be set and refer to a valid project in the **active** state whose settings are
1175
+ * **not locked** (i.e., the project status must be `PROJECT_STATUS_ACTIVE`).
1175
1176
  * When creating a project-criterion, the calling user is **required to be a project admin**.
1176
1177
  *
1177
1178
  * ## Errors
@@ -1180,7 +1181,7 @@ export class SnowballRClient {
1180
1181
  * | `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
1182
  * | `NOT_FOUND` | A project ID is given but does not refer to an existing project. |
1182
1183
  * | `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
+ * | `FAILED_PRECONDITION` | A project ID is given but does not refer to an active project (i.e., it is archived or deleted) or the project's settings are locked (i.e., it is in the `PROJECT_STATUS_ACTIVE_LOCKED` state). |
1184
1185
  * | `UNAUTHENTICATED` | The user is not signed in. |
1185
1186
  *
1186
1187
  * @auth
@@ -1196,7 +1197,8 @@ export class SnowballRClient {
1196
1197
  * The updated criterion is returned and **guaranteed to be specified**.
1197
1198
  * If the updated criterion is a user-criterion, the calling user
1198
1199
  * 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
+ * project-criterion, the calling user is **required to be a project admin** and the project
1201
+ * must be in the **active** state with **unlocked** settings (i.e., `PROJECT_STATUS_ACTIVE`).
1200
1202
  *
1201
1203
  * ## Errors
1202
1204
  * | Error Code | Description |
@@ -1204,7 +1206,7 @@ export class SnowballRClient {
1204
1206
  * | `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
1207
  * | `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
1208
  * | `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). |
1209
+ * | `FAILED_PRECONDITION` | If the criterion is a project-criterion, the project it belongs to is not active (i.e., it is archived or deleted) or its settings are locked (i.e., it is in the `PROJECT_STATUS_ACTIVE_LOCKED` state). |
1208
1210
  * | `UNAUTHENTICATED` | The user is not signed in. |
1209
1211
  *
1210
1212
  * @auth
@@ -1220,14 +1222,16 @@ export class SnowballRClient {
1220
1222
  * be removed. **This cannot be undone**.
1221
1223
  * If the deleted criterion is a user-criterion, the calling user
1222
1224
  * 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**.
1225
+ * project-criterion, the calling user is **required to be a project admin** and the project
1226
+ * must be in the **active** state with **unlocked** settings (i.e., `PROJECT_STATUS_ACTIVE`).
1224
1227
  *
1225
1228
  * ## Errors
1226
1229
  * | Error Code | Description |
1227
1230
  * | :--- | :--- |
1228
- * | `INVALID_ARGUMENT` | If the criterion is a project-criterion, the project ID is not a valid UUID. |
1231
+ * | `INVALID_ARGUMENT` | The criterion ID is not a valid UUID. |
1229
1232
  * | `NOT_FOUND` | No criterion with the provided ID was found. |
1230
1233
  * | `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. |
1234
+ * | `FAILED_PRECONDITION` | If the criterion is a project-criterion, the project it belongs to is not active (i.e., it is archived or deleted) or its settings are locked (i.e., it is in the `PROJECT_STATUS_ACTIVE_LOCKED` state). |
1231
1235
  * | `UNAUTHENTICATED` | The user is not signed in. |
1232
1236
  *
1233
1237
  * @auth
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@se-uulm/snowballr-grpc-client",
3
- "version": "0.2.1-alpha.2fd7ace",
3
+ "version": "0.2.1-alpha.5d467fe",
4
4
  "description": "gRPC API client for the SnowballR Web Application.",
5
5
  "keywords": [
6
6
  "api",
@@ -13,7 +13,7 @@
13
13
  },
14
14
  "repository": {
15
15
  "type": "git",
16
- "url": "git+ssh://git@github.com/SE-UUlm/snowballr-backend.git"
16
+ "url": "git+https://github.com/SE-UUlm/snowballr-backend.git"
17
17
  },
18
18
  "license": "GPL-3.0-or-later",
19
19
  "author": "SnowballR",
@@ -31,14 +31,13 @@
31
31
  "CHANGELOG.md"
32
32
  ],
33
33
  "scripts": {
34
- "prepare": "node compile.js"
34
+ "prepack": "node compile.js"
35
35
  },
36
36
  "peerDependencies": {
37
37
  "@protobuf-ts/runtime": "^2.11.1",
38
38
  "@protobuf-ts/runtime-rpc": "^2.11.1"
39
39
  },
40
40
  "devDependencies": {
41
- "@protobuf-ts/plugin": "^2.11.1",
42
- "ts-protoc-gen": "^0.15.0"
41
+ "@protobuf-ts/plugin": "^2.11.1"
43
42
  }
44
43
  }