fed282f2d2
Tests · UI / test (push) Has been cancelled
Tests · Go / test (pull_request) Successful in 2m4s
Tests · Go / test (push) Successful in 2m5s
Tests · Integration / integration (pull_request) Successful in 1m54s
Tests · UI / test (pull_request) Successful in 2m50s
Adds the wire schema for the eight `user.games.mail.*` ConnectRPC commands together with the shared payload types (`MailMessage`, `MailRecipientState`, `MailBroadcastReceipt`). Send-request tables carry the optional `recipient_race_name` introduced in Step 1. Drops: - `pkg/schema/fbs/diplomail.fbs` — schema sources; - `pkg/schema/fbs/diplomail/*.go` — generated Go bindings (flatc `--go --go-module-name galaxy/schema/fbs`); - `pkg/model/diplomail/diplomail.go` — message-type catalog used by the gateway router; - `ui/frontend/src/proto/galaxy/fbs/diplomail/*.ts` — generated TS bindings consumed by the upcoming UI client wrapper; - `ui/Makefile` `FBS_INPUTS` extended to pick the new schema up on the next `make -C ui fbs-ts` run. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
146 lines
5.3 KiB
TypeScript
146 lines
5.3 KiB
TypeScript
// automatically generated by the FlatBuffers compiler, do not modify
|
|
|
|
/* eslint-disable @typescript-eslint/no-unused-vars, @typescript-eslint/no-explicit-any, @typescript-eslint/no-non-null-assertion */
|
|
|
|
import * as flatbuffers from 'flatbuffers';
|
|
|
|
import { UUID, UUIDT } from '../common/uuid.js';
|
|
|
|
|
|
export class SendRequest implements flatbuffers.IUnpackableObject<SendRequestT> {
|
|
bb: flatbuffers.ByteBuffer|null = null;
|
|
bb_pos = 0;
|
|
__init(i:number, bb:flatbuffers.ByteBuffer):SendRequest {
|
|
this.bb_pos = i;
|
|
this.bb = bb;
|
|
return this;
|
|
}
|
|
|
|
static getRootAsSendRequest(bb:flatbuffers.ByteBuffer, obj?:SendRequest):SendRequest {
|
|
return (obj || new SendRequest()).__init(bb.readInt32(bb.position()) + bb.position(), bb);
|
|
}
|
|
|
|
static getSizePrefixedRootAsSendRequest(bb:flatbuffers.ByteBuffer, obj?:SendRequest):SendRequest {
|
|
bb.setPosition(bb.position() + flatbuffers.SIZE_PREFIX_LENGTH);
|
|
return (obj || new SendRequest()).__init(bb.readInt32(bb.position()) + bb.position(), bb);
|
|
}
|
|
|
|
gameId(obj?:UUID):UUID|null {
|
|
const offset = this.bb!.__offset(this.bb_pos, 4);
|
|
return offset ? (obj || new UUID()).__init(this.bb_pos + offset, this.bb!) : null;
|
|
}
|
|
|
|
recipientUserId():string|null
|
|
recipientUserId(optionalEncoding:flatbuffers.Encoding):string|Uint8Array|null
|
|
recipientUserId(optionalEncoding?:any):string|Uint8Array|null {
|
|
const offset = this.bb!.__offset(this.bb_pos, 6);
|
|
return offset ? this.bb!.__string(this.bb_pos + offset, optionalEncoding) : null;
|
|
}
|
|
|
|
recipientRaceName():string|null
|
|
recipientRaceName(optionalEncoding:flatbuffers.Encoding):string|Uint8Array|null
|
|
recipientRaceName(optionalEncoding?:any):string|Uint8Array|null {
|
|
const offset = this.bb!.__offset(this.bb_pos, 8);
|
|
return offset ? this.bb!.__string(this.bb_pos + offset, optionalEncoding) : null;
|
|
}
|
|
|
|
subject():string|null
|
|
subject(optionalEncoding:flatbuffers.Encoding):string|Uint8Array|null
|
|
subject(optionalEncoding?:any):string|Uint8Array|null {
|
|
const offset = this.bb!.__offset(this.bb_pos, 10);
|
|
return offset ? this.bb!.__string(this.bb_pos + offset, optionalEncoding) : null;
|
|
}
|
|
|
|
body():string|null
|
|
body(optionalEncoding:flatbuffers.Encoding):string|Uint8Array|null
|
|
body(optionalEncoding?:any):string|Uint8Array|null {
|
|
const offset = this.bb!.__offset(this.bb_pos, 12);
|
|
return offset ? this.bb!.__string(this.bb_pos + offset, optionalEncoding) : null;
|
|
}
|
|
|
|
static startSendRequest(builder:flatbuffers.Builder) {
|
|
builder.startObject(5);
|
|
}
|
|
|
|
static addGameId(builder:flatbuffers.Builder, gameIdOffset:flatbuffers.Offset) {
|
|
builder.addFieldStruct(0, gameIdOffset, 0);
|
|
}
|
|
|
|
static addRecipientUserId(builder:flatbuffers.Builder, recipientUserIdOffset:flatbuffers.Offset) {
|
|
builder.addFieldOffset(1, recipientUserIdOffset, 0);
|
|
}
|
|
|
|
static addRecipientRaceName(builder:flatbuffers.Builder, recipientRaceNameOffset:flatbuffers.Offset) {
|
|
builder.addFieldOffset(2, recipientRaceNameOffset, 0);
|
|
}
|
|
|
|
static addSubject(builder:flatbuffers.Builder, subjectOffset:flatbuffers.Offset) {
|
|
builder.addFieldOffset(3, subjectOffset, 0);
|
|
}
|
|
|
|
static addBody(builder:flatbuffers.Builder, bodyOffset:flatbuffers.Offset) {
|
|
builder.addFieldOffset(4, bodyOffset, 0);
|
|
}
|
|
|
|
static endSendRequest(builder:flatbuffers.Builder):flatbuffers.Offset {
|
|
const offset = builder.endObject();
|
|
builder.requiredField(offset, 4) // game_id
|
|
return offset;
|
|
}
|
|
|
|
static createSendRequest(builder:flatbuffers.Builder, gameIdOffset:flatbuffers.Offset, recipientUserIdOffset:flatbuffers.Offset, recipientRaceNameOffset:flatbuffers.Offset, subjectOffset:flatbuffers.Offset, bodyOffset:flatbuffers.Offset):flatbuffers.Offset {
|
|
SendRequest.startSendRequest(builder);
|
|
SendRequest.addGameId(builder, gameIdOffset);
|
|
SendRequest.addRecipientUserId(builder, recipientUserIdOffset);
|
|
SendRequest.addRecipientRaceName(builder, recipientRaceNameOffset);
|
|
SendRequest.addSubject(builder, subjectOffset);
|
|
SendRequest.addBody(builder, bodyOffset);
|
|
return SendRequest.endSendRequest(builder);
|
|
}
|
|
|
|
unpack(): SendRequestT {
|
|
return new SendRequestT(
|
|
(this.gameId() !== null ? this.gameId()!.unpack() : null),
|
|
this.recipientUserId(),
|
|
this.recipientRaceName(),
|
|
this.subject(),
|
|
this.body()
|
|
);
|
|
}
|
|
|
|
|
|
unpackTo(_o: SendRequestT): void {
|
|
_o.gameId = (this.gameId() !== null ? this.gameId()!.unpack() : null);
|
|
_o.recipientUserId = this.recipientUserId();
|
|
_o.recipientRaceName = this.recipientRaceName();
|
|
_o.subject = this.subject();
|
|
_o.body = this.body();
|
|
}
|
|
}
|
|
|
|
export class SendRequestT implements flatbuffers.IGeneratedObject {
|
|
constructor(
|
|
public gameId: UUIDT|null = null,
|
|
public recipientUserId: string|Uint8Array|null = null,
|
|
public recipientRaceName: string|Uint8Array|null = null,
|
|
public subject: string|Uint8Array|null = null,
|
|
public body: string|Uint8Array|null = null
|
|
){}
|
|
|
|
|
|
pack(builder:flatbuffers.Builder): flatbuffers.Offset {
|
|
const recipientUserId = (this.recipientUserId !== null ? builder.createString(this.recipientUserId!) : 0);
|
|
const recipientRaceName = (this.recipientRaceName !== null ? builder.createString(this.recipientRaceName!) : 0);
|
|
const subject = (this.subject !== null ? builder.createString(this.subject!) : 0);
|
|
const body = (this.body !== null ? builder.createString(this.body!) : 0);
|
|
|
|
return SendRequest.createSendRequest(builder,
|
|
(this.gameId !== null ? this.gameId!.pack(builder) : 0),
|
|
recipientUserId,
|
|
recipientRaceName,
|
|
subject,
|
|
body
|
|
);
|
|
}
|
|
}
|