import { ApplicationConsent, Availability, CreateCustomer, CreateUser, Customer, Invoice, IPartnerCenterConfig, LicenseAssignmentRequest, LicenseAssignmentResponse, LicenseUsage, OfferMatrixEntry, OrderLineItem, OrderLineItemOptions, OrderResponse, PlanIdentifierEntry, PriceSheetEntry, PriceType, SetUserRole, SetUserRoleResponse, Sku, Subscription, User, UserLicenseAssignment, UserRole } from './types'; import { MicrosoftApiBase } from './microsoft-api-base'; export declare class MicrosoftPartnerCenter extends MicrosoftApiBase { constructor(config: IPartnerCenterConfig); getAllCustomers(): Promise; getInvoices(): Promise; getInvoicePDF(invoiceID: string): Promise; getCustomerById(customerId: string): Promise; getCustomerSubscriptions(customerId: string): Promise; getCustomerSubscriptionById(customerId: string, subscriptionId: string): Promise; getCustomerSubscriptionByOfferId(customerId: string, offerId: string): Promise; createCustomer(data: CreateCustomer): Promise; createCustomerUser(customerId: string, data: CreateUser): Promise; getAllCustomerUsers(customerId: string): Promise; deleteCustomerUser(customerId: string, userId: string): Promise; getCustomerUserById(customerId: string, userId: string): Promise; getCustomerUserByPrincipalName(customerId: string, principalName: string): Promise; getCustomerUserRoles(customerId: string, userId: string): Promise; setCustomerUserPassword(customerId: string, userId: string, password: string, forceChangePassword: boolean): Promise; setCustomerUserRole(customerId: string, roleId: string, data: SetUserRole): Promise; /** * Assigns licenses to a user * https://learn.microsoft.com/en-us/partner-center/developer/assign-licenses-to-a-user * @param customerId * @param userId * @param licenses * @returns */ assignLicensesToCustomerUser(customerId: string, userId: string, licenses: LicenseAssignmentRequest): Promise; /** * Gets licenses assigned to a user * https://learn.microsoft.com/en-us/partner-center/developer/check-which-licenses-are-assigned-to-a-user * @param customerId * @param userId * @returns */ getCustomerUserLicenseAssignments(customerId: string, userId: string): Promise; updateCustomerSubscriptionUsers(customerId: string, subscriptionId: string, usersQuantity: number): Promise; updateCustomerSubscription(customerId: string, subscriptionId: string, subscription: Partial): Promise; createOrder(customerId: string, billingCycle: 'monthly' | 'annual', lineItems: OrderLineItem[]): Promise; /** * This method creates an order for the first SKU and first availability found for the given product id (NCE) */ createOrderByProductId(customerId: string, productId: string, quantity: number, billingCycle: 'monthly' | 'annual', options?: OrderLineItemOptions): Promise; getSkusByCustomer(customerId: string, productId: string): Promise; getSkuById(customerId: string, productId: string, skuId: string): Promise; getAvailabilitiesByCustomer(customerId: string, productId: string, sku: string): Promise; /** * Creates an application consent * https://learn.microsoft.com/en-us/partner-center/developer/control-panel-vendor-apis#acquire-consent * @param customerId * @param applicationConsent * @returns */ createApplicationConsent(customerId: string, applicationConsent: ApplicationConsent): Promise; /** * Removes an application consent * https://learn.microsoft.com/en-us/partner-center/developer/control-panel-vendor-apis#remove-consent * @param customerId * @param applicationConsentId */ removeApplicationConsent(customerId: string, applicationConsentId: string): Promise; /** * Gets License usage and availability for a customer * https://learn.microsoft.com/en-us/partner-center/developer/get-a-list-of-available-licenses * @param customerId * @returns */ getCustomerLicenseUsage(customerId: string): Promise; /** * Retrieves the price sheet entries for the specified price type. * * @param {PriceType} type - The type of the price sheet to retrieve. Must be a valid key present in the PriceTypeMap. * @param market * @return {Promise} A promise that resolves to an array of PriceSheetEntry objects. * @throws {Error} If the provided price type is invalid or not found in PriceTypeMap. */ getPriceSheet(type: PriceType, market?: string): Promise; /** * Retrieves the offer matrix for the current month from the Microsoft Partner Center API. * The offer matrix provides detailed sales data specific to the authenticated partner. * * @return {Promise} A promise that resolves to an array of offer matrix entries. */ getOfferMatrix(): Promise; /** * Fetches plan identifiers from a remote CSV file and parses the content into a list of plan identifier entries. * * @return {Promise} A promise that resolves to an array of plan identifier entries parsed from the CSV file. */ getPlanIdentifiers(): Promise; /** * Retrieves sales items from the Microsoft Partner API for the specified path, unzips the response, * and returns parsed JSON * * @param {string} path - The endpoint path to fetch sales items from. * @return {Promise} A promise that resolves to an array of sales item objects of type T. */ private getSalesItem; }