@readyfor/api-client-pigeon 0.156.0-pr911.0a4df9b → 0.156.0-pr911.80e14d4

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.
@@ -1,30 +1,27 @@
1
1
  import {
2
2
  buildV1ExampleGetFetcher
3
- } from "./chunk-BPM425IG.mjs";
3
+ } from "./chunk-P5CNIF27.mjs";
4
4
 
5
5
  // src/hooks/useV1Example.ts
6
6
  import useSWRImmutable from "swr/immutable";
7
7
  import useSWRInfinite from "swr/infinite";
8
8
  import useSWR from "swr";
9
9
  import { __internal__requestUrl } from "@readyfor/api-client-base";
10
- import { useRequestInit } from "@readyfor/api-client-base/react";
11
10
  var v1ExampleGetFetcher = buildV1ExampleGetFetcher();
12
- var useV1Example = (swrConfig) => {
11
+ var useV1Example = (headers, swrConfig) => {
13
12
  const key = __internal__requestUrl("/api/v1/example");
14
- const requestInit = useRequestInit();
15
13
  const result = useSWR(
16
14
  swrConfig?.shouldNotFetch ? null : key,
17
- buildV1ExampleGetFetcher(requestInit),
15
+ buildV1ExampleGetFetcher({ headers }),
18
16
  swrConfig
19
17
  );
20
18
  return { key, ...result };
21
19
  };
22
- var useV1ExampleImmutable = (swrConfig) => {
20
+ var useV1ExampleImmutable = (headers, swrConfig) => {
23
21
  const key = __internal__requestUrl("/api/v1/example");
24
- const requestInit = useRequestInit();
25
22
  const result = useSWRImmutable(
26
23
  swrConfig?.shouldNotFetch ? null : key,
27
- buildV1ExampleGetFetcher(requestInit),
24
+ buildV1ExampleGetFetcher({ headers }),
28
25
  swrConfig
29
26
  );
30
27
  return { key, ...result };
@@ -8,9 +8,10 @@ import {
8
8
  __internal__requestUrl
9
9
  } from "@readyfor/api-client-base";
10
10
  var buildV1ExampleGetFetcher = (requestInit) => createJsonFetcher(ExampleModel, { ...requestInit });
11
- var getV1Example = (requestBody, requestInit) => buildV1ExampleGetFetcher()(__internal__requestUrl("/api/v1/example"), {
11
+ var getV1Example = (headers, requestBody, requestInit) => buildV1ExampleGetFetcher()(__internal__requestUrl("/api/v1/example"), {
12
12
  ...requestInit,
13
13
  method: "GET",
14
+ headers,
14
15
  body: requestBody
15
16
  });
16
17
 
@@ -1,12 +1,17 @@
1
1
  import { paths } from '../schemaType.mjs';
2
+ import { ForceDig } from '@readyfor/api-client-base';
2
3
 
3
4
  type V1ExampleGetOperation = paths["/api/v1/example"]["get"];
4
5
  type V1ExampleGetResponse = V1ExampleGetOperation["responses"]["200"]["content"]["application/json"];
5
6
  declare const buildV1ExampleGetFetcher: (requestInit?: RequestInit) => (input: RequestInfo, requestInit?: RequestInit) => Promise<{
6
7
  value: string;
7
8
  }>;
8
- declare const getV1Example: (requestBody: FormData, requestInit?: RequestInit) => Promise<{
9
+ type V1ExampleGetHeader = ForceDig<V1ExampleGetOperation, [
10
+ "parameters",
11
+ "header"
12
+ ]>;
13
+ declare const getV1Example: (headers: V1ExampleGetHeader, requestBody: FormData, requestInit?: RequestInit) => Promise<{
9
14
  value: string;
10
15
  }>;
11
16
 
12
- export { type V1ExampleGetResponse, buildV1ExampleGetFetcher, getV1Example };
17
+ export { type V1ExampleGetHeader, type V1ExampleGetResponse, buildV1ExampleGetFetcher, getV1Example };
@@ -1,12 +1,17 @@
1
1
  import { paths } from '../schemaType.js';
2
+ import { ForceDig } from '@readyfor/api-client-base';
2
3
 
3
4
  type V1ExampleGetOperation = paths["/api/v1/example"]["get"];
4
5
  type V1ExampleGetResponse = V1ExampleGetOperation["responses"]["200"]["content"]["application/json"];
5
6
  declare const buildV1ExampleGetFetcher: (requestInit?: RequestInit) => (input: RequestInfo, requestInit?: RequestInit) => Promise<{
6
7
  value: string;
7
8
  }>;
8
- declare const getV1Example: (requestBody: FormData, requestInit?: RequestInit) => Promise<{
9
+ type V1ExampleGetHeader = ForceDig<V1ExampleGetOperation, [
10
+ "parameters",
11
+ "header"
12
+ ]>;
13
+ declare const getV1Example: (headers: V1ExampleGetHeader, requestBody: FormData, requestInit?: RequestInit) => Promise<{
9
14
  value: string;
10
15
  }>;
11
16
 
12
- export { type V1ExampleGetResponse, buildV1ExampleGetFetcher, getV1Example };
17
+ export { type V1ExampleGetHeader, type V1ExampleGetResponse, buildV1ExampleGetFetcher, getV1Example };
@@ -32,9 +32,10 @@ var ExampleModel = import_zod.z.object({ value: import_zod.z.string() });
32
32
 
33
33
  // src/fetch/v1Example.ts
34
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"), {
35
+ var getV1Example = (headers, requestBody, requestInit) => buildV1ExampleGetFetcher()((0, import_api_client_base.__internal__requestUrl)("/api/v1/example"), {
36
36
  ...requestInit,
37
37
  method: "GET",
38
+ headers,
38
39
  body: requestBody
39
40
  });
40
41
  // Annotate the CommonJS export names for ESM import in node:
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  buildV1ExampleGetFetcher,
3
3
  getV1Example
4
- } from "../chunk-BPM425IG.mjs";
4
+ } from "../chunk-P5CNIF27.mjs";
5
5
  import "../chunk-77MRBHHK.mjs";
6
6
  export {
7
7
  buildV1ExampleGetFetcher,
@@ -4,3 +4,4 @@ import 'swr';
4
4
  import '@readyfor/api-client-base/react';
5
5
  import '../fetch/v1Example.mjs';
6
6
  import '../schemaType.mjs';
7
+ import '@readyfor/api-client-base';
@@ -4,3 +4,4 @@ import 'swr';
4
4
  import '@readyfor/api-client-base/react';
5
5
  import '../fetch/v1Example.js';
6
6
  import '../schemaType.js';
7
+ import '@readyfor/api-client-base';
@@ -41,7 +41,6 @@ var import_immutable = __toESM(require("swr/immutable"));
41
41
  var import_infinite = __toESM(require("swr/infinite"));
42
42
  var import_swr = __toESM(require("swr"));
43
43
  var import_api_client_base2 = require("@readyfor/api-client-base");
44
- var import_react = require("@readyfor/api-client-base/react");
45
44
 
46
45
  // src/components.ts
47
46
  var import_zod = require("zod");
@@ -53,22 +52,20 @@ var buildV1ExampleGetFetcher = (requestInit) => (0, import_api_client_base.creat
53
52
 
54
53
  // src/hooks/useV1Example.ts
55
54
  var v1ExampleGetFetcher = buildV1ExampleGetFetcher();
56
- var useV1Example = (swrConfig) => {
55
+ var useV1Example = (headers, swrConfig) => {
57
56
  const key = (0, import_api_client_base2.__internal__requestUrl)("/api/v1/example");
58
- const requestInit = (0, import_react.useRequestInit)();
59
57
  const result = (0, import_swr.default)(
60
58
  swrConfig?.shouldNotFetch ? null : key,
61
- buildV1ExampleGetFetcher(requestInit),
59
+ buildV1ExampleGetFetcher({ headers }),
62
60
  swrConfig
63
61
  );
64
62
  return { key, ...result };
65
63
  };
66
- var useV1ExampleImmutable = (swrConfig) => {
64
+ var useV1ExampleImmutable = (headers, swrConfig) => {
67
65
  const key = (0, import_api_client_base2.__internal__requestUrl)("/api/v1/example");
68
- const requestInit = (0, import_react.useRequestInit)();
69
66
  const result = (0, import_immutable.default)(
70
67
  swrConfig?.shouldNotFetch ? null : key,
71
- buildV1ExampleGetFetcher(requestInit),
68
+ buildV1ExampleGetFetcher({ headers }),
72
69
  swrConfig
73
70
  );
74
71
  return { key, ...result };
@@ -2,9 +2,9 @@ import {
2
2
  useV1Example,
3
3
  useV1ExampleImmutable,
4
4
  useV1ExampleInfinite
5
- } from "../chunk-J5RHLJQH.mjs";
5
+ } from "../chunk-EDERCAMK.mjs";
6
6
  import "../chunk-WY7GF7TX.mjs";
7
- import "../chunk-BPM425IG.mjs";
7
+ import "../chunk-P5CNIF27.mjs";
8
8
  import "../chunk-77MRBHHK.mjs";
9
9
  export {
10
10
  useV1Example,
@@ -3,10 +3,11 @@ import { SWRInfiniteKeyLoader, SWRInfiniteConfiguration } from 'swr/infinite';
3
3
  import * as swr from 'swr';
4
4
  import { Arguments } from 'swr';
5
5
  import { Configuration } from '@readyfor/api-client-base/react';
6
- import { V1ExampleGetResponse } from '../fetch/v1Example.mjs';
6
+ import { V1ExampleGetHeader, V1ExampleGetResponse } from '../fetch/v1Example.mjs';
7
7
  import '../schemaType.mjs';
8
+ import '@readyfor/api-client-base';
8
9
 
9
- declare const useV1Example: (swrConfig?: Configuration<V1ExampleGetResponse>) => {
10
+ declare const useV1Example: (headers: V1ExampleGetHeader, swrConfig?: Configuration<V1ExampleGetResponse>) => {
10
11
  data: {
11
12
  value: string;
12
13
  } | undefined;
@@ -18,7 +19,7 @@ declare const useV1Example: (swrConfig?: Configuration<V1ExampleGetResponse>) =>
18
19
  isLoading: boolean;
19
20
  key: string;
20
21
  };
21
- declare const useV1ExampleImmutable: (swrConfig?: Configuration<V1ExampleGetResponse>) => {
22
+ declare const useV1ExampleImmutable: (headers: V1ExampleGetHeader, swrConfig?: Configuration<V1ExampleGetResponse>) => {
22
23
  data: {
23
24
  value: string;
24
25
  } | undefined;
@@ -3,10 +3,11 @@ import { SWRInfiniteKeyLoader, SWRInfiniteConfiguration } from 'swr/infinite';
3
3
  import * as swr from 'swr';
4
4
  import { Arguments } from 'swr';
5
5
  import { Configuration } from '@readyfor/api-client-base/react';
6
- import { V1ExampleGetResponse } from '../fetch/v1Example.js';
6
+ import { V1ExampleGetHeader, V1ExampleGetResponse } from '../fetch/v1Example.js';
7
7
  import '../schemaType.js';
8
+ import '@readyfor/api-client-base';
8
9
 
9
- declare const useV1Example: (swrConfig?: Configuration<V1ExampleGetResponse>) => {
10
+ declare const useV1Example: (headers: V1ExampleGetHeader, swrConfig?: Configuration<V1ExampleGetResponse>) => {
10
11
  data: {
11
12
  value: string;
12
13
  } | undefined;
@@ -18,7 +19,7 @@ declare const useV1Example: (swrConfig?: Configuration<V1ExampleGetResponse>) =>
18
19
  isLoading: boolean;
19
20
  key: string;
20
21
  };
21
- declare const useV1ExampleImmutable: (swrConfig?: Configuration<V1ExampleGetResponse>) => {
22
+ declare const useV1ExampleImmutable: (headers: V1ExampleGetHeader, swrConfig?: Configuration<V1ExampleGetResponse>) => {
22
23
  data: {
23
24
  value: string;
24
25
  } | undefined;
@@ -39,7 +39,6 @@ var import_immutable = __toESM(require("swr/immutable"));
39
39
  var import_infinite = __toESM(require("swr/infinite"));
40
40
  var import_swr = __toESM(require("swr"));
41
41
  var import_api_client_base2 = require("@readyfor/api-client-base");
42
- var import_react = require("@readyfor/api-client-base/react");
43
42
 
44
43
  // src/components.ts
45
44
  var import_zod = require("zod");
@@ -51,22 +50,20 @@ var buildV1ExampleGetFetcher = (requestInit) => (0, import_api_client_base.creat
51
50
 
52
51
  // src/hooks/useV1Example.ts
53
52
  var v1ExampleGetFetcher = buildV1ExampleGetFetcher();
54
- var useV1Example = (swrConfig) => {
53
+ var useV1Example = (headers, swrConfig) => {
55
54
  const key = (0, import_api_client_base2.__internal__requestUrl)("/api/v1/example");
56
- const requestInit = (0, import_react.useRequestInit)();
57
55
  const result = (0, import_swr.default)(
58
56
  swrConfig?.shouldNotFetch ? null : key,
59
- buildV1ExampleGetFetcher(requestInit),
57
+ buildV1ExampleGetFetcher({ headers }),
60
58
  swrConfig
61
59
  );
62
60
  return { key, ...result };
63
61
  };
64
- var useV1ExampleImmutable = (swrConfig) => {
62
+ var useV1ExampleImmutable = (headers, swrConfig) => {
65
63
  const key = (0, import_api_client_base2.__internal__requestUrl)("/api/v1/example");
66
- const requestInit = (0, import_react.useRequestInit)();
67
64
  const result = (0, import_immutable.default)(
68
65
  swrConfig?.shouldNotFetch ? null : key,
69
- buildV1ExampleGetFetcher(requestInit),
66
+ buildV1ExampleGetFetcher({ headers }),
70
67
  swrConfig
71
68
  );
72
69
  return { key, ...result };
@@ -2,9 +2,9 @@ import {
2
2
  useV1Example,
3
3
  useV1ExampleImmutable,
4
4
  useV1ExampleInfinite
5
- } from "../chunk-J5RHLJQH.mjs";
5
+ } from "../chunk-EDERCAMK.mjs";
6
6
  import "../chunk-WY7GF7TX.mjs";
7
- import "../chunk-BPM425IG.mjs";
7
+ import "../chunk-P5CNIF27.mjs";
8
8
  import "../chunk-77MRBHHK.mjs";
9
9
  export {
10
10
  useV1Example,
package/dist/index.d.mts CHANGED
@@ -1,4 +1,5 @@
1
1
  export { $defs, components, external, operations, paths, webhooks } from './schemaType.mjs';
2
2
  export { ExampleModel } from './components.mjs';
3
- export { V1ExampleGetResponse, buildV1ExampleGetFetcher, getV1Example } from './fetch/v1Example.mjs';
3
+ export { V1ExampleGetHeader, V1ExampleGetResponse, buildV1ExampleGetFetcher, getV1Example } from './fetch/v1Example.mjs';
4
4
  import 'zod';
5
+ import '@readyfor/api-client-base';
package/dist/index.d.ts CHANGED
@@ -1,4 +1,5 @@
1
1
  export { $defs, components, external, operations, paths, webhooks } from './schemaType.js';
2
2
  export { ExampleModel } from './components.js';
3
- export { V1ExampleGetResponse, buildV1ExampleGetFetcher, getV1Example } from './fetch/v1Example.js';
3
+ export { V1ExampleGetHeader, V1ExampleGetResponse, buildV1ExampleGetFetcher, getV1Example } from './fetch/v1Example.js';
4
4
  import 'zod';
5
+ import '@readyfor/api-client-base';
package/dist/index.js CHANGED
@@ -33,9 +33,10 @@ var ExampleModel = import_zod.z.object({ value: import_zod.z.string() });
33
33
  // src/fetch/v1Example.ts
34
34
  var import_api_client_base = require("@readyfor/api-client-base");
35
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"), {
36
+ var getV1Example = (headers, requestBody, requestInit) => buildV1ExampleGetFetcher()((0, import_api_client_base.__internal__requestUrl)("/api/v1/example"), {
37
37
  ...requestInit,
38
38
  method: "GET",
39
+ headers,
39
40
  body: requestBody
40
41
  });
41
42
  // Annotate the CommonJS export names for ESM import in node:
package/dist/index.mjs CHANGED
@@ -2,7 +2,7 @@ import "./chunk-WY7GF7TX.mjs";
2
2
  import {
3
3
  buildV1ExampleGetFetcher,
4
4
  getV1Example
5
- } from "./chunk-BPM425IG.mjs";
5
+ } from "./chunk-P5CNIF27.mjs";
6
6
  import {
7
7
  ExampleModel
8
8
  } from "./chunk-77MRBHHK.mjs";
@@ -32,6 +32,11 @@ type external = Record<string, never>;
32
32
  interface operations {
33
33
  /** example */
34
34
  V1Example: {
35
+ parameters: {
36
+ header: {
37
+ Authorization: string;
38
+ };
39
+ };
35
40
  responses: {
36
41
  /** @description OK */
37
42
  200: {
@@ -32,6 +32,11 @@ type external = Record<string, never>;
32
32
  interface operations {
33
33
  /** example */
34
34
  V1Example: {
35
+ parameters: {
36
+ header: {
37
+ Authorization: string;
38
+ };
39
+ };
35
40
  responses: {
36
41
  /** @description OK */
37
42
  200: {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@readyfor/api-client-pigeon",
3
- "version": "0.156.0-pr911.0a4df9b",
3
+ "version": "0.156.0-pr911.80e14d4",
4
4
  "license": "SEE LICENSE IN LICENSE.md",
5
5
  "main": "dist/index.js",
6
6
  "module": "dist/index.mjs",
@@ -29,7 +29,7 @@
29
29
  "swr": "^2.2.5",
30
30
  "use-sync-external-store": "^1.2.2",
31
31
  "zod": "^3.23.8",
32
- "@readyfor/api-client-base": "0.156.0-pr911.0a4df9b"
32
+ "@readyfor/api-client-base": "0.156.0-pr911.80e14d4"
33
33
  },
34
34
  "peerDependencies": {
35
35
  "qs": "^6",
@@ -37,7 +37,7 @@
37
37
  "swr": "^2",
38
38
  "use-sync-external-store": "1.2.2",
39
39
  "zod": "^3",
40
- "@readyfor/api-client-base": "0.156.0-pr911.0a4df9b"
40
+ "@readyfor/api-client-base": "0.156.0-pr911.80e14d4"
41
41
  },
42
42
  "peerDependenciesMeta": {
43
43
  "react": {