golem
golem copied to clipboard
Make sure golem-cli exposes the most simplest form/syntax of function names
This is the output of a component that has a cart resource with zero constructor parameters. We need to make sure we expose only the most simplest form of this syntax, as we support some level of syntax sugar in some cases. The syntax sugar details can be discovered from function-name module when solving this ticket.
{
"componentUrn": "urn:component:8d786f53-141e-43a0-8cd7-8706140aa410",
"componentVersion": 0,
"componentName": "twitter2",
"componentSize": 9630646,
"exports": [
"component:router/router-api.{[method]cart.get-product-type}(self: &handle<0>, product-id: string) -> enum { electronics, clothing, books, groceries }",
"component:router/router-api.{[method]cart.get-product-status}(self: &handle<0>, product-id: string) -> variant { available(u32), out-of-stock }",
"component:router/router-api.{[method]cart.add-item}(self: &handle<0>, item: record { product-id: string, name: string, price: float32, quantity: u32 })",
"component:router/router-api.{[method]cart.remove-item}(self: &handle<0>, product-id: string)",
"component:router/router-api.{[method]cart.update-item-quantity}(self: &handle<0>, product-id: string, quantity: u32)",
"component:router/router-api.{[method]cart.checkout}(self: &handle<0>) -> variant { error(string), success(record { order-id: string }) }",
"component:router/router-api.{[method]cart.get-cart-contents}(self: &handle<0>) -> list<record { product-id: string, name: string, price: float32, quantity: u32 }>",
"component:router/router-api.{[method]cart.merge-with}(self: &handle<0>, other-cart: &handle<0>)",
"component:router/router-api.{route-action}(action: variant { register(string), follow(u64), unfollow(u64), posttweet(string) }, user-id: u64) -> variant { success, failure(string) }",
"component:router/router-api.{route-query}(query-type: variant { userprofile, userfollowers, userfollowing, usertweets, usertimeline }, user-id: u64) -> variant { userprofileresponse(record { user-id: u64, username: string, followers: list<u64>, following: list<u64> }), userfollowersresponse(list<u64>), userfollowingresponse(list<u64>), usertweets-response(record { user-id: u64, tweets: list<record { tweet-id: u64, author-id: u64, content: string, timestamp: s64 }> }), usertimeline-response(list<record { author-id: u64, tweet: record { tweet-id: u64, author-id: u64, content: string, timestamp: s64 } }>), failure(string) }"
]
}