@c8y/ngx-components
Version:
Angular modules for Cumulocity IoT applications
34 lines • 1.31 kB
TypeScript
import { IManagedObject } from '@c8y/client';
import { ExportedAsset, ImportedAsset } from './shared-helpers';
/**
* Interface for any configuration that has a device property
*/
export interface ConfigWithAsset {
device?: IManagedObject | null;
[key: string]: any;
}
/**
* Configuration with exported asset information
*/
export type ExportedConfigWithAsset<T extends ConfigWithAsset = ConfigWithAsset> = Omit<T, 'device'> & {
device?: ExportedAsset | null;
};
/**
* Configuration with imported asset information
*/
export type ImportedConfigWithAsset<T extends ConfigWithAsset = ConfigWithAsset> = Omit<T, 'device'> & {
device?: ImportedAsset | null;
};
/**
* Check if a configuration has a valid device property
*/
export declare function hasAssetProperty(config: any): config is ConfigWithAsset;
/**
* Exports a configuration with asset information enriched for export
*/
export declare function exportConfigWithDevice<T extends ConfigWithAsset>(config: T): Promise<ExportedConfigWithAsset<T>>;
/**
* Imports a configuration with asset information adapted to the current context
*/
export declare function importConfigWithDevice<T extends ConfigWithAsset>(config: ExportedConfigWithAsset<T>): Promise<ImportedConfigWithAsset<T>>;
//# sourceMappingURL=device-import-export.d.ts.map