@@ -34,7 +34,6 @@ export interface IGalleryApi extends compatBase.GalleryCompatHttpClientBase {
34
34
getCategoryTree ( product : string , categoryId : string , lcid ?: number , source ?: string , productVersion ?: string , skus ?: string , subSkus ?: string , productArchitecture ?: string ) : Promise < GalleryInterfaces . ProductCategory > ;
35
35
getRootCategories ( product : string , lcid ?: number , source ?: string , productVersion ?: string , skus ?: string , subSkus ?: string ) : Promise < GalleryInterfaces . ProductCategoriesResult > ;
36
36
getCertificate ( publisherName : string , extensionName : string , version ?: string ) : Promise < NodeJS . ReadableStream > ;
37
- getContentVerificationLog ( publisherName : string , extensionName : string ) : Promise < NodeJS . ReadableStream > ;
38
37
createSupportRequest ( customerSupportRequest : GalleryInterfaces . CustomerSupportRequest ) : Promise < void > ;
39
38
createDraftForEditExtension ( publisherName : string , extensionName : string ) : Promise < GalleryInterfaces . ExtensionDraft > ;
40
39
performEditExtensionDraftOperation ( draftPatch : GalleryInterfaces . ExtensionDraftPatch , publisherName : string , extensionName : string , draftId : string ) : Promise < GalleryInterfaces . ExtensionDraft > ;
@@ -101,6 +100,7 @@ export interface IGalleryApi extends compatBase.GalleryCompatHttpClientBase {
101
100
getExtensionDailyStatsAnonymous ( publisherName : string , extensionName : string , version : string ) : Promise < GalleryInterfaces . ExtensionDailyStats > ;
102
101
incrementExtensionDailyStat ( publisherName : string , extensionName : string , version : string , statType : string , targetPlatform ?: string ) : Promise < void > ;
103
102
getVerificationLog ( publisherName : string , extensionName : string , version : string , targetPlatform ?: string ) : Promise < NodeJS . ReadableStream > ;
103
+ getVSCodeExtensionLatestVersion ( publisherName : string , extensionName : string ) : Promise < GalleryInterfaces . PublishedExtension > ;
104
104
updateVSCodeWebExtensionStatistics ( itemName : string , version : string , statType : GalleryInterfaces . VSCodeWebExtensionStatisicsType ) : Promise < void > ;
105
105
}
106
106
@@ -879,40 +879,6 @@ export class GalleryApi extends compatBase.GalleryCompatHttpClientBase implement
879
879
} ) ;
880
880
}
881
881
882
- /**
883
- * @param {string } publisherName
884
- * @param {string } extensionName
885
- */
886
- public async getContentVerificationLog (
887
- publisherName : string ,
888
- extensionName : string
889
- ) : Promise < NodeJS . ReadableStream > {
890
-
891
- return new Promise < NodeJS . ReadableStream > ( async ( resolve , reject ) => {
892
- let routeValues : any = {
893
- publisherName : publisherName ,
894
- extensionName : extensionName
895
- } ;
896
-
897
- try {
898
- let verData : vsom . ClientVersioningData = await this . vsoClient . getVersioningData (
899
- "7.2-preview.1" ,
900
- "gallery" ,
901
- "c0f1c7c4-3557-4ffb-b774-1e48c4865e99" ,
902
- routeValues ) ;
903
-
904
- let url : string = verData . requestUrl ! ;
905
-
906
- let apiVersion : string = verData . apiVersion ! ;
907
- let accept : string = this . createAcceptHeader ( "application/octet-stream" , apiVersion ) ;
908
- resolve ( ( await this . http . get ( url , { "Accept" : accept } ) ) . message ) ;
909
- }
910
- catch ( err ) {
911
- reject ( err ) ;
912
- }
913
- } ) ;
914
- }
915
-
916
882
/**
917
883
* @param {GalleryInterfaces.CustomerSupportRequest } customerSupportRequest
918
884
*/
@@ -4102,6 +4068,50 @@ export class GalleryApi extends compatBase.GalleryCompatHttpClientBase implement
4102
4068
} ) ;
4103
4069
}
4104
4070
4071
+ /**
4072
+ * Endpoint to get the latest version(s) of a VS Code extension.
4073
+ *
4074
+ * @param {string } publisherName - The name of the publisher of the requested VS Code extension.
4075
+ * @param {string } extensionName - The extension name.
4076
+ */
4077
+ public async getVSCodeExtensionLatestVersion (
4078
+ publisherName : string ,
4079
+ extensionName : string
4080
+ ) : Promise < GalleryInterfaces . PublishedExtension > {
4081
+
4082
+ return new Promise < GalleryInterfaces . PublishedExtension > ( async ( resolve , reject ) => {
4083
+ let routeValues : any = {
4084
+ publisherName : publisherName ,
4085
+ extensionName : extensionName
4086
+ } ;
4087
+
4088
+ try {
4089
+ let verData : vsom . ClientVersioningData = await this . vsoClient . getVersioningData (
4090
+ "7.2-preview.1" ,
4091
+ "gallery" ,
4092
+ "86037ad5-f601-40fb-b363-6ff262b61521" ,
4093
+ routeValues ) ;
4094
+
4095
+ let url : string = verData . requestUrl ! ;
4096
+ let options : restm . IRequestOptions = this . createRequestOptions ( 'application/json' ,
4097
+ verData . apiVersion ) ;
4098
+
4099
+ let res : restm . IRestResponse < GalleryInterfaces . PublishedExtension > ;
4100
+ res = await this . rest . get < GalleryInterfaces . PublishedExtension > ( url , options ) ;
4101
+
4102
+ let ret = this . formatResponse ( res . result ,
4103
+ GalleryInterfaces . TypeInfo . PublishedExtension ,
4104
+ false ) ;
4105
+
4106
+ resolve ( ret ) ;
4107
+
4108
+ }
4109
+ catch ( err ) {
4110
+ reject ( err ) ;
4111
+ }
4112
+ } ) ;
4113
+ }
4114
+
4105
4115
/**
4106
4116
* @param {string } itemName
4107
4117
* @param {string } version
0 commit comments