Comparing version 5.0.0 to 5.0.1
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.createReactHooks = exports.ZodiosReact = void 0; | ||
exports.ZodiosHooks = void 0; | ||
const react_query_1 = require("react-query"); | ||
const utils_1 = require("../utils"); | ||
class ZodiosReact { | ||
class ZodiosHooks { | ||
constructor(apiName, zodios) { | ||
@@ -47,6 +47,2 @@ this.apiName = apiName; | ||
} | ||
exports.ZodiosReact = ZodiosReact; | ||
function createReactHooks(apiName, zodios) { | ||
return new ZodiosReact(apiName, zodios); | ||
} | ||
exports.createReactHooks = createReactHooks; | ||
exports.ZodiosHooks = ZodiosHooks; |
@@ -1,1 +0,1 @@ | ||
export { createReactHooks, ZodiosReact } from "./hooks"; | ||
export { ZodiosHooks } from "./hooks"; |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.ZodiosReact = exports.createReactHooks = void 0; | ||
exports.ZodiosHooks = void 0; | ||
var hooks_1 = require("./hooks"); | ||
Object.defineProperty(exports, "createReactHooks", { enumerable: true, get: function () { return hooks_1.createReactHooks; } }); | ||
Object.defineProperty(exports, "ZodiosReact", { enumerable: true, get: function () { return hooks_1.ZodiosReact; } }); | ||
Object.defineProperty(exports, "ZodiosHooks", { enumerable: true, get: function () { return hooks_1.ZodiosHooks; } }); |
{ | ||
"name": "zodios", | ||
"description": "Typescript API client with autocompletion and zod validations", | ||
"version": "5.0.0", | ||
"version": "5.0.1", | ||
"main": "lib/index.js", | ||
@@ -6,0 +6,0 @@ "typings": "lib/index.d.ts", |
@@ -129,4 +129,4 @@ <h1 align="center">Zodios</h1> | ||
import { QueryClient, QueryClientProvider } from 'react-query'; | ||
import { Paths, Zodios, ZodiosRequestOptions } from "zodios"; | ||
import { createReactClient } from "zodios/react"; | ||
import { Zodios } from "zodios"; | ||
import { ZodiosHooks } from "zodios/react"; | ||
import { z } from "zod"; | ||
@@ -169,3 +169,3 @@ | ||
const zodios = new Zodios(baseUrl, api); | ||
const zodiosHooks = createReactHooks("jsonplaceholder", zodios); | ||
const zodiosHooks = new ZodiosHooks("jsonplaceholder", zodios); | ||
@@ -172,0 +172,0 @@ const Users = () => { |
Sorry, the diff of this file is too big to display
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
0
968756
15447