/// import VsoBaseInterfaces = require('./interfaces/common/VsoBaseInterfaces'); import compatBase = require("././GalleryCompatHttpClientBase"); import GalleryInterfaces = require("./interfaces/GalleryInterfaces"); export interface IGalleryApi extends compatBase.GalleryCompatHttpClientBase { shareExtensionById(extensionId: string, accountName: string): Promise; unshareExtensionById(extensionId: string, accountName: string): Promise; shareExtension(publisherName: string, extensionName: string, accountName: string): Promise; unshareExtension(publisherName: string, extensionName: string, accountName: string): Promise; getAcquisitionOptions(itemId: string, installationTarget: string, testCommerce?: boolean, isFreeOrTrialInstall?: boolean): Promise; requestAcquisition(acquisitionRequest: GalleryInterfaces.ExtensionAcquisitionRequest): Promise; getAssetByName(customHeaders: any, publisherName: string, extensionName: string, version: string, assetType: string, accountToken?: string, acceptDefault?: boolean, accountTokenHeader?: String): Promise; getAsset(customHeaders: any, extensionId: string, version: string, assetType: string, accountToken?: string, acceptDefault?: boolean, accountTokenHeader?: String): Promise; getAssetAuthenticated(customHeaders: any, publisherName: string, extensionName: string, version: string, assetType: string, accountToken?: string, accountTokenHeader?: String): Promise; associateAzurePublisher(publisherName: string, azurePublisherId: string): Promise; queryAssociatedAzurePublisher(publisherName: string): Promise; getCategories(languages?: string): Promise; getCategoryDetails(categoryName: string, languages?: string, product?: string): Promise; getCategoryTree(product: string, categoryId: string, lcid?: number, source?: string, productVersion?: string, skus?: string, subSkus?: string): Promise; getRootCategories(product: string, lcid?: number, source?: string, productVersion?: string, skus?: string, subSkus?: string): Promise; getCertificate(publisherName: string, extensionName: string, version?: string): Promise; getContentVerificationLog(publisherName: string, extensionName: string): Promise; createDraftForEditExtension(publisherName: string, extensionName: string): Promise; performEditExtensionDraftOperation(draftPatch: GalleryInterfaces.ExtensionDraftPatch, publisherName: string, extensionName: string, draftId: string): Promise; updatePayloadInDraftForEditExtension(customHeaders: any, contentStream: NodeJS.ReadableStream, publisherName: string, extensionName: string, draftId: string, fileName?: String): Promise; addAssetForEditExtensionDraft(customHeaders: any, contentStream: NodeJS.ReadableStream, publisherName: string, extensionName: string, draftId: string, assetType: string): Promise; createDraftForNewExtension(customHeaders: any, contentStream: NodeJS.ReadableStream, publisherName: string, product: String, fileName?: String): Promise; performNewExtensionDraftOperation(draftPatch: GalleryInterfaces.ExtensionDraftPatch, publisherName: string, draftId: string): Promise; updatePayloadInDraftForNewExtension(customHeaders: any, contentStream: NodeJS.ReadableStream, publisherName: string, draftId: string, fileName?: String): Promise; addAssetForNewExtensionDraft(customHeaders: any, contentStream: NodeJS.ReadableStream, publisherName: string, draftId: string, assetType: string): Promise; getAssetFromEditExtensionDraft(publisherName: string, draftId: string, assetType: string, extensionName: string): Promise; getAssetFromNewExtensionDraft(publisherName: string, draftId: string, assetType: string): Promise; getExtensionEvents(publisherName: string, extensionName: string, count?: number, afterDate?: Date, include?: string, includeProperty?: string): Promise; publishExtensionEvents(extensionEvents: GalleryInterfaces.ExtensionEvents[]): Promise; queryExtensions(customHeaders: any, extensionQuery: GalleryInterfaces.ExtensionQuery, accountToken?: string, accountTokenHeader?: String): Promise; createExtension(customHeaders: any, contentStream: NodeJS.ReadableStream): Promise; deleteExtensionById(extensionId: string, version?: string): Promise; getExtensionById(extensionId: string, version?: string, flags?: GalleryInterfaces.ExtensionQueryFlags): Promise; updateExtensionById(extensionId: string): Promise; createExtensionWithPublisher(customHeaders: any, contentStream: NodeJS.ReadableStream, publisherName: string): Promise; deleteExtension(publisherName: string, extensionName: string, version?: string): Promise; getExtension(customHeaders: any, publisherName: string, extensionName: string, version?: string, flags?: GalleryInterfaces.ExtensionQueryFlags, accountToken?: string, accountTokenHeader?: String): Promise; updateExtension(customHeaders: any, contentStream: NodeJS.ReadableStream, publisherName: string, extensionName: string, bypassScopeCheck?: boolean): Promise; updateExtensionProperties(publisherName: string, extensionName: string, flags: GalleryInterfaces.PublishedExtensionFlags): Promise; shareExtensionWithHost(publisherName: string, extensionName: string, hostType: string, hostName: string): Promise; unshareExtensionWithHost(publisherName: string, extensionName: string, hostType: string, hostName: string): Promise; extensionValidator(azureRestApiRequestModel: GalleryInterfaces.AzureRestApiRequestModel): Promise; sendNotifications(notificationData: GalleryInterfaces.NotificationsData): Promise; getPackage(customHeaders: any, publisherName: string, extensionName: string, version: string, accountToken?: string, acceptDefault?: boolean, accountTokenHeader?: String): Promise; getAssetWithToken(customHeaders: any, publisherName: string, extensionName: string, version: string, assetType: string, assetToken?: string, accountToken?: string, acceptDefault?: boolean, accountTokenHeader?: String): Promise; deletePublisherAsset(publisherName: string, assetType?: string): Promise; getPublisherAsset(publisherName: string, assetType?: string): Promise; updatePublisherAsset(customHeaders: any, contentStream: NodeJS.ReadableStream, publisherName: string, assetType?: string, fileName?: String): Promise<{ [key: string]: string; }>; queryPublishers(publisherQuery: GalleryInterfaces.PublisherQuery): Promise; createPublisher(publisher: GalleryInterfaces.Publisher): Promise; deletePublisher(publisherName: string): Promise; getPublisher(publisherName: string, flags?: number): Promise; updatePublisher(publisher: GalleryInterfaces.Publisher, publisherName: string): Promise; updatePublisherMembers(roleAssignments: GalleryInterfaces.PublisherUserRoleAssignmentRef[], publisherName: string, limitToCallerIdentityDomain?: boolean): Promise; getQuestions(publisherName: string, extensionName: string, count?: number, page?: number, afterDate?: Date): Promise; reportQuestion(concern: GalleryInterfaces.Concern, pubName: string, extName: string, questionId: number): Promise; createQuestion(question: GalleryInterfaces.Question, publisherName: string, extensionName: string): Promise; deleteQuestion(publisherName: string, extensionName: string, questionId: number): Promise; updateQuestion(question: GalleryInterfaces.Question, publisherName: string, extensionName: string, questionId: number): Promise; createResponse(response: GalleryInterfaces.Response, publisherName: string, extensionName: string, questionId: number): Promise; deleteResponse(publisherName: string, extensionName: string, questionId: number, responseId: number): Promise; updateResponse(response: GalleryInterfaces.Response, publisherName: string, extensionName: string, questionId: number, responseId: number): Promise; getExtensionReports(publisherName: string, extensionName: string, days?: number, count?: number, afterDate?: Date): Promise; getReviews(publisherName: string, extensionName: string, count?: number, filterOptions?: GalleryInterfaces.ReviewFilterOptions, beforeDate?: Date, afterDate?: Date): Promise; getReviewsSummary(pubName: string, extName: string, beforeDate?: Date, afterDate?: Date): Promise; createReview(review: GalleryInterfaces.Review, pubName: string, extName: string): Promise; deleteReview(pubName: string, extName: string, reviewId: number): Promise; updateReview(reviewPatch: GalleryInterfaces.ReviewPatch, pubName: string, extName: string, reviewId: number): Promise; createCategory(category: GalleryInterfaces.ExtensionCategory): Promise; getGalleryUserSettings(userScope: string, key?: string): Promise<{ [key: string]: any; }>; setGalleryUserSettings(entries: { [key: string]: any; }, userScope: string): Promise; generateKey(keyType: string, expireCurrentSeconds?: number): Promise; getSigningKey(keyType: string): Promise; updateExtensionStatistics(extensionStatisticsUpdate: GalleryInterfaces.ExtensionStatisticUpdate, publisherName: string, extensionName: string): Promise; getExtensionDailyStats(publisherName: string, extensionName: string, days?: number, aggregate?: GalleryInterfaces.ExtensionStatsAggregateType, afterDate?: Date): Promise; getExtensionDailyStatsAnonymous(publisherName: string, extensionName: string, version: string): Promise; incrementExtensionDailyStat(publisherName: string, extensionName: string, version: string, statType: string): Promise; getVerificationLog(publisherName: string, extensionName: string, version: string): Promise; } export declare class GalleryApi extends compatBase.GalleryCompatHttpClientBase implements IGalleryApi { constructor(baseUrl: string, handlers: VsoBaseInterfaces.IRequestHandler[], options?: VsoBaseInterfaces.IRequestOptions); static readonly RESOURCE_AREA_ID: string; /** * @param {string} extensionId * @param {string} accountName */ shareExtensionById(extensionId: string, accountName: string): Promise; /** * @param {string} extensionId * @param {string} accountName */ unshareExtensionById(extensionId: string, accountName: string): Promise; /** * @param {string} publisherName * @param {string} extensionName * @param {string} accountName */ shareExtension(publisherName: string, extensionName: string, accountName: string): Promise; /** * @param {string} publisherName * @param {string} extensionName * @param {string} accountName */ unshareExtension(publisherName: string, extensionName: string, accountName: string): Promise; /** * @param {string} itemId * @param {string} installationTarget * @param {boolean} testCommerce * @param {boolean} isFreeOrTrialInstall */ getAcquisitionOptions(itemId: string, installationTarget: string, testCommerce?: boolean, isFreeOrTrialInstall?: boolean): Promise; /** * @param {GalleryInterfaces.ExtensionAcquisitionRequest} acquisitionRequest */ requestAcquisition(acquisitionRequest: GalleryInterfaces.ExtensionAcquisitionRequest): Promise; /** * @param {string} publisherName * @param {string} extensionName * @param {string} version * @param {string} assetType * @param {string} accountToken * @param {boolean} acceptDefault * @param {String} accountTokenHeader - Header to pass the account token */ getAssetByName(customHeaders: any, publisherName: string, extensionName: string, version: string, assetType: string, accountToken?: string, acceptDefault?: boolean, accountTokenHeader?: String): Promise; /** * @param {string} extensionId * @param {string} version * @param {string} assetType * @param {string} accountToken * @param {boolean} acceptDefault * @param {String} accountTokenHeader - Header to pass the account token */ getAsset(customHeaders: any, extensionId: string, version: string, assetType: string, accountToken?: string, acceptDefault?: boolean, accountTokenHeader?: String): Promise; /** * @param {string} publisherName * @param {string} extensionName * @param {string} version * @param {string} assetType * @param {string} accountToken * @param {String} accountTokenHeader - Header to pass the account token */ getAssetAuthenticated(customHeaders: any, publisherName: string, extensionName: string, version: string, assetType: string, accountToken?: string, accountTokenHeader?: String): Promise; /** * @param {string} publisherName * @param {string} azurePublisherId */ associateAzurePublisher(publisherName: string, azurePublisherId: string): Promise; /** * @param {string} publisherName */ queryAssociatedAzurePublisher(publisherName: string): Promise; /** * @param {string} languages */ getCategories(languages?: string): Promise; /** * @param {string} categoryName * @param {string} languages * @param {string} product */ getCategoryDetails(categoryName: string, languages?: string, product?: string): Promise; /** * @param {string} product * @param {string} categoryId * @param {number} lcid * @param {string} source * @param {string} productVersion * @param {string} skus * @param {string} subSkus */ getCategoryTree(product: string, categoryId: string, lcid?: number, source?: string, productVersion?: string, skus?: string, subSkus?: string): Promise; /** * @param {string} product * @param {number} lcid * @param {string} source * @param {string} productVersion * @param {string} skus * @param {string} subSkus */ getRootCategories(product: string, lcid?: number, source?: string, productVersion?: string, skus?: string, subSkus?: string): Promise; /** * @param {string} publisherName * @param {string} extensionName * @param {string} version */ getCertificate(publisherName: string, extensionName: string, version?: string): Promise; /** * @param {string} publisherName * @param {string} extensionName */ getContentVerificationLog(publisherName: string, extensionName: string): Promise; /** * @param {string} publisherName * @param {string} extensionName */ createDraftForEditExtension(publisherName: string, extensionName: string): Promise; /** * @param {GalleryInterfaces.ExtensionDraftPatch} draftPatch * @param {string} publisherName * @param {string} extensionName * @param {string} draftId */ performEditExtensionDraftOperation(draftPatch: GalleryInterfaces.ExtensionDraftPatch, publisherName: string, extensionName: string, draftId: string): Promise; /** * @param {NodeJS.ReadableStream} contentStream - Content to upload * @param {string} publisherName * @param {string} extensionName * @param {string} draftId * @param {String} fileName - Header to pass the filename of the uploaded data */ updatePayloadInDraftForEditExtension(customHeaders: any, contentStream: NodeJS.ReadableStream, publisherName: string, extensionName: string, draftId: string, fileName?: String): Promise; /** * @param {NodeJS.ReadableStream} contentStream - Content to upload * @param {string} publisherName * @param {string} extensionName * @param {string} draftId * @param {string} assetType */ addAssetForEditExtensionDraft(customHeaders: any, contentStream: NodeJS.ReadableStream, publisherName: string, extensionName: string, draftId: string, assetType: string): Promise; /** * @param {NodeJS.ReadableStream} contentStream - Content to upload * @param {string} publisherName * @param {String} product - Header to pass the product type of the payload file * @param {String} fileName - Header to pass the filename of the uploaded data */ createDraftForNewExtension(customHeaders: any, contentStream: NodeJS.ReadableStream, publisherName: string, product: String, fileName?: String): Promise; /** * @param {GalleryInterfaces.ExtensionDraftPatch} draftPatch * @param {string} publisherName * @param {string} draftId */ performNewExtensionDraftOperation(draftPatch: GalleryInterfaces.ExtensionDraftPatch, publisherName: string, draftId: string): Promise; /** * @param {NodeJS.ReadableStream} contentStream - Content to upload * @param {string} publisherName * @param {string} draftId * @param {String} fileName - Header to pass the filename of the uploaded data */ updatePayloadInDraftForNewExtension(customHeaders: any, contentStream: NodeJS.ReadableStream, publisherName: string, draftId: string, fileName?: String): Promise; /** * @param {NodeJS.ReadableStream} contentStream - Content to upload * @param {string} publisherName * @param {string} draftId * @param {string} assetType */ addAssetForNewExtensionDraft(customHeaders: any, contentStream: NodeJS.ReadableStream, publisherName: string, draftId: string, assetType: string): Promise; /** * @param {string} publisherName * @param {string} draftId * @param {string} assetType * @param {string} extensionName */ getAssetFromEditExtensionDraft(publisherName: string, draftId: string, assetType: string, extensionName: string): Promise; /** * @param {string} publisherName * @param {string} draftId * @param {string} assetType */ getAssetFromNewExtensionDraft(publisherName: string, draftId: string, assetType: string): Promise; /** * Get install/uninstall events of an extension. If both count and afterDate parameters are specified, count takes precedence. * * @param {string} publisherName - Name of the publisher * @param {string} extensionName - Name of the extension * @param {number} count - Count of events to fetch, applies to each event type. * @param {Date} afterDate - Fetch events that occurred on or after this date * @param {string} include - Filter options. Supported values: install, uninstall, review, acquisition, sales. Default is to fetch all types of events * @param {string} includeProperty - Event properties to include. Currently only 'lastContactDetails' is supported for uninstall events */ getExtensionEvents(publisherName: string, extensionName: string, count?: number, afterDate?: Date, include?: string, includeProperty?: string): Promise; /** * 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. * * @param {GalleryInterfaces.ExtensionEvents[]} extensionEvents */ publishExtensionEvents(extensionEvents: GalleryInterfaces.ExtensionEvents[]): Promise; /** * @param {GalleryInterfaces.ExtensionQuery} extensionQuery * @param {string} accountToken * @param {String} accountTokenHeader - Header to pass the account token */ queryExtensions(customHeaders: any, extensionQuery: GalleryInterfaces.ExtensionQuery, accountToken?: string, accountTokenHeader?: String): Promise; /** * @param {NodeJS.ReadableStream} contentStream - Content to upload */ createExtension(customHeaders: any, contentStream: NodeJS.ReadableStream): Promise; /** * @param {string} extensionId * @param {string} version */ deleteExtensionById(extensionId: string, version?: string): Promise; /** * @param {string} extensionId * @param {string} version * @param {GalleryInterfaces.ExtensionQueryFlags} flags */ getExtensionById(extensionId: string, version?: string, flags?: GalleryInterfaces.ExtensionQueryFlags): Promise; /** * @param {string} extensionId */ updateExtensionById(extensionId: string): Promise; /** * @param {NodeJS.ReadableStream} contentStream - Content to upload * @param {string} publisherName */ createExtensionWithPublisher(customHeaders: any, contentStream: NodeJS.ReadableStream, publisherName: string): Promise; /** * @param {string} publisherName * @param {string} extensionName * @param {string} version */ deleteExtension(publisherName: string, extensionName: string, version?: string): Promise; /** * @param {string} publisherName * @param {string} extensionName * @param {string} version * @param {GalleryInterfaces.ExtensionQueryFlags} flags * @param {string} accountToken * @param {String} accountTokenHeader - Header to pass the account token */ getExtension(customHeaders: any, publisherName: string, extensionName: string, version?: string, flags?: GalleryInterfaces.ExtensionQueryFlags, accountToken?: string, accountTokenHeader?: String): Promise; /** * REST endpoint to update an extension. * * @param {NodeJS.ReadableStream} contentStream - Content to upload * @param {string} publisherName - Name of the publisher * @param {string} extensionName - Name of the extension * @param {boolean} bypassScopeCheck - This parameter decides if the scope change check needs to be invoked or not */ updateExtension(customHeaders: any, contentStream: NodeJS.ReadableStream, publisherName: string, extensionName: string, bypassScopeCheck?: boolean): Promise; /** * @param {string} publisherName * @param {string} extensionName * @param {GalleryInterfaces.PublishedExtensionFlags} flags */ updateExtensionProperties(publisherName: string, extensionName: string, flags: GalleryInterfaces.PublishedExtensionFlags): Promise; /** * @param {string} publisherName * @param {string} extensionName * @param {string} hostType * @param {string} hostName */ shareExtensionWithHost(publisherName: string, extensionName: string, hostType: string, hostName: string): Promise; /** * @param {string} publisherName * @param {string} extensionName * @param {string} hostType * @param {string} hostName */ unshareExtensionWithHost(publisherName: string, extensionName: string, hostType: string, hostName: string): Promise; /** * @param {GalleryInterfaces.AzureRestApiRequestModel} azureRestApiRequestModel */ extensionValidator(azureRestApiRequestModel: GalleryInterfaces.AzureRestApiRequestModel): Promise; /** * Send Notification * * @param {GalleryInterfaces.NotificationsData} notificationData - Denoting the data needed to send notification */ sendNotifications(notificationData: GalleryInterfaces.NotificationsData): Promise; /** * This endpoint gets hit when you download a VSTS extension from the Web UI * * @param {string} publisherName * @param {string} extensionName * @param {string} version * @param {string} accountToken * @param {boolean} acceptDefault * @param {String} accountTokenHeader - Header to pass the account token */ getPackage(customHeaders: any, publisherName: string, extensionName: string, version: string, accountToken?: string, acceptDefault?: boolean, accountTokenHeader?: String): Promise; /** * @param {string} publisherName * @param {string} extensionName * @param {string} version * @param {string} assetType * @param {string} assetToken * @param {string} accountToken * @param {boolean} acceptDefault * @param {String} accountTokenHeader - Header to pass the account token */ getAssetWithToken(customHeaders: any, publisherName: string, extensionName: string, version: string, assetType: string, assetToken?: string, accountToken?: string, acceptDefault?: boolean, accountTokenHeader?: String): Promise; /** * Delete publisher asset like logo * * @param {string} publisherName - Internal name of the publisher * @param {string} assetType - Type of asset. Default value is 'logo'. */ deletePublisherAsset(publisherName: string, assetType?: string): Promise; /** * Get publisher asset like logo as a stream * * @param {string} publisherName - Internal name of the publisher * @param {string} assetType - Type of asset. Default value is 'logo'. */ getPublisherAsset(publisherName: string, assetType?: string): Promise; /** * Update publisher asset like logo. It accepts asset file as an octet stream and file name is passed in header values. * * @param {NodeJS.ReadableStream} contentStream - Content to upload * @param {string} publisherName - Internal name of the publisher * @param {string} assetType - Type of asset. Default value is 'logo'. * @param {String} fileName - Header to pass the filename of the uploaded data */ updatePublisherAsset(customHeaders: any, contentStream: NodeJS.ReadableStream, publisherName: string, assetType?: string, fileName?: String): Promise<{ [key: string]: string; }>; /** * @param {GalleryInterfaces.PublisherQuery} publisherQuery */ queryPublishers(publisherQuery: GalleryInterfaces.PublisherQuery): Promise; /** * @param {GalleryInterfaces.Publisher} publisher */ createPublisher(publisher: GalleryInterfaces.Publisher): Promise; /** * @param {string} publisherName */ deletePublisher(publisherName: string): Promise; /** * @param {string} publisherName * @param {number} flags */ getPublisher(publisherName: string, flags?: number): Promise; /** * @param {GalleryInterfaces.Publisher} publisher * @param {string} publisherName */ updatePublisher(publisher: GalleryInterfaces.Publisher, publisherName: string): Promise; /** * 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. * * @param {GalleryInterfaces.PublisherUserRoleAssignmentRef[]} roleAssignments - List of user identifiers(email address) and role to be added. Currently only one entry is supported. * @param {string} publisherName - The name/id of publisher to which users have to be added * @param {boolean} limitToCallerIdentityDomain - Should cross tenant addtions be allowed or not. */ updatePublisherMembers(roleAssignments: GalleryInterfaces.PublisherUserRoleAssignmentRef[], publisherName: string, limitToCallerIdentityDomain?: boolean): Promise; /** * Returns a list of questions with their responses associated with an extension. * * @param {string} publisherName - Name of the publisher who published the extension. * @param {string} extensionName - Name of the extension. * @param {number} count - Number of questions to retrieve (defaults to 10). * @param {number} page - Page number from which set of questions are to be retrieved. * @param {Date} afterDate - If provided, results questions are returned which were posted after this date */ getQuestions(publisherName: string, extensionName: string, count?: number, page?: number, afterDate?: Date): Promise; /** * Flags a concern with an existing question for an extension. * * @param {GalleryInterfaces.Concern} concern - User reported concern with a question for the extension. * @param {string} pubName - Name of the publisher who published the extension. * @param {string} extName - Name of the extension. * @param {number} questionId - Identifier of the question to be updated for the extension. */ reportQuestion(concern: GalleryInterfaces.Concern, pubName: string, extName: string, questionId: number): Promise; /** * Creates a new question for an extension. * * @param {GalleryInterfaces.Question} question - Question to be created for the extension. * @param {string} publisherName - Name of the publisher who published the extension. * @param {string} extensionName - Name of the extension. */ createQuestion(question: GalleryInterfaces.Question, publisherName: string, extensionName: string): Promise; /** * Deletes an existing question and all its associated responses for an extension. (soft delete) * * @param {string} publisherName - Name of the publisher who published the extension. * @param {string} extensionName - Name of the extension. * @param {number} questionId - Identifier of the question to be deleted for the extension. */ deleteQuestion(publisherName: string, extensionName: string, questionId: number): Promise; /** * Updates an existing question for an extension. * * @param {GalleryInterfaces.Question} question - Updated question to be set for the extension. * @param {string} publisherName - Name of the publisher who published the extension. * @param {string} extensionName - Name of the extension. * @param {number} questionId - Identifier of the question to be updated for the extension. */ updateQuestion(question: GalleryInterfaces.Question, publisherName: string, extensionName: string, questionId: number): Promise; /** * Creates a new response for a given question for an extension. * * @param {GalleryInterfaces.Response} response - Response to be created for the extension. * @param {string} publisherName - Name of the publisher who published the extension. * @param {string} extensionName - Name of the extension. * @param {number} questionId - Identifier of the question for which response is to be created for the extension. */ createResponse(response: GalleryInterfaces.Response, publisherName: string, extensionName: string, questionId: number): Promise; /** * Deletes a response for an extension. (soft delete) * * @param {string} publisherName - Name of the publisher who published the extension. * @param {string} extensionName - Name of the extension. * @param {number} questionId - Identifies the question whose response is to be deleted. * @param {number} responseId - Identifies the response to be deleted. */ deleteResponse(publisherName: string, extensionName: string, questionId: number, responseId: number): Promise; /** * Updates an existing response for a given question for an extension. * * @param {GalleryInterfaces.Response} response - Updated response to be set for the extension. * @param {string} publisherName - Name of the publisher who published the extension. * @param {string} extensionName - Name of the extension. * @param {number} questionId - Identifier of the question for which response is to be updated for the extension. * @param {number} responseId - Identifier of the response which has to be updated. */ updateResponse(response: GalleryInterfaces.Response, publisherName: string, extensionName: string, questionId: number, responseId: number): Promise; /** * Returns extension reports * * @param {string} publisherName - Name of the publisher who published the extension * @param {string} extensionName - Name of the extension * @param {number} days - Last n days report. If afterDate and days are specified, days will take priority * @param {number} count - Number of events to be returned * @param {Date} afterDate - Use if you want to fetch events newer than the specified date */ getExtensionReports(publisherName: string, extensionName: string, days?: number, count?: number, afterDate?: Date): Promise; /** * Returns a list of reviews associated with an extension * * @param {string} publisherName - Name of the publisher who published the extension * @param {string} extensionName - Name of the extension * @param {number} count - Number of reviews to retrieve (defaults to 5) * @param {GalleryInterfaces.ReviewFilterOptions} filterOptions - FilterOptions to filter out empty reviews etcetera, defaults to none * @param {Date} beforeDate - Use if you want to fetch reviews older than the specified date, defaults to null * @param {Date} afterDate - Use if you want to fetch reviews newer than the specified date, defaults to null */ getReviews(publisherName: string, extensionName: string, count?: number, filterOptions?: GalleryInterfaces.ReviewFilterOptions, beforeDate?: Date, afterDate?: Date): Promise; /** * Returns a summary of the reviews * * @param {string} pubName - Name of the publisher who published the extension * @param {string} extName - Name of the extension * @param {Date} beforeDate - Use if you want to fetch summary of reviews older than the specified date, defaults to null * @param {Date} afterDate - Use if you want to fetch summary of reviews newer than the specified date, defaults to null */ getReviewsSummary(pubName: string, extName: string, beforeDate?: Date, afterDate?: Date): Promise; /** * Creates a new review for an extension * * @param {GalleryInterfaces.Review} review - Review to be created for the extension * @param {string} pubName - Name of the publisher who published the extension * @param {string} extName - Name of the extension */ createReview(review: GalleryInterfaces.Review, pubName: string, extName: string): Promise; /** * Deletes a review * * @param {string} pubName - Name of the pubilsher who published the extension * @param {string} extName - Name of the extension * @param {number} reviewId - Id of the review which needs to be updated */ deleteReview(pubName: string, extName: string, reviewId: number): Promise; /** * Updates or Flags a review * * @param {GalleryInterfaces.ReviewPatch} reviewPatch - ReviewPatch object which contains the changes to be applied to the review * @param {string} pubName - Name of the pubilsher who published the extension * @param {string} extName - Name of the extension * @param {number} reviewId - Id of the review which needs to be updated */ updateReview(reviewPatch: GalleryInterfaces.ReviewPatch, pubName: string, extName: string, reviewId: number): Promise; /** * @param {GalleryInterfaces.ExtensionCategory} category */ createCategory(category: GalleryInterfaces.ExtensionCategory): Promise; /** * Get all setting entries for the given user/all-users scope * * @param {string} userScope - User-Scope at which to get the value. Should be "me" for the current user or "host" for all users. * @param {string} key - Optional key under which to filter all the entries */ getGalleryUserSettings(userScope: string, key?: string): Promise<{ [key: string]: any; }>; /** * Set all setting entries for the given user/all-users scope * * @param {{ [key: string] : any; }} entries - A key-value pair of all settings that need to be set * @param {string} userScope - User-Scope at which to get the value. Should be "me" for the current user or "host" for all users. */ setGalleryUserSettings(entries: { [key: string]: any; }, userScope: string): Promise; /** * @param {string} keyType * @param {number} expireCurrentSeconds */ generateKey(keyType: string, expireCurrentSeconds?: number): Promise; /** * @param {string} keyType */ getSigningKey(keyType: string): Promise; /** * @param {GalleryInterfaces.ExtensionStatisticUpdate} extensionStatisticsUpdate * @param {string} publisherName * @param {string} extensionName */ updateExtensionStatistics(extensionStatisticsUpdate: GalleryInterfaces.ExtensionStatisticUpdate, publisherName: string, extensionName: string): Promise; /** * @param {string} publisherName * @param {string} extensionName * @param {number} days * @param {GalleryInterfaces.ExtensionStatsAggregateType} aggregate * @param {Date} afterDate */ getExtensionDailyStats(publisherName: string, extensionName: string, days?: number, aggregate?: GalleryInterfaces.ExtensionStatsAggregateType, afterDate?: Date): Promise; /** * 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. * * @param {string} publisherName - Name of the publisher * @param {string} extensionName - Name of the extension * @param {string} version - Version of the extension */ getExtensionDailyStatsAnonymous(publisherName: string, extensionName: string, version: string): Promise; /** * Increments a daily statistic associated with the extension * * @param {string} publisherName - Name of the publisher * @param {string} extensionName - Name of the extension * @param {string} version - Version of the extension * @param {string} statType - Type of stat to increment */ incrementExtensionDailyStat(publisherName: string, extensionName: string, version: string, statType: string): Promise; /** * @param {string} publisherName * @param {string} extensionName * @param {string} version */ getVerificationLog(publisherName: string, extensionName: string, version: string): Promise; }