GalleryRestClient class

Base class that should be used (derived from) to make requests to VSS REST apis

Extends

Constructors

GalleryRestClient(IVssRestClientOptions)

Properties

RESOURCE_AREA_ID

Methods

addAssetForEditExtensionDraft(string, string, string, string, string)
addAssetForNewExtensionDraft(string, string, string, string)
associateAzurePublisher(string, string)
createCategory(ExtensionCategory)
createDraftForEditExtension(string, string)
createDraftForNewExtension(any, string, String, String)
createExtension(any, string, string)
createExtensionWithPublisher(any, string, string, string)
createPublisher(Publisher)
createQuestion(Question, string, string)

Creates a new question for an extension.

createResponse(Response, string, string, number)

Creates a new response for a given question for an extension.

createReview(Review, string, string)

Creates a new review for an extension

createSupportRequest(CustomerSupportRequest)
deleteExtension(string, string, string)
deleteExtensionById(string, string)
deletePublisher(string)
deletePublisherAsset(string, string)

Delete publisher asset like logo

deleteQuestion(string, string, number)

Deletes an existing question and all its associated responses for an extension. (soft delete)

deleteResponse(string, string, number, number)

Deletes a response for an extension. (soft delete)

deleteReview(string, string, number)

Deletes a review

extensionValidator(AzureRestApiRequestModel)

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

fetchDomainToken(string)
generateKey(string, number)
getAcquisitionOptions(string, string, boolean, boolean)
getAsset(string, string, string, string, boolean, String)
getAssetAuthenticated(string, string, string, string, string, String)
getAssetByName(string, string, string, string, string, boolean, String)
getAssetFromEditExtensionDraft(string, string, string, string)
getAssetFromNewExtensionDraft(string, string, string)
getAssetWithToken(string, string, string, string, string, string, boolean, String)
getCategories(string)
getCategoryDetails(string, string, string)
getCategoryTree(string, string, number, string, string, string, string, string)
getCertificate(string, string, string)
getContentVerificationLog(string, string)
getExtension(string, string, string, ExtensionQueryFlags, string, String)
getExtensionById(string, string, ExtensionQueryFlags)
getExtensionDailyStats(string, string, number, Daily, Date)
getExtensionDailyStatsAnonymous(string, string, string)

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.

getExtensionEvents(string, string, number, Date, string, string)

Get install/uninstall events of an extension. If both count and afterDate parameters are specified, count takes precedence.

getExtensionReports(string, string, number, number, Date)

Returns extension reports

getGalleryUserSettings(string, string)

Get all setting entries for the given user/all-users scope

getPackage(string, string, string, string, boolean, String)

This endpoint gets hit when you download a VSTS extension from the Web UI

getPublisher(string, number)
getPublisherAsset(string, string)

Get publisher asset like logo as a stream

getPublisherWithoutToken(string)
getQuestions(string, string, number, number, Date)

Returns a list of questions with their responses associated with an extension.

getReviews(string, string, number, ReviewFilterOptions, Date, Date)

Returns a list of reviews associated with an extension

getReviewsSummary(string, string, Date, Date)

Returns a summary of the reviews

getRootCategories(string, number, string, string, string, string)
getSigningKey(string)
getVerificationLog(string, string, string, string)
incrementExtensionDailyStat(string, string, string, string, string)

Increments a daily statistic associated with the extension

performEditExtensionDraftOperation(ExtensionDraftPatch, string, string, string)
performNewExtensionDraftOperation(ExtensionDraftPatch, string, string)
publishExtensionEvents(ExtensionEvents[])

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.

publishExtensionWithPublisherSignature(any, string, string, string, string, boolean)
queryAssociatedAzurePublisher(string)
queryExtensions(ExtensionQuery, string, String)
queryPublishers(PublisherQuery)
reportQuestion(Concern, string, string, number)

Flags a concern with an existing question for an extension.

requestAcquisition(ExtensionAcquisitionRequest)
sendNotifications(NotificationsData)

Send Notification

setGalleryUserSettings({[key: string]: any}, string)

Set all setting entries for the given user/all-users scope

shareExtension(string, string, string)
shareExtensionById(string, string)
shareExtensionWithHost(string, string, string, string)
unshareExtension(string, string, string)
unshareExtensionById(string, string)
unshareExtensionWithHost(string, string, string, string)
updateExtension(any, string, string, string, string, boolean)

REST endpoint to update an extension.

updateExtensionById(string, string)
updateExtensionProperties(string, string, PublishedExtensionFlags)
updateExtensionStatistics(ExtensionStatisticUpdate, string, string)
updatePayloadInDraftForEditExtension(any, string, string, string, String)
updatePayloadInDraftForNewExtension(any, string, string, String)
updatePublisher(Publisher, string)
updatePublisherAsset(any, string, string, String)

Update publisher asset like logo. It accepts asset file as an octet stream and file name is passed in header values.

updatePublisherMembers(PublisherUserRoleAssignmentRef[], string, boolean)

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.

updateQuestion(Question, string, string, number)

Updates an existing question for an extension.

updateResponse(Response, string, string, number, number)

Updates an existing response for a given question for an extension.

updateReview(ReviewPatch, string, string, number)

Updates or Flags a review

updateVSCodeWebExtensionStatistics(string, string, VSCodeWebExtensionStatisicsType)
verifyDomainToken(string)

Constructor Details

GalleryRestClient(IVssRestClientOptions)

new GalleryRestClient(options: IVssRestClientOptions)

Parameters

Property Details

RESOURCE_AREA_ID

static RESOURCE_AREA_ID: string

Property Value

string

Method Details

addAssetForEditExtensionDraft(string, string, string, string, string)

function addAssetForEditExtensionDraft(content: string, publisherName: string, extensionName: string, draftId: string, assetType: string): Promise<ExtensionDraftAsset>

Parameters

content

string

Content to upload

publisherName

string

extensionName

string

draftId

string

assetType

string

Returns

addAssetForNewExtensionDraft(string, string, string, string)

function addAssetForNewExtensionDraft(content: string, publisherName: string, draftId: string, assetType: string): Promise<ExtensionDraftAsset>

Parameters

content

string

Content to upload

publisherName

string

draftId

string

assetType

string

Returns

associateAzurePublisher(string, string)

function associateAzurePublisher(publisherName: string, azurePublisherId: string): Promise<AzurePublisher>

Parameters

publisherName

string

azurePublisherId

string

Returns

Promise<AzurePublisher>

createCategory(ExtensionCategory)

function createCategory(category: ExtensionCategory): Promise<ExtensionCategory>

Parameters

Returns

createDraftForEditExtension(string, string)

function createDraftForEditExtension(publisherName: string, extensionName: string): Promise<ExtensionDraft>

Parameters

publisherName

string

extensionName

string

Returns

Promise<ExtensionDraft>

createDraftForNewExtension(any, string, String, String)

function createDraftForNewExtension(content: any, publisherName: string, product: String, fileName?: String): Promise<ExtensionDraft>

Parameters

content

any

Content to upload

publisherName

string

product

String

Header to pass the product type of the payload file

fileName

String

Header to pass the filename of the uploaded data

Returns

Promise<ExtensionDraft>

createExtension(any, string, string)

function createExtension(content: any, extensionType?: string, reCaptchaToken?: string): Promise<PublishedExtension>

Parameters

content

any

Content to upload

extensionType

string

reCaptchaToken

string

Returns

createExtensionWithPublisher(any, string, string, string)

function createExtensionWithPublisher(content: any, publisherName: string, extensionType?: string, reCaptchaToken?: string): Promise<PublishedExtension>

Parameters

content

any

Content to upload

publisherName

string

extensionType

string

reCaptchaToken

string

Returns

createPublisher(Publisher)

function createPublisher(publisher: Publisher): Promise<Publisher>

Parameters

publisher
Publisher

Returns

Promise<Publisher>

createQuestion(Question, string, string)

Creates a new question for an extension.

function createQuestion(question: Question, publisherName: string, extensionName: string): Promise<Question>

Parameters

question
Question

Question to be created for the extension.

publisherName

string

Name of the publisher who published the extension.

extensionName

string

Name of the extension.

Returns

Promise<Question>

createResponse(Response, string, string, number)

Creates a new response for a given question for an extension.

function createResponse(response: Response, publisherName: string, extensionName: string, questionId: number): Promise<Response>

Parameters

response
Response

Response to be created for the extension.

publisherName

string

Name of the publisher who published the extension.

extensionName

string

Name of the extension.

questionId

number

Identifier of the question for which response is to be created for the extension.

Returns

Promise<Response>

createReview(Review, string, string)

Creates a new review for an extension

function createReview(review: Review, pubName: string, extName: string): Promise<Review>

Parameters

review
Review

Review to be created for the extension

pubName

string

Name of the publisher who published the extension

extName

string

Name of the extension

Returns

Promise<Review>

createSupportRequest(CustomerSupportRequest)

function createSupportRequest(customerSupportRequest: CustomerSupportRequest): Promise<void>

Parameters

customerSupportRequest
CustomerSupportRequest

Returns

Promise<void>

deleteExtension(string, string, string)

function deleteExtension(publisherName: string, extensionName: string, version?: string): Promise<void>

Parameters

publisherName

string

extensionName

string

version

string

Returns

Promise<void>

deleteExtensionById(string, string)

function deleteExtensionById(extensionId: string, version?: string): Promise<void>

Parameters

extensionId

string

version

string

Returns

Promise<void>

deletePublisher(string)

function deletePublisher(publisherName: string): Promise<void>

Parameters

publisherName

string

Returns

Promise<void>

deletePublisherAsset(string, string)

Delete publisher asset like logo

function deletePublisherAsset(publisherName: string, assetType?: string): Promise<void>

Parameters

publisherName

string

Internal name of the publisher

assetType

string

Type of asset. Default value is 'logo'.

Returns

Promise<void>

deleteQuestion(string, string, number)

Deletes an existing question and all its associated responses for an extension. (soft delete)

function deleteQuestion(publisherName: string, extensionName: string, questionId: number): Promise<void>

Parameters

publisherName

string

Name of the publisher who published the extension.

extensionName

string

Name of the extension.

questionId

number

Identifier of the question to be deleted for the extension.

Returns

Promise<void>

deleteResponse(string, string, number, number)

Deletes a response for an extension. (soft delete)

function deleteResponse(publisherName: string, extensionName: string, questionId: number, responseId: number): Promise<void>

Parameters

publisherName

string

Name of the publisher who published the extension.

extensionName

string

Name of the extension.

questionId

number

Identifies the question whose response is to be deleted.

responseId

number

Identifies the response to be deleted.

Returns

Promise<void>

deleteReview(string, string, number)

Deletes a review

function deleteReview(pubName: string, extName: string, reviewId: number): Promise<void>

Parameters

pubName

string

Name of the publisher who published the extension

extName

string

Name of the extension

reviewId

number

Id of the review which needs to be updated

Returns

Promise<void>

extensionValidator(AzureRestApiRequestModel)

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

function extensionValidator(azureRestApiRequestModel: AzureRestApiRequestModel): Promise<void>

Parameters

azureRestApiRequestModel
AzureRestApiRequestModel

All the parameters are sent in the request body

Returns

Promise<void>

fetchDomainToken(string)

function fetchDomainToken(publisherName: string): Promise<string>

Parameters

publisherName

string

Returns

Promise<string>

generateKey(string, number)

function generateKey(keyType: string, expireCurrentSeconds?: number): Promise<void>

Parameters

keyType

string

expireCurrentSeconds

number

Returns

Promise<void>

getAcquisitionOptions(string, string, boolean, boolean)

function getAcquisitionOptions(itemId: string, installationTarget: string, testCommerce?: boolean, isFreeOrTrialInstall?: boolean): Promise<AcquisitionOptions>

Parameters

itemId

string

installationTarget

string

testCommerce

boolean

isFreeOrTrialInstall

boolean

Returns

getAsset(string, string, string, string, boolean, String)

function getAsset(extensionId: string, version: string, assetType: string, accountToken?: string, acceptDefault?: boolean, accountTokenHeader?: String): Promise<ArrayBuffer>

Parameters

extensionId

string

version

string

assetType

string

accountToken

string

acceptDefault

boolean

accountTokenHeader

String

Header to pass the account token

Returns

Promise<ArrayBuffer>

getAssetAuthenticated(string, string, string, string, string, String)

function getAssetAuthenticated(publisherName: string, extensionName: string, version: string, assetType: string, accountToken?: string, accountTokenHeader?: String): Promise<ArrayBuffer>

Parameters

publisherName

string

extensionName

string

version

string

assetType

string

accountToken

string

accountTokenHeader

String

Header to pass the account token

Returns

Promise<ArrayBuffer>

getAssetByName(string, string, string, string, string, boolean, String)

function getAssetByName(publisherName: string, extensionName: string, version: string, assetType: string, accountToken?: string, acceptDefault?: boolean, accountTokenHeader?: String): Promise<ArrayBuffer>

Parameters

publisherName

string

extensionName

string

version

string

assetType

string

accountToken

string

acceptDefault

boolean

accountTokenHeader

String

Header to pass the account token

Returns

Promise<ArrayBuffer>

getAssetFromEditExtensionDraft(string, string, string, string)

function getAssetFromEditExtensionDraft(publisherName: string, draftId: string, assetType: string, extensionName: string): Promise<ArrayBuffer>

Parameters

publisherName

string

draftId

string

assetType

string

extensionName

string

Returns

Promise<ArrayBuffer>

getAssetFromNewExtensionDraft(string, string, string)

function getAssetFromNewExtensionDraft(publisherName: string, draftId: string, assetType: string): Promise<ArrayBuffer>

Parameters

publisherName

string

draftId

string

assetType

string

Returns

Promise<ArrayBuffer>

getAssetWithToken(string, string, string, string, string, string, boolean, String)

function getAssetWithToken(publisherName: string, extensionName: string, version: string, assetType: string, assetToken?: string, accountToken?: string, acceptDefault?: boolean, accountTokenHeader?: String): Promise<ArrayBuffer>

Parameters

publisherName

string

extensionName

string

version

string

assetType

string

assetToken

string

accountToken

string

acceptDefault

boolean

accountTokenHeader

String

Header to pass the account token

Returns

Promise<ArrayBuffer>

getCategories(string)

function getCategories(languages?: string): Promise<string[]>

Parameters

languages

string

Returns

Promise<string[]>

getCategoryDetails(string, string, string)

function getCategoryDetails(categoryName: string, languages?: string, product?: string): Promise<CategoriesResult>

Parameters

categoryName

string

languages

string

product

string

Returns

Promise<CategoriesResult>

getCategoryTree(string, string, number, string, string, string, string, string)

function getCategoryTree(product: string, categoryId: string, lcid?: number, source?: string, productVersion?: string, skus?: string, subSkus?: string, productArchitecture?: string): Promise<ProductCategory>

Parameters

product

string

categoryId

string

lcid

number

source

string

productVersion

string

skus

string

subSkus

string

productArchitecture

string

Returns

Promise<ProductCategory>

getCertificate(string, string, string)

function getCertificate(publisherName: string, extensionName: string, version?: string): Promise<ArrayBuffer>

Parameters

publisherName

string

extensionName

string

version

string

Returns

Promise<ArrayBuffer>

getContentVerificationLog(string, string)

function getContentVerificationLog(publisherName: string, extensionName: string): Promise<ArrayBuffer>

Parameters

publisherName

string

extensionName

string

Returns

Promise<ArrayBuffer>

getExtension(string, string, string, ExtensionQueryFlags, string, String)

function getExtension(publisherName: string, extensionName: string, version?: string, flags?: ExtensionQueryFlags, accountToken?: string, accountTokenHeader?: String): Promise<PublishedExtension>

Parameters

publisherName

string

extensionName

string

version

string

accountToken

string

accountTokenHeader

String

Header to pass the account token

Returns

getExtensionById(string, string, ExtensionQueryFlags)

function getExtensionById(extensionId: string, version?: string, flags?: ExtensionQueryFlags): Promise<PublishedExtension>

Parameters

extensionId

string

version

string

Returns

getExtensionDailyStats(string, string, number, Daily, Date)

function getExtensionDailyStats(publisherName: string, extensionName: string, days?: number, aggregate?: Daily, afterDate?: Date): Promise<ExtensionDailyStats>

Parameters

publisherName

string

extensionName

string

days

number

aggregate
Daily
afterDate

Date

Returns

getExtensionDailyStatsAnonymous(string, string, string)

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.

function getExtensionDailyStatsAnonymous(publisherName: string, extensionName: string, version: string): Promise<ExtensionDailyStats>

Parameters

publisherName

string

Name of the publisher

extensionName

string

Name of the extension

version

string

Version of the extension

Returns

getExtensionEvents(string, string, number, Date, string, string)

Get install/uninstall events of an extension. If both count and afterDate parameters are specified, count takes precedence.

function getExtensionEvents(publisherName: string, extensionName: string, count?: number, afterDate?: Date, include?: string, includeProperty?: string): Promise<ExtensionEvents>

Parameters

publisherName

string

Name of the publisher

extensionName

string

Name of the extension

count

number

Count of events to fetch, applies to each event type.

afterDate

Date

Fetch events that occurred on or after this date

include

string

Filter options. Supported values: install, uninstall, review, acquisition, sales. Default is to fetch all types of events

includeProperty

string

Event properties to include. Currently only 'lastContactDetails' is supported for uninstall events

Returns

Promise<ExtensionEvents>

getExtensionReports(string, string, number, number, Date)

Returns extension reports

function getExtensionReports(publisherName: string, extensionName: string, days?: number, count?: number, afterDate?: Date): Promise<any>

Parameters

publisherName

string

Name of the publisher who published the extension

extensionName

string

Name of the extension

days

number

Last n days report. If afterDate and days are specified, days will take priority

count

number

Number of events to be returned

afterDate

Date

Use if you want to fetch events newer than the specified date

Returns

Promise<any>

getGalleryUserSettings(string, string)

Get all setting entries for the given user/all-users scope

function getGalleryUserSettings(userScope: string, key?: string): Promise<{[key: string]: any}>

Parameters

userScope

string

User-Scope at which to get the value. Should be "me" for the current user or "host" for all users.

key

string

Optional key under which to filter all the entries

Returns

Promise<{[key: string]: any}>

getPackage(string, string, string, string, boolean, String)

This endpoint gets hit when you download a VSTS extension from the Web UI

function getPackage(publisherName: string, extensionName: string, version: string, accountToken?: string, acceptDefault?: boolean, accountTokenHeader?: String): Promise<ArrayBuffer>

Parameters

publisherName

string

extensionName

string

version

string

accountToken

string

acceptDefault

boolean

accountTokenHeader

String

Header to pass the account token

Returns

Promise<ArrayBuffer>

getPublisher(string, number)

function getPublisher(publisherName: string, flags?: number): Promise<Publisher>

Parameters

publisherName

string

flags

number

Returns

Promise<Publisher>

getPublisherAsset(string, string)

Get publisher asset like logo as a stream

function getPublisherAsset(publisherName: string, assetType?: string): Promise<ArrayBuffer>

Parameters

publisherName

string

Internal name of the publisher

assetType

string

Type of asset. Default value is 'logo'.

Returns

Promise<ArrayBuffer>

getPublisherWithoutToken(string)

function getPublisherWithoutToken(publisherName: string): Promise<Publisher>

Parameters

publisherName

string

Returns

Promise<Publisher>

getQuestions(string, string, number, number, Date)

Returns a list of questions with their responses associated with an extension.

function getQuestions(publisherName: string, extensionName: string, count?: number, page?: number, afterDate?: Date): Promise<QuestionsResult>

Parameters

publisherName

string

Name of the publisher who published the extension.

extensionName

string

Name of the extension.

count

number

Number of questions to retrieve (defaults to 10).

page

number

Page number from which set of questions are to be retrieved.

afterDate

Date

If provided, results questions are returned which were posted after this date

Returns

Promise<QuestionsResult>

getReviews(string, string, number, ReviewFilterOptions, Date, Date)

Returns a list of reviews associated with an extension

function getReviews(publisherName: string, extensionName: string, count?: number, filterOptions?: ReviewFilterOptions, beforeDate?: Date, afterDate?: Date): Promise<ReviewsResult>

Parameters

publisherName

string

Name of the publisher who published the extension

extensionName

string

Name of the extension

count

number

Number of reviews to retrieve (defaults to 5)

filterOptions
ReviewFilterOptions

FilterOptions to filter out empty reviews etcetera, defaults to none

beforeDate

Date

Use if you want to fetch reviews older than the specified date, defaults to null

afterDate

Date

Use if you want to fetch reviews newer than the specified date, defaults to null

Returns

Promise<ReviewsResult>

getReviewsSummary(string, string, Date, Date)

Returns a summary of the reviews

function getReviewsSummary(pubName: string, extName: string, beforeDate?: Date, afterDate?: Date): Promise<ReviewSummary>

Parameters

pubName

string

Name of the publisher who published the extension

extName

string

Name of the extension

beforeDate

Date

Use if you want to fetch summary of reviews older than the specified date, defaults to null

afterDate

Date

Use if you want to fetch summary of reviews newer than the specified date, defaults to null

Returns

Promise<ReviewSummary>

getRootCategories(string, number, string, string, string, string)

function getRootCategories(product: string, lcid?: number, source?: string, productVersion?: string, skus?: string, subSkus?: string): Promise<ProductCategoriesResult>

Parameters

product

string

lcid

number

source

string

productVersion

string

skus

string

subSkus

string

Returns

getSigningKey(string)

function getSigningKey(keyType: string): Promise<string>

Parameters

keyType

string

Returns

Promise<string>

getVerificationLog(string, string, string, string)

function getVerificationLog(publisherName: string, extensionName: string, version: string, targetPlatform?: string): Promise<ArrayBuffer>

Parameters

publisherName

string

extensionName

string

version

string

targetPlatform

string

Returns

Promise<ArrayBuffer>

incrementExtensionDailyStat(string, string, string, string, string)

Increments a daily statistic associated with the extension

function incrementExtensionDailyStat(publisherName: string, extensionName: string, version: string, statType: string, targetPlatform?: string): Promise<void>

Parameters

publisherName

string

Name of the publisher

extensionName

string

Name of the extension

version

string

Version of the extension

statType

string

Type of stat to increment

targetPlatform

string

Returns

Promise<void>

performEditExtensionDraftOperation(ExtensionDraftPatch, string, string, string)

function performEditExtensionDraftOperation(draftPatch: ExtensionDraftPatch, publisherName: string, extensionName: string, draftId: string): Promise<ExtensionDraft>

Parameters

draftPatch
ExtensionDraftPatch
publisherName

string

extensionName

string

draftId

string

Returns

Promise<ExtensionDraft>

performNewExtensionDraftOperation(ExtensionDraftPatch, string, string)

function performNewExtensionDraftOperation(draftPatch: ExtensionDraftPatch, publisherName: string, draftId: string): Promise<ExtensionDraft>

Parameters

draftPatch
ExtensionDraftPatch
publisherName

string

draftId

string

Returns

Promise<ExtensionDraft>

publishExtensionEvents(ExtensionEvents[])

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.

function publishExtensionEvents(extensionEvents: ExtensionEvents[]): Promise<void>

Parameters

extensionEvents

ExtensionEvents[]

Returns

Promise<void>

publishExtensionWithPublisherSignature(any, string, string, string, string, boolean)

function publishExtensionWithPublisherSignature(content: any, publisherName: string, extensionName: string, extensionType?: string, reCaptchaToken?: string, bypassScopeCheck?: boolean): Promise<PublishedExtension>

Parameters

content

any

Content to upload

publisherName

string

extensionName

string

extensionType

string

reCaptchaToken

string

bypassScopeCheck

boolean

Returns

queryAssociatedAzurePublisher(string)

function queryAssociatedAzurePublisher(publisherName: string): Promise<AzurePublisher>

Parameters

publisherName

string

Returns

Promise<AzurePublisher>

queryExtensions(ExtensionQuery, string, String)

function queryExtensions(extensionQuery: ExtensionQuery, accountToken?: string, accountTokenHeader?: String): Promise<ExtensionQueryResult>

Parameters

extensionQuery
ExtensionQuery
accountToken

string

accountTokenHeader

String

Header to pass the account token

Returns

queryPublishers(PublisherQuery)

function queryPublishers(publisherQuery: PublisherQuery): Promise<PublisherQueryResult>

Parameters

publisherQuery
PublisherQuery

Returns

reportQuestion(Concern, string, string, number)

Flags a concern with an existing question for an extension.

function reportQuestion(concern: Concern, pubName: string, extName: string, questionId: number): Promise<Concern>

Parameters

concern
Concern

User reported concern with a question for the extension.

pubName

string

Name of the publisher who published the extension.

extName

string

Name of the extension.

questionId

number

Identifier of the question to be updated for the extension.

Returns

Promise<Concern>

requestAcquisition(ExtensionAcquisitionRequest)

function requestAcquisition(acquisitionRequest: ExtensionAcquisitionRequest): Promise<ExtensionAcquisitionRequest>

Parameters

acquisitionRequest
ExtensionAcquisitionRequest

Returns

sendNotifications(NotificationsData)

Send Notification

function sendNotifications(notificationData: NotificationsData): Promise<void>

Parameters

notificationData
NotificationsData

Denoting the data needed to send notification

Returns

Promise<void>

setGalleryUserSettings({[key: string]: any}, string)

Set all setting entries for the given user/all-users scope

function setGalleryUserSettings(entries: {[key: string]: any}, userScope: string): Promise<void>

Parameters

entries

{[key: string]: any}

A key-value pair of all settings that need to be set

userScope

string

User-Scope at which to get the value. Should be "me" for the current user or "host" for all users.

Returns

Promise<void>

shareExtension(string, string, string)

function shareExtension(publisherName: string, extensionName: string, accountName: string): Promise<void>

Parameters

publisherName

string

extensionName

string

accountName

string

Returns

Promise<void>

shareExtensionById(string, string)

function shareExtensionById(extensionId: string, accountName: string): Promise<void>

Parameters

extensionId

string

accountName

string

Returns

Promise<void>

shareExtensionWithHost(string, string, string, string)

function shareExtensionWithHost(publisherName: string, extensionName: string, hostType: string, hostName: string): Promise<void>

Parameters

publisherName

string

extensionName

string

hostType

string

hostName

string

Returns

Promise<void>

unshareExtension(string, string, string)

function unshareExtension(publisherName: string, extensionName: string, accountName: string): Promise<void>

Parameters

publisherName

string

extensionName

string

accountName

string

Returns

Promise<void>

unshareExtensionById(string, string)

function unshareExtensionById(extensionId: string, accountName: string): Promise<void>

Parameters

extensionId

string

accountName

string

Returns

Promise<void>

unshareExtensionWithHost(string, string, string, string)

function unshareExtensionWithHost(publisherName: string, extensionName: string, hostType: string, hostName: string): Promise<void>

Parameters

publisherName

string

extensionName

string

hostType

string

hostName

string

Returns

Promise<void>

updateExtension(any, string, string, string, string, boolean)

REST endpoint to update an extension.

function updateExtension(content: any, publisherName: string, extensionName: string, extensionType?: string, reCaptchaToken?: string, bypassScopeCheck?: boolean): Promise<PublishedExtension>

Parameters

content

any

Content to upload

publisherName

string

Name of the publisher

extensionName

string

Name of the extension

extensionType

string

reCaptchaToken

string

bypassScopeCheck

boolean

This parameter decides if the scope change check needs to be invoked or not

Returns

updateExtensionById(string, string)

function updateExtensionById(extensionId: string, reCaptchaToken?: string): Promise<PublishedExtension>

Parameters

extensionId

string

reCaptchaToken

string

Returns

updateExtensionProperties(string, string, PublishedExtensionFlags)

function updateExtensionProperties(publisherName: string, extensionName: string, flags: PublishedExtensionFlags): Promise<PublishedExtension>

Parameters

publisherName

string

extensionName

string

Returns

updateExtensionStatistics(ExtensionStatisticUpdate, string, string)

function updateExtensionStatistics(extensionStatisticsUpdate: ExtensionStatisticUpdate, publisherName: string, extensionName: string): Promise<void>

Parameters

extensionStatisticsUpdate
ExtensionStatisticUpdate
publisherName

string

extensionName

string

Returns

Promise<void>

updatePayloadInDraftForEditExtension(any, string, string, string, String)

function updatePayloadInDraftForEditExtension(content: any, publisherName: string, extensionName: string, draftId: string, fileName?: String): Promise<ExtensionDraft>

Parameters

content

any

Content to upload

publisherName

string

extensionName

string

draftId

string

fileName

String

Header to pass the filename of the uploaded data

Returns

Promise<ExtensionDraft>

updatePayloadInDraftForNewExtension(any, string, string, String)

function updatePayloadInDraftForNewExtension(content: any, publisherName: string, draftId: string, fileName?: String): Promise<ExtensionDraft>

Parameters

content

any

Content to upload

publisherName

string

draftId

string

fileName

String

Header to pass the filename of the uploaded data

Returns

Promise<ExtensionDraft>

updatePublisher(Publisher, string)

function updatePublisher(publisher: Publisher, publisherName: string): Promise<Publisher>

Parameters

publisher
Publisher
publisherName

string

Returns

Promise<Publisher>

updatePublisherAsset(any, string, string, String)

Update publisher asset like logo. It accepts asset file as an octet stream and file name is passed in header values.

function updatePublisherAsset(content: any, publisherName: string, assetType?: string, fileName?: String): Promise<{[key: string]: string}>

Parameters

content

any

Content to upload

publisherName

string

Internal name of the publisher

assetType

string

Type of asset. Default value is 'logo'.

fileName

String

Header to pass the filename of the uploaded data

Returns

Promise<{[key: string]: string}>

updatePublisherMembers(PublisherUserRoleAssignmentRef[], string, boolean)

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.

function updatePublisherMembers(roleAssignments: PublisherUserRoleAssignmentRef[], publisherName: string, limitToCallerIdentityDomain?: boolean): Promise<PublisherRoleAssignment[]>

Parameters

roleAssignments

PublisherUserRoleAssignmentRef[]

List of user identifiers(email address) and role to be added. Currently only one entry is supported.

publisherName

string

The name/id of publisher to which users have to be added

limitToCallerIdentityDomain

boolean

Should cross tenant addtions be allowed or not.

Returns

updateQuestion(Question, string, string, number)

Updates an existing question for an extension.

function updateQuestion(question: Question, publisherName: string, extensionName: string, questionId: number): Promise<Question>

Parameters

question
Question

Updated question to be set for the extension.

publisherName

string

Name of the publisher who published the extension.

extensionName

string

Name of the extension.

questionId

number

Identifier of the question to be updated for the extension.

Returns

Promise<Question>

updateResponse(Response, string, string, number, number)

Updates an existing response for a given question for an extension.

function updateResponse(response: Response, publisherName: string, extensionName: string, questionId: number, responseId: number): Promise<Response>

Parameters

response
Response

Updated response to be set for the extension.

publisherName

string

Name of the publisher who published the extension.

extensionName

string

Name of the extension.

questionId

number

Identifier of the question for which response is to be updated for the extension.

responseId

number

Identifier of the response which has to be updated.

Returns

Promise<Response>

updateReview(ReviewPatch, string, string, number)

Updates or Flags a review

function updateReview(reviewPatch: ReviewPatch, pubName: string, extName: string, reviewId: number): Promise<ReviewPatch>

Parameters

reviewPatch
ReviewPatch

ReviewPatch object which contains the changes to be applied to the review

pubName

string

Name of the publisher who published the extension

extName

string

Name of the extension

reviewId

number

Id of the review which needs to be updated

Returns

Promise<ReviewPatch>

updateVSCodeWebExtensionStatistics(string, string, VSCodeWebExtensionStatisicsType)

function updateVSCodeWebExtensionStatistics(itemName: string, version: string, statType: VSCodeWebExtensionStatisicsType): Promise<void>

Parameters

itemName

string

version

string

Returns

Promise<void>

verifyDomainToken(string)

function verifyDomainToken(publisherName: string): Promise<void>

Parameters

publisherName

string

Returns

Promise<void>