UNPKG

@apillon/sdk

Version:

▶◀ Apillon SDK for NodeJS ▶◀

57 lines 1.89 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.Deployment = void 0; const apillon_1 = require("../../lib/apillon"); const hosting_1 = require("../../types/hosting"); class Deployment extends apillon_1.ApillonModel { /** * Constructor which should only be called via HostingWebsite class. * @param websiteUuid Unique identifier of the deployment's website. * @param deploymentUuid Unique identifier of the deployment. * @param data Data to populate the deployment with. */ constructor(websiteUuid, deploymentUuid, data) { super(deploymentUuid); /** * Unique identifier of the website. */ this.websiteUuid = null; /** * IPFS CID for the deployment. */ this.cid = null; /** * IPFS V1 CID for the deployment. */ this.cidv1 = null; /** * Environment of the deployment */ this.environment = null; /** * Status of the deployment */ this.deploymentStatus = null; /** * Size of the website in bytes */ this.size = null; /** * Serial number of the deployment for this environment */ this.number = null; this.websiteUuid = websiteUuid; this.API_PREFIX = `/hosting/websites/${websiteUuid}/deployments/${deploymentUuid}`; this.populate(data); } serializeFilter(key, value) { const serialized = super.serializeFilter(key, value); const enums = { environment: hosting_1.DeployToEnvironment[value], deploymentStatus: hosting_1.DeploymentStatus[value], }; return Object.keys(enums).includes(key) ? enums[key] : serialized; } } exports.Deployment = Deployment; //# sourceMappingURL=deployment.js.map