Skip to content

Latest commit

 

History

History
81 lines (68 loc) · 5.81 KB

CHANGELOG.md

File metadata and controls

81 lines (68 loc) · 5.81 KB

Changelog

Dependencies

  • The following workspace dependencies were updated
    • dependencies
      • stainless bumped from github:stainless-api/stl-api#stainless-0.1.3 to github:stainless-api/stl-api#stainless-0.1.1

0.1.0 (2023-12-06)

⚠ BREAKING CHANGES

  • 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(...)
  • the following functions have been moved:
    • stl.next.plugins.appRoute -> stlNextAppRoute
    • stl.next.plugins.pageRoute -> stlNextPageRoute
    • stl.next.plugins.appCatchAllRouter -> stlNextAppCatchAllRouter
    • 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
  • remove stl.response; use z.response instead (from import { z } from 'stainless')
  • rename the @stl-api/stl package to stainless
  • stl.expandParam has been renamed to stl.expands, stl.selectParam has been renamed to stl.selects

Features

  • add z.path, z.query, z.body, z.response (b67ab2e)
  • use all caps instead of lowercased HTTP methods in endpoints (6c25c78)

Bug Fixes

  • a bunch of issues with include/select (66fdf7e)
  • error messages and expansion/selection docs (fd135d8)
  • make Endpoint type non-recursive (c676b52)
  • pagination bugs (0be9aa1)
  • prisma: fix TS error (8fa5f68)
  • prisma: fix typo in includeFromQuery (02bfac1)
  • prismaPlugin: include top-level fields even if select is given (6ab0a9c)
  • react-query: fix ESM/CJS issue (ffc6c52)
  • remove debugger/print statements (0f555cc)
  • remove stray debugger and console.log statements (0d35c5b)
  • things that are breaking openapi generation (91e40be)
  • use import { z } from "stainless" (85520c1)

Code Refactoring

  • allow extend context via declaration merging instead of generic (afba2e7)
  • convert Stl instance to a class (9604c4e)
  • improve code organization, rename StainlessMetadata -> StlMetadata (f423e33)
  • move expand, select and pagination types to extended z (bd4cb04)
  • rename @stl-api/stl to stainless (bb60f65)
  • rename expand to include (7b35e50)
  • rename expandParam -> expands, selectParam -> selects (8613965)
  • stainless schema metadata (0e93a50)
  • t: use type parameters more (a3a84a4)
  • use standalone next route adapter functions (#6) (cb26747)

Dependencies

  • The following workspace dependencies were updated
    • dependencies
      • stainless bumped to 0.1.0