UNPKG

45.1 kBTypeScriptView Raw
1/// <reference types="node" />
2import VsoBaseInterfaces = require('./interfaces/common/VsoBaseInterfaces');
3import compatBase = require("././GalleryCompatHttpClientBase");
4import GalleryInterfaces = require("./interfaces/GalleryInterfaces");
5export interface IGalleryApi extends compatBase.GalleryCompatHttpClientBase {
6 shareExtensionById(extensionId: string, accountName: string): Promise<void>;
7 unshareExtensionById(extensionId: string, accountName: string): Promise<void>;
8 shareExtension(publisherName: string, extensionName: string, accountName: string): Promise<void>;
9 unshareExtension(publisherName: string, extensionName: string, accountName: string): Promise<void>;
10 getAcquisitionOptions(itemId: string, installationTarget: string, testCommerce?: boolean, isFreeOrTrialInstall?: boolean): Promise<GalleryInterfaces.AcquisitionOptions>;
11 requestAcquisition(acquisitionRequest: GalleryInterfaces.ExtensionAcquisitionRequest): Promise<GalleryInterfaces.ExtensionAcquisitionRequest>;
12 getAssetByName(customHeaders: any, publisherName: string, extensionName: string, version: string, assetType: string, accountToken?: string, acceptDefault?: boolean, accountTokenHeader?: String): Promise<NodeJS.ReadableStream>;
13 getAsset(customHeaders: any, extensionId: string, version: string, assetType: string, accountToken?: string, acceptDefault?: boolean, accountTokenHeader?: String): Promise<NodeJS.ReadableStream>;
14 getAssetAuthenticated(customHeaders: any, publisherName: string, extensionName: string, version: string, assetType: string, accountToken?: string, accountTokenHeader?: String): Promise<NodeJS.ReadableStream>;
15 associateAzurePublisher(publisherName: string, azurePublisherId: string): Promise<GalleryInterfaces.AzurePublisher>;
16 queryAssociatedAzurePublisher(publisherName: string): Promise<GalleryInterfaces.AzurePublisher>;
17 getCategories(languages?: string): Promise<string[]>;
18 getCategoryDetails(categoryName: string, languages?: string, product?: string): Promise<GalleryInterfaces.CategoriesResult>;
19 getCategoryTree(product: string, categoryId: string, lcid?: number, source?: string, productVersion?: string, skus?: string, subSkus?: string, productArchitecture?: string): Promise<GalleryInterfaces.ProductCategory>;
20 getRootCategories(product: string, lcid?: number, source?: string, productVersion?: string, skus?: string, subSkus?: string): Promise<GalleryInterfaces.ProductCategoriesResult>;
21 getCertificate(publisherName: string, extensionName: string, version?: string): Promise<NodeJS.ReadableStream>;
22 getContentVerificationLog(publisherName: string, extensionName: string): Promise<NodeJS.ReadableStream>;
23 createSupportRequest(customerSupportRequest: GalleryInterfaces.CustomerSupportRequest): Promise<void>;
24 createDraftForEditExtension(publisherName: string, extensionName: string): Promise<GalleryInterfaces.ExtensionDraft>;
25 performEditExtensionDraftOperation(draftPatch: GalleryInterfaces.ExtensionDraftPatch, publisherName: string, extensionName: string, draftId: string): Promise<GalleryInterfaces.ExtensionDraft>;
26 updatePayloadInDraftForEditExtension(customHeaders: any, contentStream: NodeJS.ReadableStream, publisherName: string, extensionName: string, draftId: string, fileName?: String): Promise<GalleryInterfaces.ExtensionDraft>;
27 addAssetForEditExtensionDraft(customHeaders: any, contentStream: NodeJS.ReadableStream, publisherName: string, extensionName: string, draftId: string, assetType: string): Promise<GalleryInterfaces.ExtensionDraftAsset>;
28 createDraftForNewExtension(customHeaders: any, contentStream: NodeJS.ReadableStream, publisherName: string, product: String, fileName?: String): Promise<GalleryInterfaces.ExtensionDraft>;
29 performNewExtensionDraftOperation(draftPatch: GalleryInterfaces.ExtensionDraftPatch, publisherName: string, draftId: string): Promise<GalleryInterfaces.ExtensionDraft>;
30 updatePayloadInDraftForNewExtension(customHeaders: any, contentStream: NodeJS.ReadableStream, publisherName: string, draftId: string, fileName?: String): Promise<GalleryInterfaces.ExtensionDraft>;
31 addAssetForNewExtensionDraft(customHeaders: any, contentStream: NodeJS.ReadableStream, publisherName: string, draftId: string, assetType: string): Promise<GalleryInterfaces.ExtensionDraftAsset>;
32 getAssetFromEditExtensionDraft(publisherName: string, draftId: string, assetType: string, extensionName: string): Promise<NodeJS.ReadableStream>;
33 getAssetFromNewExtensionDraft(publisherName: string, draftId: string, assetType: string): Promise<NodeJS.ReadableStream>;
34 getExtensionEvents(publisherName: string, extensionName: string, count?: number, afterDate?: Date, include?: string, includeProperty?: string): Promise<GalleryInterfaces.ExtensionEvents>;
35 publishExtensionEvents(extensionEvents: GalleryInterfaces.ExtensionEvents[]): Promise<void>;
36 queryExtensions(customHeaders: any, extensionQuery: GalleryInterfaces.ExtensionQuery, accountToken?: string, accountTokenHeader?: String): Promise<GalleryInterfaces.ExtensionQueryResult>;
37 createExtension(customHeaders: any, contentStream: NodeJS.ReadableStream, extensionType?: string, reCaptchaToken?: string): Promise<GalleryInterfaces.PublishedExtension>;
38 deleteExtensionById(extensionId: string, version?: string): Promise<void>;
39 getExtensionById(extensionId: string, version?: string, flags?: GalleryInterfaces.ExtensionQueryFlags): Promise<GalleryInterfaces.PublishedExtension>;
40 updateExtensionById(extensionId: string, reCaptchaToken?: string): Promise<GalleryInterfaces.PublishedExtension>;
41 createExtensionWithPublisher(customHeaders: any, contentStream: NodeJS.ReadableStream, publisherName: string, extensionType?: string, reCaptchaToken?: string): Promise<GalleryInterfaces.PublishedExtension>;
42 deleteExtension(publisherName: string, extensionName: string, version?: string): Promise<void>;
43 getExtension(customHeaders: any, publisherName: string, extensionName: string, version?: string, flags?: GalleryInterfaces.ExtensionQueryFlags, accountToken?: string, accountTokenHeader?: String): Promise<GalleryInterfaces.PublishedExtension>;
44 updateExtension(customHeaders: any, contentStream: NodeJS.ReadableStream, publisherName: string, extensionName: string, extensionType?: string, reCaptchaToken?: string, bypassScopeCheck?: boolean): Promise<GalleryInterfaces.PublishedExtension>;
45 updateExtensionProperties(publisherName: string, extensionName: string, flags: GalleryInterfaces.PublishedExtensionFlags): Promise<GalleryInterfaces.PublishedExtension>;
46 shareExtensionWithHost(publisherName: string, extensionName: string, hostType: string, hostName: string): Promise<void>;
47 unshareExtensionWithHost(publisherName: string, extensionName: string, hostType: string, hostName: string): Promise<void>;
48 extensionValidator(azureRestApiRequestModel: GalleryInterfaces.AzureRestApiRequestModel): Promise<void>;
49 sendNotifications(notificationData: GalleryInterfaces.NotificationsData): Promise<void>;
50 getPackage(customHeaders: any, publisherName: string, extensionName: string, version: string, accountToken?: string, acceptDefault?: boolean, accountTokenHeader?: String): Promise<NodeJS.ReadableStream>;
51 getAssetWithToken(customHeaders: any, publisherName: string, extensionName: string, version: string, assetType: string, assetToken?: string, accountToken?: string, acceptDefault?: boolean, accountTokenHeader?: String): Promise<NodeJS.ReadableStream>;
52 deletePublisherAsset(publisherName: string, assetType?: string): Promise<void>;
53 getPublisherAsset(publisherName: string, assetType?: string): Promise<NodeJS.ReadableStream>;
54 updatePublisherAsset(customHeaders: any, contentStream: NodeJS.ReadableStream, publisherName: string, assetType?: string, fileName?: String): Promise<{
55 [key: string]: string;
56 }>;
57 fetchDomainToken(publisherName: string): Promise<string>;
58 verifyDomainToken(publisherName: string): Promise<void>;
59 queryPublishers(publisherQuery: GalleryInterfaces.PublisherQuery): Promise<GalleryInterfaces.PublisherQueryResult>;
60 createPublisher(publisher: GalleryInterfaces.Publisher): Promise<GalleryInterfaces.Publisher>;
61 deletePublisher(publisherName: string): Promise<void>;
62 getPublisher(publisherName: string, flags?: number): Promise<GalleryInterfaces.Publisher>;
63 updatePublisher(publisher: GalleryInterfaces.Publisher, publisherName: string): Promise<GalleryInterfaces.Publisher>;
64 updatePublisherMembers(roleAssignments: GalleryInterfaces.PublisherUserRoleAssignmentRef[], publisherName: string, limitToCallerIdentityDomain?: boolean): Promise<GalleryInterfaces.PublisherRoleAssignment[]>;
65 publishExtensionWithPublisherSignature(customHeaders: any, contentStream: NodeJS.ReadableStream, publisherName: string, extensionName: string, extensionType?: string, reCaptchaToken?: string, bypassScopeCheck?: boolean): Promise<GalleryInterfaces.PublishedExtension>;
66 getPublisherWithoutToken(publisherName: string): Promise<GalleryInterfaces.Publisher>;
67 getQuestions(publisherName: string, extensionName: string, count?: number, page?: number, afterDate?: Date): Promise<GalleryInterfaces.QuestionsResult>;
68 reportQuestion(concern: GalleryInterfaces.Concern, pubName: string, extName: string, questionId: number): Promise<GalleryInterfaces.Concern>;
69 createQuestion(question: GalleryInterfaces.Question, publisherName: string, extensionName: string): Promise<GalleryInterfaces.Question>;
70 deleteQuestion(publisherName: string, extensionName: string, questionId: number): Promise<void>;
71 updateQuestion(question: GalleryInterfaces.Question, publisherName: string, extensionName: string, questionId: number): Promise<GalleryInterfaces.Question>;
72 createResponse(response: GalleryInterfaces.Response, publisherName: string, extensionName: string, questionId: number): Promise<GalleryInterfaces.Response>;
73 deleteResponse(publisherName: string, extensionName: string, questionId: number, responseId: number): Promise<void>;
74 updateResponse(response: GalleryInterfaces.Response, publisherName: string, extensionName: string, questionId: number, responseId: number): Promise<GalleryInterfaces.Response>;
75 getExtensionReports(publisherName: string, extensionName: string, days?: number, count?: number, afterDate?: Date): Promise<any>;
76 getReviews(publisherName: string, extensionName: string, count?: number, filterOptions?: GalleryInterfaces.ReviewFilterOptions, beforeDate?: Date, afterDate?: Date): Promise<GalleryInterfaces.ReviewsResult>;
77 getReviewsSummary(pubName: string, extName: string, beforeDate?: Date, afterDate?: Date): Promise<GalleryInterfaces.ReviewSummary>;
78 createReview(review: GalleryInterfaces.Review, pubName: string, extName: string): Promise<GalleryInterfaces.Review>;
79 deleteReview(pubName: string, extName: string, reviewId: number): Promise<void>;
80 updateReview(reviewPatch: GalleryInterfaces.ReviewPatch, pubName: string, extName: string, reviewId: number): Promise<GalleryInterfaces.ReviewPatch>;
81 createCategory(category: GalleryInterfaces.ExtensionCategory): Promise<GalleryInterfaces.ExtensionCategory>;
82 getGalleryUserSettings(userScope: string, key?: string): Promise<{
83 [key: string]: any;
84 }>;
85 setGalleryUserSettings(entries: {
86 [key: string]: any;
87 }, userScope: string): Promise<void>;
88 generateKey(keyType: string, expireCurrentSeconds?: number): Promise<void>;
89 getSigningKey(keyType: string): Promise<string>;
90 updateExtensionStatistics(extensionStatisticsUpdate: GalleryInterfaces.ExtensionStatisticUpdate, publisherName: string, extensionName: string): Promise<void>;
91 getExtensionDailyStats(publisherName: string, extensionName: string, days?: number, aggregate?: GalleryInterfaces.ExtensionStatsAggregateType, afterDate?: Date): Promise<GalleryInterfaces.ExtensionDailyStats>;
92 getExtensionDailyStatsAnonymous(publisherName: string, extensionName: string, version: string): Promise<GalleryInterfaces.ExtensionDailyStats>;
93 incrementExtensionDailyStat(publisherName: string, extensionName: string, version: string, statType: string, targetPlatform?: string): Promise<void>;
94 getVerificationLog(publisherName: string, extensionName: string, version: string, targetPlatform?: string): Promise<NodeJS.ReadableStream>;
95 updateVSCodeWebExtensionStatistics(itemName: string, version: string, statType: GalleryInterfaces.VSCodeWebExtensionStatisicsType): Promise<void>;
96}
97export declare class GalleryApi extends compatBase.GalleryCompatHttpClientBase implements IGalleryApi {
98 constructor(baseUrl: string, handlers: VsoBaseInterfaces.IRequestHandler[], options?: VsoBaseInterfaces.IRequestOptions);
99 static readonly RESOURCE_AREA_ID = "69d21c00-f135-441b-b5ce-3626378e0819";
100 /**
101 * @param {string} extensionId
102 * @param {string} accountName
103 */
104 shareExtensionById(extensionId: string, accountName: string): Promise<void>;
105 /**
106 * @param {string} extensionId
107 * @param {string} accountName
108 */
109 unshareExtensionById(extensionId: string, accountName: string): Promise<void>;
110 /**
111 * @param {string} publisherName
112 * @param {string} extensionName
113 * @param {string} accountName
114 */
115 shareExtension(publisherName: string, extensionName: string, accountName: string): Promise<void>;
116 /**
117 * @param {string} publisherName
118 * @param {string} extensionName
119 * @param {string} accountName
120 */
121 unshareExtension(publisherName: string, extensionName: string, accountName: string): Promise<void>;
122 /**
123 * @param {string} itemId
124 * @param {string} installationTarget
125 * @param {boolean} testCommerce
126 * @param {boolean} isFreeOrTrialInstall
127 */
128 getAcquisitionOptions(itemId: string, installationTarget: string, testCommerce?: boolean, isFreeOrTrialInstall?: boolean): Promise<GalleryInterfaces.AcquisitionOptions>;
129 /**
130 * @param {GalleryInterfaces.ExtensionAcquisitionRequest} acquisitionRequest
131 */
132 requestAcquisition(acquisitionRequest: GalleryInterfaces.ExtensionAcquisitionRequest): Promise<GalleryInterfaces.ExtensionAcquisitionRequest>;
133 /**
134 * @param {string} publisherName
135 * @param {string} extensionName
136 * @param {string} version
137 * @param {string} assetType
138 * @param {string} accountToken
139 * @param {boolean} acceptDefault
140 * @param {String} accountTokenHeader - Header to pass the account token
141 */
142 getAssetByName(customHeaders: any, publisherName: string, extensionName: string, version: string, assetType: string, accountToken?: string, acceptDefault?: boolean, accountTokenHeader?: String): Promise<NodeJS.ReadableStream>;
143 /**
144 * @param {string} extensionId
145 * @param {string} version
146 * @param {string} assetType
147 * @param {string} accountToken
148 * @param {boolean} acceptDefault
149 * @param {String} accountTokenHeader - Header to pass the account token
150 */
151 getAsset(customHeaders: any, extensionId: string, version: string, assetType: string, accountToken?: string, acceptDefault?: boolean, accountTokenHeader?: String): Promise<NodeJS.ReadableStream>;
152 /**
153 * @param {string} publisherName
154 * @param {string} extensionName
155 * @param {string} version
156 * @param {string} assetType
157 * @param {string} accountToken
158 * @param {String} accountTokenHeader - Header to pass the account token
159 */
160 getAssetAuthenticated(customHeaders: any, publisherName: string, extensionName: string, version: string, assetType: string, accountToken?: string, accountTokenHeader?: String): Promise<NodeJS.ReadableStream>;
161 /**
162 * @param {string} publisherName
163 * @param {string} azurePublisherId
164 */
165 associateAzurePublisher(publisherName: string, azurePublisherId: string): Promise<GalleryInterfaces.AzurePublisher>;
166 /**
167 * @param {string} publisherName
168 */
169 queryAssociatedAzurePublisher(publisherName: string): Promise<GalleryInterfaces.AzurePublisher>;
170 /**
171 * @param {string} languages
172 */
173 getCategories(languages?: string): Promise<string[]>;
174 /**
175 * @param {string} categoryName
176 * @param {string} languages
177 * @param {string} product
178 */
179 getCategoryDetails(categoryName: string, languages?: string, product?: string): Promise<GalleryInterfaces.CategoriesResult>;
180 /**
181 * @param {string} product
182 * @param {string} categoryId
183 * @param {number} lcid
184 * @param {string} source
185 * @param {string} productVersion
186 * @param {string} skus
187 * @param {string} subSkus
188 * @param {string} productArchitecture
189 */
190 getCategoryTree(product: string, categoryId: string, lcid?: number, source?: string, productVersion?: string, skus?: string, subSkus?: string, productArchitecture?: string): Promise<GalleryInterfaces.ProductCategory>;
191 /**
192 * @param {string} product
193 * @param {number} lcid
194 * @param {string} source
195 * @param {string} productVersion
196 * @param {string} skus
197 * @param {string} subSkus
198 */
199 getRootCategories(product: string, lcid?: number, source?: string, productVersion?: string, skus?: string, subSkus?: string): Promise<GalleryInterfaces.ProductCategoriesResult>;
200 /**
201 * @param {string} publisherName
202 * @param {string} extensionName
203 * @param {string} version
204 */
205 getCertificate(publisherName: string, extensionName: string, version?: string): Promise<NodeJS.ReadableStream>;
206 /**
207 * @param {string} publisherName
208 * @param {string} extensionName
209 */
210 getContentVerificationLog(publisherName: string, extensionName: string): Promise<NodeJS.ReadableStream>;
211 /**
212 * @param {GalleryInterfaces.CustomerSupportRequest} customerSupportRequest
213 */
214 createSupportRequest(customerSupportRequest: GalleryInterfaces.CustomerSupportRequest): Promise<void>;
215 /**
216 * @param {string} publisherName
217 * @param {string} extensionName
218 */
219 createDraftForEditExtension(publisherName: string, extensionName: string): Promise<GalleryInterfaces.ExtensionDraft>;
220 /**
221 * @param {GalleryInterfaces.ExtensionDraftPatch} draftPatch
222 * @param {string} publisherName
223 * @param {string} extensionName
224 * @param {string} draftId
225 */
226 performEditExtensionDraftOperation(draftPatch: GalleryInterfaces.ExtensionDraftPatch, publisherName: string, extensionName: string, draftId: string): Promise<GalleryInterfaces.ExtensionDraft>;
227 /**
228 * @param {NodeJS.ReadableStream} contentStream - Content to upload
229 * @param {string} publisherName
230 * @param {string} extensionName
231 * @param {string} draftId
232 * @param {String} fileName - Header to pass the filename of the uploaded data
233 */
234 updatePayloadInDraftForEditExtension(customHeaders: any, contentStream: NodeJS.ReadableStream, publisherName: string, extensionName: string, draftId: string, fileName?: String): Promise<GalleryInterfaces.ExtensionDraft>;
235 /**
236 * @param {NodeJS.ReadableStream} contentStream - Content to upload
237 * @param {string} publisherName
238 * @param {string} extensionName
239 * @param {string} draftId
240 * @param {string} assetType
241 */
242 addAssetForEditExtensionDraft(customHeaders: any, contentStream: NodeJS.ReadableStream, publisherName: string, extensionName: string, draftId: string, assetType: string): Promise<GalleryInterfaces.ExtensionDraftAsset>;
243 /**
244 * @param {NodeJS.ReadableStream} contentStream - Content to upload
245 * @param {string} publisherName
246 * @param {String} product - Header to pass the product type of the payload file
247 * @param {String} fileName - Header to pass the filename of the uploaded data
248 */
249 createDraftForNewExtension(customHeaders: any, contentStream: NodeJS.ReadableStream, publisherName: string, product: String, fileName?: String): Promise<GalleryInterfaces.ExtensionDraft>;
250 /**
251 * @param {GalleryInterfaces.ExtensionDraftPatch} draftPatch
252 * @param {string} publisherName
253 * @param {string} draftId
254 */
255 performNewExtensionDraftOperation(draftPatch: GalleryInterfaces.ExtensionDraftPatch, publisherName: string, draftId: string): Promise<GalleryInterfaces.ExtensionDraft>;
256 /**
257 * @param {NodeJS.ReadableStream} contentStream - Content to upload
258 * @param {string} publisherName
259 * @param {string} draftId
260 * @param {String} fileName - Header to pass the filename of the uploaded data
261 */
262 updatePayloadInDraftForNewExtension(customHeaders: any, contentStream: NodeJS.ReadableStream, publisherName: string, draftId: string, fileName?: String): Promise<GalleryInterfaces.ExtensionDraft>;
263 /**
264 * @param {NodeJS.ReadableStream} contentStream - Content to upload
265 * @param {string} publisherName
266 * @param {string} draftId
267 * @param {string} assetType
268 */
269 addAssetForNewExtensionDraft(customHeaders: any, contentStream: NodeJS.ReadableStream, publisherName: string, draftId: string, assetType: string): Promise<GalleryInterfaces.ExtensionDraftAsset>;
270 /**
271 * @param {string} publisherName
272 * @param {string} draftId
273 * @param {string} assetType
274 * @param {string} extensionName
275 */
276 getAssetFromEditExtensionDraft(publisherName: string, draftId: string, assetType: string, extensionName: string): Promise<NodeJS.ReadableStream>;
277 /**
278 * @param {string} publisherName
279 * @param {string} draftId
280 * @param {string} assetType
281 */
282 getAssetFromNewExtensionDraft(publisherName: string, draftId: string, assetType: string): Promise<NodeJS.ReadableStream>;
283 /**
284 * Get install/uninstall events of an extension. If both count and afterDate parameters are specified, count takes precedence.
285 *
286 * @param {string} publisherName - Name of the publisher
287 * @param {string} extensionName - Name of the extension
288 * @param {number} count - Count of events to fetch, applies to each event type.
289 * @param {Date} afterDate - Fetch events that occurred on or after this date
290 * @param {string} include - Filter options. Supported values: install, uninstall, review, acquisition, sales. Default is to fetch all types of events
291 * @param {string} includeProperty - Event properties to include. Currently only 'lastContactDetails' is supported for uninstall events
292 */
293 getExtensionEvents(publisherName: string, extensionName: string, count?: number, afterDate?: Date, include?: string, includeProperty?: string): Promise<GalleryInterfaces.ExtensionEvents>;
294 /**
295 * API endpoint to publish extension install/uninstall events. This is meant to be invoked by EMS only for sending us data related to install/uninstall of an extension.
296 *
297 * @param {GalleryInterfaces.ExtensionEvents[]} extensionEvents
298 */
299 publishExtensionEvents(extensionEvents: GalleryInterfaces.ExtensionEvents[]): Promise<void>;
300 /**
301 * @param {GalleryInterfaces.ExtensionQuery} extensionQuery
302 * @param {string} accountToken
303 * @param {String} accountTokenHeader - Header to pass the account token
304 */
305 queryExtensions(customHeaders: any, extensionQuery: GalleryInterfaces.ExtensionQuery, accountToken?: string, accountTokenHeader?: String): Promise<GalleryInterfaces.ExtensionQueryResult>;
306 /**
307 * @param {NodeJS.ReadableStream} contentStream - Content to upload
308 * @param {string} extensionType
309 * @param {string} reCaptchaToken
310 */
311 createExtension(customHeaders: any, contentStream: NodeJS.ReadableStream, extensionType?: string, reCaptchaToken?: string): Promise<GalleryInterfaces.PublishedExtension>;
312 /**
313 * @param {string} extensionId
314 * @param {string} version
315 */
316 deleteExtensionById(extensionId: string, version?: string): Promise<void>;
317 /**
318 * @param {string} extensionId
319 * @param {string} version
320 * @param {GalleryInterfaces.ExtensionQueryFlags} flags
321 */
322 getExtensionById(extensionId: string, version?: string, flags?: GalleryInterfaces.ExtensionQueryFlags): Promise<GalleryInterfaces.PublishedExtension>;
323 /**
324 * @param {string} extensionId
325 * @param {string} reCaptchaToken
326 */
327 updateExtensionById(extensionId: string, reCaptchaToken?: string): Promise<GalleryInterfaces.PublishedExtension>;
328 /**
329 * @param {NodeJS.ReadableStream} contentStream - Content to upload
330 * @param {string} publisherName
331 * @param {string} extensionType
332 * @param {string} reCaptchaToken
333 */
334 createExtensionWithPublisher(customHeaders: any, contentStream: NodeJS.ReadableStream, publisherName: string, extensionType?: string, reCaptchaToken?: string): Promise<GalleryInterfaces.PublishedExtension>;
335 /**
336 * @param {string} publisherName
337 * @param {string} extensionName
338 * @param {string} version
339 */
340 deleteExtension(publisherName: string, extensionName: string, version?: string): Promise<void>;
341 /**
342 * @param {string} publisherName
343 * @param {string} extensionName
344 * @param {string} version
345 * @param {GalleryInterfaces.ExtensionQueryFlags} flags
346 * @param {string} accountToken
347 * @param {String} accountTokenHeader - Header to pass the account token
348 */
349 getExtension(customHeaders: any, publisherName: string, extensionName: string, version?: string, flags?: GalleryInterfaces.ExtensionQueryFlags, accountToken?: string, accountTokenHeader?: String): Promise<GalleryInterfaces.PublishedExtension>;
350 /**
351 * REST endpoint to update an extension.
352 *
353 * @param {NodeJS.ReadableStream} contentStream - Content to upload
354 * @param {string} publisherName - Name of the publisher
355 * @param {string} extensionName - Name of the extension
356 * @param {string} extensionType
357 * @param {string} reCaptchaToken
358 * @param {boolean} bypassScopeCheck - This parameter decides if the scope change check needs to be invoked or not
359 */
360 updateExtension(customHeaders: any, contentStream: NodeJS.ReadableStream, publisherName: string, extensionName: string, extensionType?: string, reCaptchaToken?: string, bypassScopeCheck?: boolean): Promise<GalleryInterfaces.PublishedExtension>;
361 /**
362 * @param {string} publisherName
363 * @param {string} extensionName
364 * @param {GalleryInterfaces.PublishedExtensionFlags} flags
365 */
366 updateExtensionProperties(publisherName: string, extensionName: string, flags: GalleryInterfaces.PublishedExtensionFlags): Promise<GalleryInterfaces.PublishedExtension>;
367 /**
368 * @param {string} publisherName
369 * @param {string} extensionName
370 * @param {string} hostType
371 * @param {string} hostName
372 */
373 shareExtensionWithHost(publisherName: string, extensionName: string, hostType: string, hostName: string): Promise<void>;
374 /**
375 * @param {string} publisherName
376 * @param {string} extensionName
377 * @param {string} hostType
378 * @param {string} hostName
379 */
380 unshareExtensionWithHost(publisherName: string, extensionName: string, hostType: string, hostName: string): Promise<void>;
381 /**
382 * Rest end point to validate if an Azure publisher owns an extension for 3rd party commerce scenario. Azure only supports POST operations and the above signature is not typical of the REST operations. http://sharepoint/sites/AzureUX/_layouts/15/WopiFrame2.aspx?sourcedoc={A793D31E-6DC6-4174-8FA3-DE3F82B51642}&file=Data%20Market%20Partner%20integration%20with%20Marketplace%20service.docx&action=default
383 *
384 * @param {GalleryInterfaces.AzureRestApiRequestModel} azureRestApiRequestModel - All the parameters are sent in the request body
385 */
386 extensionValidator(azureRestApiRequestModel: GalleryInterfaces.AzureRestApiRequestModel): Promise<void>;
387 /**
388 * Send Notification
389 *
390 * @param {GalleryInterfaces.NotificationsData} notificationData - Denoting the data needed to send notification
391 */
392 sendNotifications(notificationData: GalleryInterfaces.NotificationsData): Promise<void>;
393 /**
394 * This endpoint gets hit when you download a VSTS extension from the Web UI
395 *
396 * @param {string} publisherName
397 * @param {string} extensionName
398 * @param {string} version
399 * @param {string} accountToken
400 * @param {boolean} acceptDefault
401 * @param {String} accountTokenHeader - Header to pass the account token
402 */
403 getPackage(customHeaders: any, publisherName: string, extensionName: string, version: string, accountToken?: string, acceptDefault?: boolean, accountTokenHeader?: String): Promise<NodeJS.ReadableStream>;
404 /**
405 * @param {string} publisherName
406 * @param {string} extensionName
407 * @param {string} version
408 * @param {string} assetType
409 * @param {string} assetToken
410 * @param {string} accountToken
411 * @param {boolean} acceptDefault
412 * @param {String} accountTokenHeader - Header to pass the account token
413 */
414 getAssetWithToken(customHeaders: any, publisherName: string, extensionName: string, version: string, assetType: string, assetToken?: string, accountToken?: string, acceptDefault?: boolean, accountTokenHeader?: String): Promise<NodeJS.ReadableStream>;
415 /**
416 * Delete publisher asset like logo
417 *
418 * @param {string} publisherName - Internal name of the publisher
419 * @param {string} assetType - Type of asset. Default value is 'logo'.
420 */
421 deletePublisherAsset(publisherName: string, assetType?: string): Promise<void>;
422 /**
423 * Get publisher asset like logo as a stream
424 *
425 * @param {string} publisherName - Internal name of the publisher
426 * @param {string} assetType - Type of asset. Default value is 'logo'.
427 */
428 getPublisherAsset(publisherName: string, assetType?: string): Promise<NodeJS.ReadableStream>;
429 /**
430 * Update publisher asset like logo. It accepts asset file as an octet stream and file name is passed in header values.
431 *
432 * @param {NodeJS.ReadableStream} contentStream - Content to upload
433 * @param {string} publisherName - Internal name of the publisher
434 * @param {string} assetType - Type of asset. Default value is 'logo'.
435 * @param {String} fileName - Header to pass the filename of the uploaded data
436 */
437 updatePublisherAsset(customHeaders: any, contentStream: NodeJS.ReadableStream, publisherName: string, assetType?: string, fileName?: String): Promise<{
438 [key: string]: string;
439 }>;
440 /**
441 * @param {string} publisherName
442 */
443 fetchDomainToken(publisherName: string): Promise<string>;
444 /**
445 * @param {string} publisherName
446 */
447 verifyDomainToken(publisherName: string): Promise<void>;
448 /**
449 * @param {GalleryInterfaces.PublisherQuery} publisherQuery
450 */
451 queryPublishers(publisherQuery: GalleryInterfaces.PublisherQuery): Promise<GalleryInterfaces.PublisherQueryResult>;
452 /**
453 * @param {GalleryInterfaces.Publisher} publisher
454 */
455 createPublisher(publisher: GalleryInterfaces.Publisher): Promise<GalleryInterfaces.Publisher>;
456 /**
457 * @param {string} publisherName
458 */
459 deletePublisher(publisherName: string): Promise<void>;
460 /**
461 * @param {string} publisherName
462 * @param {number} flags
463 */
464 getPublisher(publisherName: string, flags?: number): Promise<GalleryInterfaces.Publisher>;
465 /**
466 * @param {GalleryInterfaces.Publisher} publisher
467 * @param {string} publisherName
468 */
469 updatePublisher(publisher: GalleryInterfaces.Publisher, publisherName: string): Promise<GalleryInterfaces.Publisher>;
470 /**
471 * Endpoint to add/modify publisher membership. Currently Supports only addition/modification of 1 user at a time Works only for adding members of same tenant.
472 *
473 * @param {GalleryInterfaces.PublisherUserRoleAssignmentRef[]} roleAssignments - List of user identifiers(email address) and role to be added. Currently only one entry is supported.
474 * @param {string} publisherName - The name/id of publisher to which users have to be added
475 * @param {boolean} limitToCallerIdentityDomain - Should cross tenant addtions be allowed or not.
476 */
477 updatePublisherMembers(roleAssignments: GalleryInterfaces.PublisherUserRoleAssignmentRef[], publisherName: string, limitToCallerIdentityDomain?: boolean): Promise<GalleryInterfaces.PublisherRoleAssignment[]>;
478 /**
479 * @param {NodeJS.ReadableStream} contentStream - Content to upload
480 * @param {string} publisherName
481 * @param {string} extensionName
482 * @param {string} extensionType
483 * @param {string} reCaptchaToken
484 * @param {boolean} bypassScopeCheck
485 */
486 publishExtensionWithPublisherSignature(customHeaders: any, contentStream: NodeJS.ReadableStream, publisherName: string, extensionName: string, extensionType?: string, reCaptchaToken?: string, bypassScopeCheck?: boolean): Promise<GalleryInterfaces.PublishedExtension>;
487 /**
488 * @param {string} publisherName
489 */
490 getPublisherWithoutToken(publisherName: string): Promise<GalleryInterfaces.Publisher>;
491 /**
492 * Returns a list of questions with their responses associated with an extension.
493 *
494 * @param {string} publisherName - Name of the publisher who published the extension.
495 * @param {string} extensionName - Name of the extension.
496 * @param {number} count - Number of questions to retrieve (defaults to 10).
497 * @param {number} page - Page number from which set of questions are to be retrieved.
498 * @param {Date} afterDate - If provided, results questions are returned which were posted after this date
499 */
500 getQuestions(publisherName: string, extensionName: string, count?: number, page?: number, afterDate?: Date): Promise<GalleryInterfaces.QuestionsResult>;
501 /**
502 * Flags a concern with an existing question for an extension.
503 *
504 * @param {GalleryInterfaces.Concern} concern - User reported concern with a question for the extension.
505 * @param {string} pubName - Name of the publisher who published the extension.
506 * @param {string} extName - Name of the extension.
507 * @param {number} questionId - Identifier of the question to be updated for the extension.
508 */
509 reportQuestion(concern: GalleryInterfaces.Concern, pubName: string, extName: string, questionId: number): Promise<GalleryInterfaces.Concern>;
510 /**
511 * Creates a new question for an extension.
512 *
513 * @param {GalleryInterfaces.Question} question - Question to be created for the extension.
514 * @param {string} publisherName - Name of the publisher who published the extension.
515 * @param {string} extensionName - Name of the extension.
516 */
517 createQuestion(question: GalleryInterfaces.Question, publisherName: string, extensionName: string): Promise<GalleryInterfaces.Question>;
518 /**
519 * Deletes an existing question and all its associated responses for an extension. (soft delete)
520 *
521 * @param {string} publisherName - Name of the publisher who published the extension.
522 * @param {string} extensionName - Name of the extension.
523 * @param {number} questionId - Identifier of the question to be deleted for the extension.
524 */
525 deleteQuestion(publisherName: string, extensionName: string, questionId: number): Promise<void>;
526 /**
527 * Updates an existing question for an extension.
528 *
529 * @param {GalleryInterfaces.Question} question - Updated question to be set for the extension.
530 * @param {string} publisherName - Name of the publisher who published the extension.
531 * @param {string} extensionName - Name of the extension.
532 * @param {number} questionId - Identifier of the question to be updated for the extension.
533 */
534 updateQuestion(question: GalleryInterfaces.Question, publisherName: string, extensionName: string, questionId: number): Promise<GalleryInterfaces.Question>;
535 /**
536 * Creates a new response for a given question for an extension.
537 *
538 * @param {GalleryInterfaces.Response} response - Response to be created for the extension.
539 * @param {string} publisherName - Name of the publisher who published the extension.
540 * @param {string} extensionName - Name of the extension.
541 * @param {number} questionId - Identifier of the question for which response is to be created for the extension.
542 */
543 createResponse(response: GalleryInterfaces.Response, publisherName: string, extensionName: string, questionId: number): Promise<GalleryInterfaces.Response>;
544 /**
545 * Deletes a response for an extension. (soft delete)
546 *
547 * @param {string} publisherName - Name of the publisher who published the extension.
548 * @param {string} extensionName - Name of the extension.
549 * @param {number} questionId - Identifies the question whose response is to be deleted.
550 * @param {number} responseId - Identifies the response to be deleted.
551 */
552 deleteResponse(publisherName: string, extensionName: string, questionId: number, responseId: number): Promise<void>;
553 /**
554 * Updates an existing response for a given question for an extension.
555 *
556 * @param {GalleryInterfaces.Response} response - Updated response to be set for the extension.
557 * @param {string} publisherName - Name of the publisher who published the extension.
558 * @param {string} extensionName - Name of the extension.
559 * @param {number} questionId - Identifier of the question for which response is to be updated for the extension.
560 * @param {number} responseId - Identifier of the response which has to be updated.
561 */
562 updateResponse(response: GalleryInterfaces.Response, publisherName: string, extensionName: string, questionId: number, responseId: number): Promise<GalleryInterfaces.Response>;
563 /**
564 * Returns extension reports
565 *
566 * @param {string} publisherName - Name of the publisher who published the extension
567 * @param {string} extensionName - Name of the extension
568 * @param {number} days - Last n days report. If afterDate and days are specified, days will take priority
569 * @param {number} count - Number of events to be returned
570 * @param {Date} afterDate - Use if you want to fetch events newer than the specified date
571 */
572 getExtensionReports(publisherName: string, extensionName: string, days?: number, count?: number, afterDate?: Date): Promise<any>;
573 /**
574 * Returns a list of reviews associated with an extension
575 *
576 * @param {string} publisherName - Name of the publisher who published the extension
577 * @param {string} extensionName - Name of the extension
578 * @param {number} count - Number of reviews to retrieve (defaults to 5)
579 * @param {GalleryInterfaces.ReviewFilterOptions} filterOptions - FilterOptions to filter out empty reviews etcetera, defaults to none
580 * @param {Date} beforeDate - Use if you want to fetch reviews older than the specified date, defaults to null
581 * @param {Date} afterDate - Use if you want to fetch reviews newer than the specified date, defaults to null
582 */
583 getReviews(publisherName: string, extensionName: string, count?: number, filterOptions?: GalleryInterfaces.ReviewFilterOptions, beforeDate?: Date, afterDate?: Date): Promise<GalleryInterfaces.ReviewsResult>;
584 /**
585 * Returns a summary of the reviews
586 *
587 * @param {string} pubName - Name of the publisher who published the extension
588 * @param {string} extName - Name of the extension
589 * @param {Date} beforeDate - Use if you want to fetch summary of reviews older than the specified date, defaults to null
590 * @param {Date} afterDate - Use if you want to fetch summary of reviews newer than the specified date, defaults to null
591 */
592 getReviewsSummary(pubName: string, extName: string, beforeDate?: Date, afterDate?: Date): Promise<GalleryInterfaces.ReviewSummary>;
593 /**
594 * Creates a new review for an extension
595 *
596 * @param {GalleryInterfaces.Review} review - Review to be created for the extension
597 * @param {string} pubName - Name of the publisher who published the extension
598 * @param {string} extName - Name of the extension
599 */
600 createReview(review: GalleryInterfaces.Review, pubName: string, extName: string): Promise<GalleryInterfaces.Review>;
601 /**
602 * Deletes a review
603 *
604 * @param {string} pubName - Name of the publisher who published the extension
605 * @param {string} extName - Name of the extension
606 * @param {number} reviewId - Id of the review which needs to be updated
607 */
608 deleteReview(pubName: string, extName: string, reviewId: number): Promise<void>;
609 /**
610 * Updates or Flags a review
611 *
612 * @param {GalleryInterfaces.ReviewPatch} reviewPatch - ReviewPatch object which contains the changes to be applied to the review
613 * @param {string} pubName - Name of the publisher who published the extension
614 * @param {string} extName - Name of the extension
615 * @param {number} reviewId - Id of the review which needs to be updated
616 */
617 updateReview(reviewPatch: GalleryInterfaces.ReviewPatch, pubName: string, extName: string, reviewId: number): Promise<GalleryInterfaces.ReviewPatch>;
618 /**
619 * @param {GalleryInterfaces.ExtensionCategory} category
620 */
621 createCategory(category: GalleryInterfaces.ExtensionCategory): Promise<GalleryInterfaces.ExtensionCategory>;
622 /**
623 * Get all setting entries for the given user/all-users scope
624 *
625 * @param {string} userScope - User-Scope at which to get the value. Should be "me" for the current user or "host" for all users.
626 * @param {string} key - Optional key under which to filter all the entries
627 */
628 getGalleryUserSettings(userScope: string, key?: string): Promise<{
629 [key: string]: any;
630 }>;
631 /**
632 * Set all setting entries for the given user/all-users scope
633 *
634 * @param {{ [key: string] : any; }} entries - A key-value pair of all settings that need to be set
635 * @param {string} userScope - User-Scope at which to get the value. Should be "me" for the current user or "host" for all users.
636 */
637 setGalleryUserSettings(entries: {
638 [key: string]: any;
639 }, userScope: string): Promise<void>;
640 /**
641 * @param {string} keyType
642 * @param {number} expireCurrentSeconds
643 */
644 generateKey(keyType: string, expireCurrentSeconds?: number): Promise<void>;
645 /**
646 * @param {string} keyType
647 */
648 getSigningKey(keyType: string): Promise<string>;
649 /**
650 * @param {GalleryInterfaces.ExtensionStatisticUpdate} extensionStatisticsUpdate
651 * @param {string} publisherName
652 * @param {string} extensionName
653 */
654 updateExtensionStatistics(extensionStatisticsUpdate: GalleryInterfaces.ExtensionStatisticUpdate, publisherName: string, extensionName: string): Promise<void>;
655 /**
656 * @param {string} publisherName
657 * @param {string} extensionName
658 * @param {number} days
659 * @param {GalleryInterfaces.ExtensionStatsAggregateType} aggregate
660 * @param {Date} afterDate
661 */
662 getExtensionDailyStats(publisherName: string, extensionName: string, days?: number, aggregate?: GalleryInterfaces.ExtensionStatsAggregateType, afterDate?: Date): Promise<GalleryInterfaces.ExtensionDailyStats>;
663 /**
664 * This route/location id only supports HTTP POST anonymously, so that the page view daily stat can be incremented from Marketplace client. Trying to call GET on this route should result in an exception. Without this explicit implementation, calling GET on this public route invokes the above GET implementation GetExtensionDailyStats.
665 *
666 * @param {string} publisherName - Name of the publisher
667 * @param {string} extensionName - Name of the extension
668 * @param {string} version - Version of the extension
669 */
670 getExtensionDailyStatsAnonymous(publisherName: string, extensionName: string, version: string): Promise<GalleryInterfaces.ExtensionDailyStats>;
671 /**
672 * Increments a daily statistic associated with the extension
673 *
674 * @param {string} publisherName - Name of the publisher
675 * @param {string} extensionName - Name of the extension
676 * @param {string} version - Version of the extension
677 * @param {string} statType - Type of stat to increment
678 * @param {string} targetPlatform
679 */
680 incrementExtensionDailyStat(publisherName: string, extensionName: string, version: string, statType: string, targetPlatform?: string): Promise<void>;
681 /**
682 * @param {string} publisherName
683 * @param {string} extensionName
684 * @param {string} version
685 * @param {string} targetPlatform
686 */
687 getVerificationLog(publisherName: string, extensionName: string, version: string, targetPlatform?: string): Promise<NodeJS.ReadableStream>;
688 /**
689 * @param {string} itemName
690 * @param {string} version
691 * @param {GalleryInterfaces.VSCodeWebExtensionStatisicsType} statType
692 */
693 updateVSCodeWebExtensionStatistics(itemName: string, version: string, statType: GalleryInterfaces.VSCodeWebExtensionStatisicsType): Promise<void>;
694}