Files
scrabble-game/ui/src/gen/edge/v1/edge_pb.ts
T
Ilia Denisov 1507ceb793
CI / changes (pull_request) Successful in 3s
CI / unit (pull_request) Successful in 11s
CI / integration (pull_request) Successful in 21s
CI / ui (pull_request) Successful in 1m15s
CI / conformance (pull_request) Successful in 10s
CI / gate (pull_request) Successful in 0s
CI / deploy (pull_request) Successful in 2m0s
feat(payments): live payment-availability kill switch + per-account override
Let an operator disable purchases live from the admin — a whole rail/channel or
one account — and show the user a localized reason on their next attempt, so a
provider outage or a misconfig is explained instead of a silent dead button.

- rail kill switch (payments.rail_status, per rail direct:web / direct:android /
  vk / telegram): enabled + a per-language message, edited on the catalog page.
  Fail-open — a rail with no row stays enabled, so payments are never accidentally
  killed. The intake gate (CanPurchase in handleWalletOrder, before the order)
  returns payment_unavailable + the localized message, orthogonal to the security
  gates.
- per-account override (payments.account_payment_override, a row only for
  non-default): allow / deny / default, edited on the user card. "allow" bypasses
  ONLY the ops rail switch, never the security gates (trusted platform, the email
  anchor, the VK-iOS freeze, the min client version).
- wire: an additive ExecuteResponse.message envelope field (frozen-contract-safe);
  the gateway forwards a backend domain-error message; the client shows it on a
  payment_unavailable buy attempt.
- admin: rail toggles on the catalog page, the override control on the user card.
- tests: the pure gate (unit, TDD), the store + gate + override end-to-end
  (integration, migration 00016), the client (svelte-check / vitest).
- docs: PAYMENTS (+ru), the decisions log (D45/D46). Fiscalization stays
  cabinet-side (owner decision) — no itemized-receipt code.

Contour-safe: additive migration (two new tables, no wipe), the wire add is
additive, and fail-open so nothing is disabled until an operator acts.
2026-07-14 16:29:41 +02:00

169 lines
5.7 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("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);