feat(web-water): 水印设置页面开发
This commit is contained in:
@@ -39,11 +39,7 @@ export const storesApi = {
|
||||
* 编辑:If-Match 乐观锁。未传 api_key 返回更新后的店铺;
|
||||
* 传入新 api_key 返回 202 与验证 operation(响应仍是 { store, operation })。
|
||||
*/
|
||||
update: (
|
||||
storeId: string,
|
||||
payload: UpdateStoreRequest,
|
||||
options: UpdateStoreOptions
|
||||
) =>
|
||||
update: (storeId: string, payload: UpdateStoreRequest, options: UpdateStoreOptions) =>
|
||||
api.patch<Store | StoreOperationResponse>(`/stores/${storeId}`, payload, {
|
||||
headers: {
|
||||
'If-Match': `"${options.revision}"`,
|
||||
@@ -71,4 +67,17 @@ export const storesApi = {
|
||||
api.delete<void>(`/stores/${storeId}`, {
|
||||
headers: { 'Idempotency-Key': crypto.randomUUID() },
|
||||
}),
|
||||
|
||||
/**
|
||||
* 绑定水印模板,契约见 docs/api/stores-and-platforms.md(PUT /api/stores/{id}/watermark-binding)。
|
||||
* 传 null 表示「暂不绑定」;模板必须是当前工作空间的活动模板,返回店铺水印摘要。
|
||||
*/
|
||||
bindWatermark: (storeId: string, templateId: string | null) =>
|
||||
api.put<Store>(
|
||||
`/stores/${storeId}/watermark-binding`,
|
||||
{ template_id: templateId },
|
||||
{
|
||||
headers: { 'Idempotency-Key': crypto.randomUUID() },
|
||||
}
|
||||
),
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user