@mindconnect/mindconnect-nodejs
Version:
MindConnect Library for NodeJS (community based)
846 lines (845 loc) • 19.5 kB
TypeScript
export declare namespace EventManagementModels {
/**
*
* @export
* @interface BaseEvent
*/
interface BaseEvent {
/**
* Unique identifier of the event
* @type {string}
* @memberof BaseEvent
*/
id?: string;
/**
* Unique identifier of the event type (filterable, not updatable)
* @type {string}
* @memberof BaseEvent
*/
typeId?: string;
/**
* Correlation ID of the event. It can be used to group related events (filterable, not updatable)
* @type {string}
* @memberof BaseEvent
*/
correlationId?: string;
/**
* Timestamp attached to the event in UTC format (filterable, not updatable)
* @type {string}
* @memberof BaseEvent
*/
timestamp: string;
/**
* Entity attached to the event (filterable, not updatable)
* @type {string}
* @memberof BaseEvent
*/
entityId: string;
/**
* Incremental counter for optimistic concurrency control
* @type {number}
* @memberof BaseEvent
*/
etag?: number;
/**
*
* @type {BaseEventLinks}
* @memberof BaseEvent
*/
_links?: BaseEventLinks;
}
/**
*
* @export
* @interface BaseEventLinks
*/
interface BaseEventLinks {
/**
*
* @type {RelSelf}
* @memberof BaseEventLinks
*/
self?: RelSelf;
}
/**
* Details about an event within a bulk create job
* @export
* @interface CreateEventDetailedDescription
*/
interface CreateEventDetailedDescription {
/**
* created event resource or the input event in case of failure
* @type {string}
* @memberof CreateEventDetailedDescription
*/
event?: string;
/**
* status code of event creation
* @type {string}
* @memberof CreateEventDetailedDescription
*/
resultCode?: string;
/**
* details about failing event creation
* @type {string}
* @memberof CreateEventDetailedDescription
*/
errorMessage?: string;
}
/**
*
* @export
* @interface CreateEventsJob
*/
interface CreateEventsJob {
/**
* - List of events to create
* @type {Array<CustomEvent>}
* @memberof CreateEventsJob
*/
events: Array<CustomEvent>;
}
/**
* Details about the job in case of FINISHED and FINISHED_WITH_ERROR
* @export
* @interface CreateJobDetails
*/
interface CreateJobDetails {
/**
*
* @type {Array<CreateEventDetailedDescription>}
* @memberof CreateJobDetails
*/
resultDescription?: Array<CreateEventDetailedDescription>;
}
/**
*
* @export
* @interface CreateJobResource
*/
interface CreateJobResource extends JobResource {
/**
*
* @type {CreateJobDetails}
* @memberof CreateJobResource
*/
details?: CreateJobDetails;
}
/**
* @export
* @namespace CreateJobResource
*/
namespace CreateJobResource { }
/**
*
* @export
* @interface CustomEvent
*/
interface CustomEvent extends BaseEvent {
}
/**
*
* @export
* @interface CustomEventCreated
*/
interface CustomEventCreated extends BaseEvent {
}
/**
*
* @export
* @interface DeleteEventsJob
*/
interface DeleteEventsJob {
/**
* - The `timestamp` property can be filtered by `before`, `after` and `between` functions. - At least `typeId` property must be provided in filter expression. - Multiple `typeId` expressions (by using and, or logical operators) in filter parameter is not allowed. Only equality function is supported on it. - Negation of `typeId` in filter expression is not allowed.
* @type {any}
* @memberof DeleteEventsJob
*/
filter: any;
}
/**
* Details about the job in case of FINISHED and FINISHED_WITH_ERROR
* @export
* @interface DeleteJobDetails
*/
interface DeleteJobDetails {
/**
* status code describes the job's execution result
* @type {string}
* @memberof DeleteJobDetails
*/
resultCode?: string;
/**
* information about - how many events deleted or - what error happened
* @type {string}
* @memberof DeleteJobDetails
*/
resultDescription?: string;
}
/**
*
* @export
* @interface DeleteJobResource
*/
interface DeleteJobResource extends JobResource {
/**
*
* @type {DeleteJobDetails}
* @memberof DeleteJobResource
*/
details?: DeleteJobDetails;
}
/**
* @export
* @namespace DeleteJobResource
*/
namespace DeleteJobResource { }
/**
*
* @export
* @interface Errors
*/
interface Errors extends Array<ErrorsInner> {
}
/**
*
* @export
* @interface ErrorsInner
*/
interface ErrorsInner {
/**
*
* @type {string}
* @memberof ErrorsInner
*/
logref?: string;
/**
*
* @type {string}
* @memberof ErrorsInner
*/
message?: string;
}
/**
*
* @export
* @interface EventType
*/
interface EventType {
/**
* ID of the created event type
* @type {string}
* @memberof EventType
*/
id?: string;
/**
* Name of the event type
* @type {string}
* @memberof EventType
*/
name: string;
/**
* Parent event type ID
* @type {string}
* @memberof EventType
*/
parentId?: string;
/**
* Time to live in days
* @type {number}
* @memberof EventType
*/
ttl?: number;
/**
*
* @type {number}
* @memberof EventType
*/
etag?: number;
/**
* The owner who created the event type
* @type {string}
* @memberof EventType
*/
owner?: string;
/**
* Scope of the event type
* @type {string}
* @memberof EventType
*/
scope?: EventType.ScopeEnum;
/**
*
* @type {Array<Field>}
* @memberof EventType
*/
fields?: Array<Field>;
/**
*
* @type {EventTypeLinks}
* @memberof EventType
*/
_links?: EventTypeLinks;
}
/**
* @export
* @namespace EventType
*/
namespace EventType {
/**
* @export
* @enum {string}
*/
enum ScopeEnum {
LOCAL,
GLOBAL
}
}
/**
*
* @export
* @interface EventTypeLinks
*/
interface EventTypeLinks {
/**
*
* @type {RelSelf}
* @memberof EventTypeLinks
*/
self?: RelSelf;
/**
*
* @type {RelEvents}
* @memberof EventTypeLinks
*/
events?: RelEvents;
}
/**
*
* @export
* @interface EventTypePatch
*/
interface EventTypePatch {
/**
* Type of the operation to be made
* @type {string}
* @memberof EventTypePatch
*/
op: EventTypePatch.OpEnum;
/**
* Identifying a specific attribute/field whereon the operation should be made
* @type {string}
* @memberof EventTypePatch
*/
path: string;
/**
* New value for the given attribute or the field, that should be added, depending on the *op* value
* @type {string}
* @memberof EventTypePatch
*/
value: string;
}
/**
* @export
* @namespace EventTypePatch
*/
namespace EventTypePatch {
/**
* @export
* @enum {string}
*/
enum OpEnum {
Add,
Replace
}
}
/**
*
* @export
* @interface Field
*/
interface Field {
/**
*
* @type {string}
* @memberof Field
*/
name: string;
/**
*
* @type {boolean}
* @memberof Field
*/
filterable?: boolean;
/**
*
* @type {boolean}
* @memberof Field
*/
required?: boolean;
/**
*
* @type {boolean}
* @memberof Field
*/
updatable?: boolean;
/**
* Note that the LINK type is not a plain HREF. The value for the LINK type should be given between quotation marks.
* @type {string}
* @memberof Field
*/
type: Field.TypeEnum;
/**
* This field is applicable only if the field's type is ENUM, otherwise it should be skipped. The values must be strings.
* @type {Array<string>}
* @memberof Field
*/
values?: Array<string>;
}
/**
* @export
* @namespace Field
*/
namespace Field {
/**
* @export
* @enum {string}
*/
enum TypeEnum {
STRING,
INTEGER,
DOUBLE,
BOOLEAN,
LINK,
TIMESTAMP,
UUID,
ENUM
}
}
/**
*
* @export
* @interface InlineResponse200
*/
interface InlineResponse200 {
/**
*
* @type {InlineResponse200Self}
* @memberof InlineResponse200
*/
self?: InlineResponse200Self;
/**
*
* @type {InlineResponse200Events}
* @memberof InlineResponse200
*/
events?: InlineResponse200Events;
/**
*
* @type {InlineResponse200EventTypes}
* @memberof InlineResponse200
*/
eventTypes?: InlineResponse200EventTypes;
/**
*
* @type {InlineResponse200DeleteEventsJobs}
* @memberof InlineResponse200
*/
deleteEventsJobs?: InlineResponse200DeleteEventsJobs;
/**
*
* @type {InlineResponse200CreateEventsJobs}
* @memberof InlineResponse200
*/
createEventsJobs?: InlineResponse200CreateEventsJobs;
}
interface Billboard extends InlineResponse200 {
}
/**
*
* @export
* @interface InlineResponse2001
*/
interface InlineResponse2001 {
/**
*
* @type {InlineResponse2001Embedded}
* @memberof InlineResponse2001
*/
_embedded?: InlineResponse2001Embedded;
/**
*
* @type {PagingLinks}
* @memberof InlineResponse2001
*/
_links?: PagingLinks;
/**
*
* @type {Page}
* @memberof InlineResponse2001
*/
page?: Page;
}
interface EmbeddedEventsList extends InlineResponse2001 {
}
/**
*
* @export
* @interface InlineResponse2001Embedded
*/
interface InlineResponse2001Embedded {
/**
*
* @type {Array<MindsphereStandardEvent>}
* @memberof InlineResponse2001Embedded
*/
events?: Array<MindsphereStandardEvent>;
}
/**
*
* @export
* @interface InlineResponse2002
*/
interface InlineResponse2002 {
/**
*
* @type {InlineResponse2002Embedded}
* @memberof InlineResponse2002
*/
_embedded?: InlineResponse2002Embedded;
}
/**
*
* @export
* @interface InlineResponse2002Embedded
*/
interface InlineResponse2002Embedded {
/**
*
* @type {Array<EventType>}
* @memberof InlineResponse2002Embedded
*/
eventTypes?: Array<EventType>;
/**
*
* @type {PagingLinks}
* @memberof InlineResponse2002Embedded
*/
_links?: PagingLinks;
/**
*
* @type {Page}
* @memberof InlineResponse2002Embedded
*/
page?: Page;
}
interface EmbeddedEventsTypesList extends InlineResponse2002 {
}
/**
*
* @export
* @interface InlineResponse200CreateEventsJobs
*/
interface InlineResponse200CreateEventsJobs {
/**
*
* @type {string}
* @memberof InlineResponse200CreateEventsJobs
*/
href?: string;
/**
*
* @type {boolean}
* @memberof InlineResponse200CreateEventsJobs
*/
templated?: boolean;
}
/**
*
* @export
* @interface InlineResponse200DeleteEventsJobs
*/
interface InlineResponse200DeleteEventsJobs {
/**
*
* @type {string}
* @memberof InlineResponse200DeleteEventsJobs
*/
href?: string;
/**
*
* @type {boolean}
* @memberof InlineResponse200DeleteEventsJobs
*/
templated?: boolean;
}
/**
*
* @export
* @interface InlineResponse200EventTypes
*/
interface InlineResponse200EventTypes {
/**
*
* @type {string}
* @memberof InlineResponse200EventTypes
*/
href?: string;
/**
*
* @type {boolean}
* @memberof InlineResponse200EventTypes
*/
templated?: boolean;
}
/**
*
* @export
* @interface InlineResponse200Events
*/
interface InlineResponse200Events {
/**
*
* @type {string}
* @memberof InlineResponse200Events
*/
href?: string;
/**
*
* @type {boolean}
* @memberof InlineResponse200Events
*/
templated?: boolean;
}
/**
*
* @export
* @interface InlineResponse200Self
*/
interface InlineResponse200Self {
/**
*
* @type {string}
* @memberof InlineResponse200Self
*/
href?: string;
}
/**
*
* @export
* @interface JobResource
*/
interface JobResource {
/**
* Unique identifier of the job
* @type {string}
* @memberof JobResource
*/
id?: string;
/**
* State of the job
* @type {string}
* @memberof JobResource
*/
state?: JobResource.StateEnum;
}
/**
* @export
* @namespace JobResource
*/
namespace JobResource {
/**
* @export
* @enum {string}
*/
enum StateEnum {
ACCEPTED,
INPROGRESS,
FINISHED,
FINISHEDWITHERROR
}
}
/**
*
* @export
* @interface MindsphereStandardEvent
*/
interface MindsphereStandardEvent extends BaseEvent {
/**
*
* @type {number}
* @memberof MindsphereStandardEvent
*/
severity?: number;
/**
*
* @type {string}
* @memberof MindsphereStandardEvent
*/
description?: string;
/**
*
* @type {string}
* @memberof MindsphereStandardEvent
*/
code?: string;
/**
*
* @type {string}
* @memberof MindsphereStandardEvent
*/
source?: string;
/**
*
* @type {boolean}
* @memberof MindsphereStandardEvent
*/
acknowledged?: boolean;
}
/**
*
* @export
* @interface Page
*/
interface Page {
/**
*
* @type {number}
* @memberof Page
*/
size?: number;
/**
*
* @type {number}
* @memberof Page
*/
totalElements?: number;
/**
*
* @type {number}
* @memberof Page
*/
totalPages?: number;
/**
*
* @type {number}
* @memberof Page
*/
number?: number;
}
/**
*
* @export
* @interface PagingLinks
*/
interface PagingLinks {
/**
*
* @type {RelFirst}
* @memberof PagingLinks
*/
first?: RelFirst;
/**
*
* @type {RelSelf}
* @memberof PagingLinks
*/
self?: RelSelf;
/**
*
* @type {RelNext}
* @memberof PagingLinks
*/
next?: RelNext;
/**
*
* @type {RelPrev}
* @memberof PagingLinks
*/
prev?: RelPrev;
/**
*
* @type {RelLast}
* @memberof PagingLinks
*/
last?: RelLast;
}
/**
*
* @export
* @interface RelEvents
*/
interface RelEvents {
/**
*
* @type {string}
* @memberof RelEvents
*/
href?: string;
}
/**
*
* @export
* @interface RelFirst
*/
interface RelFirst {
/**
*
* @type {string}
* @memberof RelFirst
*/
href?: string;
}
/**
*
* @export
* @interface RelLast
*/
interface RelLast {
/**
*
* @type {string}
* @memberof RelLast
*/
href?: string;
}
/**
*
* @export
* @interface RelNext
*/
interface RelNext {
/**
*
* @type {string}
* @memberof RelNext
*/
href?: string;
}
/**
*
* @export
* @interface RelPrev
*/
interface RelPrev {
/**
*
* @type {string}
* @memberof RelPrev
*/
href?: string;
}
/**
*
* @export
* @interface RelSelf
*/
interface RelSelf {
/**
*
* @type {string}
* @memberof RelSelf
*/
href?: string;
}
}