Files
npm-core-sdk/matrix-proxy.ts
2025-08-19 08:32:31 +00:00

1261 lines
65 KiB
TypeScript

// @generated by protobuf-ts 2.11.1 with parameter use_proto_field_name,keep_enum_prefix
// @generated from protobuf file "matrix-proxy.proto" (package "api", syntax proto3)
// tslint:disable
import { ServiceType } from "@protobuf-ts/runtime-rpc";
import type { BinaryWriteOptions } from "@protobuf-ts/runtime";
import type { IBinaryWriter } from "@protobuf-ts/runtime";
import { WireType } from "@protobuf-ts/runtime";
import type { BinaryReadOptions } from "@protobuf-ts/runtime";
import type { IBinaryReader } from "@protobuf-ts/runtime";
import { UnknownFieldHandler } from "@protobuf-ts/runtime";
import type { PartialMessage } from "@protobuf-ts/runtime";
import { reflectionMergePartial } from "@protobuf-ts/runtime";
import { MessageType } from "@protobuf-ts/runtime";
// ========== REQUESTS & RESPONSE MESSAGES ==========
/**
* @generated from protobuf message api.CreateRoomRequest
*/
export interface CreateRoomRequest {
/**
* @generated from protobuf field: string Name = 1
*/
Name: string; // The name of the room to create. It needs to be unique otherwise the room creation will fail.
}
/**
* @generated from protobuf message api.CreateRoomResponse
*/
export interface CreateRoomResponse {
/**
* @generated from protobuf field: string RoomID = 1
*/
RoomID: string; // The matrix room ID of the newly created room.
}
/**
* @generated from protobuf message api.DeleteRoomRequest
*/
export interface DeleteRoomRequest {
/**
* @generated from protobuf field: string Name = 1
*/
Name: string; // The name of the room to delete.
}
/**
* @generated from protobuf message api.DeleteRoomResponse
*/
export interface DeleteRoomResponse {
}
/**
* @generated from protobuf message api.InviteUserToRoomRequest
*/
export interface InviteUserToRoomRequest {
/**
* @generated from protobuf oneof: User
*/
User: {
oneofKind: "Mail";
/**
* @generated from protobuf field: string Mail = 1
*/
Mail: string; // The mail of the user to invite to the room. Mutually exclusive with ID.
} | {
oneofKind: "ID";
/**
* @generated from protobuf field: string ID = 2
*/
ID: string; // The ID of the user to invite to the room. Mutually exclusive with Mail. The ID is the OIDC sub claim that was used to authenticate the user during the SSO process.
} | {
oneofKind: undefined;
};
/**
* @generated from protobuf field: string RoomName = 3
*/
RoomName: string; // The name of the room to invite the given user to.
}
/**
* @generated from protobuf message api.InviteUserToRoomResponse
*/
export interface InviteUserToRoomResponse {
/**
* @generated from protobuf field: string RoomID = 1
*/
RoomID: string; // The matrix room ID of the room the user has been invited to.
}
/**
* @generated from protobuf message api.SendNoticeToRoomRequest
*/
export interface SendNoticeToRoomRequest {
/**
* @generated from protobuf field: string RoomName = 1
*/
RoomName: string; // The name of the room to send the notice to.
/**
* @generated from protobuf field: string Message = 2
*/
Message: string; // The message to send to the room. Could be a simple text or a markdown message.
}
/**
* @generated from protobuf message api.SendNoticeToRoomResponse
*/
export interface SendNoticeToRoomResponse {
}
// For projects
/**
* @generated from protobuf message api.CreateProjectRoomRequest
*/
export interface CreateProjectRoomRequest {
/**
* @generated from protobuf field: string ProjectID = 1
*/
ProjectID: string; // The ID of the project the room is related to.
/**
* @generated from protobuf field: string Name = 2
*/
Name: string; // The name of the room to create. It needs to be unique otherwise the room creation will fail.
}
/**
* @generated from protobuf message api.CreateProjectRoomResponse
*/
export interface CreateProjectRoomResponse {
/**
* @generated from protobuf field: string RoomID = 1
*/
RoomID: string; // The matrix room ID of the newly created room.
}
/**
* @generated from protobuf message api.DeleteProjectRoomRequest
*/
export interface DeleteProjectRoomRequest {
/**
* @generated from protobuf field: string ProjectID = 1
*/
ProjectID: string; // The ID of the project the room is related to.
/**
* @generated from protobuf field: string Name = 2
*/
Name: string; // The name of the room to delete.
}
/**
* @generated from protobuf message api.DeleteProjectRoomResponse
*/
export interface DeleteProjectRoomResponse {
}
/**
* @generated from protobuf message api.InviteUserToProjectRoomRequest
*/
export interface InviteUserToProjectRoomRequest {
/**
* @generated from protobuf field: string ProjectID = 1
*/
ProjectID: string; // The ID of the project the room is related to.
/**
* @generated from protobuf oneof: User
*/
User: {
oneofKind: "Mail";
/**
* @generated from protobuf field: string Mail = 2
*/
Mail: string; // The mail of the user to invite to the room. Mutually exclusive with ID.
} | {
oneofKind: "ID";
/**
* @generated from protobuf field: string ID = 3
*/
ID: string; // The ID of the user to invite to the room. Mutually exclusive with Mail. The ID is the OIDC sub claim that was used to authenticate the user during the SSO process.
} | {
oneofKind: undefined;
};
/**
* @generated from protobuf field: string RoomName = 4
*/
RoomName: string; // The name of the room to invite the given user to.
}
/**
* @generated from protobuf message api.InviteUserToProjectRoomResponse
*/
export interface InviteUserToProjectRoomResponse {
/**
* @generated from protobuf field: string RoomID = 1
*/
RoomID: string; // The matrix room ID of the room the user has been invited to.
}
/**
* @generated from protobuf message api.SendNoticeToProjectRoomRequest
*/
export interface SendNoticeToProjectRoomRequest {
/**
* @generated from protobuf field: string ProjectID = 1
*/
ProjectID: string; // The ID of the project the room is related to.
/**
* @generated from protobuf field: string RoomName = 2
*/
RoomName: string; // The name of the room to send the notice to.
/**
* @generated from protobuf field: string Message = 3
*/
Message: string; // The message to send to the room. Could be a simple text or a markdown message.
}
/**
* @generated from protobuf message api.SendNoticeToProjectRoomResponse
*/
export interface SendNoticeToProjectRoomResponse {
}
/**
* @generated from protobuf message api.DeleteRoomsForProjectRequest
*/
export interface DeleteRoomsForProjectRequest {
/**
* @generated from protobuf field: string ProjectID = 1
*/
ProjectID: string; // The ID of the project the rooms are related to.
}
/**
* @generated from protobuf message api.DeleteRoomsForProjectResponse
*/
export interface DeleteRoomsForProjectResponse {
}
/**
* @generated from protobuf message api.SendMessageToProjectRoomRequest
*/
export interface SendMessageToProjectRoomRequest {
/**
* @generated from protobuf field: string ProjectID = 1
*/
ProjectID: string; // The ID of the project the room is related to.
/**
* @generated from protobuf field: string RoomName = 2
*/
RoomName: string; // The name of the room to send the message to.
/**
* @generated from protobuf field: string Message = 3
*/
Message: string; // The message to send to the room. A simple text m
/**
* @generated from protobuf field: string UserJWT = 4
*/
UserJWT: string; // The JWT of the user sending the message. It is used to authenticate the user in the matrix server. The JWT is the OIDC access token that was used to authenticate the user during the SSO process. The requests will be made on behalf of the user.
}
/**
* @generated from protobuf message api.SendMessageToProjectRoomResponse
*/
export interface SendMessageToProjectRoomResponse {
}
// @generated message type with reflection information, may provide speed optimized methods
class CreateRoomRequest$Type extends MessageType<CreateRoomRequest> {
constructor() {
super("api.CreateRoomRequest", [
{ no: 1, name: "Name", kind: "scalar", localName: "Name", jsonName: "Name", T: 9 /*ScalarType.STRING*/, options: { "validate.rules": { string: { minLen: "1" } } } }
], { "grpc.gateway.protoc_gen_openapiv2.options.openapiv2_schema": { jsonSchema: { required: ["Name"] } } });
}
create(value?: PartialMessage<CreateRoomRequest>): CreateRoomRequest {
const message = globalThis.Object.create((this.messagePrototype!));
message.Name = "";
if (value !== undefined)
reflectionMergePartial<CreateRoomRequest>(this, message, value);
return message;
}
internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: CreateRoomRequest): CreateRoomRequest {
let message = target ?? this.create(), end = reader.pos + length;
while (reader.pos < end) {
let [fieldNo, wireType] = reader.tag();
switch (fieldNo) {
case /* string Name */ 1:
message.Name = reader.string();
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: CreateRoomRequest, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
/* string Name = 1; */
if (message.Name !== "")
writer.tag(1, WireType.LengthDelimited).string(message.Name);
let u = options.writeUnknownFields;
if (u !== false)
(u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
return writer;
}
}
/**
* @generated MessageType for protobuf message api.CreateRoomRequest
*/
export const CreateRoomRequest = new CreateRoomRequest$Type();
// @generated message type with reflection information, may provide speed optimized methods
class CreateRoomResponse$Type extends MessageType<CreateRoomResponse> {
constructor() {
super("api.CreateRoomResponse", [
{ no: 1, name: "RoomID", kind: "scalar", localName: "RoomID", jsonName: "RoomID", T: 9 /*ScalarType.STRING*/ }
]);
}
create(value?: PartialMessage<CreateRoomResponse>): CreateRoomResponse {
const message = globalThis.Object.create((this.messagePrototype!));
message.RoomID = "";
if (value !== undefined)
reflectionMergePartial<CreateRoomResponse>(this, message, value);
return message;
}
internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: CreateRoomResponse): CreateRoomResponse {
let message = target ?? this.create(), end = reader.pos + length;
while (reader.pos < end) {
let [fieldNo, wireType] = reader.tag();
switch (fieldNo) {
case /* string RoomID */ 1:
message.RoomID = reader.string();
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: CreateRoomResponse, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
/* string RoomID = 1; */
if (message.RoomID !== "")
writer.tag(1, WireType.LengthDelimited).string(message.RoomID);
let u = options.writeUnknownFields;
if (u !== false)
(u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
return writer;
}
}
/**
* @generated MessageType for protobuf message api.CreateRoomResponse
*/
export const CreateRoomResponse = new CreateRoomResponse$Type();
// @generated message type with reflection information, may provide speed optimized methods
class DeleteRoomRequest$Type extends MessageType<DeleteRoomRequest> {
constructor() {
super("api.DeleteRoomRequest", [
{ no: 1, name: "Name", kind: "scalar", localName: "Name", jsonName: "Name", T: 9 /*ScalarType.STRING*/, options: { "validate.rules": { string: { minLen: "1" } } } }
], { "grpc.gateway.protoc_gen_openapiv2.options.openapiv2_schema": { jsonSchema: { required: ["Name"] } } });
}
create(value?: PartialMessage<DeleteRoomRequest>): DeleteRoomRequest {
const message = globalThis.Object.create((this.messagePrototype!));
message.Name = "";
if (value !== undefined)
reflectionMergePartial<DeleteRoomRequest>(this, message, value);
return message;
}
internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: DeleteRoomRequest): DeleteRoomRequest {
let message = target ?? this.create(), end = reader.pos + length;
while (reader.pos < end) {
let [fieldNo, wireType] = reader.tag();
switch (fieldNo) {
case /* string Name */ 1:
message.Name = reader.string();
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: DeleteRoomRequest, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
/* string Name = 1; */
if (message.Name !== "")
writer.tag(1, WireType.LengthDelimited).string(message.Name);
let u = options.writeUnknownFields;
if (u !== false)
(u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
return writer;
}
}
/**
* @generated MessageType for protobuf message api.DeleteRoomRequest
*/
export const DeleteRoomRequest = new DeleteRoomRequest$Type();
// @generated message type with reflection information, may provide speed optimized methods
class DeleteRoomResponse$Type extends MessageType<DeleteRoomResponse> {
constructor() {
super("api.DeleteRoomResponse", []);
}
create(value?: PartialMessage<DeleteRoomResponse>): DeleteRoomResponse {
const message = globalThis.Object.create((this.messagePrototype!));
if (value !== undefined)
reflectionMergePartial<DeleteRoomResponse>(this, message, value);
return message;
}
internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: DeleteRoomResponse): DeleteRoomResponse {
let message = target ?? this.create(), end = reader.pos + length;
while (reader.pos < end) {
let [fieldNo, wireType] = reader.tag();
switch (fieldNo) {
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: DeleteRoomResponse, 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.DeleteRoomResponse
*/
export const DeleteRoomResponse = new DeleteRoomResponse$Type();
// @generated message type with reflection information, may provide speed optimized methods
class InviteUserToRoomRequest$Type extends MessageType<InviteUserToRoomRequest> {
constructor() {
super("api.InviteUserToRoomRequest", [
{ no: 1, name: "Mail", kind: "scalar", localName: "Mail", jsonName: "Mail", oneof: "User", T: 9 /*ScalarType.STRING*/ },
{ no: 2, name: "ID", kind: "scalar", localName: "ID", jsonName: "ID", oneof: "User", T: 9 /*ScalarType.STRING*/ },
{ no: 3, name: "RoomName", kind: "scalar", localName: "RoomName", jsonName: "RoomName", T: 9 /*ScalarType.STRING*/, options: { "validate.rules": { string: { minLen: "1" } } } }
], { "grpc.gateway.protoc_gen_openapiv2.options.openapiv2_schema": { jsonSchema: { required: ["RoomName"] } } });
}
create(value?: PartialMessage<InviteUserToRoomRequest>): InviteUserToRoomRequest {
const message = globalThis.Object.create((this.messagePrototype!));
message.User = { oneofKind: undefined };
message.RoomName = "";
if (value !== undefined)
reflectionMergePartial<InviteUserToRoomRequest>(this, message, value);
return message;
}
internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: InviteUserToRoomRequest): InviteUserToRoomRequest {
let message = target ?? this.create(), end = reader.pos + length;
while (reader.pos < end) {
let [fieldNo, wireType] = reader.tag();
switch (fieldNo) {
case /* string Mail */ 1:
message.User = {
oneofKind: "Mail",
Mail: reader.string()
};
break;
case /* string ID */ 2:
message.User = {
oneofKind: "ID",
ID: reader.string()
};
break;
case /* string RoomName */ 3:
message.RoomName = reader.string();
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: InviteUserToRoomRequest, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
/* string Mail = 1; */
if (message.User.oneofKind === "Mail")
writer.tag(1, WireType.LengthDelimited).string(message.User.Mail);
/* string ID = 2; */
if (message.User.oneofKind === "ID")
writer.tag(2, WireType.LengthDelimited).string(message.User.ID);
/* string RoomName = 3; */
if (message.RoomName !== "")
writer.tag(3, WireType.LengthDelimited).string(message.RoomName);
let u = options.writeUnknownFields;
if (u !== false)
(u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
return writer;
}
}
/**
* @generated MessageType for protobuf message api.InviteUserToRoomRequest
*/
export const InviteUserToRoomRequest = new InviteUserToRoomRequest$Type();
// @generated message type with reflection information, may provide speed optimized methods
class InviteUserToRoomResponse$Type extends MessageType<InviteUserToRoomResponse> {
constructor() {
super("api.InviteUserToRoomResponse", [
{ no: 1, name: "RoomID", kind: "scalar", localName: "RoomID", jsonName: "RoomID", T: 9 /*ScalarType.STRING*/ }
]);
}
create(value?: PartialMessage<InviteUserToRoomResponse>): InviteUserToRoomResponse {
const message = globalThis.Object.create((this.messagePrototype!));
message.RoomID = "";
if (value !== undefined)
reflectionMergePartial<InviteUserToRoomResponse>(this, message, value);
return message;
}
internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: InviteUserToRoomResponse): InviteUserToRoomResponse {
let message = target ?? this.create(), end = reader.pos + length;
while (reader.pos < end) {
let [fieldNo, wireType] = reader.tag();
switch (fieldNo) {
case /* string RoomID */ 1:
message.RoomID = reader.string();
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: InviteUserToRoomResponse, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
/* string RoomID = 1; */
if (message.RoomID !== "")
writer.tag(1, WireType.LengthDelimited).string(message.RoomID);
let u = options.writeUnknownFields;
if (u !== false)
(u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
return writer;
}
}
/**
* @generated MessageType for protobuf message api.InviteUserToRoomResponse
*/
export const InviteUserToRoomResponse = new InviteUserToRoomResponse$Type();
// @generated message type with reflection information, may provide speed optimized methods
class SendNoticeToRoomRequest$Type extends MessageType<SendNoticeToRoomRequest> {
constructor() {
super("api.SendNoticeToRoomRequest", [
{ no: 1, name: "RoomName", kind: "scalar", localName: "RoomName", jsonName: "RoomName", T: 9 /*ScalarType.STRING*/, options: { "validate.rules": { string: { minLen: "1" } } } },
{ no: 2, name: "Message", kind: "scalar", localName: "Message", jsonName: "Message", T: 9 /*ScalarType.STRING*/, options: { "validate.rules": { string: { minLen: "1" } } } }
], { "grpc.gateway.protoc_gen_openapiv2.options.openapiv2_schema": { jsonSchema: { required: ["RoomName", "Message"] } } });
}
create(value?: PartialMessage<SendNoticeToRoomRequest>): SendNoticeToRoomRequest {
const message = globalThis.Object.create((this.messagePrototype!));
message.RoomName = "";
message.Message = "";
if (value !== undefined)
reflectionMergePartial<SendNoticeToRoomRequest>(this, message, value);
return message;
}
internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: SendNoticeToRoomRequest): SendNoticeToRoomRequest {
let message = target ?? this.create(), end = reader.pos + length;
while (reader.pos < end) {
let [fieldNo, wireType] = reader.tag();
switch (fieldNo) {
case /* string RoomName */ 1:
message.RoomName = reader.string();
break;
case /* string Message */ 2:
message.Message = reader.string();
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: SendNoticeToRoomRequest, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
/* string RoomName = 1; */
if (message.RoomName !== "")
writer.tag(1, WireType.LengthDelimited).string(message.RoomName);
/* string Message = 2; */
if (message.Message !== "")
writer.tag(2, WireType.LengthDelimited).string(message.Message);
let u = options.writeUnknownFields;
if (u !== false)
(u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
return writer;
}
}
/**
* @generated MessageType for protobuf message api.SendNoticeToRoomRequest
*/
export const SendNoticeToRoomRequest = new SendNoticeToRoomRequest$Type();
// @generated message type with reflection information, may provide speed optimized methods
class SendNoticeToRoomResponse$Type extends MessageType<SendNoticeToRoomResponse> {
constructor() {
super("api.SendNoticeToRoomResponse", []);
}
create(value?: PartialMessage<SendNoticeToRoomResponse>): SendNoticeToRoomResponse {
const message = globalThis.Object.create((this.messagePrototype!));
if (value !== undefined)
reflectionMergePartial<SendNoticeToRoomResponse>(this, message, value);
return message;
}
internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: SendNoticeToRoomResponse): SendNoticeToRoomResponse {
let message = target ?? this.create(), end = reader.pos + length;
while (reader.pos < end) {
let [fieldNo, wireType] = reader.tag();
switch (fieldNo) {
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: SendNoticeToRoomResponse, 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.SendNoticeToRoomResponse
*/
export const SendNoticeToRoomResponse = new SendNoticeToRoomResponse$Type();
// @generated message type with reflection information, may provide speed optimized methods
class CreateProjectRoomRequest$Type extends MessageType<CreateProjectRoomRequest> {
constructor() {
super("api.CreateProjectRoomRequest", [
{ no: 1, name: "ProjectID", kind: "scalar", localName: "ProjectID", jsonName: "ProjectID", T: 9 /*ScalarType.STRING*/, options: { "validate.rules": { string: { minLen: "1" } } } },
{ no: 2, name: "Name", kind: "scalar", localName: "Name", jsonName: "Name", T: 9 /*ScalarType.STRING*/, options: { "validate.rules": { string: { minLen: "1" } } } }
], { "grpc.gateway.protoc_gen_openapiv2.options.openapiv2_schema": { jsonSchema: { required: ["ProjectID", "Name"] } } });
}
create(value?: PartialMessage<CreateProjectRoomRequest>): CreateProjectRoomRequest {
const message = globalThis.Object.create((this.messagePrototype!));
message.ProjectID = "";
message.Name = "";
if (value !== undefined)
reflectionMergePartial<CreateProjectRoomRequest>(this, message, value);
return message;
}
internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: CreateProjectRoomRequest): CreateProjectRoomRequest {
let message = target ?? this.create(), end = reader.pos + length;
while (reader.pos < end) {
let [fieldNo, wireType] = reader.tag();
switch (fieldNo) {
case /* string ProjectID */ 1:
message.ProjectID = reader.string();
break;
case /* string Name */ 2:
message.Name = reader.string();
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: CreateProjectRoomRequest, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
/* string ProjectID = 1; */
if (message.ProjectID !== "")
writer.tag(1, WireType.LengthDelimited).string(message.ProjectID);
/* string Name = 2; */
if (message.Name !== "")
writer.tag(2, WireType.LengthDelimited).string(message.Name);
let u = options.writeUnknownFields;
if (u !== false)
(u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
return writer;
}
}
/**
* @generated MessageType for protobuf message api.CreateProjectRoomRequest
*/
export const CreateProjectRoomRequest = new CreateProjectRoomRequest$Type();
// @generated message type with reflection information, may provide speed optimized methods
class CreateProjectRoomResponse$Type extends MessageType<CreateProjectRoomResponse> {
constructor() {
super("api.CreateProjectRoomResponse", [
{ no: 1, name: "RoomID", kind: "scalar", localName: "RoomID", jsonName: "RoomID", T: 9 /*ScalarType.STRING*/ }
]);
}
create(value?: PartialMessage<CreateProjectRoomResponse>): CreateProjectRoomResponse {
const message = globalThis.Object.create((this.messagePrototype!));
message.RoomID = "";
if (value !== undefined)
reflectionMergePartial<CreateProjectRoomResponse>(this, message, value);
return message;
}
internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: CreateProjectRoomResponse): CreateProjectRoomResponse {
let message = target ?? this.create(), end = reader.pos + length;
while (reader.pos < end) {
let [fieldNo, wireType] = reader.tag();
switch (fieldNo) {
case /* string RoomID */ 1:
message.RoomID = reader.string();
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: CreateProjectRoomResponse, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
/* string RoomID = 1; */
if (message.RoomID !== "")
writer.tag(1, WireType.LengthDelimited).string(message.RoomID);
let u = options.writeUnknownFields;
if (u !== false)
(u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
return writer;
}
}
/**
* @generated MessageType for protobuf message api.CreateProjectRoomResponse
*/
export const CreateProjectRoomResponse = new CreateProjectRoomResponse$Type();
// @generated message type with reflection information, may provide speed optimized methods
class DeleteProjectRoomRequest$Type extends MessageType<DeleteProjectRoomRequest> {
constructor() {
super("api.DeleteProjectRoomRequest", [
{ no: 1, name: "ProjectID", kind: "scalar", localName: "ProjectID", jsonName: "ProjectID", T: 9 /*ScalarType.STRING*/, options: { "validate.rules": { string: { minLen: "1" } } } },
{ no: 2, name: "Name", kind: "scalar", localName: "Name", jsonName: "Name", T: 9 /*ScalarType.STRING*/, options: { "validate.rules": { string: { minLen: "1" } } } }
], { "grpc.gateway.protoc_gen_openapiv2.options.openapiv2_schema": { jsonSchema: { required: ["ProjectID", "Name"] } } });
}
create(value?: PartialMessage<DeleteProjectRoomRequest>): DeleteProjectRoomRequest {
const message = globalThis.Object.create((this.messagePrototype!));
message.ProjectID = "";
message.Name = "";
if (value !== undefined)
reflectionMergePartial<DeleteProjectRoomRequest>(this, message, value);
return message;
}
internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: DeleteProjectRoomRequest): DeleteProjectRoomRequest {
let message = target ?? this.create(), end = reader.pos + length;
while (reader.pos < end) {
let [fieldNo, wireType] = reader.tag();
switch (fieldNo) {
case /* string ProjectID */ 1:
message.ProjectID = reader.string();
break;
case /* string Name */ 2:
message.Name = reader.string();
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: DeleteProjectRoomRequest, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
/* string ProjectID = 1; */
if (message.ProjectID !== "")
writer.tag(1, WireType.LengthDelimited).string(message.ProjectID);
/* string Name = 2; */
if (message.Name !== "")
writer.tag(2, WireType.LengthDelimited).string(message.Name);
let u = options.writeUnknownFields;
if (u !== false)
(u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
return writer;
}
}
/**
* @generated MessageType for protobuf message api.DeleteProjectRoomRequest
*/
export const DeleteProjectRoomRequest = new DeleteProjectRoomRequest$Type();
// @generated message type with reflection information, may provide speed optimized methods
class DeleteProjectRoomResponse$Type extends MessageType<DeleteProjectRoomResponse> {
constructor() {
super("api.DeleteProjectRoomResponse", []);
}
create(value?: PartialMessage<DeleteProjectRoomResponse>): DeleteProjectRoomResponse {
const message = globalThis.Object.create((this.messagePrototype!));
if (value !== undefined)
reflectionMergePartial<DeleteProjectRoomResponse>(this, message, value);
return message;
}
internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: DeleteProjectRoomResponse): DeleteProjectRoomResponse {
let message = target ?? this.create(), end = reader.pos + length;
while (reader.pos < end) {
let [fieldNo, wireType] = reader.tag();
switch (fieldNo) {
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: DeleteProjectRoomResponse, 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.DeleteProjectRoomResponse
*/
export const DeleteProjectRoomResponse = new DeleteProjectRoomResponse$Type();
// @generated message type with reflection information, may provide speed optimized methods
class InviteUserToProjectRoomRequest$Type extends MessageType<InviteUserToProjectRoomRequest> {
constructor() {
super("api.InviteUserToProjectRoomRequest", [
{ no: 1, name: "ProjectID", kind: "scalar", localName: "ProjectID", jsonName: "ProjectID", T: 9 /*ScalarType.STRING*/, options: { "validate.rules": { string: { minLen: "1" } } } },
{ no: 2, name: "Mail", kind: "scalar", localName: "Mail", jsonName: "Mail", oneof: "User", T: 9 /*ScalarType.STRING*/ },
{ no: 3, name: "ID", kind: "scalar", localName: "ID", jsonName: "ID", oneof: "User", T: 9 /*ScalarType.STRING*/ },
{ no: 4, name: "RoomName", kind: "scalar", localName: "RoomName", jsonName: "RoomName", T: 9 /*ScalarType.STRING*/, options: { "validate.rules": { string: { minLen: "1" } } } }
], { "grpc.gateway.protoc_gen_openapiv2.options.openapiv2_schema": { jsonSchema: { required: ["ProjectID", "RoomName"] } } });
}
create(value?: PartialMessage<InviteUserToProjectRoomRequest>): InviteUserToProjectRoomRequest {
const message = globalThis.Object.create((this.messagePrototype!));
message.ProjectID = "";
message.User = { oneofKind: undefined };
message.RoomName = "";
if (value !== undefined)
reflectionMergePartial<InviteUserToProjectRoomRequest>(this, message, value);
return message;
}
internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: InviteUserToProjectRoomRequest): InviteUserToProjectRoomRequest {
let message = target ?? this.create(), end = reader.pos + length;
while (reader.pos < end) {
let [fieldNo, wireType] = reader.tag();
switch (fieldNo) {
case /* string ProjectID */ 1:
message.ProjectID = reader.string();
break;
case /* string Mail */ 2:
message.User = {
oneofKind: "Mail",
Mail: reader.string()
};
break;
case /* string ID */ 3:
message.User = {
oneofKind: "ID",
ID: reader.string()
};
break;
case /* string RoomName */ 4:
message.RoomName = reader.string();
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: InviteUserToProjectRoomRequest, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
/* string ProjectID = 1; */
if (message.ProjectID !== "")
writer.tag(1, WireType.LengthDelimited).string(message.ProjectID);
/* string Mail = 2; */
if (message.User.oneofKind === "Mail")
writer.tag(2, WireType.LengthDelimited).string(message.User.Mail);
/* string ID = 3; */
if (message.User.oneofKind === "ID")
writer.tag(3, WireType.LengthDelimited).string(message.User.ID);
/* string RoomName = 4; */
if (message.RoomName !== "")
writer.tag(4, WireType.LengthDelimited).string(message.RoomName);
let u = options.writeUnknownFields;
if (u !== false)
(u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
return writer;
}
}
/**
* @generated MessageType for protobuf message api.InviteUserToProjectRoomRequest
*/
export const InviteUserToProjectRoomRequest = new InviteUserToProjectRoomRequest$Type();
// @generated message type with reflection information, may provide speed optimized methods
class InviteUserToProjectRoomResponse$Type extends MessageType<InviteUserToProjectRoomResponse> {
constructor() {
super("api.InviteUserToProjectRoomResponse", [
{ no: 1, name: "RoomID", kind: "scalar", localName: "RoomID", jsonName: "RoomID", T: 9 /*ScalarType.STRING*/ }
]);
}
create(value?: PartialMessage<InviteUserToProjectRoomResponse>): InviteUserToProjectRoomResponse {
const message = globalThis.Object.create((this.messagePrototype!));
message.RoomID = "";
if (value !== undefined)
reflectionMergePartial<InviteUserToProjectRoomResponse>(this, message, value);
return message;
}
internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: InviteUserToProjectRoomResponse): InviteUserToProjectRoomResponse {
let message = target ?? this.create(), end = reader.pos + length;
while (reader.pos < end) {
let [fieldNo, wireType] = reader.tag();
switch (fieldNo) {
case /* string RoomID */ 1:
message.RoomID = reader.string();
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: InviteUserToProjectRoomResponse, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
/* string RoomID = 1; */
if (message.RoomID !== "")
writer.tag(1, WireType.LengthDelimited).string(message.RoomID);
let u = options.writeUnknownFields;
if (u !== false)
(u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
return writer;
}
}
/**
* @generated MessageType for protobuf message api.InviteUserToProjectRoomResponse
*/
export const InviteUserToProjectRoomResponse = new InviteUserToProjectRoomResponse$Type();
// @generated message type with reflection information, may provide speed optimized methods
class SendNoticeToProjectRoomRequest$Type extends MessageType<SendNoticeToProjectRoomRequest> {
constructor() {
super("api.SendNoticeToProjectRoomRequest", [
{ no: 1, name: "ProjectID", kind: "scalar", localName: "ProjectID", jsonName: "ProjectID", T: 9 /*ScalarType.STRING*/, options: { "validate.rules": { string: { minLen: "1" } } } },
{ no: 2, name: "RoomName", kind: "scalar", localName: "RoomName", jsonName: "RoomName", T: 9 /*ScalarType.STRING*/, options: { "validate.rules": { string: { minLen: "1" } } } },
{ no: 3, name: "Message", kind: "scalar", localName: "Message", jsonName: "Message", T: 9 /*ScalarType.STRING*/, options: { "validate.rules": { string: { minLen: "1" } } } }
], { "grpc.gateway.protoc_gen_openapiv2.options.openapiv2_schema": { jsonSchema: { required: ["ProjectID", "RoomName", "Message"] } } });
}
create(value?: PartialMessage<SendNoticeToProjectRoomRequest>): SendNoticeToProjectRoomRequest {
const message = globalThis.Object.create((this.messagePrototype!));
message.ProjectID = "";
message.RoomName = "";
message.Message = "";
if (value !== undefined)
reflectionMergePartial<SendNoticeToProjectRoomRequest>(this, message, value);
return message;
}
internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: SendNoticeToProjectRoomRequest): SendNoticeToProjectRoomRequest {
let message = target ?? this.create(), end = reader.pos + length;
while (reader.pos < end) {
let [fieldNo, wireType] = reader.tag();
switch (fieldNo) {
case /* string ProjectID */ 1:
message.ProjectID = reader.string();
break;
case /* string RoomName */ 2:
message.RoomName = reader.string();
break;
case /* string Message */ 3:
message.Message = reader.string();
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: SendNoticeToProjectRoomRequest, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
/* string ProjectID = 1; */
if (message.ProjectID !== "")
writer.tag(1, WireType.LengthDelimited).string(message.ProjectID);
/* string RoomName = 2; */
if (message.RoomName !== "")
writer.tag(2, WireType.LengthDelimited).string(message.RoomName);
/* string Message = 3; */
if (message.Message !== "")
writer.tag(3, WireType.LengthDelimited).string(message.Message);
let u = options.writeUnknownFields;
if (u !== false)
(u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
return writer;
}
}
/**
* @generated MessageType for protobuf message api.SendNoticeToProjectRoomRequest
*/
export const SendNoticeToProjectRoomRequest = new SendNoticeToProjectRoomRequest$Type();
// @generated message type with reflection information, may provide speed optimized methods
class SendNoticeToProjectRoomResponse$Type extends MessageType<SendNoticeToProjectRoomResponse> {
constructor() {
super("api.SendNoticeToProjectRoomResponse", []);
}
create(value?: PartialMessage<SendNoticeToProjectRoomResponse>): SendNoticeToProjectRoomResponse {
const message = globalThis.Object.create((this.messagePrototype!));
if (value !== undefined)
reflectionMergePartial<SendNoticeToProjectRoomResponse>(this, message, value);
return message;
}
internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: SendNoticeToProjectRoomResponse): SendNoticeToProjectRoomResponse {
let message = target ?? this.create(), end = reader.pos + length;
while (reader.pos < end) {
let [fieldNo, wireType] = reader.tag();
switch (fieldNo) {
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: SendNoticeToProjectRoomResponse, 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.SendNoticeToProjectRoomResponse
*/
export const SendNoticeToProjectRoomResponse = new SendNoticeToProjectRoomResponse$Type();
// @generated message type with reflection information, may provide speed optimized methods
class DeleteRoomsForProjectRequest$Type extends MessageType<DeleteRoomsForProjectRequest> {
constructor() {
super("api.DeleteRoomsForProjectRequest", [
{ no: 1, name: "ProjectID", kind: "scalar", localName: "ProjectID", jsonName: "ProjectID", T: 9 /*ScalarType.STRING*/, options: { "validate.rules": { string: { minLen: "1" } } } }
], { "grpc.gateway.protoc_gen_openapiv2.options.openapiv2_schema": { jsonSchema: { required: ["ProjectID"] } } });
}
create(value?: PartialMessage<DeleteRoomsForProjectRequest>): DeleteRoomsForProjectRequest {
const message = globalThis.Object.create((this.messagePrototype!));
message.ProjectID = "";
if (value !== undefined)
reflectionMergePartial<DeleteRoomsForProjectRequest>(this, message, value);
return message;
}
internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: DeleteRoomsForProjectRequest): DeleteRoomsForProjectRequest {
let message = target ?? this.create(), end = reader.pos + length;
while (reader.pos < end) {
let [fieldNo, wireType] = reader.tag();
switch (fieldNo) {
case /* string ProjectID */ 1:
message.ProjectID = reader.string();
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: DeleteRoomsForProjectRequest, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
/* string ProjectID = 1; */
if (message.ProjectID !== "")
writer.tag(1, WireType.LengthDelimited).string(message.ProjectID);
let u = options.writeUnknownFields;
if (u !== false)
(u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
return writer;
}
}
/**
* @generated MessageType for protobuf message api.DeleteRoomsForProjectRequest
*/
export const DeleteRoomsForProjectRequest = new DeleteRoomsForProjectRequest$Type();
// @generated message type with reflection information, may provide speed optimized methods
class DeleteRoomsForProjectResponse$Type extends MessageType<DeleteRoomsForProjectResponse> {
constructor() {
super("api.DeleteRoomsForProjectResponse", []);
}
create(value?: PartialMessage<DeleteRoomsForProjectResponse>): DeleteRoomsForProjectResponse {
const message = globalThis.Object.create((this.messagePrototype!));
if (value !== undefined)
reflectionMergePartial<DeleteRoomsForProjectResponse>(this, message, value);
return message;
}
internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: DeleteRoomsForProjectResponse): DeleteRoomsForProjectResponse {
let message = target ?? this.create(), end = reader.pos + length;
while (reader.pos < end) {
let [fieldNo, wireType] = reader.tag();
switch (fieldNo) {
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: DeleteRoomsForProjectResponse, 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.DeleteRoomsForProjectResponse
*/
export const DeleteRoomsForProjectResponse = new DeleteRoomsForProjectResponse$Type();
// @generated message type with reflection information, may provide speed optimized methods
class SendMessageToProjectRoomRequest$Type extends MessageType<SendMessageToProjectRoomRequest> {
constructor() {
super("api.SendMessageToProjectRoomRequest", [
{ no: 1, name: "ProjectID", kind: "scalar", localName: "ProjectID", jsonName: "ProjectID", T: 9 /*ScalarType.STRING*/, options: { "validate.rules": { string: { minLen: "1" } } } },
{ no: 2, name: "RoomName", kind: "scalar", localName: "RoomName", jsonName: "RoomName", T: 9 /*ScalarType.STRING*/, options: { "validate.rules": { string: { minLen: "1" } } } },
{ no: 3, name: "Message", kind: "scalar", localName: "Message", jsonName: "Message", T: 9 /*ScalarType.STRING*/, options: { "validate.rules": { string: { minLen: "1" } } } },
{ no: 4, name: "UserJWT", kind: "scalar", localName: "UserJWT", jsonName: "UserJWT", T: 9 /*ScalarType.STRING*/, options: { "validate.rules": { string: { minLen: "1" } } } }
], { "grpc.gateway.protoc_gen_openapiv2.options.openapiv2_schema": { jsonSchema: { required: ["ProjectID", "RoomName", "Message", "UserJWT"] } } });
}
create(value?: PartialMessage<SendMessageToProjectRoomRequest>): SendMessageToProjectRoomRequest {
const message = globalThis.Object.create((this.messagePrototype!));
message.ProjectID = "";
message.RoomName = "";
message.Message = "";
message.UserJWT = "";
if (value !== undefined)
reflectionMergePartial<SendMessageToProjectRoomRequest>(this, message, value);
return message;
}
internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: SendMessageToProjectRoomRequest): SendMessageToProjectRoomRequest {
let message = target ?? this.create(), end = reader.pos + length;
while (reader.pos < end) {
let [fieldNo, wireType] = reader.tag();
switch (fieldNo) {
case /* string ProjectID */ 1:
message.ProjectID = reader.string();
break;
case /* string RoomName */ 2:
message.RoomName = reader.string();
break;
case /* string Message */ 3:
message.Message = reader.string();
break;
case /* string UserJWT */ 4:
message.UserJWT = reader.string();
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: SendMessageToProjectRoomRequest, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
/* string ProjectID = 1; */
if (message.ProjectID !== "")
writer.tag(1, WireType.LengthDelimited).string(message.ProjectID);
/* string RoomName = 2; */
if (message.RoomName !== "")
writer.tag(2, WireType.LengthDelimited).string(message.RoomName);
/* string Message = 3; */
if (message.Message !== "")
writer.tag(3, WireType.LengthDelimited).string(message.Message);
/* string UserJWT = 4; */
if (message.UserJWT !== "")
writer.tag(4, WireType.LengthDelimited).string(message.UserJWT);
let u = options.writeUnknownFields;
if (u !== false)
(u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
return writer;
}
}
/**
* @generated MessageType for protobuf message api.SendMessageToProjectRoomRequest
*/
export const SendMessageToProjectRoomRequest = new SendMessageToProjectRoomRequest$Type();
// @generated message type with reflection information, may provide speed optimized methods
class SendMessageToProjectRoomResponse$Type extends MessageType<SendMessageToProjectRoomResponse> {
constructor() {
super("api.SendMessageToProjectRoomResponse", []);
}
create(value?: PartialMessage<SendMessageToProjectRoomResponse>): SendMessageToProjectRoomResponse {
const message = globalThis.Object.create((this.messagePrototype!));
if (value !== undefined)
reflectionMergePartial<SendMessageToProjectRoomResponse>(this, message, value);
return message;
}
internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: SendMessageToProjectRoomResponse): SendMessageToProjectRoomResponse {
let message = target ?? this.create(), end = reader.pos + length;
while (reader.pos < end) {
let [fieldNo, wireType] = reader.tag();
switch (fieldNo) {
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: SendMessageToProjectRoomResponse, 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.SendMessageToProjectRoomResponse
*/
export const SendMessageToProjectRoomResponse = new SendMessageToProjectRoomResponse$Type();
/**
* @generated ServiceType for protobuf service api.MatrixProxyService
*/
export const MatrixProxyService = new ServiceType("api.MatrixProxyService", [
{ name: "CreateRoom", options: { "grpc.gateway.protoc_gen_openapiv2.options.openapiv2_operation": { tags: ["Matrix"], description: "CreateRoom creates a new matrix private room with the given name. It will also create the room alias with the same name, which means that it requires the name to be unique. The corresponding matrix room ID is returned. Room names with a project prefix are reserved for project rooms. If a room name starts with a project ID, it will be considered as a project room." }, "api.rscType": "Platform", "api.roles": "Platform.Matrix", "google.api.method_visibility": { restriction: "INTERNAL" } }, I: CreateRoomRequest, O: CreateRoomResponse },
{ name: "DeleteRoom", options: { "grpc.gateway.protoc_gen_openapiv2.options.openapiv2_operation": { tags: ["Matrix"], description: "DeleteRoom deletes the matrix private room with the given name (it uses the room alias). It is done by kicking all the users from the room, leaving it empty which will trigger the 7 days deletion process." }, "api.rscType": "Platform", "api.roles": "Platform.Matrix", "google.api.method_visibility": { restriction: "INTERNAL" } }, I: DeleteRoomRequest, O: DeleteRoomResponse },
{ name: "InviteUserToRoom", options: { "grpc.gateway.protoc_gen_openapiv2.options.openapiv2_operation": { tags: ["Matrix"], description: "InviteUserToRoom invites the given user to the given matrix private room. Return the ID of the room." }, "api.rscType": "Platform", "api.roles": "Platform.Matrix", "google.api.method_visibility": { restriction: "INTERNAL" } }, I: InviteUserToRoomRequest, O: InviteUserToRoomResponse },
{ name: "SendNoticeToRoom", options: { "grpc.gateway.protoc_gen_openapiv2.options.openapiv2_operation": { tags: ["Matrix"], description: "SendNoticeToRoom sends a notice message event to the given matrix private room." }, "api.rscType": "Platform", "api.roles": "Platform.Matrix", "google.api.method_visibility": { restriction: "INTERNAL" } }, I: SendNoticeToRoomRequest, O: SendNoticeToRoomResponse },
{ name: "CreateProjectRoom", options: { "grpc.gateway.protoc_gen_openapiv2.options.openapiv2_operation": { tags: ["Matrix"], description: "CreateProjectRoom creates a new matrix private room with the given name and related to the given project. It will also create the room alias with the same name, which means that it requires the name to be unique (in the project namespace). The corresponding matrix room ID is returned." }, "api.rscType": "Platform", "api.roles": "Platform.Matrix", "google.api.method_visibility": { restriction: "INTERNAL" } }, I: CreateProjectRoomRequest, O: CreateProjectRoomResponse },
{ name: "DeleteProjectRoom", options: { "grpc.gateway.protoc_gen_openapiv2.options.openapiv2_operation": { tags: ["Matrix"], description: "DeleteProjectRoom deletes the matrix private room with the given name and related to the given project (it uses the room alias). It is done by kicking all the users from the room, leaving it empty which will trigger the 7 days deletion process." }, "api.rscType": "Platform", "api.roles": "Platform.Matrix", "google.api.method_visibility": { restriction: "INTERNAL" } }, I: DeleteProjectRoomRequest, O: DeleteProjectRoomResponse },
{ name: "InviteUserToProjectRoom", options: { "grpc.gateway.protoc_gen_openapiv2.options.openapiv2_operation": { tags: ["Matrix"], description: "InviteUserToProjectRoom invites the given user to the given matrix private room related to the given project. Return the ID of the room." }, "api.rscType": "Platform", "api.roles": "Platform.Matrix", "google.api.method_visibility": { restriction: "INTERNAL" } }, I: InviteUserToProjectRoomRequest, O: InviteUserToProjectRoomResponse },
{ name: "SendNoticeToProjectRoom", options: { "grpc.gateway.protoc_gen_openapiv2.options.openapiv2_operation": { tags: ["Matrix"], description: "SendNoticeToProjectRoom sends a notice message event to the given matrix private room related to the given project." }, "api.rscType": "Platform", "api.roles": "Platform.Matrix", "google.api.method_visibility": { restriction: "INTERNAL" } }, I: SendNoticeToProjectRoomRequest, O: SendNoticeToProjectRoomResponse },
{ name: "DeleteRoomsForProject", options: { "grpc.gateway.protoc_gen_openapiv2.options.openapiv2_operation": { tags: ["Matrix"], description: "DeleteRoomsForProject deletes all the matrix private rooms related to the given project. It is done by kicking all the users from the rooms, leaving them empty which will trigger the 7 days deletion process." }, "api.rscType": "Platform", "api.roles": "Platform.Matrix", "google.api.method_visibility": { restriction: "INTERNAL" } }, I: DeleteRoomsForProjectRequest, O: DeleteRoomsForProjectResponse },
{ name: "SendMessageToProjectRoom", options: { "grpc.gateway.protoc_gen_openapiv2.options.openapiv2_operation": { tags: ["Matrix"], description: "SendMessageToProjectRoom sends a message event to the given matrix private room related to the given project. If the user is not in the room, it will be invited first and then the message will be sent." }, "api.rscType": "Platform", "api.roles": "Platform.Matrix", "google.api.method_visibility": { restriction: "INTERNAL" } }, I: SendMessageToProjectRoomRequest, O: SendMessageToProjectRoomResponse }
], { "api.k8sService": "matrix-proxy" });