Skip to content

Commit

Permalink
Merge pull request #84 from mkusaka/update-20220917T000313
Browse files Browse the repository at this point in the history
update 20220917T000313
  • Loading branch information
mkusaka authored Sep 17, 2022
2 parents f248f28 + 326f305 commit 9b76d65
Show file tree
Hide file tree
Showing 6 changed files with 1,122 additions and 1,122 deletions.
206 changes: 103 additions & 103 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 Expand Up @@ -219,6 +219,39 @@ 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 @@ -277,37 +310,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,
},
});
}
}
82 changes: 41 additions & 41 deletions client/services/PipelineService.ts
Original file line number Diff line number Diff line change
Expand Up @@ -469,47 +469,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 all pipelines
* Returns all pipelines for this project.
Expand Down Expand Up @@ -673,6 +632,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 your pipelines
* Returns a sequence of all pipelines for this project triggered by the user.
Expand Down
Loading

0 comments on commit 9b76d65

Please sign in to comment.