// @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("ChJlZGdlL3YxL2VkZ2UucHJvdG8SEHNjcmFiYmxlLmVkZ2UudjEiSwoORXhlY3V0ZVJlcXVlc3QSFAoMbWVzc2FnZV90eXBlGAEgASgJEg8KB3BheWxvYWQYAiABKAwSEgoKcmVxdWVzdF9pZBgDIAEoCSJcCg9FeGVjdXRlUmVzcG9uc2USEgoKcmVxdWVzdF9pZBgBIAEoCRITCgtyZXN1bHRfY29kZRgCIAEoCRIPCgdwYXlsb2FkGAMgASgMEg8KB21lc3NhZ2UYBCABKAkiEgoQU3Vic2NyaWJlUmVxdWVzdCI4CgVFdmVudBIMCgRraW5kGAEgASgJEg8KB3BheWxvYWQYAiABKAwSEAoIZXZlbnRfaWQYAyABKAkypQEKB0dhdGV3YXkSTgoHRXhlY3V0ZRIgLnNjcmFiYmxlLmVkZ2UudjEuRXhlY3V0ZVJlcXVlc3QaIS5zY3JhYmJsZS5lZGdlLnYxLkV4ZWN1dGVSZXNwb25zZRJKCglTdWJzY3JpYmUSIi5zY3JhYmJsZS5lZGdlLnYxLlN1YnNjcmliZVJlcXVlc3QaFy5zY3JhYmJsZS5lZGdlLnYxLkV2ZW50MAFCJ1olc2NyYWJibGUvZ2F0ZXdheS9wcm90by9lZGdlL3YxO2VkZ2V2MWIGcHJvdG8z");

/**
 * 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;

  /**
   * message is an optional, already-localized human-readable reason a domain outcome may carry for
   * the user (e.g. a payment-unavailable explanation set by an operator). Additive and
   * frozen-contract-safe; empty for the common case where result_code alone suffices.
   *
   * @generated from field: string message = 4;
   */
  message: string;
};

/**
 * 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);

