65689b903f
backend: REST handlers for pass/exchange/resign/hint/evaluate/check_word/complaint/history/chat-list/nudge + new game.ListForAccount (my games) + seat display_name resolution pkg/fbs: GameActionRequest/ExchangeRequest/EvalRequest/EvalResult/CheckWordRequest/WordCheckResult/ComplaintRequest/HintResult/History/GameList/ChatList + SeatView.display_name; committed Go regenerated (flatc 23.5.26) gateway: 11 new transcode ops + backendclient methods + FB encoders ui: edge TS codegen (flatc --ts + protoc-gen-es, committed), FlatBuffers<->model codec, real connect-web transport (binary, bearer auth, Subscribe). prod bundle ~69KB gzip JS
160 lines
5.3 KiB
TypeScript
160 lines
5.3 KiB
TypeScript
// @generated by protoc-gen-es v2.12.0 with parameter "target=ts"
|
|
// @generated from file edge/v1/edge.proto (package scrabble.edge.v1, syntax proto3)
|
|
/* eslint-disable */
|
|
|
|
// Package scrabble.edge.v1 is the client <-> gateway Connect-RPC contract. It is
|
|
// deliberately minimal (ARCHITECTURE.md §2): a single unary Execute that routes
|
|
// by message_type, and a server-streaming Subscribe for the in-app live channel.
|
|
// The actual request/response and event bodies travel as FlatBuffers bytes in the
|
|
// payload fields (pkg/fbs). The session token rides in the Authorization header,
|
|
// not the envelope (no per-request signing — ARCHITECTURE.md §3).
|
|
|
|
import type { GenFile, GenMessage, GenService } from "@bufbuild/protobuf/codegenv2";
|
|
import { fileDesc, messageDesc, serviceDesc } from "@bufbuild/protobuf/codegenv2";
|
|
import type { Message } from "@bufbuild/protobuf";
|
|
|
|
/**
|
|
* Describes the file edge/v1/edge.proto.
|
|
*/
|
|
export const file_edge_v1_edge: GenFile = /*@__PURE__*/
|
|
fileDesc("ChJlZGdlL3YxL2VkZ2UucHJvdG8SEHNjcmFiYmxlLmVkZ2UudjEiSwoORXhlY3V0ZVJlcXVlc3QSFAoMbWVzc2FnZV90eXBlGAEgASgJEg8KB3BheWxvYWQYAiABKAwSEgoKcmVxdWVzdF9pZBgDIAEoCSJLCg9FeGVjdXRlUmVzcG9uc2USEgoKcmVxdWVzdF9pZBgBIAEoCRITCgtyZXN1bHRfY29kZRgCIAEoCRIPCgdwYXlsb2FkGAMgASgMIhIKEFN1YnNjcmliZVJlcXVlc3QiOAoFRXZlbnQSDAoEa2luZBgBIAEoCRIPCgdwYXlsb2FkGAIgASgMEhAKCGV2ZW50X2lkGAMgASgJMqUBCgdHYXRld2F5Ek4KB0V4ZWN1dGUSIC5zY3JhYmJsZS5lZGdlLnYxLkV4ZWN1dGVSZXF1ZXN0GiEuc2NyYWJibGUuZWRnZS52MS5FeGVjdXRlUmVzcG9uc2USSgoJU3Vic2NyaWJlEiIuc2NyYWJibGUuZWRnZS52MS5TdWJzY3JpYmVSZXF1ZXN0Ghcuc2NyYWJibGUuZWRnZS52MS5FdmVudDABQidaJXNjcmFiYmxlL2dhdGV3YXkvcHJvdG8vZWRnZS92MTtlZGdldjFiBnByb3RvMw");
|
|
|
|
/**
|
|
* ExecuteRequest is the unary envelope. message_type selects the operation;
|
|
* payload is its FlatBuffers-encoded request body; request_id is an optional
|
|
* client correlation id echoed back.
|
|
*
|
|
* @generated from message scrabble.edge.v1.ExecuteRequest
|
|
*/
|
|
export type ExecuteRequest = Message<"scrabble.edge.v1.ExecuteRequest"> & {
|
|
/**
|
|
* @generated from field: string message_type = 1;
|
|
*/
|
|
messageType: string;
|
|
|
|
/**
|
|
* @generated from field: bytes payload = 2;
|
|
*/
|
|
payload: Uint8Array;
|
|
|
|
/**
|
|
* @generated from field: string request_id = 3;
|
|
*/
|
|
requestId: string;
|
|
};
|
|
|
|
/**
|
|
* Describes the message scrabble.edge.v1.ExecuteRequest.
|
|
* Use `create(ExecuteRequestSchema)` to create a new message.
|
|
*/
|
|
export const ExecuteRequestSchema: GenMessage<ExecuteRequest> = /*@__PURE__*/
|
|
messageDesc(file_edge_v1_edge, 0);
|
|
|
|
/**
|
|
* ExecuteResponse is the unary reply. result_code is "ok" on success or a stable
|
|
* error code; payload is the FlatBuffers-encoded response body (empty on error).
|
|
*
|
|
* @generated from message scrabble.edge.v1.ExecuteResponse
|
|
*/
|
|
export type ExecuteResponse = Message<"scrabble.edge.v1.ExecuteResponse"> & {
|
|
/**
|
|
* @generated from field: string request_id = 1;
|
|
*/
|
|
requestId: string;
|
|
|
|
/**
|
|
* @generated from field: string result_code = 2;
|
|
*/
|
|
resultCode: string;
|
|
|
|
/**
|
|
* @generated from field: bytes payload = 3;
|
|
*/
|
|
payload: Uint8Array;
|
|
};
|
|
|
|
/**
|
|
* Describes the message scrabble.edge.v1.ExecuteResponse.
|
|
* Use `create(ExecuteResponseSchema)` to create a new message.
|
|
*/
|
|
export const ExecuteResponseSchema: GenMessage<ExecuteResponse> = /*@__PURE__*/
|
|
messageDesc(file_edge_v1_edge, 1);
|
|
|
|
/**
|
|
* SubscribeRequest opens the live stream. It is empty: the session is taken from
|
|
* the Authorization header.
|
|
*
|
|
* @generated from message scrabble.edge.v1.SubscribeRequest
|
|
*/
|
|
export type SubscribeRequest = Message<"scrabble.edge.v1.SubscribeRequest"> & {
|
|
};
|
|
|
|
/**
|
|
* Describes the message scrabble.edge.v1.SubscribeRequest.
|
|
* Use `create(SubscribeRequestSchema)` to create a new message.
|
|
*/
|
|
export const SubscribeRequestSchema: GenMessage<SubscribeRequest> = /*@__PURE__*/
|
|
messageDesc(file_edge_v1_edge, 2);
|
|
|
|
/**
|
|
* Event is one live event. kind is the notification catalog kind; payload is its
|
|
* FlatBuffers-encoded body; event_id is a correlation id.
|
|
*
|
|
* @generated from message scrabble.edge.v1.Event
|
|
*/
|
|
export type Event = Message<"scrabble.edge.v1.Event"> & {
|
|
/**
|
|
* @generated from field: string kind = 1;
|
|
*/
|
|
kind: string;
|
|
|
|
/**
|
|
* @generated from field: bytes payload = 2;
|
|
*/
|
|
payload: Uint8Array;
|
|
|
|
/**
|
|
* @generated from field: string event_id = 3;
|
|
*/
|
|
eventId: string;
|
|
};
|
|
|
|
/**
|
|
* Describes the message scrabble.edge.v1.Event.
|
|
* Use `create(EventSchema)` to create a new message.
|
|
*/
|
|
export const EventSchema: GenMessage<Event> = /*@__PURE__*/
|
|
messageDesc(file_edge_v1_edge, 3);
|
|
|
|
/**
|
|
* Gateway is the public edge service.
|
|
*
|
|
* @generated from service scrabble.edge.v1.Gateway
|
|
*/
|
|
export const Gateway: GenService<{
|
|
/**
|
|
* Execute runs one unary operation identified by message_type. Auth operations
|
|
* (auth.*) are unauthenticated and return a minted session; all others require
|
|
* a valid session token in the Authorization header.
|
|
*
|
|
* @generated from rpc scrabble.edge.v1.Gateway.Execute
|
|
*/
|
|
execute: {
|
|
methodKind: "unary";
|
|
input: typeof ExecuteRequestSchema;
|
|
output: typeof ExecuteResponseSchema;
|
|
},
|
|
/**
|
|
* Subscribe opens the in-app live-event stream for the authenticated session.
|
|
*
|
|
* @generated from rpc scrabble.edge.v1.Gateway.Subscribe
|
|
*/
|
|
subscribe: {
|
|
methodKind: "server_streaming";
|
|
input: typeof SubscribeRequestSchema;
|
|
output: typeof EventSchema;
|
|
},
|
|
}> = /*@__PURE__*/
|
|
serviceDesc(file_edge_v1_edge, 0);
|
|
|