feat(lanes): show proof gallery panel in the Workspace page (C)
This commit is contained in:
@@ -2032,6 +2032,37 @@ export const api = {
|
||||
`/lanes/${id}/features/${encodeURIComponent(slug)}`
|
||||
),
|
||||
},
|
||||
/**
|
||||
* GET /api/lanes/:id/proof — list all proof gallery entries for a lane.
|
||||
* @param id The lane id.
|
||||
* @returns `{ features }` — all {@link ProofFeature} records.
|
||||
*/
|
||||
proof: {
|
||||
list: (id: number) =>
|
||||
request<{ features: import("./types").ProofFeature[] }>(`/lanes/${id}/proof`),
|
||||
/**
|
||||
* URL for a proof image, ready to use in an <img src>.
|
||||
* @param id The lane id.
|
||||
* @param slug The feature slug.
|
||||
* @param group The screenshot group name.
|
||||
* @param file The image filename.
|
||||
* @returns A URL string pointing to the image.
|
||||
*/
|
||||
imageUrl: (id: number, slug: string, group: string, file: string): string =>
|
||||
`/api/lanes/${id}/proof/${encodeURIComponent(slug)}/${encodeURIComponent(group)}/${encodeURIComponent(file)}`,
|
||||
/**
|
||||
* DELETE /api/lanes/:id/proof/:slug — delete proof entries for a feature.
|
||||
* @param id The lane id.
|
||||
* @param slug The feature slug.
|
||||
* @param body Optional filters: { group?, images? }.
|
||||
* @returns `{ deleted }` — count of deleted images.
|
||||
*/
|
||||
delete: (id: number, slug: string, body: { group?: string; images?: string[] }) =>
|
||||
request<{ deleted: number }>(`/lanes/${id}/proof/${encodeURIComponent(slug)}`, {
|
||||
method: "DELETE",
|
||||
body: JSON.stringify(body),
|
||||
}),
|
||||
},
|
||||
},
|
||||
// ──────────────────────────────── Locks API ────────────────────────────────
|
||||
/** Named locks across all lanes: used for serialization and gating.
|
||||
|
||||
Reference in New Issue
Block a user