Skip to content

Commit

Permalink
chore(UI): Updating Otel Demo Proto (#3332)
Browse files Browse the repository at this point in the history
  • Loading branch information
xoscar committed Nov 3, 2023
1 parent 29936fd commit 95b3ef3
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
10 changes: 5 additions & 5 deletions web/src/constants/Demo.constants.ts
Expand Up @@ -205,31 +205,31 @@ export function getOtelDemo(demoSettings: Demo) {
name: 'Otel - List Products',
url: otelProductCatalog,
message: '',
method: 'hipstershop.ProductCatalogService.ListProducts',
method: 'oteldemo.ProductCatalogService.ListProducts',
description: 'Otel - List Products',
protoFile: otelProtoFile,
},
{
name: 'Otel - Get Product',
url: otelProductCatalog,
message: '{"id": "OLJCESPC7Z"}',
method: 'hipstershop.ProductCatalogService.GetProduct',
method: 'oteldemo.ProductCatalogService.GetProduct',
description: 'Otel - Get Product',
protoFile: otelProtoFile,
},
{
name: 'Otel - Add To Cart',
url: otelCart,
message: JSON.stringify({item: {product_id: 'OLJCESPC7Z', quantity: 1}, user_id: userId}),
method: 'hipstershop.CartService.AddItem',
method: 'oteldemo.CartService.AddItem',
description: 'Otel - Add To Cart',
protoFile: otelProtoFile,
},
{
name: 'Otel - Get Cart',
url: otelCart,
message: `{"user_id": "${userId}"}`,
method: 'hipstershop.CartService.GetCart',
method: 'oteldemo.CartService.GetCart',
description: 'Otel - Get Cart',
protoFile: otelProtoFile,
},
Expand All @@ -254,7 +254,7 @@ export function getOtelDemo(demoSettings: Demo) {
credit_card_expiration_month: 1,
},
}),
method: 'hipstershop.CheckoutService.PlaceOrder',
method: 'oteldemo.CheckoutService.PlaceOrder',
description: 'Otel - Checkout',
protoFile: otelProtoFile,
},
Expand Down
2 changes: 1 addition & 1 deletion web/src/constants/demos/otel-demo.proto.ts
Expand Up @@ -4,5 +4,5 @@
*/
export default {
proto:
'syntax = "proto3";\n\nimport "google/protobuf/timestamp.proto";\n\npackage hipstershop;\n\noption go_package = "genproto/hipstershop";\n\n\n\nservice CartService {\n rpc AddItem(AddItemRequest) returns (Empty) {}\n rpc GetCart(GetCartRequest) returns (Cart) {}\n rpc EmptyCart(EmptyCartRequest) returns (Empty) {}\n}\n\nmessage CartItem {\n string product_id = 1;\n int32 quantity = 2;\n}\n\nmessage AddItemRequest {\n string user_id = 1;\n CartItem item = 2;\n}\n\nmessage EmptyCartRequest {\n string user_id = 1;\n}\n\nmessage GetCartRequest {\n string user_id = 1;\n}\n\nmessage Cart {\n string user_id = 1;\n repeated CartItem items = 2;\n}\n\nmessage Empty {}\n\n\n\nservice RecommendationService {\n rpc ListRecommendations(ListRecommendationsRequest) returns (ListRecommendationsResponse){}\n}\n\nmessage ListRecommendationsRequest {\n string user_id = 1;\n repeated string product_ids = 2;\n}\n\nmessage ListRecommendationsResponse {\n repeated string product_ids = 1;\n}\n\n\n\nservice ProductCatalogService {\n rpc ListProducts(Empty) returns (ListProductsResponse) {}\n rpc GetProduct(GetProductRequest) returns (Product) {}\n rpc SearchProducts(SearchProductsRequest) returns (SearchProductsResponse) {}\n}\n\nmessage Product {\n string id = 1;\n string name = 2;\n string description = 3;\n string picture = 4;\n Money price_usd = 5;\n\n\n\n repeated string categories = 6;\n}\n\nmessage ListProductsResponse {\n repeated Product products = 1;\n}\n\nmessage GetProductRequest {\n string id = 1;\n}\n\nmessage SearchProductsRequest {\n string query = 1;\n}\n\nmessage SearchProductsResponse {\n repeated Product results = 1;\n}\n\n\n\nservice ShippingService {\n rpc GetQuote(GetQuoteRequest) returns (GetQuoteResponse) {}\n rpc ShipOrder(ShipOrderRequest) returns (ShipOrderResponse) {}\n}\n\nmessage GetQuoteRequest {\n Address address = 1;\n repeated CartItem items = 2;\n}\n\nmessage GetQuoteResponse {\n Money cost_usd = 1;\n}\n\nmessage ShipOrderRequest {\n Address address = 1;\n repeated CartItem items = 2;\n}\n\nmessage ShipOrderResponse {\n string tracking_id = 1;\n}\n\nmessage Address {\n string street_address = 1;\n string city = 2;\n string state = 3;\n string country = 4;\n int32 zip_code = 5;\n}\n\n\n\nservice CurrencyService {\n rpc GetSupportedCurrencies(Empty) returns (GetSupportedCurrenciesResponse) {}\n rpc Convert(CurrencyConversionRequest) returns (Money) {}\n}\n\n\nmessage Money {\n\n string currency_code = 1;\n\n\n\n int64 units = 2;\n\n\n\n\n\n\n\n int32 nanos = 3;\n}\n\nmessage GetSupportedCurrenciesResponse {\n\n repeated string currency_codes = 1;\n}\n\nmessage CurrencyConversionRequest {\n Money from = 1;\n\n\n string to_code = 2;\n}\n\n\n\nservice PaymentService {\n rpc Charge(ChargeRequest) returns (ChargeResponse) {}\n}\n\nmessage CreditCardInfo {\n string credit_card_number = 1;\n int32 credit_card_cvv = 2;\n int32 credit_card_expiration_year = 3;\n int32 credit_card_expiration_month = 4;\n}\n\nmessage ChargeRequest {\n Money amount = 1;\n CreditCardInfo credit_card = 2;\n}\n\nmessage ChargeResponse {\n string transaction_id = 1;\n}\n\n\n\nservice EmailService {\n rpc SendOrderConfirmation(SendOrderConfirmationRequest) returns (Empty) {}\n}\n\nmessage OrderItem {\n CartItem item = 1;\n Money cost = 2;\n}\n\nmessage OrderResult {\n string order_id = 1;\n string shipping_tracking_id = 2;\n Money shipping_cost = 3;\n Address shipping_address = 4;\n repeated OrderItem items = 5;\n}\n\nmessage SendOrderConfirmationRequest {\n string email = 1;\n OrderResult order = 2;\n}\n\n\n\n\nservice CheckoutService {\n rpc PlaceOrder(PlaceOrderRequest) returns (PlaceOrderResponse) {}\n}\n\nmessage PlaceOrderRequest {\n string user_id = 1;\n string user_currency = 2;\n\n Address address = 3;\n string email = 5;\n CreditCardInfo credit_card = 6;\n}\n\nmessage PlaceOrderResponse {\n OrderResult order = 1;\n}\n\n\n\nservice AdService {\n rpc GetAds(AdRequest) returns (AdResponse) {}\n}\n\nmessage AdRequest {\n\n repeated string context_keys = 1;\n}\n\nmessage AdResponse {\n repeated Ad ads = 1;\n}\n\nmessage Ad {\n\n string redirect_url = 1;\n\n\n string text = 2;\n}\n\n\n\nservice FeatureFlagService {\n rpc GetFlag(GetFlagRequest) returns (GetFlagResponse) {}\n rpc CreateFlag(CreateFlagRequest) returns (CreateFlagResponse) {}\n rpc UpdateFlag(UpdateFlagRequest) returns (UpdateFlagResponse) {}\n rpc ListFlags(ListFlagsRequest) returns (ListFlagsResponse) {}\n rpc DeleteFlag(DeleteFlagRequest) returns (DeleteFlagResponse) {}\n}\n\nmessage Flag {\n string name = 1;\n string description = 2;\n bool enabled = 3;\n google.protobuf.Timestamp created_at = 4;\n google.protobuf.Timestamp updated_at = 5;\n}\n\nmessage GetFlagRequest {\n string name = 1;\n}\n\nmessage GetFlagResponse {\n Flag flag = 1;\n}\n\nmessage CreateFlagRequest {\n string name = 1;\n string description = 2;\n bool enabled = 3;\n}\n\nmessage CreateFlagResponse {\n Flag flag = 1;\n}\n\nmessage UpdateFlagRequest {\n string name = 1;\n bool enabled = 2;\n}\n\nmessage UpdateFlagResponse {}\n\nmessage ListFlagsRequest {}\n\nmessage ListFlagsResponse {\n repeated Flag flag = 1;\n}\n\nmessage DeleteFlagRequest {\n string name = 1;\n}\n\nmessage DeleteFlagResponse {}\n',
'syntax = "proto3";\n\nimport "google/protobuf/timestamp.proto";\n\npackage oteldemo;\n\noption go_package = "genproto/oteldemo";\n\n\n\nservice CartService {\n rpc AddItem(AddItemRequest) returns (Empty) {}\n rpc GetCart(GetCartRequest) returns (Cart) {}\n rpc EmptyCart(EmptyCartRequest) returns (Empty) {}\n}\n\nmessage CartItem {\n string product_id = 1;\n int32 quantity = 2;\n}\n\nmessage AddItemRequest {\n string user_id = 1;\n CartItem item = 2;\n}\n\nmessage EmptyCartRequest {\n string user_id = 1;\n}\n\nmessage GetCartRequest {\n string user_id = 1;\n}\n\nmessage Cart {\n string user_id = 1;\n repeated CartItem items = 2;\n}\n\nmessage Empty {}\n\n\n\nservice RecommendationService {\n rpc ListRecommendations(ListRecommendationsRequest) returns (ListRecommendationsResponse){}\n}\n\nmessage ListRecommendationsRequest {\n string user_id = 1;\n repeated string product_ids = 2;\n}\n\nmessage ListRecommendationsResponse {\n repeated string product_ids = 1;\n}\n\n\n\nservice ProductCatalogService {\n rpc ListProducts(Empty) returns (ListProductsResponse) {}\n rpc GetProduct(GetProductRequest) returns (Product) {}\n rpc SearchProducts(SearchProductsRequest) returns (SearchProductsResponse) {}\n}\n\nmessage Product {\n string id = 1;\n string name = 2;\n string description = 3;\n string picture = 4;\n Money price_usd = 5;\n\n\n\n repeated string categories = 6;\n}\n\nmessage ListProductsResponse {\n repeated Product products = 1;\n}\n\nmessage GetProductRequest {\n string id = 1;\n}\n\nmessage SearchProductsRequest {\n string query = 1;\n}\n\nmessage SearchProductsResponse {\n repeated Product results = 1;\n}\n\n\n\nservice ShippingService {\n rpc GetQuote(GetQuoteRequest) returns (GetQuoteResponse) {}\n rpc ShipOrder(ShipOrderRequest) returns (ShipOrderResponse) {}\n}\n\nmessage GetQuoteRequest {\n Address address = 1;\n repeated CartItem items = 2;\n}\n\nmessage GetQuoteResponse {\n Money cost_usd = 1;\n}\n\nmessage ShipOrderRequest {\n Address address = 1;\n repeated CartItem items = 2;\n}\n\nmessage ShipOrderResponse {\n string tracking_id = 1;\n}\n\nmessage Address {\n string street_address = 1;\n string city = 2;\n string state = 3;\n string country = 4;\n int32 zip_code = 5;\n}\n\n\n\nservice CurrencyService {\n rpc GetSupportedCurrencies(Empty) returns (GetSupportedCurrenciesResponse) {}\n rpc Convert(CurrencyConversionRequest) returns (Money) {}\n}\n\n\nmessage Money {\n\n string currency_code = 1;\n\n\n\n int64 units = 2;\n\n\n\n\n\n\n\n int32 nanos = 3;\n}\n\nmessage GetSupportedCurrenciesResponse {\n\n repeated string currency_codes = 1;\n}\n\nmessage CurrencyConversionRequest {\n Money from = 1;\n\n\n string to_code = 2;\n}\n\n\n\nservice PaymentService {\n rpc Charge(ChargeRequest) returns (ChargeResponse) {}\n}\n\nmessage CreditCardInfo {\n string credit_card_number = 1;\n int32 credit_card_cvv = 2;\n int32 credit_card_expiration_year = 3;\n int32 credit_card_expiration_month = 4;\n}\n\nmessage ChargeRequest {\n Money amount = 1;\n CreditCardInfo credit_card = 2;\n}\n\nmessage ChargeResponse {\n string transaction_id = 1;\n}\n\n\n\nservice EmailService {\n rpc SendOrderConfirmation(SendOrderConfirmationRequest) returns (Empty) {}\n}\n\nmessage OrderItem {\n CartItem item = 1;\n Money cost = 2;\n}\n\nmessage OrderResult {\n string order_id = 1;\n string shipping_tracking_id = 2;\n Money shipping_cost = 3;\n Address shipping_address = 4;\n repeated OrderItem items = 5;\n}\n\nmessage SendOrderConfirmationRequest {\n string email = 1;\n OrderResult order = 2;\n}\n\n\n\n\nservice CheckoutService {\n rpc PlaceOrder(PlaceOrderRequest) returns (PlaceOrderResponse) {}\n}\n\nmessage PlaceOrderRequest {\n string user_id = 1;\n string user_currency = 2;\n\n Address address = 3;\n string email = 5;\n CreditCardInfo credit_card = 6;\n}\n\nmessage PlaceOrderResponse {\n OrderResult order = 1;\n}\n\n\n\nservice AdService {\n rpc GetAds(AdRequest) returns (AdResponse) {}\n}\n\nmessage AdRequest {\n\n repeated string context_keys = 1;\n}\n\nmessage AdResponse {\n repeated Ad ads = 1;\n}\n\nmessage Ad {\n\n string redirect_url = 1;\n\n\n string text = 2;\n}\n\n\n\nservice FeatureFlagService {\n rpc GetFlag(GetFlagRequest) returns (GetFlagResponse) {}\n rpc CreateFlag(CreateFlagRequest) returns (CreateFlagResponse) {}\n rpc UpdateFlag(UpdateFlagRequest) returns (UpdateFlagResponse) {}\n rpc ListFlags(ListFlagsRequest) returns (ListFlagsResponse) {}\n rpc DeleteFlag(DeleteFlagRequest) returns (DeleteFlagResponse) {}\n}\n\nmessage Flag {\n string name = 1;\n string description = 2;\n bool enabled = 3;\n google.protobuf.Timestamp created_at = 4;\n google.protobuf.Timestamp updated_at = 5;\n}\n\nmessage GetFlagRequest {\n string name = 1;\n}\n\nmessage GetFlagResponse {\n Flag flag = 1;\n}\n\nmessage CreateFlagRequest {\n string name = 1;\n string description = 2;\n bool enabled = 3;\n}\n\nmessage CreateFlagResponse {\n Flag flag = 1;\n}\n\nmessage UpdateFlagRequest {\n string name = 1;\n bool enabled = 2;\n}\n\nmessage UpdateFlagResponse {}\n\nmessage ListFlagsRequest {}\n\nmessage ListFlagsResponse {\n repeated Flag flag = 1;\n}\n\nmessage DeleteFlagRequest {\n string name = 1;\n}\n\nmessage DeleteFlagResponse {}\n',
};

0 comments on commit 95b3ef3

Please sign in to comment.