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>
87 lines
2.9 KiB
TypeScript
87 lines
2.9 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 MessageGetRequest implements flatbuffers.IUnpackableObject<MessageGetRequestT> {
|
|
bb: flatbuffers.ByteBuffer|null = null;
|
|
bb_pos = 0;
|
|
__init(i:number, bb:flatbuffers.ByteBuffer):MessageGetRequest {
|
|
this.bb_pos = i;
|
|
this.bb = bb;
|
|
return this;
|
|
}
|
|
|
|
static getRootAsMessageGetRequest(bb:flatbuffers.ByteBuffer, obj?:MessageGetRequest):MessageGetRequest {
|
|
return (obj || new MessageGetRequest()).__init(bb.readInt32(bb.position()) + bb.position(), bb);
|
|
}
|
|
|
|
static getSizePrefixedRootAsMessageGetRequest(bb:flatbuffers.ByteBuffer, obj?:MessageGetRequest):MessageGetRequest {
|
|
bb.setPosition(bb.position() + flatbuffers.SIZE_PREFIX_LENGTH);
|
|
return (obj || new MessageGetRequest()).__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;
|
|
}
|
|
|
|
messageId(obj?:UUID):UUID|null {
|
|
const offset = this.bb!.__offset(this.bb_pos, 6);
|
|
return offset ? (obj || new UUID()).__init(this.bb_pos + offset, this.bb!) : null;
|
|
}
|
|
|
|
static startMessageGetRequest(builder:flatbuffers.Builder) {
|
|
builder.startObject(2);
|
|
}
|
|
|
|
static addGameId(builder:flatbuffers.Builder, gameIdOffset:flatbuffers.Offset) {
|
|
builder.addFieldStruct(0, gameIdOffset, 0);
|
|
}
|
|
|
|
static addMessageId(builder:flatbuffers.Builder, messageIdOffset:flatbuffers.Offset) {
|
|
builder.addFieldStruct(1, messageIdOffset, 0);
|
|
}
|
|
|
|
static endMessageGetRequest(builder:flatbuffers.Builder):flatbuffers.Offset {
|
|
const offset = builder.endObject();
|
|
builder.requiredField(offset, 4) // game_id
|
|
builder.requiredField(offset, 6) // message_id
|
|
return offset;
|
|
}
|
|
|
|
|
|
unpack(): MessageGetRequestT {
|
|
return new MessageGetRequestT(
|
|
(this.gameId() !== null ? this.gameId()!.unpack() : null),
|
|
(this.messageId() !== null ? this.messageId()!.unpack() : null)
|
|
);
|
|
}
|
|
|
|
|
|
unpackTo(_o: MessageGetRequestT): void {
|
|
_o.gameId = (this.gameId() !== null ? this.gameId()!.unpack() : null);
|
|
_o.messageId = (this.messageId() !== null ? this.messageId()!.unpack() : null);
|
|
}
|
|
}
|
|
|
|
export class MessageGetRequestT implements flatbuffers.IGeneratedObject {
|
|
constructor(
|
|
public gameId: UUIDT|null = null,
|
|
public messageId: UUIDT|null = null
|
|
){}
|
|
|
|
|
|
pack(builder:flatbuffers.Builder): flatbuffers.Offset {
|
|
MessageGetRequest.startMessageGetRequest(builder);
|
|
MessageGetRequest.addGameId(builder, (this.gameId !== null ? this.gameId!.pack(builder) : 0));
|
|
MessageGetRequest.addMessageId(builder, (this.messageId !== null ? this.messageId!.pack(builder) : 0));
|
|
|
|
return MessageGetRequest.endMessageGetRequest(builder);
|
|
}
|
|
}
|