You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
stl: rename prepareRequest to parseParamsWithContext
t: use type parameters more
the following have been renamed:
z.expands -> z.includes
z.(...).expandable() -> z.(...).includable()
z.ExpandableInput -> z.IncludableInput
z.ExpandableOutput -> z.IncludableOutput
z.ExpandableZodType -> z.IncludableZodType
z.isExpandable -> z.isIncludable
z.expandableSymbol -> z.includableSymbol
removed UserContext type parameter in favor of using declaration merging to add custom props to StlContext. Also removed PartialStlContext type.
.stlMetadata has been replaced with .withMetadata, z.WithStlMetadata has been replaced with z.ZodMetadata, and z.ExtractStlMetadata has been replaced with z.extractMetadata/ z.extractDeepMetadata.
create stl instance with new Stl(...) instead of makeStl(...)
stl.next.plugins.pageCatchAllRouter -> stlNextPageCatchAllRouter
All of these functions can be imported from @stl-api/next.
*StainlessMetadata has been renamed to *StlMetadata:
WithStainlessMetadata -> WithStlMetadata
ExtractStainlessMetadata -> ExtractStlMetadata
extractStainlessMetadata -> extractStlMetadata
the following have been moved from the stl instance to import { z } from 'stainless':
stl.expands -> z.expands
stl.selects -> z.selects
stl.PaginationParams -> z.PaginationParams
stl.pageResponse -> z.pageResponse
the way to define selectable fields has changed slightly
for recursive schemas with expandable or selectable properties, it's now necessary to declare input and output types for those schemas. Unfortunately, I can't see any way around this.
remove stl.response; use z.response instead (from import { z } from 'stainless')