#[derive(serde::Serialize, serde::Deserialize)]
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct BestSellingProductsRequest {}
#[derive(serde::Serialize, serde::Deserialize)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct BestSellingProductsResponse {
#[prost(oneof = "best_selling_products_response::Response", tags = "1, 2")]
pub response: ::core::option::Option<best_selling_products_response::Response>,
}
pub mod best_selling_products_response {
#[derive(serde::Serialize, serde::Deserialize)]
#[derive(Clone, PartialEq, ::prost::Oneof)]
pub enum Response {
#[prost(message, tag = "1")]
Data(super::BestSellingProductsResponseData),
#[prost(message, tag = "2")]
Error(super::super::super::shared::v1::AppError),
}
}
#[derive(serde::Serialize, serde::Deserialize)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct BestSellingProductsResponseData {
#[prost(message, repeated, tag = "1")]
pub products: ::prost::alloc::vec::Vec<BestSellingProductListItem>,
}
#[derive(serde::Serialize, serde::Deserialize)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct BestSellingProductListItem {
#[prost(string, tag = "1")]
pub id: ::prost::alloc::string::String,
#[prost(string, tag = "2")]
pub title: ::prost::alloc::string::String,
#[prost(string, tag = "3")]
pub image: ::prost::alloc::string::String,
#[prost(int64, tag = "4")]
pub price_cents: i64,
#[prost(int64, optional, tag = "5")]
pub sale_price_cents: ::core::option::Option<i64>,
#[prost(uint32, tag = "6")]
pub rating: u32,
#[prost(uint32, tag = "7")]
pub sold_count: u32,
#[prost(string, tag = "8")]
pub variant_id: ::prost::alloc::string::String,
}
#[derive(serde::Serialize, serde::Deserialize)]
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct BigDiscountProductsRequest {}
#[derive(serde::Serialize, serde::Deserialize)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct BigDiscountProductsResponse {
#[prost(oneof = "big_discount_products_response::Response", tags = "1, 2")]
pub response: ::core::option::Option<big_discount_products_response::Response>,
}
pub mod big_discount_products_response {
#[derive(serde::Serialize, serde::Deserialize)]
#[derive(Clone, PartialEq, ::prost::Oneof)]
pub enum Response {
#[prost(message, tag = "1")]
Data(super::BigDiscountProductsResponseData),
#[prost(message, tag = "2")]
Error(super::super::super::shared::v1::AppError),
}
}
#[derive(serde::Serialize, serde::Deserialize)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct BigDiscountProductsResponseData {
#[prost(message, repeated, tag = "1")]
pub products: ::prost::alloc::vec::Vec<BigDiscountProductListItem>,
}
#[derive(serde::Serialize, serde::Deserialize)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct BigDiscountProductListItem {
#[prost(string, tag = "1")]
pub id: ::prost::alloc::string::String,
#[prost(string, tag = "2")]
pub title: ::prost::alloc::string::String,
#[prost(string, tag = "3")]
pub image: ::prost::alloc::string::String,
#[prost(uint32, tag = "4")]
pub price_cents: u32,
#[prost(uint32, tag = "5")]
pub discount_price_cents: u32,
#[prost(uint32, tag = "6")]
pub discount_percentage: u32,
#[prost(uint32, tag = "7")]
pub sold_count: u32,
#[prost(string, tag = "8")]
pub variant_id: ::prost::alloc::string::String,
}
#[derive(serde::Serialize, serde::Deserialize)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct CategoryNavbarRequest {
#[prost(string, tag = "1")]
pub category_id: ::prost::alloc::string::String,
#[prost(string, tag = "2")]
pub subcategory_id: ::prost::alloc::string::String,
}
#[derive(serde::Serialize, serde::Deserialize)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct CategoryNavbarResponse {
#[prost(oneof = "category_navbar_response::Response", tags = "1, 2")]
pub response: ::core::option::Option<category_navbar_response::Response>,
}
pub mod category_navbar_response {
#[derive(serde::Serialize, serde::Deserialize)]
#[derive(Clone, PartialEq, ::prost::Oneof)]
pub enum Response {
#[prost(message, tag = "1")]
Data(super::CategoryNavbarResponseData),
#[prost(message, tag = "2")]
Error(super::super::super::shared::v1::AppError),
}
}
#[derive(serde::Serialize, serde::Deserialize)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct CategoryNavbarResponseData {
#[prost(string, tag = "1")]
pub category_id: ::prost::alloc::string::String,
#[prost(string, tag = "2")]
pub category_name: ::prost::alloc::string::String,
#[prost(string, tag = "3")]
pub subcategory_id: ::prost::alloc::string::String,
#[prost(string, tag = "4")]
pub subcategory_name: ::prost::alloc::string::String,
#[prost(message, repeated, tag = "5")]
pub recommended_products: ::prost::alloc::vec::Vec<CategoryNavbarProductItem>,
}
#[derive(serde::Serialize, serde::Deserialize)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct CategoryNavbarProductItem {
#[prost(string, tag = "1")]
pub id: ::prost::alloc::string::String,
#[prost(string, tag = "2")]
pub variant_id: ::prost::alloc::string::String,
#[prost(string, tag = "3")]
pub title: ::prost::alloc::string::String,
#[prost(string, tag = "4")]
pub image: ::prost::alloc::string::String,
#[prost(uint32, tag = "5")]
pub price_cents: u32,
#[prost(uint32, optional, tag = "6")]
pub discount_price_cents: ::core::option::Option<u32>,
#[prost(uint32, optional, tag = "7")]
pub discount_percentage: ::core::option::Option<u32>,
#[prost(string, tag = "8")]
pub sold_by: ::prost::alloc::string::String,
}
#[derive(serde::Serialize, serde::Deserialize)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct HeroProduct {
#[prost(string, tag = "1")]
pub id: ::prost::alloc::string::String,
#[prost(message, optional, tag = "2")]
pub products_data: ::core::option::Option<super::super::shared::v1::Struct>,
#[prost(uint64, tag = "3")]
pub created_at: u64,
#[prost(uint64, optional, tag = "4")]
pub updated_at: ::core::option::Option<u64>,
}
#[derive(serde::Serialize, serde::Deserialize)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct HeroProductData {
#[prost(message, optional, tag = "1")]
pub category_slider: ::core::option::Option<CategorySlider>,
#[prost(message, optional, tag = "2")]
pub welcome_deals_slider: ::core::option::Option<WelcomeDealsSlider>,
}
#[derive(serde::Serialize, serde::Deserialize)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct CategorySlider {
#[prost(string, tag = "1")]
pub title: ::prost::alloc::string::String,
#[prost(string, tag = "2")]
pub subtitle: ::prost::alloc::string::String,
#[prost(string, tag = "3")]
pub button_text: ::prost::alloc::string::String,
#[prost(message, repeated, tag = "4")]
pub products: ::prost::alloc::vec::Vec<HeroProductItem>,
}
#[derive(serde::Serialize, serde::Deserialize)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct WelcomeDealsSlider {
#[prost(string, tag = "1")]
pub title: ::prost::alloc::string::String,
#[prost(string, tag = "2")]
pub subtitle: ::prost::alloc::string::String,
#[prost(string, tag = "3")]
pub button_text: ::prost::alloc::string::String,
#[prost(message, repeated, tag = "4")]
pub products: ::prost::alloc::vec::Vec<HeroProductItem>,
}
#[derive(serde::Serialize, serde::Deserialize)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct HeroProductItem {
#[prost(string, tag = "1")]
pub id: ::prost::alloc::string::String,
#[prost(string, tag = "2")]
pub variant_id: ::prost::alloc::string::String,
}
#[derive(serde::Serialize, serde::Deserialize)]
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct HeroProductsRequest {}
#[derive(serde::Serialize, serde::Deserialize)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct HeroProductsResponse {
#[prost(oneof = "hero_products_response::Response", tags = "1, 2")]
pub response: ::core::option::Option<hero_products_response::Response>,
}
pub mod hero_products_response {
#[derive(serde::Serialize, serde::Deserialize)]
#[derive(Clone, PartialEq, ::prost::Oneof)]
pub enum Response {
#[prost(message, tag = "1")]
Data(super::HeroProductsResponseData),
#[prost(message, tag = "2")]
Error(super::super::super::shared::v1::AppError),
}
}
#[derive(serde::Serialize, serde::Deserialize)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct HeroProductsResponseData {
#[prost(message, optional, tag = "1")]
pub category_slider: ::core::option::Option<HeroProductsResponseCategorySlider>,
#[prost(message, optional, tag = "2")]
pub welcome_deals_slider: ::core::option::Option<
HeroProductsResponseWelcomeDealsSlider,
>,
}
#[derive(serde::Serialize, serde::Deserialize)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct HeroProductsResponseCategorySlider {
#[prost(string, tag = "1")]
pub title: ::prost::alloc::string::String,
#[prost(string, tag = "2")]
pub subtitle: ::prost::alloc::string::String,
#[prost(string, tag = "3")]
pub button_text: ::prost::alloc::string::String,
#[prost(message, repeated, tag = "4")]
pub products: ::prost::alloc::vec::Vec<HeroProductListItem>,
}
#[derive(serde::Serialize, serde::Deserialize)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct HeroProductsResponseWelcomeDealsSlider {
#[prost(string, tag = "1")]
pub title: ::prost::alloc::string::String,
#[prost(string, tag = "2")]
pub subtitle: ::prost::alloc::string::String,
#[prost(string, tag = "3")]
pub button_text: ::prost::alloc::string::String,
#[prost(message, repeated, tag = "4")]
pub products: ::prost::alloc::vec::Vec<HeroProductListItem>,
}
#[derive(serde::Serialize, serde::Deserialize)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct HeroProductListItem {
#[prost(string, tag = "1")]
pub id: ::prost::alloc::string::String,
#[prost(string, tag = "2")]
pub variant_id: ::prost::alloc::string::String,
#[prost(string, tag = "3")]
pub title: ::prost::alloc::string::String,
#[prost(string, tag = "4")]
pub image: ::prost::alloc::string::String,
#[prost(uint32, tag = "5")]
pub price_cents: u32,
#[prost(uint32, optional, tag = "6")]
pub discount_price_cents: ::core::option::Option<u32>,
#[prost(uint32, optional, tag = "7")]
pub discount_percentage: ::core::option::Option<u32>,
}
#[derive(serde::Serialize, serde::Deserialize)]
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct NewlyAddedProductsRequest {}
#[derive(serde::Serialize, serde::Deserialize)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct NewlyAddedProductsResponse {
#[prost(oneof = "newly_added_products_response::Response", tags = "1, 2")]
pub response: ::core::option::Option<newly_added_products_response::Response>,
}
pub mod newly_added_products_response {
#[derive(serde::Serialize, serde::Deserialize)]
#[derive(Clone, PartialEq, ::prost::Oneof)]
pub enum Response {
#[prost(message, tag = "1")]
Data(super::NewlyAddedProductsResponseData),
#[prost(message, tag = "2")]
Error(super::super::super::shared::v1::AppError),
}
}
#[derive(serde::Serialize, serde::Deserialize)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct NewlyAddedProductsResponseData {
#[prost(message, repeated, tag = "1")]
pub products: ::prost::alloc::vec::Vec<NewlyAddedProductListItem>,
}
#[derive(serde::Serialize, serde::Deserialize)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct NewlyAddedProductListItem {
#[prost(string, tag = "1")]
pub id: ::prost::alloc::string::String,
#[prost(string, tag = "2")]
pub title: ::prost::alloc::string::String,
#[prost(string, tag = "3")]
pub image: ::prost::alloc::string::String,
#[prost(uint32, tag = "4")]
pub price_cents: u32,
#[prost(uint32, optional, tag = "5")]
pub sale_price_cents: ::core::option::Option<u32>,
#[prost(uint32, optional, tag = "6")]
pub discount_percentage: ::core::option::Option<u32>,
#[prost(string, tag = "7")]
pub created_at: ::prost::alloc::string::String,
#[prost(string, tag = "8")]
pub variant_id: ::prost::alloc::string::String,
}
#[derive(serde::Serialize, serde::Deserialize)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ProductCreateTag {
#[prost(uint32, optional, tag = "1")]
pub id: ::core::option::Option<u32>,
#[prost(string, optional, tag = "2")]
pub name: ::core::option::Option<::prost::alloc::string::String>,
}
#[derive(serde::Serialize, serde::Deserialize)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ProductCreateRequest {
#[prost(message, optional, tag = "1")]
pub identity: ::core::option::Option<ProductCreateRequestIdentity>,
#[prost(message, optional, tag = "2")]
pub description: ::core::option::Option<ProductCreateRequestDescription>,
#[prost(message, optional, tag = "3")]
pub details: ::core::option::Option<ProductCreateRequestDetails>,
#[prost(message, optional, tag = "4")]
pub media: ::core::option::Option<ProductCreateRequestMedia>,
#[prost(message, optional, tag = "5")]
pub offer: ::core::option::Option<ProductCreateRequestOffer>,
#[prost(message, optional, tag = "6")]
pub safety: ::core::option::Option<ProductCreateRequestSafety>,
}
#[derive(serde::Serialize, serde::Deserialize)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ProductCreateRequestIdentity {
#[prost(string, tag = "1")]
pub title: ::prost::alloc::string::String,
#[prost(string, tag = "2")]
pub category: ::prost::alloc::string::String,
#[prost(string, tag = "3")]
pub subcategory: ::prost::alloc::string::String,
#[prost(bool, tag = "4")]
pub has_variations: bool,
#[prost(string, tag = "5")]
pub brand_name: ::prost::alloc::string::String,
#[prost(bool, tag = "6")]
pub no_brand: bool,
#[prost(string, tag = "7")]
pub product_id: ::prost::alloc::string::String,
#[prost(string, tag = "8")]
pub product_id_type: ::prost::alloc::string::String,
#[prost(bool, tag = "9")]
pub no_product_id: bool,
}
#[derive(serde::Serialize, serde::Deserialize)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ProductCreateRequestDescription {
#[prost(string, tag = "1")]
pub description: ::prost::alloc::string::String,
#[prost(message, repeated, tag = "2")]
pub bullet_points: ::prost::alloc::vec::Vec<ProductCreateRequestBulletPoint>,
}
#[derive(serde::Serialize, serde::Deserialize)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ProductCreateRequestBulletPoint {
#[prost(string, tag = "1")]
pub id: ::prost::alloc::string::String,
#[prost(string, tag = "2")]
pub bullet_point: ::prost::alloc::string::String,
}
#[derive(serde::Serialize, serde::Deserialize)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ProductCreateRequestDetails {
#[prost(map = "string, message", tag = "1")]
pub shared: ::std::collections::HashMap<
::prost::alloc::string::String,
super::super::shared::v1::Any,
>,
#[prost(oneof = "product_create_request_details::Details", tags = "2, 3")]
pub details: ::core::option::Option<product_create_request_details::Details>,
}
pub mod product_create_request_details {
#[derive(serde::Serialize, serde::Deserialize)]
#[derive(Clone, PartialEq, ::prost::Oneof)]
pub enum Details {
#[prost(message, tag = "2")]
WithVariants(super::ProductCreateRequestDetailsWithVariants),
#[prost(message, tag = "3")]
WithoutVariants(super::ProductCreateRequestDetailsWithoutVariants),
}
}
#[derive(serde::Serialize, serde::Deserialize)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ProductCreateRequestDetailsWithVariants {
#[prost(message, repeated, tag = "1")]
pub variants: ::prost::alloc::vec::Vec<ProductCreateRequestDetailsVariantForm>,
}
#[derive(serde::Serialize, serde::Deserialize)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ProductCreateRequestDetailsVariantForm {
#[prost(map = "string, message", tag = "1")]
pub form: ::std::collections::HashMap<
::prost::alloc::string::String,
super::super::shared::v1::Any,
>,
}
#[derive(serde::Serialize, serde::Deserialize)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ProductCreateRequestDetailsWithoutVariants {
#[prost(map = "string, message", tag = "1")]
pub form: ::std::collections::HashMap<
::prost::alloc::string::String,
super::super::shared::v1::Any,
>,
}
#[derive(serde::Serialize, serde::Deserialize)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ProductCreateRequestMedia {
#[prost(uint64, tag = "1")]
pub total_size: u64,
#[prost(oneof = "product_create_request_media::Media", tags = "2, 3")]
pub media: ::core::option::Option<product_create_request_media::Media>,
}
pub mod product_create_request_media {
#[derive(serde::Serialize, serde::Deserialize)]
#[derive(Clone, PartialEq, ::prost::Oneof)]
pub enum Media {
#[prost(message, tag = "2")]
WithVariants(super::ProductCreateRequestMediaWithVariants),
#[prost(message, tag = "3")]
WithoutVariants(super::ProductCreateRequestMediaWithoutVariants),
}
}
#[derive(serde::Serialize, serde::Deserialize)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ProductCreateRequestMediaWithVariants {
#[prost(map = "string, message", tag = "1")]
pub images: ::std::collections::HashMap<
::prost::alloc::string::String,
super::super::shared::v1::Attachments,
>,
#[prost(map = "string, message", tag = "2")]
pub videos: ::std::collections::HashMap<
::prost::alloc::string::String,
super::super::shared::v1::Attachments,
>,
}
#[derive(serde::Serialize, serde::Deserialize)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ProductCreateRequestMediaWithoutVariants {
#[prost(message, repeated, tag = "1")]
pub images: ::prost::alloc::vec::Vec<super::super::shared::v1::Attachment>,
#[prost(message, repeated, tag = "2")]
pub videos: ::prost::alloc::vec::Vec<super::super::shared::v1::Attachment>,
}
#[derive(serde::Serialize, serde::Deserialize)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ProductCreateRequestOffer {
#[prost(string, tag = "1")]
pub currency: ::prost::alloc::string::String,
#[prost(string, tag = "2")]
pub fulfillment_type: ::prost::alloc::string::String,
#[prost(uint64, tag = "3")]
pub processing_time: u64,
#[prost(oneof = "product_create_request_offer::Pricing", tags = "4, 5")]
pub pricing: ::core::option::Option<product_create_request_offer::Pricing>,
}
pub mod product_create_request_offer {
#[derive(serde::Serialize, serde::Deserialize)]
#[derive(Clone, PartialEq, ::prost::Oneof)]
pub enum Pricing {
#[prost(message, tag = "4")]
WithVariants(super::ProductCreateRequestOfferWithVariants),
#[prost(message, tag = "5")]
WithoutVariants(super::ProductCreateRequestOfferWithoutVariants),
}
}
#[derive(serde::Serialize, serde::Deserialize)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ProductCreateRequestOfferWithVariants {
#[prost(message, repeated, tag = "1")]
pub variants: ::prost::alloc::vec::Vec<ProductCreateRequestOfferVariant>,
}
#[derive(serde::Serialize, serde::Deserialize)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ProductCreateRequestOfferVariant {
#[prost(string, tag = "1")]
pub id: ::prost::alloc::string::String,
#[prost(string, tag = "2")]
pub sku: ::prost::alloc::string::String,
#[prost(uint64, tag = "3")]
pub quantity: u64,
#[prost(string, tag = "4")]
pub price: ::prost::alloc::string::String,
#[prost(string, tag = "5")]
pub offering_condition: ::prost::alloc::string::String,
#[prost(string, optional, tag = "6")]
pub condition_note: ::core::option::Option<::prost::alloc::string::String>,
#[prost(string, optional, tag = "7")]
pub list_price: ::core::option::Option<::prost::alloc::string::String>,
#[prost(bool, optional, tag = "8")]
pub has_sale_price: ::core::option::Option<bool>,
#[prost(string, optional, tag = "9")]
pub sale_price: ::core::option::Option<::prost::alloc::string::String>,
#[prost(string, optional, tag = "10")]
pub sale_price_start: ::core::option::Option<::prost::alloc::string::String>,
#[prost(string, optional, tag = "11")]
pub sale_price_end: ::core::option::Option<::prost::alloc::string::String>,
#[prost(bool, tag = "12")]
pub has_minimum_orders: bool,
#[prost(message, repeated, tag = "13")]
pub minimum_orders: ::prost::alloc::vec::Vec<ProductCreateRequestOfferMinimumOrder>,
}
#[derive(serde::Serialize, serde::Deserialize)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ProductCreateRequestOfferWithoutVariants {
#[prost(string, tag = "1")]
pub sku: ::prost::alloc::string::String,
#[prost(uint64, tag = "2")]
pub quantity: u64,
#[prost(string, tag = "3")]
pub price: ::prost::alloc::string::String,
#[prost(string, tag = "4")]
pub offering_condition: ::prost::alloc::string::String,
#[prost(string, optional, tag = "5")]
pub condition_note: ::core::option::Option<::prost::alloc::string::String>,
#[prost(string, optional, tag = "6")]
pub list_price: ::core::option::Option<::prost::alloc::string::String>,
#[prost(bool, optional, tag = "7")]
pub has_sale_price: ::core::option::Option<bool>,
#[prost(string, optional, tag = "8")]
pub sale_price: ::core::option::Option<::prost::alloc::string::String>,
#[prost(string, optional, tag = "9")]
pub sale_price_start: ::core::option::Option<::prost::alloc::string::String>,
#[prost(string, optional, tag = "10")]
pub sale_price_end: ::core::option::Option<::prost::alloc::string::String>,
#[prost(bool, tag = "11")]
pub has_minimum_orders: bool,
#[prost(message, repeated, tag = "12")]
pub minimum_orders: ::prost::alloc::vec::Vec<ProductCreateRequestOfferMinimumOrder>,
}
#[derive(serde::Serialize, serde::Deserialize)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ProductCreateRequestOfferMinimumOrder {
#[prost(string, tag = "1")]
pub id: ::prost::alloc::string::String,
#[prost(string, tag = "2")]
pub price: ::prost::alloc::string::String,
#[prost(uint64, tag = "3")]
pub quantity: u64,
}
#[derive(serde::Serialize, serde::Deserialize)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ProductCreateRequestSafety {
#[prost(bool, tag = "1")]
pub attestation: bool,
#[prost(map = "string, message", tag = "2")]
pub form: ::std::collections::HashMap<
::prost::alloc::string::String,
super::super::shared::v1::Any,
>,
}
#[derive(serde::Serialize, serde::Deserialize)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ProductCreateResponse {
#[prost(oneof = "product_create_response::Response", tags = "1, 2")]
pub response: ::core::option::Option<product_create_response::Response>,
}
pub mod product_create_response {
#[derive(serde::Serialize, serde::Deserialize)]
#[derive(Clone, PartialEq, ::prost::Oneof)]
pub enum Response {
#[prost(message, tag = "1")]
Data(super::super::super::shared::v1::SuccessResponseData),
#[prost(message, tag = "2")]
Error(super::super::super::shared::v1::AppError),
}
}
#[derive(serde::Serialize, serde::Deserialize)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ProductBulletPoint {
#[prost(string, tag = "1")]
pub id: ::prost::alloc::string::String,
#[prost(string, tag = "2")]
pub text: ::prost::alloc::string::String,
#[prost(uint64, tag = "3")]
pub created_at: u64,
#[prost(uint64, optional, tag = "4")]
pub updated_at: ::core::option::Option<u64>,
}
#[derive(serde::Serialize, serde::Deserialize)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ProductDetails {
#[prost(map = "string, message", tag = "1")]
pub shared: ::std::collections::HashMap<
::prost::alloc::string::String,
super::super::shared::v1::Any,
>,
#[prost(map = "string, message", tag = "2")]
pub details: ::std::collections::HashMap<
::prost::alloc::string::String,
ProductDetailsVariant,
>,
}
#[derive(serde::Serialize, serde::Deserialize)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ProductDetailsVariant {
#[prost(string, tag = "1")]
pub variant_name: ::prost::alloc::string::String,
#[prost(map = "string, message", tag = "2")]
pub variant_data: ::std::collections::HashMap<
::prost::alloc::string::String,
super::super::shared::v1::Any,
>,
}
#[derive(serde::Serialize, serde::Deserialize)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ProductMedia {
#[prost(map = "string, message", tag = "1")]
pub media: ::std::collections::HashMap<
::prost::alloc::string::String,
ProductMediaVariant,
>,
}
#[derive(serde::Serialize, serde::Deserialize)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ProductMediaVariant {
#[prost(map = "string, message", tag = "1")]
pub images: ::std::collections::HashMap<
::prost::alloc::string::String,
ProductMediaImage,
>,
#[prost(map = "string, message", tag = "2")]
pub videos: ::std::collections::HashMap<
::prost::alloc::string::String,
ProductMediaVideo,
>,
}
#[derive(serde::Serialize, serde::Deserialize)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ProductMediaImage {
#[prost(string, tag = "1")]
pub format: ::prost::alloc::string::String,
#[prost(string, tag = "2")]
pub url: ::prost::alloc::string::String,
#[prost(uint64, tag = "3")]
pub size: u64,
}
#[derive(serde::Serialize, serde::Deserialize)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ProductMediaVideo {
#[prost(string, tag = "1")]
pub format: ::prost::alloc::string::String,
#[prost(string, tag = "2")]
pub url: ::prost::alloc::string::String,
#[prost(uint64, tag = "3")]
pub size: u64,
#[prost(uint64, tag = "4")]
pub duration: u64,
}
#[derive(serde::Serialize, serde::Deserialize)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ProductOffer {
#[prost(map = "string, message", tag = "2")]
pub offer: ::std::collections::HashMap<
::prost::alloc::string::String,
ProductOfferVariant,
>,
}
#[derive(serde::Serialize, serde::Deserialize)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ProductOfferVariant {
#[prost(string, tag = "2")]
pub sku: ::prost::alloc::string::String,
#[prost(uint64, tag = "3")]
pub quantity: u64,
#[prost(string, tag = "4")]
pub price: ::prost::alloc::string::String,
#[prost(string, tag = "5")]
pub offering_condition: ::prost::alloc::string::String,
#[prost(string, optional, tag = "6")]
pub condition_note: ::core::option::Option<::prost::alloc::string::String>,
#[prost(string, optional, tag = "7")]
pub list_price: ::core::option::Option<::prost::alloc::string::String>,
#[prost(bool, tag = "8")]
pub has_sale_price: bool,
#[prost(string, optional, tag = "9")]
pub sale_price: ::core::option::Option<::prost::alloc::string::String>,
#[prost(string, optional, tag = "10")]
pub sale_price_start: ::core::option::Option<::prost::alloc::string::String>,
#[prost(string, optional, tag = "11")]
pub sale_price_end: ::core::option::Option<::prost::alloc::string::String>,
#[prost(bool, tag = "12")]
pub has_minimum_orders: bool,
#[prost(message, repeated, tag = "13")]
pub minimum_orders: ::prost::alloc::vec::Vec<ProductOfferMinimumOrder>,
}
#[derive(serde::Serialize, serde::Deserialize)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ProductOfferMinimumOrder {
#[prost(string, tag = "1")]
pub id: ::prost::alloc::string::String,
#[prost(string, tag = "2")]
pub price: ::prost::alloc::string::String,
#[prost(uint64, tag = "3")]
pub quantity: u64,
#[prost(uint64, tag = "4")]
pub created_at: u64,
#[prost(uint64, optional, tag = "5")]
pub updated_at: ::core::option::Option<u64>,
}
#[derive(serde::Serialize, serde::Deserialize)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ProductSafety {
#[prost(map = "string, message", tag = "1")]
pub safety: ::std::collections::HashMap<
::prost::alloc::string::String,
super::super::shared::v1::Any,
>,
}
#[derive(serde::Serialize, serde::Deserialize)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ProductTag {
#[prost(uint32, optional, tag = "1")]
pub id: ::core::option::Option<u32>,
#[prost(string, optional, tag = "2")]
pub name: ::core::option::Option<::prost::alloc::string::String>,
}
#[derive(serde::Serialize, serde::Deserialize)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ProductTags {
#[prost(message, repeated, tag = "1")]
pub tags: ::prost::alloc::vec::Vec<ProductTag>,
}
#[derive(serde::Serialize, serde::Deserialize)]
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct ProductMetadata {}
#[derive(serde::Serialize, serde::Deserialize)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Product {
#[prost(string, tag = "1")]
pub id: ::prost::alloc::string::String,
#[prost(string, tag = "2")]
pub user_id: ::prost::alloc::string::String,
#[prost(string, tag = "3")]
pub title: ::prost::alloc::string::String,
#[prost(string, tag = "4")]
pub category: ::prost::alloc::string::String,
#[prost(string, tag = "5")]
pub subcategory: ::prost::alloc::string::String,
#[prost(bool, tag = "6")]
pub has_variations: bool,
#[prost(string, optional, tag = "7")]
pub brand_name: ::core::option::Option<::prost::alloc::string::String>,
#[prost(bool, tag = "8")]
pub has_brand_name: bool,
#[prost(string, optional, tag = "9")]
pub product_id: ::core::option::Option<::prost::alloc::string::String>,
#[prost(bool, tag = "10")]
pub has_product_id: bool,
#[prost(string, optional, tag = "11")]
pub product_id_type: ::core::option::Option<::prost::alloc::string::String>,
#[prost(string, tag = "12")]
pub description: ::prost::alloc::string::String,
#[prost(message, repeated, tag = "13")]
pub bullet_points: ::prost::alloc::vec::Vec<ProductBulletPoint>,
#[prost(string, tag = "14")]
pub currency_code: ::prost::alloc::string::String,
#[prost(string, tag = "15")]
pub fulfillment_type: ::prost::alloc::string::String,
#[prost(uint64, tag = "16")]
pub processing_time: u64,
#[prost(message, optional, tag = "17")]
pub details: ::core::option::Option<ProductDetails>,
#[prost(message, optional, tag = "18")]
pub media: ::core::option::Option<ProductMedia>,
#[prost(message, optional, tag = "19")]
pub offer: ::core::option::Option<ProductOffer>,
#[prost(message, optional, tag = "20")]
pub safety: ::core::option::Option<ProductSafety>,
#[prost(message, repeated, tag = "21")]
pub tags: ::prost::alloc::vec::Vec<ProductTag>,
#[prost(message, optional, tag = "22")]
pub metadata: ::core::option::Option<ProductMetadata>,
#[prost(bool, tag = "23")]
pub ar_enabled: bool,
#[prost(string, tag = "24")]
pub slug: ::prost::alloc::string::String,
#[prost(string, tag = "25")]
pub status: ::prost::alloc::string::String,
#[prost(uint32, tag = "26")]
pub version: u32,
#[prost(uint32, tag = "27")]
pub schema_version: u32,
#[prost(uint64, tag = "28")]
pub created_at: u64,
#[prost(uint64, optional, tag = "29")]
pub published_at: ::core::option::Option<u64>,
#[prost(uint64, optional, tag = "30")]
pub updated_at: ::core::option::Option<u64>,
}
#[derive(serde::Serialize, serde::Deserialize)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Category {
#[prost(string, tag = "1")]
pub id: ::prost::alloc::string::String,
#[prost(string, tag = "2")]
pub name: ::prost::alloc::string::String,
#[prost(string, tag = "3")]
pub image: ::prost::alloc::string::String,
#[prost(message, repeated, tag = "4")]
pub translations: ::prost::alloc::vec::Vec<CategoryTranslations>,
#[prost(message, repeated, tag = "5")]
pub subcategories: ::prost::alloc::vec::Vec<Subcategory>,
}
#[derive(serde::Serialize, serde::Deserialize)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct CategoryTranslations {
#[prost(string, tag = "1")]
pub name: ::prost::alloc::string::String,
#[prost(string, tag = "2")]
pub language: ::prost::alloc::string::String,
#[prost(int32, tag = "3")]
pub version: i32,
#[prost(map = "string, message", tag = "4")]
pub subcategories: ::std::collections::HashMap<
::prost::alloc::string::String,
SubcategoryTranslations,
>,
}
#[derive(serde::Serialize, serde::Deserialize)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct SubcategoryTranslations {
#[prost(string, tag = "1")]
pub name: ::prost::alloc::string::String,
#[prost(map = "string, message", tag = "2")]
pub attributes: ::std::collections::HashMap<
::prost::alloc::string::String,
SubcategoryAttributeTranslation,
>,
#[prost(map = "string, message", tag = "3")]
pub data: ::std::collections::HashMap<
::prost::alloc::string::String,
super::super::shared::v1::StringMap,
>,
#[prost(message, optional, tag = "4")]
pub safety: ::core::option::Option<SubcategorySafetyTranslation>,
}
#[derive(serde::Serialize, serde::Deserialize)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct SubcategoryAttributeTranslation {
#[prost(string, tag = "1")]
pub label: ::prost::alloc::string::String,
#[prost(string, tag = "2")]
pub placeholder: ::prost::alloc::string::String,
#[prost(string, tag = "3")]
pub info: ::prost::alloc::string::String,
}
#[derive(serde::Serialize, serde::Deserialize)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct SubcategorySafetyTranslation {
#[prost(map = "string, message", tag = "1")]
pub attributes: ::std::collections::HashMap<
::prost::alloc::string::String,
SubcategoryAttributeTranslation,
>,
#[prost(map = "string, message", tag = "2")]
pub data: ::std::collections::HashMap<
::prost::alloc::string::String,
super::super::shared::v1::StringMap,
>,
}
#[derive(serde::Serialize, serde::Deserialize)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Subcategory {
#[prost(string, tag = "1")]
pub id: ::prost::alloc::string::String,
#[prost(string, tag = "2")]
pub name: ::prost::alloc::string::String,
#[prost(int32, tag = "3")]
pub version: i32,
#[prost(string, tag = "4")]
pub created_at: ::prost::alloc::string::String,
#[prost(map = "string, message", tag = "5")]
pub attributes: ::std::collections::HashMap<
::prost::alloc::string::String,
SubcategoryAttribute,
>,
#[prost(map = "string, message", tag = "6")]
pub safety: ::std::collections::HashMap<
::prost::alloc::string::String,
SubcategorySafety,
>,
}
#[derive(serde::Serialize, serde::Deserialize)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct SubcategoryAttribute {
#[prost(bool, tag = "1")]
pub required: bool,
#[prost(string, tag = "2")]
pub r#type: ::prost::alloc::string::String,
#[prost(bool, tag = "3")]
pub include_in_variants: bool,
#[prost(string, optional, tag = "4")]
pub reference: ::core::option::Option<::prost::alloc::string::String>,
#[prost(string, repeated, tag = "5")]
pub string_array: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
#[prost(bool, optional, tag = "6")]
pub is_multiple: ::core::option::Option<bool>,
#[prost(message, optional, tag = "7")]
pub validation: ::core::option::Option<super::super::shared::v1::ValidationField>,
}
#[derive(serde::Serialize, serde::Deserialize)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct SubcategorySafety {
#[prost(bool, tag = "1")]
pub required: bool,
#[prost(string, tag = "2")]
pub r#type: ::prost::alloc::string::String,
#[prost(string, optional, tag = "3")]
pub reference: ::core::option::Option<::prost::alloc::string::String>,
#[prost(string, repeated, tag = "4")]
pub string_array: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
#[prost(bool, optional, tag = "5")]
pub is_multiple: ::core::option::Option<bool>,
#[prost(message, optional, tag = "6")]
pub validation: ::core::option::Option<super::super::shared::v1::ValidationField>,
}
#[derive(serde::Serialize, serde::Deserialize)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ProductDataResponseData {
#[prost(message, optional, tag = "1")]
pub subcategory: ::core::option::Option<ProductDataResponseSubcategory>,
#[prost(message, optional, tag = "2")]
pub tags: ::core::option::Option<ProductTags>,
}
#[derive(serde::Serialize, serde::Deserialize)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ProductDataResponseSubcategory {
#[prost(message, optional, tag = "1")]
pub data: ::core::option::Option<Subcategory>,
#[prost(message, optional, tag = "2")]
pub translations: ::core::option::Option<SubcategoryTranslations>,
}
#[derive(serde::Serialize, serde::Deserialize)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ProductDataRequest {
#[prost(message, optional, tag = "1")]
pub subcategory: ::core::option::Option<ProductDataRequestCategory>,
#[prost(bool, optional, tag = "2")]
pub get_tags: ::core::option::Option<bool>,
}
#[derive(serde::Serialize, serde::Deserialize)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ProductDataRequestCategory {
#[prost(string, tag = "1")]
pub category: ::prost::alloc::string::String,
#[prost(string, tag = "2")]
pub subcategory: ::prost::alloc::string::String,
}
#[derive(serde::Serialize, serde::Deserialize)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ProductDataResponse {
#[prost(oneof = "product_data_response::Response", tags = "1, 2")]
pub response: ::core::option::Option<product_data_response::Response>,
}
pub mod product_data_response {
#[derive(serde::Serialize, serde::Deserialize)]
#[derive(Clone, PartialEq, ::prost::Oneof)]
pub enum Response {
#[prost(message, tag = "1")]
Data(super::ProductDataResponseData),
#[prost(message, tag = "2")]
Error(super::super::super::shared::v1::AppError),
}
}
#[derive(serde::Serialize, serde::Deserialize)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ProductDetailsRequest {
#[prost(string, tag = "1")]
pub product_id: ::prost::alloc::string::String,
#[prost(string, optional, tag = "2")]
pub variant_id: ::core::option::Option<::prost::alloc::string::String>,
}
#[derive(serde::Serialize, serde::Deserialize)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ProductDetailsResponse {
#[prost(oneof = "product_details_response::Response", tags = "1, 2")]
pub response: ::core::option::Option<product_details_response::Response>,
}
pub mod product_details_response {
#[derive(serde::Serialize, serde::Deserialize)]
#[derive(Clone, PartialEq, ::prost::Oneof)]
pub enum Response {
#[prost(message, tag = "1")]
Data(super::ProductDetailsResponseData),
#[prost(message, tag = "2")]
Error(super::super::super::shared::v1::AppError),
}
}
#[derive(serde::Serialize, serde::Deserialize)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ProductDetailsResponseData {
#[prost(string, tag = "1")]
pub id: ::prost::alloc::string::String,
#[prost(string, tag = "2")]
pub supplier_id: ::prost::alloc::string::String,
#[prost(string, tag = "3")]
pub title: ::prost::alloc::string::String,
#[prost(string, tag = "4")]
pub category: ::prost::alloc::string::String,
#[prost(string, tag = "5")]
pub subcategory: ::prost::alloc::string::String,
#[prost(bool, tag = "6")]
pub has_variations: bool,
#[prost(string, optional, tag = "7")]
pub brand_name: ::core::option::Option<::prost::alloc::string::String>,
#[prost(string, optional, tag = "8")]
pub product_id: ::core::option::Option<::prost::alloc::string::String>,
#[prost(string, optional, tag = "9")]
pub product_id_type: ::core::option::Option<::prost::alloc::string::String>,
#[prost(string, tag = "10")]
pub description: ::prost::alloc::string::String,
#[prost(message, repeated, tag = "11")]
pub bullet_points: ::prost::alloc::vec::Vec<ProductBulletPoint>,
#[prost(string, tag = "12")]
pub currency_code: ::prost::alloc::string::String,
#[prost(string, tag = "13")]
pub fulfillment_type: ::prost::alloc::string::String,
#[prost(uint64, tag = "14")]
pub processing_time: u64,
#[prost(message, optional, tag = "15")]
pub details: ::core::option::Option<ProductDetails>,
#[prost(message, optional, tag = "16")]
pub media: ::core::option::Option<ProductMedia>,
#[prost(message, optional, tag = "17")]
pub offer: ::core::option::Option<ProductOffer>,
#[prost(message, optional, tag = "18")]
pub safety: ::core::option::Option<ProductSafety>,
#[prost(message, repeated, tag = "19")]
pub tags: ::prost::alloc::vec::Vec<ProductTag>,
#[prost(message, optional, tag = "20")]
pub metadata: ::core::option::Option<ProductMetadata>,
}
#[derive(serde::Serialize, serde::Deserialize)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ProductSnapshot {
#[prost(string, tag = "1")]
pub id: ::prost::alloc::string::String,
#[prost(string, tag = "2")]
pub title: ::prost::alloc::string::String,
#[prost(uint32, tag = "3")]
pub version: u32,
#[prost(uint32, tag = "4")]
pub schema_version: u32,
#[prost(message, optional, tag = "5")]
pub offer: ::core::option::Option<ProductOffer>,
}
#[derive(serde::Serialize, serde::Deserialize)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ProductSnapshotRequest {
#[prost(string, tag = "1")]
pub product_id: ::prost::alloc::string::String,
}
#[derive(serde::Serialize, serde::Deserialize)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ProductSnapshotResponse {
#[prost(oneof = "product_snapshot_response::Response", tags = "1, 2")]
pub response: ::core::option::Option<product_snapshot_response::Response>,
}
pub mod product_snapshot_response {
#[derive(serde::Serialize, serde::Deserialize)]
#[derive(Clone, PartialEq, ::prost::Oneof)]
pub enum Response {
#[prost(message, tag = "1")]
Data(super::ProductSnapshot),
#[prost(message, tag = "2")]
Error(super::super::super::shared::v1::AppError),
}
}
#[derive(serde::Serialize, serde::Deserialize)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ProductsCategoryRequest {
#[prost(string, tag = "1")]
pub category_id: ::prost::alloc::string::String,
#[prost(string, repeated, tag = "2")]
pub subcategory_ids: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
#[prost(message, optional, tag = "3")]
pub pagination: ::core::option::Option<super::super::shared::v1::PaginationRequest>,
}
#[derive(serde::Serialize, serde::Deserialize)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ProductsCategoryResponse {
#[prost(oneof = "products_category_response::Response", tags = "1, 2")]
pub response: ::core::option::Option<products_category_response::Response>,
}
pub mod products_category_response {
#[derive(serde::Serialize, serde::Deserialize)]
#[derive(Clone, PartialEq, ::prost::Oneof)]
pub enum Response {
#[prost(message, tag = "1")]
Data(super::ProductsCategoryResponseData),
#[prost(message, tag = "2")]
Error(super::super::super::shared::v1::AppError),
}
}
#[derive(serde::Serialize, serde::Deserialize)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ProductsCategoryResponseData {
#[prost(message, repeated, tag = "1")]
pub products: ::prost::alloc::vec::Vec<ProductsCategoryItem>,
#[prost(message, optional, tag = "2")]
pub pagination: ::core::option::Option<super::super::shared::v1::PaginationResponse>,
}
#[derive(serde::Serialize, serde::Deserialize)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ProductsCategoryItem {
#[prost(string, tag = "1")]
pub id: ::prost::alloc::string::String,
#[prost(string, tag = "2")]
pub title: ::prost::alloc::string::String,
#[prost(string, tag = "3")]
pub image: ::prost::alloc::string::String,
#[prost(string, tag = "4")]
pub variant_id: ::prost::alloc::string::String,
#[prost(uint32, tag = "5")]
pub price_cents: u32,
#[prost(uint32, optional, tag = "6")]
pub discount_price_cents: ::core::option::Option<u32>,
#[prost(uint32, optional, tag = "7")]
pub discount_percentage: ::core::option::Option<u32>,
#[prost(string, tag = "8")]
pub sold_by: ::prost::alloc::string::String,
#[prost(double, optional, tag = "9")]
pub rating: ::core::option::Option<f64>,
#[prost(uint32, optional, tag = "10")]
pub sold_count: ::core::option::Option<u32>,
#[prost(uint64, tag = "11")]
pub created_at: u64,
}
#[derive(serde::Serialize, serde::Deserialize)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ProductPrice {
#[prost(double, tag = "1")]
pub amount: f64,
#[prost(string, tag = "2")]
pub formatted: ::prost::alloc::string::String,
#[prost(double, optional, tag = "3")]
pub discount_price: ::core::option::Option<f64>,
#[prost(string, optional, tag = "4")]
pub save_amount: ::core::option::Option<::prost::alloc::string::String>,
#[prost(string, optional, tag = "5")]
pub save_percentage: ::core::option::Option<::prost::alloc::string::String>,
}
#[derive(serde::Serialize, serde::Deserialize)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ProductShippingInfo {
#[prost(bool, tag = "1")]
pub free: bool,
#[prost(enumeration = "ProductShippingMethod", tag = "2")]
pub method: i32,
#[prost(string, tag = "3")]
pub origin: ::prost::alloc::string::String,
#[prost(int32, tag = "4")]
pub min_estimated_days: i32,
#[prost(int32, tag = "5")]
pub max_estimated_days: i32,
}
#[derive(serde::Serialize, serde::Deserialize)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ProductItemMetadata {
#[prost(enumeration = "ProductItemMetadataType", tag = "1")]
pub r#type: i32,
#[prost(string, tag = "2")]
pub label: ::prost::alloc::string::String,
}
#[derive(serde::Serialize, serde::Deserialize)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ProductsToLikeRequest {
#[prost(message, optional, tag = "2")]
pub pagination: ::core::option::Option<super::super::shared::v1::PaginationRequest>,
}
#[derive(serde::Serialize, serde::Deserialize)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ProductsToLikeResponse {
#[prost(oneof = "products_to_like_response::Response", tags = "1, 2")]
pub response: ::core::option::Option<products_to_like_response::Response>,
}
pub mod products_to_like_response {
#[derive(serde::Serialize, serde::Deserialize)]
#[derive(Clone, PartialEq, ::prost::Oneof)]
pub enum Response {
#[prost(message, tag = "1")]
Data(super::ProductsToLikeResponseData),
#[prost(message, tag = "2")]
Error(super::super::super::shared::v1::AppError),
}
}
#[derive(serde::Serialize, serde::Deserialize)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ProductsToLikeResponseData {
#[prost(message, repeated, tag = "1")]
pub products: ::prost::alloc::vec::Vec<ProductToLikeListItem>,
#[prost(message, optional, tag = "2")]
pub pagination: ::core::option::Option<super::super::shared::v1::PaginationResponse>,
}
#[derive(serde::Serialize, serde::Deserialize)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ProductToLikeListItem {
#[prost(string, tag = "1")]
pub id: ::prost::alloc::string::String,
#[prost(string, tag = "2")]
pub title: ::prost::alloc::string::String,
#[prost(string, tag = "3")]
pub image: ::prost::alloc::string::String,
#[prost(message, optional, tag = "4")]
pub price: ::core::option::Option<ProductPrice>,
#[prost(double, optional, tag = "5")]
pub rating: ::core::option::Option<f64>,
#[prost(int32, optional, tag = "6")]
pub sold: ::core::option::Option<i32>,
#[prost(message, repeated, tag = "7")]
pub meta: ::prost::alloc::vec::Vec<ProductItemMetadata>,
#[prost(string, tag = "8")]
pub variant_id: ::prost::alloc::string::String,
}
#[derive(serde::Serialize, serde::Deserialize)]
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
#[repr(i32)]
pub enum ProductShippingMethod {
Unspecified = 0,
Standard = 1,
Express = 2,
}
impl ProductShippingMethod {
pub fn as_str_name(&self) -> &'static str {
match self {
Self::Unspecified => "PRODUCT_SHIPPING_METHOD_UNSPECIFIED",
Self::Standard => "PRODUCT_SHIPPING_METHOD_STANDARD",
Self::Express => "PRODUCT_SHIPPING_METHOD_EXPRESS",
}
}
pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
match value {
"PRODUCT_SHIPPING_METHOD_UNSPECIFIED" => Some(Self::Unspecified),
"PRODUCT_SHIPPING_METHOD_STANDARD" => Some(Self::Standard),
"PRODUCT_SHIPPING_METHOD_EXPRESS" => Some(Self::Express),
_ => None,
}
}
}
#[derive(serde::Serialize, serde::Deserialize)]
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
#[repr(i32)]
pub enum ProductItemMetadataType {
Unspecified = 0,
Coupon = 1,
NewShopper = 2,
Bundle = 3,
}
impl ProductItemMetadataType {
pub fn as_str_name(&self) -> &'static str {
match self {
Self::Unspecified => "PRODUCT_ITEM_METADATA_TYPE_UNSPECIFIED",
Self::Coupon => "PRODUCT_ITEM_METADATA_TYPE_COUPON",
Self::NewShopper => "PRODUCT_ITEM_METADATA_TYPE_NEW_SHOPPER",
Self::Bundle => "PRODUCT_ITEM_METADATA_TYPE_BUNDLE",
}
}
pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
match value {
"PRODUCT_ITEM_METADATA_TYPE_UNSPECIFIED" => Some(Self::Unspecified),
"PRODUCT_ITEM_METADATA_TYPE_COUPON" => Some(Self::Coupon),
"PRODUCT_ITEM_METADATA_TYPE_NEW_SHOPPER" => Some(Self::NewShopper),
"PRODUCT_ITEM_METADATA_TYPE_BUNDLE" => Some(Self::Bundle),
_ => None,
}
}
}
pub mod products_service_client {
#![allow(
unused_variables,
dead_code,
missing_docs,
clippy::wildcard_imports,
clippy::let_unit_value,
)]
use tonic::codegen::*;
use tonic::codegen::http::Uri;
#[derive(Debug, Clone)]
pub struct ProductsServiceClient<T> {
inner: tonic::client::Grpc<T>,
}
impl ProductsServiceClient<tonic::transport::Channel> {
pub async fn connect<D>(dst: D) -> Result<Self, tonic::transport::Error>
where
D: TryInto<tonic::transport::Endpoint>,
D::Error: Into<StdError>,
{
let conn = tonic::transport::Endpoint::new(dst)?.connect().await?;
Ok(Self::new(conn))
}
}
impl<T> ProductsServiceClient<T>
where
T: tonic::client::GrpcService<tonic::body::Body>,
T::Error: Into<StdError>,
T::ResponseBody: Body<Data = Bytes> + std::marker::Send + 'static,
<T::ResponseBody as Body>::Error: Into<StdError> + std::marker::Send,
{
pub fn new(inner: T) -> Self {
let inner = tonic::client::Grpc::new(inner);
Self { inner }
}
pub fn with_origin(inner: T, origin: Uri) -> Self {
let inner = tonic::client::Grpc::with_origin(inner, origin);
Self { inner }
}
pub fn with_interceptor<F>(
inner: T,
interceptor: F,
) -> ProductsServiceClient<InterceptedService<T, F>>
where
F: tonic::service::Interceptor,
T::ResponseBody: Default,
T: tonic::codegen::Service<
http::Request<tonic::body::Body>,
Response = http::Response<
<T as tonic::client::GrpcService<tonic::body::Body>>::ResponseBody,
>,
>,
<T as tonic::codegen::Service<
http::Request<tonic::body::Body>,
>>::Error: Into<StdError> + std::marker::Send + std::marker::Sync,
{
ProductsServiceClient::new(InterceptedService::new(inner, interceptor))
}
#[must_use]
pub fn send_compressed(mut self, encoding: CompressionEncoding) -> Self {
self.inner = self.inner.send_compressed(encoding);
self
}
#[must_use]
pub fn accept_compressed(mut self, encoding: CompressionEncoding) -> Self {
self.inner = self.inner.accept_compressed(encoding);
self
}
#[must_use]
pub fn max_decoding_message_size(mut self, limit: usize) -> Self {
self.inner = self.inner.max_decoding_message_size(limit);
self
}
#[must_use]
pub fn max_encoding_message_size(mut self, limit: usize) -> Self {
self.inner = self.inner.max_encoding_message_size(limit);
self
}
pub async fn product_create(
&mut self,
request: impl tonic::IntoRequest<super::ProductCreateRequest>,
) -> std::result::Result<
tonic::Response<super::ProductCreateResponse>,
tonic::Status,
> {
self.inner
.ready()
.await
.map_err(|e| {
tonic::Status::unknown(
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/products.v1.ProductsService/ProductCreate",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(GrpcMethod::new("products.v1.ProductsService", "ProductCreate"));
self.inner.unary(req, path, codec).await
}
pub async fn product_data(
&mut self,
request: impl tonic::IntoRequest<super::ProductDataRequest>,
) -> std::result::Result<
tonic::Response<super::ProductDataResponse>,
tonic::Status,
> {
self.inner
.ready()
.await
.map_err(|e| {
tonic::Status::unknown(
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/products.v1.ProductsService/ProductData",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(GrpcMethod::new("products.v1.ProductsService", "ProductData"));
self.inner.unary(req, path, codec).await
}
pub async fn products_to_like(
&mut self,
request: impl tonic::IntoRequest<super::ProductsToLikeRequest>,
) -> std::result::Result<
tonic::Response<super::ProductsToLikeResponse>,
tonic::Status,
> {
self.inner
.ready()
.await
.map_err(|e| {
tonic::Status::unknown(
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/products.v1.ProductsService/ProductsToLike",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new("products.v1.ProductsService", "ProductsToLike"),
);
self.inner.unary(req, path, codec).await
}
pub async fn product_snapshot(
&mut self,
request: impl tonic::IntoRequest<super::ProductSnapshotRequest>,
) -> std::result::Result<
tonic::Response<super::ProductSnapshotResponse>,
tonic::Status,
> {
self.inner
.ready()
.await
.map_err(|e| {
tonic::Status::unknown(
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/products.v1.ProductsService/ProductSnapshot",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new("products.v1.ProductsService", "ProductSnapshot"),
);
self.inner.unary(req, path, codec).await
}
pub async fn best_selling_products(
&mut self,
request: impl tonic::IntoRequest<super::BestSellingProductsRequest>,
) -> std::result::Result<
tonic::Response<super::BestSellingProductsResponse>,
tonic::Status,
> {
self.inner
.ready()
.await
.map_err(|e| {
tonic::Status::unknown(
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/products.v1.ProductsService/BestSellingProducts",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new("products.v1.ProductsService", "BestSellingProducts"),
);
self.inner.unary(req, path, codec).await
}
pub async fn big_discount_products(
&mut self,
request: impl tonic::IntoRequest<super::BigDiscountProductsRequest>,
) -> std::result::Result<
tonic::Response<super::BigDiscountProductsResponse>,
tonic::Status,
> {
self.inner
.ready()
.await
.map_err(|e| {
tonic::Status::unknown(
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/products.v1.ProductsService/BigDiscountProducts",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new("products.v1.ProductsService", "BigDiscountProducts"),
);
self.inner.unary(req, path, codec).await
}
pub async fn newly_added_products(
&mut self,
request: impl tonic::IntoRequest<super::NewlyAddedProductsRequest>,
) -> std::result::Result<
tonic::Response<super::NewlyAddedProductsResponse>,
tonic::Status,
> {
self.inner
.ready()
.await
.map_err(|e| {
tonic::Status::unknown(
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/products.v1.ProductsService/NewlyAddedProducts",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new("products.v1.ProductsService", "NewlyAddedProducts"),
);
self.inner.unary(req, path, codec).await
}
pub async fn hero_products(
&mut self,
request: impl tonic::IntoRequest<super::HeroProductsRequest>,
) -> std::result::Result<
tonic::Response<super::HeroProductsResponse>,
tonic::Status,
> {
self.inner
.ready()
.await
.map_err(|e| {
tonic::Status::unknown(
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/products.v1.ProductsService/HeroProducts",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(GrpcMethod::new("products.v1.ProductsService", "HeroProducts"));
self.inner.unary(req, path, codec).await
}
pub async fn product_details(
&mut self,
request: impl tonic::IntoRequest<super::ProductDetailsRequest>,
) -> std::result::Result<
tonic::Response<super::ProductDetailsResponse>,
tonic::Status,
> {
self.inner
.ready()
.await
.map_err(|e| {
tonic::Status::unknown(
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/products.v1.ProductsService/ProductDetails",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new("products.v1.ProductsService", "ProductDetails"),
);
self.inner.unary(req, path, codec).await
}
pub async fn category_navbar(
&mut self,
request: impl tonic::IntoRequest<super::CategoryNavbarRequest>,
) -> std::result::Result<
tonic::Response<super::CategoryNavbarResponse>,
tonic::Status,
> {
self.inner
.ready()
.await
.map_err(|e| {
tonic::Status::unknown(
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/products.v1.ProductsService/CategoryNavbar",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new("products.v1.ProductsService", "CategoryNavbar"),
);
self.inner.unary(req, path, codec).await
}
pub async fn products_category(
&mut self,
request: impl tonic::IntoRequest<super::ProductsCategoryRequest>,
) -> std::result::Result<
tonic::Response<super::ProductsCategoryResponse>,
tonic::Status,
> {
self.inner
.ready()
.await
.map_err(|e| {
tonic::Status::unknown(
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/products.v1.ProductsService/ProductsCategory",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new("products.v1.ProductsService", "ProductsCategory"),
);
self.inner.unary(req, path, codec).await
}
}
}
pub mod products_service_server {
#![allow(
unused_variables,
dead_code,
missing_docs,
clippy::wildcard_imports,
clippy::let_unit_value,
)]
use tonic::codegen::*;
#[async_trait]
pub trait ProductsService: std::marker::Send + std::marker::Sync + 'static {
async fn product_create(
&self,
request: tonic::Request<super::ProductCreateRequest>,
) -> std::result::Result<
tonic::Response<super::ProductCreateResponse>,
tonic::Status,
>;
async fn product_data(
&self,
request: tonic::Request<super::ProductDataRequest>,
) -> std::result::Result<
tonic::Response<super::ProductDataResponse>,
tonic::Status,
>;
async fn products_to_like(
&self,
request: tonic::Request<super::ProductsToLikeRequest>,
) -> std::result::Result<
tonic::Response<super::ProductsToLikeResponse>,
tonic::Status,
>;
async fn product_snapshot(
&self,
request: tonic::Request<super::ProductSnapshotRequest>,
) -> std::result::Result<
tonic::Response<super::ProductSnapshotResponse>,
tonic::Status,
>;
async fn best_selling_products(
&self,
request: tonic::Request<super::BestSellingProductsRequest>,
) -> std::result::Result<
tonic::Response<super::BestSellingProductsResponse>,
tonic::Status,
>;
async fn big_discount_products(
&self,
request: tonic::Request<super::BigDiscountProductsRequest>,
) -> std::result::Result<
tonic::Response<super::BigDiscountProductsResponse>,
tonic::Status,
>;
async fn newly_added_products(
&self,
request: tonic::Request<super::NewlyAddedProductsRequest>,
) -> std::result::Result<
tonic::Response<super::NewlyAddedProductsResponse>,
tonic::Status,
>;
async fn hero_products(
&self,
request: tonic::Request<super::HeroProductsRequest>,
) -> std::result::Result<
tonic::Response<super::HeroProductsResponse>,
tonic::Status,
>;
async fn product_details(
&self,
request: tonic::Request<super::ProductDetailsRequest>,
) -> std::result::Result<
tonic::Response<super::ProductDetailsResponse>,
tonic::Status,
>;
async fn category_navbar(
&self,
request: tonic::Request<super::CategoryNavbarRequest>,
) -> std::result::Result<
tonic::Response<super::CategoryNavbarResponse>,
tonic::Status,
>;
async fn products_category(
&self,
request: tonic::Request<super::ProductsCategoryRequest>,
) -> std::result::Result<
tonic::Response<super::ProductsCategoryResponse>,
tonic::Status,
>;
}
#[derive(Debug)]
pub struct ProductsServiceServer<T> {
inner: Arc<T>,
accept_compression_encodings: EnabledCompressionEncodings,
send_compression_encodings: EnabledCompressionEncodings,
max_decoding_message_size: Option<usize>,
max_encoding_message_size: Option<usize>,
}
impl<T> ProductsServiceServer<T> {
pub fn new(inner: T) -> Self {
Self::from_arc(Arc::new(inner))
}
pub fn from_arc(inner: Arc<T>) -> Self {
Self {
inner,
accept_compression_encodings: Default::default(),
send_compression_encodings: Default::default(),
max_decoding_message_size: None,
max_encoding_message_size: None,
}
}
pub fn with_interceptor<F>(
inner: T,
interceptor: F,
) -> InterceptedService<Self, F>
where
F: tonic::service::Interceptor,
{
InterceptedService::new(Self::new(inner), interceptor)
}
#[must_use]
pub fn accept_compressed(mut self, encoding: CompressionEncoding) -> Self {
self.accept_compression_encodings.enable(encoding);
self
}
#[must_use]
pub fn send_compressed(mut self, encoding: CompressionEncoding) -> Self {
self.send_compression_encodings.enable(encoding);
self
}
#[must_use]
pub fn max_decoding_message_size(mut self, limit: usize) -> Self {
self.max_decoding_message_size = Some(limit);
self
}
#[must_use]
pub fn max_encoding_message_size(mut self, limit: usize) -> Self {
self.max_encoding_message_size = Some(limit);
self
}
}
impl<T, B> tonic::codegen::Service<http::Request<B>> for ProductsServiceServer<T>
where
T: ProductsService,
B: Body + std::marker::Send + 'static,
B::Error: Into<StdError> + std::marker::Send + 'static,
{
type Response = http::Response<tonic::body::Body>;
type Error = std::convert::Infallible;
type Future = BoxFuture<Self::Response, Self::Error>;
fn poll_ready(
&mut self,
_cx: &mut Context<'_>,
) -> Poll<std::result::Result<(), Self::Error>> {
Poll::Ready(Ok(()))
}
fn call(&mut self, req: http::Request<B>) -> Self::Future {
match req.uri().path() {
"/products.v1.ProductsService/ProductCreate" => {
#[allow(non_camel_case_types)]
struct ProductCreateSvc<T: ProductsService>(pub Arc<T>);
impl<
T: ProductsService,
> tonic::server::UnaryService<super::ProductCreateRequest>
for ProductCreateSvc<T> {
type Response = super::ProductCreateResponse;
type Future = BoxFuture<
tonic::Response<Self::Response>,
tonic::Status,
>;
fn call(
&mut self,
request: tonic::Request<super::ProductCreateRequest>,
) -> Self::Future {
let inner = Arc::clone(&self.0);
let fut = async move {
<T as ProductsService>::product_create(&inner, request)
.await
};
Box::pin(fut)
}
}
let accept_compression_encodings = self.accept_compression_encodings;
let send_compression_encodings = self.send_compression_encodings;
let max_decoding_message_size = self.max_decoding_message_size;
let max_encoding_message_size = self.max_encoding_message_size;
let inner = self.inner.clone();
let fut = async move {
let method = ProductCreateSvc(inner);
let codec = tonic::codec::ProstCodec::default();
let mut grpc = tonic::server::Grpc::new(codec)
.apply_compression_config(
accept_compression_encodings,
send_compression_encodings,
)
.apply_max_message_size_config(
max_decoding_message_size,
max_encoding_message_size,
);
let res = grpc.unary(method, req).await;
Ok(res)
};
Box::pin(fut)
}
"/products.v1.ProductsService/ProductData" => {
#[allow(non_camel_case_types)]
struct ProductDataSvc<T: ProductsService>(pub Arc<T>);
impl<
T: ProductsService,
> tonic::server::UnaryService<super::ProductDataRequest>
for ProductDataSvc<T> {
type Response = super::ProductDataResponse;
type Future = BoxFuture<
tonic::Response<Self::Response>,
tonic::Status,
>;
fn call(
&mut self,
request: tonic::Request<super::ProductDataRequest>,
) -> Self::Future {
let inner = Arc::clone(&self.0);
let fut = async move {
<T as ProductsService>::product_data(&inner, request).await
};
Box::pin(fut)
}
}
let accept_compression_encodings = self.accept_compression_encodings;
let send_compression_encodings = self.send_compression_encodings;
let max_decoding_message_size = self.max_decoding_message_size;
let max_encoding_message_size = self.max_encoding_message_size;
let inner = self.inner.clone();
let fut = async move {
let method = ProductDataSvc(inner);
let codec = tonic::codec::ProstCodec::default();
let mut grpc = tonic::server::Grpc::new(codec)
.apply_compression_config(
accept_compression_encodings,
send_compression_encodings,
)
.apply_max_message_size_config(
max_decoding_message_size,
max_encoding_message_size,
);
let res = grpc.unary(method, req).await;
Ok(res)
};
Box::pin(fut)
}
"/products.v1.ProductsService/ProductsToLike" => {
#[allow(non_camel_case_types)]
struct ProductsToLikeSvc<T: ProductsService>(pub Arc<T>);
impl<
T: ProductsService,
> tonic::server::UnaryService<super::ProductsToLikeRequest>
for ProductsToLikeSvc<T> {
type Response = super::ProductsToLikeResponse;
type Future = BoxFuture<
tonic::Response<Self::Response>,
tonic::Status,
>;
fn call(
&mut self,
request: tonic::Request<super::ProductsToLikeRequest>,
) -> Self::Future {
let inner = Arc::clone(&self.0);
let fut = async move {
<T as ProductsService>::products_to_like(&inner, request)
.await
};
Box::pin(fut)
}
}
let accept_compression_encodings = self.accept_compression_encodings;
let send_compression_encodings = self.send_compression_encodings;
let max_decoding_message_size = self.max_decoding_message_size;
let max_encoding_message_size = self.max_encoding_message_size;
let inner = self.inner.clone();
let fut = async move {
let method = ProductsToLikeSvc(inner);
let codec = tonic::codec::ProstCodec::default();
let mut grpc = tonic::server::Grpc::new(codec)
.apply_compression_config(
accept_compression_encodings,
send_compression_encodings,
)
.apply_max_message_size_config(
max_decoding_message_size,
max_encoding_message_size,
);
let res = grpc.unary(method, req).await;
Ok(res)
};
Box::pin(fut)
}
"/products.v1.ProductsService/ProductSnapshot" => {
#[allow(non_camel_case_types)]
struct ProductSnapshotSvc<T: ProductsService>(pub Arc<T>);
impl<
T: ProductsService,
> tonic::server::UnaryService<super::ProductSnapshotRequest>
for ProductSnapshotSvc<T> {
type Response = super::ProductSnapshotResponse;
type Future = BoxFuture<
tonic::Response<Self::Response>,
tonic::Status,
>;
fn call(
&mut self,
request: tonic::Request<super::ProductSnapshotRequest>,
) -> Self::Future {
let inner = Arc::clone(&self.0);
let fut = async move {
<T as ProductsService>::product_snapshot(&inner, request)
.await
};
Box::pin(fut)
}
}
let accept_compression_encodings = self.accept_compression_encodings;
let send_compression_encodings = self.send_compression_encodings;
let max_decoding_message_size = self.max_decoding_message_size;
let max_encoding_message_size = self.max_encoding_message_size;
let inner = self.inner.clone();
let fut = async move {
let method = ProductSnapshotSvc(inner);
let codec = tonic::codec::ProstCodec::default();
let mut grpc = tonic::server::Grpc::new(codec)
.apply_compression_config(
accept_compression_encodings,
send_compression_encodings,
)
.apply_max_message_size_config(
max_decoding_message_size,
max_encoding_message_size,
);
let res = grpc.unary(method, req).await;
Ok(res)
};
Box::pin(fut)
}
"/products.v1.ProductsService/BestSellingProducts" => {
#[allow(non_camel_case_types)]
struct BestSellingProductsSvc<T: ProductsService>(pub Arc<T>);
impl<
T: ProductsService,
> tonic::server::UnaryService<super::BestSellingProductsRequest>
for BestSellingProductsSvc<T> {
type Response = super::BestSellingProductsResponse;
type Future = BoxFuture<
tonic::Response<Self::Response>,
tonic::Status,
>;
fn call(
&mut self,
request: tonic::Request<super::BestSellingProductsRequest>,
) -> Self::Future {
let inner = Arc::clone(&self.0);
let fut = async move {
<T as ProductsService>::best_selling_products(
&inner,
request,
)
.await
};
Box::pin(fut)
}
}
let accept_compression_encodings = self.accept_compression_encodings;
let send_compression_encodings = self.send_compression_encodings;
let max_decoding_message_size = self.max_decoding_message_size;
let max_encoding_message_size = self.max_encoding_message_size;
let inner = self.inner.clone();
let fut = async move {
let method = BestSellingProductsSvc(inner);
let codec = tonic::codec::ProstCodec::default();
let mut grpc = tonic::server::Grpc::new(codec)
.apply_compression_config(
accept_compression_encodings,
send_compression_encodings,
)
.apply_max_message_size_config(
max_decoding_message_size,
max_encoding_message_size,
);
let res = grpc.unary(method, req).await;
Ok(res)
};
Box::pin(fut)
}
"/products.v1.ProductsService/BigDiscountProducts" => {
#[allow(non_camel_case_types)]
struct BigDiscountProductsSvc<T: ProductsService>(pub Arc<T>);
impl<
T: ProductsService,
> tonic::server::UnaryService<super::BigDiscountProductsRequest>
for BigDiscountProductsSvc<T> {
type Response = super::BigDiscountProductsResponse;
type Future = BoxFuture<
tonic::Response<Self::Response>,
tonic::Status,
>;
fn call(
&mut self,
request: tonic::Request<super::BigDiscountProductsRequest>,
) -> Self::Future {
let inner = Arc::clone(&self.0);
let fut = async move {
<T as ProductsService>::big_discount_products(
&inner,
request,
)
.await
};
Box::pin(fut)
}
}
let accept_compression_encodings = self.accept_compression_encodings;
let send_compression_encodings = self.send_compression_encodings;
let max_decoding_message_size = self.max_decoding_message_size;
let max_encoding_message_size = self.max_encoding_message_size;
let inner = self.inner.clone();
let fut = async move {
let method = BigDiscountProductsSvc(inner);
let codec = tonic::codec::ProstCodec::default();
let mut grpc = tonic::server::Grpc::new(codec)
.apply_compression_config(
accept_compression_encodings,
send_compression_encodings,
)
.apply_max_message_size_config(
max_decoding_message_size,
max_encoding_message_size,
);
let res = grpc.unary(method, req).await;
Ok(res)
};
Box::pin(fut)
}
"/products.v1.ProductsService/NewlyAddedProducts" => {
#[allow(non_camel_case_types)]
struct NewlyAddedProductsSvc<T: ProductsService>(pub Arc<T>);
impl<
T: ProductsService,
> tonic::server::UnaryService<super::NewlyAddedProductsRequest>
for NewlyAddedProductsSvc<T> {
type Response = super::NewlyAddedProductsResponse;
type Future = BoxFuture<
tonic::Response<Self::Response>,
tonic::Status,
>;
fn call(
&mut self,
request: tonic::Request<super::NewlyAddedProductsRequest>,
) -> Self::Future {
let inner = Arc::clone(&self.0);
let fut = async move {
<T as ProductsService>::newly_added_products(
&inner,
request,
)
.await
};
Box::pin(fut)
}
}
let accept_compression_encodings = self.accept_compression_encodings;
let send_compression_encodings = self.send_compression_encodings;
let max_decoding_message_size = self.max_decoding_message_size;
let max_encoding_message_size = self.max_encoding_message_size;
let inner = self.inner.clone();
let fut = async move {
let method = NewlyAddedProductsSvc(inner);
let codec = tonic::codec::ProstCodec::default();
let mut grpc = tonic::server::Grpc::new(codec)
.apply_compression_config(
accept_compression_encodings,
send_compression_encodings,
)
.apply_max_message_size_config(
max_decoding_message_size,
max_encoding_message_size,
);
let res = grpc.unary(method, req).await;
Ok(res)
};
Box::pin(fut)
}
"/products.v1.ProductsService/HeroProducts" => {
#[allow(non_camel_case_types)]
struct HeroProductsSvc<T: ProductsService>(pub Arc<T>);
impl<
T: ProductsService,
> tonic::server::UnaryService<super::HeroProductsRequest>
for HeroProductsSvc<T> {
type Response = super::HeroProductsResponse;
type Future = BoxFuture<
tonic::Response<Self::Response>,
tonic::Status,
>;
fn call(
&mut self,
request: tonic::Request<super::HeroProductsRequest>,
) -> Self::Future {
let inner = Arc::clone(&self.0);
let fut = async move {
<T as ProductsService>::hero_products(&inner, request).await
};
Box::pin(fut)
}
}
let accept_compression_encodings = self.accept_compression_encodings;
let send_compression_encodings = self.send_compression_encodings;
let max_decoding_message_size = self.max_decoding_message_size;
let max_encoding_message_size = self.max_encoding_message_size;
let inner = self.inner.clone();
let fut = async move {
let method = HeroProductsSvc(inner);
let codec = tonic::codec::ProstCodec::default();
let mut grpc = tonic::server::Grpc::new(codec)
.apply_compression_config(
accept_compression_encodings,
send_compression_encodings,
)
.apply_max_message_size_config(
max_decoding_message_size,
max_encoding_message_size,
);
let res = grpc.unary(method, req).await;
Ok(res)
};
Box::pin(fut)
}
"/products.v1.ProductsService/ProductDetails" => {
#[allow(non_camel_case_types)]
struct ProductDetailsSvc<T: ProductsService>(pub Arc<T>);
impl<
T: ProductsService,
> tonic::server::UnaryService<super::ProductDetailsRequest>
for ProductDetailsSvc<T> {
type Response = super::ProductDetailsResponse;
type Future = BoxFuture<
tonic::Response<Self::Response>,
tonic::Status,
>;
fn call(
&mut self,
request: tonic::Request<super::ProductDetailsRequest>,
) -> Self::Future {
let inner = Arc::clone(&self.0);
let fut = async move {
<T as ProductsService>::product_details(&inner, request)
.await
};
Box::pin(fut)
}
}
let accept_compression_encodings = self.accept_compression_encodings;
let send_compression_encodings = self.send_compression_encodings;
let max_decoding_message_size = self.max_decoding_message_size;
let max_encoding_message_size = self.max_encoding_message_size;
let inner = self.inner.clone();
let fut = async move {
let method = ProductDetailsSvc(inner);
let codec = tonic::codec::ProstCodec::default();
let mut grpc = tonic::server::Grpc::new(codec)
.apply_compression_config(
accept_compression_encodings,
send_compression_encodings,
)
.apply_max_message_size_config(
max_decoding_message_size,
max_encoding_message_size,
);
let res = grpc.unary(method, req).await;
Ok(res)
};
Box::pin(fut)
}
"/products.v1.ProductsService/CategoryNavbar" => {
#[allow(non_camel_case_types)]
struct CategoryNavbarSvc<T: ProductsService>(pub Arc<T>);
impl<
T: ProductsService,
> tonic::server::UnaryService<super::CategoryNavbarRequest>
for CategoryNavbarSvc<T> {
type Response = super::CategoryNavbarResponse;
type Future = BoxFuture<
tonic::Response<Self::Response>,
tonic::Status,
>;
fn call(
&mut self,
request: tonic::Request<super::CategoryNavbarRequest>,
) -> Self::Future {
let inner = Arc::clone(&self.0);
let fut = async move {
<T as ProductsService>::category_navbar(&inner, request)
.await
};
Box::pin(fut)
}
}
let accept_compression_encodings = self.accept_compression_encodings;
let send_compression_encodings = self.send_compression_encodings;
let max_decoding_message_size = self.max_decoding_message_size;
let max_encoding_message_size = self.max_encoding_message_size;
let inner = self.inner.clone();
let fut = async move {
let method = CategoryNavbarSvc(inner);
let codec = tonic::codec::ProstCodec::default();
let mut grpc = tonic::server::Grpc::new(codec)
.apply_compression_config(
accept_compression_encodings,
send_compression_encodings,
)
.apply_max_message_size_config(
max_decoding_message_size,
max_encoding_message_size,
);
let res = grpc.unary(method, req).await;
Ok(res)
};
Box::pin(fut)
}
"/products.v1.ProductsService/ProductsCategory" => {
#[allow(non_camel_case_types)]
struct ProductsCategorySvc<T: ProductsService>(pub Arc<T>);
impl<
T: ProductsService,
> tonic::server::UnaryService<super::ProductsCategoryRequest>
for ProductsCategorySvc<T> {
type Response = super::ProductsCategoryResponse;
type Future = BoxFuture<
tonic::Response<Self::Response>,
tonic::Status,
>;
fn call(
&mut self,
request: tonic::Request<super::ProductsCategoryRequest>,
) -> Self::Future {
let inner = Arc::clone(&self.0);
let fut = async move {
<T as ProductsService>::products_category(&inner, request)
.await
};
Box::pin(fut)
}
}
let accept_compression_encodings = self.accept_compression_encodings;
let send_compression_encodings = self.send_compression_encodings;
let max_decoding_message_size = self.max_decoding_message_size;
let max_encoding_message_size = self.max_encoding_message_size;
let inner = self.inner.clone();
let fut = async move {
let method = ProductsCategorySvc(inner);
let codec = tonic::codec::ProstCodec::default();
let mut grpc = tonic::server::Grpc::new(codec)
.apply_compression_config(
accept_compression_encodings,
send_compression_encodings,
)
.apply_max_message_size_config(
max_decoding_message_size,
max_encoding_message_size,
);
let res = grpc.unary(method, req).await;
Ok(res)
};
Box::pin(fut)
}
_ => {
Box::pin(async move {
let mut response = http::Response::new(
tonic::body::Body::default(),
);
let headers = response.headers_mut();
headers
.insert(
tonic::Status::GRPC_STATUS,
(tonic::Code::Unimplemented as i32).into(),
);
headers
.insert(
http::header::CONTENT_TYPE,
tonic::metadata::GRPC_CONTENT_TYPE,
);
Ok(response)
})
}
}
}
}
impl<T> Clone for ProductsServiceServer<T> {
fn clone(&self) -> Self {
let inner = self.inner.clone();
Self {
inner,
accept_compression_encodings: self.accept_compression_encodings,
send_compression_encodings: self.send_compression_encodings,
max_decoding_message_size: self.max_decoding_message_size,
max_encoding_message_size: self.max_encoding_message_size,
}
}
}
pub const SERVICE_NAME: &str = "products.v1.ProductsService";
impl<T> tonic::server::NamedService for ProductsServiceServer<T> {
const NAME: &'static str = SERVICE_NAME;
}
}
#[derive(serde::Serialize, serde::Deserialize)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ChangeFeed {
#[prost(message, optional, tag = "1")]
pub after: ::core::option::Option<ProductOutbox>,
#[prost(message, optional, tag = "2")]
pub before: ::core::option::Option<ProductOutbox>,
#[prost(int64, tag = "3")]
pub updated: i64,
#[prost(int64, tag = "4")]
pub resolved: i64,
}
#[derive(serde::Serialize, serde::Deserialize)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ProductOutbox {
#[prost(string, tag = "1")]
pub id: ::prost::alloc::string::String,
#[prost(string, tag = "2")]
pub product_id: ::prost::alloc::string::String,
#[prost(string, tag = "3")]
pub r#type: ::prost::alloc::string::String,
#[prost(int64, optional, tag = "4")]
pub processed_at: ::core::option::Option<i64>,
#[prost(uint32, tag = "5")]
pub processing_attempts: u32,
#[prost(string, optional, tag = "6")]
pub last_error: ::core::option::Option<::prost::alloc::string::String>,
#[prost(int64, tag = "7")]
pub created_at: i64,
#[prost(int64, tag = "8")]
pub updated_at: i64,
#[prost(oneof = "product_outbox::Payload", tags = "9, 10, 11")]
pub payload: ::core::option::Option<product_outbox::Payload>,
}
pub mod product_outbox {
#[derive(serde::Serialize, serde::Deserialize)]
#[derive(Clone, PartialEq, ::prost::Oneof)]
pub enum Payload {
#[prost(message, tag = "9")]
Created(super::ProductCreatedEvent),
#[prost(message, tag = "10")]
Updated(super::ProductUpdatedEvent),
#[prost(message, tag = "11")]
Deleted(super::ProductDeletedEvent),
}
}
#[derive(serde::Serialize, serde::Deserialize)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ProductCreatedEvent {
#[prost(string, tag = "1")]
pub title: ::prost::alloc::string::String,
#[prost(string, tag = "2")]
pub description: ::prost::alloc::string::String,
}
#[derive(serde::Serialize, serde::Deserialize)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ProductUpdatedEvent {
#[prost(string, optional, tag = "1")]
pub title: ::core::option::Option<::prost::alloc::string::String>,
#[prost(string, optional, tag = "2")]
pub description: ::core::option::Option<::prost::alloc::string::String>,
}
#[derive(serde::Serialize, serde::Deserialize)]
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct ProductDeletedEvent {}