@apillon/sdk
Version:
▶◀ Apillon SDK for NodeJS ▶◀
93 lines • 3.17 kB
TypeScript
import { DeployToEnvironment, DeploymentStatus, IDeploymentFilters } from '../../types/hosting';
import { IApillonList } from '../../types/apillon';
import { Deployment } from './deployment';
import { ApillonModel } from '../../lib/apillon';
import { FileMetadata, IFileUploadRequest } from '../../types/storage';
export declare class HostingWebsite extends ApillonModel {
/**
* User assigned name of the website.
*/
name: string;
/**
* User assigned description of the website.
*/
description: string;
/**
* Domain on which this website lives.
*/
domain: string;
/**
* Unique identifier of a storage bucket in which this website files reside.
*/
bucketUuid: string;
/**
* IPNS CID for staging environment.
* @deprecated - Use `cidStaging` instead
*/
ipnsStaging: string;
/**
* IPFS CID for staging environment.
*/
cidStaging: string;
/**
* IPFS CID for production environment.
*/
cidProduction: string;
/**
* IPNS CID for production environment.
*/
ipnsProduction: string;
/**
* Link to staging version of the website
*/
w3StagingLink: string;
/**
* Link to production version of the website
*/
w3ProductionLink: string;
/**
* Website last deployment (to any environment) unique identifier
*/
lastDeploymentUuid: string;
/**
* Status of last deployment
*/
lastDeploymentStatus: DeploymentStatus;
/**
* Constructor which should only be called via Hosting class.
* @param uuid Unique identifier of the website.
* @param data Data to populate the website with.
*/
constructor(uuid: string, data?: Partial<HostingWebsite>);
/**
* Uploads website files inside a folder via path.
* @param folderPath Path to the folder to upload.
* @param {IFileUploadRequest} params - Optional parameters to be used for uploading files
*/
uploadFromFolder(folderPath: string, params?: IFileUploadRequest): Promise<void>;
/**
* Uploads files to the hosting bucket.
* @param {FileMetadata[]} files - The files to be uploaded
* @param {IFileUploadRequest} params - Optional parameters to be used for uploading files
*/
uploadFiles(files: FileMetadata[], params?: IFileUploadRequest): Promise<void>;
/**
* Deploy a website to a new environment.
* @param {DeployToEnvironment} toEnvironment The environment to deploy to
* @returns Newly created deployment
*/
deploy(toEnvironment: DeployToEnvironment): Promise<Deployment>;
/**
* @param {IWebsiteFilters} params Query filters for listing websites
* @returns A list of all deployments instances.
*/
listDeployments(params?: IDeploymentFilters): Promise<IApillonList<Deployment>>;
/**
* Gets a deployment instance.
* @param deploymentUuid Uuid of the deployment.
* @returns Instance of a deployment.
*/
deployment(deploymentUuid: string): Deployment;
protected serializeFilter(key: string, value: any): any;
}
//# sourceMappingURL=hosting-website.d.ts.map