@se-uulm/snowballr-grpc-client 0.0.0-stage → 0.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +58 -0
- package/LICENSE +674 -0
- package/README.md +6 -2
- package/dist/.gitkeep +0 -0
- package/dist/authentication.ts +525 -0
- package/dist/base.ts +362 -0
- package/dist/criterion.ts +390 -0
- package/dist/export.ts +213 -0
- package/dist/fetcher.ts +408 -0
- package/dist/google/protobuf/field_mask.ts +334 -0
- package/dist/google/protobuf/timestamp.ts +288 -0
- package/dist/main.client.ts +3197 -0
- package/dist/main.ts +140 -0
- package/dist/paper.ts +581 -0
- package/dist/project.ts +2110 -0
- package/dist/review.ts +349 -0
- package/dist/user.ts +316 -0
- package/dist/user_settings.ts +178 -0
- package/package.json +34 -5
package/README.md
CHANGED
|
@@ -1,3 +1,7 @@
|
|
|
1
|
-
#
|
|
1
|
+
# SnowballR API
|
|
2
2
|
|
|
3
|
-
This
|
|
3
|
+
This directory contains the API specification of the _SnowballR_ project.
|
|
4
|
+
For communication between the backend and frontend, [gRPC](https://grpc.io) is
|
|
5
|
+
used, whereas the services are defined by Protocol Buffers
|
|
6
|
+
(see [/proto](./proto/) for the service definition
|
|
7
|
+
(in [main.proto](./proto/main.proto)) and all required `.proto` files).
|
package/dist/.gitkeep
ADDED
|
File without changes
|
|
@@ -0,0 +1,525 @@
|
|
|
1
|
+
// @generated by protobuf-ts 2.11.1 with parameter generate_dependencies
|
|
2
|
+
// @generated from protobuf file "authentication.proto" (package "snowballr", syntax proto3)
|
|
3
|
+
// tslint:disable
|
|
4
|
+
//
|
|
5
|
+
/// Authentication related messages and enums of the SnowballR app.
|
|
6
|
+
//
|
|
7
|
+
import type { BinaryWriteOptions } from "@protobuf-ts/runtime";
|
|
8
|
+
import type { IBinaryWriter } from "@protobuf-ts/runtime";
|
|
9
|
+
import { WireType } from "@protobuf-ts/runtime";
|
|
10
|
+
import type { BinaryReadOptions } from "@protobuf-ts/runtime";
|
|
11
|
+
import type { IBinaryReader } from "@protobuf-ts/runtime";
|
|
12
|
+
import { UnknownFieldHandler } from "@protobuf-ts/runtime";
|
|
13
|
+
import type { PartialMessage } from "@protobuf-ts/runtime";
|
|
14
|
+
import { reflectionMergePartial } from "@protobuf-ts/runtime";
|
|
15
|
+
import { MessageType } from "@protobuf-ts/runtime";
|
|
16
|
+
/**
|
|
17
|
+
* Request to log in.
|
|
18
|
+
*
|
|
19
|
+
* @generated from protobuf message snowballr.LoginRequest
|
|
20
|
+
*/
|
|
21
|
+
export interface LoginRequest {
|
|
22
|
+
/**
|
|
23
|
+
* @generated from protobuf field: string email = 1
|
|
24
|
+
*/
|
|
25
|
+
email: string;
|
|
26
|
+
/**
|
|
27
|
+
* @generated from protobuf field: string password = 2
|
|
28
|
+
*/
|
|
29
|
+
password: string;
|
|
30
|
+
}
|
|
31
|
+
/**
|
|
32
|
+
* Request to register an account.
|
|
33
|
+
*
|
|
34
|
+
* @generated from protobuf message snowballr.RegisterRequest
|
|
35
|
+
*/
|
|
36
|
+
export interface RegisterRequest {
|
|
37
|
+
/**
|
|
38
|
+
* @generated from protobuf field: string first_name = 1
|
|
39
|
+
*/
|
|
40
|
+
firstName: string;
|
|
41
|
+
/**
|
|
42
|
+
* @generated from protobuf field: string last_name = 2
|
|
43
|
+
*/
|
|
44
|
+
lastName: string;
|
|
45
|
+
/**
|
|
46
|
+
* @generated from protobuf field: string email = 3
|
|
47
|
+
*/
|
|
48
|
+
email: string;
|
|
49
|
+
/**
|
|
50
|
+
* @generated from protobuf field: string password = 4
|
|
51
|
+
*/
|
|
52
|
+
password: string;
|
|
53
|
+
}
|
|
54
|
+
/**
|
|
55
|
+
* Request to verify a user's email after registering.
|
|
56
|
+
*
|
|
57
|
+
* @generated from protobuf message snowballr.VerifyEmailRequest
|
|
58
|
+
*/
|
|
59
|
+
export interface VerifyEmailRequest {
|
|
60
|
+
/**
|
|
61
|
+
* @generated from protobuf field: string token = 1
|
|
62
|
+
*/
|
|
63
|
+
token: string;
|
|
64
|
+
}
|
|
65
|
+
/**
|
|
66
|
+
* Request to request the reset of the user's password.
|
|
67
|
+
*
|
|
68
|
+
* @generated from protobuf message snowballr.RequestPasswordResetRequest
|
|
69
|
+
*/
|
|
70
|
+
export interface RequestPasswordResetRequest {
|
|
71
|
+
/**
|
|
72
|
+
* @generated from protobuf field: string email = 1
|
|
73
|
+
*/
|
|
74
|
+
email: string;
|
|
75
|
+
}
|
|
76
|
+
/**
|
|
77
|
+
* Request to actually reset the user's password.
|
|
78
|
+
*
|
|
79
|
+
* @generated from protobuf message snowballr.PasswordResetRequest
|
|
80
|
+
*/
|
|
81
|
+
export interface PasswordResetRequest {
|
|
82
|
+
/**
|
|
83
|
+
* @generated from protobuf field: string token = 1
|
|
84
|
+
*/
|
|
85
|
+
token: string;
|
|
86
|
+
/**
|
|
87
|
+
* @generated from protobuf field: string new_password = 2
|
|
88
|
+
*/
|
|
89
|
+
newPassword: string;
|
|
90
|
+
}
|
|
91
|
+
/**
|
|
92
|
+
* Request to reset the password of the user while being logged in.
|
|
93
|
+
*
|
|
94
|
+
* @generated from protobuf message snowballr.PasswordChangeRequest
|
|
95
|
+
*/
|
|
96
|
+
export interface PasswordChangeRequest {
|
|
97
|
+
/**
|
|
98
|
+
* @generated from protobuf field: string old_password = 1
|
|
99
|
+
*/
|
|
100
|
+
oldPassword: string;
|
|
101
|
+
/**
|
|
102
|
+
* @generated from protobuf field: string new_password = 2
|
|
103
|
+
*/
|
|
104
|
+
newPassword: string;
|
|
105
|
+
}
|
|
106
|
+
/**
|
|
107
|
+
* Response on whether the user is authenticated.
|
|
108
|
+
*
|
|
109
|
+
* @generated from protobuf message snowballr.AuthenticationStatusResponse
|
|
110
|
+
*/
|
|
111
|
+
export interface AuthenticationStatusResponse {
|
|
112
|
+
/**
|
|
113
|
+
* @generated from protobuf field: snowballr.AuthenticationStatus authentication_status = 1
|
|
114
|
+
*/
|
|
115
|
+
authenticationStatus: AuthenticationStatus;
|
|
116
|
+
}
|
|
117
|
+
/**
|
|
118
|
+
* The status of the user's authentication.
|
|
119
|
+
* It is required to be authenticated to use the SnowballR app.
|
|
120
|
+
*
|
|
121
|
+
* @generated from protobuf enum snowballr.AuthenticationStatus
|
|
122
|
+
*/
|
|
123
|
+
export enum AuthenticationStatus {
|
|
124
|
+
/**
|
|
125
|
+
* Unspecified authentication status.
|
|
126
|
+
*
|
|
127
|
+
* @generated from protobuf enum value: AUTHENTICATION_STATUS_UNSPECIFIED = 0;
|
|
128
|
+
*/
|
|
129
|
+
UNSPECIFIED = 0,
|
|
130
|
+
/**
|
|
131
|
+
* The user is unauthenticated. They have to sign into the app.
|
|
132
|
+
*
|
|
133
|
+
* @generated from protobuf enum value: AUTHENTICATION_STATUS_UNAUTHENTICATED = 1;
|
|
134
|
+
*/
|
|
135
|
+
UNAUTHENTICATED = 1,
|
|
136
|
+
/**
|
|
137
|
+
* The user's access token is expired. They have to use the refresh token to get a new access token.
|
|
138
|
+
*
|
|
139
|
+
* @generated from protobuf enum value: AUTHENTICATION_STATUS_ACCESS_TOKEN_EXPIRED = 2;
|
|
140
|
+
*/
|
|
141
|
+
ACCESS_TOKEN_EXPIRED = 2,
|
|
142
|
+
/**
|
|
143
|
+
* The user is authenticated. They are signed in.
|
|
144
|
+
*
|
|
145
|
+
* @generated from protobuf enum value: AUTHENTICATION_STATUS_AUTHENTICATED = 3;
|
|
146
|
+
*/
|
|
147
|
+
AUTHENTICATED = 3
|
|
148
|
+
}
|
|
149
|
+
// @generated message type with reflection information, may provide speed optimized methods
|
|
150
|
+
class LoginRequest$Type extends MessageType<LoginRequest> {
|
|
151
|
+
constructor() {
|
|
152
|
+
super("snowballr.LoginRequest", [
|
|
153
|
+
{ no: 1, name: "email", kind: "scalar", T: 9 /*ScalarType.STRING*/ },
|
|
154
|
+
{ no: 2, name: "password", kind: "scalar", T: 9 /*ScalarType.STRING*/ }
|
|
155
|
+
]);
|
|
156
|
+
}
|
|
157
|
+
create(value?: PartialMessage<LoginRequest>): LoginRequest {
|
|
158
|
+
const message = globalThis.Object.create((this.messagePrototype!));
|
|
159
|
+
message.email = "";
|
|
160
|
+
message.password = "";
|
|
161
|
+
if (value !== undefined)
|
|
162
|
+
reflectionMergePartial<LoginRequest>(this, message, value);
|
|
163
|
+
return message;
|
|
164
|
+
}
|
|
165
|
+
internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: LoginRequest): LoginRequest {
|
|
166
|
+
let message = target ?? this.create(), end = reader.pos + length;
|
|
167
|
+
while (reader.pos < end) {
|
|
168
|
+
let [fieldNo, wireType] = reader.tag();
|
|
169
|
+
switch (fieldNo) {
|
|
170
|
+
case /* string email */ 1:
|
|
171
|
+
message.email = reader.string();
|
|
172
|
+
break;
|
|
173
|
+
case /* string password */ 2:
|
|
174
|
+
message.password = reader.string();
|
|
175
|
+
break;
|
|
176
|
+
default:
|
|
177
|
+
let u = options.readUnknownField;
|
|
178
|
+
if (u === "throw")
|
|
179
|
+
throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`);
|
|
180
|
+
let d = reader.skip(wireType);
|
|
181
|
+
if (u !== false)
|
|
182
|
+
(u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d);
|
|
183
|
+
}
|
|
184
|
+
}
|
|
185
|
+
return message;
|
|
186
|
+
}
|
|
187
|
+
internalBinaryWrite(message: LoginRequest, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
|
|
188
|
+
/* string email = 1; */
|
|
189
|
+
if (message.email !== "")
|
|
190
|
+
writer.tag(1, WireType.LengthDelimited).string(message.email);
|
|
191
|
+
/* string password = 2; */
|
|
192
|
+
if (message.password !== "")
|
|
193
|
+
writer.tag(2, WireType.LengthDelimited).string(message.password);
|
|
194
|
+
let u = options.writeUnknownFields;
|
|
195
|
+
if (u !== false)
|
|
196
|
+
(u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
|
|
197
|
+
return writer;
|
|
198
|
+
}
|
|
199
|
+
}
|
|
200
|
+
/**
|
|
201
|
+
* @generated MessageType for protobuf message snowballr.LoginRequest
|
|
202
|
+
*/
|
|
203
|
+
export const LoginRequest = new LoginRequest$Type();
|
|
204
|
+
// @generated message type with reflection information, may provide speed optimized methods
|
|
205
|
+
class RegisterRequest$Type extends MessageType<RegisterRequest> {
|
|
206
|
+
constructor() {
|
|
207
|
+
super("snowballr.RegisterRequest", [
|
|
208
|
+
{ no: 1, name: "first_name", kind: "scalar", T: 9 /*ScalarType.STRING*/ },
|
|
209
|
+
{ no: 2, name: "last_name", kind: "scalar", T: 9 /*ScalarType.STRING*/ },
|
|
210
|
+
{ no: 3, name: "email", kind: "scalar", T: 9 /*ScalarType.STRING*/ },
|
|
211
|
+
{ no: 4, name: "password", kind: "scalar", T: 9 /*ScalarType.STRING*/ }
|
|
212
|
+
]);
|
|
213
|
+
}
|
|
214
|
+
create(value?: PartialMessage<RegisterRequest>): RegisterRequest {
|
|
215
|
+
const message = globalThis.Object.create((this.messagePrototype!));
|
|
216
|
+
message.firstName = "";
|
|
217
|
+
message.lastName = "";
|
|
218
|
+
message.email = "";
|
|
219
|
+
message.password = "";
|
|
220
|
+
if (value !== undefined)
|
|
221
|
+
reflectionMergePartial<RegisterRequest>(this, message, value);
|
|
222
|
+
return message;
|
|
223
|
+
}
|
|
224
|
+
internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: RegisterRequest): RegisterRequest {
|
|
225
|
+
let message = target ?? this.create(), end = reader.pos + length;
|
|
226
|
+
while (reader.pos < end) {
|
|
227
|
+
let [fieldNo, wireType] = reader.tag();
|
|
228
|
+
switch (fieldNo) {
|
|
229
|
+
case /* string first_name */ 1:
|
|
230
|
+
message.firstName = reader.string();
|
|
231
|
+
break;
|
|
232
|
+
case /* string last_name */ 2:
|
|
233
|
+
message.lastName = reader.string();
|
|
234
|
+
break;
|
|
235
|
+
case /* string email */ 3:
|
|
236
|
+
message.email = reader.string();
|
|
237
|
+
break;
|
|
238
|
+
case /* string password */ 4:
|
|
239
|
+
message.password = reader.string();
|
|
240
|
+
break;
|
|
241
|
+
default:
|
|
242
|
+
let u = options.readUnknownField;
|
|
243
|
+
if (u === "throw")
|
|
244
|
+
throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`);
|
|
245
|
+
let d = reader.skip(wireType);
|
|
246
|
+
if (u !== false)
|
|
247
|
+
(u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d);
|
|
248
|
+
}
|
|
249
|
+
}
|
|
250
|
+
return message;
|
|
251
|
+
}
|
|
252
|
+
internalBinaryWrite(message: RegisterRequest, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
|
|
253
|
+
/* string first_name = 1; */
|
|
254
|
+
if (message.firstName !== "")
|
|
255
|
+
writer.tag(1, WireType.LengthDelimited).string(message.firstName);
|
|
256
|
+
/* string last_name = 2; */
|
|
257
|
+
if (message.lastName !== "")
|
|
258
|
+
writer.tag(2, WireType.LengthDelimited).string(message.lastName);
|
|
259
|
+
/* string email = 3; */
|
|
260
|
+
if (message.email !== "")
|
|
261
|
+
writer.tag(3, WireType.LengthDelimited).string(message.email);
|
|
262
|
+
/* string password = 4; */
|
|
263
|
+
if (message.password !== "")
|
|
264
|
+
writer.tag(4, WireType.LengthDelimited).string(message.password);
|
|
265
|
+
let u = options.writeUnknownFields;
|
|
266
|
+
if (u !== false)
|
|
267
|
+
(u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
|
|
268
|
+
return writer;
|
|
269
|
+
}
|
|
270
|
+
}
|
|
271
|
+
/**
|
|
272
|
+
* @generated MessageType for protobuf message snowballr.RegisterRequest
|
|
273
|
+
*/
|
|
274
|
+
export const RegisterRequest = new RegisterRequest$Type();
|
|
275
|
+
// @generated message type with reflection information, may provide speed optimized methods
|
|
276
|
+
class VerifyEmailRequest$Type extends MessageType<VerifyEmailRequest> {
|
|
277
|
+
constructor() {
|
|
278
|
+
super("snowballr.VerifyEmailRequest", [
|
|
279
|
+
{ no: 1, name: "token", kind: "scalar", T: 9 /*ScalarType.STRING*/ }
|
|
280
|
+
]);
|
|
281
|
+
}
|
|
282
|
+
create(value?: PartialMessage<VerifyEmailRequest>): VerifyEmailRequest {
|
|
283
|
+
const message = globalThis.Object.create((this.messagePrototype!));
|
|
284
|
+
message.token = "";
|
|
285
|
+
if (value !== undefined)
|
|
286
|
+
reflectionMergePartial<VerifyEmailRequest>(this, message, value);
|
|
287
|
+
return message;
|
|
288
|
+
}
|
|
289
|
+
internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: VerifyEmailRequest): VerifyEmailRequest {
|
|
290
|
+
let message = target ?? this.create(), end = reader.pos + length;
|
|
291
|
+
while (reader.pos < end) {
|
|
292
|
+
let [fieldNo, wireType] = reader.tag();
|
|
293
|
+
switch (fieldNo) {
|
|
294
|
+
case /* string token */ 1:
|
|
295
|
+
message.token = reader.string();
|
|
296
|
+
break;
|
|
297
|
+
default:
|
|
298
|
+
let u = options.readUnknownField;
|
|
299
|
+
if (u === "throw")
|
|
300
|
+
throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`);
|
|
301
|
+
let d = reader.skip(wireType);
|
|
302
|
+
if (u !== false)
|
|
303
|
+
(u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d);
|
|
304
|
+
}
|
|
305
|
+
}
|
|
306
|
+
return message;
|
|
307
|
+
}
|
|
308
|
+
internalBinaryWrite(message: VerifyEmailRequest, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
|
|
309
|
+
/* string token = 1; */
|
|
310
|
+
if (message.token !== "")
|
|
311
|
+
writer.tag(1, WireType.LengthDelimited).string(message.token);
|
|
312
|
+
let u = options.writeUnknownFields;
|
|
313
|
+
if (u !== false)
|
|
314
|
+
(u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
|
|
315
|
+
return writer;
|
|
316
|
+
}
|
|
317
|
+
}
|
|
318
|
+
/**
|
|
319
|
+
* @generated MessageType for protobuf message snowballr.VerifyEmailRequest
|
|
320
|
+
*/
|
|
321
|
+
export const VerifyEmailRequest = new VerifyEmailRequest$Type();
|
|
322
|
+
// @generated message type with reflection information, may provide speed optimized methods
|
|
323
|
+
class RequestPasswordResetRequest$Type extends MessageType<RequestPasswordResetRequest> {
|
|
324
|
+
constructor() {
|
|
325
|
+
super("snowballr.RequestPasswordResetRequest", [
|
|
326
|
+
{ no: 1, name: "email", kind: "scalar", T: 9 /*ScalarType.STRING*/ }
|
|
327
|
+
]);
|
|
328
|
+
}
|
|
329
|
+
create(value?: PartialMessage<RequestPasswordResetRequest>): RequestPasswordResetRequest {
|
|
330
|
+
const message = globalThis.Object.create((this.messagePrototype!));
|
|
331
|
+
message.email = "";
|
|
332
|
+
if (value !== undefined)
|
|
333
|
+
reflectionMergePartial<RequestPasswordResetRequest>(this, message, value);
|
|
334
|
+
return message;
|
|
335
|
+
}
|
|
336
|
+
internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: RequestPasswordResetRequest): RequestPasswordResetRequest {
|
|
337
|
+
let message = target ?? this.create(), end = reader.pos + length;
|
|
338
|
+
while (reader.pos < end) {
|
|
339
|
+
let [fieldNo, wireType] = reader.tag();
|
|
340
|
+
switch (fieldNo) {
|
|
341
|
+
case /* string email */ 1:
|
|
342
|
+
message.email = reader.string();
|
|
343
|
+
break;
|
|
344
|
+
default:
|
|
345
|
+
let u = options.readUnknownField;
|
|
346
|
+
if (u === "throw")
|
|
347
|
+
throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`);
|
|
348
|
+
let d = reader.skip(wireType);
|
|
349
|
+
if (u !== false)
|
|
350
|
+
(u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d);
|
|
351
|
+
}
|
|
352
|
+
}
|
|
353
|
+
return message;
|
|
354
|
+
}
|
|
355
|
+
internalBinaryWrite(message: RequestPasswordResetRequest, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
|
|
356
|
+
/* string email = 1; */
|
|
357
|
+
if (message.email !== "")
|
|
358
|
+
writer.tag(1, WireType.LengthDelimited).string(message.email);
|
|
359
|
+
let u = options.writeUnknownFields;
|
|
360
|
+
if (u !== false)
|
|
361
|
+
(u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
|
|
362
|
+
return writer;
|
|
363
|
+
}
|
|
364
|
+
}
|
|
365
|
+
/**
|
|
366
|
+
* @generated MessageType for protobuf message snowballr.RequestPasswordResetRequest
|
|
367
|
+
*/
|
|
368
|
+
export const RequestPasswordResetRequest = new RequestPasswordResetRequest$Type();
|
|
369
|
+
// @generated message type with reflection information, may provide speed optimized methods
|
|
370
|
+
class PasswordResetRequest$Type extends MessageType<PasswordResetRequest> {
|
|
371
|
+
constructor() {
|
|
372
|
+
super("snowballr.PasswordResetRequest", [
|
|
373
|
+
{ no: 1, name: "token", kind: "scalar", T: 9 /*ScalarType.STRING*/ },
|
|
374
|
+
{ no: 2, name: "new_password", kind: "scalar", T: 9 /*ScalarType.STRING*/ }
|
|
375
|
+
]);
|
|
376
|
+
}
|
|
377
|
+
create(value?: PartialMessage<PasswordResetRequest>): PasswordResetRequest {
|
|
378
|
+
const message = globalThis.Object.create((this.messagePrototype!));
|
|
379
|
+
message.token = "";
|
|
380
|
+
message.newPassword = "";
|
|
381
|
+
if (value !== undefined)
|
|
382
|
+
reflectionMergePartial<PasswordResetRequest>(this, message, value);
|
|
383
|
+
return message;
|
|
384
|
+
}
|
|
385
|
+
internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: PasswordResetRequest): PasswordResetRequest {
|
|
386
|
+
let message = target ?? this.create(), end = reader.pos + length;
|
|
387
|
+
while (reader.pos < end) {
|
|
388
|
+
let [fieldNo, wireType] = reader.tag();
|
|
389
|
+
switch (fieldNo) {
|
|
390
|
+
case /* string token */ 1:
|
|
391
|
+
message.token = reader.string();
|
|
392
|
+
break;
|
|
393
|
+
case /* string new_password */ 2:
|
|
394
|
+
message.newPassword = reader.string();
|
|
395
|
+
break;
|
|
396
|
+
default:
|
|
397
|
+
let u = options.readUnknownField;
|
|
398
|
+
if (u === "throw")
|
|
399
|
+
throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`);
|
|
400
|
+
let d = reader.skip(wireType);
|
|
401
|
+
if (u !== false)
|
|
402
|
+
(u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d);
|
|
403
|
+
}
|
|
404
|
+
}
|
|
405
|
+
return message;
|
|
406
|
+
}
|
|
407
|
+
internalBinaryWrite(message: PasswordResetRequest, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
|
|
408
|
+
/* string token = 1; */
|
|
409
|
+
if (message.token !== "")
|
|
410
|
+
writer.tag(1, WireType.LengthDelimited).string(message.token);
|
|
411
|
+
/* string new_password = 2; */
|
|
412
|
+
if (message.newPassword !== "")
|
|
413
|
+
writer.tag(2, WireType.LengthDelimited).string(message.newPassword);
|
|
414
|
+
let u = options.writeUnknownFields;
|
|
415
|
+
if (u !== false)
|
|
416
|
+
(u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
|
|
417
|
+
return writer;
|
|
418
|
+
}
|
|
419
|
+
}
|
|
420
|
+
/**
|
|
421
|
+
* @generated MessageType for protobuf message snowballr.PasswordResetRequest
|
|
422
|
+
*/
|
|
423
|
+
export const PasswordResetRequest = new PasswordResetRequest$Type();
|
|
424
|
+
// @generated message type with reflection information, may provide speed optimized methods
|
|
425
|
+
class PasswordChangeRequest$Type extends MessageType<PasswordChangeRequest> {
|
|
426
|
+
constructor() {
|
|
427
|
+
super("snowballr.PasswordChangeRequest", [
|
|
428
|
+
{ no: 1, name: "old_password", kind: "scalar", T: 9 /*ScalarType.STRING*/ },
|
|
429
|
+
{ no: 2, name: "new_password", kind: "scalar", T: 9 /*ScalarType.STRING*/ }
|
|
430
|
+
]);
|
|
431
|
+
}
|
|
432
|
+
create(value?: PartialMessage<PasswordChangeRequest>): PasswordChangeRequest {
|
|
433
|
+
const message = globalThis.Object.create((this.messagePrototype!));
|
|
434
|
+
message.oldPassword = "";
|
|
435
|
+
message.newPassword = "";
|
|
436
|
+
if (value !== undefined)
|
|
437
|
+
reflectionMergePartial<PasswordChangeRequest>(this, message, value);
|
|
438
|
+
return message;
|
|
439
|
+
}
|
|
440
|
+
internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: PasswordChangeRequest): PasswordChangeRequest {
|
|
441
|
+
let message = target ?? this.create(), end = reader.pos + length;
|
|
442
|
+
while (reader.pos < end) {
|
|
443
|
+
let [fieldNo, wireType] = reader.tag();
|
|
444
|
+
switch (fieldNo) {
|
|
445
|
+
case /* string old_password */ 1:
|
|
446
|
+
message.oldPassword = reader.string();
|
|
447
|
+
break;
|
|
448
|
+
case /* string new_password */ 2:
|
|
449
|
+
message.newPassword = reader.string();
|
|
450
|
+
break;
|
|
451
|
+
default:
|
|
452
|
+
let u = options.readUnknownField;
|
|
453
|
+
if (u === "throw")
|
|
454
|
+
throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`);
|
|
455
|
+
let d = reader.skip(wireType);
|
|
456
|
+
if (u !== false)
|
|
457
|
+
(u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d);
|
|
458
|
+
}
|
|
459
|
+
}
|
|
460
|
+
return message;
|
|
461
|
+
}
|
|
462
|
+
internalBinaryWrite(message: PasswordChangeRequest, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
|
|
463
|
+
/* string old_password = 1; */
|
|
464
|
+
if (message.oldPassword !== "")
|
|
465
|
+
writer.tag(1, WireType.LengthDelimited).string(message.oldPassword);
|
|
466
|
+
/* string new_password = 2; */
|
|
467
|
+
if (message.newPassword !== "")
|
|
468
|
+
writer.tag(2, WireType.LengthDelimited).string(message.newPassword);
|
|
469
|
+
let u = options.writeUnknownFields;
|
|
470
|
+
if (u !== false)
|
|
471
|
+
(u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
|
|
472
|
+
return writer;
|
|
473
|
+
}
|
|
474
|
+
}
|
|
475
|
+
/**
|
|
476
|
+
* @generated MessageType for protobuf message snowballr.PasswordChangeRequest
|
|
477
|
+
*/
|
|
478
|
+
export const PasswordChangeRequest = new PasswordChangeRequest$Type();
|
|
479
|
+
// @generated message type with reflection information, may provide speed optimized methods
|
|
480
|
+
class AuthenticationStatusResponse$Type extends MessageType<AuthenticationStatusResponse> {
|
|
481
|
+
constructor() {
|
|
482
|
+
super("snowballr.AuthenticationStatusResponse", [
|
|
483
|
+
{ no: 1, name: "authentication_status", kind: "enum", T: () => ["snowballr.AuthenticationStatus", AuthenticationStatus, "AUTHENTICATION_STATUS_"] }
|
|
484
|
+
]);
|
|
485
|
+
}
|
|
486
|
+
create(value?: PartialMessage<AuthenticationStatusResponse>): AuthenticationStatusResponse {
|
|
487
|
+
const message = globalThis.Object.create((this.messagePrototype!));
|
|
488
|
+
message.authenticationStatus = 0;
|
|
489
|
+
if (value !== undefined)
|
|
490
|
+
reflectionMergePartial<AuthenticationStatusResponse>(this, message, value);
|
|
491
|
+
return message;
|
|
492
|
+
}
|
|
493
|
+
internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: AuthenticationStatusResponse): AuthenticationStatusResponse {
|
|
494
|
+
let message = target ?? this.create(), end = reader.pos + length;
|
|
495
|
+
while (reader.pos < end) {
|
|
496
|
+
let [fieldNo, wireType] = reader.tag();
|
|
497
|
+
switch (fieldNo) {
|
|
498
|
+
case /* snowballr.AuthenticationStatus authentication_status */ 1:
|
|
499
|
+
message.authenticationStatus = reader.int32();
|
|
500
|
+
break;
|
|
501
|
+
default:
|
|
502
|
+
let u = options.readUnknownField;
|
|
503
|
+
if (u === "throw")
|
|
504
|
+
throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`);
|
|
505
|
+
let d = reader.skip(wireType);
|
|
506
|
+
if (u !== false)
|
|
507
|
+
(u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d);
|
|
508
|
+
}
|
|
509
|
+
}
|
|
510
|
+
return message;
|
|
511
|
+
}
|
|
512
|
+
internalBinaryWrite(message: AuthenticationStatusResponse, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
|
|
513
|
+
/* snowballr.AuthenticationStatus authentication_status = 1; */
|
|
514
|
+
if (message.authenticationStatus !== 0)
|
|
515
|
+
writer.tag(1, WireType.Varint).int32(message.authenticationStatus);
|
|
516
|
+
let u = options.writeUnknownFields;
|
|
517
|
+
if (u !== false)
|
|
518
|
+
(u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
|
|
519
|
+
return writer;
|
|
520
|
+
}
|
|
521
|
+
}
|
|
522
|
+
/**
|
|
523
|
+
* @generated MessageType for protobuf message snowballr.AuthenticationStatusResponse
|
|
524
|
+
*/
|
|
525
|
+
export const AuthenticationStatusResponse = new AuthenticationStatusResponse$Type();
|