Releases: stainless-api/stl-api
Releases · stainless-api/stl-api
ts-to-zod: v0.0.5
Dependencies
- The following workspace dependencies were updated
- devDependencies
- stainless bumped to 0.1.1
- devDependencies
stainless: v0.1.1
react-query: v0.0.5
prisma: v0.1.1
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
- dependencies
next: v0.1.1
next-auth: v0.1.6
Dependencies
- The following workspace dependencies were updated
- dependencies
- @stl-api/next bumped from github:stainless-api/stl-api#next-0.1.6 to github:stainless-api/stl-api#next-0.1.1
- stainless bumped from github:stainless-api/stl-api#stainless-0.1.3 to github:stainless-api/stl-api#stainless-0.1.1
- dependencies
express: v0.1.2
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
- dependencies
cli: v0.1.1
Dependencies
- The following workspace dependencies were updated
- dependencies
- ts-to-zod bumped from github:stainless-api/stl-api#ts-to-zod-0.0.4 to github:stainless-api/stl-api#ts-to-zod-0.0.5
- dependencies
ts-to-zod: v0.0.4
0.0.4 (2023-12-06)
Features
- complex value schema generation within user folder (b2beb37)
- complex value schema generation within user folder (a85c704)
- export more helper utilities, including import statement generation (54a061b)
- export more helper utilities, including import statement generation (71e8e79)
- 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)
- implement magic schema generation for selection, pageResponse (a2416cd)
- implement magic schema generation for selection, pageResponse (74d9d5a)
- implement stl.types.endpoint support, along with CJS and ESM support. (1ad5450)
- implement stl.types.endpoint support, along with CJS and ESM support. (fbeb815)
- initial schema class with validate transform implementation (9aaf3d5)
- node_modules generation configuration, support for nested packages (9229f41)
- rename magic to codegenSchema (90eb489)
- rich diagnostics skeleton (fd79050)
- rich diagnostics skeleton (ce38718)
- significantly improve diagnostics quality (0a323f6)
- significantly improve diagnostics quality (bf04b13)
- stl.types.endpoint implementation work (115ebdf)
- stl.types.endpoint implementation work (543eda2)
- support default schema values (1ddcae3)
- 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 generate invalid characters within generated module names (080820a)
- cli: generate Refine correctly, error on failure to export stainless subclasses (812eee3)
- cli: module generation fixes (bef0ebb)
- correctly attribute origin of properties in diagnostics (ed261ef)
- correctly attribute origin of properties in diagnostics (ba30a98)
- correctly handle certain type alias and generic cases (25b9e53)
- correctly handle certain type alias and generic cases (f01f00c)
- emit error when encountering Zod schema type (cc53600)
- emit error when encountering Zod schema type (6991dad)
- functional support for in type alias definition position (c97a5bc)
- generate error on illegal typeof uses (6a70631)
- generate package imports with absolute paths (b91399a)
- generate package imports with absolute paths (cb1703c)
- handle more complex enum and class usages (ce7b938)
- handle more complex enum and class usages (795a9ef)
- handle multiple declarations for symbol correctly (7a5de0c)
- handle multiple declarations for symbol correctly (fa81f8a)
- import z constant in generated files (49a50a4)
- import z constant in generated files (e9d1867)
- malfunctioning conditional type over any (860f62a)
- malfunctioning conditional type over any (da42f1c)
- mangle imported types within generated files (02839f6)
- mangle imported types within generated files (d7c0ebe)
- minor cleanup (8a8691e)
- minor cleanup (d55b035)
- properly export root type schemas (5bdf953)
- properly export root type schemas (cf7228b)
- string regex validation generation, expand object schema (584c766)
- string regex validation generation, expand object schema (8870365)
- strip .ts extension off import paths (9b6e8c3)
- strip .ts extension off import paths (0fdc1db)
- support enum and class generation properly (218a3bd)
- support enum and class generation properly (8e50352)
- update to pass diagnostics root and use correct import (7f43ac1)
- update to pass diagnostics root and use correct import (2cc1839)
- use correct schema value when importing type (4873796)
- various new schema type fixes (02145d7)
Dependencies
- The following workspace dependencies were updated
- devDependencies
- stainless bumped to 0.1.0
- devDependencies
stainless: v0.1.0
0.1.0 (2023-12-06)
⚠ BREAKING CHANGES
- 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 withz.ZodMetadata
, andz.ExtractStlMetadata
has been replaced withz.extractMetadata
/z.extractDeepMetadata
.- create
stl
instance withnew Stl(...)
instead ofmakeStl(...)
- 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 toimport { 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'
) - rename the
@stl-api/stl
package tostainless
Features
- add stl.magic function (eb364e2)
- add stl.magic function (f1f4964)
- add z.CircularModel helper (8b09e67)
- add z.path, z.query, z.body, z.response (b67ab2e)
- better typing (c9cf3a0)
- cli: allow endpoint handler to be optional (d3283e9)
- complex value schema generation within user folder (b2beb37)
- complex value schema generation within user folder (a85c704)
- implement include and select magic schema generation (1eace8f)
- implement include and select magic schema generation (61cda64)
- implement magic schema generation for selection, pageResponse (a2416cd)
- implement magic schema generation for selection, pageResponse (74d9d5a)
- implement stl.types.endpoint support, along with CJS and ESM support. (1ad5450)
- implement stl.types.endpoint support, along with CJS and ESM support. (fbeb815)
- initial schema class with validate transform implementation (9aaf3d5)
- make depth parameter of z.expands/z.selects optional (7566a02)
- react-query: implement useMutation and getQueryKey, add more documentation (#21) (9663cd8)
- rename magic to codegenSchema (90eb489)
- stainless: add stl.prepareRequest method (c58dc22)
- stl: add parseParams, rename prepareRequest (e21f8e2)
- support authenticated: true config (7f6112a)
- support default schema values (1ddcae3)
- use all caps instead of lowercased HTTP methods in endpoints (6c25c78)
Bug Fixes
- a bunch of issues with include/select (66fdf7e)
- client query issues and make react-query client wrap base client (2458151)
- client: throw error on 4xx/5xx (585e0c3)
- client: use GET for retrieve actions (6049df4)
- coerceParams: fix bugs and test (1f5294f)
- endpoint ident mangling, index generation (827c75b)
- error messages and expansion/selection docs (fd135d8)
- expand + select bug (a9d7125)
- expand types (2e3f635)
- fix stl.magic and t.input types (#23) (7b71730)
- fix stl.magic and t.input types (#23) (4e1c182)
- include transform-refine type conversion (566ff1e)
- make Endpoint type non-recursive (c676b52)
- make openapi generation work with new TypeSchemas (ad5ef4f)
- mark expands and selects params (2869e8c)
- pagination bugs (0be9aa1)
- propagate stl metadata in .optional()/.nullable()/.nullish() (ac7d368)
- react-query: fix ESM/CJS issue (ffc6c52)
- remove debugger/print statements (0f555cc)
- remove stray debugger and console.log statements (0d35c5b)
- selectable field strategy (f6c4633)
- stainless: auto-coerce path and query params (068df62)
- stainless: fix openapi endpoint (e8767aa)
- stainless: fix openapi generation (56133a1)
- stainless: fix toZod and make handler optional (2dcd256)
- stainless: fix typo (370b936)
- stainless: implement more practical param coercion (ac98106)
- stainless: improve coerceParams function (4859154)
- stainless: tweak and document param coercion ([5188fd2](https://git...