feat(api): 🎉 Add business profile and catalog management
* Implement endpoints for managing business profiles: - Get business profile - Update business profile * Add catalog management features: - List catalogs - List products in a catalog - Send catalog messages - Send single product messages - Send product list messages * Introduce media upload functionality for sending media files. * Add flow management capabilities: - Deprecate flows * Update API documentation to reflect new endpoints and features.
This commit is contained in:
@@ -263,6 +263,7 @@ func (s *Server) setupRoutes() *http.ServeMux {
|
||||
mux.HandleFunc("/api/flows/get", h.Auth(h.GetFlow))
|
||||
mux.HandleFunc("/api/flows/upload", h.Auth(h.UploadFlowAsset))
|
||||
mux.HandleFunc("/api/flows/publish", h.Auth(h.PublishFlow))
|
||||
mux.HandleFunc("/api/flows/deprecate", h.Auth(h.DeprecateFlow))
|
||||
mux.HandleFunc("/api/flows/delete", h.Auth(h.DeleteFlow))
|
||||
|
||||
// Phone number management (with auth)
|
||||
@@ -271,8 +272,20 @@ func (s *Server) setupRoutes() *http.ServeMux {
|
||||
mux.HandleFunc("/api/phone-numbers/verify-code", h.Auth(h.VerifyCode))
|
||||
|
||||
// Media management (with auth)
|
||||
mux.HandleFunc("/api/media/upload", h.Auth(h.UploadMedia))
|
||||
mux.HandleFunc("/api/media-delete", h.Auth(h.DeleteMediaFile))
|
||||
|
||||
// Business profile (with auth)
|
||||
mux.HandleFunc("/api/business-profile", h.Auth(h.GetBusinessProfile))
|
||||
mux.HandleFunc("/api/business-profile/update", h.Auth(h.UpdateBusinessProfile))
|
||||
|
||||
// Catalog / commerce (with auth)
|
||||
mux.HandleFunc("/api/catalogs", h.Auth(h.ListCatalogs))
|
||||
mux.HandleFunc("/api/catalogs/products", h.Auth(h.ListProducts))
|
||||
mux.HandleFunc("/api/send/catalog", h.Auth(h.SendCatalogMessage))
|
||||
mux.HandleFunc("/api/send/product", h.Auth(h.SendSingleProduct))
|
||||
mux.HandleFunc("/api/send/product-list", h.Auth(h.SendProductList))
|
||||
|
||||
// Message cache management (with auth)
|
||||
mux.HandleFunc("/api/cache", h.Auth(h.GetCachedEvents)) // GET - list cached events
|
||||
mux.HandleFunc("/api/cache/stats", h.Auth(h.GetCacheStats)) // GET - cache statistics
|
||||
|
||||
Reference in New Issue
Block a user