feat(payment): add chat support discounts and gratitude
Docker Image / Build and Push Docker Image (push) Successful in 2m14s
Docker Image / Build and Push Docker Image (push) Successful in 2m14s
(cherry picked from commit ef9b79bc83)
This commit is contained in:
@@ -26,9 +26,19 @@ import { ApiEnvelope, unwrap } from "./response_helper";
|
||||
|
||||
export class PaymentApi {
|
||||
/** 获取 VIP 与 Top-up 套餐列表。 */
|
||||
async getPlans(commercialOfferId?: string): Promise<PaymentPlansResponse> {
|
||||
async getPlans(
|
||||
commercialOfferId?: string,
|
||||
supportCharacterId?: string,
|
||||
): Promise<PaymentPlansResponse> {
|
||||
const env = await httpClient<ApiEnvelope<unknown>>(ApiPath.paymentPlans, {
|
||||
...(commercialOfferId ? { query: { commercialOfferId } } : {}),
|
||||
...(commercialOfferId || supportCharacterId
|
||||
? {
|
||||
query: {
|
||||
...(commercialOfferId ? { commercialOfferId } : {}),
|
||||
...(supportCharacterId ? { supportCharacterId } : {}),
|
||||
},
|
||||
}
|
||||
: {}),
|
||||
});
|
||||
return PaymentPlansResponseSchema.parse(
|
||||
unwrap(env) as Record<string, unknown>,
|
||||
|
||||
Reference in New Issue
Block a user