2.6.15-rc.4 • Published 5 years ago

@ulms/messenger v2.6.15-rc.4

Weekly downloads
170
License
BSD-4-Clause
Repository
github
Last release
5 years ago

@ulms/messenger service

npm.io npm.io npm.io

Usage

Dependencies

Messenger relies on dependencies described at peerDependencies#l73-l77 section.

They shoud be included like this#l10-l25 or according your pipeline.

Initialization

Messenger service can be accessed like this:

var Chat = window.WCChat.chat.default
var Account = window.Account.Account
var TokenProvider = window.Account.TokenProvider
var MessengerService = window.UlmsMessenger.MessengerService;

window.customElements.define('ulms-messenger', Chat)

var config = {
  api_version: "<api_version>"
  audience: "<audience>"
  auth_endpoint: "<auth_endpoint>"
  events_endpoint: "<events_endpoint>"
  notifications_endpoint: "<notifications_endpoint>"
  profile_endpoint: "<profile_endpoint>"
  profile_gateway: "<profile_gateway>"
  refresh_token: "<refresh_token>"
  room_id: "<room_id>"
  scope: "<scope>"
}

var messenger = window.document.getElementById('messenger');

var account = new Account(/* your configuration */)
var tokenProvider = new TokenProvider({ "refresh_token": "<token>" }, account)

Self-contained messenger

Messenger service manages and stores all the data itself.

new MessengerService(
  config,
  [ "<room_id>", messenger ],
  tokenProvider
)

Messenger with external storage

Messenger service uses external Redux storage. All the needed processing must be done externally.

new MessengerService(
  config, 
  [ "<room_id>", messenger ], 
  tokenProvider,
  redux.createStore(/* your implementation */)
)

Proxy-store

Messenger service may use some kind of proxy store which just emits events. All the needed processing must be done externally.

var proxyStore = window.UlmsMessenger.ProxyStore;

new MessengerService(
  config, 
  [ "<room_id>", messenger ], 
  tokenProvider,
  proxyStore.createStore()
)

Debug

npm start
# one shell

chokidar ./src -pc "npm run build/umd/min"
# another shell

# HINT: pre run `npm i -g chokidar-cli` to install `chokidar`
2.9.3-dev.1

4 years ago

2.9.3-dev.0

4 years ago

2.9.2

4 years ago

2.9.2-dev.2

4 years ago

2.9.2-dev.1

4 years ago

2.9.2-dev.0

4 years ago

2.9.1

4 years ago

2.9.1-dev.1

4 years ago

2.9.1-dev.0

4 years ago

2.8.1-dev.0

4 years ago

2.9.0

4 years ago

2.8.3

5 years ago

2.8.2

5 years ago

2.8.4

5 years ago

2.8.1

5 years ago

2.8.0

5 years ago

2.6.22

5 years ago

2.7.0

5 years ago

2.6.20

5 years ago

2.6.21

5 years ago

2.6.19

5 years ago

2.6.18

5 years ago

2.6.17

5 years ago

2.6.15

5 years ago

2.6.16

5 years ago

2.6.15-rc.7

5 years ago

2.6.15-rc.5

5 years ago

2.6.15-rc.4

5 years ago

2.6.15-rc.3

5 years ago

2.6.15-rc.2

5 years ago

2.6.15-rc.1

5 years ago

2.6.13

5 years ago

2.6.14

5 years ago

2.6.12

5 years ago

2.6.11

5 years ago

2.6.10

5 years ago

2.6.9

5 years ago

2.6.8

5 years ago

2.6.7

5 years ago

2.6.5

5 years ago

2.6.6

5 years ago

2.6.4

5 years ago

2.6.3

5 years ago

2.6.2

5 years ago

2.6.0

5 years ago

2.5.1

5 years ago

2.5.0

5 years ago

2.4.8

5 years ago

2.4.7

5 years ago

2.4.6

5 years ago

2.4.5

5 years ago

2.4.4

5 years ago

2.4.3

5 years ago

2.4.2

5 years ago

2.4.1

5 years ago

2.4.0

5 years ago

2.3.0

5 years ago

2.2.0

6 years ago

2.1.5

6 years ago

2.1.4

6 years ago

2.1.3

6 years ago

2.1.2

6 years ago

2.1.1

6 years ago

2.1.0

6 years ago

2.0.0

6 years ago

1.1.2

6 years ago

1.1.1

6 years ago

1.0.5

6 years ago

1.0.4

6 years ago

1.0.3

6 years ago

1.0.2

6 years ago

1.0.1

6 years ago

1.0.0

6 years ago

0.5.0

6 years ago

0.4.13

6 years ago

0.4.12

6 years ago

0.4.11

6 years ago

0.4.10

6 years ago

0.4.9

6 years ago

0.4.8

6 years ago

0.4.7

6 years ago

0.4.5

7 years ago

0.4.4

7 years ago

0.4.4-alpha.0

7 years ago

0.4.3

7 years ago

0.4.2

7 years ago

0.4.1

7 years ago

0.4.0

7 years ago

0.3.6

7 years ago

0.3.4

7 years ago

0.3.3

7 years ago

0.3.3-rc.1

7 years ago

0.3.2

7 years ago

0.3.2-rc.1

7 years ago

0.3.1-rc.1

7 years ago

0.3.0

7 years ago

0.3.0-rc.1

7 years ago

0.2.0

7 years ago

0.2.0-rc.1

7 years ago

0.1.1

7 years ago

0.1.0-rc.9

7 years ago

0.1.0

7 years ago

0.1.0-rc.8

7 years ago

0.1.0-rc.7

7 years ago

0.1.0-rc.6

7 years ago

0.1.0-rc.5

7 years ago

0.1.0-rc.4

7 years ago

0.1.0-rc.3

7 years ago

0.1.0-rc.2

7 years ago

0.1.0-rc.1

7 years ago