@@ -35,24 +35,24 @@ export * from "./configuration";
3535/**
3636 * GroupDocs.Conversion Cloud API
3737 */
38- export class ConversionApi {
38+ export class ConvertApi {
3939
4040 /**
41- * Creates new instance of ConversionApi
41+ * Creates new instance of ConvertApi
4242 * @param appSid Application identifier (App SID).
4343 * @param appKey Application private key (App Key).
4444 */
4545 public static fromKeys ( appSid : string , appKey : string ) {
4646 const config = new Configuration ( appSid , appKey ) ;
47- return new ConversionApi ( config ) ;
47+ return new ConvertApi ( config ) ;
4848 }
4949
5050 /**
51- * Creates new instance of ConversionApi
51+ * Creates new instance of ConvertApi
5252 * @param config API configuration.
5353 */
5454 public static fromConfig ( config : Configuration ) {
55- return new ConversionApi ( config ) ;
55+ return new ConvertApi ( config ) ;
5656 }
5757
5858 /**
@@ -126,33 +126,6 @@ export class ConversionApi {
126126 return Promise . resolve ( result ) ;
127127 }
128128
129- /**
130- * Returns all supported conversion types
131- * @param requestObj contains request parameters
132- */
133- public async getSupportedConversionTypes ( requestObj : model . GetSupportedConversionTypesRequest ) : Promise < Array < model . SupportedFormat > > {
134- if ( requestObj === null || requestObj === undefined ) {
135- throw new Error ( 'Required parameter "requestObj" was null or undefined when calling getSupportedConversionTypes.' ) ;
136- }
137-
138- let localVarPath = this . configuration . getServerUrl ( ) + "/conversion/formats" ;
139- const queryParameters : any = { } ;
140-
141- localVarPath = addQueryParameterToUrl ( localVarPath , queryParameters , "filePath" , requestObj . filePath ) ;
142- localVarPath = addQueryParameterToUrl ( localVarPath , queryParameters , "storageName" , requestObj . storageName ) ;
143- localVarPath = addQueryParameterToUrl ( localVarPath , queryParameters , "format" , requestObj . format ) ;
144- const requestOptions : request . Options = {
145- method : "GET" ,
146- qs : queryParameters ,
147- uri : localVarPath ,
148- json : true ,
149- } ;
150-
151- const response = await invokeApiMethod ( requestOptions , this . configuration ) ;
152- const result = Serializer . deserialize ( response . body , "Array<SupportedFormat>" ) ;
153- return Promise . resolve ( result ) ;
154- }
155-
156129}
157130/**
158131 * GroupDocs.Conversion Cloud API
@@ -363,7 +336,7 @@ export class FileApi {
363336 }
364337
365338 const requestOptions : request . Options = {
366- method : "POST " ,
339+ method : "PUT " ,
367340 qs : queryParameters ,
368341 uri : localVarPath ,
369342 json : true ,
@@ -468,7 +441,7 @@ export class FolderApi {
468441
469442 localVarPath = addQueryParameterToUrl ( localVarPath , queryParameters , "storageName" , requestObj . storageName ) ;
470443 const requestOptions : request . Options = {
471- method : "POST " ,
444+ method : "PUT " ,
472445 qs : queryParameters ,
473446 uri : localVarPath ,
474447 json : true ,
@@ -577,6 +550,95 @@ export class FolderApi {
577550 return Promise . resolve ( response ) ;
578551 }
579552
553+ }
554+ /**
555+ * GroupDocs.Conversion Cloud API
556+ */
557+ export class InfoApi {
558+
559+ /**
560+ * Creates new instance of InfoApi
561+ * @param appSid Application identifier (App SID).
562+ * @param appKey Application private key (App Key).
563+ */
564+ public static fromKeys ( appSid : string , appKey : string ) {
565+ const config = new Configuration ( appSid , appKey ) ;
566+ return new InfoApi ( config ) ;
567+ }
568+
569+ /**
570+ * Creates new instance of InfoApi
571+ * @param config API configuration.
572+ */
573+ public static fromConfig ( config : Configuration ) {
574+ return new InfoApi ( config ) ;
575+ }
576+
577+ /**
578+ * Configuration
579+ */
580+ private configuration : Configuration ;
581+
582+ /**
583+ * @param config Configuration.
584+ */
585+ private constructor ( config : Configuration ) {
586+ this . configuration = config ;
587+ }
588+
589+ /**
590+ * Returns metadata for provided document
591+ * @param requestObj contains request parameters
592+ */
593+ public async getDocumentMetadata ( requestObj : model . GetDocumentMetadataRequest ) : Promise < model . DocumentMetadata > {
594+ if ( requestObj === null || requestObj === undefined ) {
595+ throw new Error ( 'Required parameter "requestObj" was null or undefined when calling getDocumentMetadata.' ) ;
596+ }
597+
598+ let localVarPath = this . configuration . getServerUrl ( ) + "/conversion/info" ;
599+ const queryParameters : any = { } ;
600+
601+ localVarPath = addQueryParameterToUrl ( localVarPath , queryParameters , "filePath" , requestObj . filePath ) ;
602+ localVarPath = addQueryParameterToUrl ( localVarPath , queryParameters , "storageName" , requestObj . storageName ) ;
603+ const requestOptions : request . Options = {
604+ method : "GET" ,
605+ qs : queryParameters ,
606+ uri : localVarPath ,
607+ json : true ,
608+ } ;
609+
610+ const response = await invokeApiMethod ( requestOptions , this . configuration ) ;
611+ const result = Serializer . deserialize ( response . body , "DocumentMetadata" ) ;
612+ return Promise . resolve ( result ) ;
613+ }
614+
615+ /**
616+ * Returns all supported conversion types
617+ * @param requestObj contains request parameters
618+ */
619+ public async getSupportedConversionTypes ( requestObj : model . GetSupportedConversionTypesRequest ) : Promise < Array < model . SupportedFormat > > {
620+ if ( requestObj === null || requestObj === undefined ) {
621+ throw new Error ( 'Required parameter "requestObj" was null or undefined when calling getSupportedConversionTypes.' ) ;
622+ }
623+
624+ let localVarPath = this . configuration . getServerUrl ( ) + "/conversion/formats" ;
625+ const queryParameters : any = { } ;
626+
627+ localVarPath = addQueryParameterToUrl ( localVarPath , queryParameters , "filePath" , requestObj . filePath ) ;
628+ localVarPath = addQueryParameterToUrl ( localVarPath , queryParameters , "storageName" , requestObj . storageName ) ;
629+ localVarPath = addQueryParameterToUrl ( localVarPath , queryParameters , "format" , requestObj . format ) ;
630+ const requestOptions : request . Options = {
631+ method : "GET" ,
632+ qs : queryParameters ,
633+ uri : localVarPath ,
634+ json : true ,
635+ } ;
636+
637+ const response = await invokeApiMethod ( requestOptions , this . configuration ) ;
638+ const result = Serializer . deserialize ( response . body , "Array<SupportedFormat>" ) ;
639+ return Promise . resolve ( result ) ;
640+ }
641+
580642}
581643/**
582644 * GroupDocs.Conversion Cloud API
0 commit comments