生成绑定JSDoc去掉Rust语法
- auth_error:服务端原文缺失说明从 None 改成 TS 读得懂的 null(PasswordLoginRejected / SendCodeRejected / PhoneCodeLoginRejected) - auth_error:AuthResponseInvalid.server_message 的说明从 AuthResponseInvalidReason::ServerRejected 改成线上字面量 serverRejected - ts-rs 重新生成 4 份载荷绑定
This commit is contained in:
@@ -131,7 +131,7 @@ pub(crate) struct ServerAddressRejected {
|
||||
#[serde(rename_all = "camelCase")]
|
||||
#[ts(export, export_to = concat!(env!("CARGO_MANIFEST_DIR"), "/../src/services/generated/"))]
|
||||
pub(crate) struct PasswordLoginRejected {
|
||||
/// 服务端原文可能缺失:缺失是 `None`,Rust 不编造兜底文案。
|
||||
/// 服务端原文可能缺失:缺失是 `null`,Rust 不编造兜底文案。
|
||||
pub(crate) server_message: Option<String>,
|
||||
}
|
||||
|
||||
@@ -140,7 +140,7 @@ pub(crate) struct PasswordLoginRejected {
|
||||
#[serde(rename_all = "camelCase")]
|
||||
#[ts(export, export_to = concat!(env!("CARGO_MANIFEST_DIR"), "/../src/services/generated/"))]
|
||||
pub(crate) struct SendCodeRejected {
|
||||
/// 服务端原文可能缺失:缺失是 `None`,Rust 不编造兜底文案。
|
||||
/// 服务端原文可能缺失:缺失是 `null`,Rust 不编造兜底文案。
|
||||
pub(crate) server_message: Option<String>,
|
||||
}
|
||||
|
||||
@@ -149,7 +149,7 @@ pub(crate) struct SendCodeRejected {
|
||||
#[serde(rename_all = "camelCase")]
|
||||
#[ts(export, export_to = concat!(env!("CARGO_MANIFEST_DIR"), "/../src/services/generated/"))]
|
||||
pub(crate) struct PhoneCodeLoginRejected {
|
||||
/// 服务端原文可能缺失:缺失是 `None`,Rust 不编造兜底文案。
|
||||
/// 服务端原文可能缺失:缺失是 `null`,Rust 不编造兜底文案。
|
||||
pub(crate) server_message: Option<String>,
|
||||
}
|
||||
|
||||
@@ -184,7 +184,7 @@ pub(crate) struct UnexpectedRejection {
|
||||
#[ts(export, export_to = concat!(env!("CARGO_MANIFEST_DIR"), "/../src/services/generated/"))]
|
||||
pub(crate) struct AuthResponseInvalid {
|
||||
pub(crate) reason: AuthResponseInvalidReason,
|
||||
/// 只有 [`AuthResponseInvalidReason::ServerRejected`] 可能带服务端原文;其余是 `None`。
|
||||
/// 只有 `serverRejected` 可能带服务端原文;其余是 `null`。
|
||||
pub(crate) server_message: Option<String>,
|
||||
}
|
||||
|
||||
|
||||
@@ -7,7 +7,7 @@ import type { AuthResponseInvalidReason } from './AuthResponseInvalidReason';
|
||||
export type AuthResponseInvalid = {
|
||||
reason: AuthResponseInvalidReason;
|
||||
/**
|
||||
* 只有 [`AuthResponseInvalidReason::ServerRejected`] 可能带服务端原文;其余是 `None`。
|
||||
* 只有 `serverRejected` 可能带服务端原文;其余是 `null`。
|
||||
*/
|
||||
serverMessage: string | null;
|
||||
};
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
*/
|
||||
export type PasswordLoginRejected = {
|
||||
/**
|
||||
* 服务端原文可能缺失:缺失是 `None`,Rust 不编造兜底文案。
|
||||
* 服务端原文可能缺失:缺失是 `null`,Rust 不编造兜底文案。
|
||||
*/
|
||||
serverMessage: string | null;
|
||||
};
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
*/
|
||||
export type PhoneCodeLoginRejected = {
|
||||
/**
|
||||
* 服务端原文可能缺失:缺失是 `None`,Rust 不编造兜底文案。
|
||||
* 服务端原文可能缺失:缺失是 `null`,Rust 不编造兜底文案。
|
||||
*/
|
||||
serverMessage: string | null;
|
||||
};
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
*/
|
||||
export type SendCodeRejected = {
|
||||
/**
|
||||
* 服务端原文可能缺失:缺失是 `None`,Rust 不编造兜底文案。
|
||||
* 服务端原文可能缺失:缺失是 `null`,Rust 不编造兜底文案。
|
||||
*/
|
||||
serverMessage: string | null;
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user