@directus/api
Version:
Directus is a real-time API and App dashboard for managing SQL database content
34 lines (33 loc) • 1.32 kB
TypeScript
import type { Credentials, Deployment, Details, Log, Options, Project, TriggerResult } from '@directus/types';
import { DeploymentDriver } from '../deployment.js';
export interface NetlifyCredentials extends Credentials {
access_token: string;
}
export interface NetlifyOptions extends Options {
account_slug?: string;
}
export declare class NetlifyDriver extends DeploymentDriver<NetlifyCredentials, NetlifyOptions> {
private api;
constructor(credentials: NetlifyCredentials, options?: NetlifyOptions);
private handleApiError;
private mapStatus;
testConnection(): Promise<void>;
private mapSiteBase;
listProjects(): Promise<Project[]>;
getProject(projectId: string): Promise<Project>;
private mapDeployUrl;
listDeployments(projectId: string, limit?: number): Promise<Deployment[]>;
getDeployment(deploymentId: string): Promise<Details>;
triggerDeployment(projectId: string, options?: {
preview?: boolean;
clearCache?: boolean;
}): Promise<TriggerResult>;
cancelDeployment(deploymentId: string): Promise<void>;
private closeWsConnection;
private setupWsIdleTimeout;
private setupWsConnectionTimeout;
private getWsConnection;
getDeploymentLogs(deploymentId: string, options?: {
since?: Date;
}): Promise<Log[]>;
}