UNPKG

diffusion

Version:

Diffusion JavaScript client

162 lines (161 loc) 4.68 kB
"use strict"; /** * @module diffusion.clients */ Object.defineProperty(exports, "__esModule", { value: true }); exports.ClientControlOptions = void 0; var close_reason_1 = require("../client/close-reason"); var client_control_1 = require("./client-control"); // eslint-disable-next-line @typescript-eslint/naming-convention exports.ClientControlOptions = { /** * Dictionary containing standard session property keys * * **Example:** * ``` * // Get the ALL_FIXED_PROPERTIES key * var props = diffusion.clients.PropertyKeys.ALL_FIXED_PROPERTIES; * ``` * * **Example:** * ``` * // Get all user and fixed properties * var props = diffusion.clients.PropertyKeys.ALL_FIXED_PROPERTIES * .concat(diffusion.clients.PropertyKeys.ALL_USER_PROPERTIES); * ``` * */ // eslint-disable-next-line @typescript-eslint/naming-convention PropertyKeys: Object.freeze({ /** * This constant can be used instead of a property key in requests for * session property values to indicate that <b>all</b> fixed session * properties are required. */ ALL_FIXED_PROPERTIES: ['*F'], /** * This constant can be used instead of a property key in requests for * session property values to indicate that <b>all</b> user defined session * properties are required. */ ALL_USER_PROPERTIES: ['*U'], /** * This constant can be used instead of a property key in requests for * session property values to indicate that <b>all</b> session * properties are required. */ ALL_PROPERTIES: ['*F', '*U'], /** * Session property key for session identifier. * * @since 6.2 */ SESSION_ID: '$SessionId', /** * Session property key for principal. * * @since 6.2 */ PRINCIPAL: '$Principal', /** * Session property key for connector name. * * @since 6.2 */ CONNECTOR: '$Connector', /** * Session property key for transport. * * @since 6.2 */ TRANSPORT: '$Transport', /** * Session property key for client type. * * @since 6.2 */ CLIENT_TYPE: '$ClientType', /** * Session property key for country code. * * @since 6.2 */ COUNTRY: '$Country', /** * Session property key for language code. * * @since 6.2 */ LANGUAGE: '$Language', /** * Session property key for server name. * * @since 6.2 */ SERVER_NAME: '$ServerName', /** * Session property key for client IP address. * * @since 6.2 */ CLIENT_IP: '$ClientIP', /** * Session property key for client latitude. * * @since 6.2 */ LATITUDE: '$Latitude', /** * Session property key for client longitude. * * @since 6.2 */ LONGITUDE: '$Longitude', /** * Session property key for client start time. * * @since 6.2 */ START_TIME: '$StartTime', /** * Session property key for session roles. * * @since 6.2 */ ROLES: '$Roles', /** * Session property key for MQTT client ID. * * @since 6.6 */ MQTT_CLIENT_ID: '$MQTTClientId', /** * Session property key for Gateway Client type. * * @since 6.6 */ GATEWAY_TYPE: '$GatewayType', /** * Session property key for Gateway Client identifier. * * @since 6.6 */ GATEWAY_ID: '$GatewayId', /** * Session property key for client environment. * * @since 6.11 */ ENVIRONMENT: '$Environment' }), /** * Value returned by {@link Session.getPrincipal} if no principal name is * associated with the session. */ ANONYMOUS: '', // eslint-disable-next-line @typescript-eslint/naming-convention CloseReason: close_reason_1.CloseReasonEnum, // eslint-disable-next-line @typescript-eslint/naming-convention SessionEventStreamEventType: client_control_1.SessionEventStreamEventType, // eslint-disable-next-line @typescript-eslint/naming-convention SessionState: client_control_1.SessionState };