Skip to content

Commit

Permalink
Merge pull request #79 from mkusaka/update-20220910T000322
Browse files Browse the repository at this point in the history
update 20220910T000322
  • Loading branch information
mkusaka authored Sep 10, 2022
2 parents 4055659 + 4117336 commit c35e114
Show file tree
Hide file tree
Showing 6 changed files with 911 additions and 911 deletions.
178 changes: 89 additions & 89 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 @@ -61,62 +117,6 @@ 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 Expand Up @@ -219,39 +219,6 @@ 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 @@ -310,4 +277,37 @@ 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,
},
});
}
}
2 changes: 1 addition & 1 deletion client/services/InsightsService.ts
Original file line number Diff line number Diff line change
Expand Up @@ -506,7 +506,7 @@ export class InsightsService {
}
/**
* Get all branches for a project
* Get a list of all branches for a specified project. The list will only contain branches currently available within Insights.
* Get a list of all branches for a specified project. The list will only contain branches currently available within Insights. The maximum number of branches returned by this endpoint is 5,000.
* @returns any A list of branches for a project
* @throws ApiError
*/
Expand Down
36 changes: 18 additions & 18 deletions client/services/ProjectService.ts
Original file line number Diff line number Diff line change
Expand Up @@ -299,12 +299,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 @@ -318,12 +318,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 All @@ -332,12 +336,12 @@ export class ProjectService {
});
}
/**
* 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 @@ -351,16 +355,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 Down
Loading

0 comments on commit c35e114

Please sign in to comment.