import basem = require('./ClientApiBases'); import VsoBaseInterfaces = require('./interfaces/common/VsoBaseInterfaces'); import ManagementInterfaces = require("./interfaces/ManagementInterfaces"); export interface IManagementApi extends basem.ClientApiBase { deleteBillingInfo(organizationId: string): Promise; deleteMeterUsageHistory(organizationId: string): Promise; getBillingInfo(organizationId: string): Promise; saveBillingInfo(billingInfo: ManagementInterfaces.BillingInfo, organizationId: string): Promise; createBillingSnapshot(meterUsage: ManagementInterfaces.MeterUsage): Promise; getBillableCommitterDetails(billingDate?: Date): Promise; getLastMeterUsage(): Promise; getMeterUsage(billingDate?: Date): Promise; getOrgEnablementStatus(includeAllProperties?: boolean): Promise; updateOrgEnablementStatus(savedAdvSecEnablementStatus: ManagementInterfaces.AdvSecEnablementSettingsUpdate): Promise; getEstimatedOrgBillablePushers(): Promise; getProjectEnablementStatus(project: string, includeAllProperties?: boolean): Promise; updateProjectEnablementStatus(savedAdvSecEnablementStatus: ManagementInterfaces.AdvSecEnablementSettingsUpdate, project: string): Promise; getEstimatedProjectBillablePushers(project: string): Promise; getRepoEnablementStatus(project: string, repository: string, includeAllProperties?: boolean): Promise; updateRepoAdvSecEnablementStatus(savedAdvSecEnablementStatus: ManagementInterfaces.AdvSecEnablementStatusUpdate, project: string, repository: string): Promise; getEstimatedRepoBillableCommitters(project: string, repository: string): Promise; } export declare class ManagementApi extends basem.ClientApiBase implements IManagementApi { constructor(baseUrl: string, handlers: VsoBaseInterfaces.IRequestHandler[], options?: VsoBaseInterfaces.IRequestOptions); /** * Delete the billing info for an organization. * * @param {string} organizationId */ deleteBillingInfo(organizationId: string): Promise; /** * Delete the meter usage history from Primary SU for an organization. * * @param {string} organizationId */ deleteMeterUsageHistory(organizationId: string): Promise; /** * Get the billing info for an organization. * * @param {string} organizationId - Organization ID to get billing info for. */ getBillingInfo(organizationId: string): Promise; /** * Save the billing info for an organization. * * @param {ManagementInterfaces.BillingInfo} billingInfo * @param {string} organizationId */ saveBillingInfo(billingInfo: ManagementInterfaces.BillingInfo, organizationId: string): Promise; /** * During multi-org billing computation in primary scale unit(EUS21), this API is used to create billing snapshot for a specific org. Primary scale unit will call this API for each org in different scsle units to create billing snapshot. Data will be stored in the org specific partition DB -> billing snapshot table. This is needed as customers will fetch billing data from their org specific partition DB. * * @param {ManagementInterfaces.MeterUsage} meterUsage */ createBillingSnapshot(meterUsage: ManagementInterfaces.MeterUsage): Promise; /** * Get all billable committers details, including those not matched with a VSID. * * @param {Date} billingDate - The date to query, or if not provided, today */ getBillableCommitterDetails(billingDate?: Date): Promise; /** */ getLastMeterUsage(): Promise; /** * Get commiters used when calculating billing information. * * @param {Date} billingDate - The date to query, or if not provided, today */ getMeterUsage(billingDate?: Date): Promise; /** * Get the current status of Advanced Security for the organization * * @param {boolean} includeAllProperties - When true, also determine if pushes are blocked if they contain secrets */ getOrgEnablementStatus(includeAllProperties?: boolean): Promise; /** * Update the status of Advanced Security for the organization * * @param {ManagementInterfaces.AdvSecEnablementSettingsUpdate} savedAdvSecEnablementStatus - The new status */ updateOrgEnablementStatus(savedAdvSecEnablementStatus: ManagementInterfaces.AdvSecEnablementSettingsUpdate): Promise; /** * Estimate the committers that would be added to the customer's usage if Advanced Security was enabled for this organization. * */ getEstimatedOrgBillablePushers(): Promise; /** * Get the current status of Advanced Security for a project * * @param {string} project - Project ID or project name * @param {boolean} includeAllProperties - When true, also determine if pushes are blocked if they contain secrets */ getProjectEnablementStatus(project: string, includeAllProperties?: boolean): Promise; /** * Update the status of Advanced Security for the project * * @param {ManagementInterfaces.AdvSecEnablementSettingsUpdate} savedAdvSecEnablementStatus - The new status * @param {string} project - Project ID or project name */ updateProjectEnablementStatus(savedAdvSecEnablementStatus: ManagementInterfaces.AdvSecEnablementSettingsUpdate, project: string): Promise; /** * Estimate the number of committers that would be added to the customer's usage if Advanced Security was enabled for this project. * * @param {string} project - Project ID or project name */ getEstimatedProjectBillablePushers(project: string): Promise; /** * Determine if Advanced Security is enabled for a repository * * @param {string} project - Project ID or project name * @param {string} repository - The name or ID of the repository * @param {boolean} includeAllProperties - When true, will also determine if pushes are blocked when secrets are detected */ getRepoEnablementStatus(project: string, repository: string, includeAllProperties?: boolean): Promise; /** * Update the enablement of Advanced Security for a repository * * @param {ManagementInterfaces.AdvSecEnablementStatusUpdate} savedAdvSecEnablementStatus - new status * @param {string} project - Project ID or project name * @param {string} repository - Name or ID of the repository */ updateRepoAdvSecEnablementStatus(savedAdvSecEnablementStatus: ManagementInterfaces.AdvSecEnablementStatusUpdate, project: string, repository: string): Promise; /** * Estimate the committers that would be added to the customer's usage if Advanced Security was enabled for this repository. * * @param {string} project - Project ID or project name * @param {string} repository - The name or ID of the repository */ getEstimatedRepoBillableCommitters(project: string, repository: string): Promise; }