Add Website settings for special-products source.
Businesses can choose product vs store item sourcing, with store as the default when the store module is enabled, and rename the FA special-products section. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
co-authored by
Cursor
parent
a7950f1f13
commit
193c63bfd2
@@ -90,11 +90,18 @@ export interface ModulesSettings {
|
||||
enabled: string[]
|
||||
}
|
||||
|
||||
export type SpecialProductsSource = 'product' | 'store_item'
|
||||
|
||||
export interface WebsiteSettings {
|
||||
specialProductsSource: SpecialProductsSource
|
||||
}
|
||||
|
||||
export interface BusinessSettings {
|
||||
branding: BrandingSettings
|
||||
dashboard: DashboardSettings
|
||||
store: StoreSettings
|
||||
modules?: ModulesSettings
|
||||
website?: WebsiteSettings
|
||||
}
|
||||
|
||||
export interface SettingsResponse {
|
||||
@@ -158,3 +165,11 @@ export async function updateStoreSettings(store: Partial<StoreSettings>) {
|
||||
body: { store },
|
||||
})
|
||||
}
|
||||
|
||||
export async function updateWebsiteSettings(website: Partial<WebsiteSettings>) {
|
||||
return apiRequest<SettingsResponse>(settingsPath(), {
|
||||
method: 'PATCH',
|
||||
auth: true,
|
||||
body: { website },
|
||||
})
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user