DeepLX/translate/types.go
Vincent Young d44660c9d0
feat(translate): sync oneshot request with DeepL iOS client
Replace the Chrome extension fingerprint with the iOS app profile from
DeepL 26.42 (build 5443737): iOS TLS, app_information, usage_type,
x-app-* headers, and FR-CA/DE-CH language codes.
2026-08-04 20:20:14 +08:00

29 lines
992 B
Go

/*
* @Author: Vincent Young
* @Date: 2024-09-16 11:59:24
* @LastEditors: Vincent Yang
* @LastEditTime: 2026-08-04 00:00:00
* @FilePath: /DLX/translate/types.go
* @Telegram: https://t.me/missuo
* @GitHub: https://github.com/missuo
*
* Copyright © 2024 by Vincent, All Rights Reserved.
*/
package translate
// DLXTranslationResult is the public response shape consumed by the HTTP
// handlers in the service package. The structure predates the migration to
// the iOS oneshot endpoint; Alternatives is now always empty because oneshot
// does not return alternative translations, and ID is synthesized from time.
type DLXTranslationResult struct {
Code int `json:"code"`
ID int64 `json:"id"`
Message string `json:"message,omitempty"`
Data string `json:"data"`
Alternatives []string `json:"alternatives"`
SourceLang string `json:"source_lang"`
TargetLang string `json:"target_lang"`
Method string `json:"method"`
}