|
|
@@ -386,9 +386,8 @@ const getFeedEvents = baseApi<
|
|
|
}
|
|
|
>("GET", (pathParams) => {
|
|
|
const { 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<
|
|
|
@@ -876,11 +875,9 @@ const detectBuildpack = baseApi<
|
|
|
branch: string;
|
|
|
}
|
|
|
>("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<
|
|
|
@@ -911,11 +908,9 @@ const getBranchContents = baseApi<
|
|
|
branch: string;
|
|
|
}
|
|
|
>("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<
|
|
|
@@ -931,11 +926,9 @@ const getProcfileContents = baseApi<
|
|
|
branch: string;
|
|
|
}
|
|
|
>("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<
|
|
|
@@ -951,11 +944,9 @@ const getPorterYamlContents = baseApi<
|
|
|
branch: string;
|
|
|
}
|
|
|
>("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<
|
|
|
@@ -1015,32 +1006,30 @@ const getBranchHead = baseApi<
|
|
|
branch: string;
|
|
|
}
|
|
|
>("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 createApp = baseApi<
|
|
|
| {
|
|
|
- name: string;
|
|
|
- deployment_target_id: string;
|
|
|
- type: "github";
|
|
|
- git_repo_id: number;
|
|
|
- git_branch: string;
|
|
|
- git_repo_name: string;
|
|
|
- porter_yaml_path: string;
|
|
|
- }
|
|
|
+ name: string;
|
|
|
+ deployment_target_id: string;
|
|
|
+ type: "github";
|
|
|
+ git_repo_id: number;
|
|
|
+ git_branch: string;
|
|
|
+ git_repo_name: string;
|
|
|
+ porter_yaml_path: string;
|
|
|
+ }
|
|
|
| {
|
|
|
- name: string;
|
|
|
- deployment_target_id: string;
|
|
|
- type: "docker-registry";
|
|
|
- image: {
|
|
|
- repository: string;
|
|
|
- tag: string;
|
|
|
- };
|
|
|
- },
|
|
|
+ name: string;
|
|
|
+ deployment_target_id: string;
|
|
|
+ type: "docker-registry";
|
|
|
+ image: {
|
|
|
+ repository: string;
|
|
|
+ tag: string;
|
|
|
+ };
|
|
|
+ },
|
|
|
{
|
|
|
project_id: number;
|
|
|
cluster_id: number;
|
|
|
@@ -2167,6 +2156,7 @@ const registerUser = baseApi<{
|
|
|
last_name: string;
|
|
|
company_name: string;
|
|
|
referral_method?: string;
|
|
|
+ referred_by_code?: string;
|
|
|
}>("POST", "/api/users");
|
|
|
|
|
|
const rollbackChart = baseApi<
|
|
|
@@ -2308,11 +2298,9 @@ const getEnvGroup = baseApi<
|
|
|
version?: number;
|
|
|
}
|
|
|
>("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<
|
|
|
@@ -3589,7 +3577,18 @@ const deletePaymentMethod = baseApi<
|
|
|
`/api/projects/${project_id}/billing/payment_method/${payment_method_id}`
|
|
|
);
|
|
|
|
|
|
-const getGithubStatus = baseApi<{}, {}>("GET", ({}) => `/api/status/github`);
|
|
|
+const getReferrals = baseApi<
|
|
|
+ {},
|
|
|
+ {
|
|
|
+ user_id?: number;
|
|
|
+ }
|
|
|
+>(
|
|
|
+ "GET",
|
|
|
+ ({ user_id }) =>
|
|
|
+ `/api/users/${user_id}/referrals`
|
|
|
+);
|
|
|
+
|
|
|
+const getGithubStatus = baseApi<{}, {}>("GET", ({ }) => `/api/status/github`);
|
|
|
|
|
|
const createSecretAndOpenGitHubPullRequest = baseApi<
|
|
|
{
|
|
|
@@ -3982,6 +3981,7 @@ export default {
|
|
|
addPaymentMethod,
|
|
|
setDefaultPaymentMethod,
|
|
|
deletePaymentMethod,
|
|
|
+ getReferrals,
|
|
|
|
|
|
// STATUS
|
|
|
getGithubStatus,
|