import * as i0 from '@angular/core'; import { EventEmitter, ElementRef, OnInit, OnChanges, ChangeDetectorRef, OnDestroy, DestroyRef, SimpleChanges, QueryList, Injector } from '@angular/core'; import * as _c8y_client from '@c8y/client'; import { FetchClient, InventoryService, IFetchResponse, IOperation, OperationService, IManagedObject } from '@c8y/client'; import { Observable, BehaviorSubject, Subscription } from 'rxjs'; import * as i5 from '@angular/router'; import { Router } from '@angular/router'; import * as i1 from '@c8y/ngx-components'; import { AlertService, ContextRouteComponent, DropAreaComponent, ModalService, DroppedFile, OperationRealtimeService, AppStateService } from '@c8y/ngx-components'; import * as i2 from '@angular/forms'; import { Validator, AbstractControl, FormGroup, NgForm, NgModelGroup } from '@angular/forms'; import * as i3 from 'ngx-bootstrap/buttons'; import * as i4 from '@angular/cdk/tree'; import { NestedTreeControl } from '@angular/cdk/tree'; import * as i6 from 'ngx-bootstrap/tooltip'; import * as i7 from 'ngx-bootstrap/popover'; import * as i8 from '@c8y/ngx-components/operations/operation-details'; import * as i9 from '@angular/platform-browser/animations'; import * as i10 from 'ngx-bootstrap/collapse'; import * as i11 from 'ngx-bootstrap/dropdown'; import * as i12 from '@c8y/ngx-components/device-protocol-object-mappings'; import { BaseObjectMapping, MeasurementObjectMapping, EventObjectMapping, AlarmObjectMapping } from '@c8y/ngx-components/device-protocol-object-mappings'; import * as packages_client_lib from 'packages/client/lib'; import { TranslateService } from '@ngx-translate/core'; import { FormlyFieldConfig } from '@ngx-formly/core'; import { CollectionViewer, SelectionChange } from '@angular/cdk/collections'; import { UpgradeComponent } from '@angular/upgrade/static'; declare class AddressSpaceService { private nodeNavigationData$; private client; private microserviceUrl; private header; constructor(fetchClient: FetchClient); resetTreeToRootNode(): void; triggerNodeToOpen(nodeNavigationData: NodeNavigationData): void; getNodeNavData$(): Observable; getNode(serverId: string, nodeId?: string): Promise<_c8y_client.IFetchResponse>; getRootNode(serverId: string): Promise<_c8y_client.IFetchResponse>; getNodeById(serverId: string, nodeId: string): Promise<_c8y_client.IFetchResponse>; getChildrenOf(node: AddressSpaceNode, serverId: string): Promise<_c8y_client.IFetchResponse>; childrenAvailable(nodeReferences: AdressSpaceNodeReference[]): boolean; getSearchedNodes(searchKey: string, serverId: string): Promise; getIcon(nodeClassName: string): any; static ɵfac: i0.ɵɵFactoryDeclaration; static ɵprov: i0.ɵɵInjectableDeclaration; } interface AddressSpaceNode { nodeId: string; currentlyLoadingChildren?: boolean; nodeClass?: number; nodeClassName?: string; browseName?: string; displayName?: string; description?: any; references?: AdressSpaceNodeReference[]; ancestorNodeIds?: [string[]]; children: AddressSpaceNode[]; expanded: boolean; absolutePaths: [string[]]; relativePath?: string[]; parentNode?: AddressSpaceNode; } interface AdressSpaceNodeReference { referenceId: string; targetId: string; inverse: boolean; hierarchical: boolean; } interface SearchedNode { absolutePath: string[]; ancestorNodeIds: [string[]]; displayName: string; nodeClassName: string; nodeId: string; } interface NodeNavigationData { node: AddressSpaceNode; selectedAncestorIds: string[]; } declare class OpcuaAddressSpaceDetailComponent { private addressSpaceService; set node(n: any); nodeDataAttr: Map; nodeDataRef: object[]; selected: boolean; showDetails: boolean; toggleAttrDetail: EventEmitter; private _node; constructor(addressSpaceService: AddressSpaceService); setNodeData(nodeData: any): void; toggleDetail(node: any): void; navigateTo(ancestors: string[]): void; static ɵfac: i0.ɵɵFactoryDeclaration; static ɵcmp: i0.ɵɵComponentDeclaration; } declare const NEW_SERVER_ID = "new"; interface OpcuaServer { name: string; id: string; gatewayId?: string; subtitle?: string; connectionStatus?: any; enabeled?: any; config: OpcuaServerConfig; quickInfo?: { padlock?: string; padlockMsg?: string; }; active: true | false; } interface OpcuaServerConfig { securityMode: string; keystorePass?: any; keystoreFilename?: string; keystoreBinaryId?: any; certificatePass?: any; userIdentityMode?: string; serverUrl?: string; userName?: string; userPassword?: string; passwordEncrypted?: boolean; rescanCron?: any; timeout?: number; autoReconnect?: boolean; targetConnectionState?: 'enabled' | 'disabled' | null; statusCheckInterval?: number; valid?: boolean; autoScanAddressSpace?: boolean; partialAddressScanNodeIds?: Array; partialAddressScan?: boolean; } declare class OpcuaService { private client; private inventoryService; private router; private alertService; private binaryService; private microserviceUrlDepr; private microserviceUrl; private deviceTypeProtocolUrl; private header; constructor(client: FetchClient, inventoryService: InventoryService, router: Router, alertService: AlertService); createServer(data: OpcuaServer): Promise; updateServer(server: OpcuaServer): Promise; removeServer(data: OpcuaServer): Promise; getKeystore(binaryId: string): Promise<_c8y_client.IResult<_c8y_client.IManagedObject>>; uploadKeystore(file: File): Promise<_c8y_client.IResult<_c8y_client.IManagedObjectBinary>>; updateKeystore(id: string, file: File): Promise<_c8y_client.IResult<_c8y_client.IManagedObjectBinary>>; removeKeystore(id: string): Promise<_c8y_client.IResult>; getMoId(): string; getId(): string; getDeviceProtocol(id: string): Promise; updateDeviceProtocol(data: any): Promise; createDeviceProtocol(data: any): Promise; getServers(id: string): Promise; getServer(id: string): Promise; /** * Checks the response for errors and throws exceptions, otherwise returns the response as is. * * @param response The response from server. * * @returns If no errors are detected, it returns the same response. * * @throws If an error is detected, it throws `{ res, data }`, where `data` contains error details from server. */ protected handleErrorStatusCodes(response: IFetchResponse): Promise; private doesGatewayIdExist; private doesIdExist; private cleanUpPayload; static ɵfac: i0.ɵɵFactoryDeclaration; static ɵprov: i0.ɵɵInjectableDeclaration; } interface OpcuaDeviceTypeMappingObject { id?: number; browsePath?: string[]; } interface OpcuaDeviceType { id?: any; name: string; fieldbusType?: string; fieldbusVersion?: number; description?: string; unit?: string; referencedServerId: string; referencedRootNodeId: string; subscriptionType: { type: string; cyclicReadParameters?: { rate: number; }; subscriptionParameters?: { samplingRate?: number; deadbandType?: string; deadbandValue?: number; ranges?: string; queueSize?: number; }; }; mappings?: OpcuaDeviceTypeMappingObject[]; overriddenSubscriptions?: any; applyConstraints: AutoApplyConstraints; enabled: string; } interface AutoApplyConstraints { browsePathMatchesRegex: string; serverObjectHasFragment: string; matchesNodeIds: string[]; matchesServerIds: string[]; } declare class OpcuaAgentGuard { type: string; canActivate({ data }: { data: any; }): boolean; static ɵfac: i0.ɵɵFactoryDeclaration; static ɵprov: i0.ɵɵInjectableDeclaration; } declare class OpcuaDeviceProtocolBrowsePathValidation implements Validator { private el; getMappings: () => []; model: any; constructor(el: ElementRef); validate(control: AbstractControl): { [key: string]: any; }; isValidJson(value: any): boolean; toArray(str: any): any; isBrowsePathUnique(value: any): boolean; static ɵfac: i0.ɵɵFactoryDeclaration; static ɵdir: i0.ɵɵDirectiveDeclaration; } declare class OpcuaServersComponent implements OnInit { private opcuaService; private alertService; private translateService; private context; serverObjectList: OpcuaServer[]; initialServerObject: OpcuaServer; server: OpcuaServer; active: boolean; private moId; constructor(opcuaService: OpcuaService, alertService: AlertService, translateService: TranslateService, context: ContextRouteComponent); ngOnInit(): Promise; localServerObjectExist(): boolean; addServer(): void; onSaved(server: OpcuaServer): void; onUpdated(server: OpcuaServer): void; reloadTabs(): void; onCanceled(server: OpcuaServer): void; onRemoved(server: OpcuaServer): void; getKeystore(binaryId: string): Promise; onPresent(server: OpcuaServer, overridePresent?: boolean): Promise; private createServer; private updateServer; private removeServer; private removeServerObjectListById; private updateServerObjectListById; private setQuickInfo; static ɵfac: i0.ɵɵFactoryDeclaration; static ɵcmp: i0.ɵɵComponentDeclaration; } declare class OpcuaServerListComponent { serverList: OpcuaServer[]; present: EventEmitter; presentConfig(server: OpcuaServer): void; static ɵfac: i0.ɵɵFactoryDeclaration; static ɵcmp: i0.ɵɵComponentDeclaration; } declare class OpcuaServerConfigComponent implements OnInit, OnChanges { private opcuaService; private modalService; private alertService; private readonly changeDetectorRef; currentSecMode: string; fileName: string; targetConnectionState: string; minIntervalNumber: number; connectionStatusLabel: string; autoScanAddressSpace: string; advancedSettings: boolean; advancedSettingsForm: FormGroup<{}>; advancedSettingsFields: FormlyFieldConfig[]; isNew: i0.WritableSignal; set opcuaConfigForm(opcuaConfigForm: NgForm); dropArea: DropAreaComponent; canceled: EventEmitter; removed: EventEmitter; saved: EventEmitter; updated: EventEmitter; set server(server: OpcuaServer); get server(): OpcuaServer; model: OpcuaServer; changePassword: boolean; initialPasswordRequired: boolean; securityModes: string[]; authenticationMode: any; authenticationModes: any[]; NONE: string; SIGN: string; SIGN_ENC: string; securityPolicies: any; private ANONYM; private USER_PASSWORD; private KEY_BASED; private _server; private initialKeystore; private keystore; private authSwitch; private opcuaConfigFormValueChange$; private opcuaConfigFormChangesSubscribed; private destroyRef; constructor(opcuaService: OpcuaService, modalService: ModalService, alertService: AlertService, changeDetectorRef: ChangeDetectorRef); ngOnInit(): Promise; ngOnChanges(): void; ngAfterViewChecked(): void; cancel(): void; remove(): Promise; save(): Promise; uploadFile(droppedFiles: DroppedFile[]): void; setPolicy(data: any): void; setServerConnection(data: string): void; updateAuthentication(data: any): void; updateConnectionStatusLabel(server: any): void; setNewPassword(): void; toggleChangePassword(): void; private uploadKeystore; private removeKeystore; private resetUserAuthentication; private resetKeyBasedAuthentication; private restoreUserData; private restoreKeyBasedData; private getServerConfig; private setCurrentSecurityMode; private setCurrentAuthenticationMode; private getModelConfig; private getAdvancedSettingsFields; static ɵfac: i0.ɵɵFactoryDeclaration; static ɵcmp: i0.ɵɵComponentDeclaration; } declare class DynamicDataSource { treeControl: NestedTreeControl; private addressSpaceService; private serverId; dataChange: BehaviorSubject; get data(): AddressSpaceNode[]; set data(value: AddressSpaceNode[]); constructor(treeControl: NestedTreeControl, addressSpaceService: AddressSpaceService, serverId: string); connect(collectionViewer: CollectionViewer): Observable; /** Handle expand/collapse behaviors */ handleTreeControl(change: SelectionChange): void; /** * Toggle the node, remove from display list */ toggleNode(addressSpaceNode: AddressSpaceNode, expand: boolean): Promise; catch(): void; private refreshNestedTree; private triggerResize; } declare class OpcuaAddressSpaceComponent implements OnInit, OnDestroy { private addressSpaceService; private opcuaService; private operationService; private operationRealtimeService; private alert; private modalService; currentNode: AddressSpaceNode; selectednode: boolean; searchKey: string; isSearch: boolean; loading: boolean; searchInProgress: boolean; filterLabel: string; dataSource: DynamicDataSource; nodeList: any; operation?: IOperation; isOperationRunning: i0.WritableSignal; destroyRef: DestroyRef; focusStatus: EventEmitter; private moId; constructor(addressSpaceService: AddressSpaceService, opcuaService: OpcuaService, operationService: OperationService, operationRealtimeService: OperationRealtimeService, alert: AlertService, modalService: ModalService); ngOnInit(): Promise; getRunningScanAddressSpaceOperation(): Promise; ngOnDestroy(): void; searchNodes(): Promise; clearNodeListAndCheckSearchString(): void; clearSearch(): void; getIcon(nodeClassName: string): any; selectNode(node: any): Promise; toggleCurrentNode(node: AddressSpaceNode): void; backHandler(node: any): void; isNodeSet(node: AddressSpaceNode): boolean; rescanAddressSpace(): Promise; createConfigurationAwareScanAdressSpaceOperation(config: OpcuaServerConfig): Promise; static ɵfac: i0.ɵɵFactoryDeclaration; static ɵcmp: i0.ɵɵComponentDeclaration; } declare class OpcuaAddressSpaceTreeComponent implements OnInit, OnDestroy, OnChanges { private addressSpaceService; private opcuaService; private alertService; set moId(id: string); node: any; focusEmitter: EventEmitter; selectedNode: EventEmitter; nestedTreeControl: NestedTreeControl; dataSource: DynamicDataSource; focused: AddressSpaceNode; loading: boolean; subscriptionRef: Subscription; nodeNavDataSubscription: Subscription; private _moId; private destroy$; constructor(addressSpaceService: AddressSpaceService, opcuaService: OpcuaService, alertService: AlertService); getChildren: (node: AddressSpaceNode) => AddressSpaceNode[]; hasChild: (_: number, _nodeData: AddressSpaceNode) => boolean; ngOnInit(): void; ngOnChanges(changes: SimpleChanges): void; initializeDataSet(): void; ngOnDestroy(): void; openNode(nodeNavData: NodeNavigationData): Promise; setChildNodes(nodes: AddressSpaceNode[], ids: string[]): void; setupTree(nodeId?: string): Promise; getMoId(): string; getIcon(nodeClassName: any): any; toggleFocusedNode(node: any): void; isFocusedNode(node: AddressSpaceNode): boolean; private getRelativePath; static ɵfac: i0.ɵɵFactoryDeclaration; static ɵcmp: i0.ɵɵComponentDeclaration; } declare class OpcuaDeviceProtocolDescription { _model: any; autoScan: string; set model(_model: any); private moId; setAutoScanOption(data: string): void; static ɵfac: i0.ɵɵFactoryDeclaration; static ɵcmp: i0.ɵɵComponentDeclaration; } declare class OpcuaCustomActionObjectMapping extends BaseObjectMapping { constructor(); } declare class OpcuaMeasurementObjectMapping extends MeasurementObjectMapping { protected smallFormGroup: boolean; constructor(smallFormGroup?: boolean); } declare class OpcuaEventObjectMapping extends EventObjectMapping { protected smallFormGroup: boolean; constructor(smallFormGroup?: boolean); } declare class OpcuaAlarmObjectMapping extends AlarmObjectMapping { protected smallFormGroup: boolean; constructor(smallFormGroup?: boolean); } declare class OpcuaDeviceProtocolMapping implements OnInit, OnChanges { private addressSpaceService; subFormRef: NgModelGroup; browsePathModel: any; _model: any; index: any; getParentAttr: any; referencedServerId: any; referencedRootNodeId: any; onAction: EventEmitter; mapping: any; isDetailOpen: any; referencedNode: any; isPathFocused: boolean; groupName: string; browsePath: string; nodeDisplayName: string; isBrowsePathUniq: boolean; dataReporting: string; isTreeOpen: boolean; isNew: boolean; resetModel: boolean; dataReportingName: any; mappingTypes: (typeof OpcuaCustomActionObjectMapping | typeof OpcuaMeasurementObjectMapping | typeof OpcuaEventObjectMapping | typeof OpcuaAlarmObjectMapping)[]; private objectMappingState; constructor(addressSpaceService: AddressSpaceService); toggleDetail(): void; getMappings: () => any; ngOnInit(): void; ngOnChanges(changes: SimpleChanges): void; onMappingUpdate({ dirty, valid }: { dirty: boolean; valid: boolean; touched?: boolean; }): void; initialFormSetup(): void; showAddressSpaceTree(): boolean; ngAfterViewInit(): void; mapHeadersObjectToList(headers: any): { key: string; value: any; }[]; stringfyBrowsePath(path: any): string; updateBrowsePath(node: any): void; updateDisplayname(): void; updateBrowsePathInput(): void; save(): void; cancel(): void; onDelete(): void; canSave({ valid, dirty }: { valid: any; dirty: any; }): boolean; isActive(): any; setTreeFromRefNode(): void; updateSubscriptionType(value: any): void; static ɵfac: i0.ɵɵFactoryDeclaration; static ɵcmp: i0.ɵɵComponentDeclaration; } declare class OpcuaDeviceProtocolDetailComponent implements OnInit { private changeDetectorRef; private opcuaService; private alertService; private router; instanceList: QueryList; initialModel: OpcuaDeviceType; model: any; server: any; selectedNode: any; isLoaded: boolean; constructor(changeDetectorRef: ChangeDetectorRef, opcuaService: OpcuaService, alertService: AlertService, router: Router); ngAfterContentChecked(): void; getParentAttr: (key: any) => any; getMapping(): any; getEmptyMappingObject(): { id: number; browsePath: any[]; }; getOverriddenSubscriptionsByPath(browsePath: string[]): any; getStructuredResource(resource: any): any; ngOnInit(): Promise; updateViableMapping(model: any): any; trackById(_index: number, el: any): number; addVariable(): void; updateVariable(mappingObject: any): void; removeVariable(mappingObject: any): void; actionHandler(actionObject: any): void; extractOverridSubscriptionType(_mapping: any): any[][]; prepareRequestJson(_model: any): {}; save(): Promise; canSave(deviceTypeForm: any): boolean; static ɵfac: i0.ɵɵFactoryDeclaration; static ɵcmp: i0.ɵɵComponentDeclaration; } declare class OpcuaDeviceProtocolDataReportingComponent { set model(_model: any); groupName: any; _model: object; onSubscriptionChange: EventEmitter; subscription: { type: string; }; subscriptionParameters: { samplingRate: any; deadbandType: string; deadbandValue: any; ranges: string; queueSize: any; dataChangeTrigger: string; discardOldest: boolean; }; cyclicReadParameters: { rate: any; }; types: any[]; filters: any[]; triggers: any[]; discard: any[]; requireCyclic: boolean; requireSubscription: boolean; subscriptionTypeName: string; parseReadingInterval: ($event: any) => number; updateModel(): void; static ɵfac: i0.ɵɵFactoryDeclaration; static ɵcmp: i0.ɵɵComponentDeclaration; } declare class OpcuaDeviceProtocolObjectMappingStatus extends UpgradeComponent { mapping: any; constructor(elementRef: ElementRef, injector: Injector); static ɵfac: i0.ɵɵFactoryDeclaration; static ɵdir: i0.ɵɵDirectiveDeclaration; } declare class OpcuaAutoApplySettingsComponent implements OnInit { private inventoryService; opcuaServers: IManagedObject[]; selectedItems: IManagedObject[]; filteredList: IManagedObject[]; checked: {}; readonly sizeToShowFilter: number; constraints: AutoApplyConstraints; placeholderSelectServerIds: string; showServerIds: boolean; showBrowsePath: boolean; showServerFragment: boolean; showRootNodes: boolean; updateSelectedItem: EventEmitter; private _model; constructor(inventoryService: InventoryService); ngOnInit(): Promise; set model(model: IManagedObject); get model(): IManagedObject; serverIdsSelected(items: IManagedObject[]): void; onChangeNodeId(event: any): void; onChangeShowServerIds(event: any): void; onChangeShowBrowsePath(event: any): void; onChangeShowServerFragment(event: any): void; add(): void; remove(index: any): void; trackByFn(index: any, _item: any): any; updateConstraints(items: any): void; filterItems(filterText: any): void; isChecked(item: any): any; onSelect(selected: any, item: any): void; static ɵfac: i0.ɵɵFactoryDeclaration; static ɵcmp: i0.ɵɵComponentDeclaration; } declare class OpcuaProtocolModule { static ɵfac: i0.ɵɵFactoryDeclaration; static ɵmod: i0.ɵɵNgModuleDeclaration; static ɵinj: i0.ɵɵInjectorDeclaration; } declare class OpcuaMicroserviceGuard { private app; microserviceName: string; checkApp: Promise; constructor(app: AppStateService); canActivate(): Promise; static ɵfac: i0.ɵɵFactoryDeclaration; static ɵprov: i0.ɵɵInjectableDeclaration; } declare class OpcuaServerGuard { type: string; canActivate({ data }: { data: any; }): boolean; static ɵfac: i0.ɵɵFactoryDeclaration; static ɵprov: i0.ɵɵInjectableDeclaration; } declare const ng1ModulesOPCUA: string[]; export { AddressSpaceService, DynamicDataSource, NEW_SERVER_ID, OpcuaAddressSpaceComponent, OpcuaAddressSpaceDetailComponent, OpcuaAddressSpaceTreeComponent, OpcuaAgentGuard, OpcuaAutoApplySettingsComponent, OpcuaDeviceProtocolBrowsePathValidation, OpcuaDeviceProtocolDataReportingComponent, OpcuaDeviceProtocolDescription, OpcuaDeviceProtocolDetailComponent, OpcuaDeviceProtocolMapping, OpcuaDeviceProtocolObjectMappingStatus, OpcuaMicroserviceGuard, OpcuaProtocolModule, OpcuaServerConfigComponent, OpcuaServerGuard, OpcuaServerListComponent, OpcuaServersComponent, OpcuaService, ng1ModulesOPCUA }; export type { AddressSpaceNode, AdressSpaceNodeReference, AutoApplyConstraints, NodeNavigationData, OpcuaDeviceType, OpcuaDeviceTypeMappingObject, OpcuaServer, OpcuaServerConfig, SearchedNode }; //# sourceMappingURL=index.d.ts.map