feat: restore agent sessions from creation drafts
This commit is contained in:
29
src/services/big-fish-works/bigFishWorksClient.ts
Normal file
29
src/services/big-fish-works/bigFishWorksClient.ts
Normal file
@@ -0,0 +1,29 @@
|
||||
import type { BigFishWorksResponse } from '../../../packages/shared/src/contracts/bigFishWorkSummary';
|
||||
import { type ApiRetryOptions, requestJson } from '../apiClient';
|
||||
|
||||
const BIG_FISH_WORKS_API_BASE = '/api/runtime/big-fish/works';
|
||||
const BIG_FISH_WORKS_READ_RETRY: ApiRetryOptions = {
|
||||
maxRetries: 1,
|
||||
baseDelayMs: 120,
|
||||
maxDelayMs: 360,
|
||||
};
|
||||
|
||||
/**
|
||||
* 读取当前用户的大鱼吃小鱼创作作品列表。
|
||||
*/
|
||||
export async function listBigFishWorks() {
|
||||
return requestJson<BigFishWorksResponse>(
|
||||
BIG_FISH_WORKS_API_BASE,
|
||||
{
|
||||
method: 'GET',
|
||||
},
|
||||
'读取大鱼吃小鱼作品列表失败',
|
||||
{
|
||||
retry: BIG_FISH_WORKS_READ_RETRY,
|
||||
},
|
||||
);
|
||||
}
|
||||
|
||||
export const bigFishWorksClient = {
|
||||
list: listBigFishWorks,
|
||||
};
|
||||
1
src/services/big-fish-works/index.ts
Normal file
1
src/services/big-fish-works/index.ts
Normal file
@@ -0,0 +1 @@
|
||||
export { bigFishWorksClient, listBigFishWorks } from './bigFishWorksClient';
|
||||
Reference in New Issue
Block a user