@squarecloud/api
Version:
A NodeJS wrapper for Square Cloud API
56 lines (55 loc) • 2.17 kB
JavaScript
var __defProp = Object.defineProperty;
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
var __getOwnPropNames = Object.getOwnPropertyNames;
var __hasOwnProp = Object.prototype.hasOwnProperty;
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
var __export = (target, all) => {
for (var name in all)
__defProp(target, name, { get: all[name], enumerable: true });
};
var __copyProps = (to, from, except, desc) => {
if (from && typeof from === "object" || typeof from === "function") {
for (let key of __getOwnPropNames(from))
if (!__hasOwnProp.call(to, key) && key !== except)
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
}
return to;
};
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "symbol" ? key + "" : key, value);
// src/structures/deploy.ts
var deploy_exports = {};
__export(deploy_exports, {
Deployment: () => Deployment
});
module.exports = __toCommonJS(deploy_exports);
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();
}
};
// Annotate the CommonJS export names for ESM import in node:
0 && (module.exports = {
Deployment
});
//# sourceMappingURL=deploy.cjs.map