feat: add brand library management features
- Introduced BrandLibrarySummary type to encapsulate brand library limits and usage. - Updated Brand interface to include keyword_count and question_count fields. - Implemented brand library limits in the backend, including max brands, keywords, and questions per keyword. - Added API endpoint to retrieve brand library summary. - Enhanced BrandsView.vue to display brand library usage and limits. - Implemented computed properties to manage brand, keyword, and question limits in the UI. - Updated mutation handlers to invalidate relevant queries upon creating/updating brands, keywords, and questions. - Added visual indicators for brand, keyword, and question limits in the UI. - Enhanced error handling for exceeding brand and keyword limits during creation.
This commit is contained in:
@@ -9,6 +9,7 @@ import type {
|
||||
ArticleVersion,
|
||||
AuthTokens,
|
||||
Brand,
|
||||
BrandLibrarySummary,
|
||||
BrandRequest,
|
||||
Competitor,
|
||||
CompetitorRequest,
|
||||
@@ -540,6 +541,9 @@ export const brandsApi = {
|
||||
list() {
|
||||
return apiClient.get<Brand[]>("/api/tenant/brands");
|
||||
},
|
||||
getLibrarySummary() {
|
||||
return apiClient.get<BrandLibrarySummary>("/api/tenant/brands/library-summary");
|
||||
},
|
||||
create(payload: BrandRequest) {
|
||||
return apiClient.post<Brand, BrandRequest>("/api/tenant/brands", payload);
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user