diff --git a/web/restful-react.config.js b/web/restful-react.config.js index 6aa5c138f..af3cc13b5 100644 --- a/web/restful-react.config.js +++ b/web/restful-react.config.js @@ -10,7 +10,7 @@ module.exports = { file: 'src/services/code/swagger.yaml', customImport: `import { getConfig } from "../config";`, customProps: { - base: `{getConfig("code")}` + base: `{getConfig("code/api/v1")}` } } } diff --git a/web/src/services/code/index.tsx b/web/src/services/code/index.tsx index 23a1a531c..d2fee9ae9 100644 --- a/web/src/services/code/index.tsx +++ b/web/src/services/code/index.tsx @@ -858,7 +858,7 @@ export type AdminListUsersProps = Omit ( path={`/admin/users`} - base={getConfig('code')} + base={getConfig('code/api/v1')} {...props} /> ) @@ -870,7 +870,7 @@ export type UseAdminListUsersProps = Omit< export const useAdminListUsers = (props: UseAdminListUsersProps) => useGet(`/admin/users`, { - base: getConfig('code'), + base: getConfig('code/api/v1'), ...props }) @@ -883,7 +883,7 @@ export const AdminCreateUser = (props: AdminCreateUserProps) => ( verb="POST" path={`/admin/users`} - base={getConfig('code')} + base={getConfig('code/api/v1')} {...props} /> ) @@ -895,7 +895,7 @@ export type UseAdminCreateUserProps = Omit< export const useAdminCreateUser = (props: UseAdminCreateUserProps) => useMutate('POST', `/admin/users`, { - base: getConfig('code'), + base: getConfig('code/api/v1'), ...props }) @@ -905,7 +905,7 @@ export const AdminDeleteUser = (props: AdminDeleteUserProps) => ( verb="DELETE" path={`/admin/users`} - base={getConfig('code')} + base={getConfig('code/api/v1')} {...props} /> ) @@ -913,7 +913,10 @@ export const AdminDeleteUser = (props: AdminDeleteUserProps) => ( export type UseAdminDeleteUserProps = Omit, 'path' | 'verb'> export const useAdminDeleteUser = (props: UseAdminDeleteUserProps) => - useMutate('DELETE', `/admin/users`, { base: getConfig('code'), ...props }) + useMutate('DELETE', `/admin/users`, { + base: getConfig('code/api/v1'), + ...props + }) export interface AdminGetUserPathParams { user_uid: string @@ -925,7 +928,7 @@ export type AdminGetUserProps = Omit ( path={`/admin/users/${user_uid}`} - base={getConfig('code')} + base={getConfig('code/api/v1')} {...props} /> ) @@ -936,7 +939,7 @@ export type UseAdminGetUserProps = Omit useGet( (paramsInPath: AdminGetUserPathParams) => `/admin/users/${paramsInPath.user_uid}`, - { base: getConfig('code'), pathParams: { user_uid }, ...props } + { base: getConfig('code/api/v1'), pathParams: { user_uid }, ...props } ) export interface AdminUpdateUserPathParams { @@ -953,7 +956,7 @@ export const AdminUpdateUser = ({ user_uid, ...props }: AdminUpdateUserProps) => verb="PATCH" path={`/admin/users/${user_uid}`} - base={getConfig('code')} + base={getConfig('code/api/v1')} {...props} /> ) @@ -968,7 +971,7 @@ export const useAdminUpdateUser = ({ user_uid, ...props }: UseAdminUpdateUserPro useMutate( 'PATCH', (paramsInPath: AdminUpdateUserPathParams) => `/admin/users/${paramsInPath.user_uid}`, - { base: getConfig('code'), pathParams: { user_uid }, ...props } + { base: getConfig('code/api/v1'), pathParams: { user_uid }, ...props } ) export interface UpdateUserAdminPathParams { @@ -985,7 +988,7 @@ export const UpdateUserAdmin = ({ user_uid, ...props }: UpdateUserAdminProps) => verb="PATCH" path={`/admin/users/${user_uid}/admin`} - base={getConfig('code')} + base={getConfig('code/api/v1')} {...props} /> ) @@ -1000,7 +1003,7 @@ export const useUpdateUserAdmin = ({ user_uid, ...props }: UseUpdateUserAdminPro useMutate( 'PATCH', (paramsInPath: UpdateUserAdminPathParams) => `/admin/users/${paramsInPath.user_uid}/admin`, - { base: getConfig('code'), pathParams: { user_uid }, ...props } + { base: getConfig('code/api/v1'), pathParams: { user_uid }, ...props } ) export type OnLoginProps = Omit< @@ -1012,7 +1015,7 @@ export const OnLogin = (props: OnLoginProps) => ( verb="POST" path={`/login`} - base={getConfig('code')} + base={getConfig('code/api/v1')} {...props} /> ) @@ -1024,20 +1027,25 @@ export type UseOnLoginProps = Omit< export const useOnLogin = (props: UseOnLoginProps) => useMutate('POST', `/login`, { - base: getConfig('code'), + base: getConfig('code/api/v1'), ...props }) export type OpLogoutProps = Omit, 'path' | 'verb'> export const OpLogout = (props: OpLogoutProps) => ( - verb="POST" path={`/logout`} base={getConfig('code')} {...props} /> + + verb="POST" + path={`/logout`} + base={getConfig('code/api/v1')} + {...props} + /> ) export type UseOpLogoutProps = Omit, 'path' | 'verb'> export const useOpLogout = (props: UseOpLogoutProps) => - useMutate('POST', `/logout`, { base: getConfig('code'), ...props }) + useMutate('POST', `/logout`, { base: getConfig('code/api/v1'), ...props }) export type CreatePipelineProps = Omit< MutateProps, @@ -1048,7 +1056,7 @@ export const CreatePipeline = (props: CreatePipelineProps) => ( verb="POST" path={`/pipelines`} - base={getConfig('code')} + base={getConfig('code/api/v1')} {...props} /> ) @@ -1060,7 +1068,7 @@ export type UseCreatePipelineProps = Omit< export const useCreatePipeline = (props: UseCreatePipelineProps) => useMutate('POST', `/pipelines`, { - base: getConfig('code'), + base: getConfig('code/api/v1'), ...props }) @@ -1070,7 +1078,7 @@ export const DeletePipeline = (props: DeletePipelineProps) => ( verb="DELETE" path={`/pipelines`} - base={getConfig('code')} + base={getConfig('code/api/v1')} {...props} /> ) @@ -1078,7 +1086,10 @@ export const DeletePipeline = (props: DeletePipelineProps) => ( export type UseDeletePipelineProps = Omit, 'path' | 'verb'> export const useDeletePipeline = (props: UseDeletePipelineProps) => - useMutate('DELETE', `/pipelines`, { base: getConfig('code'), ...props }) + useMutate('DELETE', `/pipelines`, { + base: getConfig('code/api/v1'), + ...props + }) export interface FindPipelinePathParams { pipeline_ref: string @@ -1090,7 +1101,7 @@ export type FindPipelineProps = Omit ( path={`/pipelines/${pipeline_ref}`} - base={getConfig('code')} + base={getConfig('code/api/v1')} {...props} /> ) @@ -1104,7 +1115,7 @@ export type UseFindPipelineProps = Omit< export const useFindPipeline = ({ pipeline_ref, ...props }: UseFindPipelineProps) => useGet( (paramsInPath: FindPipelinePathParams) => `/pipelines/${paramsInPath.pipeline_ref}`, - { base: getConfig('code'), pathParams: { pipeline_ref }, ...props } + { base: getConfig('code/api/v1'), pathParams: { pipeline_ref }, ...props } ) export interface UpdatePipelinePathParams { @@ -1121,7 +1132,7 @@ export const UpdatePipeline = ({ pipeline_ref, ...props }: UpdatePipelineProps) verb="PATCH" path={`/pipelines/${pipeline_ref}`} - base={getConfig('code')} + base={getConfig('code/api/v1')} {...props} /> ) @@ -1136,7 +1147,7 @@ export const useUpdatePipeline = ({ pipeline_ref, ...props }: UseUpdatePipelineP useMutate( 'PATCH', (paramsInPath: UpdatePipelinePathParams) => `/pipelines/${paramsInPath.pipeline_ref}`, - { base: getConfig('code'), pathParams: { pipeline_ref }, ...props } + { base: getConfig('code/api/v1'), pathParams: { pipeline_ref }, ...props } ) export interface ListExecutionsQueryParams { @@ -1163,7 +1174,7 @@ export type ListExecutionsProps = Omit< export const ListExecutions = ({ pipeline_ref, ...props }: ListExecutionsProps) => ( path={`/pipelines/${pipeline_ref}/executions`} - base={getConfig('code')} + base={getConfig('code/api/v1')} {...props} /> ) @@ -1177,7 +1188,7 @@ export type UseListExecutionsProps = Omit< export const useListExecutions = ({ pipeline_ref, ...props }: UseListExecutionsProps) => useGet( (paramsInPath: ListExecutionsPathParams) => `/pipelines/${paramsInPath.pipeline_ref}/executions`, - { base: getConfig('code'), pathParams: { pipeline_ref }, ...props } + { base: getConfig('code/api/v1'), pathParams: { pipeline_ref }, ...props } ) export interface CreateExecutionPathParams { @@ -1194,7 +1205,7 @@ export const CreateExecution = ({ pipeline_ref, ...props }: CreateExecutionProps verb="POST" path={`/pipelines/${pipeline_ref}/executions`} - base={getConfig('code')} + base={getConfig('code/api/v1')} {...props} /> ) @@ -1209,7 +1220,7 @@ export const useCreateExecution = ({ pipeline_ref, ...props }: UseCreateExecutio useMutate( 'POST', (paramsInPath: CreateExecutionPathParams) => `/pipelines/${paramsInPath.pipeline_ref}/executions`, - { base: getConfig('code'), pathParams: { pipeline_ref }, ...props } + { base: getConfig('code/api/v1'), pathParams: { pipeline_ref }, ...props } ) export interface DeleteExecutionPathParams { @@ -1226,7 +1237,7 @@ export const DeleteExecution = ({ pipeline_ref, ...props }: DeleteExecutionProps verb="DELETE" path={`/pipelines/${pipeline_ref}/executions`} - base={getConfig('code')} + base={getConfig('code/api/v1')} {...props} /> ) @@ -1241,7 +1252,7 @@ export const useDeleteExecution = ({ pipeline_ref, ...props }: UseDeleteExecutio useMutate( 'DELETE', (paramsInPath: DeleteExecutionPathParams) => `/pipelines/${paramsInPath.pipeline_ref}/executions`, - { base: getConfig('code'), pathParams: { pipeline_ref }, ...props } + { base: getConfig('code/api/v1'), pathParams: { pipeline_ref }, ...props } ) export interface FindExecutionPathParams { @@ -1255,7 +1266,7 @@ export type FindExecutionProps = Omit ( path={`/pipelines/${pipeline_ref}/executions/${execution_number}`} - base={getConfig('code')} + base={getConfig('code/api/v1')} {...props} /> ) @@ -1270,7 +1281,7 @@ export const useFindExecution = ({ pipeline_ref, execution_number, ...props }: U useGet( (paramsInPath: FindExecutionPathParams) => `/pipelines/${paramsInPath.pipeline_ref}/executions/${paramsInPath.execution_number}`, - { base: getConfig('code'), pathParams: { pipeline_ref, execution_number }, ...props } + { base: getConfig('code/api/v1'), pathParams: { pipeline_ref, execution_number }, ...props } ) export interface UpdateExecutionPathParams { @@ -1288,7 +1299,7 @@ export const UpdateExecution = ({ pipeline_ref, execution_number, ...props }: Up verb="PATCH" path={`/pipelines/${pipeline_ref}/executions/${execution_number}`} - base={getConfig('code')} + base={getConfig('code/api/v1')} {...props} /> ) @@ -1304,7 +1315,7 @@ export const useUpdateExecution = ({ pipeline_ref, execution_number, ...props }: 'PATCH', (paramsInPath: UpdateExecutionPathParams) => `/pipelines/${paramsInPath.pipeline_ref}/executions/${paramsInPath.execution_number}`, - { base: getConfig('code'), pathParams: { pipeline_ref, execution_number }, ...props } + { base: getConfig('code/api/v1'), pathParams: { pipeline_ref, execution_number }, ...props } ) export interface ViewLogsPathParams { @@ -1319,7 +1330,7 @@ export type ViewLogsProps = Omit ( path={`/pipelines/${pipeline_ref}/executions/${execution_number}/logs/${stage_number}/${step_number}`} - base={getConfig('code')} + base={getConfig('code/api/v1')} {...props} /> ) @@ -1337,7 +1348,11 @@ export const useViewLogs = ({ useGet( (paramsInPath: ViewLogsPathParams) => `/pipelines/${paramsInPath.pipeline_ref}/executions/${paramsInPath.execution_number}/logs/${paramsInPath.stage_number}/${paramsInPath.step_number}`, - { base: getConfig('code'), pathParams: { pipeline_ref, execution_number, stage_number, step_number }, ...props } + { + base: getConfig('code/api/v1'), + pathParams: { pipeline_ref, execution_number, stage_number, step_number }, + ...props + } ) export interface ListPrincipalsQueryParams { @@ -1371,7 +1386,7 @@ export type ListPrincipalsProps = Omit< export const ListPrincipals = (props: ListPrincipalsProps) => ( path={`/principals`} - base={getConfig('code')} + base={getConfig('code/api/v1')} {...props} /> ) @@ -1383,7 +1398,7 @@ export type UseListPrincipalsProps = Omit< export const useListPrincipals = (props: UseListPrincipalsProps) => useGet(`/principals`, { - base: getConfig('code'), + base: getConfig('code/api/v1'), ...props }) @@ -1396,7 +1411,7 @@ export const OnRegister = (props: OnRegisterProps) => ( verb="POST" path={`/register`} - base={getConfig('code')} + base={getConfig('code/api/v1')} {...props} /> ) @@ -1408,7 +1423,7 @@ export type UseOnRegisterProps = Omit< export const useOnRegister = (props: UseOnRegisterProps) => useMutate('POST', `/register`, { - base: getConfig('code'), + base: getConfig('code/api/v1'), ...props }) @@ -1428,7 +1443,7 @@ export const CreateRepository = (props: CreateRepositoryProps) => ( verb="POST" path={`/repos`} - base={getConfig('code')} + base={getConfig('code/api/v1')} {...props} /> ) @@ -1442,19 +1457,24 @@ export const useCreateRepository = (props: UseCreateRepositoryProps) => useMutate( 'POST', `/repos`, - { base: getConfig('code'), ...props } + { base: getConfig('code/api/v1'), ...props } ) export type DeleteRepositoryProps = Omit, 'path' | 'verb'> export const DeleteRepository = (props: DeleteRepositoryProps) => ( - verb="DELETE" path={`/repos`} base={getConfig('code')} {...props} /> + + verb="DELETE" + path={`/repos`} + base={getConfig('code/api/v1')} + {...props} + /> ) export type UseDeleteRepositoryProps = Omit, 'path' | 'verb'> export const useDeleteRepository = (props: UseDeleteRepositoryProps) => - useMutate('DELETE', `/repos`, { base: getConfig('code'), ...props }) + useMutate('DELETE', `/repos`, { base: getConfig('code/api/v1'), ...props }) export interface FindRepositoryPathParams { repo_ref: string @@ -1469,7 +1489,7 @@ export type FindRepositoryProps = Omit< export const FindRepository = ({ repo_ref, ...props }: FindRepositoryProps) => ( path={`/repos/${repo_ref}`} - base={getConfig('code')} + base={getConfig('code/api/v1')} {...props} /> ) @@ -1483,7 +1503,7 @@ export type UseFindRepositoryProps = Omit< export const useFindRepository = ({ repo_ref, ...props }: UseFindRepositoryProps) => useGet( (paramsInPath: FindRepositoryPathParams) => `/repos/${paramsInPath.repo_ref}`, - { base: getConfig('code'), pathParams: { repo_ref }, ...props } + { base: getConfig('code/api/v1'), pathParams: { repo_ref }, ...props } ) export interface UpdateRepositoryPathParams { @@ -1500,7 +1520,7 @@ export const UpdateRepository = ({ repo_ref, ...props }: UpdateRepositoryProps) verb="PATCH" path={`/repos/${repo_ref}`} - base={getConfig('code')} + base={getConfig('code/api/v1')} {...props} /> ) @@ -1515,7 +1535,7 @@ export const useUpdateRepository = ({ repo_ref, ...props }: UseUpdateRepositoryP useMutate( 'PATCH', (paramsInPath: UpdateRepositoryPathParams) => `/repos/${paramsInPath.repo_ref}`, - { base: getConfig('code'), pathParams: { repo_ref }, ...props } + { base: getConfig('code/api/v1'), pathParams: { repo_ref }, ...props } ) export interface GetBlameQueryParams { @@ -1547,7 +1567,7 @@ export type GetBlameProps = Omit< export const GetBlame = ({ repo_ref, path, ...props }: GetBlameProps) => ( path={`/repos/${repo_ref}/blame/${path}`} - base={getConfig('code')} + base={getConfig('code/api/v1')} {...props} /> ) @@ -1561,7 +1581,7 @@ export type UseGetBlameProps = Omit< export const useGetBlame = ({ repo_ref, path, ...props }: UseGetBlameProps) => useGet( (paramsInPath: GetBlamePathParams) => `/repos/${paramsInPath.repo_ref}/blame/${paramsInPath.path}`, - { base: getConfig('code'), pathParams: { repo_ref, path }, ...props } + { base: getConfig('code/api/v1'), pathParams: { repo_ref, path }, ...props } ) export interface ListBranchesQueryParams { @@ -1604,7 +1624,7 @@ export type ListBranchesProps = Omit< export const ListBranches = ({ repo_ref, ...props }: ListBranchesProps) => ( path={`/repos/${repo_ref}/branches`} - base={getConfig('code')} + base={getConfig('code/api/v1')} {...props} /> ) @@ -1618,7 +1638,7 @@ export type UseListBranchesProps = Omit< export const useListBranches = ({ repo_ref, ...props }: UseListBranchesProps) => useGet( (paramsInPath: ListBranchesPathParams) => `/repos/${paramsInPath.repo_ref}/branches`, - { base: getConfig('code'), pathParams: { repo_ref }, ...props } + { base: getConfig('code/api/v1'), pathParams: { repo_ref }, ...props } ) export interface CreateBranchPathParams { @@ -1635,7 +1655,7 @@ export const CreateBranch = ({ repo_ref, ...props }: CreateBranchProps) => ( verb="POST" path={`/repos/${repo_ref}/branches`} - base={getConfig('code')} + base={getConfig('code/api/v1')} {...props} /> ) @@ -1650,7 +1670,7 @@ export const useCreateBranch = ({ repo_ref, ...props }: UseCreateBranchProps) => useMutate( 'POST', (paramsInPath: CreateBranchPathParams) => `/repos/${paramsInPath.repo_ref}/branches`, - { base: getConfig('code'), pathParams: { repo_ref }, ...props } + { base: getConfig('code/api/v1'), pathParams: { repo_ref }, ...props } ) export interface DeleteBranchPathParams { @@ -1667,7 +1687,7 @@ export const DeleteBranch = ({ repo_ref, ...props }: DeleteBranchProps) => ( verb="DELETE" path={`/repos/${repo_ref}/branches`} - base={getConfig('code')} + base={getConfig('code/api/v1')} {...props} /> ) @@ -1682,7 +1702,7 @@ export const useDeleteBranch = ({ repo_ref, ...props }: UseDeleteBranchProps) => useMutate( 'DELETE', (paramsInPath: DeleteBranchPathParams) => `/repos/${paramsInPath.repo_ref}/branches`, - { base: getConfig('code'), pathParams: { repo_ref }, ...props } + { base: getConfig('code/api/v1'), pathParams: { repo_ref }, ...props } ) export interface GetBranchPathParams { @@ -1696,7 +1716,7 @@ export type GetBranchProps = Omit ( path={`/repos/${repo_ref}/branches/${branch_name}`} - base={getConfig('code')} + base={getConfig('code/api/v1')} {...props} /> ) @@ -1707,7 +1727,7 @@ export type UseGetBranchProps = Omit useGet( (paramsInPath: GetBranchPathParams) => `/repos/${paramsInPath.repo_ref}/branches/${paramsInPath.branch_name}`, - { base: getConfig('code'), pathParams: { repo_ref, branch_name }, ...props } + { base: getConfig('code/api/v1'), pathParams: { repo_ref, branch_name }, ...props } ) export interface ListStatusCheckResultsQueryParams { @@ -1735,7 +1755,7 @@ export type ListStatusCheckResultsProps = Omit< export const ListStatusCheckResults = ({ repo_ref, commit_sha, ...props }: ListStatusCheckResultsProps) => ( path={`/repos/${repo_ref}/checks/commits/${commit_sha}`} - base={getConfig('code')} + base={getConfig('code/api/v1')} {...props} /> ) @@ -1750,7 +1770,7 @@ export const useListStatusCheckResults = ({ repo_ref, commit_sha, ...props }: Us useGet( (paramsInPath: ListStatusCheckResultsPathParams) => `/repos/${paramsInPath.repo_ref}/checks/commits/${paramsInPath.commit_sha}`, - { base: getConfig('code'), pathParams: { repo_ref, commit_sha }, ...props } + { base: getConfig('code/api/v1'), pathParams: { repo_ref, commit_sha }, ...props } ) export interface ReportStatusCheckResultsPathParams { @@ -1782,7 +1802,7 @@ export const ReportStatusCheckResults = ({ repo_ref, commit_sha, ...props }: Rep verb="PUT" path={`/repos/${repo_ref}/checks/commits/${commit_sha}`} - base={getConfig('code')} + base={getConfig('code/api/v1')} {...props} /> ) @@ -1804,7 +1824,7 @@ export const useReportStatusCheckResults = ({ repo_ref, commit_sha, ...props }: 'PUT', (paramsInPath: ReportStatusCheckResultsPathParams) => `/repos/${paramsInPath.repo_ref}/checks/commits/${paramsInPath.commit_sha}`, - { base: getConfig('code'), pathParams: { repo_ref, commit_sha }, ...props } + { base: getConfig('code/api/v1'), pathParams: { repo_ref, commit_sha }, ...props } ) export interface ListCommitsQueryParams { @@ -1855,7 +1875,7 @@ export type ListCommitsProps = Omit< export const ListCommits = ({ repo_ref, ...props }: ListCommitsProps) => ( path={`/repos/${repo_ref}/commits`} - base={getConfig('code')} + base={getConfig('code/api/v1')} {...props} /> ) @@ -1869,7 +1889,7 @@ export type UseListCommitsProps = Omit< export const useListCommits = ({ repo_ref, ...props }: UseListCommitsProps) => useGet( (paramsInPath: ListCommitsPathParams) => `/repos/${paramsInPath.repo_ref}/commits`, - { base: getConfig('code'), pathParams: { repo_ref }, ...props } + { base: getConfig('code/api/v1'), pathParams: { repo_ref }, ...props } ) export interface CommitFilesPathParams { @@ -1886,7 +1906,7 @@ export const CommitFiles = ({ repo_ref, ...props }: CommitFilesProps) => ( verb="POST" path={`/repos/${repo_ref}/commits`} - base={getConfig('code')} + base={getConfig('code/api/v1')} {...props} /> ) @@ -1901,7 +1921,7 @@ export const useCommitFiles = ({ repo_ref, ...props }: UseCommitFilesProps) => useMutate( 'POST', (paramsInPath: CommitFilesPathParams) => `/repos/${paramsInPath.repo_ref}/commits`, - { base: getConfig('code'), pathParams: { repo_ref }, ...props } + { base: getConfig('code/api/v1'), pathParams: { repo_ref }, ...props } ) export interface GetCommitPathParams { @@ -1915,7 +1935,7 @@ export type GetCommitProps = Omit ( path={`/repos/${repo_ref}/commits/${commit_sha}`} - base={getConfig('code')} + base={getConfig('code/api/v1')} {...props} /> ) @@ -1926,7 +1946,7 @@ export type UseGetCommitProps = Omit useGet( (paramsInPath: GetCommitPathParams) => `/repos/${paramsInPath.repo_ref}/commits/${paramsInPath.commit_sha}`, - { base: getConfig('code'), pathParams: { repo_ref, commit_sha }, ...props } + { base: getConfig('code/api/v1'), pathParams: { repo_ref, commit_sha }, ...props } ) export interface CalculateCommitDivergencePathParams { @@ -1955,7 +1975,7 @@ export const CalculateCommitDivergence = ({ repo_ref, ...props }: CalculateCommi > verb="POST" path={`/repos/${repo_ref}/commits/calculate-divergence`} - base={getConfig('code')} + base={getConfig('code/api/v1')} {...props} /> ) @@ -1983,7 +2003,7 @@ export const useCalculateCommitDivergence = ({ repo_ref, ...props }: UseCalculat 'POST', (paramsInPath: CalculateCommitDivergencePathParams) => `/repos/${paramsInPath.repo_ref}/commits/calculate-divergence`, - { base: getConfig('code'), pathParams: { repo_ref }, ...props } + { base: getConfig('code/api/v1'), pathParams: { repo_ref }, ...props } ) export interface GetContentQueryParams { @@ -2011,7 +2031,7 @@ export type GetContentProps = Omit< export const GetContent = ({ repo_ref, path, ...props }: GetContentProps) => ( path={`/repos/${repo_ref}/content/${path}`} - base={getConfig('code')} + base={getConfig('code/api/v1')} {...props} /> ) @@ -2025,7 +2045,7 @@ export type UseGetContentProps = Omit< export const useGetContent = ({ repo_ref, path, ...props }: UseGetContentProps) => useGet( (paramsInPath: GetContentPathParams) => `/repos/${paramsInPath.repo_ref}/content/${paramsInPath.path}`, - { base: getConfig('code'), pathParams: { repo_ref, path }, ...props } + { base: getConfig('code/api/v1'), pathParams: { repo_ref, path }, ...props } ) export interface DiffStatsPathParams { @@ -2039,7 +2059,7 @@ export type DiffStatsProps = Omit ( path={`/repos/${repo_ref}/diff-stats/${range}`} - base={getConfig('code')} + base={getConfig('code/api/v1')} {...props} /> ) @@ -2050,7 +2070,7 @@ export type UseDiffStatsProps = Omit useGet( (paramsInPath: DiffStatsPathParams) => `/repos/${paramsInPath.repo_ref}/diff-stats/${paramsInPath.range}`, - { base: getConfig('code'), pathParams: { repo_ref, range }, ...props } + { base: getConfig('code/api/v1'), pathParams: { repo_ref, range }, ...props } ) export interface RawDiffPathParams { @@ -2064,7 +2084,7 @@ export type RawDiffProps = Omit ( path={`/repos/${repo_ref}/diff/${range}`} - base={getConfig('code')} + base={getConfig('code/api/v1')} {...props} /> ) @@ -2075,7 +2095,7 @@ export type UseRawDiffProps = Omit useGet( (paramsInPath: RawDiffPathParams) => `/repos/${paramsInPath.repo_ref}/diff/${paramsInPath.range}`, - { base: getConfig('code'), pathParams: { repo_ref, range }, ...props } + { base: getConfig('code/api/v1'), pathParams: { repo_ref, range }, ...props } ) export interface MergeCheckPathParams { @@ -2093,7 +2113,7 @@ export const MergeCheck = ({ repo_ref, range, ...props }: MergeCheckProps) => ( verb="POST" path={`/repos/${repo_ref}/merge-check/${range}`} - base={getConfig('code')} + base={getConfig('code/api/v1')} {...props} /> ) @@ -2108,7 +2128,7 @@ export const useMergeCheck = ({ repo_ref, range, ...props }: UseMergeCheckProps) useMutate( 'POST', (paramsInPath: MergeCheckPathParams) => `/repos/${paramsInPath.repo_ref}/merge-check/${paramsInPath.range}`, - { base: getConfig('code'), pathParams: { repo_ref, range }, ...props } + { base: getConfig('code/api/v1'), pathParams: { repo_ref, range }, ...props } ) export interface MoveRepositoryPathParams { @@ -2125,7 +2145,7 @@ export const MoveRepository = ({ repo_ref, ...props }: MoveRepositoryProps) => ( verb="POST" path={`/repos/${repo_ref}/move`} - base={getConfig('code')} + base={getConfig('code/api/v1')} {...props} /> ) @@ -2140,7 +2160,7 @@ export const useMoveRepository = ({ repo_ref, ...props }: UseMoveRepositoryProps useMutate( 'POST', (paramsInPath: MoveRepositoryPathParams) => `/repos/${paramsInPath.repo_ref}/move`, - { base: getConfig('code'), pathParams: { repo_ref }, ...props } + { base: getConfig('code/api/v1'), pathParams: { repo_ref }, ...props } ) export interface PathDetailsQueryParams { @@ -2176,7 +2196,7 @@ export const PathDetails = ({ repo_ref, ...props }: PathDetailsProps) => ( > verb="POST" path={`/repos/${repo_ref}/path-details`} - base={getConfig('code')} + base={getConfig('code/api/v1')} {...props} /> ) @@ -2201,7 +2221,7 @@ export const usePathDetails = ({ repo_ref, ...props }: UsePathDetailsProps) => OpenapiPathsDetailsRequest, PathDetailsPathParams >('POST', (paramsInPath: PathDetailsPathParams) => `/repos/${paramsInPath.repo_ref}/path-details`, { - base: getConfig('code'), + base: getConfig('code/api/v1'), pathParams: { repo_ref }, ...props }) @@ -2230,7 +2250,7 @@ export type ListRepositoryPathsProps = Omit< export const ListRepositoryPaths = ({ repo_ref, ...props }: ListRepositoryPathsProps) => ( path={`/repos/${repo_ref}/paths`} - base={getConfig('code')} + base={getConfig('code/api/v1')} {...props} /> ) @@ -2244,7 +2264,7 @@ export type UseListRepositoryPathsProps = Omit< export const useListRepositoryPaths = ({ repo_ref, ...props }: UseListRepositoryPathsProps) => useGet( (paramsInPath: ListRepositoryPathsPathParams) => `/repos/${paramsInPath.repo_ref}/paths`, - { base: getConfig('code'), pathParams: { repo_ref }, ...props } + { base: getConfig('code/api/v1'), pathParams: { repo_ref }, ...props } ) export interface CreateRepositoryPathPathParams { @@ -2261,7 +2281,7 @@ export const CreateRepositoryPath = ({ repo_ref, ...props }: CreateRepositoryPat verb="POST" path={`/repos/${repo_ref}/paths`} - base={getConfig('code')} + base={getConfig('code/api/v1')} {...props} /> ) @@ -2276,7 +2296,7 @@ export const useCreateRepositoryPath = ({ repo_ref, ...props }: UseCreateReposit useMutate( 'POST', (paramsInPath: CreateRepositoryPathPathParams) => `/repos/${paramsInPath.repo_ref}/paths`, - { base: getConfig('code'), pathParams: { repo_ref }, ...props } + { base: getConfig('code/api/v1'), pathParams: { repo_ref }, ...props } ) export interface DeleteRepositoryPathPathParams { @@ -2293,7 +2313,7 @@ export const DeleteRepositoryPath = ({ repo_ref, ...props }: DeleteRepositoryPat verb="DELETE" path={`/repos/${repo_ref}/paths`} - base={getConfig('code')} + base={getConfig('code/api/v1')} {...props} /> ) @@ -2308,7 +2328,7 @@ export const useDeleteRepositoryPath = ({ repo_ref, ...props }: UseDeleteReposit useMutate( 'DELETE', (paramsInPath: DeleteRepositoryPathPathParams) => `/repos/${paramsInPath.repo_ref}/paths`, - { base: getConfig('code'), pathParams: { repo_ref }, ...props } + { base: getConfig('code/api/v1'), pathParams: { repo_ref }, ...props } ) export interface ListPullReqQueryParams { @@ -2367,7 +2387,7 @@ export type ListPullReqProps = Omit< export const ListPullReq = ({ repo_ref, ...props }: ListPullReqProps) => ( path={`/repos/${repo_ref}/pullreq`} - base={getConfig('code')} + base={getConfig('code/api/v1')} {...props} /> ) @@ -2381,7 +2401,7 @@ export type UseListPullReqProps = Omit< export const useListPullReq = ({ repo_ref, ...props }: UseListPullReqProps) => useGet( (paramsInPath: ListPullReqPathParams) => `/repos/${paramsInPath.repo_ref}/pullreq`, - { base: getConfig('code'), pathParams: { repo_ref }, ...props } + { base: getConfig('code/api/v1'), pathParams: { repo_ref }, ...props } ) export interface CreatePullReqPathParams { @@ -2398,7 +2418,7 @@ export const CreatePullReq = ({ repo_ref, ...props }: CreatePullReqProps) => ( verb="POST" path={`/repos/${repo_ref}/pullreq`} - base={getConfig('code')} + base={getConfig('code/api/v1')} {...props} /> ) @@ -2413,7 +2433,7 @@ export const useCreatePullReq = ({ repo_ref, ...props }: UseCreatePullReqProps) useMutate( 'POST', (paramsInPath: CreatePullReqPathParams) => `/repos/${paramsInPath.repo_ref}/pullreq`, - { base: getConfig('code'), pathParams: { repo_ref }, ...props } + { base: getConfig('code/api/v1'), pathParams: { repo_ref }, ...props } ) export interface GetPullReqPathParams { @@ -2427,7 +2447,7 @@ export type GetPullReqProps = Omit ( path={`/repos/${repo_ref}/pullreq/${pullreq_number}`} - base={getConfig('code')} + base={getConfig('code/api/v1')} {...props} /> ) @@ -2438,7 +2458,7 @@ export type UseGetPullReqProps = Omit useGet( (paramsInPath: GetPullReqPathParams) => `/repos/${paramsInPath.repo_ref}/pullreq/${paramsInPath.pullreq_number}`, - { base: getConfig('code'), pathParams: { repo_ref, pullreq_number }, ...props } + { base: getConfig('code/api/v1'), pathParams: { repo_ref, pullreq_number }, ...props } ) export interface UpdatePullReqPathParams { @@ -2456,7 +2476,7 @@ export const UpdatePullReq = ({ repo_ref, pullreq_number, ...props }: UpdatePull verb="PATCH" path={`/repos/${repo_ref}/pullreq/${pullreq_number}`} - base={getConfig('code')} + base={getConfig('code/api/v1')} {...props} /> ) @@ -2471,7 +2491,7 @@ export const useUpdatePullReq = ({ repo_ref, pullreq_number, ...props }: UseUpda useMutate( 'PATCH', (paramsInPath: UpdatePullReqPathParams) => `/repos/${paramsInPath.repo_ref}/pullreq/${paramsInPath.pullreq_number}`, - { base: getConfig('code'), pathParams: { repo_ref, pullreq_number }, ...props } + { base: getConfig('code/api/v1'), pathParams: { repo_ref, pullreq_number }, ...props } ) export interface ListPullReqActivitiesQueryParams { @@ -2520,7 +2540,7 @@ export type ListPullReqActivitiesProps = Omit< export const ListPullReqActivities = ({ repo_ref, pullreq_number, ...props }: ListPullReqActivitiesProps) => ( path={`/repos/${repo_ref}/pullreq/${pullreq_number}/activities`} - base={getConfig('code')} + base={getConfig('code/api/v1')} {...props} /> ) @@ -2540,7 +2560,7 @@ export const useListPullReqActivities = ({ repo_ref, pullreq_number, ...props }: useGet( (paramsInPath: ListPullReqActivitiesPathParams) => `/repos/${paramsInPath.repo_ref}/pullreq/${paramsInPath.pullreq_number}/activities`, - { base: getConfig('code'), pathParams: { repo_ref, pullreq_number }, ...props } + { base: getConfig('code/api/v1'), pathParams: { repo_ref, pullreq_number }, ...props } ) export interface CommentCreatePullReqPathParams { @@ -2570,7 +2590,7 @@ export const CommentCreatePullReq = ({ repo_ref, pullreq_number, ...props }: Com > verb="POST" path={`/repos/${repo_ref}/pullreq/${pullreq_number}/comments`} - base={getConfig('code')} + base={getConfig('code/api/v1')} {...props} /> ) @@ -2598,7 +2618,7 @@ export const useCommentCreatePullReq = ({ repo_ref, pullreq_number, ...props }: 'POST', (paramsInPath: CommentCreatePullReqPathParams) => `/repos/${paramsInPath.repo_ref}/pullreq/${paramsInPath.pullreq_number}/comments`, - { base: getConfig('code'), pathParams: { repo_ref, pullreq_number }, ...props } + { base: getConfig('code/api/v1'), pathParams: { repo_ref, pullreq_number }, ...props } ) export interface CommentDeletePullReqPathParams { @@ -2616,7 +2636,7 @@ export const CommentDeletePullReq = ({ repo_ref, pullreq_number, ...props }: Com verb="DELETE" path={`/repos/${repo_ref}/pullreq/${pullreq_number}/comments`} - base={getConfig('code')} + base={getConfig('code/api/v1')} {...props} /> ) @@ -2632,7 +2652,7 @@ export const useCommentDeletePullReq = ({ repo_ref, pullreq_number, ...props }: 'DELETE', (paramsInPath: CommentDeletePullReqPathParams) => `/repos/${paramsInPath.repo_ref}/pullreq/${paramsInPath.pullreq_number}/comments`, - { base: getConfig('code'), pathParams: { repo_ref, pullreq_number }, ...props } + { base: getConfig('code/api/v1'), pathParams: { repo_ref, pullreq_number }, ...props } ) export interface CommentUpdatePullReqPathParams { @@ -2668,7 +2688,7 @@ export const CommentUpdatePullReq = ({ > verb="PATCH" path={`/repos/${repo_ref}/pullreq/${pullreq_number}/comments/${pullreq_comment_id}`} - base={getConfig('code')} + base={getConfig('code/api/v1')} {...props} /> ) @@ -2701,7 +2721,7 @@ export const useCommentUpdatePullReq = ({ 'PATCH', (paramsInPath: CommentUpdatePullReqPathParams) => `/repos/${paramsInPath.repo_ref}/pullreq/${paramsInPath.pullreq_number}/comments/${paramsInPath.pullreq_comment_id}`, - { base: getConfig('code'), pathParams: { repo_ref, pullreq_number, pullreq_comment_id }, ...props } + { base: getConfig('code/api/v1'), pathParams: { repo_ref, pullreq_number, pullreq_comment_id }, ...props } ) export interface CommentStatusPullReqPathParams { @@ -2737,7 +2757,7 @@ export const CommentStatusPullReq = ({ > verb="PUT" path={`/repos/${repo_ref}/pullreq/${pullreq_number}/comments/${pullreq_comment_id}/status`} - base={getConfig('code')} + base={getConfig('code/api/v1')} {...props} /> ) @@ -2770,7 +2790,7 @@ export const useCommentStatusPullReq = ({ 'PUT', (paramsInPath: CommentStatusPullReqPathParams) => `/repos/${paramsInPath.repo_ref}/pullreq/${paramsInPath.pullreq_number}/comments/${paramsInPath.pullreq_comment_id}/status`, - { base: getConfig('code'), pathParams: { repo_ref, pullreq_number, pullreq_comment_id }, ...props } + { base: getConfig('code/api/v1'), pathParams: { repo_ref, pullreq_number, pullreq_comment_id }, ...props } ) export interface ListPullReqCommitsQueryParams { @@ -2798,7 +2818,7 @@ export type ListPullReqCommitsProps = Omit< export const ListPullReqCommits = ({ repo_ref, pullreq_number, ...props }: ListPullReqCommitsProps) => ( path={`/repos/${repo_ref}/pullreq/${pullreq_number}/commits`} - base={getConfig('code')} + base={getConfig('code/api/v1')} {...props} /> ) @@ -2813,7 +2833,7 @@ export const useListPullReqCommits = ({ repo_ref, pullreq_number, ...props }: Us useGet( (paramsInPath: ListPullReqCommitsPathParams) => `/repos/${paramsInPath.repo_ref}/pullreq/${paramsInPath.pullreq_number}/commits`, - { base: getConfig('code'), pathParams: { repo_ref, pullreq_number }, ...props } + { base: getConfig('code/api/v1'), pathParams: { repo_ref, pullreq_number }, ...props } ) export interface MergePullReqOpPathParams { @@ -2831,7 +2851,7 @@ export const MergePullReqOp = ({ repo_ref, pullreq_number, ...props }: MergePull verb="POST" path={`/repos/${repo_ref}/pullreq/${pullreq_number}/merge`} - base={getConfig('code')} + base={getConfig('code/api/v1')} {...props} /> ) @@ -2847,7 +2867,7 @@ export const useMergePullReqOp = ({ repo_ref, pullreq_number, ...props }: UseMer 'POST', (paramsInPath: MergePullReqOpPathParams) => `/repos/${paramsInPath.repo_ref}/pullreq/${paramsInPath.pullreq_number}/merge`, - { base: getConfig('code'), pathParams: { repo_ref, pullreq_number }, ...props } + { base: getConfig('code/api/v1'), pathParams: { repo_ref, pullreq_number }, ...props } ) export interface PullReqMetaDataPathParams { @@ -2864,7 +2884,7 @@ export type PullReqMetaDataProps = Omit< export const PullReqMetaData = ({ repo_ref, pullreq_number, ...props }: PullReqMetaDataProps) => ( path={`/repos/${repo_ref}/pullreq/${pullreq_number}/metadata`} - base={getConfig('code')} + base={getConfig('code/api/v1')} {...props} /> ) @@ -2879,7 +2899,7 @@ export const usePullReqMetaData = ({ repo_ref, pullreq_number, ...props }: UsePu useGet( (paramsInPath: PullReqMetaDataPathParams) => `/repos/${paramsInPath.repo_ref}/pullreq/${paramsInPath.pullreq_number}/metadata`, - { base: getConfig('code'), pathParams: { repo_ref, pullreq_number }, ...props } + { base: getConfig('code/api/v1'), pathParams: { repo_ref, pullreq_number }, ...props } ) export interface ReviewerListPullReqPathParams { @@ -2896,7 +2916,7 @@ export type ReviewerListPullReqProps = Omit< export const ReviewerListPullReq = ({ repo_ref, pullreq_number, ...props }: ReviewerListPullReqProps) => ( path={`/repos/${repo_ref}/pullreq/${pullreq_number}/reviewers`} - base={getConfig('code')} + base={getConfig('code/api/v1')} {...props} /> ) @@ -2911,7 +2931,7 @@ export const useReviewerListPullReq = ({ repo_ref, pullreq_number, ...props }: U useGet( (paramsInPath: ReviewerListPullReqPathParams) => `/repos/${paramsInPath.repo_ref}/pullreq/${paramsInPath.pullreq_number}/reviewers`, - { base: getConfig('code'), pathParams: { repo_ref, pullreq_number }, ...props } + { base: getConfig('code/api/v1'), pathParams: { repo_ref, pullreq_number }, ...props } ) export interface ReviewerAddPullReqPathParams { @@ -2935,7 +2955,7 @@ export const ReviewerAddPullReq = ({ repo_ref, pullreq_number, ...props }: Revie verb="PUT" path={`/repos/${repo_ref}/pullreq/${pullreq_number}/reviewers`} - base={getConfig('code')} + base={getConfig('code/api/v1')} {...props} /> ) @@ -2957,7 +2977,7 @@ export const useReviewerAddPullReq = ({ repo_ref, pullreq_number, ...props }: Us 'PUT', (paramsInPath: ReviewerAddPullReqPathParams) => `/repos/${paramsInPath.repo_ref}/pullreq/${paramsInPath.pullreq_number}/reviewers`, - { base: getConfig('code'), pathParams: { repo_ref, pullreq_number }, ...props } + { base: getConfig('code/api/v1'), pathParams: { repo_ref, pullreq_number }, ...props } ) export interface ReviewerDeletePullReqPathParams { @@ -2975,7 +2995,7 @@ export const ReviewerDeletePullReq = ({ repo_ref, pullreq_number, ...props }: Re verb="DELETE" path={`/repos/${repo_ref}/pullreq/${pullreq_number}/reviewers`} - base={getConfig('code')} + base={getConfig('code/api/v1')} {...props} /> ) @@ -2991,7 +3011,7 @@ export const useReviewerDeletePullReq = ({ repo_ref, pullreq_number, ...props }: 'DELETE', (paramsInPath: ReviewerDeletePullReqPathParams) => `/repos/${paramsInPath.repo_ref}/pullreq/${paramsInPath.pullreq_number}/reviewers`, - { base: getConfig('code'), pathParams: { repo_ref, pullreq_number }, ...props } + { base: getConfig('code/api/v1'), pathParams: { repo_ref, pullreq_number }, ...props } ) export interface ReviewSubmitPullReqPathParams { @@ -3009,7 +3029,7 @@ export const ReviewSubmitPullReq = ({ repo_ref, pullreq_number, ...props }: Revi verb="POST" path={`/repos/${repo_ref}/pullreq/${pullreq_number}/reviews`} - base={getConfig('code')} + base={getConfig('code/api/v1')} {...props} /> ) @@ -3025,7 +3045,7 @@ export const useReviewSubmitPullReq = ({ repo_ref, pullreq_number, ...props }: U 'POST', (paramsInPath: ReviewSubmitPullReqPathParams) => `/repos/${paramsInPath.repo_ref}/pullreq/${paramsInPath.pullreq_number}/reviews`, - { base: getConfig('code'), pathParams: { repo_ref, pullreq_number }, ...props } + { base: getConfig('code/api/v1'), pathParams: { repo_ref, pullreq_number }, ...props } ) export interface StatePullReqPathParams { @@ -3043,7 +3063,7 @@ export const StatePullReq = ({ repo_ref, pullreq_number, ...props }: StatePullRe verb="POST" path={`/repos/${repo_ref}/pullreq/${pullreq_number}/state`} - base={getConfig('code')} + base={getConfig('code/api/v1')} {...props} /> ) @@ -3059,7 +3079,7 @@ export const useStatePullReq = ({ repo_ref, pullreq_number, ...props }: UseState 'POST', (paramsInPath: StatePullReqPathParams) => `/repos/${paramsInPath.repo_ref}/pullreq/${paramsInPath.pullreq_number}/state`, - { base: getConfig('code'), pathParams: { repo_ref, pullreq_number }, ...props } + { base: getConfig('code/api/v1'), pathParams: { repo_ref, pullreq_number }, ...props } ) export interface GetRawQueryParams { @@ -3080,7 +3100,7 @@ export type GetRawProps = Omit ( path={`/repos/${repo_ref}/raw/${path}`} - base={getConfig('code')} + base={getConfig('code/api/v1')} {...props} /> ) @@ -3091,7 +3111,7 @@ export type UseGetRawProps = Omit useGet( (paramsInPath: GetRawPathParams) => `/repos/${paramsInPath.repo_ref}/raw/${paramsInPath.path}`, - { base: getConfig('code'), pathParams: { repo_ref, path }, ...props } + { base: getConfig('code/api/v1'), pathParams: { repo_ref, path }, ...props } ) export interface ListRepositoryServiceAccountsPathParams { @@ -3107,7 +3127,7 @@ export type ListRepositoryServiceAccountsProps = Omit< export const ListRepositoryServiceAccounts = ({ repo_ref, ...props }: ListRepositoryServiceAccountsProps) => ( path={`/repos/${repo_ref}/service-accounts`} - base={getConfig('code')} + base={getConfig('code/api/v1')} {...props} /> ) @@ -3121,7 +3141,7 @@ export type UseListRepositoryServiceAccountsProps = Omit< export const useListRepositoryServiceAccounts = ({ repo_ref, ...props }: UseListRepositoryServiceAccountsProps) => useGet( (paramsInPath: ListRepositoryServiceAccountsPathParams) => `/repos/${paramsInPath.repo_ref}/service-accounts`, - { base: getConfig('code'), pathParams: { repo_ref }, ...props } + { base: getConfig('code/api/v1'), pathParams: { repo_ref }, ...props } ) export interface ListTagsQueryParams { @@ -3164,7 +3184,7 @@ export type ListTagsProps = Omit< export const ListTags = ({ repo_ref, ...props }: ListTagsProps) => ( path={`/repos/${repo_ref}/tags`} - base={getConfig('code')} + base={getConfig('code/api/v1')} {...props} /> ) @@ -3178,7 +3198,7 @@ export type UseListTagsProps = Omit< export const useListTags = ({ repo_ref, ...props }: UseListTagsProps) => useGet( (paramsInPath: ListTagsPathParams) => `/repos/${paramsInPath.repo_ref}/tags`, - { base: getConfig('code'), pathParams: { repo_ref }, ...props } + { base: getConfig('code/api/v1'), pathParams: { repo_ref }, ...props } ) export interface CreateTagPathParams { @@ -3195,7 +3215,7 @@ export const CreateTag = ({ repo_ref, ...props }: CreateTagProps) => ( verb="POST" path={`/repos/${repo_ref}/tags`} - base={getConfig('code')} + base={getConfig('code/api/v1')} {...props} /> ) @@ -3210,7 +3230,7 @@ export const useCreateTag = ({ repo_ref, ...props }: UseCreateTagProps) => useMutate( 'POST', (paramsInPath: CreateTagPathParams) => `/repos/${paramsInPath.repo_ref}/tags`, - { base: getConfig('code'), pathParams: { repo_ref }, ...props } + { base: getConfig('code/api/v1'), pathParams: { repo_ref }, ...props } ) export interface DeleteTagPathParams { @@ -3227,7 +3247,7 @@ export const DeleteTag = ({ repo_ref, ...props }: DeleteTagProps) => ( verb="DELETE" path={`/repos/${repo_ref}/tags`} - base={getConfig('code')} + base={getConfig('code/api/v1')} {...props} /> ) @@ -3242,7 +3262,7 @@ export const useDeleteTag = ({ repo_ref, ...props }: UseDeleteTagProps) => useMutate( 'DELETE', (paramsInPath: DeleteTagPathParams) => `/repos/${paramsInPath.repo_ref}/tags`, - { base: getConfig('code'), pathParams: { repo_ref }, ...props } + { base: getConfig('code/api/v1'), pathParams: { repo_ref }, ...props } ) export interface ListWebhooksQueryParams { @@ -3281,7 +3301,7 @@ export type ListWebhooksProps = Omit< export const ListWebhooks = ({ repo_ref, ...props }: ListWebhooksProps) => ( path={`/repos/${repo_ref}/webhooks`} - base={getConfig('code')} + base={getConfig('code/api/v1')} {...props} /> ) @@ -3295,7 +3315,7 @@ export type UseListWebhooksProps = Omit< export const useListWebhooks = ({ repo_ref, ...props }: UseListWebhooksProps) => useGet( (paramsInPath: ListWebhooksPathParams) => `/repos/${paramsInPath.repo_ref}/webhooks`, - { base: getConfig('code'), pathParams: { repo_ref }, ...props } + { base: getConfig('code/api/v1'), pathParams: { repo_ref }, ...props } ) export interface CreateWebhookPathParams { @@ -3312,7 +3332,7 @@ export const CreateWebhook = ({ repo_ref, ...props }: CreateWebhookProps) => ( verb="POST" path={`/repos/${repo_ref}/webhooks`} - base={getConfig('code')} + base={getConfig('code/api/v1')} {...props} /> ) @@ -3327,7 +3347,7 @@ export const useCreateWebhook = ({ repo_ref, ...props }: UseCreateWebhookProps) useMutate( 'POST', (paramsInPath: CreateWebhookPathParams) => `/repos/${paramsInPath.repo_ref}/webhooks`, - { base: getConfig('code'), pathParams: { repo_ref }, ...props } + { base: getConfig('code/api/v1'), pathParams: { repo_ref }, ...props } ) export interface DeleteWebhookPathParams { @@ -3344,7 +3364,7 @@ export const DeleteWebhook = ({ repo_ref, ...props }: DeleteWebhookProps) => ( verb="DELETE" path={`/repos/${repo_ref}/webhooks`} - base={getConfig('code')} + base={getConfig('code/api/v1')} {...props} /> ) @@ -3359,7 +3379,7 @@ export const useDeleteWebhook = ({ repo_ref, ...props }: UseDeleteWebhookProps) useMutate( 'DELETE', (paramsInPath: DeleteWebhookPathParams) => `/repos/${paramsInPath.repo_ref}/webhooks`, - { base: getConfig('code'), pathParams: { repo_ref }, ...props } + { base: getConfig('code/api/v1'), pathParams: { repo_ref }, ...props } ) export interface GetWebhookPathParams { @@ -3373,7 +3393,7 @@ export type GetWebhookProps = Omit ( path={`/repos/${repo_ref}/webhooks/${webhook_id}`} - base={getConfig('code')} + base={getConfig('code/api/v1')} {...props} /> ) @@ -3387,7 +3407,7 @@ export type UseGetWebhookProps = Omit< export const useGetWebhook = ({ repo_ref, webhook_id, ...props }: UseGetWebhookProps) => useGet( (paramsInPath: GetWebhookPathParams) => `/repos/${paramsInPath.repo_ref}/webhooks/${paramsInPath.webhook_id}`, - { base: getConfig('code'), pathParams: { repo_ref, webhook_id }, ...props } + { base: getConfig('code/api/v1'), pathParams: { repo_ref, webhook_id }, ...props } ) export interface UpdateWebhookPathParams { @@ -3405,7 +3425,7 @@ export const UpdateWebhook = ({ repo_ref, webhook_id, ...props }: UpdateWebhookP verb="PATCH" path={`/repos/${repo_ref}/webhooks/${webhook_id}`} - base={getConfig('code')} + base={getConfig('code/api/v1')} {...props} /> ) @@ -3420,7 +3440,7 @@ export const useUpdateWebhook = ({ repo_ref, webhook_id, ...props }: UseUpdateWe useMutate( 'PATCH', (paramsInPath: UpdateWebhookPathParams) => `/repos/${paramsInPath.repo_ref}/webhooks/${paramsInPath.webhook_id}`, - { base: getConfig('code'), pathParams: { repo_ref, webhook_id }, ...props } + { base: getConfig('code/api/v1'), pathParams: { repo_ref, webhook_id }, ...props } ) export interface ListWebhookExecutionsQueryParams { @@ -3448,7 +3468,7 @@ export type ListWebhookExecutionsProps = Omit< export const ListWebhookExecutions = ({ repo_ref, webhook_id, ...props }: ListWebhookExecutionsProps) => ( path={`/repos/${repo_ref}/webhooks/${webhook_id}/executions`} - base={getConfig('code')} + base={getConfig('code/api/v1')} {...props} /> ) @@ -3468,7 +3488,7 @@ export const useListWebhookExecutions = ({ repo_ref, webhook_id, ...props }: Use useGet( (paramsInPath: ListWebhookExecutionsPathParams) => `/repos/${paramsInPath.repo_ref}/webhooks/${paramsInPath.webhook_id}/executions`, - { base: getConfig('code'), pathParams: { repo_ref, webhook_id }, ...props } + { base: getConfig('code/api/v1'), pathParams: { repo_ref, webhook_id }, ...props } ) export interface GetWebhookExecutionQueryParams { @@ -3502,7 +3522,7 @@ export const GetWebhookExecution = ({ }: GetWebhookExecutionProps) => ( path={`/repos/${repo_ref}/webhooks/${webhook_id}/executions/${webhook_execution_id}`} - base={getConfig('code')} + base={getConfig('code/api/v1')} {...props} /> ) @@ -3522,19 +3542,19 @@ export const useGetWebhookExecution = ({ useGet( (paramsInPath: GetWebhookExecutionPathParams) => `/repos/${paramsInPath.repo_ref}/webhooks/${paramsInPath.webhook_id}/executions/${paramsInPath.webhook_execution_id}`, - { base: getConfig('code'), pathParams: { repo_ref, webhook_id, webhook_execution_id }, ...props } + { base: getConfig('code/api/v1'), pathParams: { repo_ref, webhook_id, webhook_execution_id }, ...props } ) export type ListGitignoreProps = Omit, 'path'> export const ListGitignore = (props: ListGitignoreProps) => ( - path={`/resources/gitignore`} base={getConfig('code')} {...props} /> + path={`/resources/gitignore`} base={getConfig('code/api/v1')} {...props} /> ) export type UseListGitignoreProps = Omit, 'path'> export const useListGitignore = (props: UseListGitignoreProps) => - useGet(`/resources/gitignore`, { base: getConfig('code'), ...props }) + useGet(`/resources/gitignore`, { base: getConfig('code/api/v1'), ...props }) export interface ListLicensesResponse { label?: string @@ -3547,7 +3567,7 @@ export type ListLicensesProps = Omit ( path={`/resources/license`} - base={getConfig('code')} + base={getConfig('code/api/v1')} {...props} /> ) @@ -3555,7 +3575,10 @@ export const ListLicenses = (props: ListLicensesProps) => ( export type UseListLicensesProps = Omit, 'path'> export const useListLicenses = (props: UseListLicensesProps) => - useGet(`/resources/license`, { base: getConfig('code'), ...props }) + useGet(`/resources/license`, { + base: getConfig('code/api/v1'), + ...props + }) export type CreateSecretProps = Omit< MutateProps, @@ -3566,7 +3589,7 @@ export const CreateSecret = (props: CreateSecretProps) => ( verb="POST" path={`/secrets`} - base={getConfig('code')} + base={getConfig('code/api/v1')} {...props} /> ) @@ -3578,7 +3601,7 @@ export type UseCreateSecretProps = Omit< export const useCreateSecret = (props: UseCreateSecretProps) => useMutate('POST', `/secrets`, { - base: getConfig('code'), + base: getConfig('code/api/v1'), ...props }) @@ -3588,7 +3611,7 @@ export const DeleteSecret = (props: DeleteSecretProps) => ( verb="DELETE" path={`/secrets`} - base={getConfig('code')} + base={getConfig('code/api/v1')} {...props} /> ) @@ -3596,7 +3619,10 @@ export const DeleteSecret = (props: DeleteSecretProps) => ( export type UseDeleteSecretProps = Omit, 'path' | 'verb'> export const useDeleteSecret = (props: UseDeleteSecretProps) => - useMutate('DELETE', `/secrets`, { base: getConfig('code'), ...props }) + useMutate('DELETE', `/secrets`, { + base: getConfig('code/api/v1'), + ...props + }) export interface FindSecretPathParams { secret_ref: string @@ -3608,7 +3634,7 @@ export type FindSecretProps = Omit ( path={`/secrets/${secret_ref}`} - base={getConfig('code')} + base={getConfig('code/api/v1')} {...props} /> ) @@ -3619,7 +3645,7 @@ export type UseFindSecretProps = Omit useGet( (paramsInPath: FindSecretPathParams) => `/secrets/${paramsInPath.secret_ref}`, - { base: getConfig('code'), pathParams: { secret_ref }, ...props } + { base: getConfig('code/api/v1'), pathParams: { secret_ref }, ...props } ) export interface UpdateSecretPathParams { @@ -3636,7 +3662,7 @@ export const UpdateSecret = ({ secret_ref, ...props }: UpdateSecretProps) => ( verb="PATCH" path={`/secrets/${secret_ref}`} - base={getConfig('code')} + base={getConfig('code/api/v1')} {...props} /> ) @@ -3651,7 +3677,7 @@ export const useUpdateSecret = ({ secret_ref, ...props }: UseUpdateSecretProps) useMutate( 'PATCH', (paramsInPath: UpdateSecretPathParams) => `/secrets/${paramsInPath.secret_ref}`, - { base: getConfig('code'), pathParams: { secret_ref }, ...props } + { base: getConfig('code/api/v1'), pathParams: { secret_ref }, ...props } ) export type CreateSpaceProps = Omit< @@ -3663,7 +3689,7 @@ export const CreateSpace = (props: CreateSpaceProps) => ( verb="POST" path={`/spaces`} - base={getConfig('code')} + base={getConfig('code/api/v1')} {...props} /> ) @@ -3675,7 +3701,7 @@ export type UseCreateSpaceProps = Omit< export const useCreateSpace = (props: UseCreateSpaceProps) => useMutate('POST', `/spaces`, { - base: getConfig('code'), + base: getConfig('code/api/v1'), ...props }) @@ -3685,7 +3711,7 @@ export const DeleteSpace = (props: DeleteSpaceProps) => ( verb="DELETE" path={`/spaces`} - base={getConfig('code')} + base={getConfig('code/api/v1')} {...props} /> ) @@ -3693,7 +3719,7 @@ export const DeleteSpace = (props: DeleteSpaceProps) => ( export type UseDeleteSpaceProps = Omit, 'path' | 'verb'> export const useDeleteSpace = (props: UseDeleteSpaceProps) => - useMutate('DELETE', `/spaces`, { base: getConfig('code'), ...props }) + useMutate('DELETE', `/spaces`, { base: getConfig('code/api/v1'), ...props }) export interface GetSpacePathParams { space_ref: string @@ -3705,7 +3731,7 @@ export type GetSpaceProps = Omit ( path={`/spaces/${space_ref}`} - base={getConfig('code')} + base={getConfig('code/api/v1')} {...props} /> ) @@ -3716,7 +3742,7 @@ export type UseGetSpaceProps = Omit useGet( (paramsInPath: GetSpacePathParams) => `/spaces/${paramsInPath.space_ref}`, - { base: getConfig('code'), pathParams: { space_ref }, ...props } + { base: getConfig('code/api/v1'), pathParams: { space_ref }, ...props } ) export interface UpdateSpacePathParams { @@ -3733,7 +3759,7 @@ export const UpdateSpace = ({ space_ref, ...props }: UpdateSpaceProps) => ( verb="PATCH" path={`/spaces/${space_ref}`} - base={getConfig('code')} + base={getConfig('code/api/v1')} {...props} /> ) @@ -3748,7 +3774,7 @@ export const useUpdateSpace = ({ space_ref, ...props }: UseUpdateSpaceProps) => useMutate( 'PATCH', (paramsInPath: UpdateSpacePathParams) => `/spaces/${paramsInPath.space_ref}`, - { base: getConfig('code'), pathParams: { space_ref }, ...props } + { base: getConfig('code/api/v1'), pathParams: { space_ref }, ...props } ) export interface MembershipListQueryParams { @@ -3787,7 +3813,7 @@ export type MembershipListProps = Omit< export const MembershipList = ({ space_ref, ...props }: MembershipListProps) => ( path={`/spaces/${space_ref}/members`} - base={getConfig('code')} + base={getConfig('code/api/v1')} {...props} /> ) @@ -3801,7 +3827,7 @@ export type UseMembershipListProps = Omit< export const useMembershipList = ({ space_ref, ...props }: UseMembershipListProps) => useGet( (paramsInPath: MembershipListPathParams) => `/spaces/${paramsInPath.space_ref}/members`, - { base: getConfig('code'), pathParams: { space_ref }, ...props } + { base: getConfig('code/api/v1'), pathParams: { space_ref }, ...props } ) export interface MembershipAddPathParams { @@ -3823,7 +3849,7 @@ export const MembershipAdd = ({ space_ref, ...props }: MembershipAddProps) => ( verb="POST" path={`/spaces/${space_ref}/members`} - base={getConfig('code')} + base={getConfig('code/api/v1')} {...props} /> ) @@ -3838,7 +3864,7 @@ export const useMembershipAdd = ({ space_ref, ...props }: UseMembershipAddProps) useMutate( 'POST', (paramsInPath: MembershipAddPathParams) => `/spaces/${paramsInPath.space_ref}/members`, - { base: getConfig('code'), pathParams: { space_ref }, ...props } + { base: getConfig('code/api/v1'), pathParams: { space_ref }, ...props } ) export interface MembershipDeletePathParams { @@ -3855,7 +3881,7 @@ export const MembershipDelete = ({ space_ref, ...props }: MembershipDeleteProps) verb="DELETE" path={`/spaces/${space_ref}/members`} - base={getConfig('code')} + base={getConfig('code/api/v1')} {...props} /> ) @@ -3870,7 +3896,7 @@ export const useMembershipDelete = ({ space_ref, ...props }: UseMembershipDelete useMutate( 'DELETE', (paramsInPath: MembershipDeletePathParams) => `/spaces/${paramsInPath.space_ref}/members`, - { base: getConfig('code'), pathParams: { space_ref }, ...props } + { base: getConfig('code/api/v1'), pathParams: { space_ref }, ...props } ) export interface MembershipUpdatePathParams { @@ -3892,7 +3918,7 @@ export const MembershipUpdate = ({ space_ref, user_uid, ...props }: MembershipUp verb="PATCH" path={`/spaces/${space_ref}/members/${user_uid}`} - base={getConfig('code')} + base={getConfig('code/api/v1')} {...props} /> ) @@ -3907,7 +3933,7 @@ export const useMembershipUpdate = ({ space_ref, user_uid, ...props }: UseMember useMutate( 'PATCH', (paramsInPath: MembershipUpdatePathParams) => `/spaces/${paramsInPath.space_ref}/members/${paramsInPath.user_uid}`, - { base: getConfig('code'), pathParams: { space_ref, user_uid }, ...props } + { base: getConfig('code/api/v1'), pathParams: { space_ref, user_uid }, ...props } ) export interface MoveSpacePathParams { @@ -3924,7 +3950,7 @@ export const MoveSpace = ({ space_ref, ...props }: MoveSpaceProps) => ( verb="POST" path={`/spaces/${space_ref}/move`} - base={getConfig('code')} + base={getConfig('code/api/v1')} {...props} /> ) @@ -3939,7 +3965,7 @@ export const useMoveSpace = ({ space_ref, ...props }: UseMoveSpaceProps) => useMutate( 'POST', (paramsInPath: MoveSpacePathParams) => `/spaces/${paramsInPath.space_ref}/move`, - { base: getConfig('code'), pathParams: { space_ref }, ...props } + { base: getConfig('code/api/v1'), pathParams: { space_ref }, ...props } ) export interface ListPathsQueryParams { @@ -3966,7 +3992,7 @@ export type ListPathsProps = Omit< export const ListPaths = ({ space_ref, ...props }: ListPathsProps) => ( path={`/spaces/${space_ref}/paths`} - base={getConfig('code')} + base={getConfig('code/api/v1')} {...props} /> ) @@ -3980,7 +4006,7 @@ export type UseListPathsProps = Omit< export const useListPaths = ({ space_ref, ...props }: UseListPathsProps) => useGet( (paramsInPath: ListPathsPathParams) => `/spaces/${paramsInPath.space_ref}/paths`, - { base: getConfig('code'), pathParams: { space_ref }, ...props } + { base: getConfig('code/api/v1'), pathParams: { space_ref }, ...props } ) export interface CreatePathPathParams { @@ -3997,7 +4023,7 @@ export const CreatePath = ({ space_ref, ...props }: CreatePathProps) => ( verb="POST" path={`/spaces/${space_ref}/paths`} - base={getConfig('code')} + base={getConfig('code/api/v1')} {...props} /> ) @@ -4012,7 +4038,7 @@ export const useCreatePath = ({ space_ref, ...props }: UseCreatePathProps) => useMutate( 'POST', (paramsInPath: CreatePathPathParams) => `/spaces/${paramsInPath.space_ref}/paths`, - { base: getConfig('code'), pathParams: { space_ref }, ...props } + { base: getConfig('code/api/v1'), pathParams: { space_ref }, ...props } ) export interface DeletePathPathParams { @@ -4029,7 +4055,7 @@ export const DeletePath = ({ space_ref, ...props }: DeletePathProps) => ( verb="DELETE" path={`/spaces/${space_ref}/paths`} - base={getConfig('code')} + base={getConfig('code/api/v1')} {...props} /> ) @@ -4044,7 +4070,7 @@ export const useDeletePath = ({ space_ref, ...props }: UseDeletePathProps) => useMutate( 'DELETE', (paramsInPath: DeletePathPathParams) => `/spaces/${paramsInPath.space_ref}/paths`, - { base: getConfig('code'), pathParams: { space_ref }, ...props } + { base: getConfig('code/api/v1'), pathParams: { space_ref }, ...props } ) export interface ListPipelinesQueryParams { @@ -4075,7 +4101,7 @@ export type ListPipelinesProps = Omit< export const ListPipelines = ({ space_ref, ...props }: ListPipelinesProps) => ( path={`/spaces/${space_ref}/pipelines`} - base={getConfig('code')} + base={getConfig('code/api/v1')} {...props} /> ) @@ -4089,7 +4115,7 @@ export type UseListPipelinesProps = Omit< export const useListPipelines = ({ space_ref, ...props }: UseListPipelinesProps) => useGet( (paramsInPath: ListPipelinesPathParams) => `/spaces/${paramsInPath.space_ref}/pipelines`, - { base: getConfig('code'), pathParams: { space_ref }, ...props } + { base: getConfig('code/api/v1'), pathParams: { space_ref }, ...props } ) export interface ListReposQueryParams { @@ -4128,7 +4154,7 @@ export type ListReposProps = Omit< export const ListRepos = ({ space_ref, ...props }: ListReposProps) => ( path={`/spaces/${space_ref}/repos`} - base={getConfig('code')} + base={getConfig('code/api/v1')} {...props} /> ) @@ -4142,7 +4168,7 @@ export type UseListReposProps = Omit< export const useListRepos = ({ space_ref, ...props }: UseListReposProps) => useGet( (paramsInPath: ListReposPathParams) => `/spaces/${paramsInPath.space_ref}/repos`, - { base: getConfig('code'), pathParams: { space_ref }, ...props } + { base: getConfig('code/api/v1'), pathParams: { space_ref }, ...props } ) export interface ListSecretsQueryParams { @@ -4173,7 +4199,7 @@ export type ListSecretsProps = Omit< export const ListSecrets = ({ space_ref, ...props }: ListSecretsProps) => ( path={`/spaces/${space_ref}/secrets`} - base={getConfig('code')} + base={getConfig('code/api/v1')} {...props} /> ) @@ -4187,7 +4213,7 @@ export type UseListSecretsProps = Omit< export const useListSecrets = ({ space_ref, ...props }: UseListSecretsProps) => useGet( (paramsInPath: ListSecretsPathParams) => `/spaces/${paramsInPath.space_ref}/secrets`, - { base: getConfig('code'), pathParams: { space_ref }, ...props } + { base: getConfig('code/api/v1'), pathParams: { space_ref }, ...props } ) export interface ListServiceAccountsPathParams { @@ -4203,7 +4229,7 @@ export type ListServiceAccountsProps = Omit< export const ListServiceAccounts = ({ space_ref, ...props }: ListServiceAccountsProps) => ( path={`/spaces/${space_ref}/service-accounts`} - base={getConfig('code')} + base={getConfig('code/api/v1')} {...props} /> ) @@ -4217,7 +4243,7 @@ export type UseListServiceAccountsProps = Omit< export const useListServiceAccounts = ({ space_ref, ...props }: UseListServiceAccountsProps) => useGet( (paramsInPath: ListServiceAccountsPathParams) => `/spaces/${paramsInPath.space_ref}/service-accounts`, - { base: getConfig('code'), pathParams: { space_ref }, ...props } + { base: getConfig('code/api/v1'), pathParams: { space_ref }, ...props } ) export interface ListSpacesQueryParams { @@ -4256,7 +4282,7 @@ export type ListSpacesProps = Omit< export const ListSpaces = ({ space_ref, ...props }: ListSpacesProps) => ( path={`/spaces/${space_ref}/spaces`} - base={getConfig('code')} + base={getConfig('code/api/v1')} {...props} /> ) @@ -4270,30 +4296,34 @@ export type UseListSpacesProps = Omit< export const useListSpaces = ({ space_ref, ...props }: UseListSpacesProps) => useGet( (paramsInPath: ListSpacesPathParams) => `/spaces/${paramsInPath.space_ref}/spaces`, - { base: getConfig('code'), pathParams: { space_ref }, ...props } + { base: getConfig('code/api/v1'), pathParams: { space_ref }, ...props } ) export type GetSystemConfigProps = Omit, 'path'> export const GetSystemConfig = (props: GetSystemConfigProps) => ( - path={`/system/config`} base={getConfig('code')} {...props} /> + + path={`/system/config`} + base={getConfig('code/api/v1')} + {...props} + /> ) export type UseGetSystemConfigProps = Omit, 'path'> export const useGetSystemConfig = (props: UseGetSystemConfigProps) => - useGet(`/system/config`, { base: getConfig('code'), ...props }) + useGet(`/system/config`, { base: getConfig('code/api/v1'), ...props }) export type GetUserProps = Omit, 'path'> export const GetUser = (props: GetUserProps) => ( - path={`/user`} base={getConfig('code')} {...props} /> + path={`/user`} base={getConfig('code/api/v1')} {...props} /> ) export type UseGetUserProps = Omit, 'path'> export const useGetUser = (props: UseGetUserProps) => - useGet(`/user`, { base: getConfig('code'), ...props }) + useGet(`/user`, { base: getConfig('code/api/v1'), ...props }) export type UpdateUserProps = Omit, 'path' | 'verb'> @@ -4301,7 +4331,7 @@ export const UpdateUser = (props: UpdateUserProps) => ( verb="PATCH" path={`/user`} - base={getConfig('code')} + base={getConfig('code/api/v1')} {...props} /> ) @@ -4313,7 +4343,7 @@ export type UseUpdateUserProps = Omit< export const useUpdateUser = (props: UseUpdateUserProps) => useMutate('PATCH', `/user`, { - base: getConfig('code'), + base: getConfig('code/api/v1'), ...props }) @@ -4322,7 +4352,7 @@ export type MembershipSpacesProps = Omit ( path={`/user/memberships`} - base={getConfig('code')} + base={getConfig('code/api/v1')} {...props} /> ) @@ -4330,7 +4360,10 @@ export const MembershipSpaces = (props: MembershipSpacesProps) => ( export type UseMembershipSpacesProps = Omit, 'path'> export const useMembershipSpaces = (props: UseMembershipSpacesProps) => - useGet(`/user/memberships`, { base: getConfig('code'), ...props }) + useGet(`/user/memberships`, { + base: getConfig('code/api/v1'), + ...props + }) export type CreateTokenProps = Omit< MutateProps, @@ -4341,7 +4374,7 @@ export const CreateToken = (props: CreateTokenProps) => ( verb="POST" path={`/user/token`} - base={getConfig('code')} + base={getConfig('code/api/v1')} {...props} /> ) @@ -4353,6 +4386,6 @@ export type UseCreateTokenProps = Omit< export const useCreateToken = (props: UseCreateTokenProps) => useMutate('POST', `/user/token`, { - base: getConfig('code'), + base: getConfig('code/api/v1'), ...props })