/** * Class LicensesClient */ import { AbstractRestfulClient, ExtraInformationType, Parameters } from '../abstractRestfulClient'; import { FindConfig, FindData, FindResult } from './entities/findResult'; import { ConfigFindResult, ConfigFindResultData, ConfigFindResultDataKeywords, ConfigFindResultDataSortParameters } from './entities/license/configFindResult'; import { LicenceFindDataFiltersParameters, LicenceFindDataKeywords, LicenceFindDataSortParameters } from './entities/license/licenseFindResult'; import { ActiveSeatsFindResultDataKeywords, ActiveSeatsFindResultDataSortParameters } from './entities/license/activeSeatsFindResult'; import { WarningFindResultDataKeywords, WarningFindResultDataSortParameters } from './entities/license/warningFindResult'; import { PriceFindResultDataKeywords, PriceFindResutDataSortParameters } from './entities/license/priceFindResult'; import { OfferFindResultDataFiltersParameters, OfferFindResultDataKeywords, OfferFindResultDataSortParameters } from './entities/offer/offerFindResult'; import { ActionFlagsFindResultDataKeywords, ActionFlagsFindResultDataSortParameters } from './entities/offer/actionFlagsFindResult'; import { PriceBandFindResultDataKeywords, PriceBandFindResultDataSortParameters } from './entities/offer/priceBandFindResult'; import { SecurityFindResultDataKeywords, SecurityFindResultDataSortParameters } from './entities/license/securityFindResult'; import { GetResult } from '../getResult'; import { LicenseGetFields } from './entities/getLicense/licenseGetResult'; import { GetLicenseResult } from './entities/getResult/getLicenseResult'; import { LicenceHistoryResult } from './entities/history/licenceHistoryResult'; import { UpgradeResult } from './entities/license/upgradeResult'; import { LicenseConversionSkuResult } from './entities/license/licenseConversionSkuResult'; import { CredentialsResult } from './entities/license/credentialsResult'; import { ScheduleTasksResult } from './entities/schedule/scheduleTasksResult'; import { CompanyTypeEnum, RateTypeEnum } from './entities/pricingRate/getPricingRateResult'; import { PartialResponse } from '../partialResponse'; import { BulkBodyArgument, SpecialPriceRateActive } from './types/bulkArguments'; import { EndCustomerOrganisationUnitDataKeywords, EndCustomerOrganizationUnitFiltersParameters, EndCustomerOrganizationUnitSortParameters } from './entities/endCustomerOrganizationUnit/endCustomerOrganizationUnitFindResult'; import { RatesDataKeywords, RatesFiltersParameters, RatesSortParameters } from './entities/rates/rateFindResult'; import { GetLicensePricingRateParameters, GetLicensePricingRateResponse } from './types/pricingRate'; import { ConsumptionDailyPrediction } from '../consumption'; import { GetScheduledTasksResult } from './entities/schedule/getScheduledTasksResult'; import { GetScheduleTaskResult } from './entities/schedule/getScheduleTaskResult'; import { LicenceCouponCodeHistoryResult } from './entities/history/licenceCouponCodeHistoryResult'; import { GetLicenseAttachmentsResult } from './entities/attachment/GetLicenseAttachmentsResult'; import { PostLicenseAttachmentResult } from './entities/attachment/PostLicenseAttachmentResult'; import { DynamicAttributesMappingResult } from './entities/license/dynamicMappingResult'; import { GetLateRenewableLicensesResult } from './entities/lateRenewalLicense/getLateRenewableLicensesResult'; import { ExecuteLateRenewPayload } from './entities/lateRenewalLicense/executeLateRenewPayload'; /** * Parameters passable to the request for refining search. */ export declare enum LicenseFindParameters { /** * The key for aggregation search query parameter (to request extra aggregation, which are not provided by default) */ DATA_AGGREGATION = "aggregations", /** * The key for comparisons */ DATA_COMPARE = "compare", /** * The key for keyword search query parameter (to search one string in all available search fields) */ DATA_KEYWORD = "keyword", /** * The key for keywords search query parameter (to search with a complex object) */ DATA_KEYWORDS = "keywords", /** * The key for filers search query parameter */ DATA_FILTERS = "filters", /** * The key for exclusion filers search query parameter */ DATA_EXCLUSION_FILTERS = "exclusionFilters", /** * The key for sort search query parameter */ DATA_SORT = "sort", /** * The key for highlight search query parameter */ DATA_HIGHLIGHT = "highlight", /** * Use this constant to sort in ascending direction */ SORT_ASCENDING = "asc", /** * Use this constant to sort in descending direction */ SORT_DESCENDING = "desc", /** * The key to search for keywords values */ KEYWORDS_VALUES = "values", /** * The key to specify the operator to use with the keywords values */ KEYWORDS_OPERATOR = "operator", /** * Use this operator to search for all keywords values specified */ OPERATOR_AND = "AND", /** * Use this operator to search for any keywords values specified */ OPERATOR_OR = "OR", /** * Use this operator to search for all keywords with values in the range specified (for date ranges) */ OPERATOR_BETWEEN = "BETWEEN", /** * Use this operator to search with a compare field Equal */ OPERATOR_EQ = "EQ", /** * Use this operator to search with a compare field Not Equal */ OPERATOR_NEQ = "NEQ", /** * Use this operator to search with a compare field Greater Than */ OPERATOR_GT = "GT", /** * Use this operator to search with a compare field Greater Than or Equal */ OPERATOR_GTE = "GTE", /** * Use this operator to search with a compare field Lower Than */ OPERATOR_LT = "LT", /** * Use this operator to search with a compare field Lower Than or Equal */ OPERATOR_LTE = "LTE", /** * Use this filter to compare 2 value with other filter like FILTERS_GTE / FILTERS_LT / FILTERS_LTE */ FILTERS_GT = "gt", /** * Use this filter to compare 2 value with other filter like FILTERS_GT / FILTERS_LT / FILTERS_LTE */ FILTERS_GTE = "gte", /** * Use this filter to compare 2 value with other filter like FILTERS_GT / FILTERS_GTE / FILTERS_LTE */ FILTERS_LT = "lt", /** * Use this filter to compare 2 value with other filter like FILTERS_GT / FILTERS_GTE / FILTERS_LT */ FILTERS_LTE = "lte" } export declare type BaseParameters = { license?: LicenseType; offer?: OfferType; endCustomerOrganizationUnit?: endCustomerOrganizationUnitType; rates?: RatesType; }; export declare type AttachFileToLicenseParameters = { name: string; fileEncoded: string; }; export declare type LicenseSortParameters = BaseParameters; export declare type LicenseCompareParameters = { [field: string]: unknown; }; export declare type LicenseFiltersParameters = BaseParameters; /** * List of keywords to search with. */ export declare type DataKeywords = { [LicenseFindParameters.KEYWORDS_OPERATOR]: LicenseFindParameters.OPERATOR_AND | LicenseFindParameters.OPERATOR_OR | LicenseFindParameters.OPERATOR_BETWEEN; [LicenseFindParameters.KEYWORDS_VALUES]: string[]; }; /** * Keywords parameters to pass to the request */ export declare type LicenseKeywordsParameters = { license?: LicenceFindDataKeywords; offer?: OfferFindResultDataKeywords; endCustomerOrganizationUnit?: EndCustomerOrganisationUnitDataKeywords; rates?: RatesDataKeywords; }; export declare type LicenseRawKeywordsParametersLicence = { [field: string]: DataKeywords | ActiveSeatsFindResultDataKeywords | ConfigFindResultDataKeywords | WarningFindResultDataKeywords | PriceFindResultDataKeywords | SecurityFindResultDataKeywords | undefined; }; export declare type LicenseRawKeywordsParametersOffer = { [field: string]: DataKeywords | ActionFlagsFindResultDataKeywords | PriceBandFindResultDataKeywords | undefined; }; export declare type SortParameters = LicenseFindParameters.SORT_ASCENDING | LicenseFindParameters.SORT_DESCENDING; export declare type LicenseRawSortParametersLicense = { [field: string]: SortParameters | ActiveSeatsFindResultDataSortParameters | ConfigFindResultDataSortParameters | WarningFindResultDataSortParameters | PriceFindResutDataSortParameters | SecurityFindResultDataSortParameters | undefined; }; export declare type LicenseRawSortParametersOffer = { [field: string]: SortParameters | ActionFlagsFindResultDataSortParameters | PriceBandFindResultDataSortParameters | undefined; }; export declare type LicenseRawSortParametersEndCustomerOrganizationUnit = { [field: string]: SortParameters | undefined; }; export declare type FiltersCompareValue = { [LicenseFindParameters.FILTERS_GT]?: string | number; [LicenseFindParameters.FILTERS_GTE]?: string | number; [LicenseFindParameters.FILTERS_LT]?: string | number; [LicenseFindParameters.FILTERS_LTE]?: string | number; }; export declare type FiltersParameters = string | string[] | number | number[] | boolean | FiltersCompareValue; export declare type LicenseRawCompareParameters = { [field: string]: unknown; }; export declare type LicenseRawFiltersParameters = { [field: string]: unknown; }; /** * Payload to pass the find request. Contains keyword(s), sort options, column filters and highlight option. */ export declare type LicenseFindPayload = { [LicenseFindParameters.DATA_AGGREGATION]?: string[]; [LicenseFindParameters.DATA_COMPARE]?: LicenseCompareParameters; [LicenseFindParameters.DATA_KEYWORD]?: string; [LicenseFindParameters.DATA_KEYWORDS]?: LicenseKeywordsParameters; [LicenseFindParameters.DATA_FILTERS]?: LicenseFiltersParameters; [LicenseFindParameters.DATA_EXCLUSION_FILTERS]?: LicenseFiltersParameters; [LicenseFindParameters.DATA_SORT]?: LicenseSortParameters; [LicenseFindParameters.DATA_HIGHLIGHT]?: boolean; }; export declare type LicenseFindRawPayload = { [LicenseFindParameters.DATA_AGGREGATION]?: string[]; [LicenseFindParameters.DATA_COMPARE]?: LicenseRawCompareParameters; [LicenseFindParameters.DATA_KEYWORD]?: string; [LicenseFindParameters.DATA_KEYWORDS]?: { license?: LicenseRawKeywordsParametersLicence; offer?: LicenseRawKeywordsParametersOffer; }; [LicenseFindParameters.DATA_FILTERS]?: LicenseRawFiltersParameters; [LicenseFindParameters.DATA_EXCLUSION_FILTERS]?: LicenseRawFiltersParameters; [LicenseFindParameters.DATA_SORT]?: { license?: LicenseRawSortParametersLicense; offer?: LicenseRawSortParametersOffer; }; [LicenseFindParameters.DATA_HIGHLIGHT]?: boolean; }; export declare type UpdateLicenseData = { [LicenseGetFields.COLUMN_FRIENDLY_NAME]?: string; [LicenseGetFields.COLUMN_SEATS]?: number; [LicenseGetFields.COLUMN_ORGANIZATION_UNIT_ID]?: number; } & ExtraInformationType; export declare type UpdateSeatsData = { [LicenseGetFields.COLUMN_SEATS]: number; } & ExtraInformationType; export declare type PutFriendlyName = { [LicenseGetFields.COLUMN_FRIENDLY_NAME]: string; } & ExtraInformationType; export declare type PutReactivate = ExtraInformationType; export declare type PutSuspend = ExtraInformationType; export declare type PutCancel = ExtraInformationType; export declare type PutCancelAutoRenew = ExtraInformationType; export declare type PutReactivateAutoRenew = ExtraInformationType; export declare type PutActivateRenewEst = ExtraInformationType; export declare type PostUpgrade = { sku: string; billingCycle: number; term: number; quantity: number; }; export declare enum SaveBillingCommentsInputFields { COLUMN_COMMENT_ONE = "comment1", COLUMN_COMMENT_TWO = "comment2", COLUMN_CUSTOM_FIELDS = "customFields" } export declare enum SaveSpecialBidInputFields { COLUMN_ARW_RATE_VALUE = "arwRateValue", COLUMN_MSP_RATE_VALUE = "mspRateValue" } export declare enum RewriteRateHistoryInputFields { COLUMN_COMPANY_TYPE = "companyType", COLUMN_DATE_END = "dateEnd", COLUMN_DATE_START = "dateStart", COLUMN_RATE_TYPE = "rateType", COLUMN_RATE = "rate" } export declare type SaveBillingCommentsInputType = { [SaveBillingCommentsInputFields.COLUMN_COMMENT_ONE]?: string | null; [SaveBillingCommentsInputFields.COLUMN_COMMENT_TWO]?: string | null; [SaveBillingCommentsInputFields.COLUMN_CUSTOM_FIELDS]?: Array<{ label: string; value: string; }>; }; export declare type DeleteScheduledTaskType = ExtraInformationType; export declare type ScheduleTasks = { coterminosityDate?: string; periodicity?: number; term?: number; seats?: number; executionDate: string; } & ExtraInformationType; export declare type UpdateScheduledTaskRequestType = Omit; export declare type LicensePricingRate = { rateType: RateTypeEnum; rateValue: number; applyOnNextBillingPeriod: boolean; }; export declare type GetLicensePricingRate = { orderItemId: number; companyType: CompanyTypeEnum; activeTime: SpecialPriceRateActive; }; export declare type SaveSpecialBidInputType = { [SaveSpecialBidInputFields.COLUMN_ARW_RATE_VALUE]: number; [SaveSpecialBidInputFields.COLUMN_MSP_RATE_VALUE]?: number; }; export declare type RewriteRateHistoryInputType = { [RewriteRateHistoryInputFields.COLUMN_COMPANY_TYPE]: CompanyTypeEnum; [RewriteRateHistoryInputFields.COLUMN_DATE_END]?: string; [RewriteRateHistoryInputFields.COLUMN_DATE_START]: string; [RewriteRateHistoryInputFields.COLUMN_RATE_TYPE]: string; [RewriteRateHistoryInputFields.COLUMN_RATE]: number; }; export declare class LicensesClient extends AbstractRestfulClient { /** * The base path of the API */ protected basePath: string; /** * The path of the Find endpoint */ private FIND_PATH; /** * The path of the Configs endpoint */ private CONFIGS_PATH; /** * The path of the Seats endpoint */ private SEATS_PATH; /** * The path of suspend endpoint */ private SUSPEND_PATH; /** * The path of reactivate endpoint */ private REACTIVATE_PATH; /** * The path of cancel endpoint */ private CANCEL_PATH; /** * The path of update friendlyName endpoint */ private UPDATE_FRIENDLYNAME_PATH; /** * The path of license history */ private GET_LICENSE_HISTORY_PATH; /** * The path of license coupon code history */ private GET_LICENSE_COUPON_CODE_HISTORY_PATH; /** * The path of cancel license auto-renew */ private CANCEL_AUTO_RENEW_PATH; /** * The path of reactivate license auto-renew */ private REACTIVATE_AUTO_RENEW_PATH; /** * The path of activate license renew extended service term */ private ACTIVATE_RENEW_EST_PATH; /** * The path of reactivate license auto-renew */ private UPGRADE_PATH; /** * The path to save the license order eavs */ private SAVE_BILLING_COMMENTS_PATH; /** * The path to save the license special bid */ private SAVE_SPECIAL_BID_PATH; /** * The path to rewrite the license rate history */ private REWRITE_RATE_HISTORY_PATH; /** * The path of license all available skus */ private GET_LICENSE_CONVERSION_SKU; /** * The path of license all existing skus */ private GET_LICENSE_EXISTING_CONVERSION_SKU; /** * The path to retrieve license credentials */ private GET_LICENSE_CREDENTIALS; /** * The path of schedule tasks on a license */ private SCHEDULE_TASKS_PATH; /** * The path to get/set pricing rate on a license */ private PRICING_RATE_PATH; /** * The path to get the pricing rate history on a license */ private PRICING_RATE_HISTORY_PATH; /** * The path to get the pricing rate scheduled on a license */ private PRICING_RATE_SCHEDULED_PATH; /** * The path to apply bulk action on license(s) */ private BULK_PATH; /** * Returns the raw result from the find endpoint call * * @param postData - Find payload * @param parameters - Extra parameters to pass * * @returns Promise\<{@link FindData}\> */ findRaw(postData?: LicenseFindRawPayload, parameters?: Parameters): Promise; /** * Searches for licenses and returns a FindResult to manipulate the results. * * @param postData - Find payload * @param perPage - Number of results per page * @param page - Page number to fetch * @param parameters - Extra parameters to pass * * @returns Promise\<{@link FindResult}\> * */ find(postData?: LicenseFindPayload, perPage?: number, page?: number, parameters?: Parameters): Promise; findAttachments(licenseReference: string, perPage?: number, page?: number, parameters?: Parameters): Promise>; attachFileToLicense(licenseReference: string, parameters: AttachFileToLicenseParameters): Promise>; removeLicenseAttachment(licenseReference: string, documentName: string): Promise; getScheduledTasks(licenseReference: string, parameters?: Parameters): Promise>; getConfigsRaw(reference: string): Promise; getConfigs(reference: string): AsyncGenerator; /** * @deprecated Use updateConfig instead */ updateConfigRaw(reference: string, config: ConfigFindResult): Promise; bulkAction(bulkData: BulkBodyArgument): Promise; updateConfig(reference: string, config: ConfigFindResult): Promise>; getLicense(licenseReference: string, parameters?: Parameters): Promise>; executeLateRenew(payload: ExecuteLateRenewPayload): Promise; getLateRenewableLicenses(parameters?: Parameters): Promise>; updateLicense(licenseReference: string, payload: UpdateLicenseData, parameters?: Parameters): Promise; updateSeats(licenseReference: string, putData: UpdateSeatsData, parameters?: Parameters): Promise; suspendLicense(licenseReference: string, payload?: PutSuspend, parameters?: Parameters): Promise; reactivateLicense(licenseReference: string, payload?: PutReactivate, parameters?: Parameters): Promise; cancelLicense(licenseReference: string, payload?: PutCancel, parameters?: Parameters): Promise; updateFriendlyName(licenseReference: string, putData: PutFriendlyName, parameters?: Parameters): Promise; getHistory(licenseReference: string, parameters?: Parameters): Promise>; getCouponCodeHistory(licenseReference: string, parameters?: Parameters): Promise>; cancelAutoRenew(licenseReference: string, payload?: PutCancelAutoRenew, parameters?: Parameters): Promise; reactivateAutoRenew(licenseReference: string, payload?: PutReactivateAutoRenew, parameters?: Parameters): Promise; activeRenewExtendedServiceTerm(licenseReference: string, payload?: PutActivateRenewEst, parameters?: Parameters): Promise; upgrade(licenseReference: string, payload: PostUpgrade, parameters?: Parameters): Promise>; upgradeToExisting(licenseReference: string, targetLicenseReference: string, quantity: number, parameters?: Parameters): Promise; saveBillingComments(licenseReference: string, payload: SaveBillingCommentsInputType, parameters?: Parameters): Promise; getConversionSku(licenseReference: string, parameters?: Parameters): Promise>; getExistingConversionSku(licenseReference: string, parameters?: Parameters): Promise>; getCredentials(licenseReference: string, parameters?: Parameters): Promise>; setPricingRate(licenseReference: string, payload: LicensePricingRate, parameters?: Parameters): Promise; getPriceRatesHistory(licenseReference: string, params?: GetLicensePricingRateParameters): Promise; getPriceRatesScheduled(licenseReference: string, params?: GetLicensePricingRateParameters): Promise; scheduleTasks(licenseReference: string, payload: ScheduleTasks, parameters?: Parameters): Promise>; updateScheduledTask(licenseReference: string, scheduledTaskId: number, payload: UpdateScheduledTaskRequestType, parameters?: Parameters): Promise; getScheduledTask(licenseReference: string, scheduledTaskId: number, parameters?: Parameters): Promise>; deleteScheduledTask(licenseReference: string, scheduledTaskId: number, parameters?: Parameters, payload?: DeleteScheduledTaskType): Promise; getLicenseDailyPredictions(licenseReference: string, parameters?: Parameters): Promise>; saveSpecialdBid(licenseReference: string, payload: SaveSpecialBidInputType, parameters?: Parameters): Promise; rewriteRateHistory(licenseReference: string, payload: RewriteRateHistoryInputType, parameters?: Parameters): Promise; private createFilters; private createKeywords; getLicenseDynamicAttributesMapping(parameters?: Parameters): Promise>; }