|
@@ -352,8 +352,9 @@ const getFeedEvents = baseApi<
|
|
|
}
|
|
}
|
|
|
>("GET", (pathParams) => {
|
|
>("GET", (pathParams) => {
|
|
|
let { project_id, cluster_id, stack_name, page } = pathParams;
|
|
let { project_id, cluster_id, stack_name, page } = pathParams;
|
|
|
- return `/api/projects/${project_id}/clusters/${cluster_id}/applications/${stack_name}/events?page=${page || 1
|
|
|
|
|
- }`;
|
|
|
|
|
|
|
+ return `/api/projects/${project_id}/clusters/${cluster_id}/applications/${stack_name}/events?page=${
|
|
|
|
|
+ page || 1
|
|
|
|
|
+ }`;
|
|
|
});
|
|
});
|
|
|
|
|
|
|
|
const createEnvironment = baseApi<
|
|
const createEnvironment = baseApi<
|
|
@@ -778,9 +779,11 @@ const detectBuildpack = baseApi<
|
|
|
branch: 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
|
|
|
|
|
- }/${encodeURIComponent(pathParams.branch)}/buildpack/detect`;
|
|
|
|
|
|
|
+ return `/api/projects/${pathParams.project_id}/gitrepos/${
|
|
|
|
|
+ pathParams.git_repo_id
|
|
|
|
|
+ }/repos/${pathParams.kind}/${pathParams.owner}/${
|
|
|
|
|
+ pathParams.name
|
|
|
|
|
+ }/${encodeURIComponent(pathParams.branch)}/buildpack/detect`;
|
|
|
});
|
|
});
|
|
|
|
|
|
|
|
const detectGitlabBuildpack = baseApi<
|
|
const detectGitlabBuildpack = baseApi<
|
|
@@ -811,9 +814,11 @@ const getBranchContents = baseApi<
|
|
|
branch: 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
|
|
|
|
|
- }/${encodeURIComponent(pathParams.branch)}/contents`;
|
|
|
|
|
|
|
+ return `/api/projects/${pathParams.project_id}/gitrepos/${
|
|
|
|
|
+ pathParams.git_repo_id
|
|
|
|
|
+ }/repos/${pathParams.kind}/${pathParams.owner}/${
|
|
|
|
|
+ pathParams.name
|
|
|
|
|
+ }/${encodeURIComponent(pathParams.branch)}/contents`;
|
|
|
});
|
|
});
|
|
|
|
|
|
|
|
const getProcfileContents = baseApi<
|
|
const getProcfileContents = baseApi<
|
|
@@ -829,9 +834,11 @@ const getProcfileContents = baseApi<
|
|
|
branch: 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
|
|
|
|
|
- }/${encodeURIComponent(pathParams.branch)}/procfile`;
|
|
|
|
|
|
|
+ return `/api/projects/${pathParams.project_id}/gitrepos/${
|
|
|
|
|
+ pathParams.git_repo_id
|
|
|
|
|
+ }/repos/${pathParams.kind}/${pathParams.owner}/${
|
|
|
|
|
+ pathParams.name
|
|
|
|
|
+ }/${encodeURIComponent(pathParams.branch)}/procfile`;
|
|
|
});
|
|
});
|
|
|
|
|
|
|
|
const getPorterYamlContents = baseApi<
|
|
const getPorterYamlContents = baseApi<
|
|
@@ -847,9 +854,11 @@ const getPorterYamlContents = baseApi<
|
|
|
branch: 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
|
|
|
|
|
- }/${encodeURIComponent(pathParams.branch)}/porteryaml`;
|
|
|
|
|
|
|
+ return `/api/projects/${pathParams.project_id}/gitrepos/${
|
|
|
|
|
+ pathParams.git_repo_id
|
|
|
|
|
+ }/repos/${pathParams.kind}/${pathParams.owner}/${
|
|
|
|
|
+ pathParams.name
|
|
|
|
|
+ }/${encodeURIComponent(pathParams.branch)}/porteryaml`;
|
|
|
});
|
|
});
|
|
|
|
|
|
|
|
const parsePorterYaml = baseApi<
|
|
const parsePorterYaml = baseApi<
|
|
@@ -886,9 +895,11 @@ const getBranchHead = baseApi<
|
|
|
branch: 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
|
|
|
|
|
- }/${encodeURIComponent(pathParams.branch)}/head`;
|
|
|
|
|
|
|
+ return `/api/projects/${pathParams.project_id}/gitrepos/${
|
|
|
|
|
+ pathParams.git_repo_id
|
|
|
|
|
+ }/repos/${pathParams.kind}/${pathParams.owner}/${
|
|
|
|
|
+ pathParams.name
|
|
|
|
|
+ }/${encodeURIComponent(pathParams.branch)}/head`;
|
|
|
});
|
|
});
|
|
|
|
|
|
|
|
const validatePorterApp = baseApi<
|
|
const validatePorterApp = baseApi<
|
|
@@ -914,21 +925,21 @@ const validatePorterApp = baseApi<
|
|
|
|
|
|
|
|
const createApp = baseApi<
|
|
const createApp = baseApi<
|
|
|
| {
|
|
| {
|
|
|
- name: string;
|
|
|
|
|
- type: "github";
|
|
|
|
|
- git_repo_id: number;
|
|
|
|
|
- git_branch: string;
|
|
|
|
|
- git_repo_name: string;
|
|
|
|
|
- porter_yaml_path: string;
|
|
|
|
|
- }
|
|
|
|
|
|
|
+ name: string;
|
|
|
|
|
+ type: "github";
|
|
|
|
|
+ git_repo_id: number;
|
|
|
|
|
+ git_branch: string;
|
|
|
|
|
+ git_repo_name: string;
|
|
|
|
|
+ porter_yaml_path: string;
|
|
|
|
|
+ }
|
|
|
| {
|
|
| {
|
|
|
- name: string;
|
|
|
|
|
- type: "docker-registry";
|
|
|
|
|
- image: {
|
|
|
|
|
- repository: string;
|
|
|
|
|
- tag: string;
|
|
|
|
|
- };
|
|
|
|
|
- },
|
|
|
|
|
|
|
+ name: string;
|
|
|
|
|
+ type: "docker-registry";
|
|
|
|
|
+ image: {
|
|
|
|
|
+ repository: string;
|
|
|
|
|
+ tag: string;
|
|
|
|
|
+ };
|
|
|
|
|
+ },
|
|
|
{
|
|
{
|
|
|
project_id: number;
|
|
project_id: number;
|
|
|
cluster_id: number;
|
|
cluster_id: number;
|
|
@@ -938,18 +949,19 @@ const createApp = baseApi<
|
|
|
});
|
|
});
|
|
|
|
|
|
|
|
const createAppTemplate = baseApi<
|
|
const createAppTemplate = baseApi<
|
|
|
-{
|
|
|
|
|
- b64_app_proto: string;
|
|
|
|
|
- variables: Record<string, string>
|
|
|
|
|
- secrets: Record<string, string>
|
|
|
|
|
-},
|
|
|
|
|
-{
|
|
|
|
|
- project_id: number;
|
|
|
|
|
- cluster_id: number;
|
|
|
|
|
- porter_app_name: string;
|
|
|
|
|
-}>("POST", ({ project_id, cluster_id, porter_app_name}) => {
|
|
|
|
|
|
|
+ {
|
|
|
|
|
+ b64_app_proto: string;
|
|
|
|
|
+ variables: Record<string, string>;
|
|
|
|
|
+ secrets: Record<string, string>;
|
|
|
|
|
+ },
|
|
|
|
|
+ {
|
|
|
|
|
+ project_id: number;
|
|
|
|
|
+ cluster_id: number;
|
|
|
|
|
+ porter_app_name: string;
|
|
|
|
|
+ }
|
|
|
|
|
+>("POST", ({ project_id, cluster_id, porter_app_name }) => {
|
|
|
return `/api/projects/${project_id}/clusters/${cluster_id}/apps/${porter_app_name}/templates`;
|
|
return `/api/projects/${project_id}/clusters/${cluster_id}/apps/${porter_app_name}/templates`;
|
|
|
-})
|
|
|
|
|
|
|
+});
|
|
|
|
|
|
|
|
const applyApp = baseApi<
|
|
const applyApp = baseApi<
|
|
|
{
|
|
{
|
|
@@ -1040,6 +1052,27 @@ const listDeploymentTargets = baseApi<
|
|
|
return `/api/projects/${project_id}/clusters/${cluster_id}/deployment-targets`;
|
|
return `/api/projects/${project_id}/clusters/${cluster_id}/deployment-targets`;
|
|
|
});
|
|
});
|
|
|
|
|
|
|
|
|
|
+const getDeploymentTarget = baseApi<
|
|
|
|
|
+ {},
|
|
|
|
|
+ {
|
|
|
|
|
+ project_id: number;
|
|
|
|
|
+ cluster_id: number;
|
|
|
|
|
+ deployment_target_id: string;
|
|
|
|
|
+ }
|
|
|
|
|
+>("GET", ({ project_id, cluster_id, deployment_target_id }) => {
|
|
|
|
|
+ return `/api/projects/${project_id}/clusters/${cluster_id}/deployment-targets/${deployment_target_id}`;
|
|
|
|
|
+});
|
|
|
|
|
+
|
|
|
|
|
+const getAppTemplate = baseApi<
|
|
|
|
|
+ {},
|
|
|
|
|
+ {
|
|
|
|
|
+ project_id: number;
|
|
|
|
|
+ cluster_id: number;
|
|
|
|
|
+ porter_app_name: string;
|
|
|
|
|
+ }>("GET", ({ project_id, cluster_id, porter_app_name }) => {
|
|
|
|
|
+ return `/api/projects/${project_id}/clusters/${cluster_id}/apps/${porter_app_name}/templates`;
|
|
|
|
|
+ })
|
|
|
|
|
+
|
|
|
const getGitlabProcfileContents = baseApi<
|
|
const getGitlabProcfileContents = baseApi<
|
|
|
{
|
|
{
|
|
|
path: string;
|
|
path: string;
|
|
@@ -1944,9 +1977,11 @@ const getEnvGroup = baseApi<
|
|
|
version?: number;
|
|
version?: number;
|
|
|
}
|
|
}
|
|
|
>("GET", (pathParams) => {
|
|
>("GET", (pathParams) => {
|
|
|
- return `/api/projects/${pathParams.id}/clusters/${pathParams.cluster_id
|
|
|
|
|
- }/namespaces/${pathParams.namespace}/envgroup?name=${pathParams.name}${pathParams.version ? "&version=" + pathParams.version : ""
|
|
|
|
|
- }`;
|
|
|
|
|
|
|
+ return `/api/projects/${pathParams.id}/clusters/${
|
|
|
|
|
+ pathParams.cluster_id
|
|
|
|
|
+ }/namespaces/${pathParams.namespace}/envgroup?name=${pathParams.name}${
|
|
|
|
|
+ pathParams.version ? "&version=" + pathParams.version : ""
|
|
|
|
|
+ }`;
|
|
|
});
|
|
});
|
|
|
|
|
|
|
|
const getConfigMap = baseApi<
|
|
const getConfigMap = baseApi<
|
|
@@ -3004,7 +3039,7 @@ const removeStackEnvGroup = baseApi<
|
|
|
`/api/v1/projects/${project_id}/clusters/${cluster_id}/namespaces/${namespace}/stacks/${stack_id}/remove_env_group/${env_group_name}`
|
|
`/api/v1/projects/${project_id}/clusters/${cluster_id}/namespaces/${namespace}/stacks/${stack_id}/remove_env_group/${env_group_name}`
|
|
|
);
|
|
);
|
|
|
|
|
|
|
|
-const getGithubStatus = baseApi<{}, {}>("GET", ({ }) => `/api/status/github`);
|
|
|
|
|
|
|
+const getGithubStatus = baseApi<{}, {}>("GET", ({}) => `/api/status/github`);
|
|
|
|
|
|
|
|
const createSecretAndOpenGitHubPullRequest = baseApi<
|
|
const createSecretAndOpenGitHubPullRequest = baseApi<
|
|
|
{
|
|
{
|
|
@@ -3167,6 +3202,8 @@ export default {
|
|
|
listAppRevisions,
|
|
listAppRevisions,
|
|
|
getLatestAppRevisions,
|
|
getLatestAppRevisions,
|
|
|
listDeploymentTargets,
|
|
listDeploymentTargets,
|
|
|
|
|
+ getDeploymentTarget,
|
|
|
|
|
+ getAppTemplate,
|
|
|
getGitlabProcfileContents,
|
|
getGitlabProcfileContents,
|
|
|
getProjectClusters,
|
|
getProjectClusters,
|
|
|
getProjectRegistries,
|
|
getProjectRegistries,
|