3.2.3 • Published 1 year ago

@io-maana/q-assistant-client v3.2.3

Weekly downloads
51
License
MIT
Repository
github
Last release
1 year ago

q-assistant-client

A lightweight JavaScript client for Maana-Q Assistant developers that wraps post-message communication between an embedded Maana-Q assistant and the Maana-Q UI.

Usage

This is intented to be used in a web application being leveraged as a Maana Q assistant (embedded as an iframe). This assistant client will facilitate communication between the assistant and the parent frame. The client provides a rich, asynchronous experience over what would otherwise be 'fire-and-forget'-style messaging via post-post message communication.

Requirements and Assumptions

@TODO Logan

Singleton Instance

The client is exported as a singleton to avoid duplicate registration on event listeners. You can import the instance like this:

import AssistantAPIClient from '@io-maana/q-assistant-client';

Interacting with the API

API Surface Area

Function Calls

Function calls can be made against the client like any other javascript object. They are all async.

const workspace = await AssistantAPIClient.getWorkspace(); 
console.log("Workspace:", workspace)

const functions = await workspace.getFunctions()
console.log("Functions:", functions)

Event Subscription

Only workspace selection events are currently supported. Subscriptions are added explictly by registering a callback:

AssistantAPIClient.addSelectionChangedListener((selection)=>{
  console.log('Workspace selection changed:', selection)
})

These are removed on a per-callback basis with the 'removeSelectionChangedListener' call.

Dependencies

Post-Robot https://github.com/krakenjs/post-robot

Post-robot is used to provide a richer communication layer atop post-message.

Examples

@TODO Logan

API Documentation

@TODO Logan This will presumably link to Gitbook Maana Q Documentation that explicates the full K Portal API functionality.

3.3.0-beta.20

1 year ago

3.2.4-beta.40

2 years ago

3.3.0-beta.18

3 years ago

3.3.0-beta.17

3 years ago

3.3.0-beta.15

3 years ago

3.3.0-beta.16

3 years ago

3.3.0-beta.13

3 years ago

3.3.0-beta.11

3 years ago

3.3.0-beta.10

3 years ago

3.3.0-beta.9

3 years ago

3.3.0-beta.8

3 years ago

3.3.0-beta.7

3 years ago

3.3.0-beta.6

3 years ago

3.3.0-beta.5

3 years ago

3.3.0-beta.4

4 years ago

3.3.0-beta.2

4 years ago

3.2.4-beta.39

4 years ago

3.2.3-beta.38

4 years ago

3.2.3

4 years ago

3.2.3-beta.37

4 years ago

3.2.3-beta.36

4 years ago

3.2.3-beta.35

4 years ago

3.2.2

4 years ago

3.2.2-beta.34

4 years ago

3.2.2-beta.33

4 years ago

3.2.2-beta.32

4 years ago

3.2.2-beta.31

4 years ago

3.2.2-beta.30

4 years ago

3.2.2-beta.28

4 years ago

3.2.2-beta.29

4 years ago

3.2.2-beta.27

4 years ago

3.2.2-beta.26

4 years ago

3.2.2-beta.25

4 years ago

3.2.2-beta.24

4 years ago

3.2.2-beta.23

4 years ago

3.2.2-beta.22

4 years ago

3.2.2-beta.21

4 years ago

3.2.2-beta.20

4 years ago

3.2.2-beta.19

4 years ago

3.2.2-beta.18

4 years ago

3.2.2-beta.17

4 years ago

3.2.1

4 years ago

3.2.2-beta.16

4 years ago

3.2.1-beta.15

5 years ago

3.2.1-beta.14

5 years ago

3.2.1-beta.13

5 years ago

3.2.1-beta.12

5 years ago

3.2.1-beta.11

5 years ago

3.2.1-beta.10

5 years ago

3.2.1-beta.9

5 years ago

3.2.1-beta.8

5 years ago

3.2.1-beta.7

5 years ago

3.2.1-beta.6

5 years ago

3.2.1-beta.5

5 years ago

3.2.1-beta.4

5 years ago

3.2.1-beta.3

5 years ago

3.2.1-beta.2

5 years ago

3.2.1-beta.1

5 years ago