|
|
@@ -386,8 +386,9 @@ 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<
|
|
|
@@ -875,9 +876,11 @@ 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<
|
|
|
@@ -908,9 +911,11 @@ 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<
|
|
|
@@ -926,9 +931,11 @@ 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<
|
|
|
@@ -944,9 +951,11 @@ 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<
|
|
|
@@ -1006,30 +1015,32 @@ 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;
|
|
|
@@ -2298,9 +2309,11 @@ 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<
|
|
|
@@ -3514,6 +3527,17 @@ const getCustomerUsage = baseApi<
|
|
|
}
|
|
|
>("POST", ({ project_id }) => `/api/projects/${project_id}/billing/usage`);
|
|
|
|
|
|
+const getCustomerInvoices = baseApi<
|
|
|
+ {
|
|
|
+ status: string;
|
|
|
+ starting_on: string;
|
|
|
+ ending_before: string;
|
|
|
+ },
|
|
|
+ {
|
|
|
+ project_id?: number;
|
|
|
+ }
|
|
|
+>("POST", ({ project_id }) => `/api/projects/${project_id}/billing/invoices`);
|
|
|
+
|
|
|
const getCustomerPlan = baseApi<
|
|
|
{},
|
|
|
{
|
|
|
@@ -3582,13 +3606,9 @@ const getReferralDetails = baseApi<
|
|
|
{
|
|
|
project_id?: number;
|
|
|
}
|
|
|
->(
|
|
|
- "GET",
|
|
|
- ({ project_id }) =>
|
|
|
- `/api/projects/${project_id}/referrals/details`
|
|
|
-);
|
|
|
+>("GET", ({ project_id }) => `/api/projects/${project_id}/referrals/details`);
|
|
|
|
|
|
-const getGithubStatus = baseApi<{}, {}>("GET", ({ }) => `/api/status/github`);
|
|
|
+const getGithubStatus = baseApi<{}, {}>("GET", ({}) => `/api/status/github`);
|
|
|
|
|
|
const createSecretAndOpenGitHubPullRequest = baseApi<
|
|
|
{
|
|
|
@@ -3977,6 +3997,7 @@ export default {
|
|
|
getPorterCredits,
|
|
|
getCustomerPlan,
|
|
|
getCustomerUsage,
|
|
|
+ getCustomerInvoices,
|
|
|
listPaymentMethod,
|
|
|
addPaymentMethod,
|
|
|
setDefaultPaymentMethod,
|