feat(data): add paywall payment APIs

This commit is contained in:
2026-06-18 12:53:06 +08:00
parent 567d3f9184
commit 35c30ac31e
38 changed files with 840 additions and 10 deletions
+20
View File
@@ -16,6 +16,8 @@ import {
SendMessageRequest,
SttData,
SyncMessage,
UnlockPrivateRequest,
UnlockPrivateResponse,
} from "@/data/dto/chat";
export class ChatApi {
@@ -81,6 +83,24 @@ export class ChatApi {
unwrap(env) as Record<string, unknown>
);
}
/**
* 解锁私密消息
*/
async unlockPrivateMessage(
body: UnlockPrivateRequest,
): Promise<UnlockPrivateResponse> {
const env = await httpClient<ApiEnvelope<unknown>>(
ApiPath.chatUnlockPrivate,
{
method: "POST",
body: body.toJson(),
},
);
return UnlockPrivateResponse.fromJson(
unwrap(env) as Record<string, unknown>,
);
}
}
/**