@squarecloud/api
Version:
A NodeJS wrapper for Square Cloud API
34 lines (33 loc) • 1.21 kB
JavaScript
var __defProp = Object.defineProperty;
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "symbol" ? key + "" : key, value);
// src/structures/deploy.ts
var Deployment = class {
/**
* Represents an application deployment
*
* @constructor
* @param application - The application from which you fetched the deployment
* @param data - The data from this deployment
*/
constructor(application, data) {
this.application = application;
/** The ID of the deploy. */
__publicField(this, "id");
/** The current state of the deploy. */
__publicField(this, "state");
/** The date the deploy was created. */
__publicField(this, "createdAt");
/** The date the deploy was created in millisseconds. */
__publicField(this, "createdTimestamp");
const { id, state, date } = data;
this.id = id;
this.state = state;
this.createdAt = new Date(date);
this.createdTimestamp = this.createdAt.getTime();
}
};
export {
Deployment
};
//# sourceMappingURL=deploy.js.map