mirror of
https://github.com/MODSetter/SurfSense.git
synced 2026-06-26 21:39:43 +02:00
Merge pull request #1532 from CREDO23/imporve-artifacts-accessibility
[Feat] Artifacts sidebar for chat deliverables
This commit is contained in:
commit
efa9efc80b
40 changed files with 1306 additions and 43 deletions
23
surfsense_web/lib/apis/image-generations-api.service.ts
Normal file
23
surfsense_web/lib/apis/image-generations-api.service.ts
Normal file
|
|
@ -0,0 +1,23 @@
|
|||
import {
|
||||
imageGenerationDetail,
|
||||
imageGenerationList,
|
||||
} from "@/contracts/types/image-generations.types";
|
||||
import { baseApiService } from "./base-api.service";
|
||||
|
||||
const BASE = "/api/v1/image-generations";
|
||||
|
||||
class ImageGenerationsApiService {
|
||||
list = async (searchSpaceId: number, limit = 100) => {
|
||||
const qs = new URLSearchParams({
|
||||
search_space_id: String(searchSpaceId),
|
||||
limit: String(limit),
|
||||
}).toString();
|
||||
return baseApiService.get(`${BASE}?${qs}`, imageGenerationList);
|
||||
};
|
||||
|
||||
getDetail = async (imageGenId: number) => {
|
||||
return baseApiService.get(`${BASE}/${imageGenId}`, imageGenerationDetail);
|
||||
};
|
||||
}
|
||||
|
||||
export const imageGenerationsApiService = new ImageGenerationsApiService();
|
||||
|
|
@ -3,6 +3,7 @@ import {
|
|||
languageOptions,
|
||||
type PodcastSpec,
|
||||
podcastDetail,
|
||||
podcastSummaryList,
|
||||
updateSpecRequest,
|
||||
voiceOption,
|
||||
} from "@/contracts/types/podcast.types";
|
||||
|
|
@ -14,6 +15,14 @@ const BASE = "/api/v1/podcasts";
|
|||
const voiceOptionList = z.array(voiceOption);
|
||||
|
||||
class PodcastsApiService {
|
||||
list = async (searchSpaceId: number, limit = 200) => {
|
||||
const qs = new URLSearchParams({
|
||||
search_space_id: String(searchSpaceId),
|
||||
limit: String(limit),
|
||||
}).toString();
|
||||
return baseApiService.get(`${BASE}?${qs}`, podcastSummaryList);
|
||||
};
|
||||
|
||||
// Full state including the deserialized brief and transcript; thin lifecycle
|
||||
// fields (status, spec, spec_version) also arrive live via Zero.
|
||||
getDetail = async (podcastId: number) => {
|
||||
|
|
|
|||
16
surfsense_web/lib/apis/reports-api.service.ts
Normal file
16
surfsense_web/lib/apis/reports-api.service.ts
Normal file
|
|
@ -0,0 +1,16 @@
|
|||
import { reportList } from "@/contracts/types/reports.types";
|
||||
import { baseApiService } from "./base-api.service";
|
||||
|
||||
const BASE = "/api/v1/reports";
|
||||
|
||||
class ReportsApiService {
|
||||
list = async (searchSpaceId: number, limit = 200) => {
|
||||
const qs = new URLSearchParams({
|
||||
search_space_id: String(searchSpaceId),
|
||||
limit: String(limit),
|
||||
}).toString();
|
||||
return baseApiService.get(`${BASE}?${qs}`, reportList);
|
||||
};
|
||||
}
|
||||
|
||||
export const reportsApiService = new ReportsApiService();
|
||||
16
surfsense_web/lib/apis/video-presentations-api.service.ts
Normal file
16
surfsense_web/lib/apis/video-presentations-api.service.ts
Normal file
|
|
@ -0,0 +1,16 @@
|
|||
import { videoPresentationList } from "@/contracts/types/video-presentations.types";
|
||||
import { baseApiService } from "./base-api.service";
|
||||
|
||||
const BASE = "/api/v1/video-presentations";
|
||||
|
||||
class VideoPresentationsApiService {
|
||||
list = async (searchSpaceId: number, limit = 200) => {
|
||||
const qs = new URLSearchParams({
|
||||
search_space_id: String(searchSpaceId),
|
||||
limit: String(limit),
|
||||
}).toString();
|
||||
return baseApiService.get(`${BASE}?${qs}`, videoPresentationList);
|
||||
};
|
||||
}
|
||||
|
||||
export const videoPresentationsApiService = new VideoPresentationsApiService();
|
||||
Loading…
Add table
Add a link
Reference in a new issue