UNPKG

diffusion

Version:

Diffusion JavaScript client

128 lines (127 loc) 4.83 kB
"use strict"; /** * @module diffusion.topics */ Object.defineProperty(exports, "__esModule", { value: true }); exports.TopicType = void 0; /** * Enum containing possible Topic Types. * * **Example:** * ``` * // Get a topic type for adding topics * var topicType = diffusion.topics.TopicType.JSON; * * session.topics.add("foo", topicType); * ``` */ // eslint-disable-next-line @typescript-eslint/naming-convention var TopicType; (function (TopicType) { /** * Binary Topic. * * This is a stateful topic that handles data in Binary format. * @since 5.7 */ // eslint-disable-next-line deprecation/deprecation TopicType[TopicType["BINARY"] = 14] = "BINARY"; /** * JSON (JavaScript Object Notation) Topic. * * This is a stateful topic that handles data in JSON representation. * @since 5.7 */ // eslint-disable-next-line deprecation/deprecation TopicType[TopicType["JSON"] = 15] = "JSON"; /** * Topic that stores and publishes String values. Based on the {@link string string data type}. * * Supports null String values. * * Supports delta-streams. * * @since 6.0 */ // eslint-disable-next-line deprecation/deprecation TopicType[TopicType["STRING"] = 17] = "STRING"; /** * Topic that stores and publishes 64-bit integer values. Based on the * {@link int64 int64 data type}. Values are of the type * {@link Int64}. * * Supports null int64 values. * * Does not support delta-streams - only complete values are transmitted. * * @since 6.0 */ // eslint-disable-next-line deprecation/deprecation TopicType[TopicType["INT64"] = 18] = "INT64"; /** * Topic that stores and publishes IEEE 754 double-precision floating point * numbers (i.e native JavaScript Numbers). Based on the {@link double double data type}. * * Supports null Double values. * * The topic does not support delta-streams - only complete values are transmitted. * * @since 6.0 */ // eslint-disable-next-line deprecation/deprecation TopicType[TopicType["DOUBLE"] = 19] = "DOUBLE"; /** * Time Series Topic. * * A <em>time series</em> is a sequence of events. Each event contains a * value and has server-assigned metadata comprised of a sequence number, * timestamp, and author. * * A time series topic allows sessions to access a time series that is * maintained by the server. A time series topic has an associated * {@link DataType event data type}, such as `Binary`, `String`, * or `JSON`, that determines the type of value associated with each * event. * * <h4>Retained range</h4> * * The {@link TopicSpecification.TIME_SERIES_SUBSCRIPTION_RANGE * TIME_SERIES_SUBSCRIPTION_RANGE} property configures the range of historic * events retained by a time series topic. If the property is not specified, * a time series topic will retain the ten most recent events. * * <h4>Subscription range</h4> * * The {@link TopicSpecification.TIME_SERIES_SUBSCRIPTION_RANGE * TIME_SERIES_SUBSCRIPTION_RANGE} property configures a time series topic * to send a range of historic events from the end of the time series to new * subscribers. This is a convenient way to synchronize new subscribers * without requiring the use of a {@link TimeSeries.rangeQuery range query}. * * By default, new subscribers will be sent the latest event if delta * streams are enabled and no events if delta streams are disabled. See the * description of <em>Subscription range</em> in the {@link * Session.timeseries} time series feature} documentation. * * * <h4>Mandatory properties</h4> * * The {@link TopicSpecification.TIME_SERIES_EVENT_VALUE_TYPE * TIME_SERIES_EVENT_VALUE_TYPE} property must be provided when creating a * time series topic. * * * @since 6.0 * @see diffusion.datatypes.TimeSeriesDataType */ // eslint-disable-next-line deprecation/deprecation TopicType[TopicType["TIME_SERIES"] = 16] = "TIME_SERIES"; /** * Topic that stores and publishes data in the form of records and fields. * Based on the {@link RecordV2DataType RecordV2 data type}. * * Supports delta-streams. * * @since 6.0 */ // eslint-disable-next-line deprecation/deprecation TopicType[TopicType["RECORD_V2"] = 20] = "RECORD_V2"; /** * A topic type that is unsupported by the session. * * @since 6.3 */ // eslint-disable-next-line deprecation/deprecation TopicType[TopicType["UNKNOWN_TOPIC_TYPE"] = 21] = "UNKNOWN_TOPIC_TYPE"; })(TopicType = exports.TopicType || (exports.TopicType = {}));