@eclipse-ditto/ditto-javascript-client-dom
Version:
DOM implementation of Eclipse Ditto JavaScript API to be used in browsers.
95 lines • 3.31 kB
TypeScript
/*!
* Copyright (c) 2019 Contributors to the Eclipse Foundation
*
* See the NOTICE file(s) distributed with this work for additional
* information regarding copyright ownership.
*
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License 2.0 which is available at
* http://www.eclipse.org/legal/epl-2.0
*
* SPDX-License-Identifier: EPL-2.0
*/
import { EntityModel, EntityWithId, IndexedEntityModel } from './model';
/**
* Representation of a Thing
*/
export declare class Thing extends EntityWithId {
private readonly _thingId;
private readonly _policyId?;
private readonly _attributes?;
private readonly _features?;
private readonly __revision?;
private readonly __modified?;
private readonly _definition?;
private readonly __metadata?;
private readonly __created?;
static readonly NAMESPACE_SEPARATION_REGEX: RegExp;
constructor(_thingId: string, _policyId?: string | undefined, _attributes?: Record<string, any> | undefined, _features?: Features | undefined, __revision?: number | undefined, __modified?: string | undefined, _definition?: string | undefined, __metadata?: Metadata | undefined, __created?: string | undefined);
/**
* Parses a Thing.
*
* @param o - The object to parse.
* @returns The Thing
*/
static fromObject(o: any): Thing;
static empty(): Thing;
toObject(): object;
get thingId(): string;
get id(): string;
get policyId(): string | undefined;
get attributes(): object | undefined;
get features(): Features | undefined;
get _modified(): string | undefined;
get _revision(): number | undefined;
get _metadata(): Metadata | undefined;
get namespace(): string;
get name(): string;
get definition(): string | undefined;
get _created(): string | undefined;
private separateNamespaceAndThingId;
}
/**
* Representation of Features
*/
export declare class Features extends IndexedEntityModel<Feature> {
[featureId: string]: Feature;
/**
* Parses Features.
*
* @param o - The object to parse.
* @returns The Features
*/
static fromObject(o: any): Features;
}
export declare class Metadata extends EntityModel {
private readonly _attributes?;
private readonly _features?;
constructor(_attributes?: Record<string, any> | undefined, _features?: Features | undefined);
get attributes(): Record<string, any> | undefined;
get features(): Features | undefined;
static fromObject(o: any): Metadata;
toObject(): Object | undefined;
}
/**
* Representation of a Feature
*/
export declare class Feature extends EntityWithId {
private readonly _id;
private readonly _definition?;
private readonly _properties?;
constructor(_id: string, _definition?: string[] | undefined, _properties?: Record<string, any> | undefined);
/**
* Parses a Feature.
*
* @param o - The object to parse.
* @param key - The key of the new Feature.
* @returns The Feature
*/
static fromObject(o: any, key: string): Feature;
toObject(): object;
get id(): string;
get definition(): string[] | undefined;
get properties(): Record<string, any> | undefined;
}
//# sourceMappingURL=things.model.d.ts.map