@kubb/plugin-swr 3.5.3 → 3.5.5

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kubb/plugin-swr",
3
- "version": "3.5.3",
3
+ "version": "3.5.5",
4
4
  "description": "Generator plugin-swr",
5
5
  "keywords": [
6
6
  "typescript",
@@ -63,23 +63,23 @@
63
63
  "!/**/__tests__/**"
64
64
  ],
65
65
  "dependencies": {
66
- "remeda": "^2.19.2",
67
- "@kubb/core": "3.5.3",
68
- "@kubb/fs": "3.5.3",
69
- "@kubb/oas": "3.5.3",
70
- "@kubb/plugin-client": "3.5.3",
71
- "@kubb/plugin-oas": "3.5.3",
72
- "@kubb/plugin-ts": "3.5.3",
73
- "@kubb/plugin-zod": "3.5.3",
74
- "@kubb/react": "3.5.3"
66
+ "remeda": "^2.20.0",
67
+ "@kubb/core": "3.5.5",
68
+ "@kubb/fs": "3.5.5",
69
+ "@kubb/oas": "3.5.5",
70
+ "@kubb/plugin-client": "3.5.5",
71
+ "@kubb/plugin-oas": "3.5.5",
72
+ "@kubb/plugin-ts": "3.5.5",
73
+ "@kubb/plugin-zod": "3.5.5",
74
+ "@kubb/react": "3.5.5"
75
75
  },
76
76
  "devDependencies": {
77
77
  "@types/react": "^18.3.18",
78
78
  "react": "^18.3.1",
79
79
  "tsup": "^8.3.5",
80
80
  "typescript": "^5.7.3",
81
- "@kubb/config-ts": "3.5.3",
82
- "@kubb/config-tsup": "3.5.3"
81
+ "@kubb/config-ts": "3.5.5",
82
+ "@kubb/config-tsup": "3.5.5"
83
83
  },
84
84
  "peerDependencies": {
85
85
  "@kubb/react": "^3.0.0"
@@ -11,12 +11,14 @@ export type FindPetsByTagsQueryKey = ReturnType<typeof findPetsByTagsQueryKey>
11
11
  * @summary Finds Pets by tags
12
12
  * {@link /pet/findByTags}
13
13
  */
14
- export async function findPetsByTags({ params }: { params?: FindPetsByTagsQueryParams }, config: Partial<RequestConfig> = {}) {
15
- const res = await client<FindPetsByTagsQueryResponse, ResponseErrorConfig<FindPetsByTags400>, unknown>({
14
+ export async function findPetsByTags({ params }: { params?: FindPetsByTagsQueryParams }, config: Partial<RequestConfig> & { client?: typeof client } = {}) {
15
+ const { client: request = client, ...requestConfig } = config
16
+
17
+ const res = await request<FindPetsByTagsQueryResponse, ResponseErrorConfig<FindPetsByTags400>, unknown>({
16
18
  method: 'GET',
17
19
  url: `/pet/findByTags`,
18
20
  params,
19
- ...config,
21
+ ...requestConfig,
20
22
  })
21
23
  return res
22
24
  }
@@ -11,12 +11,14 @@ export type FindPetsByTagsQueryKey = ReturnType<typeof findPetsByTagsQueryKey>
11
11
  * @summary Finds Pets by tags
12
12
  * {@link /pet/findByTags}
13
13
  */
14
- export async function findPetsByTags({ params }: { params?: FindPetsByTagsQueryParams }, config: Partial<RequestConfig> = {}) {
15
- const res = await client<FindPetsByTagsQueryResponse, ResponseErrorConfig<FindPetsByTags400>, unknown>({
14
+ export async function findPetsByTags({ params }: { params?: FindPetsByTagsQueryParams }, config: Partial<RequestConfig> & { client?: typeof client } = {}) {
15
+ const { client: request = client, ...requestConfig } = config
16
+
17
+ const res = await request<FindPetsByTagsQueryResponse, ResponseErrorConfig<FindPetsByTags400>, unknown>({
16
18
  method: 'GET',
17
19
  url: `/pet/findByTags`,
18
20
  params,
19
- ...config,
21
+ ...requestConfig,
20
22
  })
21
23
  return res.data
22
24
  }
@@ -13,13 +13,15 @@ export type UpdatePetWithFormMutationKey = ReturnType<typeof updatePetWithFormMu
13
13
  export async function updatePetWithForm(
14
14
  petId: UpdatePetWithFormPathParams['petId'],
15
15
  params?: UpdatePetWithFormQueryParams,
16
- config: Partial<RequestConfig> = {},
16
+ config: Partial<RequestConfig> & { client?: typeof client } = {},
17
17
  ) {
18
- const res = await client<UpdatePetWithFormMutationResponse, ResponseErrorConfig<UpdatePetWithForm405>, unknown>({
18
+ const { client: request = client, ...requestConfig } = config
19
+
20
+ const res = await request<UpdatePetWithFormMutationResponse, ResponseErrorConfig<UpdatePetWithForm405>, unknown>({
19
21
  method: 'POST',
20
22
  url: `/pet/${petId}`,
21
23
  params,
22
- ...config,
24
+ ...requestConfig,
23
25
  })
24
26
  return res.data
25
27
  }
@@ -11,12 +11,14 @@ export type FindPetsByTagsQueryKey = ReturnType<typeof findPetsByTagsQueryKey>
11
11
  * @summary Finds Pets by tags
12
12
  * {@link /pet/findByTags}
13
13
  */
14
- export async function findPetsByTags({ params }: { params?: FindPetsByTagsQueryParams }, config: Partial<RequestConfig> = {}) {
15
- const res = await client<FindPetsByTagsQueryResponse, ResponseErrorConfig<FindPetsByTags400>, unknown>({
14
+ export async function findPetsByTags({ params }: { params?: FindPetsByTagsQueryParams }, config: Partial<RequestConfig> & { client?: typeof client } = {}) {
15
+ const { client: request = client, ...requestConfig } = config
16
+
17
+ const res = await request<FindPetsByTagsQueryResponse, ResponseErrorConfig<FindPetsByTags400>, unknown>({
16
18
  method: 'GET',
17
19
  url: `/pet/findByTags`,
18
20
  params,
19
- ...config,
21
+ ...requestConfig,
20
22
  })
21
23
  return res.data
22
24
  }
@@ -11,12 +11,14 @@ export type FindPetsByTagsQueryKey = ReturnType<typeof findPetsByTagsQueryKey>
11
11
  * @summary Finds Pets by tags
12
12
  * {@link /pet/findByTags}
13
13
  */
14
- export async function findPetsByTags({ params }: { params?: FindPetsByTagsQueryParams }, config: Partial<RequestConfig> = {}) {
15
- const res = await client<FindPetsByTagsQueryResponse, ResponseErrorConfig<FindPetsByTags400>, unknown>({
14
+ export async function findPetsByTags({ params }: { params?: FindPetsByTagsQueryParams }, config: Partial<RequestConfig> & { client?: typeof client } = {}) {
15
+ const { client: request = client, ...requestConfig } = config
16
+
17
+ const res = await request<FindPetsByTagsQueryResponse, ResponseErrorConfig<FindPetsByTags400>, unknown>({
16
18
  method: 'GET',
17
19
  url: `/pet/findByTags`,
18
20
  params,
19
- ...config,
21
+ ...requestConfig,
20
22
  })
21
23
  return res.data
22
24
  }
@@ -11,12 +11,14 @@ export type FindPetsByTagsQueryKey = ReturnType<typeof findPetsByTagsQueryKey>
11
11
  * @summary Finds Pets by tags
12
12
  * {@link /pet/findByTags}
13
13
  */
14
- export async function findPetsByTags({ params }: { params?: FindPetsByTagsQueryParams }, config: Partial<RequestConfig> = {}) {
15
- const res = await client<FindPetsByTagsQueryResponse, ResponseErrorConfig<FindPetsByTags400>, unknown>({
14
+ export async function findPetsByTags({ params }: { params?: FindPetsByTagsQueryParams }, config: Partial<RequestConfig> & { client?: typeof client } = {}) {
15
+ const { client: request = client, ...requestConfig } = config
16
+
17
+ const res = await request<FindPetsByTagsQueryResponse, ResponseErrorConfig<FindPetsByTags400>, unknown>({
16
18
  method: 'GET',
17
19
  url: `/pet/findByTags`,
18
20
  params,
19
- ...config,
21
+ ...requestConfig,
20
22
  })
21
23
  return res.data
22
24
  }
@@ -11,12 +11,14 @@ export type FindPetsByTagsQueryKey = ReturnType<typeof findPetsByTagsQueryKey>
11
11
  * @summary Finds Pets by tags
12
12
  * {@link /pet/findByTags}
13
13
  */
14
- export async function findPetsByTags({ params }: { params?: FindPetsByTagsQueryParams }, config: Partial<RequestConfig> = {}) {
15
- const res = await client<FindPetsByTagsQueryResponse, ResponseErrorConfig<FindPetsByTags400>, unknown>({
14
+ export async function findPetsByTags({ params }: { params?: FindPetsByTagsQueryParams }, config: Partial<RequestConfig> & { client?: typeof client } = {}) {
15
+ const { client: request = client, ...requestConfig } = config
16
+
17
+ const res = await request<FindPetsByTagsQueryResponse, ResponseErrorConfig<FindPetsByTags400>, unknown>({
16
18
  method: 'GET',
17
19
  url: `/pet/findByTags`,
18
20
  params,
19
- ...config,
21
+ ...requestConfig,
20
22
  })
21
23
  return findPetsByTagsQueryResponse.parse(res.data)
22
24
  }
@@ -13,13 +13,15 @@ export type UpdatePetWithFormQueryKey = ReturnType<typeof updatePetWithFormQuery
13
13
  */
14
14
  export async function updatePetWithForm(
15
15
  { petId, params }: { petId: UpdatePetWithFormPathParams['petId']; params?: UpdatePetWithFormQueryParams },
16
- config: Partial<RequestConfig> = {},
16
+ config: Partial<RequestConfig> & { client?: typeof client } = {},
17
17
  ) {
18
- const res = await client<UpdatePetWithFormMutationResponse, ResponseErrorConfig<UpdatePetWithForm405>, unknown>({
18
+ const { client: request = client, ...requestConfig } = config
19
+
20
+ const res = await request<UpdatePetWithFormMutationResponse, ResponseErrorConfig<UpdatePetWithForm405>, unknown>({
19
21
  method: 'POST',
20
22
  url: `/pet/${petId}`,
21
23
  params,
22
- ...config,
24
+ ...requestConfig,
23
25
  })
24
26
  return res.data
25
27
  }
@@ -13,13 +13,15 @@ export type UpdatePetWithFormMutationKey = ReturnType<typeof updatePetWithFormMu
13
13
  export async function updatePetWithForm(
14
14
  petId: UpdatePetWithFormPathParams['petId'],
15
15
  params?: UpdatePetWithFormQueryParams,
16
- config: Partial<RequestConfig> = {},
16
+ config: Partial<RequestConfig> & { client?: typeof client } = {},
17
17
  ) {
18
- const res = await client<UpdatePetWithFormMutationResponse, ResponseErrorConfig<UpdatePetWithForm405>, unknown>({
18
+ const { client: request = client, ...requestConfig } = config
19
+
20
+ const res = await request<UpdatePetWithFormMutationResponse, ResponseErrorConfig<UpdatePetWithForm405>, unknown>({
19
21
  method: 'POST',
20
22
  url: `/pet/${petId}`,
21
23
  params,
22
- ...config,
24
+ ...requestConfig,
23
25
  })
24
26
  return res.data
25
27
  }
@@ -13,13 +13,15 @@ export type UpdatePetWithFormMutationKey = ReturnType<typeof updatePetWithFormMu
13
13
  export async function updatePetWithForm(
14
14
  { petId }: { petId: UpdatePetWithFormPathParams['petId'] },
15
15
  params?: UpdatePetWithFormQueryParams,
16
- config: Partial<RequestConfig> = {},
16
+ config: Partial<RequestConfig> & { client?: typeof client } = {},
17
17
  ) {
18
- const res = await client<UpdatePetWithFormMutationResponse, ResponseErrorConfig<UpdatePetWithForm405>, unknown>({
18
+ const { client: request = client, ...requestConfig } = config
19
+
20
+ const res = await request<UpdatePetWithFormMutationResponse, ResponseErrorConfig<UpdatePetWithForm405>, unknown>({
19
21
  method: 'POST',
20
22
  url: `/pet/${petId}`,
21
23
  params,
22
- ...config,
24
+ ...requestConfig,
23
25
  })
24
26
  return res.data
25
27
  }