feat(fulfillment): 实时刷新斗鱼账号并支持租约时长设置
This commit is contained in:
@@ -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;
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user