Understand the TypeID format
mainA TypeID is a type-safe, K-sortable, globally unique identifier inspired by Stripe IDs. It is a modern extension of UUIDv7. A TypeID is canonically encoded as a lowercase string consisting of three parts:
- Type prefix: At most 63 characters in all lowercase
snake_caseASCII ([a-z_]). - Separator: An underscore
_. - UUID suffix: A 128-bit UUIDv7 encoded as a 26-character string using a modified base32 encoding.
Example of a TypeID with the type user:
user_2x4y6z8a0b1c2d3e4f5g6h7j8k
user_2x4y6z8a0b1c2d3e4f5g6h7j8k
└──┘ └────────────────────────┘
type uuid suffix (base32)