mirror of
https://github.com/VaalaCat/frp-panel.git
synced 2025-10-29 18:02:01 +08:00
init repo
This commit is contained in:
220
www/lib/pb/api_user.ts
Normal file
220
www/lib/pb/api_user.ts
Normal file
@@ -0,0 +1,220 @@
|
||||
// @generated by protobuf-ts 2.9.3
|
||||
// @generated from protobuf file "api_user.proto" (package "api_user", syntax proto3)
|
||||
// tslint:disable
|
||||
import { WireType } from "@protobuf-ts/runtime";
|
||||
import type { BinaryWriteOptions } from "@protobuf-ts/runtime";
|
||||
import type { IBinaryWriter } from "@protobuf-ts/runtime";
|
||||
import { UnknownFieldHandler } from "@protobuf-ts/runtime";
|
||||
import type { BinaryReadOptions } from "@protobuf-ts/runtime";
|
||||
import type { IBinaryReader } from "@protobuf-ts/runtime";
|
||||
import type { PartialMessage } from "@protobuf-ts/runtime";
|
||||
import { reflectionMergePartial } from "@protobuf-ts/runtime";
|
||||
import { MessageType } from "@protobuf-ts/runtime";
|
||||
import { User } from "./common";
|
||||
import { Status } from "./common";
|
||||
/**
|
||||
* @generated from protobuf message api_user.GetUserInfoRequest
|
||||
*/
|
||||
export interface GetUserInfoRequest {
|
||||
}
|
||||
/**
|
||||
* @generated from protobuf message api_user.GetUserInfoResponse
|
||||
*/
|
||||
export interface GetUserInfoResponse {
|
||||
/**
|
||||
* @generated from protobuf field: optional common.Status status = 1;
|
||||
*/
|
||||
status?: Status;
|
||||
/**
|
||||
* @generated from protobuf field: optional common.User user_info = 2;
|
||||
*/
|
||||
userInfo?: User;
|
||||
}
|
||||
/**
|
||||
* @generated from protobuf message api_user.UpdateUserInfoRequest
|
||||
*/
|
||||
export interface UpdateUserInfoRequest {
|
||||
/**
|
||||
* @generated from protobuf field: optional common.User user_info = 1;
|
||||
*/
|
||||
userInfo?: User;
|
||||
}
|
||||
/**
|
||||
* @generated from protobuf message api_user.UpdateUserInfoResponse
|
||||
*/
|
||||
export interface UpdateUserInfoResponse {
|
||||
/**
|
||||
* @generated from protobuf field: optional common.Status status = 1;
|
||||
*/
|
||||
status?: Status;
|
||||
}
|
||||
// @generated message type with reflection information, may provide speed optimized methods
|
||||
class GetUserInfoRequest$Type extends MessageType<GetUserInfoRequest> {
|
||||
constructor() {
|
||||
super("api_user.GetUserInfoRequest", []);
|
||||
}
|
||||
create(value?: PartialMessage<GetUserInfoRequest>): GetUserInfoRequest {
|
||||
const message = globalThis.Object.create((this.messagePrototype!));
|
||||
if (value !== undefined)
|
||||
reflectionMergePartial<GetUserInfoRequest>(this, message, value);
|
||||
return message;
|
||||
}
|
||||
internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: GetUserInfoRequest): GetUserInfoRequest {
|
||||
return target ?? this.create();
|
||||
}
|
||||
internalBinaryWrite(message: GetUserInfoRequest, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
|
||||
let u = options.writeUnknownFields;
|
||||
if (u !== false)
|
||||
(u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
|
||||
return writer;
|
||||
}
|
||||
}
|
||||
/**
|
||||
* @generated MessageType for protobuf message api_user.GetUserInfoRequest
|
||||
*/
|
||||
export const GetUserInfoRequest = new GetUserInfoRequest$Type();
|
||||
// @generated message type with reflection information, may provide speed optimized methods
|
||||
class GetUserInfoResponse$Type extends MessageType<GetUserInfoResponse> {
|
||||
constructor() {
|
||||
super("api_user.GetUserInfoResponse", [
|
||||
{ no: 1, name: "status", kind: "message", T: () => Status },
|
||||
{ no: 2, name: "user_info", kind: "message", T: () => User }
|
||||
]);
|
||||
}
|
||||
create(value?: PartialMessage<GetUserInfoResponse>): GetUserInfoResponse {
|
||||
const message = globalThis.Object.create((this.messagePrototype!));
|
||||
if (value !== undefined)
|
||||
reflectionMergePartial<GetUserInfoResponse>(this, message, value);
|
||||
return message;
|
||||
}
|
||||
internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: GetUserInfoResponse): GetUserInfoResponse {
|
||||
let message = target ?? this.create(), end = reader.pos + length;
|
||||
while (reader.pos < end) {
|
||||
let [fieldNo, wireType] = reader.tag();
|
||||
switch (fieldNo) {
|
||||
case /* optional common.Status status */ 1:
|
||||
message.status = Status.internalBinaryRead(reader, reader.uint32(), options, message.status);
|
||||
break;
|
||||
case /* optional common.User user_info */ 2:
|
||||
message.userInfo = User.internalBinaryRead(reader, reader.uint32(), options, message.userInfo);
|
||||
break;
|
||||
default:
|
||||
let u = options.readUnknownField;
|
||||
if (u === "throw")
|
||||
throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`);
|
||||
let d = reader.skip(wireType);
|
||||
if (u !== false)
|
||||
(u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d);
|
||||
}
|
||||
}
|
||||
return message;
|
||||
}
|
||||
internalBinaryWrite(message: GetUserInfoResponse, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
|
||||
/* optional common.Status status = 1; */
|
||||
if (message.status)
|
||||
Status.internalBinaryWrite(message.status, writer.tag(1, WireType.LengthDelimited).fork(), options).join();
|
||||
/* optional common.User user_info = 2; */
|
||||
if (message.userInfo)
|
||||
User.internalBinaryWrite(message.userInfo, writer.tag(2, WireType.LengthDelimited).fork(), options).join();
|
||||
let u = options.writeUnknownFields;
|
||||
if (u !== false)
|
||||
(u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
|
||||
return writer;
|
||||
}
|
||||
}
|
||||
/**
|
||||
* @generated MessageType for protobuf message api_user.GetUserInfoResponse
|
||||
*/
|
||||
export const GetUserInfoResponse = new GetUserInfoResponse$Type();
|
||||
// @generated message type with reflection information, may provide speed optimized methods
|
||||
class UpdateUserInfoRequest$Type extends MessageType<UpdateUserInfoRequest> {
|
||||
constructor() {
|
||||
super("api_user.UpdateUserInfoRequest", [
|
||||
{ no: 1, name: "user_info", kind: "message", T: () => User }
|
||||
]);
|
||||
}
|
||||
create(value?: PartialMessage<UpdateUserInfoRequest>): UpdateUserInfoRequest {
|
||||
const message = globalThis.Object.create((this.messagePrototype!));
|
||||
if (value !== undefined)
|
||||
reflectionMergePartial<UpdateUserInfoRequest>(this, message, value);
|
||||
return message;
|
||||
}
|
||||
internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: UpdateUserInfoRequest): UpdateUserInfoRequest {
|
||||
let message = target ?? this.create(), end = reader.pos + length;
|
||||
while (reader.pos < end) {
|
||||
let [fieldNo, wireType] = reader.tag();
|
||||
switch (fieldNo) {
|
||||
case /* optional common.User user_info */ 1:
|
||||
message.userInfo = User.internalBinaryRead(reader, reader.uint32(), options, message.userInfo);
|
||||
break;
|
||||
default:
|
||||
let u = options.readUnknownField;
|
||||
if (u === "throw")
|
||||
throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`);
|
||||
let d = reader.skip(wireType);
|
||||
if (u !== false)
|
||||
(u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d);
|
||||
}
|
||||
}
|
||||
return message;
|
||||
}
|
||||
internalBinaryWrite(message: UpdateUserInfoRequest, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
|
||||
/* optional common.User user_info = 1; */
|
||||
if (message.userInfo)
|
||||
User.internalBinaryWrite(message.userInfo, writer.tag(1, WireType.LengthDelimited).fork(), options).join();
|
||||
let u = options.writeUnknownFields;
|
||||
if (u !== false)
|
||||
(u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
|
||||
return writer;
|
||||
}
|
||||
}
|
||||
/**
|
||||
* @generated MessageType for protobuf message api_user.UpdateUserInfoRequest
|
||||
*/
|
||||
export const UpdateUserInfoRequest = new UpdateUserInfoRequest$Type();
|
||||
// @generated message type with reflection information, may provide speed optimized methods
|
||||
class UpdateUserInfoResponse$Type extends MessageType<UpdateUserInfoResponse> {
|
||||
constructor() {
|
||||
super("api_user.UpdateUserInfoResponse", [
|
||||
{ no: 1, name: "status", kind: "message", T: () => Status }
|
||||
]);
|
||||
}
|
||||
create(value?: PartialMessage<UpdateUserInfoResponse>): UpdateUserInfoResponse {
|
||||
const message = globalThis.Object.create((this.messagePrototype!));
|
||||
if (value !== undefined)
|
||||
reflectionMergePartial<UpdateUserInfoResponse>(this, message, value);
|
||||
return message;
|
||||
}
|
||||
internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: UpdateUserInfoResponse): UpdateUserInfoResponse {
|
||||
let message = target ?? this.create(), end = reader.pos + length;
|
||||
while (reader.pos < end) {
|
||||
let [fieldNo, wireType] = reader.tag();
|
||||
switch (fieldNo) {
|
||||
case /* optional common.Status status */ 1:
|
||||
message.status = Status.internalBinaryRead(reader, reader.uint32(), options, message.status);
|
||||
break;
|
||||
default:
|
||||
let u = options.readUnknownField;
|
||||
if (u === "throw")
|
||||
throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`);
|
||||
let d = reader.skip(wireType);
|
||||
if (u !== false)
|
||||
(u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d);
|
||||
}
|
||||
}
|
||||
return message;
|
||||
}
|
||||
internalBinaryWrite(message: UpdateUserInfoResponse, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
|
||||
/* optional common.Status status = 1; */
|
||||
if (message.status)
|
||||
Status.internalBinaryWrite(message.status, writer.tag(1, WireType.LengthDelimited).fork(), options).join();
|
||||
let u = options.writeUnknownFields;
|
||||
if (u !== false)
|
||||
(u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
|
||||
return writer;
|
||||
}
|
||||
}
|
||||
/**
|
||||
* @generated MessageType for protobuf message api_user.UpdateUserInfoResponse
|
||||
*/
|
||||
export const UpdateUserInfoResponse = new UpdateUserInfoResponse$Type();
|
||||
Reference in New Issue
Block a user