@readyfor/api-client-pigeon 0.158.0 → 0.160.0-pr919.9630bf2

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.
@@ -7,21 +7,24 @@ 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";
10
11
  var v1ExampleGetFetcher = buildV1ExampleGetFetcher();
11
12
  var useV1Example = (swrConfig) => {
12
13
  const key = __internal__requestUrl("/api/v1/example");
14
+ const requestInit = useRequestInit();
13
15
  const result = useSWR(
14
16
  swrConfig?.shouldNotFetch ? null : key,
15
- buildV1ExampleGetFetcher(),
17
+ buildV1ExampleGetFetcher(requestInit),
16
18
  swrConfig
17
19
  );
18
20
  return { key, ...result };
19
21
  };
20
22
  var useV1ExampleImmutable = (swrConfig) => {
21
23
  const key = __internal__requestUrl("/api/v1/example");
24
+ const requestInit = useRequestInit();
22
25
  const result = useSWRImmutable(
23
26
  swrConfig?.shouldNotFetch ? null : key,
24
- buildV1ExampleGetFetcher(),
27
+ buildV1ExampleGetFetcher(requestInit),
25
28
  swrConfig
26
29
  );
27
30
  return { key, ...result };
@@ -41,6 +41,7 @@ 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");
44
45
 
45
46
  // src/components.ts
46
47
  var import_zod = require("zod");
@@ -54,18 +55,20 @@ var buildV1ExampleGetFetcher = (requestInit) => (0, import_api_client_base.creat
54
55
  var v1ExampleGetFetcher = buildV1ExampleGetFetcher();
55
56
  var useV1Example = (swrConfig) => {
56
57
  const key = (0, import_api_client_base2.__internal__requestUrl)("/api/v1/example");
58
+ const requestInit = (0, import_react.useRequestInit)();
57
59
  const result = (0, import_swr.default)(
58
60
  swrConfig?.shouldNotFetch ? null : key,
59
- buildV1ExampleGetFetcher(),
61
+ buildV1ExampleGetFetcher(requestInit),
60
62
  swrConfig
61
63
  );
62
64
  return { key, ...result };
63
65
  };
64
66
  var useV1ExampleImmutable = (swrConfig) => {
65
67
  const key = (0, import_api_client_base2.__internal__requestUrl)("/api/v1/example");
68
+ const requestInit = (0, import_react.useRequestInit)();
66
69
  const result = (0, import_immutable.default)(
67
70
  swrConfig?.shouldNotFetch ? null : key,
68
- buildV1ExampleGetFetcher(),
71
+ buildV1ExampleGetFetcher(requestInit),
69
72
  swrConfig
70
73
  );
71
74
  return { key, ...result };
@@ -2,7 +2,7 @@ import {
2
2
  useV1Example,
3
3
  useV1ExampleImmutable,
4
4
  useV1ExampleInfinite
5
- } from "../chunk-V2EIWQUV.mjs";
5
+ } from "../chunk-J5RHLJQH.mjs";
6
6
  import "../chunk-WY7GF7TX.mjs";
7
7
  import "../chunk-BPM425IG.mjs";
8
8
  import "../chunk-77MRBHHK.mjs";
@@ -39,6 +39,7 @@ 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");
42
43
 
43
44
  // src/components.ts
44
45
  var import_zod = require("zod");
@@ -52,18 +53,20 @@ var buildV1ExampleGetFetcher = (requestInit) => (0, import_api_client_base.creat
52
53
  var v1ExampleGetFetcher = buildV1ExampleGetFetcher();
53
54
  var useV1Example = (swrConfig) => {
54
55
  const key = (0, import_api_client_base2.__internal__requestUrl)("/api/v1/example");
56
+ const requestInit = (0, import_react.useRequestInit)();
55
57
  const result = (0, import_swr.default)(
56
58
  swrConfig?.shouldNotFetch ? null : key,
57
- buildV1ExampleGetFetcher(),
59
+ buildV1ExampleGetFetcher(requestInit),
58
60
  swrConfig
59
61
  );
60
62
  return { key, ...result };
61
63
  };
62
64
  var useV1ExampleImmutable = (swrConfig) => {
63
65
  const key = (0, import_api_client_base2.__internal__requestUrl)("/api/v1/example");
66
+ const requestInit = (0, import_react.useRequestInit)();
64
67
  const result = (0, import_immutable.default)(
65
68
  swrConfig?.shouldNotFetch ? null : key,
66
- buildV1ExampleGetFetcher(),
69
+ buildV1ExampleGetFetcher(requestInit),
67
70
  swrConfig
68
71
  );
69
72
  return { key, ...result };
@@ -2,7 +2,7 @@ import {
2
2
  useV1Example,
3
3
  useV1ExampleImmutable,
4
4
  useV1ExampleInfinite
5
- } from "../chunk-V2EIWQUV.mjs";
5
+ } from "../chunk-J5RHLJQH.mjs";
6
6
  import "../chunk-WY7GF7TX.mjs";
7
7
  import "../chunk-BPM425IG.mjs";
8
8
  import "../chunk-77MRBHHK.mjs";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@readyfor/api-client-pigeon",
3
- "version": "0.158.0",
3
+ "version": "0.160.0-pr919.9630bf2",
4
4
  "license": "SEE LICENSE IN LICENSE.md",
5
5
  "main": "dist/index.js",
6
6
  "module": "dist/index.mjs",
@@ -20,11 +20,7 @@
20
20
  "require": "./dist/hooks/index.js"
21
21
  }
22
22
  },
23
- "scripts": {
24
- "build": "tsup"
25
- },
26
23
  "devDependencies": {
27
- "@readyfor/api-client-base": "0.158.0",
28
24
  "@types/qs": "6.9.17",
29
25
  "@types/react": "^18.3.12",
30
26
  "@types/use-sync-external-store": "0.0.6",
@@ -32,15 +28,16 @@
32
28
  "react": "^18.3.1",
33
29
  "swr": "^2.2.5",
34
30
  "use-sync-external-store": "^1.2.2",
35
- "zod": "^3.23.8"
31
+ "zod": "^3.23.8",
32
+ "@readyfor/api-client-base": "0.160.0-pr919.9630bf2"
36
33
  },
37
34
  "peerDependencies": {
38
- "@readyfor/api-client-base": "*",
39
35
  "qs": "^6",
40
36
  "react": "^18",
41
37
  "swr": "^2",
42
38
  "use-sync-external-store": "1.2.2",
43
- "zod": "^3"
39
+ "zod": "^3",
40
+ "@readyfor/api-client-base": "0.160.0-pr919.9630bf2"
44
41
  },
45
42
  "peerDependenciesMeta": {
46
43
  "react": {
@@ -65,5 +62,7 @@
65
62
  "src"
66
63
  ]
67
64
  },
68
- "gitHead": "022fb39a23ef52195d65be92a61ece07edd24a51"
69
- }
65
+ "scripts": {
66
+ "build": "tsup"
67
+ }
68
+ }