Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
VCCI-News
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Văn Hoàng
VCCI-News
Commits
b3589a95
Commit
b3589a95
authored
Aug 06, 2026
by
Lê Bảo Hồng Đức
☄
Browse files
Options
Browse Files
Download
Plain Diff
[tag]0.1-vcci
parents
607b1419
20eb9ce4
Pipeline
#52396
failed with stages
in 1 minute and 56 seconds
Changes
116
Pipelines
1
Show whitespace changes
Inline
Side-by-side
Showing
116 changed files
with
12638 additions
and
1771 deletions
+12638
-1771
swagger-output.json
openapi/swagger-output.json
+10475
-0
orval.config.ts
orval.config.ts
+39
-10
banner.ts
src/api/endpoints/banner.ts
+192
-192
category.ts
src/api/endpoints/category.ts
+187
-187
contact.ts
src/api/endpoints/contact.ts
+187
-187
logo.ts
src/api/endpoints/logo.ts
+194
-194
newsletter-subscription.ts
src/api/endpoints/newsletter-subscription.ts
+122
-122
page-config.ts
src/api/endpoints/page-config.ts
+185
-185
site-information.ts
src/api/endpoints/site-information.ts
+276
-276
video.ts
src/api/endpoints/video.ts
+200
-200
badRequestResponse.ts
src/api/models/badRequestResponse.ts
+2
-2
badRequestResponseError.ts
src/api/models/badRequestResponseError.ts
+2
-2
badRequestResponseErrorMessage.ts
src/api/models/badRequestResponseErrorMessage.ts
+2
-2
badRequestResponseResponseData.ts
src/api/models/badRequestResponseResponseData.ts
+2
-2
badRequestResponseViolationItem.ts
src/api/models/badRequestResponseViolationItem.ts
+2
-2
banner.ts
src/api/models/banner.ts
+14
-9
bannerCreate.ts
src/api/models/bannerCreate.ts
+18
-0
bannerCreateStatus.ts
src/api/models/bannerCreateStatus.ts
+16
-0
bannerMutate.ts
src/api/models/bannerMutate.ts
+2
-7
bannerStatus.ts
src/api/models/bannerStatus.ts
+16
-0
bannerUpdate.ts
src/api/models/bannerUpdate.ts
+18
-0
bannerUpdateStatus.ts
src/api/models/bannerUpdateStatus.ts
+16
-0
deleteApiV10BannerId200.ts
src/api/models/deleteApiV10BannerId200.ts
+11
-0
deleteApiV10BannerId200AllOf.ts
src/api/models/deleteApiV10BannerId200AllOf.ts
+11
-0
deleteApiV10LogoId200.ts
src/api/models/deleteApiV10LogoId200.ts
+11
-0
deleteApiV10LogoId200AllOf.ts
src/api/models/deleteApiV10LogoId200AllOf.ts
+11
-0
filtersMutateParameter.ts
src/api/models/filtersMutateParameter.ts
+2
-2
filtersParameter.ts
src/api/models/filtersParameter.ts
+2
-2
forgotPasswordResetRequest.ts
src/api/models/forgotPasswordResetRequest.ts
+2
-2
forgotPasswordSendOtpRequest.ts
src/api/models/forgotPasswordSendOtpRequest.ts
+2
-2
forgotPasswordVerifyOtpRequest.ts
src/api/models/forgotPasswordVerifyOtpRequest.ts
+2
-2
forgotPasswordVerifyOtpResponse.ts
src/api/models/forgotPasswordVerifyOtpResponse.ts
+2
-2
getApiV10BannerId200.ts
src/api/models/getApiV10BannerId200.ts
+11
-0
getApiV10BannerId200AllOf.ts
src/api/models/getApiV10BannerId200AllOf.ts
+12
-0
getApiV10BannerParams.ts
src/api/models/getApiV10BannerParams.ts
+37
-0
getApiV10LogoId200.ts
src/api/models/getApiV10LogoId200.ts
+11
-0
getApiV10LogoId200AllOf.ts
src/api/models/getApiV10LogoId200AllOf.ts
+12
-0
getApiV10LogoParams.ts
src/api/models/getApiV10LogoParams.ts
+37
-0
index.ts
src/api/models/index.ts
+25
-2
loginRequest.ts
src/api/models/loginRequest.ts
+2
-2
loginRequestDeviceInfo.ts
src/api/models/loginRequestDeviceInfo.ts
+2
-2
loginResponse.ts
src/api/models/loginResponse.ts
+2
-2
memberCreate.ts
src/api/models/memberCreate.ts
+2
-2
memberImportResponse.ts
src/api/models/memberImportResponse.ts
+2
-2
memberImportWarningItem.ts
src/api/models/memberImportWarningItem.ts
+2
-2
memberUpdate.ts
src/api/models/memberUpdate.ts
+2
-2
newsletterSubscription.ts
src/api/models/newsletterSubscription.ts
+2
-2
newsletterSubscriptionMutate.ts
src/api/models/newsletterSubscriptionMutate.ts
+2
-2
newsletterSubscriptionUpdate.ts
src/api/models/newsletterSubscriptionUpdate.ts
+2
-2
pageParameter.ts
src/api/models/pageParameter.ts
+2
-2
pageSizeParameter.ts
src/api/models/pageSizeParameter.ts
+2
-2
permission.ts
src/api/models/permission.ts
+2
-2
permissionBulkCreate.ts
src/api/models/permissionBulkCreate.ts
+2
-2
permissionBulkDelete.ts
src/api/models/permissionBulkDelete.ts
+2
-2
permissionCreate.ts
src/api/models/permissionCreate.ts
+2
-2
permissionMutate.ts
src/api/models/permissionMutate.ts
+2
-2
permissionUpdate.ts
src/api/models/permissionUpdate.ts
+2
-2
postApiV10Banner200.ts
src/api/models/postApiV10Banner200.ts
+11
-0
postApiV10Banner200AllOf.ts
src/api/models/postApiV10Banner200AllOf.ts
+12
-0
postApiV10Logo200.ts
src/api/models/postApiV10Logo200.ts
+11
-0
postApiV10Logo200AllOf.ts
src/api/models/postApiV10Logo200AllOf.ts
+12
-0
putApiV10BannerId200.ts
src/api/models/putApiV10BannerId200.ts
+11
-0
putApiV10BannerId200AllOf.ts
src/api/models/putApiV10BannerId200AllOf.ts
+12
-0
putApiV10LogoId200.ts
src/api/models/putApiV10LogoId200.ts
+11
-0
putApiV10LogoId200AllOf.ts
src/api/models/putApiV10LogoId200AllOf.ts
+12
-0
response.ts
src/api/models/response.ts
+2
-2
responseGetAllData.ts
src/api/models/responseGetAllData.ts
+2
-2
responseGetAllDataAllOf.ts
src/api/models/responseGetAllDataAllOf.ts
+2
-2
responseGetAllDataAllOfResponseData.ts
src/api/models/responseGetAllDataAllOfResponseData.ts
+2
-2
responseGetAllDataAllOfResponseDataRowsItem.ts
...api/models/responseGetAllDataAllOfResponseDataRowsItem.ts
+2
-2
responseResponseData.ts
src/api/models/responseResponseData.ts
+2
-2
responseViolationItem.ts
src/api/models/responseViolationItem.ts
+2
-2
role.ts
src/api/models/role.ts
+2
-2
roleBulkCreate.ts
src/api/models/roleBulkCreate.ts
+2
-2
roleBulkDelete.ts
src/api/models/roleBulkDelete.ts
+2
-2
roleCreate.ts
src/api/models/roleCreate.ts
+2
-2
rolePermission.ts
src/api/models/rolePermission.ts
+2
-2
rolePermissionBulkCreateByRole.ts
src/api/models/rolePermissionBulkCreateByRole.ts
+2
-2
rolePermissionBulkDelete.ts
src/api/models/rolePermissionBulkDelete.ts
+2
-2
roleUpdate.ts
src/api/models/roleUpdate.ts
+2
-2
siteInformationBranch.ts
src/api/models/siteInformationBranch.ts
+2
-2
siteInformationBranchMutate.ts
src/api/models/siteInformationBranchMutate.ts
+2
-2
siteInformationData.ts
src/api/models/siteInformationData.ts
+2
-2
siteInformationDataLogo.ts
src/api/models/siteInformationDataLogo.ts
+2
-2
siteInformationResponse.ts
src/api/models/siteInformationResponse.ts
+2
-2
siteInformationResponseAllOf.ts
src/api/models/siteInformationResponseAllOf.ts
+2
-2
siteInformationSocialLink.ts
src/api/models/siteInformationSocialLink.ts
+2
-2
siteInformationSocialMutate.ts
src/api/models/siteInformationSocialMutate.ts
+2
-2
siteInformationUpdateBody.ts
src/api/models/siteInformationUpdateBody.ts
+2
-2
sortFieldParameter.ts
src/api/models/sortFieldParameter.ts
+2
-2
sortOrderParameter.ts
src/api/models/sortOrderParameter.ts
+2
-2
termCreateRequest.ts
src/api/models/termCreateRequest.ts
+2
-2
termMember.ts
src/api/models/termMember.ts
+2
-2
termMemberAvatar.ts
src/api/models/termMemberAvatar.ts
+2
-2
termMemberAvatarProperty.ts
src/api/models/termMemberAvatarProperty.ts
+2
-2
termPositionRequestItem.ts
src/api/models/termPositionRequestItem.ts
+2
-2
termPositionResponse.ts
src/api/models/termPositionResponse.ts
+2
-2
termResponse.ts
src/api/models/termResponse.ts
+2
-2
termUpdateRequest.ts
src/api/models/termUpdateRequest.ts
+2
-2
unauthorizedResponse.ts
src/api/models/unauthorizedResponse.ts
+2
-2
unauthorizedResponseError.ts
src/api/models/unauthorizedResponseError.ts
+2
-2
unauthorizedResponseErrorMessage.ts
src/api/models/unauthorizedResponseErrorMessage.ts
+2
-2
unauthorizedResponseResponseData.ts
src/api/models/unauthorizedResponseResponseData.ts
+2
-2
unauthorizedResponseViolationItem.ts
src/api/models/unauthorizedResponseViolationItem.ts
+2
-2
userMeResponse.ts
src/api/models/userMeResponse.ts
+2
-2
video.ts
src/api/models/video.ts
+2
-2
videoMutate.ts
src/api/models/videoMutate.ts
+2
-2
index.tsx
src/app/(main)/(home)/components/banner/index.tsx
+2
-2
footer.tsx
src/app/(main)/_lib/layout/footer.tsx
+2
-2
header.tsx
src/app/(main)/_lib/layout/header.tsx
+4
-4
page.tsx
src/app/admin/base-config/page.tsx
+28
-28
page.tsx
src/app/admin/login/page.tsx
+2
-2
page.tsx
src/app/admin/videos/page.tsx
+8
-8
admin-sidebar.tsx
src/components/shared/admin-sidebar.tsx
+2
-2
newsletter-subscriptions.ts
src/lib/api/newsletter-subscriptions.ts
+8
-8
videos.ts
src/lib/api/videos.ts
+2
-2
No files found.
openapi/swagger-output.json
0 → 100644
View file @
b3589a95
This source diff could not be displayed because it is too large. You can
view the blob
instead.
orval.config.ts
View file @
b3589a95
...
...
@@ -40,23 +40,52 @@ const swaggerCandidates = [
async
function
fetchSwagger
()
{
for
(
const
url
of
swaggerCandidates
)
{
if
(
typeof
url
===
"string"
&&
fs
.
existsSync
(
url
))
{
return
JSON
.
parse
(
fs
.
readFileSync
(
url
,
"utf8"
));
if
(
!
url
)
continue
;
// 1) Local file path
if
(
fs
.
existsSync
(
url
)
&&
fs
.
statSync
(
url
).
isFile
())
{
const
raw
=
fs
.
readFileSync
(
url
,
"utf8"
);
try
{
return
JSON
.
parse
(
raw
);
}
catch
(
error
)
{
throw
new
Error
(
`Swagger spec tại
${
url
}
không phải JSON hợp lệ:
${
error
}
`
);
}
}
// 2) HTTP fetch — chỉ chấp nhận JSON, bỏ qua HTML (404, page app,...)
if
(
/^https
?
:
\/\/
/i
.
test
(
url
))
{
try
{
const
{
data
}
=
await
axios
.
get
(
url
,
{
const
{
data
,
headers
}
=
await
axios
.
get
(
url
,
{
headers
:
{
Origin
:
siteURL
},
// Ngăn axios tự nhận HTML là JSON — ép raw response để check Content-Type
responseType
:
"json"
,
validateStatus
:
(
status
)
=>
status
>=
200
&&
status
<
400
,
});
const
contentType
=
String
(
headers
?.[
"content-type"
]
??
""
).
toLowerCase
();
if
(
!
contentType
.
includes
(
"application/json"
)
&&
typeof
data
===
"string"
)
{
// Phản hồi không phải JSON (thường là HTML 404) — bỏ qua candidate này
continue
;
}
if
(
data
&&
typeof
data
===
"object"
)
{
return
data
;
}
}
catch
{
continue
;
}
}
}
// 3) Fallback cuối: openapi/swagger-output.json nằm trong repo
const
localSwagger
=
path
.
resolve
(
process
.
cwd
(),
"openapi/swagger-output.json"
);
if
(
fs
.
existsSync
(
localSwagger
))
{
return
JSON
.
parse
(
fs
.
readFileSync
(
localSwagger
,
"utf8"
));
const
raw
=
fs
.
readFileSync
(
localSwagger
,
"utf8"
);
try
{
return
JSON
.
parse
(
raw
);
}
catch
(
error
)
{
throw
new
Error
(
`Swagger spec tại
${
localSwagger
}
không phải JSON hợp lệ:
${
error
}
`
);
}
}
throw
new
Error
(
...
...
src/api/endpoints/banner.ts
View file @
b3589a95
/**
* Generated by orval v8.0.0-rc.0 🍺
* Do not edit manually.
*
Backend Template
*
Coded by Meu TEAM
*
VietProDev CMS Backend API
*
Generated API documentation
* OpenAPI spec version: 1.0.0
*/
import
{
...
...
@@ -30,12 +30,12 @@ import type {
}
from
'@tanstack/react-query'
;
import
type
{
Banner
Mut
ate
,
DeleteBannerId200
,
GetBannerId200
,
GetBannerParams
,
PostBanner200
,
PutBannerId200
,
Banner
Cre
ate
,
Delete
ApiV10
BannerId200
,
Get
ApiV10
BannerId200
,
Get
ApiV10
BannerParams
,
Post
ApiV10
Banner200
,
Put
ApiV10
BannerId200
,
ResponseGetAllData
}
from
'../models'
;
...
...
@@ -52,36 +52,36 @@ type SecondParameter<T extends (...args: never) => unknown> = Parameters<T>[1];
* Retrieve a single banner record by its ID
* @summary Get banner by ID
*/
export
type
getBannerIdResponse200
=
{
data
:
GetBannerId200
export
type
get
ApiV10
BannerIdResponse200
=
{
data
:
Get
ApiV10
BannerId200
status
:
200
}
export
type
getBannerIdResponse404
=
{
export
type
get
ApiV10
BannerIdResponse404
=
{
data
:
void
status
:
404
}
export
type
get
BannerIdResponseSuccess
=
(
get
BannerIdResponse200
)
&
{
export
type
get
ApiV10BannerIdResponseSuccess
=
(
getApiV10
BannerIdResponse200
)
&
{
headers
:
Headers
;
};
export
type
get
BannerIdResponseError
=
(
get
BannerIdResponse404
)
&
{
export
type
get
ApiV10BannerIdResponseError
=
(
getApiV10
BannerIdResponse404
)
&
{
headers
:
Headers
;
};
export
type
get
BannerIdResponse
=
(
getBannerIdResponseSuccess
|
get
BannerIdResponseError
)
export
type
get
ApiV10BannerIdResponse
=
(
getApiV10BannerIdResponseSuccess
|
getApiV10
BannerIdResponseError
)
export
const
getGetBannerIdUrl
=
(
id
:
string
,)
=>
{
export
const
getGet
ApiV10
BannerIdUrl
=
(
id
:
string
,)
=>
{
return
`/banner/
${
id
}
`
return
`/
api/v1.0/
banner/
${
id
}
`
}
export
const
get
BannerId
=
async
(
id
:
string
,
options
?:
RequestInit
):
Promise
<
get
BannerIdResponse
>
=>
{
export
const
get
ApiV10BannerId
=
async
(
id
:
string
,
options
?:
RequestInit
):
Promise
<
getApiV10
BannerIdResponse
>
=>
{
return
useCustomClient
<
get
BannerIdResponse
>
(
getGet
BannerIdUrl
(
id
),
return
useCustomClient
<
get
ApiV10BannerIdResponse
>
(
getGetApiV10
BannerIdUrl
(
id
),
{
...
options
,
method
:
'GET'
...
...
@@ -94,75 +94,75 @@ export const getBannerId = async (id: string, options?: RequestInit): Promise<ge
export
const
getGetBannerIdInfiniteQueryKey
=
(
id
?:
string
,)
=>
{
export
const
getGet
ApiV10
BannerIdInfiniteQueryKey
=
(
id
?:
string
,)
=>
{
return
[
'infinite'
,
`/banner/
${
id
}
`
'infinite'
,
`/
api/v1.0/
banner/
${
id
}
`
]
as
const
;
}
export
const
getGetBannerIdQueryKey
=
(
id
?:
string
,)
=>
{
export
const
getGet
ApiV10
BannerIdQueryKey
=
(
id
?:
string
,)
=>
{
return
[
`/banner/
${
id
}
`
`/
api/v1.0/
banner/
${
id
}
`
]
as
const
;
}
export
const
getGet
BannerIdInfiniteQueryOptions
=
<
TData
=
InfiniteData
<
Awaited
<
ReturnType
<
typeof
getBannerId
>>>
,
TError
=
ErrorType
<
void
>>
(
id
:
string
,
options
?:
{
query
?:
Partial
<
UseInfiniteQueryOptions
<
Awaited
<
ReturnType
<
typeof
get
BannerId
>>
,
TError
,
TData
>>
,
request
?:
SecondParameter
<
typeof
useCustomClient
>
}
export
const
getGet
ApiV10BannerIdInfiniteQueryOptions
=
<
TData
=
InfiniteData
<
Awaited
<
ReturnType
<
typeof
getApiV10BannerId
>>>
,
TError
=
ErrorType
<
void
>>
(
id
:
string
,
options
?:
{
query
?:
Partial
<
UseInfiniteQueryOptions
<
Awaited
<
ReturnType
<
typeof
getApiV10
BannerId
>>
,
TError
,
TData
>>
,
request
?:
SecondParameter
<
typeof
useCustomClient
>
}
)
=>
{
const
{
query
:
queryOptions
,
request
:
requestOptions
}
=
options
??
{};
const
queryKey
=
queryOptions
?.
queryKey
??
getGetBannerIdInfiniteQueryKey
(
id
);
const
queryKey
=
queryOptions
?.
queryKey
??
getGet
ApiV10
BannerIdInfiniteQueryKey
(
id
);
const
queryFn
:
QueryFunction
<
Awaited
<
ReturnType
<
typeof
get
BannerId
>>>
=
({
signal
})
=>
get
BannerId
(
id
,
{
signal
,
...
requestOptions
});
const
queryFn
:
QueryFunction
<
Awaited
<
ReturnType
<
typeof
get
ApiV10BannerId
>>>
=
({
signal
})
=>
getApiV10
BannerId
(
id
,
{
signal
,
...
requestOptions
});
return
{
queryKey
,
queryFn
,
enabled
:
!!
(
id
),
retry
:
3
,
retryDelay
:
1000
,
...
queryOptions
}
as
UseInfiniteQueryOptions
<
Awaited
<
ReturnType
<
typeof
getBannerId
>>
,
TError
,
TData
>
&
{
queryKey
:
DataTag
<
QueryKey
,
TData
,
TError
>
}
return
{
queryKey
,
queryFn
,
enabled
:
!!
(
id
),
retry
:
3
,
retryDelay
:
1000
,
...
queryOptions
}
as
UseInfiniteQueryOptions
<
Awaited
<
ReturnType
<
typeof
get
ApiV10
BannerId
>>
,
TError
,
TData
>
&
{
queryKey
:
DataTag
<
QueryKey
,
TData
,
TError
>
}
}
export
type
Get
BannerIdInfiniteQueryResult
=
NonNullable
<
Awaited
<
ReturnType
<
typeof
get
BannerId
>>>
export
type
GetBannerIdInfiniteQueryError
=
ErrorType
<
void
>
export
type
Get
ApiV10BannerIdInfiniteQueryResult
=
NonNullable
<
Awaited
<
ReturnType
<
typeof
getApiV10
BannerId
>>>
export
type
Get
ApiV10
BannerIdInfiniteQueryError
=
ErrorType
<
void
>
export
function
useGet
BannerIdInfinite
<
TData
=
InfiniteData
<
Awaited
<
ReturnType
<
typeof
get
BannerId
>>>
,
TError
=
ErrorType
<
void
>>
(
id
:
string
,
options
:
{
query
:
Partial
<
UseInfiniteQueryOptions
<
Awaited
<
ReturnType
<
typeof
getBannerId
>>
,
TError
,
TData
>>
&
Pick
<
export
function
useGet
ApiV10BannerIdInfinite
<
TData
=
InfiniteData
<
Awaited
<
ReturnType
<
typeof
getApiV10
BannerId
>>>
,
TError
=
ErrorType
<
void
>>
(
id
:
string
,
options
:
{
query
:
Partial
<
UseInfiniteQueryOptions
<
Awaited
<
ReturnType
<
typeof
get
ApiV10
BannerId
>>
,
TError
,
TData
>>
&
Pick
<
DefinedInitialDataOptions
<
Awaited
<
ReturnType
<
typeof
getBannerId
>>
,
Awaited
<
ReturnType
<
typeof
get
ApiV10
BannerId
>>
,
TError
,
Awaited
<
ReturnType
<
typeof
getBannerId
>>
Awaited
<
ReturnType
<
typeof
get
ApiV10
BannerId
>>
>
,
'initialData'
>
,
request
?:
SecondParameter
<
typeof
useCustomClient
>
}
,
queryClient
?:
QueryClient
):
DefinedUseInfiniteQueryResult
<
TData
,
TError
>
&
{
queryKey
:
DataTag
<
QueryKey
,
TData
,
TError
>
}
export
function
useGet
BannerIdInfinite
<
TData
=
InfiniteData
<
Awaited
<
ReturnType
<
typeof
get
BannerId
>>>
,
TError
=
ErrorType
<
void
>>
(
id
:
string
,
options
?:
{
query
?:
Partial
<
UseInfiniteQueryOptions
<
Awaited
<
ReturnType
<
typeof
getBannerId
>>
,
TError
,
TData
>>
&
Pick
<
export
function
useGet
ApiV10BannerIdInfinite
<
TData
=
InfiniteData
<
Awaited
<
ReturnType
<
typeof
getApiV10
BannerId
>>>
,
TError
=
ErrorType
<
void
>>
(
id
:
string
,
options
?:
{
query
?:
Partial
<
UseInfiniteQueryOptions
<
Awaited
<
ReturnType
<
typeof
get
ApiV10
BannerId
>>
,
TError
,
TData
>>
&
Pick
<
UndefinedInitialDataOptions
<
Awaited
<
ReturnType
<
typeof
getBannerId
>>
,
Awaited
<
ReturnType
<
typeof
get
ApiV10
BannerId
>>
,
TError
,
Awaited
<
ReturnType
<
typeof
getBannerId
>>
Awaited
<
ReturnType
<
typeof
get
ApiV10
BannerId
>>
>
,
'initialData'
>
,
request
?:
SecondParameter
<
typeof
useCustomClient
>
}
,
queryClient
?:
QueryClient
):
UseInfiniteQueryResult
<
TData
,
TError
>
&
{
queryKey
:
DataTag
<
QueryKey
,
TData
,
TError
>
}
export
function
useGet
BannerIdInfinite
<
TData
=
InfiniteData
<
Awaited
<
ReturnType
<
typeof
get
BannerId
>>>
,
TError
=
ErrorType
<
void
>>
(
id
:
string
,
options
?:
{
query
?:
Partial
<
UseInfiniteQueryOptions
<
Awaited
<
ReturnType
<
typeof
getBannerId
>>
,
TError
,
TData
>>
,
request
?:
SecondParameter
<
typeof
useCustomClient
>
}
export
function
useGet
ApiV10BannerIdInfinite
<
TData
=
InfiniteData
<
Awaited
<
ReturnType
<
typeof
getApiV10
BannerId
>>>
,
TError
=
ErrorType
<
void
>>
(
id
:
string
,
options
?:
{
query
?:
Partial
<
UseInfiniteQueryOptions
<
Awaited
<
ReturnType
<
typeof
get
ApiV10
BannerId
>>
,
TError
,
TData
>>
,
request
?:
SecondParameter
<
typeof
useCustomClient
>
}
,
queryClient
?:
QueryClient
):
UseInfiniteQueryResult
<
TData
,
TError
>
&
{
queryKey
:
DataTag
<
QueryKey
,
TData
,
TError
>
}
/**
* @summary Get banner by ID
*/
export
function
useGet
BannerIdInfinite
<
TData
=
InfiniteData
<
Awaited
<
ReturnType
<
typeof
get
BannerId
>>>
,
TError
=
ErrorType
<
void
>>
(
id
:
string
,
options
?:
{
query
?:
Partial
<
UseInfiniteQueryOptions
<
Awaited
<
ReturnType
<
typeof
getBannerId
>>
,
TError
,
TData
>>
,
request
?:
SecondParameter
<
typeof
useCustomClient
>
}
export
function
useGet
ApiV10BannerIdInfinite
<
TData
=
InfiniteData
<
Awaited
<
ReturnType
<
typeof
getApiV10
BannerId
>>>
,
TError
=
ErrorType
<
void
>>
(
id
:
string
,
options
?:
{
query
?:
Partial
<
UseInfiniteQueryOptions
<
Awaited
<
ReturnType
<
typeof
get
ApiV10
BannerId
>>
,
TError
,
TData
>>
,
request
?:
SecondParameter
<
typeof
useCustomClient
>
}
,
queryClient
?:
QueryClient
):
UseInfiniteQueryResult
<
TData
,
TError
>
&
{
queryKey
:
DataTag
<
QueryKey
,
TData
,
TError
>
}
{
const
queryOptions
=
getGetBannerIdInfiniteQueryOptions
(
id
,
options
)
const
queryOptions
=
getGet
ApiV10
BannerIdInfiniteQueryOptions
(
id
,
options
)
const
query
=
useInfiniteQuery
(
queryOptions
,
queryClient
)
as
UseInfiniteQueryResult
<
TData
,
TError
>
&
{
queryKey
:
DataTag
<
QueryKey
,
TData
,
TError
>
};
...
...
@@ -174,12 +174,12 @@ export function useGetBannerIdInfinite<TData = InfiniteData<Awaited<ReturnType<t
/**
* @summary Get banner by ID
*/
export
const
prefetchGet
BannerIdInfiniteQuery
=
async
<
TData
=
Awaited
<
ReturnType
<
typeof
get
BannerId
>>
,
TError
=
ErrorType
<
void
>>
(
queryClient
:
QueryClient
,
id
:
string
,
options
?:
{
query
?:
Partial
<
UseInfiniteQueryOptions
<
Awaited
<
ReturnType
<
typeof
getBannerId
>>
,
TError
,
TData
>>
,
request
?:
SecondParameter
<
typeof
useCustomClient
>
}
export
const
prefetchGet
ApiV10BannerIdInfiniteQuery
=
async
<
TData
=
Awaited
<
ReturnType
<
typeof
getApiV10
BannerId
>>
,
TError
=
ErrorType
<
void
>>
(
queryClient
:
QueryClient
,
id
:
string
,
options
?:
{
query
?:
Partial
<
UseInfiniteQueryOptions
<
Awaited
<
ReturnType
<
typeof
get
ApiV10
BannerId
>>
,
TError
,
TData
>>
,
request
?:
SecondParameter
<
typeof
useCustomClient
>
}
):
Promise
<
QueryClient
>
=>
{
const
queryOptions
=
getGetBannerIdInfiniteQueryOptions
(
id
,
options
)
const
queryOptions
=
getGet
ApiV10
BannerIdInfiniteQueryOptions
(
id
,
options
)
await
queryClient
.
prefetchInfiniteQuery
(
queryOptions
);
...
...
@@ -188,62 +188,62 @@ export const prefetchGetBannerIdInfiniteQuery = async <TData = Awaited<ReturnTyp
export
const
getGet
BannerIdQueryOptions
=
<
TData
=
Awaited
<
ReturnType
<
typeof
getBannerId
>>
,
TError
=
ErrorType
<
void
>>
(
id
:
string
,
options
?:
{
query
?:
Partial
<
UseQueryOptions
<
Awaited
<
ReturnType
<
typeof
get
BannerId
>>
,
TError
,
TData
>>
,
request
?:
SecondParameter
<
typeof
useCustomClient
>
}
export
const
getGet
ApiV10BannerIdQueryOptions
=
<
TData
=
Awaited
<
ReturnType
<
typeof
getApiV10BannerId
>>
,
TError
=
ErrorType
<
void
>>
(
id
:
string
,
options
?:
{
query
?:
Partial
<
UseQueryOptions
<
Awaited
<
ReturnType
<
typeof
getApiV10
BannerId
>>
,
TError
,
TData
>>
,
request
?:
SecondParameter
<
typeof
useCustomClient
>
}
)
=>
{
const
{
query
:
queryOptions
,
request
:
requestOptions
}
=
options
??
{};
const
queryKey
=
queryOptions
?.
queryKey
??
getGetBannerIdQueryKey
(
id
);
const
queryKey
=
queryOptions
?.
queryKey
??
getGet
ApiV10
BannerIdQueryKey
(
id
);
const
queryFn
:
QueryFunction
<
Awaited
<
ReturnType
<
typeof
get
BannerId
>>>
=
({
signal
})
=>
get
BannerId
(
id
,
{
signal
,
...
requestOptions
});
const
queryFn
:
QueryFunction
<
Awaited
<
ReturnType
<
typeof
get
ApiV10BannerId
>>>
=
({
signal
})
=>
getApiV10
BannerId
(
id
,
{
signal
,
...
requestOptions
});
return
{
queryKey
,
queryFn
,
enabled
:
!!
(
id
),
retry
:
3
,
retryDelay
:
1000
,
...
queryOptions
}
as
UseQueryOptions
<
Awaited
<
ReturnType
<
typeof
getBannerId
>>
,
TError
,
TData
>
&
{
queryKey
:
DataTag
<
QueryKey
,
TData
,
TError
>
}
return
{
queryKey
,
queryFn
,
enabled
:
!!
(
id
),
retry
:
3
,
retryDelay
:
1000
,
...
queryOptions
}
as
UseQueryOptions
<
Awaited
<
ReturnType
<
typeof
get
ApiV10
BannerId
>>
,
TError
,
TData
>
&
{
queryKey
:
DataTag
<
QueryKey
,
TData
,
TError
>
}
}
export
type
Get
BannerIdQueryResult
=
NonNullable
<
Awaited
<
ReturnType
<
typeof
get
BannerId
>>>
export
type
GetBannerIdQueryError
=
ErrorType
<
void
>
export
type
Get
ApiV10BannerIdQueryResult
=
NonNullable
<
Awaited
<
ReturnType
<
typeof
getApiV10
BannerId
>>>
export
type
Get
ApiV10
BannerIdQueryError
=
ErrorType
<
void
>
export
function
useGet
BannerId
<
TData
=
Awaited
<
ReturnType
<
typeof
get
BannerId
>>
,
TError
=
ErrorType
<
void
>>
(
id
:
string
,
options
:
{
query
:
Partial
<
UseQueryOptions
<
Awaited
<
ReturnType
<
typeof
getBannerId
>>
,
TError
,
TData
>>
&
Pick
<
export
function
useGet
ApiV10BannerId
<
TData
=
Awaited
<
ReturnType
<
typeof
getApiV10
BannerId
>>
,
TError
=
ErrorType
<
void
>>
(
id
:
string
,
options
:
{
query
:
Partial
<
UseQueryOptions
<
Awaited
<
ReturnType
<
typeof
get
ApiV10
BannerId
>>
,
TError
,
TData
>>
&
Pick
<
DefinedInitialDataOptions
<
Awaited
<
ReturnType
<
typeof
getBannerId
>>
,
Awaited
<
ReturnType
<
typeof
get
ApiV10
BannerId
>>
,
TError
,
Awaited
<
ReturnType
<
typeof
getBannerId
>>
Awaited
<
ReturnType
<
typeof
get
ApiV10
BannerId
>>
>
,
'initialData'
>
,
request
?:
SecondParameter
<
typeof
useCustomClient
>
}
,
queryClient
?:
QueryClient
):
DefinedUseQueryResult
<
TData
,
TError
>
&
{
queryKey
:
DataTag
<
QueryKey
,
TData
,
TError
>
}
export
function
useGet
BannerId
<
TData
=
Awaited
<
ReturnType
<
typeof
get
BannerId
>>
,
TError
=
ErrorType
<
void
>>
(
id
:
string
,
options
?:
{
query
?:
Partial
<
UseQueryOptions
<
Awaited
<
ReturnType
<
typeof
getBannerId
>>
,
TError
,
TData
>>
&
Pick
<
export
function
useGet
ApiV10BannerId
<
TData
=
Awaited
<
ReturnType
<
typeof
getApiV10
BannerId
>>
,
TError
=
ErrorType
<
void
>>
(
id
:
string
,
options
?:
{
query
?:
Partial
<
UseQueryOptions
<
Awaited
<
ReturnType
<
typeof
get
ApiV10
BannerId
>>
,
TError
,
TData
>>
&
Pick
<
UndefinedInitialDataOptions
<
Awaited
<
ReturnType
<
typeof
getBannerId
>>
,
Awaited
<
ReturnType
<
typeof
get
ApiV10
BannerId
>>
,
TError
,
Awaited
<
ReturnType
<
typeof
getBannerId
>>
Awaited
<
ReturnType
<
typeof
get
ApiV10
BannerId
>>
>
,
'initialData'
>
,
request
?:
SecondParameter
<
typeof
useCustomClient
>
}
,
queryClient
?:
QueryClient
):
UseQueryResult
<
TData
,
TError
>
&
{
queryKey
:
DataTag
<
QueryKey
,
TData
,
TError
>
}
export
function
useGet
BannerId
<
TData
=
Awaited
<
ReturnType
<
typeof
get
BannerId
>>
,
TError
=
ErrorType
<
void
>>
(
id
:
string
,
options
?:
{
query
?:
Partial
<
UseQueryOptions
<
Awaited
<
ReturnType
<
typeof
getBannerId
>>
,
TError
,
TData
>>
,
request
?:
SecondParameter
<
typeof
useCustomClient
>
}
export
function
useGet
ApiV10BannerId
<
TData
=
Awaited
<
ReturnType
<
typeof
getApiV10
BannerId
>>
,
TError
=
ErrorType
<
void
>>
(
id
:
string
,
options
?:
{
query
?:
Partial
<
UseQueryOptions
<
Awaited
<
ReturnType
<
typeof
get
ApiV10
BannerId
>>
,
TError
,
TData
>>
,
request
?:
SecondParameter
<
typeof
useCustomClient
>
}
,
queryClient
?:
QueryClient
):
UseQueryResult
<
TData
,
TError
>
&
{
queryKey
:
DataTag
<
QueryKey
,
TData
,
TError
>
}
/**
* @summary Get banner by ID
*/
export
function
useGet
BannerId
<
TData
=
Awaited
<
ReturnType
<
typeof
get
BannerId
>>
,
TError
=
ErrorType
<
void
>>
(
id
:
string
,
options
?:
{
query
?:
Partial
<
UseQueryOptions
<
Awaited
<
ReturnType
<
typeof
getBannerId
>>
,
TError
,
TData
>>
,
request
?:
SecondParameter
<
typeof
useCustomClient
>
}
export
function
useGet
ApiV10BannerId
<
TData
=
Awaited
<
ReturnType
<
typeof
getApiV10
BannerId
>>
,
TError
=
ErrorType
<
void
>>
(
id
:
string
,
options
?:
{
query
?:
Partial
<
UseQueryOptions
<
Awaited
<
ReturnType
<
typeof
get
ApiV10
BannerId
>>
,
TError
,
TData
>>
,
request
?:
SecondParameter
<
typeof
useCustomClient
>
}
,
queryClient
?:
QueryClient
):
UseQueryResult
<
TData
,
TError
>
&
{
queryKey
:
DataTag
<
QueryKey
,
TData
,
TError
>
}
{
const
queryOptions
=
getGetBannerIdQueryOptions
(
id
,
options
)
const
queryOptions
=
getGet
ApiV10
BannerIdQueryOptions
(
id
,
options
)
const
query
=
useQuery
(
queryOptions
,
queryClient
)
as
UseQueryResult
<
TData
,
TError
>
&
{
queryKey
:
DataTag
<
QueryKey
,
TData
,
TError
>
};
...
...
@@ -255,12 +255,12 @@ export function useGetBannerId<TData = Awaited<ReturnType<typeof getBannerId>>,
/**
* @summary Get banner by ID
*/
export
const
prefetchGet
BannerIdQuery
=
async
<
TData
=
Awaited
<
ReturnType
<
typeof
get
BannerId
>>
,
TError
=
ErrorType
<
void
>>
(
queryClient
:
QueryClient
,
id
:
string
,
options
?:
{
query
?:
Partial
<
UseQueryOptions
<
Awaited
<
ReturnType
<
typeof
getBannerId
>>
,
TError
,
TData
>>
,
request
?:
SecondParameter
<
typeof
useCustomClient
>
}
export
const
prefetchGet
ApiV10BannerIdQuery
=
async
<
TData
=
Awaited
<
ReturnType
<
typeof
getApiV10
BannerId
>>
,
TError
=
ErrorType
<
void
>>
(
queryClient
:
QueryClient
,
id
:
string
,
options
?:
{
query
?:
Partial
<
UseQueryOptions
<
Awaited
<
ReturnType
<
typeof
get
ApiV10
BannerId
>>
,
TError
,
TData
>>
,
request
?:
SecondParameter
<
typeof
useCustomClient
>
}
):
Promise
<
QueryClient
>
=>
{
const
queryOptions
=
getGetBannerIdQueryOptions
(
id
,
options
)
const
queryOptions
=
getGet
ApiV10
BannerIdQueryOptions
(
id
,
options
)
await
queryClient
.
prefetchQuery
(
queryOptions
);
...
...
@@ -273,54 +273,54 @@ export const prefetchGetBannerIdQuery = async <TData = Awaited<ReturnType<typeof
* Update a single banner record by its ID
* @summary Update banner by ID
*/
export
type
putBannerIdResponse200
=
{
data
:
PutBannerId200
export
type
put
ApiV10
BannerIdResponse200
=
{
data
:
Put
ApiV10
BannerId200
status
:
200
}
export
type
putBannerIdResponse404
=
{
export
type
put
ApiV10
BannerIdResponse404
=
{
data
:
void
status
:
404
}
export
type
put
BannerIdResponseSuccess
=
(
put
BannerIdResponse200
)
&
{
export
type
put
ApiV10BannerIdResponseSuccess
=
(
putApiV10
BannerIdResponse200
)
&
{
headers
:
Headers
;
};
export
type
put
BannerIdResponseError
=
(
put
BannerIdResponse404
)
&
{
export
type
put
ApiV10BannerIdResponseError
=
(
putApiV10
BannerIdResponse404
)
&
{
headers
:
Headers
;
};
export
type
put
BannerIdResponse
=
(
putBannerIdResponseSuccess
|
put
BannerIdResponseError
)
export
type
put
ApiV10BannerIdResponse
=
(
putApiV10BannerIdResponseSuccess
|
putApiV10
BannerIdResponseError
)
export
const
getPutBannerIdUrl
=
(
id
:
string
,)
=>
{
export
const
getPut
ApiV10
BannerIdUrl
=
(
id
:
string
,)
=>
{
return
`/banner/
${
id
}
`
return
`/
api/v1.0/
banner/
${
id
}
`
}
export
const
putBannerId
=
async
(
id
:
string
,
banner
Mutate
:
BannerMutate
,
options
?:
RequestInit
):
Promise
<
put
BannerIdResponse
>
=>
{
export
const
put
ApiV10
BannerId
=
async
(
id
:
string
,
banner
Create
:
BannerCreate
,
options
?:
RequestInit
):
Promise
<
putApiV10
BannerIdResponse
>
=>
{
return
useCustomClient
<
put
BannerIdResponse
>
(
getPut
BannerIdUrl
(
id
),
return
useCustomClient
<
put
ApiV10BannerIdResponse
>
(
getPutApiV10
BannerIdUrl
(
id
),
{
...
options
,
method
:
'PUT'
,
headers
:
{
'Content-Type'
:
'application/json'
,
...
options
?.
headers
},
body
:
JSON
.
stringify
(
banner
Mut
ate
,)
banner
Cre
ate
,)
}
);}
export
const
getPutBannerIdMutationOptions
=
<
TError
=
ErrorType
<
void
>
,
TContext
=
unknown
>
(
options
?:
{
mutation
?:
UseMutationOptions
<
Awaited
<
ReturnType
<
typeof
put
BannerId
>>
,
TError
,{
id
:
string
;
data
:
BodyType
<
BannerMut
ate
>
},
TContext
>
,
request
?:
SecondParameter
<
typeof
useCustomClient
>
}
):
UseMutationOptions
<
Awaited
<
ReturnType
<
typeof
put
BannerId
>>
,
TError
,{
id
:
string
;
data
:
BodyType
<
BannerMut
ate
>
},
TContext
>
=>
{
export
const
getPut
ApiV10
BannerIdMutationOptions
=
<
TError
=
ErrorType
<
void
>
,
TContext
=
unknown
>
(
options
?:
{
mutation
?:
UseMutationOptions
<
Awaited
<
ReturnType
<
typeof
put
ApiV10BannerId
>>
,
TError
,{
id
:
string
;
data
:
BodyType
<
BannerCre
ate
>
},
TContext
>
,
request
?:
SecondParameter
<
typeof
useCustomClient
>
}
):
UseMutationOptions
<
Awaited
<
ReturnType
<
typeof
put
ApiV10BannerId
>>
,
TError
,{
id
:
string
;
data
:
BodyType
<
BannerCre
ate
>
},
TContext
>
=>
{
const
mutationKey
=
[
'putBannerId'
];
const
mutationKey
=
[
'put
ApiV10
BannerId'
];
const
{
mutation
:
mutationOptions
,
request
:
requestOptions
}
=
options
?
options
.
mutation
&&
'mutationKey'
in
options
.
mutation
&&
options
.
mutation
.
mutationKey
?
options
...
...
@@ -330,10 +330,10 @@ const {mutation: mutationOptions, request: requestOptions} = options ?
const
mutationFn
:
MutationFunction
<
Awaited
<
ReturnType
<
typeof
put
BannerId
>>
,
{
id
:
string
;
data
:
BodyType
<
BannerMut
ate
>
}
>
=
(
props
)
=>
{
const
mutationFn
:
MutationFunction
<
Awaited
<
ReturnType
<
typeof
put
ApiV10BannerId
>>
,
{
id
:
string
;
data
:
BodyType
<
BannerCre
ate
>
}
>
=
(
props
)
=>
{
const
{
id
,
data
}
=
props
??
{};
return
putBannerId
(
id
,
data
,
requestOptions
)
return
put
ApiV10
BannerId
(
id
,
data
,
requestOptions
)
}
...
...
@@ -341,23 +341,23 @@ const {mutation: mutationOptions, request: requestOptions} = options ?
return
{
mutationFn
,
...
mutationOptions
}}
export
type
Put
BannerIdMutationResult
=
NonNullable
<
Awaited
<
ReturnType
<
typeof
put
BannerId
>>>
export
type
Put
BannerIdMutationBody
=
BodyType
<
BannerMut
ate
>
export
type
PutBannerIdMutationError
=
ErrorType
<
void
>
export
type
Put
ApiV10BannerIdMutationResult
=
NonNullable
<
Awaited
<
ReturnType
<
typeof
putApiV10
BannerId
>>>
export
type
Put
ApiV10BannerIdMutationBody
=
BodyType
<
BannerCre
ate
>
export
type
Put
ApiV10
BannerIdMutationError
=
ErrorType
<
void
>
/**
* @summary Update banner by ID
*/
export
const
usePutBannerId
=
<
TError
=
ErrorType
<
void
>
,
TContext
=
unknown
>
(
options
?:
{
mutation
?:
UseMutationOptions
<
Awaited
<
ReturnType
<
typeof
put
BannerId
>>
,
TError
,{
id
:
string
;
data
:
BodyType
<
BannerMut
ate
>
},
TContext
>
,
request
?:
SecondParameter
<
typeof
useCustomClient
>
}
export
const
usePut
ApiV10
BannerId
=
<
TError
=
ErrorType
<
void
>
,
TContext
=
unknown
>
(
options
?:
{
mutation
?:
UseMutationOptions
<
Awaited
<
ReturnType
<
typeof
put
ApiV10BannerId
>>
,
TError
,{
id
:
string
;
data
:
BodyType
<
BannerCre
ate
>
},
TContext
>
,
request
?:
SecondParameter
<
typeof
useCustomClient
>
}
,
queryClient
?:
QueryClient
):
UseMutationResult
<
Awaited
<
ReturnType
<
typeof
putBannerId
>>
,
Awaited
<
ReturnType
<
typeof
put
ApiV10
BannerId
>>
,
TError
,
{
id
:
string
;
data
:
BodyType
<
Banner
Mut
ate
>
},
{
id
:
string
;
data
:
BodyType
<
Banner
Cre
ate
>
},
TContext
>
=>
{
const
mutationOptions
=
getPutBannerIdMutationOptions
(
options
);
const
mutationOptions
=
getPut
ApiV10
BannerIdMutationOptions
(
options
);
return
useMutation
(
mutationOptions
,
queryClient
);
}
...
...
@@ -365,36 +365,36 @@ export const usePutBannerId = <TError = ErrorType<void>,
* Delete a single banner record by its ID
* @summary Delete banner by ID
*/
export
type
deleteBannerIdResponse200
=
{
data
:
DeleteBannerId200
export
type
delete
ApiV10
BannerIdResponse200
=
{
data
:
Delete
ApiV10
BannerId200
status
:
200
}
export
type
deleteBannerIdResponse404
=
{
export
type
delete
ApiV10
BannerIdResponse404
=
{
data
:
void
status
:
404
}
export
type
delete
BannerIdResponseSuccess
=
(
delete
BannerIdResponse200
)
&
{
export
type
delete
ApiV10BannerIdResponseSuccess
=
(
deleteApiV10
BannerIdResponse200
)
&
{
headers
:
Headers
;
};
export
type
delete
BannerIdResponseError
=
(
delete
BannerIdResponse404
)
&
{
export
type
delete
ApiV10BannerIdResponseError
=
(
deleteApiV10
BannerIdResponse404
)
&
{
headers
:
Headers
;
};
export
type
delete
BannerIdResponse
=
(
deleteBannerIdResponseSuccess
|
delete
BannerIdResponseError
)
export
type
delete
ApiV10BannerIdResponse
=
(
deleteApiV10BannerIdResponseSuccess
|
deleteApiV10
BannerIdResponseError
)
export
const
getDeleteBannerIdUrl
=
(
id
:
string
,)
=>
{
export
const
getDelete
ApiV10
BannerIdUrl
=
(
id
:
string
,)
=>
{
return
`/banner/
${
id
}
`
return
`/
api/v1.0/
banner/
${
id
}
`
}
export
const
delete
BannerId
=
async
(
id
:
string
,
options
?:
RequestInit
):
Promise
<
delete
BannerIdResponse
>
=>
{
export
const
delete
ApiV10BannerId
=
async
(
id
:
string
,
options
?:
RequestInit
):
Promise
<
deleteApiV10
BannerIdResponse
>
=>
{
return
useCustomClient
<
delete
BannerIdResponse
>
(
getDelete
BannerIdUrl
(
id
),
return
useCustomClient
<
delete
ApiV10BannerIdResponse
>
(
getDeleteApiV10
BannerIdUrl
(
id
),
{
...
options
,
method
:
'DELETE'
...
...
@@ -406,11 +406,11 @@ export const deleteBannerId = async (id: string, options?: RequestInit): Promise
export
const
getDeleteBannerIdMutationOptions
=
<
TError
=
ErrorType
<
void
>
,
TContext
=
unknown
>
(
options
?:
{
mutation
?:
UseMutationOptions
<
Awaited
<
ReturnType
<
typeof
deleteBannerId
>>
,
TError
,{
id
:
string
},
TContext
>
,
request
?:
SecondParameter
<
typeof
useCustomClient
>
}
):
UseMutationOptions
<
Awaited
<
ReturnType
<
typeof
deleteBannerId
>>
,
TError
,{
id
:
string
},
TContext
>
=>
{
export
const
getDelete
ApiV10
BannerIdMutationOptions
=
<
TError
=
ErrorType
<
void
>
,
TContext
=
unknown
>
(
options
?:
{
mutation
?:
UseMutationOptions
<
Awaited
<
ReturnType
<
typeof
delete
ApiV10
BannerId
>>
,
TError
,{
id
:
string
},
TContext
>
,
request
?:
SecondParameter
<
typeof
useCustomClient
>
}
):
UseMutationOptions
<
Awaited
<
ReturnType
<
typeof
delete
ApiV10
BannerId
>>
,
TError
,{
id
:
string
},
TContext
>
=>
{
const
mutationKey
=
[
'deleteBannerId'
];
const
mutationKey
=
[
'delete
ApiV10
BannerId'
];
const
{
mutation
:
mutationOptions
,
request
:
requestOptions
}
=
options
?
options
.
mutation
&&
'mutationKey'
in
options
.
mutation
&&
options
.
mutation
.
mutationKey
?
options
...
...
@@ -420,10 +420,10 @@ const {mutation: mutationOptions, request: requestOptions} = options ?
const
mutationFn
:
MutationFunction
<
Awaited
<
ReturnType
<
typeof
deleteBannerId
>>
,
{
id
:
string
}
>
=
(
props
)
=>
{
const
mutationFn
:
MutationFunction
<
Awaited
<
ReturnType
<
typeof
delete
ApiV10
BannerId
>>
,
{
id
:
string
}
>
=
(
props
)
=>
{
const
{
id
}
=
props
??
{};
return
deleteBannerId
(
id
,
requestOptions
)
return
delete
ApiV10
BannerId
(
id
,
requestOptions
)
}
...
...
@@ -431,23 +431,23 @@ const {mutation: mutationOptions, request: requestOptions} = options ?
return
{
mutationFn
,
...
mutationOptions
}}
export
type
Delete
BannerIdMutationResult
=
NonNullable
<
Awaited
<
ReturnType
<
typeof
delete
BannerId
>>>
export
type
Delete
ApiV10BannerIdMutationResult
=
NonNullable
<
Awaited
<
ReturnType
<
typeof
deleteApiV10
BannerId
>>>
export
type
DeleteBannerIdMutationError
=
ErrorType
<
void
>
export
type
Delete
ApiV10
BannerIdMutationError
=
ErrorType
<
void
>
/**
* @summary Delete banner by ID
*/
export
const
useDeleteBannerId
=
<
TError
=
ErrorType
<
void
>
,
TContext
=
unknown
>
(
options
?:
{
mutation
?:
UseMutationOptions
<
Awaited
<
ReturnType
<
typeof
deleteBannerId
>>
,
TError
,{
id
:
string
},
TContext
>
,
request
?:
SecondParameter
<
typeof
useCustomClient
>
}
export
const
useDelete
ApiV10
BannerId
=
<
TError
=
ErrorType
<
void
>
,
TContext
=
unknown
>
(
options
?:
{
mutation
?:
UseMutationOptions
<
Awaited
<
ReturnType
<
typeof
delete
ApiV10
BannerId
>>
,
TError
,{
id
:
string
},
TContext
>
,
request
?:
SecondParameter
<
typeof
useCustomClient
>
}
,
queryClient
?:
QueryClient
):
UseMutationResult
<
Awaited
<
ReturnType
<
typeof
deleteBannerId
>>
,
Awaited
<
ReturnType
<
typeof
delete
ApiV10
BannerId
>>
,
TError
,
{
id
:
string
},
TContext
>
=>
{
const
mutationOptions
=
getDeleteBannerIdMutationOptions
(
options
);
const
mutationOptions
=
getDelete
ApiV10
BannerIdMutationOptions
(
options
);
return
useMutation
(
mutationOptions
,
queryClient
);
}
...
...
@@ -455,19 +455,19 @@ export const useDeleteBannerId = <TError = ErrorType<void>,
* Retrieve a list of banner with pagination, filtering and sorting
* @summary Get all banner
*/
export
type
getBannerResponse200
=
{
export
type
get
ApiV10
BannerResponse200
=
{
data
:
ResponseGetAllData
status
:
200
}
export
type
get
BannerResponseSuccess
=
(
get
BannerResponse200
)
&
{
export
type
get
ApiV10BannerResponseSuccess
=
(
getApiV10
BannerResponse200
)
&
{
headers
:
Headers
;
};
;
export
type
get
BannerResponse
=
(
get
BannerResponseSuccess
)
export
type
get
ApiV10BannerResponse
=
(
getApiV10
BannerResponseSuccess
)
export
const
getGet
BannerUrl
=
(
params
?:
Get
BannerParams
,)
=>
{
export
const
getGet
ApiV10BannerUrl
=
(
params
?:
GetApiV10
BannerParams
,)
=>
{
const
normalizedParams
=
new
URLSearchParams
();
Object
.
entries
(
params
||
{}).
forEach
(([
key
,
value
])
=>
{
...
...
@@ -479,12 +479,12 @@ export const getGetBannerUrl = (params?: GetBannerParams,) => {
const
stringifiedParams
=
normalizedParams
.
toString
();
return
stringifiedParams
.
length
>
0
?
`/
banner?
${
stringifiedParams
}
`
:
`
/banner`
return
stringifiedParams
.
length
>
0
?
`/
api/v1.0/banner?
${
stringifiedParams
}
`
:
`/api/v1.0
/banner`
}
export
const
get
Banner
=
async
(
params
?:
GetBannerParams
,
options
?:
RequestInit
):
Promise
<
get
BannerResponse
>
=>
{
export
const
get
ApiV10Banner
=
async
(
params
?:
GetApiV10BannerParams
,
options
?:
RequestInit
):
Promise
<
getApiV10
BannerResponse
>
=>
{
return
useCustomClient
<
get
BannerResponse
>
(
getGet
BannerUrl
(
params
),
return
useCustomClient
<
get
ApiV10BannerResponse
>
(
getGetApiV10
BannerUrl
(
params
),
{
...
options
,
method
:
'GET'
...
...
@@ -497,75 +497,75 @@ export const getBanner = async (params?: GetBannerParams, options?: RequestInit)
export
const
getGet
BannerInfiniteQueryKey
=
(
params
?:
Get
BannerParams
,)
=>
{
export
const
getGet
ApiV10BannerInfiniteQueryKey
=
(
params
?:
GetApiV10
BannerParams
,)
=>
{
return
[
'infinite'
,
`/banner`
,
...(
params
?
[
params
]:
[])
'infinite'
,
`/
api/v1.0/
banner`
,
...(
params
?
[
params
]:
[])
]
as
const
;
}
export
const
getGet
BannerQueryKey
=
(
params
?:
Get
BannerParams
,)
=>
{
export
const
getGet
ApiV10BannerQueryKey
=
(
params
?:
GetApiV10
BannerParams
,)
=>
{
return
[
`/banner`
,
...(
params
?
[
params
]:
[])
`/
api/v1.0/
banner`
,
...(
params
?
[
params
]:
[])
]
as
const
;
}
export
const
getGet
BannerInfiniteQueryOptions
=
<
TData
=
InfiniteData
<
Awaited
<
ReturnType
<
typeof
getBanner
>>>
,
TError
=
ErrorType
<
unknown
>>
(
params
?:
GetBannerParams
,
options
?:
{
query
?:
Partial
<
UseInfiniteQueryOptions
<
Awaited
<
ReturnType
<
typeof
get
Banner
>>
,
TError
,
TData
>>
,
request
?:
SecondParameter
<
typeof
useCustomClient
>
}
export
const
getGet
ApiV10BannerInfiniteQueryOptions
=
<
TData
=
InfiniteData
<
Awaited
<
ReturnType
<
typeof
getApiV10Banner
>>>
,
TError
=
ErrorType
<
unknown
>>
(
params
?:
GetApiV10BannerParams
,
options
?:
{
query
?:
Partial
<
UseInfiniteQueryOptions
<
Awaited
<
ReturnType
<
typeof
getApiV10
Banner
>>
,
TError
,
TData
>>
,
request
?:
SecondParameter
<
typeof
useCustomClient
>
}
)
=>
{
const
{
query
:
queryOptions
,
request
:
requestOptions
}
=
options
??
{};
const
queryKey
=
queryOptions
?.
queryKey
??
getGetBannerInfiniteQueryKey
(
params
);
const
queryKey
=
queryOptions
?.
queryKey
??
getGet
ApiV10
BannerInfiniteQueryKey
(
params
);
const
queryFn
:
QueryFunction
<
Awaited
<
ReturnType
<
typeof
get
Banner
>>>
=
({
signal
})
=>
get
Banner
(
params
,
{
signal
,
...
requestOptions
});
const
queryFn
:
QueryFunction
<
Awaited
<
ReturnType
<
typeof
get
ApiV10Banner
>>>
=
({
signal
})
=>
getApiV10
Banner
(
params
,
{
signal
,
...
requestOptions
});
return
{
queryKey
,
queryFn
,
retry
:
3
,
retryDelay
:
1000
,
...
queryOptions
}
as
UseInfiniteQueryOptions
<
Awaited
<
ReturnType
<
typeof
getBanner
>>
,
TError
,
TData
>
&
{
queryKey
:
DataTag
<
QueryKey
,
TData
,
TError
>
}
return
{
queryKey
,
queryFn
,
retry
:
3
,
retryDelay
:
1000
,
...
queryOptions
}
as
UseInfiniteQueryOptions
<
Awaited
<
ReturnType
<
typeof
get
ApiV10
Banner
>>
,
TError
,
TData
>
&
{
queryKey
:
DataTag
<
QueryKey
,
TData
,
TError
>
}
}
export
type
Get
BannerInfiniteQueryResult
=
NonNullable
<
Awaited
<
ReturnType
<
typeof
get
Banner
>>>
export
type
GetBannerInfiniteQueryError
=
ErrorType
<
unknown
>
export
type
Get
ApiV10BannerInfiniteQueryResult
=
NonNullable
<
Awaited
<
ReturnType
<
typeof
getApiV10
Banner
>>>
export
type
Get
ApiV10
BannerInfiniteQueryError
=
ErrorType
<
unknown
>
export
function
useGet
BannerInfinite
<
TData
=
InfiniteData
<
Awaited
<
ReturnType
<
typeof
get
Banner
>>>
,
TError
=
ErrorType
<
unknown
>>
(
params
:
undefined
|
Get
BannerParams
,
options
:
{
query
:
Partial
<
UseInfiniteQueryOptions
<
Awaited
<
ReturnType
<
typeof
get
Banner
>>
,
TError
,
TData
>>
&
Pick
<
export
function
useGet
ApiV10BannerInfinite
<
TData
=
InfiniteData
<
Awaited
<
ReturnType
<
typeof
getApiV10
Banner
>>>
,
TError
=
ErrorType
<
unknown
>>
(
params
:
undefined
|
Get
ApiV10BannerParams
,
options
:
{
query
:
Partial
<
UseInfiniteQueryOptions
<
Awaited
<
ReturnType
<
typeof
getApiV10
Banner
>>
,
TError
,
TData
>>
&
Pick
<
DefinedInitialDataOptions
<
Awaited
<
ReturnType
<
typeof
getBanner
>>
,
Awaited
<
ReturnType
<
typeof
get
ApiV10
Banner
>>
,
TError
,
Awaited
<
ReturnType
<
typeof
getBanner
>>
Awaited
<
ReturnType
<
typeof
get
ApiV10
Banner
>>
>
,
'initialData'
>
,
request
?:
SecondParameter
<
typeof
useCustomClient
>
}
,
queryClient
?:
QueryClient
):
DefinedUseInfiniteQueryResult
<
TData
,
TError
>
&
{
queryKey
:
DataTag
<
QueryKey
,
TData
,
TError
>
}
export
function
useGet
BannerInfinite
<
TData
=
InfiniteData
<
Awaited
<
ReturnType
<
typeof
get
Banner
>>>
,
TError
=
ErrorType
<
unknown
>>
(
params
?:
Get
BannerParams
,
options
?:
{
query
?:
Partial
<
UseInfiniteQueryOptions
<
Awaited
<
ReturnType
<
typeof
get
Banner
>>
,
TError
,
TData
>>
&
Pick
<
export
function
useGet
ApiV10BannerInfinite
<
TData
=
InfiniteData
<
Awaited
<
ReturnType
<
typeof
getApiV10
Banner
>>>
,
TError
=
ErrorType
<
unknown
>>
(
params
?:
Get
ApiV10BannerParams
,
options
?:
{
query
?:
Partial
<
UseInfiniteQueryOptions
<
Awaited
<
ReturnType
<
typeof
getApiV10
Banner
>>
,
TError
,
TData
>>
&
Pick
<
UndefinedInitialDataOptions
<
Awaited
<
ReturnType
<
typeof
getBanner
>>
,
Awaited
<
ReturnType
<
typeof
get
ApiV10
Banner
>>
,
TError
,
Awaited
<
ReturnType
<
typeof
getBanner
>>
Awaited
<
ReturnType
<
typeof
get
ApiV10
Banner
>>
>
,
'initialData'
>
,
request
?:
SecondParameter
<
typeof
useCustomClient
>
}
,
queryClient
?:
QueryClient
):
UseInfiniteQueryResult
<
TData
,
TError
>
&
{
queryKey
:
DataTag
<
QueryKey
,
TData
,
TError
>
}
export
function
useGet
BannerInfinite
<
TData
=
InfiniteData
<
Awaited
<
ReturnType
<
typeof
get
Banner
>>>
,
TError
=
ErrorType
<
unknown
>>
(
params
?:
Get
BannerParams
,
options
?:
{
query
?:
Partial
<
UseInfiniteQueryOptions
<
Awaited
<
ReturnType
<
typeof
get
Banner
>>
,
TError
,
TData
>>
,
request
?:
SecondParameter
<
typeof
useCustomClient
>
}
export
function
useGet
ApiV10BannerInfinite
<
TData
=
InfiniteData
<
Awaited
<
ReturnType
<
typeof
getApiV10
Banner
>>>
,
TError
=
ErrorType
<
unknown
>>
(
params
?:
Get
ApiV10BannerParams
,
options
?:
{
query
?:
Partial
<
UseInfiniteQueryOptions
<
Awaited
<
ReturnType
<
typeof
getApiV10
Banner
>>
,
TError
,
TData
>>
,
request
?:
SecondParameter
<
typeof
useCustomClient
>
}
,
queryClient
?:
QueryClient
):
UseInfiniteQueryResult
<
TData
,
TError
>
&
{
queryKey
:
DataTag
<
QueryKey
,
TData
,
TError
>
}
/**
* @summary Get all banner
*/
export
function
useGet
BannerInfinite
<
TData
=
InfiniteData
<
Awaited
<
ReturnType
<
typeof
get
Banner
>>>
,
TError
=
ErrorType
<
unknown
>>
(
params
?:
Get
BannerParams
,
options
?:
{
query
?:
Partial
<
UseInfiniteQueryOptions
<
Awaited
<
ReturnType
<
typeof
get
Banner
>>
,
TError
,
TData
>>
,
request
?:
SecondParameter
<
typeof
useCustomClient
>
}
export
function
useGet
ApiV10BannerInfinite
<
TData
=
InfiniteData
<
Awaited
<
ReturnType
<
typeof
getApiV10
Banner
>>>
,
TError
=
ErrorType
<
unknown
>>
(
params
?:
Get
ApiV10BannerParams
,
options
?:
{
query
?:
Partial
<
UseInfiniteQueryOptions
<
Awaited
<
ReturnType
<
typeof
getApiV10
Banner
>>
,
TError
,
TData
>>
,
request
?:
SecondParameter
<
typeof
useCustomClient
>
}
,
queryClient
?:
QueryClient
):
UseInfiniteQueryResult
<
TData
,
TError
>
&
{
queryKey
:
DataTag
<
QueryKey
,
TData
,
TError
>
}
{
const
queryOptions
=
getGetBannerInfiniteQueryOptions
(
params
,
options
)
const
queryOptions
=
getGet
ApiV10
BannerInfiniteQueryOptions
(
params
,
options
)
const
query
=
useInfiniteQuery
(
queryOptions
,
queryClient
)
as
UseInfiniteQueryResult
<
TData
,
TError
>
&
{
queryKey
:
DataTag
<
QueryKey
,
TData
,
TError
>
};
...
...
@@ -577,12 +577,12 @@ export function useGetBannerInfinite<TData = InfiniteData<Awaited<ReturnType<typ
/**
* @summary Get all banner
*/
export
const
prefetchGet
BannerInfiniteQuery
=
async
<
TData
=
Awaited
<
ReturnType
<
typeof
get
Banner
>>
,
TError
=
ErrorType
<
unknown
>>
(
queryClient
:
QueryClient
,
params
?:
Get
BannerParams
,
options
?:
{
query
?:
Partial
<
UseInfiniteQueryOptions
<
Awaited
<
ReturnType
<
typeof
get
Banner
>>
,
TError
,
TData
>>
,
request
?:
SecondParameter
<
typeof
useCustomClient
>
}
export
const
prefetchGet
ApiV10BannerInfiniteQuery
=
async
<
TData
=
Awaited
<
ReturnType
<
typeof
getApiV10
Banner
>>
,
TError
=
ErrorType
<
unknown
>>
(
queryClient
:
QueryClient
,
params
?:
Get
ApiV10BannerParams
,
options
?:
{
query
?:
Partial
<
UseInfiniteQueryOptions
<
Awaited
<
ReturnType
<
typeof
getApiV10
Banner
>>
,
TError
,
TData
>>
,
request
?:
SecondParameter
<
typeof
useCustomClient
>
}
):
Promise
<
QueryClient
>
=>
{
const
queryOptions
=
getGetBannerInfiniteQueryOptions
(
params
,
options
)
const
queryOptions
=
getGet
ApiV10
BannerInfiniteQueryOptions
(
params
,
options
)
await
queryClient
.
prefetchInfiniteQuery
(
queryOptions
);
...
...
@@ -591,62 +591,62 @@ export const prefetchGetBannerInfiniteQuery = async <TData = Awaited<ReturnType<
export
const
getGet
BannerQueryOptions
=
<
TData
=
Awaited
<
ReturnType
<
typeof
getBanner
>>
,
TError
=
ErrorType
<
unknown
>>
(
params
?:
GetBannerParams
,
options
?:
{
query
?:
Partial
<
UseQueryOptions
<
Awaited
<
ReturnType
<
typeof
get
Banner
>>
,
TError
,
TData
>>
,
request
?:
SecondParameter
<
typeof
useCustomClient
>
}
export
const
getGet
ApiV10BannerQueryOptions
=
<
TData
=
Awaited
<
ReturnType
<
typeof
getApiV10Banner
>>
,
TError
=
ErrorType
<
unknown
>>
(
params
?:
GetApiV10BannerParams
,
options
?:
{
query
?:
Partial
<
UseQueryOptions
<
Awaited
<
ReturnType
<
typeof
getApiV10
Banner
>>
,
TError
,
TData
>>
,
request
?:
SecondParameter
<
typeof
useCustomClient
>
}
)
=>
{
const
{
query
:
queryOptions
,
request
:
requestOptions
}
=
options
??
{};
const
queryKey
=
queryOptions
?.
queryKey
??
getGetBannerQueryKey
(
params
);
const
queryKey
=
queryOptions
?.
queryKey
??
getGet
ApiV10
BannerQueryKey
(
params
);
const
queryFn
:
QueryFunction
<
Awaited
<
ReturnType
<
typeof
get
Banner
>>>
=
({
signal
})
=>
get
Banner
(
params
,
{
signal
,
...
requestOptions
});
const
queryFn
:
QueryFunction
<
Awaited
<
ReturnType
<
typeof
get
ApiV10Banner
>>>
=
({
signal
})
=>
getApiV10
Banner
(
params
,
{
signal
,
...
requestOptions
});
return
{
queryKey
,
queryFn
,
retry
:
3
,
retryDelay
:
1000
,
...
queryOptions
}
as
UseQueryOptions
<
Awaited
<
ReturnType
<
typeof
getBanner
>>
,
TError
,
TData
>
&
{
queryKey
:
DataTag
<
QueryKey
,
TData
,
TError
>
}
return
{
queryKey
,
queryFn
,
retry
:
3
,
retryDelay
:
1000
,
...
queryOptions
}
as
UseQueryOptions
<
Awaited
<
ReturnType
<
typeof
get
ApiV10
Banner
>>
,
TError
,
TData
>
&
{
queryKey
:
DataTag
<
QueryKey
,
TData
,
TError
>
}
}
export
type
Get
BannerQueryResult
=
NonNullable
<
Awaited
<
ReturnType
<
typeof
get
Banner
>>>
export
type
GetBannerQueryError
=
ErrorType
<
unknown
>
export
type
Get
ApiV10BannerQueryResult
=
NonNullable
<
Awaited
<
ReturnType
<
typeof
getApiV10
Banner
>>>
export
type
Get
ApiV10
BannerQueryError
=
ErrorType
<
unknown
>
export
function
useGet
Banner
<
TData
=
Awaited
<
ReturnType
<
typeof
get
Banner
>>
,
TError
=
ErrorType
<
unknown
>>
(
params
:
undefined
|
Get
BannerParams
,
options
:
{
query
:
Partial
<
UseQueryOptions
<
Awaited
<
ReturnType
<
typeof
get
Banner
>>
,
TError
,
TData
>>
&
Pick
<
export
function
useGet
ApiV10Banner
<
TData
=
Awaited
<
ReturnType
<
typeof
getApiV10
Banner
>>
,
TError
=
ErrorType
<
unknown
>>
(
params
:
undefined
|
Get
ApiV10BannerParams
,
options
:
{
query
:
Partial
<
UseQueryOptions
<
Awaited
<
ReturnType
<
typeof
getApiV10
Banner
>>
,
TError
,
TData
>>
&
Pick
<
DefinedInitialDataOptions
<
Awaited
<
ReturnType
<
typeof
getBanner
>>
,
Awaited
<
ReturnType
<
typeof
get
ApiV10
Banner
>>
,
TError
,
Awaited
<
ReturnType
<
typeof
getBanner
>>
Awaited
<
ReturnType
<
typeof
get
ApiV10
Banner
>>
>
,
'initialData'
>
,
request
?:
SecondParameter
<
typeof
useCustomClient
>
}
,
queryClient
?:
QueryClient
):
DefinedUseQueryResult
<
TData
,
TError
>
&
{
queryKey
:
DataTag
<
QueryKey
,
TData
,
TError
>
}
export
function
useGet
Banner
<
TData
=
Awaited
<
ReturnType
<
typeof
get
Banner
>>
,
TError
=
ErrorType
<
unknown
>>
(
params
?:
Get
BannerParams
,
options
?:
{
query
?:
Partial
<
UseQueryOptions
<
Awaited
<
ReturnType
<
typeof
get
Banner
>>
,
TError
,
TData
>>
&
Pick
<
export
function
useGet
ApiV10Banner
<
TData
=
Awaited
<
ReturnType
<
typeof
getApiV10
Banner
>>
,
TError
=
ErrorType
<
unknown
>>
(
params
?:
Get
ApiV10BannerParams
,
options
?:
{
query
?:
Partial
<
UseQueryOptions
<
Awaited
<
ReturnType
<
typeof
getApiV10
Banner
>>
,
TError
,
TData
>>
&
Pick
<
UndefinedInitialDataOptions
<
Awaited
<
ReturnType
<
typeof
getBanner
>>
,
Awaited
<
ReturnType
<
typeof
get
ApiV10
Banner
>>
,
TError
,
Awaited
<
ReturnType
<
typeof
getBanner
>>
Awaited
<
ReturnType
<
typeof
get
ApiV10
Banner
>>
>
,
'initialData'
>
,
request
?:
SecondParameter
<
typeof
useCustomClient
>
}
,
queryClient
?:
QueryClient
):
UseQueryResult
<
TData
,
TError
>
&
{
queryKey
:
DataTag
<
QueryKey
,
TData
,
TError
>
}
export
function
useGet
Banner
<
TData
=
Awaited
<
ReturnType
<
typeof
get
Banner
>>
,
TError
=
ErrorType
<
unknown
>>
(
params
?:
Get
BannerParams
,
options
?:
{
query
?:
Partial
<
UseQueryOptions
<
Awaited
<
ReturnType
<
typeof
get
Banner
>>
,
TError
,
TData
>>
,
request
?:
SecondParameter
<
typeof
useCustomClient
>
}
export
function
useGet
ApiV10Banner
<
TData
=
Awaited
<
ReturnType
<
typeof
getApiV10
Banner
>>
,
TError
=
ErrorType
<
unknown
>>
(
params
?:
Get
ApiV10BannerParams
,
options
?:
{
query
?:
Partial
<
UseQueryOptions
<
Awaited
<
ReturnType
<
typeof
getApiV10
Banner
>>
,
TError
,
TData
>>
,
request
?:
SecondParameter
<
typeof
useCustomClient
>
}
,
queryClient
?:
QueryClient
):
UseQueryResult
<
TData
,
TError
>
&
{
queryKey
:
DataTag
<
QueryKey
,
TData
,
TError
>
}
/**
* @summary Get all banner
*/
export
function
useGet
Banner
<
TData
=
Awaited
<
ReturnType
<
typeof
get
Banner
>>
,
TError
=
ErrorType
<
unknown
>>
(
params
?:
Get
BannerParams
,
options
?:
{
query
?:
Partial
<
UseQueryOptions
<
Awaited
<
ReturnType
<
typeof
get
Banner
>>
,
TError
,
TData
>>
,
request
?:
SecondParameter
<
typeof
useCustomClient
>
}
export
function
useGet
ApiV10Banner
<
TData
=
Awaited
<
ReturnType
<
typeof
getApiV10
Banner
>>
,
TError
=
ErrorType
<
unknown
>>
(
params
?:
Get
ApiV10BannerParams
,
options
?:
{
query
?:
Partial
<
UseQueryOptions
<
Awaited
<
ReturnType
<
typeof
getApiV10
Banner
>>
,
TError
,
TData
>>
,
request
?:
SecondParameter
<
typeof
useCustomClient
>
}
,
queryClient
?:
QueryClient
):
UseQueryResult
<
TData
,
TError
>
&
{
queryKey
:
DataTag
<
QueryKey
,
TData
,
TError
>
}
{
const
queryOptions
=
getGetBannerQueryOptions
(
params
,
options
)
const
queryOptions
=
getGet
ApiV10
BannerQueryOptions
(
params
,
options
)
const
query
=
useQuery
(
queryOptions
,
queryClient
)
as
UseQueryResult
<
TData
,
TError
>
&
{
queryKey
:
DataTag
<
QueryKey
,
TData
,
TError
>
};
...
...
@@ -658,12 +658,12 @@ export function useGetBanner<TData = Awaited<ReturnType<typeof getBanner>>, TErr
/**
* @summary Get all banner
*/
export
const
prefetchGet
BannerQuery
=
async
<
TData
=
Awaited
<
ReturnType
<
typeof
get
Banner
>>
,
TError
=
ErrorType
<
unknown
>>
(
queryClient
:
QueryClient
,
params
?:
Get
BannerParams
,
options
?:
{
query
?:
Partial
<
UseQueryOptions
<
Awaited
<
ReturnType
<
typeof
get
Banner
>>
,
TError
,
TData
>>
,
request
?:
SecondParameter
<
typeof
useCustomClient
>
}
export
const
prefetchGet
ApiV10BannerQuery
=
async
<
TData
=
Awaited
<
ReturnType
<
typeof
getApiV10
Banner
>>
,
TError
=
ErrorType
<
unknown
>>
(
queryClient
:
QueryClient
,
params
?:
Get
ApiV10BannerParams
,
options
?:
{
query
?:
Partial
<
UseQueryOptions
<
Awaited
<
ReturnType
<
typeof
getApiV10
Banner
>>
,
TError
,
TData
>>
,
request
?:
SecondParameter
<
typeof
useCustomClient
>
}
):
Promise
<
QueryClient
>
=>
{
const
queryOptions
=
getGetBannerQueryOptions
(
params
,
options
)
const
queryOptions
=
getGet
ApiV10
BannerQueryOptions
(
params
,
options
)
await
queryClient
.
prefetchQuery
(
queryOptions
);
...
...
@@ -676,46 +676,46 @@ export const prefetchGetBannerQuery = async <TData = Awaited<ReturnType<typeof g
* Create a new banner record
* @summary Create a banner
*/
export
type
postBannerResponse200
=
{
data
:
PostBanner200
export
type
post
ApiV10
BannerResponse200
=
{
data
:
Post
ApiV10
Banner200
status
:
200
}
export
type
post
BannerResponseSuccess
=
(
post
BannerResponse200
)
&
{
export
type
post
ApiV10BannerResponseSuccess
=
(
postApiV10
BannerResponse200
)
&
{
headers
:
Headers
;
};
;
export
type
post
BannerResponse
=
(
post
BannerResponseSuccess
)
export
type
post
ApiV10BannerResponse
=
(
postApiV10
BannerResponseSuccess
)
export
const
getPostBannerUrl
=
()
=>
{
export
const
getPost
ApiV10
BannerUrl
=
()
=>
{
return
`/banner`
return
`/
api/v1.0/
banner`
}
export
const
post
Banner
=
async
(
bannerMutate
:
BannerMutate
,
options
?:
RequestInit
):
Promise
<
post
BannerResponse
>
=>
{
export
const
post
ApiV10Banner
=
async
(
bannerCreate
:
BannerCreate
,
options
?:
RequestInit
):
Promise
<
postApiV10
BannerResponse
>
=>
{
return
useCustomClient
<
post
BannerResponse
>
(
getPost
BannerUrl
(),
return
useCustomClient
<
post
ApiV10BannerResponse
>
(
getPostApiV10
BannerUrl
(),
{
...
options
,
method
:
'POST'
,
headers
:
{
'Content-Type'
:
'application/json'
,
...
options
?.
headers
},
body
:
JSON
.
stringify
(
banner
Mut
ate
,)
banner
Cre
ate
,)
}
);}
export
const
getPostBannerMutationOptions
=
<
TError
=
ErrorType
<
unknown
>
,
TContext
=
unknown
>
(
options
?:
{
mutation
?:
UseMutationOptions
<
Awaited
<
ReturnType
<
typeof
post
Banner
>>
,
TError
,{
data
:
BodyType
<
BannerMut
ate
>
},
TContext
>
,
request
?:
SecondParameter
<
typeof
useCustomClient
>
}
):
UseMutationOptions
<
Awaited
<
ReturnType
<
typeof
post
Banner
>>
,
TError
,{
data
:
BodyType
<
BannerMut
ate
>
},
TContext
>
=>
{
export
const
getPost
ApiV10
BannerMutationOptions
=
<
TError
=
ErrorType
<
unknown
>
,
TContext
=
unknown
>
(
options
?:
{
mutation
?:
UseMutationOptions
<
Awaited
<
ReturnType
<
typeof
post
ApiV10Banner
>>
,
TError
,{
data
:
BodyType
<
BannerCre
ate
>
},
TContext
>
,
request
?:
SecondParameter
<
typeof
useCustomClient
>
}
):
UseMutationOptions
<
Awaited
<
ReturnType
<
typeof
post
ApiV10Banner
>>
,
TError
,{
data
:
BodyType
<
BannerCre
ate
>
},
TContext
>
=>
{
const
mutationKey
=
[
'postBanner'
];
const
mutationKey
=
[
'post
ApiV10
Banner'
];
const
{
mutation
:
mutationOptions
,
request
:
requestOptions
}
=
options
?
options
.
mutation
&&
'mutationKey'
in
options
.
mutation
&&
options
.
mutation
.
mutationKey
?
options
...
...
@@ -725,10 +725,10 @@ const {mutation: mutationOptions, request: requestOptions} = options ?
const
mutationFn
:
MutationFunction
<
Awaited
<
ReturnType
<
typeof
post
Banner
>>
,
{
data
:
BodyType
<
BannerMut
ate
>
}
>
=
(
props
)
=>
{
const
mutationFn
:
MutationFunction
<
Awaited
<
ReturnType
<
typeof
post
ApiV10Banner
>>
,
{
data
:
BodyType
<
BannerCre
ate
>
}
>
=
(
props
)
=>
{
const
{
data
}
=
props
??
{};
return
postBanner
(
data
,
requestOptions
)
return
post
ApiV10
Banner
(
data
,
requestOptions
)
}
...
...
@@ -736,23 +736,23 @@ const {mutation: mutationOptions, request: requestOptions} = options ?
return
{
mutationFn
,
...
mutationOptions
}}
export
type
Post
BannerMutationResult
=
NonNullable
<
Awaited
<
ReturnType
<
typeof
post
Banner
>>>
export
type
Post
BannerMutationBody
=
BodyType
<
BannerMut
ate
>
export
type
PostBannerMutationError
=
ErrorType
<
unknown
>
export
type
Post
ApiV10BannerMutationResult
=
NonNullable
<
Awaited
<
ReturnType
<
typeof
postApiV10
Banner
>>>
export
type
Post
ApiV10BannerMutationBody
=
BodyType
<
BannerCre
ate
>
export
type
Post
ApiV10
BannerMutationError
=
ErrorType
<
unknown
>
/**
* @summary Create a banner
*/
export
const
usePostBanner
=
<
TError
=
ErrorType
<
unknown
>
,
TContext
=
unknown
>
(
options
?:
{
mutation
?:
UseMutationOptions
<
Awaited
<
ReturnType
<
typeof
post
Banner
>>
,
TError
,{
data
:
BodyType
<
BannerMut
ate
>
},
TContext
>
,
request
?:
SecondParameter
<
typeof
useCustomClient
>
}
export
const
usePost
ApiV10
Banner
=
<
TError
=
ErrorType
<
unknown
>
,
TContext
=
unknown
>
(
options
?:
{
mutation
?:
UseMutationOptions
<
Awaited
<
ReturnType
<
typeof
post
ApiV10Banner
>>
,
TError
,{
data
:
BodyType
<
BannerCre
ate
>
},
TContext
>
,
request
?:
SecondParameter
<
typeof
useCustomClient
>
}
,
queryClient
?:
QueryClient
):
UseMutationResult
<
Awaited
<
ReturnType
<
typeof
postBanner
>>
,
Awaited
<
ReturnType
<
typeof
post
ApiV10
Banner
>>
,
TError
,
{
data
:
BodyType
<
Banner
Mut
ate
>
},
{
data
:
BodyType
<
Banner
Cre
ate
>
},
TContext
>
=>
{
const
mutationOptions
=
getPostBannerMutationOptions
(
options
);
const
mutationOptions
=
getPost
ApiV10
BannerMutationOptions
(
options
);
return
useMutation
(
mutationOptions
,
queryClient
);
}
src/api/endpoints/category.ts
View file @
b3589a95
/**
* Generated by orval v8.0.0-rc.0 🍺
* Do not edit manually.
*
Backend Template
*
Coded by Meu TEAM
*
VietProDev CMS Backend API
*
Generated API documentation
* OpenAPI spec version: 1.0.0
*/
import
{
...
...
@@ -31,11 +31,11 @@ import type {
import
type
{
CategoryMutate
,
DeleteCategoryId200
,
GetCategoryId200
,
GetCategoryParams
,
PostCategory200
,
PutCategoryId200
,
Delete
ApiV10
CategoryId200
,
Get
ApiV10
CategoryId200
,
Get
ApiV10
CategoryParams
,
Post
ApiV10
Category200
,
Put
ApiV10
CategoryId200
,
ResponseGetAllData
}
from
'../models'
;
...
...
@@ -52,36 +52,36 @@ type SecondParameter<T extends (...args: never) => unknown> = Parameters<T>[1];
* Retrieve a single category record by its ID
* @summary Get category by ID
*/
export
type
getCategoryIdResponse200
=
{
data
:
GetCategoryId200
export
type
get
ApiV10
CategoryIdResponse200
=
{
data
:
Get
ApiV10
CategoryId200
status
:
200
}
export
type
getCategoryIdResponse404
=
{
export
type
get
ApiV10
CategoryIdResponse404
=
{
data
:
void
status
:
404
}
export
type
get
CategoryIdResponseSuccess
=
(
get
CategoryIdResponse200
)
&
{
export
type
get
ApiV10CategoryIdResponseSuccess
=
(
getApiV10
CategoryIdResponse200
)
&
{
headers
:
Headers
;
};
export
type
get
CategoryIdResponseError
=
(
get
CategoryIdResponse404
)
&
{
export
type
get
ApiV10CategoryIdResponseError
=
(
getApiV10
CategoryIdResponse404
)
&
{
headers
:
Headers
;
};
export
type
get
CategoryIdResponse
=
(
getCategoryIdResponseSuccess
|
get
CategoryIdResponseError
)
export
type
get
ApiV10CategoryIdResponse
=
(
getApiV10CategoryIdResponseSuccess
|
getApiV10
CategoryIdResponseError
)
export
const
getGetCategoryIdUrl
=
(
id
:
string
,)
=>
{
export
const
getGet
ApiV10
CategoryIdUrl
=
(
id
:
string
,)
=>
{
return
`/category/
${
id
}
`
return
`/
api/v1.0/
category/
${
id
}
`
}
export
const
get
CategoryId
=
async
(
id
:
string
,
options
?:
RequestInit
):
Promise
<
get
CategoryIdResponse
>
=>
{
export
const
get
ApiV10CategoryId
=
async
(
id
:
string
,
options
?:
RequestInit
):
Promise
<
getApiV10
CategoryIdResponse
>
=>
{
return
useCustomClient
<
get
CategoryIdResponse
>
(
getGet
CategoryIdUrl
(
id
),
return
useCustomClient
<
get
ApiV10CategoryIdResponse
>
(
getGetApiV10
CategoryIdUrl
(
id
),
{
...
options
,
method
:
'GET'
...
...
@@ -94,75 +94,75 @@ export const getCategoryId = async (id: string, options?: RequestInit): Promise<
export
const
getGetCategoryIdInfiniteQueryKey
=
(
id
?:
string
,)
=>
{
export
const
getGet
ApiV10
CategoryIdInfiniteQueryKey
=
(
id
?:
string
,)
=>
{
return
[
'infinite'
,
`/category/
${
id
}
`
'infinite'
,
`/
api/v1.0/
category/
${
id
}
`
]
as
const
;
}
export
const
getGetCategoryIdQueryKey
=
(
id
?:
string
,)
=>
{
export
const
getGet
ApiV10
CategoryIdQueryKey
=
(
id
?:
string
,)
=>
{
return
[
`/category/
${
id
}
`
`/
api/v1.0/
category/
${
id
}
`
]
as
const
;
}
export
const
getGet
CategoryIdInfiniteQueryOptions
=
<
TData
=
InfiniteData
<
Awaited
<
ReturnType
<
typeof
getCategoryId
>>>
,
TError
=
ErrorType
<
void
>>
(
id
:
string
,
options
?:
{
query
?:
Partial
<
UseInfiniteQueryOptions
<
Awaited
<
ReturnType
<
typeof
get
CategoryId
>>
,
TError
,
TData
>>
,
request
?:
SecondParameter
<
typeof
useCustomClient
>
}
export
const
getGet
ApiV10CategoryIdInfiniteQueryOptions
=
<
TData
=
InfiniteData
<
Awaited
<
ReturnType
<
typeof
getApiV10CategoryId
>>>
,
TError
=
ErrorType
<
void
>>
(
id
:
string
,
options
?:
{
query
?:
Partial
<
UseInfiniteQueryOptions
<
Awaited
<
ReturnType
<
typeof
getApiV10
CategoryId
>>
,
TError
,
TData
>>
,
request
?:
SecondParameter
<
typeof
useCustomClient
>
}
)
=>
{
const
{
query
:
queryOptions
,
request
:
requestOptions
}
=
options
??
{};
const
queryKey
=
queryOptions
?.
queryKey
??
getGetCategoryIdInfiniteQueryKey
(
id
);
const
queryKey
=
queryOptions
?.
queryKey
??
getGet
ApiV10
CategoryIdInfiniteQueryKey
(
id
);
const
queryFn
:
QueryFunction
<
Awaited
<
ReturnType
<
typeof
get
CategoryId
>>>
=
({
signal
})
=>
get
CategoryId
(
id
,
{
signal
,
...
requestOptions
});
const
queryFn
:
QueryFunction
<
Awaited
<
ReturnType
<
typeof
get
ApiV10CategoryId
>>>
=
({
signal
})
=>
getApiV10
CategoryId
(
id
,
{
signal
,
...
requestOptions
});
return
{
queryKey
,
queryFn
,
enabled
:
!!
(
id
),
retry
:
3
,
retryDelay
:
1000
,
...
queryOptions
}
as
UseInfiniteQueryOptions
<
Awaited
<
ReturnType
<
typeof
getCategoryId
>>
,
TError
,
TData
>
&
{
queryKey
:
DataTag
<
QueryKey
,
TData
,
TError
>
}
return
{
queryKey
,
queryFn
,
enabled
:
!!
(
id
),
retry
:
3
,
retryDelay
:
1000
,
...
queryOptions
}
as
UseInfiniteQueryOptions
<
Awaited
<
ReturnType
<
typeof
get
ApiV10
CategoryId
>>
,
TError
,
TData
>
&
{
queryKey
:
DataTag
<
QueryKey
,
TData
,
TError
>
}
}
export
type
Get
CategoryIdInfiniteQueryResult
=
NonNullable
<
Awaited
<
ReturnType
<
typeof
get
CategoryId
>>>
export
type
GetCategoryIdInfiniteQueryError
=
ErrorType
<
void
>
export
type
Get
ApiV10CategoryIdInfiniteQueryResult
=
NonNullable
<
Awaited
<
ReturnType
<
typeof
getApiV10
CategoryId
>>>
export
type
Get
ApiV10
CategoryIdInfiniteQueryError
=
ErrorType
<
void
>
export
function
useGet
CategoryIdInfinite
<
TData
=
InfiniteData
<
Awaited
<
ReturnType
<
typeof
get
CategoryId
>>>
,
TError
=
ErrorType
<
void
>>
(
id
:
string
,
options
:
{
query
:
Partial
<
UseInfiniteQueryOptions
<
Awaited
<
ReturnType
<
typeof
getCategoryId
>>
,
TError
,
TData
>>
&
Pick
<
export
function
useGet
ApiV10CategoryIdInfinite
<
TData
=
InfiniteData
<
Awaited
<
ReturnType
<
typeof
getApiV10
CategoryId
>>>
,
TError
=
ErrorType
<
void
>>
(
id
:
string
,
options
:
{
query
:
Partial
<
UseInfiniteQueryOptions
<
Awaited
<
ReturnType
<
typeof
get
ApiV10
CategoryId
>>
,
TError
,
TData
>>
&
Pick
<
DefinedInitialDataOptions
<
Awaited
<
ReturnType
<
typeof
getCategoryId
>>
,
Awaited
<
ReturnType
<
typeof
get
ApiV10
CategoryId
>>
,
TError
,
Awaited
<
ReturnType
<
typeof
getCategoryId
>>
Awaited
<
ReturnType
<
typeof
get
ApiV10
CategoryId
>>
>
,
'initialData'
>
,
request
?:
SecondParameter
<
typeof
useCustomClient
>
}
,
queryClient
?:
QueryClient
):
DefinedUseInfiniteQueryResult
<
TData
,
TError
>
&
{
queryKey
:
DataTag
<
QueryKey
,
TData
,
TError
>
}
export
function
useGet
CategoryIdInfinite
<
TData
=
InfiniteData
<
Awaited
<
ReturnType
<
typeof
get
CategoryId
>>>
,
TError
=
ErrorType
<
void
>>
(
id
:
string
,
options
?:
{
query
?:
Partial
<
UseInfiniteQueryOptions
<
Awaited
<
ReturnType
<
typeof
getCategoryId
>>
,
TError
,
TData
>>
&
Pick
<
export
function
useGet
ApiV10CategoryIdInfinite
<
TData
=
InfiniteData
<
Awaited
<
ReturnType
<
typeof
getApiV10
CategoryId
>>>
,
TError
=
ErrorType
<
void
>>
(
id
:
string
,
options
?:
{
query
?:
Partial
<
UseInfiniteQueryOptions
<
Awaited
<
ReturnType
<
typeof
get
ApiV10
CategoryId
>>
,
TError
,
TData
>>
&
Pick
<
UndefinedInitialDataOptions
<
Awaited
<
ReturnType
<
typeof
getCategoryId
>>
,
Awaited
<
ReturnType
<
typeof
get
ApiV10
CategoryId
>>
,
TError
,
Awaited
<
ReturnType
<
typeof
getCategoryId
>>
Awaited
<
ReturnType
<
typeof
get
ApiV10
CategoryId
>>
>
,
'initialData'
>
,
request
?:
SecondParameter
<
typeof
useCustomClient
>
}
,
queryClient
?:
QueryClient
):
UseInfiniteQueryResult
<
TData
,
TError
>
&
{
queryKey
:
DataTag
<
QueryKey
,
TData
,
TError
>
}
export
function
useGet
CategoryIdInfinite
<
TData
=
InfiniteData
<
Awaited
<
ReturnType
<
typeof
get
CategoryId
>>>
,
TError
=
ErrorType
<
void
>>
(
id
:
string
,
options
?:
{
query
?:
Partial
<
UseInfiniteQueryOptions
<
Awaited
<
ReturnType
<
typeof
getCategoryId
>>
,
TError
,
TData
>>
,
request
?:
SecondParameter
<
typeof
useCustomClient
>
}
export
function
useGet
ApiV10CategoryIdInfinite
<
TData
=
InfiniteData
<
Awaited
<
ReturnType
<
typeof
getApiV10
CategoryId
>>>
,
TError
=
ErrorType
<
void
>>
(
id
:
string
,
options
?:
{
query
?:
Partial
<
UseInfiniteQueryOptions
<
Awaited
<
ReturnType
<
typeof
get
ApiV10
CategoryId
>>
,
TError
,
TData
>>
,
request
?:
SecondParameter
<
typeof
useCustomClient
>
}
,
queryClient
?:
QueryClient
):
UseInfiniteQueryResult
<
TData
,
TError
>
&
{
queryKey
:
DataTag
<
QueryKey
,
TData
,
TError
>
}
/**
* @summary Get category by ID
*/
export
function
useGet
CategoryIdInfinite
<
TData
=
InfiniteData
<
Awaited
<
ReturnType
<
typeof
get
CategoryId
>>>
,
TError
=
ErrorType
<
void
>>
(
id
:
string
,
options
?:
{
query
?:
Partial
<
UseInfiniteQueryOptions
<
Awaited
<
ReturnType
<
typeof
getCategoryId
>>
,
TError
,
TData
>>
,
request
?:
SecondParameter
<
typeof
useCustomClient
>
}
export
function
useGet
ApiV10CategoryIdInfinite
<
TData
=
InfiniteData
<
Awaited
<
ReturnType
<
typeof
getApiV10
CategoryId
>>>
,
TError
=
ErrorType
<
void
>>
(
id
:
string
,
options
?:
{
query
?:
Partial
<
UseInfiniteQueryOptions
<
Awaited
<
ReturnType
<
typeof
get
ApiV10
CategoryId
>>
,
TError
,
TData
>>
,
request
?:
SecondParameter
<
typeof
useCustomClient
>
}
,
queryClient
?:
QueryClient
):
UseInfiniteQueryResult
<
TData
,
TError
>
&
{
queryKey
:
DataTag
<
QueryKey
,
TData
,
TError
>
}
{
const
queryOptions
=
getGetCategoryIdInfiniteQueryOptions
(
id
,
options
)
const
queryOptions
=
getGet
ApiV10
CategoryIdInfiniteQueryOptions
(
id
,
options
)
const
query
=
useInfiniteQuery
(
queryOptions
,
queryClient
)
as
UseInfiniteQueryResult
<
TData
,
TError
>
&
{
queryKey
:
DataTag
<
QueryKey
,
TData
,
TError
>
};
...
...
@@ -174,12 +174,12 @@ export function useGetCategoryIdInfinite<TData = InfiniteData<Awaited<ReturnType
/**
* @summary Get category by ID
*/
export
const
prefetchGet
CategoryIdInfiniteQuery
=
async
<
TData
=
Awaited
<
ReturnType
<
typeof
get
CategoryId
>>
,
TError
=
ErrorType
<
void
>>
(
queryClient
:
QueryClient
,
id
:
string
,
options
?:
{
query
?:
Partial
<
UseInfiniteQueryOptions
<
Awaited
<
ReturnType
<
typeof
getCategoryId
>>
,
TError
,
TData
>>
,
request
?:
SecondParameter
<
typeof
useCustomClient
>
}
export
const
prefetchGet
ApiV10CategoryIdInfiniteQuery
=
async
<
TData
=
Awaited
<
ReturnType
<
typeof
getApiV10
CategoryId
>>
,
TError
=
ErrorType
<
void
>>
(
queryClient
:
QueryClient
,
id
:
string
,
options
?:
{
query
?:
Partial
<
UseInfiniteQueryOptions
<
Awaited
<
ReturnType
<
typeof
get
ApiV10
CategoryId
>>
,
TError
,
TData
>>
,
request
?:
SecondParameter
<
typeof
useCustomClient
>
}
):
Promise
<
QueryClient
>
=>
{
const
queryOptions
=
getGetCategoryIdInfiniteQueryOptions
(
id
,
options
)
const
queryOptions
=
getGet
ApiV10
CategoryIdInfiniteQueryOptions
(
id
,
options
)
await
queryClient
.
prefetchInfiniteQuery
(
queryOptions
);
...
...
@@ -188,62 +188,62 @@ export const prefetchGetCategoryIdInfiniteQuery = async <TData = Awaited<ReturnT
export
const
getGet
CategoryIdQueryOptions
=
<
TData
=
Awaited
<
ReturnType
<
typeof
getCategoryId
>>
,
TError
=
ErrorType
<
void
>>
(
id
:
string
,
options
?:
{
query
?:
Partial
<
UseQueryOptions
<
Awaited
<
ReturnType
<
typeof
get
CategoryId
>>
,
TError
,
TData
>>
,
request
?:
SecondParameter
<
typeof
useCustomClient
>
}
export
const
getGet
ApiV10CategoryIdQueryOptions
=
<
TData
=
Awaited
<
ReturnType
<
typeof
getApiV10CategoryId
>>
,
TError
=
ErrorType
<
void
>>
(
id
:
string
,
options
?:
{
query
?:
Partial
<
UseQueryOptions
<
Awaited
<
ReturnType
<
typeof
getApiV10
CategoryId
>>
,
TError
,
TData
>>
,
request
?:
SecondParameter
<
typeof
useCustomClient
>
}
)
=>
{
const
{
query
:
queryOptions
,
request
:
requestOptions
}
=
options
??
{};
const
queryKey
=
queryOptions
?.
queryKey
??
getGetCategoryIdQueryKey
(
id
);
const
queryKey
=
queryOptions
?.
queryKey
??
getGet
ApiV10
CategoryIdQueryKey
(
id
);
const
queryFn
:
QueryFunction
<
Awaited
<
ReturnType
<
typeof
get
CategoryId
>>>
=
({
signal
})
=>
get
CategoryId
(
id
,
{
signal
,
...
requestOptions
});
const
queryFn
:
QueryFunction
<
Awaited
<
ReturnType
<
typeof
get
ApiV10CategoryId
>>>
=
({
signal
})
=>
getApiV10
CategoryId
(
id
,
{
signal
,
...
requestOptions
});
return
{
queryKey
,
queryFn
,
enabled
:
!!
(
id
),
retry
:
3
,
retryDelay
:
1000
,
...
queryOptions
}
as
UseQueryOptions
<
Awaited
<
ReturnType
<
typeof
getCategoryId
>>
,
TError
,
TData
>
&
{
queryKey
:
DataTag
<
QueryKey
,
TData
,
TError
>
}
return
{
queryKey
,
queryFn
,
enabled
:
!!
(
id
),
retry
:
3
,
retryDelay
:
1000
,
...
queryOptions
}
as
UseQueryOptions
<
Awaited
<
ReturnType
<
typeof
get
ApiV10
CategoryId
>>
,
TError
,
TData
>
&
{
queryKey
:
DataTag
<
QueryKey
,
TData
,
TError
>
}
}
export
type
Get
CategoryIdQueryResult
=
NonNullable
<
Awaited
<
ReturnType
<
typeof
get
CategoryId
>>>
export
type
GetCategoryIdQueryError
=
ErrorType
<
void
>
export
type
Get
ApiV10CategoryIdQueryResult
=
NonNullable
<
Awaited
<
ReturnType
<
typeof
getApiV10
CategoryId
>>>
export
type
Get
ApiV10
CategoryIdQueryError
=
ErrorType
<
void
>
export
function
useGet
CategoryId
<
TData
=
Awaited
<
ReturnType
<
typeof
get
CategoryId
>>
,
TError
=
ErrorType
<
void
>>
(
id
:
string
,
options
:
{
query
:
Partial
<
UseQueryOptions
<
Awaited
<
ReturnType
<
typeof
getCategoryId
>>
,
TError
,
TData
>>
&
Pick
<
export
function
useGet
ApiV10CategoryId
<
TData
=
Awaited
<
ReturnType
<
typeof
getApiV10
CategoryId
>>
,
TError
=
ErrorType
<
void
>>
(
id
:
string
,
options
:
{
query
:
Partial
<
UseQueryOptions
<
Awaited
<
ReturnType
<
typeof
get
ApiV10
CategoryId
>>
,
TError
,
TData
>>
&
Pick
<
DefinedInitialDataOptions
<
Awaited
<
ReturnType
<
typeof
getCategoryId
>>
,
Awaited
<
ReturnType
<
typeof
get
ApiV10
CategoryId
>>
,
TError
,
Awaited
<
ReturnType
<
typeof
getCategoryId
>>
Awaited
<
ReturnType
<
typeof
get
ApiV10
CategoryId
>>
>
,
'initialData'
>
,
request
?:
SecondParameter
<
typeof
useCustomClient
>
}
,
queryClient
?:
QueryClient
):
DefinedUseQueryResult
<
TData
,
TError
>
&
{
queryKey
:
DataTag
<
QueryKey
,
TData
,
TError
>
}
export
function
useGet
CategoryId
<
TData
=
Awaited
<
ReturnType
<
typeof
get
CategoryId
>>
,
TError
=
ErrorType
<
void
>>
(
id
:
string
,
options
?:
{
query
?:
Partial
<
UseQueryOptions
<
Awaited
<
ReturnType
<
typeof
getCategoryId
>>
,
TError
,
TData
>>
&
Pick
<
export
function
useGet
ApiV10CategoryId
<
TData
=
Awaited
<
ReturnType
<
typeof
getApiV10
CategoryId
>>
,
TError
=
ErrorType
<
void
>>
(
id
:
string
,
options
?:
{
query
?:
Partial
<
UseQueryOptions
<
Awaited
<
ReturnType
<
typeof
get
ApiV10
CategoryId
>>
,
TError
,
TData
>>
&
Pick
<
UndefinedInitialDataOptions
<
Awaited
<
ReturnType
<
typeof
getCategoryId
>>
,
Awaited
<
ReturnType
<
typeof
get
ApiV10
CategoryId
>>
,
TError
,
Awaited
<
ReturnType
<
typeof
getCategoryId
>>
Awaited
<
ReturnType
<
typeof
get
ApiV10
CategoryId
>>
>
,
'initialData'
>
,
request
?:
SecondParameter
<
typeof
useCustomClient
>
}
,
queryClient
?:
QueryClient
):
UseQueryResult
<
TData
,
TError
>
&
{
queryKey
:
DataTag
<
QueryKey
,
TData
,
TError
>
}
export
function
useGet
CategoryId
<
TData
=
Awaited
<
ReturnType
<
typeof
get
CategoryId
>>
,
TError
=
ErrorType
<
void
>>
(
id
:
string
,
options
?:
{
query
?:
Partial
<
UseQueryOptions
<
Awaited
<
ReturnType
<
typeof
getCategoryId
>>
,
TError
,
TData
>>
,
request
?:
SecondParameter
<
typeof
useCustomClient
>
}
export
function
useGet
ApiV10CategoryId
<
TData
=
Awaited
<
ReturnType
<
typeof
getApiV10
CategoryId
>>
,
TError
=
ErrorType
<
void
>>
(
id
:
string
,
options
?:
{
query
?:
Partial
<
UseQueryOptions
<
Awaited
<
ReturnType
<
typeof
get
ApiV10
CategoryId
>>
,
TError
,
TData
>>
,
request
?:
SecondParameter
<
typeof
useCustomClient
>
}
,
queryClient
?:
QueryClient
):
UseQueryResult
<
TData
,
TError
>
&
{
queryKey
:
DataTag
<
QueryKey
,
TData
,
TError
>
}
/**
* @summary Get category by ID
*/
export
function
useGet
CategoryId
<
TData
=
Awaited
<
ReturnType
<
typeof
get
CategoryId
>>
,
TError
=
ErrorType
<
void
>>
(
id
:
string
,
options
?:
{
query
?:
Partial
<
UseQueryOptions
<
Awaited
<
ReturnType
<
typeof
getCategoryId
>>
,
TError
,
TData
>>
,
request
?:
SecondParameter
<
typeof
useCustomClient
>
}
export
function
useGet
ApiV10CategoryId
<
TData
=
Awaited
<
ReturnType
<
typeof
getApiV10
CategoryId
>>
,
TError
=
ErrorType
<
void
>>
(
id
:
string
,
options
?:
{
query
?:
Partial
<
UseQueryOptions
<
Awaited
<
ReturnType
<
typeof
get
ApiV10
CategoryId
>>
,
TError
,
TData
>>
,
request
?:
SecondParameter
<
typeof
useCustomClient
>
}
,
queryClient
?:
QueryClient
):
UseQueryResult
<
TData
,
TError
>
&
{
queryKey
:
DataTag
<
QueryKey
,
TData
,
TError
>
}
{
const
queryOptions
=
getGetCategoryIdQueryOptions
(
id
,
options
)
const
queryOptions
=
getGet
ApiV10
CategoryIdQueryOptions
(
id
,
options
)
const
query
=
useQuery
(
queryOptions
,
queryClient
)
as
UseQueryResult
<
TData
,
TError
>
&
{
queryKey
:
DataTag
<
QueryKey
,
TData
,
TError
>
};
...
...
@@ -255,12 +255,12 @@ export function useGetCategoryId<TData = Awaited<ReturnType<typeof getCategoryId
/**
* @summary Get category by ID
*/
export
const
prefetchGet
CategoryIdQuery
=
async
<
TData
=
Awaited
<
ReturnType
<
typeof
get
CategoryId
>>
,
TError
=
ErrorType
<
void
>>
(
queryClient
:
QueryClient
,
id
:
string
,
options
?:
{
query
?:
Partial
<
UseQueryOptions
<
Awaited
<
ReturnType
<
typeof
getCategoryId
>>
,
TError
,
TData
>>
,
request
?:
SecondParameter
<
typeof
useCustomClient
>
}
export
const
prefetchGet
ApiV10CategoryIdQuery
=
async
<
TData
=
Awaited
<
ReturnType
<
typeof
getApiV10
CategoryId
>>
,
TError
=
ErrorType
<
void
>>
(
queryClient
:
QueryClient
,
id
:
string
,
options
?:
{
query
?:
Partial
<
UseQueryOptions
<
Awaited
<
ReturnType
<
typeof
get
ApiV10
CategoryId
>>
,
TError
,
TData
>>
,
request
?:
SecondParameter
<
typeof
useCustomClient
>
}
):
Promise
<
QueryClient
>
=>
{
const
queryOptions
=
getGetCategoryIdQueryOptions
(
id
,
options
)
const
queryOptions
=
getGet
ApiV10
CategoryIdQueryOptions
(
id
,
options
)
await
queryClient
.
prefetchQuery
(
queryOptions
);
...
...
@@ -273,37 +273,37 @@ export const prefetchGetCategoryIdQuery = async <TData = Awaited<ReturnType<type
* Update a single category record by its ID
* @summary Update category by ID
*/
export
type
putCategoryIdResponse200
=
{
data
:
PutCategoryId200
export
type
put
ApiV10
CategoryIdResponse200
=
{
data
:
Put
ApiV10
CategoryId200
status
:
200
}
export
type
putCategoryIdResponse404
=
{
export
type
put
ApiV10
CategoryIdResponse404
=
{
data
:
void
status
:
404
}
export
type
put
CategoryIdResponseSuccess
=
(
put
CategoryIdResponse200
)
&
{
export
type
put
ApiV10CategoryIdResponseSuccess
=
(
putApiV10
CategoryIdResponse200
)
&
{
headers
:
Headers
;
};
export
type
put
CategoryIdResponseError
=
(
put
CategoryIdResponse404
)
&
{
export
type
put
ApiV10CategoryIdResponseError
=
(
putApiV10
CategoryIdResponse404
)
&
{
headers
:
Headers
;
};
export
type
put
CategoryIdResponse
=
(
putCategoryIdResponseSuccess
|
put
CategoryIdResponseError
)
export
type
put
ApiV10CategoryIdResponse
=
(
putApiV10CategoryIdResponseSuccess
|
putApiV10
CategoryIdResponseError
)
export
const
getPutCategoryIdUrl
=
(
id
:
string
,)
=>
{
export
const
getPut
ApiV10
CategoryIdUrl
=
(
id
:
string
,)
=>
{
return
`/category/
${
id
}
`
return
`/
api/v1.0/
category/
${
id
}
`
}
export
const
putCategoryId
=
async
(
id
:
string
,
categoryMutate
:
CategoryMutate
,
options
?:
RequestInit
):
Promise
<
putCategoryIdResponse
>
=>
{
export
const
put
ApiV10
CategoryId
=
async
(
id
:
string
,
categoryMutate
:
CategoryMutate
,
options
?:
RequestInit
):
Promise
<
put
ApiV10
CategoryIdResponse
>
=>
{
return
useCustomClient
<
put
CategoryIdResponse
>
(
getPut
CategoryIdUrl
(
id
),
return
useCustomClient
<
put
ApiV10CategoryIdResponse
>
(
getPutApiV10
CategoryIdUrl
(
id
),
{
...
options
,
method
:
'PUT'
,
...
...
@@ -316,11 +316,11 @@ export const putCategoryId = async (id: string,
export
const
getPutCategoryIdMutationOptions
=
<
TError
=
ErrorType
<
void
>
,
TContext
=
unknown
>
(
options
?:
{
mutation
?:
UseMutationOptions
<
Awaited
<
ReturnType
<
typeof
putCategoryId
>>
,
TError
,{
id
:
string
;
data
:
BodyType
<
CategoryMutate
>
},
TContext
>
,
request
?:
SecondParameter
<
typeof
useCustomClient
>
}
):
UseMutationOptions
<
Awaited
<
ReturnType
<
typeof
putCategoryId
>>
,
TError
,{
id
:
string
;
data
:
BodyType
<
CategoryMutate
>
},
TContext
>
=>
{
export
const
getPut
ApiV10
CategoryIdMutationOptions
=
<
TError
=
ErrorType
<
void
>
,
TContext
=
unknown
>
(
options
?:
{
mutation
?:
UseMutationOptions
<
Awaited
<
ReturnType
<
typeof
put
ApiV10
CategoryId
>>
,
TError
,{
id
:
string
;
data
:
BodyType
<
CategoryMutate
>
},
TContext
>
,
request
?:
SecondParameter
<
typeof
useCustomClient
>
}
):
UseMutationOptions
<
Awaited
<
ReturnType
<
typeof
put
ApiV10
CategoryId
>>
,
TError
,{
id
:
string
;
data
:
BodyType
<
CategoryMutate
>
},
TContext
>
=>
{
const
mutationKey
=
[
'putCategoryId'
];
const
mutationKey
=
[
'put
ApiV10
CategoryId'
];
const
{
mutation
:
mutationOptions
,
request
:
requestOptions
}
=
options
?
options
.
mutation
&&
'mutationKey'
in
options
.
mutation
&&
options
.
mutation
.
mutationKey
?
options
...
...
@@ -330,10 +330,10 @@ const {mutation: mutationOptions, request: requestOptions} = options ?
const
mutationFn
:
MutationFunction
<
Awaited
<
ReturnType
<
typeof
putCategoryId
>>
,
{
id
:
string
;
data
:
BodyType
<
CategoryMutate
>
}
>
=
(
props
)
=>
{
const
mutationFn
:
MutationFunction
<
Awaited
<
ReturnType
<
typeof
put
ApiV10
CategoryId
>>
,
{
id
:
string
;
data
:
BodyType
<
CategoryMutate
>
}
>
=
(
props
)
=>
{
const
{
id
,
data
}
=
props
??
{};
return
putCategoryId
(
id
,
data
,
requestOptions
)
return
put
ApiV10
CategoryId
(
id
,
data
,
requestOptions
)
}
...
...
@@ -341,23 +341,23 @@ const {mutation: mutationOptions, request: requestOptions} = options ?
return
{
mutationFn
,
...
mutationOptions
}}
export
type
Put
CategoryIdMutationResult
=
NonNullable
<
Awaited
<
ReturnType
<
typeof
put
CategoryId
>>>
export
type
PutCategoryIdMutationBody
=
BodyType
<
CategoryMutate
>
export
type
PutCategoryIdMutationError
=
ErrorType
<
void
>
export
type
Put
ApiV10CategoryIdMutationResult
=
NonNullable
<
Awaited
<
ReturnType
<
typeof
putApiV10
CategoryId
>>>
export
type
Put
ApiV10
CategoryIdMutationBody
=
BodyType
<
CategoryMutate
>
export
type
Put
ApiV10
CategoryIdMutationError
=
ErrorType
<
void
>
/**
* @summary Update category by ID
*/
export
const
usePutCategoryId
=
<
TError
=
ErrorType
<
void
>
,
TContext
=
unknown
>
(
options
?:
{
mutation
?:
UseMutationOptions
<
Awaited
<
ReturnType
<
typeof
putCategoryId
>>
,
TError
,{
id
:
string
;
data
:
BodyType
<
CategoryMutate
>
},
TContext
>
,
request
?:
SecondParameter
<
typeof
useCustomClient
>
}
export
const
usePut
ApiV10
CategoryId
=
<
TError
=
ErrorType
<
void
>
,
TContext
=
unknown
>
(
options
?:
{
mutation
?:
UseMutationOptions
<
Awaited
<
ReturnType
<
typeof
put
ApiV10
CategoryId
>>
,
TError
,{
id
:
string
;
data
:
BodyType
<
CategoryMutate
>
},
TContext
>
,
request
?:
SecondParameter
<
typeof
useCustomClient
>
}
,
queryClient
?:
QueryClient
):
UseMutationResult
<
Awaited
<
ReturnType
<
typeof
putCategoryId
>>
,
Awaited
<
ReturnType
<
typeof
put
ApiV10
CategoryId
>>
,
TError
,
{
id
:
string
;
data
:
BodyType
<
CategoryMutate
>
},
TContext
>
=>
{
const
mutationOptions
=
getPutCategoryIdMutationOptions
(
options
);
const
mutationOptions
=
getPut
ApiV10
CategoryIdMutationOptions
(
options
);
return
useMutation
(
mutationOptions
,
queryClient
);
}
...
...
@@ -365,36 +365,36 @@ export const usePutCategoryId = <TError = ErrorType<void>,
* Delete a single category record by its ID
* @summary Delete category by ID
*/
export
type
deleteCategoryIdResponse200
=
{
data
:
DeleteCategoryId200
export
type
delete
ApiV10
CategoryIdResponse200
=
{
data
:
Delete
ApiV10
CategoryId200
status
:
200
}
export
type
deleteCategoryIdResponse404
=
{
export
type
delete
ApiV10
CategoryIdResponse404
=
{
data
:
void
status
:
404
}
export
type
delete
CategoryIdResponseSuccess
=
(
delete
CategoryIdResponse200
)
&
{
export
type
delete
ApiV10CategoryIdResponseSuccess
=
(
deleteApiV10
CategoryIdResponse200
)
&
{
headers
:
Headers
;
};
export
type
delete
CategoryIdResponseError
=
(
delete
CategoryIdResponse404
)
&
{
export
type
delete
ApiV10CategoryIdResponseError
=
(
deleteApiV10
CategoryIdResponse404
)
&
{
headers
:
Headers
;
};
export
type
delete
CategoryIdResponse
=
(
deleteCategoryIdResponseSuccess
|
delete
CategoryIdResponseError
)
export
type
delete
ApiV10CategoryIdResponse
=
(
deleteApiV10CategoryIdResponseSuccess
|
deleteApiV10
CategoryIdResponseError
)
export
const
getDeleteCategoryIdUrl
=
(
id
:
string
,)
=>
{
export
const
getDelete
ApiV10
CategoryIdUrl
=
(
id
:
string
,)
=>
{
return
`/category/
${
id
}
`
return
`/
api/v1.0/
category/
${
id
}
`
}
export
const
delete
CategoryId
=
async
(
id
:
string
,
options
?:
RequestInit
):
Promise
<
delete
CategoryIdResponse
>
=>
{
export
const
delete
ApiV10CategoryId
=
async
(
id
:
string
,
options
?:
RequestInit
):
Promise
<
deleteApiV10
CategoryIdResponse
>
=>
{
return
useCustomClient
<
delete
CategoryIdResponse
>
(
getDelete
CategoryIdUrl
(
id
),
return
useCustomClient
<
delete
ApiV10CategoryIdResponse
>
(
getDeleteApiV10
CategoryIdUrl
(
id
),
{
...
options
,
method
:
'DELETE'
...
...
@@ -406,11 +406,11 @@ export const deleteCategoryId = async (id: string, options?: RequestInit): Promi
export
const
getDeleteCategoryIdMutationOptions
=
<
TError
=
ErrorType
<
void
>
,
TContext
=
unknown
>
(
options
?:
{
mutation
?:
UseMutationOptions
<
Awaited
<
ReturnType
<
typeof
deleteCategoryId
>>
,
TError
,{
id
:
string
},
TContext
>
,
request
?:
SecondParameter
<
typeof
useCustomClient
>
}
):
UseMutationOptions
<
Awaited
<
ReturnType
<
typeof
deleteCategoryId
>>
,
TError
,{
id
:
string
},
TContext
>
=>
{
export
const
getDelete
ApiV10
CategoryIdMutationOptions
=
<
TError
=
ErrorType
<
void
>
,
TContext
=
unknown
>
(
options
?:
{
mutation
?:
UseMutationOptions
<
Awaited
<
ReturnType
<
typeof
delete
ApiV10
CategoryId
>>
,
TError
,{
id
:
string
},
TContext
>
,
request
?:
SecondParameter
<
typeof
useCustomClient
>
}
):
UseMutationOptions
<
Awaited
<
ReturnType
<
typeof
delete
ApiV10
CategoryId
>>
,
TError
,{
id
:
string
},
TContext
>
=>
{
const
mutationKey
=
[
'deleteCategoryId'
];
const
mutationKey
=
[
'delete
ApiV10
CategoryId'
];
const
{
mutation
:
mutationOptions
,
request
:
requestOptions
}
=
options
?
options
.
mutation
&&
'mutationKey'
in
options
.
mutation
&&
options
.
mutation
.
mutationKey
?
options
...
...
@@ -420,10 +420,10 @@ const {mutation: mutationOptions, request: requestOptions} = options ?
const
mutationFn
:
MutationFunction
<
Awaited
<
ReturnType
<
typeof
deleteCategoryId
>>
,
{
id
:
string
}
>
=
(
props
)
=>
{
const
mutationFn
:
MutationFunction
<
Awaited
<
ReturnType
<
typeof
delete
ApiV10
CategoryId
>>
,
{
id
:
string
}
>
=
(
props
)
=>
{
const
{
id
}
=
props
??
{};
return
deleteCategoryId
(
id
,
requestOptions
)
return
delete
ApiV10
CategoryId
(
id
,
requestOptions
)
}
...
...
@@ -431,23 +431,23 @@ const {mutation: mutationOptions, request: requestOptions} = options ?
return
{
mutationFn
,
...
mutationOptions
}}
export
type
Delete
CategoryIdMutationResult
=
NonNullable
<
Awaited
<
ReturnType
<
typeof
delete
CategoryId
>>>
export
type
Delete
ApiV10CategoryIdMutationResult
=
NonNullable
<
Awaited
<
ReturnType
<
typeof
deleteApiV10
CategoryId
>>>
export
type
DeleteCategoryIdMutationError
=
ErrorType
<
void
>
export
type
Delete
ApiV10
CategoryIdMutationError
=
ErrorType
<
void
>
/**
* @summary Delete category by ID
*/
export
const
useDeleteCategoryId
=
<
TError
=
ErrorType
<
void
>
,
TContext
=
unknown
>
(
options
?:
{
mutation
?:
UseMutationOptions
<
Awaited
<
ReturnType
<
typeof
deleteCategoryId
>>
,
TError
,{
id
:
string
},
TContext
>
,
request
?:
SecondParameter
<
typeof
useCustomClient
>
}
export
const
useDelete
ApiV10
CategoryId
=
<
TError
=
ErrorType
<
void
>
,
TContext
=
unknown
>
(
options
?:
{
mutation
?:
UseMutationOptions
<
Awaited
<
ReturnType
<
typeof
delete
ApiV10
CategoryId
>>
,
TError
,{
id
:
string
},
TContext
>
,
request
?:
SecondParameter
<
typeof
useCustomClient
>
}
,
queryClient
?:
QueryClient
):
UseMutationResult
<
Awaited
<
ReturnType
<
typeof
deleteCategoryId
>>
,
Awaited
<
ReturnType
<
typeof
delete
ApiV10
CategoryId
>>
,
TError
,
{
id
:
string
},
TContext
>
=>
{
const
mutationOptions
=
getDeleteCategoryIdMutationOptions
(
options
);
const
mutationOptions
=
getDelete
ApiV10
CategoryIdMutationOptions
(
options
);
return
useMutation
(
mutationOptions
,
queryClient
);
}
...
...
@@ -455,19 +455,19 @@ export const useDeleteCategoryId = <TError = ErrorType<void>,
* Retrieve a list of category with pagination, filtering and sorting
* @summary Get all category
*/
export
type
getCategoryResponse200
=
{
export
type
get
ApiV10
CategoryResponse200
=
{
data
:
ResponseGetAllData
status
:
200
}
export
type
get
CategoryResponseSuccess
=
(
get
CategoryResponse200
)
&
{
export
type
get
ApiV10CategoryResponseSuccess
=
(
getApiV10
CategoryResponse200
)
&
{
headers
:
Headers
;
};
;
export
type
get
CategoryResponse
=
(
get
CategoryResponseSuccess
)
export
type
get
ApiV10CategoryResponse
=
(
getApiV10
CategoryResponseSuccess
)
export
const
getGet
CategoryUrl
=
(
params
?:
Get
CategoryParams
,)
=>
{
export
const
getGet
ApiV10CategoryUrl
=
(
params
?:
GetApiV10
CategoryParams
,)
=>
{
const
normalizedParams
=
new
URLSearchParams
();
Object
.
entries
(
params
||
{}).
forEach
(([
key
,
value
])
=>
{
...
...
@@ -479,12 +479,12 @@ export const getGetCategoryUrl = (params?: GetCategoryParams,) => {
const
stringifiedParams
=
normalizedParams
.
toString
();
return
stringifiedParams
.
length
>
0
?
`/
category?
${
stringifiedParams
}
`
:
`
/category`
return
stringifiedParams
.
length
>
0
?
`/
api/v1.0/category?
${
stringifiedParams
}
`
:
`/api/v1.0
/category`
}
export
const
get
Category
=
async
(
params
?:
GetCategoryParams
,
options
?:
RequestInit
):
Promise
<
get
CategoryResponse
>
=>
{
export
const
get
ApiV10Category
=
async
(
params
?:
GetApiV10CategoryParams
,
options
?:
RequestInit
):
Promise
<
getApiV10
CategoryResponse
>
=>
{
return
useCustomClient
<
get
CategoryResponse
>
(
getGet
CategoryUrl
(
params
),
return
useCustomClient
<
get
ApiV10CategoryResponse
>
(
getGetApiV10
CategoryUrl
(
params
),
{
...
options
,
method
:
'GET'
...
...
@@ -497,75 +497,75 @@ export const getCategory = async (params?: GetCategoryParams, options?: RequestI
export
const
getGet
CategoryInfiniteQueryKey
=
(
params
?:
Get
CategoryParams
,)
=>
{
export
const
getGet
ApiV10CategoryInfiniteQueryKey
=
(
params
?:
GetApiV10
CategoryParams
,)
=>
{
return
[
'infinite'
,
`/category`
,
...(
params
?
[
params
]:
[])
'infinite'
,
`/
api/v1.0/
category`
,
...(
params
?
[
params
]:
[])
]
as
const
;
}
export
const
getGet
CategoryQueryKey
=
(
params
?:
Get
CategoryParams
,)
=>
{
export
const
getGet
ApiV10CategoryQueryKey
=
(
params
?:
GetApiV10
CategoryParams
,)
=>
{
return
[
`/category`
,
...(
params
?
[
params
]:
[])
`/
api/v1.0/
category`
,
...(
params
?
[
params
]:
[])
]
as
const
;
}
export
const
getGet
CategoryInfiniteQueryOptions
=
<
TData
=
InfiniteData
<
Awaited
<
ReturnType
<
typeof
getCategory
>>>
,
TError
=
ErrorType
<
unknown
>>
(
params
?:
GetCategoryParams
,
options
?:
{
query
?:
Partial
<
UseInfiniteQueryOptions
<
Awaited
<
ReturnType
<
typeof
get
Category
>>
,
TError
,
TData
>>
,
request
?:
SecondParameter
<
typeof
useCustomClient
>
}
export
const
getGet
ApiV10CategoryInfiniteQueryOptions
=
<
TData
=
InfiniteData
<
Awaited
<
ReturnType
<
typeof
getApiV10Category
>>>
,
TError
=
ErrorType
<
unknown
>>
(
params
?:
GetApiV10CategoryParams
,
options
?:
{
query
?:
Partial
<
UseInfiniteQueryOptions
<
Awaited
<
ReturnType
<
typeof
getApiV10
Category
>>
,
TError
,
TData
>>
,
request
?:
SecondParameter
<
typeof
useCustomClient
>
}
)
=>
{
const
{
query
:
queryOptions
,
request
:
requestOptions
}
=
options
??
{};
const
queryKey
=
queryOptions
?.
queryKey
??
getGetCategoryInfiniteQueryKey
(
params
);
const
queryKey
=
queryOptions
?.
queryKey
??
getGet
ApiV10
CategoryInfiniteQueryKey
(
params
);
const
queryFn
:
QueryFunction
<
Awaited
<
ReturnType
<
typeof
get
Category
>>>
=
({
signal
})
=>
get
Category
(
params
,
{
signal
,
...
requestOptions
});
const
queryFn
:
QueryFunction
<
Awaited
<
ReturnType
<
typeof
get
ApiV10Category
>>>
=
({
signal
})
=>
getApiV10
Category
(
params
,
{
signal
,
...
requestOptions
});
return
{
queryKey
,
queryFn
,
retry
:
3
,
retryDelay
:
1000
,
...
queryOptions
}
as
UseInfiniteQueryOptions
<
Awaited
<
ReturnType
<
typeof
getCategory
>>
,
TError
,
TData
>
&
{
queryKey
:
DataTag
<
QueryKey
,
TData
,
TError
>
}
return
{
queryKey
,
queryFn
,
retry
:
3
,
retryDelay
:
1000
,
...
queryOptions
}
as
UseInfiniteQueryOptions
<
Awaited
<
ReturnType
<
typeof
get
ApiV10
Category
>>
,
TError
,
TData
>
&
{
queryKey
:
DataTag
<
QueryKey
,
TData
,
TError
>
}
}
export
type
Get
CategoryInfiniteQueryResult
=
NonNullable
<
Awaited
<
ReturnType
<
typeof
get
Category
>>>
export
type
GetCategoryInfiniteQueryError
=
ErrorType
<
unknown
>
export
type
Get
ApiV10CategoryInfiniteQueryResult
=
NonNullable
<
Awaited
<
ReturnType
<
typeof
getApiV10
Category
>>>
export
type
Get
ApiV10
CategoryInfiniteQueryError
=
ErrorType
<
unknown
>
export
function
useGet
CategoryInfinite
<
TData
=
InfiniteData
<
Awaited
<
ReturnType
<
typeof
get
Category
>>>
,
TError
=
ErrorType
<
unknown
>>
(
params
:
undefined
|
Get
CategoryParams
,
options
:
{
query
:
Partial
<
UseInfiniteQueryOptions
<
Awaited
<
ReturnType
<
typeof
get
Category
>>
,
TError
,
TData
>>
&
Pick
<
export
function
useGet
ApiV10CategoryInfinite
<
TData
=
InfiniteData
<
Awaited
<
ReturnType
<
typeof
getApiV10
Category
>>>
,
TError
=
ErrorType
<
unknown
>>
(
params
:
undefined
|
Get
ApiV10CategoryParams
,
options
:
{
query
:
Partial
<
UseInfiniteQueryOptions
<
Awaited
<
ReturnType
<
typeof
getApiV10
Category
>>
,
TError
,
TData
>>
&
Pick
<
DefinedInitialDataOptions
<
Awaited
<
ReturnType
<
typeof
getCategory
>>
,
Awaited
<
ReturnType
<
typeof
get
ApiV10
Category
>>
,
TError
,
Awaited
<
ReturnType
<
typeof
getCategory
>>
Awaited
<
ReturnType
<
typeof
get
ApiV10
Category
>>
>
,
'initialData'
>
,
request
?:
SecondParameter
<
typeof
useCustomClient
>
}
,
queryClient
?:
QueryClient
):
DefinedUseInfiniteQueryResult
<
TData
,
TError
>
&
{
queryKey
:
DataTag
<
QueryKey
,
TData
,
TError
>
}
export
function
useGet
CategoryInfinite
<
TData
=
InfiniteData
<
Awaited
<
ReturnType
<
typeof
get
Category
>>>
,
TError
=
ErrorType
<
unknown
>>
(
params
?:
Get
CategoryParams
,
options
?:
{
query
?:
Partial
<
UseInfiniteQueryOptions
<
Awaited
<
ReturnType
<
typeof
get
Category
>>
,
TError
,
TData
>>
&
Pick
<
export
function
useGet
ApiV10CategoryInfinite
<
TData
=
InfiniteData
<
Awaited
<
ReturnType
<
typeof
getApiV10
Category
>>>
,
TError
=
ErrorType
<
unknown
>>
(
params
?:
Get
ApiV10CategoryParams
,
options
?:
{
query
?:
Partial
<
UseInfiniteQueryOptions
<
Awaited
<
ReturnType
<
typeof
getApiV10
Category
>>
,
TError
,
TData
>>
&
Pick
<
UndefinedInitialDataOptions
<
Awaited
<
ReturnType
<
typeof
getCategory
>>
,
Awaited
<
ReturnType
<
typeof
get
ApiV10
Category
>>
,
TError
,
Awaited
<
ReturnType
<
typeof
getCategory
>>
Awaited
<
ReturnType
<
typeof
get
ApiV10
Category
>>
>
,
'initialData'
>
,
request
?:
SecondParameter
<
typeof
useCustomClient
>
}
,
queryClient
?:
QueryClient
):
UseInfiniteQueryResult
<
TData
,
TError
>
&
{
queryKey
:
DataTag
<
QueryKey
,
TData
,
TError
>
}
export
function
useGet
CategoryInfinite
<
TData
=
InfiniteData
<
Awaited
<
ReturnType
<
typeof
get
Category
>>>
,
TError
=
ErrorType
<
unknown
>>
(
params
?:
Get
CategoryParams
,
options
?:
{
query
?:
Partial
<
UseInfiniteQueryOptions
<
Awaited
<
ReturnType
<
typeof
get
Category
>>
,
TError
,
TData
>>
,
request
?:
SecondParameter
<
typeof
useCustomClient
>
}
export
function
useGet
ApiV10CategoryInfinite
<
TData
=
InfiniteData
<
Awaited
<
ReturnType
<
typeof
getApiV10
Category
>>>
,
TError
=
ErrorType
<
unknown
>>
(
params
?:
Get
ApiV10CategoryParams
,
options
?:
{
query
?:
Partial
<
UseInfiniteQueryOptions
<
Awaited
<
ReturnType
<
typeof
getApiV10
Category
>>
,
TError
,
TData
>>
,
request
?:
SecondParameter
<
typeof
useCustomClient
>
}
,
queryClient
?:
QueryClient
):
UseInfiniteQueryResult
<
TData
,
TError
>
&
{
queryKey
:
DataTag
<
QueryKey
,
TData
,
TError
>
}
/**
* @summary Get all category
*/
export
function
useGet
CategoryInfinite
<
TData
=
InfiniteData
<
Awaited
<
ReturnType
<
typeof
get
Category
>>>
,
TError
=
ErrorType
<
unknown
>>
(
params
?:
Get
CategoryParams
,
options
?:
{
query
?:
Partial
<
UseInfiniteQueryOptions
<
Awaited
<
ReturnType
<
typeof
get
Category
>>
,
TError
,
TData
>>
,
request
?:
SecondParameter
<
typeof
useCustomClient
>
}
export
function
useGet
ApiV10CategoryInfinite
<
TData
=
InfiniteData
<
Awaited
<
ReturnType
<
typeof
getApiV10
Category
>>>
,
TError
=
ErrorType
<
unknown
>>
(
params
?:
Get
ApiV10CategoryParams
,
options
?:
{
query
?:
Partial
<
UseInfiniteQueryOptions
<
Awaited
<
ReturnType
<
typeof
getApiV10
Category
>>
,
TError
,
TData
>>
,
request
?:
SecondParameter
<
typeof
useCustomClient
>
}
,
queryClient
?:
QueryClient
):
UseInfiniteQueryResult
<
TData
,
TError
>
&
{
queryKey
:
DataTag
<
QueryKey
,
TData
,
TError
>
}
{
const
queryOptions
=
getGetCategoryInfiniteQueryOptions
(
params
,
options
)
const
queryOptions
=
getGet
ApiV10
CategoryInfiniteQueryOptions
(
params
,
options
)
const
query
=
useInfiniteQuery
(
queryOptions
,
queryClient
)
as
UseInfiniteQueryResult
<
TData
,
TError
>
&
{
queryKey
:
DataTag
<
QueryKey
,
TData
,
TError
>
};
...
...
@@ -577,12 +577,12 @@ export function useGetCategoryInfinite<TData = InfiniteData<Awaited<ReturnType<t
/**
* @summary Get all category
*/
export
const
prefetchGet
CategoryInfiniteQuery
=
async
<
TData
=
Awaited
<
ReturnType
<
typeof
get
Category
>>
,
TError
=
ErrorType
<
unknown
>>
(
queryClient
:
QueryClient
,
params
?:
Get
CategoryParams
,
options
?:
{
query
?:
Partial
<
UseInfiniteQueryOptions
<
Awaited
<
ReturnType
<
typeof
get
Category
>>
,
TError
,
TData
>>
,
request
?:
SecondParameter
<
typeof
useCustomClient
>
}
export
const
prefetchGet
ApiV10CategoryInfiniteQuery
=
async
<
TData
=
Awaited
<
ReturnType
<
typeof
getApiV10
Category
>>
,
TError
=
ErrorType
<
unknown
>>
(
queryClient
:
QueryClient
,
params
?:
Get
ApiV10CategoryParams
,
options
?:
{
query
?:
Partial
<
UseInfiniteQueryOptions
<
Awaited
<
ReturnType
<
typeof
getApiV10
Category
>>
,
TError
,
TData
>>
,
request
?:
SecondParameter
<
typeof
useCustomClient
>
}
):
Promise
<
QueryClient
>
=>
{
const
queryOptions
=
getGetCategoryInfiniteQueryOptions
(
params
,
options
)
const
queryOptions
=
getGet
ApiV10
CategoryInfiniteQueryOptions
(
params
,
options
)
await
queryClient
.
prefetchInfiniteQuery
(
queryOptions
);
...
...
@@ -591,62 +591,62 @@ export const prefetchGetCategoryInfiniteQuery = async <TData = Awaited<ReturnTyp
export
const
getGet
CategoryQueryOptions
=
<
TData
=
Awaited
<
ReturnType
<
typeof
getCategory
>>
,
TError
=
ErrorType
<
unknown
>>
(
params
?:
GetCategoryParams
,
options
?:
{
query
?:
Partial
<
UseQueryOptions
<
Awaited
<
ReturnType
<
typeof
get
Category
>>
,
TError
,
TData
>>
,
request
?:
SecondParameter
<
typeof
useCustomClient
>
}
export
const
getGet
ApiV10CategoryQueryOptions
=
<
TData
=
Awaited
<
ReturnType
<
typeof
getApiV10Category
>>
,
TError
=
ErrorType
<
unknown
>>
(
params
?:
GetApiV10CategoryParams
,
options
?:
{
query
?:
Partial
<
UseQueryOptions
<
Awaited
<
ReturnType
<
typeof
getApiV10
Category
>>
,
TError
,
TData
>>
,
request
?:
SecondParameter
<
typeof
useCustomClient
>
}
)
=>
{
const
{
query
:
queryOptions
,
request
:
requestOptions
}
=
options
??
{};
const
queryKey
=
queryOptions
?.
queryKey
??
getGetCategoryQueryKey
(
params
);
const
queryKey
=
queryOptions
?.
queryKey
??
getGet
ApiV10
CategoryQueryKey
(
params
);
const
queryFn
:
QueryFunction
<
Awaited
<
ReturnType
<
typeof
get
Category
>>>
=
({
signal
})
=>
get
Category
(
params
,
{
signal
,
...
requestOptions
});
const
queryFn
:
QueryFunction
<
Awaited
<
ReturnType
<
typeof
get
ApiV10Category
>>>
=
({
signal
})
=>
getApiV10
Category
(
params
,
{
signal
,
...
requestOptions
});
return
{
queryKey
,
queryFn
,
retry
:
3
,
retryDelay
:
1000
,
...
queryOptions
}
as
UseQueryOptions
<
Awaited
<
ReturnType
<
typeof
getCategory
>>
,
TError
,
TData
>
&
{
queryKey
:
DataTag
<
QueryKey
,
TData
,
TError
>
}
return
{
queryKey
,
queryFn
,
retry
:
3
,
retryDelay
:
1000
,
...
queryOptions
}
as
UseQueryOptions
<
Awaited
<
ReturnType
<
typeof
get
ApiV10
Category
>>
,
TError
,
TData
>
&
{
queryKey
:
DataTag
<
QueryKey
,
TData
,
TError
>
}
}
export
type
Get
CategoryQueryResult
=
NonNullable
<
Awaited
<
ReturnType
<
typeof
get
Category
>>>
export
type
GetCategoryQueryError
=
ErrorType
<
unknown
>
export
type
Get
ApiV10CategoryQueryResult
=
NonNullable
<
Awaited
<
ReturnType
<
typeof
getApiV10
Category
>>>
export
type
Get
ApiV10
CategoryQueryError
=
ErrorType
<
unknown
>
export
function
useGet
Category
<
TData
=
Awaited
<
ReturnType
<
typeof
get
Category
>>
,
TError
=
ErrorType
<
unknown
>>
(
params
:
undefined
|
Get
CategoryParams
,
options
:
{
query
:
Partial
<
UseQueryOptions
<
Awaited
<
ReturnType
<
typeof
get
Category
>>
,
TError
,
TData
>>
&
Pick
<
export
function
useGet
ApiV10Category
<
TData
=
Awaited
<
ReturnType
<
typeof
getApiV10
Category
>>
,
TError
=
ErrorType
<
unknown
>>
(
params
:
undefined
|
Get
ApiV10CategoryParams
,
options
:
{
query
:
Partial
<
UseQueryOptions
<
Awaited
<
ReturnType
<
typeof
getApiV10
Category
>>
,
TError
,
TData
>>
&
Pick
<
DefinedInitialDataOptions
<
Awaited
<
ReturnType
<
typeof
getCategory
>>
,
Awaited
<
ReturnType
<
typeof
get
ApiV10
Category
>>
,
TError
,
Awaited
<
ReturnType
<
typeof
getCategory
>>
Awaited
<
ReturnType
<
typeof
get
ApiV10
Category
>>
>
,
'initialData'
>
,
request
?:
SecondParameter
<
typeof
useCustomClient
>
}
,
queryClient
?:
QueryClient
):
DefinedUseQueryResult
<
TData
,
TError
>
&
{
queryKey
:
DataTag
<
QueryKey
,
TData
,
TError
>
}
export
function
useGet
Category
<
TData
=
Awaited
<
ReturnType
<
typeof
get
Category
>>
,
TError
=
ErrorType
<
unknown
>>
(
params
?:
Get
CategoryParams
,
options
?:
{
query
?:
Partial
<
UseQueryOptions
<
Awaited
<
ReturnType
<
typeof
get
Category
>>
,
TError
,
TData
>>
&
Pick
<
export
function
useGet
ApiV10Category
<
TData
=
Awaited
<
ReturnType
<
typeof
getApiV10
Category
>>
,
TError
=
ErrorType
<
unknown
>>
(
params
?:
Get
ApiV10CategoryParams
,
options
?:
{
query
?:
Partial
<
UseQueryOptions
<
Awaited
<
ReturnType
<
typeof
getApiV10
Category
>>
,
TError
,
TData
>>
&
Pick
<
UndefinedInitialDataOptions
<
Awaited
<
ReturnType
<
typeof
getCategory
>>
,
Awaited
<
ReturnType
<
typeof
get
ApiV10
Category
>>
,
TError
,
Awaited
<
ReturnType
<
typeof
getCategory
>>
Awaited
<
ReturnType
<
typeof
get
ApiV10
Category
>>
>
,
'initialData'
>
,
request
?:
SecondParameter
<
typeof
useCustomClient
>
}
,
queryClient
?:
QueryClient
):
UseQueryResult
<
TData
,
TError
>
&
{
queryKey
:
DataTag
<
QueryKey
,
TData
,
TError
>
}
export
function
useGet
Category
<
TData
=
Awaited
<
ReturnType
<
typeof
get
Category
>>
,
TError
=
ErrorType
<
unknown
>>
(
params
?:
Get
CategoryParams
,
options
?:
{
query
?:
Partial
<
UseQueryOptions
<
Awaited
<
ReturnType
<
typeof
get
Category
>>
,
TError
,
TData
>>
,
request
?:
SecondParameter
<
typeof
useCustomClient
>
}
export
function
useGet
ApiV10Category
<
TData
=
Awaited
<
ReturnType
<
typeof
getApiV10
Category
>>
,
TError
=
ErrorType
<
unknown
>>
(
params
?:
Get
ApiV10CategoryParams
,
options
?:
{
query
?:
Partial
<
UseQueryOptions
<
Awaited
<
ReturnType
<
typeof
getApiV10
Category
>>
,
TError
,
TData
>>
,
request
?:
SecondParameter
<
typeof
useCustomClient
>
}
,
queryClient
?:
QueryClient
):
UseQueryResult
<
TData
,
TError
>
&
{
queryKey
:
DataTag
<
QueryKey
,
TData
,
TError
>
}
/**
* @summary Get all category
*/
export
function
useGet
Category
<
TData
=
Awaited
<
ReturnType
<
typeof
get
Category
>>
,
TError
=
ErrorType
<
unknown
>>
(
params
?:
Get
CategoryParams
,
options
?:
{
query
?:
Partial
<
UseQueryOptions
<
Awaited
<
ReturnType
<
typeof
get
Category
>>
,
TError
,
TData
>>
,
request
?:
SecondParameter
<
typeof
useCustomClient
>
}
export
function
useGet
ApiV10Category
<
TData
=
Awaited
<
ReturnType
<
typeof
getApiV10
Category
>>
,
TError
=
ErrorType
<
unknown
>>
(
params
?:
Get
ApiV10CategoryParams
,
options
?:
{
query
?:
Partial
<
UseQueryOptions
<
Awaited
<
ReturnType
<
typeof
getApiV10
Category
>>
,
TError
,
TData
>>
,
request
?:
SecondParameter
<
typeof
useCustomClient
>
}
,
queryClient
?:
QueryClient
):
UseQueryResult
<
TData
,
TError
>
&
{
queryKey
:
DataTag
<
QueryKey
,
TData
,
TError
>
}
{
const
queryOptions
=
getGetCategoryQueryOptions
(
params
,
options
)
const
queryOptions
=
getGet
ApiV10
CategoryQueryOptions
(
params
,
options
)
const
query
=
useQuery
(
queryOptions
,
queryClient
)
as
UseQueryResult
<
TData
,
TError
>
&
{
queryKey
:
DataTag
<
QueryKey
,
TData
,
TError
>
};
...
...
@@ -658,12 +658,12 @@ export function useGetCategory<TData = Awaited<ReturnType<typeof getCategory>>,
/**
* @summary Get all category
*/
export
const
prefetchGet
CategoryQuery
=
async
<
TData
=
Awaited
<
ReturnType
<
typeof
get
Category
>>
,
TError
=
ErrorType
<
unknown
>>
(
queryClient
:
QueryClient
,
params
?:
Get
CategoryParams
,
options
?:
{
query
?:
Partial
<
UseQueryOptions
<
Awaited
<
ReturnType
<
typeof
get
Category
>>
,
TError
,
TData
>>
,
request
?:
SecondParameter
<
typeof
useCustomClient
>
}
export
const
prefetchGet
ApiV10CategoryQuery
=
async
<
TData
=
Awaited
<
ReturnType
<
typeof
getApiV10
Category
>>
,
TError
=
ErrorType
<
unknown
>>
(
queryClient
:
QueryClient
,
params
?:
Get
ApiV10CategoryParams
,
options
?:
{
query
?:
Partial
<
UseQueryOptions
<
Awaited
<
ReturnType
<
typeof
getApiV10
Category
>>
,
TError
,
TData
>>
,
request
?:
SecondParameter
<
typeof
useCustomClient
>
}
):
Promise
<
QueryClient
>
=>
{
const
queryOptions
=
getGetCategoryQueryOptions
(
params
,
options
)
const
queryOptions
=
getGet
ApiV10
CategoryQueryOptions
(
params
,
options
)
await
queryClient
.
prefetchQuery
(
queryOptions
);
...
...
@@ -676,29 +676,29 @@ export const prefetchGetCategoryQuery = async <TData = Awaited<ReturnType<typeof
* Create a new category record
* @summary Create a category
*/
export
type
postCategoryResponse200
=
{
data
:
PostCategory200
export
type
post
ApiV10
CategoryResponse200
=
{
data
:
Post
ApiV10
Category200
status
:
200
}
export
type
post
CategoryResponseSuccess
=
(
post
CategoryResponse200
)
&
{
export
type
post
ApiV10CategoryResponseSuccess
=
(
postApiV10
CategoryResponse200
)
&
{
headers
:
Headers
;
};
;
export
type
post
CategoryResponse
=
(
post
CategoryResponseSuccess
)
export
type
post
ApiV10CategoryResponse
=
(
postApiV10
CategoryResponseSuccess
)
export
const
getPostCategoryUrl
=
()
=>
{
export
const
getPost
ApiV10
CategoryUrl
=
()
=>
{
return
`/category`
return
`/
api/v1.0/
category`
}
export
const
post
Category
=
async
(
categoryMutate
:
CategoryMutate
,
options
?:
RequestInit
):
Promise
<
post
CategoryResponse
>
=>
{
export
const
post
ApiV10Category
=
async
(
categoryMutate
:
CategoryMutate
,
options
?:
RequestInit
):
Promise
<
postApiV10
CategoryResponse
>
=>
{
return
useCustomClient
<
post
CategoryResponse
>
(
getPost
CategoryUrl
(),
return
useCustomClient
<
post
ApiV10CategoryResponse
>
(
getPostApiV10
CategoryUrl
(),
{
...
options
,
method
:
'POST'
,
...
...
@@ -711,11 +711,11 @@ export const postCategory = async (categoryMutate: CategoryMutate, options?: Req
export
const
getPostCategoryMutationOptions
=
<
TError
=
ErrorType
<
unknown
>
,
TContext
=
unknown
>
(
options
?:
{
mutation
?:
UseMutationOptions
<
Awaited
<
ReturnType
<
typeof
postCategory
>>
,
TError
,{
data
:
BodyType
<
CategoryMutate
>
},
TContext
>
,
request
?:
SecondParameter
<
typeof
useCustomClient
>
}
):
UseMutationOptions
<
Awaited
<
ReturnType
<
typeof
postCategory
>>
,
TError
,{
data
:
BodyType
<
CategoryMutate
>
},
TContext
>
=>
{
export
const
getPost
ApiV10
CategoryMutationOptions
=
<
TError
=
ErrorType
<
unknown
>
,
TContext
=
unknown
>
(
options
?:
{
mutation
?:
UseMutationOptions
<
Awaited
<
ReturnType
<
typeof
post
ApiV10
Category
>>
,
TError
,{
data
:
BodyType
<
CategoryMutate
>
},
TContext
>
,
request
?:
SecondParameter
<
typeof
useCustomClient
>
}
):
UseMutationOptions
<
Awaited
<
ReturnType
<
typeof
post
ApiV10
Category
>>
,
TError
,{
data
:
BodyType
<
CategoryMutate
>
},
TContext
>
=>
{
const
mutationKey
=
[
'postCategory'
];
const
mutationKey
=
[
'post
ApiV10
Category'
];
const
{
mutation
:
mutationOptions
,
request
:
requestOptions
}
=
options
?
options
.
mutation
&&
'mutationKey'
in
options
.
mutation
&&
options
.
mutation
.
mutationKey
?
options
...
...
@@ -725,10 +725,10 @@ const {mutation: mutationOptions, request: requestOptions} = options ?
const
mutationFn
:
MutationFunction
<
Awaited
<
ReturnType
<
typeof
postCategory
>>
,
{
data
:
BodyType
<
CategoryMutate
>
}
>
=
(
props
)
=>
{
const
mutationFn
:
MutationFunction
<
Awaited
<
ReturnType
<
typeof
post
ApiV10
Category
>>
,
{
data
:
BodyType
<
CategoryMutate
>
}
>
=
(
props
)
=>
{
const
{
data
}
=
props
??
{};
return
postCategory
(
data
,
requestOptions
)
return
post
ApiV10
Category
(
data
,
requestOptions
)
}
...
...
@@ -736,23 +736,23 @@ const {mutation: mutationOptions, request: requestOptions} = options ?
return
{
mutationFn
,
...
mutationOptions
}}
export
type
Post
CategoryMutationResult
=
NonNullable
<
Awaited
<
ReturnType
<
typeof
post
Category
>>>
export
type
PostCategoryMutationBody
=
BodyType
<
CategoryMutate
>
export
type
PostCategoryMutationError
=
ErrorType
<
unknown
>
export
type
Post
ApiV10CategoryMutationResult
=
NonNullable
<
Awaited
<
ReturnType
<
typeof
postApiV10
Category
>>>
export
type
Post
ApiV10
CategoryMutationBody
=
BodyType
<
CategoryMutate
>
export
type
Post
ApiV10
CategoryMutationError
=
ErrorType
<
unknown
>
/**
* @summary Create a category
*/
export
const
usePostCategory
=
<
TError
=
ErrorType
<
unknown
>
,
TContext
=
unknown
>
(
options
?:
{
mutation
?:
UseMutationOptions
<
Awaited
<
ReturnType
<
typeof
postCategory
>>
,
TError
,{
data
:
BodyType
<
CategoryMutate
>
},
TContext
>
,
request
?:
SecondParameter
<
typeof
useCustomClient
>
}
export
const
usePost
ApiV10
Category
=
<
TError
=
ErrorType
<
unknown
>
,
TContext
=
unknown
>
(
options
?:
{
mutation
?:
UseMutationOptions
<
Awaited
<
ReturnType
<
typeof
post
ApiV10
Category
>>
,
TError
,{
data
:
BodyType
<
CategoryMutate
>
},
TContext
>
,
request
?:
SecondParameter
<
typeof
useCustomClient
>
}
,
queryClient
?:
QueryClient
):
UseMutationResult
<
Awaited
<
ReturnType
<
typeof
postCategory
>>
,
Awaited
<
ReturnType
<
typeof
post
ApiV10
Category
>>
,
TError
,
{
data
:
BodyType
<
CategoryMutate
>
},
TContext
>
=>
{
const
mutationOptions
=
getPostCategoryMutationOptions
(
options
);
const
mutationOptions
=
getPost
ApiV10
CategoryMutationOptions
(
options
);
return
useMutation
(
mutationOptions
,
queryClient
);
}
src/api/endpoints/contact.ts
View file @
b3589a95
/**
* Generated by orval v8.0.0-rc.0 🍺
* Do not edit manually.
*
Backend Template
*
Coded by Meu TEAM
*
VietProDev CMS Backend API
*
Generated API documentation
* OpenAPI spec version: 1.0.0
*/
import
{
...
...
@@ -31,11 +31,11 @@ import type {
import
type
{
ContactMutate
,
DeleteContactId200
,
GetContactId200
,
GetContactParams
,
PostContact200
,
PutContactId200
,
Delete
ApiV10
ContactId200
,
Get
ApiV10
ContactId200
,
Get
ApiV10
ContactParams
,
Post
ApiV10
Contact200
,
Put
ApiV10
ContactId200
,
ResponseGetAllData
}
from
'../models'
;
...
...
@@ -52,36 +52,36 @@ type SecondParameter<T extends (...args: never) => unknown> = Parameters<T>[1];
* Retrieve a single contact record by its ID
* @summary Get contact by ID
*/
export
type
getContactIdResponse200
=
{
data
:
GetContactId200
export
type
get
ApiV10
ContactIdResponse200
=
{
data
:
Get
ApiV10
ContactId200
status
:
200
}
export
type
getContactIdResponse404
=
{
export
type
get
ApiV10
ContactIdResponse404
=
{
data
:
void
status
:
404
}
export
type
get
ContactIdResponseSuccess
=
(
get
ContactIdResponse200
)
&
{
export
type
get
ApiV10ContactIdResponseSuccess
=
(
getApiV10
ContactIdResponse200
)
&
{
headers
:
Headers
;
};
export
type
get
ContactIdResponseError
=
(
get
ContactIdResponse404
)
&
{
export
type
get
ApiV10ContactIdResponseError
=
(
getApiV10
ContactIdResponse404
)
&
{
headers
:
Headers
;
};
export
type
get
ContactIdResponse
=
(
getContactIdResponseSuccess
|
get
ContactIdResponseError
)
export
type
get
ApiV10ContactIdResponse
=
(
getApiV10ContactIdResponseSuccess
|
getApiV10
ContactIdResponseError
)
export
const
getGetContactIdUrl
=
(
id
:
string
,)
=>
{
export
const
getGet
ApiV10
ContactIdUrl
=
(
id
:
string
,)
=>
{
return
`/contact/
${
id
}
`
return
`/
api/v1.0/
contact/
${
id
}
`
}
export
const
get
ContactId
=
async
(
id
:
string
,
options
?:
RequestInit
):
Promise
<
get
ContactIdResponse
>
=>
{
export
const
get
ApiV10ContactId
=
async
(
id
:
string
,
options
?:
RequestInit
):
Promise
<
getApiV10
ContactIdResponse
>
=>
{
return
useCustomClient
<
get
ContactIdResponse
>
(
getGet
ContactIdUrl
(
id
),
return
useCustomClient
<
get
ApiV10ContactIdResponse
>
(
getGetApiV10
ContactIdUrl
(
id
),
{
...
options
,
method
:
'GET'
...
...
@@ -94,75 +94,75 @@ export const getContactId = async (id: string, options?: RequestInit): Promise<g
export
const
getGetContactIdInfiniteQueryKey
=
(
id
?:
string
,)
=>
{
export
const
getGet
ApiV10
ContactIdInfiniteQueryKey
=
(
id
?:
string
,)
=>
{
return
[
'infinite'
,
`/contact/
${
id
}
`
'infinite'
,
`/
api/v1.0/
contact/
${
id
}
`
]
as
const
;
}
export
const
getGetContactIdQueryKey
=
(
id
?:
string
,)
=>
{
export
const
getGet
ApiV10
ContactIdQueryKey
=
(
id
?:
string
,)
=>
{
return
[
`/contact/
${
id
}
`
`/
api/v1.0/
contact/
${
id
}
`
]
as
const
;
}
export
const
getGet
ContactIdInfiniteQueryOptions
=
<
TData
=
InfiniteData
<
Awaited
<
ReturnType
<
typeof
getContactId
>>>
,
TError
=
ErrorType
<
void
>>
(
id
:
string
,
options
?:
{
query
?:
Partial
<
UseInfiniteQueryOptions
<
Awaited
<
ReturnType
<
typeof
get
ContactId
>>
,
TError
,
TData
>>
,
request
?:
SecondParameter
<
typeof
useCustomClient
>
}
export
const
getGet
ApiV10ContactIdInfiniteQueryOptions
=
<
TData
=
InfiniteData
<
Awaited
<
ReturnType
<
typeof
getApiV10ContactId
>>>
,
TError
=
ErrorType
<
void
>>
(
id
:
string
,
options
?:
{
query
?:
Partial
<
UseInfiniteQueryOptions
<
Awaited
<
ReturnType
<
typeof
getApiV10
ContactId
>>
,
TError
,
TData
>>
,
request
?:
SecondParameter
<
typeof
useCustomClient
>
}
)
=>
{
const
{
query
:
queryOptions
,
request
:
requestOptions
}
=
options
??
{};
const
queryKey
=
queryOptions
?.
queryKey
??
getGetContactIdInfiniteQueryKey
(
id
);
const
queryKey
=
queryOptions
?.
queryKey
??
getGet
ApiV10
ContactIdInfiniteQueryKey
(
id
);
const
queryFn
:
QueryFunction
<
Awaited
<
ReturnType
<
typeof
get
ContactId
>>>
=
({
signal
})
=>
get
ContactId
(
id
,
{
signal
,
...
requestOptions
});
const
queryFn
:
QueryFunction
<
Awaited
<
ReturnType
<
typeof
get
ApiV10ContactId
>>>
=
({
signal
})
=>
getApiV10
ContactId
(
id
,
{
signal
,
...
requestOptions
});
return
{
queryKey
,
queryFn
,
enabled
:
!!
(
id
),
retry
:
3
,
retryDelay
:
1000
,
...
queryOptions
}
as
UseInfiniteQueryOptions
<
Awaited
<
ReturnType
<
typeof
getContactId
>>
,
TError
,
TData
>
&
{
queryKey
:
DataTag
<
QueryKey
,
TData
,
TError
>
}
return
{
queryKey
,
queryFn
,
enabled
:
!!
(
id
),
retry
:
3
,
retryDelay
:
1000
,
...
queryOptions
}
as
UseInfiniteQueryOptions
<
Awaited
<
ReturnType
<
typeof
get
ApiV10
ContactId
>>
,
TError
,
TData
>
&
{
queryKey
:
DataTag
<
QueryKey
,
TData
,
TError
>
}
}
export
type
Get
ContactIdInfiniteQueryResult
=
NonNullable
<
Awaited
<
ReturnType
<
typeof
get
ContactId
>>>
export
type
GetContactIdInfiniteQueryError
=
ErrorType
<
void
>
export
type
Get
ApiV10ContactIdInfiniteQueryResult
=
NonNullable
<
Awaited
<
ReturnType
<
typeof
getApiV10
ContactId
>>>
export
type
Get
ApiV10
ContactIdInfiniteQueryError
=
ErrorType
<
void
>
export
function
useGet
ContactIdInfinite
<
TData
=
InfiniteData
<
Awaited
<
ReturnType
<
typeof
get
ContactId
>>>
,
TError
=
ErrorType
<
void
>>
(
id
:
string
,
options
:
{
query
:
Partial
<
UseInfiniteQueryOptions
<
Awaited
<
ReturnType
<
typeof
getContactId
>>
,
TError
,
TData
>>
&
Pick
<
export
function
useGet
ApiV10ContactIdInfinite
<
TData
=
InfiniteData
<
Awaited
<
ReturnType
<
typeof
getApiV10
ContactId
>>>
,
TError
=
ErrorType
<
void
>>
(
id
:
string
,
options
:
{
query
:
Partial
<
UseInfiniteQueryOptions
<
Awaited
<
ReturnType
<
typeof
get
ApiV10
ContactId
>>
,
TError
,
TData
>>
&
Pick
<
DefinedInitialDataOptions
<
Awaited
<
ReturnType
<
typeof
getContactId
>>
,
Awaited
<
ReturnType
<
typeof
get
ApiV10
ContactId
>>
,
TError
,
Awaited
<
ReturnType
<
typeof
getContactId
>>
Awaited
<
ReturnType
<
typeof
get
ApiV10
ContactId
>>
>
,
'initialData'
>
,
request
?:
SecondParameter
<
typeof
useCustomClient
>
}
,
queryClient
?:
QueryClient
):
DefinedUseInfiniteQueryResult
<
TData
,
TError
>
&
{
queryKey
:
DataTag
<
QueryKey
,
TData
,
TError
>
}
export
function
useGet
ContactIdInfinite
<
TData
=
InfiniteData
<
Awaited
<
ReturnType
<
typeof
get
ContactId
>>>
,
TError
=
ErrorType
<
void
>>
(
id
:
string
,
options
?:
{
query
?:
Partial
<
UseInfiniteQueryOptions
<
Awaited
<
ReturnType
<
typeof
getContactId
>>
,
TError
,
TData
>>
&
Pick
<
export
function
useGet
ApiV10ContactIdInfinite
<
TData
=
InfiniteData
<
Awaited
<
ReturnType
<
typeof
getApiV10
ContactId
>>>
,
TError
=
ErrorType
<
void
>>
(
id
:
string
,
options
?:
{
query
?:
Partial
<
UseInfiniteQueryOptions
<
Awaited
<
ReturnType
<
typeof
get
ApiV10
ContactId
>>
,
TError
,
TData
>>
&
Pick
<
UndefinedInitialDataOptions
<
Awaited
<
ReturnType
<
typeof
getContactId
>>
,
Awaited
<
ReturnType
<
typeof
get
ApiV10
ContactId
>>
,
TError
,
Awaited
<
ReturnType
<
typeof
getContactId
>>
Awaited
<
ReturnType
<
typeof
get
ApiV10
ContactId
>>
>
,
'initialData'
>
,
request
?:
SecondParameter
<
typeof
useCustomClient
>
}
,
queryClient
?:
QueryClient
):
UseInfiniteQueryResult
<
TData
,
TError
>
&
{
queryKey
:
DataTag
<
QueryKey
,
TData
,
TError
>
}
export
function
useGet
ContactIdInfinite
<
TData
=
InfiniteData
<
Awaited
<
ReturnType
<
typeof
get
ContactId
>>>
,
TError
=
ErrorType
<
void
>>
(
id
:
string
,
options
?:
{
query
?:
Partial
<
UseInfiniteQueryOptions
<
Awaited
<
ReturnType
<
typeof
getContactId
>>
,
TError
,
TData
>>
,
request
?:
SecondParameter
<
typeof
useCustomClient
>
}
export
function
useGet
ApiV10ContactIdInfinite
<
TData
=
InfiniteData
<
Awaited
<
ReturnType
<
typeof
getApiV10
ContactId
>>>
,
TError
=
ErrorType
<
void
>>
(
id
:
string
,
options
?:
{
query
?:
Partial
<
UseInfiniteQueryOptions
<
Awaited
<
ReturnType
<
typeof
get
ApiV10
ContactId
>>
,
TError
,
TData
>>
,
request
?:
SecondParameter
<
typeof
useCustomClient
>
}
,
queryClient
?:
QueryClient
):
UseInfiniteQueryResult
<
TData
,
TError
>
&
{
queryKey
:
DataTag
<
QueryKey
,
TData
,
TError
>
}
/**
* @summary Get contact by ID
*/
export
function
useGet
ContactIdInfinite
<
TData
=
InfiniteData
<
Awaited
<
ReturnType
<
typeof
get
ContactId
>>>
,
TError
=
ErrorType
<
void
>>
(
id
:
string
,
options
?:
{
query
?:
Partial
<
UseInfiniteQueryOptions
<
Awaited
<
ReturnType
<
typeof
getContactId
>>
,
TError
,
TData
>>
,
request
?:
SecondParameter
<
typeof
useCustomClient
>
}
export
function
useGet
ApiV10ContactIdInfinite
<
TData
=
InfiniteData
<
Awaited
<
ReturnType
<
typeof
getApiV10
ContactId
>>>
,
TError
=
ErrorType
<
void
>>
(
id
:
string
,
options
?:
{
query
?:
Partial
<
UseInfiniteQueryOptions
<
Awaited
<
ReturnType
<
typeof
get
ApiV10
ContactId
>>
,
TError
,
TData
>>
,
request
?:
SecondParameter
<
typeof
useCustomClient
>
}
,
queryClient
?:
QueryClient
):
UseInfiniteQueryResult
<
TData
,
TError
>
&
{
queryKey
:
DataTag
<
QueryKey
,
TData
,
TError
>
}
{
const
queryOptions
=
getGetContactIdInfiniteQueryOptions
(
id
,
options
)
const
queryOptions
=
getGet
ApiV10
ContactIdInfiniteQueryOptions
(
id
,
options
)
const
query
=
useInfiniteQuery
(
queryOptions
,
queryClient
)
as
UseInfiniteQueryResult
<
TData
,
TError
>
&
{
queryKey
:
DataTag
<
QueryKey
,
TData
,
TError
>
};
...
...
@@ -174,12 +174,12 @@ export function useGetContactIdInfinite<TData = InfiniteData<Awaited<ReturnType<
/**
* @summary Get contact by ID
*/
export
const
prefetchGet
ContactIdInfiniteQuery
=
async
<
TData
=
Awaited
<
ReturnType
<
typeof
get
ContactId
>>
,
TError
=
ErrorType
<
void
>>
(
queryClient
:
QueryClient
,
id
:
string
,
options
?:
{
query
?:
Partial
<
UseInfiniteQueryOptions
<
Awaited
<
ReturnType
<
typeof
getContactId
>>
,
TError
,
TData
>>
,
request
?:
SecondParameter
<
typeof
useCustomClient
>
}
export
const
prefetchGet
ApiV10ContactIdInfiniteQuery
=
async
<
TData
=
Awaited
<
ReturnType
<
typeof
getApiV10
ContactId
>>
,
TError
=
ErrorType
<
void
>>
(
queryClient
:
QueryClient
,
id
:
string
,
options
?:
{
query
?:
Partial
<
UseInfiniteQueryOptions
<
Awaited
<
ReturnType
<
typeof
get
ApiV10
ContactId
>>
,
TError
,
TData
>>
,
request
?:
SecondParameter
<
typeof
useCustomClient
>
}
):
Promise
<
QueryClient
>
=>
{
const
queryOptions
=
getGetContactIdInfiniteQueryOptions
(
id
,
options
)
const
queryOptions
=
getGet
ApiV10
ContactIdInfiniteQueryOptions
(
id
,
options
)
await
queryClient
.
prefetchInfiniteQuery
(
queryOptions
);
...
...
@@ -188,62 +188,62 @@ export const prefetchGetContactIdInfiniteQuery = async <TData = Awaited<ReturnTy
export
const
getGet
ContactIdQueryOptions
=
<
TData
=
Awaited
<
ReturnType
<
typeof
getContactId
>>
,
TError
=
ErrorType
<
void
>>
(
id
:
string
,
options
?:
{
query
?:
Partial
<
UseQueryOptions
<
Awaited
<
ReturnType
<
typeof
get
ContactId
>>
,
TError
,
TData
>>
,
request
?:
SecondParameter
<
typeof
useCustomClient
>
}
export
const
getGet
ApiV10ContactIdQueryOptions
=
<
TData
=
Awaited
<
ReturnType
<
typeof
getApiV10ContactId
>>
,
TError
=
ErrorType
<
void
>>
(
id
:
string
,
options
?:
{
query
?:
Partial
<
UseQueryOptions
<
Awaited
<
ReturnType
<
typeof
getApiV10
ContactId
>>
,
TError
,
TData
>>
,
request
?:
SecondParameter
<
typeof
useCustomClient
>
}
)
=>
{
const
{
query
:
queryOptions
,
request
:
requestOptions
}
=
options
??
{};
const
queryKey
=
queryOptions
?.
queryKey
??
getGetContactIdQueryKey
(
id
);
const
queryKey
=
queryOptions
?.
queryKey
??
getGet
ApiV10
ContactIdQueryKey
(
id
);
const
queryFn
:
QueryFunction
<
Awaited
<
ReturnType
<
typeof
get
ContactId
>>>
=
({
signal
})
=>
get
ContactId
(
id
,
{
signal
,
...
requestOptions
});
const
queryFn
:
QueryFunction
<
Awaited
<
ReturnType
<
typeof
get
ApiV10ContactId
>>>
=
({
signal
})
=>
getApiV10
ContactId
(
id
,
{
signal
,
...
requestOptions
});
return
{
queryKey
,
queryFn
,
enabled
:
!!
(
id
),
retry
:
3
,
retryDelay
:
1000
,
...
queryOptions
}
as
UseQueryOptions
<
Awaited
<
ReturnType
<
typeof
getContactId
>>
,
TError
,
TData
>
&
{
queryKey
:
DataTag
<
QueryKey
,
TData
,
TError
>
}
return
{
queryKey
,
queryFn
,
enabled
:
!!
(
id
),
retry
:
3
,
retryDelay
:
1000
,
...
queryOptions
}
as
UseQueryOptions
<
Awaited
<
ReturnType
<
typeof
get
ApiV10
ContactId
>>
,
TError
,
TData
>
&
{
queryKey
:
DataTag
<
QueryKey
,
TData
,
TError
>
}
}
export
type
Get
ContactIdQueryResult
=
NonNullable
<
Awaited
<
ReturnType
<
typeof
get
ContactId
>>>
export
type
GetContactIdQueryError
=
ErrorType
<
void
>
export
type
Get
ApiV10ContactIdQueryResult
=
NonNullable
<
Awaited
<
ReturnType
<
typeof
getApiV10
ContactId
>>>
export
type
Get
ApiV10
ContactIdQueryError
=
ErrorType
<
void
>
export
function
useGet
ContactId
<
TData
=
Awaited
<
ReturnType
<
typeof
get
ContactId
>>
,
TError
=
ErrorType
<
void
>>
(
id
:
string
,
options
:
{
query
:
Partial
<
UseQueryOptions
<
Awaited
<
ReturnType
<
typeof
getContactId
>>
,
TError
,
TData
>>
&
Pick
<
export
function
useGet
ApiV10ContactId
<
TData
=
Awaited
<
ReturnType
<
typeof
getApiV10
ContactId
>>
,
TError
=
ErrorType
<
void
>>
(
id
:
string
,
options
:
{
query
:
Partial
<
UseQueryOptions
<
Awaited
<
ReturnType
<
typeof
get
ApiV10
ContactId
>>
,
TError
,
TData
>>
&
Pick
<
DefinedInitialDataOptions
<
Awaited
<
ReturnType
<
typeof
getContactId
>>
,
Awaited
<
ReturnType
<
typeof
get
ApiV10
ContactId
>>
,
TError
,
Awaited
<
ReturnType
<
typeof
getContactId
>>
Awaited
<
ReturnType
<
typeof
get
ApiV10
ContactId
>>
>
,
'initialData'
>
,
request
?:
SecondParameter
<
typeof
useCustomClient
>
}
,
queryClient
?:
QueryClient
):
DefinedUseQueryResult
<
TData
,
TError
>
&
{
queryKey
:
DataTag
<
QueryKey
,
TData
,
TError
>
}
export
function
useGet
ContactId
<
TData
=
Awaited
<
ReturnType
<
typeof
get
ContactId
>>
,
TError
=
ErrorType
<
void
>>
(
id
:
string
,
options
?:
{
query
?:
Partial
<
UseQueryOptions
<
Awaited
<
ReturnType
<
typeof
getContactId
>>
,
TError
,
TData
>>
&
Pick
<
export
function
useGet
ApiV10ContactId
<
TData
=
Awaited
<
ReturnType
<
typeof
getApiV10
ContactId
>>
,
TError
=
ErrorType
<
void
>>
(
id
:
string
,
options
?:
{
query
?:
Partial
<
UseQueryOptions
<
Awaited
<
ReturnType
<
typeof
get
ApiV10
ContactId
>>
,
TError
,
TData
>>
&
Pick
<
UndefinedInitialDataOptions
<
Awaited
<
ReturnType
<
typeof
getContactId
>>
,
Awaited
<
ReturnType
<
typeof
get
ApiV10
ContactId
>>
,
TError
,
Awaited
<
ReturnType
<
typeof
getContactId
>>
Awaited
<
ReturnType
<
typeof
get
ApiV10
ContactId
>>
>
,
'initialData'
>
,
request
?:
SecondParameter
<
typeof
useCustomClient
>
}
,
queryClient
?:
QueryClient
):
UseQueryResult
<
TData
,
TError
>
&
{
queryKey
:
DataTag
<
QueryKey
,
TData
,
TError
>
}
export
function
useGet
ContactId
<
TData
=
Awaited
<
ReturnType
<
typeof
get
ContactId
>>
,
TError
=
ErrorType
<
void
>>
(
id
:
string
,
options
?:
{
query
?:
Partial
<
UseQueryOptions
<
Awaited
<
ReturnType
<
typeof
getContactId
>>
,
TError
,
TData
>>
,
request
?:
SecondParameter
<
typeof
useCustomClient
>
}
export
function
useGet
ApiV10ContactId
<
TData
=
Awaited
<
ReturnType
<
typeof
getApiV10
ContactId
>>
,
TError
=
ErrorType
<
void
>>
(
id
:
string
,
options
?:
{
query
?:
Partial
<
UseQueryOptions
<
Awaited
<
ReturnType
<
typeof
get
ApiV10
ContactId
>>
,
TError
,
TData
>>
,
request
?:
SecondParameter
<
typeof
useCustomClient
>
}
,
queryClient
?:
QueryClient
):
UseQueryResult
<
TData
,
TError
>
&
{
queryKey
:
DataTag
<
QueryKey
,
TData
,
TError
>
}
/**
* @summary Get contact by ID
*/
export
function
useGet
ContactId
<
TData
=
Awaited
<
ReturnType
<
typeof
get
ContactId
>>
,
TError
=
ErrorType
<
void
>>
(
id
:
string
,
options
?:
{
query
?:
Partial
<
UseQueryOptions
<
Awaited
<
ReturnType
<
typeof
getContactId
>>
,
TError
,
TData
>>
,
request
?:
SecondParameter
<
typeof
useCustomClient
>
}
export
function
useGet
ApiV10ContactId
<
TData
=
Awaited
<
ReturnType
<
typeof
getApiV10
ContactId
>>
,
TError
=
ErrorType
<
void
>>
(
id
:
string
,
options
?:
{
query
?:
Partial
<
UseQueryOptions
<
Awaited
<
ReturnType
<
typeof
get
ApiV10
ContactId
>>
,
TError
,
TData
>>
,
request
?:
SecondParameter
<
typeof
useCustomClient
>
}
,
queryClient
?:
QueryClient
):
UseQueryResult
<
TData
,
TError
>
&
{
queryKey
:
DataTag
<
QueryKey
,
TData
,
TError
>
}
{
const
queryOptions
=
getGetContactIdQueryOptions
(
id
,
options
)
const
queryOptions
=
getGet
ApiV10
ContactIdQueryOptions
(
id
,
options
)
const
query
=
useQuery
(
queryOptions
,
queryClient
)
as
UseQueryResult
<
TData
,
TError
>
&
{
queryKey
:
DataTag
<
QueryKey
,
TData
,
TError
>
};
...
...
@@ -255,12 +255,12 @@ export function useGetContactId<TData = Awaited<ReturnType<typeof getContactId>>
/**
* @summary Get contact by ID
*/
export
const
prefetchGet
ContactIdQuery
=
async
<
TData
=
Awaited
<
ReturnType
<
typeof
get
ContactId
>>
,
TError
=
ErrorType
<
void
>>
(
queryClient
:
QueryClient
,
id
:
string
,
options
?:
{
query
?:
Partial
<
UseQueryOptions
<
Awaited
<
ReturnType
<
typeof
getContactId
>>
,
TError
,
TData
>>
,
request
?:
SecondParameter
<
typeof
useCustomClient
>
}
export
const
prefetchGet
ApiV10ContactIdQuery
=
async
<
TData
=
Awaited
<
ReturnType
<
typeof
getApiV10
ContactId
>>
,
TError
=
ErrorType
<
void
>>
(
queryClient
:
QueryClient
,
id
:
string
,
options
?:
{
query
?:
Partial
<
UseQueryOptions
<
Awaited
<
ReturnType
<
typeof
get
ApiV10
ContactId
>>
,
TError
,
TData
>>
,
request
?:
SecondParameter
<
typeof
useCustomClient
>
}
):
Promise
<
QueryClient
>
=>
{
const
queryOptions
=
getGetContactIdQueryOptions
(
id
,
options
)
const
queryOptions
=
getGet
ApiV10
ContactIdQueryOptions
(
id
,
options
)
await
queryClient
.
prefetchQuery
(
queryOptions
);
...
...
@@ -273,37 +273,37 @@ export const prefetchGetContactIdQuery = async <TData = Awaited<ReturnType<typeo
* Update a single contact record by its ID
* @summary Update contact by ID
*/
export
type
putContactIdResponse200
=
{
data
:
PutContactId200
export
type
put
ApiV10
ContactIdResponse200
=
{
data
:
Put
ApiV10
ContactId200
status
:
200
}
export
type
putContactIdResponse404
=
{
export
type
put
ApiV10
ContactIdResponse404
=
{
data
:
void
status
:
404
}
export
type
put
ContactIdResponseSuccess
=
(
put
ContactIdResponse200
)
&
{
export
type
put
ApiV10ContactIdResponseSuccess
=
(
putApiV10
ContactIdResponse200
)
&
{
headers
:
Headers
;
};
export
type
put
ContactIdResponseError
=
(
put
ContactIdResponse404
)
&
{
export
type
put
ApiV10ContactIdResponseError
=
(
putApiV10
ContactIdResponse404
)
&
{
headers
:
Headers
;
};
export
type
put
ContactIdResponse
=
(
putContactIdResponseSuccess
|
put
ContactIdResponseError
)
export
type
put
ApiV10ContactIdResponse
=
(
putApiV10ContactIdResponseSuccess
|
putApiV10
ContactIdResponseError
)
export
const
getPutContactIdUrl
=
(
id
:
string
,)
=>
{
export
const
getPut
ApiV10
ContactIdUrl
=
(
id
:
string
,)
=>
{
return
`/contact/
${
id
}
`
return
`/
api/v1.0/
contact/
${
id
}
`
}
export
const
putContactId
=
async
(
id
:
string
,
contactMutate
:
ContactMutate
,
options
?:
RequestInit
):
Promise
<
putContactIdResponse
>
=>
{
export
const
put
ApiV10
ContactId
=
async
(
id
:
string
,
contactMutate
:
ContactMutate
,
options
?:
RequestInit
):
Promise
<
put
ApiV10
ContactIdResponse
>
=>
{
return
useCustomClient
<
put
ContactIdResponse
>
(
getPut
ContactIdUrl
(
id
),
return
useCustomClient
<
put
ApiV10ContactIdResponse
>
(
getPutApiV10
ContactIdUrl
(
id
),
{
...
options
,
method
:
'PUT'
,
...
...
@@ -316,11 +316,11 @@ export const putContactId = async (id: string,
export
const
getPutContactIdMutationOptions
=
<
TError
=
ErrorType
<
void
>
,
TContext
=
unknown
>
(
options
?:
{
mutation
?:
UseMutationOptions
<
Awaited
<
ReturnType
<
typeof
putContactId
>>
,
TError
,{
id
:
string
;
data
:
BodyType
<
ContactMutate
>
},
TContext
>
,
request
?:
SecondParameter
<
typeof
useCustomClient
>
}
):
UseMutationOptions
<
Awaited
<
ReturnType
<
typeof
putContactId
>>
,
TError
,{
id
:
string
;
data
:
BodyType
<
ContactMutate
>
},
TContext
>
=>
{
export
const
getPut
ApiV10
ContactIdMutationOptions
=
<
TError
=
ErrorType
<
void
>
,
TContext
=
unknown
>
(
options
?:
{
mutation
?:
UseMutationOptions
<
Awaited
<
ReturnType
<
typeof
put
ApiV10
ContactId
>>
,
TError
,{
id
:
string
;
data
:
BodyType
<
ContactMutate
>
},
TContext
>
,
request
?:
SecondParameter
<
typeof
useCustomClient
>
}
):
UseMutationOptions
<
Awaited
<
ReturnType
<
typeof
put
ApiV10
ContactId
>>
,
TError
,{
id
:
string
;
data
:
BodyType
<
ContactMutate
>
},
TContext
>
=>
{
const
mutationKey
=
[
'putContactId'
];
const
mutationKey
=
[
'put
ApiV10
ContactId'
];
const
{
mutation
:
mutationOptions
,
request
:
requestOptions
}
=
options
?
options
.
mutation
&&
'mutationKey'
in
options
.
mutation
&&
options
.
mutation
.
mutationKey
?
options
...
...
@@ -330,10 +330,10 @@ const {mutation: mutationOptions, request: requestOptions} = options ?
const
mutationFn
:
MutationFunction
<
Awaited
<
ReturnType
<
typeof
putContactId
>>
,
{
id
:
string
;
data
:
BodyType
<
ContactMutate
>
}
>
=
(
props
)
=>
{
const
mutationFn
:
MutationFunction
<
Awaited
<
ReturnType
<
typeof
put
ApiV10
ContactId
>>
,
{
id
:
string
;
data
:
BodyType
<
ContactMutate
>
}
>
=
(
props
)
=>
{
const
{
id
,
data
}
=
props
??
{};
return
putContactId
(
id
,
data
,
requestOptions
)
return
put
ApiV10
ContactId
(
id
,
data
,
requestOptions
)
}
...
...
@@ -341,23 +341,23 @@ const {mutation: mutationOptions, request: requestOptions} = options ?
return
{
mutationFn
,
...
mutationOptions
}}
export
type
Put
ContactIdMutationResult
=
NonNullable
<
Awaited
<
ReturnType
<
typeof
put
ContactId
>>>
export
type
PutContactIdMutationBody
=
BodyType
<
ContactMutate
>
export
type
PutContactIdMutationError
=
ErrorType
<
void
>
export
type
Put
ApiV10ContactIdMutationResult
=
NonNullable
<
Awaited
<
ReturnType
<
typeof
putApiV10
ContactId
>>>
export
type
Put
ApiV10
ContactIdMutationBody
=
BodyType
<
ContactMutate
>
export
type
Put
ApiV10
ContactIdMutationError
=
ErrorType
<
void
>
/**
* @summary Update contact by ID
*/
export
const
usePutContactId
=
<
TError
=
ErrorType
<
void
>
,
TContext
=
unknown
>
(
options
?:
{
mutation
?:
UseMutationOptions
<
Awaited
<
ReturnType
<
typeof
putContactId
>>
,
TError
,{
id
:
string
;
data
:
BodyType
<
ContactMutate
>
},
TContext
>
,
request
?:
SecondParameter
<
typeof
useCustomClient
>
}
export
const
usePut
ApiV10
ContactId
=
<
TError
=
ErrorType
<
void
>
,
TContext
=
unknown
>
(
options
?:
{
mutation
?:
UseMutationOptions
<
Awaited
<
ReturnType
<
typeof
put
ApiV10
ContactId
>>
,
TError
,{
id
:
string
;
data
:
BodyType
<
ContactMutate
>
},
TContext
>
,
request
?:
SecondParameter
<
typeof
useCustomClient
>
}
,
queryClient
?:
QueryClient
):
UseMutationResult
<
Awaited
<
ReturnType
<
typeof
putContactId
>>
,
Awaited
<
ReturnType
<
typeof
put
ApiV10
ContactId
>>
,
TError
,
{
id
:
string
;
data
:
BodyType
<
ContactMutate
>
},
TContext
>
=>
{
const
mutationOptions
=
getPutContactIdMutationOptions
(
options
);
const
mutationOptions
=
getPut
ApiV10
ContactIdMutationOptions
(
options
);
return
useMutation
(
mutationOptions
,
queryClient
);
}
...
...
@@ -365,36 +365,36 @@ export const usePutContactId = <TError = ErrorType<void>,
* Delete a single contact record by its ID
* @summary Delete contact by ID
*/
export
type
deleteContactIdResponse200
=
{
data
:
DeleteContactId200
export
type
delete
ApiV10
ContactIdResponse200
=
{
data
:
Delete
ApiV10
ContactId200
status
:
200
}
export
type
deleteContactIdResponse404
=
{
export
type
delete
ApiV10
ContactIdResponse404
=
{
data
:
void
status
:
404
}
export
type
delete
ContactIdResponseSuccess
=
(
delete
ContactIdResponse200
)
&
{
export
type
delete
ApiV10ContactIdResponseSuccess
=
(
deleteApiV10
ContactIdResponse200
)
&
{
headers
:
Headers
;
};
export
type
delete
ContactIdResponseError
=
(
delete
ContactIdResponse404
)
&
{
export
type
delete
ApiV10ContactIdResponseError
=
(
deleteApiV10
ContactIdResponse404
)
&
{
headers
:
Headers
;
};
export
type
delete
ContactIdResponse
=
(
deleteContactIdResponseSuccess
|
delete
ContactIdResponseError
)
export
type
delete
ApiV10ContactIdResponse
=
(
deleteApiV10ContactIdResponseSuccess
|
deleteApiV10
ContactIdResponseError
)
export
const
getDeleteContactIdUrl
=
(
id
:
string
,)
=>
{
export
const
getDelete
ApiV10
ContactIdUrl
=
(
id
:
string
,)
=>
{
return
`/contact/
${
id
}
`
return
`/
api/v1.0/
contact/
${
id
}
`
}
export
const
delete
ContactId
=
async
(
id
:
string
,
options
?:
RequestInit
):
Promise
<
delete
ContactIdResponse
>
=>
{
export
const
delete
ApiV10ContactId
=
async
(
id
:
string
,
options
?:
RequestInit
):
Promise
<
deleteApiV10
ContactIdResponse
>
=>
{
return
useCustomClient
<
delete
ContactIdResponse
>
(
getDelete
ContactIdUrl
(
id
),
return
useCustomClient
<
delete
ApiV10ContactIdResponse
>
(
getDeleteApiV10
ContactIdUrl
(
id
),
{
...
options
,
method
:
'DELETE'
...
...
@@ -406,11 +406,11 @@ export const deleteContactId = async (id: string, options?: RequestInit): Promis
export
const
getDeleteContactIdMutationOptions
=
<
TError
=
ErrorType
<
void
>
,
TContext
=
unknown
>
(
options
?:
{
mutation
?:
UseMutationOptions
<
Awaited
<
ReturnType
<
typeof
deleteContactId
>>
,
TError
,{
id
:
string
},
TContext
>
,
request
?:
SecondParameter
<
typeof
useCustomClient
>
}
):
UseMutationOptions
<
Awaited
<
ReturnType
<
typeof
deleteContactId
>>
,
TError
,{
id
:
string
},
TContext
>
=>
{
export
const
getDelete
ApiV10
ContactIdMutationOptions
=
<
TError
=
ErrorType
<
void
>
,
TContext
=
unknown
>
(
options
?:
{
mutation
?:
UseMutationOptions
<
Awaited
<
ReturnType
<
typeof
delete
ApiV10
ContactId
>>
,
TError
,{
id
:
string
},
TContext
>
,
request
?:
SecondParameter
<
typeof
useCustomClient
>
}
):
UseMutationOptions
<
Awaited
<
ReturnType
<
typeof
delete
ApiV10
ContactId
>>
,
TError
,{
id
:
string
},
TContext
>
=>
{
const
mutationKey
=
[
'deleteContactId'
];
const
mutationKey
=
[
'delete
ApiV10
ContactId'
];
const
{
mutation
:
mutationOptions
,
request
:
requestOptions
}
=
options
?
options
.
mutation
&&
'mutationKey'
in
options
.
mutation
&&
options
.
mutation
.
mutationKey
?
options
...
...
@@ -420,10 +420,10 @@ const {mutation: mutationOptions, request: requestOptions} = options ?
const
mutationFn
:
MutationFunction
<
Awaited
<
ReturnType
<
typeof
deleteContactId
>>
,
{
id
:
string
}
>
=
(
props
)
=>
{
const
mutationFn
:
MutationFunction
<
Awaited
<
ReturnType
<
typeof
delete
ApiV10
ContactId
>>
,
{
id
:
string
}
>
=
(
props
)
=>
{
const
{
id
}
=
props
??
{};
return
deleteContactId
(
id
,
requestOptions
)
return
delete
ApiV10
ContactId
(
id
,
requestOptions
)
}
...
...
@@ -431,23 +431,23 @@ const {mutation: mutationOptions, request: requestOptions} = options ?
return
{
mutationFn
,
...
mutationOptions
}}
export
type
Delete
ContactIdMutationResult
=
NonNullable
<
Awaited
<
ReturnType
<
typeof
delete
ContactId
>>>
export
type
Delete
ApiV10ContactIdMutationResult
=
NonNullable
<
Awaited
<
ReturnType
<
typeof
deleteApiV10
ContactId
>>>
export
type
DeleteContactIdMutationError
=
ErrorType
<
void
>
export
type
Delete
ApiV10
ContactIdMutationError
=
ErrorType
<
void
>
/**
* @summary Delete contact by ID
*/
export
const
useDeleteContactId
=
<
TError
=
ErrorType
<
void
>
,
TContext
=
unknown
>
(
options
?:
{
mutation
?:
UseMutationOptions
<
Awaited
<
ReturnType
<
typeof
deleteContactId
>>
,
TError
,{
id
:
string
},
TContext
>
,
request
?:
SecondParameter
<
typeof
useCustomClient
>
}
export
const
useDelete
ApiV10
ContactId
=
<
TError
=
ErrorType
<
void
>
,
TContext
=
unknown
>
(
options
?:
{
mutation
?:
UseMutationOptions
<
Awaited
<
ReturnType
<
typeof
delete
ApiV10
ContactId
>>
,
TError
,{
id
:
string
},
TContext
>
,
request
?:
SecondParameter
<
typeof
useCustomClient
>
}
,
queryClient
?:
QueryClient
):
UseMutationResult
<
Awaited
<
ReturnType
<
typeof
deleteContactId
>>
,
Awaited
<
ReturnType
<
typeof
delete
ApiV10
ContactId
>>
,
TError
,
{
id
:
string
},
TContext
>
=>
{
const
mutationOptions
=
getDeleteContactIdMutationOptions
(
options
);
const
mutationOptions
=
getDelete
ApiV10
ContactIdMutationOptions
(
options
);
return
useMutation
(
mutationOptions
,
queryClient
);
}
...
...
@@ -455,19 +455,19 @@ export const useDeleteContactId = <TError = ErrorType<void>,
* Retrieve a list of contact with pagination, filtering and sorting
* @summary Get all contact
*/
export
type
getContactResponse200
=
{
export
type
get
ApiV10
ContactResponse200
=
{
data
:
ResponseGetAllData
status
:
200
}
export
type
get
ContactResponseSuccess
=
(
get
ContactResponse200
)
&
{
export
type
get
ApiV10ContactResponseSuccess
=
(
getApiV10
ContactResponse200
)
&
{
headers
:
Headers
;
};
;
export
type
get
ContactResponse
=
(
get
ContactResponseSuccess
)
export
type
get
ApiV10ContactResponse
=
(
getApiV10
ContactResponseSuccess
)
export
const
getGet
ContactUrl
=
(
params
?:
Get
ContactParams
,)
=>
{
export
const
getGet
ApiV10ContactUrl
=
(
params
?:
GetApiV10
ContactParams
,)
=>
{
const
normalizedParams
=
new
URLSearchParams
();
Object
.
entries
(
params
||
{}).
forEach
(([
key
,
value
])
=>
{
...
...
@@ -479,12 +479,12 @@ export const getGetContactUrl = (params?: GetContactParams,) => {
const
stringifiedParams
=
normalizedParams
.
toString
();
return
stringifiedParams
.
length
>
0
?
`/
contact?
${
stringifiedParams
}
`
:
`
/contact`
return
stringifiedParams
.
length
>
0
?
`/
api/v1.0/contact?
${
stringifiedParams
}
`
:
`/api/v1.0
/contact`
}
export
const
get
Contact
=
async
(
params
?:
GetContactParams
,
options
?:
RequestInit
):
Promise
<
get
ContactResponse
>
=>
{
export
const
get
ApiV10Contact
=
async
(
params
?:
GetApiV10ContactParams
,
options
?:
RequestInit
):
Promise
<
getApiV10
ContactResponse
>
=>
{
return
useCustomClient
<
get
ContactResponse
>
(
getGet
ContactUrl
(
params
),
return
useCustomClient
<
get
ApiV10ContactResponse
>
(
getGetApiV10
ContactUrl
(
params
),
{
...
options
,
method
:
'GET'
...
...
@@ -497,75 +497,75 @@ export const getContact = async (params?: GetContactParams, options?: RequestIni
export
const
getGet
ContactInfiniteQueryKey
=
(
params
?:
Get
ContactParams
,)
=>
{
export
const
getGet
ApiV10ContactInfiniteQueryKey
=
(
params
?:
GetApiV10
ContactParams
,)
=>
{
return
[
'infinite'
,
`/contact`
,
...(
params
?
[
params
]:
[])
'infinite'
,
`/
api/v1.0/
contact`
,
...(
params
?
[
params
]:
[])
]
as
const
;
}
export
const
getGet
ContactQueryKey
=
(
params
?:
Get
ContactParams
,)
=>
{
export
const
getGet
ApiV10ContactQueryKey
=
(
params
?:
GetApiV10
ContactParams
,)
=>
{
return
[
`/contact`
,
...(
params
?
[
params
]:
[])
`/
api/v1.0/
contact`
,
...(
params
?
[
params
]:
[])
]
as
const
;
}
export
const
getGet
ContactInfiniteQueryOptions
=
<
TData
=
InfiniteData
<
Awaited
<
ReturnType
<
typeof
getContact
>>>
,
TError
=
ErrorType
<
unknown
>>
(
params
?:
GetContactParams
,
options
?:
{
query
?:
Partial
<
UseInfiniteQueryOptions
<
Awaited
<
ReturnType
<
typeof
get
Contact
>>
,
TError
,
TData
>>
,
request
?:
SecondParameter
<
typeof
useCustomClient
>
}
export
const
getGet
ApiV10ContactInfiniteQueryOptions
=
<
TData
=
InfiniteData
<
Awaited
<
ReturnType
<
typeof
getApiV10Contact
>>>
,
TError
=
ErrorType
<
unknown
>>
(
params
?:
GetApiV10ContactParams
,
options
?:
{
query
?:
Partial
<
UseInfiniteQueryOptions
<
Awaited
<
ReturnType
<
typeof
getApiV10
Contact
>>
,
TError
,
TData
>>
,
request
?:
SecondParameter
<
typeof
useCustomClient
>
}
)
=>
{
const
{
query
:
queryOptions
,
request
:
requestOptions
}
=
options
??
{};
const
queryKey
=
queryOptions
?.
queryKey
??
getGetContactInfiniteQueryKey
(
params
);
const
queryKey
=
queryOptions
?.
queryKey
??
getGet
ApiV10
ContactInfiniteQueryKey
(
params
);
const
queryFn
:
QueryFunction
<
Awaited
<
ReturnType
<
typeof
get
Contact
>>>
=
({
signal
})
=>
get
Contact
(
params
,
{
signal
,
...
requestOptions
});
const
queryFn
:
QueryFunction
<
Awaited
<
ReturnType
<
typeof
get
ApiV10Contact
>>>
=
({
signal
})
=>
getApiV10
Contact
(
params
,
{
signal
,
...
requestOptions
});
return
{
queryKey
,
queryFn
,
retry
:
3
,
retryDelay
:
1000
,
...
queryOptions
}
as
UseInfiniteQueryOptions
<
Awaited
<
ReturnType
<
typeof
getContact
>>
,
TError
,
TData
>
&
{
queryKey
:
DataTag
<
QueryKey
,
TData
,
TError
>
}
return
{
queryKey
,
queryFn
,
retry
:
3
,
retryDelay
:
1000
,
...
queryOptions
}
as
UseInfiniteQueryOptions
<
Awaited
<
ReturnType
<
typeof
get
ApiV10
Contact
>>
,
TError
,
TData
>
&
{
queryKey
:
DataTag
<
QueryKey
,
TData
,
TError
>
}
}
export
type
Get
ContactInfiniteQueryResult
=
NonNullable
<
Awaited
<
ReturnType
<
typeof
get
Contact
>>>
export
type
GetContactInfiniteQueryError
=
ErrorType
<
unknown
>
export
type
Get
ApiV10ContactInfiniteQueryResult
=
NonNullable
<
Awaited
<
ReturnType
<
typeof
getApiV10
Contact
>>>
export
type
Get
ApiV10
ContactInfiniteQueryError
=
ErrorType
<
unknown
>
export
function
useGet
ContactInfinite
<
TData
=
InfiniteData
<
Awaited
<
ReturnType
<
typeof
get
Contact
>>>
,
TError
=
ErrorType
<
unknown
>>
(
params
:
undefined
|
Get
ContactParams
,
options
:
{
query
:
Partial
<
UseInfiniteQueryOptions
<
Awaited
<
ReturnType
<
typeof
get
Contact
>>
,
TError
,
TData
>>
&
Pick
<
export
function
useGet
ApiV10ContactInfinite
<
TData
=
InfiniteData
<
Awaited
<
ReturnType
<
typeof
getApiV10
Contact
>>>
,
TError
=
ErrorType
<
unknown
>>
(
params
:
undefined
|
Get
ApiV10ContactParams
,
options
:
{
query
:
Partial
<
UseInfiniteQueryOptions
<
Awaited
<
ReturnType
<
typeof
getApiV10
Contact
>>
,
TError
,
TData
>>
&
Pick
<
DefinedInitialDataOptions
<
Awaited
<
ReturnType
<
typeof
getContact
>>
,
Awaited
<
ReturnType
<
typeof
get
ApiV10
Contact
>>
,
TError
,
Awaited
<
ReturnType
<
typeof
getContact
>>
Awaited
<
ReturnType
<
typeof
get
ApiV10
Contact
>>
>
,
'initialData'
>
,
request
?:
SecondParameter
<
typeof
useCustomClient
>
}
,
queryClient
?:
QueryClient
):
DefinedUseInfiniteQueryResult
<
TData
,
TError
>
&
{
queryKey
:
DataTag
<
QueryKey
,
TData
,
TError
>
}
export
function
useGet
ContactInfinite
<
TData
=
InfiniteData
<
Awaited
<
ReturnType
<
typeof
get
Contact
>>>
,
TError
=
ErrorType
<
unknown
>>
(
params
?:
Get
ContactParams
,
options
?:
{
query
?:
Partial
<
UseInfiniteQueryOptions
<
Awaited
<
ReturnType
<
typeof
get
Contact
>>
,
TError
,
TData
>>
&
Pick
<
export
function
useGet
ApiV10ContactInfinite
<
TData
=
InfiniteData
<
Awaited
<
ReturnType
<
typeof
getApiV10
Contact
>>>
,
TError
=
ErrorType
<
unknown
>>
(
params
?:
Get
ApiV10ContactParams
,
options
?:
{
query
?:
Partial
<
UseInfiniteQueryOptions
<
Awaited
<
ReturnType
<
typeof
getApiV10
Contact
>>
,
TError
,
TData
>>
&
Pick
<
UndefinedInitialDataOptions
<
Awaited
<
ReturnType
<
typeof
getContact
>>
,
Awaited
<
ReturnType
<
typeof
get
ApiV10
Contact
>>
,
TError
,
Awaited
<
ReturnType
<
typeof
getContact
>>
Awaited
<
ReturnType
<
typeof
get
ApiV10
Contact
>>
>
,
'initialData'
>
,
request
?:
SecondParameter
<
typeof
useCustomClient
>
}
,
queryClient
?:
QueryClient
):
UseInfiniteQueryResult
<
TData
,
TError
>
&
{
queryKey
:
DataTag
<
QueryKey
,
TData
,
TError
>
}
export
function
useGet
ContactInfinite
<
TData
=
InfiniteData
<
Awaited
<
ReturnType
<
typeof
get
Contact
>>>
,
TError
=
ErrorType
<
unknown
>>
(
params
?:
Get
ContactParams
,
options
?:
{
query
?:
Partial
<
UseInfiniteQueryOptions
<
Awaited
<
ReturnType
<
typeof
get
Contact
>>
,
TError
,
TData
>>
,
request
?:
SecondParameter
<
typeof
useCustomClient
>
}
export
function
useGet
ApiV10ContactInfinite
<
TData
=
InfiniteData
<
Awaited
<
ReturnType
<
typeof
getApiV10
Contact
>>>
,
TError
=
ErrorType
<
unknown
>>
(
params
?:
Get
ApiV10ContactParams
,
options
?:
{
query
?:
Partial
<
UseInfiniteQueryOptions
<
Awaited
<
ReturnType
<
typeof
getApiV10
Contact
>>
,
TError
,
TData
>>
,
request
?:
SecondParameter
<
typeof
useCustomClient
>
}
,
queryClient
?:
QueryClient
):
UseInfiniteQueryResult
<
TData
,
TError
>
&
{
queryKey
:
DataTag
<
QueryKey
,
TData
,
TError
>
}
/**
* @summary Get all contact
*/
export
function
useGet
ContactInfinite
<
TData
=
InfiniteData
<
Awaited
<
ReturnType
<
typeof
get
Contact
>>>
,
TError
=
ErrorType
<
unknown
>>
(
params
?:
Get
ContactParams
,
options
?:
{
query
?:
Partial
<
UseInfiniteQueryOptions
<
Awaited
<
ReturnType
<
typeof
get
Contact
>>
,
TError
,
TData
>>
,
request
?:
SecondParameter
<
typeof
useCustomClient
>
}
export
function
useGet
ApiV10ContactInfinite
<
TData
=
InfiniteData
<
Awaited
<
ReturnType
<
typeof
getApiV10
Contact
>>>
,
TError
=
ErrorType
<
unknown
>>
(
params
?:
Get
ApiV10ContactParams
,
options
?:
{
query
?:
Partial
<
UseInfiniteQueryOptions
<
Awaited
<
ReturnType
<
typeof
getApiV10
Contact
>>
,
TError
,
TData
>>
,
request
?:
SecondParameter
<
typeof
useCustomClient
>
}
,
queryClient
?:
QueryClient
):
UseInfiniteQueryResult
<
TData
,
TError
>
&
{
queryKey
:
DataTag
<
QueryKey
,
TData
,
TError
>
}
{
const
queryOptions
=
getGetContactInfiniteQueryOptions
(
params
,
options
)
const
queryOptions
=
getGet
ApiV10
ContactInfiniteQueryOptions
(
params
,
options
)
const
query
=
useInfiniteQuery
(
queryOptions
,
queryClient
)
as
UseInfiniteQueryResult
<
TData
,
TError
>
&
{
queryKey
:
DataTag
<
QueryKey
,
TData
,
TError
>
};
...
...
@@ -577,12 +577,12 @@ export function useGetContactInfinite<TData = InfiniteData<Awaited<ReturnType<ty
/**
* @summary Get all contact
*/
export
const
prefetchGet
ContactInfiniteQuery
=
async
<
TData
=
Awaited
<
ReturnType
<
typeof
get
Contact
>>
,
TError
=
ErrorType
<
unknown
>>
(
queryClient
:
QueryClient
,
params
?:
Get
ContactParams
,
options
?:
{
query
?:
Partial
<
UseInfiniteQueryOptions
<
Awaited
<
ReturnType
<
typeof
get
Contact
>>
,
TError
,
TData
>>
,
request
?:
SecondParameter
<
typeof
useCustomClient
>
}
export
const
prefetchGet
ApiV10ContactInfiniteQuery
=
async
<
TData
=
Awaited
<
ReturnType
<
typeof
getApiV10
Contact
>>
,
TError
=
ErrorType
<
unknown
>>
(
queryClient
:
QueryClient
,
params
?:
Get
ApiV10ContactParams
,
options
?:
{
query
?:
Partial
<
UseInfiniteQueryOptions
<
Awaited
<
ReturnType
<
typeof
getApiV10
Contact
>>
,
TError
,
TData
>>
,
request
?:
SecondParameter
<
typeof
useCustomClient
>
}
):
Promise
<
QueryClient
>
=>
{
const
queryOptions
=
getGetContactInfiniteQueryOptions
(
params
,
options
)
const
queryOptions
=
getGet
ApiV10
ContactInfiniteQueryOptions
(
params
,
options
)
await
queryClient
.
prefetchInfiniteQuery
(
queryOptions
);
...
...
@@ -591,62 +591,62 @@ export const prefetchGetContactInfiniteQuery = async <TData = Awaited<ReturnType
export
const
getGet
ContactQueryOptions
=
<
TData
=
Awaited
<
ReturnType
<
typeof
getContact
>>
,
TError
=
ErrorType
<
unknown
>>
(
params
?:
GetContactParams
,
options
?:
{
query
?:
Partial
<
UseQueryOptions
<
Awaited
<
ReturnType
<
typeof
get
Contact
>>
,
TError
,
TData
>>
,
request
?:
SecondParameter
<
typeof
useCustomClient
>
}
export
const
getGet
ApiV10ContactQueryOptions
=
<
TData
=
Awaited
<
ReturnType
<
typeof
getApiV10Contact
>>
,
TError
=
ErrorType
<
unknown
>>
(
params
?:
GetApiV10ContactParams
,
options
?:
{
query
?:
Partial
<
UseQueryOptions
<
Awaited
<
ReturnType
<
typeof
getApiV10
Contact
>>
,
TError
,
TData
>>
,
request
?:
SecondParameter
<
typeof
useCustomClient
>
}
)
=>
{
const
{
query
:
queryOptions
,
request
:
requestOptions
}
=
options
??
{};
const
queryKey
=
queryOptions
?.
queryKey
??
getGetContactQueryKey
(
params
);
const
queryKey
=
queryOptions
?.
queryKey
??
getGet
ApiV10
ContactQueryKey
(
params
);
const
queryFn
:
QueryFunction
<
Awaited
<
ReturnType
<
typeof
get
Contact
>>>
=
({
signal
})
=>
get
Contact
(
params
,
{
signal
,
...
requestOptions
});
const
queryFn
:
QueryFunction
<
Awaited
<
ReturnType
<
typeof
get
ApiV10Contact
>>>
=
({
signal
})
=>
getApiV10
Contact
(
params
,
{
signal
,
...
requestOptions
});
return
{
queryKey
,
queryFn
,
retry
:
3
,
retryDelay
:
1000
,
...
queryOptions
}
as
UseQueryOptions
<
Awaited
<
ReturnType
<
typeof
getContact
>>
,
TError
,
TData
>
&
{
queryKey
:
DataTag
<
QueryKey
,
TData
,
TError
>
}
return
{
queryKey
,
queryFn
,
retry
:
3
,
retryDelay
:
1000
,
...
queryOptions
}
as
UseQueryOptions
<
Awaited
<
ReturnType
<
typeof
get
ApiV10
Contact
>>
,
TError
,
TData
>
&
{
queryKey
:
DataTag
<
QueryKey
,
TData
,
TError
>
}
}
export
type
Get
ContactQueryResult
=
NonNullable
<
Awaited
<
ReturnType
<
typeof
get
Contact
>>>
export
type
GetContactQueryError
=
ErrorType
<
unknown
>
export
type
Get
ApiV10ContactQueryResult
=
NonNullable
<
Awaited
<
ReturnType
<
typeof
getApiV10
Contact
>>>
export
type
Get
ApiV10
ContactQueryError
=
ErrorType
<
unknown
>
export
function
useGet
Contact
<
TData
=
Awaited
<
ReturnType
<
typeof
get
Contact
>>
,
TError
=
ErrorType
<
unknown
>>
(
params
:
undefined
|
Get
ContactParams
,
options
:
{
query
:
Partial
<
UseQueryOptions
<
Awaited
<
ReturnType
<
typeof
get
Contact
>>
,
TError
,
TData
>>
&
Pick
<
export
function
useGet
ApiV10Contact
<
TData
=
Awaited
<
ReturnType
<
typeof
getApiV10
Contact
>>
,
TError
=
ErrorType
<
unknown
>>
(
params
:
undefined
|
Get
ApiV10ContactParams
,
options
:
{
query
:
Partial
<
UseQueryOptions
<
Awaited
<
ReturnType
<
typeof
getApiV10
Contact
>>
,
TError
,
TData
>>
&
Pick
<
DefinedInitialDataOptions
<
Awaited
<
ReturnType
<
typeof
getContact
>>
,
Awaited
<
ReturnType
<
typeof
get
ApiV10
Contact
>>
,
TError
,
Awaited
<
ReturnType
<
typeof
getContact
>>
Awaited
<
ReturnType
<
typeof
get
ApiV10
Contact
>>
>
,
'initialData'
>
,
request
?:
SecondParameter
<
typeof
useCustomClient
>
}
,
queryClient
?:
QueryClient
):
DefinedUseQueryResult
<
TData
,
TError
>
&
{
queryKey
:
DataTag
<
QueryKey
,
TData
,
TError
>
}
export
function
useGet
Contact
<
TData
=
Awaited
<
ReturnType
<
typeof
get
Contact
>>
,
TError
=
ErrorType
<
unknown
>>
(
params
?:
Get
ContactParams
,
options
?:
{
query
?:
Partial
<
UseQueryOptions
<
Awaited
<
ReturnType
<
typeof
get
Contact
>>
,
TError
,
TData
>>
&
Pick
<
export
function
useGet
ApiV10Contact
<
TData
=
Awaited
<
ReturnType
<
typeof
getApiV10
Contact
>>
,
TError
=
ErrorType
<
unknown
>>
(
params
?:
Get
ApiV10ContactParams
,
options
?:
{
query
?:
Partial
<
UseQueryOptions
<
Awaited
<
ReturnType
<
typeof
getApiV10
Contact
>>
,
TError
,
TData
>>
&
Pick
<
UndefinedInitialDataOptions
<
Awaited
<
ReturnType
<
typeof
getContact
>>
,
Awaited
<
ReturnType
<
typeof
get
ApiV10
Contact
>>
,
TError
,
Awaited
<
ReturnType
<
typeof
getContact
>>
Awaited
<
ReturnType
<
typeof
get
ApiV10
Contact
>>
>
,
'initialData'
>
,
request
?:
SecondParameter
<
typeof
useCustomClient
>
}
,
queryClient
?:
QueryClient
):
UseQueryResult
<
TData
,
TError
>
&
{
queryKey
:
DataTag
<
QueryKey
,
TData
,
TError
>
}
export
function
useGet
Contact
<
TData
=
Awaited
<
ReturnType
<
typeof
get
Contact
>>
,
TError
=
ErrorType
<
unknown
>>
(
params
?:
Get
ContactParams
,
options
?:
{
query
?:
Partial
<
UseQueryOptions
<
Awaited
<
ReturnType
<
typeof
get
Contact
>>
,
TError
,
TData
>>
,
request
?:
SecondParameter
<
typeof
useCustomClient
>
}
export
function
useGet
ApiV10Contact
<
TData
=
Awaited
<
ReturnType
<
typeof
getApiV10
Contact
>>
,
TError
=
ErrorType
<
unknown
>>
(
params
?:
Get
ApiV10ContactParams
,
options
?:
{
query
?:
Partial
<
UseQueryOptions
<
Awaited
<
ReturnType
<
typeof
getApiV10
Contact
>>
,
TError
,
TData
>>
,
request
?:
SecondParameter
<
typeof
useCustomClient
>
}
,
queryClient
?:
QueryClient
):
UseQueryResult
<
TData
,
TError
>
&
{
queryKey
:
DataTag
<
QueryKey
,
TData
,
TError
>
}
/**
* @summary Get all contact
*/
export
function
useGet
Contact
<
TData
=
Awaited
<
ReturnType
<
typeof
get
Contact
>>
,
TError
=
ErrorType
<
unknown
>>
(
params
?:
Get
ContactParams
,
options
?:
{
query
?:
Partial
<
UseQueryOptions
<
Awaited
<
ReturnType
<
typeof
get
Contact
>>
,
TError
,
TData
>>
,
request
?:
SecondParameter
<
typeof
useCustomClient
>
}
export
function
useGet
ApiV10Contact
<
TData
=
Awaited
<
ReturnType
<
typeof
getApiV10
Contact
>>
,
TError
=
ErrorType
<
unknown
>>
(
params
?:
Get
ApiV10ContactParams
,
options
?:
{
query
?:
Partial
<
UseQueryOptions
<
Awaited
<
ReturnType
<
typeof
getApiV10
Contact
>>
,
TError
,
TData
>>
,
request
?:
SecondParameter
<
typeof
useCustomClient
>
}
,
queryClient
?:
QueryClient
):
UseQueryResult
<
TData
,
TError
>
&
{
queryKey
:
DataTag
<
QueryKey
,
TData
,
TError
>
}
{
const
queryOptions
=
getGetContactQueryOptions
(
params
,
options
)
const
queryOptions
=
getGet
ApiV10
ContactQueryOptions
(
params
,
options
)
const
query
=
useQuery
(
queryOptions
,
queryClient
)
as
UseQueryResult
<
TData
,
TError
>
&
{
queryKey
:
DataTag
<
QueryKey
,
TData
,
TError
>
};
...
...
@@ -658,12 +658,12 @@ export function useGetContact<TData = Awaited<ReturnType<typeof getContact>>, TE
/**
* @summary Get all contact
*/
export
const
prefetchGet
ContactQuery
=
async
<
TData
=
Awaited
<
ReturnType
<
typeof
get
Contact
>>
,
TError
=
ErrorType
<
unknown
>>
(
queryClient
:
QueryClient
,
params
?:
Get
ContactParams
,
options
?:
{
query
?:
Partial
<
UseQueryOptions
<
Awaited
<
ReturnType
<
typeof
get
Contact
>>
,
TError
,
TData
>>
,
request
?:
SecondParameter
<
typeof
useCustomClient
>
}
export
const
prefetchGet
ApiV10ContactQuery
=
async
<
TData
=
Awaited
<
ReturnType
<
typeof
getApiV10
Contact
>>
,
TError
=
ErrorType
<
unknown
>>
(
queryClient
:
QueryClient
,
params
?:
Get
ApiV10ContactParams
,
options
?:
{
query
?:
Partial
<
UseQueryOptions
<
Awaited
<
ReturnType
<
typeof
getApiV10
Contact
>>
,
TError
,
TData
>>
,
request
?:
SecondParameter
<
typeof
useCustomClient
>
}
):
Promise
<
QueryClient
>
=>
{
const
queryOptions
=
getGetContactQueryOptions
(
params
,
options
)
const
queryOptions
=
getGet
ApiV10
ContactQueryOptions
(
params
,
options
)
await
queryClient
.
prefetchQuery
(
queryOptions
);
...
...
@@ -676,29 +676,29 @@ export const prefetchGetContactQuery = async <TData = Awaited<ReturnType<typeof
* Create a new contact record
* @summary Create a contact
*/
export
type
postContactResponse200
=
{
data
:
PostContact200
export
type
post
ApiV10
ContactResponse200
=
{
data
:
Post
ApiV10
Contact200
status
:
200
}
export
type
post
ContactResponseSuccess
=
(
post
ContactResponse200
)
&
{
export
type
post
ApiV10ContactResponseSuccess
=
(
postApiV10
ContactResponse200
)
&
{
headers
:
Headers
;
};
;
export
type
post
ContactResponse
=
(
post
ContactResponseSuccess
)
export
type
post
ApiV10ContactResponse
=
(
postApiV10
ContactResponseSuccess
)
export
const
getPostContactUrl
=
()
=>
{
export
const
getPost
ApiV10
ContactUrl
=
()
=>
{
return
`/contact`
return
`/
api/v1.0/
contact`
}
export
const
post
Contact
=
async
(
contactMutate
:
ContactMutate
,
options
?:
RequestInit
):
Promise
<
post
ContactResponse
>
=>
{
export
const
post
ApiV10Contact
=
async
(
contactMutate
:
ContactMutate
,
options
?:
RequestInit
):
Promise
<
postApiV10
ContactResponse
>
=>
{
return
useCustomClient
<
post
ContactResponse
>
(
getPost
ContactUrl
(),
return
useCustomClient
<
post
ApiV10ContactResponse
>
(
getPostApiV10
ContactUrl
(),
{
...
options
,
method
:
'POST'
,
...
...
@@ -711,11 +711,11 @@ export const postContact = async (contactMutate: ContactMutate, options?: Reques
export
const
getPostContactMutationOptions
=
<
TError
=
ErrorType
<
unknown
>
,
TContext
=
unknown
>
(
options
?:
{
mutation
?:
UseMutationOptions
<
Awaited
<
ReturnType
<
typeof
postContact
>>
,
TError
,{
data
:
BodyType
<
ContactMutate
>
},
TContext
>
,
request
?:
SecondParameter
<
typeof
useCustomClient
>
}
):
UseMutationOptions
<
Awaited
<
ReturnType
<
typeof
postContact
>>
,
TError
,{
data
:
BodyType
<
ContactMutate
>
},
TContext
>
=>
{
export
const
getPost
ApiV10
ContactMutationOptions
=
<
TError
=
ErrorType
<
unknown
>
,
TContext
=
unknown
>
(
options
?:
{
mutation
?:
UseMutationOptions
<
Awaited
<
ReturnType
<
typeof
post
ApiV10
Contact
>>
,
TError
,{
data
:
BodyType
<
ContactMutate
>
},
TContext
>
,
request
?:
SecondParameter
<
typeof
useCustomClient
>
}
):
UseMutationOptions
<
Awaited
<
ReturnType
<
typeof
post
ApiV10
Contact
>>
,
TError
,{
data
:
BodyType
<
ContactMutate
>
},
TContext
>
=>
{
const
mutationKey
=
[
'postContact'
];
const
mutationKey
=
[
'post
ApiV10
Contact'
];
const
{
mutation
:
mutationOptions
,
request
:
requestOptions
}
=
options
?
options
.
mutation
&&
'mutationKey'
in
options
.
mutation
&&
options
.
mutation
.
mutationKey
?
options
...
...
@@ -725,10 +725,10 @@ const {mutation: mutationOptions, request: requestOptions} = options ?
const
mutationFn
:
MutationFunction
<
Awaited
<
ReturnType
<
typeof
postContact
>>
,
{
data
:
BodyType
<
ContactMutate
>
}
>
=
(
props
)
=>
{
const
mutationFn
:
MutationFunction
<
Awaited
<
ReturnType
<
typeof
post
ApiV10
Contact
>>
,
{
data
:
BodyType
<
ContactMutate
>
}
>
=
(
props
)
=>
{
const
{
data
}
=
props
??
{};
return
postContact
(
data
,
requestOptions
)
return
post
ApiV10
Contact
(
data
,
requestOptions
)
}
...
...
@@ -736,23 +736,23 @@ const {mutation: mutationOptions, request: requestOptions} = options ?
return
{
mutationFn
,
...
mutationOptions
}}
export
type
Post
ContactMutationResult
=
NonNullable
<
Awaited
<
ReturnType
<
typeof
post
Contact
>>>
export
type
PostContactMutationBody
=
BodyType
<
ContactMutate
>
export
type
PostContactMutationError
=
ErrorType
<
unknown
>
export
type
Post
ApiV10ContactMutationResult
=
NonNullable
<
Awaited
<
ReturnType
<
typeof
postApiV10
Contact
>>>
export
type
Post
ApiV10
ContactMutationBody
=
BodyType
<
ContactMutate
>
export
type
Post
ApiV10
ContactMutationError
=
ErrorType
<
unknown
>
/**
* @summary Create a contact
*/
export
const
usePostContact
=
<
TError
=
ErrorType
<
unknown
>
,
TContext
=
unknown
>
(
options
?:
{
mutation
?:
UseMutationOptions
<
Awaited
<
ReturnType
<
typeof
postContact
>>
,
TError
,{
data
:
BodyType
<
ContactMutate
>
},
TContext
>
,
request
?:
SecondParameter
<
typeof
useCustomClient
>
}
export
const
usePost
ApiV10
Contact
=
<
TError
=
ErrorType
<
unknown
>
,
TContext
=
unknown
>
(
options
?:
{
mutation
?:
UseMutationOptions
<
Awaited
<
ReturnType
<
typeof
post
ApiV10
Contact
>>
,
TError
,{
data
:
BodyType
<
ContactMutate
>
},
TContext
>
,
request
?:
SecondParameter
<
typeof
useCustomClient
>
}
,
queryClient
?:
QueryClient
):
UseMutationResult
<
Awaited
<
ReturnType
<
typeof
postContact
>>
,
Awaited
<
ReturnType
<
typeof
post
ApiV10
Contact
>>
,
TError
,
{
data
:
BodyType
<
ContactMutate
>
},
TContext
>
=>
{
const
mutationOptions
=
getPostContactMutationOptions
(
options
);
const
mutationOptions
=
getPost
ApiV10
ContactMutationOptions
(
options
);
return
useMutation
(
mutationOptions
,
queryClient
);
}
src/api/endpoints/logo.ts
View file @
b3589a95
/**
* Generated by orval v8.0.0-rc.0 🍺
* Do not edit manually.
*
Backend Template
*
Coded by Meu TEAM
*
VietProDev CMS Backend API
*
Generated API documentation
* OpenAPI spec version: 1.0.0
*/
import
{
...
...
@@ -30,13 +30,13 @@ import type {
}
from
'@tanstack/react-query'
;
import
type
{
DeleteLogoId200
,
GetLogoId200
,
GetLogoParams
,
Delete
ApiV10
LogoId200
,
Get
ApiV10
LogoId200
,
Get
ApiV10
LogoParams
,
LogoCreate
,
LogoUpdate
,
PostLogo200
,
PutLogoId200
,
Post
ApiV10
Logo200
,
Put
ApiV10
LogoId200
,
ResponseGetAllData
}
from
'../models'
;
...
...
@@ -53,36 +53,36 @@ type SecondParameter<T extends (...args: never) => unknown> = Parameters<T>[1];
* Retrieve a single logo record by its ID
* @summary Get logo by ID
*/
export
type
getLogoIdResponse200
=
{
data
:
GetLogoId200
export
type
get
ApiV10
LogoIdResponse200
=
{
data
:
Get
ApiV10
LogoId200
status
:
200
}
export
type
getLogoIdResponse404
=
{
export
type
get
ApiV10
LogoIdResponse404
=
{
data
:
void
status
:
404
}
export
type
get
LogoIdResponseSuccess
=
(
get
LogoIdResponse200
)
&
{
export
type
get
ApiV10LogoIdResponseSuccess
=
(
getApiV10
LogoIdResponse200
)
&
{
headers
:
Headers
;
};
export
type
get
LogoIdResponseError
=
(
get
LogoIdResponse404
)
&
{
export
type
get
ApiV10LogoIdResponseError
=
(
getApiV10
LogoIdResponse404
)
&
{
headers
:
Headers
;
};
export
type
get
LogoIdResponse
=
(
getLogoIdResponseSuccess
|
get
LogoIdResponseError
)
export
type
get
ApiV10LogoIdResponse
=
(
getApiV10LogoIdResponseSuccess
|
getApiV10
LogoIdResponseError
)
export
const
getGetLogoIdUrl
=
(
id
:
string
,)
=>
{
export
const
getGet
ApiV10
LogoIdUrl
=
(
id
:
string
,)
=>
{
return
`/logo/
${
id
}
`
return
`/
api/v1.0/
logo/
${
id
}
`
}
export
const
get
LogoId
=
async
(
id
:
string
,
options
?:
RequestInit
):
Promise
<
get
LogoIdResponse
>
=>
{
export
const
get
ApiV10LogoId
=
async
(
id
:
string
,
options
?:
RequestInit
):
Promise
<
getApiV10
LogoIdResponse
>
=>
{
return
useCustomClient
<
get
LogoIdResponse
>
(
getGet
LogoIdUrl
(
id
),
return
useCustomClient
<
get
ApiV10LogoIdResponse
>
(
getGetApiV10
LogoIdUrl
(
id
),
{
...
options
,
method
:
'GET'
...
...
@@ -95,75 +95,75 @@ export const getLogoId = async (id: string, options?: RequestInit): Promise<getL
export
const
getGetLogoIdInfiniteQueryKey
=
(
id
?:
string
,)
=>
{
export
const
getGet
ApiV10
LogoIdInfiniteQueryKey
=
(
id
?:
string
,)
=>
{
return
[
'infinite'
,
`/logo/
${
id
}
`
'infinite'
,
`/
api/v1.0/
logo/
${
id
}
`
]
as
const
;
}
export
const
getGetLogoIdQueryKey
=
(
id
?:
string
,)
=>
{
export
const
getGet
ApiV10
LogoIdQueryKey
=
(
id
?:
string
,)
=>
{
return
[
`/logo/
${
id
}
`
`/
api/v1.0/
logo/
${
id
}
`
]
as
const
;
}
export
const
getGet
LogoIdInfiniteQueryOptions
=
<
TData
=
InfiniteData
<
Awaited
<
ReturnType
<
typeof
getLogoId
>>>
,
TError
=
ErrorType
<
void
>>
(
id
:
string
,
options
?:
{
query
?:
Partial
<
UseInfiniteQueryOptions
<
Awaited
<
ReturnType
<
typeof
get
LogoId
>>
,
TError
,
TData
>>
,
request
?:
SecondParameter
<
typeof
useCustomClient
>
}
export
const
getGet
ApiV10LogoIdInfiniteQueryOptions
=
<
TData
=
InfiniteData
<
Awaited
<
ReturnType
<
typeof
getApiV10LogoId
>>>
,
TError
=
ErrorType
<
void
>>
(
id
:
string
,
options
?:
{
query
?:
Partial
<
UseInfiniteQueryOptions
<
Awaited
<
ReturnType
<
typeof
getApiV10
LogoId
>>
,
TError
,
TData
>>
,
request
?:
SecondParameter
<
typeof
useCustomClient
>
}
)
=>
{
const
{
query
:
queryOptions
,
request
:
requestOptions
}
=
options
??
{};
const
queryKey
=
queryOptions
?.
queryKey
??
getGetLogoIdInfiniteQueryKey
(
id
);
const
queryKey
=
queryOptions
?.
queryKey
??
getGet
ApiV10
LogoIdInfiniteQueryKey
(
id
);
const
queryFn
:
QueryFunction
<
Awaited
<
ReturnType
<
typeof
get
LogoId
>>>
=
({
signal
})
=>
get
LogoId
(
id
,
{
signal
,
...
requestOptions
});
const
queryFn
:
QueryFunction
<
Awaited
<
ReturnType
<
typeof
get
ApiV10LogoId
>>>
=
({
signal
})
=>
getApiV10
LogoId
(
id
,
{
signal
,
...
requestOptions
});
return
{
queryKey
,
queryFn
,
enabled
:
!!
(
id
),
retry
:
3
,
retryDelay
:
1000
,
...
queryOptions
}
as
UseInfiniteQueryOptions
<
Awaited
<
ReturnType
<
typeof
getLogoId
>>
,
TError
,
TData
>
&
{
queryKey
:
DataTag
<
QueryKey
,
TData
,
TError
>
}
return
{
queryKey
,
queryFn
,
enabled
:
!!
(
id
),
retry
:
3
,
retryDelay
:
1000
,
...
queryOptions
}
as
UseInfiniteQueryOptions
<
Awaited
<
ReturnType
<
typeof
get
ApiV10
LogoId
>>
,
TError
,
TData
>
&
{
queryKey
:
DataTag
<
QueryKey
,
TData
,
TError
>
}
}
export
type
Get
LogoIdInfiniteQueryResult
=
NonNullable
<
Awaited
<
ReturnType
<
typeof
get
LogoId
>>>
export
type
GetLogoIdInfiniteQueryError
=
ErrorType
<
void
>
export
type
Get
ApiV10LogoIdInfiniteQueryResult
=
NonNullable
<
Awaited
<
ReturnType
<
typeof
getApiV10
LogoId
>>>
export
type
Get
ApiV10
LogoIdInfiniteQueryError
=
ErrorType
<
void
>
export
function
useGet
LogoIdInfinite
<
TData
=
InfiniteData
<
Awaited
<
ReturnType
<
typeof
get
LogoId
>>>
,
TError
=
ErrorType
<
void
>>
(
id
:
string
,
options
:
{
query
:
Partial
<
UseInfiniteQueryOptions
<
Awaited
<
ReturnType
<
typeof
getLogoId
>>
,
TError
,
TData
>>
&
Pick
<
export
function
useGet
ApiV10LogoIdInfinite
<
TData
=
InfiniteData
<
Awaited
<
ReturnType
<
typeof
getApiV10
LogoId
>>>
,
TError
=
ErrorType
<
void
>>
(
id
:
string
,
options
:
{
query
:
Partial
<
UseInfiniteQueryOptions
<
Awaited
<
ReturnType
<
typeof
get
ApiV10
LogoId
>>
,
TError
,
TData
>>
&
Pick
<
DefinedInitialDataOptions
<
Awaited
<
ReturnType
<
typeof
getLogoId
>>
,
Awaited
<
ReturnType
<
typeof
get
ApiV10
LogoId
>>
,
TError
,
Awaited
<
ReturnType
<
typeof
getLogoId
>>
Awaited
<
ReturnType
<
typeof
get
ApiV10
LogoId
>>
>
,
'initialData'
>
,
request
?:
SecondParameter
<
typeof
useCustomClient
>
}
,
queryClient
?:
QueryClient
):
DefinedUseInfiniteQueryResult
<
TData
,
TError
>
&
{
queryKey
:
DataTag
<
QueryKey
,
TData
,
TError
>
}
export
function
useGet
LogoIdInfinite
<
TData
=
InfiniteData
<
Awaited
<
ReturnType
<
typeof
get
LogoId
>>>
,
TError
=
ErrorType
<
void
>>
(
id
:
string
,
options
?:
{
query
?:
Partial
<
UseInfiniteQueryOptions
<
Awaited
<
ReturnType
<
typeof
getLogoId
>>
,
TError
,
TData
>>
&
Pick
<
export
function
useGet
ApiV10LogoIdInfinite
<
TData
=
InfiniteData
<
Awaited
<
ReturnType
<
typeof
getApiV10
LogoId
>>>
,
TError
=
ErrorType
<
void
>>
(
id
:
string
,
options
?:
{
query
?:
Partial
<
UseInfiniteQueryOptions
<
Awaited
<
ReturnType
<
typeof
get
ApiV10
LogoId
>>
,
TError
,
TData
>>
&
Pick
<
UndefinedInitialDataOptions
<
Awaited
<
ReturnType
<
typeof
getLogoId
>>
,
Awaited
<
ReturnType
<
typeof
get
ApiV10
LogoId
>>
,
TError
,
Awaited
<
ReturnType
<
typeof
getLogoId
>>
Awaited
<
ReturnType
<
typeof
get
ApiV10
LogoId
>>
>
,
'initialData'
>
,
request
?:
SecondParameter
<
typeof
useCustomClient
>
}
,
queryClient
?:
QueryClient
):
UseInfiniteQueryResult
<
TData
,
TError
>
&
{
queryKey
:
DataTag
<
QueryKey
,
TData
,
TError
>
}
export
function
useGet
LogoIdInfinite
<
TData
=
InfiniteData
<
Awaited
<
ReturnType
<
typeof
get
LogoId
>>>
,
TError
=
ErrorType
<
void
>>
(
id
:
string
,
options
?:
{
query
?:
Partial
<
UseInfiniteQueryOptions
<
Awaited
<
ReturnType
<
typeof
getLogoId
>>
,
TError
,
TData
>>
,
request
?:
SecondParameter
<
typeof
useCustomClient
>
}
export
function
useGet
ApiV10LogoIdInfinite
<
TData
=
InfiniteData
<
Awaited
<
ReturnType
<
typeof
getApiV10
LogoId
>>>
,
TError
=
ErrorType
<
void
>>
(
id
:
string
,
options
?:
{
query
?:
Partial
<
UseInfiniteQueryOptions
<
Awaited
<
ReturnType
<
typeof
get
ApiV10
LogoId
>>
,
TError
,
TData
>>
,
request
?:
SecondParameter
<
typeof
useCustomClient
>
}
,
queryClient
?:
QueryClient
):
UseInfiniteQueryResult
<
TData
,
TError
>
&
{
queryKey
:
DataTag
<
QueryKey
,
TData
,
TError
>
}
/**
* @summary Get logo by ID
*/
export
function
useGet
LogoIdInfinite
<
TData
=
InfiniteData
<
Awaited
<
ReturnType
<
typeof
get
LogoId
>>>
,
TError
=
ErrorType
<
void
>>
(
id
:
string
,
options
?:
{
query
?:
Partial
<
UseInfiniteQueryOptions
<
Awaited
<
ReturnType
<
typeof
getLogoId
>>
,
TError
,
TData
>>
,
request
?:
SecondParameter
<
typeof
useCustomClient
>
}
export
function
useGet
ApiV10LogoIdInfinite
<
TData
=
InfiniteData
<
Awaited
<
ReturnType
<
typeof
getApiV10
LogoId
>>>
,
TError
=
ErrorType
<
void
>>
(
id
:
string
,
options
?:
{
query
?:
Partial
<
UseInfiniteQueryOptions
<
Awaited
<
ReturnType
<
typeof
get
ApiV10
LogoId
>>
,
TError
,
TData
>>
,
request
?:
SecondParameter
<
typeof
useCustomClient
>
}
,
queryClient
?:
QueryClient
):
UseInfiniteQueryResult
<
TData
,
TError
>
&
{
queryKey
:
DataTag
<
QueryKey
,
TData
,
TError
>
}
{
const
queryOptions
=
getGetLogoIdInfiniteQueryOptions
(
id
,
options
)
const
queryOptions
=
getGet
ApiV10
LogoIdInfiniteQueryOptions
(
id
,
options
)
const
query
=
useInfiniteQuery
(
queryOptions
,
queryClient
)
as
UseInfiniteQueryResult
<
TData
,
TError
>
&
{
queryKey
:
DataTag
<
QueryKey
,
TData
,
TError
>
};
...
...
@@ -175,12 +175,12 @@ export function useGetLogoIdInfinite<TData = InfiniteData<Awaited<ReturnType<typ
/**
* @summary Get logo by ID
*/
export
const
prefetchGet
LogoIdInfiniteQuery
=
async
<
TData
=
Awaited
<
ReturnType
<
typeof
get
LogoId
>>
,
TError
=
ErrorType
<
void
>>
(
queryClient
:
QueryClient
,
id
:
string
,
options
?:
{
query
?:
Partial
<
UseInfiniteQueryOptions
<
Awaited
<
ReturnType
<
typeof
getLogoId
>>
,
TError
,
TData
>>
,
request
?:
SecondParameter
<
typeof
useCustomClient
>
}
export
const
prefetchGet
ApiV10LogoIdInfiniteQuery
=
async
<
TData
=
Awaited
<
ReturnType
<
typeof
getApiV10
LogoId
>>
,
TError
=
ErrorType
<
void
>>
(
queryClient
:
QueryClient
,
id
:
string
,
options
?:
{
query
?:
Partial
<
UseInfiniteQueryOptions
<
Awaited
<
ReturnType
<
typeof
get
ApiV10
LogoId
>>
,
TError
,
TData
>>
,
request
?:
SecondParameter
<
typeof
useCustomClient
>
}
):
Promise
<
QueryClient
>
=>
{
const
queryOptions
=
getGetLogoIdInfiniteQueryOptions
(
id
,
options
)
const
queryOptions
=
getGet
ApiV10
LogoIdInfiniteQueryOptions
(
id
,
options
)
await
queryClient
.
prefetchInfiniteQuery
(
queryOptions
);
...
...
@@ -189,62 +189,62 @@ export const prefetchGetLogoIdInfiniteQuery = async <TData = Awaited<ReturnType<
export
const
getGet
LogoIdQueryOptions
=
<
TData
=
Awaited
<
ReturnType
<
typeof
getLogoId
>>
,
TError
=
ErrorType
<
void
>>
(
id
:
string
,
options
?:
{
query
?:
Partial
<
UseQueryOptions
<
Awaited
<
ReturnType
<
typeof
get
LogoId
>>
,
TError
,
TData
>>
,
request
?:
SecondParameter
<
typeof
useCustomClient
>
}
export
const
getGet
ApiV10LogoIdQueryOptions
=
<
TData
=
Awaited
<
ReturnType
<
typeof
getApiV10LogoId
>>
,
TError
=
ErrorType
<
void
>>
(
id
:
string
,
options
?:
{
query
?:
Partial
<
UseQueryOptions
<
Awaited
<
ReturnType
<
typeof
getApiV10
LogoId
>>
,
TError
,
TData
>>
,
request
?:
SecondParameter
<
typeof
useCustomClient
>
}
)
=>
{
const
{
query
:
queryOptions
,
request
:
requestOptions
}
=
options
??
{};
const
queryKey
=
queryOptions
?.
queryKey
??
getGetLogoIdQueryKey
(
id
);
const
queryKey
=
queryOptions
?.
queryKey
??
getGet
ApiV10
LogoIdQueryKey
(
id
);
const
queryFn
:
QueryFunction
<
Awaited
<
ReturnType
<
typeof
get
LogoId
>>>
=
({
signal
})
=>
get
LogoId
(
id
,
{
signal
,
...
requestOptions
});
const
queryFn
:
QueryFunction
<
Awaited
<
ReturnType
<
typeof
get
ApiV10LogoId
>>>
=
({
signal
})
=>
getApiV10
LogoId
(
id
,
{
signal
,
...
requestOptions
});
return
{
queryKey
,
queryFn
,
enabled
:
!!
(
id
),
retry
:
3
,
retryDelay
:
1000
,
...
queryOptions
}
as
UseQueryOptions
<
Awaited
<
ReturnType
<
typeof
getLogoId
>>
,
TError
,
TData
>
&
{
queryKey
:
DataTag
<
QueryKey
,
TData
,
TError
>
}
return
{
queryKey
,
queryFn
,
enabled
:
!!
(
id
),
retry
:
3
,
retryDelay
:
1000
,
...
queryOptions
}
as
UseQueryOptions
<
Awaited
<
ReturnType
<
typeof
get
ApiV10
LogoId
>>
,
TError
,
TData
>
&
{
queryKey
:
DataTag
<
QueryKey
,
TData
,
TError
>
}
}
export
type
Get
LogoIdQueryResult
=
NonNullable
<
Awaited
<
ReturnType
<
typeof
get
LogoId
>>>
export
type
GetLogoIdQueryError
=
ErrorType
<
void
>
export
type
Get
ApiV10LogoIdQueryResult
=
NonNullable
<
Awaited
<
ReturnType
<
typeof
getApiV10
LogoId
>>>
export
type
Get
ApiV10
LogoIdQueryError
=
ErrorType
<
void
>
export
function
useGet
LogoId
<
TData
=
Awaited
<
ReturnType
<
typeof
get
LogoId
>>
,
TError
=
ErrorType
<
void
>>
(
id
:
string
,
options
:
{
query
:
Partial
<
UseQueryOptions
<
Awaited
<
ReturnType
<
typeof
getLogoId
>>
,
TError
,
TData
>>
&
Pick
<
export
function
useGet
ApiV10LogoId
<
TData
=
Awaited
<
ReturnType
<
typeof
getApiV10
LogoId
>>
,
TError
=
ErrorType
<
void
>>
(
id
:
string
,
options
:
{
query
:
Partial
<
UseQueryOptions
<
Awaited
<
ReturnType
<
typeof
get
ApiV10
LogoId
>>
,
TError
,
TData
>>
&
Pick
<
DefinedInitialDataOptions
<
Awaited
<
ReturnType
<
typeof
getLogoId
>>
,
Awaited
<
ReturnType
<
typeof
get
ApiV10
LogoId
>>
,
TError
,
Awaited
<
ReturnType
<
typeof
getLogoId
>>
Awaited
<
ReturnType
<
typeof
get
ApiV10
LogoId
>>
>
,
'initialData'
>
,
request
?:
SecondParameter
<
typeof
useCustomClient
>
}
,
queryClient
?:
QueryClient
):
DefinedUseQueryResult
<
TData
,
TError
>
&
{
queryKey
:
DataTag
<
QueryKey
,
TData
,
TError
>
}
export
function
useGet
LogoId
<
TData
=
Awaited
<
ReturnType
<
typeof
get
LogoId
>>
,
TError
=
ErrorType
<
void
>>
(
id
:
string
,
options
?:
{
query
?:
Partial
<
UseQueryOptions
<
Awaited
<
ReturnType
<
typeof
getLogoId
>>
,
TError
,
TData
>>
&
Pick
<
export
function
useGet
ApiV10LogoId
<
TData
=
Awaited
<
ReturnType
<
typeof
getApiV10
LogoId
>>
,
TError
=
ErrorType
<
void
>>
(
id
:
string
,
options
?:
{
query
?:
Partial
<
UseQueryOptions
<
Awaited
<
ReturnType
<
typeof
get
ApiV10
LogoId
>>
,
TError
,
TData
>>
&
Pick
<
UndefinedInitialDataOptions
<
Awaited
<
ReturnType
<
typeof
getLogoId
>>
,
Awaited
<
ReturnType
<
typeof
get
ApiV10
LogoId
>>
,
TError
,
Awaited
<
ReturnType
<
typeof
getLogoId
>>
Awaited
<
ReturnType
<
typeof
get
ApiV10
LogoId
>>
>
,
'initialData'
>
,
request
?:
SecondParameter
<
typeof
useCustomClient
>
}
,
queryClient
?:
QueryClient
):
UseQueryResult
<
TData
,
TError
>
&
{
queryKey
:
DataTag
<
QueryKey
,
TData
,
TError
>
}
export
function
useGet
LogoId
<
TData
=
Awaited
<
ReturnType
<
typeof
get
LogoId
>>
,
TError
=
ErrorType
<
void
>>
(
id
:
string
,
options
?:
{
query
?:
Partial
<
UseQueryOptions
<
Awaited
<
ReturnType
<
typeof
getLogoId
>>
,
TError
,
TData
>>
,
request
?:
SecondParameter
<
typeof
useCustomClient
>
}
export
function
useGet
ApiV10LogoId
<
TData
=
Awaited
<
ReturnType
<
typeof
getApiV10
LogoId
>>
,
TError
=
ErrorType
<
void
>>
(
id
:
string
,
options
?:
{
query
?:
Partial
<
UseQueryOptions
<
Awaited
<
ReturnType
<
typeof
get
ApiV10
LogoId
>>
,
TError
,
TData
>>
,
request
?:
SecondParameter
<
typeof
useCustomClient
>
}
,
queryClient
?:
QueryClient
):
UseQueryResult
<
TData
,
TError
>
&
{
queryKey
:
DataTag
<
QueryKey
,
TData
,
TError
>
}
/**
* @summary Get logo by ID
*/
export
function
useGet
LogoId
<
TData
=
Awaited
<
ReturnType
<
typeof
get
LogoId
>>
,
TError
=
ErrorType
<
void
>>
(
id
:
string
,
options
?:
{
query
?:
Partial
<
UseQueryOptions
<
Awaited
<
ReturnType
<
typeof
getLogoId
>>
,
TError
,
TData
>>
,
request
?:
SecondParameter
<
typeof
useCustomClient
>
}
export
function
useGet
ApiV10LogoId
<
TData
=
Awaited
<
ReturnType
<
typeof
getApiV10
LogoId
>>
,
TError
=
ErrorType
<
void
>>
(
id
:
string
,
options
?:
{
query
?:
Partial
<
UseQueryOptions
<
Awaited
<
ReturnType
<
typeof
get
ApiV10
LogoId
>>
,
TError
,
TData
>>
,
request
?:
SecondParameter
<
typeof
useCustomClient
>
}
,
queryClient
?:
QueryClient
):
UseQueryResult
<
TData
,
TError
>
&
{
queryKey
:
DataTag
<
QueryKey
,
TData
,
TError
>
}
{
const
queryOptions
=
getGetLogoIdQueryOptions
(
id
,
options
)
const
queryOptions
=
getGet
ApiV10
LogoIdQueryOptions
(
id
,
options
)
const
query
=
useQuery
(
queryOptions
,
queryClient
)
as
UseQueryResult
<
TData
,
TError
>
&
{
queryKey
:
DataTag
<
QueryKey
,
TData
,
TError
>
};
...
...
@@ -256,12 +256,12 @@ export function useGetLogoId<TData = Awaited<ReturnType<typeof getLogoId>>, TErr
/**
* @summary Get logo by ID
*/
export
const
prefetchGet
LogoIdQuery
=
async
<
TData
=
Awaited
<
ReturnType
<
typeof
get
LogoId
>>
,
TError
=
ErrorType
<
void
>>
(
queryClient
:
QueryClient
,
id
:
string
,
options
?:
{
query
?:
Partial
<
UseQueryOptions
<
Awaited
<
ReturnType
<
typeof
getLogoId
>>
,
TError
,
TData
>>
,
request
?:
SecondParameter
<
typeof
useCustomClient
>
}
export
const
prefetchGet
ApiV10LogoIdQuery
=
async
<
TData
=
Awaited
<
ReturnType
<
typeof
getApiV10
LogoId
>>
,
TError
=
ErrorType
<
void
>>
(
queryClient
:
QueryClient
,
id
:
string
,
options
?:
{
query
?:
Partial
<
UseQueryOptions
<
Awaited
<
ReturnType
<
typeof
get
ApiV10
LogoId
>>
,
TError
,
TData
>>
,
request
?:
SecondParameter
<
typeof
useCustomClient
>
}
):
Promise
<
QueryClient
>
=>
{
const
queryOptions
=
getGetLogoIdQueryOptions
(
id
,
options
)
const
queryOptions
=
getGet
ApiV10
LogoIdQueryOptions
(
id
,
options
)
await
queryClient
.
prefetchQuery
(
queryOptions
);
...
...
@@ -274,47 +274,47 @@ export const prefetchGetLogoIdQuery = async <TData = Awaited<ReturnType<typeof g
* Update a single logo record by its ID
* @summary Update logo by ID
*/
export
type
putLogoIdResponse200
=
{
data
:
PutLogoId200
export
type
put
ApiV10
LogoIdResponse200
=
{
data
:
Put
ApiV10
LogoId200
status
:
200
}
export
type
putLogoIdResponse400
=
{
export
type
put
ApiV10
LogoIdResponse400
=
{
data
:
void
status
:
400
}
export
type
putLogoIdResponse404
=
{
export
type
put
ApiV10
LogoIdResponse404
=
{
data
:
void
status
:
404
}
export
type
putLogoIdResponse409
=
{
export
type
put
ApiV10
LogoIdResponse409
=
{
data
:
void
status
:
409
}
export
type
put
LogoIdResponseSuccess
=
(
put
LogoIdResponse200
)
&
{
export
type
put
ApiV10LogoIdResponseSuccess
=
(
putApiV10
LogoIdResponse200
)
&
{
headers
:
Headers
;
};
export
type
put
LogoIdResponseError
=
(
putLogoIdResponse400
|
putLogoIdResponse404
|
put
LogoIdResponse409
)
&
{
export
type
put
ApiV10LogoIdResponseError
=
(
putApiV10LogoIdResponse400
|
putApiV10LogoIdResponse404
|
putApiV10
LogoIdResponse409
)
&
{
headers
:
Headers
;
};
export
type
put
LogoIdResponse
=
(
putLogoIdResponseSuccess
|
put
LogoIdResponseError
)
export
type
put
ApiV10LogoIdResponse
=
(
putApiV10LogoIdResponseSuccess
|
putApiV10
LogoIdResponseError
)
export
const
getPutLogoIdUrl
=
(
id
:
string
,)
=>
{
export
const
getPut
ApiV10
LogoIdUrl
=
(
id
:
string
,)
=>
{
return
`/logo/
${
id
}
`
return
`/
api/v1.0/
logo/
${
id
}
`
}
export
const
putLogoId
=
async
(
id
:
string
,
logoUpdate
:
LogoUpdate
,
options
?:
RequestInit
):
Promise
<
putLogoIdResponse
>
=>
{
export
const
put
ApiV10
LogoId
=
async
(
id
:
string
,
logoUpdate
:
LogoUpdate
,
options
?:
RequestInit
):
Promise
<
put
ApiV10
LogoIdResponse
>
=>
{
return
useCustomClient
<
put
LogoIdResponse
>
(
getPut
LogoIdUrl
(
id
),
return
useCustomClient
<
put
ApiV10LogoIdResponse
>
(
getPutApiV10
LogoIdUrl
(
id
),
{
...
options
,
method
:
'PUT'
,
...
...
@@ -327,11 +327,11 @@ export const putLogoId = async (id: string,
export
const
getPutLogoIdMutationOptions
=
<
TError
=
ErrorType
<
void
>
,
TContext
=
unknown
>
(
options
?:
{
mutation
?:
UseMutationOptions
<
Awaited
<
ReturnType
<
typeof
putLogoId
>>
,
TError
,{
id
:
string
;
data
:
BodyType
<
LogoUpdate
>
},
TContext
>
,
request
?:
SecondParameter
<
typeof
useCustomClient
>
}
):
UseMutationOptions
<
Awaited
<
ReturnType
<
typeof
putLogoId
>>
,
TError
,{
id
:
string
;
data
:
BodyType
<
LogoUpdate
>
},
TContext
>
=>
{
export
const
getPut
ApiV10
LogoIdMutationOptions
=
<
TError
=
ErrorType
<
void
>
,
TContext
=
unknown
>
(
options
?:
{
mutation
?:
UseMutationOptions
<
Awaited
<
ReturnType
<
typeof
put
ApiV10
LogoId
>>
,
TError
,{
id
:
string
;
data
:
BodyType
<
LogoUpdate
>
},
TContext
>
,
request
?:
SecondParameter
<
typeof
useCustomClient
>
}
):
UseMutationOptions
<
Awaited
<
ReturnType
<
typeof
put
ApiV10
LogoId
>>
,
TError
,{
id
:
string
;
data
:
BodyType
<
LogoUpdate
>
},
TContext
>
=>
{
const
mutationKey
=
[
'putLogoId'
];
const
mutationKey
=
[
'put
ApiV10
LogoId'
];
const
{
mutation
:
mutationOptions
,
request
:
requestOptions
}
=
options
?
options
.
mutation
&&
'mutationKey'
in
options
.
mutation
&&
options
.
mutation
.
mutationKey
?
options
...
...
@@ -341,10 +341,10 @@ const {mutation: mutationOptions, request: requestOptions} = options ?
const
mutationFn
:
MutationFunction
<
Awaited
<
ReturnType
<
typeof
putLogoId
>>
,
{
id
:
string
;
data
:
BodyType
<
LogoUpdate
>
}
>
=
(
props
)
=>
{
const
mutationFn
:
MutationFunction
<
Awaited
<
ReturnType
<
typeof
put
ApiV10
LogoId
>>
,
{
id
:
string
;
data
:
BodyType
<
LogoUpdate
>
}
>
=
(
props
)
=>
{
const
{
id
,
data
}
=
props
??
{};
return
putLogoId
(
id
,
data
,
requestOptions
)
return
put
ApiV10
LogoId
(
id
,
data
,
requestOptions
)
}
...
...
@@ -352,23 +352,23 @@ const {mutation: mutationOptions, request: requestOptions} = options ?
return
{
mutationFn
,
...
mutationOptions
}}
export
type
Put
LogoIdMutationResult
=
NonNullable
<
Awaited
<
ReturnType
<
typeof
put
LogoId
>>>
export
type
PutLogoIdMutationBody
=
BodyType
<
LogoUpdate
>
export
type
PutLogoIdMutationError
=
ErrorType
<
void
>
export
type
Put
ApiV10LogoIdMutationResult
=
NonNullable
<
Awaited
<
ReturnType
<
typeof
putApiV10
LogoId
>>>
export
type
Put
ApiV10
LogoIdMutationBody
=
BodyType
<
LogoUpdate
>
export
type
Put
ApiV10
LogoIdMutationError
=
ErrorType
<
void
>
/**
* @summary Update logo by ID
*/
export
const
usePutLogoId
=
<
TError
=
ErrorType
<
void
>
,
TContext
=
unknown
>
(
options
?:
{
mutation
?:
UseMutationOptions
<
Awaited
<
ReturnType
<
typeof
putLogoId
>>
,
TError
,{
id
:
string
;
data
:
BodyType
<
LogoUpdate
>
},
TContext
>
,
request
?:
SecondParameter
<
typeof
useCustomClient
>
}
export
const
usePut
ApiV10
LogoId
=
<
TError
=
ErrorType
<
void
>
,
TContext
=
unknown
>
(
options
?:
{
mutation
?:
UseMutationOptions
<
Awaited
<
ReturnType
<
typeof
put
ApiV10
LogoId
>>
,
TError
,{
id
:
string
;
data
:
BodyType
<
LogoUpdate
>
},
TContext
>
,
request
?:
SecondParameter
<
typeof
useCustomClient
>
}
,
queryClient
?:
QueryClient
):
UseMutationResult
<
Awaited
<
ReturnType
<
typeof
putLogoId
>>
,
Awaited
<
ReturnType
<
typeof
put
ApiV10
LogoId
>>
,
TError
,
{
id
:
string
;
data
:
BodyType
<
LogoUpdate
>
},
TContext
>
=>
{
const
mutationOptions
=
getPutLogoIdMutationOptions
(
options
);
const
mutationOptions
=
getPut
ApiV10
LogoIdMutationOptions
(
options
);
return
useMutation
(
mutationOptions
,
queryClient
);
}
...
...
@@ -376,41 +376,41 @@ export const usePutLogoId = <TError = ErrorType<void>,
* Delete a single logo record by its ID
* @summary Delete logo by ID
*/
export
type
deleteLogoIdResponse200
=
{
data
:
DeleteLogoId200
export
type
delete
ApiV10
LogoIdResponse200
=
{
data
:
Delete
ApiV10
LogoId200
status
:
200
}
export
type
deleteLogoIdResponse404
=
{
export
type
delete
ApiV10
LogoIdResponse404
=
{
data
:
void
status
:
404
}
export
type
deleteLogoIdResponse409
=
{
export
type
delete
ApiV10
LogoIdResponse409
=
{
data
:
void
status
:
409
}
export
type
delete
LogoIdResponseSuccess
=
(
delete
LogoIdResponse200
)
&
{
export
type
delete
ApiV10LogoIdResponseSuccess
=
(
deleteApiV10
LogoIdResponse200
)
&
{
headers
:
Headers
;
};
export
type
delete
LogoIdResponseError
=
(
deleteLogoIdResponse404
|
delete
LogoIdResponse409
)
&
{
export
type
delete
ApiV10LogoIdResponseError
=
(
deleteApiV10LogoIdResponse404
|
deleteApiV10
LogoIdResponse409
)
&
{
headers
:
Headers
;
};
export
type
delete
LogoIdResponse
=
(
deleteLogoIdResponseSuccess
|
delete
LogoIdResponseError
)
export
type
delete
ApiV10LogoIdResponse
=
(
deleteApiV10LogoIdResponseSuccess
|
deleteApiV10
LogoIdResponseError
)
export
const
getDeleteLogoIdUrl
=
(
id
:
string
,)
=>
{
export
const
getDelete
ApiV10
LogoIdUrl
=
(
id
:
string
,)
=>
{
return
`/logo/
${
id
}
`
return
`/
api/v1.0/
logo/
${
id
}
`
}
export
const
delete
LogoId
=
async
(
id
:
string
,
options
?:
RequestInit
):
Promise
<
delete
LogoIdResponse
>
=>
{
export
const
delete
ApiV10LogoId
=
async
(
id
:
string
,
options
?:
RequestInit
):
Promise
<
deleteApiV10
LogoIdResponse
>
=>
{
return
useCustomClient
<
delete
LogoIdResponse
>
(
getDelete
LogoIdUrl
(
id
),
return
useCustomClient
<
delete
ApiV10LogoIdResponse
>
(
getDeleteApiV10
LogoIdUrl
(
id
),
{
...
options
,
method
:
'DELETE'
...
...
@@ -422,11 +422,11 @@ export const deleteLogoId = async (id: string, options?: RequestInit): Promise<d
export
const
getDeleteLogoIdMutationOptions
=
<
TError
=
ErrorType
<
void
>
,
TContext
=
unknown
>
(
options
?:
{
mutation
?:
UseMutationOptions
<
Awaited
<
ReturnType
<
typeof
deleteLogoId
>>
,
TError
,{
id
:
string
},
TContext
>
,
request
?:
SecondParameter
<
typeof
useCustomClient
>
}
):
UseMutationOptions
<
Awaited
<
ReturnType
<
typeof
deleteLogoId
>>
,
TError
,{
id
:
string
},
TContext
>
=>
{
export
const
getDelete
ApiV10
LogoIdMutationOptions
=
<
TError
=
ErrorType
<
void
>
,
TContext
=
unknown
>
(
options
?:
{
mutation
?:
UseMutationOptions
<
Awaited
<
ReturnType
<
typeof
delete
ApiV10
LogoId
>>
,
TError
,{
id
:
string
},
TContext
>
,
request
?:
SecondParameter
<
typeof
useCustomClient
>
}
):
UseMutationOptions
<
Awaited
<
ReturnType
<
typeof
delete
ApiV10
LogoId
>>
,
TError
,{
id
:
string
},
TContext
>
=>
{
const
mutationKey
=
[
'deleteLogoId'
];
const
mutationKey
=
[
'delete
ApiV10
LogoId'
];
const
{
mutation
:
mutationOptions
,
request
:
requestOptions
}
=
options
?
options
.
mutation
&&
'mutationKey'
in
options
.
mutation
&&
options
.
mutation
.
mutationKey
?
options
...
...
@@ -436,10 +436,10 @@ const {mutation: mutationOptions, request: requestOptions} = options ?
const
mutationFn
:
MutationFunction
<
Awaited
<
ReturnType
<
typeof
deleteLogoId
>>
,
{
id
:
string
}
>
=
(
props
)
=>
{
const
mutationFn
:
MutationFunction
<
Awaited
<
ReturnType
<
typeof
delete
ApiV10
LogoId
>>
,
{
id
:
string
}
>
=
(
props
)
=>
{
const
{
id
}
=
props
??
{};
return
deleteLogoId
(
id
,
requestOptions
)
return
delete
ApiV10
LogoId
(
id
,
requestOptions
)
}
...
...
@@ -447,23 +447,23 @@ const {mutation: mutationOptions, request: requestOptions} = options ?
return
{
mutationFn
,
...
mutationOptions
}}
export
type
Delete
LogoIdMutationResult
=
NonNullable
<
Awaited
<
ReturnType
<
typeof
delete
LogoId
>>>
export
type
Delete
ApiV10LogoIdMutationResult
=
NonNullable
<
Awaited
<
ReturnType
<
typeof
deleteApiV10
LogoId
>>>
export
type
DeleteLogoIdMutationError
=
ErrorType
<
void
>
export
type
Delete
ApiV10
LogoIdMutationError
=
ErrorType
<
void
>
/**
* @summary Delete logo by ID
*/
export
const
useDeleteLogoId
=
<
TError
=
ErrorType
<
void
>
,
TContext
=
unknown
>
(
options
?:
{
mutation
?:
UseMutationOptions
<
Awaited
<
ReturnType
<
typeof
deleteLogoId
>>
,
TError
,{
id
:
string
},
TContext
>
,
request
?:
SecondParameter
<
typeof
useCustomClient
>
}
export
const
useDelete
ApiV10
LogoId
=
<
TError
=
ErrorType
<
void
>
,
TContext
=
unknown
>
(
options
?:
{
mutation
?:
UseMutationOptions
<
Awaited
<
ReturnType
<
typeof
delete
ApiV10
LogoId
>>
,
TError
,{
id
:
string
},
TContext
>
,
request
?:
SecondParameter
<
typeof
useCustomClient
>
}
,
queryClient
?:
QueryClient
):
UseMutationResult
<
Awaited
<
ReturnType
<
typeof
deleteLogoId
>>
,
Awaited
<
ReturnType
<
typeof
delete
ApiV10
LogoId
>>
,
TError
,
{
id
:
string
},
TContext
>
=>
{
const
mutationOptions
=
getDeleteLogoIdMutationOptions
(
options
);
const
mutationOptions
=
getDelete
ApiV10
LogoIdMutationOptions
(
options
);
return
useMutation
(
mutationOptions
,
queryClient
);
}
...
...
@@ -471,19 +471,19 @@ export const useDeleteLogoId = <TError = ErrorType<void>,
* Retrieve a list of logos with pagination, filtering and sorting
* @summary Get all logos
*/
export
type
getLogoResponse200
=
{
export
type
get
ApiV10
LogoResponse200
=
{
data
:
ResponseGetAllData
status
:
200
}
export
type
get
LogoResponseSuccess
=
(
get
LogoResponse200
)
&
{
export
type
get
ApiV10LogoResponseSuccess
=
(
getApiV10
LogoResponse200
)
&
{
headers
:
Headers
;
};
;
export
type
get
LogoResponse
=
(
get
LogoResponseSuccess
)
export
type
get
ApiV10LogoResponse
=
(
getApiV10
LogoResponseSuccess
)
export
const
getGet
LogoUrl
=
(
params
?:
Get
LogoParams
,)
=>
{
export
const
getGet
ApiV10LogoUrl
=
(
params
?:
GetApiV10
LogoParams
,)
=>
{
const
normalizedParams
=
new
URLSearchParams
();
Object
.
entries
(
params
||
{}).
forEach
(([
key
,
value
])
=>
{
...
...
@@ -495,12 +495,12 @@ export const getGetLogoUrl = (params?: GetLogoParams,) => {
const
stringifiedParams
=
normalizedParams
.
toString
();
return
stringifiedParams
.
length
>
0
?
`/
logo?
${
stringifiedParams
}
`
:
`
/logo`
return
stringifiedParams
.
length
>
0
?
`/
api/v1.0/logo?
${
stringifiedParams
}
`
:
`/api/v1.0
/logo`
}
export
const
get
Logo
=
async
(
params
?:
GetLogoParams
,
options
?:
RequestInit
):
Promise
<
get
LogoResponse
>
=>
{
export
const
get
ApiV10Logo
=
async
(
params
?:
GetApiV10LogoParams
,
options
?:
RequestInit
):
Promise
<
getApiV10
LogoResponse
>
=>
{
return
useCustomClient
<
get
LogoResponse
>
(
getGet
LogoUrl
(
params
),
return
useCustomClient
<
get
ApiV10LogoResponse
>
(
getGetApiV10
LogoUrl
(
params
),
{
...
options
,
method
:
'GET'
...
...
@@ -513,75 +513,75 @@ export const getLogo = async (params?: GetLogoParams, options?: RequestInit): Pr
export
const
getGet
LogoInfiniteQueryKey
=
(
params
?:
Get
LogoParams
,)
=>
{
export
const
getGet
ApiV10LogoInfiniteQueryKey
=
(
params
?:
GetApiV10
LogoParams
,)
=>
{
return
[
'infinite'
,
`/logo`
,
...(
params
?
[
params
]:
[])
'infinite'
,
`/
api/v1.0/
logo`
,
...(
params
?
[
params
]:
[])
]
as
const
;
}
export
const
getGet
LogoQueryKey
=
(
params
?:
Get
LogoParams
,)
=>
{
export
const
getGet
ApiV10LogoQueryKey
=
(
params
?:
GetApiV10
LogoParams
,)
=>
{
return
[
`/logo`
,
...(
params
?
[
params
]:
[])
`/
api/v1.0/
logo`
,
...(
params
?
[
params
]:
[])
]
as
const
;
}
export
const
getGet
LogoInfiniteQueryOptions
=
<
TData
=
InfiniteData
<
Awaited
<
ReturnType
<
typeof
getLogo
>>>
,
TError
=
ErrorType
<
unknown
>>
(
params
?:
GetLogoParams
,
options
?:
{
query
?:
Partial
<
UseInfiniteQueryOptions
<
Awaited
<
ReturnType
<
typeof
get
Logo
>>
,
TError
,
TData
>>
,
request
?:
SecondParameter
<
typeof
useCustomClient
>
}
export
const
getGet
ApiV10LogoInfiniteQueryOptions
=
<
TData
=
InfiniteData
<
Awaited
<
ReturnType
<
typeof
getApiV10Logo
>>>
,
TError
=
ErrorType
<
unknown
>>
(
params
?:
GetApiV10LogoParams
,
options
?:
{
query
?:
Partial
<
UseInfiniteQueryOptions
<
Awaited
<
ReturnType
<
typeof
getApiV10
Logo
>>
,
TError
,
TData
>>
,
request
?:
SecondParameter
<
typeof
useCustomClient
>
}
)
=>
{
const
{
query
:
queryOptions
,
request
:
requestOptions
}
=
options
??
{};
const
queryKey
=
queryOptions
?.
queryKey
??
getGetLogoInfiniteQueryKey
(
params
);
const
queryKey
=
queryOptions
?.
queryKey
??
getGet
ApiV10
LogoInfiniteQueryKey
(
params
);
const
queryFn
:
QueryFunction
<
Awaited
<
ReturnType
<
typeof
get
Logo
>>>
=
({
signal
})
=>
get
Logo
(
params
,
{
signal
,
...
requestOptions
});
const
queryFn
:
QueryFunction
<
Awaited
<
ReturnType
<
typeof
get
ApiV10Logo
>>>
=
({
signal
})
=>
getApiV10
Logo
(
params
,
{
signal
,
...
requestOptions
});
return
{
queryKey
,
queryFn
,
retry
:
3
,
retryDelay
:
1000
,
...
queryOptions
}
as
UseInfiniteQueryOptions
<
Awaited
<
ReturnType
<
typeof
getLogo
>>
,
TError
,
TData
>
&
{
queryKey
:
DataTag
<
QueryKey
,
TData
,
TError
>
}
return
{
queryKey
,
queryFn
,
retry
:
3
,
retryDelay
:
1000
,
...
queryOptions
}
as
UseInfiniteQueryOptions
<
Awaited
<
ReturnType
<
typeof
get
ApiV10
Logo
>>
,
TError
,
TData
>
&
{
queryKey
:
DataTag
<
QueryKey
,
TData
,
TError
>
}
}
export
type
Get
LogoInfiniteQueryResult
=
NonNullable
<
Awaited
<
ReturnType
<
typeof
get
Logo
>>>
export
type
GetLogoInfiniteQueryError
=
ErrorType
<
unknown
>
export
type
Get
ApiV10LogoInfiniteQueryResult
=
NonNullable
<
Awaited
<
ReturnType
<
typeof
getApiV10
Logo
>>>
export
type
Get
ApiV10
LogoInfiniteQueryError
=
ErrorType
<
unknown
>
export
function
useGet
LogoInfinite
<
TData
=
InfiniteData
<
Awaited
<
ReturnType
<
typeof
get
Logo
>>>
,
TError
=
ErrorType
<
unknown
>>
(
params
:
undefined
|
Get
LogoParams
,
options
:
{
query
:
Partial
<
UseInfiniteQueryOptions
<
Awaited
<
ReturnType
<
typeof
get
Logo
>>
,
TError
,
TData
>>
&
Pick
<
export
function
useGet
ApiV10LogoInfinite
<
TData
=
InfiniteData
<
Awaited
<
ReturnType
<
typeof
getApiV10
Logo
>>>
,
TError
=
ErrorType
<
unknown
>>
(
params
:
undefined
|
Get
ApiV10LogoParams
,
options
:
{
query
:
Partial
<
UseInfiniteQueryOptions
<
Awaited
<
ReturnType
<
typeof
getApiV10
Logo
>>
,
TError
,
TData
>>
&
Pick
<
DefinedInitialDataOptions
<
Awaited
<
ReturnType
<
typeof
getLogo
>>
,
Awaited
<
ReturnType
<
typeof
get
ApiV10
Logo
>>
,
TError
,
Awaited
<
ReturnType
<
typeof
getLogo
>>
Awaited
<
ReturnType
<
typeof
get
ApiV10
Logo
>>
>
,
'initialData'
>
,
request
?:
SecondParameter
<
typeof
useCustomClient
>
}
,
queryClient
?:
QueryClient
):
DefinedUseInfiniteQueryResult
<
TData
,
TError
>
&
{
queryKey
:
DataTag
<
QueryKey
,
TData
,
TError
>
}
export
function
useGet
LogoInfinite
<
TData
=
InfiniteData
<
Awaited
<
ReturnType
<
typeof
get
Logo
>>>
,
TError
=
ErrorType
<
unknown
>>
(
params
?:
Get
LogoParams
,
options
?:
{
query
?:
Partial
<
UseInfiniteQueryOptions
<
Awaited
<
ReturnType
<
typeof
get
Logo
>>
,
TError
,
TData
>>
&
Pick
<
export
function
useGet
ApiV10LogoInfinite
<
TData
=
InfiniteData
<
Awaited
<
ReturnType
<
typeof
getApiV10
Logo
>>>
,
TError
=
ErrorType
<
unknown
>>
(
params
?:
Get
ApiV10LogoParams
,
options
?:
{
query
?:
Partial
<
UseInfiniteQueryOptions
<
Awaited
<
ReturnType
<
typeof
getApiV10
Logo
>>
,
TError
,
TData
>>
&
Pick
<
UndefinedInitialDataOptions
<
Awaited
<
ReturnType
<
typeof
getLogo
>>
,
Awaited
<
ReturnType
<
typeof
get
ApiV10
Logo
>>
,
TError
,
Awaited
<
ReturnType
<
typeof
getLogo
>>
Awaited
<
ReturnType
<
typeof
get
ApiV10
Logo
>>
>
,
'initialData'
>
,
request
?:
SecondParameter
<
typeof
useCustomClient
>
}
,
queryClient
?:
QueryClient
):
UseInfiniteQueryResult
<
TData
,
TError
>
&
{
queryKey
:
DataTag
<
QueryKey
,
TData
,
TError
>
}
export
function
useGet
LogoInfinite
<
TData
=
InfiniteData
<
Awaited
<
ReturnType
<
typeof
get
Logo
>>>
,
TError
=
ErrorType
<
unknown
>>
(
params
?:
Get
LogoParams
,
options
?:
{
query
?:
Partial
<
UseInfiniteQueryOptions
<
Awaited
<
ReturnType
<
typeof
get
Logo
>>
,
TError
,
TData
>>
,
request
?:
SecondParameter
<
typeof
useCustomClient
>
}
export
function
useGet
ApiV10LogoInfinite
<
TData
=
InfiniteData
<
Awaited
<
ReturnType
<
typeof
getApiV10
Logo
>>>
,
TError
=
ErrorType
<
unknown
>>
(
params
?:
Get
ApiV10LogoParams
,
options
?:
{
query
?:
Partial
<
UseInfiniteQueryOptions
<
Awaited
<
ReturnType
<
typeof
getApiV10
Logo
>>
,
TError
,
TData
>>
,
request
?:
SecondParameter
<
typeof
useCustomClient
>
}
,
queryClient
?:
QueryClient
):
UseInfiniteQueryResult
<
TData
,
TError
>
&
{
queryKey
:
DataTag
<
QueryKey
,
TData
,
TError
>
}
/**
* @summary Get all logos
*/
export
function
useGet
LogoInfinite
<
TData
=
InfiniteData
<
Awaited
<
ReturnType
<
typeof
get
Logo
>>>
,
TError
=
ErrorType
<
unknown
>>
(
params
?:
Get
LogoParams
,
options
?:
{
query
?:
Partial
<
UseInfiniteQueryOptions
<
Awaited
<
ReturnType
<
typeof
get
Logo
>>
,
TError
,
TData
>>
,
request
?:
SecondParameter
<
typeof
useCustomClient
>
}
export
function
useGet
ApiV10LogoInfinite
<
TData
=
InfiniteData
<
Awaited
<
ReturnType
<
typeof
getApiV10
Logo
>>>
,
TError
=
ErrorType
<
unknown
>>
(
params
?:
Get
ApiV10LogoParams
,
options
?:
{
query
?:
Partial
<
UseInfiniteQueryOptions
<
Awaited
<
ReturnType
<
typeof
getApiV10
Logo
>>
,
TError
,
TData
>>
,
request
?:
SecondParameter
<
typeof
useCustomClient
>
}
,
queryClient
?:
QueryClient
):
UseInfiniteQueryResult
<
TData
,
TError
>
&
{
queryKey
:
DataTag
<
QueryKey
,
TData
,
TError
>
}
{
const
queryOptions
=
getGetLogoInfiniteQueryOptions
(
params
,
options
)
const
queryOptions
=
getGet
ApiV10
LogoInfiniteQueryOptions
(
params
,
options
)
const
query
=
useInfiniteQuery
(
queryOptions
,
queryClient
)
as
UseInfiniteQueryResult
<
TData
,
TError
>
&
{
queryKey
:
DataTag
<
QueryKey
,
TData
,
TError
>
};
...
...
@@ -593,12 +593,12 @@ export function useGetLogoInfinite<TData = InfiniteData<Awaited<ReturnType<typeo
/**
* @summary Get all logos
*/
export
const
prefetchGet
LogoInfiniteQuery
=
async
<
TData
=
Awaited
<
ReturnType
<
typeof
get
Logo
>>
,
TError
=
ErrorType
<
unknown
>>
(
queryClient
:
QueryClient
,
params
?:
Get
LogoParams
,
options
?:
{
query
?:
Partial
<
UseInfiniteQueryOptions
<
Awaited
<
ReturnType
<
typeof
get
Logo
>>
,
TError
,
TData
>>
,
request
?:
SecondParameter
<
typeof
useCustomClient
>
}
export
const
prefetchGet
ApiV10LogoInfiniteQuery
=
async
<
TData
=
Awaited
<
ReturnType
<
typeof
getApiV10
Logo
>>
,
TError
=
ErrorType
<
unknown
>>
(
queryClient
:
QueryClient
,
params
?:
Get
ApiV10LogoParams
,
options
?:
{
query
?:
Partial
<
UseInfiniteQueryOptions
<
Awaited
<
ReturnType
<
typeof
getApiV10
Logo
>>
,
TError
,
TData
>>
,
request
?:
SecondParameter
<
typeof
useCustomClient
>
}
):
Promise
<
QueryClient
>
=>
{
const
queryOptions
=
getGetLogoInfiniteQueryOptions
(
params
,
options
)
const
queryOptions
=
getGet
ApiV10
LogoInfiniteQueryOptions
(
params
,
options
)
await
queryClient
.
prefetchInfiniteQuery
(
queryOptions
);
...
...
@@ -607,62 +607,62 @@ export const prefetchGetLogoInfiniteQuery = async <TData = Awaited<ReturnType<ty
export
const
getGet
LogoQueryOptions
=
<
TData
=
Awaited
<
ReturnType
<
typeof
getLogo
>>
,
TError
=
ErrorType
<
unknown
>>
(
params
?:
GetLogoParams
,
options
?:
{
query
?:
Partial
<
UseQueryOptions
<
Awaited
<
ReturnType
<
typeof
get
Logo
>>
,
TError
,
TData
>>
,
request
?:
SecondParameter
<
typeof
useCustomClient
>
}
export
const
getGet
ApiV10LogoQueryOptions
=
<
TData
=
Awaited
<
ReturnType
<
typeof
getApiV10Logo
>>
,
TError
=
ErrorType
<
unknown
>>
(
params
?:
GetApiV10LogoParams
,
options
?:
{
query
?:
Partial
<
UseQueryOptions
<
Awaited
<
ReturnType
<
typeof
getApiV10
Logo
>>
,
TError
,
TData
>>
,
request
?:
SecondParameter
<
typeof
useCustomClient
>
}
)
=>
{
const
{
query
:
queryOptions
,
request
:
requestOptions
}
=
options
??
{};
const
queryKey
=
queryOptions
?.
queryKey
??
getGetLogoQueryKey
(
params
);
const
queryKey
=
queryOptions
?.
queryKey
??
getGet
ApiV10
LogoQueryKey
(
params
);
const
queryFn
:
QueryFunction
<
Awaited
<
ReturnType
<
typeof
get
Logo
>>>
=
({
signal
})
=>
get
Logo
(
params
,
{
signal
,
...
requestOptions
});
const
queryFn
:
QueryFunction
<
Awaited
<
ReturnType
<
typeof
get
ApiV10Logo
>>>
=
({
signal
})
=>
getApiV10
Logo
(
params
,
{
signal
,
...
requestOptions
});
return
{
queryKey
,
queryFn
,
retry
:
3
,
retryDelay
:
1000
,
...
queryOptions
}
as
UseQueryOptions
<
Awaited
<
ReturnType
<
typeof
getLogo
>>
,
TError
,
TData
>
&
{
queryKey
:
DataTag
<
QueryKey
,
TData
,
TError
>
}
return
{
queryKey
,
queryFn
,
retry
:
3
,
retryDelay
:
1000
,
...
queryOptions
}
as
UseQueryOptions
<
Awaited
<
ReturnType
<
typeof
get
ApiV10
Logo
>>
,
TError
,
TData
>
&
{
queryKey
:
DataTag
<
QueryKey
,
TData
,
TError
>
}
}
export
type
Get
LogoQueryResult
=
NonNullable
<
Awaited
<
ReturnType
<
typeof
get
Logo
>>>
export
type
GetLogoQueryError
=
ErrorType
<
unknown
>
export
type
Get
ApiV10LogoQueryResult
=
NonNullable
<
Awaited
<
ReturnType
<
typeof
getApiV10
Logo
>>>
export
type
Get
ApiV10
LogoQueryError
=
ErrorType
<
unknown
>
export
function
useGet
Logo
<
TData
=
Awaited
<
ReturnType
<
typeof
get
Logo
>>
,
TError
=
ErrorType
<
unknown
>>
(
params
:
undefined
|
Get
LogoParams
,
options
:
{
query
:
Partial
<
UseQueryOptions
<
Awaited
<
ReturnType
<
typeof
get
Logo
>>
,
TError
,
TData
>>
&
Pick
<
export
function
useGet
ApiV10Logo
<
TData
=
Awaited
<
ReturnType
<
typeof
getApiV10
Logo
>>
,
TError
=
ErrorType
<
unknown
>>
(
params
:
undefined
|
Get
ApiV10LogoParams
,
options
:
{
query
:
Partial
<
UseQueryOptions
<
Awaited
<
ReturnType
<
typeof
getApiV10
Logo
>>
,
TError
,
TData
>>
&
Pick
<
DefinedInitialDataOptions
<
Awaited
<
ReturnType
<
typeof
getLogo
>>
,
Awaited
<
ReturnType
<
typeof
get
ApiV10
Logo
>>
,
TError
,
Awaited
<
ReturnType
<
typeof
getLogo
>>
Awaited
<
ReturnType
<
typeof
get
ApiV10
Logo
>>
>
,
'initialData'
>
,
request
?:
SecondParameter
<
typeof
useCustomClient
>
}
,
queryClient
?:
QueryClient
):
DefinedUseQueryResult
<
TData
,
TError
>
&
{
queryKey
:
DataTag
<
QueryKey
,
TData
,
TError
>
}
export
function
useGet
Logo
<
TData
=
Awaited
<
ReturnType
<
typeof
get
Logo
>>
,
TError
=
ErrorType
<
unknown
>>
(
params
?:
Get
LogoParams
,
options
?:
{
query
?:
Partial
<
UseQueryOptions
<
Awaited
<
ReturnType
<
typeof
get
Logo
>>
,
TError
,
TData
>>
&
Pick
<
export
function
useGet
ApiV10Logo
<
TData
=
Awaited
<
ReturnType
<
typeof
getApiV10
Logo
>>
,
TError
=
ErrorType
<
unknown
>>
(
params
?:
Get
ApiV10LogoParams
,
options
?:
{
query
?:
Partial
<
UseQueryOptions
<
Awaited
<
ReturnType
<
typeof
getApiV10
Logo
>>
,
TError
,
TData
>>
&
Pick
<
UndefinedInitialDataOptions
<
Awaited
<
ReturnType
<
typeof
getLogo
>>
,
Awaited
<
ReturnType
<
typeof
get
ApiV10
Logo
>>
,
TError
,
Awaited
<
ReturnType
<
typeof
getLogo
>>
Awaited
<
ReturnType
<
typeof
get
ApiV10
Logo
>>
>
,
'initialData'
>
,
request
?:
SecondParameter
<
typeof
useCustomClient
>
}
,
queryClient
?:
QueryClient
):
UseQueryResult
<
TData
,
TError
>
&
{
queryKey
:
DataTag
<
QueryKey
,
TData
,
TError
>
}
export
function
useGet
Logo
<
TData
=
Awaited
<
ReturnType
<
typeof
get
Logo
>>
,
TError
=
ErrorType
<
unknown
>>
(
params
?:
Get
LogoParams
,
options
?:
{
query
?:
Partial
<
UseQueryOptions
<
Awaited
<
ReturnType
<
typeof
get
Logo
>>
,
TError
,
TData
>>
,
request
?:
SecondParameter
<
typeof
useCustomClient
>
}
export
function
useGet
ApiV10Logo
<
TData
=
Awaited
<
ReturnType
<
typeof
getApiV10
Logo
>>
,
TError
=
ErrorType
<
unknown
>>
(
params
?:
Get
ApiV10LogoParams
,
options
?:
{
query
?:
Partial
<
UseQueryOptions
<
Awaited
<
ReturnType
<
typeof
getApiV10
Logo
>>
,
TError
,
TData
>>
,
request
?:
SecondParameter
<
typeof
useCustomClient
>
}
,
queryClient
?:
QueryClient
):
UseQueryResult
<
TData
,
TError
>
&
{
queryKey
:
DataTag
<
QueryKey
,
TData
,
TError
>
}
/**
* @summary Get all logos
*/
export
function
useGet
Logo
<
TData
=
Awaited
<
ReturnType
<
typeof
get
Logo
>>
,
TError
=
ErrorType
<
unknown
>>
(
params
?:
Get
LogoParams
,
options
?:
{
query
?:
Partial
<
UseQueryOptions
<
Awaited
<
ReturnType
<
typeof
get
Logo
>>
,
TError
,
TData
>>
,
request
?:
SecondParameter
<
typeof
useCustomClient
>
}
export
function
useGet
ApiV10Logo
<
TData
=
Awaited
<
ReturnType
<
typeof
getApiV10
Logo
>>
,
TError
=
ErrorType
<
unknown
>>
(
params
?:
Get
ApiV10LogoParams
,
options
?:
{
query
?:
Partial
<
UseQueryOptions
<
Awaited
<
ReturnType
<
typeof
getApiV10
Logo
>>
,
TError
,
TData
>>
,
request
?:
SecondParameter
<
typeof
useCustomClient
>
}
,
queryClient
?:
QueryClient
):
UseQueryResult
<
TData
,
TError
>
&
{
queryKey
:
DataTag
<
QueryKey
,
TData
,
TError
>
}
{
const
queryOptions
=
getGetLogoQueryOptions
(
params
,
options
)
const
queryOptions
=
getGet
ApiV10
LogoQueryOptions
(
params
,
options
)
const
query
=
useQuery
(
queryOptions
,
queryClient
)
as
UseQueryResult
<
TData
,
TError
>
&
{
queryKey
:
DataTag
<
QueryKey
,
TData
,
TError
>
};
...
...
@@ -674,12 +674,12 @@ export function useGetLogo<TData = Awaited<ReturnType<typeof getLogo>>, TError =
/**
* @summary Get all logos
*/
export
const
prefetchGet
LogoQuery
=
async
<
TData
=
Awaited
<
ReturnType
<
typeof
get
Logo
>>
,
TError
=
ErrorType
<
unknown
>>
(
queryClient
:
QueryClient
,
params
?:
Get
LogoParams
,
options
?:
{
query
?:
Partial
<
UseQueryOptions
<
Awaited
<
ReturnType
<
typeof
get
Logo
>>
,
TError
,
TData
>>
,
request
?:
SecondParameter
<
typeof
useCustomClient
>
}
export
const
prefetchGet
ApiV10LogoQuery
=
async
<
TData
=
Awaited
<
ReturnType
<
typeof
getApiV10
Logo
>>
,
TError
=
ErrorType
<
unknown
>>
(
queryClient
:
QueryClient
,
params
?:
Get
ApiV10LogoParams
,
options
?:
{
query
?:
Partial
<
UseQueryOptions
<
Awaited
<
ReturnType
<
typeof
getApiV10
Logo
>>
,
TError
,
TData
>>
,
request
?:
SecondParameter
<
typeof
useCustomClient
>
}
):
Promise
<
QueryClient
>
=>
{
const
queryOptions
=
getGetLogoQueryOptions
(
params
,
options
)
const
queryOptions
=
getGet
ApiV10
LogoQueryOptions
(
params
,
options
)
await
queryClient
.
prefetchQuery
(
queryOptions
);
...
...
@@ -692,46 +692,46 @@ export const prefetchGetLogoQuery = async <TData = Awaited<ReturnType<typeof get
* Create a new logo record
* @summary Create a logo
*/
export
type
postLogoResponse200
=
{
data
:
PostLogo200
export
type
post
ApiV10
LogoResponse200
=
{
data
:
Post
ApiV10
Logo200
status
:
200
}
export
type
postLogoResponse400
=
{
export
type
post
ApiV10
LogoResponse400
=
{
data
:
void
status
:
400
}
export
type
postLogoResponse404
=
{
export
type
post
ApiV10
LogoResponse404
=
{
data
:
void
status
:
404
}
export
type
postLogoResponse409
=
{
export
type
post
ApiV10
LogoResponse409
=
{
data
:
void
status
:
409
}
export
type
post
LogoResponseSuccess
=
(
post
LogoResponse200
)
&
{
export
type
post
ApiV10LogoResponseSuccess
=
(
postApiV10
LogoResponse200
)
&
{
headers
:
Headers
;
};
export
type
post
LogoResponseError
=
(
postLogoResponse400
|
postLogoResponse404
|
post
LogoResponse409
)
&
{
export
type
post
ApiV10LogoResponseError
=
(
postApiV10LogoResponse400
|
postApiV10LogoResponse404
|
postApiV10
LogoResponse409
)
&
{
headers
:
Headers
;
};
export
type
post
LogoResponse
=
(
postLogoResponseSuccess
|
post
LogoResponseError
)
export
type
post
ApiV10LogoResponse
=
(
postApiV10LogoResponseSuccess
|
postApiV10
LogoResponseError
)
export
const
getPostLogoUrl
=
()
=>
{
export
const
getPost
ApiV10
LogoUrl
=
()
=>
{
return
`/logo`
return
`/
api/v1.0/
logo`
}
export
const
post
Logo
=
async
(
logoCreate
:
LogoCreate
,
options
?:
RequestInit
):
Promise
<
post
LogoResponse
>
=>
{
export
const
post
ApiV10Logo
=
async
(
logoCreate
:
LogoCreate
,
options
?:
RequestInit
):
Promise
<
postApiV10
LogoResponse
>
=>
{
return
useCustomClient
<
post
LogoResponse
>
(
getPost
LogoUrl
(),
return
useCustomClient
<
post
ApiV10LogoResponse
>
(
getPostApiV10
LogoUrl
(),
{
...
options
,
method
:
'POST'
,
...
...
@@ -744,11 +744,11 @@ export const postLogo = async (logoCreate: LogoCreate, options?: RequestInit): P
export
const
getPostLogoMutationOptions
=
<
TError
=
ErrorType
<
void
>
,
TContext
=
unknown
>
(
options
?:
{
mutation
?:
UseMutationOptions
<
Awaited
<
ReturnType
<
typeof
postLogo
>>
,
TError
,{
data
:
BodyType
<
LogoCreate
>
},
TContext
>
,
request
?:
SecondParameter
<
typeof
useCustomClient
>
}
):
UseMutationOptions
<
Awaited
<
ReturnType
<
typeof
postLogo
>>
,
TError
,{
data
:
BodyType
<
LogoCreate
>
},
TContext
>
=>
{
export
const
getPost
ApiV10
LogoMutationOptions
=
<
TError
=
ErrorType
<
void
>
,
TContext
=
unknown
>
(
options
?:
{
mutation
?:
UseMutationOptions
<
Awaited
<
ReturnType
<
typeof
post
ApiV10
Logo
>>
,
TError
,{
data
:
BodyType
<
LogoCreate
>
},
TContext
>
,
request
?:
SecondParameter
<
typeof
useCustomClient
>
}
):
UseMutationOptions
<
Awaited
<
ReturnType
<
typeof
post
ApiV10
Logo
>>
,
TError
,{
data
:
BodyType
<
LogoCreate
>
},
TContext
>
=>
{
const
mutationKey
=
[
'postLogo'
];
const
mutationKey
=
[
'post
ApiV10
Logo'
];
const
{
mutation
:
mutationOptions
,
request
:
requestOptions
}
=
options
?
options
.
mutation
&&
'mutationKey'
in
options
.
mutation
&&
options
.
mutation
.
mutationKey
?
options
...
...
@@ -758,10 +758,10 @@ const {mutation: mutationOptions, request: requestOptions} = options ?
const
mutationFn
:
MutationFunction
<
Awaited
<
ReturnType
<
typeof
postLogo
>>
,
{
data
:
BodyType
<
LogoCreate
>
}
>
=
(
props
)
=>
{
const
mutationFn
:
MutationFunction
<
Awaited
<
ReturnType
<
typeof
post
ApiV10
Logo
>>
,
{
data
:
BodyType
<
LogoCreate
>
}
>
=
(
props
)
=>
{
const
{
data
}
=
props
??
{};
return
postLogo
(
data
,
requestOptions
)
return
post
ApiV10
Logo
(
data
,
requestOptions
)
}
...
...
@@ -769,23 +769,23 @@ const {mutation: mutationOptions, request: requestOptions} = options ?
return
{
mutationFn
,
...
mutationOptions
}}
export
type
Post
LogoMutationResult
=
NonNullable
<
Awaited
<
ReturnType
<
typeof
post
Logo
>>>
export
type
PostLogoMutationBody
=
BodyType
<
LogoCreate
>
export
type
PostLogoMutationError
=
ErrorType
<
void
>
export
type
Post
ApiV10LogoMutationResult
=
NonNullable
<
Awaited
<
ReturnType
<
typeof
postApiV10
Logo
>>>
export
type
Post
ApiV10
LogoMutationBody
=
BodyType
<
LogoCreate
>
export
type
Post
ApiV10
LogoMutationError
=
ErrorType
<
void
>
/**
* @summary Create a logo
*/
export
const
usePostLogo
=
<
TError
=
ErrorType
<
void
>
,
TContext
=
unknown
>
(
options
?:
{
mutation
?:
UseMutationOptions
<
Awaited
<
ReturnType
<
typeof
postLogo
>>
,
TError
,{
data
:
BodyType
<
LogoCreate
>
},
TContext
>
,
request
?:
SecondParameter
<
typeof
useCustomClient
>
}
export
const
usePost
ApiV10
Logo
=
<
TError
=
ErrorType
<
void
>
,
TContext
=
unknown
>
(
options
?:
{
mutation
?:
UseMutationOptions
<
Awaited
<
ReturnType
<
typeof
post
ApiV10
Logo
>>
,
TError
,{
data
:
BodyType
<
LogoCreate
>
},
TContext
>
,
request
?:
SecondParameter
<
typeof
useCustomClient
>
}
,
queryClient
?:
QueryClient
):
UseMutationResult
<
Awaited
<
ReturnType
<
typeof
postLogo
>>
,
Awaited
<
ReturnType
<
typeof
post
ApiV10
Logo
>>
,
TError
,
{
data
:
BodyType
<
LogoCreate
>
},
TContext
>
=>
{
const
mutationOptions
=
getPostLogoMutationOptions
(
options
);
const
mutationOptions
=
getPost
ApiV10
LogoMutationOptions
(
options
);
return
useMutation
(
mutationOptions
,
queryClient
);
}
src/api/endpoints/newsletter-subscription.ts
View file @
b3589a95
/**
* Generated by orval v8.0.0-rc.0 🍺
* Do not edit manually.
*
Backend Template
*
Coded by Meu TEAM
*
VietProDev CMS Backend API
*
Generated API documentation
* OpenAPI spec version: 1.0.0
*/
import
{
...
...
@@ -30,11 +30,11 @@ import type {
}
from
'@tanstack/react-query'
;
import
type
{
GetNewsletterSubscriptionParams
,
Get
ApiV10
NewsletterSubscriptionParams
,
NewsletterSubscriptionMutate
,
NewsletterSubscriptionUpdate
,
PatchNewsletterSubscriptionId200
,
PostNewsletterSubscription200
,
Patch
ApiV10
NewsletterSubscriptionId200
,
Post
ApiV10
NewsletterSubscription200
,
ResponseGetAllData
}
from
'../models'
;
...
...
@@ -51,30 +51,30 @@ type SecondParameter<T extends (...args: never) => unknown> = Parameters<T>[1];
* Update seen status of a newsletter subscription email
* @summary Update newsletter subscription status
*/
export
type
patchNewsletterSubscriptionIdResponse200
=
{
data
:
PatchNewsletterSubscriptionId200
export
type
patch
ApiV10
NewsletterSubscriptionIdResponse200
=
{
data
:
Patch
ApiV10
NewsletterSubscriptionId200
status
:
200
}
export
type
patch
NewsletterSubscriptionIdResponseSuccess
=
(
patch
NewsletterSubscriptionIdResponse200
)
&
{
export
type
patch
ApiV10NewsletterSubscriptionIdResponseSuccess
=
(
patchApiV10
NewsletterSubscriptionIdResponse200
)
&
{
headers
:
Headers
;
};
;
export
type
patch
NewsletterSubscriptionIdResponse
=
(
patch
NewsletterSubscriptionIdResponseSuccess
)
export
type
patch
ApiV10NewsletterSubscriptionIdResponse
=
(
patchApiV10
NewsletterSubscriptionIdResponseSuccess
)
export
const
getPatchNewsletterSubscriptionIdUrl
=
(
id
:
string
,)
=>
{
export
const
getPatch
ApiV10
NewsletterSubscriptionIdUrl
=
(
id
:
string
,)
=>
{
return
`/newsletterSubscription/
${
id
}
`
return
`/
api/v1.0/
newsletterSubscription/
${
id
}
`
}
export
const
patchNewsletterSubscriptionId
=
async
(
id
:
string
,
newsletterSubscriptionUpdate
:
NewsletterSubscriptionUpdate
,
options
?:
RequestInit
):
Promise
<
patchNewsletterSubscriptionIdResponse
>
=>
{
export
const
patch
ApiV10
NewsletterSubscriptionId
=
async
(
id
:
string
,
newsletterSubscriptionUpdate
:
NewsletterSubscriptionUpdate
,
options
?:
RequestInit
):
Promise
<
patch
ApiV10
NewsletterSubscriptionIdResponse
>
=>
{
return
useCustomClient
<
patch
NewsletterSubscriptionIdResponse
>
(
getPatch
NewsletterSubscriptionIdUrl
(
id
),
return
useCustomClient
<
patch
ApiV10NewsletterSubscriptionIdResponse
>
(
getPatchApiV10
NewsletterSubscriptionIdUrl
(
id
),
{
...
options
,
method
:
'PATCH'
,
...
...
@@ -87,11 +87,11 @@ export const patchNewsletterSubscriptionId = async (id: string,
export
const
getPatchNewsletterSubscriptionIdMutationOptions
=
<
TError
=
ErrorType
<
unknown
>
,
TContext
=
unknown
>
(
options
?:
{
mutation
?:
UseMutationOptions
<
Awaited
<
ReturnType
<
typeof
patchNewsletterSubscriptionId
>>
,
TError
,{
id
:
string
;
data
:
BodyType
<
NewsletterSubscriptionUpdate
>
},
TContext
>
,
request
?:
SecondParameter
<
typeof
useCustomClient
>
}
):
UseMutationOptions
<
Awaited
<
ReturnType
<
typeof
patchNewsletterSubscriptionId
>>
,
TError
,{
id
:
string
;
data
:
BodyType
<
NewsletterSubscriptionUpdate
>
},
TContext
>
=>
{
export
const
getPatch
ApiV10
NewsletterSubscriptionIdMutationOptions
=
<
TError
=
ErrorType
<
unknown
>
,
TContext
=
unknown
>
(
options
?:
{
mutation
?:
UseMutationOptions
<
Awaited
<
ReturnType
<
typeof
patch
ApiV10
NewsletterSubscriptionId
>>
,
TError
,{
id
:
string
;
data
:
BodyType
<
NewsletterSubscriptionUpdate
>
},
TContext
>
,
request
?:
SecondParameter
<
typeof
useCustomClient
>
}
):
UseMutationOptions
<
Awaited
<
ReturnType
<
typeof
patch
ApiV10
NewsletterSubscriptionId
>>
,
TError
,{
id
:
string
;
data
:
BodyType
<
NewsletterSubscriptionUpdate
>
},
TContext
>
=>
{
const
mutationKey
=
[
'patchNewsletterSubscriptionId'
];
const
mutationKey
=
[
'patch
ApiV10
NewsletterSubscriptionId'
];
const
{
mutation
:
mutationOptions
,
request
:
requestOptions
}
=
options
?
options
.
mutation
&&
'mutationKey'
in
options
.
mutation
&&
options
.
mutation
.
mutationKey
?
options
...
...
@@ -101,10 +101,10 @@ const {mutation: mutationOptions, request: requestOptions} = options ?
const
mutationFn
:
MutationFunction
<
Awaited
<
ReturnType
<
typeof
patchNewsletterSubscriptionId
>>
,
{
id
:
string
;
data
:
BodyType
<
NewsletterSubscriptionUpdate
>
}
>
=
(
props
)
=>
{
const
mutationFn
:
MutationFunction
<
Awaited
<
ReturnType
<
typeof
patch
ApiV10
NewsletterSubscriptionId
>>
,
{
id
:
string
;
data
:
BodyType
<
NewsletterSubscriptionUpdate
>
}
>
=
(
props
)
=>
{
const
{
id
,
data
}
=
props
??
{};
return
patchNewsletterSubscriptionId
(
id
,
data
,
requestOptions
)
return
patch
ApiV10
NewsletterSubscriptionId
(
id
,
data
,
requestOptions
)
}
...
...
@@ -112,23 +112,23 @@ const {mutation: mutationOptions, request: requestOptions} = options ?
return
{
mutationFn
,
...
mutationOptions
}}
export
type
Patch
NewsletterSubscriptionIdMutationResult
=
NonNullable
<
Awaited
<
ReturnType
<
typeof
patch
NewsletterSubscriptionId
>>>
export
type
PatchNewsletterSubscriptionIdMutationBody
=
BodyType
<
NewsletterSubscriptionUpdate
>
export
type
PatchNewsletterSubscriptionIdMutationError
=
ErrorType
<
unknown
>
export
type
Patch
ApiV10NewsletterSubscriptionIdMutationResult
=
NonNullable
<
Awaited
<
ReturnType
<
typeof
patchApiV10
NewsletterSubscriptionId
>>>
export
type
Patch
ApiV10
NewsletterSubscriptionIdMutationBody
=
BodyType
<
NewsletterSubscriptionUpdate
>
export
type
Patch
ApiV10
NewsletterSubscriptionIdMutationError
=
ErrorType
<
unknown
>
/**
* @summary Update newsletter subscription status
*/
export
const
usePatchNewsletterSubscriptionId
=
<
TError
=
ErrorType
<
unknown
>
,
TContext
=
unknown
>
(
options
?:
{
mutation
?:
UseMutationOptions
<
Awaited
<
ReturnType
<
typeof
patchNewsletterSubscriptionId
>>
,
TError
,{
id
:
string
;
data
:
BodyType
<
NewsletterSubscriptionUpdate
>
},
TContext
>
,
request
?:
SecondParameter
<
typeof
useCustomClient
>
}
export
const
usePatch
ApiV10
NewsletterSubscriptionId
=
<
TError
=
ErrorType
<
unknown
>
,
TContext
=
unknown
>
(
options
?:
{
mutation
?:
UseMutationOptions
<
Awaited
<
ReturnType
<
typeof
patch
ApiV10
NewsletterSubscriptionId
>>
,
TError
,{
id
:
string
;
data
:
BodyType
<
NewsletterSubscriptionUpdate
>
},
TContext
>
,
request
?:
SecondParameter
<
typeof
useCustomClient
>
}
,
queryClient
?:
QueryClient
):
UseMutationResult
<
Awaited
<
ReturnType
<
typeof
patchNewsletterSubscriptionId
>>
,
Awaited
<
ReturnType
<
typeof
patch
ApiV10
NewsletterSubscriptionId
>>
,
TError
,
{
id
:
string
;
data
:
BodyType
<
NewsletterSubscriptionUpdate
>
},
TContext
>
=>
{
const
mutationOptions
=
getPatchNewsletterSubscriptionIdMutationOptions
(
options
);
const
mutationOptions
=
getPatch
ApiV10
NewsletterSubscriptionIdMutationOptions
(
options
);
return
useMutation
(
mutationOptions
,
queryClient
);
}
...
...
@@ -136,29 +136,29 @@ export const usePatchNewsletterSubscriptionId = <TError = ErrorType<unknown>,
* Delete a newsletter subscription email
* @summary Delete newsletter subscription
*/
export
type
deleteNewsletterSubscriptionIdResponse200
=
{
export
type
delete
ApiV10
NewsletterSubscriptionIdResponse200
=
{
data
:
void
status
:
200
}
export
type
delete
NewsletterSubscriptionIdResponseSuccess
=
(
delete
NewsletterSubscriptionIdResponse200
)
&
{
export
type
delete
ApiV10NewsletterSubscriptionIdResponseSuccess
=
(
deleteApiV10
NewsletterSubscriptionIdResponse200
)
&
{
headers
:
Headers
;
};
;
export
type
delete
NewsletterSubscriptionIdResponse
=
(
delete
NewsletterSubscriptionIdResponseSuccess
)
export
type
delete
ApiV10NewsletterSubscriptionIdResponse
=
(
deleteApiV10
NewsletterSubscriptionIdResponseSuccess
)
export
const
getDeleteNewsletterSubscriptionIdUrl
=
(
id
:
string
,)
=>
{
export
const
getDelete
ApiV10
NewsletterSubscriptionIdUrl
=
(
id
:
string
,)
=>
{
return
`/newsletterSubscription/
${
id
}
`
return
`/
api/v1.0/
newsletterSubscription/
${
id
}
`
}
export
const
delete
NewsletterSubscriptionId
=
async
(
id
:
string
,
options
?:
RequestInit
):
Promise
<
delete
NewsletterSubscriptionIdResponse
>
=>
{
export
const
delete
ApiV10NewsletterSubscriptionId
=
async
(
id
:
string
,
options
?:
RequestInit
):
Promise
<
deleteApiV10
NewsletterSubscriptionIdResponse
>
=>
{
return
useCustomClient
<
delete
NewsletterSubscriptionIdResponse
>
(
getDelete
NewsletterSubscriptionIdUrl
(
id
),
return
useCustomClient
<
delete
ApiV10NewsletterSubscriptionIdResponse
>
(
getDeleteApiV10
NewsletterSubscriptionIdUrl
(
id
),
{
...
options
,
method
:
'DELETE'
...
...
@@ -170,11 +170,11 @@ export const deleteNewsletterSubscriptionId = async (id: string, options?: Reque
export
const
getDeleteNewsletterSubscriptionIdMutationOptions
=
<
TError
=
ErrorType
<
unknown
>
,
TContext
=
unknown
>
(
options
?:
{
mutation
?:
UseMutationOptions
<
Awaited
<
ReturnType
<
typeof
deleteNewsletterSubscriptionId
>>
,
TError
,{
id
:
string
},
TContext
>
,
request
?:
SecondParameter
<
typeof
useCustomClient
>
}
):
UseMutationOptions
<
Awaited
<
ReturnType
<
typeof
deleteNewsletterSubscriptionId
>>
,
TError
,{
id
:
string
},
TContext
>
=>
{
export
const
getDelete
ApiV10
NewsletterSubscriptionIdMutationOptions
=
<
TError
=
ErrorType
<
unknown
>
,
TContext
=
unknown
>
(
options
?:
{
mutation
?:
UseMutationOptions
<
Awaited
<
ReturnType
<
typeof
delete
ApiV10
NewsletterSubscriptionId
>>
,
TError
,{
id
:
string
},
TContext
>
,
request
?:
SecondParameter
<
typeof
useCustomClient
>
}
):
UseMutationOptions
<
Awaited
<
ReturnType
<
typeof
delete
ApiV10
NewsletterSubscriptionId
>>
,
TError
,{
id
:
string
},
TContext
>
=>
{
const
mutationKey
=
[
'deleteNewsletterSubscriptionId'
];
const
mutationKey
=
[
'delete
ApiV10
NewsletterSubscriptionId'
];
const
{
mutation
:
mutationOptions
,
request
:
requestOptions
}
=
options
?
options
.
mutation
&&
'mutationKey'
in
options
.
mutation
&&
options
.
mutation
.
mutationKey
?
options
...
...
@@ -184,10 +184,10 @@ const {mutation: mutationOptions, request: requestOptions} = options ?
const
mutationFn
:
MutationFunction
<
Awaited
<
ReturnType
<
typeof
deleteNewsletterSubscriptionId
>>
,
{
id
:
string
}
>
=
(
props
)
=>
{
const
mutationFn
:
MutationFunction
<
Awaited
<
ReturnType
<
typeof
delete
ApiV10
NewsletterSubscriptionId
>>
,
{
id
:
string
}
>
=
(
props
)
=>
{
const
{
id
}
=
props
??
{};
return
deleteNewsletterSubscriptionId
(
id
,
requestOptions
)
return
delete
ApiV10
NewsletterSubscriptionId
(
id
,
requestOptions
)
}
...
...
@@ -195,23 +195,23 @@ const {mutation: mutationOptions, request: requestOptions} = options ?
return
{
mutationFn
,
...
mutationOptions
}}
export
type
Delete
NewsletterSubscriptionIdMutationResult
=
NonNullable
<
Awaited
<
ReturnType
<
typeof
delete
NewsletterSubscriptionId
>>>
export
type
Delete
ApiV10NewsletterSubscriptionIdMutationResult
=
NonNullable
<
Awaited
<
ReturnType
<
typeof
deleteApiV10
NewsletterSubscriptionId
>>>
export
type
DeleteNewsletterSubscriptionIdMutationError
=
ErrorType
<
unknown
>
export
type
Delete
ApiV10
NewsletterSubscriptionIdMutationError
=
ErrorType
<
unknown
>
/**
* @summary Delete newsletter subscription
*/
export
const
useDeleteNewsletterSubscriptionId
=
<
TError
=
ErrorType
<
unknown
>
,
TContext
=
unknown
>
(
options
?:
{
mutation
?:
UseMutationOptions
<
Awaited
<
ReturnType
<
typeof
deleteNewsletterSubscriptionId
>>
,
TError
,{
id
:
string
},
TContext
>
,
request
?:
SecondParameter
<
typeof
useCustomClient
>
}
export
const
useDelete
ApiV10
NewsletterSubscriptionId
=
<
TError
=
ErrorType
<
unknown
>
,
TContext
=
unknown
>
(
options
?:
{
mutation
?:
UseMutationOptions
<
Awaited
<
ReturnType
<
typeof
delete
ApiV10
NewsletterSubscriptionId
>>
,
TError
,{
id
:
string
},
TContext
>
,
request
?:
SecondParameter
<
typeof
useCustomClient
>
}
,
queryClient
?:
QueryClient
):
UseMutationResult
<
Awaited
<
ReturnType
<
typeof
deleteNewsletterSubscriptionId
>>
,
Awaited
<
ReturnType
<
typeof
delete
ApiV10
NewsletterSubscriptionId
>>
,
TError
,
{
id
:
string
},
TContext
>
=>
{
const
mutationOptions
=
getDeleteNewsletterSubscriptionIdMutationOptions
(
options
);
const
mutationOptions
=
getDelete
ApiV10
NewsletterSubscriptionIdMutationOptions
(
options
);
return
useMutation
(
mutationOptions
,
queryClient
);
}
...
...
@@ -219,19 +219,19 @@ export const useDeleteNewsletterSubscriptionId = <TError = ErrorType<unknown>,
* Retrieve newsletter subscription emails with pagination, filtering and sorting
* @summary Get all newsletter subscriptions
*/
export
type
getNewsletterSubscriptionResponse200
=
{
export
type
get
ApiV10
NewsletterSubscriptionResponse200
=
{
data
:
ResponseGetAllData
status
:
200
}
export
type
get
NewsletterSubscriptionResponseSuccess
=
(
get
NewsletterSubscriptionResponse200
)
&
{
export
type
get
ApiV10NewsletterSubscriptionResponseSuccess
=
(
getApiV10
NewsletterSubscriptionResponse200
)
&
{
headers
:
Headers
;
};
;
export
type
get
NewsletterSubscriptionResponse
=
(
get
NewsletterSubscriptionResponseSuccess
)
export
type
get
ApiV10NewsletterSubscriptionResponse
=
(
getApiV10
NewsletterSubscriptionResponseSuccess
)
export
const
getGet
NewsletterSubscriptionUrl
=
(
params
?:
Get
NewsletterSubscriptionParams
,)
=>
{
export
const
getGet
ApiV10NewsletterSubscriptionUrl
=
(
params
?:
GetApiV10
NewsletterSubscriptionParams
,)
=>
{
const
normalizedParams
=
new
URLSearchParams
();
Object
.
entries
(
params
||
{}).
forEach
(([
key
,
value
])
=>
{
...
...
@@ -243,12 +243,12 @@ export const getGetNewsletterSubscriptionUrl = (params?: GetNewsletterSubscripti
const
stringifiedParams
=
normalizedParams
.
toString
();
return
stringifiedParams
.
length
>
0
?
`/
newsletterSubscription?
${
stringifiedParams
}
`
:
`
/newsletterSubscription`
return
stringifiedParams
.
length
>
0
?
`/
api/v1.0/newsletterSubscription?
${
stringifiedParams
}
`
:
`/api/v1.0
/newsletterSubscription`
}
export
const
get
NewsletterSubscription
=
async
(
params
?:
GetNewsletterSubscriptionParams
,
options
?:
RequestInit
):
Promise
<
get
NewsletterSubscriptionResponse
>
=>
{
export
const
get
ApiV10NewsletterSubscription
=
async
(
params
?:
GetApiV10NewsletterSubscriptionParams
,
options
?:
RequestInit
):
Promise
<
getApiV10
NewsletterSubscriptionResponse
>
=>
{
return
useCustomClient
<
get
NewsletterSubscriptionResponse
>
(
getGet
NewsletterSubscriptionUrl
(
params
),
return
useCustomClient
<
get
ApiV10NewsletterSubscriptionResponse
>
(
getGetApiV10
NewsletterSubscriptionUrl
(
params
),
{
...
options
,
method
:
'GET'
...
...
@@ -261,75 +261,75 @@ export const getNewsletterSubscription = async (params?: GetNewsletterSubscripti
export
const
getGet
NewsletterSubscriptionInfiniteQueryKey
=
(
params
?:
Get
NewsletterSubscriptionParams
,)
=>
{
export
const
getGet
ApiV10NewsletterSubscriptionInfiniteQueryKey
=
(
params
?:
GetApiV10
NewsletterSubscriptionParams
,)
=>
{
return
[
'infinite'
,
`/newsletterSubscription`
,
...(
params
?
[
params
]:
[])
'infinite'
,
`/
api/v1.0/
newsletterSubscription`
,
...(
params
?
[
params
]:
[])
]
as
const
;
}
export
const
getGet
NewsletterSubscriptionQueryKey
=
(
params
?:
Get
NewsletterSubscriptionParams
,)
=>
{
export
const
getGet
ApiV10NewsletterSubscriptionQueryKey
=
(
params
?:
GetApiV10
NewsletterSubscriptionParams
,)
=>
{
return
[
`/newsletterSubscription`
,
...(
params
?
[
params
]:
[])
`/
api/v1.0/
newsletterSubscription`
,
...(
params
?
[
params
]:
[])
]
as
const
;
}
export
const
getGet
NewsletterSubscriptionInfiniteQueryOptions
=
<
TData
=
InfiniteData
<
Awaited
<
ReturnType
<
typeof
getNewsletterSubscription
>>>
,
TError
=
ErrorType
<
unknown
>>
(
params
?:
GetNewsletterSubscriptionParams
,
options
?:
{
query
?:
Partial
<
UseInfiniteQueryOptions
<
Awaited
<
ReturnType
<
typeof
get
NewsletterSubscription
>>
,
TError
,
TData
>>
,
request
?:
SecondParameter
<
typeof
useCustomClient
>
}
export
const
getGet
ApiV10NewsletterSubscriptionInfiniteQueryOptions
=
<
TData
=
InfiniteData
<
Awaited
<
ReturnType
<
typeof
getApiV10NewsletterSubscription
>>>
,
TError
=
ErrorType
<
unknown
>>
(
params
?:
GetApiV10NewsletterSubscriptionParams
,
options
?:
{
query
?:
Partial
<
UseInfiniteQueryOptions
<
Awaited
<
ReturnType
<
typeof
getApiV10
NewsletterSubscription
>>
,
TError
,
TData
>>
,
request
?:
SecondParameter
<
typeof
useCustomClient
>
}
)
=>
{
const
{
query
:
queryOptions
,
request
:
requestOptions
}
=
options
??
{};
const
queryKey
=
queryOptions
?.
queryKey
??
getGetNewsletterSubscriptionInfiniteQueryKey
(
params
);
const
queryKey
=
queryOptions
?.
queryKey
??
getGet
ApiV10
NewsletterSubscriptionInfiniteQueryKey
(
params
);
const
queryFn
:
QueryFunction
<
Awaited
<
ReturnType
<
typeof
get
NewsletterSubscription
>>>
=
({
signal
})
=>
get
NewsletterSubscription
(
params
,
{
signal
,
...
requestOptions
});
const
queryFn
:
QueryFunction
<
Awaited
<
ReturnType
<
typeof
get
ApiV10NewsletterSubscription
>>>
=
({
signal
})
=>
getApiV10
NewsletterSubscription
(
params
,
{
signal
,
...
requestOptions
});
return
{
queryKey
,
queryFn
,
retry
:
3
,
retryDelay
:
1000
,
...
queryOptions
}
as
UseInfiniteQueryOptions
<
Awaited
<
ReturnType
<
typeof
getNewsletterSubscription
>>
,
TError
,
TData
>
&
{
queryKey
:
DataTag
<
QueryKey
,
TData
,
TError
>
}
return
{
queryKey
,
queryFn
,
retry
:
3
,
retryDelay
:
1000
,
...
queryOptions
}
as
UseInfiniteQueryOptions
<
Awaited
<
ReturnType
<
typeof
get
ApiV10
NewsletterSubscription
>>
,
TError
,
TData
>
&
{
queryKey
:
DataTag
<
QueryKey
,
TData
,
TError
>
}
}
export
type
Get
NewsletterSubscriptionInfiniteQueryResult
=
NonNullable
<
Awaited
<
ReturnType
<
typeof
get
NewsletterSubscription
>>>
export
type
GetNewsletterSubscriptionInfiniteQueryError
=
ErrorType
<
unknown
>
export
type
Get
ApiV10NewsletterSubscriptionInfiniteQueryResult
=
NonNullable
<
Awaited
<
ReturnType
<
typeof
getApiV10
NewsletterSubscription
>>>
export
type
Get
ApiV10
NewsletterSubscriptionInfiniteQueryError
=
ErrorType
<
unknown
>
export
function
useGet
NewsletterSubscriptionInfinite
<
TData
=
InfiniteData
<
Awaited
<
ReturnType
<
typeof
get
NewsletterSubscription
>>>
,
TError
=
ErrorType
<
unknown
>>
(
params
:
undefined
|
Get
NewsletterSubscriptionParams
,
options
:
{
query
:
Partial
<
UseInfiniteQueryOptions
<
Awaited
<
ReturnType
<
typeof
get
NewsletterSubscription
>>
,
TError
,
TData
>>
&
Pick
<
export
function
useGet
ApiV10NewsletterSubscriptionInfinite
<
TData
=
InfiniteData
<
Awaited
<
ReturnType
<
typeof
getApiV10
NewsletterSubscription
>>>
,
TError
=
ErrorType
<
unknown
>>
(
params
:
undefined
|
Get
ApiV10NewsletterSubscriptionParams
,
options
:
{
query
:
Partial
<
UseInfiniteQueryOptions
<
Awaited
<
ReturnType
<
typeof
getApiV10
NewsletterSubscription
>>
,
TError
,
TData
>>
&
Pick
<
DefinedInitialDataOptions
<
Awaited
<
ReturnType
<
typeof
getNewsletterSubscription
>>
,
Awaited
<
ReturnType
<
typeof
get
ApiV10
NewsletterSubscription
>>
,
TError
,
Awaited
<
ReturnType
<
typeof
getNewsletterSubscription
>>
Awaited
<
ReturnType
<
typeof
get
ApiV10
NewsletterSubscription
>>
>
,
'initialData'
>
,
request
?:
SecondParameter
<
typeof
useCustomClient
>
}
,
queryClient
?:
QueryClient
):
DefinedUseInfiniteQueryResult
<
TData
,
TError
>
&
{
queryKey
:
DataTag
<
QueryKey
,
TData
,
TError
>
}
export
function
useGet
NewsletterSubscriptionInfinite
<
TData
=
InfiniteData
<
Awaited
<
ReturnType
<
typeof
get
NewsletterSubscription
>>>
,
TError
=
ErrorType
<
unknown
>>
(
params
?:
Get
NewsletterSubscriptionParams
,
options
?:
{
query
?:
Partial
<
UseInfiniteQueryOptions
<
Awaited
<
ReturnType
<
typeof
get
NewsletterSubscription
>>
,
TError
,
TData
>>
&
Pick
<
export
function
useGet
ApiV10NewsletterSubscriptionInfinite
<
TData
=
InfiniteData
<
Awaited
<
ReturnType
<
typeof
getApiV10
NewsletterSubscription
>>>
,
TError
=
ErrorType
<
unknown
>>
(
params
?:
Get
ApiV10NewsletterSubscriptionParams
,
options
?:
{
query
?:
Partial
<
UseInfiniteQueryOptions
<
Awaited
<
ReturnType
<
typeof
getApiV10
NewsletterSubscription
>>
,
TError
,
TData
>>
&
Pick
<
UndefinedInitialDataOptions
<
Awaited
<
ReturnType
<
typeof
getNewsletterSubscription
>>
,
Awaited
<
ReturnType
<
typeof
get
ApiV10
NewsletterSubscription
>>
,
TError
,
Awaited
<
ReturnType
<
typeof
getNewsletterSubscription
>>
Awaited
<
ReturnType
<
typeof
get
ApiV10
NewsletterSubscription
>>
>
,
'initialData'
>
,
request
?:
SecondParameter
<
typeof
useCustomClient
>
}
,
queryClient
?:
QueryClient
):
UseInfiniteQueryResult
<
TData
,
TError
>
&
{
queryKey
:
DataTag
<
QueryKey
,
TData
,
TError
>
}
export
function
useGet
NewsletterSubscriptionInfinite
<
TData
=
InfiniteData
<
Awaited
<
ReturnType
<
typeof
get
NewsletterSubscription
>>>
,
TError
=
ErrorType
<
unknown
>>
(
params
?:
Get
NewsletterSubscriptionParams
,
options
?:
{
query
?:
Partial
<
UseInfiniteQueryOptions
<
Awaited
<
ReturnType
<
typeof
get
NewsletterSubscription
>>
,
TError
,
TData
>>
,
request
?:
SecondParameter
<
typeof
useCustomClient
>
}
export
function
useGet
ApiV10NewsletterSubscriptionInfinite
<
TData
=
InfiniteData
<
Awaited
<
ReturnType
<
typeof
getApiV10
NewsletterSubscription
>>>
,
TError
=
ErrorType
<
unknown
>>
(
params
?:
Get
ApiV10NewsletterSubscriptionParams
,
options
?:
{
query
?:
Partial
<
UseInfiniteQueryOptions
<
Awaited
<
ReturnType
<
typeof
getApiV10
NewsletterSubscription
>>
,
TError
,
TData
>>
,
request
?:
SecondParameter
<
typeof
useCustomClient
>
}
,
queryClient
?:
QueryClient
):
UseInfiniteQueryResult
<
TData
,
TError
>
&
{
queryKey
:
DataTag
<
QueryKey
,
TData
,
TError
>
}
/**
* @summary Get all newsletter subscriptions
*/
export
function
useGet
NewsletterSubscriptionInfinite
<
TData
=
InfiniteData
<
Awaited
<
ReturnType
<
typeof
get
NewsletterSubscription
>>>
,
TError
=
ErrorType
<
unknown
>>
(
params
?:
Get
NewsletterSubscriptionParams
,
options
?:
{
query
?:
Partial
<
UseInfiniteQueryOptions
<
Awaited
<
ReturnType
<
typeof
get
NewsletterSubscription
>>
,
TError
,
TData
>>
,
request
?:
SecondParameter
<
typeof
useCustomClient
>
}
export
function
useGet
ApiV10NewsletterSubscriptionInfinite
<
TData
=
InfiniteData
<
Awaited
<
ReturnType
<
typeof
getApiV10
NewsletterSubscription
>>>
,
TError
=
ErrorType
<
unknown
>>
(
params
?:
Get
ApiV10NewsletterSubscriptionParams
,
options
?:
{
query
?:
Partial
<
UseInfiniteQueryOptions
<
Awaited
<
ReturnType
<
typeof
getApiV10
NewsletterSubscription
>>
,
TError
,
TData
>>
,
request
?:
SecondParameter
<
typeof
useCustomClient
>
}
,
queryClient
?:
QueryClient
):
UseInfiniteQueryResult
<
TData
,
TError
>
&
{
queryKey
:
DataTag
<
QueryKey
,
TData
,
TError
>
}
{
const
queryOptions
=
getGetNewsletterSubscriptionInfiniteQueryOptions
(
params
,
options
)
const
queryOptions
=
getGet
ApiV10
NewsletterSubscriptionInfiniteQueryOptions
(
params
,
options
)
const
query
=
useInfiniteQuery
(
queryOptions
,
queryClient
)
as
UseInfiniteQueryResult
<
TData
,
TError
>
&
{
queryKey
:
DataTag
<
QueryKey
,
TData
,
TError
>
};
...
...
@@ -341,12 +341,12 @@ export function useGetNewsletterSubscriptionInfinite<TData = InfiniteData<Awaite
/**
* @summary Get all newsletter subscriptions
*/
export
const
prefetchGet
NewsletterSubscriptionInfiniteQuery
=
async
<
TData
=
Awaited
<
ReturnType
<
typeof
get
NewsletterSubscription
>>
,
TError
=
ErrorType
<
unknown
>>
(
queryClient
:
QueryClient
,
params
?:
Get
NewsletterSubscriptionParams
,
options
?:
{
query
?:
Partial
<
UseInfiniteQueryOptions
<
Awaited
<
ReturnType
<
typeof
get
NewsletterSubscription
>>
,
TError
,
TData
>>
,
request
?:
SecondParameter
<
typeof
useCustomClient
>
}
export
const
prefetchGet
ApiV10NewsletterSubscriptionInfiniteQuery
=
async
<
TData
=
Awaited
<
ReturnType
<
typeof
getApiV10
NewsletterSubscription
>>
,
TError
=
ErrorType
<
unknown
>>
(
queryClient
:
QueryClient
,
params
?:
Get
ApiV10NewsletterSubscriptionParams
,
options
?:
{
query
?:
Partial
<
UseInfiniteQueryOptions
<
Awaited
<
ReturnType
<
typeof
getApiV10
NewsletterSubscription
>>
,
TError
,
TData
>>
,
request
?:
SecondParameter
<
typeof
useCustomClient
>
}
):
Promise
<
QueryClient
>
=>
{
const
queryOptions
=
getGetNewsletterSubscriptionInfiniteQueryOptions
(
params
,
options
)
const
queryOptions
=
getGet
ApiV10
NewsletterSubscriptionInfiniteQueryOptions
(
params
,
options
)
await
queryClient
.
prefetchInfiniteQuery
(
queryOptions
);
...
...
@@ -355,62 +355,62 @@ export const prefetchGetNewsletterSubscriptionInfiniteQuery = async <TData = Awa
export
const
getGet
NewsletterSubscriptionQueryOptions
=
<
TData
=
Awaited
<
ReturnType
<
typeof
getNewsletterSubscription
>>
,
TError
=
ErrorType
<
unknown
>>
(
params
?:
GetNewsletterSubscriptionParams
,
options
?:
{
query
?:
Partial
<
UseQueryOptions
<
Awaited
<
ReturnType
<
typeof
get
NewsletterSubscription
>>
,
TError
,
TData
>>
,
request
?:
SecondParameter
<
typeof
useCustomClient
>
}
export
const
getGet
ApiV10NewsletterSubscriptionQueryOptions
=
<
TData
=
Awaited
<
ReturnType
<
typeof
getApiV10NewsletterSubscription
>>
,
TError
=
ErrorType
<
unknown
>>
(
params
?:
GetApiV10NewsletterSubscriptionParams
,
options
?:
{
query
?:
Partial
<
UseQueryOptions
<
Awaited
<
ReturnType
<
typeof
getApiV10
NewsletterSubscription
>>
,
TError
,
TData
>>
,
request
?:
SecondParameter
<
typeof
useCustomClient
>
}
)
=>
{
const
{
query
:
queryOptions
,
request
:
requestOptions
}
=
options
??
{};
const
queryKey
=
queryOptions
?.
queryKey
??
getGetNewsletterSubscriptionQueryKey
(
params
);
const
queryKey
=
queryOptions
?.
queryKey
??
getGet
ApiV10
NewsletterSubscriptionQueryKey
(
params
);
const
queryFn
:
QueryFunction
<
Awaited
<
ReturnType
<
typeof
get
NewsletterSubscription
>>>
=
({
signal
})
=>
get
NewsletterSubscription
(
params
,
{
signal
,
...
requestOptions
});
const
queryFn
:
QueryFunction
<
Awaited
<
ReturnType
<
typeof
get
ApiV10NewsletterSubscription
>>>
=
({
signal
})
=>
getApiV10
NewsletterSubscription
(
params
,
{
signal
,
...
requestOptions
});
return
{
queryKey
,
queryFn
,
retry
:
3
,
retryDelay
:
1000
,
...
queryOptions
}
as
UseQueryOptions
<
Awaited
<
ReturnType
<
typeof
getNewsletterSubscription
>>
,
TError
,
TData
>
&
{
queryKey
:
DataTag
<
QueryKey
,
TData
,
TError
>
}
return
{
queryKey
,
queryFn
,
retry
:
3
,
retryDelay
:
1000
,
...
queryOptions
}
as
UseQueryOptions
<
Awaited
<
ReturnType
<
typeof
get
ApiV10
NewsletterSubscription
>>
,
TError
,
TData
>
&
{
queryKey
:
DataTag
<
QueryKey
,
TData
,
TError
>
}
}
export
type
Get
NewsletterSubscriptionQueryResult
=
NonNullable
<
Awaited
<
ReturnType
<
typeof
get
NewsletterSubscription
>>>
export
type
GetNewsletterSubscriptionQueryError
=
ErrorType
<
unknown
>
export
type
Get
ApiV10NewsletterSubscriptionQueryResult
=
NonNullable
<
Awaited
<
ReturnType
<
typeof
getApiV10
NewsletterSubscription
>>>
export
type
Get
ApiV10
NewsletterSubscriptionQueryError
=
ErrorType
<
unknown
>
export
function
useGet
NewsletterSubscription
<
TData
=
Awaited
<
ReturnType
<
typeof
get
NewsletterSubscription
>>
,
TError
=
ErrorType
<
unknown
>>
(
params
:
undefined
|
Get
NewsletterSubscriptionParams
,
options
:
{
query
:
Partial
<
UseQueryOptions
<
Awaited
<
ReturnType
<
typeof
get
NewsletterSubscription
>>
,
TError
,
TData
>>
&
Pick
<
export
function
useGet
ApiV10NewsletterSubscription
<
TData
=
Awaited
<
ReturnType
<
typeof
getApiV10
NewsletterSubscription
>>
,
TError
=
ErrorType
<
unknown
>>
(
params
:
undefined
|
Get
ApiV10NewsletterSubscriptionParams
,
options
:
{
query
:
Partial
<
UseQueryOptions
<
Awaited
<
ReturnType
<
typeof
getApiV10
NewsletterSubscription
>>
,
TError
,
TData
>>
&
Pick
<
DefinedInitialDataOptions
<
Awaited
<
ReturnType
<
typeof
getNewsletterSubscription
>>
,
Awaited
<
ReturnType
<
typeof
get
ApiV10
NewsletterSubscription
>>
,
TError
,
Awaited
<
ReturnType
<
typeof
getNewsletterSubscription
>>
Awaited
<
ReturnType
<
typeof
get
ApiV10
NewsletterSubscription
>>
>
,
'initialData'
>
,
request
?:
SecondParameter
<
typeof
useCustomClient
>
}
,
queryClient
?:
QueryClient
):
DefinedUseQueryResult
<
TData
,
TError
>
&
{
queryKey
:
DataTag
<
QueryKey
,
TData
,
TError
>
}
export
function
useGet
NewsletterSubscription
<
TData
=
Awaited
<
ReturnType
<
typeof
get
NewsletterSubscription
>>
,
TError
=
ErrorType
<
unknown
>>
(
params
?:
Get
NewsletterSubscriptionParams
,
options
?:
{
query
?:
Partial
<
UseQueryOptions
<
Awaited
<
ReturnType
<
typeof
get
NewsletterSubscription
>>
,
TError
,
TData
>>
&
Pick
<
export
function
useGet
ApiV10NewsletterSubscription
<
TData
=
Awaited
<
ReturnType
<
typeof
getApiV10
NewsletterSubscription
>>
,
TError
=
ErrorType
<
unknown
>>
(
params
?:
Get
ApiV10NewsletterSubscriptionParams
,
options
?:
{
query
?:
Partial
<
UseQueryOptions
<
Awaited
<
ReturnType
<
typeof
getApiV10
NewsletterSubscription
>>
,
TError
,
TData
>>
&
Pick
<
UndefinedInitialDataOptions
<
Awaited
<
ReturnType
<
typeof
getNewsletterSubscription
>>
,
Awaited
<
ReturnType
<
typeof
get
ApiV10
NewsletterSubscription
>>
,
TError
,
Awaited
<
ReturnType
<
typeof
getNewsletterSubscription
>>
Awaited
<
ReturnType
<
typeof
get
ApiV10
NewsletterSubscription
>>
>
,
'initialData'
>
,
request
?:
SecondParameter
<
typeof
useCustomClient
>
}
,
queryClient
?:
QueryClient
):
UseQueryResult
<
TData
,
TError
>
&
{
queryKey
:
DataTag
<
QueryKey
,
TData
,
TError
>
}
export
function
useGet
NewsletterSubscription
<
TData
=
Awaited
<
ReturnType
<
typeof
get
NewsletterSubscription
>>
,
TError
=
ErrorType
<
unknown
>>
(
params
?:
Get
NewsletterSubscriptionParams
,
options
?:
{
query
?:
Partial
<
UseQueryOptions
<
Awaited
<
ReturnType
<
typeof
get
NewsletterSubscription
>>
,
TError
,
TData
>>
,
request
?:
SecondParameter
<
typeof
useCustomClient
>
}
export
function
useGet
ApiV10NewsletterSubscription
<
TData
=
Awaited
<
ReturnType
<
typeof
getApiV10
NewsletterSubscription
>>
,
TError
=
ErrorType
<
unknown
>>
(
params
?:
Get
ApiV10NewsletterSubscriptionParams
,
options
?:
{
query
?:
Partial
<
UseQueryOptions
<
Awaited
<
ReturnType
<
typeof
getApiV10
NewsletterSubscription
>>
,
TError
,
TData
>>
,
request
?:
SecondParameter
<
typeof
useCustomClient
>
}
,
queryClient
?:
QueryClient
):
UseQueryResult
<
TData
,
TError
>
&
{
queryKey
:
DataTag
<
QueryKey
,
TData
,
TError
>
}
/**
* @summary Get all newsletter subscriptions
*/
export
function
useGet
NewsletterSubscription
<
TData
=
Awaited
<
ReturnType
<
typeof
get
NewsletterSubscription
>>
,
TError
=
ErrorType
<
unknown
>>
(
params
?:
Get
NewsletterSubscriptionParams
,
options
?:
{
query
?:
Partial
<
UseQueryOptions
<
Awaited
<
ReturnType
<
typeof
get
NewsletterSubscription
>>
,
TError
,
TData
>>
,
request
?:
SecondParameter
<
typeof
useCustomClient
>
}
export
function
useGet
ApiV10NewsletterSubscription
<
TData
=
Awaited
<
ReturnType
<
typeof
getApiV10
NewsletterSubscription
>>
,
TError
=
ErrorType
<
unknown
>>
(
params
?:
Get
ApiV10NewsletterSubscriptionParams
,
options
?:
{
query
?:
Partial
<
UseQueryOptions
<
Awaited
<
ReturnType
<
typeof
getApiV10
NewsletterSubscription
>>
,
TError
,
TData
>>
,
request
?:
SecondParameter
<
typeof
useCustomClient
>
}
,
queryClient
?:
QueryClient
):
UseQueryResult
<
TData
,
TError
>
&
{
queryKey
:
DataTag
<
QueryKey
,
TData
,
TError
>
}
{
const
queryOptions
=
getGetNewsletterSubscriptionQueryOptions
(
params
,
options
)
const
queryOptions
=
getGet
ApiV10
NewsletterSubscriptionQueryOptions
(
params
,
options
)
const
query
=
useQuery
(
queryOptions
,
queryClient
)
as
UseQueryResult
<
TData
,
TError
>
&
{
queryKey
:
DataTag
<
QueryKey
,
TData
,
TError
>
};
...
...
@@ -422,12 +422,12 @@ export function useGetNewsletterSubscription<TData = Awaited<ReturnType<typeof g
/**
* @summary Get all newsletter subscriptions
*/
export
const
prefetchGet
NewsletterSubscriptionQuery
=
async
<
TData
=
Awaited
<
ReturnType
<
typeof
get
NewsletterSubscription
>>
,
TError
=
ErrorType
<
unknown
>>
(
queryClient
:
QueryClient
,
params
?:
Get
NewsletterSubscriptionParams
,
options
?:
{
query
?:
Partial
<
UseQueryOptions
<
Awaited
<
ReturnType
<
typeof
get
NewsletterSubscription
>>
,
TError
,
TData
>>
,
request
?:
SecondParameter
<
typeof
useCustomClient
>
}
export
const
prefetchGet
ApiV10NewsletterSubscriptionQuery
=
async
<
TData
=
Awaited
<
ReturnType
<
typeof
getApiV10
NewsletterSubscription
>>
,
TError
=
ErrorType
<
unknown
>>
(
queryClient
:
QueryClient
,
params
?:
Get
ApiV10NewsletterSubscriptionParams
,
options
?:
{
query
?:
Partial
<
UseQueryOptions
<
Awaited
<
ReturnType
<
typeof
getApiV10
NewsletterSubscription
>>
,
TError
,
TData
>>
,
request
?:
SecondParameter
<
typeof
useCustomClient
>
}
):
Promise
<
QueryClient
>
=>
{
const
queryOptions
=
getGetNewsletterSubscriptionQueryOptions
(
params
,
options
)
const
queryOptions
=
getGet
ApiV10
NewsletterSubscriptionQueryOptions
(
params
,
options
)
await
queryClient
.
prefetchQuery
(
queryOptions
);
...
...
@@ -440,29 +440,29 @@ export const prefetchGetNewsletterSubscriptionQuery = async <TData = Awaited<Ret
* Register an email to receive information from the website
* @summary Subscribe newsletter email
*/
export
type
postNewsletterSubscriptionResponse200
=
{
data
:
PostNewsletterSubscription200
export
type
post
ApiV10
NewsletterSubscriptionResponse200
=
{
data
:
Post
ApiV10
NewsletterSubscription200
status
:
200
}
export
type
post
NewsletterSubscriptionResponseSuccess
=
(
post
NewsletterSubscriptionResponse200
)
&
{
export
type
post
ApiV10NewsletterSubscriptionResponseSuccess
=
(
postApiV10
NewsletterSubscriptionResponse200
)
&
{
headers
:
Headers
;
};
;
export
type
post
NewsletterSubscriptionResponse
=
(
post
NewsletterSubscriptionResponseSuccess
)
export
type
post
ApiV10NewsletterSubscriptionResponse
=
(
postApiV10
NewsletterSubscriptionResponseSuccess
)
export
const
getPostNewsletterSubscriptionUrl
=
()
=>
{
export
const
getPost
ApiV10
NewsletterSubscriptionUrl
=
()
=>
{
return
`/newsletterSubscription`
return
`/
api/v1.0/
newsletterSubscription`
}
export
const
post
NewsletterSubscription
=
async
(
newsletterSubscriptionMutate
:
NewsletterSubscriptionMutate
,
options
?:
RequestInit
):
Promise
<
post
NewsletterSubscriptionResponse
>
=>
{
export
const
post
ApiV10NewsletterSubscription
=
async
(
newsletterSubscriptionMutate
:
NewsletterSubscriptionMutate
,
options
?:
RequestInit
):
Promise
<
postApiV10
NewsletterSubscriptionResponse
>
=>
{
return
useCustomClient
<
post
NewsletterSubscriptionResponse
>
(
getPost
NewsletterSubscriptionUrl
(),
return
useCustomClient
<
post
ApiV10NewsletterSubscriptionResponse
>
(
getPostApiV10
NewsletterSubscriptionUrl
(),
{
...
options
,
method
:
'POST'
,
...
...
@@ -475,11 +475,11 @@ export const postNewsletterSubscription = async (newsletterSubscriptionMutate: N
export
const
getPostNewsletterSubscriptionMutationOptions
=
<
TError
=
ErrorType
<
unknown
>
,
TContext
=
unknown
>
(
options
?:
{
mutation
?:
UseMutationOptions
<
Awaited
<
ReturnType
<
typeof
postNewsletterSubscription
>>
,
TError
,{
data
:
BodyType
<
NewsletterSubscriptionMutate
>
},
TContext
>
,
request
?:
SecondParameter
<
typeof
useCustomClient
>
}
):
UseMutationOptions
<
Awaited
<
ReturnType
<
typeof
postNewsletterSubscription
>>
,
TError
,{
data
:
BodyType
<
NewsletterSubscriptionMutate
>
},
TContext
>
=>
{
export
const
getPost
ApiV10
NewsletterSubscriptionMutationOptions
=
<
TError
=
ErrorType
<
unknown
>
,
TContext
=
unknown
>
(
options
?:
{
mutation
?:
UseMutationOptions
<
Awaited
<
ReturnType
<
typeof
post
ApiV10
NewsletterSubscription
>>
,
TError
,{
data
:
BodyType
<
NewsletterSubscriptionMutate
>
},
TContext
>
,
request
?:
SecondParameter
<
typeof
useCustomClient
>
}
):
UseMutationOptions
<
Awaited
<
ReturnType
<
typeof
post
ApiV10
NewsletterSubscription
>>
,
TError
,{
data
:
BodyType
<
NewsletterSubscriptionMutate
>
},
TContext
>
=>
{
const
mutationKey
=
[
'postNewsletterSubscription'
];
const
mutationKey
=
[
'post
ApiV10
NewsletterSubscription'
];
const
{
mutation
:
mutationOptions
,
request
:
requestOptions
}
=
options
?
options
.
mutation
&&
'mutationKey'
in
options
.
mutation
&&
options
.
mutation
.
mutationKey
?
options
...
...
@@ -489,10 +489,10 @@ const {mutation: mutationOptions, request: requestOptions} = options ?
const
mutationFn
:
MutationFunction
<
Awaited
<
ReturnType
<
typeof
postNewsletterSubscription
>>
,
{
data
:
BodyType
<
NewsletterSubscriptionMutate
>
}
>
=
(
props
)
=>
{
const
mutationFn
:
MutationFunction
<
Awaited
<
ReturnType
<
typeof
post
ApiV10
NewsletterSubscription
>>
,
{
data
:
BodyType
<
NewsletterSubscriptionMutate
>
}
>
=
(
props
)
=>
{
const
{
data
}
=
props
??
{};
return
postNewsletterSubscription
(
data
,
requestOptions
)
return
post
ApiV10
NewsletterSubscription
(
data
,
requestOptions
)
}
...
...
@@ -500,23 +500,23 @@ const {mutation: mutationOptions, request: requestOptions} = options ?
return
{
mutationFn
,
...
mutationOptions
}}
export
type
Post
NewsletterSubscriptionMutationResult
=
NonNullable
<
Awaited
<
ReturnType
<
typeof
post
NewsletterSubscription
>>>
export
type
PostNewsletterSubscriptionMutationBody
=
BodyType
<
NewsletterSubscriptionMutate
>
export
type
PostNewsletterSubscriptionMutationError
=
ErrorType
<
unknown
>
export
type
Post
ApiV10NewsletterSubscriptionMutationResult
=
NonNullable
<
Awaited
<
ReturnType
<
typeof
postApiV10
NewsletterSubscription
>>>
export
type
Post
ApiV10
NewsletterSubscriptionMutationBody
=
BodyType
<
NewsletterSubscriptionMutate
>
export
type
Post
ApiV10
NewsletterSubscriptionMutationError
=
ErrorType
<
unknown
>
/**
* @summary Subscribe newsletter email
*/
export
const
usePostNewsletterSubscription
=
<
TError
=
ErrorType
<
unknown
>
,
TContext
=
unknown
>
(
options
?:
{
mutation
?:
UseMutationOptions
<
Awaited
<
ReturnType
<
typeof
postNewsletterSubscription
>>
,
TError
,{
data
:
BodyType
<
NewsletterSubscriptionMutate
>
},
TContext
>
,
request
?:
SecondParameter
<
typeof
useCustomClient
>
}
export
const
usePost
ApiV10
NewsletterSubscription
=
<
TError
=
ErrorType
<
unknown
>
,
TContext
=
unknown
>
(
options
?:
{
mutation
?:
UseMutationOptions
<
Awaited
<
ReturnType
<
typeof
post
ApiV10
NewsletterSubscription
>>
,
TError
,{
data
:
BodyType
<
NewsletterSubscriptionMutate
>
},
TContext
>
,
request
?:
SecondParameter
<
typeof
useCustomClient
>
}
,
queryClient
?:
QueryClient
):
UseMutationResult
<
Awaited
<
ReturnType
<
typeof
postNewsletterSubscription
>>
,
Awaited
<
ReturnType
<
typeof
post
ApiV10
NewsletterSubscription
>>
,
TError
,
{
data
:
BodyType
<
NewsletterSubscriptionMutate
>
},
TContext
>
=>
{
const
mutationOptions
=
getPostNewsletterSubscriptionMutationOptions
(
options
);
const
mutationOptions
=
getPost
ApiV10
NewsletterSubscriptionMutationOptions
(
options
);
return
useMutation
(
mutationOptions
,
queryClient
);
}
src/api/endpoints/page-config.ts
View file @
b3589a95
/**
* Generated by orval v8.0.0-rc.0 🍺
* Do not edit manually.
*
Backend Template
*
Coded by Meu TEAM
*
VietProDev CMS Backend API
*
Generated API documentation
* OpenAPI spec version: 1.0.0
*/
import
{
...
...
@@ -30,9 +30,9 @@ import type {
}
from
'@tanstack/react-query'
;
import
type
{
GetPageConfigParams
,
PostPageConfigBody
,
PutPageConfigIdBody
Get
ApiV10
PageConfigParams
,
Post
ApiV10
PageConfigBody
,
Put
ApiV10
PageConfigIdBody
}
from
'../models'
;
import
{
useCustomClient
}
from
'../mutator/custom-client'
;
...
...
@@ -48,36 +48,36 @@ type SecondParameter<T extends (...args: never) => unknown> = Parameters<T>[1];
* Retrieve hierarchical page config by its ID
* @summary Get hierarchical pageConfig by ID
*/
export
type
getPageConfigIdResponse200
=
{
export
type
get
ApiV10
PageConfigIdResponse200
=
{
data
:
void
status
:
200
}
export
type
getPageConfigIdResponse404
=
{
export
type
get
ApiV10
PageConfigIdResponse404
=
{
data
:
void
status
:
404
}
export
type
get
PageConfigIdResponseSuccess
=
(
get
PageConfigIdResponse200
)
&
{
export
type
get
ApiV10PageConfigIdResponseSuccess
=
(
getApiV10
PageConfigIdResponse200
)
&
{
headers
:
Headers
;
};
export
type
get
PageConfigIdResponseError
=
(
get
PageConfigIdResponse404
)
&
{
export
type
get
ApiV10PageConfigIdResponseError
=
(
getApiV10
PageConfigIdResponse404
)
&
{
headers
:
Headers
;
};
export
type
get
PageConfigIdResponse
=
(
getPageConfigIdResponseSuccess
|
get
PageConfigIdResponseError
)
export
type
get
ApiV10PageConfigIdResponse
=
(
getApiV10PageConfigIdResponseSuccess
|
getApiV10
PageConfigIdResponseError
)
export
const
getGetPageConfigIdUrl
=
(
id
:
string
,)
=>
{
export
const
getGet
ApiV10
PageConfigIdUrl
=
(
id
:
string
,)
=>
{
return
`/pageConfig/
${
id
}
`
return
`/
api/v1.0/
pageConfig/
${
id
}
`
}
export
const
get
PageConfigId
=
async
(
id
:
string
,
options
?:
RequestInit
):
Promise
<
get
PageConfigIdResponse
>
=>
{
export
const
get
ApiV10PageConfigId
=
async
(
id
:
string
,
options
?:
RequestInit
):
Promise
<
getApiV10
PageConfigIdResponse
>
=>
{
return
useCustomClient
<
get
PageConfigIdResponse
>
(
getGet
PageConfigIdUrl
(
id
),
return
useCustomClient
<
get
ApiV10PageConfigIdResponse
>
(
getGetApiV10
PageConfigIdUrl
(
id
),
{
...
options
,
method
:
'GET'
...
...
@@ -90,75 +90,75 @@ export const getPageConfigId = async (id: string, options?: RequestInit): Promis
export
const
getGetPageConfigIdInfiniteQueryKey
=
(
id
?:
string
,)
=>
{
export
const
getGet
ApiV10
PageConfigIdInfiniteQueryKey
=
(
id
?:
string
,)
=>
{
return
[
'infinite'
,
`/pageConfig/
${
id
}
`
'infinite'
,
`/
api/v1.0/
pageConfig/
${
id
}
`
]
as
const
;
}
export
const
getGetPageConfigIdQueryKey
=
(
id
?:
string
,)
=>
{
export
const
getGet
ApiV10
PageConfigIdQueryKey
=
(
id
?:
string
,)
=>
{
return
[
`/pageConfig/
${
id
}
`
`/
api/v1.0/
pageConfig/
${
id
}
`
]
as
const
;
}
export
const
getGet
PageConfigIdInfiniteQueryOptions
=
<
TData
=
InfiniteData
<
Awaited
<
ReturnType
<
typeof
getPageConfigId
>>>
,
TError
=
ErrorType
<
void
>>
(
id
:
string
,
options
?:
{
query
?:
Partial
<
UseInfiniteQueryOptions
<
Awaited
<
ReturnType
<
typeof
get
PageConfigId
>>
,
TError
,
TData
>>
,
request
?:
SecondParameter
<
typeof
useCustomClient
>
}
export
const
getGet
ApiV10PageConfigIdInfiniteQueryOptions
=
<
TData
=
InfiniteData
<
Awaited
<
ReturnType
<
typeof
getApiV10PageConfigId
>>>
,
TError
=
ErrorType
<
void
>>
(
id
:
string
,
options
?:
{
query
?:
Partial
<
UseInfiniteQueryOptions
<
Awaited
<
ReturnType
<
typeof
getApiV10
PageConfigId
>>
,
TError
,
TData
>>
,
request
?:
SecondParameter
<
typeof
useCustomClient
>
}
)
=>
{
const
{
query
:
queryOptions
,
request
:
requestOptions
}
=
options
??
{};
const
queryKey
=
queryOptions
?.
queryKey
??
getGetPageConfigIdInfiniteQueryKey
(
id
);
const
queryKey
=
queryOptions
?.
queryKey
??
getGet
ApiV10
PageConfigIdInfiniteQueryKey
(
id
);
const
queryFn
:
QueryFunction
<
Awaited
<
ReturnType
<
typeof
get
PageConfigId
>>>
=
({
signal
})
=>
get
PageConfigId
(
id
,
{
signal
,
...
requestOptions
});
const
queryFn
:
QueryFunction
<
Awaited
<
ReturnType
<
typeof
get
ApiV10PageConfigId
>>>
=
({
signal
})
=>
getApiV10
PageConfigId
(
id
,
{
signal
,
...
requestOptions
});
return
{
queryKey
,
queryFn
,
enabled
:
!!
(
id
),
retry
:
3
,
retryDelay
:
1000
,
...
queryOptions
}
as
UseInfiniteQueryOptions
<
Awaited
<
ReturnType
<
typeof
getPageConfigId
>>
,
TError
,
TData
>
&
{
queryKey
:
DataTag
<
QueryKey
,
TData
,
TError
>
}
return
{
queryKey
,
queryFn
,
enabled
:
!!
(
id
),
retry
:
3
,
retryDelay
:
1000
,
...
queryOptions
}
as
UseInfiniteQueryOptions
<
Awaited
<
ReturnType
<
typeof
get
ApiV10
PageConfigId
>>
,
TError
,
TData
>
&
{
queryKey
:
DataTag
<
QueryKey
,
TData
,
TError
>
}
}
export
type
Get
PageConfigIdInfiniteQueryResult
=
NonNullable
<
Awaited
<
ReturnType
<
typeof
get
PageConfigId
>>>
export
type
GetPageConfigIdInfiniteQueryError
=
ErrorType
<
void
>
export
type
Get
ApiV10PageConfigIdInfiniteQueryResult
=
NonNullable
<
Awaited
<
ReturnType
<
typeof
getApiV10
PageConfigId
>>>
export
type
Get
ApiV10
PageConfigIdInfiniteQueryError
=
ErrorType
<
void
>
export
function
useGet
PageConfigIdInfinite
<
TData
=
InfiniteData
<
Awaited
<
ReturnType
<
typeof
get
PageConfigId
>>>
,
TError
=
ErrorType
<
void
>>
(
id
:
string
,
options
:
{
query
:
Partial
<
UseInfiniteQueryOptions
<
Awaited
<
ReturnType
<
typeof
getPageConfigId
>>
,
TError
,
TData
>>
&
Pick
<
export
function
useGet
ApiV10PageConfigIdInfinite
<
TData
=
InfiniteData
<
Awaited
<
ReturnType
<
typeof
getApiV10
PageConfigId
>>>
,
TError
=
ErrorType
<
void
>>
(
id
:
string
,
options
:
{
query
:
Partial
<
UseInfiniteQueryOptions
<
Awaited
<
ReturnType
<
typeof
get
ApiV10
PageConfigId
>>
,
TError
,
TData
>>
&
Pick
<
DefinedInitialDataOptions
<
Awaited
<
ReturnType
<
typeof
getPageConfigId
>>
,
Awaited
<
ReturnType
<
typeof
get
ApiV10
PageConfigId
>>
,
TError
,
Awaited
<
ReturnType
<
typeof
getPageConfigId
>>
Awaited
<
ReturnType
<
typeof
get
ApiV10
PageConfigId
>>
>
,
'initialData'
>
,
request
?:
SecondParameter
<
typeof
useCustomClient
>
}
,
queryClient
?:
QueryClient
):
DefinedUseInfiniteQueryResult
<
TData
,
TError
>
&
{
queryKey
:
DataTag
<
QueryKey
,
TData
,
TError
>
}
export
function
useGet
PageConfigIdInfinite
<
TData
=
InfiniteData
<
Awaited
<
ReturnType
<
typeof
get
PageConfigId
>>>
,
TError
=
ErrorType
<
void
>>
(
id
:
string
,
options
?:
{
query
?:
Partial
<
UseInfiniteQueryOptions
<
Awaited
<
ReturnType
<
typeof
getPageConfigId
>>
,
TError
,
TData
>>
&
Pick
<
export
function
useGet
ApiV10PageConfigIdInfinite
<
TData
=
InfiniteData
<
Awaited
<
ReturnType
<
typeof
getApiV10
PageConfigId
>>>
,
TError
=
ErrorType
<
void
>>
(
id
:
string
,
options
?:
{
query
?:
Partial
<
UseInfiniteQueryOptions
<
Awaited
<
ReturnType
<
typeof
get
ApiV10
PageConfigId
>>
,
TError
,
TData
>>
&
Pick
<
UndefinedInitialDataOptions
<
Awaited
<
ReturnType
<
typeof
getPageConfigId
>>
,
Awaited
<
ReturnType
<
typeof
get
ApiV10
PageConfigId
>>
,
TError
,
Awaited
<
ReturnType
<
typeof
getPageConfigId
>>
Awaited
<
ReturnType
<
typeof
get
ApiV10
PageConfigId
>>
>
,
'initialData'
>
,
request
?:
SecondParameter
<
typeof
useCustomClient
>
}
,
queryClient
?:
QueryClient
):
UseInfiniteQueryResult
<
TData
,
TError
>
&
{
queryKey
:
DataTag
<
QueryKey
,
TData
,
TError
>
}
export
function
useGet
PageConfigIdInfinite
<
TData
=
InfiniteData
<
Awaited
<
ReturnType
<
typeof
get
PageConfigId
>>>
,
TError
=
ErrorType
<
void
>>
(
id
:
string
,
options
?:
{
query
?:
Partial
<
UseInfiniteQueryOptions
<
Awaited
<
ReturnType
<
typeof
getPageConfigId
>>
,
TError
,
TData
>>
,
request
?:
SecondParameter
<
typeof
useCustomClient
>
}
export
function
useGet
ApiV10PageConfigIdInfinite
<
TData
=
InfiniteData
<
Awaited
<
ReturnType
<
typeof
getApiV10
PageConfigId
>>>
,
TError
=
ErrorType
<
void
>>
(
id
:
string
,
options
?:
{
query
?:
Partial
<
UseInfiniteQueryOptions
<
Awaited
<
ReturnType
<
typeof
get
ApiV10
PageConfigId
>>
,
TError
,
TData
>>
,
request
?:
SecondParameter
<
typeof
useCustomClient
>
}
,
queryClient
?:
QueryClient
):
UseInfiniteQueryResult
<
TData
,
TError
>
&
{
queryKey
:
DataTag
<
QueryKey
,
TData
,
TError
>
}
/**
* @summary Get hierarchical pageConfig by ID
*/
export
function
useGet
PageConfigIdInfinite
<
TData
=
InfiniteData
<
Awaited
<
ReturnType
<
typeof
get
PageConfigId
>>>
,
TError
=
ErrorType
<
void
>>
(
id
:
string
,
options
?:
{
query
?:
Partial
<
UseInfiniteQueryOptions
<
Awaited
<
ReturnType
<
typeof
getPageConfigId
>>
,
TError
,
TData
>>
,
request
?:
SecondParameter
<
typeof
useCustomClient
>
}
export
function
useGet
ApiV10PageConfigIdInfinite
<
TData
=
InfiniteData
<
Awaited
<
ReturnType
<
typeof
getApiV10
PageConfigId
>>>
,
TError
=
ErrorType
<
void
>>
(
id
:
string
,
options
?:
{
query
?:
Partial
<
UseInfiniteQueryOptions
<
Awaited
<
ReturnType
<
typeof
get
ApiV10
PageConfigId
>>
,
TError
,
TData
>>
,
request
?:
SecondParameter
<
typeof
useCustomClient
>
}
,
queryClient
?:
QueryClient
):
UseInfiniteQueryResult
<
TData
,
TError
>
&
{
queryKey
:
DataTag
<
QueryKey
,
TData
,
TError
>
}
{
const
queryOptions
=
getGetPageConfigIdInfiniteQueryOptions
(
id
,
options
)
const
queryOptions
=
getGet
ApiV10
PageConfigIdInfiniteQueryOptions
(
id
,
options
)
const
query
=
useInfiniteQuery
(
queryOptions
,
queryClient
)
as
UseInfiniteQueryResult
<
TData
,
TError
>
&
{
queryKey
:
DataTag
<
QueryKey
,
TData
,
TError
>
};
...
...
@@ -170,12 +170,12 @@ export function useGetPageConfigIdInfinite<TData = InfiniteData<Awaited<ReturnTy
/**
* @summary Get hierarchical pageConfig by ID
*/
export
const
prefetchGet
PageConfigIdInfiniteQuery
=
async
<
TData
=
Awaited
<
ReturnType
<
typeof
get
PageConfigId
>>
,
TError
=
ErrorType
<
void
>>
(
queryClient
:
QueryClient
,
id
:
string
,
options
?:
{
query
?:
Partial
<
UseInfiniteQueryOptions
<
Awaited
<
ReturnType
<
typeof
getPageConfigId
>>
,
TError
,
TData
>>
,
request
?:
SecondParameter
<
typeof
useCustomClient
>
}
export
const
prefetchGet
ApiV10PageConfigIdInfiniteQuery
=
async
<
TData
=
Awaited
<
ReturnType
<
typeof
getApiV10
PageConfigId
>>
,
TError
=
ErrorType
<
void
>>
(
queryClient
:
QueryClient
,
id
:
string
,
options
?:
{
query
?:
Partial
<
UseInfiniteQueryOptions
<
Awaited
<
ReturnType
<
typeof
get
ApiV10
PageConfigId
>>
,
TError
,
TData
>>
,
request
?:
SecondParameter
<
typeof
useCustomClient
>
}
):
Promise
<
QueryClient
>
=>
{
const
queryOptions
=
getGetPageConfigIdInfiniteQueryOptions
(
id
,
options
)
const
queryOptions
=
getGet
ApiV10
PageConfigIdInfiniteQueryOptions
(
id
,
options
)
await
queryClient
.
prefetchInfiniteQuery
(
queryOptions
);
...
...
@@ -184,62 +184,62 @@ export const prefetchGetPageConfigIdInfiniteQuery = async <TData = Awaited<Retur
export
const
getGet
PageConfigIdQueryOptions
=
<
TData
=
Awaited
<
ReturnType
<
typeof
getPageConfigId
>>
,
TError
=
ErrorType
<
void
>>
(
id
:
string
,
options
?:
{
query
?:
Partial
<
UseQueryOptions
<
Awaited
<
ReturnType
<
typeof
get
PageConfigId
>>
,
TError
,
TData
>>
,
request
?:
SecondParameter
<
typeof
useCustomClient
>
}
export
const
getGet
ApiV10PageConfigIdQueryOptions
=
<
TData
=
Awaited
<
ReturnType
<
typeof
getApiV10PageConfigId
>>
,
TError
=
ErrorType
<
void
>>
(
id
:
string
,
options
?:
{
query
?:
Partial
<
UseQueryOptions
<
Awaited
<
ReturnType
<
typeof
getApiV10
PageConfigId
>>
,
TError
,
TData
>>
,
request
?:
SecondParameter
<
typeof
useCustomClient
>
}
)
=>
{
const
{
query
:
queryOptions
,
request
:
requestOptions
}
=
options
??
{};
const
queryKey
=
queryOptions
?.
queryKey
??
getGetPageConfigIdQueryKey
(
id
);
const
queryKey
=
queryOptions
?.
queryKey
??
getGet
ApiV10
PageConfigIdQueryKey
(
id
);
const
queryFn
:
QueryFunction
<
Awaited
<
ReturnType
<
typeof
get
PageConfigId
>>>
=
({
signal
})
=>
get
PageConfigId
(
id
,
{
signal
,
...
requestOptions
});
const
queryFn
:
QueryFunction
<
Awaited
<
ReturnType
<
typeof
get
ApiV10PageConfigId
>>>
=
({
signal
})
=>
getApiV10
PageConfigId
(
id
,
{
signal
,
...
requestOptions
});
return
{
queryKey
,
queryFn
,
enabled
:
!!
(
id
),
retry
:
3
,
retryDelay
:
1000
,
...
queryOptions
}
as
UseQueryOptions
<
Awaited
<
ReturnType
<
typeof
getPageConfigId
>>
,
TError
,
TData
>
&
{
queryKey
:
DataTag
<
QueryKey
,
TData
,
TError
>
}
return
{
queryKey
,
queryFn
,
enabled
:
!!
(
id
),
retry
:
3
,
retryDelay
:
1000
,
...
queryOptions
}
as
UseQueryOptions
<
Awaited
<
ReturnType
<
typeof
get
ApiV10
PageConfigId
>>
,
TError
,
TData
>
&
{
queryKey
:
DataTag
<
QueryKey
,
TData
,
TError
>
}
}
export
type
Get
PageConfigIdQueryResult
=
NonNullable
<
Awaited
<
ReturnType
<
typeof
get
PageConfigId
>>>
export
type
GetPageConfigIdQueryError
=
ErrorType
<
void
>
export
type
Get
ApiV10PageConfigIdQueryResult
=
NonNullable
<
Awaited
<
ReturnType
<
typeof
getApiV10
PageConfigId
>>>
export
type
Get
ApiV10
PageConfigIdQueryError
=
ErrorType
<
void
>
export
function
useGet
PageConfigId
<
TData
=
Awaited
<
ReturnType
<
typeof
get
PageConfigId
>>
,
TError
=
ErrorType
<
void
>>
(
id
:
string
,
options
:
{
query
:
Partial
<
UseQueryOptions
<
Awaited
<
ReturnType
<
typeof
getPageConfigId
>>
,
TError
,
TData
>>
&
Pick
<
export
function
useGet
ApiV10PageConfigId
<
TData
=
Awaited
<
ReturnType
<
typeof
getApiV10
PageConfigId
>>
,
TError
=
ErrorType
<
void
>>
(
id
:
string
,
options
:
{
query
:
Partial
<
UseQueryOptions
<
Awaited
<
ReturnType
<
typeof
get
ApiV10
PageConfigId
>>
,
TError
,
TData
>>
&
Pick
<
DefinedInitialDataOptions
<
Awaited
<
ReturnType
<
typeof
getPageConfigId
>>
,
Awaited
<
ReturnType
<
typeof
get
ApiV10
PageConfigId
>>
,
TError
,
Awaited
<
ReturnType
<
typeof
getPageConfigId
>>
Awaited
<
ReturnType
<
typeof
get
ApiV10
PageConfigId
>>
>
,
'initialData'
>
,
request
?:
SecondParameter
<
typeof
useCustomClient
>
}
,
queryClient
?:
QueryClient
):
DefinedUseQueryResult
<
TData
,
TError
>
&
{
queryKey
:
DataTag
<
QueryKey
,
TData
,
TError
>
}
export
function
useGet
PageConfigId
<
TData
=
Awaited
<
ReturnType
<
typeof
get
PageConfigId
>>
,
TError
=
ErrorType
<
void
>>
(
id
:
string
,
options
?:
{
query
?:
Partial
<
UseQueryOptions
<
Awaited
<
ReturnType
<
typeof
getPageConfigId
>>
,
TError
,
TData
>>
&
Pick
<
export
function
useGet
ApiV10PageConfigId
<
TData
=
Awaited
<
ReturnType
<
typeof
getApiV10
PageConfigId
>>
,
TError
=
ErrorType
<
void
>>
(
id
:
string
,
options
?:
{
query
?:
Partial
<
UseQueryOptions
<
Awaited
<
ReturnType
<
typeof
get
ApiV10
PageConfigId
>>
,
TError
,
TData
>>
&
Pick
<
UndefinedInitialDataOptions
<
Awaited
<
ReturnType
<
typeof
getPageConfigId
>>
,
Awaited
<
ReturnType
<
typeof
get
ApiV10
PageConfigId
>>
,
TError
,
Awaited
<
ReturnType
<
typeof
getPageConfigId
>>
Awaited
<
ReturnType
<
typeof
get
ApiV10
PageConfigId
>>
>
,
'initialData'
>
,
request
?:
SecondParameter
<
typeof
useCustomClient
>
}
,
queryClient
?:
QueryClient
):
UseQueryResult
<
TData
,
TError
>
&
{
queryKey
:
DataTag
<
QueryKey
,
TData
,
TError
>
}
export
function
useGet
PageConfigId
<
TData
=
Awaited
<
ReturnType
<
typeof
get
PageConfigId
>>
,
TError
=
ErrorType
<
void
>>
(
id
:
string
,
options
?:
{
query
?:
Partial
<
UseQueryOptions
<
Awaited
<
ReturnType
<
typeof
getPageConfigId
>>
,
TError
,
TData
>>
,
request
?:
SecondParameter
<
typeof
useCustomClient
>
}
export
function
useGet
ApiV10PageConfigId
<
TData
=
Awaited
<
ReturnType
<
typeof
getApiV10
PageConfigId
>>
,
TError
=
ErrorType
<
void
>>
(
id
:
string
,
options
?:
{
query
?:
Partial
<
UseQueryOptions
<
Awaited
<
ReturnType
<
typeof
get
ApiV10
PageConfigId
>>
,
TError
,
TData
>>
,
request
?:
SecondParameter
<
typeof
useCustomClient
>
}
,
queryClient
?:
QueryClient
):
UseQueryResult
<
TData
,
TError
>
&
{
queryKey
:
DataTag
<
QueryKey
,
TData
,
TError
>
}
/**
* @summary Get hierarchical pageConfig by ID
*/
export
function
useGet
PageConfigId
<
TData
=
Awaited
<
ReturnType
<
typeof
get
PageConfigId
>>
,
TError
=
ErrorType
<
void
>>
(
id
:
string
,
options
?:
{
query
?:
Partial
<
UseQueryOptions
<
Awaited
<
ReturnType
<
typeof
getPageConfigId
>>
,
TError
,
TData
>>
,
request
?:
SecondParameter
<
typeof
useCustomClient
>
}
export
function
useGet
ApiV10PageConfigId
<
TData
=
Awaited
<
ReturnType
<
typeof
getApiV10
PageConfigId
>>
,
TError
=
ErrorType
<
void
>>
(
id
:
string
,
options
?:
{
query
?:
Partial
<
UseQueryOptions
<
Awaited
<
ReturnType
<
typeof
get
ApiV10
PageConfigId
>>
,
TError
,
TData
>>
,
request
?:
SecondParameter
<
typeof
useCustomClient
>
}
,
queryClient
?:
QueryClient
):
UseQueryResult
<
TData
,
TError
>
&
{
queryKey
:
DataTag
<
QueryKey
,
TData
,
TError
>
}
{
const
queryOptions
=
getGetPageConfigIdQueryOptions
(
id
,
options
)
const
queryOptions
=
getGet
ApiV10
PageConfigIdQueryOptions
(
id
,
options
)
const
query
=
useQuery
(
queryOptions
,
queryClient
)
as
UseQueryResult
<
TData
,
TError
>
&
{
queryKey
:
DataTag
<
QueryKey
,
TData
,
TError
>
};
...
...
@@ -251,12 +251,12 @@ export function useGetPageConfigId<TData = Awaited<ReturnType<typeof getPageConf
/**
* @summary Get hierarchical pageConfig by ID
*/
export
const
prefetchGet
PageConfigIdQuery
=
async
<
TData
=
Awaited
<
ReturnType
<
typeof
get
PageConfigId
>>
,
TError
=
ErrorType
<
void
>>
(
queryClient
:
QueryClient
,
id
:
string
,
options
?:
{
query
?:
Partial
<
UseQueryOptions
<
Awaited
<
ReturnType
<
typeof
getPageConfigId
>>
,
TError
,
TData
>>
,
request
?:
SecondParameter
<
typeof
useCustomClient
>
}
export
const
prefetchGet
ApiV10PageConfigIdQuery
=
async
<
TData
=
Awaited
<
ReturnType
<
typeof
getApiV10
PageConfigId
>>
,
TError
=
ErrorType
<
void
>>
(
queryClient
:
QueryClient
,
id
:
string
,
options
?:
{
query
?:
Partial
<
UseQueryOptions
<
Awaited
<
ReturnType
<
typeof
get
ApiV10
PageConfigId
>>
,
TError
,
TData
>>
,
request
?:
SecondParameter
<
typeof
useCustomClient
>
}
):
Promise
<
QueryClient
>
=>
{
const
queryOptions
=
getGetPageConfigIdQueryOptions
(
id
,
options
)
const
queryOptions
=
getGet
ApiV10
PageConfigIdQueryOptions
(
id
,
options
)
await
queryClient
.
prefetchQuery
(
queryOptions
);
...
...
@@ -269,54 +269,54 @@ export const prefetchGetPageConfigIdQuery = async <TData = Awaited<ReturnType<ty
* Update a single pageConfig record by its ID. level is computed if parent_id changes and must not be sent.
* @summary Update pageConfig by ID
*/
export
type
putPageConfigIdResponse200
=
{
export
type
put
ApiV10
PageConfigIdResponse200
=
{
data
:
void
status
:
200
}
export
type
putPageConfigIdResponse404
=
{
export
type
put
ApiV10
PageConfigIdResponse404
=
{
data
:
void
status
:
404
}
export
type
put
PageConfigIdResponseSuccess
=
(
put
PageConfigIdResponse200
)
&
{
export
type
put
ApiV10PageConfigIdResponseSuccess
=
(
putApiV10
PageConfigIdResponse200
)
&
{
headers
:
Headers
;
};
export
type
put
PageConfigIdResponseError
=
(
put
PageConfigIdResponse404
)
&
{
export
type
put
ApiV10PageConfigIdResponseError
=
(
putApiV10
PageConfigIdResponse404
)
&
{
headers
:
Headers
;
};
export
type
put
PageConfigIdResponse
=
(
putPageConfigIdResponseSuccess
|
put
PageConfigIdResponseError
)
export
type
put
ApiV10PageConfigIdResponse
=
(
putApiV10PageConfigIdResponseSuccess
|
putApiV10
PageConfigIdResponseError
)
export
const
getPutPageConfigIdUrl
=
(
id
:
string
,)
=>
{
export
const
getPut
ApiV10
PageConfigIdUrl
=
(
id
:
string
,)
=>
{
return
`/pageConfig/
${
id
}
`
return
`/
api/v1.0/
pageConfig/
${
id
}
`
}
export
const
putPageConfigId
=
async
(
id
:
string
,
put
PageConfigIdBody
:
PutPageConfigIdBody
,
options
?:
RequestInit
):
Promise
<
put
PageConfigIdResponse
>
=>
{
export
const
put
ApiV10
PageConfigId
=
async
(
id
:
string
,
put
ApiV10PageConfigIdBody
:
PutApiV10PageConfigIdBody
,
options
?:
RequestInit
):
Promise
<
putApiV10
PageConfigIdResponse
>
=>
{
return
useCustomClient
<
put
PageConfigIdResponse
>
(
getPut
PageConfigIdUrl
(
id
),
return
useCustomClient
<
put
ApiV10PageConfigIdResponse
>
(
getPutApiV10
PageConfigIdUrl
(
id
),
{
...
options
,
method
:
'PUT'
,
headers
:
{
'Content-Type'
:
'application/json'
,
...
options
?.
headers
},
body
:
JSON
.
stringify
(
putPageConfigIdBody
,)
put
ApiV10
PageConfigIdBody
,)
}
);}
export
const
getPutPageConfigIdMutationOptions
=
<
TError
=
ErrorType
<
void
>
,
TContext
=
unknown
>
(
options
?:
{
mutation
?:
UseMutationOptions
<
Awaited
<
ReturnType
<
typeof
put
PageConfigId
>>
,
TError
,{
id
:
string
;
data
:
BodyType
<
Put
PageConfigIdBody
>
},
TContext
>
,
request
?:
SecondParameter
<
typeof
useCustomClient
>
}
):
UseMutationOptions
<
Awaited
<
ReturnType
<
typeof
put
PageConfigId
>>
,
TError
,{
id
:
string
;
data
:
BodyType
<
Put
PageConfigIdBody
>
},
TContext
>
=>
{
export
const
getPut
ApiV10
PageConfigIdMutationOptions
=
<
TError
=
ErrorType
<
void
>
,
TContext
=
unknown
>
(
options
?:
{
mutation
?:
UseMutationOptions
<
Awaited
<
ReturnType
<
typeof
put
ApiV10PageConfigId
>>
,
TError
,{
id
:
string
;
data
:
BodyType
<
PutApiV10
PageConfigIdBody
>
},
TContext
>
,
request
?:
SecondParameter
<
typeof
useCustomClient
>
}
):
UseMutationOptions
<
Awaited
<
ReturnType
<
typeof
put
ApiV10PageConfigId
>>
,
TError
,{
id
:
string
;
data
:
BodyType
<
PutApiV10
PageConfigIdBody
>
},
TContext
>
=>
{
const
mutationKey
=
[
'putPageConfigId'
];
const
mutationKey
=
[
'put
ApiV10
PageConfigId'
];
const
{
mutation
:
mutationOptions
,
request
:
requestOptions
}
=
options
?
options
.
mutation
&&
'mutationKey'
in
options
.
mutation
&&
options
.
mutation
.
mutationKey
?
options
...
...
@@ -326,10 +326,10 @@ const {mutation: mutationOptions, request: requestOptions} = options ?
const
mutationFn
:
MutationFunction
<
Awaited
<
ReturnType
<
typeof
put
PageConfigId
>>
,
{
id
:
string
;
data
:
BodyType
<
Put
PageConfigIdBody
>
}
>
=
(
props
)
=>
{
const
mutationFn
:
MutationFunction
<
Awaited
<
ReturnType
<
typeof
put
ApiV10PageConfigId
>>
,
{
id
:
string
;
data
:
BodyType
<
PutApiV10
PageConfigIdBody
>
}
>
=
(
props
)
=>
{
const
{
id
,
data
}
=
props
??
{};
return
putPageConfigId
(
id
,
data
,
requestOptions
)
return
put
ApiV10
PageConfigId
(
id
,
data
,
requestOptions
)
}
...
...
@@ -337,23 +337,23 @@ const {mutation: mutationOptions, request: requestOptions} = options ?
return
{
mutationFn
,
...
mutationOptions
}}
export
type
Put
PageConfigIdMutationResult
=
NonNullable
<
Awaited
<
ReturnType
<
typeof
put
PageConfigId
>>>
export
type
Put
PageConfigIdMutationBody
=
BodyType
<
Put
PageConfigIdBody
>
export
type
PutPageConfigIdMutationError
=
ErrorType
<
void
>
export
type
Put
ApiV10PageConfigIdMutationResult
=
NonNullable
<
Awaited
<
ReturnType
<
typeof
putApiV10
PageConfigId
>>>
export
type
Put
ApiV10PageConfigIdMutationBody
=
BodyType
<
PutApiV10
PageConfigIdBody
>
export
type
Put
ApiV10
PageConfigIdMutationError
=
ErrorType
<
void
>
/**
* @summary Update pageConfig by ID
*/
export
const
usePutPageConfigId
=
<
TError
=
ErrorType
<
void
>
,
TContext
=
unknown
>
(
options
?:
{
mutation
?:
UseMutationOptions
<
Awaited
<
ReturnType
<
typeof
put
PageConfigId
>>
,
TError
,{
id
:
string
;
data
:
BodyType
<
Put
PageConfigIdBody
>
},
TContext
>
,
request
?:
SecondParameter
<
typeof
useCustomClient
>
}
export
const
usePut
ApiV10
PageConfigId
=
<
TError
=
ErrorType
<
void
>
,
TContext
=
unknown
>
(
options
?:
{
mutation
?:
UseMutationOptions
<
Awaited
<
ReturnType
<
typeof
put
ApiV10PageConfigId
>>
,
TError
,{
id
:
string
;
data
:
BodyType
<
PutApiV10
PageConfigIdBody
>
},
TContext
>
,
request
?:
SecondParameter
<
typeof
useCustomClient
>
}
,
queryClient
?:
QueryClient
):
UseMutationResult
<
Awaited
<
ReturnType
<
typeof
putPageConfigId
>>
,
Awaited
<
ReturnType
<
typeof
put
ApiV10
PageConfigId
>>
,
TError
,
{
id
:
string
;
data
:
BodyType
<
PutPageConfigIdBody
>
},
{
id
:
string
;
data
:
BodyType
<
Put
ApiV10
PageConfigIdBody
>
},
TContext
>
=>
{
const
mutationOptions
=
getPutPageConfigIdMutationOptions
(
options
);
const
mutationOptions
=
getPut
ApiV10
PageConfigIdMutationOptions
(
options
);
return
useMutation
(
mutationOptions
,
queryClient
);
}
...
...
@@ -361,36 +361,36 @@ export const usePutPageConfigId = <TError = ErrorType<void>,
* Delete a single pageConfig record by its ID
* @summary Delete pageConfig by ID
*/
export
type
deletePageConfigIdResponse200
=
{
export
type
delete
ApiV10
PageConfigIdResponse200
=
{
data
:
void
status
:
200
}
export
type
deletePageConfigIdResponse404
=
{
export
type
delete
ApiV10
PageConfigIdResponse404
=
{
data
:
void
status
:
404
}
export
type
delete
PageConfigIdResponseSuccess
=
(
delete
PageConfigIdResponse200
)
&
{
export
type
delete
ApiV10PageConfigIdResponseSuccess
=
(
deleteApiV10
PageConfigIdResponse200
)
&
{
headers
:
Headers
;
};
export
type
delete
PageConfigIdResponseError
=
(
delete
PageConfigIdResponse404
)
&
{
export
type
delete
ApiV10PageConfigIdResponseError
=
(
deleteApiV10
PageConfigIdResponse404
)
&
{
headers
:
Headers
;
};
export
type
delete
PageConfigIdResponse
=
(
deletePageConfigIdResponseSuccess
|
delete
PageConfigIdResponseError
)
export
type
delete
ApiV10PageConfigIdResponse
=
(
deleteApiV10PageConfigIdResponseSuccess
|
deleteApiV10
PageConfigIdResponseError
)
export
const
getDeletePageConfigIdUrl
=
(
id
:
string
,)
=>
{
export
const
getDelete
ApiV10
PageConfigIdUrl
=
(
id
:
string
,)
=>
{
return
`/pageConfig/
${
id
}
`
return
`/
api/v1.0/
pageConfig/
${
id
}
`
}
export
const
delete
PageConfigId
=
async
(
id
:
string
,
options
?:
RequestInit
):
Promise
<
delete
PageConfigIdResponse
>
=>
{
export
const
delete
ApiV10PageConfigId
=
async
(
id
:
string
,
options
?:
RequestInit
):
Promise
<
deleteApiV10
PageConfigIdResponse
>
=>
{
return
useCustomClient
<
delete
PageConfigIdResponse
>
(
getDelete
PageConfigIdUrl
(
id
),
return
useCustomClient
<
delete
ApiV10PageConfigIdResponse
>
(
getDeleteApiV10
PageConfigIdUrl
(
id
),
{
...
options
,
method
:
'DELETE'
...
...
@@ -402,11 +402,11 @@ export const deletePageConfigId = async (id: string, options?: RequestInit): Pro
export
const
getDeletePageConfigIdMutationOptions
=
<
TError
=
ErrorType
<
void
>
,
TContext
=
unknown
>
(
options
?:
{
mutation
?:
UseMutationOptions
<
Awaited
<
ReturnType
<
typeof
deletePageConfigId
>>
,
TError
,{
id
:
string
},
TContext
>
,
request
?:
SecondParameter
<
typeof
useCustomClient
>
}
):
UseMutationOptions
<
Awaited
<
ReturnType
<
typeof
deletePageConfigId
>>
,
TError
,{
id
:
string
},
TContext
>
=>
{
export
const
getDelete
ApiV10
PageConfigIdMutationOptions
=
<
TError
=
ErrorType
<
void
>
,
TContext
=
unknown
>
(
options
?:
{
mutation
?:
UseMutationOptions
<
Awaited
<
ReturnType
<
typeof
delete
ApiV10
PageConfigId
>>
,
TError
,{
id
:
string
},
TContext
>
,
request
?:
SecondParameter
<
typeof
useCustomClient
>
}
):
UseMutationOptions
<
Awaited
<
ReturnType
<
typeof
delete
ApiV10
PageConfigId
>>
,
TError
,{
id
:
string
},
TContext
>
=>
{
const
mutationKey
=
[
'deletePageConfigId'
];
const
mutationKey
=
[
'delete
ApiV10
PageConfigId'
];
const
{
mutation
:
mutationOptions
,
request
:
requestOptions
}
=
options
?
options
.
mutation
&&
'mutationKey'
in
options
.
mutation
&&
options
.
mutation
.
mutationKey
?
options
...
...
@@ -416,10 +416,10 @@ const {mutation: mutationOptions, request: requestOptions} = options ?
const
mutationFn
:
MutationFunction
<
Awaited
<
ReturnType
<
typeof
deletePageConfigId
>>
,
{
id
:
string
}
>
=
(
props
)
=>
{
const
mutationFn
:
MutationFunction
<
Awaited
<
ReturnType
<
typeof
delete
ApiV10
PageConfigId
>>
,
{
id
:
string
}
>
=
(
props
)
=>
{
const
{
id
}
=
props
??
{};
return
deletePageConfigId
(
id
,
requestOptions
)
return
delete
ApiV10
PageConfigId
(
id
,
requestOptions
)
}
...
...
@@ -427,23 +427,23 @@ const {mutation: mutationOptions, request: requestOptions} = options ?
return
{
mutationFn
,
...
mutationOptions
}}
export
type
Delete
PageConfigIdMutationResult
=
NonNullable
<
Awaited
<
ReturnType
<
typeof
delete
PageConfigId
>>>
export
type
Delete
ApiV10PageConfigIdMutationResult
=
NonNullable
<
Awaited
<
ReturnType
<
typeof
deleteApiV10
PageConfigId
>>>
export
type
DeletePageConfigIdMutationError
=
ErrorType
<
void
>
export
type
Delete
ApiV10
PageConfigIdMutationError
=
ErrorType
<
void
>
/**
* @summary Delete pageConfig by ID
*/
export
const
useDeletePageConfigId
=
<
TError
=
ErrorType
<
void
>
,
TContext
=
unknown
>
(
options
?:
{
mutation
?:
UseMutationOptions
<
Awaited
<
ReturnType
<
typeof
deletePageConfigId
>>
,
TError
,{
id
:
string
},
TContext
>
,
request
?:
SecondParameter
<
typeof
useCustomClient
>
}
export
const
useDelete
ApiV10
PageConfigId
=
<
TError
=
ErrorType
<
void
>
,
TContext
=
unknown
>
(
options
?:
{
mutation
?:
UseMutationOptions
<
Awaited
<
ReturnType
<
typeof
delete
ApiV10
PageConfigId
>>
,
TError
,{
id
:
string
},
TContext
>
,
request
?:
SecondParameter
<
typeof
useCustomClient
>
}
,
queryClient
?:
QueryClient
):
UseMutationResult
<
Awaited
<
ReturnType
<
typeof
deletePageConfigId
>>
,
Awaited
<
ReturnType
<
typeof
delete
ApiV10
PageConfigId
>>
,
TError
,
{
id
:
string
},
TContext
>
=>
{
const
mutationOptions
=
getDeletePageConfigIdMutationOptions
(
options
);
const
mutationOptions
=
getDelete
ApiV10
PageConfigIdMutationOptions
(
options
);
return
useMutation
(
mutationOptions
,
queryClient
);
}
...
...
@@ -451,19 +451,19 @@ export const useDeletePageConfigId = <TError = ErrorType<void>,
* Retrieve hierarchical page config by id, static_link, or code. If no parameters are provided, returns the root hierarchical structure.
* @summary Get hierarchical pageConfig
*/
export
type
getPageConfigResponse200
=
{
export
type
get
ApiV10
PageConfigResponse200
=
{
data
:
void
status
:
200
}
export
type
get
PageConfigResponseSuccess
=
(
get
PageConfigResponse200
)
&
{
export
type
get
ApiV10PageConfigResponseSuccess
=
(
getApiV10
PageConfigResponse200
)
&
{
headers
:
Headers
;
};
;
export
type
get
PageConfigResponse
=
(
get
PageConfigResponseSuccess
)
export
type
get
ApiV10PageConfigResponse
=
(
getApiV10
PageConfigResponseSuccess
)
export
const
getGet
PageConfigUrl
=
(
params
?:
Get
PageConfigParams
,)
=>
{
export
const
getGet
ApiV10PageConfigUrl
=
(
params
?:
GetApiV10
PageConfigParams
,)
=>
{
const
normalizedParams
=
new
URLSearchParams
();
Object
.
entries
(
params
||
{}).
forEach
(([
key
,
value
])
=>
{
...
...
@@ -475,12 +475,12 @@ export const getGetPageConfigUrl = (params?: GetPageConfigParams,) => {
const
stringifiedParams
=
normalizedParams
.
toString
();
return
stringifiedParams
.
length
>
0
?
`/
pageConfig?
${
stringifiedParams
}
`
:
`
/pageConfig`
return
stringifiedParams
.
length
>
0
?
`/
api/v1.0/pageConfig?
${
stringifiedParams
}
`
:
`/api/v1.0
/pageConfig`
}
export
const
get
PageConfig
=
async
(
params
?:
GetPageConfigParams
,
options
?:
RequestInit
):
Promise
<
get
PageConfigResponse
>
=>
{
export
const
get
ApiV10PageConfig
=
async
(
params
?:
GetApiV10PageConfigParams
,
options
?:
RequestInit
):
Promise
<
getApiV10
PageConfigResponse
>
=>
{
return
useCustomClient
<
get
PageConfigResponse
>
(
getGet
PageConfigUrl
(
params
),
return
useCustomClient
<
get
ApiV10PageConfigResponse
>
(
getGetApiV10
PageConfigUrl
(
params
),
{
...
options
,
method
:
'GET'
...
...
@@ -493,75 +493,75 @@ export const getPageConfig = async (params?: GetPageConfigParams, options?: Requ
export
const
getGet
PageConfigInfiniteQueryKey
=
(
params
?:
Get
PageConfigParams
,)
=>
{
export
const
getGet
ApiV10PageConfigInfiniteQueryKey
=
(
params
?:
GetApiV10
PageConfigParams
,)
=>
{
return
[
'infinite'
,
`/pageConfig`
,
...(
params
?
[
params
]:
[])
'infinite'
,
`/
api/v1.0/
pageConfig`
,
...(
params
?
[
params
]:
[])
]
as
const
;
}
export
const
getGet
PageConfigQueryKey
=
(
params
?:
Get
PageConfigParams
,)
=>
{
export
const
getGet
ApiV10PageConfigQueryKey
=
(
params
?:
GetApiV10
PageConfigParams
,)
=>
{
return
[
`/pageConfig`
,
...(
params
?
[
params
]:
[])
`/
api/v1.0/
pageConfig`
,
...(
params
?
[
params
]:
[])
]
as
const
;
}
export
const
getGet
PageConfigInfiniteQueryOptions
=
<
TData
=
InfiniteData
<
Awaited
<
ReturnType
<
typeof
getPageConfig
>>>
,
TError
=
ErrorType
<
unknown
>>
(
params
?:
GetPageConfigParams
,
options
?:
{
query
?:
Partial
<
UseInfiniteQueryOptions
<
Awaited
<
ReturnType
<
typeof
get
PageConfig
>>
,
TError
,
TData
>>
,
request
?:
SecondParameter
<
typeof
useCustomClient
>
}
export
const
getGet
ApiV10PageConfigInfiniteQueryOptions
=
<
TData
=
InfiniteData
<
Awaited
<
ReturnType
<
typeof
getApiV10PageConfig
>>>
,
TError
=
ErrorType
<
unknown
>>
(
params
?:
GetApiV10PageConfigParams
,
options
?:
{
query
?:
Partial
<
UseInfiniteQueryOptions
<
Awaited
<
ReturnType
<
typeof
getApiV10
PageConfig
>>
,
TError
,
TData
>>
,
request
?:
SecondParameter
<
typeof
useCustomClient
>
}
)
=>
{
const
{
query
:
queryOptions
,
request
:
requestOptions
}
=
options
??
{};
const
queryKey
=
queryOptions
?.
queryKey
??
getGetPageConfigInfiniteQueryKey
(
params
);
const
queryKey
=
queryOptions
?.
queryKey
??
getGet
ApiV10
PageConfigInfiniteQueryKey
(
params
);
const
queryFn
:
QueryFunction
<
Awaited
<
ReturnType
<
typeof
get
PageConfig
>>>
=
({
signal
})
=>
get
PageConfig
(
params
,
{
signal
,
...
requestOptions
});
const
queryFn
:
QueryFunction
<
Awaited
<
ReturnType
<
typeof
get
ApiV10PageConfig
>>>
=
({
signal
})
=>
getApiV10
PageConfig
(
params
,
{
signal
,
...
requestOptions
});
return
{
queryKey
,
queryFn
,
retry
:
3
,
retryDelay
:
1000
,
...
queryOptions
}
as
UseInfiniteQueryOptions
<
Awaited
<
ReturnType
<
typeof
getPageConfig
>>
,
TError
,
TData
>
&
{
queryKey
:
DataTag
<
QueryKey
,
TData
,
TError
>
}
return
{
queryKey
,
queryFn
,
retry
:
3
,
retryDelay
:
1000
,
...
queryOptions
}
as
UseInfiniteQueryOptions
<
Awaited
<
ReturnType
<
typeof
get
ApiV10
PageConfig
>>
,
TError
,
TData
>
&
{
queryKey
:
DataTag
<
QueryKey
,
TData
,
TError
>
}
}
export
type
Get
PageConfigInfiniteQueryResult
=
NonNullable
<
Awaited
<
ReturnType
<
typeof
get
PageConfig
>>>
export
type
GetPageConfigInfiniteQueryError
=
ErrorType
<
unknown
>
export
type
Get
ApiV10PageConfigInfiniteQueryResult
=
NonNullable
<
Awaited
<
ReturnType
<
typeof
getApiV10
PageConfig
>>>
export
type
Get
ApiV10
PageConfigInfiniteQueryError
=
ErrorType
<
unknown
>
export
function
useGet
PageConfigInfinite
<
TData
=
InfiniteData
<
Awaited
<
ReturnType
<
typeof
get
PageConfig
>>>
,
TError
=
ErrorType
<
unknown
>>
(
params
:
undefined
|
Get
PageConfigParams
,
options
:
{
query
:
Partial
<
UseInfiniteQueryOptions
<
Awaited
<
ReturnType
<
typeof
get
PageConfig
>>
,
TError
,
TData
>>
&
Pick
<
export
function
useGet
ApiV10PageConfigInfinite
<
TData
=
InfiniteData
<
Awaited
<
ReturnType
<
typeof
getApiV10
PageConfig
>>>
,
TError
=
ErrorType
<
unknown
>>
(
params
:
undefined
|
Get
ApiV10PageConfigParams
,
options
:
{
query
:
Partial
<
UseInfiniteQueryOptions
<
Awaited
<
ReturnType
<
typeof
getApiV10
PageConfig
>>
,
TError
,
TData
>>
&
Pick
<
DefinedInitialDataOptions
<
Awaited
<
ReturnType
<
typeof
getPageConfig
>>
,
Awaited
<
ReturnType
<
typeof
get
ApiV10
PageConfig
>>
,
TError
,
Awaited
<
ReturnType
<
typeof
getPageConfig
>>
Awaited
<
ReturnType
<
typeof
get
ApiV10
PageConfig
>>
>
,
'initialData'
>
,
request
?:
SecondParameter
<
typeof
useCustomClient
>
}
,
queryClient
?:
QueryClient
):
DefinedUseInfiniteQueryResult
<
TData
,
TError
>
&
{
queryKey
:
DataTag
<
QueryKey
,
TData
,
TError
>
}
export
function
useGet
PageConfigInfinite
<
TData
=
InfiniteData
<
Awaited
<
ReturnType
<
typeof
get
PageConfig
>>>
,
TError
=
ErrorType
<
unknown
>>
(
params
?:
Get
PageConfigParams
,
options
?:
{
query
?:
Partial
<
UseInfiniteQueryOptions
<
Awaited
<
ReturnType
<
typeof
get
PageConfig
>>
,
TError
,
TData
>>
&
Pick
<
export
function
useGet
ApiV10PageConfigInfinite
<
TData
=
InfiniteData
<
Awaited
<
ReturnType
<
typeof
getApiV10
PageConfig
>>>
,
TError
=
ErrorType
<
unknown
>>
(
params
?:
Get
ApiV10PageConfigParams
,
options
?:
{
query
?:
Partial
<
UseInfiniteQueryOptions
<
Awaited
<
ReturnType
<
typeof
getApiV10
PageConfig
>>
,
TError
,
TData
>>
&
Pick
<
UndefinedInitialDataOptions
<
Awaited
<
ReturnType
<
typeof
getPageConfig
>>
,
Awaited
<
ReturnType
<
typeof
get
ApiV10
PageConfig
>>
,
TError
,
Awaited
<
ReturnType
<
typeof
getPageConfig
>>
Awaited
<
ReturnType
<
typeof
get
ApiV10
PageConfig
>>
>
,
'initialData'
>
,
request
?:
SecondParameter
<
typeof
useCustomClient
>
}
,
queryClient
?:
QueryClient
):
UseInfiniteQueryResult
<
TData
,
TError
>
&
{
queryKey
:
DataTag
<
QueryKey
,
TData
,
TError
>
}
export
function
useGet
PageConfigInfinite
<
TData
=
InfiniteData
<
Awaited
<
ReturnType
<
typeof
get
PageConfig
>>>
,
TError
=
ErrorType
<
unknown
>>
(
params
?:
Get
PageConfigParams
,
options
?:
{
query
?:
Partial
<
UseInfiniteQueryOptions
<
Awaited
<
ReturnType
<
typeof
get
PageConfig
>>
,
TError
,
TData
>>
,
request
?:
SecondParameter
<
typeof
useCustomClient
>
}
export
function
useGet
ApiV10PageConfigInfinite
<
TData
=
InfiniteData
<
Awaited
<
ReturnType
<
typeof
getApiV10
PageConfig
>>>
,
TError
=
ErrorType
<
unknown
>>
(
params
?:
Get
ApiV10PageConfigParams
,
options
?:
{
query
?:
Partial
<
UseInfiniteQueryOptions
<
Awaited
<
ReturnType
<
typeof
getApiV10
PageConfig
>>
,
TError
,
TData
>>
,
request
?:
SecondParameter
<
typeof
useCustomClient
>
}
,
queryClient
?:
QueryClient
):
UseInfiniteQueryResult
<
TData
,
TError
>
&
{
queryKey
:
DataTag
<
QueryKey
,
TData
,
TError
>
}
/**
* @summary Get hierarchical pageConfig
*/
export
function
useGet
PageConfigInfinite
<
TData
=
InfiniteData
<
Awaited
<
ReturnType
<
typeof
get
PageConfig
>>>
,
TError
=
ErrorType
<
unknown
>>
(
params
?:
Get
PageConfigParams
,
options
?:
{
query
?:
Partial
<
UseInfiniteQueryOptions
<
Awaited
<
ReturnType
<
typeof
get
PageConfig
>>
,
TError
,
TData
>>
,
request
?:
SecondParameter
<
typeof
useCustomClient
>
}
export
function
useGet
ApiV10PageConfigInfinite
<
TData
=
InfiniteData
<
Awaited
<
ReturnType
<
typeof
getApiV10
PageConfig
>>>
,
TError
=
ErrorType
<
unknown
>>
(
params
?:
Get
ApiV10PageConfigParams
,
options
?:
{
query
?:
Partial
<
UseInfiniteQueryOptions
<
Awaited
<
ReturnType
<
typeof
getApiV10
PageConfig
>>
,
TError
,
TData
>>
,
request
?:
SecondParameter
<
typeof
useCustomClient
>
}
,
queryClient
?:
QueryClient
):
UseInfiniteQueryResult
<
TData
,
TError
>
&
{
queryKey
:
DataTag
<
QueryKey
,
TData
,
TError
>
}
{
const
queryOptions
=
getGetPageConfigInfiniteQueryOptions
(
params
,
options
)
const
queryOptions
=
getGet
ApiV10
PageConfigInfiniteQueryOptions
(
params
,
options
)
const
query
=
useInfiniteQuery
(
queryOptions
,
queryClient
)
as
UseInfiniteQueryResult
<
TData
,
TError
>
&
{
queryKey
:
DataTag
<
QueryKey
,
TData
,
TError
>
};
...
...
@@ -573,12 +573,12 @@ export function useGetPageConfigInfinite<TData = InfiniteData<Awaited<ReturnType
/**
* @summary Get hierarchical pageConfig
*/
export
const
prefetchGet
PageConfigInfiniteQuery
=
async
<
TData
=
Awaited
<
ReturnType
<
typeof
get
PageConfig
>>
,
TError
=
ErrorType
<
unknown
>>
(
queryClient
:
QueryClient
,
params
?:
Get
PageConfigParams
,
options
?:
{
query
?:
Partial
<
UseInfiniteQueryOptions
<
Awaited
<
ReturnType
<
typeof
get
PageConfig
>>
,
TError
,
TData
>>
,
request
?:
SecondParameter
<
typeof
useCustomClient
>
}
export
const
prefetchGet
ApiV10PageConfigInfiniteQuery
=
async
<
TData
=
Awaited
<
ReturnType
<
typeof
getApiV10
PageConfig
>>
,
TError
=
ErrorType
<
unknown
>>
(
queryClient
:
QueryClient
,
params
?:
Get
ApiV10PageConfigParams
,
options
?:
{
query
?:
Partial
<
UseInfiniteQueryOptions
<
Awaited
<
ReturnType
<
typeof
getApiV10
PageConfig
>>
,
TError
,
TData
>>
,
request
?:
SecondParameter
<
typeof
useCustomClient
>
}
):
Promise
<
QueryClient
>
=>
{
const
queryOptions
=
getGetPageConfigInfiniteQueryOptions
(
params
,
options
)
const
queryOptions
=
getGet
ApiV10
PageConfigInfiniteQueryOptions
(
params
,
options
)
await
queryClient
.
prefetchInfiniteQuery
(
queryOptions
);
...
...
@@ -587,62 +587,62 @@ export const prefetchGetPageConfigInfiniteQuery = async <TData = Awaited<ReturnT
export
const
getGet
PageConfigQueryOptions
=
<
TData
=
Awaited
<
ReturnType
<
typeof
getPageConfig
>>
,
TError
=
ErrorType
<
unknown
>>
(
params
?:
GetPageConfigParams
,
options
?:
{
query
?:
Partial
<
UseQueryOptions
<
Awaited
<
ReturnType
<
typeof
get
PageConfig
>>
,
TError
,
TData
>>
,
request
?:
SecondParameter
<
typeof
useCustomClient
>
}
export
const
getGet
ApiV10PageConfigQueryOptions
=
<
TData
=
Awaited
<
ReturnType
<
typeof
getApiV10PageConfig
>>
,
TError
=
ErrorType
<
unknown
>>
(
params
?:
GetApiV10PageConfigParams
,
options
?:
{
query
?:
Partial
<
UseQueryOptions
<
Awaited
<
ReturnType
<
typeof
getApiV10
PageConfig
>>
,
TError
,
TData
>>
,
request
?:
SecondParameter
<
typeof
useCustomClient
>
}
)
=>
{
const
{
query
:
queryOptions
,
request
:
requestOptions
}
=
options
??
{};
const
queryKey
=
queryOptions
?.
queryKey
??
getGetPageConfigQueryKey
(
params
);
const
queryKey
=
queryOptions
?.
queryKey
??
getGet
ApiV10
PageConfigQueryKey
(
params
);
const
queryFn
:
QueryFunction
<
Awaited
<
ReturnType
<
typeof
get
PageConfig
>>>
=
({
signal
})
=>
get
PageConfig
(
params
,
{
signal
,
...
requestOptions
});
const
queryFn
:
QueryFunction
<
Awaited
<
ReturnType
<
typeof
get
ApiV10PageConfig
>>>
=
({
signal
})
=>
getApiV10
PageConfig
(
params
,
{
signal
,
...
requestOptions
});
return
{
queryKey
,
queryFn
,
retry
:
3
,
retryDelay
:
1000
,
...
queryOptions
}
as
UseQueryOptions
<
Awaited
<
ReturnType
<
typeof
getPageConfig
>>
,
TError
,
TData
>
&
{
queryKey
:
DataTag
<
QueryKey
,
TData
,
TError
>
}
return
{
queryKey
,
queryFn
,
retry
:
3
,
retryDelay
:
1000
,
...
queryOptions
}
as
UseQueryOptions
<
Awaited
<
ReturnType
<
typeof
get
ApiV10
PageConfig
>>
,
TError
,
TData
>
&
{
queryKey
:
DataTag
<
QueryKey
,
TData
,
TError
>
}
}
export
type
Get
PageConfigQueryResult
=
NonNullable
<
Awaited
<
ReturnType
<
typeof
get
PageConfig
>>>
export
type
GetPageConfigQueryError
=
ErrorType
<
unknown
>
export
type
Get
ApiV10PageConfigQueryResult
=
NonNullable
<
Awaited
<
ReturnType
<
typeof
getApiV10
PageConfig
>>>
export
type
Get
ApiV10
PageConfigQueryError
=
ErrorType
<
unknown
>
export
function
useGet
PageConfig
<
TData
=
Awaited
<
ReturnType
<
typeof
get
PageConfig
>>
,
TError
=
ErrorType
<
unknown
>>
(
params
:
undefined
|
Get
PageConfigParams
,
options
:
{
query
:
Partial
<
UseQueryOptions
<
Awaited
<
ReturnType
<
typeof
get
PageConfig
>>
,
TError
,
TData
>>
&
Pick
<
export
function
useGet
ApiV10PageConfig
<
TData
=
Awaited
<
ReturnType
<
typeof
getApiV10
PageConfig
>>
,
TError
=
ErrorType
<
unknown
>>
(
params
:
undefined
|
Get
ApiV10PageConfigParams
,
options
:
{
query
:
Partial
<
UseQueryOptions
<
Awaited
<
ReturnType
<
typeof
getApiV10
PageConfig
>>
,
TError
,
TData
>>
&
Pick
<
DefinedInitialDataOptions
<
Awaited
<
ReturnType
<
typeof
getPageConfig
>>
,
Awaited
<
ReturnType
<
typeof
get
ApiV10
PageConfig
>>
,
TError
,
Awaited
<
ReturnType
<
typeof
getPageConfig
>>
Awaited
<
ReturnType
<
typeof
get
ApiV10
PageConfig
>>
>
,
'initialData'
>
,
request
?:
SecondParameter
<
typeof
useCustomClient
>
}
,
queryClient
?:
QueryClient
):
DefinedUseQueryResult
<
TData
,
TError
>
&
{
queryKey
:
DataTag
<
QueryKey
,
TData
,
TError
>
}
export
function
useGet
PageConfig
<
TData
=
Awaited
<
ReturnType
<
typeof
get
PageConfig
>>
,
TError
=
ErrorType
<
unknown
>>
(
params
?:
Get
PageConfigParams
,
options
?:
{
query
?:
Partial
<
UseQueryOptions
<
Awaited
<
ReturnType
<
typeof
get
PageConfig
>>
,
TError
,
TData
>>
&
Pick
<
export
function
useGet
ApiV10PageConfig
<
TData
=
Awaited
<
ReturnType
<
typeof
getApiV10
PageConfig
>>
,
TError
=
ErrorType
<
unknown
>>
(
params
?:
Get
ApiV10PageConfigParams
,
options
?:
{
query
?:
Partial
<
UseQueryOptions
<
Awaited
<
ReturnType
<
typeof
getApiV10
PageConfig
>>
,
TError
,
TData
>>
&
Pick
<
UndefinedInitialDataOptions
<
Awaited
<
ReturnType
<
typeof
getPageConfig
>>
,
Awaited
<
ReturnType
<
typeof
get
ApiV10
PageConfig
>>
,
TError
,
Awaited
<
ReturnType
<
typeof
getPageConfig
>>
Awaited
<
ReturnType
<
typeof
get
ApiV10
PageConfig
>>
>
,
'initialData'
>
,
request
?:
SecondParameter
<
typeof
useCustomClient
>
}
,
queryClient
?:
QueryClient
):
UseQueryResult
<
TData
,
TError
>
&
{
queryKey
:
DataTag
<
QueryKey
,
TData
,
TError
>
}
export
function
useGet
PageConfig
<
TData
=
Awaited
<
ReturnType
<
typeof
get
PageConfig
>>
,
TError
=
ErrorType
<
unknown
>>
(
params
?:
Get
PageConfigParams
,
options
?:
{
query
?:
Partial
<
UseQueryOptions
<
Awaited
<
ReturnType
<
typeof
get
PageConfig
>>
,
TError
,
TData
>>
,
request
?:
SecondParameter
<
typeof
useCustomClient
>
}
export
function
useGet
ApiV10PageConfig
<
TData
=
Awaited
<
ReturnType
<
typeof
getApiV10
PageConfig
>>
,
TError
=
ErrorType
<
unknown
>>
(
params
?:
Get
ApiV10PageConfigParams
,
options
?:
{
query
?:
Partial
<
UseQueryOptions
<
Awaited
<
ReturnType
<
typeof
getApiV10
PageConfig
>>
,
TError
,
TData
>>
,
request
?:
SecondParameter
<
typeof
useCustomClient
>
}
,
queryClient
?:
QueryClient
):
UseQueryResult
<
TData
,
TError
>
&
{
queryKey
:
DataTag
<
QueryKey
,
TData
,
TError
>
}
/**
* @summary Get hierarchical pageConfig
*/
export
function
useGet
PageConfig
<
TData
=
Awaited
<
ReturnType
<
typeof
get
PageConfig
>>
,
TError
=
ErrorType
<
unknown
>>
(
params
?:
Get
PageConfigParams
,
options
?:
{
query
?:
Partial
<
UseQueryOptions
<
Awaited
<
ReturnType
<
typeof
get
PageConfig
>>
,
TError
,
TData
>>
,
request
?:
SecondParameter
<
typeof
useCustomClient
>
}
export
function
useGet
ApiV10PageConfig
<
TData
=
Awaited
<
ReturnType
<
typeof
getApiV10
PageConfig
>>
,
TError
=
ErrorType
<
unknown
>>
(
params
?:
Get
ApiV10PageConfigParams
,
options
?:
{
query
?:
Partial
<
UseQueryOptions
<
Awaited
<
ReturnType
<
typeof
getApiV10
PageConfig
>>
,
TError
,
TData
>>
,
request
?:
SecondParameter
<
typeof
useCustomClient
>
}
,
queryClient
?:
QueryClient
):
UseQueryResult
<
TData
,
TError
>
&
{
queryKey
:
DataTag
<
QueryKey
,
TData
,
TError
>
}
{
const
queryOptions
=
getGetPageConfigQueryOptions
(
params
,
options
)
const
queryOptions
=
getGet
ApiV10
PageConfigQueryOptions
(
params
,
options
)
const
query
=
useQuery
(
queryOptions
,
queryClient
)
as
UseQueryResult
<
TData
,
TError
>
&
{
queryKey
:
DataTag
<
QueryKey
,
TData
,
TError
>
};
...
...
@@ -654,12 +654,12 @@ export function useGetPageConfig<TData = Awaited<ReturnType<typeof getPageConfig
/**
* @summary Get hierarchical pageConfig
*/
export
const
prefetchGet
PageConfigQuery
=
async
<
TData
=
Awaited
<
ReturnType
<
typeof
get
PageConfig
>>
,
TError
=
ErrorType
<
unknown
>>
(
queryClient
:
QueryClient
,
params
?:
Get
PageConfigParams
,
options
?:
{
query
?:
Partial
<
UseQueryOptions
<
Awaited
<
ReturnType
<
typeof
get
PageConfig
>>
,
TError
,
TData
>>
,
request
?:
SecondParameter
<
typeof
useCustomClient
>
}
export
const
prefetchGet
ApiV10PageConfigQuery
=
async
<
TData
=
Awaited
<
ReturnType
<
typeof
getApiV10
PageConfig
>>
,
TError
=
ErrorType
<
unknown
>>
(
queryClient
:
QueryClient
,
params
?:
Get
ApiV10PageConfigParams
,
options
?:
{
query
?:
Partial
<
UseQueryOptions
<
Awaited
<
ReturnType
<
typeof
getApiV10
PageConfig
>>
,
TError
,
TData
>>
,
request
?:
SecondParameter
<
typeof
useCustomClient
>
}
):
Promise
<
QueryClient
>
=>
{
const
queryOptions
=
getGetPageConfigQueryOptions
(
params
,
options
)
const
queryOptions
=
getGet
ApiV10
PageConfigQueryOptions
(
params
,
options
)
await
queryClient
.
prefetchQuery
(
queryOptions
);
...
...
@@ -672,46 +672,46 @@ export const prefetchGetPageConfigQuery = async <TData = Awaited<ReturnType<type
* Create a new pageConfig record. parent_id is required. level is computed from parent and must not be sent.
* @summary Create a pageConfig
*/
export
type
postPageConfigResponse200
=
{
export
type
post
ApiV10
PageConfigResponse200
=
{
data
:
void
status
:
200
}
export
type
post
PageConfigResponseSuccess
=
(
post
PageConfigResponse200
)
&
{
export
type
post
ApiV10PageConfigResponseSuccess
=
(
postApiV10
PageConfigResponse200
)
&
{
headers
:
Headers
;
};
;
export
type
post
PageConfigResponse
=
(
post
PageConfigResponseSuccess
)
export
type
post
ApiV10PageConfigResponse
=
(
postApiV10
PageConfigResponseSuccess
)
export
const
getPostPageConfigUrl
=
()
=>
{
export
const
getPost
ApiV10
PageConfigUrl
=
()
=>
{
return
`/pageConfig`
return
`/
api/v1.0/
pageConfig`
}
export
const
post
PageConfig
=
async
(
postPageConfigBody
:
PostPageConfigBody
,
options
?:
RequestInit
):
Promise
<
post
PageConfigResponse
>
=>
{
export
const
post
ApiV10PageConfig
=
async
(
postApiV10PageConfigBody
:
PostApiV10PageConfigBody
,
options
?:
RequestInit
):
Promise
<
postApiV10
PageConfigResponse
>
=>
{
return
useCustomClient
<
post
PageConfigResponse
>
(
getPost
PageConfigUrl
(),
return
useCustomClient
<
post
ApiV10PageConfigResponse
>
(
getPostApiV10
PageConfigUrl
(),
{
...
options
,
method
:
'POST'
,
headers
:
{
'Content-Type'
:
'application/json'
,
...
options
?.
headers
},
body
:
JSON
.
stringify
(
postPageConfigBody
,)
post
ApiV10
PageConfigBody
,)
}
);}
export
const
getPostPageConfigMutationOptions
=
<
TError
=
ErrorType
<
unknown
>
,
TContext
=
unknown
>
(
options
?:
{
mutation
?:
UseMutationOptions
<
Awaited
<
ReturnType
<
typeof
post
PageConfig
>>
,
TError
,{
data
:
BodyType
<
Post
PageConfigBody
>
},
TContext
>
,
request
?:
SecondParameter
<
typeof
useCustomClient
>
}
):
UseMutationOptions
<
Awaited
<
ReturnType
<
typeof
post
PageConfig
>>
,
TError
,{
data
:
BodyType
<
Post
PageConfigBody
>
},
TContext
>
=>
{
export
const
getPost
ApiV10
PageConfigMutationOptions
=
<
TError
=
ErrorType
<
unknown
>
,
TContext
=
unknown
>
(
options
?:
{
mutation
?:
UseMutationOptions
<
Awaited
<
ReturnType
<
typeof
post
ApiV10PageConfig
>>
,
TError
,{
data
:
BodyType
<
PostApiV10
PageConfigBody
>
},
TContext
>
,
request
?:
SecondParameter
<
typeof
useCustomClient
>
}
):
UseMutationOptions
<
Awaited
<
ReturnType
<
typeof
post
ApiV10PageConfig
>>
,
TError
,{
data
:
BodyType
<
PostApiV10
PageConfigBody
>
},
TContext
>
=>
{
const
mutationKey
=
[
'postPageConfig'
];
const
mutationKey
=
[
'post
ApiV10
PageConfig'
];
const
{
mutation
:
mutationOptions
,
request
:
requestOptions
}
=
options
?
options
.
mutation
&&
'mutationKey'
in
options
.
mutation
&&
options
.
mutation
.
mutationKey
?
options
...
...
@@ -721,10 +721,10 @@ const {mutation: mutationOptions, request: requestOptions} = options ?
const
mutationFn
:
MutationFunction
<
Awaited
<
ReturnType
<
typeof
post
PageConfig
>>
,
{
data
:
BodyType
<
Post
PageConfigBody
>
}
>
=
(
props
)
=>
{
const
mutationFn
:
MutationFunction
<
Awaited
<
ReturnType
<
typeof
post
ApiV10PageConfig
>>
,
{
data
:
BodyType
<
PostApiV10
PageConfigBody
>
}
>
=
(
props
)
=>
{
const
{
data
}
=
props
??
{};
return
postPageConfig
(
data
,
requestOptions
)
return
post
ApiV10
PageConfig
(
data
,
requestOptions
)
}
...
...
@@ -732,23 +732,23 @@ const {mutation: mutationOptions, request: requestOptions} = options ?
return
{
mutationFn
,
...
mutationOptions
}}
export
type
Post
PageConfigMutationResult
=
NonNullable
<
Awaited
<
ReturnType
<
typeof
post
PageConfig
>>>
export
type
Post
PageConfigMutationBody
=
BodyType
<
Post
PageConfigBody
>
export
type
PostPageConfigMutationError
=
ErrorType
<
unknown
>
export
type
Post
ApiV10PageConfigMutationResult
=
NonNullable
<
Awaited
<
ReturnType
<
typeof
postApiV10
PageConfig
>>>
export
type
Post
ApiV10PageConfigMutationBody
=
BodyType
<
PostApiV10
PageConfigBody
>
export
type
Post
ApiV10
PageConfigMutationError
=
ErrorType
<
unknown
>
/**
* @summary Create a pageConfig
*/
export
const
usePostPageConfig
=
<
TError
=
ErrorType
<
unknown
>
,
TContext
=
unknown
>
(
options
?:
{
mutation
?:
UseMutationOptions
<
Awaited
<
ReturnType
<
typeof
post
PageConfig
>>
,
TError
,{
data
:
BodyType
<
Post
PageConfigBody
>
},
TContext
>
,
request
?:
SecondParameter
<
typeof
useCustomClient
>
}
export
const
usePost
ApiV10
PageConfig
=
<
TError
=
ErrorType
<
unknown
>
,
TContext
=
unknown
>
(
options
?:
{
mutation
?:
UseMutationOptions
<
Awaited
<
ReturnType
<
typeof
post
ApiV10PageConfig
>>
,
TError
,{
data
:
BodyType
<
PostApiV10
PageConfigBody
>
},
TContext
>
,
request
?:
SecondParameter
<
typeof
useCustomClient
>
}
,
queryClient
?:
QueryClient
):
UseMutationResult
<
Awaited
<
ReturnType
<
typeof
postPageConfig
>>
,
Awaited
<
ReturnType
<
typeof
post
ApiV10
PageConfig
>>
,
TError
,
{
data
:
BodyType
<
PostPageConfigBody
>
},
{
data
:
BodyType
<
Post
ApiV10
PageConfigBody
>
},
TContext
>
=>
{
const
mutationOptions
=
getPostPageConfigMutationOptions
(
options
);
const
mutationOptions
=
getPost
ApiV10
PageConfigMutationOptions
(
options
);
return
useMutation
(
mutationOptions
,
queryClient
);
}
src/api/endpoints/site-information.ts
View file @
b3589a95
/**
* Generated by orval v8.0.0-rc.0 🍺
* Do not edit manually.
*
Backend Template
*
Coded by Meu TEAM
*
VietProDev CMS Backend API
*
Generated API documentation
* OpenAPI spec version: 1.0.0
*/
import
{
...
...
@@ -30,9 +30,9 @@ import type {
}
from
'@tanstack/react-query'
;
import
type
{
GetSiteInformation200
,
GetSiteInformationParams
,
PutSiteInformation200
,
Get
ApiV10
SiteInformation200
,
Get
ApiV10
SiteInformationParams
,
Put
ApiV10
SiteInformation200
,
SiteInformationBranchMutate
,
SiteInformationSocialMutate
,
SiteInformationUpdateBody
...
...
@@ -51,19 +51,19 @@ type SecondParameter<T extends (...args: never) => unknown> = Parameters<T>[1];
* Retrieve current public site information configuration.
* @summary Get current site information
*/
export
type
getSiteInformationResponse200
=
{
data
:
GetSiteInformation200
export
type
get
ApiV10
SiteInformationResponse200
=
{
data
:
Get
ApiV10
SiteInformation200
status
:
200
}
export
type
get
SiteInformationResponseSuccess
=
(
get
SiteInformationResponse200
)
&
{
export
type
get
ApiV10SiteInformationResponseSuccess
=
(
getApiV10
SiteInformationResponse200
)
&
{
headers
:
Headers
;
};
;
export
type
get
SiteInformationResponse
=
(
get
SiteInformationResponseSuccess
)
export
type
get
ApiV10SiteInformationResponse
=
(
getApiV10
SiteInformationResponseSuccess
)
export
const
getGet
SiteInformationUrl
=
(
params
?:
Get
SiteInformationParams
,)
=>
{
export
const
getGet
ApiV10SiteInformationUrl
=
(
params
?:
GetApiV10
SiteInformationParams
,)
=>
{
const
normalizedParams
=
new
URLSearchParams
();
Object
.
entries
(
params
||
{}).
forEach
(([
key
,
value
])
=>
{
...
...
@@ -75,12 +75,12 @@ export const getGetSiteInformationUrl = (params?: GetSiteInformationParams,) =>
const
stringifiedParams
=
normalizedParams
.
toString
();
return
stringifiedParams
.
length
>
0
?
`/
siteInformation?
${
stringifiedParams
}
`
:
`
/siteInformation`
return
stringifiedParams
.
length
>
0
?
`/
api/v1.0/siteInformation?
${
stringifiedParams
}
`
:
`/api/v1.0
/siteInformation`
}
export
const
get
SiteInformation
=
async
(
params
?:
GetSiteInformationParams
,
options
?:
RequestInit
):
Promise
<
get
SiteInformationResponse
>
=>
{
export
const
get
ApiV10SiteInformation
=
async
(
params
?:
GetApiV10SiteInformationParams
,
options
?:
RequestInit
):
Promise
<
getApiV10
SiteInformationResponse
>
=>
{
return
useCustomClient
<
get
SiteInformationResponse
>
(
getGet
SiteInformationUrl
(
params
),
return
useCustomClient
<
get
ApiV10SiteInformationResponse
>
(
getGetApiV10
SiteInformationUrl
(
params
),
{
...
options
,
method
:
'GET'
...
...
@@ -93,75 +93,75 @@ export const getSiteInformation = async (params?: GetSiteInformationParams, opti
export
const
getGet
SiteInformationInfiniteQueryKey
=
(
params
?:
Get
SiteInformationParams
,)
=>
{
export
const
getGet
ApiV10SiteInformationInfiniteQueryKey
=
(
params
?:
GetApiV10
SiteInformationParams
,)
=>
{
return
[
'infinite'
,
`/siteInformation`
,
...(
params
?
[
params
]:
[])
'infinite'
,
`/
api/v1.0/
siteInformation`
,
...(
params
?
[
params
]:
[])
]
as
const
;
}
export
const
getGet
SiteInformationQueryKey
=
(
params
?:
Get
SiteInformationParams
,)
=>
{
export
const
getGet
ApiV10SiteInformationQueryKey
=
(
params
?:
GetApiV10
SiteInformationParams
,)
=>
{
return
[
`/siteInformation`
,
...(
params
?
[
params
]:
[])
`/
api/v1.0/
siteInformation`
,
...(
params
?
[
params
]:
[])
]
as
const
;
}
export
const
getGet
SiteInformationInfiniteQueryOptions
=
<
TData
=
InfiniteData
<
Awaited
<
ReturnType
<
typeof
getSiteInformation
>>>
,
TError
=
ErrorType
<
unknown
>>
(
params
?:
GetSiteInformationParams
,
options
?:
{
query
?:
Partial
<
UseInfiniteQueryOptions
<
Awaited
<
ReturnType
<
typeof
get
SiteInformation
>>
,
TError
,
TData
>>
,
request
?:
SecondParameter
<
typeof
useCustomClient
>
}
export
const
getGet
ApiV10SiteInformationInfiniteQueryOptions
=
<
TData
=
InfiniteData
<
Awaited
<
ReturnType
<
typeof
getApiV10SiteInformation
>>>
,
TError
=
ErrorType
<
unknown
>>
(
params
?:
GetApiV10SiteInformationParams
,
options
?:
{
query
?:
Partial
<
UseInfiniteQueryOptions
<
Awaited
<
ReturnType
<
typeof
getApiV10
SiteInformation
>>
,
TError
,
TData
>>
,
request
?:
SecondParameter
<
typeof
useCustomClient
>
}
)
=>
{
const
{
query
:
queryOptions
,
request
:
requestOptions
}
=
options
??
{};
const
queryKey
=
queryOptions
?.
queryKey
??
getGetSiteInformationInfiniteQueryKey
(
params
);
const
queryKey
=
queryOptions
?.
queryKey
??
getGet
ApiV10
SiteInformationInfiniteQueryKey
(
params
);
const
queryFn
:
QueryFunction
<
Awaited
<
ReturnType
<
typeof
get
SiteInformation
>>>
=
({
signal
})
=>
get
SiteInformation
(
params
,
{
signal
,
...
requestOptions
});
const
queryFn
:
QueryFunction
<
Awaited
<
ReturnType
<
typeof
get
ApiV10SiteInformation
>>>
=
({
signal
})
=>
getApiV10
SiteInformation
(
params
,
{
signal
,
...
requestOptions
});
return
{
queryKey
,
queryFn
,
retry
:
3
,
retryDelay
:
1000
,
...
queryOptions
}
as
UseInfiniteQueryOptions
<
Awaited
<
ReturnType
<
typeof
getSiteInformation
>>
,
TError
,
TData
>
&
{
queryKey
:
DataTag
<
QueryKey
,
TData
,
TError
>
}
return
{
queryKey
,
queryFn
,
retry
:
3
,
retryDelay
:
1000
,
...
queryOptions
}
as
UseInfiniteQueryOptions
<
Awaited
<
ReturnType
<
typeof
get
ApiV10
SiteInformation
>>
,
TError
,
TData
>
&
{
queryKey
:
DataTag
<
QueryKey
,
TData
,
TError
>
}
}
export
type
Get
SiteInformationInfiniteQueryResult
=
NonNullable
<
Awaited
<
ReturnType
<
typeof
get
SiteInformation
>>>
export
type
GetSiteInformationInfiniteQueryError
=
ErrorType
<
unknown
>
export
type
Get
ApiV10SiteInformationInfiniteQueryResult
=
NonNullable
<
Awaited
<
ReturnType
<
typeof
getApiV10
SiteInformation
>>>
export
type
Get
ApiV10
SiteInformationInfiniteQueryError
=
ErrorType
<
unknown
>
export
function
useGet
SiteInformationInfinite
<
TData
=
InfiniteData
<
Awaited
<
ReturnType
<
typeof
get
SiteInformation
>>>
,
TError
=
ErrorType
<
unknown
>>
(
params
:
undefined
|
Get
SiteInformationParams
,
options
:
{
query
:
Partial
<
UseInfiniteQueryOptions
<
Awaited
<
ReturnType
<
typeof
get
SiteInformation
>>
,
TError
,
TData
>>
&
Pick
<
export
function
useGet
ApiV10SiteInformationInfinite
<
TData
=
InfiniteData
<
Awaited
<
ReturnType
<
typeof
getApiV10
SiteInformation
>>>
,
TError
=
ErrorType
<
unknown
>>
(
params
:
undefined
|
Get
ApiV10SiteInformationParams
,
options
:
{
query
:
Partial
<
UseInfiniteQueryOptions
<
Awaited
<
ReturnType
<
typeof
getApiV10
SiteInformation
>>
,
TError
,
TData
>>
&
Pick
<
DefinedInitialDataOptions
<
Awaited
<
ReturnType
<
typeof
getSiteInformation
>>
,
Awaited
<
ReturnType
<
typeof
get
ApiV10
SiteInformation
>>
,
TError
,
Awaited
<
ReturnType
<
typeof
getSiteInformation
>>
Awaited
<
ReturnType
<
typeof
get
ApiV10
SiteInformation
>>
>
,
'initialData'
>
,
request
?:
SecondParameter
<
typeof
useCustomClient
>
}
,
queryClient
?:
QueryClient
):
DefinedUseInfiniteQueryResult
<
TData
,
TError
>
&
{
queryKey
:
DataTag
<
QueryKey
,
TData
,
TError
>
}
export
function
useGet
SiteInformationInfinite
<
TData
=
InfiniteData
<
Awaited
<
ReturnType
<
typeof
get
SiteInformation
>>>
,
TError
=
ErrorType
<
unknown
>>
(
params
?:
Get
SiteInformationParams
,
options
?:
{
query
?:
Partial
<
UseInfiniteQueryOptions
<
Awaited
<
ReturnType
<
typeof
get
SiteInformation
>>
,
TError
,
TData
>>
&
Pick
<
export
function
useGet
ApiV10SiteInformationInfinite
<
TData
=
InfiniteData
<
Awaited
<
ReturnType
<
typeof
getApiV10
SiteInformation
>>>
,
TError
=
ErrorType
<
unknown
>>
(
params
?:
Get
ApiV10SiteInformationParams
,
options
?:
{
query
?:
Partial
<
UseInfiniteQueryOptions
<
Awaited
<
ReturnType
<
typeof
getApiV10
SiteInformation
>>
,
TError
,
TData
>>
&
Pick
<
UndefinedInitialDataOptions
<
Awaited
<
ReturnType
<
typeof
getSiteInformation
>>
,
Awaited
<
ReturnType
<
typeof
get
ApiV10
SiteInformation
>>
,
TError
,
Awaited
<
ReturnType
<
typeof
getSiteInformation
>>
Awaited
<
ReturnType
<
typeof
get
ApiV10
SiteInformation
>>
>
,
'initialData'
>
,
request
?:
SecondParameter
<
typeof
useCustomClient
>
}
,
queryClient
?:
QueryClient
):
UseInfiniteQueryResult
<
TData
,
TError
>
&
{
queryKey
:
DataTag
<
QueryKey
,
TData
,
TError
>
}
export
function
useGet
SiteInformationInfinite
<
TData
=
InfiniteData
<
Awaited
<
ReturnType
<
typeof
get
SiteInformation
>>>
,
TError
=
ErrorType
<
unknown
>>
(
params
?:
Get
SiteInformationParams
,
options
?:
{
query
?:
Partial
<
UseInfiniteQueryOptions
<
Awaited
<
ReturnType
<
typeof
get
SiteInformation
>>
,
TError
,
TData
>>
,
request
?:
SecondParameter
<
typeof
useCustomClient
>
}
export
function
useGet
ApiV10SiteInformationInfinite
<
TData
=
InfiniteData
<
Awaited
<
ReturnType
<
typeof
getApiV10
SiteInformation
>>>
,
TError
=
ErrorType
<
unknown
>>
(
params
?:
Get
ApiV10SiteInformationParams
,
options
?:
{
query
?:
Partial
<
UseInfiniteQueryOptions
<
Awaited
<
ReturnType
<
typeof
getApiV10
SiteInformation
>>
,
TError
,
TData
>>
,
request
?:
SecondParameter
<
typeof
useCustomClient
>
}
,
queryClient
?:
QueryClient
):
UseInfiniteQueryResult
<
TData
,
TError
>
&
{
queryKey
:
DataTag
<
QueryKey
,
TData
,
TError
>
}
/**
* @summary Get current site information
*/
export
function
useGet
SiteInformationInfinite
<
TData
=
InfiniteData
<
Awaited
<
ReturnType
<
typeof
get
SiteInformation
>>>
,
TError
=
ErrorType
<
unknown
>>
(
params
?:
Get
SiteInformationParams
,
options
?:
{
query
?:
Partial
<
UseInfiniteQueryOptions
<
Awaited
<
ReturnType
<
typeof
get
SiteInformation
>>
,
TError
,
TData
>>
,
request
?:
SecondParameter
<
typeof
useCustomClient
>
}
export
function
useGet
ApiV10SiteInformationInfinite
<
TData
=
InfiniteData
<
Awaited
<
ReturnType
<
typeof
getApiV10
SiteInformation
>>>
,
TError
=
ErrorType
<
unknown
>>
(
params
?:
Get
ApiV10SiteInformationParams
,
options
?:
{
query
?:
Partial
<
UseInfiniteQueryOptions
<
Awaited
<
ReturnType
<
typeof
getApiV10
SiteInformation
>>
,
TError
,
TData
>>
,
request
?:
SecondParameter
<
typeof
useCustomClient
>
}
,
queryClient
?:
QueryClient
):
UseInfiniteQueryResult
<
TData
,
TError
>
&
{
queryKey
:
DataTag
<
QueryKey
,
TData
,
TError
>
}
{
const
queryOptions
=
getGetSiteInformationInfiniteQueryOptions
(
params
,
options
)
const
queryOptions
=
getGet
ApiV10
SiteInformationInfiniteQueryOptions
(
params
,
options
)
const
query
=
useInfiniteQuery
(
queryOptions
,
queryClient
)
as
UseInfiniteQueryResult
<
TData
,
TError
>
&
{
queryKey
:
DataTag
<
QueryKey
,
TData
,
TError
>
};
...
...
@@ -173,12 +173,12 @@ export function useGetSiteInformationInfinite<TData = InfiniteData<Awaited<Retur
/**
* @summary Get current site information
*/
export
const
prefetchGet
SiteInformationInfiniteQuery
=
async
<
TData
=
Awaited
<
ReturnType
<
typeof
get
SiteInformation
>>
,
TError
=
ErrorType
<
unknown
>>
(
queryClient
:
QueryClient
,
params
?:
Get
SiteInformationParams
,
options
?:
{
query
?:
Partial
<
UseInfiniteQueryOptions
<
Awaited
<
ReturnType
<
typeof
get
SiteInformation
>>
,
TError
,
TData
>>
,
request
?:
SecondParameter
<
typeof
useCustomClient
>
}
export
const
prefetchGet
ApiV10SiteInformationInfiniteQuery
=
async
<
TData
=
Awaited
<
ReturnType
<
typeof
getApiV10
SiteInformation
>>
,
TError
=
ErrorType
<
unknown
>>
(
queryClient
:
QueryClient
,
params
?:
Get
ApiV10SiteInformationParams
,
options
?:
{
query
?:
Partial
<
UseInfiniteQueryOptions
<
Awaited
<
ReturnType
<
typeof
getApiV10
SiteInformation
>>
,
TError
,
TData
>>
,
request
?:
SecondParameter
<
typeof
useCustomClient
>
}
):
Promise
<
QueryClient
>
=>
{
const
queryOptions
=
getGetSiteInformationInfiniteQueryOptions
(
params
,
options
)
const
queryOptions
=
getGet
ApiV10
SiteInformationInfiniteQueryOptions
(
params
,
options
)
await
queryClient
.
prefetchInfiniteQuery
(
queryOptions
);
...
...
@@ -187,62 +187,62 @@ export const prefetchGetSiteInformationInfiniteQuery = async <TData = Awaited<Re
export
const
getGet
SiteInformationQueryOptions
=
<
TData
=
Awaited
<
ReturnType
<
typeof
getSiteInformation
>>
,
TError
=
ErrorType
<
unknown
>>
(
params
?:
GetSiteInformationParams
,
options
?:
{
query
?:
Partial
<
UseQueryOptions
<
Awaited
<
ReturnType
<
typeof
get
SiteInformation
>>
,
TError
,
TData
>>
,
request
?:
SecondParameter
<
typeof
useCustomClient
>
}
export
const
getGet
ApiV10SiteInformationQueryOptions
=
<
TData
=
Awaited
<
ReturnType
<
typeof
getApiV10SiteInformation
>>
,
TError
=
ErrorType
<
unknown
>>
(
params
?:
GetApiV10SiteInformationParams
,
options
?:
{
query
?:
Partial
<
UseQueryOptions
<
Awaited
<
ReturnType
<
typeof
getApiV10
SiteInformation
>>
,
TError
,
TData
>>
,
request
?:
SecondParameter
<
typeof
useCustomClient
>
}
)
=>
{
const
{
query
:
queryOptions
,
request
:
requestOptions
}
=
options
??
{};
const
queryKey
=
queryOptions
?.
queryKey
??
getGetSiteInformationQueryKey
(
params
);
const
queryKey
=
queryOptions
?.
queryKey
??
getGet
ApiV10
SiteInformationQueryKey
(
params
);
const
queryFn
:
QueryFunction
<
Awaited
<
ReturnType
<
typeof
get
SiteInformation
>>>
=
({
signal
})
=>
get
SiteInformation
(
params
,
{
signal
,
...
requestOptions
});
const
queryFn
:
QueryFunction
<
Awaited
<
ReturnType
<
typeof
get
ApiV10SiteInformation
>>>
=
({
signal
})
=>
getApiV10
SiteInformation
(
params
,
{
signal
,
...
requestOptions
});
return
{
queryKey
,
queryFn
,
retry
:
3
,
retryDelay
:
1000
,
...
queryOptions
}
as
UseQueryOptions
<
Awaited
<
ReturnType
<
typeof
getSiteInformation
>>
,
TError
,
TData
>
&
{
queryKey
:
DataTag
<
QueryKey
,
TData
,
TError
>
}
return
{
queryKey
,
queryFn
,
retry
:
3
,
retryDelay
:
1000
,
...
queryOptions
}
as
UseQueryOptions
<
Awaited
<
ReturnType
<
typeof
get
ApiV10
SiteInformation
>>
,
TError
,
TData
>
&
{
queryKey
:
DataTag
<
QueryKey
,
TData
,
TError
>
}
}
export
type
Get
SiteInformationQueryResult
=
NonNullable
<
Awaited
<
ReturnType
<
typeof
get
SiteInformation
>>>
export
type
GetSiteInformationQueryError
=
ErrorType
<
unknown
>
export
type
Get
ApiV10SiteInformationQueryResult
=
NonNullable
<
Awaited
<
ReturnType
<
typeof
getApiV10
SiteInformation
>>>
export
type
Get
ApiV10
SiteInformationQueryError
=
ErrorType
<
unknown
>
export
function
useGet
SiteInformation
<
TData
=
Awaited
<
ReturnType
<
typeof
get
SiteInformation
>>
,
TError
=
ErrorType
<
unknown
>>
(
params
:
undefined
|
Get
SiteInformationParams
,
options
:
{
query
:
Partial
<
UseQueryOptions
<
Awaited
<
ReturnType
<
typeof
get
SiteInformation
>>
,
TError
,
TData
>>
&
Pick
<
export
function
useGet
ApiV10SiteInformation
<
TData
=
Awaited
<
ReturnType
<
typeof
getApiV10
SiteInformation
>>
,
TError
=
ErrorType
<
unknown
>>
(
params
:
undefined
|
Get
ApiV10SiteInformationParams
,
options
:
{
query
:
Partial
<
UseQueryOptions
<
Awaited
<
ReturnType
<
typeof
getApiV10
SiteInformation
>>
,
TError
,
TData
>>
&
Pick
<
DefinedInitialDataOptions
<
Awaited
<
ReturnType
<
typeof
getSiteInformation
>>
,
Awaited
<
ReturnType
<
typeof
get
ApiV10
SiteInformation
>>
,
TError
,
Awaited
<
ReturnType
<
typeof
getSiteInformation
>>
Awaited
<
ReturnType
<
typeof
get
ApiV10
SiteInformation
>>
>
,
'initialData'
>
,
request
?:
SecondParameter
<
typeof
useCustomClient
>
}
,
queryClient
?:
QueryClient
):
DefinedUseQueryResult
<
TData
,
TError
>
&
{
queryKey
:
DataTag
<
QueryKey
,
TData
,
TError
>
}
export
function
useGet
SiteInformation
<
TData
=
Awaited
<
ReturnType
<
typeof
get
SiteInformation
>>
,
TError
=
ErrorType
<
unknown
>>
(
params
?:
Get
SiteInformationParams
,
options
?:
{
query
?:
Partial
<
UseQueryOptions
<
Awaited
<
ReturnType
<
typeof
get
SiteInformation
>>
,
TError
,
TData
>>
&
Pick
<
export
function
useGet
ApiV10SiteInformation
<
TData
=
Awaited
<
ReturnType
<
typeof
getApiV10
SiteInformation
>>
,
TError
=
ErrorType
<
unknown
>>
(
params
?:
Get
ApiV10SiteInformationParams
,
options
?:
{
query
?:
Partial
<
UseQueryOptions
<
Awaited
<
ReturnType
<
typeof
getApiV10
SiteInformation
>>
,
TError
,
TData
>>
&
Pick
<
UndefinedInitialDataOptions
<
Awaited
<
ReturnType
<
typeof
getSiteInformation
>>
,
Awaited
<
ReturnType
<
typeof
get
ApiV10
SiteInformation
>>
,
TError
,
Awaited
<
ReturnType
<
typeof
getSiteInformation
>>
Awaited
<
ReturnType
<
typeof
get
ApiV10
SiteInformation
>>
>
,
'initialData'
>
,
request
?:
SecondParameter
<
typeof
useCustomClient
>
}
,
queryClient
?:
QueryClient
):
UseQueryResult
<
TData
,
TError
>
&
{
queryKey
:
DataTag
<
QueryKey
,
TData
,
TError
>
}
export
function
useGet
SiteInformation
<
TData
=
Awaited
<
ReturnType
<
typeof
get
SiteInformation
>>
,
TError
=
ErrorType
<
unknown
>>
(
params
?:
Get
SiteInformationParams
,
options
?:
{
query
?:
Partial
<
UseQueryOptions
<
Awaited
<
ReturnType
<
typeof
get
SiteInformation
>>
,
TError
,
TData
>>
,
request
?:
SecondParameter
<
typeof
useCustomClient
>
}
export
function
useGet
ApiV10SiteInformation
<
TData
=
Awaited
<
ReturnType
<
typeof
getApiV10
SiteInformation
>>
,
TError
=
ErrorType
<
unknown
>>
(
params
?:
Get
ApiV10SiteInformationParams
,
options
?:
{
query
?:
Partial
<
UseQueryOptions
<
Awaited
<
ReturnType
<
typeof
getApiV10
SiteInformation
>>
,
TError
,
TData
>>
,
request
?:
SecondParameter
<
typeof
useCustomClient
>
}
,
queryClient
?:
QueryClient
):
UseQueryResult
<
TData
,
TError
>
&
{
queryKey
:
DataTag
<
QueryKey
,
TData
,
TError
>
}
/**
* @summary Get current site information
*/
export
function
useGet
SiteInformation
<
TData
=
Awaited
<
ReturnType
<
typeof
get
SiteInformation
>>
,
TError
=
ErrorType
<
unknown
>>
(
params
?:
Get
SiteInformationParams
,
options
?:
{
query
?:
Partial
<
UseQueryOptions
<
Awaited
<
ReturnType
<
typeof
get
SiteInformation
>>
,
TError
,
TData
>>
,
request
?:
SecondParameter
<
typeof
useCustomClient
>
}
export
function
useGet
ApiV10SiteInformation
<
TData
=
Awaited
<
ReturnType
<
typeof
getApiV10
SiteInformation
>>
,
TError
=
ErrorType
<
unknown
>>
(
params
?:
Get
ApiV10SiteInformationParams
,
options
?:
{
query
?:
Partial
<
UseQueryOptions
<
Awaited
<
ReturnType
<
typeof
getApiV10
SiteInformation
>>
,
TError
,
TData
>>
,
request
?:
SecondParameter
<
typeof
useCustomClient
>
}
,
queryClient
?:
QueryClient
):
UseQueryResult
<
TData
,
TError
>
&
{
queryKey
:
DataTag
<
QueryKey
,
TData
,
TError
>
}
{
const
queryOptions
=
getGetSiteInformationQueryOptions
(
params
,
options
)
const
queryOptions
=
getGet
ApiV10
SiteInformationQueryOptions
(
params
,
options
)
const
query
=
useQuery
(
queryOptions
,
queryClient
)
as
UseQueryResult
<
TData
,
TError
>
&
{
queryKey
:
DataTag
<
QueryKey
,
TData
,
TError
>
};
...
...
@@ -254,12 +254,12 @@ export function useGetSiteInformation<TData = Awaited<ReturnType<typeof getSiteI
/**
* @summary Get current site information
*/
export
const
prefetchGet
SiteInformationQuery
=
async
<
TData
=
Awaited
<
ReturnType
<
typeof
get
SiteInformation
>>
,
TError
=
ErrorType
<
unknown
>>
(
queryClient
:
QueryClient
,
params
?:
Get
SiteInformationParams
,
options
?:
{
query
?:
Partial
<
UseQueryOptions
<
Awaited
<
ReturnType
<
typeof
get
SiteInformation
>>
,
TError
,
TData
>>
,
request
?:
SecondParameter
<
typeof
useCustomClient
>
}
export
const
prefetchGet
ApiV10SiteInformationQuery
=
async
<
TData
=
Awaited
<
ReturnType
<
typeof
getApiV10
SiteInformation
>>
,
TError
=
ErrorType
<
unknown
>>
(
queryClient
:
QueryClient
,
params
?:
Get
ApiV10SiteInformationParams
,
options
?:
{
query
?:
Partial
<
UseQueryOptions
<
Awaited
<
ReturnType
<
typeof
getApiV10
SiteInformation
>>
,
TError
,
TData
>>
,
request
?:
SecondParameter
<
typeof
useCustomClient
>
}
):
Promise
<
QueryClient
>
=>
{
const
queryOptions
=
getGetSiteInformationQueryOptions
(
params
,
options
)
const
queryOptions
=
getGet
ApiV10
SiteInformationQueryOptions
(
params
,
options
)
await
queryClient
.
prefetchQuery
(
queryOptions
);
...
...
@@ -272,41 +272,41 @@ export const prefetchGetSiteInformationQuery = async <TData = Awaited<ReturnType
* Update current site information configuration
* @summary Update current site information
*/
export
type
putSiteInformationResponse200
=
{
data
:
PutSiteInformation200
export
type
put
ApiV10
SiteInformationResponse200
=
{
data
:
Put
ApiV10
SiteInformation200
status
:
200
}
export
type
putSiteInformationResponse400
=
{
export
type
put
ApiV10
SiteInformationResponse400
=
{
data
:
void
status
:
400
}
export
type
putSiteInformationResponse401
=
{
export
type
put
ApiV10
SiteInformationResponse401
=
{
data
:
void
status
:
401
}
export
type
put
SiteInformationResponseSuccess
=
(
put
SiteInformationResponse200
)
&
{
export
type
put
ApiV10SiteInformationResponseSuccess
=
(
putApiV10
SiteInformationResponse200
)
&
{
headers
:
Headers
;
};
export
type
put
SiteInformationResponseError
=
(
putSiteInformationResponse400
|
put
SiteInformationResponse401
)
&
{
export
type
put
ApiV10SiteInformationResponseError
=
(
putApiV10SiteInformationResponse400
|
putApiV10
SiteInformationResponse401
)
&
{
headers
:
Headers
;
};
export
type
put
SiteInformationResponse
=
(
putSiteInformationResponseSuccess
|
put
SiteInformationResponseError
)
export
type
put
ApiV10SiteInformationResponse
=
(
putApiV10SiteInformationResponseSuccess
|
putApiV10
SiteInformationResponseError
)
export
const
getPutSiteInformationUrl
=
()
=>
{
export
const
getPut
ApiV10
SiteInformationUrl
=
()
=>
{
return
`/siteInformation`
return
`/
api/v1.0/
siteInformation`
}
export
const
put
SiteInformation
=
async
(
siteInformationUpdateBody
:
SiteInformationUpdateBody
,
options
?:
RequestInit
):
Promise
<
put
SiteInformationResponse
>
=>
{
export
const
put
ApiV10SiteInformation
=
async
(
siteInformationUpdateBody
:
SiteInformationUpdateBody
,
options
?:
RequestInit
):
Promise
<
putApiV10
SiteInformationResponse
>
=>
{
return
useCustomClient
<
put
SiteInformationResponse
>
(
getPut
SiteInformationUrl
(),
return
useCustomClient
<
put
ApiV10SiteInformationResponse
>
(
getPutApiV10
SiteInformationUrl
(),
{
...
options
,
method
:
'PUT'
,
...
...
@@ -319,11 +319,11 @@ export const putSiteInformation = async (siteInformationUpdateBody: SiteInformat
export
const
getPutSiteInformationMutationOptions
=
<
TError
=
ErrorType
<
void
>
,
TContext
=
unknown
>
(
options
?:
{
mutation
?:
UseMutationOptions
<
Awaited
<
ReturnType
<
typeof
putSiteInformation
>>
,
TError
,{
data
:
BodyType
<
SiteInformationUpdateBody
>
},
TContext
>
,
request
?:
SecondParameter
<
typeof
useCustomClient
>
}
):
UseMutationOptions
<
Awaited
<
ReturnType
<
typeof
putSiteInformation
>>
,
TError
,{
data
:
BodyType
<
SiteInformationUpdateBody
>
},
TContext
>
=>
{
export
const
getPut
ApiV10
SiteInformationMutationOptions
=
<
TError
=
ErrorType
<
void
>
,
TContext
=
unknown
>
(
options
?:
{
mutation
?:
UseMutationOptions
<
Awaited
<
ReturnType
<
typeof
put
ApiV10
SiteInformation
>>
,
TError
,{
data
:
BodyType
<
SiteInformationUpdateBody
>
},
TContext
>
,
request
?:
SecondParameter
<
typeof
useCustomClient
>
}
):
UseMutationOptions
<
Awaited
<
ReturnType
<
typeof
put
ApiV10
SiteInformation
>>
,
TError
,{
data
:
BodyType
<
SiteInformationUpdateBody
>
},
TContext
>
=>
{
const
mutationKey
=
[
'putSiteInformation'
];
const
mutationKey
=
[
'put
ApiV10
SiteInformation'
];
const
{
mutation
:
mutationOptions
,
request
:
requestOptions
}
=
options
?
options
.
mutation
&&
'mutationKey'
in
options
.
mutation
&&
options
.
mutation
.
mutationKey
?
options
...
...
@@ -333,10 +333,10 @@ const {mutation: mutationOptions, request: requestOptions} = options ?
const
mutationFn
:
MutationFunction
<
Awaited
<
ReturnType
<
typeof
putSiteInformation
>>
,
{
data
:
BodyType
<
SiteInformationUpdateBody
>
}
>
=
(
props
)
=>
{
const
mutationFn
:
MutationFunction
<
Awaited
<
ReturnType
<
typeof
put
ApiV10
SiteInformation
>>
,
{
data
:
BodyType
<
SiteInformationUpdateBody
>
}
>
=
(
props
)
=>
{
const
{
data
}
=
props
??
{};
return
putSiteInformation
(
data
,
requestOptions
)
return
put
ApiV10
SiteInformation
(
data
,
requestOptions
)
}
...
...
@@ -344,53 +344,53 @@ const {mutation: mutationOptions, request: requestOptions} = options ?
return
{
mutationFn
,
...
mutationOptions
}}
export
type
Put
SiteInformationMutationResult
=
NonNullable
<
Awaited
<
ReturnType
<
typeof
put
SiteInformation
>>>
export
type
PutSiteInformationMutationBody
=
BodyType
<
SiteInformationUpdateBody
>
export
type
PutSiteInformationMutationError
=
ErrorType
<
void
>
export
type
Put
ApiV10SiteInformationMutationResult
=
NonNullable
<
Awaited
<
ReturnType
<
typeof
putApiV10
SiteInformation
>>>
export
type
Put
ApiV10
SiteInformationMutationBody
=
BodyType
<
SiteInformationUpdateBody
>
export
type
Put
ApiV10
SiteInformationMutationError
=
ErrorType
<
void
>
/**
* @summary Update current site information
*/
export
const
usePutSiteInformation
=
<
TError
=
ErrorType
<
void
>
,
TContext
=
unknown
>
(
options
?:
{
mutation
?:
UseMutationOptions
<
Awaited
<
ReturnType
<
typeof
putSiteInformation
>>
,
TError
,{
data
:
BodyType
<
SiteInformationUpdateBody
>
},
TContext
>
,
request
?:
SecondParameter
<
typeof
useCustomClient
>
}
export
const
usePut
ApiV10
SiteInformation
=
<
TError
=
ErrorType
<
void
>
,
TContext
=
unknown
>
(
options
?:
{
mutation
?:
UseMutationOptions
<
Awaited
<
ReturnType
<
typeof
put
ApiV10
SiteInformation
>>
,
TError
,{
data
:
BodyType
<
SiteInformationUpdateBody
>
},
TContext
>
,
request
?:
SecondParameter
<
typeof
useCustomClient
>
}
,
queryClient
?:
QueryClient
):
UseMutationResult
<
Awaited
<
ReturnType
<
typeof
putSiteInformation
>>
,
Awaited
<
ReturnType
<
typeof
put
ApiV10
SiteInformation
>>
,
TError
,
{
data
:
BodyType
<
SiteInformationUpdateBody
>
},
TContext
>
=>
{
const
mutationOptions
=
getPutSiteInformationMutationOptions
(
options
);
const
mutationOptions
=
getPut
ApiV10
SiteInformationMutationOptions
(
options
);
return
useMutation
(
mutationOptions
,
queryClient
);
}
/**
* @summary Update fixed site social link
*/
export
type
patchSiteInformationSocialsIdResponse200
=
{
export
type
patch
ApiV10
SiteInformationSocialsIdResponse200
=
{
data
:
void
status
:
200
}
export
type
patch
SiteInformationSocialsIdResponseSuccess
=
(
patch
SiteInformationSocialsIdResponse200
)
&
{
export
type
patch
ApiV10SiteInformationSocialsIdResponseSuccess
=
(
patchApiV10
SiteInformationSocialsIdResponse200
)
&
{
headers
:
Headers
;
};
;
export
type
patch
SiteInformationSocialsIdResponse
=
(
patch
SiteInformationSocialsIdResponseSuccess
)
export
type
patch
ApiV10SiteInformationSocialsIdResponse
=
(
patchApiV10
SiteInformationSocialsIdResponseSuccess
)
export
const
getPatchSiteInformationSocialsIdUrl
=
(
id
:
string
,)
=>
{
export
const
getPatch
ApiV10
SiteInformationSocialsIdUrl
=
(
id
:
string
,)
=>
{
return
`/siteInformation/socials/
${
id
}
`
return
`/
api/v1.0/
siteInformation/socials/
${
id
}
`
}
export
const
patchSiteInformationSocialsId
=
async
(
id
:
string
,
siteInformationSocialMutate
:
SiteInformationSocialMutate
,
options
?:
RequestInit
):
Promise
<
patchSiteInformationSocialsIdResponse
>
=>
{
export
const
patch
ApiV10
SiteInformationSocialsId
=
async
(
id
:
string
,
siteInformationSocialMutate
:
SiteInformationSocialMutate
,
options
?:
RequestInit
):
Promise
<
patch
ApiV10
SiteInformationSocialsIdResponse
>
=>
{
return
useCustomClient
<
patch
SiteInformationSocialsIdResponse
>
(
getPatch
SiteInformationSocialsIdUrl
(
id
),
return
useCustomClient
<
patch
ApiV10SiteInformationSocialsIdResponse
>
(
getPatchApiV10
SiteInformationSocialsIdUrl
(
id
),
{
...
options
,
method
:
'PATCH'
,
...
...
@@ -403,11 +403,11 @@ export const patchSiteInformationSocialsId = async (id: string,
export
const
getPatchSiteInformationSocialsIdMutationOptions
=
<
TError
=
ErrorType
<
unknown
>
,
TContext
=
unknown
>
(
options
?:
{
mutation
?:
UseMutationOptions
<
Awaited
<
ReturnType
<
typeof
patchSiteInformationSocialsId
>>
,
TError
,{
id
:
string
;
data
:
BodyType
<
SiteInformationSocialMutate
>
},
TContext
>
,
request
?:
SecondParameter
<
typeof
useCustomClient
>
}
):
UseMutationOptions
<
Awaited
<
ReturnType
<
typeof
patchSiteInformationSocialsId
>>
,
TError
,{
id
:
string
;
data
:
BodyType
<
SiteInformationSocialMutate
>
},
TContext
>
=>
{
export
const
getPatch
ApiV10
SiteInformationSocialsIdMutationOptions
=
<
TError
=
ErrorType
<
unknown
>
,
TContext
=
unknown
>
(
options
?:
{
mutation
?:
UseMutationOptions
<
Awaited
<
ReturnType
<
typeof
patch
ApiV10
SiteInformationSocialsId
>>
,
TError
,{
id
:
string
;
data
:
BodyType
<
SiteInformationSocialMutate
>
},
TContext
>
,
request
?:
SecondParameter
<
typeof
useCustomClient
>
}
):
UseMutationOptions
<
Awaited
<
ReturnType
<
typeof
patch
ApiV10
SiteInformationSocialsId
>>
,
TError
,{
id
:
string
;
data
:
BodyType
<
SiteInformationSocialMutate
>
},
TContext
>
=>
{
const
mutationKey
=
[
'patchSiteInformationSocialsId'
];
const
mutationKey
=
[
'patch
ApiV10
SiteInformationSocialsId'
];
const
{
mutation
:
mutationOptions
,
request
:
requestOptions
}
=
options
?
options
.
mutation
&&
'mutationKey'
in
options
.
mutation
&&
options
.
mutation
.
mutationKey
?
options
...
...
@@ -417,10 +417,10 @@ const {mutation: mutationOptions, request: requestOptions} = options ?
const
mutationFn
:
MutationFunction
<
Awaited
<
ReturnType
<
typeof
patchSiteInformationSocialsId
>>
,
{
id
:
string
;
data
:
BodyType
<
SiteInformationSocialMutate
>
}
>
=
(
props
)
=>
{
const
mutationFn
:
MutationFunction
<
Awaited
<
ReturnType
<
typeof
patch
ApiV10
SiteInformationSocialsId
>>
,
{
id
:
string
;
data
:
BodyType
<
SiteInformationSocialMutate
>
}
>
=
(
props
)
=>
{
const
{
id
,
data
}
=
props
??
{};
return
patchSiteInformationSocialsId
(
id
,
data
,
requestOptions
)
return
patch
ApiV10
SiteInformationSocialsId
(
id
,
data
,
requestOptions
)
}
...
...
@@ -428,52 +428,52 @@ const {mutation: mutationOptions, request: requestOptions} = options ?
return
{
mutationFn
,
...
mutationOptions
}}
export
type
Patch
SiteInformationSocialsIdMutationResult
=
NonNullable
<
Awaited
<
ReturnType
<
typeof
patch
SiteInformationSocialsId
>>>
export
type
PatchSiteInformationSocialsIdMutationBody
=
BodyType
<
SiteInformationSocialMutate
>
export
type
PatchSiteInformationSocialsIdMutationError
=
ErrorType
<
unknown
>
export
type
Patch
ApiV10SiteInformationSocialsIdMutationResult
=
NonNullable
<
Awaited
<
ReturnType
<
typeof
patchApiV10
SiteInformationSocialsId
>>>
export
type
Patch
ApiV10
SiteInformationSocialsIdMutationBody
=
BodyType
<
SiteInformationSocialMutate
>
export
type
Patch
ApiV10
SiteInformationSocialsIdMutationError
=
ErrorType
<
unknown
>
/**
* @summary Update fixed site social link
*/
export
const
usePatchSiteInformationSocialsId
=
<
TError
=
ErrorType
<
unknown
>
,
TContext
=
unknown
>
(
options
?:
{
mutation
?:
UseMutationOptions
<
Awaited
<
ReturnType
<
typeof
patchSiteInformationSocialsId
>>
,
TError
,{
id
:
string
;
data
:
BodyType
<
SiteInformationSocialMutate
>
},
TContext
>
,
request
?:
SecondParameter
<
typeof
useCustomClient
>
}
export
const
usePatch
ApiV10
SiteInformationSocialsId
=
<
TError
=
ErrorType
<
unknown
>
,
TContext
=
unknown
>
(
options
?:
{
mutation
?:
UseMutationOptions
<
Awaited
<
ReturnType
<
typeof
patch
ApiV10
SiteInformationSocialsId
>>
,
TError
,{
id
:
string
;
data
:
BodyType
<
SiteInformationSocialMutate
>
},
TContext
>
,
request
?:
SecondParameter
<
typeof
useCustomClient
>
}
,
queryClient
?:
QueryClient
):
UseMutationResult
<
Awaited
<
ReturnType
<
typeof
patchSiteInformationSocialsId
>>
,
Awaited
<
ReturnType
<
typeof
patch
ApiV10
SiteInformationSocialsId
>>
,
TError
,
{
id
:
string
;
data
:
BodyType
<
SiteInformationSocialMutate
>
},
TContext
>
=>
{
const
mutationOptions
=
getPatchSiteInformationSocialsIdMutationOptions
(
options
);
const
mutationOptions
=
getPatch
ApiV10
SiteInformationSocialsIdMutationOptions
(
options
);
return
useMutation
(
mutationOptions
,
queryClient
);
}
/**
* @summary Get fixed site social links
*/
export
type
getSiteInformationSocialsResponse200
=
{
export
type
get
ApiV10
SiteInformationSocialsResponse200
=
{
data
:
void
status
:
200
}
export
type
get
SiteInformationSocialsResponseSuccess
=
(
get
SiteInformationSocialsResponse200
)
&
{
export
type
get
ApiV10SiteInformationSocialsResponseSuccess
=
(
getApiV10
SiteInformationSocialsResponse200
)
&
{
headers
:
Headers
;
};
;
export
type
get
SiteInformationSocialsResponse
=
(
get
SiteInformationSocialsResponseSuccess
)
export
type
get
ApiV10SiteInformationSocialsResponse
=
(
getApiV10
SiteInformationSocialsResponseSuccess
)
export
const
getGetSiteInformationSocialsUrl
=
()
=>
{
export
const
getGet
ApiV10
SiteInformationSocialsUrl
=
()
=>
{
return
`/siteInformation/socials`
return
`/
api/v1.0/
siteInformation/socials`
}
export
const
get
SiteInformationSocials
=
async
(
options
?:
RequestInit
):
Promise
<
get
SiteInformationSocialsResponse
>
=>
{
export
const
get
ApiV10SiteInformationSocials
=
async
(
options
?:
RequestInit
):
Promise
<
getApiV10
SiteInformationSocialsResponse
>
=>
{
return
useCustomClient
<
get
SiteInformationSocialsResponse
>
(
getGet
SiteInformationSocialsUrl
(),
return
useCustomClient
<
get
ApiV10SiteInformationSocialsResponse
>
(
getGetApiV10
SiteInformationSocialsUrl
(),
{
...
options
,
method
:
'GET'
...
...
@@ -486,75 +486,75 @@ export const getSiteInformationSocials = async ( options?: RequestInit): Promise
export
const
getGetSiteInformationSocialsInfiniteQueryKey
=
()
=>
{
export
const
getGet
ApiV10
SiteInformationSocialsInfiniteQueryKey
=
()
=>
{
return
[
'infinite'
,
`/siteInformation/socials`
'infinite'
,
`/
api/v1.0/
siteInformation/socials`
]
as
const
;
}
export
const
getGetSiteInformationSocialsQueryKey
=
()
=>
{
export
const
getGet
ApiV10
SiteInformationSocialsQueryKey
=
()
=>
{
return
[
`/siteInformation/socials`
`/
api/v1.0/
siteInformation/socials`
]
as
const
;
}
export
const
getGet
SiteInformationSocialsInfiniteQueryOptions
=
<
TData
=
InfiniteData
<
Awaited
<
ReturnType
<
typeof
getSiteInformationSocials
>>>
,
TError
=
ErrorType
<
unknown
>>
(
options
?:
{
query
?:
Partial
<
UseInfiniteQueryOptions
<
Awaited
<
ReturnType
<
typeof
get
SiteInformationSocials
>>
,
TError
,
TData
>>
,
request
?:
SecondParameter
<
typeof
useCustomClient
>
}
export
const
getGet
ApiV10SiteInformationSocialsInfiniteQueryOptions
=
<
TData
=
InfiniteData
<
Awaited
<
ReturnType
<
typeof
getApiV10SiteInformationSocials
>>>
,
TError
=
ErrorType
<
unknown
>>
(
options
?:
{
query
?:
Partial
<
UseInfiniteQueryOptions
<
Awaited
<
ReturnType
<
typeof
getApiV10
SiteInformationSocials
>>
,
TError
,
TData
>>
,
request
?:
SecondParameter
<
typeof
useCustomClient
>
}
)
=>
{
const
{
query
:
queryOptions
,
request
:
requestOptions
}
=
options
??
{};
const
queryKey
=
queryOptions
?.
queryKey
??
getGetSiteInformationSocialsInfiniteQueryKey
();
const
queryKey
=
queryOptions
?.
queryKey
??
getGet
ApiV10
SiteInformationSocialsInfiniteQueryKey
();
const
queryFn
:
QueryFunction
<
Awaited
<
ReturnType
<
typeof
get
SiteInformationSocials
>>>
=
({
signal
})
=>
get
SiteInformationSocials
({
signal
,
...
requestOptions
});
const
queryFn
:
QueryFunction
<
Awaited
<
ReturnType
<
typeof
get
ApiV10SiteInformationSocials
>>>
=
({
signal
})
=>
getApiV10
SiteInformationSocials
({
signal
,
...
requestOptions
});
return
{
queryKey
,
queryFn
,
retry
:
3
,
retryDelay
:
1000
,
...
queryOptions
}
as
UseInfiniteQueryOptions
<
Awaited
<
ReturnType
<
typeof
getSiteInformationSocials
>>
,
TError
,
TData
>
&
{
queryKey
:
DataTag
<
QueryKey
,
TData
,
TError
>
}
return
{
queryKey
,
queryFn
,
retry
:
3
,
retryDelay
:
1000
,
...
queryOptions
}
as
UseInfiniteQueryOptions
<
Awaited
<
ReturnType
<
typeof
get
ApiV10
SiteInformationSocials
>>
,
TError
,
TData
>
&
{
queryKey
:
DataTag
<
QueryKey
,
TData
,
TError
>
}
}
export
type
Get
SiteInformationSocialsInfiniteQueryResult
=
NonNullable
<
Awaited
<
ReturnType
<
typeof
get
SiteInformationSocials
>>>
export
type
GetSiteInformationSocialsInfiniteQueryError
=
ErrorType
<
unknown
>
export
type
Get
ApiV10SiteInformationSocialsInfiniteQueryResult
=
NonNullable
<
Awaited
<
ReturnType
<
typeof
getApiV10
SiteInformationSocials
>>>
export
type
Get
ApiV10
SiteInformationSocialsInfiniteQueryError
=
ErrorType
<
unknown
>
export
function
useGet
SiteInformationSocialsInfinite
<
TData
=
InfiniteData
<
Awaited
<
ReturnType
<
typeof
get
SiteInformationSocials
>>>
,
TError
=
ErrorType
<
unknown
>>
(
options
:
{
query
:
Partial
<
UseInfiniteQueryOptions
<
Awaited
<
ReturnType
<
typeof
getSiteInformationSocials
>>
,
TError
,
TData
>>
&
Pick
<
export
function
useGet
ApiV10SiteInformationSocialsInfinite
<
TData
=
InfiniteData
<
Awaited
<
ReturnType
<
typeof
getApiV10
SiteInformationSocials
>>>
,
TError
=
ErrorType
<
unknown
>>
(
options
:
{
query
:
Partial
<
UseInfiniteQueryOptions
<
Awaited
<
ReturnType
<
typeof
get
ApiV10
SiteInformationSocials
>>
,
TError
,
TData
>>
&
Pick
<
DefinedInitialDataOptions
<
Awaited
<
ReturnType
<
typeof
getSiteInformationSocials
>>
,
Awaited
<
ReturnType
<
typeof
get
ApiV10
SiteInformationSocials
>>
,
TError
,
Awaited
<
ReturnType
<
typeof
getSiteInformationSocials
>>
Awaited
<
ReturnType
<
typeof
get
ApiV10
SiteInformationSocials
>>
>
,
'initialData'
>
,
request
?:
SecondParameter
<
typeof
useCustomClient
>
}
,
queryClient
?:
QueryClient
):
DefinedUseInfiniteQueryResult
<
TData
,
TError
>
&
{
queryKey
:
DataTag
<
QueryKey
,
TData
,
TError
>
}
export
function
useGet
SiteInformationSocialsInfinite
<
TData
=
InfiniteData
<
Awaited
<
ReturnType
<
typeof
get
SiteInformationSocials
>>>
,
TError
=
ErrorType
<
unknown
>>
(
options
?:
{
query
?:
Partial
<
UseInfiniteQueryOptions
<
Awaited
<
ReturnType
<
typeof
getSiteInformationSocials
>>
,
TError
,
TData
>>
&
Pick
<
export
function
useGet
ApiV10SiteInformationSocialsInfinite
<
TData
=
InfiniteData
<
Awaited
<
ReturnType
<
typeof
getApiV10
SiteInformationSocials
>>>
,
TError
=
ErrorType
<
unknown
>>
(
options
?:
{
query
?:
Partial
<
UseInfiniteQueryOptions
<
Awaited
<
ReturnType
<
typeof
get
ApiV10
SiteInformationSocials
>>
,
TError
,
TData
>>
&
Pick
<
UndefinedInitialDataOptions
<
Awaited
<
ReturnType
<
typeof
getSiteInformationSocials
>>
,
Awaited
<
ReturnType
<
typeof
get
ApiV10
SiteInformationSocials
>>
,
TError
,
Awaited
<
ReturnType
<
typeof
getSiteInformationSocials
>>
Awaited
<
ReturnType
<
typeof
get
ApiV10
SiteInformationSocials
>>
>
,
'initialData'
>
,
request
?:
SecondParameter
<
typeof
useCustomClient
>
}
,
queryClient
?:
QueryClient
):
UseInfiniteQueryResult
<
TData
,
TError
>
&
{
queryKey
:
DataTag
<
QueryKey
,
TData
,
TError
>
}
export
function
useGet
SiteInformationSocialsInfinite
<
TData
=
InfiniteData
<
Awaited
<
ReturnType
<
typeof
get
SiteInformationSocials
>>>
,
TError
=
ErrorType
<
unknown
>>
(
options
?:
{
query
?:
Partial
<
UseInfiniteQueryOptions
<
Awaited
<
ReturnType
<
typeof
getSiteInformationSocials
>>
,
TError
,
TData
>>
,
request
?:
SecondParameter
<
typeof
useCustomClient
>
}
export
function
useGet
ApiV10SiteInformationSocialsInfinite
<
TData
=
InfiniteData
<
Awaited
<
ReturnType
<
typeof
getApiV10
SiteInformationSocials
>>>
,
TError
=
ErrorType
<
unknown
>>
(
options
?:
{
query
?:
Partial
<
UseInfiniteQueryOptions
<
Awaited
<
ReturnType
<
typeof
get
ApiV10
SiteInformationSocials
>>
,
TError
,
TData
>>
,
request
?:
SecondParameter
<
typeof
useCustomClient
>
}
,
queryClient
?:
QueryClient
):
UseInfiniteQueryResult
<
TData
,
TError
>
&
{
queryKey
:
DataTag
<
QueryKey
,
TData
,
TError
>
}
/**
* @summary Get fixed site social links
*/
export
function
useGet
SiteInformationSocialsInfinite
<
TData
=
InfiniteData
<
Awaited
<
ReturnType
<
typeof
get
SiteInformationSocials
>>>
,
TError
=
ErrorType
<
unknown
>>
(
options
?:
{
query
?:
Partial
<
UseInfiniteQueryOptions
<
Awaited
<
ReturnType
<
typeof
getSiteInformationSocials
>>
,
TError
,
TData
>>
,
request
?:
SecondParameter
<
typeof
useCustomClient
>
}
export
function
useGet
ApiV10SiteInformationSocialsInfinite
<
TData
=
InfiniteData
<
Awaited
<
ReturnType
<
typeof
getApiV10
SiteInformationSocials
>>>
,
TError
=
ErrorType
<
unknown
>>
(
options
?:
{
query
?:
Partial
<
UseInfiniteQueryOptions
<
Awaited
<
ReturnType
<
typeof
get
ApiV10
SiteInformationSocials
>>
,
TError
,
TData
>>
,
request
?:
SecondParameter
<
typeof
useCustomClient
>
}
,
queryClient
?:
QueryClient
):
UseInfiniteQueryResult
<
TData
,
TError
>
&
{
queryKey
:
DataTag
<
QueryKey
,
TData
,
TError
>
}
{
const
queryOptions
=
getGetSiteInformationSocialsInfiniteQueryOptions
(
options
)
const
queryOptions
=
getGet
ApiV10
SiteInformationSocialsInfiniteQueryOptions
(
options
)
const
query
=
useInfiniteQuery
(
queryOptions
,
queryClient
)
as
UseInfiniteQueryResult
<
TData
,
TError
>
&
{
queryKey
:
DataTag
<
QueryKey
,
TData
,
TError
>
};
...
...
@@ -566,12 +566,12 @@ export function useGetSiteInformationSocialsInfinite<TData = InfiniteData<Awaite
/**
* @summary Get fixed site social links
*/
export
const
prefetchGet
SiteInformationSocialsInfiniteQuery
=
async
<
TData
=
Awaited
<
ReturnType
<
typeof
get
SiteInformationSocials
>>
,
TError
=
ErrorType
<
unknown
>>
(
queryClient
:
QueryClient
,
options
?:
{
query
?:
Partial
<
UseInfiniteQueryOptions
<
Awaited
<
ReturnType
<
typeof
getSiteInformationSocials
>>
,
TError
,
TData
>>
,
request
?:
SecondParameter
<
typeof
useCustomClient
>
}
export
const
prefetchGet
ApiV10SiteInformationSocialsInfiniteQuery
=
async
<
TData
=
Awaited
<
ReturnType
<
typeof
getApiV10
SiteInformationSocials
>>
,
TError
=
ErrorType
<
unknown
>>
(
queryClient
:
QueryClient
,
options
?:
{
query
?:
Partial
<
UseInfiniteQueryOptions
<
Awaited
<
ReturnType
<
typeof
get
ApiV10
SiteInformationSocials
>>
,
TError
,
TData
>>
,
request
?:
SecondParameter
<
typeof
useCustomClient
>
}
):
Promise
<
QueryClient
>
=>
{
const
queryOptions
=
getGetSiteInformationSocialsInfiniteQueryOptions
(
options
)
const
queryOptions
=
getGet
ApiV10
SiteInformationSocialsInfiniteQueryOptions
(
options
)
await
queryClient
.
prefetchInfiniteQuery
(
queryOptions
);
...
...
@@ -580,62 +580,62 @@ export const prefetchGetSiteInformationSocialsInfiniteQuery = async <TData = Awa
export
const
getGet
SiteInformationSocialsQueryOptions
=
<
TData
=
Awaited
<
ReturnType
<
typeof
getSiteInformationSocials
>>
,
TError
=
ErrorType
<
unknown
>>
(
options
?:
{
query
?:
Partial
<
UseQueryOptions
<
Awaited
<
ReturnType
<
typeof
get
SiteInformationSocials
>>
,
TError
,
TData
>>
,
request
?:
SecondParameter
<
typeof
useCustomClient
>
}
export
const
getGet
ApiV10SiteInformationSocialsQueryOptions
=
<
TData
=
Awaited
<
ReturnType
<
typeof
getApiV10SiteInformationSocials
>>
,
TError
=
ErrorType
<
unknown
>>
(
options
?:
{
query
?:
Partial
<
UseQueryOptions
<
Awaited
<
ReturnType
<
typeof
getApiV10
SiteInformationSocials
>>
,
TError
,
TData
>>
,
request
?:
SecondParameter
<
typeof
useCustomClient
>
}
)
=>
{
const
{
query
:
queryOptions
,
request
:
requestOptions
}
=
options
??
{};
const
queryKey
=
queryOptions
?.
queryKey
??
getGetSiteInformationSocialsQueryKey
();
const
queryKey
=
queryOptions
?.
queryKey
??
getGet
ApiV10
SiteInformationSocialsQueryKey
();
const
queryFn
:
QueryFunction
<
Awaited
<
ReturnType
<
typeof
get
SiteInformationSocials
>>>
=
({
signal
})
=>
get
SiteInformationSocials
({
signal
,
...
requestOptions
});
const
queryFn
:
QueryFunction
<
Awaited
<
ReturnType
<
typeof
get
ApiV10SiteInformationSocials
>>>
=
({
signal
})
=>
getApiV10
SiteInformationSocials
({
signal
,
...
requestOptions
});
return
{
queryKey
,
queryFn
,
retry
:
3
,
retryDelay
:
1000
,
...
queryOptions
}
as
UseQueryOptions
<
Awaited
<
ReturnType
<
typeof
getSiteInformationSocials
>>
,
TError
,
TData
>
&
{
queryKey
:
DataTag
<
QueryKey
,
TData
,
TError
>
}
return
{
queryKey
,
queryFn
,
retry
:
3
,
retryDelay
:
1000
,
...
queryOptions
}
as
UseQueryOptions
<
Awaited
<
ReturnType
<
typeof
get
ApiV10
SiteInformationSocials
>>
,
TError
,
TData
>
&
{
queryKey
:
DataTag
<
QueryKey
,
TData
,
TError
>
}
}
export
type
Get
SiteInformationSocialsQueryResult
=
NonNullable
<
Awaited
<
ReturnType
<
typeof
get
SiteInformationSocials
>>>
export
type
GetSiteInformationSocialsQueryError
=
ErrorType
<
unknown
>
export
type
Get
ApiV10SiteInformationSocialsQueryResult
=
NonNullable
<
Awaited
<
ReturnType
<
typeof
getApiV10
SiteInformationSocials
>>>
export
type
Get
ApiV10
SiteInformationSocialsQueryError
=
ErrorType
<
unknown
>
export
function
useGet
SiteInformationSocials
<
TData
=
Awaited
<
ReturnType
<
typeof
get
SiteInformationSocials
>>
,
TError
=
ErrorType
<
unknown
>>
(
options
:
{
query
:
Partial
<
UseQueryOptions
<
Awaited
<
ReturnType
<
typeof
getSiteInformationSocials
>>
,
TError
,
TData
>>
&
Pick
<
export
function
useGet
ApiV10SiteInformationSocials
<
TData
=
Awaited
<
ReturnType
<
typeof
getApiV10
SiteInformationSocials
>>
,
TError
=
ErrorType
<
unknown
>>
(
options
:
{
query
:
Partial
<
UseQueryOptions
<
Awaited
<
ReturnType
<
typeof
get
ApiV10
SiteInformationSocials
>>
,
TError
,
TData
>>
&
Pick
<
DefinedInitialDataOptions
<
Awaited
<
ReturnType
<
typeof
getSiteInformationSocials
>>
,
Awaited
<
ReturnType
<
typeof
get
ApiV10
SiteInformationSocials
>>
,
TError
,
Awaited
<
ReturnType
<
typeof
getSiteInformationSocials
>>
Awaited
<
ReturnType
<
typeof
get
ApiV10
SiteInformationSocials
>>
>
,
'initialData'
>
,
request
?:
SecondParameter
<
typeof
useCustomClient
>
}
,
queryClient
?:
QueryClient
):
DefinedUseQueryResult
<
TData
,
TError
>
&
{
queryKey
:
DataTag
<
QueryKey
,
TData
,
TError
>
}
export
function
useGet
SiteInformationSocials
<
TData
=
Awaited
<
ReturnType
<
typeof
get
SiteInformationSocials
>>
,
TError
=
ErrorType
<
unknown
>>
(
options
?:
{
query
?:
Partial
<
UseQueryOptions
<
Awaited
<
ReturnType
<
typeof
getSiteInformationSocials
>>
,
TError
,
TData
>>
&
Pick
<
export
function
useGet
ApiV10SiteInformationSocials
<
TData
=
Awaited
<
ReturnType
<
typeof
getApiV10
SiteInformationSocials
>>
,
TError
=
ErrorType
<
unknown
>>
(
options
?:
{
query
?:
Partial
<
UseQueryOptions
<
Awaited
<
ReturnType
<
typeof
get
ApiV10
SiteInformationSocials
>>
,
TError
,
TData
>>
&
Pick
<
UndefinedInitialDataOptions
<
Awaited
<
ReturnType
<
typeof
getSiteInformationSocials
>>
,
Awaited
<
ReturnType
<
typeof
get
ApiV10
SiteInformationSocials
>>
,
TError
,
Awaited
<
ReturnType
<
typeof
getSiteInformationSocials
>>
Awaited
<
ReturnType
<
typeof
get
ApiV10
SiteInformationSocials
>>
>
,
'initialData'
>
,
request
?:
SecondParameter
<
typeof
useCustomClient
>
}
,
queryClient
?:
QueryClient
):
UseQueryResult
<
TData
,
TError
>
&
{
queryKey
:
DataTag
<
QueryKey
,
TData
,
TError
>
}
export
function
useGet
SiteInformationSocials
<
TData
=
Awaited
<
ReturnType
<
typeof
get
SiteInformationSocials
>>
,
TError
=
ErrorType
<
unknown
>>
(
options
?:
{
query
?:
Partial
<
UseQueryOptions
<
Awaited
<
ReturnType
<
typeof
getSiteInformationSocials
>>
,
TError
,
TData
>>
,
request
?:
SecondParameter
<
typeof
useCustomClient
>
}
export
function
useGet
ApiV10SiteInformationSocials
<
TData
=
Awaited
<
ReturnType
<
typeof
getApiV10
SiteInformationSocials
>>
,
TError
=
ErrorType
<
unknown
>>
(
options
?:
{
query
?:
Partial
<
UseQueryOptions
<
Awaited
<
ReturnType
<
typeof
get
ApiV10
SiteInformationSocials
>>
,
TError
,
TData
>>
,
request
?:
SecondParameter
<
typeof
useCustomClient
>
}
,
queryClient
?:
QueryClient
):
UseQueryResult
<
TData
,
TError
>
&
{
queryKey
:
DataTag
<
QueryKey
,
TData
,
TError
>
}
/**
* @summary Get fixed site social links
*/
export
function
useGet
SiteInformationSocials
<
TData
=
Awaited
<
ReturnType
<
typeof
get
SiteInformationSocials
>>
,
TError
=
ErrorType
<
unknown
>>
(
options
?:
{
query
?:
Partial
<
UseQueryOptions
<
Awaited
<
ReturnType
<
typeof
getSiteInformationSocials
>>
,
TError
,
TData
>>
,
request
?:
SecondParameter
<
typeof
useCustomClient
>
}
export
function
useGet
ApiV10SiteInformationSocials
<
TData
=
Awaited
<
ReturnType
<
typeof
getApiV10
SiteInformationSocials
>>
,
TError
=
ErrorType
<
unknown
>>
(
options
?:
{
query
?:
Partial
<
UseQueryOptions
<
Awaited
<
ReturnType
<
typeof
get
ApiV10
SiteInformationSocials
>>
,
TError
,
TData
>>
,
request
?:
SecondParameter
<
typeof
useCustomClient
>
}
,
queryClient
?:
QueryClient
):
UseQueryResult
<
TData
,
TError
>
&
{
queryKey
:
DataTag
<
QueryKey
,
TData
,
TError
>
}
{
const
queryOptions
=
getGetSiteInformationSocialsQueryOptions
(
options
)
const
queryOptions
=
getGet
ApiV10
SiteInformationSocialsQueryOptions
(
options
)
const
query
=
useQuery
(
queryOptions
,
queryClient
)
as
UseQueryResult
<
TData
,
TError
>
&
{
queryKey
:
DataTag
<
QueryKey
,
TData
,
TError
>
};
...
...
@@ -647,12 +647,12 @@ export function useGetSiteInformationSocials<TData = Awaited<ReturnType<typeof g
/**
* @summary Get fixed site social links
*/
export
const
prefetchGet
SiteInformationSocialsQuery
=
async
<
TData
=
Awaited
<
ReturnType
<
typeof
get
SiteInformationSocials
>>
,
TError
=
ErrorType
<
unknown
>>
(
queryClient
:
QueryClient
,
options
?:
{
query
?:
Partial
<
UseQueryOptions
<
Awaited
<
ReturnType
<
typeof
getSiteInformationSocials
>>
,
TError
,
TData
>>
,
request
?:
SecondParameter
<
typeof
useCustomClient
>
}
export
const
prefetchGet
ApiV10SiteInformationSocialsQuery
=
async
<
TData
=
Awaited
<
ReturnType
<
typeof
getApiV10
SiteInformationSocials
>>
,
TError
=
ErrorType
<
unknown
>>
(
queryClient
:
QueryClient
,
options
?:
{
query
?:
Partial
<
UseQueryOptions
<
Awaited
<
ReturnType
<
typeof
get
ApiV10
SiteInformationSocials
>>
,
TError
,
TData
>>
,
request
?:
SecondParameter
<
typeof
useCustomClient
>
}
):
Promise
<
QueryClient
>
=>
{
const
queryOptions
=
getGetSiteInformationSocialsQueryOptions
(
options
)
const
queryOptions
=
getGet
ApiV10
SiteInformationSocialsQueryOptions
(
options
)
await
queryClient
.
prefetchQuery
(
queryOptions
);
...
...
@@ -664,30 +664,30 @@ export const prefetchGetSiteInformationSocialsQuery = async <TData = Awaited<Ret
/**
* @summary Update site information branch
*/
export
type
patchSiteInformationBranchesIdResponse200
=
{
export
type
patch
ApiV10
SiteInformationBranchesIdResponse200
=
{
data
:
void
status
:
200
}
export
type
patch
SiteInformationBranchesIdResponseSuccess
=
(
patch
SiteInformationBranchesIdResponse200
)
&
{
export
type
patch
ApiV10SiteInformationBranchesIdResponseSuccess
=
(
patchApiV10
SiteInformationBranchesIdResponse200
)
&
{
headers
:
Headers
;
};
;
export
type
patch
SiteInformationBranchesIdResponse
=
(
patch
SiteInformationBranchesIdResponseSuccess
)
export
type
patch
ApiV10SiteInformationBranchesIdResponse
=
(
patchApiV10
SiteInformationBranchesIdResponseSuccess
)
export
const
getPatchSiteInformationBranchesIdUrl
=
(
id
:
string
,)
=>
{
export
const
getPatch
ApiV10
SiteInformationBranchesIdUrl
=
(
id
:
string
,)
=>
{
return
`/siteInformation/branches/
${
id
}
`
return
`/
api/v1.0/
siteInformation/branches/
${
id
}
`
}
export
const
patchSiteInformationBranchesId
=
async
(
id
:
string
,
siteInformationBranchMutate
:
SiteInformationBranchMutate
,
options
?:
RequestInit
):
Promise
<
patchSiteInformationBranchesIdResponse
>
=>
{
export
const
patch
ApiV10
SiteInformationBranchesId
=
async
(
id
:
string
,
siteInformationBranchMutate
:
SiteInformationBranchMutate
,
options
?:
RequestInit
):
Promise
<
patch
ApiV10
SiteInformationBranchesIdResponse
>
=>
{
return
useCustomClient
<
patch
SiteInformationBranchesIdResponse
>
(
getPatch
SiteInformationBranchesIdUrl
(
id
),
return
useCustomClient
<
patch
ApiV10SiteInformationBranchesIdResponse
>
(
getPatchApiV10
SiteInformationBranchesIdUrl
(
id
),
{
...
options
,
method
:
'PATCH'
,
...
...
@@ -700,11 +700,11 @@ export const patchSiteInformationBranchesId = async (id: string,
export
const
getPatchSiteInformationBranchesIdMutationOptions
=
<
TError
=
ErrorType
<
unknown
>
,
TContext
=
unknown
>
(
options
?:
{
mutation
?:
UseMutationOptions
<
Awaited
<
ReturnType
<
typeof
patchSiteInformationBranchesId
>>
,
TError
,{
id
:
string
;
data
:
BodyType
<
SiteInformationBranchMutate
>
},
TContext
>
,
request
?:
SecondParameter
<
typeof
useCustomClient
>
}
):
UseMutationOptions
<
Awaited
<
ReturnType
<
typeof
patchSiteInformationBranchesId
>>
,
TError
,{
id
:
string
;
data
:
BodyType
<
SiteInformationBranchMutate
>
},
TContext
>
=>
{
export
const
getPatch
ApiV10
SiteInformationBranchesIdMutationOptions
=
<
TError
=
ErrorType
<
unknown
>
,
TContext
=
unknown
>
(
options
?:
{
mutation
?:
UseMutationOptions
<
Awaited
<
ReturnType
<
typeof
patch
ApiV10
SiteInformationBranchesId
>>
,
TError
,{
id
:
string
;
data
:
BodyType
<
SiteInformationBranchMutate
>
},
TContext
>
,
request
?:
SecondParameter
<
typeof
useCustomClient
>
}
):
UseMutationOptions
<
Awaited
<
ReturnType
<
typeof
patch
ApiV10
SiteInformationBranchesId
>>
,
TError
,{
id
:
string
;
data
:
BodyType
<
SiteInformationBranchMutate
>
},
TContext
>
=>
{
const
mutationKey
=
[
'patchSiteInformationBranchesId'
];
const
mutationKey
=
[
'patch
ApiV10
SiteInformationBranchesId'
];
const
{
mutation
:
mutationOptions
,
request
:
requestOptions
}
=
options
?
options
.
mutation
&&
'mutationKey'
in
options
.
mutation
&&
options
.
mutation
.
mutationKey
?
options
...
...
@@ -714,10 +714,10 @@ const {mutation: mutationOptions, request: requestOptions} = options ?
const
mutationFn
:
MutationFunction
<
Awaited
<
ReturnType
<
typeof
patchSiteInformationBranchesId
>>
,
{
id
:
string
;
data
:
BodyType
<
SiteInformationBranchMutate
>
}
>
=
(
props
)
=>
{
const
mutationFn
:
MutationFunction
<
Awaited
<
ReturnType
<
typeof
patch
ApiV10
SiteInformationBranchesId
>>
,
{
id
:
string
;
data
:
BodyType
<
SiteInformationBranchMutate
>
}
>
=
(
props
)
=>
{
const
{
id
,
data
}
=
props
??
{};
return
patchSiteInformationBranchesId
(
id
,
data
,
requestOptions
)
return
patch
ApiV10
SiteInformationBranchesId
(
id
,
data
,
requestOptions
)
}
...
...
@@ -725,52 +725,52 @@ const {mutation: mutationOptions, request: requestOptions} = options ?
return
{
mutationFn
,
...
mutationOptions
}}
export
type
Patch
SiteInformationBranchesIdMutationResult
=
NonNullable
<
Awaited
<
ReturnType
<
typeof
patch
SiteInformationBranchesId
>>>
export
type
PatchSiteInformationBranchesIdMutationBody
=
BodyType
<
SiteInformationBranchMutate
>
export
type
PatchSiteInformationBranchesIdMutationError
=
ErrorType
<
unknown
>
export
type
Patch
ApiV10SiteInformationBranchesIdMutationResult
=
NonNullable
<
Awaited
<
ReturnType
<
typeof
patchApiV10
SiteInformationBranchesId
>>>
export
type
Patch
ApiV10
SiteInformationBranchesIdMutationBody
=
BodyType
<
SiteInformationBranchMutate
>
export
type
Patch
ApiV10
SiteInformationBranchesIdMutationError
=
ErrorType
<
unknown
>
/**
* @summary Update site information branch
*/
export
const
usePatchSiteInformationBranchesId
=
<
TError
=
ErrorType
<
unknown
>
,
TContext
=
unknown
>
(
options
?:
{
mutation
?:
UseMutationOptions
<
Awaited
<
ReturnType
<
typeof
patchSiteInformationBranchesId
>>
,
TError
,{
id
:
string
;
data
:
BodyType
<
SiteInformationBranchMutate
>
},
TContext
>
,
request
?:
SecondParameter
<
typeof
useCustomClient
>
}
export
const
usePatch
ApiV10
SiteInformationBranchesId
=
<
TError
=
ErrorType
<
unknown
>
,
TContext
=
unknown
>
(
options
?:
{
mutation
?:
UseMutationOptions
<
Awaited
<
ReturnType
<
typeof
patch
ApiV10
SiteInformationBranchesId
>>
,
TError
,{
id
:
string
;
data
:
BodyType
<
SiteInformationBranchMutate
>
},
TContext
>
,
request
?:
SecondParameter
<
typeof
useCustomClient
>
}
,
queryClient
?:
QueryClient
):
UseMutationResult
<
Awaited
<
ReturnType
<
typeof
patchSiteInformationBranchesId
>>
,
Awaited
<
ReturnType
<
typeof
patch
ApiV10
SiteInformationBranchesId
>>
,
TError
,
{
id
:
string
;
data
:
BodyType
<
SiteInformationBranchMutate
>
},
TContext
>
=>
{
const
mutationOptions
=
getPatchSiteInformationBranchesIdMutationOptions
(
options
);
const
mutationOptions
=
getPatch
ApiV10
SiteInformationBranchesIdMutationOptions
(
options
);
return
useMutation
(
mutationOptions
,
queryClient
);
}
/**
* @summary Delete site information branch
*/
export
type
deleteSiteInformationBranchesIdResponse200
=
{
export
type
delete
ApiV10
SiteInformationBranchesIdResponse200
=
{
data
:
void
status
:
200
}
export
type
delete
SiteInformationBranchesIdResponseSuccess
=
(
delete
SiteInformationBranchesIdResponse200
)
&
{
export
type
delete
ApiV10SiteInformationBranchesIdResponseSuccess
=
(
deleteApiV10
SiteInformationBranchesIdResponse200
)
&
{
headers
:
Headers
;
};
;
export
type
delete
SiteInformationBranchesIdResponse
=
(
delete
SiteInformationBranchesIdResponseSuccess
)
export
type
delete
ApiV10SiteInformationBranchesIdResponse
=
(
deleteApiV10
SiteInformationBranchesIdResponseSuccess
)
export
const
getDeleteSiteInformationBranchesIdUrl
=
(
id
:
string
,)
=>
{
export
const
getDelete
ApiV10
SiteInformationBranchesIdUrl
=
(
id
:
string
,)
=>
{
return
`/siteInformation/branches/
${
id
}
`
return
`/
api/v1.0/
siteInformation/branches/
${
id
}
`
}
export
const
delete
SiteInformationBranchesId
=
async
(
id
:
string
,
options
?:
RequestInit
):
Promise
<
delete
SiteInformationBranchesIdResponse
>
=>
{
export
const
delete
ApiV10SiteInformationBranchesId
=
async
(
id
:
string
,
options
?:
RequestInit
):
Promise
<
deleteApiV10
SiteInformationBranchesIdResponse
>
=>
{
return
useCustomClient
<
delete
SiteInformationBranchesIdResponse
>
(
getDelete
SiteInformationBranchesIdUrl
(
id
),
return
useCustomClient
<
delete
ApiV10SiteInformationBranchesIdResponse
>
(
getDeleteApiV10
SiteInformationBranchesIdUrl
(
id
),
{
...
options
,
method
:
'DELETE'
...
...
@@ -782,11 +782,11 @@ export const deleteSiteInformationBranchesId = async (id: string, options?: Requ
export
const
getDeleteSiteInformationBranchesIdMutationOptions
=
<
TError
=
ErrorType
<
unknown
>
,
TContext
=
unknown
>
(
options
?:
{
mutation
?:
UseMutationOptions
<
Awaited
<
ReturnType
<
typeof
deleteSiteInformationBranchesId
>>
,
TError
,{
id
:
string
},
TContext
>
,
request
?:
SecondParameter
<
typeof
useCustomClient
>
}
):
UseMutationOptions
<
Awaited
<
ReturnType
<
typeof
deleteSiteInformationBranchesId
>>
,
TError
,{
id
:
string
},
TContext
>
=>
{
export
const
getDelete
ApiV10
SiteInformationBranchesIdMutationOptions
=
<
TError
=
ErrorType
<
unknown
>
,
TContext
=
unknown
>
(
options
?:
{
mutation
?:
UseMutationOptions
<
Awaited
<
ReturnType
<
typeof
delete
ApiV10
SiteInformationBranchesId
>>
,
TError
,{
id
:
string
},
TContext
>
,
request
?:
SecondParameter
<
typeof
useCustomClient
>
}
):
UseMutationOptions
<
Awaited
<
ReturnType
<
typeof
delete
ApiV10
SiteInformationBranchesId
>>
,
TError
,{
id
:
string
},
TContext
>
=>
{
const
mutationKey
=
[
'deleteSiteInformationBranchesId'
];
const
mutationKey
=
[
'delete
ApiV10
SiteInformationBranchesId'
];
const
{
mutation
:
mutationOptions
,
request
:
requestOptions
}
=
options
?
options
.
mutation
&&
'mutationKey'
in
options
.
mutation
&&
options
.
mutation
.
mutationKey
?
options
...
...
@@ -796,10 +796,10 @@ const {mutation: mutationOptions, request: requestOptions} = options ?
const
mutationFn
:
MutationFunction
<
Awaited
<
ReturnType
<
typeof
deleteSiteInformationBranchesId
>>
,
{
id
:
string
}
>
=
(
props
)
=>
{
const
mutationFn
:
MutationFunction
<
Awaited
<
ReturnType
<
typeof
delete
ApiV10
SiteInformationBranchesId
>>
,
{
id
:
string
}
>
=
(
props
)
=>
{
const
{
id
}
=
props
??
{};
return
deleteSiteInformationBranchesId
(
id
,
requestOptions
)
return
delete
ApiV10
SiteInformationBranchesId
(
id
,
requestOptions
)
}
...
...
@@ -807,52 +807,52 @@ const {mutation: mutationOptions, request: requestOptions} = options ?
return
{
mutationFn
,
...
mutationOptions
}}
export
type
Delete
SiteInformationBranchesIdMutationResult
=
NonNullable
<
Awaited
<
ReturnType
<
typeof
delete
SiteInformationBranchesId
>>>
export
type
Delete
ApiV10SiteInformationBranchesIdMutationResult
=
NonNullable
<
Awaited
<
ReturnType
<
typeof
deleteApiV10
SiteInformationBranchesId
>>>
export
type
DeleteSiteInformationBranchesIdMutationError
=
ErrorType
<
unknown
>
export
type
Delete
ApiV10
SiteInformationBranchesIdMutationError
=
ErrorType
<
unknown
>
/**
* @summary Delete site information branch
*/
export
const
useDeleteSiteInformationBranchesId
=
<
TError
=
ErrorType
<
unknown
>
,
TContext
=
unknown
>
(
options
?:
{
mutation
?:
UseMutationOptions
<
Awaited
<
ReturnType
<
typeof
deleteSiteInformationBranchesId
>>
,
TError
,{
id
:
string
},
TContext
>
,
request
?:
SecondParameter
<
typeof
useCustomClient
>
}
export
const
useDelete
ApiV10
SiteInformationBranchesId
=
<
TError
=
ErrorType
<
unknown
>
,
TContext
=
unknown
>
(
options
?:
{
mutation
?:
UseMutationOptions
<
Awaited
<
ReturnType
<
typeof
delete
ApiV10
SiteInformationBranchesId
>>
,
TError
,{
id
:
string
},
TContext
>
,
request
?:
SecondParameter
<
typeof
useCustomClient
>
}
,
queryClient
?:
QueryClient
):
UseMutationResult
<
Awaited
<
ReturnType
<
typeof
deleteSiteInformationBranchesId
>>
,
Awaited
<
ReturnType
<
typeof
delete
ApiV10
SiteInformationBranchesId
>>
,
TError
,
{
id
:
string
},
TContext
>
=>
{
const
mutationOptions
=
getDeleteSiteInformationBranchesIdMutationOptions
(
options
);
const
mutationOptions
=
getDelete
ApiV10
SiteInformationBranchesIdMutationOptions
(
options
);
return
useMutation
(
mutationOptions
,
queryClient
);
}
/**
* @summary Get site information branches
*/
export
type
getSiteInformationBranchesResponse200
=
{
export
type
get
ApiV10
SiteInformationBranchesResponse200
=
{
data
:
void
status
:
200
}
export
type
get
SiteInformationBranchesResponseSuccess
=
(
get
SiteInformationBranchesResponse200
)
&
{
export
type
get
ApiV10SiteInformationBranchesResponseSuccess
=
(
getApiV10
SiteInformationBranchesResponse200
)
&
{
headers
:
Headers
;
};
;
export
type
get
SiteInformationBranchesResponse
=
(
get
SiteInformationBranchesResponseSuccess
)
export
type
get
ApiV10SiteInformationBranchesResponse
=
(
getApiV10
SiteInformationBranchesResponseSuccess
)
export
const
getGetSiteInformationBranchesUrl
=
()
=>
{
export
const
getGet
ApiV10
SiteInformationBranchesUrl
=
()
=>
{
return
`/siteInformation/branches`
return
`/
api/v1.0/
siteInformation/branches`
}
export
const
get
SiteInformationBranches
=
async
(
options
?:
RequestInit
):
Promise
<
get
SiteInformationBranchesResponse
>
=>
{
export
const
get
ApiV10SiteInformationBranches
=
async
(
options
?:
RequestInit
):
Promise
<
getApiV10
SiteInformationBranchesResponse
>
=>
{
return
useCustomClient
<
get
SiteInformationBranchesResponse
>
(
getGet
SiteInformationBranchesUrl
(),
return
useCustomClient
<
get
ApiV10SiteInformationBranchesResponse
>
(
getGetApiV10
SiteInformationBranchesUrl
(),
{
...
options
,
method
:
'GET'
...
...
@@ -865,75 +865,75 @@ export const getSiteInformationBranches = async ( options?: RequestInit): Promis
export
const
getGetSiteInformationBranchesInfiniteQueryKey
=
()
=>
{
export
const
getGet
ApiV10
SiteInformationBranchesInfiniteQueryKey
=
()
=>
{
return
[
'infinite'
,
`/siteInformation/branches`
'infinite'
,
`/
api/v1.0/
siteInformation/branches`
]
as
const
;
}
export
const
getGetSiteInformationBranchesQueryKey
=
()
=>
{
export
const
getGet
ApiV10
SiteInformationBranchesQueryKey
=
()
=>
{
return
[
`/siteInformation/branches`
`/
api/v1.0/
siteInformation/branches`
]
as
const
;
}
export
const
getGet
SiteInformationBranchesInfiniteQueryOptions
=
<
TData
=
InfiniteData
<
Awaited
<
ReturnType
<
typeof
getSiteInformationBranches
>>>
,
TError
=
ErrorType
<
unknown
>>
(
options
?:
{
query
?:
Partial
<
UseInfiniteQueryOptions
<
Awaited
<
ReturnType
<
typeof
get
SiteInformationBranches
>>
,
TError
,
TData
>>
,
request
?:
SecondParameter
<
typeof
useCustomClient
>
}
export
const
getGet
ApiV10SiteInformationBranchesInfiniteQueryOptions
=
<
TData
=
InfiniteData
<
Awaited
<
ReturnType
<
typeof
getApiV10SiteInformationBranches
>>>
,
TError
=
ErrorType
<
unknown
>>
(
options
?:
{
query
?:
Partial
<
UseInfiniteQueryOptions
<
Awaited
<
ReturnType
<
typeof
getApiV10
SiteInformationBranches
>>
,
TError
,
TData
>>
,
request
?:
SecondParameter
<
typeof
useCustomClient
>
}
)
=>
{
const
{
query
:
queryOptions
,
request
:
requestOptions
}
=
options
??
{};
const
queryKey
=
queryOptions
?.
queryKey
??
getGetSiteInformationBranchesInfiniteQueryKey
();
const
queryKey
=
queryOptions
?.
queryKey
??
getGet
ApiV10
SiteInformationBranchesInfiniteQueryKey
();
const
queryFn
:
QueryFunction
<
Awaited
<
ReturnType
<
typeof
get
SiteInformationBranches
>>>
=
({
signal
})
=>
get
SiteInformationBranches
({
signal
,
...
requestOptions
});
const
queryFn
:
QueryFunction
<
Awaited
<
ReturnType
<
typeof
get
ApiV10SiteInformationBranches
>>>
=
({
signal
})
=>
getApiV10
SiteInformationBranches
({
signal
,
...
requestOptions
});
return
{
queryKey
,
queryFn
,
retry
:
3
,
retryDelay
:
1000
,
...
queryOptions
}
as
UseInfiniteQueryOptions
<
Awaited
<
ReturnType
<
typeof
getSiteInformationBranches
>>
,
TError
,
TData
>
&
{
queryKey
:
DataTag
<
QueryKey
,
TData
,
TError
>
}
return
{
queryKey
,
queryFn
,
retry
:
3
,
retryDelay
:
1000
,
...
queryOptions
}
as
UseInfiniteQueryOptions
<
Awaited
<
ReturnType
<
typeof
get
ApiV10
SiteInformationBranches
>>
,
TError
,
TData
>
&
{
queryKey
:
DataTag
<
QueryKey
,
TData
,
TError
>
}
}
export
type
Get
SiteInformationBranchesInfiniteQueryResult
=
NonNullable
<
Awaited
<
ReturnType
<
typeof
get
SiteInformationBranches
>>>
export
type
GetSiteInformationBranchesInfiniteQueryError
=
ErrorType
<
unknown
>
export
type
Get
ApiV10SiteInformationBranchesInfiniteQueryResult
=
NonNullable
<
Awaited
<
ReturnType
<
typeof
getApiV10
SiteInformationBranches
>>>
export
type
Get
ApiV10
SiteInformationBranchesInfiniteQueryError
=
ErrorType
<
unknown
>
export
function
useGet
SiteInformationBranchesInfinite
<
TData
=
InfiniteData
<
Awaited
<
ReturnType
<
typeof
get
SiteInformationBranches
>>>
,
TError
=
ErrorType
<
unknown
>>
(
options
:
{
query
:
Partial
<
UseInfiniteQueryOptions
<
Awaited
<
ReturnType
<
typeof
getSiteInformationBranches
>>
,
TError
,
TData
>>
&
Pick
<
export
function
useGet
ApiV10SiteInformationBranchesInfinite
<
TData
=
InfiniteData
<
Awaited
<
ReturnType
<
typeof
getApiV10
SiteInformationBranches
>>>
,
TError
=
ErrorType
<
unknown
>>
(
options
:
{
query
:
Partial
<
UseInfiniteQueryOptions
<
Awaited
<
ReturnType
<
typeof
get
ApiV10
SiteInformationBranches
>>
,
TError
,
TData
>>
&
Pick
<
DefinedInitialDataOptions
<
Awaited
<
ReturnType
<
typeof
getSiteInformationBranches
>>
,
Awaited
<
ReturnType
<
typeof
get
ApiV10
SiteInformationBranches
>>
,
TError
,
Awaited
<
ReturnType
<
typeof
getSiteInformationBranches
>>
Awaited
<
ReturnType
<
typeof
get
ApiV10
SiteInformationBranches
>>
>
,
'initialData'
>
,
request
?:
SecondParameter
<
typeof
useCustomClient
>
}
,
queryClient
?:
QueryClient
):
DefinedUseInfiniteQueryResult
<
TData
,
TError
>
&
{
queryKey
:
DataTag
<
QueryKey
,
TData
,
TError
>
}
export
function
useGet
SiteInformationBranchesInfinite
<
TData
=
InfiniteData
<
Awaited
<
ReturnType
<
typeof
get
SiteInformationBranches
>>>
,
TError
=
ErrorType
<
unknown
>>
(
options
?:
{
query
?:
Partial
<
UseInfiniteQueryOptions
<
Awaited
<
ReturnType
<
typeof
getSiteInformationBranches
>>
,
TError
,
TData
>>
&
Pick
<
export
function
useGet
ApiV10SiteInformationBranchesInfinite
<
TData
=
InfiniteData
<
Awaited
<
ReturnType
<
typeof
getApiV10
SiteInformationBranches
>>>
,
TError
=
ErrorType
<
unknown
>>
(
options
?:
{
query
?:
Partial
<
UseInfiniteQueryOptions
<
Awaited
<
ReturnType
<
typeof
get
ApiV10
SiteInformationBranches
>>
,
TError
,
TData
>>
&
Pick
<
UndefinedInitialDataOptions
<
Awaited
<
ReturnType
<
typeof
getSiteInformationBranches
>>
,
Awaited
<
ReturnType
<
typeof
get
ApiV10
SiteInformationBranches
>>
,
TError
,
Awaited
<
ReturnType
<
typeof
getSiteInformationBranches
>>
Awaited
<
ReturnType
<
typeof
get
ApiV10
SiteInformationBranches
>>
>
,
'initialData'
>
,
request
?:
SecondParameter
<
typeof
useCustomClient
>
}
,
queryClient
?:
QueryClient
):
UseInfiniteQueryResult
<
TData
,
TError
>
&
{
queryKey
:
DataTag
<
QueryKey
,
TData
,
TError
>
}
export
function
useGet
SiteInformationBranchesInfinite
<
TData
=
InfiniteData
<
Awaited
<
ReturnType
<
typeof
get
SiteInformationBranches
>>>
,
TError
=
ErrorType
<
unknown
>>
(
options
?:
{
query
?:
Partial
<
UseInfiniteQueryOptions
<
Awaited
<
ReturnType
<
typeof
getSiteInformationBranches
>>
,
TError
,
TData
>>
,
request
?:
SecondParameter
<
typeof
useCustomClient
>
}
export
function
useGet
ApiV10SiteInformationBranchesInfinite
<
TData
=
InfiniteData
<
Awaited
<
ReturnType
<
typeof
getApiV10
SiteInformationBranches
>>>
,
TError
=
ErrorType
<
unknown
>>
(
options
?:
{
query
?:
Partial
<
UseInfiniteQueryOptions
<
Awaited
<
ReturnType
<
typeof
get
ApiV10
SiteInformationBranches
>>
,
TError
,
TData
>>
,
request
?:
SecondParameter
<
typeof
useCustomClient
>
}
,
queryClient
?:
QueryClient
):
UseInfiniteQueryResult
<
TData
,
TError
>
&
{
queryKey
:
DataTag
<
QueryKey
,
TData
,
TError
>
}
/**
* @summary Get site information branches
*/
export
function
useGet
SiteInformationBranchesInfinite
<
TData
=
InfiniteData
<
Awaited
<
ReturnType
<
typeof
get
SiteInformationBranches
>>>
,
TError
=
ErrorType
<
unknown
>>
(
options
?:
{
query
?:
Partial
<
UseInfiniteQueryOptions
<
Awaited
<
ReturnType
<
typeof
getSiteInformationBranches
>>
,
TError
,
TData
>>
,
request
?:
SecondParameter
<
typeof
useCustomClient
>
}
export
function
useGet
ApiV10SiteInformationBranchesInfinite
<
TData
=
InfiniteData
<
Awaited
<
ReturnType
<
typeof
getApiV10
SiteInformationBranches
>>>
,
TError
=
ErrorType
<
unknown
>>
(
options
?:
{
query
?:
Partial
<
UseInfiniteQueryOptions
<
Awaited
<
ReturnType
<
typeof
get
ApiV10
SiteInformationBranches
>>
,
TError
,
TData
>>
,
request
?:
SecondParameter
<
typeof
useCustomClient
>
}
,
queryClient
?:
QueryClient
):
UseInfiniteQueryResult
<
TData
,
TError
>
&
{
queryKey
:
DataTag
<
QueryKey
,
TData
,
TError
>
}
{
const
queryOptions
=
getGetSiteInformationBranchesInfiniteQueryOptions
(
options
)
const
queryOptions
=
getGet
ApiV10
SiteInformationBranchesInfiniteQueryOptions
(
options
)
const
query
=
useInfiniteQuery
(
queryOptions
,
queryClient
)
as
UseInfiniteQueryResult
<
TData
,
TError
>
&
{
queryKey
:
DataTag
<
QueryKey
,
TData
,
TError
>
};
...
...
@@ -945,12 +945,12 @@ export function useGetSiteInformationBranchesInfinite<TData = InfiniteData<Await
/**
* @summary Get site information branches
*/
export
const
prefetchGet
SiteInformationBranchesInfiniteQuery
=
async
<
TData
=
Awaited
<
ReturnType
<
typeof
get
SiteInformationBranches
>>
,
TError
=
ErrorType
<
unknown
>>
(
queryClient
:
QueryClient
,
options
?:
{
query
?:
Partial
<
UseInfiniteQueryOptions
<
Awaited
<
ReturnType
<
typeof
getSiteInformationBranches
>>
,
TError
,
TData
>>
,
request
?:
SecondParameter
<
typeof
useCustomClient
>
}
export
const
prefetchGet
ApiV10SiteInformationBranchesInfiniteQuery
=
async
<
TData
=
Awaited
<
ReturnType
<
typeof
getApiV10
SiteInformationBranches
>>
,
TError
=
ErrorType
<
unknown
>>
(
queryClient
:
QueryClient
,
options
?:
{
query
?:
Partial
<
UseInfiniteQueryOptions
<
Awaited
<
ReturnType
<
typeof
get
ApiV10
SiteInformationBranches
>>
,
TError
,
TData
>>
,
request
?:
SecondParameter
<
typeof
useCustomClient
>
}
):
Promise
<
QueryClient
>
=>
{
const
queryOptions
=
getGetSiteInformationBranchesInfiniteQueryOptions
(
options
)
const
queryOptions
=
getGet
ApiV10
SiteInformationBranchesInfiniteQueryOptions
(
options
)
await
queryClient
.
prefetchInfiniteQuery
(
queryOptions
);
...
...
@@ -959,62 +959,62 @@ export const prefetchGetSiteInformationBranchesInfiniteQuery = async <TData = Aw
export
const
getGet
SiteInformationBranchesQueryOptions
=
<
TData
=
Awaited
<
ReturnType
<
typeof
getSiteInformationBranches
>>
,
TError
=
ErrorType
<
unknown
>>
(
options
?:
{
query
?:
Partial
<
UseQueryOptions
<
Awaited
<
ReturnType
<
typeof
get
SiteInformationBranches
>>
,
TError
,
TData
>>
,
request
?:
SecondParameter
<
typeof
useCustomClient
>
}
export
const
getGet
ApiV10SiteInformationBranchesQueryOptions
=
<
TData
=
Awaited
<
ReturnType
<
typeof
getApiV10SiteInformationBranches
>>
,
TError
=
ErrorType
<
unknown
>>
(
options
?:
{
query
?:
Partial
<
UseQueryOptions
<
Awaited
<
ReturnType
<
typeof
getApiV10
SiteInformationBranches
>>
,
TError
,
TData
>>
,
request
?:
SecondParameter
<
typeof
useCustomClient
>
}
)
=>
{
const
{
query
:
queryOptions
,
request
:
requestOptions
}
=
options
??
{};
const
queryKey
=
queryOptions
?.
queryKey
??
getGetSiteInformationBranchesQueryKey
();
const
queryKey
=
queryOptions
?.
queryKey
??
getGet
ApiV10
SiteInformationBranchesQueryKey
();
const
queryFn
:
QueryFunction
<
Awaited
<
ReturnType
<
typeof
get
SiteInformationBranches
>>>
=
({
signal
})
=>
get
SiteInformationBranches
({
signal
,
...
requestOptions
});
const
queryFn
:
QueryFunction
<
Awaited
<
ReturnType
<
typeof
get
ApiV10SiteInformationBranches
>>>
=
({
signal
})
=>
getApiV10
SiteInformationBranches
({
signal
,
...
requestOptions
});
return
{
queryKey
,
queryFn
,
retry
:
3
,
retryDelay
:
1000
,
...
queryOptions
}
as
UseQueryOptions
<
Awaited
<
ReturnType
<
typeof
getSiteInformationBranches
>>
,
TError
,
TData
>
&
{
queryKey
:
DataTag
<
QueryKey
,
TData
,
TError
>
}
return
{
queryKey
,
queryFn
,
retry
:
3
,
retryDelay
:
1000
,
...
queryOptions
}
as
UseQueryOptions
<
Awaited
<
ReturnType
<
typeof
get
ApiV10
SiteInformationBranches
>>
,
TError
,
TData
>
&
{
queryKey
:
DataTag
<
QueryKey
,
TData
,
TError
>
}
}
export
type
Get
SiteInformationBranchesQueryResult
=
NonNullable
<
Awaited
<
ReturnType
<
typeof
get
SiteInformationBranches
>>>
export
type
GetSiteInformationBranchesQueryError
=
ErrorType
<
unknown
>
export
type
Get
ApiV10SiteInformationBranchesQueryResult
=
NonNullable
<
Awaited
<
ReturnType
<
typeof
getApiV10
SiteInformationBranches
>>>
export
type
Get
ApiV10
SiteInformationBranchesQueryError
=
ErrorType
<
unknown
>
export
function
useGet
SiteInformationBranches
<
TData
=
Awaited
<
ReturnType
<
typeof
get
SiteInformationBranches
>>
,
TError
=
ErrorType
<
unknown
>>
(
options
:
{
query
:
Partial
<
UseQueryOptions
<
Awaited
<
ReturnType
<
typeof
getSiteInformationBranches
>>
,
TError
,
TData
>>
&
Pick
<
export
function
useGet
ApiV10SiteInformationBranches
<
TData
=
Awaited
<
ReturnType
<
typeof
getApiV10
SiteInformationBranches
>>
,
TError
=
ErrorType
<
unknown
>>
(
options
:
{
query
:
Partial
<
UseQueryOptions
<
Awaited
<
ReturnType
<
typeof
get
ApiV10
SiteInformationBranches
>>
,
TError
,
TData
>>
&
Pick
<
DefinedInitialDataOptions
<
Awaited
<
ReturnType
<
typeof
getSiteInformationBranches
>>
,
Awaited
<
ReturnType
<
typeof
get
ApiV10
SiteInformationBranches
>>
,
TError
,
Awaited
<
ReturnType
<
typeof
getSiteInformationBranches
>>
Awaited
<
ReturnType
<
typeof
get
ApiV10
SiteInformationBranches
>>
>
,
'initialData'
>
,
request
?:
SecondParameter
<
typeof
useCustomClient
>
}
,
queryClient
?:
QueryClient
):
DefinedUseQueryResult
<
TData
,
TError
>
&
{
queryKey
:
DataTag
<
QueryKey
,
TData
,
TError
>
}
export
function
useGet
SiteInformationBranches
<
TData
=
Awaited
<
ReturnType
<
typeof
get
SiteInformationBranches
>>
,
TError
=
ErrorType
<
unknown
>>
(
options
?:
{
query
?:
Partial
<
UseQueryOptions
<
Awaited
<
ReturnType
<
typeof
getSiteInformationBranches
>>
,
TError
,
TData
>>
&
Pick
<
export
function
useGet
ApiV10SiteInformationBranches
<
TData
=
Awaited
<
ReturnType
<
typeof
getApiV10
SiteInformationBranches
>>
,
TError
=
ErrorType
<
unknown
>>
(
options
?:
{
query
?:
Partial
<
UseQueryOptions
<
Awaited
<
ReturnType
<
typeof
get
ApiV10
SiteInformationBranches
>>
,
TError
,
TData
>>
&
Pick
<
UndefinedInitialDataOptions
<
Awaited
<
ReturnType
<
typeof
getSiteInformationBranches
>>
,
Awaited
<
ReturnType
<
typeof
get
ApiV10
SiteInformationBranches
>>
,
TError
,
Awaited
<
ReturnType
<
typeof
getSiteInformationBranches
>>
Awaited
<
ReturnType
<
typeof
get
ApiV10
SiteInformationBranches
>>
>
,
'initialData'
>
,
request
?:
SecondParameter
<
typeof
useCustomClient
>
}
,
queryClient
?:
QueryClient
):
UseQueryResult
<
TData
,
TError
>
&
{
queryKey
:
DataTag
<
QueryKey
,
TData
,
TError
>
}
export
function
useGet
SiteInformationBranches
<
TData
=
Awaited
<
ReturnType
<
typeof
get
SiteInformationBranches
>>
,
TError
=
ErrorType
<
unknown
>>
(
options
?:
{
query
?:
Partial
<
UseQueryOptions
<
Awaited
<
ReturnType
<
typeof
getSiteInformationBranches
>>
,
TError
,
TData
>>
,
request
?:
SecondParameter
<
typeof
useCustomClient
>
}
export
function
useGet
ApiV10SiteInformationBranches
<
TData
=
Awaited
<
ReturnType
<
typeof
getApiV10
SiteInformationBranches
>>
,
TError
=
ErrorType
<
unknown
>>
(
options
?:
{
query
?:
Partial
<
UseQueryOptions
<
Awaited
<
ReturnType
<
typeof
get
ApiV10
SiteInformationBranches
>>
,
TError
,
TData
>>
,
request
?:
SecondParameter
<
typeof
useCustomClient
>
}
,
queryClient
?:
QueryClient
):
UseQueryResult
<
TData
,
TError
>
&
{
queryKey
:
DataTag
<
QueryKey
,
TData
,
TError
>
}
/**
* @summary Get site information branches
*/
export
function
useGet
SiteInformationBranches
<
TData
=
Awaited
<
ReturnType
<
typeof
get
SiteInformationBranches
>>
,
TError
=
ErrorType
<
unknown
>>
(
options
?:
{
query
?:
Partial
<
UseQueryOptions
<
Awaited
<
ReturnType
<
typeof
getSiteInformationBranches
>>
,
TError
,
TData
>>
,
request
?:
SecondParameter
<
typeof
useCustomClient
>
}
export
function
useGet
ApiV10SiteInformationBranches
<
TData
=
Awaited
<
ReturnType
<
typeof
getApiV10
SiteInformationBranches
>>
,
TError
=
ErrorType
<
unknown
>>
(
options
?:
{
query
?:
Partial
<
UseQueryOptions
<
Awaited
<
ReturnType
<
typeof
get
ApiV10
SiteInformationBranches
>>
,
TError
,
TData
>>
,
request
?:
SecondParameter
<
typeof
useCustomClient
>
}
,
queryClient
?:
QueryClient
):
UseQueryResult
<
TData
,
TError
>
&
{
queryKey
:
DataTag
<
QueryKey
,
TData
,
TError
>
}
{
const
queryOptions
=
getGetSiteInformationBranchesQueryOptions
(
options
)
const
queryOptions
=
getGet
ApiV10
SiteInformationBranchesQueryOptions
(
options
)
const
query
=
useQuery
(
queryOptions
,
queryClient
)
as
UseQueryResult
<
TData
,
TError
>
&
{
queryKey
:
DataTag
<
QueryKey
,
TData
,
TError
>
};
...
...
@@ -1026,12 +1026,12 @@ export function useGetSiteInformationBranches<TData = Awaited<ReturnType<typeof
/**
* @summary Get site information branches
*/
export
const
prefetchGet
SiteInformationBranchesQuery
=
async
<
TData
=
Awaited
<
ReturnType
<
typeof
get
SiteInformationBranches
>>
,
TError
=
ErrorType
<
unknown
>>
(
queryClient
:
QueryClient
,
options
?:
{
query
?:
Partial
<
UseQueryOptions
<
Awaited
<
ReturnType
<
typeof
getSiteInformationBranches
>>
,
TError
,
TData
>>
,
request
?:
SecondParameter
<
typeof
useCustomClient
>
}
export
const
prefetchGet
ApiV10SiteInformationBranchesQuery
=
async
<
TData
=
Awaited
<
ReturnType
<
typeof
getApiV10
SiteInformationBranches
>>
,
TError
=
ErrorType
<
unknown
>>
(
queryClient
:
QueryClient
,
options
?:
{
query
?:
Partial
<
UseQueryOptions
<
Awaited
<
ReturnType
<
typeof
get
ApiV10
SiteInformationBranches
>>
,
TError
,
TData
>>
,
request
?:
SecondParameter
<
typeof
useCustomClient
>
}
):
Promise
<
QueryClient
>
=>
{
const
queryOptions
=
getGetSiteInformationBranchesQueryOptions
(
options
)
const
queryOptions
=
getGet
ApiV10
SiteInformationBranchesQueryOptions
(
options
)
await
queryClient
.
prefetchQuery
(
queryOptions
);
...
...
@@ -1043,29 +1043,29 @@ export const prefetchGetSiteInformationBranchesQuery = async <TData = Awaited<Re
/**
* @summary Create site information branch
*/
export
type
postSiteInformationBranchesResponse200
=
{
export
type
post
ApiV10
SiteInformationBranchesResponse200
=
{
data
:
void
status
:
200
}
export
type
post
SiteInformationBranchesResponseSuccess
=
(
post
SiteInformationBranchesResponse200
)
&
{
export
type
post
ApiV10SiteInformationBranchesResponseSuccess
=
(
postApiV10
SiteInformationBranchesResponse200
)
&
{
headers
:
Headers
;
};
;
export
type
post
SiteInformationBranchesResponse
=
(
post
SiteInformationBranchesResponseSuccess
)
export
type
post
ApiV10SiteInformationBranchesResponse
=
(
postApiV10
SiteInformationBranchesResponseSuccess
)
export
const
getPostSiteInformationBranchesUrl
=
()
=>
{
export
const
getPost
ApiV10
SiteInformationBranchesUrl
=
()
=>
{
return
`/siteInformation/branches`
return
`/
api/v1.0/
siteInformation/branches`
}
export
const
post
SiteInformationBranches
=
async
(
siteInformationBranchMutate
:
SiteInformationBranchMutate
,
options
?:
RequestInit
):
Promise
<
post
SiteInformationBranchesResponse
>
=>
{
export
const
post
ApiV10SiteInformationBranches
=
async
(
siteInformationBranchMutate
:
SiteInformationBranchMutate
,
options
?:
RequestInit
):
Promise
<
postApiV10
SiteInformationBranchesResponse
>
=>
{
return
useCustomClient
<
post
SiteInformationBranchesResponse
>
(
getPost
SiteInformationBranchesUrl
(),
return
useCustomClient
<
post
ApiV10SiteInformationBranchesResponse
>
(
getPostApiV10
SiteInformationBranchesUrl
(),
{
...
options
,
method
:
'POST'
,
...
...
@@ -1078,11 +1078,11 @@ export const postSiteInformationBranches = async (siteInformationBranchMutate: S
export
const
getPostSiteInformationBranchesMutationOptions
=
<
TError
=
ErrorType
<
unknown
>
,
TContext
=
unknown
>
(
options
?:
{
mutation
?:
UseMutationOptions
<
Awaited
<
ReturnType
<
typeof
postSiteInformationBranches
>>
,
TError
,{
data
:
BodyType
<
SiteInformationBranchMutate
>
},
TContext
>
,
request
?:
SecondParameter
<
typeof
useCustomClient
>
}
):
UseMutationOptions
<
Awaited
<
ReturnType
<
typeof
postSiteInformationBranches
>>
,
TError
,{
data
:
BodyType
<
SiteInformationBranchMutate
>
},
TContext
>
=>
{
export
const
getPost
ApiV10
SiteInformationBranchesMutationOptions
=
<
TError
=
ErrorType
<
unknown
>
,
TContext
=
unknown
>
(
options
?:
{
mutation
?:
UseMutationOptions
<
Awaited
<
ReturnType
<
typeof
post
ApiV10
SiteInformationBranches
>>
,
TError
,{
data
:
BodyType
<
SiteInformationBranchMutate
>
},
TContext
>
,
request
?:
SecondParameter
<
typeof
useCustomClient
>
}
):
UseMutationOptions
<
Awaited
<
ReturnType
<
typeof
post
ApiV10
SiteInformationBranches
>>
,
TError
,{
data
:
BodyType
<
SiteInformationBranchMutate
>
},
TContext
>
=>
{
const
mutationKey
=
[
'postSiteInformationBranches'
];
const
mutationKey
=
[
'post
ApiV10
SiteInformationBranches'
];
const
{
mutation
:
mutationOptions
,
request
:
requestOptions
}
=
options
?
options
.
mutation
&&
'mutationKey'
in
options
.
mutation
&&
options
.
mutation
.
mutationKey
?
options
...
...
@@ -1092,10 +1092,10 @@ const {mutation: mutationOptions, request: requestOptions} = options ?
const
mutationFn
:
MutationFunction
<
Awaited
<
ReturnType
<
typeof
postSiteInformationBranches
>>
,
{
data
:
BodyType
<
SiteInformationBranchMutate
>
}
>
=
(
props
)
=>
{
const
mutationFn
:
MutationFunction
<
Awaited
<
ReturnType
<
typeof
post
ApiV10
SiteInformationBranches
>>
,
{
data
:
BodyType
<
SiteInformationBranchMutate
>
}
>
=
(
props
)
=>
{
const
{
data
}
=
props
??
{};
return
postSiteInformationBranches
(
data
,
requestOptions
)
return
post
ApiV10
SiteInformationBranches
(
data
,
requestOptions
)
}
...
...
@@ -1103,23 +1103,23 @@ const {mutation: mutationOptions, request: requestOptions} = options ?
return
{
mutationFn
,
...
mutationOptions
}}
export
type
Post
SiteInformationBranchesMutationResult
=
NonNullable
<
Awaited
<
ReturnType
<
typeof
post
SiteInformationBranches
>>>
export
type
PostSiteInformationBranchesMutationBody
=
BodyType
<
SiteInformationBranchMutate
>
export
type
PostSiteInformationBranchesMutationError
=
ErrorType
<
unknown
>
export
type
Post
ApiV10SiteInformationBranchesMutationResult
=
NonNullable
<
Awaited
<
ReturnType
<
typeof
postApiV10
SiteInformationBranches
>>>
export
type
Post
ApiV10
SiteInformationBranchesMutationBody
=
BodyType
<
SiteInformationBranchMutate
>
export
type
Post
ApiV10
SiteInformationBranchesMutationError
=
ErrorType
<
unknown
>
/**
* @summary Create site information branch
*/
export
const
usePostSiteInformationBranches
=
<
TError
=
ErrorType
<
unknown
>
,
TContext
=
unknown
>
(
options
?:
{
mutation
?:
UseMutationOptions
<
Awaited
<
ReturnType
<
typeof
postSiteInformationBranches
>>
,
TError
,{
data
:
BodyType
<
SiteInformationBranchMutate
>
},
TContext
>
,
request
?:
SecondParameter
<
typeof
useCustomClient
>
}
export
const
usePost
ApiV10
SiteInformationBranches
=
<
TError
=
ErrorType
<
unknown
>
,
TContext
=
unknown
>
(
options
?:
{
mutation
?:
UseMutationOptions
<
Awaited
<
ReturnType
<
typeof
post
ApiV10
SiteInformationBranches
>>
,
TError
,{
data
:
BodyType
<
SiteInformationBranchMutate
>
},
TContext
>
,
request
?:
SecondParameter
<
typeof
useCustomClient
>
}
,
queryClient
?:
QueryClient
):
UseMutationResult
<
Awaited
<
ReturnType
<
typeof
postSiteInformationBranches
>>
,
Awaited
<
ReturnType
<
typeof
post
ApiV10
SiteInformationBranches
>>
,
TError
,
{
data
:
BodyType
<
SiteInformationBranchMutate
>
},
TContext
>
=>
{
const
mutationOptions
=
getPostSiteInformationBranchesMutationOptions
(
options
);
const
mutationOptions
=
getPost
ApiV10
SiteInformationBranchesMutationOptions
(
options
);
return
useMutation
(
mutationOptions
,
queryClient
);
}
src/api/endpoints/video.ts
View file @
b3589a95
/**
* Generated by orval v8.0.0-rc.0 🍺
* Do not edit manually.
*
Backend Template
*
Coded by Meu TEAM
*
VietProDev CMS Backend API
*
Generated API documentation
* OpenAPI spec version: 1.0.0
*/
import
{
...
...
@@ -30,10 +30,10 @@ import type {
}
from
'@tanstack/react-query'
;
import
type
{
GetVideoId200
,
GetVideoParams
,
PatchVideoId200
,
PostVideo200
,
Get
ApiV10
VideoId200
,
Get
ApiV10
VideoParams
,
Patch
ApiV10
VideoId200
,
Post
ApiV10
Video200
,
ResponseGetAllData
,
VideoMutate
}
from
'../models'
;
...
...
@@ -51,29 +51,29 @@ type SecondParameter<T extends (...args: never) => unknown> = Parameters<T>[1];
* Retrieve a specific video by its ID
* @summary Get a video by ID
*/
export
type
getVideoIdResponse200
=
{
data
:
GetVideoId200
export
type
get
ApiV10
VideoIdResponse200
=
{
data
:
Get
ApiV10
VideoId200
status
:
200
}
export
type
get
VideoIdResponseSuccess
=
(
get
VideoIdResponse200
)
&
{
export
type
get
ApiV10VideoIdResponseSuccess
=
(
getApiV10
VideoIdResponse200
)
&
{
headers
:
Headers
;
};
;
export
type
get
VideoIdResponse
=
(
get
VideoIdResponseSuccess
)
export
type
get
ApiV10VideoIdResponse
=
(
getApiV10
VideoIdResponseSuccess
)
export
const
getGetVideoIdUrl
=
(
id
:
string
,)
=>
{
export
const
getGet
ApiV10
VideoIdUrl
=
(
id
:
string
,)
=>
{
return
`/video/
${
id
}
`
return
`/
api/v1.0/
video/
${
id
}
`
}
export
const
get
VideoId
=
async
(
id
:
string
,
options
?:
RequestInit
):
Promise
<
get
VideoIdResponse
>
=>
{
export
const
get
ApiV10VideoId
=
async
(
id
:
string
,
options
?:
RequestInit
):
Promise
<
getApiV10
VideoIdResponse
>
=>
{
return
useCustomClient
<
get
VideoIdResponse
>
(
getGet
VideoIdUrl
(
id
),
return
useCustomClient
<
get
ApiV10VideoIdResponse
>
(
getGetApiV10
VideoIdUrl
(
id
),
{
...
options
,
method
:
'GET'
...
...
@@ -86,75 +86,75 @@ export const getVideoId = async (id: string, options?: RequestInit): Promise<get
export
const
getGetVideoIdInfiniteQueryKey
=
(
id
?:
string
,)
=>
{
export
const
getGet
ApiV10
VideoIdInfiniteQueryKey
=
(
id
?:
string
,)
=>
{
return
[
'infinite'
,
`/video/
${
id
}
`
'infinite'
,
`/
api/v1.0/
video/
${
id
}
`
]
as
const
;
}
export
const
getGetVideoIdQueryKey
=
(
id
?:
string
,)
=>
{
export
const
getGet
ApiV10
VideoIdQueryKey
=
(
id
?:
string
,)
=>
{
return
[
`/video/
${
id
}
`
`/
api/v1.0/
video/
${
id
}
`
]
as
const
;
}
export
const
getGet
VideoIdInfiniteQueryOptions
=
<
TData
=
InfiniteData
<
Awaited
<
ReturnType
<
typeof
getVideoId
>>>
,
TError
=
ErrorType
<
unknown
>>
(
id
:
string
,
options
?:
{
query
?:
Partial
<
UseInfiniteQueryOptions
<
Awaited
<
ReturnType
<
typeof
get
VideoId
>>
,
TError
,
TData
>>
,
request
?:
SecondParameter
<
typeof
useCustomClient
>
}
export
const
getGet
ApiV10VideoIdInfiniteQueryOptions
=
<
TData
=
InfiniteData
<
Awaited
<
ReturnType
<
typeof
getApiV10VideoId
>>>
,
TError
=
ErrorType
<
unknown
>>
(
id
:
string
,
options
?:
{
query
?:
Partial
<
UseInfiniteQueryOptions
<
Awaited
<
ReturnType
<
typeof
getApiV10
VideoId
>>
,
TError
,
TData
>>
,
request
?:
SecondParameter
<
typeof
useCustomClient
>
}
)
=>
{
const
{
query
:
queryOptions
,
request
:
requestOptions
}
=
options
??
{};
const
queryKey
=
queryOptions
?.
queryKey
??
getGetVideoIdInfiniteQueryKey
(
id
);
const
queryKey
=
queryOptions
?.
queryKey
??
getGet
ApiV10
VideoIdInfiniteQueryKey
(
id
);
const
queryFn
:
QueryFunction
<
Awaited
<
ReturnType
<
typeof
get
VideoId
>>>
=
({
signal
})
=>
get
VideoId
(
id
,
{
signal
,
...
requestOptions
});
const
queryFn
:
QueryFunction
<
Awaited
<
ReturnType
<
typeof
get
ApiV10VideoId
>>>
=
({
signal
})
=>
getApiV10
VideoId
(
id
,
{
signal
,
...
requestOptions
});
return
{
queryKey
,
queryFn
,
enabled
:
!!
(
id
),
retry
:
3
,
retryDelay
:
1000
,
...
queryOptions
}
as
UseInfiniteQueryOptions
<
Awaited
<
ReturnType
<
typeof
getVideoId
>>
,
TError
,
TData
>
&
{
queryKey
:
DataTag
<
QueryKey
,
TData
,
TError
>
}
return
{
queryKey
,
queryFn
,
enabled
:
!!
(
id
),
retry
:
3
,
retryDelay
:
1000
,
...
queryOptions
}
as
UseInfiniteQueryOptions
<
Awaited
<
ReturnType
<
typeof
get
ApiV10
VideoId
>>
,
TError
,
TData
>
&
{
queryKey
:
DataTag
<
QueryKey
,
TData
,
TError
>
}
}
export
type
Get
VideoIdInfiniteQueryResult
=
NonNullable
<
Awaited
<
ReturnType
<
typeof
get
VideoId
>>>
export
type
GetVideoIdInfiniteQueryError
=
ErrorType
<
unknown
>
export
type
Get
ApiV10VideoIdInfiniteQueryResult
=
NonNullable
<
Awaited
<
ReturnType
<
typeof
getApiV10
VideoId
>>>
export
type
Get
ApiV10
VideoIdInfiniteQueryError
=
ErrorType
<
unknown
>
export
function
useGet
VideoIdInfinite
<
TData
=
InfiniteData
<
Awaited
<
ReturnType
<
typeof
get
VideoId
>>>
,
TError
=
ErrorType
<
unknown
>>
(
id
:
string
,
options
:
{
query
:
Partial
<
UseInfiniteQueryOptions
<
Awaited
<
ReturnType
<
typeof
getVideoId
>>
,
TError
,
TData
>>
&
Pick
<
export
function
useGet
ApiV10VideoIdInfinite
<
TData
=
InfiniteData
<
Awaited
<
ReturnType
<
typeof
getApiV10
VideoId
>>>
,
TError
=
ErrorType
<
unknown
>>
(
id
:
string
,
options
:
{
query
:
Partial
<
UseInfiniteQueryOptions
<
Awaited
<
ReturnType
<
typeof
get
ApiV10
VideoId
>>
,
TError
,
TData
>>
&
Pick
<
DefinedInitialDataOptions
<
Awaited
<
ReturnType
<
typeof
getVideoId
>>
,
Awaited
<
ReturnType
<
typeof
get
ApiV10
VideoId
>>
,
TError
,
Awaited
<
ReturnType
<
typeof
getVideoId
>>
Awaited
<
ReturnType
<
typeof
get
ApiV10
VideoId
>>
>
,
'initialData'
>
,
request
?:
SecondParameter
<
typeof
useCustomClient
>
}
,
queryClient
?:
QueryClient
):
DefinedUseInfiniteQueryResult
<
TData
,
TError
>
&
{
queryKey
:
DataTag
<
QueryKey
,
TData
,
TError
>
}
export
function
useGet
VideoIdInfinite
<
TData
=
InfiniteData
<
Awaited
<
ReturnType
<
typeof
get
VideoId
>>>
,
TError
=
ErrorType
<
unknown
>>
(
id
:
string
,
options
?:
{
query
?:
Partial
<
UseInfiniteQueryOptions
<
Awaited
<
ReturnType
<
typeof
getVideoId
>>
,
TError
,
TData
>>
&
Pick
<
export
function
useGet
ApiV10VideoIdInfinite
<
TData
=
InfiniteData
<
Awaited
<
ReturnType
<
typeof
getApiV10
VideoId
>>>
,
TError
=
ErrorType
<
unknown
>>
(
id
:
string
,
options
?:
{
query
?:
Partial
<
UseInfiniteQueryOptions
<
Awaited
<
ReturnType
<
typeof
get
ApiV10
VideoId
>>
,
TError
,
TData
>>
&
Pick
<
UndefinedInitialDataOptions
<
Awaited
<
ReturnType
<
typeof
getVideoId
>>
,
Awaited
<
ReturnType
<
typeof
get
ApiV10
VideoId
>>
,
TError
,
Awaited
<
ReturnType
<
typeof
getVideoId
>>
Awaited
<
ReturnType
<
typeof
get
ApiV10
VideoId
>>
>
,
'initialData'
>
,
request
?:
SecondParameter
<
typeof
useCustomClient
>
}
,
queryClient
?:
QueryClient
):
UseInfiniteQueryResult
<
TData
,
TError
>
&
{
queryKey
:
DataTag
<
QueryKey
,
TData
,
TError
>
}
export
function
useGet
VideoIdInfinite
<
TData
=
InfiniteData
<
Awaited
<
ReturnType
<
typeof
get
VideoId
>>>
,
TError
=
ErrorType
<
unknown
>>
(
id
:
string
,
options
?:
{
query
?:
Partial
<
UseInfiniteQueryOptions
<
Awaited
<
ReturnType
<
typeof
getVideoId
>>
,
TError
,
TData
>>
,
request
?:
SecondParameter
<
typeof
useCustomClient
>
}
export
function
useGet
ApiV10VideoIdInfinite
<
TData
=
InfiniteData
<
Awaited
<
ReturnType
<
typeof
getApiV10
VideoId
>>>
,
TError
=
ErrorType
<
unknown
>>
(
id
:
string
,
options
?:
{
query
?:
Partial
<
UseInfiniteQueryOptions
<
Awaited
<
ReturnType
<
typeof
get
ApiV10
VideoId
>>
,
TError
,
TData
>>
,
request
?:
SecondParameter
<
typeof
useCustomClient
>
}
,
queryClient
?:
QueryClient
):
UseInfiniteQueryResult
<
TData
,
TError
>
&
{
queryKey
:
DataTag
<
QueryKey
,
TData
,
TError
>
}
/**
* @summary Get a video by ID
*/
export
function
useGet
VideoIdInfinite
<
TData
=
InfiniteData
<
Awaited
<
ReturnType
<
typeof
get
VideoId
>>>
,
TError
=
ErrorType
<
unknown
>>
(
id
:
string
,
options
?:
{
query
?:
Partial
<
UseInfiniteQueryOptions
<
Awaited
<
ReturnType
<
typeof
getVideoId
>>
,
TError
,
TData
>>
,
request
?:
SecondParameter
<
typeof
useCustomClient
>
}
export
function
useGet
ApiV10VideoIdInfinite
<
TData
=
InfiniteData
<
Awaited
<
ReturnType
<
typeof
getApiV10
VideoId
>>>
,
TError
=
ErrorType
<
unknown
>>
(
id
:
string
,
options
?:
{
query
?:
Partial
<
UseInfiniteQueryOptions
<
Awaited
<
ReturnType
<
typeof
get
ApiV10
VideoId
>>
,
TError
,
TData
>>
,
request
?:
SecondParameter
<
typeof
useCustomClient
>
}
,
queryClient
?:
QueryClient
):
UseInfiniteQueryResult
<
TData
,
TError
>
&
{
queryKey
:
DataTag
<
QueryKey
,
TData
,
TError
>
}
{
const
queryOptions
=
getGetVideoIdInfiniteQueryOptions
(
id
,
options
)
const
queryOptions
=
getGet
ApiV10
VideoIdInfiniteQueryOptions
(
id
,
options
)
const
query
=
useInfiniteQuery
(
queryOptions
,
queryClient
)
as
UseInfiniteQueryResult
<
TData
,
TError
>
&
{
queryKey
:
DataTag
<
QueryKey
,
TData
,
TError
>
};
...
...
@@ -166,12 +166,12 @@ export function useGetVideoIdInfinite<TData = InfiniteData<Awaited<ReturnType<ty
/**
* @summary Get a video by ID
*/
export
const
prefetchGet
VideoIdInfiniteQuery
=
async
<
TData
=
Awaited
<
ReturnType
<
typeof
get
VideoId
>>
,
TError
=
ErrorType
<
unknown
>>
(
queryClient
:
QueryClient
,
id
:
string
,
options
?:
{
query
?:
Partial
<
UseInfiniteQueryOptions
<
Awaited
<
ReturnType
<
typeof
getVideoId
>>
,
TError
,
TData
>>
,
request
?:
SecondParameter
<
typeof
useCustomClient
>
}
export
const
prefetchGet
ApiV10VideoIdInfiniteQuery
=
async
<
TData
=
Awaited
<
ReturnType
<
typeof
getApiV10
VideoId
>>
,
TError
=
ErrorType
<
unknown
>>
(
queryClient
:
QueryClient
,
id
:
string
,
options
?:
{
query
?:
Partial
<
UseInfiniteQueryOptions
<
Awaited
<
ReturnType
<
typeof
get
ApiV10
VideoId
>>
,
TError
,
TData
>>
,
request
?:
SecondParameter
<
typeof
useCustomClient
>
}
):
Promise
<
QueryClient
>
=>
{
const
queryOptions
=
getGetVideoIdInfiniteQueryOptions
(
id
,
options
)
const
queryOptions
=
getGet
ApiV10
VideoIdInfiniteQueryOptions
(
id
,
options
)
await
queryClient
.
prefetchInfiniteQuery
(
queryOptions
);
...
...
@@ -180,62 +180,62 @@ export const prefetchGetVideoIdInfiniteQuery = async <TData = Awaited<ReturnType
export
const
getGet
VideoIdQueryOptions
=
<
TData
=
Awaited
<
ReturnType
<
typeof
getVideoId
>>
,
TError
=
ErrorType
<
unknown
>>
(
id
:
string
,
options
?:
{
query
?:
Partial
<
UseQueryOptions
<
Awaited
<
ReturnType
<
typeof
get
VideoId
>>
,
TError
,
TData
>>
,
request
?:
SecondParameter
<
typeof
useCustomClient
>
}
export
const
getGet
ApiV10VideoIdQueryOptions
=
<
TData
=
Awaited
<
ReturnType
<
typeof
getApiV10VideoId
>>
,
TError
=
ErrorType
<
unknown
>>
(
id
:
string
,
options
?:
{
query
?:
Partial
<
UseQueryOptions
<
Awaited
<
ReturnType
<
typeof
getApiV10
VideoId
>>
,
TError
,
TData
>>
,
request
?:
SecondParameter
<
typeof
useCustomClient
>
}
)
=>
{
const
{
query
:
queryOptions
,
request
:
requestOptions
}
=
options
??
{};
const
queryKey
=
queryOptions
?.
queryKey
??
getGetVideoIdQueryKey
(
id
);
const
queryKey
=
queryOptions
?.
queryKey
??
getGet
ApiV10
VideoIdQueryKey
(
id
);
const
queryFn
:
QueryFunction
<
Awaited
<
ReturnType
<
typeof
get
VideoId
>>>
=
({
signal
})
=>
get
VideoId
(
id
,
{
signal
,
...
requestOptions
});
const
queryFn
:
QueryFunction
<
Awaited
<
ReturnType
<
typeof
get
ApiV10VideoId
>>>
=
({
signal
})
=>
getApiV10
VideoId
(
id
,
{
signal
,
...
requestOptions
});
return
{
queryKey
,
queryFn
,
enabled
:
!!
(
id
),
retry
:
3
,
retryDelay
:
1000
,
...
queryOptions
}
as
UseQueryOptions
<
Awaited
<
ReturnType
<
typeof
getVideoId
>>
,
TError
,
TData
>
&
{
queryKey
:
DataTag
<
QueryKey
,
TData
,
TError
>
}
return
{
queryKey
,
queryFn
,
enabled
:
!!
(
id
),
retry
:
3
,
retryDelay
:
1000
,
...
queryOptions
}
as
UseQueryOptions
<
Awaited
<
ReturnType
<
typeof
get
ApiV10
VideoId
>>
,
TError
,
TData
>
&
{
queryKey
:
DataTag
<
QueryKey
,
TData
,
TError
>
}
}
export
type
Get
VideoIdQueryResult
=
NonNullable
<
Awaited
<
ReturnType
<
typeof
get
VideoId
>>>
export
type
GetVideoIdQueryError
=
ErrorType
<
unknown
>
export
type
Get
ApiV10VideoIdQueryResult
=
NonNullable
<
Awaited
<
ReturnType
<
typeof
getApiV10
VideoId
>>>
export
type
Get
ApiV10
VideoIdQueryError
=
ErrorType
<
unknown
>
export
function
useGet
VideoId
<
TData
=
Awaited
<
ReturnType
<
typeof
get
VideoId
>>
,
TError
=
ErrorType
<
unknown
>>
(
id
:
string
,
options
:
{
query
:
Partial
<
UseQueryOptions
<
Awaited
<
ReturnType
<
typeof
getVideoId
>>
,
TError
,
TData
>>
&
Pick
<
export
function
useGet
ApiV10VideoId
<
TData
=
Awaited
<
ReturnType
<
typeof
getApiV10
VideoId
>>
,
TError
=
ErrorType
<
unknown
>>
(
id
:
string
,
options
:
{
query
:
Partial
<
UseQueryOptions
<
Awaited
<
ReturnType
<
typeof
get
ApiV10
VideoId
>>
,
TError
,
TData
>>
&
Pick
<
DefinedInitialDataOptions
<
Awaited
<
ReturnType
<
typeof
getVideoId
>>
,
Awaited
<
ReturnType
<
typeof
get
ApiV10
VideoId
>>
,
TError
,
Awaited
<
ReturnType
<
typeof
getVideoId
>>
Awaited
<
ReturnType
<
typeof
get
ApiV10
VideoId
>>
>
,
'initialData'
>
,
request
?:
SecondParameter
<
typeof
useCustomClient
>
}
,
queryClient
?:
QueryClient
):
DefinedUseQueryResult
<
TData
,
TError
>
&
{
queryKey
:
DataTag
<
QueryKey
,
TData
,
TError
>
}
export
function
useGet
VideoId
<
TData
=
Awaited
<
ReturnType
<
typeof
get
VideoId
>>
,
TError
=
ErrorType
<
unknown
>>
(
id
:
string
,
options
?:
{
query
?:
Partial
<
UseQueryOptions
<
Awaited
<
ReturnType
<
typeof
getVideoId
>>
,
TError
,
TData
>>
&
Pick
<
export
function
useGet
ApiV10VideoId
<
TData
=
Awaited
<
ReturnType
<
typeof
getApiV10
VideoId
>>
,
TError
=
ErrorType
<
unknown
>>
(
id
:
string
,
options
?:
{
query
?:
Partial
<
UseQueryOptions
<
Awaited
<
ReturnType
<
typeof
get
ApiV10
VideoId
>>
,
TError
,
TData
>>
&
Pick
<
UndefinedInitialDataOptions
<
Awaited
<
ReturnType
<
typeof
getVideoId
>>
,
Awaited
<
ReturnType
<
typeof
get
ApiV10
VideoId
>>
,
TError
,
Awaited
<
ReturnType
<
typeof
getVideoId
>>
Awaited
<
ReturnType
<
typeof
get
ApiV10
VideoId
>>
>
,
'initialData'
>
,
request
?:
SecondParameter
<
typeof
useCustomClient
>
}
,
queryClient
?:
QueryClient
):
UseQueryResult
<
TData
,
TError
>
&
{
queryKey
:
DataTag
<
QueryKey
,
TData
,
TError
>
}
export
function
useGet
VideoId
<
TData
=
Awaited
<
ReturnType
<
typeof
get
VideoId
>>
,
TError
=
ErrorType
<
unknown
>>
(
id
:
string
,
options
?:
{
query
?:
Partial
<
UseQueryOptions
<
Awaited
<
ReturnType
<
typeof
getVideoId
>>
,
TError
,
TData
>>
,
request
?:
SecondParameter
<
typeof
useCustomClient
>
}
export
function
useGet
ApiV10VideoId
<
TData
=
Awaited
<
ReturnType
<
typeof
getApiV10
VideoId
>>
,
TError
=
ErrorType
<
unknown
>>
(
id
:
string
,
options
?:
{
query
?:
Partial
<
UseQueryOptions
<
Awaited
<
ReturnType
<
typeof
get
ApiV10
VideoId
>>
,
TError
,
TData
>>
,
request
?:
SecondParameter
<
typeof
useCustomClient
>
}
,
queryClient
?:
QueryClient
):
UseQueryResult
<
TData
,
TError
>
&
{
queryKey
:
DataTag
<
QueryKey
,
TData
,
TError
>
}
/**
* @summary Get a video by ID
*/
export
function
useGet
VideoId
<
TData
=
Awaited
<
ReturnType
<
typeof
get
VideoId
>>
,
TError
=
ErrorType
<
unknown
>>
(
id
:
string
,
options
?:
{
query
?:
Partial
<
UseQueryOptions
<
Awaited
<
ReturnType
<
typeof
getVideoId
>>
,
TError
,
TData
>>
,
request
?:
SecondParameter
<
typeof
useCustomClient
>
}
export
function
useGet
ApiV10VideoId
<
TData
=
Awaited
<
ReturnType
<
typeof
getApiV10
VideoId
>>
,
TError
=
ErrorType
<
unknown
>>
(
id
:
string
,
options
?:
{
query
?:
Partial
<
UseQueryOptions
<
Awaited
<
ReturnType
<
typeof
get
ApiV10
VideoId
>>
,
TError
,
TData
>>
,
request
?:
SecondParameter
<
typeof
useCustomClient
>
}
,
queryClient
?:
QueryClient
):
UseQueryResult
<
TData
,
TError
>
&
{
queryKey
:
DataTag
<
QueryKey
,
TData
,
TError
>
}
{
const
queryOptions
=
getGetVideoIdQueryOptions
(
id
,
options
)
const
queryOptions
=
getGet
ApiV10
VideoIdQueryOptions
(
id
,
options
)
const
query
=
useQuery
(
queryOptions
,
queryClient
)
as
UseQueryResult
<
TData
,
TError
>
&
{
queryKey
:
DataTag
<
QueryKey
,
TData
,
TError
>
};
...
...
@@ -247,12 +247,12 @@ export function useGetVideoId<TData = Awaited<ReturnType<typeof getVideoId>>, TE
/**
* @summary Get a video by ID
*/
export
const
prefetchGet
VideoIdQuery
=
async
<
TData
=
Awaited
<
ReturnType
<
typeof
get
VideoId
>>
,
TError
=
ErrorType
<
unknown
>>
(
queryClient
:
QueryClient
,
id
:
string
,
options
?:
{
query
?:
Partial
<
UseQueryOptions
<
Awaited
<
ReturnType
<
typeof
getVideoId
>>
,
TError
,
TData
>>
,
request
?:
SecondParameter
<
typeof
useCustomClient
>
}
export
const
prefetchGet
ApiV10VideoIdQuery
=
async
<
TData
=
Awaited
<
ReturnType
<
typeof
getApiV10
VideoId
>>
,
TError
=
ErrorType
<
unknown
>>
(
queryClient
:
QueryClient
,
id
:
string
,
options
?:
{
query
?:
Partial
<
UseQueryOptions
<
Awaited
<
ReturnType
<
typeof
get
ApiV10
VideoId
>>
,
TError
,
TData
>>
,
request
?:
SecondParameter
<
typeof
useCustomClient
>
}
):
Promise
<
QueryClient
>
=>
{
const
queryOptions
=
getGetVideoIdQueryOptions
(
id
,
options
)
const
queryOptions
=
getGet
ApiV10
VideoIdQueryOptions
(
id
,
options
)
await
queryClient
.
prefetchQuery
(
queryOptions
);
...
...
@@ -265,30 +265,30 @@ export const prefetchGetVideoIdQuery = async <TData = Awaited<ReturnType<typeof
* Update an existing video record
* @summary Update a video
*/
export
type
patchVideoIdResponse200
=
{
data
:
PatchVideoId200
export
type
patch
ApiV10
VideoIdResponse200
=
{
data
:
Patch
ApiV10
VideoId200
status
:
200
}
export
type
patch
VideoIdResponseSuccess
=
(
patch
VideoIdResponse200
)
&
{
export
type
patch
ApiV10VideoIdResponseSuccess
=
(
patchApiV10
VideoIdResponse200
)
&
{
headers
:
Headers
;
};
;
export
type
patch
VideoIdResponse
=
(
patch
VideoIdResponseSuccess
)
export
type
patch
ApiV10VideoIdResponse
=
(
patchApiV10
VideoIdResponseSuccess
)
export
const
getPatchVideoIdUrl
=
(
id
:
string
,)
=>
{
export
const
getPatch
ApiV10
VideoIdUrl
=
(
id
:
string
,)
=>
{
return
`/video/
${
id
}
`
return
`/
api/v1.0/
video/
${
id
}
`
}
export
const
patchVideoId
=
async
(
id
:
string
,
videoMutate
:
VideoMutate
,
options
?:
RequestInit
):
Promise
<
patchVideoIdResponse
>
=>
{
export
const
patch
ApiV10
VideoId
=
async
(
id
:
string
,
videoMutate
:
VideoMutate
,
options
?:
RequestInit
):
Promise
<
patch
ApiV10
VideoIdResponse
>
=>
{
return
useCustomClient
<
patch
VideoIdResponse
>
(
getPatch
VideoIdUrl
(
id
),
return
useCustomClient
<
patch
ApiV10VideoIdResponse
>
(
getPatchApiV10
VideoIdUrl
(
id
),
{
...
options
,
method
:
'PATCH'
,
...
...
@@ -301,11 +301,11 @@ export const patchVideoId = async (id: string,
export
const
getPatchVideoIdMutationOptions
=
<
TError
=
ErrorType
<
unknown
>
,
TContext
=
unknown
>
(
options
?:
{
mutation
?:
UseMutationOptions
<
Awaited
<
ReturnType
<
typeof
patchVideoId
>>
,
TError
,{
id
:
string
;
data
:
BodyType
<
VideoMutate
>
},
TContext
>
,
request
?:
SecondParameter
<
typeof
useCustomClient
>
}
):
UseMutationOptions
<
Awaited
<
ReturnType
<
typeof
patchVideoId
>>
,
TError
,{
id
:
string
;
data
:
BodyType
<
VideoMutate
>
},
TContext
>
=>
{
export
const
getPatch
ApiV10
VideoIdMutationOptions
=
<
TError
=
ErrorType
<
unknown
>
,
TContext
=
unknown
>
(
options
?:
{
mutation
?:
UseMutationOptions
<
Awaited
<
ReturnType
<
typeof
patch
ApiV10
VideoId
>>
,
TError
,{
id
:
string
;
data
:
BodyType
<
VideoMutate
>
},
TContext
>
,
request
?:
SecondParameter
<
typeof
useCustomClient
>
}
):
UseMutationOptions
<
Awaited
<
ReturnType
<
typeof
patch
ApiV10
VideoId
>>
,
TError
,{
id
:
string
;
data
:
BodyType
<
VideoMutate
>
},
TContext
>
=>
{
const
mutationKey
=
[
'patchVideoId'
];
const
mutationKey
=
[
'patch
ApiV10
VideoId'
];
const
{
mutation
:
mutationOptions
,
request
:
requestOptions
}
=
options
?
options
.
mutation
&&
'mutationKey'
in
options
.
mutation
&&
options
.
mutation
.
mutationKey
?
options
...
...
@@ -315,10 +315,10 @@ const {mutation: mutationOptions, request: requestOptions} = options ?
const
mutationFn
:
MutationFunction
<
Awaited
<
ReturnType
<
typeof
patchVideoId
>>
,
{
id
:
string
;
data
:
BodyType
<
VideoMutate
>
}
>
=
(
props
)
=>
{
const
mutationFn
:
MutationFunction
<
Awaited
<
ReturnType
<
typeof
patch
ApiV10
VideoId
>>
,
{
id
:
string
;
data
:
BodyType
<
VideoMutate
>
}
>
=
(
props
)
=>
{
const
{
id
,
data
}
=
props
??
{};
return
patchVideoId
(
id
,
data
,
requestOptions
)
return
patch
ApiV10
VideoId
(
id
,
data
,
requestOptions
)
}
...
...
@@ -326,23 +326,23 @@ const {mutation: mutationOptions, request: requestOptions} = options ?
return
{
mutationFn
,
...
mutationOptions
}}
export
type
Patch
VideoIdMutationResult
=
NonNullable
<
Awaited
<
ReturnType
<
typeof
patch
VideoId
>>>
export
type
PatchVideoIdMutationBody
=
BodyType
<
VideoMutate
>
export
type
PatchVideoIdMutationError
=
ErrorType
<
unknown
>
export
type
Patch
ApiV10VideoIdMutationResult
=
NonNullable
<
Awaited
<
ReturnType
<
typeof
patchApiV10
VideoId
>>>
export
type
Patch
ApiV10
VideoIdMutationBody
=
BodyType
<
VideoMutate
>
export
type
Patch
ApiV10
VideoIdMutationError
=
ErrorType
<
unknown
>
/**
* @summary Update a video
*/
export
const
usePatchVideoId
=
<
TError
=
ErrorType
<
unknown
>
,
TContext
=
unknown
>
(
options
?:
{
mutation
?:
UseMutationOptions
<
Awaited
<
ReturnType
<
typeof
patchVideoId
>>
,
TError
,{
id
:
string
;
data
:
BodyType
<
VideoMutate
>
},
TContext
>
,
request
?:
SecondParameter
<
typeof
useCustomClient
>
}
export
const
usePatch
ApiV10
VideoId
=
<
TError
=
ErrorType
<
unknown
>
,
TContext
=
unknown
>
(
options
?:
{
mutation
?:
UseMutationOptions
<
Awaited
<
ReturnType
<
typeof
patch
ApiV10
VideoId
>>
,
TError
,{
id
:
string
;
data
:
BodyType
<
VideoMutate
>
},
TContext
>
,
request
?:
SecondParameter
<
typeof
useCustomClient
>
}
,
queryClient
?:
QueryClient
):
UseMutationResult
<
Awaited
<
ReturnType
<
typeof
patchVideoId
>>
,
Awaited
<
ReturnType
<
typeof
patch
ApiV10
VideoId
>>
,
TError
,
{
id
:
string
;
data
:
BodyType
<
VideoMutate
>
},
TContext
>
=>
{
const
mutationOptions
=
getPatchVideoIdMutationOptions
(
options
);
const
mutationOptions
=
getPatch
ApiV10
VideoIdMutationOptions
(
options
);
return
useMutation
(
mutationOptions
,
queryClient
);
}
...
...
@@ -350,30 +350,30 @@ export const usePatchVideoId = <TError = ErrorType<unknown>,
* Replace an existing video record
* @summary Replace a video
*/
export
type
putVideoIdResponse200
=
{
export
type
put
ApiV10
VideoIdResponse200
=
{
data
:
void
status
:
200
}
export
type
put
VideoIdResponseSuccess
=
(
put
VideoIdResponse200
)
&
{
export
type
put
ApiV10VideoIdResponseSuccess
=
(
putApiV10
VideoIdResponse200
)
&
{
headers
:
Headers
;
};
;
export
type
put
VideoIdResponse
=
(
put
VideoIdResponseSuccess
)
export
type
put
ApiV10VideoIdResponse
=
(
putApiV10
VideoIdResponseSuccess
)
export
const
getPutVideoIdUrl
=
(
id
:
string
,)
=>
{
export
const
getPut
ApiV10
VideoIdUrl
=
(
id
:
string
,)
=>
{
return
`/video/
${
id
}
`
return
`/
api/v1.0/
video/
${
id
}
`
}
export
const
putVideoId
=
async
(
id
:
string
,
videoMutate
:
VideoMutate
,
options
?:
RequestInit
):
Promise
<
putVideoIdResponse
>
=>
{
export
const
put
ApiV10
VideoId
=
async
(
id
:
string
,
videoMutate
:
VideoMutate
,
options
?:
RequestInit
):
Promise
<
put
ApiV10
VideoIdResponse
>
=>
{
return
useCustomClient
<
put
VideoIdResponse
>
(
getPut
VideoIdUrl
(
id
),
return
useCustomClient
<
put
ApiV10VideoIdResponse
>
(
getPutApiV10
VideoIdUrl
(
id
),
{
...
options
,
method
:
'PUT'
,
...
...
@@ -386,11 +386,11 @@ export const putVideoId = async (id: string,
export
const
getPutVideoIdMutationOptions
=
<
TError
=
ErrorType
<
unknown
>
,
TContext
=
unknown
>
(
options
?:
{
mutation
?:
UseMutationOptions
<
Awaited
<
ReturnType
<
typeof
putVideoId
>>
,
TError
,{
id
:
string
;
data
:
BodyType
<
VideoMutate
>
},
TContext
>
,
request
?:
SecondParameter
<
typeof
useCustomClient
>
}
):
UseMutationOptions
<
Awaited
<
ReturnType
<
typeof
putVideoId
>>
,
TError
,{
id
:
string
;
data
:
BodyType
<
VideoMutate
>
},
TContext
>
=>
{
export
const
getPut
ApiV10
VideoIdMutationOptions
=
<
TError
=
ErrorType
<
unknown
>
,
TContext
=
unknown
>
(
options
?:
{
mutation
?:
UseMutationOptions
<
Awaited
<
ReturnType
<
typeof
put
ApiV10
VideoId
>>
,
TError
,{
id
:
string
;
data
:
BodyType
<
VideoMutate
>
},
TContext
>
,
request
?:
SecondParameter
<
typeof
useCustomClient
>
}
):
UseMutationOptions
<
Awaited
<
ReturnType
<
typeof
put
ApiV10
VideoId
>>
,
TError
,{
id
:
string
;
data
:
BodyType
<
VideoMutate
>
},
TContext
>
=>
{
const
mutationKey
=
[
'putVideoId'
];
const
mutationKey
=
[
'put
ApiV10
VideoId'
];
const
{
mutation
:
mutationOptions
,
request
:
requestOptions
}
=
options
?
options
.
mutation
&&
'mutationKey'
in
options
.
mutation
&&
options
.
mutation
.
mutationKey
?
options
...
...
@@ -400,10 +400,10 @@ const {mutation: mutationOptions, request: requestOptions} = options ?
const
mutationFn
:
MutationFunction
<
Awaited
<
ReturnType
<
typeof
putVideoId
>>
,
{
id
:
string
;
data
:
BodyType
<
VideoMutate
>
}
>
=
(
props
)
=>
{
const
mutationFn
:
MutationFunction
<
Awaited
<
ReturnType
<
typeof
put
ApiV10
VideoId
>>
,
{
id
:
string
;
data
:
BodyType
<
VideoMutate
>
}
>
=
(
props
)
=>
{
const
{
id
,
data
}
=
props
??
{};
return
putVideoId
(
id
,
data
,
requestOptions
)
return
put
ApiV10
VideoId
(
id
,
data
,
requestOptions
)
}
...
...
@@ -411,23 +411,23 @@ const {mutation: mutationOptions, request: requestOptions} = options ?
return
{
mutationFn
,
...
mutationOptions
}}
export
type
Put
VideoIdMutationResult
=
NonNullable
<
Awaited
<
ReturnType
<
typeof
put
VideoId
>>>
export
type
PutVideoIdMutationBody
=
BodyType
<
VideoMutate
>
export
type
PutVideoIdMutationError
=
ErrorType
<
unknown
>
export
type
Put
ApiV10VideoIdMutationResult
=
NonNullable
<
Awaited
<
ReturnType
<
typeof
putApiV10
VideoId
>>>
export
type
Put
ApiV10
VideoIdMutationBody
=
BodyType
<
VideoMutate
>
export
type
Put
ApiV10
VideoIdMutationError
=
ErrorType
<
unknown
>
/**
* @summary Replace a video
*/
export
const
usePutVideoId
=
<
TError
=
ErrorType
<
unknown
>
,
TContext
=
unknown
>
(
options
?:
{
mutation
?:
UseMutationOptions
<
Awaited
<
ReturnType
<
typeof
putVideoId
>>
,
TError
,{
id
:
string
;
data
:
BodyType
<
VideoMutate
>
},
TContext
>
,
request
?:
SecondParameter
<
typeof
useCustomClient
>
}
export
const
usePut
ApiV10
VideoId
=
<
TError
=
ErrorType
<
unknown
>
,
TContext
=
unknown
>
(
options
?:
{
mutation
?:
UseMutationOptions
<
Awaited
<
ReturnType
<
typeof
put
ApiV10
VideoId
>>
,
TError
,{
id
:
string
;
data
:
BodyType
<
VideoMutate
>
},
TContext
>
,
request
?:
SecondParameter
<
typeof
useCustomClient
>
}
,
queryClient
?:
QueryClient
):
UseMutationResult
<
Awaited
<
ReturnType
<
typeof
putVideoId
>>
,
Awaited
<
ReturnType
<
typeof
put
ApiV10
VideoId
>>
,
TError
,
{
id
:
string
;
data
:
BodyType
<
VideoMutate
>
},
TContext
>
=>
{
const
mutationOptions
=
getPutVideoIdMutationOptions
(
options
);
const
mutationOptions
=
getPut
ApiV10
VideoIdMutationOptions
(
options
);
return
useMutation
(
mutationOptions
,
queryClient
);
}
...
...
@@ -435,29 +435,29 @@ export const usePutVideoId = <TError = ErrorType<unknown>,
* Delete a video record
* @summary Delete a video
*/
export
type
deleteVideoIdResponse200
=
{
export
type
delete
ApiV10
VideoIdResponse200
=
{
data
:
void
status
:
200
}
export
type
delete
VideoIdResponseSuccess
=
(
delete
VideoIdResponse200
)
&
{
export
type
delete
ApiV10VideoIdResponseSuccess
=
(
deleteApiV10
VideoIdResponse200
)
&
{
headers
:
Headers
;
};
;
export
type
delete
VideoIdResponse
=
(
delete
VideoIdResponseSuccess
)
export
type
delete
ApiV10VideoIdResponse
=
(
deleteApiV10
VideoIdResponseSuccess
)
export
const
getDeleteVideoIdUrl
=
(
id
:
string
,)
=>
{
export
const
getDelete
ApiV10
VideoIdUrl
=
(
id
:
string
,)
=>
{
return
`/video/
${
id
}
`
return
`/
api/v1.0/
video/
${
id
}
`
}
export
const
delete
VideoId
=
async
(
id
:
string
,
options
?:
RequestInit
):
Promise
<
delete
VideoIdResponse
>
=>
{
export
const
delete
ApiV10VideoId
=
async
(
id
:
string
,
options
?:
RequestInit
):
Promise
<
deleteApiV10
VideoIdResponse
>
=>
{
return
useCustomClient
<
delete
VideoIdResponse
>
(
getDelete
VideoIdUrl
(
id
),
return
useCustomClient
<
delete
ApiV10VideoIdResponse
>
(
getDeleteApiV10
VideoIdUrl
(
id
),
{
...
options
,
method
:
'DELETE'
...
...
@@ -469,11 +469,11 @@ export const deleteVideoId = async (id: string, options?: RequestInit): Promise<
export
const
getDeleteVideoIdMutationOptions
=
<
TError
=
ErrorType
<
unknown
>
,
TContext
=
unknown
>
(
options
?:
{
mutation
?:
UseMutationOptions
<
Awaited
<
ReturnType
<
typeof
deleteVideoId
>>
,
TError
,{
id
:
string
},
TContext
>
,
request
?:
SecondParameter
<
typeof
useCustomClient
>
}
):
UseMutationOptions
<
Awaited
<
ReturnType
<
typeof
deleteVideoId
>>
,
TError
,{
id
:
string
},
TContext
>
=>
{
export
const
getDelete
ApiV10
VideoIdMutationOptions
=
<
TError
=
ErrorType
<
unknown
>
,
TContext
=
unknown
>
(
options
?:
{
mutation
?:
UseMutationOptions
<
Awaited
<
ReturnType
<
typeof
delete
ApiV10
VideoId
>>
,
TError
,{
id
:
string
},
TContext
>
,
request
?:
SecondParameter
<
typeof
useCustomClient
>
}
):
UseMutationOptions
<
Awaited
<
ReturnType
<
typeof
delete
ApiV10
VideoId
>>
,
TError
,{
id
:
string
},
TContext
>
=>
{
const
mutationKey
=
[
'deleteVideoId'
];
const
mutationKey
=
[
'delete
ApiV10
VideoId'
];
const
{
mutation
:
mutationOptions
,
request
:
requestOptions
}
=
options
?
options
.
mutation
&&
'mutationKey'
in
options
.
mutation
&&
options
.
mutation
.
mutationKey
?
options
...
...
@@ -483,10 +483,10 @@ const {mutation: mutationOptions, request: requestOptions} = options ?
const
mutationFn
:
MutationFunction
<
Awaited
<
ReturnType
<
typeof
deleteVideoId
>>
,
{
id
:
string
}
>
=
(
props
)
=>
{
const
mutationFn
:
MutationFunction
<
Awaited
<
ReturnType
<
typeof
delete
ApiV10
VideoId
>>
,
{
id
:
string
}
>
=
(
props
)
=>
{
const
{
id
}
=
props
??
{};
return
deleteVideoId
(
id
,
requestOptions
)
return
delete
ApiV10
VideoId
(
id
,
requestOptions
)
}
...
...
@@ -494,23 +494,23 @@ const {mutation: mutationOptions, request: requestOptions} = options ?
return
{
mutationFn
,
...
mutationOptions
}}
export
type
Delete
VideoIdMutationResult
=
NonNullable
<
Awaited
<
ReturnType
<
typeof
delete
VideoId
>>>
export
type
Delete
ApiV10VideoIdMutationResult
=
NonNullable
<
Awaited
<
ReturnType
<
typeof
deleteApiV10
VideoId
>>>
export
type
DeleteVideoIdMutationError
=
ErrorType
<
unknown
>
export
type
Delete
ApiV10
VideoIdMutationError
=
ErrorType
<
unknown
>
/**
* @summary Delete a video
*/
export
const
useDeleteVideoId
=
<
TError
=
ErrorType
<
unknown
>
,
TContext
=
unknown
>
(
options
?:
{
mutation
?:
UseMutationOptions
<
Awaited
<
ReturnType
<
typeof
deleteVideoId
>>
,
TError
,{
id
:
string
},
TContext
>
,
request
?:
SecondParameter
<
typeof
useCustomClient
>
}
export
const
useDelete
ApiV10
VideoId
=
<
TError
=
ErrorType
<
unknown
>
,
TContext
=
unknown
>
(
options
?:
{
mutation
?:
UseMutationOptions
<
Awaited
<
ReturnType
<
typeof
delete
ApiV10
VideoId
>>
,
TError
,{
id
:
string
},
TContext
>
,
request
?:
SecondParameter
<
typeof
useCustomClient
>
}
,
queryClient
?:
QueryClient
):
UseMutationResult
<
Awaited
<
ReturnType
<
typeof
deleteVideoId
>>
,
Awaited
<
ReturnType
<
typeof
delete
ApiV10
VideoId
>>
,
TError
,
{
id
:
string
},
TContext
>
=>
{
const
mutationOptions
=
getDeleteVideoIdMutationOptions
(
options
);
const
mutationOptions
=
getDelete
ApiV10
VideoIdMutationOptions
(
options
);
return
useMutation
(
mutationOptions
,
queryClient
);
}
...
...
@@ -518,19 +518,19 @@ export const useDeleteVideoId = <TError = ErrorType<unknown>,
* Retrieve a list of videos with pagination, filtering and sorting
* @summary Get all videos
*/
export
type
getVideoResponse200
=
{
export
type
get
ApiV10
VideoResponse200
=
{
data
:
ResponseGetAllData
status
:
200
}
export
type
get
VideoResponseSuccess
=
(
get
VideoResponse200
)
&
{
export
type
get
ApiV10VideoResponseSuccess
=
(
getApiV10
VideoResponse200
)
&
{
headers
:
Headers
;
};
;
export
type
get
VideoResponse
=
(
get
VideoResponseSuccess
)
export
type
get
ApiV10VideoResponse
=
(
getApiV10
VideoResponseSuccess
)
export
const
getGet
VideoUrl
=
(
params
?:
Get
VideoParams
,)
=>
{
export
const
getGet
ApiV10VideoUrl
=
(
params
?:
GetApiV10
VideoParams
,)
=>
{
const
normalizedParams
=
new
URLSearchParams
();
Object
.
entries
(
params
||
{}).
forEach
(([
key
,
value
])
=>
{
...
...
@@ -542,12 +542,12 @@ export const getGetVideoUrl = (params?: GetVideoParams,) => {
const
stringifiedParams
=
normalizedParams
.
toString
();
return
stringifiedParams
.
length
>
0
?
`/
video?
${
stringifiedParams
}
`
:
`
/video`
return
stringifiedParams
.
length
>
0
?
`/
api/v1.0/video?
${
stringifiedParams
}
`
:
`/api/v1.0
/video`
}
export
const
get
Video
=
async
(
params
?:
GetVideoParams
,
options
?:
RequestInit
):
Promise
<
get
VideoResponse
>
=>
{
export
const
get
ApiV10Video
=
async
(
params
?:
GetApiV10VideoParams
,
options
?:
RequestInit
):
Promise
<
getApiV10
VideoResponse
>
=>
{
return
useCustomClient
<
get
VideoResponse
>
(
getGet
VideoUrl
(
params
),
return
useCustomClient
<
get
ApiV10VideoResponse
>
(
getGetApiV10
VideoUrl
(
params
),
{
...
options
,
method
:
'GET'
...
...
@@ -560,75 +560,75 @@ export const getVideo = async (params?: GetVideoParams, options?: RequestInit):
export
const
getGet
VideoInfiniteQueryKey
=
(
params
?:
Get
VideoParams
,)
=>
{
export
const
getGet
ApiV10VideoInfiniteQueryKey
=
(
params
?:
GetApiV10
VideoParams
,)
=>
{
return
[
'infinite'
,
`/video`
,
...(
params
?
[
params
]:
[])
'infinite'
,
`/
api/v1.0/
video`
,
...(
params
?
[
params
]:
[])
]
as
const
;
}
export
const
getGet
VideoQueryKey
=
(
params
?:
Get
VideoParams
,)
=>
{
export
const
getGet
ApiV10VideoQueryKey
=
(
params
?:
GetApiV10
VideoParams
,)
=>
{
return
[
`/video`
,
...(
params
?
[
params
]:
[])
`/
api/v1.0/
video`
,
...(
params
?
[
params
]:
[])
]
as
const
;
}
export
const
getGet
VideoInfiniteQueryOptions
=
<
TData
=
InfiniteData
<
Awaited
<
ReturnType
<
typeof
getVideo
>>>
,
TError
=
ErrorType
<
unknown
>>
(
params
?:
GetVideoParams
,
options
?:
{
query
?:
Partial
<
UseInfiniteQueryOptions
<
Awaited
<
ReturnType
<
typeof
get
Video
>>
,
TError
,
TData
>>
,
request
?:
SecondParameter
<
typeof
useCustomClient
>
}
export
const
getGet
ApiV10VideoInfiniteQueryOptions
=
<
TData
=
InfiniteData
<
Awaited
<
ReturnType
<
typeof
getApiV10Video
>>>
,
TError
=
ErrorType
<
unknown
>>
(
params
?:
GetApiV10VideoParams
,
options
?:
{
query
?:
Partial
<
UseInfiniteQueryOptions
<
Awaited
<
ReturnType
<
typeof
getApiV10
Video
>>
,
TError
,
TData
>>
,
request
?:
SecondParameter
<
typeof
useCustomClient
>
}
)
=>
{
const
{
query
:
queryOptions
,
request
:
requestOptions
}
=
options
??
{};
const
queryKey
=
queryOptions
?.
queryKey
??
getGetVideoInfiniteQueryKey
(
params
);
const
queryKey
=
queryOptions
?.
queryKey
??
getGet
ApiV10
VideoInfiniteQueryKey
(
params
);
const
queryFn
:
QueryFunction
<
Awaited
<
ReturnType
<
typeof
get
Video
>>>
=
({
signal
})
=>
get
Video
(
params
,
{
signal
,
...
requestOptions
});
const
queryFn
:
QueryFunction
<
Awaited
<
ReturnType
<
typeof
get
ApiV10Video
>>>
=
({
signal
})
=>
getApiV10
Video
(
params
,
{
signal
,
...
requestOptions
});
return
{
queryKey
,
queryFn
,
retry
:
3
,
retryDelay
:
1000
,
...
queryOptions
}
as
UseInfiniteQueryOptions
<
Awaited
<
ReturnType
<
typeof
getVideo
>>
,
TError
,
TData
>
&
{
queryKey
:
DataTag
<
QueryKey
,
TData
,
TError
>
}
return
{
queryKey
,
queryFn
,
retry
:
3
,
retryDelay
:
1000
,
...
queryOptions
}
as
UseInfiniteQueryOptions
<
Awaited
<
ReturnType
<
typeof
get
ApiV10
Video
>>
,
TError
,
TData
>
&
{
queryKey
:
DataTag
<
QueryKey
,
TData
,
TError
>
}
}
export
type
Get
VideoInfiniteQueryResult
=
NonNullable
<
Awaited
<
ReturnType
<
typeof
get
Video
>>>
export
type
GetVideoInfiniteQueryError
=
ErrorType
<
unknown
>
export
type
Get
ApiV10VideoInfiniteQueryResult
=
NonNullable
<
Awaited
<
ReturnType
<
typeof
getApiV10
Video
>>>
export
type
Get
ApiV10
VideoInfiniteQueryError
=
ErrorType
<
unknown
>
export
function
useGet
VideoInfinite
<
TData
=
InfiniteData
<
Awaited
<
ReturnType
<
typeof
get
Video
>>>
,
TError
=
ErrorType
<
unknown
>>
(
params
:
undefined
|
Get
VideoParams
,
options
:
{
query
:
Partial
<
UseInfiniteQueryOptions
<
Awaited
<
ReturnType
<
typeof
get
Video
>>
,
TError
,
TData
>>
&
Pick
<
export
function
useGet
ApiV10VideoInfinite
<
TData
=
InfiniteData
<
Awaited
<
ReturnType
<
typeof
getApiV10
Video
>>>
,
TError
=
ErrorType
<
unknown
>>
(
params
:
undefined
|
Get
ApiV10VideoParams
,
options
:
{
query
:
Partial
<
UseInfiniteQueryOptions
<
Awaited
<
ReturnType
<
typeof
getApiV10
Video
>>
,
TError
,
TData
>>
&
Pick
<
DefinedInitialDataOptions
<
Awaited
<
ReturnType
<
typeof
getVideo
>>
,
Awaited
<
ReturnType
<
typeof
get
ApiV10
Video
>>
,
TError
,
Awaited
<
ReturnType
<
typeof
getVideo
>>
Awaited
<
ReturnType
<
typeof
get
ApiV10
Video
>>
>
,
'initialData'
>
,
request
?:
SecondParameter
<
typeof
useCustomClient
>
}
,
queryClient
?:
QueryClient
):
DefinedUseInfiniteQueryResult
<
TData
,
TError
>
&
{
queryKey
:
DataTag
<
QueryKey
,
TData
,
TError
>
}
export
function
useGet
VideoInfinite
<
TData
=
InfiniteData
<
Awaited
<
ReturnType
<
typeof
get
Video
>>>
,
TError
=
ErrorType
<
unknown
>>
(
params
?:
Get
VideoParams
,
options
?:
{
query
?:
Partial
<
UseInfiniteQueryOptions
<
Awaited
<
ReturnType
<
typeof
get
Video
>>
,
TError
,
TData
>>
&
Pick
<
export
function
useGet
ApiV10VideoInfinite
<
TData
=
InfiniteData
<
Awaited
<
ReturnType
<
typeof
getApiV10
Video
>>>
,
TError
=
ErrorType
<
unknown
>>
(
params
?:
Get
ApiV10VideoParams
,
options
?:
{
query
?:
Partial
<
UseInfiniteQueryOptions
<
Awaited
<
ReturnType
<
typeof
getApiV10
Video
>>
,
TError
,
TData
>>
&
Pick
<
UndefinedInitialDataOptions
<
Awaited
<
ReturnType
<
typeof
getVideo
>>
,
Awaited
<
ReturnType
<
typeof
get
ApiV10
Video
>>
,
TError
,
Awaited
<
ReturnType
<
typeof
getVideo
>>
Awaited
<
ReturnType
<
typeof
get
ApiV10
Video
>>
>
,
'initialData'
>
,
request
?:
SecondParameter
<
typeof
useCustomClient
>
}
,
queryClient
?:
QueryClient
):
UseInfiniteQueryResult
<
TData
,
TError
>
&
{
queryKey
:
DataTag
<
QueryKey
,
TData
,
TError
>
}
export
function
useGet
VideoInfinite
<
TData
=
InfiniteData
<
Awaited
<
ReturnType
<
typeof
get
Video
>>>
,
TError
=
ErrorType
<
unknown
>>
(
params
?:
Get
VideoParams
,
options
?:
{
query
?:
Partial
<
UseInfiniteQueryOptions
<
Awaited
<
ReturnType
<
typeof
get
Video
>>
,
TError
,
TData
>>
,
request
?:
SecondParameter
<
typeof
useCustomClient
>
}
export
function
useGet
ApiV10VideoInfinite
<
TData
=
InfiniteData
<
Awaited
<
ReturnType
<
typeof
getApiV10
Video
>>>
,
TError
=
ErrorType
<
unknown
>>
(
params
?:
Get
ApiV10VideoParams
,
options
?:
{
query
?:
Partial
<
UseInfiniteQueryOptions
<
Awaited
<
ReturnType
<
typeof
getApiV10
Video
>>
,
TError
,
TData
>>
,
request
?:
SecondParameter
<
typeof
useCustomClient
>
}
,
queryClient
?:
QueryClient
):
UseInfiniteQueryResult
<
TData
,
TError
>
&
{
queryKey
:
DataTag
<
QueryKey
,
TData
,
TError
>
}
/**
* @summary Get all videos
*/
export
function
useGet
VideoInfinite
<
TData
=
InfiniteData
<
Awaited
<
ReturnType
<
typeof
get
Video
>>>
,
TError
=
ErrorType
<
unknown
>>
(
params
?:
Get
VideoParams
,
options
?:
{
query
?:
Partial
<
UseInfiniteQueryOptions
<
Awaited
<
ReturnType
<
typeof
get
Video
>>
,
TError
,
TData
>>
,
request
?:
SecondParameter
<
typeof
useCustomClient
>
}
export
function
useGet
ApiV10VideoInfinite
<
TData
=
InfiniteData
<
Awaited
<
ReturnType
<
typeof
getApiV10
Video
>>>
,
TError
=
ErrorType
<
unknown
>>
(
params
?:
Get
ApiV10VideoParams
,
options
?:
{
query
?:
Partial
<
UseInfiniteQueryOptions
<
Awaited
<
ReturnType
<
typeof
getApiV10
Video
>>
,
TError
,
TData
>>
,
request
?:
SecondParameter
<
typeof
useCustomClient
>
}
,
queryClient
?:
QueryClient
):
UseInfiniteQueryResult
<
TData
,
TError
>
&
{
queryKey
:
DataTag
<
QueryKey
,
TData
,
TError
>
}
{
const
queryOptions
=
getGetVideoInfiniteQueryOptions
(
params
,
options
)
const
queryOptions
=
getGet
ApiV10
VideoInfiniteQueryOptions
(
params
,
options
)
const
query
=
useInfiniteQuery
(
queryOptions
,
queryClient
)
as
UseInfiniteQueryResult
<
TData
,
TError
>
&
{
queryKey
:
DataTag
<
QueryKey
,
TData
,
TError
>
};
...
...
@@ -640,12 +640,12 @@ export function useGetVideoInfinite<TData = InfiniteData<Awaited<ReturnType<type
/**
* @summary Get all videos
*/
export
const
prefetchGet
VideoInfiniteQuery
=
async
<
TData
=
Awaited
<
ReturnType
<
typeof
get
Video
>>
,
TError
=
ErrorType
<
unknown
>>
(
queryClient
:
QueryClient
,
params
?:
Get
VideoParams
,
options
?:
{
query
?:
Partial
<
UseInfiniteQueryOptions
<
Awaited
<
ReturnType
<
typeof
get
Video
>>
,
TError
,
TData
>>
,
request
?:
SecondParameter
<
typeof
useCustomClient
>
}
export
const
prefetchGet
ApiV10VideoInfiniteQuery
=
async
<
TData
=
Awaited
<
ReturnType
<
typeof
getApiV10
Video
>>
,
TError
=
ErrorType
<
unknown
>>
(
queryClient
:
QueryClient
,
params
?:
Get
ApiV10VideoParams
,
options
?:
{
query
?:
Partial
<
UseInfiniteQueryOptions
<
Awaited
<
ReturnType
<
typeof
getApiV10
Video
>>
,
TError
,
TData
>>
,
request
?:
SecondParameter
<
typeof
useCustomClient
>
}
):
Promise
<
QueryClient
>
=>
{
const
queryOptions
=
getGetVideoInfiniteQueryOptions
(
params
,
options
)
const
queryOptions
=
getGet
ApiV10
VideoInfiniteQueryOptions
(
params
,
options
)
await
queryClient
.
prefetchInfiniteQuery
(
queryOptions
);
...
...
@@ -654,62 +654,62 @@ export const prefetchGetVideoInfiniteQuery = async <TData = Awaited<ReturnType<t
export
const
getGet
VideoQueryOptions
=
<
TData
=
Awaited
<
ReturnType
<
typeof
getVideo
>>
,
TError
=
ErrorType
<
unknown
>>
(
params
?:
GetVideoParams
,
options
?:
{
query
?:
Partial
<
UseQueryOptions
<
Awaited
<
ReturnType
<
typeof
get
Video
>>
,
TError
,
TData
>>
,
request
?:
SecondParameter
<
typeof
useCustomClient
>
}
export
const
getGet
ApiV10VideoQueryOptions
=
<
TData
=
Awaited
<
ReturnType
<
typeof
getApiV10Video
>>
,
TError
=
ErrorType
<
unknown
>>
(
params
?:
GetApiV10VideoParams
,
options
?:
{
query
?:
Partial
<
UseQueryOptions
<
Awaited
<
ReturnType
<
typeof
getApiV10
Video
>>
,
TError
,
TData
>>
,
request
?:
SecondParameter
<
typeof
useCustomClient
>
}
)
=>
{
const
{
query
:
queryOptions
,
request
:
requestOptions
}
=
options
??
{};
const
queryKey
=
queryOptions
?.
queryKey
??
getGetVideoQueryKey
(
params
);
const
queryKey
=
queryOptions
?.
queryKey
??
getGet
ApiV10
VideoQueryKey
(
params
);
const
queryFn
:
QueryFunction
<
Awaited
<
ReturnType
<
typeof
get
Video
>>>
=
({
signal
})
=>
get
Video
(
params
,
{
signal
,
...
requestOptions
});
const
queryFn
:
QueryFunction
<
Awaited
<
ReturnType
<
typeof
get
ApiV10Video
>>>
=
({
signal
})
=>
getApiV10
Video
(
params
,
{
signal
,
...
requestOptions
});
return
{
queryKey
,
queryFn
,
retry
:
3
,
retryDelay
:
1000
,
...
queryOptions
}
as
UseQueryOptions
<
Awaited
<
ReturnType
<
typeof
getVideo
>>
,
TError
,
TData
>
&
{
queryKey
:
DataTag
<
QueryKey
,
TData
,
TError
>
}
return
{
queryKey
,
queryFn
,
retry
:
3
,
retryDelay
:
1000
,
...
queryOptions
}
as
UseQueryOptions
<
Awaited
<
ReturnType
<
typeof
get
ApiV10
Video
>>
,
TError
,
TData
>
&
{
queryKey
:
DataTag
<
QueryKey
,
TData
,
TError
>
}
}
export
type
Get
VideoQueryResult
=
NonNullable
<
Awaited
<
ReturnType
<
typeof
get
Video
>>>
export
type
GetVideoQueryError
=
ErrorType
<
unknown
>
export
type
Get
ApiV10VideoQueryResult
=
NonNullable
<
Awaited
<
ReturnType
<
typeof
getApiV10
Video
>>>
export
type
Get
ApiV10
VideoQueryError
=
ErrorType
<
unknown
>
export
function
useGet
Video
<
TData
=
Awaited
<
ReturnType
<
typeof
get
Video
>>
,
TError
=
ErrorType
<
unknown
>>
(
params
:
undefined
|
Get
VideoParams
,
options
:
{
query
:
Partial
<
UseQueryOptions
<
Awaited
<
ReturnType
<
typeof
get
Video
>>
,
TError
,
TData
>>
&
Pick
<
export
function
useGet
ApiV10Video
<
TData
=
Awaited
<
ReturnType
<
typeof
getApiV10
Video
>>
,
TError
=
ErrorType
<
unknown
>>
(
params
:
undefined
|
Get
ApiV10VideoParams
,
options
:
{
query
:
Partial
<
UseQueryOptions
<
Awaited
<
ReturnType
<
typeof
getApiV10
Video
>>
,
TError
,
TData
>>
&
Pick
<
DefinedInitialDataOptions
<
Awaited
<
ReturnType
<
typeof
getVideo
>>
,
Awaited
<
ReturnType
<
typeof
get
ApiV10
Video
>>
,
TError
,
Awaited
<
ReturnType
<
typeof
getVideo
>>
Awaited
<
ReturnType
<
typeof
get
ApiV10
Video
>>
>
,
'initialData'
>
,
request
?:
SecondParameter
<
typeof
useCustomClient
>
}
,
queryClient
?:
QueryClient
):
DefinedUseQueryResult
<
TData
,
TError
>
&
{
queryKey
:
DataTag
<
QueryKey
,
TData
,
TError
>
}
export
function
useGet
Video
<
TData
=
Awaited
<
ReturnType
<
typeof
get
Video
>>
,
TError
=
ErrorType
<
unknown
>>
(
params
?:
Get
VideoParams
,
options
?:
{
query
?:
Partial
<
UseQueryOptions
<
Awaited
<
ReturnType
<
typeof
get
Video
>>
,
TError
,
TData
>>
&
Pick
<
export
function
useGet
ApiV10Video
<
TData
=
Awaited
<
ReturnType
<
typeof
getApiV10
Video
>>
,
TError
=
ErrorType
<
unknown
>>
(
params
?:
Get
ApiV10VideoParams
,
options
?:
{
query
?:
Partial
<
UseQueryOptions
<
Awaited
<
ReturnType
<
typeof
getApiV10
Video
>>
,
TError
,
TData
>>
&
Pick
<
UndefinedInitialDataOptions
<
Awaited
<
ReturnType
<
typeof
getVideo
>>
,
Awaited
<
ReturnType
<
typeof
get
ApiV10
Video
>>
,
TError
,
Awaited
<
ReturnType
<
typeof
getVideo
>>
Awaited
<
ReturnType
<
typeof
get
ApiV10
Video
>>
>
,
'initialData'
>
,
request
?:
SecondParameter
<
typeof
useCustomClient
>
}
,
queryClient
?:
QueryClient
):
UseQueryResult
<
TData
,
TError
>
&
{
queryKey
:
DataTag
<
QueryKey
,
TData
,
TError
>
}
export
function
useGet
Video
<
TData
=
Awaited
<
ReturnType
<
typeof
get
Video
>>
,
TError
=
ErrorType
<
unknown
>>
(
params
?:
Get
VideoParams
,
options
?:
{
query
?:
Partial
<
UseQueryOptions
<
Awaited
<
ReturnType
<
typeof
get
Video
>>
,
TError
,
TData
>>
,
request
?:
SecondParameter
<
typeof
useCustomClient
>
}
export
function
useGet
ApiV10Video
<
TData
=
Awaited
<
ReturnType
<
typeof
getApiV10
Video
>>
,
TError
=
ErrorType
<
unknown
>>
(
params
?:
Get
ApiV10VideoParams
,
options
?:
{
query
?:
Partial
<
UseQueryOptions
<
Awaited
<
ReturnType
<
typeof
getApiV10
Video
>>
,
TError
,
TData
>>
,
request
?:
SecondParameter
<
typeof
useCustomClient
>
}
,
queryClient
?:
QueryClient
):
UseQueryResult
<
TData
,
TError
>
&
{
queryKey
:
DataTag
<
QueryKey
,
TData
,
TError
>
}
/**
* @summary Get all videos
*/
export
function
useGet
Video
<
TData
=
Awaited
<
ReturnType
<
typeof
get
Video
>>
,
TError
=
ErrorType
<
unknown
>>
(
params
?:
Get
VideoParams
,
options
?:
{
query
?:
Partial
<
UseQueryOptions
<
Awaited
<
ReturnType
<
typeof
get
Video
>>
,
TError
,
TData
>>
,
request
?:
SecondParameter
<
typeof
useCustomClient
>
}
export
function
useGet
ApiV10Video
<
TData
=
Awaited
<
ReturnType
<
typeof
getApiV10
Video
>>
,
TError
=
ErrorType
<
unknown
>>
(
params
?:
Get
ApiV10VideoParams
,
options
?:
{
query
?:
Partial
<
UseQueryOptions
<
Awaited
<
ReturnType
<
typeof
getApiV10
Video
>>
,
TError
,
TData
>>
,
request
?:
SecondParameter
<
typeof
useCustomClient
>
}
,
queryClient
?:
QueryClient
):
UseQueryResult
<
TData
,
TError
>
&
{
queryKey
:
DataTag
<
QueryKey
,
TData
,
TError
>
}
{
const
queryOptions
=
getGetVideoQueryOptions
(
params
,
options
)
const
queryOptions
=
getGet
ApiV10
VideoQueryOptions
(
params
,
options
)
const
query
=
useQuery
(
queryOptions
,
queryClient
)
as
UseQueryResult
<
TData
,
TError
>
&
{
queryKey
:
DataTag
<
QueryKey
,
TData
,
TError
>
};
...
...
@@ -721,12 +721,12 @@ export function useGetVideo<TData = Awaited<ReturnType<typeof getVideo>>, TError
/**
* @summary Get all videos
*/
export
const
prefetchGet
VideoQuery
=
async
<
TData
=
Awaited
<
ReturnType
<
typeof
get
Video
>>
,
TError
=
ErrorType
<
unknown
>>
(
queryClient
:
QueryClient
,
params
?:
Get
VideoParams
,
options
?:
{
query
?:
Partial
<
UseQueryOptions
<
Awaited
<
ReturnType
<
typeof
get
Video
>>
,
TError
,
TData
>>
,
request
?:
SecondParameter
<
typeof
useCustomClient
>
}
export
const
prefetchGet
ApiV10VideoQuery
=
async
<
TData
=
Awaited
<
ReturnType
<
typeof
getApiV10
Video
>>
,
TError
=
ErrorType
<
unknown
>>
(
queryClient
:
QueryClient
,
params
?:
Get
ApiV10VideoParams
,
options
?:
{
query
?:
Partial
<
UseQueryOptions
<
Awaited
<
ReturnType
<
typeof
getApiV10
Video
>>
,
TError
,
TData
>>
,
request
?:
SecondParameter
<
typeof
useCustomClient
>
}
):
Promise
<
QueryClient
>
=>
{
const
queryOptions
=
getGetVideoQueryOptions
(
params
,
options
)
const
queryOptions
=
getGet
ApiV10
VideoQueryOptions
(
params
,
options
)
await
queryClient
.
prefetchQuery
(
queryOptions
);
...
...
@@ -739,29 +739,29 @@ export const prefetchGetVideoQuery = async <TData = Awaited<ReturnType<typeof ge
* Create a new video record
* @summary Create a video
*/
export
type
postVideoResponse200
=
{
data
:
PostVideo200
export
type
post
ApiV10
VideoResponse200
=
{
data
:
Post
ApiV10
Video200
status
:
200
}
export
type
post
VideoResponseSuccess
=
(
post
VideoResponse200
)
&
{
export
type
post
ApiV10VideoResponseSuccess
=
(
postApiV10
VideoResponse200
)
&
{
headers
:
Headers
;
};
;
export
type
post
VideoResponse
=
(
post
VideoResponseSuccess
)
export
type
post
ApiV10VideoResponse
=
(
postApiV10
VideoResponseSuccess
)
export
const
getPostVideoUrl
=
()
=>
{
export
const
getPost
ApiV10
VideoUrl
=
()
=>
{
return
`/video`
return
`/
api/v1.0/
video`
}
export
const
post
Video
=
async
(
videoMutate
:
VideoMutate
,
options
?:
RequestInit
):
Promise
<
post
VideoResponse
>
=>
{
export
const
post
ApiV10Video
=
async
(
videoMutate
:
VideoMutate
,
options
?:
RequestInit
):
Promise
<
postApiV10
VideoResponse
>
=>
{
return
useCustomClient
<
post
VideoResponse
>
(
getPost
VideoUrl
(),
return
useCustomClient
<
post
ApiV10VideoResponse
>
(
getPostApiV10
VideoUrl
(),
{
...
options
,
method
:
'POST'
,
...
...
@@ -774,11 +774,11 @@ export const postVideo = async (videoMutate: VideoMutate, options?: RequestInit)
export
const
getPostVideoMutationOptions
=
<
TError
=
ErrorType
<
unknown
>
,
TContext
=
unknown
>
(
options
?:
{
mutation
?:
UseMutationOptions
<
Awaited
<
ReturnType
<
typeof
postVideo
>>
,
TError
,{
data
:
BodyType
<
VideoMutate
>
},
TContext
>
,
request
?:
SecondParameter
<
typeof
useCustomClient
>
}
):
UseMutationOptions
<
Awaited
<
ReturnType
<
typeof
postVideo
>>
,
TError
,{
data
:
BodyType
<
VideoMutate
>
},
TContext
>
=>
{
export
const
getPost
ApiV10
VideoMutationOptions
=
<
TError
=
ErrorType
<
unknown
>
,
TContext
=
unknown
>
(
options
?:
{
mutation
?:
UseMutationOptions
<
Awaited
<
ReturnType
<
typeof
post
ApiV10
Video
>>
,
TError
,{
data
:
BodyType
<
VideoMutate
>
},
TContext
>
,
request
?:
SecondParameter
<
typeof
useCustomClient
>
}
):
UseMutationOptions
<
Awaited
<
ReturnType
<
typeof
post
ApiV10
Video
>>
,
TError
,{
data
:
BodyType
<
VideoMutate
>
},
TContext
>
=>
{
const
mutationKey
=
[
'postVideo'
];
const
mutationKey
=
[
'post
ApiV10
Video'
];
const
{
mutation
:
mutationOptions
,
request
:
requestOptions
}
=
options
?
options
.
mutation
&&
'mutationKey'
in
options
.
mutation
&&
options
.
mutation
.
mutationKey
?
options
...
...
@@ -788,10 +788,10 @@ const {mutation: mutationOptions, request: requestOptions} = options ?
const
mutationFn
:
MutationFunction
<
Awaited
<
ReturnType
<
typeof
postVideo
>>
,
{
data
:
BodyType
<
VideoMutate
>
}
>
=
(
props
)
=>
{
const
mutationFn
:
MutationFunction
<
Awaited
<
ReturnType
<
typeof
post
ApiV10
Video
>>
,
{
data
:
BodyType
<
VideoMutate
>
}
>
=
(
props
)
=>
{
const
{
data
}
=
props
??
{};
return
postVideo
(
data
,
requestOptions
)
return
post
ApiV10
Video
(
data
,
requestOptions
)
}
...
...
@@ -799,23 +799,23 @@ const {mutation: mutationOptions, request: requestOptions} = options ?
return
{
mutationFn
,
...
mutationOptions
}}
export
type
Post
VideoMutationResult
=
NonNullable
<
Awaited
<
ReturnType
<
typeof
post
Video
>>>
export
type
PostVideoMutationBody
=
BodyType
<
VideoMutate
>
export
type
PostVideoMutationError
=
ErrorType
<
unknown
>
export
type
Post
ApiV10VideoMutationResult
=
NonNullable
<
Awaited
<
ReturnType
<
typeof
postApiV10
Video
>>>
export
type
Post
ApiV10
VideoMutationBody
=
BodyType
<
VideoMutate
>
export
type
Post
ApiV10
VideoMutationError
=
ErrorType
<
unknown
>
/**
* @summary Create a video
*/
export
const
usePostVideo
=
<
TError
=
ErrorType
<
unknown
>
,
TContext
=
unknown
>
(
options
?:
{
mutation
?:
UseMutationOptions
<
Awaited
<
ReturnType
<
typeof
postVideo
>>
,
TError
,{
data
:
BodyType
<
VideoMutate
>
},
TContext
>
,
request
?:
SecondParameter
<
typeof
useCustomClient
>
}
export
const
usePost
ApiV10
Video
=
<
TError
=
ErrorType
<
unknown
>
,
TContext
=
unknown
>
(
options
?:
{
mutation
?:
UseMutationOptions
<
Awaited
<
ReturnType
<
typeof
post
ApiV10
Video
>>
,
TError
,{
data
:
BodyType
<
VideoMutate
>
},
TContext
>
,
request
?:
SecondParameter
<
typeof
useCustomClient
>
}
,
queryClient
?:
QueryClient
):
UseMutationResult
<
Awaited
<
ReturnType
<
typeof
postVideo
>>
,
Awaited
<
ReturnType
<
typeof
post
ApiV10
Video
>>
,
TError
,
{
data
:
BodyType
<
VideoMutate
>
},
TContext
>
=>
{
const
mutationOptions
=
getPostVideoMutationOptions
(
options
);
const
mutationOptions
=
getPost
ApiV10
VideoMutationOptions
(
options
);
return
useMutation
(
mutationOptions
,
queryClient
);
}
src/api/models/badRequestResponse.ts
View file @
b3589a95
/**
* Generated by orval v8.0.0-rc.0 🍺
* Do not edit manually.
*
Backend Template
*
Coded by Meu TEAM
*
VietProDev CMS Backend API
*
Generated API documentation
* OpenAPI spec version: 1.0.0
*/
import
type
{
BadRequestResponseError
}
from
'./badRequestResponseError'
;
...
...
src/api/models/badRequestResponseError.ts
View file @
b3589a95
/**
* Generated by orval v8.0.0-rc.0 🍺
* Do not edit manually.
*
Backend Template
*
Coded by Meu TEAM
*
VietProDev CMS Backend API
*
Generated API documentation
* OpenAPI spec version: 1.0.0
*/
import
type
{
BadRequestResponseErrorMessage
}
from
'./badRequestResponseErrorMessage'
;
...
...
src/api/models/badRequestResponseErrorMessage.ts
View file @
b3589a95
/**
* Generated by orval v8.0.0-rc.0 🍺
* Do not edit manually.
*
Backend Template
*
Coded by Meu TEAM
*
VietProDev CMS Backend API
*
Generated API documentation
* OpenAPI spec version: 1.0.0
*/
...
...
src/api/models/badRequestResponseResponseData.ts
View file @
b3589a95
/**
* Generated by orval v8.0.0-rc.0 🍺
* Do not edit manually.
*
Backend Template
*
Coded by Meu TEAM
*
VietProDev CMS Backend API
*
Generated API documentation
* OpenAPI spec version: 1.0.0
*/
...
...
src/api/models/badRequestResponseViolationItem.ts
View file @
b3589a95
/**
* Generated by orval v8.0.0-rc.0 🍺
* Do not edit manually.
*
Backend Template
*
Coded by Meu TEAM
*
VietProDev CMS Backend API
*
Generated API documentation
* OpenAPI spec version: 1.0.0
*/
...
...
src/api/models/banner.ts
View file @
b3589a95
...
...
@@ -5,16 +5,21 @@
* Generated API documentation
* OpenAPI spec version: 1.0.0
*/
import
type
{
BannerStatus
}
from
'./bannerStatus'
;
export
interface
Banner
{
id
?:
string
;
banner_name
?:
string
;
display_order
?:
number
;
status
?:
string
;
file_id
?:
string
;
created_at
?:
string
;
created_by
?:
string
;
updated_at
?:
string
;
updated_by
?:
string
;
id
:
string
;
/** @maxLength 255 */
banner_name
:
string
;
display_order
:
number
;
/** @minimum 1 */
display_time
?:
number
;
status
:
BannerStatus
;
file_id
:
string
;
created_at
:
string
;
/** @nullable */
created_by
?:
string
|
null
;
updated_at
:
string
;
/** @nullable */
updated_by
?:
string
|
null
;
}
src/api/models/bannerCreate.ts
0 → 100644
View file @
b3589a95
/**
* Generated by orval v8.0.0-rc.0 🍺
* Do not edit manually.
* VietProDev CMS Backend API
* Generated API documentation
* OpenAPI spec version: 1.0.0
*/
import
type
{
BannerCreateStatus
}
from
'./bannerCreateStatus'
;
export
interface
BannerCreate
{
/** @maxLength 255 */
banner_name
:
string
;
display_order
?:
number
;
/** @minimum 1 */
display_time
?:
number
;
status
?:
BannerCreateStatus
;
file_id
:
string
;
}
src/api/models/bannerCreateStatus.ts
0 → 100644
View file @
b3589a95
/**
* Generated by orval v8.0.0-rc.0 🍺
* Do not edit manually.
* VietProDev CMS Backend API
* Generated API documentation
* OpenAPI spec version: 1.0.0
*/
export
type
BannerCreateStatus
=
typeof
BannerCreateStatus
[
keyof
typeof
BannerCreateStatus
];
// eslint-disable-next-line @typescript-eslint/no-redeclare
export
const
BannerCreateStatus
=
{
ACTIVE
:
'ACTIVE'
,
INACTIVE
:
'INACTIVE'
,
}
as
const
;
src/api/models/bannerMutate.ts
View file @
b3589a95
...
...
@@ -5,11 +5,6 @@
* Generated API documentation
* OpenAPI spec version: 1.0.0
*/
import
type
{
BannerCreate
}
from
'./bannerCreate'
;
export
interface
BannerMutate
{
banner_name
?:
string
;
display_order
?:
number
;
status
?:
string
;
file_id
?:
string
;
display_time
?:
number
;
}
export
type
BannerMutate
=
BannerCreate
;
src/api/models/bannerStatus.ts
0 → 100644
View file @
b3589a95
/**
* Generated by orval v8.0.0-rc.0 🍺
* Do not edit manually.
* VietProDev CMS Backend API
* Generated API documentation
* OpenAPI spec version: 1.0.0
*/
export
type
BannerStatus
=
typeof
BannerStatus
[
keyof
typeof
BannerStatus
];
// eslint-disable-next-line @typescript-eslint/no-redeclare
export
const
BannerStatus
=
{
ACTIVE
:
'ACTIVE'
,
INACTIVE
:
'INACTIVE'
,
}
as
const
;
src/api/models/bannerUpdate.ts
0 → 100644
View file @
b3589a95
/**
* Generated by orval v8.0.0-rc.0 🍺
* Do not edit manually.
* VietProDev CMS Backend API
* Generated API documentation
* OpenAPI spec version: 1.0.0
*/
import
type
{
BannerUpdateStatus
}
from
'./bannerUpdateStatus'
;
export
interface
BannerUpdate
{
/** @maxLength 255 */
banner_name
?:
string
;
display_order
?:
number
;
/** @minimum 1 */
display_time
?:
number
;
status
?:
BannerUpdateStatus
;
file_id
?:
string
;
}
src/api/models/bannerUpdateStatus.ts
0 → 100644
View file @
b3589a95
/**
* Generated by orval v8.0.0-rc.0 🍺
* Do not edit manually.
* VietProDev CMS Backend API
* Generated API documentation
* OpenAPI spec version: 1.0.0
*/
export
type
BannerUpdateStatus
=
typeof
BannerUpdateStatus
[
keyof
typeof
BannerUpdateStatus
];
// eslint-disable-next-line @typescript-eslint/no-redeclare
export
const
BannerUpdateStatus
=
{
ACTIVE
:
'ACTIVE'
,
INACTIVE
:
'INACTIVE'
,
}
as
const
;
src/api/models/deleteApiV10BannerId200.ts
0 → 100644
View file @
b3589a95
/**
* Generated by orval v8.0.0-rc.0 🍺
* Do not edit manually.
* VietProDev CMS Backend API
* Generated API documentation
* OpenAPI spec version: 1.0.0
*/
import
type
{
ApiResponse
}
from
'./apiResponse'
;
import
type
{
DeleteApiV10BannerId200AllOf
}
from
'./deleteApiV10BannerId200AllOf'
;
export
type
DeleteApiV10BannerId200
=
ApiResponse
&
DeleteApiV10BannerId200AllOf
;
src/api/models/deleteApiV10BannerId200AllOf.ts
0 → 100644
View file @
b3589a95
/**
* Generated by orval v8.0.0-rc.0 🍺
* Do not edit manually.
* VietProDev CMS Backend API
* Generated API documentation
* OpenAPI spec version: 1.0.0
*/
export
type
DeleteApiV10BannerId200AllOf
=
{
responseData
?:
boolean
;
};
src/api/models/deleteApiV10LogoId200.ts
0 → 100644
View file @
b3589a95
/**
* Generated by orval v8.0.0-rc.0 🍺
* Do not edit manually.
* VietProDev CMS Backend API
* Generated API documentation
* OpenAPI spec version: 1.0.0
*/
import
type
{
ApiResponse
}
from
'./apiResponse'
;
import
type
{
DeleteApiV10LogoId200AllOf
}
from
'./deleteApiV10LogoId200AllOf'
;
export
type
DeleteApiV10LogoId200
=
ApiResponse
&
DeleteApiV10LogoId200AllOf
;
src/api/models/deleteApiV10LogoId200AllOf.ts
0 → 100644
View file @
b3589a95
/**
* Generated by orval v8.0.0-rc.0 🍺
* Do not edit manually.
* VietProDev CMS Backend API
* Generated API documentation
* OpenAPI spec version: 1.0.0
*/
export
type
DeleteApiV10LogoId200AllOf
=
{
responseData
?:
boolean
;
};
src/api/models/filtersMutateParameter.ts
View file @
b3589a95
/**
* Generated by orval v8.0.0-rc.0 🍺
* Do not edit manually.
*
Backend Template
*
Coded by Meu TEAM
*
VietProDev CMS Backend API
*
Generated API documentation
* OpenAPI spec version: 1.0.0
*/
...
...
src/api/models/filtersParameter.ts
View file @
b3589a95
/**
* Generated by orval v8.0.0-rc.0 🍺
* Do not edit manually.
*
Backend Template
*
Coded by Meu TEAM
*
VietProDev CMS Backend API
*
Generated API documentation
* OpenAPI spec version: 1.0.0
*/
...
...
src/api/models/forgotPasswordResetRequest.ts
View file @
b3589a95
/**
* Generated by orval v8.0.0-rc.0 🍺
* Do not edit manually.
*
Backend Template
*
Coded by Meu TEAM
*
VietProDev CMS Backend API
*
Generated API documentation
* OpenAPI spec version: 1.0.0
*/
...
...
src/api/models/forgotPasswordSendOtpRequest.ts
View file @
b3589a95
/**
* Generated by orval v8.0.0-rc.0 🍺
* Do not edit manually.
*
Backend Template
*
Coded by Meu TEAM
*
VietProDev CMS Backend API
*
Generated API documentation
* OpenAPI spec version: 1.0.0
*/
...
...
src/api/models/forgotPasswordVerifyOtpRequest.ts
View file @
b3589a95
/**
* Generated by orval v8.0.0-rc.0 🍺
* Do not edit manually.
*
Backend Template
*
Coded by Meu TEAM
*
VietProDev CMS Backend API
*
Generated API documentation
* OpenAPI spec version: 1.0.0
*/
...
...
src/api/models/forgotPasswordVerifyOtpResponse.ts
View file @
b3589a95
/**
* Generated by orval v8.0.0-rc.0 🍺
* Do not edit manually.
*
Backend Template
*
Coded by Meu TEAM
*
VietProDev CMS Backend API
*
Generated API documentation
* OpenAPI spec version: 1.0.0
*/
...
...
src/api/models/getApiV10BannerId200.ts
0 → 100644
View file @
b3589a95
/**
* Generated by orval v8.0.0-rc.0 🍺
* Do not edit manually.
* VietProDev CMS Backend API
* Generated API documentation
* OpenAPI spec version: 1.0.0
*/
import
type
{
ApiResponse
}
from
'./apiResponse'
;
import
type
{
GetApiV10BannerId200AllOf
}
from
'./getApiV10BannerId200AllOf'
;
export
type
GetApiV10BannerId200
=
ApiResponse
&
GetApiV10BannerId200AllOf
;
src/api/models/getApiV10BannerId200AllOf.ts
0 → 100644
View file @
b3589a95
/**
* Generated by orval v8.0.0-rc.0 🍺
* Do not edit manually.
* VietProDev CMS Backend API
* Generated API documentation
* OpenAPI spec version: 1.0.0
*/
import
type
{
Banner
}
from
'./banner'
;
export
type
GetApiV10BannerId200AllOf
=
{
responseData
?:
Banner
;
};
src/api/models/getApiV10BannerParams.ts
0 → 100644
View file @
b3589a95
/**
* Generated by orval v8.0.0-rc.0 🍺
* Do not edit manually.
* VietProDev CMS Backend API
* Generated API documentation
* OpenAPI spec version: 1.0.0
*/
import
type
{
FiltersParameter
}
from
'./filtersParameter'
;
import
type
{
SortFieldParameter
}
from
'./sortFieldParameter'
;
import
type
{
SortOrderParameter
}
from
'./sortOrderParameter'
;
import
type
{
PageParameter
}
from
'./pageParameter'
;
import
type
{
PageSizeParameter
}
from
'./pageSizeParameter'
;
export
type
GetApiV10BannerParams
=
{
/**
* filter, visit https://www.npmjs.com/package/sequelize-api-paginate for syntax
*/
filters
?:
FiltersParameter
;
/**
* sortField, visit https://www.npmjs.com/package/sequelize-api-paginate for syntax
*/
sortField
?:
SortFieldParameter
;
/**
* sort order, visit https://www.npmjs.com/package/sequelize-api-paginate for syntax
*/
sortOrder
?:
SortOrderParameter
;
/**
* page, visit https://www.npmjs.com/package/sequelize-api-paginate for syntax
* @minimum 1
*/
page
?:
PageParameter
;
/**
* pageSize, visit https://www.npmjs.com/package/sequelize-api-paginate for syntax
* @minimum 1
*/
pageSize
?:
PageSizeParameter
;
};
src/api/models/getApiV10LogoId200.ts
0 → 100644
View file @
b3589a95
/**
* Generated by orval v8.0.0-rc.0 🍺
* Do not edit manually.
* VietProDev CMS Backend API
* Generated API documentation
* OpenAPI spec version: 1.0.0
*/
import
type
{
ApiResponse
}
from
'./apiResponse'
;
import
type
{
GetApiV10LogoId200AllOf
}
from
'./getApiV10LogoId200AllOf'
;
export
type
GetApiV10LogoId200
=
ApiResponse
&
GetApiV10LogoId200AllOf
;
src/api/models/getApiV10LogoId200AllOf.ts
0 → 100644
View file @
b3589a95
/**
* Generated by orval v8.0.0-rc.0 🍺
* Do not edit manually.
* VietProDev CMS Backend API
* Generated API documentation
* OpenAPI spec version: 1.0.0
*/
import
type
{
Logo
}
from
'./logo'
;
export
type
GetApiV10LogoId200AllOf
=
{
responseData
?:
Logo
;
};
src/api/models/getApiV10LogoParams.ts
0 → 100644
View file @
b3589a95
/**
* Generated by orval v8.0.0-rc.0 🍺
* Do not edit manually.
* VietProDev CMS Backend API
* Generated API documentation
* OpenAPI spec version: 1.0.0
*/
import
type
{
FiltersParameter
}
from
'./filtersParameter'
;
import
type
{
SortFieldParameter
}
from
'./sortFieldParameter'
;
import
type
{
SortOrderParameter
}
from
'./sortOrderParameter'
;
import
type
{
PageParameter
}
from
'./pageParameter'
;
import
type
{
PageSizeParameter
}
from
'./pageSizeParameter'
;
export
type
GetApiV10LogoParams
=
{
/**
* filter, visit https://www.npmjs.com/package/sequelize-api-paginate for syntax
*/
filters
?:
FiltersParameter
;
/**
* sortField, visit https://www.npmjs.com/package/sequelize-api-paginate for syntax
*/
sortField
?:
SortFieldParameter
;
/**
* sort order, visit https://www.npmjs.com/package/sequelize-api-paginate for syntax
*/
sortOrder
?:
SortOrderParameter
;
/**
* page, visit https://www.npmjs.com/package/sequelize-api-paginate for syntax
* @minimum 1
*/
page
?:
PageParameter
;
/**
* pageSize, visit https://www.npmjs.com/package/sequelize-api-paginate for syntax
* @minimum 1
*/
pageSize
?:
PageSizeParameter
;
};
src/api/models/index.ts
View file @
b3589a95
/**
* Generated by orval v8.0.0-rc.0 🍺
* Do not edit manually.
*
Backend Template
*
Coded by Meu TEAM
*
VietProDev CMS Backend API
*
Generated API documentation
* OpenAPI spec version: 1.0.0
*/
...
...
@@ -17,7 +17,12 @@ export * from './badRequestResponseErrorMessage';
export
*
from
'./badRequestResponseResponseData'
;
export
*
from
'./badRequestResponseViolationItem'
;
export
*
from
'./banner'
;
export
*
from
'./bannerCreate'
;
export
*
from
'./bannerCreateStatus'
;
export
*
from
'./bannerMutate'
;
export
*
from
'./bannerStatus'
;
export
*
from
'./bannerUpdate'
;
export
*
from
'./bannerUpdateStatus'
;
export
*
from
'./business'
;
export
*
from
'./businessCreate'
;
export
*
from
'./businessDeleteResponse'
;
...
...
@@ -40,10 +45,14 @@ export * from './categoryTagMutate';
export
*
from
'./categoryThumbnail'
;
export
*
from
'./contact'
;
export
*
from
'./contactMutate'
;
export
*
from
'./deleteApiV10BannerId200'
;
export
*
from
'./deleteApiV10BannerId200AllOf'
;
export
*
from
'./deleteApiV10CategoryId200'
;
export
*
from
'./deleteApiV10CategoryId200AllOf'
;
export
*
from
'./deleteApiV10ContactId200'
;
export
*
from
'./deleteApiV10ContactId200AllOf'
;
export
*
from
'./deleteApiV10LogoId200'
;
export
*
from
'./deleteApiV10LogoId200AllOf'
;
export
*
from
'./deleteApprovalParams'
;
export
*
from
'./deleteBannerId200'
;
export
*
from
'./deleteBannerId200AllOf'
;
...
...
@@ -93,12 +102,18 @@ export * from './forgotPasswordResetRequest';
export
*
from
'./forgotPasswordSendOtpRequest'
;
export
*
from
'./forgotPasswordVerifyOtpRequest'
;
export
*
from
'./forgotPasswordVerifyOtpResponse'
;
export
*
from
'./getApiV10BannerId200'
;
export
*
from
'./getApiV10BannerId200AllOf'
;
export
*
from
'./getApiV10BannerParams'
;
export
*
from
'./getApiV10CategoryId200'
;
export
*
from
'./getApiV10CategoryId200AllOf'
;
export
*
from
'./getApiV10CategoryParams'
;
export
*
from
'./getApiV10ContactId200'
;
export
*
from
'./getApiV10ContactId200AllOf'
;
export
*
from
'./getApiV10ContactParams'
;
export
*
from
'./getApiV10LogoId200'
;
export
*
from
'./getApiV10LogoId200AllOf'
;
export
*
from
'./getApiV10LogoParams'
;
export
*
from
'./getApiV10NewsletterSubscriptionParams'
;
export
*
from
'./getApiV10PageConfigParams'
;
export
*
from
'./getApiV10SiteInformation200'
;
...
...
@@ -261,10 +276,14 @@ export * from './permissionUpdate';
export
*
from
'./position'
;
export
*
from
'./positionMutate'
;
export
*
from
'./post'
;
export
*
from
'./postApiV10Banner200'
;
export
*
from
'./postApiV10Banner200AllOf'
;
export
*
from
'./postApiV10Category200'
;
export
*
from
'./postApiV10Category200AllOf'
;
export
*
from
'./postApiV10Contact200'
;
export
*
from
'./postApiV10Contact200AllOf'
;
export
*
from
'./postApiV10Logo200'
;
export
*
from
'./postApiV10Logo200AllOf'
;
export
*
from
'./postApiV10NewsletterSubscription200'
;
export
*
from
'./postApiV10NewsletterSubscription200AllOf'
;
export
*
from
'./postApiV10PageConfigBody'
;
...
...
@@ -312,10 +331,14 @@ export * from './postUsersFavoriteAddParams';
export
*
from
'./postValidatorOrgCodeBody'
;
export
*
from
'./postVideo200'
;
export
*
from
'./postVideo200AllOf'
;
export
*
from
'./putApiV10BannerId200'
;
export
*
from
'./putApiV10BannerId200AllOf'
;
export
*
from
'./putApiV10CategoryId200'
;
export
*
from
'./putApiV10CategoryId200AllOf'
;
export
*
from
'./putApiV10ContactId200'
;
export
*
from
'./putApiV10ContactId200AllOf'
;
export
*
from
'./putApiV10LogoId200'
;
export
*
from
'./putApiV10LogoId200AllOf'
;
export
*
from
'./putApiV10PageConfigIdBody'
;
export
*
from
'./putApiV10SiteInformation200'
;
export
*
from
'./putApiV10SiteInformation200AllOf'
;
...
...
src/api/models/loginRequest.ts
View file @
b3589a95
/**
* Generated by orval v8.0.0-rc.0 🍺
* Do not edit manually.
*
Backend Template
*
Coded by Meu TEAM
*
VietProDev CMS Backend API
*
Generated API documentation
* OpenAPI spec version: 1.0.0
*/
import
type
{
LoginRequestDeviceInfo
}
from
'./loginRequestDeviceInfo'
;
...
...
src/api/models/loginRequestDeviceInfo.ts
View file @
b3589a95
/**
* Generated by orval v8.0.0-rc.0 🍺
* Do not edit manually.
*
Backend Template
*
Coded by Meu TEAM
*
VietProDev CMS Backend API
*
Generated API documentation
* OpenAPI spec version: 1.0.0
*/
...
...
src/api/models/loginResponse.ts
View file @
b3589a95
/**
* Generated by orval v8.0.0-rc.0 🍺
* Do not edit manually.
*
Backend Template
*
Coded by Meu TEAM
*
VietProDev CMS Backend API
*
Generated API documentation
* OpenAPI spec version: 1.0.0
*/
...
...
src/api/models/memberCreate.ts
View file @
b3589a95
/**
* Generated by orval v8.0.0-rc.0 🍺
* Do not edit manually.
*
Backend Template
*
Coded by Meu TEAM
*
VietProDev CMS Backend API
*
Generated API documentation
* OpenAPI spec version: 1.0.0
*/
...
...
src/api/models/memberImportResponse.ts
View file @
b3589a95
/**
* Generated by orval v8.0.0-rc.0 🍺
* Do not edit manually.
*
Backend Template
*
Coded by Meu TEAM
*
VietProDev CMS Backend API
*
Generated API documentation
* OpenAPI spec version: 1.0.0
*/
import
type
{
MemberImportWarningItem
}
from
'./memberImportWarningItem'
;
...
...
src/api/models/memberImportWarningItem.ts
View file @
b3589a95
/**
* Generated by orval v8.0.0-rc.0 🍺
* Do not edit manually.
*
Backend Template
*
Coded by Meu TEAM
*
VietProDev CMS Backend API
*
Generated API documentation
* OpenAPI spec version: 1.0.0
*/
...
...
src/api/models/memberUpdate.ts
View file @
b3589a95
/**
* Generated by orval v8.0.0-rc.0 🍺
* Do not edit manually.
*
Backend Template
*
Coded by Meu TEAM
*
VietProDev CMS Backend API
*
Generated API documentation
* OpenAPI spec version: 1.0.0
*/
...
...
src/api/models/newsletterSubscription.ts
View file @
b3589a95
/**
* Generated by orval v8.0.0-rc.0 🍺
* Do not edit manually.
*
Backend Template
*
Coded by Meu TEAM
*
VietProDev CMS Backend API
*
Generated API documentation
* OpenAPI spec version: 1.0.0
*/
...
...
src/api/models/newsletterSubscriptionMutate.ts
View file @
b3589a95
/**
* Generated by orval v8.0.0-rc.0 🍺
* Do not edit manually.
*
Backend Template
*
Coded by Meu TEAM
*
VietProDev CMS Backend API
*
Generated API documentation
* OpenAPI spec version: 1.0.0
*/
...
...
src/api/models/newsletterSubscriptionUpdate.ts
View file @
b3589a95
/**
* Generated by orval v8.0.0-rc.0 🍺
* Do not edit manually.
*
Backend Template
*
Coded by Meu TEAM
*
VietProDev CMS Backend API
*
Generated API documentation
* OpenAPI spec version: 1.0.0
*/
...
...
src/api/models/pageParameter.ts
View file @
b3589a95
/**
* Generated by orval v8.0.0-rc.0 🍺
* Do not edit manually.
*
Backend Template
*
Coded by Meu TEAM
*
VietProDev CMS Backend API
*
Generated API documentation
* OpenAPI spec version: 1.0.0
*/
...
...
src/api/models/pageSizeParameter.ts
View file @
b3589a95
/**
* Generated by orval v8.0.0-rc.0 🍺
* Do not edit manually.
*
Backend Template
*
Coded by Meu TEAM
*
VietProDev CMS Backend API
*
Generated API documentation
* OpenAPI spec version: 1.0.0
*/
...
...
src/api/models/permission.ts
View file @
b3589a95
/**
* Generated by orval v8.0.0-rc.0 🍺
* Do not edit manually.
*
Backend Template
*
Coded by Meu TEAM
*
VietProDev CMS Backend API
*
Generated API documentation
* OpenAPI spec version: 1.0.0
*/
...
...
src/api/models/permissionBulkCreate.ts
View file @
b3589a95
/**
* Generated by orval v8.0.0-rc.0 🍺
* Do not edit manually.
*
Backend Template
*
Coded by Meu TEAM
*
VietProDev CMS Backend API
*
Generated API documentation
* OpenAPI spec version: 1.0.0
*/
import
type
{
PermissionCreate
}
from
'./permissionCreate'
;
...
...
src/api/models/permissionBulkDelete.ts
View file @
b3589a95
/**
* Generated by orval v8.0.0-rc.0 🍺
* Do not edit manually.
*
Backend Template
*
Coded by Meu TEAM
*
VietProDev CMS Backend API
*
Generated API documentation
* OpenAPI spec version: 1.0.0
*/
...
...
src/api/models/permissionCreate.ts
View file @
b3589a95
/**
* Generated by orval v8.0.0-rc.0 🍺
* Do not edit manually.
*
Backend Template
*
Coded by Meu TEAM
*
VietProDev CMS Backend API
*
Generated API documentation
* OpenAPI spec version: 1.0.0
*/
...
...
src/api/models/permissionMutate.ts
View file @
b3589a95
/**
* Generated by orval v8.0.0-rc.0 🍺
* Do not edit manually.
*
Backend Template
*
Coded by Meu TEAM
*
VietProDev CMS Backend API
*
Generated API documentation
* OpenAPI spec version: 1.0.0
*/
import
type
{
PermissionCreate
}
from
'./permissionCreate'
;
...
...
src/api/models/permissionUpdate.ts
View file @
b3589a95
/**
* Generated by orval v8.0.0-rc.0 🍺
* Do not edit manually.
*
Backend Template
*
Coded by Meu TEAM
*
VietProDev CMS Backend API
*
Generated API documentation
* OpenAPI spec version: 1.0.0
*/
...
...
src/api/models/postApiV10Banner200.ts
0 → 100644
View file @
b3589a95
/**
* Generated by orval v8.0.0-rc.0 🍺
* Do not edit manually.
* VietProDev CMS Backend API
* Generated API documentation
* OpenAPI spec version: 1.0.0
*/
import
type
{
ApiResponse
}
from
'./apiResponse'
;
import
type
{
PostApiV10Banner200AllOf
}
from
'./postApiV10Banner200AllOf'
;
export
type
PostApiV10Banner200
=
ApiResponse
&
PostApiV10Banner200AllOf
;
src/api/models/postApiV10Banner200AllOf.ts
0 → 100644
View file @
b3589a95
/**
* Generated by orval v8.0.0-rc.0 🍺
* Do not edit manually.
* VietProDev CMS Backend API
* Generated API documentation
* OpenAPI spec version: 1.0.0
*/
import
type
{
Banner
}
from
'./banner'
;
export
type
PostApiV10Banner200AllOf
=
{
responseData
?:
Banner
;
};
src/api/models/postApiV10Logo200.ts
0 → 100644
View file @
b3589a95
/**
* Generated by orval v8.0.0-rc.0 🍺
* Do not edit manually.
* VietProDev CMS Backend API
* Generated API documentation
* OpenAPI spec version: 1.0.0
*/
import
type
{
ApiResponse
}
from
'./apiResponse'
;
import
type
{
PostApiV10Logo200AllOf
}
from
'./postApiV10Logo200AllOf'
;
export
type
PostApiV10Logo200
=
ApiResponse
&
PostApiV10Logo200AllOf
;
src/api/models/postApiV10Logo200AllOf.ts
0 → 100644
View file @
b3589a95
/**
* Generated by orval v8.0.0-rc.0 🍺
* Do not edit manually.
* VietProDev CMS Backend API
* Generated API documentation
* OpenAPI spec version: 1.0.0
*/
import
type
{
Logo
}
from
'./logo'
;
export
type
PostApiV10Logo200AllOf
=
{
responseData
?:
Logo
;
};
src/api/models/putApiV10BannerId200.ts
0 → 100644
View file @
b3589a95
/**
* Generated by orval v8.0.0-rc.0 🍺
* Do not edit manually.
* VietProDev CMS Backend API
* Generated API documentation
* OpenAPI spec version: 1.0.0
*/
import
type
{
ApiResponse
}
from
'./apiResponse'
;
import
type
{
PutApiV10BannerId200AllOf
}
from
'./putApiV10BannerId200AllOf'
;
export
type
PutApiV10BannerId200
=
ApiResponse
&
PutApiV10BannerId200AllOf
;
src/api/models/putApiV10BannerId200AllOf.ts
0 → 100644
View file @
b3589a95
/**
* Generated by orval v8.0.0-rc.0 🍺
* Do not edit manually.
* VietProDev CMS Backend API
* Generated API documentation
* OpenAPI spec version: 1.0.0
*/
import
type
{
Banner
}
from
'./banner'
;
export
type
PutApiV10BannerId200AllOf
=
{
responseData
?:
Banner
;
};
src/api/models/putApiV10LogoId200.ts
0 → 100644
View file @
b3589a95
/**
* Generated by orval v8.0.0-rc.0 🍺
* Do not edit manually.
* VietProDev CMS Backend API
* Generated API documentation
* OpenAPI spec version: 1.0.0
*/
import
type
{
ApiResponse
}
from
'./apiResponse'
;
import
type
{
PutApiV10LogoId200AllOf
}
from
'./putApiV10LogoId200AllOf'
;
export
type
PutApiV10LogoId200
=
ApiResponse
&
PutApiV10LogoId200AllOf
;
src/api/models/putApiV10LogoId200AllOf.ts
0 → 100644
View file @
b3589a95
/**
* Generated by orval v8.0.0-rc.0 🍺
* Do not edit manually.
* VietProDev CMS Backend API
* Generated API documentation
* OpenAPI spec version: 1.0.0
*/
import
type
{
Logo
}
from
'./logo'
;
export
type
PutApiV10LogoId200AllOf
=
{
responseData
?:
Logo
;
};
src/api/models/response.ts
View file @
b3589a95
/**
* Generated by orval v8.0.0-rc.0 🍺
* Do not edit manually.
*
Backend Template
*
Coded by Meu TEAM
*
VietProDev CMS Backend API
*
Generated API documentation
* OpenAPI spec version: 1.0.0
*/
import
type
{
ResponseResponseData
}
from
'./responseResponseData'
;
...
...
src/api/models/responseGetAllData.ts
View file @
b3589a95
/**
* Generated by orval v8.0.0-rc.0 🍺
* Do not edit manually.
*
Backend Template
*
Coded by Meu TEAM
*
VietProDev CMS Backend API
*
Generated API documentation
* OpenAPI spec version: 1.0.0
*/
import
type
{
Response
}
from
'./response'
;
...
...
src/api/models/responseGetAllDataAllOf.ts
View file @
b3589a95
/**
* Generated by orval v8.0.0-rc.0 🍺
* Do not edit manually.
*
Backend Template
*
Coded by Meu TEAM
*
VietProDev CMS Backend API
*
Generated API documentation
* OpenAPI spec version: 1.0.0
*/
import
type
{
ResponseGetAllDataAllOfResponseData
}
from
'./responseGetAllDataAllOfResponseData'
;
...
...
src/api/models/responseGetAllDataAllOfResponseData.ts
View file @
b3589a95
/**
* Generated by orval v8.0.0-rc.0 🍺
* Do not edit manually.
*
Backend Template
*
Coded by Meu TEAM
*
VietProDev CMS Backend API
*
Generated API documentation
* OpenAPI spec version: 1.0.0
*/
import
type
{
ResponseGetAllDataAllOfResponseDataRowsItem
}
from
'./responseGetAllDataAllOfResponseDataRowsItem'
;
...
...
src/api/models/responseGetAllDataAllOfResponseDataRowsItem.ts
View file @
b3589a95
/**
* Generated by orval v8.0.0-rc.0 🍺
* Do not edit manually.
*
Backend Template
*
Coded by Meu TEAM
*
VietProDev CMS Backend API
*
Generated API documentation
* OpenAPI spec version: 1.0.0
*/
...
...
src/api/models/responseResponseData.ts
View file @
b3589a95
/**
* Generated by orval v8.0.0-rc.0 🍺
* Do not edit manually.
*
Backend Template
*
Coded by Meu TEAM
*
VietProDev CMS Backend API
*
Generated API documentation
* OpenAPI spec version: 1.0.0
*/
...
...
src/api/models/responseViolationItem.ts
View file @
b3589a95
/**
* Generated by orval v8.0.0-rc.0 🍺
* Do not edit manually.
*
Backend Template
*
Coded by Meu TEAM
*
VietProDev CMS Backend API
*
Generated API documentation
* OpenAPI spec version: 1.0.0
*/
...
...
src/api/models/role.ts
View file @
b3589a95
/**
* Generated by orval v8.0.0-rc.0 🍺
* Do not edit manually.
*
Backend Template
*
Coded by Meu TEAM
*
VietProDev CMS Backend API
*
Generated API documentation
* OpenAPI spec version: 1.0.0
*/
...
...
src/api/models/roleBulkCreate.ts
View file @
b3589a95
/**
* Generated by orval v8.0.0-rc.0 🍺
* Do not edit manually.
*
Backend Template
*
Coded by Meu TEAM
*
VietProDev CMS Backend API
*
Generated API documentation
* OpenAPI spec version: 1.0.0
*/
import
type
{
RoleCreate
}
from
'./roleCreate'
;
...
...
src/api/models/roleBulkDelete.ts
View file @
b3589a95
/**
* Generated by orval v8.0.0-rc.0 🍺
* Do not edit manually.
*
Backend Template
*
Coded by Meu TEAM
*
VietProDev CMS Backend API
*
Generated API documentation
* OpenAPI spec version: 1.0.0
*/
...
...
src/api/models/roleCreate.ts
View file @
b3589a95
/**
* Generated by orval v8.0.0-rc.0 🍺
* Do not edit manually.
*
Backend Template
*
Coded by Meu TEAM
*
VietProDev CMS Backend API
*
Generated API documentation
* OpenAPI spec version: 1.0.0
*/
...
...
src/api/models/rolePermission.ts
View file @
b3589a95
/**
* Generated by orval v8.0.0-rc.0 🍺
* Do not edit manually.
*
Backend Template
*
Coded by Meu TEAM
*
VietProDev CMS Backend API
*
Generated API documentation
* OpenAPI spec version: 1.0.0
*/
...
...
src/api/models/rolePermissionBulkCreateByRole.ts
View file @
b3589a95
/**
* Generated by orval v8.0.0-rc.0 🍺
* Do not edit manually.
*
Backend Template
*
Coded by Meu TEAM
*
VietProDev CMS Backend API
*
Generated API documentation
* OpenAPI spec version: 1.0.0
*/
...
...
src/api/models/rolePermissionBulkDelete.ts
View file @
b3589a95
/**
* Generated by orval v8.0.0-rc.0 🍺
* Do not edit manually.
*
Backend Template
*
Coded by Meu TEAM
*
VietProDev CMS Backend API
*
Generated API documentation
* OpenAPI spec version: 1.0.0
*/
...
...
src/api/models/roleUpdate.ts
View file @
b3589a95
/**
* Generated by orval v8.0.0-rc.0 🍺
* Do not edit manually.
*
Backend Template
*
Coded by Meu TEAM
*
VietProDev CMS Backend API
*
Generated API documentation
* OpenAPI spec version: 1.0.0
*/
...
...
src/api/models/siteInformationBranch.ts
View file @
b3589a95
/**
* Generated by orval v8.0.0-rc.0 🍺
* Do not edit manually.
*
Backend Template
*
Coded by Meu TEAM
*
VietProDev CMS Backend API
*
Generated API documentation
* OpenAPI spec version: 1.0.0
*/
...
...
src/api/models/siteInformationBranchMutate.ts
View file @
b3589a95
/**
* Generated by orval v8.0.0-rc.0 🍺
* Do not edit manually.
*
Backend Template
*
Coded by Meu TEAM
*
VietProDev CMS Backend API
*
Generated API documentation
* OpenAPI spec version: 1.0.0
*/
...
...
src/api/models/siteInformationData.ts
View file @
b3589a95
/**
* Generated by orval v8.0.0-rc.0 🍺
* Do not edit manually.
*
Backend Template
*
Coded by Meu TEAM
*
VietProDev CMS Backend API
*
Generated API documentation
* OpenAPI spec version: 1.0.0
*/
import
type
{
SiteInformationDataLogo
}
from
'./siteInformationDataLogo'
;
...
...
src/api/models/siteInformationDataLogo.ts
View file @
b3589a95
/**
* Generated by orval v8.0.0-rc.0 🍺
* Do not edit manually.
*
Backend Template
*
Coded by Meu TEAM
*
VietProDev CMS Backend API
*
Generated API documentation
* OpenAPI spec version: 1.0.0
*/
import
type
{
Logo
}
from
'./logo'
;
...
...
src/api/models/siteInformationResponse.ts
View file @
b3589a95
/**
* Generated by orval v8.0.0-rc.0 🍺
* Do not edit manually.
*
Backend Template
*
Coded by Meu TEAM
*
VietProDev CMS Backend API
*
Generated API documentation
* OpenAPI spec version: 1.0.0
*/
import
type
{
ApiResponse
}
from
'./apiResponse'
;
...
...
src/api/models/siteInformationResponseAllOf.ts
View file @
b3589a95
/**
* Generated by orval v8.0.0-rc.0 🍺
* Do not edit manually.
*
Backend Template
*
Coded by Meu TEAM
*
VietProDev CMS Backend API
*
Generated API documentation
* OpenAPI spec version: 1.0.0
*/
import
type
{
SiteInformationData
}
from
'./siteInformationData'
;
...
...
src/api/models/siteInformationSocialLink.ts
View file @
b3589a95
/**
* Generated by orval v8.0.0-rc.0 🍺
* Do not edit manually.
*
Backend Template
*
Coded by Meu TEAM
*
VietProDev CMS Backend API
*
Generated API documentation
* OpenAPI spec version: 1.0.0
*/
...
...
src/api/models/siteInformationSocialMutate.ts
View file @
b3589a95
/**
* Generated by orval v8.0.0-rc.0 🍺
* Do not edit manually.
*
Backend Template
*
Coded by Meu TEAM
*
VietProDev CMS Backend API
*
Generated API documentation
* OpenAPI spec version: 1.0.0
*/
...
...
src/api/models/siteInformationUpdateBody.ts
View file @
b3589a95
/**
* Generated by orval v8.0.0-rc.0 🍺
* Do not edit manually.
*
Backend Template
*
Coded by Meu TEAM
*
VietProDev CMS Backend API
*
Generated API documentation
* OpenAPI spec version: 1.0.0
*/
import
type
{
SiteInformationSocialLink
}
from
'./siteInformationSocialLink'
;
...
...
src/api/models/sortFieldParameter.ts
View file @
b3589a95
/**
* Generated by orval v8.0.0-rc.0 🍺
* Do not edit manually.
*
Backend Template
*
Coded by Meu TEAM
*
VietProDev CMS Backend API
*
Generated API documentation
* OpenAPI spec version: 1.0.0
*/
...
...
src/api/models/sortOrderParameter.ts
View file @
b3589a95
/**
* Generated by orval v8.0.0-rc.0 🍺
* Do not edit manually.
*
Backend Template
*
Coded by Meu TEAM
*
VietProDev CMS Backend API
*
Generated API documentation
* OpenAPI spec version: 1.0.0
*/
...
...
src/api/models/termCreateRequest.ts
View file @
b3589a95
/**
* Generated by orval v8.0.0-rc.0 🍺
* Do not edit manually.
*
Backend Template
*
Coded by Meu TEAM
*
VietProDev CMS Backend API
*
Generated API documentation
* OpenAPI spec version: 1.0.0
*/
import
type
{
TermPositionRequestItem
}
from
'./termPositionRequestItem'
;
...
...
src/api/models/termMember.ts
View file @
b3589a95
/**
* Generated by orval v8.0.0-rc.0 🍺
* Do not edit manually.
*
Backend Template
*
Coded by Meu TEAM
*
VietProDev CMS Backend API
*
Generated API documentation
* OpenAPI spec version: 1.0.0
*/
import
type
{
TermMemberAvatarProperty
}
from
'./termMemberAvatarProperty'
;
...
...
src/api/models/termMemberAvatar.ts
View file @
b3589a95
/**
* Generated by orval v8.0.0-rc.0 🍺
* Do not edit manually.
*
Backend Template
*
Coded by Meu TEAM
*
VietProDev CMS Backend API
*
Generated API documentation
* OpenAPI spec version: 1.0.0
*/
...
...
src/api/models/termMemberAvatarProperty.ts
View file @
b3589a95
/**
* Generated by orval v8.0.0-rc.0 🍺
* Do not edit manually.
*
Backend Template
*
Coded by Meu TEAM
*
VietProDev CMS Backend API
*
Generated API documentation
* OpenAPI spec version: 1.0.0
*/
import
type
{
TermMemberAvatar
}
from
'./termMemberAvatar'
;
...
...
src/api/models/termPositionRequestItem.ts
View file @
b3589a95
/**
* Generated by orval v8.0.0-rc.0 🍺
* Do not edit manually.
*
Backend Template
*
Coded by Meu TEAM
*
VietProDev CMS Backend API
*
Generated API documentation
* OpenAPI spec version: 1.0.0
*/
...
...
src/api/models/termPositionResponse.ts
View file @
b3589a95
/**
* Generated by orval v8.0.0-rc.0 🍺
* Do not edit manually.
*
Backend Template
*
Coded by Meu TEAM
*
VietProDev CMS Backend API
*
Generated API documentation
* OpenAPI spec version: 1.0.0
*/
import
type
{
TermMember
}
from
'./termMember'
;
...
...
src/api/models/termResponse.ts
View file @
b3589a95
/**
* Generated by orval v8.0.0-rc.0 🍺
* Do not edit manually.
*
Backend Template
*
Coded by Meu TEAM
*
VietProDev CMS Backend API
*
Generated API documentation
* OpenAPI spec version: 1.0.0
*/
import
type
{
TermPositionResponse
}
from
'./termPositionResponse'
;
...
...
src/api/models/termUpdateRequest.ts
View file @
b3589a95
/**
* Generated by orval v8.0.0-rc.0 🍺
* Do not edit manually.
*
Backend Template
*
Coded by Meu TEAM
*
VietProDev CMS Backend API
*
Generated API documentation
* OpenAPI spec version: 1.0.0
*/
import
type
{
TermPositionRequestItem
}
from
'./termPositionRequestItem'
;
...
...
src/api/models/unauthorizedResponse.ts
View file @
b3589a95
/**
* Generated by orval v8.0.0-rc.0 🍺
* Do not edit manually.
*
Backend Template
*
Coded by Meu TEAM
*
VietProDev CMS Backend API
*
Generated API documentation
* OpenAPI spec version: 1.0.0
*/
import
type
{
UnauthorizedResponseError
}
from
'./unauthorizedResponseError'
;
...
...
src/api/models/unauthorizedResponseError.ts
View file @
b3589a95
/**
* Generated by orval v8.0.0-rc.0 🍺
* Do not edit manually.
*
Backend Template
*
Coded by Meu TEAM
*
VietProDev CMS Backend API
*
Generated API documentation
* OpenAPI spec version: 1.0.0
*/
import
type
{
UnauthorizedResponseErrorMessage
}
from
'./unauthorizedResponseErrorMessage'
;
...
...
src/api/models/unauthorizedResponseErrorMessage.ts
View file @
b3589a95
/**
* Generated by orval v8.0.0-rc.0 🍺
* Do not edit manually.
*
Backend Template
*
Coded by Meu TEAM
*
VietProDev CMS Backend API
*
Generated API documentation
* OpenAPI spec version: 1.0.0
*/
...
...
src/api/models/unauthorizedResponseResponseData.ts
View file @
b3589a95
/**
* Generated by orval v8.0.0-rc.0 🍺
* Do not edit manually.
*
Backend Template
*
Coded by Meu TEAM
*
VietProDev CMS Backend API
*
Generated API documentation
* OpenAPI spec version: 1.0.0
*/
...
...
src/api/models/unauthorizedResponseViolationItem.ts
View file @
b3589a95
/**
* Generated by orval v8.0.0-rc.0 🍺
* Do not edit manually.
*
Backend Template
*
Coded by Meu TEAM
*
VietProDev CMS Backend API
*
Generated API documentation
* OpenAPI spec version: 1.0.0
*/
...
...
src/api/models/userMeResponse.ts
View file @
b3589a95
/**
* Generated by orval v8.0.0-rc.0 🍺
* Do not edit manually.
*
Backend Template
*
Coded by Meu TEAM
*
VietProDev CMS Backend API
*
Generated API documentation
* OpenAPI spec version: 1.0.0
*/
...
...
src/api/models/video.ts
View file @
b3589a95
/**
* Generated by orval v8.0.0-rc.0 🍺
* Do not edit manually.
*
Backend Template
*
Coded by Meu TEAM
*
VietProDev CMS Backend API
*
Generated API documentation
* OpenAPI spec version: 1.0.0
*/
...
...
src/api/models/videoMutate.ts
View file @
b3589a95
/**
* Generated by orval v8.0.0-rc.0 🍺
* Do not edit manually.
*
Backend Template
*
Coded by Meu TEAM
*
VietProDev CMS Backend API
*
Generated API documentation
* OpenAPI spec version: 1.0.0
*/
...
...
src/app/(main)/(home)/components/banner/index.tsx
View file @
b3589a95
...
...
@@ -7,7 +7,7 @@ import { Swiper as SwiperType } from "swiper/types";
import
{
useRef
}
from
"react"
;
import
"swiper/css"
;
import
{
getBanner
}
from
"@/api/endpoints/banner"
;
import
{
get
ApiV10
Banner
}
from
"@/api/endpoints/banner"
;
import
{
useQuery
}
from
"@tanstack/react-query"
;
import
{
resolveCmsFileUrl
}
from
"@/lib/api/files"
;
import
{
Skeleton
}
from
"@/components/ui/skeleton"
;
...
...
@@ -100,7 +100,7 @@ const Banner = () => {
const
{
data
:
bannerData
,
isPending
,
isError
}
=
useQuery
({
queryKey
:
[
"home-banner"
],
queryFn
:
()
=>
getBanner
({
get
ApiV10
Banner
({
filters
:
"status@=ACTIVE"
,
sortField
:
"display_order"
,
sortOrder
:
"asc"
,
...
...
src/app/(main)/_lib/layout/footer.tsx
View file @
b3589a95
...
...
@@ -15,7 +15,7 @@ import {
import
Link
from
"next/link"
;
import
{
useQuery
}
from
"@tanstack/react-query"
;
import
{
subscribeNewsletterEmail
}
from
"@/lib/api/newsletter-subscriptions"
;
import
{
getSiteInformation
}
from
"@/api/endpoints/site-information"
;
import
{
get
ApiV10
SiteInformation
}
from
"@/api/endpoints/site-information"
;
import
type
{
SiteInformationData
}
from
"@/api/models"
;
import
{
ZaloIcon
,
TiktokIcon
}
from
"@/components/ui/icons"
;
...
...
@@ -92,7 +92,7 @@ function Footer() {
const
{
data
:
siteInformationResponse
}
=
useQuery
<
ApiEnvelope
<
SiteInformationData
>
|
null
>
({
queryKey
:
[
"site-information"
],
queryFn
:
()
=>
getSiteInformation
().
catch
(()
=>
null
),
queryFn
:
()
=>
get
ApiV10
SiteInformation
().
catch
(()
=>
null
),
staleTime
:
5
*
60
*
1000
,
});
...
...
src/app/(main)/_lib/layout/header.tsx
View file @
b3589a95
...
...
@@ -7,8 +7,8 @@ import { useQuery } from "@tanstack/react-query";
import
Image
from
"next/image"
;
import
Link
from
"next/link"
;
import
logo
from
"@/assets/VCCI-HCM-logo-VN-2025.png"
;
import
{
useGetLogo
}
from
"@/api/endpoints/logo"
;
import
{
getSiteInformation
}
from
"@/api/endpoints/site-information"
;
import
{
useGet
ApiV10
Logo
}
from
"@/api/endpoints/logo"
;
import
{
get
ApiV10
SiteInformation
}
from
"@/api/endpoints/site-information"
;
import
{
resolveUploadUrl
}
from
"@/links"
;
import
type
{
Logo
}
from
"@/api/models/logo"
;
import
type
{
...
...
@@ -185,7 +185,7 @@ function Header() {
staleTime
:
5
*
60
*
1000
,
});
const
{
data
:
currentLogo
=
null
}
=
useGetLogo
(
const
{
data
:
currentLogo
=
null
}
=
useGet
ApiV10
Logo
(
{
page
:
1
,
pageSize
:
1
,
...
...
@@ -206,7 +206,7 @@ function Header() {
const
{
data
:
siteInformationResponse
}
=
useQuery
<
ApiEnvelope
<
SiteInformationData
>
|
null
>
({
queryKey
:
[
"site-information"
],
queryFn
:
()
=>
getSiteInformation
().
catch
(()
=>
null
),
queryFn
:
()
=>
get
ApiV10
SiteInformation
().
catch
(()
=>
null
),
staleTime
:
5
*
60
*
1000
,
});
...
...
src/app/admin/base-config/page.tsx
View file @
b3589a95
...
...
@@ -43,24 +43,24 @@ import { Switch } from "@/components/ui/switch";
import
{
Tabs
,
TabsContent
,
TabsList
,
TabsTrigger
}
from
"@/components/ui/tabs"
;
import
{
Textarea
}
from
"@/components/ui/textarea"
;
import
{
deleteSiteInformationBranchesId
,
getSiteInformation
,
patchSiteInformationBranchesId
,
patchSiteInformationSocialsId
,
postSiteInformationBranches
,
putSiteInformation
,
delete
ApiV10
SiteInformationBranchesId
,
get
ApiV10
SiteInformation
,
patch
ApiV10
SiteInformationBranchesId
,
patch
ApiV10
SiteInformationSocialsId
,
post
ApiV10
SiteInformationBranches
,
put
ApiV10
SiteInformation
,
}
from
"@/api/endpoints/site-information"
;
import
{
deleteLogoId
,
getLogo
,
postLogo
,
putLogoId
,
delete
ApiV10
LogoId
,
get
ApiV10
Logo
,
post
ApiV10
Logo
,
put
ApiV10
LogoId
,
}
from
"@/api/endpoints/logo"
;
import
{
deleteBannerId
,
getBanner
,
postBanner
,
putBannerId
,
delete
ApiV10
BannerId
,
get
ApiV10
Banner
,
post
ApiV10
Banner
,
put
ApiV10
BannerId
,
}
from
"@/api/endpoints/banner"
;
import
type
{
Banner
,
...
...
@@ -567,8 +567,8 @@ export default function AdminBaseConfigPage() {
const
loadSiteInformation
=
async
()
=>
{
try
{
const
[
siteInformationResponse
,
logoResponse
]
=
await
Promise
.
all
([
getSiteInformation
(),
getLogo
({
get
ApiV10
SiteInformation
(),
get
ApiV10
Logo
({
page
:
1
,
pageSize
:
1
,
sortField
:
"updated_at"
,
...
...
@@ -635,7 +635,7 @@ export default function AdminBaseConfigPage() {
const
loadBanners
=
async
()
=>
{
try
{
const
response
=
await
getBanner
({
const
response
=
await
get
ApiV10
Banner
({
page
:
1
,
pageSize
:
100
,
sortField
:
"display_order"
,
...
...
@@ -776,12 +776,12 @@ export default function AdminBaseConfigPage() {
try
{
const
response
=
currentLogoId
?
await
putLogoId
(
currentLogoId
,
{
?
await
put
ApiV10
LogoId
(
currentLogoId
,
{
logo_name
:
trimmedName
,
logo_url
:
selectedMedia
?.
url
??
null
,
file_id
:
itemForm
.
imageId
,
})
:
await
postLogo
({
:
await
post
ApiV10
Logo
({
logo_name
:
trimmedName
,
logo_url
:
selectedMedia
?.
url
??
null
,
file_id
:
itemForm
.
imageId
,
...
...
@@ -821,8 +821,8 @@ export default function AdminBaseConfigPage() {
try
{
const
response
=
editingItemId
?
await
putBannerId
(
editingItemId
,
mapConfigBannerToApi
(
bannerDraft
))
:
await
postBanner
(
mapConfigBannerToApi
(
bannerDraft
));
?
await
put
ApiV10
BannerId
(
editingItemId
,
mapConfigBannerToApi
(
bannerDraft
))
:
await
post
ApiV10
Banner
(
mapConfigBannerToApi
(
bannerDraft
));
const
savedBanner
=
getEnvelopeData
<
Banner
>
(
response
);
const
nextBanner
=
savedBanner
?
mapApiBannerToConfig
(
savedBanner
)
...
...
@@ -890,7 +890,7 @@ export default function AdminBaseConfigPage() {
if
(
deleteTarget
.
mode
===
"logo"
)
{
try
{
await
deleteLogoId
(
deleteTarget
.
id
);
await
delete
ApiV10
LogoId
(
deleteTarget
.
id
);
nextConfig
.
logo
=
null
;
queryClient
.
invalidateQueries
({
queryKey
:
[
"/logo"
]
});
}
catch
(
error
)
{
...
...
@@ -900,7 +900,7 @@ export default function AdminBaseConfigPage() {
return
;
}
}
else
{
await
deleteBannerId
(
deleteTarget
.
id
);
await
delete
ApiV10
BannerId
(
deleteTarget
.
id
);
nextConfig
.
banners
=
nextConfig
.
banners
.
filter
(
(
item
)
=>
item
.
id
!==
deleteTarget
.
id
,
);
...
...
@@ -987,7 +987,7 @@ export default function AdminBaseConfigPage() {
setSavingContact
(
true
);
try
{
const
response
=
await
postSiteInformationBranches
({
const
response
=
await
post
ApiV10
SiteInformationBranches
({
branch_name
:
`Chi nhánh ${config.branches.length + 1}`
,
sort_order
:
config
.
branches
.
length
+
1
,
is_active
:
true
,
...
...
@@ -1027,7 +1027,7 @@ export default function AdminBaseConfigPage() {
setSavingContact
(
true
);
try
{
await
deleteSiteInformationBranchesId
(
branchId
);
await
delete
ApiV10
SiteInformationBranchesId
(
branchId
);
const
nextConfig
=
cloneBaseConfigData
(
config
);
nextConfig
.
branches
=
nextConfig
.
branches
.
filter
(
...
...
@@ -1057,7 +1057,7 @@ export default function AdminBaseConfigPage() {
try
{
await
Promise
.
all
(
sortBaseConfigBranches
(
config
.
branches
).
map
((
branch
,
index
)
=>
patchSiteInformationBranchesId
(
patch
ApiV10
SiteInformationBranchesId
(
branch
.
id
,
mapConfigBranchToApi
(
branch
,
index
),
),
...
...
@@ -1087,7 +1087,7 @@ export default function AdminBaseConfigPage() {
setSavingWebsiteInfo
(
true
);
try
{
const
response
=
await
putSiteInformation
({
const
response
=
await
put
ApiV10
SiteInformation
({
website_name
:
config
.
websiteName
.
trim
()
||
null
,
website_link
:
config
.
websiteLink
.
trim
()
||
null
,
});
...
...
@@ -1140,7 +1140,7 @@ export default function AdminBaseConfigPage() {
try
{
await
Promise
.
all
(
config
.
socials
.
map
((
social
)
=>
patchSiteInformationSocialsId
(
patch
ApiV10
SiteInformationSocialsId
(
social
.
id
,
mapConfigSocialToApi
(
social
),
),
...
...
src/app/admin/login/page.tsx
View file @
b3589a95
...
...
@@ -15,7 +15,7 @@ import {
}
from
"lucide-react"
;
import
{
toast
}
from
"sonner"
;
import
{
useQuery
}
from
"@tanstack/react-query"
;
import
{
useGetLogo
}
from
"@/api/endpoints/logo"
;
import
{
useGet
ApiV10
Logo
}
from
"@/api/endpoints/logo"
;
import
type
{
Logo
}
from
"@/api/models/logo"
;
import
{
Button
}
from
"@/components/ui/button"
;
import
{
Checkbox
}
from
"@/components/ui/checkbox"
;
...
...
@@ -131,7 +131,7 @@ function AuthShell({
mode
:
AuthMode
;
children
:
React
.
ReactNode
;
})
{
const
{
data
:
logoData
}
=
useGetLogo
(
const
{
data
:
logoData
}
=
useGet
ApiV10
Logo
(
{
page
:
1
,
pageSize
:
1
,
...
...
src/app/admin/videos/page.tsx
View file @
b3589a95
...
...
@@ -26,10 +26,10 @@ import {
TableRow
,
}
from
"@/components/ui/table"
;
import
{
deleteVideoId
,
getVideo
,
patchVideoId
,
postVideo
,
delete
ApiV10
VideoId
,
get
ApiV10
Video
,
patch
ApiV10
VideoId
,
post
ApiV10
Video
,
}
from
"@/api/endpoints/video"
;
import
type
{
Video
as
CmsVideoItem
}
from
"@/api/models/video"
;
import
{
readVideoPageData
,
readVideoRows
}
from
"@/lib/api/videos"
;
...
...
@@ -183,7 +183,7 @@ export default function AdminVideosPage() {
try
{
const
keyword
=
search
.
trim
();
const
response
=
await
getVideo
({
const
response
=
await
get
ApiV10
Video
({
page
,
pageSize
:
PAGE_SIZE
,
sortField
:
"created_at"
,
...
...
@@ -228,10 +228,10 @@ export default function AdminVideosPage() {
try
{
if
(
data
.
id
)
{
await
patchVideoId
(
data
.
id
,
{
name
:
data
.
name
,
url
:
data
.
url
});
await
patch
ApiV10
VideoId
(
data
.
id
,
{
name
:
data
.
name
,
url
:
data
.
url
});
toast
.
success
(
"Đã cập nhật video"
);
}
else
{
await
postVideo
({
name
:
data
.
name
,
url
:
data
.
url
});
await
post
ApiV10
Video
({
name
:
data
.
name
,
url
:
data
.
url
});
toast
.
success
(
"Đã thêm video mới"
);
}
...
...
@@ -248,7 +248,7 @@ export default function AdminVideosPage() {
if
(
!
deleteTarget
)
return
;
try
{
await
deleteVideoId
(
deleteTarget
.
id
);
await
delete
ApiV10
VideoId
(
deleteTarget
.
id
);
toast
.
success
(
"Đã xóa video"
);
setDeleteTarget
(
null
);
await
loadVideos
();
...
...
src/components/shared/admin-sidebar.tsx
View file @
b3589a95
...
...
@@ -17,7 +17,7 @@ import {
Video
,
}
from
"lucide-react"
;
import
{
useQuery
}
from
"@tanstack/react-query"
;
import
{
useGetLogo
}
from
"@/api/endpoints/logo"
;
import
{
useGet
ApiV10
Logo
}
from
"@/api/endpoints/logo"
;
import
type
{
Logo
}
from
"@/api/models/logo"
;
import
logo
from
"@/assets/VCCI-HCM-logo-VN-2025.png"
;
import
{
resolveUploadUrl
}
from
"@/links"
;
...
...
@@ -90,7 +90,7 @@ export function AdminSidebar() {
Record
<
string
,
boolean
>
>
({});
const
{
data
:
logoData
}
=
useGetLogo
(
const
{
data
:
logoData
}
=
useGet
ApiV10
Logo
(
{
page
:
1
,
pageSize
:
1
,
...
...
src/lib/api/newsletter-subscriptions.ts
View file @
b3589a95
"use client"
;
import
{
deleteNewsletterSubscriptionId
,
getNewsletterSubscription
,
patchNewsletterSubscriptionId
,
postNewsletterSubscription
,
delete
ApiV10
NewsletterSubscriptionId
,
get
ApiV10
NewsletterSubscription
,
patch
ApiV10
NewsletterSubscriptionId
,
post
ApiV10
NewsletterSubscription
,
}
from
"@/api/endpoints/newsletter-subscription"
;
import
type
{
NewsletterSubscription
}
from
"@/api/models/newsletterSubscription"
;
...
...
@@ -31,7 +31,7 @@ export async function fetchNewsletterSubscriptions(params?: {
sortOrder
?:
"asc"
|
"desc"
;
filters
?:
string
;
})
{
const
response
=
await
getNewsletterSubscription
({
const
response
=
await
get
ApiV10
NewsletterSubscription
({
page
:
params
?.
page
??
1
,
pageSize
:
params
?.
pageSize
??
10
,
sortField
:
params
?.
sortField
??
"created_at"
,
...
...
@@ -49,13 +49,13 @@ export async function fetchNewsletterSubscriptions(params?: {
}
export
async
function
subscribeNewsletterEmail
(
email
:
string
)
{
return
postNewsletterSubscription
({
email
:
email
.
trim
()
});
return
post
ApiV10
NewsletterSubscription
({
email
:
email
.
trim
()
});
}
export
async
function
deleteNewsletterSubscription
(
id
:
string
)
{
return
deleteNewsletterSubscriptionId
(
id
);
return
delete
ApiV10
NewsletterSubscriptionId
(
id
);
}
export
async
function
markNewsletterSubscriptionSeen
(
id
:
string
)
{
return
patchNewsletterSubscriptionId
(
id
,
{
is_seen
:
true
});
return
patch
ApiV10
NewsletterSubscriptionId
(
id
,
{
is_seen
:
true
});
}
src/lib/api/videos.ts
View file @
b3589a95
"use client"
;
import
{
getVideo
}
from
"@/api/endpoints/video"
;
import
{
get
ApiV10
Video
}
from
"@/api/endpoints/video"
;
import
type
{
Video
}
from
"@/api/models/video"
;
export
type
ClientVideoItem
=
Video
&
{
...
...
@@ -81,7 +81,7 @@ export const normalizeVideoUrl = (url: string) => {
export
async
function
fetchClientVideos
(
params
?:
{
page
?:
number
;
pageSize
?:
number
})
{
try
{
const
response
=
await
getVideo
({
const
response
=
await
get
ApiV10
Video
({
page
:
params
?.
page
??
1
,
pageSize
:
params
?.
pageSize
??
10
,
sortField
:
"created_at"
,
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment