Extends a Zod object schema with additional fields, supporting both Zod v3 and v4.
The type of the Zod object schema.
The Zod object schema instance (either v3 or v4).
The fields to add to the schema.
The extended Zod object schema.
If the schema is not a Zod v3 or v4 object.
Extends a Zod object schema with additional fields, supporting both Zod v3 and v4.