mirror of
https://github.com/mauriceboe/TREK.git
synced 2026-11-28 07:30:04 +00:00
feat(assistant): the book design card shows each page before and after
The proposal lists its pages in pairs, lets the user leave pages out before applying, and shows what the apply skipped on the receipt.
This commit is contained in:
@@ -0,0 +1,21 @@
|
||||
import type { BookDesignSelectionRequest, BookDesignSelectionResponse } from '@trek/shared';
|
||||
|
||||
import apiClient from './client';
|
||||
|
||||
/**
|
||||
* The assistant's whole-book design drafts as the Studio chat's proposal card
|
||||
* narrows them: the pages of a draft its apply writes. The draft itself is
|
||||
* read through `assistantApi.bookDesign`, which the Studio also draws a page
|
||||
* of a draft from. Online only, like the assistant: a draft lives on the
|
||||
* server for a few hours and nowhere else.
|
||||
*/
|
||||
export const bookDesignApi = {
|
||||
selection: (
|
||||
journeyId: number,
|
||||
designId: string,
|
||||
body: BookDesignSelectionRequest
|
||||
): Promise<BookDesignSelectionResponse> =>
|
||||
apiClient
|
||||
.put(`/journeys/${journeyId}/book-designs/${encodeURIComponent(designId)}/selection`, body)
|
||||
.then((r) => r.data),
|
||||
};
|
||||
Reference in New Issue
Block a user