Skip to content

Commit

Permalink
Merge pull request #76 from mkusaka/update-20220907T000249
Browse files Browse the repository at this point in the history
update 20220907T000249
  • Loading branch information
mkusaka authored Sep 7, 2022
2 parents c48dc6b + b909280 commit 3668e8d
Show file tree
Hide file tree
Showing 6 changed files with 668 additions and 668 deletions.
140 changes: 70 additions & 70 deletions client/services/ContextService.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,62 @@ 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 @@ -62,59 +118,29 @@ export class ContextService {
});
}
/**
* Create a new context
* @returns any The new context
* Delete a context
* @returns any A confirmation message
* @throws ApiError
*/
public static createContext({
requestBody,
public static deleteContext({
contextId,
}: {
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.
* ID of the context (UUID)
*/
name: string;
contextId: string;
}): CancelablePromise<{
/**
* The date and time the context was created.
* A human-readable message
*/
created_at: string;
message: string;
}> {
return __request(OpenAPI, {
method: "POST",
url: "/context",
body: requestBody,
mediaType: "application/json",
method: "DELETE",
url: "/context/{context-id}",
path: {
"context-id": contextId,
},
});
}
/**
Expand Down Expand Up @@ -152,32 +178,6 @@ export class ContextService {
},
});
}
/**
* Delete a context
* @returns any A confirmation message
* @throws ApiError
*/
public static deleteContext({
contextId,
}: {
/**
* ID of the context (UUID)
*/
contextId: string;
}): CancelablePromise<{
/**
* A human-readable message
*/
message: string;
}> {
return __request(OpenAPI, {
method: "DELETE",
url: "/context/{context-id}",
path: {
"context-id": contextId,
},
});
}
/**
* List environment variables
* List information about environment variables in a context, not including their values.
Expand Down
2 changes: 1 addition & 1 deletion client/services/InsightsService.ts
Original file line number Diff line number Diff line change
Expand Up @@ -537,7 +537,7 @@ export class InsightsService {
/**
* Get flaky tests for a project
* Get a list of flaky tests for a given project. Flaky tests are branch agnostic.
* A flaky test is a test that passed and faliled in the same commit.
* A flaky test is a test that passed and failed in the same commit.
* @returns any A list of flaky tests for a project
* @throws ApiError
*/
Expand Down
136 changes: 68 additions & 68 deletions client/services/ProjectService.ts
Original file line number Diff line number Diff line change
Expand Up @@ -142,6 +142,39 @@ export class ProjectService {
},
});
}
/**
* Delete a checkout key
* Deletes the checkout key.
* @returns any A confirmation message.
* @throws ApiError
*/
public static deleteCheckoutKey({
projectSlug,
fingerprint,
}: {
/**
* 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;
}): CancelablePromise<{
/**
* A human-readable message
*/
message: string;
}> {
return __request(OpenAPI, {
method: "DELETE",
url: "/project/{project-slug}/checkout-key/{fingerprint}",
path: {
"project-slug": projectSlug,
fingerprint: fingerprint,
},
});
}
/**
* Get a checkout key
* Returns an individual checkout key.
Expand Down Expand Up @@ -192,35 +225,39 @@ export class ProjectService {
});
}
/**
* Delete a checkout key
* Deletes the checkout key.
* @returns any A confirmation message.
* 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 deleteCheckoutKey({
public static listEnvVars({
projectSlug,
fingerprint,
}: {
/**
* 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;
}): CancelablePromise<{
items: Array<{
/**
* The name of the environment variable.
*/
name: string;
/**
* The value of the environment variable.
*/
value: string;
}>;
/**
* A human-readable message
* A token to pass as a `page-token` query parameter to return the next page of results.
*/
message: string;
next_page_token: string;
}> {
return __request(OpenAPI, {
method: "DELETE",
url: "/project/{project-slug}/checkout-key/{fingerprint}",
method: "GET",
url: "/project/{project-slug}/envvar",
path: {
"project-slug": projectSlug,
fingerprint: fingerprint,
},
});
}
Expand Down Expand Up @@ -262,39 +299,39 @@ 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.
* Get a masked environment variable
* Returns the masked value of environment variable :name.
* @returns any The environment variable.
* @throws ApiError
*/
public static listEnvVars({
public static getEnvVar({
projectSlug,
name,
}: {
/**
* Project slug in the form `vcs-slug/org-name/repo-name`. The `/` characters may be URL-escaped.
*/
projectSlug: string;
/**
* The name of the environment variable.
*/
name: string;
}): CancelablePromise<{
items: Array<{
/**
* The name of the environment variable.
*/
name: string;
/**
* 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.
* The name of the environment variable.
*/
next_page_token: string;
name: string;
/**
* The value of the environment variable.
*/
value: string;
}> {
return __request(OpenAPI, {
method: "GET",
url: "/project/{project-slug}/envvar",
url: "/project/{project-slug}/envvar/{name}",
path: {
"project-slug": projectSlug,
name: name,
},
});
}
Expand Down Expand Up @@ -331,41 +368,4 @@ export class ProjectService {
},
});
}
/**
* Get a masked environment variable
* Returns the masked value of environment variable :name.
* @returns any The environment variable.
* @throws ApiError
*/
public static getEnvVar({
projectSlug,
name,
}: {
/**
* Project slug in the form `vcs-slug/org-name/repo-name`. The `/` characters may be URL-escaped.
*/
projectSlug: string;
/**
* The name of the environment variable.
*/
name: string;
}): CancelablePromise<{
/**
* The name of the environment variable.
*/
name: string;
/**
* The value of the environment variable.
*/
value: string;
}> {
return __request(OpenAPI, {
method: "GET",
url: "/project/{project-slug}/envvar/{name}",
path: {
"project-slug": projectSlug,
name: name,
},
});
}
}
Loading

0 comments on commit 3668e8d

Please sign in to comment.