UNPKG

1.19 kBTypeScriptView Raw
1import { BaseRequestOptions, BaseService, PaginatedRequestOptions, Sudo } from '../infrastructure';
2import { DeploymentSchema } from './Deployments';
3import { ProjectSchema } from './Projects';
4export interface EnvironmentSchema {
5 id: number;
6 name: string;
7 slug?: string;
8 external_url?: string;
9 project?: ProjectSchema;
10 state?: string;
11}
12export interface EnvironmentDetailSchema extends EnvironmentSchema {
13 last_deployment?: DeploymentSchema;
14 deployable?: DeploymentSchema;
15}
16export declare class Environments extends BaseService {
17 all(projectId: string | number, options?: PaginatedRequestOptions): Promise<EnvironmentSchema[]>;
18 show(projectId: string | number, environmentId: number, options?: Sudo): Promise<EnvironmentDetailSchema>;
19 create(projectId: string | number, options?: BaseRequestOptions): Promise<object>;
20 edit(projectId: string | number, environmentId: number, options?: BaseRequestOptions): Promise<object>;
21 remove(projectId: string | number, environmentId: number, options?: Sudo): Promise<object>;
22 stop(projectId: string | number, environmentId: number, options?: Sudo): Promise<object>;
23}