feat: add search space snapshots frontend API

This commit is contained in:
CREDO23 2026-02-02 15:43:07 +02:00
parent ab343b544a
commit 47b7befc55
2 changed files with 50 additions and 0 deletions

View file

@ -44,6 +44,30 @@ export const deleteSnapshotRequest = z.object({
snapshot_id: z.number(),
});
/**
* Search space snapshot info (includes thread context)
*/
export const searchSpaceSnapshotInfo = z.object({
id: z.number(),
share_token: z.string(),
public_url: z.string(),
created_at: z.string(),
message_count: z.number(),
thread_id: z.number(),
thread_title: z.string(),
});
/**
* List snapshots for search space
*/
export const listSearchSpaceSnapshotsRequest = z.object({
search_space_id: z.number(),
});
export const listSearchSpaceSnapshotsResponse = z.object({
snapshots: z.array(searchSpaceSnapshotInfo),
});
// Type exports
export type SnapshotInfo = z.infer<typeof snapshotInfo>;
export type CreateSnapshotRequest = z.infer<typeof createSnapshotRequest>;
@ -51,3 +75,6 @@ export type CreateSnapshotResponse = z.infer<typeof createSnapshotResponse>;
export type ListSnapshotsRequest = z.infer<typeof listSnapshotsRequest>;
export type ListSnapshotsResponse = z.infer<typeof listSnapshotsResponse>;
export type DeleteSnapshotRequest = z.infer<typeof deleteSnapshotRequest>;
export type SearchSpaceSnapshotInfo = z.infer<typeof searchSpaceSnapshotInfo>;
export type ListSearchSpaceSnapshotsRequest = z.infer<typeof listSearchSpaceSnapshotsRequest>;
export type ListSearchSpaceSnapshotsResponse = z.infer<typeof listSearchSpaceSnapshotsResponse>;