feat(plugin): search & category list

This commit is contained in:
lijunwen.gigoo
2025-10-10 17:45:52 +08:00
parent a363dbef2b
commit eb7028391b
6 changed files with 87 additions and 73 deletions

View File

@ -1,19 +1,3 @@
/*
* Copyright 2025 coze-dev Authors
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
// Code generated by thriftgo (0.4.2). DO NOT EDIT.
package product_public_api
@ -1477,9 +1461,9 @@ func (p *SearchProductRequest) String() string {
}
type SearchProductResponse struct {
Code int32 `thrift:"Code,1,required" form:"Code,required" json:"Code,required" query:"Code,required"`
Message string `thrift:"Message,2,required" form:"Message,required" json:"Message,required" query:"Message,required"`
Data *SearchProductResponseData `thrift:"Data,3,optional" form:"Data" json:"Data,omitempty" query:"Data"`
Code int32 `thrift:"Code,1,required" form:"code,required" json:"code,required"`
Message string `thrift:"Message,2,required" form:"message,required" json:"message,required"`
Data *SearchProductResponseData `thrift:"Data,3,optional" form:"data" json:"data,omitempty"`
BaseResp *base.BaseResp `thrift:"BaseResp,255,optional" form:"BaseResp" json:"BaseResp,omitempty" query:"BaseResp"`
}
@ -1782,11 +1766,11 @@ func (p *SearchProductResponse) String() string {
}
type SearchProductResponseData struct {
Products []*ProductInfo `thrift:"Products,1,optional" form:"Products" json:"Products,omitempty" query:"Products"`
Total *int32 `thrift:"Total,2,optional" form:"Total" json:"Total,omitempty" query:"Total"`
HasMore *bool `thrift:"HasMore,3,optional" form:"HasMore" json:"HasMore,omitempty" query:"HasMore"`
Products []*ProductInfo `thrift:"Products,1,optional" form:"products" json:"products,omitempty"`
Total *int32 `thrift:"Total,2,optional" form:"total" json:"total,omitempty"`
HasMore *bool `thrift:"HasMore,3,optional" form:"has_more" json:"has_more,omitempty"`
// Entity count
EntityTotal map[product_common.ProductEntityType]int32 `thrift:"EntityTotal,4,optional" form:"EntityTotal" json:"EntityTotal,omitempty" query:"EntityTotal"`
EntityTotal map[product_common.ProductEntityType]int32 `thrift:"EntityTotal,4,optional" form:"entity_total" json:"entity_total,omitempty"`
}
func NewSearchProductResponseData() *SearchProductResponseData {
@ -2150,9 +2134,9 @@ func (p *SearchProductResponseData) String() string {
}
type SearchSuggestResponse struct {
Code int32 `thrift:"Code,1,required" form:"Code,required" json:"Code,required" query:"Code,required"`
Message string `thrift:"Message,2,required" form:"Message,required" json:"Message,required" query:"Message,required"`
Data *SearchSuggestResponseData `thrift:"Data,3,optional" form:"Data" json:"Data,omitempty" query:"Data"`
Code int32 `thrift:"Code,1,required" form:"code,required" json:"code,required"`
Message string `thrift:"Message,2,required" form:"message,required" json:"message,required"`
Data *SearchSuggestResponseData `thrift:"Data,3,optional" form:"data" json:"data,omitempty"`
BaseResp *base.BaseResp `thrift:"BaseResp,255,optional" form:"BaseResp" json:"BaseResp,omitempty" query:"BaseResp"`
}
@ -2456,9 +2440,9 @@ func (p *SearchSuggestResponse) String() string {
type SearchSuggestResponseData struct {
// Deprecated
Suggestions []*ProductMetaInfo `thrift:"Suggestions,1,optional" form:"Suggestions" json:"Suggestions,omitempty" query:"Suggestions"`
HasMore *bool `thrift:"HasMore,2,optional" form:"HasMore" json:"HasMore,omitempty" query:"HasMore"`
SuggestionV2 []*ProductInfo `thrift:"SuggestionV2,3,optional" form:"SuggestionV2" json:"SuggestionV2,omitempty" query:"SuggestionV2"`
Suggestions []*ProductMetaInfo `thrift:"Suggestions,1,optional" form:"suggestions" json:"suggestions,omitempty"`
HasMore *bool `thrift:"HasMore,2,optional" form:"has_more" json:"has_more,omitempty"`
SuggestionV2 []*ProductInfo `thrift:"SuggestionV2,3,optional" form:"suggestion_v2" json:"suggestion_v2,omitempty"`
}
func NewSearchSuggestResponseData() *SearchSuggestResponseData {
@ -26784,8 +26768,8 @@ func (p *GetProductCategoryListRequest) String() string {
}
type GetProductCategoryListData struct {
EntityType product_common.ProductEntityType `thrift:"EntityType,1,required" form:"EntityType,required" json:"EntityType,required" query:"EntityType,required"`
Categories []*ProductCategory `thrift:"Categories,2,optional" form:"Categories" json:"Categories,omitempty" query:"Categories"`
EntityType product_common.ProductEntityType `thrift:"EntityType,1,required" form:"entity_type,required" json:"entity_type,required"`
Categories []*ProductCategory `thrift:"Categories,2,optional" form:"categories" json:"categories,omitempty"`
}
func NewGetProductCategoryListData() *GetProductCategoryListData {
@ -27007,9 +26991,9 @@ func (p *GetProductCategoryListData) String() string {
}
type GetProductCategoryListResponse struct {
Code int32 `thrift:"Code,1,required" form:"Code,required" json:"Code,required" query:"Code,required"`
Message string `thrift:"Message,2,required" form:"Message,required" json:"Message,required" query:"Message,required"`
Data *GetProductCategoryListData `thrift:"Data,3" form:"Data" json:"Data" query:"Data"`
Code int32 `thrift:"Code,1,required" form:"code,required" json:"code,required"`
Message string `thrift:"Message,2,required" form:"message,required" json:"message,required"`
Data *GetProductCategoryListData `thrift:"Data,3" form:"data" json:"data"`
BaseResp *base.BaseResp `thrift:"BaseResp,255,optional" form:"BaseResp" json:"BaseResp,omitempty" query:"BaseResp"`
}