@se-uulm/snowballr-grpc-client 0.2.0 → 0.2.1-alpha.163188
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 +4 -0
- package/dist/authentication.d.ts +170 -0
- package/dist/{authentication.ts → authentication.js} +38 -245
- package/dist/base.d.ts +118 -0
- package/dist/{base.ts → base.js} +37 -149
- 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} +158 -837
- package/dist/main.client.js +1428 -0
- package/dist/main.d.ts +10 -0
- package/dist/{main.ts → main.js} +55 -68
- package/dist/paper.d.ts +191 -0
- package/dist/{paper.ts → paper.js} +34 -235
- package/dist/project.d.ts +841 -0
- package/dist/{project.ts → project.js} +189 -688
- package/dist/review.d.ts +127 -0
- package/dist/{review.ts → review.js} +26 -152
- 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 +17 -9
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/`.
|
|
@@ -0,0 +1,170 @@
|
|
|
1
|
+
// @generated by protobuf-ts 2.11.1 with parameter generate_dependencies,output_javascript
|
|
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 type { BinaryReadOptions } from "@protobuf-ts/runtime";
|
|
10
|
+
import type { IBinaryReader } from "@protobuf-ts/runtime";
|
|
11
|
+
import type { PartialMessage } from "@protobuf-ts/runtime";
|
|
12
|
+
import { MessageType } from "@protobuf-ts/runtime";
|
|
13
|
+
/**
|
|
14
|
+
* Request to log in.
|
|
15
|
+
*
|
|
16
|
+
* @generated from protobuf message snowballr.LoginRequest
|
|
17
|
+
*/
|
|
18
|
+
export interface LoginRequest {
|
|
19
|
+
/**
|
|
20
|
+
* @generated from protobuf field: string email = 1
|
|
21
|
+
*/
|
|
22
|
+
email: string;
|
|
23
|
+
/**
|
|
24
|
+
* @generated from protobuf field: string password = 2
|
|
25
|
+
*/
|
|
26
|
+
password: string;
|
|
27
|
+
}
|
|
28
|
+
/**
|
|
29
|
+
* Request to register an account.
|
|
30
|
+
*
|
|
31
|
+
* @generated from protobuf message snowballr.RegisterRequest
|
|
32
|
+
*/
|
|
33
|
+
export interface RegisterRequest {
|
|
34
|
+
/**
|
|
35
|
+
* @generated from protobuf field: string first_name = 1
|
|
36
|
+
*/
|
|
37
|
+
firstName: string;
|
|
38
|
+
/**
|
|
39
|
+
* @generated from protobuf field: string last_name = 2
|
|
40
|
+
*/
|
|
41
|
+
lastName: string;
|
|
42
|
+
/**
|
|
43
|
+
* @generated from protobuf field: string email = 3
|
|
44
|
+
*/
|
|
45
|
+
email: string;
|
|
46
|
+
/**
|
|
47
|
+
* @generated from protobuf field: string password = 4
|
|
48
|
+
*/
|
|
49
|
+
password: string;
|
|
50
|
+
}
|
|
51
|
+
/**
|
|
52
|
+
* Request to verify a user's email after registering.
|
|
53
|
+
*
|
|
54
|
+
* @generated from protobuf message snowballr.VerifyEmailRequest
|
|
55
|
+
*/
|
|
56
|
+
export interface VerifyEmailRequest {
|
|
57
|
+
/**
|
|
58
|
+
* @generated from protobuf field: string token = 1
|
|
59
|
+
*/
|
|
60
|
+
token: string;
|
|
61
|
+
}
|
|
62
|
+
/**
|
|
63
|
+
* Request to reset the password of the user while being logged in.
|
|
64
|
+
*
|
|
65
|
+
* @generated from protobuf message snowballr.PasswordChangeRequest
|
|
66
|
+
*/
|
|
67
|
+
export interface PasswordChangeRequest {
|
|
68
|
+
/**
|
|
69
|
+
* @generated from protobuf field: string old_password = 1
|
|
70
|
+
*/
|
|
71
|
+
oldPassword: string;
|
|
72
|
+
/**
|
|
73
|
+
* @generated from protobuf field: string new_password = 2
|
|
74
|
+
*/
|
|
75
|
+
newPassword: string;
|
|
76
|
+
}
|
|
77
|
+
/**
|
|
78
|
+
* Response on whether the user is authenticated.
|
|
79
|
+
*
|
|
80
|
+
* @generated from protobuf message snowballr.AuthenticationStatusResponse
|
|
81
|
+
*/
|
|
82
|
+
export interface AuthenticationStatusResponse {
|
|
83
|
+
/**
|
|
84
|
+
* @generated from protobuf field: snowballr.AuthenticationStatus authentication_status = 1
|
|
85
|
+
*/
|
|
86
|
+
authenticationStatus: AuthenticationStatus;
|
|
87
|
+
}
|
|
88
|
+
/**
|
|
89
|
+
* The status of the user's authentication.
|
|
90
|
+
* It is required to be authenticated to use the SnowballR app.
|
|
91
|
+
*
|
|
92
|
+
* @generated from protobuf enum snowballr.AuthenticationStatus
|
|
93
|
+
*/
|
|
94
|
+
export declare enum AuthenticationStatus {
|
|
95
|
+
/**
|
|
96
|
+
* Unspecified authentication status.
|
|
97
|
+
*
|
|
98
|
+
* @generated from protobuf enum value: AUTHENTICATION_STATUS_UNSPECIFIED = 0;
|
|
99
|
+
*/
|
|
100
|
+
UNSPECIFIED = 0,
|
|
101
|
+
/**
|
|
102
|
+
* The user is unauthenticated. They have to sign into the app.
|
|
103
|
+
*
|
|
104
|
+
* @generated from protobuf enum value: AUTHENTICATION_STATUS_UNAUTHENTICATED = 1;
|
|
105
|
+
*/
|
|
106
|
+
UNAUTHENTICATED = 1,
|
|
107
|
+
/**
|
|
108
|
+
* The user's access token is expired. They have to use the refresh token to get a new access token.
|
|
109
|
+
*
|
|
110
|
+
* @generated from protobuf enum value: AUTHENTICATION_STATUS_ACCESS_TOKEN_EXPIRED = 2;
|
|
111
|
+
*/
|
|
112
|
+
ACCESS_TOKEN_EXPIRED = 2,
|
|
113
|
+
/**
|
|
114
|
+
* The user is authenticated. They are signed in.
|
|
115
|
+
*
|
|
116
|
+
* @generated from protobuf enum value: AUTHENTICATION_STATUS_AUTHENTICATED = 3;
|
|
117
|
+
*/
|
|
118
|
+
AUTHENTICATED = 3
|
|
119
|
+
}
|
|
120
|
+
declare class LoginRequest$Type extends MessageType<LoginRequest> {
|
|
121
|
+
constructor();
|
|
122
|
+
create(value?: PartialMessage<LoginRequest>): LoginRequest;
|
|
123
|
+
internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: LoginRequest): LoginRequest;
|
|
124
|
+
internalBinaryWrite(message: LoginRequest, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter;
|
|
125
|
+
}
|
|
126
|
+
/**
|
|
127
|
+
* @generated MessageType for protobuf message snowballr.LoginRequest
|
|
128
|
+
*/
|
|
129
|
+
export declare const LoginRequest: LoginRequest$Type;
|
|
130
|
+
declare class RegisterRequest$Type extends MessageType<RegisterRequest> {
|
|
131
|
+
constructor();
|
|
132
|
+
create(value?: PartialMessage<RegisterRequest>): RegisterRequest;
|
|
133
|
+
internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: RegisterRequest): RegisterRequest;
|
|
134
|
+
internalBinaryWrite(message: RegisterRequest, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter;
|
|
135
|
+
}
|
|
136
|
+
/**
|
|
137
|
+
* @generated MessageType for protobuf message snowballr.RegisterRequest
|
|
138
|
+
*/
|
|
139
|
+
export declare const RegisterRequest: RegisterRequest$Type;
|
|
140
|
+
declare class VerifyEmailRequest$Type extends MessageType<VerifyEmailRequest> {
|
|
141
|
+
constructor();
|
|
142
|
+
create(value?: PartialMessage<VerifyEmailRequest>): VerifyEmailRequest;
|
|
143
|
+
internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: VerifyEmailRequest): VerifyEmailRequest;
|
|
144
|
+
internalBinaryWrite(message: VerifyEmailRequest, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter;
|
|
145
|
+
}
|
|
146
|
+
/**
|
|
147
|
+
* @generated MessageType for protobuf message snowballr.VerifyEmailRequest
|
|
148
|
+
*/
|
|
149
|
+
export declare const VerifyEmailRequest: VerifyEmailRequest$Type;
|
|
150
|
+
declare class PasswordChangeRequest$Type extends MessageType<PasswordChangeRequest> {
|
|
151
|
+
constructor();
|
|
152
|
+
create(value?: PartialMessage<PasswordChangeRequest>): PasswordChangeRequest;
|
|
153
|
+
internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: PasswordChangeRequest): PasswordChangeRequest;
|
|
154
|
+
internalBinaryWrite(message: PasswordChangeRequest, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter;
|
|
155
|
+
}
|
|
156
|
+
/**
|
|
157
|
+
* @generated MessageType for protobuf message snowballr.PasswordChangeRequest
|
|
158
|
+
*/
|
|
159
|
+
export declare const PasswordChangeRequest: PasswordChangeRequest$Type;
|
|
160
|
+
declare class AuthenticationStatusResponse$Type extends MessageType<AuthenticationStatusResponse> {
|
|
161
|
+
constructor();
|
|
162
|
+
create(value?: PartialMessage<AuthenticationStatusResponse>): AuthenticationStatusResponse;
|
|
163
|
+
internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: AuthenticationStatusResponse): AuthenticationStatusResponse;
|
|
164
|
+
internalBinaryWrite(message: AuthenticationStatusResponse, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter;
|
|
165
|
+
}
|
|
166
|
+
/**
|
|
167
|
+
* @generated MessageType for protobuf message snowballr.AuthenticationStatusResponse
|
|
168
|
+
*/
|
|
169
|
+
export declare const AuthenticationStatusResponse: AuthenticationStatusResponse$Type;
|
|
170
|
+
export {};
|
|
@@ -1,168 +1,63 @@
|
|
|
1
|
-
// @generated by protobuf-ts 2.11.1 with parameter generate_dependencies
|
|
1
|
+
// @generated by protobuf-ts 2.11.1 with parameter generate_dependencies,output_javascript
|
|
2
2
|
// @generated from protobuf file "authentication.proto" (package "snowballr", syntax proto3)
|
|
3
3
|
// tslint:disable
|
|
4
4
|
//
|
|
5
5
|
/// Authentication related messages and enums of the SnowballR app.
|
|
6
6
|
//
|
|
7
|
-
import type { BinaryWriteOptions } from "@protobuf-ts/runtime";
|
|
8
|
-
import type { IBinaryWriter } from "@protobuf-ts/runtime";
|
|
9
7
|
import { WireType } from "@protobuf-ts/runtime";
|
|
10
|
-
import type { BinaryReadOptions } from "@protobuf-ts/runtime";
|
|
11
|
-
import type { IBinaryReader } from "@protobuf-ts/runtime";
|
|
12
8
|
import { UnknownFieldHandler } from "@protobuf-ts/runtime";
|
|
13
|
-
import type { PartialMessage } from "@protobuf-ts/runtime";
|
|
14
9
|
import { reflectionMergePartial } from "@protobuf-ts/runtime";
|
|
15
10
|
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
11
|
/**
|
|
118
12
|
* The status of the user's authentication.
|
|
119
13
|
* It is required to be authenticated to use the SnowballR app.
|
|
120
14
|
*
|
|
121
15
|
* @generated from protobuf enum snowballr.AuthenticationStatus
|
|
122
16
|
*/
|
|
123
|
-
export
|
|
17
|
+
export var AuthenticationStatus;
|
|
18
|
+
(function (AuthenticationStatus) {
|
|
124
19
|
/**
|
|
125
20
|
* Unspecified authentication status.
|
|
126
21
|
*
|
|
127
22
|
* @generated from protobuf enum value: AUTHENTICATION_STATUS_UNSPECIFIED = 0;
|
|
128
23
|
*/
|
|
129
|
-
UNSPECIFIED = 0
|
|
24
|
+
AuthenticationStatus[AuthenticationStatus["UNSPECIFIED"] = 0] = "UNSPECIFIED";
|
|
130
25
|
/**
|
|
131
26
|
* The user is unauthenticated. They have to sign into the app.
|
|
132
27
|
*
|
|
133
28
|
* @generated from protobuf enum value: AUTHENTICATION_STATUS_UNAUTHENTICATED = 1;
|
|
134
29
|
*/
|
|
135
|
-
UNAUTHENTICATED = 1
|
|
30
|
+
AuthenticationStatus[AuthenticationStatus["UNAUTHENTICATED"] = 1] = "UNAUTHENTICATED";
|
|
136
31
|
/**
|
|
137
32
|
* The user's access token is expired. They have to use the refresh token to get a new access token.
|
|
138
33
|
*
|
|
139
34
|
* @generated from protobuf enum value: AUTHENTICATION_STATUS_ACCESS_TOKEN_EXPIRED = 2;
|
|
140
35
|
*/
|
|
141
|
-
ACCESS_TOKEN_EXPIRED = 2
|
|
36
|
+
AuthenticationStatus[AuthenticationStatus["ACCESS_TOKEN_EXPIRED"] = 2] = "ACCESS_TOKEN_EXPIRED";
|
|
142
37
|
/**
|
|
143
38
|
* The user is authenticated. They are signed in.
|
|
144
39
|
*
|
|
145
40
|
* @generated from protobuf enum value: AUTHENTICATION_STATUS_AUTHENTICATED = 3;
|
|
146
41
|
*/
|
|
147
|
-
AUTHENTICATED = 3
|
|
148
|
-
}
|
|
42
|
+
AuthenticationStatus[AuthenticationStatus["AUTHENTICATED"] = 3] = "AUTHENTICATED";
|
|
43
|
+
})(AuthenticationStatus || (AuthenticationStatus = {}));
|
|
149
44
|
// @generated message type with reflection information, may provide speed optimized methods
|
|
150
|
-
class LoginRequest$Type extends MessageType
|
|
45
|
+
class LoginRequest$Type extends MessageType {
|
|
151
46
|
constructor() {
|
|
152
47
|
super("snowballr.LoginRequest", [
|
|
153
48
|
{ no: 1, name: "email", kind: "scalar", T: 9 /*ScalarType.STRING*/ },
|
|
154
49
|
{ no: 2, name: "password", kind: "scalar", T: 9 /*ScalarType.STRING*/ }
|
|
155
50
|
]);
|
|
156
51
|
}
|
|
157
|
-
create(value
|
|
158
|
-
const message = globalThis.Object.create((this.messagePrototype
|
|
52
|
+
create(value) {
|
|
53
|
+
const message = globalThis.Object.create((this.messagePrototype));
|
|
159
54
|
message.email = "";
|
|
160
55
|
message.password = "";
|
|
161
56
|
if (value !== undefined)
|
|
162
|
-
reflectionMergePartial
|
|
57
|
+
reflectionMergePartial(this, message, value);
|
|
163
58
|
return message;
|
|
164
59
|
}
|
|
165
|
-
internalBinaryRead(reader
|
|
60
|
+
internalBinaryRead(reader, length, options, target) {
|
|
166
61
|
let message = target ?? this.create(), end = reader.pos + length;
|
|
167
62
|
while (reader.pos < end) {
|
|
168
63
|
let [fieldNo, wireType] = reader.tag();
|
|
@@ -184,7 +79,7 @@ class LoginRequest$Type extends MessageType<LoginRequest> {
|
|
|
184
79
|
}
|
|
185
80
|
return message;
|
|
186
81
|
}
|
|
187
|
-
internalBinaryWrite(message
|
|
82
|
+
internalBinaryWrite(message, writer, options) {
|
|
188
83
|
/* string email = 1; */
|
|
189
84
|
if (message.email !== "")
|
|
190
85
|
writer.tag(1, WireType.LengthDelimited).string(message.email);
|
|
@@ -202,7 +97,7 @@ class LoginRequest$Type extends MessageType<LoginRequest> {
|
|
|
202
97
|
*/
|
|
203
98
|
export const LoginRequest = new LoginRequest$Type();
|
|
204
99
|
// @generated message type with reflection information, may provide speed optimized methods
|
|
205
|
-
class RegisterRequest$Type extends MessageType
|
|
100
|
+
class RegisterRequest$Type extends MessageType {
|
|
206
101
|
constructor() {
|
|
207
102
|
super("snowballr.RegisterRequest", [
|
|
208
103
|
{ no: 1, name: "first_name", kind: "scalar", T: 9 /*ScalarType.STRING*/ },
|
|
@@ -211,17 +106,17 @@ class RegisterRequest$Type extends MessageType<RegisterRequest> {
|
|
|
211
106
|
{ no: 4, name: "password", kind: "scalar", T: 9 /*ScalarType.STRING*/ }
|
|
212
107
|
]);
|
|
213
108
|
}
|
|
214
|
-
create(value
|
|
215
|
-
const message = globalThis.Object.create((this.messagePrototype
|
|
109
|
+
create(value) {
|
|
110
|
+
const message = globalThis.Object.create((this.messagePrototype));
|
|
216
111
|
message.firstName = "";
|
|
217
112
|
message.lastName = "";
|
|
218
113
|
message.email = "";
|
|
219
114
|
message.password = "";
|
|
220
115
|
if (value !== undefined)
|
|
221
|
-
reflectionMergePartial
|
|
116
|
+
reflectionMergePartial(this, message, value);
|
|
222
117
|
return message;
|
|
223
118
|
}
|
|
224
|
-
internalBinaryRead(reader
|
|
119
|
+
internalBinaryRead(reader, length, options, target) {
|
|
225
120
|
let message = target ?? this.create(), end = reader.pos + length;
|
|
226
121
|
while (reader.pos < end) {
|
|
227
122
|
let [fieldNo, wireType] = reader.tag();
|
|
@@ -249,7 +144,7 @@ class RegisterRequest$Type extends MessageType<RegisterRequest> {
|
|
|
249
144
|
}
|
|
250
145
|
return message;
|
|
251
146
|
}
|
|
252
|
-
internalBinaryWrite(message
|
|
147
|
+
internalBinaryWrite(message, writer, options) {
|
|
253
148
|
/* string first_name = 1; */
|
|
254
149
|
if (message.firstName !== "")
|
|
255
150
|
writer.tag(1, WireType.LengthDelimited).string(message.firstName);
|
|
@@ -273,20 +168,20 @@ class RegisterRequest$Type extends MessageType<RegisterRequest> {
|
|
|
273
168
|
*/
|
|
274
169
|
export const RegisterRequest = new RegisterRequest$Type();
|
|
275
170
|
// @generated message type with reflection information, may provide speed optimized methods
|
|
276
|
-
class VerifyEmailRequest$Type extends MessageType
|
|
171
|
+
class VerifyEmailRequest$Type extends MessageType {
|
|
277
172
|
constructor() {
|
|
278
173
|
super("snowballr.VerifyEmailRequest", [
|
|
279
174
|
{ no: 1, name: "token", kind: "scalar", T: 9 /*ScalarType.STRING*/ }
|
|
280
175
|
]);
|
|
281
176
|
}
|
|
282
|
-
create(value
|
|
283
|
-
const message = globalThis.Object.create((this.messagePrototype
|
|
177
|
+
create(value) {
|
|
178
|
+
const message = globalThis.Object.create((this.messagePrototype));
|
|
284
179
|
message.token = "";
|
|
285
180
|
if (value !== undefined)
|
|
286
|
-
reflectionMergePartial
|
|
181
|
+
reflectionMergePartial(this, message, value);
|
|
287
182
|
return message;
|
|
288
183
|
}
|
|
289
|
-
internalBinaryRead(reader
|
|
184
|
+
internalBinaryRead(reader, length, options, target) {
|
|
290
185
|
let message = target ?? this.create(), end = reader.pos + length;
|
|
291
186
|
while (reader.pos < end) {
|
|
292
187
|
let [fieldNo, wireType] = reader.tag();
|
|
@@ -305,7 +200,7 @@ class VerifyEmailRequest$Type extends MessageType<VerifyEmailRequest> {
|
|
|
305
200
|
}
|
|
306
201
|
return message;
|
|
307
202
|
}
|
|
308
|
-
internalBinaryWrite(message
|
|
203
|
+
internalBinaryWrite(message, writer, options) {
|
|
309
204
|
/* string token = 1; */
|
|
310
205
|
if (message.token !== "")
|
|
311
206
|
writer.tag(1, WireType.LengthDelimited).string(message.token);
|
|
@@ -320,124 +215,22 @@ class VerifyEmailRequest$Type extends MessageType<VerifyEmailRequest> {
|
|
|
320
215
|
*/
|
|
321
216
|
export const VerifyEmailRequest = new VerifyEmailRequest$Type();
|
|
322
217
|
// @generated message type with reflection information, may provide speed optimized methods
|
|
323
|
-
class
|
|
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> {
|
|
218
|
+
class PasswordChangeRequest$Type extends MessageType {
|
|
426
219
|
constructor() {
|
|
427
220
|
super("snowballr.PasswordChangeRequest", [
|
|
428
221
|
{ no: 1, name: "old_password", kind: "scalar", T: 9 /*ScalarType.STRING*/ },
|
|
429
222
|
{ no: 2, name: "new_password", kind: "scalar", T: 9 /*ScalarType.STRING*/ }
|
|
430
223
|
]);
|
|
431
224
|
}
|
|
432
|
-
create(value
|
|
433
|
-
const message = globalThis.Object.create((this.messagePrototype
|
|
225
|
+
create(value) {
|
|
226
|
+
const message = globalThis.Object.create((this.messagePrototype));
|
|
434
227
|
message.oldPassword = "";
|
|
435
228
|
message.newPassword = "";
|
|
436
229
|
if (value !== undefined)
|
|
437
|
-
reflectionMergePartial
|
|
230
|
+
reflectionMergePartial(this, message, value);
|
|
438
231
|
return message;
|
|
439
232
|
}
|
|
440
|
-
internalBinaryRead(reader
|
|
233
|
+
internalBinaryRead(reader, length, options, target) {
|
|
441
234
|
let message = target ?? this.create(), end = reader.pos + length;
|
|
442
235
|
while (reader.pos < end) {
|
|
443
236
|
let [fieldNo, wireType] = reader.tag();
|
|
@@ -459,7 +252,7 @@ class PasswordChangeRequest$Type extends MessageType<PasswordChangeRequest> {
|
|
|
459
252
|
}
|
|
460
253
|
return message;
|
|
461
254
|
}
|
|
462
|
-
internalBinaryWrite(message
|
|
255
|
+
internalBinaryWrite(message, writer, options) {
|
|
463
256
|
/* string old_password = 1; */
|
|
464
257
|
if (message.oldPassword !== "")
|
|
465
258
|
writer.tag(1, WireType.LengthDelimited).string(message.oldPassword);
|
|
@@ -477,20 +270,20 @@ class PasswordChangeRequest$Type extends MessageType<PasswordChangeRequest> {
|
|
|
477
270
|
*/
|
|
478
271
|
export const PasswordChangeRequest = new PasswordChangeRequest$Type();
|
|
479
272
|
// @generated message type with reflection information, may provide speed optimized methods
|
|
480
|
-
class AuthenticationStatusResponse$Type extends MessageType
|
|
273
|
+
class AuthenticationStatusResponse$Type extends MessageType {
|
|
481
274
|
constructor() {
|
|
482
275
|
super("snowballr.AuthenticationStatusResponse", [
|
|
483
276
|
{ no: 1, name: "authentication_status", kind: "enum", T: () => ["snowballr.AuthenticationStatus", AuthenticationStatus, "AUTHENTICATION_STATUS_"] }
|
|
484
277
|
]);
|
|
485
278
|
}
|
|
486
|
-
create(value
|
|
487
|
-
const message = globalThis.Object.create((this.messagePrototype
|
|
279
|
+
create(value) {
|
|
280
|
+
const message = globalThis.Object.create((this.messagePrototype));
|
|
488
281
|
message.authenticationStatus = 0;
|
|
489
282
|
if (value !== undefined)
|
|
490
|
-
reflectionMergePartial
|
|
283
|
+
reflectionMergePartial(this, message, value);
|
|
491
284
|
return message;
|
|
492
285
|
}
|
|
493
|
-
internalBinaryRead(reader
|
|
286
|
+
internalBinaryRead(reader, length, options, target) {
|
|
494
287
|
let message = target ?? this.create(), end = reader.pos + length;
|
|
495
288
|
while (reader.pos < end) {
|
|
496
289
|
let [fieldNo, wireType] = reader.tag();
|
|
@@ -509,7 +302,7 @@ class AuthenticationStatusResponse$Type extends MessageType<AuthenticationStatus
|
|
|
509
302
|
}
|
|
510
303
|
return message;
|
|
511
304
|
}
|
|
512
|
-
internalBinaryWrite(message
|
|
305
|
+
internalBinaryWrite(message, writer, options) {
|
|
513
306
|
/* snowballr.AuthenticationStatus authentication_status = 1; */
|
|
514
307
|
if (message.authenticationStatus !== 0)
|
|
515
308
|
writer.tag(1, WireType.Varint).int32(message.authenticationStatus);
|