Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

openapi-fetch

Package Overview
Dependencies
Maintainers
1
Versions
67
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

openapi-fetch - npm Package Compare versions

Comparing version 0.12.4 to 0.12.5

9

CHANGELOG.md
# openapi-fetch
## 0.12.5
### Patch Changes
- [#1937](https://github.com/openapi-ts/openapi-typescript/pull/1937) [`06163a2`](https://github.com/openapi-ts/openapi-typescript/commit/06163a2030eaf8d0579f624d86481e1205aef396) Thanks [@DjordyKoert](https://github.com/DjordyKoert)! - client data & error now return a union of possible types
- Updated dependencies [[`06163a2`](https://github.com/openapi-ts/openapi-typescript/commit/06163a2030eaf8d0579f624d86481e1205aef396)]:
- openapi-typescript-helpers@0.0.15
## 0.12.4

@@ -4,0 +13,0 @@

6

dist/index.d.ts

@@ -101,3 +101,3 @@ import type {

export type FetchResponse<T, Options, Media extends MediaType> =
export type FetchResponse<T extends Record<string | number, any>, Options, Media extends MediaType> =
| {

@@ -191,3 +191,3 @@ data: ParseAsResponse<SuccessResponse<ResponseObjectMap<T>, Media>, Options>;

export type ClientForPath<PathInfo, Media extends MediaType> = {
export type ClientForPath<PathInfo extends Record<string | number, any>, Media extends MediaType> = {
[Method in keyof PathInfo as Uppercase<string & Method>]: <Init extends MaybeOptionalInit<PathInfo, Method>>(

@@ -239,3 +239,3 @@ ...init: InitParam<Init>

export type PathBasedClient<Paths, Media extends MediaType = MediaType> = {
export type PathBasedClient<Paths extends Record<string | number, any>, Media extends MediaType = MediaType> = {
[Path in keyof Paths]: ClientForPath<Paths[Path], Media>;

@@ -242,0 +242,0 @@ };

@@ -101,3 +101,3 @@ import type {

export type FetchResponse<T, Options, Media extends MediaType> =
export type FetchResponse<T extends Record<string | number, any>, Options, Media extends MediaType> =
| {

@@ -191,3 +191,3 @@ data: ParseAsResponse<SuccessResponse<ResponseObjectMap<T>, Media>, Options>;

export type ClientForPath<PathInfo, Media extends MediaType> = {
export type ClientForPath<PathInfo extends Record<string | number, any>, Media extends MediaType> = {
[Method in keyof PathInfo as Uppercase<string & Method>]: <Init extends MaybeOptionalInit<PathInfo, Method>>(

@@ -239,3 +239,3 @@ ...init: InitParam<Init>

export type PathBasedClient<Paths, Media extends MediaType = MediaType> = {
export type PathBasedClient<Paths extends Record<string | number, any>, Media extends MediaType = MediaType> = {
[Path in keyof Paths]: ClientForPath<Paths[Path], Media>;

@@ -242,0 +242,0 @@ };

{
"name": "openapi-fetch",
"description": "Fast, type-safe fetch client for your OpenAPI schema. Only 6 kb (min). Works with React, Vue, Svelte, or vanilla JS.",
"version": "0.12.4",
"version": "0.12.5",
"author": {

@@ -50,3 +50,3 @@ "name": "Drew Powers",

"dependencies": {
"openapi-typescript-helpers": "^0.0.14"
"openapi-typescript-helpers": "^0.0.15"
},

@@ -53,0 +53,0 @@ "devDependencies": {

@@ -101,3 +101,3 @@ import type {

export type FetchResponse<T, Options, Media extends MediaType> =
export type FetchResponse<T extends Record<string | number, any>, Options, Media extends MediaType> =
| {

@@ -191,3 +191,3 @@ data: ParseAsResponse<SuccessResponse<ResponseObjectMap<T>, Media>, Options>;

export type ClientForPath<PathInfo, Media extends MediaType> = {
export type ClientForPath<PathInfo extends Record<string | number, any>, Media extends MediaType> = {
[Method in keyof PathInfo as Uppercase<string & Method>]: <Init extends MaybeOptionalInit<PathInfo, Method>>(

@@ -239,3 +239,3 @@ ...init: InitParam<Init>

export type PathBasedClient<Paths, Media extends MediaType = MediaType> = {
export type PathBasedClient<Paths extends Record<string | number, any>, Media extends MediaType = MediaType> = {
[Path in keyof Paths]: ClientForPath<Paths[Path], Media>;

@@ -242,0 +242,0 @@ };

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc