@chaty-app/proto 0.1.13 → 0.1.14
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/node/service/v1/main.d.ts +14 -1
- package/dist/node/service/v1/main.d.ts.map +1 -1
- package/dist/node/service/v1/main.js +10 -1
- package/dist/node/service/v1/main.js.map +1 -1
- package/dist/node/service/v1/users.d.ts +48 -0
- package/dist/node/service/v1/users.d.ts.map +1 -1
- package/dist/node/service/v1/users.js +483 -0
- package/dist/node/service/v1/users.js.map +1 -1
- package/dist/node-cjs/service/v1/main.d.ts +14 -1
- package/dist/node-cjs/service/v1/main.d.ts.map +1 -1
- package/dist/node-cjs/service/v1/main.js +9 -0
- package/dist/node-cjs/service/v1/main.js.map +1 -1
- package/dist/node-cjs/service/v1/users.d.ts +48 -0
- package/dist/node-cjs/service/v1/users.d.ts.map +1 -1
- package/dist/node-cjs/service/v1/users.js +501 -2
- package/dist/node-cjs/service/v1/users.js.map +1 -1
- package/dist/web/service/v1/main.d.ts +4 -1
- package/dist/web/service/v1/main.d.ts.map +1 -1
- package/dist/web/service/v1/main.js +27 -1
- package/dist/web/service/v1/main.js.map +1 -1
- package/dist/web/service/v1/users.d.ts +48 -0
- package/dist/web/service/v1/users.d.ts.map +1 -1
- package/dist/web/service/v1/users.js +483 -0
- package/dist/web/service/v1/users.js.map +1 -1
- package/package.json +1 -1
|
@@ -1,8 +1,17 @@
|
|
|
1
1
|
import { type CallOptions, type ChannelCredentials, Client, type ClientOptions, type ClientUnaryCall, type handleUnaryCall, type Metadata, type ServiceError, type UntypedServiceImplementation } from "@grpc/grpc-js";
|
|
2
|
-
import { LoginRequest, LoginResponse } from "./users";
|
|
2
|
+
import { LoginRequest, LoginResponse, UserCreateRequest, UserCreateResponse } from "./users";
|
|
3
3
|
export declare const protobufPackage = "service.v1";
|
|
4
4
|
export type ChatyServiceService = typeof ChatyServiceService;
|
|
5
5
|
export declare const ChatyServiceService: {
|
|
6
|
+
readonly usersCreate: {
|
|
7
|
+
readonly path: "/service.v1.ChatyService/UsersCreate";
|
|
8
|
+
readonly requestStream: false;
|
|
9
|
+
readonly responseStream: false;
|
|
10
|
+
readonly requestSerialize: (value: UserCreateRequest) => Buffer;
|
|
11
|
+
readonly requestDeserialize: (value: Buffer) => UserCreateRequest;
|
|
12
|
+
readonly responseSerialize: (value: UserCreateResponse) => Buffer;
|
|
13
|
+
readonly responseDeserialize: (value: Buffer) => UserCreateResponse;
|
|
14
|
+
};
|
|
6
15
|
readonly usersLogin: {
|
|
7
16
|
readonly path: "/service.v1.ChatyService/UsersLogin";
|
|
8
17
|
readonly requestStream: false;
|
|
@@ -14,9 +23,13 @@ export declare const ChatyServiceService: {
|
|
|
14
23
|
};
|
|
15
24
|
};
|
|
16
25
|
export interface ChatyServiceServer extends UntypedServiceImplementation {
|
|
26
|
+
usersCreate: handleUnaryCall<UserCreateRequest, UserCreateResponse>;
|
|
17
27
|
usersLogin: handleUnaryCall<LoginRequest, LoginResponse>;
|
|
18
28
|
}
|
|
19
29
|
export interface ChatyServiceClient extends Client {
|
|
30
|
+
usersCreate(request: UserCreateRequest, callback: (error: ServiceError | null, response: UserCreateResponse) => void): ClientUnaryCall;
|
|
31
|
+
usersCreate(request: UserCreateRequest, metadata: Metadata, callback: (error: ServiceError | null, response: UserCreateResponse) => void): ClientUnaryCall;
|
|
32
|
+
usersCreate(request: UserCreateRequest, metadata: Metadata, options: Partial<CallOptions>, callback: (error: ServiceError | null, response: UserCreateResponse) => void): ClientUnaryCall;
|
|
20
33
|
usersLogin(request: LoginRequest, callback: (error: ServiceError | null, response: LoginResponse) => void): ClientUnaryCall;
|
|
21
34
|
usersLogin(request: LoginRequest, metadata: Metadata, callback: (error: ServiceError | null, response: LoginResponse) => void): ClientUnaryCall;
|
|
22
35
|
usersLogin(request: LoginRequest, metadata: Metadata, options: Partial<CallOptions>, callback: (error: ServiceError | null, response: LoginResponse) => void): ClientUnaryCall;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"main.d.ts","sourceRoot":"","sources":["../../../../src/node/service/v1/main.ts"],"names":[],"mappings":"AAOA,OAAO,EACL,KAAK,WAAW,EAChB,KAAK,kBAAkB,EACvB,MAAM,EACN,KAAK,aAAa,EAClB,KAAK,eAAe,EACpB,KAAK,eAAe,EAEpB,KAAK,QAAQ,EACb,KAAK,YAAY,EACjB,KAAK,4BAA4B,EAClC,MAAM,eAAe,CAAC;AACvB,OAAO,EAAE,YAAY,EAAE,aAAa,EAAE,MAAM,SAAS,CAAC;
|
|
1
|
+
{"version":3,"file":"main.d.ts","sourceRoot":"","sources":["../../../../src/node/service/v1/main.ts"],"names":[],"mappings":"AAOA,OAAO,EACL,KAAK,WAAW,EAChB,KAAK,kBAAkB,EACvB,MAAM,EACN,KAAK,aAAa,EAClB,KAAK,eAAe,EACpB,KAAK,eAAe,EAEpB,KAAK,QAAQ,EACb,KAAK,YAAY,EACjB,KAAK,4BAA4B,EAClC,MAAM,eAAe,CAAC;AACvB,OAAO,EAAE,YAAY,EAAE,aAAa,EAAE,iBAAiB,EAAE,kBAAkB,EAAE,MAAM,SAAS,CAAC;AAE7F,eAAO,MAAM,eAAe,eAAe,CAAC;AAE5C,MAAM,MAAM,mBAAmB,GAAG,OAAO,mBAAmB,CAAC;AAC7D,eAAO,MAAM,mBAAmB;;;;;2CAKF,iBAAiB,KAAG,MAAM;6CACxB,MAAM,KAAG,iBAAiB;4CAC3B,kBAAkB,KAAG,MAAM;8CACzB,MAAM,KAAG,kBAAkB;;;;;;2CAM9B,YAAY,KAAG,MAAM;6CACnB,MAAM,KAAG,YAAY;4CACtB,aAAa,KAAG,MAAM;8CACpB,MAAM,KAAG,aAAa;;CAE7C,CAAC;AAEX,MAAM,WAAW,kBAAmB,SAAQ,4BAA4B;IACtE,WAAW,EAAE,eAAe,CAAC,iBAAiB,EAAE,kBAAkB,CAAC,CAAC;IACpE,UAAU,EAAE,eAAe,CAAC,YAAY,EAAE,aAAa,CAAC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,EAAE,OAAO,CAAC,EAAE,OAAO,CAAC,aAAa,CAAC,GAAG,kBAAkB,CAAC;IAC7G,OAAO,EAAE,OAAO,mBAAmB,CAAC;IACpC,WAAW,EAAE,MAAM,CAAC;CACrB,CAAC"}
|
|
@@ -5,9 +5,18 @@
|
|
|
5
5
|
// source: service/v1/main.proto
|
|
6
6
|
/* eslint-disable */
|
|
7
7
|
import { makeGenericClientConstructor, } from "@grpc/grpc-js";
|
|
8
|
-
import { LoginRequest, LoginResponse } from "./users";
|
|
8
|
+
import { LoginRequest, LoginResponse, UserCreateRequest, UserCreateResponse } from "./users";
|
|
9
9
|
export const protobufPackage = "service.v1";
|
|
10
10
|
export const ChatyServiceService = {
|
|
11
|
+
usersCreate: {
|
|
12
|
+
path: "/service.v1.ChatyService/UsersCreate",
|
|
13
|
+
requestStream: false,
|
|
14
|
+
responseStream: false,
|
|
15
|
+
requestSerialize: (value) => Buffer.from(UserCreateRequest.encode(value).finish()),
|
|
16
|
+
requestDeserialize: (value) => UserCreateRequest.decode(value),
|
|
17
|
+
responseSerialize: (value) => Buffer.from(UserCreateResponse.encode(value).finish()),
|
|
18
|
+
responseDeserialize: (value) => UserCreateResponse.decode(value),
|
|
19
|
+
},
|
|
11
20
|
usersLogin: {
|
|
12
21
|
path: "/service.v1.ChatyService/UsersLogin",
|
|
13
22
|
requestStream: false,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"main.js","sourceRoot":"","sources":["../../../../src/node/service/v1/main.ts"],"names":[],"mappings":"AAAA,sDAAsD;AACtD,YAAY;AACZ,iCAAiC;AACjC,iCAAiC;AACjC,gCAAgC;AAEhC,oBAAoB;AACpB,OAAO,EAOL,4BAA4B,GAI7B,MAAM,eAAe,CAAC;AACvB,OAAO,EAAE,YAAY,EAAE,aAAa,EAAE,MAAM,SAAS,CAAC;
|
|
1
|
+
{"version":3,"file":"main.js","sourceRoot":"","sources":["../../../../src/node/service/v1/main.ts"],"names":[],"mappings":"AAAA,sDA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MAAM,CAAC,IAAI,CAAC,aAAa,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC,MAAM,EAAE,CAAC;QACtG,mBAAmB,EAAE,CAAC,KAAa,EAAiB,EAAE,CAAC,aAAa,CAAC,MAAM,CAAC,KAAK,CAAC;KACnF;CACO,CAAC;AAwCX,MAAM,CAAC,MAAM,kBAAkB,GAAG,4BAA4B,CAC5D,mBAAmB,EACnB,yBAAyB,CAK1B,CAAC"}
|
|
@@ -1,6 +1,51 @@
|
|
|
1
1
|
import { BinaryReader, BinaryWriter } from "@bufbuild/protobuf/wire";
|
|
2
2
|
import { AppError } from "../../shared/v1/error";
|
|
3
3
|
export declare const protobufPackage = "service.v1";
|
|
4
|
+
export declare enum UserStatus {
|
|
5
|
+
USER_STATUS_ONLINE = 0,
|
|
6
|
+
USER_STATUS_IDLE = 1,
|
|
7
|
+
USER_STATUS_FOCUS = 2,
|
|
8
|
+
USER_STATUS_BUSY = 3,
|
|
9
|
+
USER_STATUS_INVISIBLE = 4,
|
|
10
|
+
UNRECOGNIZED = -1
|
|
11
|
+
}
|
|
12
|
+
export declare function userStatusFromJSON(object: any): UserStatus;
|
|
13
|
+
export declare function userStatusToJSON(object: UserStatus): string;
|
|
14
|
+
export declare enum UserFlag {
|
|
15
|
+
USER_FLAG_UNSPECIFIED = 0,
|
|
16
|
+
USER_FLAG_SUSPENDED_UNTIL = 1,
|
|
17
|
+
USER_FLAG_DELETED = 2,
|
|
18
|
+
USER_FLAG_BANNED = 4,
|
|
19
|
+
USER_FLAG_SPAM = 8,
|
|
20
|
+
UNRECOGNIZED = -1
|
|
21
|
+
}
|
|
22
|
+
export declare function userFlagFromJSON(object: any): UserFlag;
|
|
23
|
+
export declare function userFlagToJSON(object: UserFlag): string;
|
|
24
|
+
export interface User {
|
|
25
|
+
id: string;
|
|
26
|
+
username: string;
|
|
27
|
+
email: string;
|
|
28
|
+
password: string;
|
|
29
|
+
displayName?: string | undefined;
|
|
30
|
+
badges?: number | undefined;
|
|
31
|
+
statusText?: string | undefined;
|
|
32
|
+
statusPresence?: UserStatus | undefined;
|
|
33
|
+
profileContent?: string | undefined;
|
|
34
|
+
profileBackgroundId?: string | undefined;
|
|
35
|
+
privileged: boolean;
|
|
36
|
+
suspendedUntil?: string | undefined;
|
|
37
|
+
/** unix timestamp */
|
|
38
|
+
createdAt: string;
|
|
39
|
+
/** unix timestamp */
|
|
40
|
+
updatedAt: string;
|
|
41
|
+
}
|
|
42
|
+
export interface UserCreateRequest {
|
|
43
|
+
email: string;
|
|
44
|
+
password: string;
|
|
45
|
+
username: string;
|
|
46
|
+
}
|
|
47
|
+
export interface UserCreateResponse {
|
|
48
|
+
}
|
|
4
49
|
export interface LoginRequest {
|
|
5
50
|
email: string;
|
|
6
51
|
password: string;
|
|
@@ -13,6 +58,9 @@ export interface LoginResponse {
|
|
|
13
58
|
}
|
|
14
59
|
export interface LoginResponseData {
|
|
15
60
|
}
|
|
61
|
+
export declare const User: MessageFns<User>;
|
|
62
|
+
export declare const UserCreateRequest: MessageFns<UserCreateRequest>;
|
|
63
|
+
export declare const UserCreateResponse: MessageFns<UserCreateResponse>;
|
|
16
64
|
export declare const LoginRequest: MessageFns<LoginRequest>;
|
|
17
65
|
export declare const LoginResponse: MessageFns<LoginResponse>;
|
|
18
66
|
export declare const LoginResponseData: MessageFns<LoginResponseData>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"users.d.ts","sourceRoot":"","sources":["../../../../src/node/service/v1/users.ts"],"names":[],"mappings":"AAOA,OAAO,EAAE,YAAY,EAAE,YAAY,EAAE,MAAM,yBAAyB,CAAC;AACrE,OAAO,EAAE,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AAEjD,eAAO,MAAM,eAAe,eAAe,CAAC;AAE5C,MAAM,WAAW,YAAY;IAC3B,KAAK,EAAE,MAAM,CAAC;IACd,QAAQ,EAAE,MAAM,CAAC;IACjB,GAAG,EAAE,MAAM,CAAC;IACZ,cAAc,EAAE,MAAM,C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ACzB,MAAM,CAAC,OAAO,EAAE,CAAC,GAAG,OAAO,CAAC;IAC5B,MAAM,CAAC,CAAC,SAAS,KAAK,CAAC,WAAW,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,EAAE,IAAI,CAAC,EAAE,CAAC,GAAG,CAAC,CAAC;IACxD,WAAW,CAAC,CAAC,SAAS,KAAK,CAAC,WAAW,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,EAAE,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC;CAC/D"}
|
|
@@ -7,6 +7,489 @@
|
|
|
7
7
|
import { BinaryReader, BinaryWriter } from "@bufbuild/protobuf/wire";
|
|
8
8
|
import { AppError } from "../../shared/v1/error";
|
|
9
9
|
export const protobufPackage = "service.v1";
|
|
10
|
+
export var UserStatus;
|
|
11
|
+
(function (UserStatus) {
|
|
12
|
+
UserStatus[UserStatus["USER_STATUS_ONLINE"] = 0] = "USER_STATUS_ONLINE";
|
|
13
|
+
UserStatus[UserStatus["USER_STATUS_IDLE"] = 1] = "USER_STATUS_IDLE";
|
|
14
|
+
UserStatus[UserStatus["USER_STATUS_FOCUS"] = 2] = "USER_STATUS_FOCUS";
|
|
15
|
+
UserStatus[UserStatus["USER_STATUS_BUSY"] = 3] = "USER_STATUS_BUSY";
|
|
16
|
+
UserStatus[UserStatus["USER_STATUS_INVISIBLE"] = 4] = "USER_STATUS_INVISIBLE";
|
|
17
|
+
UserStatus[UserStatus["UNRECOGNIZED"] = -1] = "UNRECOGNIZED";
|
|
18
|
+
})(UserStatus || (UserStatus = {}));
|
|
19
|
+
export function userStatusFromJSON(object) {
|
|
20
|
+
switch (object) {
|
|
21
|
+
case 0:
|
|
22
|
+
case "USER_STATUS_ONLINE":
|
|
23
|
+
return UserStatus.USER_STATUS_ONLINE;
|
|
24
|
+
case 1:
|
|
25
|
+
case "USER_STATUS_IDLE":
|
|
26
|
+
return UserStatus.USER_STATUS_IDLE;
|
|
27
|
+
case 2:
|
|
28
|
+
case "USER_STATUS_FOCUS":
|
|
29
|
+
return UserStatus.USER_STATUS_FOCUS;
|
|
30
|
+
case 3:
|
|
31
|
+
case "USER_STATUS_BUSY":
|
|
32
|
+
return UserStatus.USER_STATUS_BUSY;
|
|
33
|
+
case 4:
|
|
34
|
+
case "USER_STATUS_INVISIBLE":
|
|
35
|
+
return UserStatus.USER_STATUS_INVISIBLE;
|
|
36
|
+
case -1:
|
|
37
|
+
case "UNRECOGNIZED":
|
|
38
|
+
default:
|
|
39
|
+
return UserStatus.UNRECOGNIZED;
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
export function userStatusToJSON(object) {
|
|
43
|
+
switch (object) {
|
|
44
|
+
case UserStatus.USER_STATUS_ONLINE:
|
|
45
|
+
return "USER_STATUS_ONLINE";
|
|
46
|
+
case UserStatus.USER_STATUS_IDLE:
|
|
47
|
+
return "USER_STATUS_IDLE";
|
|
48
|
+
case UserStatus.USER_STATUS_FOCUS:
|
|
49
|
+
return "USER_STATUS_FOCUS";
|
|
50
|
+
case UserStatus.USER_STATUS_BUSY:
|
|
51
|
+
return "USER_STATUS_BUSY";
|
|
52
|
+
case UserStatus.USER_STATUS_INVISIBLE:
|
|
53
|
+
return "USER_STATUS_INVISIBLE";
|
|
54
|
+
case UserStatus.UNRECOGNIZED:
|
|
55
|
+
default:
|
|
56
|
+
return "UNRECOGNIZED";
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
export var UserFlag;
|
|
60
|
+
(function (UserFlag) {
|
|
61
|
+
UserFlag[UserFlag["USER_FLAG_UNSPECIFIED"] = 0] = "USER_FLAG_UNSPECIFIED";
|
|
62
|
+
UserFlag[UserFlag["USER_FLAG_SUSPENDED_UNTIL"] = 1] = "USER_FLAG_SUSPENDED_UNTIL";
|
|
63
|
+
UserFlag[UserFlag["USER_FLAG_DELETED"] = 2] = "USER_FLAG_DELETED";
|
|
64
|
+
UserFlag[UserFlag["USER_FLAG_BANNED"] = 4] = "USER_FLAG_BANNED";
|
|
65
|
+
UserFlag[UserFlag["USER_FLAG_SPAM"] = 8] = "USER_FLAG_SPAM";
|
|
66
|
+
UserFlag[UserFlag["UNRECOGNIZED"] = -1] = "UNRECOGNIZED";
|
|
67
|
+
})(UserFlag || (UserFlag = {}));
|
|
68
|
+
export function userFlagFromJSON(object) {
|
|
69
|
+
switch (object) {
|
|
70
|
+
case 0:
|
|
71
|
+
case "USER_FLAG_UNSPECIFIED":
|
|
72
|
+
return UserFlag.USER_FLAG_UNSPECIFIED;
|
|
73
|
+
case 1:
|
|
74
|
+
case "USER_FLAG_SUSPENDED_UNTIL":
|
|
75
|
+
return UserFlag.USER_FLAG_SUSPENDED_UNTIL;
|
|
76
|
+
case 2:
|
|
77
|
+
case "USER_FLAG_DELETED":
|
|
78
|
+
return UserFlag.USER_FLAG_DELETED;
|
|
79
|
+
case 4:
|
|
80
|
+
case "USER_FLAG_BANNED":
|
|
81
|
+
return UserFlag.USER_FLAG_BANNED;
|
|
82
|
+
case 8:
|
|
83
|
+
case "USER_FLAG_SPAM":
|
|
84
|
+
return UserFlag.USER_FLAG_SPAM;
|
|
85
|
+
case -1:
|
|
86
|
+
case "UNRECOGNIZED":
|
|
87
|
+
default:
|
|
88
|
+
return UserFlag.UNRECOGNIZED;
|
|
89
|
+
}
|
|
90
|
+
}
|
|
91
|
+
export function userFlagToJSON(object) {
|
|
92
|
+
switch (object) {
|
|
93
|
+
case UserFlag.USER_FLAG_UNSPECIFIED:
|
|
94
|
+
return "USER_FLAG_UNSPECIFIED";
|
|
95
|
+
case UserFlag.USER_FLAG_SUSPENDED_UNTIL:
|
|
96
|
+
return "USER_FLAG_SUSPENDED_UNTIL";
|
|
97
|
+
case UserFlag.USER_FLAG_DELETED:
|
|
98
|
+
return "USER_FLAG_DELETED";
|
|
99
|
+
case UserFlag.USER_FLAG_BANNED:
|
|
100
|
+
return "USER_FLAG_BANNED";
|
|
101
|
+
case UserFlag.USER_FLAG_SPAM:
|
|
102
|
+
return "USER_FLAG_SPAM";
|
|
103
|
+
case UserFlag.UNRECOGNIZED:
|
|
104
|
+
default:
|
|
105
|
+
return "UNRECOGNIZED";
|
|
106
|
+
}
|
|
107
|
+
}
|
|
108
|
+
function createBaseUser() {
|
|
109
|
+
return {
|
|
110
|
+
id: "",
|
|
111
|
+
username: "",
|
|
112
|
+
email: "",
|
|
113
|
+
password: "",
|
|
114
|
+
displayName: undefined,
|
|
115
|
+
badges: undefined,
|
|
116
|
+
statusText: undefined,
|
|
117
|
+
statusPresence: undefined,
|
|
118
|
+
profileContent: undefined,
|
|
119
|
+
profileBackgroundId: undefined,
|
|
120
|
+
privileged: false,
|
|
121
|
+
suspendedUntil: undefined,
|
|
122
|
+
createdAt: "0",
|
|
123
|
+
updatedAt: "0",
|
|
124
|
+
};
|
|
125
|
+
}
|
|
126
|
+
export const User = {
|
|
127
|
+
encode(message, writer = new BinaryWriter()) {
|
|
128
|
+
if (message.id !== "") {
|
|
129
|
+
writer.uint32(10).string(message.id);
|
|
130
|
+
}
|
|
131
|
+
if (message.username !== "") {
|
|
132
|
+
writer.uint32(18).string(message.username);
|
|
133
|
+
}
|
|
134
|
+
if (message.email !== "") {
|
|
135
|
+
writer.uint32(26).string(message.email);
|
|
136
|
+
}
|
|
137
|
+
if (message.password !== "") {
|
|
138
|
+
writer.uint32(34).string(message.password);
|
|
139
|
+
}
|
|
140
|
+
if (message.displayName !== undefined) {
|
|
141
|
+
writer.uint32(42).string(message.displayName);
|
|
142
|
+
}
|
|
143
|
+
if (message.badges !== undefined) {
|
|
144
|
+
writer.uint32(48).uint32(message.badges);
|
|
145
|
+
}
|
|
146
|
+
if (message.statusText !== undefined) {
|
|
147
|
+
writer.uint32(58).string(message.statusText);
|
|
148
|
+
}
|
|
149
|
+
if (message.statusPresence !== undefined) {
|
|
150
|
+
writer.uint32(64).int32(message.statusPresence);
|
|
151
|
+
}
|
|
152
|
+
if (message.profileContent !== undefined) {
|
|
153
|
+
writer.uint32(74).string(message.profileContent);
|
|
154
|
+
}
|
|
155
|
+
if (message.profileBackgroundId !== undefined) {
|
|
156
|
+
writer.uint32(82).string(message.profileBackgroundId);
|
|
157
|
+
}
|
|
158
|
+
if (message.privileged !== false) {
|
|
159
|
+
writer.uint32(88).bool(message.privileged);
|
|
160
|
+
}
|
|
161
|
+
if (message.suspendedUntil !== undefined) {
|
|
162
|
+
writer.uint32(96).uint64(message.suspendedUntil);
|
|
163
|
+
}
|
|
164
|
+
if (message.createdAt !== "0") {
|
|
165
|
+
writer.uint32(104).uint64(message.createdAt);
|
|
166
|
+
}
|
|
167
|
+
if (message.updatedAt !== "0") {
|
|
168
|
+
writer.uint32(112).uint64(message.updatedAt);
|
|
169
|
+
}
|
|
170
|
+
return writer;
|
|
171
|
+
},
|
|
172
|
+
decode(input, length) {
|
|
173
|
+
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
|
|
174
|
+
const end = length === undefined ? reader.len : reader.pos + length;
|
|
175
|
+
const message = createBaseUser();
|
|
176
|
+
while (reader.pos < end) {
|
|
177
|
+
const tag = reader.uint32();
|
|
178
|
+
switch (tag >>> 3) {
|
|
179
|
+
case 1: {
|
|
180
|
+
if (tag !== 10) {
|
|
181
|
+
break;
|
|
182
|
+
}
|
|
183
|
+
message.id = reader.string();
|
|
184
|
+
continue;
|
|
185
|
+
}
|
|
186
|
+
case 2: {
|
|
187
|
+
if (tag !== 18) {
|
|
188
|
+
break;
|
|
189
|
+
}
|
|
190
|
+
message.username = reader.string();
|
|
191
|
+
continue;
|
|
192
|
+
}
|
|
193
|
+
case 3: {
|
|
194
|
+
if (tag !== 26) {
|
|
195
|
+
break;
|
|
196
|
+
}
|
|
197
|
+
message.email = reader.string();
|
|
198
|
+
continue;
|
|
199
|
+
}
|
|
200
|
+
case 4: {
|
|
201
|
+
if (tag !== 34) {
|
|
202
|
+
break;
|
|
203
|
+
}
|
|
204
|
+
message.password = reader.string();
|
|
205
|
+
continue;
|
|
206
|
+
}
|
|
207
|
+
case 5: {
|
|
208
|
+
if (tag !== 42) {
|
|
209
|
+
break;
|
|
210
|
+
}
|
|
211
|
+
message.displayName = reader.string();
|
|
212
|
+
continue;
|
|
213
|
+
}
|
|
214
|
+
case 6: {
|
|
215
|
+
if (tag !== 48) {
|
|
216
|
+
break;
|
|
217
|
+
}
|
|
218
|
+
message.badges = reader.uint32();
|
|
219
|
+
continue;
|
|
220
|
+
}
|
|
221
|
+
case 7: {
|
|
222
|
+
if (tag !== 58) {
|
|
223
|
+
break;
|
|
224
|
+
}
|
|
225
|
+
message.statusText = reader.string();
|
|
226
|
+
continue;
|
|
227
|
+
}
|
|
228
|
+
case 8: {
|
|
229
|
+
if (tag !== 64) {
|
|
230
|
+
break;
|
|
231
|
+
}
|
|
232
|
+
message.statusPresence = reader.int32();
|
|
233
|
+
continue;
|
|
234
|
+
}
|
|
235
|
+
case 9: {
|
|
236
|
+
if (tag !== 74) {
|
|
237
|
+
break;
|
|
238
|
+
}
|
|
239
|
+
message.profileContent = reader.string();
|
|
240
|
+
continue;
|
|
241
|
+
}
|
|
242
|
+
case 10: {
|
|
243
|
+
if (tag !== 82) {
|
|
244
|
+
break;
|
|
245
|
+
}
|
|
246
|
+
message.profileBackgroundId = reader.string();
|
|
247
|
+
continue;
|
|
248
|
+
}
|
|
249
|
+
case 11: {
|
|
250
|
+
if (tag !== 88) {
|
|
251
|
+
break;
|
|
252
|
+
}
|
|
253
|
+
message.privileged = reader.bool();
|
|
254
|
+
continue;
|
|
255
|
+
}
|
|
256
|
+
case 12: {
|
|
257
|
+
if (tag !== 96) {
|
|
258
|
+
break;
|
|
259
|
+
}
|
|
260
|
+
message.suspendedUntil = reader.uint64().toString();
|
|
261
|
+
continue;
|
|
262
|
+
}
|
|
263
|
+
case 13: {
|
|
264
|
+
if (tag !== 104) {
|
|
265
|
+
break;
|
|
266
|
+
}
|
|
267
|
+
message.createdAt = reader.uint64().toString();
|
|
268
|
+
continue;
|
|
269
|
+
}
|
|
270
|
+
case 14: {
|
|
271
|
+
if (tag !== 112) {
|
|
272
|
+
break;
|
|
273
|
+
}
|
|
274
|
+
message.updatedAt = reader.uint64().toString();
|
|
275
|
+
continue;
|
|
276
|
+
}
|
|
277
|
+
}
|
|
278
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
279
|
+
break;
|
|
280
|
+
}
|
|
281
|
+
reader.skip(tag & 7);
|
|
282
|
+
}
|
|
283
|
+
return message;
|
|
284
|
+
},
|
|
285
|
+
fromJSON(object) {
|
|
286
|
+
return {
|
|
287
|
+
id: isSet(object.id) ? globalThis.String(object.id) : "",
|
|
288
|
+
username: isSet(object.username) ? globalThis.String(object.username) : "",
|
|
289
|
+
email: isSet(object.email) ? globalThis.String(object.email) : "",
|
|
290
|
+
password: isSet(object.password) ? globalThis.String(object.password) : "",
|
|
291
|
+
displayName: isSet(object.displayName) ? globalThis.String(object.displayName) : undefined,
|
|
292
|
+
badges: isSet(object.badges) ? globalThis.Number(object.badges) : undefined,
|
|
293
|
+
statusText: isSet(object.statusText) ? globalThis.String(object.statusText) : undefined,
|
|
294
|
+
statusPresence: isSet(object.statusPresence) ? userStatusFromJSON(object.statusPresence) : undefined,
|
|
295
|
+
profileContent: isSet(object.profileContent) ? globalThis.String(object.profileContent) : undefined,
|
|
296
|
+
profileBackgroundId: isSet(object.profileBackgroundId)
|
|
297
|
+
? globalThis.String(object.profileBackgroundId)
|
|
298
|
+
: undefined,
|
|
299
|
+
privileged: isSet(object.privileged) ? globalThis.Boolean(object.privileged) : false,
|
|
300
|
+
suspendedUntil: isSet(object.suspendedUntil) ? globalThis.String(object.suspendedUntil) : undefined,
|
|
301
|
+
createdAt: isSet(object.createdAt) ? globalThis.String(object.createdAt) : "0",
|
|
302
|
+
updatedAt: isSet(object.updatedAt) ? globalThis.String(object.updatedAt) : "0",
|
|
303
|
+
};
|
|
304
|
+
},
|
|
305
|
+
toJSON(message) {
|
|
306
|
+
const obj = {};
|
|
307
|
+
if (message.id !== "") {
|
|
308
|
+
obj.id = message.id;
|
|
309
|
+
}
|
|
310
|
+
if (message.username !== "") {
|
|
311
|
+
obj.username = message.username;
|
|
312
|
+
}
|
|
313
|
+
if (message.email !== "") {
|
|
314
|
+
obj.email = message.email;
|
|
315
|
+
}
|
|
316
|
+
if (message.password !== "") {
|
|
317
|
+
obj.password = message.password;
|
|
318
|
+
}
|
|
319
|
+
if (message.displayName !== undefined) {
|
|
320
|
+
obj.displayName = message.displayName;
|
|
321
|
+
}
|
|
322
|
+
if (message.badges !== undefined) {
|
|
323
|
+
obj.badges = Math.round(message.badges);
|
|
324
|
+
}
|
|
325
|
+
if (message.statusText !== undefined) {
|
|
326
|
+
obj.statusText = message.statusText;
|
|
327
|
+
}
|
|
328
|
+
if (message.statusPresence !== undefined) {
|
|
329
|
+
obj.statusPresence = userStatusToJSON(message.statusPresence);
|
|
330
|
+
}
|
|
331
|
+
if (message.profileContent !== undefined) {
|
|
332
|
+
obj.profileContent = message.profileContent;
|
|
333
|
+
}
|
|
334
|
+
if (message.profileBackgroundId !== undefined) {
|
|
335
|
+
obj.profileBackgroundId = message.profileBackgroundId;
|
|
336
|
+
}
|
|
337
|
+
if (message.privileged !== false) {
|
|
338
|
+
obj.privileged = message.privileged;
|
|
339
|
+
}
|
|
340
|
+
if (message.suspendedUntil !== undefined) {
|
|
341
|
+
obj.suspendedUntil = message.suspendedUntil;
|
|
342
|
+
}
|
|
343
|
+
if (message.createdAt !== "0") {
|
|
344
|
+
obj.createdAt = message.createdAt;
|
|
345
|
+
}
|
|
346
|
+
if (message.updatedAt !== "0") {
|
|
347
|
+
obj.updatedAt = message.updatedAt;
|
|
348
|
+
}
|
|
349
|
+
return obj;
|
|
350
|
+
},
|
|
351
|
+
create(base) {
|
|
352
|
+
return User.fromPartial(base ?? {});
|
|
353
|
+
},
|
|
354
|
+
fromPartial(object) {
|
|
355
|
+
const message = createBaseUser();
|
|
356
|
+
message.id = object.id ?? "";
|
|
357
|
+
message.username = object.username ?? "";
|
|
358
|
+
message.email = object.email ?? "";
|
|
359
|
+
message.password = object.password ?? "";
|
|
360
|
+
message.displayName = object.displayName ?? undefined;
|
|
361
|
+
message.badges = object.badges ?? undefined;
|
|
362
|
+
message.statusText = object.statusText ?? undefined;
|
|
363
|
+
message.statusPresence = object.statusPresence ?? undefined;
|
|
364
|
+
message.profileContent = object.profileContent ?? undefined;
|
|
365
|
+
message.profileBackgroundId = object.profileBackgroundId ?? undefined;
|
|
366
|
+
message.privileged = object.privileged ?? false;
|
|
367
|
+
message.suspendedUntil = object.suspendedUntil ?? undefined;
|
|
368
|
+
message.createdAt = object.createdAt ?? "0";
|
|
369
|
+
message.updatedAt = object.updatedAt ?? "0";
|
|
370
|
+
return message;
|
|
371
|
+
},
|
|
372
|
+
};
|
|
373
|
+
function createBaseUserCreateRequest() {
|
|
374
|
+
return { email: "", password: "", username: "" };
|
|
375
|
+
}
|
|
376
|
+
export const UserCreateRequest = {
|
|
377
|
+
encode(message, writer = new BinaryWriter()) {
|
|
378
|
+
if (message.email !== "") {
|
|
379
|
+
writer.uint32(10).string(message.email);
|
|
380
|
+
}
|
|
381
|
+
if (message.password !== "") {
|
|
382
|
+
writer.uint32(18).string(message.password);
|
|
383
|
+
}
|
|
384
|
+
if (message.username !== "") {
|
|
385
|
+
writer.uint32(26).string(message.username);
|
|
386
|
+
}
|
|
387
|
+
return writer;
|
|
388
|
+
},
|
|
389
|
+
decode(input, length) {
|
|
390
|
+
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
|
|
391
|
+
const end = length === undefined ? reader.len : reader.pos + length;
|
|
392
|
+
const message = createBaseUserCreateRequest();
|
|
393
|
+
while (reader.pos < end) {
|
|
394
|
+
const tag = reader.uint32();
|
|
395
|
+
switch (tag >>> 3) {
|
|
396
|
+
case 1: {
|
|
397
|
+
if (tag !== 10) {
|
|
398
|
+
break;
|
|
399
|
+
}
|
|
400
|
+
message.email = reader.string();
|
|
401
|
+
continue;
|
|
402
|
+
}
|
|
403
|
+
case 2: {
|
|
404
|
+
if (tag !== 18) {
|
|
405
|
+
break;
|
|
406
|
+
}
|
|
407
|
+
message.password = reader.string();
|
|
408
|
+
continue;
|
|
409
|
+
}
|
|
410
|
+
case 3: {
|
|
411
|
+
if (tag !== 26) {
|
|
412
|
+
break;
|
|
413
|
+
}
|
|
414
|
+
message.username = reader.string();
|
|
415
|
+
continue;
|
|
416
|
+
}
|
|
417
|
+
}
|
|
418
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
419
|
+
break;
|
|
420
|
+
}
|
|
421
|
+
reader.skip(tag & 7);
|
|
422
|
+
}
|
|
423
|
+
return message;
|
|
424
|
+
},
|
|
425
|
+
fromJSON(object) {
|
|
426
|
+
return {
|
|
427
|
+
email: isSet(object.email) ? globalThis.String(object.email) : "",
|
|
428
|
+
password: isSet(object.password) ? globalThis.String(object.password) : "",
|
|
429
|
+
username: isSet(object.username) ? globalThis.String(object.username) : "",
|
|
430
|
+
};
|
|
431
|
+
},
|
|
432
|
+
toJSON(message) {
|
|
433
|
+
const obj = {};
|
|
434
|
+
if (message.email !== "") {
|
|
435
|
+
obj.email = message.email;
|
|
436
|
+
}
|
|
437
|
+
if (message.password !== "") {
|
|
438
|
+
obj.password = message.password;
|
|
439
|
+
}
|
|
440
|
+
if (message.username !== "") {
|
|
441
|
+
obj.username = message.username;
|
|
442
|
+
}
|
|
443
|
+
return obj;
|
|
444
|
+
},
|
|
445
|
+
create(base) {
|
|
446
|
+
return UserCreateRequest.fromPartial(base ?? {});
|
|
447
|
+
},
|
|
448
|
+
fromPartial(object) {
|
|
449
|
+
const message = createBaseUserCreateRequest();
|
|
450
|
+
message.email = object.email ?? "";
|
|
451
|
+
message.password = object.password ?? "";
|
|
452
|
+
message.username = object.username ?? "";
|
|
453
|
+
return message;
|
|
454
|
+
},
|
|
455
|
+
};
|
|
456
|
+
function createBaseUserCreateResponse() {
|
|
457
|
+
return {};
|
|
458
|
+
}
|
|
459
|
+
export const UserCreateResponse = {
|
|
460
|
+
encode(_, writer = new BinaryWriter()) {
|
|
461
|
+
return writer;
|
|
462
|
+
},
|
|
463
|
+
decode(input, length) {
|
|
464
|
+
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
|
|
465
|
+
const end = length === undefined ? reader.len : reader.pos + length;
|
|
466
|
+
const message = createBaseUserCreateResponse();
|
|
467
|
+
while (reader.pos < end) {
|
|
468
|
+
const tag = reader.uint32();
|
|
469
|
+
switch (tag >>> 3) {
|
|
470
|
+
}
|
|
471
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
472
|
+
break;
|
|
473
|
+
}
|
|
474
|
+
reader.skip(tag & 7);
|
|
475
|
+
}
|
|
476
|
+
return message;
|
|
477
|
+
},
|
|
478
|
+
fromJSON(_) {
|
|
479
|
+
return {};
|
|
480
|
+
},
|
|
481
|
+
toJSON(_) {
|
|
482
|
+
const obj = {};
|
|
483
|
+
return obj;
|
|
484
|
+
},
|
|
485
|
+
create(base) {
|
|
486
|
+
return UserCreateResponse.fromPartial(base ?? {});
|
|
487
|
+
},
|
|
488
|
+
fromPartial(_) {
|
|
489
|
+
const message = createBaseUserCreateResponse();
|
|
490
|
+
return message;
|
|
491
|
+
},
|
|
492
|
+
};
|
|
10
493
|
function createBaseLoginRequest() {
|
|
11
494
|
return { email: "", password: "", mfa: "", loginChallenge: "" };
|
|
12
495
|
}
|