import basem = require('./ClientApiBases'); import VsoBaseInterfaces = require('./interfaces/common/VsoBaseInterfaces'); import ManagementInterfaces = require("./interfaces/ManagementInterfaces"); export interface IManagementApi extends basem.ClientApiBase { getRepoEnablementStatus2(project: string, repository: string, includeAllProperties?: boolean): Promise; updateRepoAdvSecEnablementStatus2(savedAdvSecEnablementStatus: ManagementInterfaces.RepoEnablementSettings, project: string, repository: string): Promise; createBillingSnapshot(meterUsage: ManagementInterfaces.MeterUsage): Promise; getBillableCommitterDetails(billingDate?: Date): Promise; getLastMeterUsage(): Promise; getMeterUsage(billingDate?: Date): Promise; createBillingSnapshot2(meterUsage: ManagementInterfaces.MeterUsageForPlan, plan: ManagementInterfaces.Plan): Promise; getBillableCommitterDetails2(plan: ManagementInterfaces.Plan, billingDate?: Date): Promise; getLastMeterUsage2(plan: ManagementInterfaces.Plan): Promise; getMeterUsage2(plan: ManagementInterfaces.Plan, billingDate?: Date): Promise; getOrgEnablementStatus(includeAllProperties?: boolean): Promise; updateOrgEnablementStatus(savedAdvSecEnablementStatus: ManagementInterfaces.AdvSecEnablementSettingsUpdate): Promise; getOrgEnablementStatus2(includeAllProperties?: boolean): Promise; updateOrgEnablementStatus2(orgEnablementSettings: ManagementInterfaces.OrgEnablementSettings): Promise; getEstimatedBillablePushersDetailsForOrg(): Promise; getEstimatedOrgBillablePushers(): Promise; getEstimatedBillablePushersDetailsForOrg2(plan: ManagementInterfaces.Plan): Promise; getProjectEnablementStatus(project: string, includeAllProperties?: boolean): Promise; updateProjectEnablementStatus(savedAdvSecEnablementStatus: ManagementInterfaces.AdvSecEnablementSettingsUpdate, project: string): Promise; getProjectEnablementStatus2(project: string, includeAllProperties?: boolean): Promise; updateProjectEnablementStatus2(projectEnablementSettings: ManagementInterfaces.ProjectEnablementSettings, project: string): Promise; getEstimatedBillablePushersDetailsForProject(project: string): Promise; getEstimatedBillablePushersForProject(project: string): Promise; getEstimatedBillablePushersDetailsForProject2(project: string, plan?: ManagementInterfaces.Plan): Promise; getRepoEnablementStatus(project: string, repository: string, includeAllProperties?: boolean): Promise; updateRepoAdvSecEnablementStatus(savedAdvSecEnablementStatus: ManagementInterfaces.AdvSecEnablementStatusUpdate, project: string, repository: string): Promise; getEstimatedBillableCommitersDetailsForRepo(project: string, repository: string): Promise; getEstimatedBillableCommittersForRepo(project: string, repository: string): Promise; getEstimatedRepoBillableCommittersDetails2(project: string, repository: string, plan?: ManagementInterfaces.Plan): Promise; } export declare class ManagementApi extends basem.ClientApiBase implements IManagementApi { constructor(baseUrl: string, handlers: VsoBaseInterfaces.IRequestHandler[], options?: VsoBaseInterfaces.IRequestOptions, userAgent?: string); /** * Determines if Code Security, Secret Protection, and their features are enabled for the 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 */ getRepoEnablementStatus2(project: string, repository: string, includeAllProperties?: boolean): Promise; /** * Update the enablement status of Code Security and Secret Protection, along with their respective features, for a given repository. * * @param {ManagementInterfaces.RepoEnablementSettings} savedAdvSecEnablementStatus - new status * @param {string} project - Project ID or project name * @param {string} repository - Name or ID of the repository */ updateRepoAdvSecEnablementStatus2(savedAdvSecEnablementStatus: ManagementInterfaces.RepoEnablementSettings, project: string, repository: 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; /** * 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.MeterUsageForPlan} meterUsage * @param {ManagementInterfaces.Plan} plan */ createBillingSnapshot2(meterUsage: ManagementInterfaces.MeterUsageForPlan, plan: ManagementInterfaces.Plan): Promise; /** * Get all billable committers details, including those not matched with a VSID. * * @param {ManagementInterfaces.Plan} plan - The plan to query. Plans supported: CodeSecurity and SecretProtection. This is a mandatory parameter. * @param {Date} billingDate - The date to query, or if not provided, today */ getBillableCommitterDetails2(plan: ManagementInterfaces.Plan, billingDate?: Date): Promise; /** * @param {ManagementInterfaces.Plan} plan */ getLastMeterUsage2(plan: ManagementInterfaces.Plan): Promise; /** * Get commiters used when calculating billing information. * * @param {ManagementInterfaces.Plan} plan - The plan to query. Plans supported: CodeSecurity and SecretProtection. This is a mandatory parameter. * @param {Date} billingDate - The date to query, or if not provided, today */ getMeterUsage2(plan: ManagementInterfaces.Plan, 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; /** * 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 */ getOrgEnablementStatus2(includeAllProperties?: boolean): Promise; /** * Update the status of Advanced Security for the organization * * @param {ManagementInterfaces.OrgEnablementSettings} orgEnablementSettings - The new status */ updateOrgEnablementStatus2(orgEnablementSettings: ManagementInterfaces.OrgEnablementSettings): Promise; /** * Estimate the pushers that would be added to the customer's usage if Advanced Security was enabled for this organization. * */ getEstimatedBillablePushersDetailsForOrg(): Promise; /** * Estimate the committers that would be added to the customer's usage if Advanced Security was enabled for this organization. * */ getEstimatedOrgBillablePushers(): Promise; /** * Estimate the pushers that would be added to the customer's usage if Advanced Security was enabled for this organization. * * @param {ManagementInterfaces.Plan} plan - The plan to query. */ getEstimatedBillablePushersDetailsForOrg2(plan: ManagementInterfaces.Plan): 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; /** * 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 */ getProjectEnablementStatus2(project: string, includeAllProperties?: boolean): Promise; /** * Update the status of Advanced Security for the project * * @param {ManagementInterfaces.ProjectEnablementSettings} projectEnablementSettings - The new status * @param {string} project - Project ID or project name */ updateProjectEnablementStatus2(projectEnablementSettings: ManagementInterfaces.ProjectEnablementSettings, project: string): Promise; /** * Estimate the pushers 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 */ getEstimatedBillablePushersDetailsForProject(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 */ getEstimatedBillablePushersForProject(project: string): Promise; /** * Estimate the pushers 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 * @param {ManagementInterfaces.Plan} plan */ getEstimatedBillablePushersDetailsForProject2(project: string, plan?: ManagementInterfaces.Plan): 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 */ getEstimatedBillableCommitersDetailsForRepo(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 */ getEstimatedBillableCommittersForRepo(project: string, repository: string): Promise; /** * Estimate the pushers 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 * @param {ManagementInterfaces.Plan} plan - The plan to query. */ getEstimatedRepoBillableCommittersDetails2(project: string, repository: string, plan?: ManagementInterfaces.Plan): Promise; }