Skip to content

Commit

Permalink
Merge pull request #35 from mkusaka/update-20220618T000306
Browse files Browse the repository at this point in the history
update 20220618T000306
  • Loading branch information
mkusaka authored Jun 18, 2022
2 parents 1bb4d1f + 703dade commit 38f6211
Show file tree
Hide file tree
Showing 5 changed files with 637 additions and 637 deletions.
58 changes: 29 additions & 29 deletions client/services/ContextService.ts
Original file line number Diff line number Diff line change
Expand Up @@ -205,6 +205,35 @@ export class ContextService {
},
});
}
/**
* Remove an environment variable
* Delete an environment variable from a context.
* @returns any A confirmation message
* @throws ApiError
*/
public static deleteEnvironmentVariableFromContext({
envVarName,
contextId,
}: {
/** The name of the environment variable **/
envVarName: string;
/** ID of the context (UUID) **/
contextId: string;
}): CancelablePromise<{
/**
* A human-readable message
*/
message: string;
}> {
return __request(OpenAPI, {
method: "DELETE",
url: "/context/{context-id}/environment-variable/{env-var-name}",
path: {
"env-var-name": envVarName,
"context-id": contextId,
},
});
}
/**
* Add or update an environment variable
* Create or update an environment variable within a context. Returns information about the environment variable, not including its value.
Expand Down Expand Up @@ -259,33 +288,4 @@ export class ContextService {
mediaType: "application/json",
});
}
/**
* Remove an environment variable
* Delete an environment variable from a context.
* @returns any A confirmation message
* @throws ApiError
*/
public static deleteEnvironmentVariableFromContext({
envVarName,
contextId,
}: {
/** The name of the environment variable **/
envVarName: string;
/** ID of the context (UUID) **/
contextId: string;
}): CancelablePromise<{
/**
* A human-readable message
*/
message: string;
}> {
return __request(OpenAPI, {
method: "DELETE",
url: "/context/{context-id}/environment-variable/{env-var-name}",
path: {
"env-var-name": envVarName,
"context-id": contextId,
},
});
}
}
130 changes: 65 additions & 65 deletions client/services/ProjectService.ts
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,37 @@ export class ProjectService {
},
});
}
/**
* Create a new checkout key
* Creates a new checkout key. This API request is only usable with a user API token.
* @returns any Error response.
* @throws ApiError
*/
public static createCheckoutKey({
projectSlug,
requestBody,
}: {
/** Project slug in the form `vcs-slug/org-name/repo-name`. The `/` characters may be URL-escaped. **/
projectSlug: string;
requestBody?: {
/**
* The type of checkout key to create. This may be either `deploy-key` or `user-key`.
*/
type: "user-key" | "deploy-key";
};
}): CancelablePromise<{
message?: string;
}> {
return __request(OpenAPI, {
method: "POST",
url: "/project/{project-slug}/checkout-key",
path: {
"project-slug": projectSlug,
},
body: requestBody,
mediaType: "application/json",
});
}
/**
* Get all checkout keys
* Returns a sequence of checkout keys for `:project`.
Expand Down Expand Up @@ -106,34 +137,32 @@ export class ProjectService {
});
}
/**
* Create a new checkout key
* Creates a new checkout key. This API request is only usable with a user API token.
* @returns any Error response.
* Delete a checkout key
* Deletes the checkout key.
* @returns any A confirmation message.
* @throws ApiError
*/
public static createCheckoutKey({
public static deleteCheckoutKey({
projectSlug,
requestBody,
fingerprint,
}: {
/** Project slug in the form `vcs-slug/org-name/repo-name`. The `/` characters may be URL-escaped. **/
projectSlug: string;
requestBody?: {
/**
* The type of checkout key to create. This may be either `deploy-key` or `user-key`.
*/
type: "user-key" | "deploy-key";
};
/** An SSH key fingerprint. **/
fingerprint: string;
}): CancelablePromise<{
message?: string;
/**
* A human-readable message
*/
message: string;
}> {
return __request(OpenAPI, {
method: "POST",
url: "/project/{project-slug}/checkout-key",
method: "DELETE",
url: "/project/{project-slug}/checkout-key/{fingerprint}",
path: {
"project-slug": projectSlug,
fingerprint: fingerprint,
},
body: requestBody,
mediaType: "application/json",
});
}
/**
Expand Down Expand Up @@ -182,32 +211,38 @@ export class ProjectService {
});
}
/**
* Delete a checkout key
* Deletes the checkout key.
* @returns any A confirmation message.
* Create an environment variable
* Creates a new environment variable.
* @returns any Error response.
* @throws ApiError
*/
public static deleteCheckoutKey({
public static createEnvVar({
projectSlug,
fingerprint,
requestBody,
}: {
/** Project slug in the form `vcs-slug/org-name/repo-name`. The `/` characters may be URL-escaped. **/
projectSlug: string;
/** An SSH key fingerprint. **/
fingerprint: string;
requestBody?: {
/**
* The name of the environment variable.
*/
name: string;
/**
* The value of the environment variable.
*/
value: string;
};
}): CancelablePromise<{
/**
* A human-readable message
*/
message: string;
message?: string;
}> {
return __request(OpenAPI, {
method: "DELETE",
url: "/project/{project-slug}/checkout-key/{fingerprint}",
method: "POST",
url: "/project/{project-slug}/envvar",
path: {
"project-slug": projectSlug,
fingerprint: fingerprint,
},
body: requestBody,
mediaType: "application/json",
});
}
/**
Expand Down Expand Up @@ -245,41 +280,6 @@ export class ProjectService {
},
});
}
/**
* Create an environment variable
* Creates a new environment variable.
* @returns any Error response.
* @throws ApiError
*/
public static createEnvVar({
projectSlug,
requestBody,
}: {
/** Project slug in the form `vcs-slug/org-name/repo-name`. The `/` characters may be URL-escaped. **/
projectSlug: string;
requestBody?: {
/**
* The name of the environment variable.
*/
name: string;
/**
* The value of the environment variable.
*/
value: string;
};
}): CancelablePromise<{
message?: string;
}> {
return __request(OpenAPI, {
method: "POST",
url: "/project/{project-slug}/envvar",
path: {
"project-slug": projectSlug,
},
body: requestBody,
mediaType: "application/json",
});
}
/**
* Delete an environment variable
* Deletes the environment variable named :name.
Expand Down
Loading

0 comments on commit 38f6211

Please sign in to comment.