Glue

5.1.0

Glue42 Desktop is a real-time user interface (UI) integration platform. Applications are combined at the user interface level to provide a better user experience (UX). UI integration makes it easier for users to access the right data and functionality at the right time and also reduce the number of times they need to copy/paste their way between one application and another. The objective of Glue42 Desktop is therefore to provide intuitive paths from one function to the next, in order to deliver business outcomes quickly and reliably. Glue42 Desktop allows developers to connect to any (legacy, 3rd party or modern) web or desktop application and have multiple apps interact with each other in real time.

The Glue42 JavaScript library enables JavaScript applications to participate in Glue42 Desktop and use Glue42 functionalities via a set of APIs.

Referencing

From a JavaScript File

Glue42 is a library available as a single JavaScript file, which you can include into your web applications using a <script> tag. If you are using a Glue42 installer, you can find the .js files in %LOCALAPPDATA%\Tick42\GlueSDK\GlueJS\js\web.

<script type="text/javascript" src="tick42-glue-5.1.0.js"></script>

Because the API evolves, we have chosen the following semantic version model:

BreakingChangesVersion.FeatureVersion.FixVersion

When deploying your application in production, we recommend that you always reference a specific minified version, e.g.:

<script type="text/javascript" src="tick42-glue-5.1.0-min.js"></script>

From an NPM Module

The Glue42 JavaScript library is also available as npm packages, which you can include as dependencies in your project and import in your code. The currently available packages are @glue42/core and @glue42/desktop. The Core package is a subset of the Desktop package and offers basic functionalities for sharing data between applications (Interop, Shared Contexts, Pub/Sub, Metrics), while the Desktop package offers additional options for sharing data between apps (Activities, Channels), as well as advanced window management functionalities (App Management, Layouts, Window Management, Hotkeys).

To include any of our packages as a dependency in your project, navigate to the root directory of your project and run:

npm install

object

Description

Optional configuration object when initializing the Glue42 library.

Properties

boolean | "startOnly" | "skipIcons" | "full"

Whether to initialize the Application Manager or not.

Default: false

boolean | "full" | "slim" | "fullWaitSnapshot"

Whether to initialize the Layouts API or not.

Default: "slim"

boolean | "trackMyOnly" | "trackMyTypeAndInitiatedFromMe" | "trackAll" | "trackTypes"

Whether to initialize the Activities API or not.

Default: "trackMyTypeAndInitiatedFromMe"

boolean

Whether to initialize the Window Management API or not.

Default: true

boolean

Whether to initialize the Channels API or not.

Default: false

boolean

Whether to initialize the Displays library or not.

string

Application name. If not specified, the value depends on the hosting environment. For the browser - document.title + random number (e.g., ClientList321333). In Glue42 - containerName + browserWindowName (e.g., Internal.ClientList).

Configurations for the Glue42 Gateway connection.

boolean | MetricsConfig

Metrics configurations.

boolean

Enable or disable the Contexts API.

boolean

Enable or disable the Pub/Sub API.

"off" | "trace" | "debug" | "info" | "warn" | "error" | LoggerConfig

Defines logging levels per output target.

Pass this to override the build-in logger and handle logging on your own

string | Auth

Authentication can use one of the following flows:

  • username/password;
  • token - access tokens can be generated after successful login from the Auth Provider (e.g., Auth0);
  • gatewayToken - Gateway tokens are time limited tokens generated by the Gateway after an explicit request. To generate one, use the glue.connection.authToken() method;
  • sspi - using sessionId and authentication challenge callback;

object

Description

Instance of the initialized Glue42 library.

methoddone
() => Promise<void>

Description

Disposes Glue42 API. This will remove all Interop methods and streams registered by the application.

Returns

Promise<void>

Properties

Window Management library.

Activities library.

Application Management library.

Layouts library.

Channels library.

Hotkeys library.

Displays library.

Available since version Glue42 3.9

Intents API

Available since version Glue42 3.9

Notifications API (alpha version)

Available since version Glue42 3.9

Connection library.

Interop library.

Interop library.

Pub/Sub library.

Metrics library.

Contexts library.

(info?: FeedbackInfo) => void

Brings up the Glue42 Desktop feedback dialog.

object

Info object containing versions of all included libraries and Glue42 itself.

string

Glue42 version.

object

Description

Object describing a screen.

Properties

number

Screen height.

boolean

Whether this is the primary screen.

number

Horizontal coordinate of the top left corner of the screen.

string

Name of the screen assigned by the operating system.

number

Screen scale factor.

number

Scale factor of the horizontal axis of the screen.

number

Scale factor of the vertical axis of the screen.

number

Vertical coordinate of the top left corner of the screen.

number

Screen width.

number

Height of the working area.

number

Horizontal coordinate of the top left corner of the screen working area.

number

Vertical coordinate of the top left corner of the screen working area.

number

Width of the working area.

object

Description

Authentication can use one of the following flows:

  • username/password;
  • token - access tokens can be generated after successful login from the Auth Provider (e.g., Auth0);
  • gatewayToken - Gateway tokens are time limited tokens generated by the Gateway after an explicit request. To generate one, use the glue.connection.authToken() method;
  • sspi - using sessionId and authentication challenge callback;

Properties

string

Username to be used

string

Password to be used

"sspi"

(sessionId: string, token: any) => Promise<{ data: any; }>

string

string

Authenticate using token generated from the auth provider.

string

Authenticate using gatewayToken

object

Description

Configurations for the Glue42 Gateway connection.

Properties

string

URL for the WebSocket connections to the Gateway.

number

Legacy (Version of the Gateway that you are connected to)

number

Reconnect interval in milliseconds.

Default: 500

number

Number of reconnect attempts.

Default: 10

A way to pass custom token provider for Gateway v.3 tokens.

string

Path to the shared worker file that contains glue0 shared worker related code

Connect with GW in memory

object

Description

Metrics configurations.

Properties

boolean

If false (default), an App system will be created on top level, and all other metrics will live in it. If true, an App system will be created, and all metrics will live on top level.

object

Properties

object

Properties

Console logging level.

File logging level.

function

methodGlue
(config: Config) => Promise<Glue>

Description

Factory function that creates a new Glue42 instance.

Parameters

Name
Type
Required
Description

config

no

Returns

Promise<Glue>