@@ -15,10 +15,6 @@ import type { Application } from "./application";
1515
1616/**
1717 * Represents the base application from the user endpoint
18- *
19- * @constructor
20- * @param client - The client for this application
21- * @param data - The data from this application
2218 */
2319export class BaseApplication {
2420 /** The application ID */
@@ -57,6 +53,13 @@ export class BaseApplication {
5753 /** Deploys module for this application */
5854 deploys = new DeploysModule ( this ) ;
5955
56+ /**
57+ * Represents the base application from the user endpoint
58+ *
59+ * @constructor
60+ * @param client - The client for this application
61+ * @param data - The data from this application
62+ */
6063 constructor (
6164 public readonly client : SquareCloudAPI ,
6265 data : APIUserApplication ,
@@ -80,11 +83,16 @@ export class BaseApplication {
8083 return this . backups ;
8184 }
8285
86+ /**
87+ * Fetches this application for full information
88+ */
8389 async fetch ( ) : Promise < Application > {
8490 return this . client . applications . fetch ( this . id ) ;
8591 }
8692
87- /** @returns The application current status information */
93+ /**
94+ * Gets the application current status information
95+ */
8896 async getStatus ( ) : Promise < ApplicationStatus > {
8997 const data = await this . client . api . request ( Routes . apps . status ( this . id ) ) ;
9098 const status = new ApplicationStatus ( this . client , data . response , this . id ) ;
@@ -95,7 +103,9 @@ export class BaseApplication {
95103 return status ;
96104 }
97105
98- /** @returns The application logs */
106+ /**
107+ * Gets the application current logs
108+ */
99109 async getLogs ( ) : Promise < string > {
100110 const data = await this . client . api . request ( Routes . apps . logs ( this . id ) ) ;
101111 const { logs } = data . response ;
@@ -108,7 +118,7 @@ export class BaseApplication {
108118
109119 /**
110120 * Starts up the application
111- * @returns `true ` for success or `false` for fail
121+ * @returns `boolean ` for success or fail
112122 */
113123 async start ( ) : Promise < boolean > {
114124 const data = await this . client . api . request ( Routes . apps . start ( this . id ) , {
@@ -120,7 +130,7 @@ export class BaseApplication {
120130
121131 /**
122132 * Stops the application
123- * @returns `true ` for success or `false` for fail
133+ * @returns `boolean ` for success or fail
124134 */
125135 async stop ( ) : Promise < boolean > {
126136 const data = await this . client . api . request ( Routes . apps . stop ( this . id ) , {
@@ -132,7 +142,7 @@ export class BaseApplication {
132142
133143 /**
134144 * Restarts the application
135- * @returns `true ` for success or `false` for fail
145+ * @returns `boolean ` for success or fail
136146 */
137147 async restart ( ) : Promise < boolean > {
138148 const data = await this . client . api . request ( Routes . apps . restart ( this . id ) , {
@@ -144,9 +154,9 @@ export class BaseApplication {
144154
145155 /**
146156 * Deletes your whole application
147- *
148157 * - This action is irreversible.
149- * @returns `true` for success or `false` for fail
158+ *
159+ * @returns `boolean` for success or fail
150160 */
151161 async delete ( ) : Promise < boolean > {
152162 const data = await this . client . api . request ( Routes . apps . delete ( this . id ) , {
@@ -165,7 +175,7 @@ export class BaseApplication {
165175 * ```ts
166176 * require('path').join(__dirname, 'fileName')
167177 * ```
168- * - Tip2 : use a zip file to commit more than one archive
178+ * - Tip 2 : use a zip file to commit more than one archive
169179 *
170180 * @param file - Buffer or absolute path to the file
171181 * @param fileName - The file name (e.g.: "index.js")
0 commit comments