feat(fulfillment): 实时刷新斗鱼账号并支持租约时长设置

This commit is contained in:
yml
2026-11-18 10:59:20 +08:00
parent 0220ef995f
commit 9958e4ab7d
21 changed files with 1546 additions and 120 deletions
@@ -3,9 +3,19 @@ import type {
PlatformFulfillmentDetail,
PlatformFulfillmentListResponse,
PlatformFulfillmentMapping,
PlatformFulfillmentSettings,
} from './types';
export const platformFulfillmentApi = {
getSettings: () =>
api.get<PlatformFulfillmentSettings, PlatformFulfillmentSettings>(
'/platform-fulfillment/settings',
),
updateSettings: (leaseDurationMinutes: number | null) =>
api.put<PlatformFulfillmentSettings, PlatformFulfillmentSettings>(
'/platform-fulfillment/settings',
{ lease_duration_minutes: leaseDurationMinutes },
),
listTasks: (params: {
status?: string;
keyword?: string;
+6 -1
View File
@@ -2118,6 +2118,11 @@ export interface PlatformFulfillmentAccount {
roleChangeAvailableAt: string | null;
}
export interface PlatformFulfillmentSettings {
leaseDurationMinutes: number | null;
updatedAt: string | null;
}
export interface PlatformFulfillmentBindTask {
id: number;
taskType: string;
@@ -2162,7 +2167,7 @@ export interface PlatformFulfillmentTask {
createdAt: string;
updatedAt: string;
account: PlatformFulfillmentAccount | null;
lease: { id: number; status: string; expiresAt: string } | null;
lease: { id: number; status: string; expiresAt: string | null } | null;
bindTask: PlatformFulfillmentBindTask | null;
}