ERC1155: Get types of minted tokens from contract

Is there standard way how to get all types of tokens that were minted in ERC1155 contract?
Let’s say we’ve minted 30 tokens “A”, 20 tokens “B”, 10 tokens “C”.
How can I query contract to give me types A,B,C?
How can I then get totalSupply() of minted tokens per type? eg. for A totalSupply() is 30.
How opensea knows that, do they first know the metadata of all tokens per storefront/marketplace and then query contract?