Skip to content

Releases: stainless-api/stl-api

react-query: v0.0.4

06 Dec 17:39
c621d4b
Compare
Choose a tag to compare

0.0.4 (2023-12-06)

Features

  • react-query: add invalidate methods to client (72bf533)
  • react-query: fix types for get method hooks (cba47e2)
  • react-query: implement useMutation and getQueryKey, add more documentation (#21) (9663cd8)
  • use all caps instead of lowercased HTTP methods in endpoints (6c25c78)

Bug Fixes

  • client query issues and make react-query client wrap base client (2458151)
  • react-query: add path param to query key (f22a6b3)
  • react-query: detect useQueryOptions (aed31cb)
  • react-query: fix another bug with queryKey (7802434)
  • react-query: fix client method return types (f49c674)
  • react-query: fix esm build (f1bbe28)
  • react-query: fix ESM/CJS issue (ffc6c52)
  • react-query: use safeParseAsync instead of safeParse (0c6b5f7)

Dependencies

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

prisma: v0.1.0

06 Dec 17:39
c621d4b
Compare
Choose a tag to compare

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

next: v0.1.0

06 Dec 17:39
c621d4b
Compare
Choose a tag to compare

0.1.0 (2023-12-06)

⚠ BREAKING CHANGES

  • removed UserContext type parameter in favor of using declaration merging to add custom props to StlContext. Also removed PartialStlContext type.
  • 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.
  • rename the @stl-api/stl package to stainless

Features

  • use all caps instead of lowercased HTTP methods in endpoints (6c25c78)

Bug Fixes

  • make Endpoint type non-recursive (c676b52)
  • react-query: fix ESM/CJS issue (ffc6c52)

Code Refactoring

  • allow extend context via declaration merging instead of generic (afba2e7)
  • convert Stl instance to a class (9604c4e)
  • rename @stl-api/stl to stainless (bb60f65)
  • use standalone next route adapter functions (#6) (cb26747)

Dependencies

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

next-auth: v0.1.0

06 Dec 17:39
c621d4b
Compare
Choose a tag to compare

0.1.0 (2023-12-06)

⚠ BREAKING CHANGES

  • removed UserContext type parameter in favor of using declaration merging to add custom props to StlContext. Also removed PartialStlContext type.
  • 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.
  • rename the @stl-api/stl package to stainless

Features

  • support authenticated: true config (7f6112a)

Bug Fixes

  • make Endpoint type non-recursive (c676b52)
  • react-query: fix ESM/CJS issue (ffc6c52)

Code Refactoring

  • allow extend context via declaration merging instead of generic (afba2e7)
  • convert Stl instance to a class (9604c4e)
  • rename @stl-api/stl to stainless (bb60f65)
  • use standalone next route adapter functions (#6) (cb26747)

Dependencies

  • The following workspace dependencies were updated
    • dependencies
      • @stl-api/next bumped to 0.1.0
      • stainless bumped to 0.1.0

express: v0.1.0

06 Dec 17:39
c621d4b
Compare
Choose a tag to compare

0.1.0 (2023-12-06)

⚠ BREAKING CHANGES

  • express: removed functions that create Express Applications and unexported functions that add endpoints to Express Applications/Routers

Features

  • express: add parseParams, rename/remove other function (511adb2)
  • express: add stlExecuteExpressRequest (7ed038a)
  • express: add stlPrepareExpressRequest function (d96c71e)
  • express: create @stl-api/express (#22) (0b5b3bd)
  • use all caps instead of lowercased HTTP methods in endpoints (6c25c78)

Bug Fixes

  • express Jest types (fa824a7)
  • express: add middleware to created routers (d5c4164)

Dependencies

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

cli: v0.1.0

06 Dec 17:39
c621d4b
Compare
Choose a tag to compare

0.1.0 (2023-12-06)

⚠ BREAKING CHANGES

  • cli: renamed package

Features

  • cli: allow custom generation directory (f4178d0)
  • complex value schema generation within user folder (b2beb37)
  • complex value schema generation within user folder (a85c704)
  • generate prettified code, ignore generated code in watch mode (7887d5d)
  • implement include and select magic schema generation (1eace8f)
  • implement include and select magic schema generation (61cda64)
  • rename magic to codegenSchema (90eb489)
  • support inlining Zod schemas into magic schemas (c7f179a)
  • support inlining Zod schemas into magic schemas (bd9911a)
  • use all caps instead of lowercased HTTP methods in endpoints (6c25c78)

Bug Fixes

  • cli: don't rewrite when any files are dirty (e08657e)
  • cli: fix bug with gitignored paths not getting ignored (b0cd963)
  • cli: fix potential issues with using prettier (5275f47)
  • cli: import handling improvements (6f3aa66)
  • cli: improve watch mode (f8c0e6e)
  • cli: module generation fixes (bef0ebb)
  • cli: preserve import positions for already imported codegen modules (cbd9d04)
  • cli: recover if prettier formatting fails (da838d0)
  • cli: tweak formatting a bit more (60557c5)
  • emit error when encountering Zod schema type (cc53600)
  • emit error when encountering Zod schema type (6991dad)
  • endpoint ident mangling, index generation (827c75b)

Code Refactoring

  • cli: rename from @stl-api/gen to @stl-api/cli (1640ecd)

Dependencies

  • The following workspace dependencies were updated
    • dependencies
      • ts-to-zod bumped to 0.0.4