Skip to content

Commit

Permalink
Merge pull request #78 from mkusaka/update-20220909T000314
Browse files Browse the repository at this point in the history
update 20220909T000314
  • Loading branch information
mkusaka authored Sep 9, 2022
2 parents cb5d56a + 5006bd9 commit 4055659
Show file tree
Hide file tree
Showing 6 changed files with 1,198 additions and 1,198 deletions.
112 changes: 56 additions & 56 deletions client/services/ContextService.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,62 +2,6 @@ import type { CancelablePromise } from "../core/CancelablePromise.ts";
import { OpenAPI } from "../core/OpenAPI.ts";
import { request as __request } from "../core/request.ts";
export class ContextService {
/**
* Create a new context
* @returns any The new context
* @throws ApiError
*/
public static createContext({
requestBody,
}: {
requestBody?: {
/**
* The user defined name of the context.
*/
name: string;
owner:
| {
/**
* The unique ID of the owner of the context. Specify either this or slug.
*/
id: string;
/**
* The type of the owner. Defaults to "organization". Accounts are only used as context owners in server.
*/
type?: "account" | "organization";
}
| {
/**
* A string that represents an organization. Specify either this or id. Cannot be used for accounts.
*/
slug: string;
/**
* The type of owner. Defaults to "organization". Accounts are only used as context owners in server and must be specified by an id instead of a slug.
*/
type?: "organization";
};
};
}): CancelablePromise<{
/**
* The unique ID of the context.
*/
id: string;
/**
* The user defined name of the context.
*/
name: string;
/**
* The date and time the context was created.
*/
created_at: string;
}> {
return __request(OpenAPI, {
method: "POST",
url: "/context",
body: requestBody,
mediaType: "application/json",
});
}
/**
* List contexts
* List all contexts for an owner.
Expand Down Expand Up @@ -117,6 +61,62 @@ export class ContextService {
},
});
}
/**
* Create a new context
* @returns any The new context
* @throws ApiError
*/
public static createContext({
requestBody,
}: {
requestBody?: {
/**
* The user defined name of the context.
*/
name: string;
owner:
| {
/**
* The unique ID of the owner of the context. Specify either this or slug.
*/
id: string;
/**
* The type of the owner. Defaults to "organization". Accounts are only used as context owners in server.
*/
type?: "account" | "organization";
}
| {
/**
* A string that represents an organization. Specify either this or id. Cannot be used for accounts.
*/
slug: string;
/**
* The type of owner. Defaults to "organization". Accounts are only used as context owners in server and must be specified by an id instead of a slug.
*/
type?: "organization";
};
};
}): CancelablePromise<{
/**
* The unique ID of the context.
*/
id: string;
/**
* The user defined name of the context.
*/
name: string;
/**
* The date and time the context was created.
*/
created_at: string;
}> {
return __request(OpenAPI, {
method: "POST",
url: "/context",
body: requestBody,
mediaType: "application/json",
});
}
/**
* Delete a context
* @returns any A confirmation message
Expand Down
82 changes: 41 additions & 41 deletions client/services/PipelineService.ts
Original file line number Diff line number Diff line change
Expand Up @@ -469,6 +469,47 @@ export class PipelineService {
},
});
}
/**
* Trigger a new pipeline
* Triggers a new pipeline on the project.
* @returns any Error response.
* @throws ApiError
*/
public static triggerPipeline({
projectSlug,
requestBody,
}: {
/**
* Project slug in the form `vcs-slug/org-name/repo-name`. The `/` characters may be URL-escaped.
*/
projectSlug: string;
requestBody?: {
/**
* The branch where the pipeline ran. The HEAD commit on this branch was used for the pipeline. Note that `branch` and `tag` are mutually exclusive. To trigger a pipeline for a PR by number use `pull/<number>/head` for the PR ref or `pull/<number>/merge` for the merge ref (GitHub only).
*/
branch?: string;
/**
* The tag used by the pipeline. The commit that this tag points to was used for the pipeline. Note that `branch` and `tag` are mutually exclusive.
*/
tag?: string;
/**
* An object containing pipeline parameters and their values.
*/
parameters?: Record<string, number | string | boolean>;
};
}): CancelablePromise<{
message?: string;
}> {
return __request(OpenAPI, {
method: "POST",
url: "/project/{project-slug}/pipeline",
path: {
"project-slug": projectSlug,
},
body: requestBody,
mediaType: "application/json",
});
}
/**
* Get all pipelines
* Returns all pipelines for this project.
Expand Down Expand Up @@ -632,47 +673,6 @@ export class PipelineService {
},
});
}
/**
* Trigger a new pipeline
* Triggers a new pipeline on the project.
* @returns any Error response.
* @throws ApiError
*/
public static triggerPipeline({
projectSlug,
requestBody,
}: {
/**
* Project slug in the form `vcs-slug/org-name/repo-name`. The `/` characters may be URL-escaped.
*/
projectSlug: string;
requestBody?: {
/**
* The branch where the pipeline ran. The HEAD commit on this branch was used for the pipeline. Note that `branch` and `tag` are mutually exclusive. To trigger a pipeline for a PR by number use `pull/<number>/head` for the PR ref or `pull/<number>/merge` for the merge ref (GitHub only).
*/
branch?: string;
/**
* The tag used by the pipeline. The commit that this tag points to was used for the pipeline. Note that `branch` and `tag` are mutually exclusive.
*/
tag?: string;
/**
* An object containing pipeline parameters and their values.
*/
parameters?: Record<string, number | string | boolean>;
};
}): CancelablePromise<{
message?: string;
}> {
return __request(OpenAPI, {
method: "POST",
url: "/project/{project-slug}/pipeline",
path: {
"project-slug": projectSlug,
},
body: requestBody,
mediaType: "application/json",
});
}
/**
* Get your pipelines
* Returns a sequence of all pipelines for this project triggered by the user.
Expand Down
84 changes: 42 additions & 42 deletions client/services/ProjectService.ts
Original file line number Diff line number Diff line change
Expand Up @@ -225,20 +225,20 @@ export class ProjectService {
});
}
/**
* List all environment variables
* Returns four 'x' characters, in addition to the last four ASCII characters of the value, consistent with the display of environment variable values on the CircleCI website.
* @returns any A sequence of environment variables.
* Create an environment variable
* Creates a new environment variable.
* @returns any Error response.
* @throws ApiError
*/
public static listEnvVars({
public static createEnvVar({
projectSlug,
requestBody,
}: {
/**
* Project slug in the form `vcs-slug/org-name/repo-name`. The `/` characters may be URL-escaped.
*/
projectSlug: string;
}): CancelablePromise<{
items: Array<{
requestBody?: {
/**
* The name of the environment variable.
*/
Expand All @@ -247,35 +247,35 @@ export class ProjectService {
* The value of the environment variable.
*/
value: string;
}>;
/**
* A token to pass as a `page-token` query parameter to return the next page of results.
*/
next_page_token: string;
};
}): CancelablePromise<{
message?: string;
}> {
return __request(OpenAPI, {
method: "GET",
method: "POST",
url: "/project/{project-slug}/envvar",
path: {
"project-slug": projectSlug,
},
body: requestBody,
mediaType: "application/json",
});
}
/**
* Create an environment variable
* Creates a new environment variable.
* @returns any Error response.
* List all environment variables
* Returns four 'x' characters, in addition to the last four ASCII characters of the value, consistent with the display of environment variable values on the CircleCI website.
* @returns any A sequence of environment variables.
* @throws ApiError
*/
public static createEnvVar({
public static listEnvVars({
projectSlug,
requestBody,
}: {
/**
* Project slug in the form `vcs-slug/org-name/repo-name`. The `/` characters may be URL-escaped.
*/
projectSlug: string;
requestBody?: {
}): CancelablePromise<{
items: Array<{
/**
* The name of the environment variable.
*/
Expand All @@ -284,27 +284,27 @@ export class ProjectService {
* The value of the environment variable.
*/
value: string;
};
}): CancelablePromise<{
message?: string;
}>;
/**
* A token to pass as a `page-token` query parameter to return the next page of results.
*/
next_page_token: string;
}> {
return __request(OpenAPI, {
method: "POST",
method: "GET",
url: "/project/{project-slug}/envvar",
path: {
"project-slug": projectSlug,
},
body: requestBody,
mediaType: "application/json",
});
}
/**
* Get a masked environment variable
* Returns the masked value of environment variable :name.
* @returns any The environment variable.
* Delete an environment variable
* Deletes the environment variable named :name.
* @returns any A confirmation message.
* @throws ApiError
*/
public static getEnvVar({
public static deleteEnvVar({
projectSlug,
name,
}: {
Expand All @@ -318,16 +318,12 @@ export class ProjectService {
name: string;
}): CancelablePromise<{
/**
* The name of the environment variable.
*/
name: string;
/**
* The value of the environment variable.
* A human-readable message
*/
value: string;
message: string;
}> {
return __request(OpenAPI, {
method: "GET",
method: "DELETE",
url: "/project/{project-slug}/envvar/{name}",
path: {
"project-slug": projectSlug,
Expand All @@ -336,12 +332,12 @@ export class ProjectService {
});
}
/**
* Delete an environment variable
* Deletes the environment variable named :name.
* @returns any A confirmation message.
* Get a masked environment variable
* Returns the masked value of environment variable :name.
* @returns any The environment variable.
* @throws ApiError
*/
public static deleteEnvVar({
public static getEnvVar({
projectSlug,
name,
}: {
Expand All @@ -355,12 +351,16 @@ export class ProjectService {
name: string;
}): CancelablePromise<{
/**
* A human-readable message
* The name of the environment variable.
*/
message: string;
name: string;
/**
* The value of the environment variable.
*/
value: string;
}> {
return __request(OpenAPI, {
method: "DELETE",
method: "GET",
url: "/project/{project-slug}/envvar/{name}",
path: {
"project-slug": projectSlug,
Expand Down
Loading

0 comments on commit 4055659

Please sign in to comment.