Socket
Socket
Sign inDemoInstall

@qdrant/openapi-typescript-fetch

Package Overview
Dependencies
Maintainers
2
Versions
7
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@qdrant/openapi-typescript-fetch - npm Package Compare versions

Comparing version 1.2.0 to 1.2.1

2

dist/types.d.ts

@@ -73,3 +73,3 @@ export declare type Method = 'get' | 'post' | 'put' | 'patch' | 'delete' | 'head' | 'options';

parameters: {
query: infer Q;
query?: infer Q;
};

@@ -76,0 +76,0 @@ } ? _CreateFetch<OP, {

{
"name": "@qdrant/openapi-typescript-fetch",
"description": "A typed fetch client for openapi-typescript",
"version": "1.2.0",
"version": "1.2.1",
"engines": {

@@ -6,0 +6,0 @@ "node": ">=12.0.0",

@@ -1,7 +0,6 @@

[![version(scoped)](https://img.shields.io/npm/v/openapi-typescript-fetch.svg)](https://www.npmjs.com/package/openapi-typescript-fetch)
[![codecov](https://codecov.io/gh/ajaishankar/openapi-typescript-fetch/branch/main/graph/badge.svg?token=Z8GQ6M5KAR)](https://codecov.io/gh/ajaishankar/openapi-typescript-fetch)
[![version(scoped)](https://img.shields.io/npm/v/openapi-typescript-fetch.svg)](https://www.npmjs.com/package/@qdrant/openapi-typescript-fetch)
# 📘️ openapi-typescript-fetch
A typed fetch client for [openapi-typescript](https://github.com/drwpow/openapi-typescript)
A typed fetch client for [openapi-typescript](https://github.com/drwpow/openapi-typescript)

@@ -13,3 +12,5 @@ ### Install

```
Or
```bash

@@ -90,3 +91,3 @@ yarn add openapi-typescript-fetch

if (e instanceof addPet.Error) {
// get discriminated union { status, data }
// get discriminated union { status, data }
const error = e.getActualType()

@@ -135,2 +136,3 @@ if (error.status === 400) {

Node CommonJS setup
```ts

@@ -178,3 +180,6 @@ // install node-fetch v2

const findPetsByStatus = fetcher.path('/pet/findByStatus').method('get').create()
const findPetsByStatus = fetcher
.path('/pet/findByStatus')
.method('get')
.create()

@@ -191,8 +196,7 @@ type Arg = FetchArgType<typeof findPetsByStatus>

```ts
const body = arrayRequestBody([{ item: 1 }], { param: 2 })
const body = arrayRequestBody([{ item: 1}], { param: 2})
// body type is { item: number }[] & { param: number }
```
Happy fetching! 👍
Happy fetching! 👍
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