import basem = require('./ClientApiBases'); import VsoBaseInterfaces = require('./interfaces/common/VsoBaseInterfaces'); import ExtensionManagementInterfaces = require("./interfaces/ExtensionManagementInterfaces"); import GalleryInterfaces = require("./interfaces/GalleryInterfaces"); export interface IExtensionManagementApi extends basem.ClientApiBase { getAcquisitionOptions(itemId: string, testCommerce?: boolean, isFreeOrTrialInstall?: boolean, isAccountOwner?: boolean, isLinked?: boolean, isConnectedServer?: boolean, isBuyOperationValid?: boolean): Promise; requestAcquisition(acquisitionRequest: ExtensionManagementInterfaces.ExtensionAcquisitionRequest): Promise; getAuditLog(publisherName: string, extensionName: string): Promise; registerAuthorization(publisherName: string, extensionName: string, registrationId: string): Promise; createDocumentByName(doc: any, publisherName: string, extensionName: string, scopeType: string, scopeValue: string, collectionName: string): Promise; deleteDocumentByName(publisherName: string, extensionName: string, scopeType: string, scopeValue: string, collectionName: string, documentId: string): Promise; getDocumentByName(publisherName: string, extensionName: string, scopeType: string, scopeValue: string, collectionName: string, documentId: string): Promise; getDocumentsByName(publisherName: string, extensionName: string, scopeType: string, scopeValue: string, collectionName: string): Promise; setDocumentByName(doc: any, publisherName: string, extensionName: string, scopeType: string, scopeValue: string, collectionName: string): Promise; updateDocumentByName(doc: any, publisherName: string, extensionName: string, scopeType: string, scopeValue: string, collectionName: string): Promise; queryCollectionsByName(collectionQuery: ExtensionManagementInterfaces.ExtensionDataCollectionQuery, publisherName: string, extensionName: string): Promise; getStates(includeDisabled?: boolean, includeErrors?: boolean, includeInstallationIssues?: boolean, forceRefresh?: boolean): Promise; queryExtensions(query: ExtensionManagementInterfaces.InstalledExtensionQuery): Promise; getInstalledExtensions(includeDisabledExtensions?: boolean, includeErrors?: boolean, assetTypes?: string[], includeInstallationIssues?: boolean): Promise; updateInstalledExtension(extension: ExtensionManagementInterfaces.InstalledExtension): Promise; getInstalledExtensionByName(publisherName: string, extensionName: string, assetTypes?: string[]): Promise; installExtensionByName(publisherName: string, extensionName: string, version?: string): Promise; uninstallExtensionByName(publisherName: string, extensionName: string, reason?: string, reasonCode?: string): Promise; getPolicies(userId: string): Promise; resolveRequest(rejectMessage: string, publisherName: string, extensionName: string, requesterId: string, state: ExtensionManagementInterfaces.ExtensionRequestState): Promise; getRequests(): Promise; resolveAllRequests(rejectMessage: string, publisherName: string, extensionName: string, state: ExtensionManagementInterfaces.ExtensionRequestState): Promise; deleteRequest(publisherName: string, extensionName: string): Promise; requestExtension(publisherName: string, extensionName: string, requestMessage: string): Promise; getToken(): Promise; } export declare class ExtensionManagementApi extends basem.ClientApiBase implements IExtensionManagementApi { constructor(baseUrl: string, handlers: VsoBaseInterfaces.IRequestHandler[], options?: VsoBaseInterfaces.IRequestOptions); static readonly RESOURCE_AREA_ID: string; /** * @param {string} itemId * @param {boolean} testCommerce * @param {boolean} isFreeOrTrialInstall * @param {boolean} isAccountOwner * @param {boolean} isLinked * @param {boolean} isConnectedServer * @param {boolean} isBuyOperationValid */ getAcquisitionOptions(itemId: string, testCommerce?: boolean, isFreeOrTrialInstall?: boolean, isAccountOwner?: boolean, isLinked?: boolean, isConnectedServer?: boolean, isBuyOperationValid?: boolean): Promise; /** * @param {ExtensionManagementInterfaces.ExtensionAcquisitionRequest} acquisitionRequest */ requestAcquisition(acquisitionRequest: ExtensionManagementInterfaces.ExtensionAcquisitionRequest): Promise; /** * @param {string} publisherName * @param {string} extensionName */ getAuditLog(publisherName: string, extensionName: string): Promise; /** * @param {string} publisherName * @param {string} extensionName * @param {string} registrationId */ registerAuthorization(publisherName: string, extensionName: string, registrationId: string): Promise; /** * @param {any} doc * @param {string} publisherName * @param {string} extensionName * @param {string} scopeType * @param {string} scopeValue * @param {string} collectionName */ createDocumentByName(doc: any, publisherName: string, extensionName: string, scopeType: string, scopeValue: string, collectionName: string): Promise; /** * @param {string} publisherName * @param {string} extensionName * @param {string} scopeType * @param {string} scopeValue * @param {string} collectionName * @param {string} documentId */ deleteDocumentByName(publisherName: string, extensionName: string, scopeType: string, scopeValue: string, collectionName: string, documentId: string): Promise; /** * @param {string} publisherName * @param {string} extensionName * @param {string} scopeType * @param {string} scopeValue * @param {string} collectionName * @param {string} documentId */ getDocumentByName(publisherName: string, extensionName: string, scopeType: string, scopeValue: string, collectionName: string, documentId: string): Promise; /** * @param {string} publisherName * @param {string} extensionName * @param {string} scopeType * @param {string} scopeValue * @param {string} collectionName */ getDocumentsByName(publisherName: string, extensionName: string, scopeType: string, scopeValue: string, collectionName: string): Promise; /** * @param {any} doc * @param {string} publisherName * @param {string} extensionName * @param {string} scopeType * @param {string} scopeValue * @param {string} collectionName */ setDocumentByName(doc: any, publisherName: string, extensionName: string, scopeType: string, scopeValue: string, collectionName: string): Promise; /** * @param {any} doc * @param {string} publisherName * @param {string} extensionName * @param {string} scopeType * @param {string} scopeValue * @param {string} collectionName */ updateDocumentByName(doc: any, publisherName: string, extensionName: string, scopeType: string, scopeValue: string, collectionName: string): Promise; /** * Query for one or more data collections for the specified extension. Note: the token used for authorization must have been issued on behalf of the specified extension. * * @param {ExtensionManagementInterfaces.ExtensionDataCollectionQuery} collectionQuery * @param {string} publisherName - Name of the publisher. Example: "fabrikam". * @param {string} extensionName - Name of the extension. Example: "ops-tools". */ queryCollectionsByName(collectionQuery: ExtensionManagementInterfaces.ExtensionDataCollectionQuery, publisherName: string, extensionName: string): Promise; /** * List state and version information for all installed extensions. * * @param {boolean} includeDisabled - If true (the default), include disabled extensions in the results. * @param {boolean} includeErrors - If true, include installed extensions in an error state in the results. * @param {boolean} includeInstallationIssues * @param {boolean} forceRefresh */ getStates(includeDisabled?: boolean, includeErrors?: boolean, includeInstallationIssues?: boolean, forceRefresh?: boolean): Promise; /** * @param {ExtensionManagementInterfaces.InstalledExtensionQuery} query */ queryExtensions(query: ExtensionManagementInterfaces.InstalledExtensionQuery): Promise; /** * List the installed extensions in the account / project collection. * * @param {boolean} includeDisabledExtensions - If true (the default), include disabled extensions in the results. * @param {boolean} includeErrors - If true, include installed extensions with errors. * @param {string[]} assetTypes * @param {boolean} includeInstallationIssues */ getInstalledExtensions(includeDisabledExtensions?: boolean, includeErrors?: boolean, assetTypes?: string[], includeInstallationIssues?: boolean): Promise; /** * Update an installed extension. Typically this API is used to enable or disable an extension. * * @param {ExtensionManagementInterfaces.InstalledExtension} extension */ updateInstalledExtension(extension: ExtensionManagementInterfaces.InstalledExtension): Promise; /** * Get an installed extension by its publisher and extension name. * * @param {string} publisherName - Name of the publisher. Example: "fabrikam". * @param {string} extensionName - Name of the extension. Example: "ops-tools". * @param {string[]} assetTypes */ getInstalledExtensionByName(publisherName: string, extensionName: string, assetTypes?: string[]): Promise; /** * Install the specified extension into the account / project collection. * * @param {string} publisherName - Name of the publisher. Example: "fabrikam". * @param {string} extensionName - Name of the extension. Example: "ops-tools". * @param {string} version */ installExtensionByName(publisherName: string, extensionName: string, version?: string): Promise; /** * Uninstall the specified extension from the account / project collection. * * @param {string} publisherName - Name of the publisher. Example: "fabrikam". * @param {string} extensionName - Name of the extension. Example: "ops-tools". * @param {string} reason * @param {string} reasonCode */ uninstallExtensionByName(publisherName: string, extensionName: string, reason?: string, reasonCode?: string): Promise; /** * @param {string} userId */ getPolicies(userId: string): Promise; /** * @param {string} rejectMessage * @param {string} publisherName * @param {string} extensionName * @param {string} requesterId * @param {ExtensionManagementInterfaces.ExtensionRequestState} state */ resolveRequest(rejectMessage: string, publisherName: string, extensionName: string, requesterId: string, state: ExtensionManagementInterfaces.ExtensionRequestState): Promise; /** */ getRequests(): Promise; /** * @param {string} rejectMessage * @param {string} publisherName * @param {string} extensionName * @param {ExtensionManagementInterfaces.ExtensionRequestState} state */ resolveAllRequests(rejectMessage: string, publisherName: string, extensionName: string, state: ExtensionManagementInterfaces.ExtensionRequestState): Promise; /** * @param {string} publisherName * @param {string} extensionName */ deleteRequest(publisherName: string, extensionName: string): Promise; /** * @param {string} publisherName * @param {string} extensionName * @param {string} requestMessage */ requestExtension(publisherName: string, extensionName: string, requestMessage: string): Promise; /** */ getToken(): Promise; }