@c8y/ngx-components
Version:
Angular modules for Cumulocity IoT applications
47 lines • 2.32 kB
TypeScript
import { Router } from '@angular/router';
import { FetchClient, IFetchResponse, InventoryService } from '@c8y/client';
import { AlertService } from '@c8y/ngx-components';
import { OpcuaServer } from './opcua-server.interface';
import * as i0 from "@angular/core";
export 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<IFetchResponse>;
updateServer(server: OpcuaServer): Promise<any>;
removeServer(data: OpcuaServer): Promise<IFetchResponse>;
getKeystore(binaryId: string): Promise<import("@c8y/client").IResult<import("@c8y/client").IManagedObject>>;
uploadKeystore(file: File): Promise<import("@c8y/client").IResult<import("@c8y/client").IManagedObjectBinary>>;
updateKeystore(id: string, file: File): Promise<import("@c8y/client").IResult<import("@c8y/client").IManagedObjectBinary>>;
removeKeystore(id: string): Promise<import("@c8y/client").IResult<null>>;
getMoId(): string;
getId(): string;
getDeviceProtocol(id: string): Promise<IFetchResponse>;
updateDeviceProtocol(data: any): Promise<IFetchResponse>;
createDeviceProtocol(data: any): Promise<IFetchResponse>;
getServers(id: string): Promise<IFetchResponse>;
getServer(id: string): Promise<IFetchResponse>;
/**
* 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<IFetchResponse>;
private doesGatewayIdExist;
private doesIdExist;
private cleanUpPayload;
static ɵfac: i0.ɵɵFactoryDeclaration<OpcuaService, never>;
static ɵprov: i0.ɵɵInjectableDeclaration<OpcuaService>;
}
//# sourceMappingURL=opcuaService.d.ts.map