|
|
@@ -18,7 +18,7 @@ const connectECRRegistry = baseApi<
|
|
|
aws_integration_id: string;
|
|
|
},
|
|
|
{ id: number }
|
|
|
->("POST", (pathParams) => {
|
|
|
+>("POST", pathParams => {
|
|
|
return `/api/projects/${pathParams.id}/registries`;
|
|
|
});
|
|
|
|
|
|
@@ -29,7 +29,7 @@ const connectGCRRegistry = baseApi<
|
|
|
url: string;
|
|
|
},
|
|
|
{ id: number }
|
|
|
->("POST", (pathParams) => {
|
|
|
+>("POST", pathParams => {
|
|
|
return `/api/projects/${pathParams.id}/registries`;
|
|
|
});
|
|
|
|
|
|
@@ -41,7 +41,7 @@ const createAWSIntegration = baseApi<
|
|
|
aws_secret_access_key: string;
|
|
|
},
|
|
|
{ id: number }
|
|
|
->("POST", (pathParams) => {
|
|
|
+>("POST", pathParams => {
|
|
|
return `/api/projects/${pathParams.id}/integrations/aws`;
|
|
|
});
|
|
|
|
|
|
@@ -54,7 +54,7 @@ const createDOCR = baseApi<
|
|
|
{
|
|
|
project_id: number;
|
|
|
}
|
|
|
->("POST", (pathParams) => {
|
|
|
+>("POST", pathParams => {
|
|
|
return `/api/projects/${pathParams.project_id}/provision/docr`;
|
|
|
});
|
|
|
|
|
|
@@ -67,11 +67,11 @@ const createDOKS = baseApi<
|
|
|
{
|
|
|
project_id: number;
|
|
|
}
|
|
|
->("POST", (pathParams) => {
|
|
|
+>("POST", pathParams => {
|
|
|
return `/api/projects/${pathParams.project_id}/provision/doks`;
|
|
|
});
|
|
|
|
|
|
-const createEmailVerification = baseApi<{}, {}>("POST", (pathParams) => {
|
|
|
+const createEmailVerification = baseApi<{}, {}>("POST", pathParams => {
|
|
|
return `/api/email/verify/initiate`;
|
|
|
});
|
|
|
|
|
|
@@ -84,7 +84,7 @@ const createGCPIntegration = baseApi<
|
|
|
{
|
|
|
project_id: number;
|
|
|
}
|
|
|
->("POST", (pathParams) => {
|
|
|
+>("POST", pathParams => {
|
|
|
return `/api/projects/${pathParams.project_id}/integrations/gcp`;
|
|
|
});
|
|
|
|
|
|
@@ -95,7 +95,7 @@ const createGCR = baseApi<
|
|
|
{
|
|
|
project_id: number;
|
|
|
}
|
|
|
->("POST", (pathParams) => {
|
|
|
+>("POST", pathParams => {
|
|
|
return `/api/projects/${pathParams.project_id}/provision/gcr`;
|
|
|
});
|
|
|
|
|
|
@@ -115,7 +115,7 @@ const createGHAction = baseApi<
|
|
|
RELEASE_NAME: string;
|
|
|
RELEASE_NAMESPACE: string;
|
|
|
}
|
|
|
->("POST", (pathParams) => {
|
|
|
+>("POST", pathParams => {
|
|
|
let { project_id, CLUSTER_ID, RELEASE_NAME, RELEASE_NAMESPACE } = pathParams;
|
|
|
return `/api/projects/${project_id}/ci/actions?cluster_id=${CLUSTER_ID}&name=${RELEASE_NAME}&namespace=${RELEASE_NAMESPACE}`;
|
|
|
});
|
|
|
@@ -128,7 +128,7 @@ const createGKE = baseApi<
|
|
|
{
|
|
|
project_id: number;
|
|
|
}
|
|
|
->("POST", (pathParams) => {
|
|
|
+>("POST", pathParams => {
|
|
|
return `/api/projects/${pathParams.project_id}/provision/gke`;
|
|
|
});
|
|
|
|
|
|
@@ -139,34 +139,43 @@ const createInvite = baseApi<
|
|
|
{
|
|
|
id: number;
|
|
|
}
|
|
|
->("POST", (pathParams) => {
|
|
|
+>("POST", pathParams => {
|
|
|
return `/api/projects/${pathParams.id}/invites`;
|
|
|
});
|
|
|
|
|
|
-const createPasswordReset = baseApi<{
|
|
|
- email: string
|
|
|
-}, {}>("POST", (pathParams) => {
|
|
|
+const createPasswordReset = baseApi<
|
|
|
+ {
|
|
|
+ email: string;
|
|
|
+ },
|
|
|
+ {}
|
|
|
+>("POST", pathParams => {
|
|
|
return `/api/password/reset/initiate`;
|
|
|
});
|
|
|
|
|
|
-const createPasswordResetVerify = baseApi<{
|
|
|
- email: string;
|
|
|
- token: string;
|
|
|
- token_id: number;
|
|
|
-}, {}>("POST", (pathParams) => {
|
|
|
+const createPasswordResetVerify = baseApi<
|
|
|
+ {
|
|
|
+ email: string;
|
|
|
+ token: string;
|
|
|
+ token_id: number;
|
|
|
+ },
|
|
|
+ {}
|
|
|
+>("POST", pathParams => {
|
|
|
return `/api/password/reset/verify`;
|
|
|
});
|
|
|
|
|
|
-const createPasswordResetFinalize = baseApi<{
|
|
|
- email: string;
|
|
|
- token: string;
|
|
|
- token_id: number;
|
|
|
- new_password: string;
|
|
|
-}, {}>("POST", (pathParams) => {
|
|
|
+const createPasswordResetFinalize = baseApi<
|
|
|
+ {
|
|
|
+ email: string;
|
|
|
+ token: string;
|
|
|
+ token_id: number;
|
|
|
+ new_password: string;
|
|
|
+ },
|
|
|
+ {}
|
|
|
+>("POST", pathParams => {
|
|
|
return `/api/password/reset/finalize`;
|
|
|
});
|
|
|
|
|
|
-const createProject = baseApi<{ name: string }, {}>("POST", (pathParams) => {
|
|
|
+const createProject = baseApi<{ name: string }, {}>("POST", pathParams => {
|
|
|
return `/api/projects`;
|
|
|
});
|
|
|
|
|
|
@@ -178,7 +187,7 @@ const createSubdomain = baseApi<
|
|
|
id: number;
|
|
|
cluster_id: number;
|
|
|
}
|
|
|
->("POST", (pathParams) => {
|
|
|
+>("POST", pathParams => {
|
|
|
let { cluster_id, id } = pathParams;
|
|
|
|
|
|
return `/api/projects/${id}/k8s/subdomain?cluster_id=${cluster_id}`;
|
|
|
@@ -190,18 +199,18 @@ const deleteCluster = baseApi<
|
|
|
project_id: number;
|
|
|
cluster_id: number;
|
|
|
}
|
|
|
->("DELETE", (pathParams) => {
|
|
|
+>("DELETE", pathParams => {
|
|
|
return `/api/projects/${pathParams.project_id}/clusters/${pathParams.cluster_id}`;
|
|
|
});
|
|
|
|
|
|
const deleteInvite = baseApi<{}, { id: number; invId: number }>(
|
|
|
"DELETE",
|
|
|
- (pathParams) => {
|
|
|
+ pathParams => {
|
|
|
return `/api/projects/${pathParams.id}/invites/${pathParams.invId}`;
|
|
|
}
|
|
|
);
|
|
|
|
|
|
-const deleteProject = baseApi<{}, { id: number }>("DELETE", (pathParams) => {
|
|
|
+const deleteProject = baseApi<{}, { id: number }>("DELETE", pathParams => {
|
|
|
return `/api/projects/${pathParams.id}`;
|
|
|
});
|
|
|
|
|
|
@@ -221,7 +230,7 @@ const deployTemplate = baseApi<
|
|
|
version: string;
|
|
|
repo_url?: string;
|
|
|
}
|
|
|
->("POST", (pathParams) => {
|
|
|
+>("POST", pathParams => {
|
|
|
let { cluster_id, id, name, version, repo_url } = pathParams;
|
|
|
|
|
|
if (repo_url) {
|
|
|
@@ -238,7 +247,7 @@ const destroyCluster = baseApi<
|
|
|
project_id: number;
|
|
|
infra_id: number;
|
|
|
}
|
|
|
->("POST", (pathParams) => {
|
|
|
+>("POST", pathParams => {
|
|
|
return `/api/projects/${pathParams.project_id}/infra/${pathParams.infra_id}/eks/destroy`;
|
|
|
});
|
|
|
|
|
|
@@ -254,7 +263,7 @@ const getBranchContents = baseApi<
|
|
|
name: string;
|
|
|
branch: string;
|
|
|
}
|
|
|
->("GET", (pathParams) => {
|
|
|
+>("GET", pathParams => {
|
|
|
return `/api/projects/${pathParams.project_id}/gitrepos/${pathParams.git_repo_id}/repos/${pathParams.kind}/${pathParams.owner}/${pathParams.name}/${pathParams.branch}/contents`;
|
|
|
});
|
|
|
|
|
|
@@ -267,7 +276,7 @@ const getBranches = baseApi<
|
|
|
owner: string;
|
|
|
name: string;
|
|
|
}
|
|
|
->("GET", (pathParams) => {
|
|
|
+>("GET", pathParams => {
|
|
|
return `/api/projects/${pathParams.project_id}/gitrepos/${pathParams.git_repo_id}/repos/${pathParams.kind}/${pathParams.owner}/${pathParams.name}/branches`;
|
|
|
});
|
|
|
|
|
|
@@ -278,7 +287,7 @@ const getChart = baseApi<
|
|
|
storage: StorageType;
|
|
|
},
|
|
|
{ id: number; name: string; revision: number }
|
|
|
->("GET", (pathParams) => {
|
|
|
+>("GET", pathParams => {
|
|
|
return `/api/projects/${pathParams.id}/releases/${pathParams.name}/${pathParams.revision}`;
|
|
|
});
|
|
|
|
|
|
@@ -293,7 +302,7 @@ const getCharts = baseApi<
|
|
|
statusFilter: string[];
|
|
|
},
|
|
|
{ id: number }
|
|
|
->("GET", (pathParams) => {
|
|
|
+>("GET", pathParams => {
|
|
|
return `/api/projects/${pathParams.id}/releases`;
|
|
|
});
|
|
|
|
|
|
@@ -304,7 +313,7 @@ const getChartComponents = baseApi<
|
|
|
storage: StorageType;
|
|
|
},
|
|
|
{ id: number; name: string; revision: number }
|
|
|
->("GET", (pathParams) => {
|
|
|
+>("GET", pathParams => {
|
|
|
return `/api/projects/${pathParams.id}/releases/${pathParams.name}/${pathParams.revision}/components`;
|
|
|
});
|
|
|
|
|
|
@@ -315,13 +324,13 @@ const getChartControllers = baseApi<
|
|
|
storage: StorageType;
|
|
|
},
|
|
|
{ id: number; name: string; revision: number }
|
|
|
->("GET", (pathParams) => {
|
|
|
+>("GET", pathParams => {
|
|
|
return `/api/projects/${pathParams.id}/releases/${pathParams.name}/${pathParams.revision}/controllers`;
|
|
|
});
|
|
|
|
|
|
const getClusterIntegrations = baseApi("GET", "/api/integrations/cluster");
|
|
|
|
|
|
-const getClusters = baseApi<{}, { id: number }>("GET", (pathParams) => {
|
|
|
+const getClusters = baseApi<{}, { id: number }>("GET", pathParams => {
|
|
|
return `/api/projects/${pathParams.id}/clusters`;
|
|
|
});
|
|
|
|
|
|
@@ -331,7 +340,7 @@ const getGitRepoList = baseApi<
|
|
|
project_id: number;
|
|
|
git_repo_id: number;
|
|
|
}
|
|
|
->("GET", (pathParams) => {
|
|
|
+>("GET", pathParams => {
|
|
|
return `/api/projects/${pathParams.project_id}/gitrepos/${pathParams.git_repo_id}/repos`;
|
|
|
});
|
|
|
|
|
|
@@ -340,7 +349,7 @@ const getGitRepos = baseApi<
|
|
|
{
|
|
|
project_id: number;
|
|
|
}
|
|
|
->("GET", (pathParams) => {
|
|
|
+>("GET", pathParams => {
|
|
|
return `/api/projects/${pathParams.project_id}/gitrepos`;
|
|
|
});
|
|
|
|
|
|
@@ -350,7 +359,7 @@ const getImageRepos = baseApi<
|
|
|
project_id: number;
|
|
|
registry_id: number;
|
|
|
}
|
|
|
->("GET", (pathParams) => {
|
|
|
+>("GET", pathParams => {
|
|
|
return `/api/projects/${pathParams.project_id}/registries/${pathParams.registry_id}/repositories`;
|
|
|
});
|
|
|
|
|
|
@@ -361,7 +370,7 @@ const getImageTags = baseApi<
|
|
|
registry_id: number;
|
|
|
repo_name: string;
|
|
|
}
|
|
|
->("GET", (pathParams) => {
|
|
|
+>("GET", pathParams => {
|
|
|
return `/api/projects/${pathParams.project_id}/registries/${pathParams.registry_id}/repositories/${pathParams.repo_name}`;
|
|
|
});
|
|
|
|
|
|
@@ -370,7 +379,7 @@ const getInfra = baseApi<
|
|
|
{
|
|
|
project_id: number;
|
|
|
}
|
|
|
->("GET", (pathParams) => {
|
|
|
+>("GET", pathParams => {
|
|
|
return `/api/projects/${pathParams.project_id}/infra`;
|
|
|
});
|
|
|
|
|
|
@@ -379,11 +388,11 @@ const getIngress = baseApi<
|
|
|
cluster_id: number;
|
|
|
},
|
|
|
{ name: string; namespace: string; id: number }
|
|
|
->("GET", (pathParams) => {
|
|
|
+>("GET", pathParams => {
|
|
|
return `/api/projects/${pathParams.id}/k8s/${pathParams.namespace}/ingress/${pathParams.name}`;
|
|
|
});
|
|
|
|
|
|
-const getInvites = baseApi<{}, { id: number }>("GET", (pathParams) => {
|
|
|
+const getInvites = baseApi<{}, { id: number }>("GET", pathParams => {
|
|
|
return `/api/projects/${pathParams.id}/invites`;
|
|
|
});
|
|
|
|
|
|
@@ -393,7 +402,7 @@ const getMatchingPods = baseApi<
|
|
|
selectors: string[];
|
|
|
},
|
|
|
{ id: number }
|
|
|
->("GET", (pathParams) => {
|
|
|
+>("GET", pathParams => {
|
|
|
return `/api/projects/${pathParams.id}/k8s/pods`;
|
|
|
});
|
|
|
|
|
|
@@ -409,7 +418,7 @@ const getMetrics = baseApi<
|
|
|
resolution: string;
|
|
|
},
|
|
|
{ id: number }
|
|
|
->("GET", (pathParams) => {
|
|
|
+>("GET", pathParams => {
|
|
|
return `/api/projects/${pathParams.id}/k8s/metrics`;
|
|
|
});
|
|
|
|
|
|
@@ -418,7 +427,7 @@ const getNamespaces = baseApi<
|
|
|
cluster_id: number;
|
|
|
},
|
|
|
{ id: number }
|
|
|
->("GET", (pathParams) => {
|
|
|
+>("GET", pathParams => {
|
|
|
return `/api/projects/${pathParams.id}/k8s/namespaces`;
|
|
|
});
|
|
|
|
|
|
@@ -427,26 +436,23 @@ const getOAuthIds = baseApi<
|
|
|
{
|
|
|
project_id: number;
|
|
|
}
|
|
|
->("GET", (pathParams) => {
|
|
|
+>("GET", pathParams => {
|
|
|
return `/api/projects/${pathParams.project_id}/integrations/oauth`;
|
|
|
});
|
|
|
|
|
|
-const getProjectClusters = baseApi<{}, { id: number }>("GET", (pathParams) => {
|
|
|
+const getProjectClusters = baseApi<{}, { id: number }>("GET", pathParams => {
|
|
|
return `/api/projects/${pathParams.id}/clusters`;
|
|
|
});
|
|
|
|
|
|
-const getProjectRegistries = baseApi<{}, { id: number }>(
|
|
|
- "GET",
|
|
|
- (pathParams) => {
|
|
|
- return `/api/projects/${pathParams.id}/registries`;
|
|
|
- }
|
|
|
-);
|
|
|
+const getProjectRegistries = baseApi<{}, { id: number }>("GET", pathParams => {
|
|
|
+ return `/api/projects/${pathParams.id}/registries`;
|
|
|
+});
|
|
|
|
|
|
-const getProjectRepos = baseApi<{}, { id: number }>("GET", (pathParams) => {
|
|
|
+const getProjectRepos = baseApi<{}, { id: number }>("GET", pathParams => {
|
|
|
return `/api/projects/${pathParams.id}/repos`;
|
|
|
});
|
|
|
|
|
|
-const getProjects = baseApi<{}, { id: number }>("GET", (pathParams) => {
|
|
|
+const getProjects = baseApi<{}, { id: number }>("GET", pathParams => {
|
|
|
return `/api/users/${pathParams.id}/projects`;
|
|
|
});
|
|
|
|
|
|
@@ -455,7 +461,7 @@ const getPrometheusIsInstalled = baseApi<
|
|
|
cluster_id: number;
|
|
|
},
|
|
|
{ id: number }
|
|
|
->("GET", (pathParams) => {
|
|
|
+>("GET", pathParams => {
|
|
|
return `/api/projects/${pathParams.id}/k8s/prometheus/detect`;
|
|
|
});
|
|
|
|
|
|
@@ -468,7 +474,7 @@ const getReleaseToken = baseApi<
|
|
|
storage: StorageType;
|
|
|
},
|
|
|
{ name: string; id: number }
|
|
|
->("GET", (pathParams) => {
|
|
|
+>("GET", pathParams => {
|
|
|
return `/api/projects/${pathParams.id}/releases/${pathParams.name}/webhook_token`;
|
|
|
});
|
|
|
|
|
|
@@ -480,7 +486,7 @@ const destroyEKS = baseApi<
|
|
|
project_id: number;
|
|
|
infra_id: number;
|
|
|
}
|
|
|
->("POST", (pathParams) => {
|
|
|
+>("POST", pathParams => {
|
|
|
return `/api/projects/${pathParams.project_id}/infra/${pathParams.infra_id}/eks/destroy`;
|
|
|
});
|
|
|
|
|
|
@@ -492,7 +498,7 @@ const destroyGKE = baseApi<
|
|
|
project_id: number;
|
|
|
infra_id: number;
|
|
|
}
|
|
|
->("POST", (pathParams) => {
|
|
|
+>("POST", pathParams => {
|
|
|
return `/api/projects/${pathParams.project_id}/infra/${pathParams.infra_id}/gke/destroy`;
|
|
|
});
|
|
|
|
|
|
@@ -504,13 +510,13 @@ const destroyDOKS = baseApi<
|
|
|
project_id: number;
|
|
|
infra_id: number;
|
|
|
}
|
|
|
->("POST", (pathParams) => {
|
|
|
+>("POST", pathParams => {
|
|
|
return `/api/projects/${pathParams.project_id}/infra/${pathParams.infra_id}/doks/destroy`;
|
|
|
});
|
|
|
|
|
|
const getRepoIntegrations = baseApi("GET", "/api/integrations/repo");
|
|
|
|
|
|
-const getRepos = baseApi<{}, { id: number }>("GET", (pathParams) => {
|
|
|
+const getRepos = baseApi<{}, { id: number }>("GET", pathParams => {
|
|
|
return `/api/projects/${pathParams.id}/repos`;
|
|
|
});
|
|
|
|
|
|
@@ -521,7 +527,7 @@ const getRevisions = baseApi<
|
|
|
storage: StorageType;
|
|
|
},
|
|
|
{ id: number; name: string }
|
|
|
->("GET", (pathParams) => {
|
|
|
+>("GET", pathParams => {
|
|
|
return `/api/projects/${pathParams.id}/releases/${pathParams.name}/history`;
|
|
|
});
|
|
|
|
|
|
@@ -530,7 +536,7 @@ const getTemplateInfo = baseApi<
|
|
|
repo_url?: string;
|
|
|
},
|
|
|
{ name: string; version: string }
|
|
|
->("GET", (pathParams) => {
|
|
|
+>("GET", pathParams => {
|
|
|
return `/api/templates/${pathParams.name}/${pathParams.version}`;
|
|
|
});
|
|
|
|
|
|
@@ -543,7 +549,7 @@ const getApplicationTemplates = baseApi<
|
|
|
{}
|
|
|
>("GET", "/api/templates");
|
|
|
|
|
|
-const getUser = baseApi<{}, { id: number }>("GET", (pathParams) => {
|
|
|
+const getUser = baseApi<{}, { id: number }>("GET", pathParams => {
|
|
|
return `/api/users/${pathParams.id}`;
|
|
|
});
|
|
|
|
|
|
@@ -552,7 +558,7 @@ const linkGithubProject = baseApi<
|
|
|
{
|
|
|
project_id: number;
|
|
|
}
|
|
|
->("GET", (pathParams) => {
|
|
|
+>("GET", pathParams => {
|
|
|
return `/api/oauth/projects/${pathParams.project_id}/github`;
|
|
|
});
|
|
|
|
|
|
@@ -569,7 +575,7 @@ const provisionECR = baseApi<
|
|
|
aws_integration_id: string;
|
|
|
},
|
|
|
{ id: number }
|
|
|
->("POST", (pathParams) => {
|
|
|
+>("POST", pathParams => {
|
|
|
return `/api/projects/${pathParams.id}/provision/ecr`;
|
|
|
});
|
|
|
|
|
|
@@ -579,7 +585,7 @@ const provisionEKS = baseApi<
|
|
|
aws_integration_id: string;
|
|
|
},
|
|
|
{ id: number }
|
|
|
->("POST", (pathParams) => {
|
|
|
+>("POST", pathParams => {
|
|
|
return `/api/projects/${pathParams.id}/provision/eks`;
|
|
|
});
|
|
|
|
|
|
@@ -599,7 +605,7 @@ const rollbackChart = baseApi<
|
|
|
name: string;
|
|
|
cluster_id: number;
|
|
|
}
|
|
|
->("POST", (pathParams) => {
|
|
|
+>("POST", pathParams => {
|
|
|
let { id, name, cluster_id } = pathParams;
|
|
|
return `/api/projects/${id}/releases/${name}/rollback?cluster_id=${cluster_id}`;
|
|
|
});
|
|
|
@@ -613,7 +619,7 @@ const uninstallTemplate = baseApi<
|
|
|
namespace: string;
|
|
|
storage: StorageType;
|
|
|
}
|
|
|
->("POST", (pathParams) => {
|
|
|
+>("POST", pathParams => {
|
|
|
let { id, name, cluster_id, storage, namespace } = pathParams;
|
|
|
return `/api/projects/${id}/delete/${name}?cluster_id=${cluster_id}&namespace=${namespace}&storage=${storage}`;
|
|
|
});
|
|
|
@@ -624,7 +630,7 @@ const updateUser = baseApi<
|
|
|
allowedContexts?: string[];
|
|
|
},
|
|
|
{ id: number }
|
|
|
->("PUT", (pathParams) => {
|
|
|
+>("PUT", pathParams => {
|
|
|
return `/api/users/${pathParams.id}`;
|
|
|
});
|
|
|
|
|
|
@@ -639,7 +645,7 @@ const upgradeChartValues = baseApi<
|
|
|
name: string;
|
|
|
cluster_id: number;
|
|
|
}
|
|
|
->("POST", (pathParams) => {
|
|
|
+>("POST", pathParams => {
|
|
|
let { id, name, cluster_id } = pathParams;
|
|
|
return `/api/projects/${id}/releases/${name}/upgrade?cluster_id=${cluster_id}`;
|
|
|
});
|
|
|
@@ -712,5 +718,5 @@ export default {
|
|
|
rollbackChart,
|
|
|
uninstallTemplate,
|
|
|
updateUser,
|
|
|
- upgradeChartValues,
|
|
|
+ upgradeChartValues
|
|
|
};
|