UNPKG

@mindconnect/mindconnect-nodejs

Version:

NodeJS Library for Siemens Insights Hub Connectivity - TypeScript SDK for Insights Hub and Industrial IoT - Command Line Interface - Insights Hub Development Proxy (Siemens Insights Hub was formerly known as MindSphere)

1,643 lines (1,642 loc) 30.2 kB
/** * used for Generate Configuration method * * @export * @enum {number} */ export declare enum ConfigurationStyle { Numeric = "NUMERIC", Descriptive = "DESCRIPTIVE" } /** * The agent extends the configuration to store the state of the agent. * This type was created manually for the agent. * * @export * @interface IMindConnectConfiguration * @extends {Configuration} */ export interface IMindConnectConfiguration extends Configuration { response?: ClientIdentifier; recovery?: ClientIdentifier[]; dataSourceConfiguration?: DataSourceConfiguration; mappings?: Mapping[]; urls?: Object; } /** * This is the type for the JWT which has to be sent to the mindsphere for the inital onboarding. * This type was created manually for the agent. * * @export * @interface SelfSignedClientAssertion */ export interface SelfSignedClientAssertion { iss: string; sub: string; aud: string[]; iat: number; nbf: number; exp: number; jti: string; schemas: string[]; ten: string; } /** * The data point values. * * @export * @interface DataPointValue */ export interface DataPointValue { dataPointId: string; value: string | number; qualityCode: string | number; } export interface TimeStampedDataPoint { timestamp: string; values: DataPointValue[]; } /** * * @export * @interface AccessToken */ export interface AccessToken { /** * The access token to be used in calls to MindSphere with Bearer authentication scheme. * @type {string} * @memberof AccessToken */ access_token?: string; /** * The type of the access token issued. * @type {string} * @memberof AccessToken */ token_type?: string; /** * Number of seconds before this token expires from the time of issuance. * @type {number} * @memberof AccessToken */ expires_in?: number; /** * * @type {Jti} * @memberof AccessToken */ jti?: Jti; /** * Agent permissions list. * @type {Array&lt;string&gt;} * @memberof AccessToken */ scope?: Array<string>; } /** * * @export * @interface Agent */ export interface Agent { /** * Name must be unique per tenant. * @type {string} * @memberof Agent */ name: string; /** * * @type {string} * @memberof Agent */ securityProfile: Agent.SecurityProfileEnum; } /** * @export * @namespace Agent */ export declare namespace Agent { /** * @export * @enum {string} */ enum SecurityProfileEnum { SHAREDSECRET, RSA3072 } } /** * * @export * @interface AgentUpdate */ export interface AgentUpdate { /** * Name must be unique per tenant. * @type {string} * @memberof AgentUpdate */ name: string; /** * * @type {string} * @memberof AgentUpdate */ securityProfile: AgentUpdate.SecurityProfileEnum; } /** * @export * @namespace AgentUpdate */ export declare namespace AgentUpdate { /** * @export * @enum {string} */ enum SecurityProfileEnum { SHAREDSECRET, RSA3072 } } /** * * @export * @interface Badrequest */ export interface Badrequest { /** * * @type {string} * @memberof Badrequest */ id?: string; /** * * @type {string} * @memberof Badrequest */ message?: string; } /** * * @export * @interface BadrequestIAM */ export interface BadrequestIAM { /** * * @type {string} * @memberof BadrequestIAM */ id?: string; /** * * @type {string} * @memberof BadrequestIAM */ error?: string; /** * An error message with Correlation-ID value. * @type {string} * @memberof BadrequestIAM */ error_description?: string; } /** * Client identifier, equals value of 'sub' claim in IAT. * @export * @interface ClientId */ export interface ClientId { } /** * * @export * @interface ClientIdentifier */ export interface ClientIdentifier { /** * * @type {ClientId} * @memberof ClientIdentifier */ client_id: ClientId; /** * Server generated client secret. Required if security profile is SHARED_SECRET. * @type {string} * @memberof ClientIdentifier */ client_secret?: string; /** * Epoch time in seconds which client secret expires at. * @type {number} * @memberof ClientIdentifier */ client_secret_expires_at?: number; /** * * @type {Array&lt;string&gt;} * @memberof ClientIdentifier */ grant_types?: Array<ClientIdentifier.GrantTypesEnum>; /** * The access token to be used at the client configuration endpoint to perform subsequent operations upon the client registration. * @type {string} * @memberof ClientIdentifier */ registration_access_token: string; /** * The fully qualified URL of the client configuration endpoint for this client. * @type {string} * @memberof ClientIdentifier */ registration_client_uri: string; /** * The client authentication method. * @type {string} * @memberof ClientIdentifier */ token_endpoint_auth_method?: ClientIdentifier.TokenEndpointAuthMethodEnum; } /** * @export * @namespace ClientIdentifier */ export declare namespace ClientIdentifier { /** * @export * @enum {string} */ enum GrantTypesEnum { SHAREDSECRET, RSA3072 } /** * @export * @enum {string} */ enum TokenEndpointAuthMethodEnum { ClientSecretJwt, PrivateKeyJwt } } /** * * @export * @interface Configuration */ export interface Configuration { /** * * @type {OnboardingConfigurationContent} * @memberof Configuration */ content: OnboardingConfigurationContent; /** * * @type {Date} * @memberof Configuration */ expiration?: Date; } /** * Operation on resource is not allowed due to a conflicting state. * @export * @interface Conflict */ export interface Conflict { /** * * @type {string} * @memberof Conflict */ id?: string; /** * * @type {string} * @memberof Conflict */ message?: string; } /** * * @export * @interface DataPoint */ export interface DataPoint { /** * Identifier of this data point. This id needs to be unique per data source configuration. Agents expected to upload timeseries value with this id, enabling backend services to match data with this data point. This is NOT an auto generated field, enabling agents to specify it before uploading matching timeseries value. * @type {string} * @memberof DataPoint */ id: string; /** * * @type {string} * @memberof DataPoint */ name: string; /** * * @type {string} * @memberof DataPoint */ description?: string | null; /** * * @type {string} * @memberof DataPoint */ type: DataPoint.TypeEnum | DataPoint.DataPointType; /** * Unit of data point. Can be empty. * @type {string} * @memberof DataPoint */ unit?: string; /** * A list of string tuples. Max 5 tuples allowed. * @type {{ [key: string]: string; }} * @memberof DataPoint */ customData?: { [key: string]: string; }; } /** * @export * @namespace DataPoint */ export declare namespace DataPoint { /** * @export * @enum {string} */ enum TypeEnum { INT, LONG, DOUBLE, BOOLEAN, STRING, BIG_STRING, TIMESTAMP } type DataPointType = "INT" | "LONG" | "DOUBLE" | "BOOLEAN" | "STRING" | "TIMESTAMP" | "BIG_STRING"; } /** * * @export * @interface DataSource */ export interface DataSource { /** * * @type {string} * @memberof DataSource */ name: string; /** * * @type {string} * @memberof DataSource */ description?: string | null; /** * * @type {Array&lt;DataPoint&gt;} * @memberof DataSource */ dataPoints: Array<DataPoint>; /** * A list of string tuples. Max 5 tuples allowed. * @type {{ [key: string]: string; }} * @memberof DataSource */ customData?: { [key: string]: string; }; } /** * * @export * @interface DataSourceConfiguration */ export interface DataSourceConfiguration { /** * * @type {string} * @memberof DataSourceConfiguration */ id?: string; /** * * @type {string} * @memberof DataSourceConfiguration */ eTag?: string; /** * Unique identifier of the datasource configuration. * @type {string} * @memberof DataSourceConfiguration */ configurationId: string; /** * * @type {Array&lt;DataSource&gt;} * @memberof DataSourceConfiguration */ dataSources: Array<DataSource>; } /** * * @export * @interface Error */ export interface Error { /** * * @type {string} * @memberof Error */ id?: string; /** * * @type {string} * @memberof Error */ message?: string; } /** * * @export * @interface Forbidden */ export interface Forbidden { /** * * @type {string} * @memberof Forbidden */ id?: string; /** * * @type {string} * @memberof Forbidden */ message?: string; } /** * Unique identifier of the token. * @export * @interface Jti */ export interface Jti { } /** * * @export * @interface Jwks */ export interface Jwks { /** * * @type {Array&lt;Key&gt;} * @memberof Jwks */ keys?: Array<Key>; } /** * * @export * @interface Key */ export interface Key { /** * * @type {string} * @memberof Key */ e: string; /** * * @type {string} * @memberof Key */ n: string; /** * * @type {string} * @memberof Key */ kty: string; /** * * @type {string} * @memberof Key */ kid: string; } /** * * @export * @interface Keys */ export interface Keys { /** * * @type {Jwks} * @memberof Keys */ jwks?: Jwks; } /** * * @export * @interface Notfound */ export interface Notfound { /** * * @type {string} * @memberof Notfound */ id?: string; /** * * @type {string} * @memberof Notfound */ message?: string; } /** * * @export * @interface OnboardingConfigurationContent */ export interface OnboardingConfigurationContent { /** * * @type {string} * @memberof OnboardingConfigurationContent */ baseUrl?: string; /** * * @type {string} * @memberof OnboardingConfigurationContent */ iat?: string; /** * * @type {Array&lt;string&gt;} * @memberof OnboardingConfigurationContent */ clientCredentialProfile?: Array<string>; /** * * @type {string} * @memberof OnboardingConfigurationContent */ clientId?: string; /** * * @type {string} * @memberof OnboardingConfigurationContent */ tenant?: string; } /** * * @export * @interface OnboardingStatus */ export interface OnboardingStatus { /** * * @type {string} * @memberof OnboardingStatus */ status?: OnboardingStatus.StatusEnum; } /** * @export * @namespace OnboardingStatus */ export declare namespace OnboardingStatus { /** * @export * @enum {string} */ enum StatusEnum { NOTONBOARDED, ONBOARDING, ONBOARDED } } /** * * @export * @interface Order */ export interface Order { /** * The order the property shall be sorted for. * @type {string} * @memberof Order */ direction?: Order.DirectionEnum; /** * The property to order for. * @type {string} * @memberof Order */ property?: string; /** * Whether or not the sort will be case sensitive. * @type {boolean} * @memberof Order */ ignoreCase?: boolean; /** * * @type {string} * @memberof Order */ nullHandling?: Order.NullHandlingEnum; /** * Whether sorting for this property shall be descending. * @type {boolean} * @memberof Order */ descending?: boolean; /** * Whether sorting for this property shall be ascending. * @type {boolean} * @memberof Order */ ascending?: boolean; } /** * @export * @namespace Order */ export declare namespace Order { /** * @export * @enum {string} */ enum DirectionEnum { ASC, DESC } /** * @export * @enum {string} */ enum NullHandlingEnum { NATIVE, NULLSFIRST, NULLSLAST } } /** * * @export * @interface PagedAgent */ export interface PagedAgent { /** * * @type {Array&lt;Agent&gt;} * @memberof PagedAgent */ content: Array<Agent>; /** * Whether the current item is the last one. * @type {boolean} * @memberof PagedAgent */ last: boolean; /** * The number of total pages. * @type {number} * @memberof PagedAgent */ totalPages: number; /** * The total amount of elements. * @type {number} * @memberof PagedAgent */ totalElements: number; /** * The number of elements currently on this page. * @type {number} * @memberof PagedAgent */ numberOfElements: number; /** * Whether the current item is the first one. * @type {boolean} * @memberof PagedAgent */ first: boolean; /** * The sorting parameters for the page. * @type {Array&lt;Order&gt;} * @memberof PagedAgent */ sort: Array<Order>; /** * The size of the page. * @type {number} * @memberof PagedAgent */ size: number; /** * The number of the current item. * @type {number} * @memberof PagedAgent */ number: number; } /** * * @export * @interface Preconditionfailed */ export interface Preconditionfailed { /** * * @type {string} * @memberof Preconditionfailed */ id?: string; /** * * @type {string} * @memberof Preconditionfailed */ message?: string; } /** * * @export * @interface RotationKeys */ export interface RotationKeys { /** * * @type {string} * @memberof RotationKeys */ client_id?: string; /** * * @type {Jwks} * @memberof RotationKeys */ jwks?: Jwks; } /** * * @export * @interface TokenKey */ export interface TokenKey { /** * * @type {string} * @memberof TokenKey */ e: string; /** * * @type {string} * @memberof TokenKey */ n: string; /** * * @type {string} * @memberof TokenKey */ kty: string; /** * * @type {string} * @memberof TokenKey */ kid: string; /** * * @type {string} * @memberof TokenKey */ value: string; } /** * * @export * @interface Unauthorized */ export interface Unauthorized { /** * * @type {string} * @memberof Unauthorized */ id?: string; /** * * @type {string} * @memberof Unauthorized */ message?: string; } /** * * @export * @interface UnauthorizedIAM */ export interface UnauthorizedIAM { /** * * @type {string} * @memberof UnauthorizedIAM */ id?: string; /** * * @type {string} * @memberof UnauthorizedIAM */ error?: string; /** * An error message with Correlation-ID value. * @type {string} * @memberof UnauthorizedIAM */ error_description?: string; } /** * * @export */ export declare const COLLECTION_FORMATS: { csv: string; ssv: string; tsv: string; pipes: string; }; /** * * @export * @interface FetchAPI */ export interface FetchAPI { (url: string, init?: any): Promise<Response>; } /** * * @export * @interface FetchArgs */ export interface FetchArgs { url: string; options: any; } /** * * @export * @interface Badrequest */ export interface Badrequest { /** * * @type {string} * @memberof Badrequest */ id?: string; /** * * @type {string} * @memberof Badrequest */ message?: string; } /** * * @export * @interface Conflict */ export interface Conflict { /** * * @type {string} * @memberof Conflict */ id?: string; /** * * @type {string} * @memberof Conflict */ message?: string; } /** * * @export * @interface Error */ export interface Error { /** * * @type {string} * @memberof Error */ id?: string; /** * * @type {string} * @memberof Error */ message?: string; } /** * * @export * @interface Forbidden */ export interface Forbidden { /** * * @type {string} * @memberof Forbidden */ id?: string; /** * * @type {string} * @memberof Forbidden */ message?: string; } /** * * @export * @interface Mapping */ /** * * @export * @interface Mapping */ export interface Mapping { /** * Unique identifier of the mapping resource * @type {string} * @memberof Mapping */ id?: string; /** * Unique identifier of the agent * @type {string} * @memberof Mapping */ agentId: string; /** * Unique identifier of the data point * @type {string} * @memberof Mapping */ dataPointId: string; /** * Unit of the data point * @type {string} * @memberof Mapping */ dataPointUnit?: string; /** * Type of the data point * @type {string} * @memberof Mapping */ dataPointType?: Mapping.DataPointTypeEnum; /** * Unique identifier of the entity * @type {string} * @memberof Mapping */ entityId: string; /** * * @type {string} * @memberof Mapping */ propertySetName: string; /** * * @type {string} * @memberof Mapping */ propertyName: string; /** * * @type {string} * @memberof Mapping */ propertyUnit?: string; /** * * @type {string} * @memberof Mapping */ propertyType?: Mapping.PropertyTypeEnum; /** * * @type {boolean} * @memberof Mapping */ qualityEnabled?: boolean; /** * Identifies auto deleting mapping or keeping mapping. * @type {boolean} * @memberof Mapping */ keepMapping?: boolean; /** * ! fix: manual fix for swagger in v3.4.1 * @type Validity * @memberof Mapping */ validity?: Validity; } /** * @export * @namespace Mapping */ export declare namespace Mapping { /** * @export * @enum {string} */ enum DataPointTypeEnum { INT, LONG, DOUBLE, BOOLEAN, STRING, BIGSTRING, TIMESTAMP } /** * @export * @enum {string} */ enum PropertyTypeEnum { INT, LONG, DOUBLE, BOOLEAN, STRING, BIGSTRING, TIMESTAMP } } /** * * @export * @interface Validity */ export interface Validity { /** * * @type {string} * @memberof Validity */ status: Validity.StatusEnum; /** * * @type {Array<string>} * @memberof Validity */ reasons: Array<Validity.ReasonsEnum>; } /** * @export * @namespace Validity */ export declare namespace Validity { /** * @export * @enum {string} */ enum StatusEnum { VALID, INVALID } /** * @export * @enum {string} */ enum ReasonsEnum { MISSINGDATAPOINT, MISSINGPROPERTY, INVALIDTYPE, INVALIDUNIT } } /** * * @export * @interface Notfound */ export interface Notfound { /** * * @type {string} * @memberof Notfound */ id?: string; /** * * @type {string} * @memberof Notfound */ message?: string; } /** * * @export * @interface Order */ export interface Order { /** * The order the property shall be sorted for. * @type {string} * @memberof Order */ direction?: Order.DirectionEnum; /** * The property to order for. * @type {string} * @memberof Order */ property?: string; /** * Whether or not the sort will be case sensitive. * @type {boolean} * @memberof Order */ ignoreCase?: boolean; /** * * @type {string} * @memberof Order */ nullHandling?: Order.NullHandlingEnum; /** * Whether sorting for this property shall be descending. * @type {boolean} * @memberof Order */ descending?: boolean; /** * Whether sorting for this property shall be ascending. * @type {boolean} * @memberof Order */ ascending?: boolean; } /** * * @export * @interface PagedMapping */ export interface PagedMapping { /** * * @type {Array&lt;Mapping&gt;} * @memberof PagedMapping */ content: Array<Mapping>; /** * Whether the current item is the last one. * @type {boolean} * @memberof PagedMapping */ last: boolean; /** * The number of total pages. * @type {number} * @memberof PagedMapping */ totalPages: number; /** * The total amount of elements. * @type {number} * @memberof PagedMapping */ totalElements: number; /** * The number of elements currently on this page. * @type {number} * @memberof PagedMapping */ numberOfElements: number; /** * Whether the current item is the first one. * @type {boolean} * @memberof PagedMapping */ first: boolean; /** * The sorting parameters for the page. * @type {Array&lt;Order&gt;} * @memberof PagedMapping */ sort: Array<Order>; /** * The size of the page. * @type {number} * @memberof PagedMapping */ size: number; /** * The number of the current item. * @type {number} * @memberof PagedMapping */ number: number; } /** * * @export * @interface PayLoadTooLarge */ export interface PayLoadTooLarge { /** * * @type {string} * @memberof PayLoadTooLarge */ id?: string; /** * * @type {string} * @memberof PayLoadTooLarge */ message?: string; } /** * * @export * @interface Unauthorized */ export interface Unauthorized { /** * * @type {string} * @memberof Unauthorized */ id?: string; /** * * @type {string} * @memberof Unauthorized */ message?: string; } export 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 (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; [others: string]: any; } export 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 BaseEventLinks */ export interface BaseEventLinks { /** * * @type {RelSelf} * @memberof BaseEventLinks */ self?: RelSelf; } /** * * @export * @interface RelSelf */ export interface RelSelf { /** * * @type {string} * @memberof RelSelf */ href?: string; } export interface CustomEvent extends BaseEvent { } export type MessageEncoding = "ascii" | "utf8" | "utf16le" | "ucs2" | "base64" | "latin1" | "binary" | "hex"; export interface FileInformation { Type?: string; "Content-Transfer-Encoding"?: MessageEncoding; Chunk?: number; TotalChunks?: number; } /** * * @export * @interface DiagnosticActivation */ export interface DiagnosticActivation { /** * Unique identifier of diagnostic activation resource * @type {string} * @memberof DiagnosticActivation */ id?: string; /** * Unique identifier of the agent * @type {string} * @memberof DiagnosticActivation */ agentId: string; } /** * * @export * @interface DiagnosticInformation */ export interface DiagnosticInformation { /** * * @type {string} * @memberof DiagnosticInformation */ agentId?: string; /** * * @type {string} * @memberof DiagnosticInformation */ correlationId?: string; /** * * @type {string} * @memberof DiagnosticInformation */ severity?: DiagnosticInformation.SeverityEnum; /** * * @type {string} * @memberof DiagnosticInformation */ message?: string; } /** * @export * @namespace DiagnosticInformation */ export declare namespace DiagnosticInformation { /** * @export * @enum {string} */ enum SeverityEnum { INFO, WARN, ERROR } } /** * * @export * @interface PagedDiagnosticActivation */ export interface PagedDiagnosticActivation { /** * * @type {Array&lt;DiagnosticActivation&gt;} * @memberof PagedDiagnosticActivation */ content: Array<DiagnosticActivation>; /** * Whether the current item is the last one. * @type {boolean} * @memberof PagedDiagnosticActivation */ last: boolean; /** * The number of total pages. * @type {number} * @memberof PagedDiagnosticActivation */ totalPages: number; /** * The total amount of elements. * @type {number} * @memberof PagedDiagnosticActivation */ totalElements: number; /** * The number of elements currently on this page. * @type {number} * @memberof PagedDiagnosticActivation */ numberOfElements: number; /** * Whether the current item is the first one. * @type {boolean} * @memberof PagedDiagnosticActivation */ first: boolean; /** * The sorting parameters for the page. * @type {Array&lt;Order&gt;} * @memberof PagedDiagnosticActivation */ sort: Array<Order>; /** * The size of the page. * @type {number} * @memberof PagedDiagnosticActivation */ size: number; /** * The number of the current item. * @type {number} * @memberof PagedDiagnosticActivation */ number: number; } /** * * @export * @interface PagedDiagnosticInformation */ export interface PagedDiagnosticInformation { /** * * @type {Array&lt;DiagnosticInformation&gt;} * @memberof PagedDiagnosticInformation */ content: Array<DiagnosticInformation>; /** * Whether the current item is the last one. * @type {boolean} * @memberof PagedDiagnosticInformation */ last: boolean; /** * The number of total pages. * @type {number} * @memberof PagedDiagnosticInformation */ totalPages: number; /** * The total amount of elements. * @type {number} * @memberof PagedDiagnosticInformation */ totalElements: number; /** * The number of elements currently on this page. * @type {number} * @memberof PagedDiagnosticInformation */ numberOfElements: number; /** * Whether the current item is the first one. * @type {boolean} * @memberof PagedDiagnosticInformation */ first: boolean; /** * The sorting parameters for the page. * @type {Array&lt;Order&gt;} * @memberof PagedDiagnosticInformation */ sort: Array<Order>; /** * The size of the page. * @type {number} * @memberof PagedDiagnosticInformation */ size: number; /** * The number of the current item. * @type {number} * @memberof PagedDiagnosticInformation */ number: number; } /** * * * @export * @interface OnlineStatus */ export interface OnlineStatus { /** * * * @type {OnlineStatus.StatusEnum} * @memberOf OnlineStatus */ status: OnlineStatus.StatusEnum; /** * * * @type {string} * @memberOf OnlineStatus */ since: string; } export declare namespace OnlineStatus { /** * @export * @enum {string} */ enum StatusEnum { ONLINE, OFFLINE } }