import { ApplicationConsent, CreateUser, SetUserRole, SetUserRoleResponse, User, UserRole } from './types'; import { Availability } from './types/availabilities.types'; import { IPartnerCenterConfig } from './types/common.types'; import { CreateCustomer, Customer } from './types/customers.types'; import { Invoice } from './types/invoices.types'; import { OrderLineItem, OrderLineItemOptions, OrderResponse } from './types/orders.types'; import { Sku } from './types/sku.types'; import { Subscription } from './types/subscriptions.types'; import { LicenseUsage, LicenseAssignmentRequest, LicenseAssignmentResponse, UserLicenseAssignment } from './types/licenses.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; /** * Gets price sheet for market, default is US and nce license based * https://learn.microsoft.com/en-us/partner-center/developer/get-a-price-sheet * @param market - Market code * @param priceSheetView - Price sheet view * @returns Price sheet as a buffer - Which is either a csv or compressed csv */ getPriceSheet(market?: string, priceSheetView?: string): Promise; }