Feat: integrate deposit (#363)

* create deposit payment

* display recent deposits & improve UI

* support Mixin pay
This commit is contained in:
an-lee
2024-02-28 15:29:07 +08:00
committed by GitHub
parent 350dcf1897
commit ded7371be6
8 changed files with 257 additions and 21 deletions

View File

@@ -297,4 +297,28 @@ export class Client {
unstarStory(storyId: string): Promise<{ starred: boolean }> {
return this.api.delete(`/api/mine/stories/${storyId}`);
}
createPayment(params: {
amount: number;
processor: string;
paymentType: string;
}): Promise<PaymentType> {
return this.api.post("/api/payments", decamelizeKeys(params));
}
payments(params?: {
paymentType?: string;
page?: number;
items?: number;
}): Promise<
{
payments: PaymentType[];
} & PagyResponseType
> {
return this.api.get("/api/payments", { params: decamelizeKeys(params) });
}
payment(id: string): Promise<PaymentType> {
return this.api.get(`/api/payments/${id}`);
}
}