Skip to content

Commit

Permalink
Merge pull request #34 from mkusaka/update-20220616T000253
Browse files Browse the repository at this point in the history
update 20220616T000253
  • Loading branch information
mkusaka authored Jun 16, 2022
2 parents 30e56ca + 927196b commit 1bb4d1f
Show file tree
Hide file tree
Showing 5 changed files with 701 additions and 701 deletions.
126 changes: 63 additions & 63 deletions client/services/ContextService.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,57 +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 {
/**
* List contexts
* List all contexts for an owner.
* @returns any A paginated list of contexts
* @throws ApiError
*/
public static listContexts({
ownerId,
ownerSlug,
ownerType,
pageToken,
}: {
/** The unique ID of the owner of the context. Specify either this or owner-slug. **/
ownerId?: string;
/** A string that represents an organization. Specify either this or owner-id. Cannot be used for accounts. **/
ownerSlug?: string;
/** The type of the owner. Defaults to "organization". Accounts are only used as context owners in server. **/
ownerType?: "account" | "organization";
/** A token to retrieve the next page of results. **/
pageToken?: string;
}): CancelablePromise<{
items: Array<{
/**
* 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;
}>;
/**
* 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: "GET",
url: "/context",
query: {
"owner-id": ownerId,
"owner-slug": ownerSlug,
"owner-type": ownerType,
"page-token": pageToken,
},
});
}
/**
* Create a new context
* @returns any The new context
Expand Down Expand Up @@ -110,26 +59,53 @@ export class ContextService {
});
}
/**
* Delete a context
* @returns any A confirmation message
* List contexts
* List all contexts for an owner.
* @returns any A paginated list of contexts
* @throws ApiError
*/
public static deleteContext({
contextId,
public static listContexts({
ownerId,
ownerSlug,
ownerType,
pageToken,
}: {
/** ID of the context (UUID) **/
contextId: string;
/** The unique ID of the owner of the context. Specify either this or owner-slug. **/
ownerId?: string;
/** A string that represents an organization. Specify either this or owner-id. Cannot be used for accounts. **/
ownerSlug?: string;
/** The type of the owner. Defaults to "organization". Accounts are only used as context owners in server. **/
ownerType?: "account" | "organization";
/** A token to retrieve the next page of results. **/
pageToken?: string;
}): CancelablePromise<{
items: Array<{
/**
* 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;
}>;
/**
* 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: "/context/{context-id}",
path: {
"context-id": contextId,
method: "GET",
url: "/context",
query: {
"owner-id": ownerId,
"owner-slug": ownerSlug,
"owner-type": ownerType,
"page-token": pageToken,
},
});
}
Expand Down Expand Up @@ -166,6 +142,30 @@ 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
36 changes: 18 additions & 18 deletions client/services/ProjectService.ts
Original file line number Diff line number Diff line change
Expand Up @@ -281,12 +281,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 @@ -296,16 +296,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 @@ -314,12 +310,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 @@ -329,12 +325,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
96 changes: 48 additions & 48 deletions client/services/ScheduleService.ts
Original file line number Diff line number Diff line change
Expand Up @@ -187,16 +187,54 @@ export class ScheduleService {
});
}
/**
* Get a schedule
* Get a schedule by id.
* Update a schedule
* Updates a schedule and returns the updated schedule.
* @returns any A schedule object.
* @throws ApiError
*/
public static getScheduleById({
public static updateSchedule({
scheduleId,
requestBody,
}: {
/** The unique ID of the schedule. **/
scheduleId: string;
requestBody?: {
/**
* Description of the schedule.
*/
description?: string;
/**
* Name of the schedule.
*/
name?: string;
/**
* Timetable that specifies when a schedule triggers.
*/
timetable?: {
/**
* Number of times a schedule triggers per hour, value must be between 1 and 60
*/
"per-hour"?: number;
/**
* Hours in a day in which the schedule triggers.
*/
"hours-of-day"?: Array<number>;
/**
* Days in a week in which the schedule triggers.
*/
"days-of-week"?: Array<
"TUE" | "SAT" | "SUN" | "MON" | "THU" | "WED" | "FRI"
>;
};
/**
* The attribution-actor of the scheduled pipeline.
*/
"attribution-actor"?: "current" | "system";
/**
* Pipeline parameters represented as key-value pairs. Must contain branch or tag.
*/
parameters?: Record<string, number | string | boolean>;
};
}): CancelablePromise<{
/**
* The unique ID of the schedule.
Expand Down Expand Up @@ -264,62 +302,26 @@ export class ScheduleService {
description: string;
}> {
return __request(OpenAPI, {
method: "GET",
method: "PATCH",
url: "/schedule/{schedule-id}",
path: {
"schedule-id": scheduleId,
},
body: requestBody,
mediaType: "application/json",
});
}
/**
* Update a schedule
* Updates a schedule and returns the updated schedule.
* Get a schedule
* Get a schedule by id.
* @returns any A schedule object.
* @throws ApiError
*/
public static updateSchedule({
public static getScheduleById({
scheduleId,
requestBody,
}: {
/** The unique ID of the schedule. **/
scheduleId: string;
requestBody?: {
/**
* Description of the schedule.
*/
description?: string;
/**
* Name of the schedule.
*/
name?: string;
/**
* Timetable that specifies when a schedule triggers.
*/
timetable?: {
/**
* Number of times a schedule triggers per hour, value must be between 1 and 60
*/
"per-hour"?: number;
/**
* Hours in a day in which the schedule triggers.
*/
"hours-of-day"?: Array<number>;
/**
* Days in a week in which the schedule triggers.
*/
"days-of-week"?: Array<
"TUE" | "SAT" | "SUN" | "MON" | "THU" | "WED" | "FRI"
>;
};
/**
* The attribution-actor of the scheduled pipeline.
*/
"attribution-actor"?: "current" | "system";
/**
* Pipeline parameters represented as key-value pairs. Must contain branch or tag.
*/
parameters?: Record<string, number | string | boolean>;
};
}): CancelablePromise<{
/**
* The unique ID of the schedule.
Expand Down Expand Up @@ -387,13 +389,11 @@ export class ScheduleService {
description: string;
}> {
return __request(OpenAPI, {
method: "PATCH",
method: "GET",
url: "/schedule/{schedule-id}",
path: {
"schedule-id": scheduleId,
},
body: requestBody,
mediaType: "application/json",
});
}
}
Loading

0 comments on commit 1bb4d1f

Please sign in to comment.