11import FormData from 'form-data' ;
22import { readFile } from 'fs/promises' ;
3- import {
4- validateBoolean ,
5- validatePathLike ,
6- validateString ,
7- } from '../assertions' ;
3+ import { validatePathLike , validateString } from '../assertions' ;
84import APIManager from '../managers/api' ;
5+ import FilesManager from '../managers/files' ;
96import {
107 APIResponse ,
118 ApplicationBackupResponse ,
@@ -16,7 +13,6 @@ import {
1613 Application as ApplicationType ,
1714} from '../types' ;
1815import { ApplicationStatusData } from '../types/application' ;
19- import FilesManager from '../managers/files' ;
2016
2117/**
2218 * Represents a Square Cloud application
@@ -102,22 +98,17 @@ export default class Application {
10298 } ;
10399 }
104100
105- /**
106- * @param full - Whether you want the complete logs (true) or the recent ones (false)
107- * @returns The application logs
108- */
109- async getLogs ( full ?: boolean ) : Promise < string > {
110- validateBoolean ( full , 'LOGS_FULL' ) ;
111-
101+ /** @returns The application logs */
102+ async getLogs ( ) : Promise < string > {
112103 const data = < APIResponse < ApplicationLogsResponse > > (
113- await this . apiManager . application ( ` ${ full ? 'full-' : '' } logs` , this . id )
104+ await this . apiManager . application ( ' logs' , this . id )
114105 ) ;
115106
116107 return data . response ?. logs ! ;
117108 }
118109
119110 /** @returns A backup download URL */
120- async backup ( ) : Promise < string > {
111+ async backupURL ( ) : Promise < string > {
121112 const data = < APIResponse < ApplicationBackupResponse > > (
122113 await this . apiManager . application ( 'backup' , this . id )
123114 ) ;
0 commit comments