New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat(frontend): prepare oss for submodule #2974
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great job my friend! 🔥
@select-item-selected-bg: #fafafa; | ||
/** Heading */ | ||
@heading-1-size: 18px; | ||
@heading-2-size: 16px; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great job!
*/ | ||
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', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We need to think about having this to be fetched from the actual repo in the future https://github.com/kubeshop/pokeshop/blob/master/api/protos/pokeshop.proto
method: 'GET', | ||
header: [], | ||
url: { | ||
raw: 'http://demo-pokemon-api.demo.svc.cluster.local/pokemon?take=20&skip=0', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We can also update the urls to match the configuration instead of hardcoded values
This PR introduces changes to the frontend app in order to support it as a git submodule.
Changes
typescript
to be able to use Project Referencescraco
and removecraco-less
packageJSON
files toTS
files, JSONs are not working in composite projects. See TS6307: JSON files not in file list when using composite projects TypeStrong/ts-loader#905parse-curl-js
package, it has some dependencies that breaks the SaaS buildredux store
code so it can be reusedFixes
Checklist
Screnshoot