Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

proto

ConnectRPC / gRPC protobuf definitions for the NitroTranslate human-translation API.

The schema under proto/nitrotranslate/v1/ mirrors Nitro's production REST API 1:1:

  • Base URL: https://api.nitrotranslate.com/v1
  • Auth: HTTP Basic — API key as the username, blank password.

Each RPC carries a google.api.http annotation (with response_body where the REST endpoint returns a naked array/object) so the services can be served over gRPC, gRPC-Web, ConnectRPC, and transcoded REST simultaneously.

Files

The API is split by domain; all files share the nitrotranslate.v1 package.

File Service RPCs
common.proto shared Resource, Context
account.proto AccountService GetAccount
order.proto OrderService ListOrders, GetOrder, DeleteOrder
translation.proto TranslationService Calculate, Translate
rate.proto RateService ListRates

Service methods

RPC REST route Notes
GetAccount GET /v1/account Balance and reserved funds
ListOrders GET /v1/orders sort, page, per_page query params
GetOrder GET /v1/orders/{id} Full order detail
DeleteOrder DELETE /v1/orders/{id} QUEUE status only
Calculate POST /v1/calculate Cost estimate per target language
Translate POST /v1/translate Submit content, create orders
ListRates GET /v1/rates Current per-pair pricing

Conventions

  • Enums as strings. Enum-like fields (status, tone, category, comment role, language codes) are modeled as string constrained with protovalidate string.in rather than proto enums, so the JSON wire format matches production exactly ("QUEUE", "GUESS", "GAMES", …) instead of the prefixed names proto enum JSON would emit.
  • Validation. Request constraints (required fields, language sets, pagination bounds) are expressed with buf.validate.field options.

Working with the schema

buf dep update   # fetch googleapis + protovalidate
buf build        # compile
buf lint         # lint

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages