v3 with more features
This commit is contained in:
parent
f3c87e1c84
commit
5cb7062d4e
6 changed files with 178 additions and 27 deletions
143
pianoverse_pb.ts
143
pianoverse_pb.ts
|
|
@ -1,4 +1,4 @@
|
|||
// PV version = 6202927ae53e43bafd8b8fd3be1ffcaaa45426a3
|
||||
// PV version = 672593ae79922c7414126e8a84b9bab9d9a4899a
|
||||
|
||||
// @generated by protoc-gen-es v1.10.0 with parameter "target=ts"
|
||||
// @generated from file pianoverse.proto (package pianoverse, syntax proto3)
|
||||
|
|
@ -18,20 +18,58 @@ export enum Role {
|
|||
USER = 0,
|
||||
|
||||
/**
|
||||
* @generated from enum value: MODERATOR = 1;
|
||||
* @generated from enum value: MOD = 1;
|
||||
*/
|
||||
MODERATOR = 1,
|
||||
MOD = 1,
|
||||
|
||||
/**
|
||||
* @generated from enum value: DEVELOPER = 2;
|
||||
* @generated from enum value: DEV = 2;
|
||||
*/
|
||||
DEVELOPER = 2,
|
||||
DEV = 2,
|
||||
}
|
||||
// Retrieve enum metadata with: proto3.getEnumType(Role)
|
||||
proto3.util.setEnumType(Role, "pianoverse.Role", [
|
||||
{ no: 0, name: "USER" },
|
||||
{ no: 1, name: "MODERATOR" },
|
||||
{ no: 2, name: "DEVELOPER" },
|
||||
{ no: 1, name: "MOD" },
|
||||
{ no: 2, name: "DEV" },
|
||||
]);
|
||||
|
||||
/**
|
||||
* @generated from enum pianoverse.NotificationLevel
|
||||
*/
|
||||
export enum NotificationLevel {
|
||||
/**
|
||||
* @generated from enum value: INFO = 0;
|
||||
*/
|
||||
INFO = 0,
|
||||
|
||||
/**
|
||||
* @generated from enum value: SUCCESS = 1;
|
||||
*/
|
||||
SUCCESS = 1,
|
||||
|
||||
/**
|
||||
* @generated from enum value: WARNING = 2;
|
||||
*/
|
||||
WARNING = 2,
|
||||
|
||||
/**
|
||||
* @generated from enum value: ERROR = 3;
|
||||
*/
|
||||
ERROR = 3,
|
||||
|
||||
/**
|
||||
* @generated from enum value: UNRECOGNIZED = -1;
|
||||
*/
|
||||
UNRECOGNIZED = -1,
|
||||
}
|
||||
// Retrieve enum metadata with: proto3.getEnumType(NotificationLevel)
|
||||
proto3.util.setEnumType(NotificationLevel, "pianoverse.NotificationLevel", [
|
||||
{ no: 0, name: "INFO" },
|
||||
{ no: 1, name: "SUCCESS" },
|
||||
{ no: 2, name: "WARNING" },
|
||||
{ no: 3, name: "ERROR" },
|
||||
{ no: -1, name: "UNRECOGNIZED" },
|
||||
]);
|
||||
|
||||
/**
|
||||
|
|
@ -475,15 +513,25 @@ export class ServerMessage extends Message<ServerMessage> {
|
|||
ratelimit = 0;
|
||||
|
||||
/**
|
||||
* @generated from field: string message = 15;
|
||||
* @generated from field: string popup = 15;
|
||||
*/
|
||||
message = "";
|
||||
popup = "";
|
||||
|
||||
/**
|
||||
* @generated from field: string chown = 16;
|
||||
*/
|
||||
chown = "";
|
||||
|
||||
/**
|
||||
* @generated from field: pianoverse.ServerMessage.Notification notification = 17;
|
||||
*/
|
||||
notification?: ServerMessage_Notification;
|
||||
|
||||
/**
|
||||
* @generated from field: string token = 18;
|
||||
*/
|
||||
token = "";
|
||||
|
||||
constructor(data?: PartialMessage<ServerMessage>) {
|
||||
super();
|
||||
proto3.util.initPartial(data, this);
|
||||
|
|
@ -506,8 +554,10 @@ export class ServerMessage extends Message<ServerMessage> {
|
|||
{ no: 12, name: "join", kind: "message", T: Profile },
|
||||
{ no: 13, name: "leave", kind: "scalar", T: 9 /* ScalarType.STRING */ },
|
||||
{ no: 14, name: "ratelimit", kind: "scalar", T: 13 /* ScalarType.UINT32 */ },
|
||||
{ no: 15, name: "message", kind: "scalar", T: 9 /* ScalarType.STRING */ },
|
||||
{ no: 15, name: "popup", kind: "scalar", T: 9 /* ScalarType.STRING */ },
|
||||
{ no: 16, name: "chown", kind: "scalar", T: 9 /* ScalarType.STRING */ },
|
||||
{ no: 17, name: "notification", kind: "message", T: ServerMessage_Notification },
|
||||
{ no: 18, name: "token", kind: "scalar", T: 9 /* ScalarType.STRING */ },
|
||||
]);
|
||||
|
||||
static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): ServerMessage {
|
||||
|
|
@ -597,14 +647,24 @@ export enum ServerMessage_EventType {
|
|||
RATELIMIT = 12,
|
||||
|
||||
/**
|
||||
* @generated from enum value: MESSAGE = 13;
|
||||
* @generated from enum value: POPUP = 13;
|
||||
*/
|
||||
MESSAGE = 13,
|
||||
POPUP = 13,
|
||||
|
||||
/**
|
||||
* @generated from enum value: CHOWN = 14;
|
||||
*/
|
||||
CHOWN = 14,
|
||||
|
||||
/**
|
||||
* @generated from enum value: NOTIFICATION = 15;
|
||||
*/
|
||||
NOTIFICATION = 15,
|
||||
|
||||
/**
|
||||
* @generated from enum value: TOKEN = 16;
|
||||
*/
|
||||
TOKEN = 16,
|
||||
}
|
||||
// Retrieve enum metadata with: proto3.getEnumType(ServerMessage_EventType)
|
||||
proto3.util.setEnumType(ServerMessage_EventType, "pianoverse.ServerMessage.EventType", [
|
||||
|
|
@ -621,8 +681,10 @@ proto3.util.setEnumType(ServerMessage_EventType, "pianoverse.ServerMessage.Event
|
|||
{ no: 10, name: "JOIN" },
|
||||
{ no: 11, name: "LEAVE" },
|
||||
{ no: 12, name: "RATELIMIT" },
|
||||
{ no: 13, name: "MESSAGE" },
|
||||
{ no: 13, name: "POPUP" },
|
||||
{ no: 14, name: "CHOWN" },
|
||||
{ no: 15, name: "NOTIFICATION" },
|
||||
{ no: 16, name: "TOKEN" },
|
||||
]);
|
||||
|
||||
/**
|
||||
|
|
@ -845,6 +907,61 @@ export class ServerMessage_Sustain extends Message<ServerMessage_Sustain> {
|
|||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @generated from message pianoverse.ServerMessage.Notification
|
||||
*/
|
||||
export class ServerMessage_Notification extends Message<ServerMessage_Notification> {
|
||||
/**
|
||||
* @generated from field: pianoverse.NotificationLevel level = 1;
|
||||
*/
|
||||
level = NotificationLevel.INFO;
|
||||
|
||||
/**
|
||||
* @generated from field: string title = 2;
|
||||
*/
|
||||
title = "";
|
||||
|
||||
/**
|
||||
* @generated from field: string text = 3;
|
||||
*/
|
||||
text = "";
|
||||
|
||||
/**
|
||||
* @generated from field: uint32 timeout = 4;
|
||||
*/
|
||||
timeout = 0;
|
||||
|
||||
constructor(data?: PartialMessage<ServerMessage_Notification>) {
|
||||
super();
|
||||
proto3.util.initPartial(data, this);
|
||||
}
|
||||
|
||||
static readonly runtime: typeof proto3 = proto3;
|
||||
static readonly typeName = "pianoverse.ServerMessage.Notification";
|
||||
static readonly fields: FieldList = proto3.util.newFieldList(() => [
|
||||
{ no: 1, name: "level", kind: "enum", T: proto3.getEnumType(NotificationLevel) },
|
||||
{ no: 2, name: "title", kind: "scalar", T: 9 /* ScalarType.STRING */ },
|
||||
{ no: 3, name: "text", kind: "scalar", T: 9 /* ScalarType.STRING */ },
|
||||
{ no: 4, name: "timeout", kind: "scalar", T: 13 /* ScalarType.UINT32 */ },
|
||||
]);
|
||||
|
||||
static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): ServerMessage_Notification {
|
||||
return new ServerMessage_Notification().fromBinary(bytes, options);
|
||||
}
|
||||
|
||||
static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): ServerMessage_Notification {
|
||||
return new ServerMessage_Notification().fromJson(jsonValue, options);
|
||||
}
|
||||
|
||||
static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): ServerMessage_Notification {
|
||||
return new ServerMessage_Notification().fromJsonString(jsonString, options);
|
||||
}
|
||||
|
||||
static equals(a: ServerMessage_Notification | PlainMessage<ServerMessage_Notification> | undefined, b: ServerMessage_Notification | PlainMessage<ServerMessage_Notification> | undefined): boolean {
|
||||
return proto3.util.equals(ServerMessage_Notification, a, b);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @generated from message pianoverse.Profile
|
||||
*/
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue