@readyfor/api-client-pigeon 0.0.1-pr895.4cba339

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/LICENSE.md ADDED
@@ -0,0 +1 @@
1
+ Copyright (C) 2011 READYFOR Inc.
@@ -0,0 +1,7 @@
1
+ // src/components.ts
2
+ import { z } from "zod";
3
+ var ExampleModel = z.object({ value: z.string() });
4
+
5
+ export {
6
+ ExampleModel
7
+ };
@@ -0,0 +1,20 @@
1
+ import {
2
+ ExampleModel
3
+ } from "./chunk-77MRBHHK.mjs";
4
+
5
+ // src/fetch/v1Example.ts
6
+ import {
7
+ createJsonFetcher,
8
+ __internal__requestUrl
9
+ } from "@readyfor/api-client-base";
10
+ var buildV1ExampleGetFetcher = (requestInit) => createJsonFetcher(ExampleModel, { ...requestInit });
11
+ var getV1Example = (requestBody, requestInit) => buildV1ExampleGetFetcher()(__internal__requestUrl("/api/v1/example"), {
12
+ ...requestInit,
13
+ method: "GET",
14
+ body: requestBody
15
+ });
16
+
17
+ export {
18
+ buildV1ExampleGetFetcher,
19
+ getV1Example
20
+ };
@@ -0,0 +1,39 @@
1
+ import {
2
+ buildV1ExampleGetFetcher
3
+ } from "./chunk-BPM425IG.mjs";
4
+
5
+ // src/hooks/useV1Example.ts
6
+ import useSWRImmutable from "swr/immutable";
7
+ import useSWRInfinite from "swr/infinite";
8
+ import useSWR from "swr";
9
+ import { __internal__requestUrl } from "@readyfor/api-client-base";
10
+ var v1ExampleGetFetcher = buildV1ExampleGetFetcher();
11
+ var useV1Example = (swrConfig) => {
12
+ const key = __internal__requestUrl("/api/v1/example");
13
+ const result = useSWR(
14
+ swrConfig?.shouldNotFetch ? null : key,
15
+ v1ExampleGetFetcher,
16
+ swrConfig
17
+ );
18
+ return { key, ...result };
19
+ };
20
+ var useV1ExampleImmutable = (swrConfig) => {
21
+ const key = __internal__requestUrl("/api/v1/example");
22
+ const result = useSWRImmutable(
23
+ swrConfig?.shouldNotFetch ? null : key,
24
+ v1ExampleGetFetcher,
25
+ swrConfig
26
+ );
27
+ return { key, ...result };
28
+ };
29
+ var useV1ExampleInfinite = (getKey, swrConfig) => useSWRInfinite(
30
+ getKey(() => __internal__requestUrl()),
31
+ v1ExampleGetFetcher,
32
+ swrConfig
33
+ );
34
+
35
+ export {
36
+ useV1Example,
37
+ useV1ExampleImmutable,
38
+ useV1ExampleInfinite
39
+ };
File without changes
@@ -0,0 +1,11 @@
1
+ import { z } from 'zod';
2
+
3
+ declare const ExampleModel: z.ZodObject<{
4
+ value: z.ZodString;
5
+ }, "strip", z.ZodTypeAny, {
6
+ value: string;
7
+ }, {
8
+ value: string;
9
+ }>;
10
+
11
+ export { ExampleModel };
@@ -0,0 +1,11 @@
1
+ import { z } from 'zod';
2
+
3
+ declare const ExampleModel: z.ZodObject<{
4
+ value: z.ZodString;
5
+ }, "strip", z.ZodTypeAny, {
6
+ value: string;
7
+ }, {
8
+ value: string;
9
+ }>;
10
+
11
+ export { ExampleModel };
@@ -0,0 +1,31 @@
1
+ "use strict";
2
+ var __defProp = Object.defineProperty;
3
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
+ var __getOwnPropNames = Object.getOwnPropertyNames;
5
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
6
+ var __export = (target, all) => {
7
+ for (var name in all)
8
+ __defProp(target, name, { get: all[name], enumerable: true });
9
+ };
10
+ var __copyProps = (to, from, except, desc) => {
11
+ if (from && typeof from === "object" || typeof from === "function") {
12
+ for (let key of __getOwnPropNames(from))
13
+ if (!__hasOwnProp.call(to, key) && key !== except)
14
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
15
+ }
16
+ return to;
17
+ };
18
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
19
+
20
+ // src/components.ts
21
+ var components_exports = {};
22
+ __export(components_exports, {
23
+ ExampleModel: () => ExampleModel
24
+ });
25
+ module.exports = __toCommonJS(components_exports);
26
+ var import_zod = require("zod");
27
+ var ExampleModel = import_zod.z.object({ value: import_zod.z.string() });
28
+ // Annotate the CommonJS export names for ESM import in node:
29
+ 0 && (module.exports = {
30
+ ExampleModel
31
+ });
@@ -0,0 +1,6 @@
1
+ import {
2
+ ExampleModel
3
+ } from "./chunk-77MRBHHK.mjs";
4
+ export {
5
+ ExampleModel
6
+ };
@@ -0,0 +1,12 @@
1
+ import { paths } from '../schemaType.mjs';
2
+
3
+ type V1ExampleGetOperation = paths["/api/v1/example"]["get"];
4
+ type V1ExampleGetResponse = V1ExampleGetOperation["responses"]["200"]["content"]["application/json"];
5
+ declare const buildV1ExampleGetFetcher: (requestInit?: RequestInit) => (input: RequestInfo, requestInit?: RequestInit) => Promise<{
6
+ value: string;
7
+ }>;
8
+ declare const getV1Example: (requestBody: FormData, requestInit?: RequestInit) => Promise<{
9
+ value: string;
10
+ }>;
11
+
12
+ export { type V1ExampleGetResponse, buildV1ExampleGetFetcher, getV1Example };
@@ -0,0 +1,12 @@
1
+ import { paths } from '../schemaType.js';
2
+
3
+ type V1ExampleGetOperation = paths["/api/v1/example"]["get"];
4
+ type V1ExampleGetResponse = V1ExampleGetOperation["responses"]["200"]["content"]["application/json"];
5
+ declare const buildV1ExampleGetFetcher: (requestInit?: RequestInit) => (input: RequestInfo, requestInit?: RequestInit) => Promise<{
6
+ value: string;
7
+ }>;
8
+ declare const getV1Example: (requestBody: FormData, requestInit?: RequestInit) => Promise<{
9
+ value: string;
10
+ }>;
11
+
12
+ export { type V1ExampleGetResponse, buildV1ExampleGetFetcher, getV1Example };
@@ -0,0 +1,44 @@
1
+ "use strict";
2
+ var __defProp = Object.defineProperty;
3
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
+ var __getOwnPropNames = Object.getOwnPropertyNames;
5
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
6
+ var __export = (target, all) => {
7
+ for (var name in all)
8
+ __defProp(target, name, { get: all[name], enumerable: true });
9
+ };
10
+ var __copyProps = (to, from, except, desc) => {
11
+ if (from && typeof from === "object" || typeof from === "function") {
12
+ for (let key of __getOwnPropNames(from))
13
+ if (!__hasOwnProp.call(to, key) && key !== except)
14
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
15
+ }
16
+ return to;
17
+ };
18
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
19
+
20
+ // src/fetch/v1Example.ts
21
+ var v1Example_exports = {};
22
+ __export(v1Example_exports, {
23
+ buildV1ExampleGetFetcher: () => buildV1ExampleGetFetcher,
24
+ getV1Example: () => getV1Example
25
+ });
26
+ module.exports = __toCommonJS(v1Example_exports);
27
+ var import_api_client_base = require("@readyfor/api-client-base");
28
+
29
+ // src/components.ts
30
+ var import_zod = require("zod");
31
+ var ExampleModel = import_zod.z.object({ value: import_zod.z.string() });
32
+
33
+ // src/fetch/v1Example.ts
34
+ var buildV1ExampleGetFetcher = (requestInit) => (0, import_api_client_base.createJsonFetcher)(ExampleModel, { ...requestInit });
35
+ var getV1Example = (requestBody, requestInit) => buildV1ExampleGetFetcher()((0, import_api_client_base.__internal__requestUrl)("/api/v1/example"), {
36
+ ...requestInit,
37
+ method: "GET",
38
+ body: requestBody
39
+ });
40
+ // Annotate the CommonJS export names for ESM import in node:
41
+ 0 && (module.exports = {
42
+ buildV1ExampleGetFetcher,
43
+ getV1Example
44
+ });
@@ -0,0 +1,9 @@
1
+ import {
2
+ buildV1ExampleGetFetcher,
3
+ getV1Example
4
+ } from "../chunk-BPM425IG.mjs";
5
+ import "../chunk-77MRBHHK.mjs";
6
+ export {
7
+ buildV1ExampleGetFetcher,
8
+ getV1Example
9
+ };
@@ -0,0 +1,6 @@
1
+ export { useV1Example, useV1ExampleImmutable, useV1ExampleInfinite } from './useV1Example.mjs';
2
+ import 'swr/infinite';
3
+ import 'swr';
4
+ import '@readyfor/api-client-base/react';
5
+ import '../fetch/v1Example.mjs';
6
+ import '../schemaType.mjs';
@@ -0,0 +1,6 @@
1
+ export { useV1Example, useV1ExampleImmutable, useV1ExampleInfinite } from './useV1Example.js';
2
+ import 'swr/infinite';
3
+ import 'swr';
4
+ import '@readyfor/api-client-base/react';
5
+ import '../fetch/v1Example.js';
6
+ import '../schemaType.js';
@@ -0,0 +1,83 @@
1
+ "use strict";
2
+ var __create = Object.create;
3
+ var __defProp = Object.defineProperty;
4
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
5
+ var __getOwnPropNames = Object.getOwnPropertyNames;
6
+ var __getProtoOf = Object.getPrototypeOf;
7
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
8
+ var __export = (target, all) => {
9
+ for (var name in all)
10
+ __defProp(target, name, { get: all[name], enumerable: true });
11
+ };
12
+ var __copyProps = (to, from, except, desc) => {
13
+ if (from && typeof from === "object" || typeof from === "function") {
14
+ for (let key of __getOwnPropNames(from))
15
+ if (!__hasOwnProp.call(to, key) && key !== except)
16
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
17
+ }
18
+ return to;
19
+ };
20
+ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
21
+ // If the importer is in node compatibility mode or this is not an ESM
22
+ // file that has been converted to a CommonJS file using a Babel-
23
+ // compatible transform (i.e. "__esModule" has not been set), then set
24
+ // "default" to the CommonJS "module.exports" for node compatibility.
25
+ isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
26
+ mod
27
+ ));
28
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
29
+
30
+ // src/hooks/index.ts
31
+ var hooks_exports = {};
32
+ __export(hooks_exports, {
33
+ useV1Example: () => useV1Example,
34
+ useV1ExampleImmutable: () => useV1ExampleImmutable,
35
+ useV1ExampleInfinite: () => useV1ExampleInfinite
36
+ });
37
+ module.exports = __toCommonJS(hooks_exports);
38
+
39
+ // src/hooks/useV1Example.ts
40
+ var import_immutable = __toESM(require("swr/immutable"));
41
+ var import_infinite = __toESM(require("swr/infinite"));
42
+ var import_swr = __toESM(require("swr"));
43
+ var import_api_client_base2 = require("@readyfor/api-client-base");
44
+
45
+ // src/components.ts
46
+ var import_zod = require("zod");
47
+ var ExampleModel = import_zod.z.object({ value: import_zod.z.string() });
48
+
49
+ // src/fetch/v1Example.ts
50
+ var import_api_client_base = require("@readyfor/api-client-base");
51
+ var buildV1ExampleGetFetcher = (requestInit) => (0, import_api_client_base.createJsonFetcher)(ExampleModel, { ...requestInit });
52
+
53
+ // src/hooks/useV1Example.ts
54
+ var v1ExampleGetFetcher = buildV1ExampleGetFetcher();
55
+ var useV1Example = (swrConfig) => {
56
+ const key = (0, import_api_client_base2.__internal__requestUrl)("/api/v1/example");
57
+ const result = (0, import_swr.default)(
58
+ swrConfig?.shouldNotFetch ? null : key,
59
+ v1ExampleGetFetcher,
60
+ swrConfig
61
+ );
62
+ return { key, ...result };
63
+ };
64
+ var useV1ExampleImmutable = (swrConfig) => {
65
+ const key = (0, import_api_client_base2.__internal__requestUrl)("/api/v1/example");
66
+ const result = (0, import_immutable.default)(
67
+ swrConfig?.shouldNotFetch ? null : key,
68
+ v1ExampleGetFetcher,
69
+ swrConfig
70
+ );
71
+ return { key, ...result };
72
+ };
73
+ var useV1ExampleInfinite = (getKey, swrConfig) => (0, import_infinite.default)(
74
+ getKey(() => (0, import_api_client_base2.__internal__requestUrl)()),
75
+ v1ExampleGetFetcher,
76
+ swrConfig
77
+ );
78
+ // Annotate the CommonJS export names for ESM import in node:
79
+ 0 && (module.exports = {
80
+ useV1Example,
81
+ useV1ExampleImmutable,
82
+ useV1ExampleInfinite
83
+ });
@@ -0,0 +1,13 @@
1
+ import {
2
+ useV1Example,
3
+ useV1ExampleImmutable,
4
+ useV1ExampleInfinite
5
+ } from "../chunk-DX53K7VW.mjs";
6
+ import "../chunk-WY7GF7TX.mjs";
7
+ import "../chunk-BPM425IG.mjs";
8
+ import "../chunk-77MRBHHK.mjs";
9
+ export {
10
+ useV1Example,
11
+ useV1ExampleImmutable,
12
+ useV1ExampleInfinite
13
+ };
@@ -0,0 +1,37 @@
1
+ import * as swr_infinite from 'swr/infinite';
2
+ import { SWRInfiniteKeyLoader, SWRInfiniteConfiguration } from 'swr/infinite';
3
+ import * as swr from 'swr';
4
+ import { Arguments } from 'swr';
5
+ import { Configuration } from '@readyfor/api-client-base/react';
6
+ import { V1ExampleGetResponse } from '../fetch/v1Example.mjs';
7
+ import '../schemaType.mjs';
8
+
9
+ declare const useV1Example: (swrConfig: Configuration<V1ExampleGetResponse>) => {
10
+ data: {
11
+ value: string;
12
+ } | undefined;
13
+ error: any;
14
+ mutate: swr.KeyedMutator<{
15
+ value: string;
16
+ }>;
17
+ isValidating: boolean;
18
+ isLoading: boolean;
19
+ key: string;
20
+ };
21
+ declare const useV1ExampleImmutable: (swrConfig: Configuration<V1ExampleGetResponse>) => {
22
+ data: {
23
+ value: string;
24
+ } | undefined;
25
+ error: any;
26
+ mutate: swr.KeyedMutator<{
27
+ value: string;
28
+ }>;
29
+ isValidating: boolean;
30
+ isLoading: boolean;
31
+ key: string;
32
+ };
33
+ declare const useV1ExampleInfinite: <Args extends Arguments>(getKey: (keyBuilder: () => string) => SWRInfiniteKeyLoader<V1ExampleGetResponse, Args>, swrConfig?: SWRInfiniteConfiguration<V1ExampleGetResponse>) => swr_infinite.SWRInfiniteResponse<{
34
+ value: string;
35
+ }, any>;
36
+
37
+ export { useV1Example, useV1ExampleImmutable, useV1ExampleInfinite };
@@ -0,0 +1,37 @@
1
+ import * as swr_infinite from 'swr/infinite';
2
+ import { SWRInfiniteKeyLoader, SWRInfiniteConfiguration } from 'swr/infinite';
3
+ import * as swr from 'swr';
4
+ import { Arguments } from 'swr';
5
+ import { Configuration } from '@readyfor/api-client-base/react';
6
+ import { V1ExampleGetResponse } from '../fetch/v1Example.js';
7
+ import '../schemaType.js';
8
+
9
+ declare const useV1Example: (swrConfig: Configuration<V1ExampleGetResponse>) => {
10
+ data: {
11
+ value: string;
12
+ } | undefined;
13
+ error: any;
14
+ mutate: swr.KeyedMutator<{
15
+ value: string;
16
+ }>;
17
+ isValidating: boolean;
18
+ isLoading: boolean;
19
+ key: string;
20
+ };
21
+ declare const useV1ExampleImmutable: (swrConfig: Configuration<V1ExampleGetResponse>) => {
22
+ data: {
23
+ value: string;
24
+ } | undefined;
25
+ error: any;
26
+ mutate: swr.KeyedMutator<{
27
+ value: string;
28
+ }>;
29
+ isValidating: boolean;
30
+ isLoading: boolean;
31
+ key: string;
32
+ };
33
+ declare const useV1ExampleInfinite: <Args extends Arguments>(getKey: (keyBuilder: () => string) => SWRInfiniteKeyLoader<V1ExampleGetResponse, Args>, swrConfig?: SWRInfiniteConfiguration<V1ExampleGetResponse>) => swr_infinite.SWRInfiniteResponse<{
34
+ value: string;
35
+ }, any>;
36
+
37
+ export { useV1Example, useV1ExampleImmutable, useV1ExampleInfinite };
@@ -0,0 +1,81 @@
1
+ "use strict";
2
+ var __create = Object.create;
3
+ var __defProp = Object.defineProperty;
4
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
5
+ var __getOwnPropNames = Object.getOwnPropertyNames;
6
+ var __getProtoOf = Object.getPrototypeOf;
7
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
8
+ var __export = (target, all) => {
9
+ for (var name in all)
10
+ __defProp(target, name, { get: all[name], enumerable: true });
11
+ };
12
+ var __copyProps = (to, from, except, desc) => {
13
+ if (from && typeof from === "object" || typeof from === "function") {
14
+ for (let key of __getOwnPropNames(from))
15
+ if (!__hasOwnProp.call(to, key) && key !== except)
16
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
17
+ }
18
+ return to;
19
+ };
20
+ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
21
+ // If the importer is in node compatibility mode or this is not an ESM
22
+ // file that has been converted to a CommonJS file using a Babel-
23
+ // compatible transform (i.e. "__esModule" has not been set), then set
24
+ // "default" to the CommonJS "module.exports" for node compatibility.
25
+ isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
26
+ mod
27
+ ));
28
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
29
+
30
+ // src/hooks/useV1Example.ts
31
+ var useV1Example_exports = {};
32
+ __export(useV1Example_exports, {
33
+ useV1Example: () => useV1Example,
34
+ useV1ExampleImmutable: () => useV1ExampleImmutable,
35
+ useV1ExampleInfinite: () => useV1ExampleInfinite
36
+ });
37
+ module.exports = __toCommonJS(useV1Example_exports);
38
+ var import_immutable = __toESM(require("swr/immutable"));
39
+ var import_infinite = __toESM(require("swr/infinite"));
40
+ var import_swr = __toESM(require("swr"));
41
+ var import_api_client_base2 = require("@readyfor/api-client-base");
42
+
43
+ // src/components.ts
44
+ var import_zod = require("zod");
45
+ var ExampleModel = import_zod.z.object({ value: import_zod.z.string() });
46
+
47
+ // src/fetch/v1Example.ts
48
+ var import_api_client_base = require("@readyfor/api-client-base");
49
+ var buildV1ExampleGetFetcher = (requestInit) => (0, import_api_client_base.createJsonFetcher)(ExampleModel, { ...requestInit });
50
+
51
+ // src/hooks/useV1Example.ts
52
+ var v1ExampleGetFetcher = buildV1ExampleGetFetcher();
53
+ var useV1Example = (swrConfig) => {
54
+ const key = (0, import_api_client_base2.__internal__requestUrl)("/api/v1/example");
55
+ const result = (0, import_swr.default)(
56
+ swrConfig?.shouldNotFetch ? null : key,
57
+ v1ExampleGetFetcher,
58
+ swrConfig
59
+ );
60
+ return { key, ...result };
61
+ };
62
+ var useV1ExampleImmutable = (swrConfig) => {
63
+ const key = (0, import_api_client_base2.__internal__requestUrl)("/api/v1/example");
64
+ const result = (0, import_immutable.default)(
65
+ swrConfig?.shouldNotFetch ? null : key,
66
+ v1ExampleGetFetcher,
67
+ swrConfig
68
+ );
69
+ return { key, ...result };
70
+ };
71
+ var useV1ExampleInfinite = (getKey, swrConfig) => (0, import_infinite.default)(
72
+ getKey(() => (0, import_api_client_base2.__internal__requestUrl)()),
73
+ v1ExampleGetFetcher,
74
+ swrConfig
75
+ );
76
+ // Annotate the CommonJS export names for ESM import in node:
77
+ 0 && (module.exports = {
78
+ useV1Example,
79
+ useV1ExampleImmutable,
80
+ useV1ExampleInfinite
81
+ });
@@ -0,0 +1,13 @@
1
+ import {
2
+ useV1Example,
3
+ useV1ExampleImmutable,
4
+ useV1ExampleInfinite
5
+ } from "../chunk-DX53K7VW.mjs";
6
+ import "../chunk-WY7GF7TX.mjs";
7
+ import "../chunk-BPM425IG.mjs";
8
+ import "../chunk-77MRBHHK.mjs";
9
+ export {
10
+ useV1Example,
11
+ useV1ExampleImmutable,
12
+ useV1ExampleInfinite
13
+ };
@@ -0,0 +1,4 @@
1
+ export { $defs, components, external, operations, paths, webhooks } from './schemaType.mjs';
2
+ export { ExampleModel } from './components.mjs';
3
+ export { V1ExampleGetResponse, buildV1ExampleGetFetcher, getV1Example } from './fetch/v1Example.mjs';
4
+ import 'zod';
@@ -0,0 +1,4 @@
1
+ export { $defs, components, external, operations, paths, webhooks } from './schemaType.js';
2
+ export { ExampleModel } from './components.js';
3
+ export { V1ExampleGetResponse, buildV1ExampleGetFetcher, getV1Example } from './fetch/v1Example.js';
4
+ import 'zod';
package/dist/index.js ADDED
@@ -0,0 +1,46 @@
1
+ "use strict";
2
+ var __defProp = Object.defineProperty;
3
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
+ var __getOwnPropNames = Object.getOwnPropertyNames;
5
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
6
+ var __export = (target, all) => {
7
+ for (var name in all)
8
+ __defProp(target, name, { get: all[name], enumerable: true });
9
+ };
10
+ var __copyProps = (to, from, except, desc) => {
11
+ if (from && typeof from === "object" || typeof from === "function") {
12
+ for (let key of __getOwnPropNames(from))
13
+ if (!__hasOwnProp.call(to, key) && key !== except)
14
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
15
+ }
16
+ return to;
17
+ };
18
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
19
+
20
+ // src/index.ts
21
+ var src_exports = {};
22
+ __export(src_exports, {
23
+ ExampleModel: () => ExampleModel,
24
+ buildV1ExampleGetFetcher: () => buildV1ExampleGetFetcher,
25
+ getV1Example: () => getV1Example
26
+ });
27
+ module.exports = __toCommonJS(src_exports);
28
+
29
+ // src/components.ts
30
+ var import_zod = require("zod");
31
+ var ExampleModel = import_zod.z.object({ value: import_zod.z.string() });
32
+
33
+ // src/fetch/v1Example.ts
34
+ var import_api_client_base = require("@readyfor/api-client-base");
35
+ var buildV1ExampleGetFetcher = (requestInit) => (0, import_api_client_base.createJsonFetcher)(ExampleModel, { ...requestInit });
36
+ var getV1Example = (requestBody, requestInit) => buildV1ExampleGetFetcher()((0, import_api_client_base.__internal__requestUrl)("/api/v1/example"), {
37
+ ...requestInit,
38
+ method: "GET",
39
+ body: requestBody
40
+ });
41
+ // Annotate the CommonJS export names for ESM import in node:
42
+ 0 && (module.exports = {
43
+ ExampleModel,
44
+ buildV1ExampleGetFetcher,
45
+ getV1Example
46
+ });
package/dist/index.mjs ADDED
@@ -0,0 +1,13 @@
1
+ import "./chunk-WY7GF7TX.mjs";
2
+ import {
3
+ buildV1ExampleGetFetcher,
4
+ getV1Example
5
+ } from "./chunk-BPM425IG.mjs";
6
+ import {
7
+ ExampleModel
8
+ } from "./chunk-77MRBHHK.mjs";
9
+ export {
10
+ ExampleModel,
11
+ buildV1ExampleGetFetcher,
12
+ getV1Example
13
+ };
@@ -0,0 +1,46 @@
1
+ /**
2
+ * This file was auto-generated by openapi-typescript.
3
+ * Do not make direct changes to the file.
4
+ */
5
+ interface paths {
6
+ "/api/v1/example": {
7
+ /** example */
8
+ get: operations["V1Example"];
9
+ };
10
+ }
11
+ type webhooks = Record<string, never>;
12
+ interface components {
13
+ schemas: {
14
+ /**
15
+ * Example
16
+ * @example {
17
+ * "value": "value"
18
+ * }
19
+ */
20
+ ExampleModel: {
21
+ value: string;
22
+ };
23
+ };
24
+ responses: never;
25
+ parameters: never;
26
+ requestBodies: never;
27
+ headers: never;
28
+ pathItems: never;
29
+ }
30
+ type $defs = Record<string, never>;
31
+ type external = Record<string, never>;
32
+ interface operations {
33
+ /** example */
34
+ V1Example: {
35
+ responses: {
36
+ /** @description OK */
37
+ 200: {
38
+ content: {
39
+ "application/json": components["schemas"]["ExampleModel"];
40
+ };
41
+ };
42
+ };
43
+ };
44
+ }
45
+
46
+ export type { $defs, components, external, operations, paths, webhooks };
@@ -0,0 +1,46 @@
1
+ /**
2
+ * This file was auto-generated by openapi-typescript.
3
+ * Do not make direct changes to the file.
4
+ */
5
+ interface paths {
6
+ "/api/v1/example": {
7
+ /** example */
8
+ get: operations["V1Example"];
9
+ };
10
+ }
11
+ type webhooks = Record<string, never>;
12
+ interface components {
13
+ schemas: {
14
+ /**
15
+ * Example
16
+ * @example {
17
+ * "value": "value"
18
+ * }
19
+ */
20
+ ExampleModel: {
21
+ value: string;
22
+ };
23
+ };
24
+ responses: never;
25
+ parameters: never;
26
+ requestBodies: never;
27
+ headers: never;
28
+ pathItems: never;
29
+ }
30
+ type $defs = Record<string, never>;
31
+ type external = Record<string, never>;
32
+ interface operations {
33
+ /** example */
34
+ V1Example: {
35
+ responses: {
36
+ /** @description OK */
37
+ 200: {
38
+ content: {
39
+ "application/json": components["schemas"]["ExampleModel"];
40
+ };
41
+ };
42
+ };
43
+ };
44
+ }
45
+
46
+ export type { $defs, components, external, operations, paths, webhooks };
@@ -0,0 +1,18 @@
1
+ "use strict";
2
+ var __defProp = Object.defineProperty;
3
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
+ var __getOwnPropNames = Object.getOwnPropertyNames;
5
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
6
+ var __copyProps = (to, from, except, desc) => {
7
+ if (from && typeof from === "object" || typeof from === "function") {
8
+ for (let key of __getOwnPropNames(from))
9
+ if (!__hasOwnProp.call(to, key) && key !== except)
10
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
11
+ }
12
+ return to;
13
+ };
14
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
15
+
16
+ // src/schemaType.ts
17
+ var schemaType_exports = {};
18
+ module.exports = __toCommonJS(schemaType_exports);
File without changes
package/package.json ADDED
@@ -0,0 +1,68 @@
1
+ {
2
+ "name": "@readyfor/api-client-pigeon",
3
+ "version": "0.0.1-pr895.4cba339",
4
+ "license": "SEE LICENSE IN LICENSE.md",
5
+ "main": "dist/index.js",
6
+ "module": "dist/index.mjs",
7
+ "types": "dist/index.d.ts",
8
+ "files": [
9
+ "dist"
10
+ ],
11
+ "exports": {
12
+ ".": {
13
+ "types": "./dist/index.d.ts",
14
+ "import": "./dist/index.mjs",
15
+ "require": "./dist/index.js"
16
+ },
17
+ "./hooks": {
18
+ "types": "./dist/hooks/index.d.ts",
19
+ "import": "./dist/hooks/index.mjs",
20
+ "require": "./dist/hooks/index.js"
21
+ }
22
+ },
23
+ "devDependencies": {
24
+ "@types/qs": "6.9.17",
25
+ "@types/react": "^18.3.12",
26
+ "@types/use-sync-external-store": "0.0.6",
27
+ "qs": "^6.13.1",
28
+ "react": "^18.3.1",
29
+ "swr": "^2.2.5",
30
+ "use-sync-external-store": "^1.2.2",
31
+ "zod": "^3.23.8",
32
+ "@readyfor/api-client-base": "0.0.1-pr895.4cba339"
33
+ },
34
+ "peerDependencies": {
35
+ "qs": "^6",
36
+ "react": "^18",
37
+ "swr": "^2",
38
+ "use-sync-external-store": "1.2.2",
39
+ "zod": "^3",
40
+ "@readyfor/api-client-base": "0.0.1-pr895.4cba339"
41
+ },
42
+ "peerDependenciesMeta": {
43
+ "react": {
44
+ "optional": true
45
+ },
46
+ "swr": {
47
+ "optional": true
48
+ },
49
+ "use-sync-external-store": {
50
+ "optional": true
51
+ }
52
+ },
53
+ "tsup": {
54
+ "clean": true,
55
+ "target": "esnext",
56
+ "dts": true,
57
+ "format": [
58
+ "cjs",
59
+ "esm"
60
+ ],
61
+ "entry": [
62
+ "src"
63
+ ]
64
+ },
65
+ "scripts": {
66
+ "build": "tsup"
67
+ }
68
+ }