import * as i1 from '@c8y/ngx-components'; import { NavigatorNodeFactory, NavigatorNode, AlertService, ProductExperienceEventSource, ModalLabels, ProductExperienceEvent, ISelectModalObject, Column, ActionControl, ServerSideDataCallback, DataGridService, ModalService, DataSourceModifier, ServerSideDataResult, ManagedObjectRealtimeService, ForOfFilterPipe, OperationRealtimeService } from '@c8y/ngx-components'; import * as i0 from '@angular/core'; import { EventEmitter, OnInit } from '@angular/core'; import * as _c8y_client from '@c8y/client'; import { IManagedObject, InventoryService, OperationService, IResultList, IOperation } from '@c8y/client'; import * as i2 from '@c8y/ngx-components/repository/shared'; import { RepositoryService, FilterCriteria, RepositoryType } from '@c8y/ngx-components/repository/shared'; import { Subject, Observable, BehaviorSubject } from 'rxjs'; import * as i3 from '@angular/router'; import { ActivatedRoute, Router, ActivatedRouteSnapshot } from '@angular/router'; import * as i4 from 'ngx-bootstrap/dropdown'; import * as i5 from 'ngx-bootstrap/tooltip'; import * as i6 from '@angular/forms'; import * as i7 from 'ngx-bootstrap/buttons'; import * as i8 from 'ngx-bootstrap/popover'; import * as i9 from '@c8y/ngx-components/operations/operation-details'; import { BsModalService, BsModalRef } from 'ngx-bootstrap/modal'; import { TranslateService } from '@ngx-translate/core'; declare class DeviceProfileNavigationFactory implements NavigatorNodeFactory { nodeItem: NavigatorNode; get(): Promise; static ɵfac: i0.ɵɵFactoryDeclaration; static ɵprov: i0.ɵɵInjectableDeclaration; } interface DeviceProfile extends Partial { name?: string; type: string; c8y_Filter: { type?: string; }; c8y_DeviceProfile: { firmware?: DeviceProfileFirmware; software?: DeviceProfileSoftware[]; configuration?: DeviceProfileConfiguration[]; }; } interface DeviceProfileFirmware { name: string; version: string; url: string; isPatch: boolean; patchDependency?: string; } interface DeviceProfileSoftware { name: string; softwareType: string; version: string; url: string; action: string; } interface DeviceProfileConfiguration { url: string; name: string; type: string; } interface ComparisonResult { profile: { itemName: string; itemDetails?: string; itemType?: string; itemUrl: string; }; device: { itemName: string; itemDetails?: string; itemType?: string; itemUrl: string; }; comparisonAlert?: string; } declare enum DeviceProfileOperation { APPLY_PROFILE = "c8y_DeviceProfile" } declare const PRODUCT_EXPERIENCE_DEVICE_PROFILE: { readonly EVENTS: { readonly REPOSITORY: "deviceProfileRepository"; readonly DEVICE_TAB: "deviceProfileTab"; }; readonly COMPONENTS: { readonly DEVICE_PROFILE_LIST: "device-profile-list"; readonly ADD_DEVICE_PROFILE: "add-device-profile"; readonly DEVICE_PROFILE: "device-profile"; readonly DEVICE_TAB_PROFILE: "device-tab-profile"; }; readonly ACTIONS: { readonly CANCEL: "cancel"; readonly CREATE: "create"; readonly REMOVE: "remove"; readonly ADD: "add"; readonly SAVE: "save"; readonly ASSIGN_DEVICE_PROFILE: "assignDeviceProfile"; }; readonly RESULTS: { readonly ADD_SOFTWARE: "addSoftware"; }; readonly FRAGMENTS: { readonly FIRMWARE: "firmware"; readonly SOFTWARE: "software"; readonly CONFGIURATION: "configuration"; }; }; declare class DeviceProfileService { private inventoryService; private operationService; private alertService; readonly dateFrom: Date; readonly dateTo: Date; private queriesUtil; private NOT_INSTALLED_WARNING; private VERSION_MISSMATCH_WARNING; private SAME_URL_WARNING; constructor(inventoryService: InventoryService, operationService: OperationService, alertService: AlertService); createDeviceProfile(deviceProfile: Partial): Promise<_c8y_client.IResult>; /** * Determines the available device profiles for a given device by considering device type * and the supported software types declared by the devices. Because of limitations in the * Inventory Query API the methods return profile that contain at least one of the supported * software types and omits profiles having only non-supported software types. Resulting device * profiles need to be further filtered on the client side to exclude the ones that contain * non-supported software types next to the supported ones. * * @param device A device MO * @param name Optional device profile name filter * @returns Candidate device profiles that contain at least on software with supported type. */ getDeviceProfilesByDevice(device: IManagedObject, name?: string): Promise>; /** * @deprecated Use `getDeviceProfilesByDevice` instead as it also considers the supported software types. */ getDeviceProfilesByDeviceType(deviceType: string): Promise>; getDeviceProfiles(andQuery?: any): Promise>; getProfileOperation(deviceId: string | number): Promise; createProfileOperation(device: IManagedObject, deviceProfile: Partial): Promise; getFirmwareItems(device: IManagedObject, selectedProfile: Partial): ComparisonResult[]; getSoftwareItems(device: IManagedObject, selectedProfile: Partial): ComparisonResult[]; getConfigurationItems(device: IManagedObject, selectedProfile: Partial): ComparisonResult[]; /** * Aligns device profile managed object's `softwareType!*` fragments to the software items * included in the device profile. Removes obsolete software type fragments and adds new. * * @param profilePartial The device profile managed object which `softwareType!*` fragments will be adjusted. * @returns The adjusted device profile managed object. */ alignSoftwareTypeFragments(profilePartial: Partial, profile: DeviceProfile): Partial; getSoftwareTypes(profile: DeviceProfile): string[]; private getAlert; private createProfileComparison; private createProfileComparisonFromDeviceItems; private extendProfileComparisonWithProfileItems; static ɵfac: i0.ɵɵFactoryDeclaration; static ɵprov: i0.ɵɵInjectableDeclaration; } declare class SelectConfigurationModalComponent implements ProductExperienceEventSource { private repositoryService; PRODUCT_EXPERIENCE: { readonly SOFTWARE: { readonly EVENTS: { readonly REPOSITORY: "softwareRepository"; readonly DEVICE_TAB: "deviceSoftware"; }; readonly COMPONENTS: { readonly ADD_SOFTWARE_MODAL: "add-software-modal"; readonly DEVICE_SOFTWARE_CHANGES: "device-software-changes"; readonly DEVICE_SOFTWARE_LIST: "device-software-list"; }; readonly ACTIONS: { readonly APPLY_SOFTWARE_CHANGES: "applySoftwareChanges"; readonly CLEAR_SOFTWARE_CHANGES: "clearSoftwareChanges"; readonly OPEN_INSTALL_SOFTWARE: "openInstallSoftwareModal"; readonly OPEN_UPDATE_SOFTWARE: "openUpdateSoftwareModal"; readonly DELETE_SOFTWARE: "deleteSoftware"; }; readonly RESULTS: { readonly ADD_SOFTWARE: "addSoftware"; readonly ADD_SOFTWARE_VERSION: "addSoftwareVersion"; readonly EDIT_SOFTWARE: "editSoftware"; }; }; readonly FIRMWARE: { readonly EVENTS: { readonly REPOSITORY: "firmwareRepository"; readonly DEVICE_TAB: "deviceFirmware"; }; readonly COMPONENTS: { readonly ADD_FIRMWARE_MODAL: "add-firmware-modal"; readonly ADD_FIRMWAR_PATCH_MODAL: "add-firmware-patch-modal"; readonly FIRMWARE_DEVICE_TAB: "firmware-device-tab"; readonly DEVICE_FIRMWARE_LIST: "device-firmware-list"; }; readonly ACTIONS: { readonly OPEN_INSTALL_FIRMWARE_DIALOG: "openInstallFirmwareDialog"; readonly OPEN_REPLACE_FIRMWARE_DIALOG: "openReplaceFirmwareDialog"; readonly OPEN_INSTALL_FIRMWARE_PATCH_DIALOG: "openInstallFirmwarePatchDialog"; }; readonly RESULTS: { readonly ADD_FIRMWARE: "addFirmware"; readonly ADD_FIRMWARE_VERSION: "addFirmwareVersion"; readonly ADD_FIRMWARE_PATCH: "addFirmwarePatch"; readonly EDIT_FIRMWARE: "editFirmware"; readonly CREATE_FIRMWARE_UPDATE_OPERATION: "createFirmwareUpdateOperation"; }; }; readonly SHARED: { readonly COMPONENTS: { readonly REPOSITORY_SELECT_MODAL: "repository-select-modal"; readonly SELECT_CONFIGURATION_MODAL: "select-configuration-modal"; }; }; }; title: string; load: Subject; configurations: Observable; resultEmitter: EventEmitter; selected: any[]; deviceTypeQuery: any; searchQuery: any; labels: ModalLabels; productExperienceEvent: ProductExperienceEvent; private queriesUtil; constructor(repositoryService: RepositoryService); search(searchTerm: any): void; result(selectedItems: any): void; getItems(): Promise<_c8y_client.IResultList>; aggregate(mos: IManagedObject[]): ISelectModalObject[]; static ɵfac: i0.ɵɵFactoryDeclaration; static ɵcmp: i0.ɵɵComponentDeclaration; } declare class DeviceProfileComponent implements OnInit, ProductExperienceEventSource { private route; private alertService; private inventoryService; private bsModal; private repositoryService; private deviceProfileService; DEVICE_TYPE_POPOVER: "The device profile will be available for assignments on devices of the specified type. Otherwise, it will be available for all device types."; DEVICE_TYPE_DISABLED_POPOVER: "Device type cannot be changed on profiles with already defined firmware, software or configuration since they may not be applicable to devices of the new device type."; PRODUCT_EXPERIENCE: { readonly EVENTS: { readonly REPOSITORY: "deviceProfileRepository"; readonly DEVICE_TAB: "deviceProfileTab"; }; readonly COMPONENTS: { readonly DEVICE_PROFILE_LIST: "device-profile-list"; readonly ADD_DEVICE_PROFILE: "add-device-profile"; readonly DEVICE_PROFILE: "device-profile"; readonly DEVICE_TAB_PROFILE: "device-tab-profile"; }; readonly ACTIONS: { readonly CANCEL: "cancel"; readonly CREATE: "create"; readonly REMOVE: "remove"; readonly ADD: "add"; readonly SAVE: "save"; readonly ASSIGN_DEVICE_PROFILE: "assignDeviceProfile"; }; readonly RESULTS: { readonly ADD_SOFTWARE: "addSoftware"; }; readonly FRAGMENTS: { readonly FIRMWARE: "firmware"; readonly SOFTWARE: "software"; readonly CONFGIURATION: "configuration"; }; }; deviceProfile: DeviceProfile; profileName: string; productExperienceEvent: ProductExperienceEvent; private queriesUtil; constructor(route: ActivatedRoute, alertService: AlertService, inventoryService: InventoryService, bsModal: BsModalService, repositoryService: RepositoryService, deviceProfileService: DeviceProfileService); ngOnInit(): Promise; addFirmware(): void; getRepositoryEntriesWithVersions$(searchTerm$: BehaviorSubject, repoType: RepositoryType): Observable; getAndAssignRepositoryBinaries(mos: IManagedObject[]): IManagedObject[]; addConfiguration(): void; addSoftware(): void; get isDeviceProfileEmpty(): boolean; removeItem(removedItem: any, category: any): void; removeFirmware(): void; updateDeviceProfile(partialDeviceProfile: any): Promise; private getDeviceProfile; private getDeviceTypeQuery; static ɵfac: i0.ɵɵFactoryDeclaration; static ɵcmp: i0.ɵɵComponentDeclaration; } declare class DeviceProfileListComponent implements OnInit { private repositoryService; private gridService; private modalService; private bsModalService; private translateService; private alertService; private router; private activatedRoute; private deviceProfileService; sizeRequest: Promise; sizeRequestDone: boolean; refresh$: EventEmitter; isDataPresent$: Observable; columns: Column[]; actionControls: ActionControl[]; serverSideDataCallback: ServerSideDataCallback; pagination: { pageSize: number; currentPage: number; }; productExperienceEvent: ProductExperienceEvent; noResultsMessage: "No results to display."; noDataMessage: "No device profiles to display."; noResultsSubtitle: "Refine your search terms or check your spelling."; noDataSubtitle: "Add a new device profile by clicking below."; constructor(repositoryService: RepositoryService, gridService: DataGridService, modalService: ModalService, bsModalService: BsModalService, translateService: TranslateService, alertService: AlertService, router: Router, activatedRoute: ActivatedRoute, deviceProfileService: DeviceProfileService); ngOnInit(): void; onDataSourceModifier(dataSourceModifier: DataSourceModifier): Promise; editDeviceProfile(deviceProfile: Partial): void; createDeviceProfile(): Promise; duplicateDeviceProfile(deviceProfile: any): Promise; deleteDeviceProfile(deviceProfile: any): Promise; trackByName(_index: any, column: Column): string; private delete; static ɵfac: i0.ɵɵFactoryDeclaration; static ɵcmp: i0.ɵɵComponentDeclaration; } declare class AddDeviceProfileComponent implements ProductExperienceEventSource { private modal; private deviceProfileService; DEVICE_TYPE_POPOVER: "The device profile will be available for assignments on devices of the specified type. Otherwise, it will be available for all device types."; PRODUCT_EXPERIENCE: { readonly EVENTS: { readonly REPOSITORY: "deviceProfileRepository"; readonly DEVICE_TAB: "deviceProfileTab"; }; readonly COMPONENTS: { readonly DEVICE_PROFILE_LIST: "device-profile-list"; readonly ADD_DEVICE_PROFILE: "add-device-profile"; readonly DEVICE_PROFILE: "device-profile"; readonly DEVICE_TAB_PROFILE: "device-tab-profile"; }; readonly ACTIONS: { readonly CANCEL: "cancel"; readonly CREATE: "create"; readonly REMOVE: "remove"; readonly ADD: "add"; readonly SAVE: "save"; readonly ASSIGN_DEVICE_PROFILE: "assignDeviceProfile"; }; readonly RESULTS: { readonly ADD_SOFTWARE: "addSoftware"; }; readonly FRAGMENTS: { readonly FIRMWARE: "firmware"; readonly SOFTWARE: "software"; readonly CONFGIURATION: "configuration"; }; }; deviceProfile: Partial; result: Promise; productExperienceEvent: ProductExperienceEvent; private _save; private _cancel; constructor(modal: BsModalRef, deviceProfileService: DeviceProfileService); create(): Promise; close(): void; static ɵfac: i0.ɵɵFactoryDeclaration; static ɵcmp: i0.ɵɵComponentDeclaration; } declare class DeviceTabProfileComponent implements OnInit, ProductExperienceEventSource { deviceRealtime: ManagedObjectRealtimeService; private deviceProfileService; private route; private operationRealtime; private alertService; PRODUCT_EXPERIENCE: { readonly EVENTS: { readonly REPOSITORY: "deviceProfileRepository"; readonly DEVICE_TAB: "deviceProfileTab"; }; readonly COMPONENTS: { readonly DEVICE_PROFILE_LIST: "device-profile-list"; readonly ADD_DEVICE_PROFILE: "add-device-profile"; readonly DEVICE_PROFILE: "device-profile"; readonly DEVICE_TAB_PROFILE: "device-tab-profile"; }; readonly ACTIONS: { readonly CANCEL: "cancel"; readonly CREATE: "create"; readonly REMOVE: "remove"; readonly ADD: "add"; readonly SAVE: "save"; readonly ASSIGN_DEVICE_PROFILE: "assignDeviceProfile"; }; readonly RESULTS: { readonly ADD_SOFTWARE: "addSoftware"; }; readonly FRAGMENTS: { readonly FIRMWARE: "firmware"; readonly SOFTWARE: "software"; readonly CONFGIURATION: "configuration"; }; }; device: IManagedObject; deviceProfiles$: Observable>; selectedProfile: Partial; operation: IOperation; firmwareItems: ComparisonResult[]; softwareItems: ComparisonResult[]; configurationItems: ComparisonResult[]; filterPipe: ForOfFilterPipe; pattern$: BehaviorSubject; reload$: BehaviorSubject; productExperienceEvent: ProductExperienceEvent; private destroyRef; constructor(deviceRealtime: ManagedObjectRealtimeService, deviceProfileService: DeviceProfileService, route: ActivatedRoute, operationRealtime: OperationRealtimeService, alertService: AlertService); ngOnInit(): Promise; getDeviceProfilesAndUpdateProfileItems(): Promise; selectProfile(mo: DeviceProfile): void; createOperation(): Promise; updateProfileItems(device: any, profile: any): void; private subscribeToManagedObjects; private subscribeToOperations; private toProfileForDevice; static ɵfac: i0.ɵɵFactoryDeclaration; static ɵcmp: i0.ɵɵComponentDeclaration; } declare class DeviceTabProfileDetailComponent { sectionTitle: string; sectionIcon: string; emptyStateText: string; emptyStateDetails: string; isProfileSelected: boolean; isEmpty: boolean; items: ComparisonResult[]; showTextLabel: boolean; static ɵfac: i0.ɵɵFactoryDeclaration; static ɵcmp: i0.ɵɵComponentDeclaration; } declare class DeviceProfileItemListComponent { icon: string; comparisonResults: ComparisonResult[]; showProfileItems: boolean; showTextLabel: boolean; static ɵfac: i0.ɵɵFactoryDeclaration; static ɵcmp: i0.ɵɵComponentDeclaration; } declare class DeviceProfileModule { static ɵfac: i0.ɵɵFactoryDeclaration; static ɵmod: i0.ɵɵNgModuleDeclaration; static ɵinj: i0.ɵɵInjectorDeclaration; } declare class DeviceProfileGuard { canActivate(route: ActivatedRouteSnapshot): boolean; private hasSupportedOperation; static ɵfac: i0.ɵɵFactoryDeclaration; static ɵprov: i0.ɵɵInjectableDeclaration; } export { AddDeviceProfileComponent, DeviceProfileComponent, DeviceProfileGuard, DeviceProfileItemListComponent, DeviceProfileListComponent, DeviceProfileModule, DeviceProfileNavigationFactory, DeviceProfileOperation, DeviceProfileService, DeviceTabProfileComponent, DeviceTabProfileDetailComponent, PRODUCT_EXPERIENCE_DEVICE_PROFILE, SelectConfigurationModalComponent }; export type { ComparisonResult, DeviceProfile, DeviceProfileConfiguration, DeviceProfileFirmware, DeviceProfileSoftware }; //# sourceMappingURL=index.d.ts.map