Skip to content

Commit

Permalink
Merge pull request #55 from mkusaka/update-20220727T000254 [ci skip]
Browse files Browse the repository at this point in the history
  • Loading branch information
mkusaka authored Jul 27, 2022
2 parents 563622b + 0f9c178 commit a066bb7
Show file tree
Hide file tree
Showing 5 changed files with 1,347 additions and 1,347 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,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,
},
});
}
}
Loading

0 comments on commit a066bb7

Please sign in to comment.