0.1.2 • Published 6 years ago

redux-autobahn-js v0.1.2

Weekly downloads
4
License
WTFPL
Repository
github
Last release
6 years ago

redux-autobahn-js

Objects

redux-autobahn:actions : object

Kind: global namespace

redux-autobahn:actions.openConnection() ⇒ object

Returns a redux action with type OPEN_CONNECTION

Kind: static method of redux-autobahn:actions
Returns: object - redux action

redux-autobahn:actions.closeConnection() ⇒ object

Returns a redux action with type CLOSE_CONNECTION

Kind: static method of redux-autobahn:actions
Returns: object - redux action

redux-autobahn:actions.subscribe(topic) ⇒ object

Returns a redux action with type SUBSCRIBE and the given topic

Kind: static method of redux-autobahn:actions
Returns: object - redux action

ParamTypeDescription
topicstringThe topic being subscribed to.

redux-autobahn:actions.unsubscribe(subscriptionOrTopic) ⇒ object

Returns a redux action with type UNSUBSCRIBE and the given subscription or topic

Kind: static method of redux-autobahn:actions
Returns: object - redux action

ParamTypeDescription
subscriptionOrTopicobject | stringThe subscription or topic being unsubscribed from.

redux-autobahn:actions.publish(topic, args, kwargs, options) ⇒ object

Returns a redux action with type PUBLISH and the given topic, args, kwargs, and options

Kind: static method of redux-autobahn:actions
Returns: object - redux action

ParamTypeDescription
topicstringThe topic being subscribed to.
argsArrayAn array of arguments.
kwargsobjectAn object of keyword arguments.
optionsobjectAn object of options.

redux-autobahn:actions.register(procedure, endpoint, options) ⇒ object

Returns a redux action with type REGISTER and the given procedure, endpoint, and options

Kind: static method of redux-autobahn:actions
Returns: object - redux action

ParamTypeDescription
procedurestringThe procedure name being registered.
endpointfunctionThe endpoint function being registered.
optionsobjectAn object of options.

redux-autobahn:actions.unregister(registration) ⇒ object

Returns a redux action with type UNREGISTER and the given registration object

Kind: static method of redux-autobahn:actions
Returns: object - redux action

ParamTypeDescription
registrationobjectThe registration object.

redux-autobahn:actions.call(procedure, args, kwargs, options, resultAction, errorAction) ⇒ object

Returns a redux action with type CALL and the given procedure, args, kwargs, and options

Kind: static method of redux-autobahn:actions
Returns: object - redux action

ParamTypeDescription
procedurestringThe procedure name being called.
argsArrayAn array of arguments.
kwargsobjectAn object of keyword arguments.
optionsobjectAn object of options.
resultActionobject(optional) An action to be dispatched on call success.
errorActionobject(optional) An action to be dispatched on call error.

redux-autobahn:middleware : object

Kind: global namespace

redux-autobahn:middleware.connected() ⇒ object

Returns a redux action with type CONNECTED

Kind: static method of redux-autobahn:middleware
Returns: object - redux action

redux-autobahn:middleware.disconnected() ⇒ object

Returns a redux action with type DISCONNECTED

Kind: static method of redux-autobahn:middleware
Returns: object - redux action

redux-autobahn:middleware.connectionOpened(connection) ⇒ object

Returns a redux action with type CONNECTION_OPENED and the given session object

Kind: static method of redux-autobahn:middleware
Returns: object - redux action

ParamTypeDescription
connectionobjectThe object for the opened connection.

redux-autobahn:middleware.connectionClosed(reason, details) ⇒ object

Returns a redux action with type CONNECTION_CLOSED

Kind: static method of redux-autobahn:middleware
Returns: object - redux action

ParamTypeDescription
reasonstringreason for disconnection
detailsobjectdisconnect details

redux-autobahn:middleware.subscribed(subscription) ⇒ object

Returns a redux action with type SUBSCRIBED and the given subscription object and it's topic

Kind: static method of redux-autobahn:middleware
Returns: object - redux action

ParamTypeDescription
subscriptionobjectThe subscription object for the topic that was subscribed to.

redux-autobahn:middleware.subscribeError(error) ⇒ object

Returns a redux action with type SUBSCRIBE_ERROR and the given subscription error object

Kind: static method of redux-autobahn:middleware
Returns: object - redux action

ParamTypeDescription
errorobjectThe error that occurred while subscribing.

redux-autobahn:middleware.unsubscribed(subscription) ⇒ object

Returns a redux action with type UNSUBSCRIBED and the given subscription object and it's topic

Kind: static method of redux-autobahn:middleware
Returns: object - redux action

ParamTypeDescription
subscriptionobjectThe subscription object for the topic that was unsubscribed from.

redux-autobahn:middleware.unsubscribeError(error) ⇒ object

Returns a redux action with type UNSUBSCRIBE_ERROR and the given unsubscription error object

Kind: static method of redux-autobahn:middleware
Returns: object - redux action

ParamTypeDescription
errorobjectThe error that occurred while unsubscribing.

redux-autobahn:middleware.published(publication, topic, args, kwargs, options) ⇒ object

Returns a redux action with type PUBLISHED and the given publication, topic, args, kwargs, and options

Kind: static method of redux-autobahn:middleware
Returns: object - redux action

ParamTypeDescription
publicationstringThe publication being published to.
topicstringThe topic being published to.
argsArrayAn array of arguments.
kwargsobjectAn object of keyword arguments.
optionsobjectAn object of options.

redux-autobahn:middleware.publishError(error) ⇒ object

Returns a redux action with type PUBLISH_ERROR and the given publish error object

Kind: static method of redux-autobahn:middleware
Returns: object - redux action

ParamTypeDescription
errorobjectThe error that occurred while publishing.

redux-autobahn:middleware.event(topic, args, kwargs, details) ⇒ object

Returns a redux action with type EVENT and the given topic, args, kwargs, and details

Kind: static method of redux-autobahn:middleware
Returns: object - redux action

ParamTypeDescription
topicstringThe topic being published to.
argsArrayAn array of arguments.
kwargsobjectAn object of keyword arguments.
detailsobjectAn object of event details.

redux-autobahn:middleware.registered(registration) ⇒ object

Returns a redux action with type REGISTERED and the given registration object

Kind: static method of redux-autobahn:middleware
Returns: object - redux action

ParamTypeDescription
registrationobjectThe registration object being registered to.

redux-autobahn:middleware.registerError(error) ⇒ object

Returns a redux action with type REGISTER_ERROR and the given register error object

Kind: static method of redux-autobahn:middleware
Returns: object - redux action

ParamTypeDescription
errorobjectThe error that occurred while registering.

redux-autobahn:middleware.unregistered(registration) ⇒ object

Returns a redux action with type UNREGISTERED and the given registration object

Kind: static method of redux-autobahn:middleware
Returns: object - redux action

ParamTypeDescription
registrationobjectThe registration object being unregistered from.

redux-autobahn:middleware.unregisterError(error) ⇒ object

Returns a redux action with type UNREGISTER_ERROR and the given unregister error object

Kind: static method of redux-autobahn:middleware
Returns: object - redux action

ParamTypeDescription
errorobjectThe error that occurred while unregistering.

redux-autobahn:middleware.callError(error) ⇒ object

Returns a redux action with type CALL_ERROR and the given call error object

Kind: static method of redux-autobahn:middleware
Returns: object - redux action

ParamTypeDescription
errorobjectThe error that occurred while calling.

redux-autobahn:middleware.result(procedure, args, kwargs, results, options) ⇒ object

Returns a redux action with type RESULT and the given result value

Kind: static method of redux-autobahn:middleware
Returns: object - redux action

ParamTypeDescription
procedureobjectProcedure that was called
argsobjectArguments with which procedure was called
kwargsobjectArguments with which procedure was called
resultsobjectCall results
optionsobjectOptions

redux-autobahn:middleware.isConnected(connection) ⇒ boolean

Returns a boolean that represents if the session for the connection exists and is open, therefore it is connected

Kind: static method of redux-autobahn:middleware
Returns: boolean - returns true if the session for the connection exists and is open

ParamTypeDescription
connectionobjectthe connection object

redux-autobahn:middleware.getSubscription(action) ⇒ object

Returns the subscription from the action

Kind: static method of redux-autobahn:middleware
Returns: object - the subscription on the action

ParamTypeDescription
actionobjectthe redux action

redux-autobahn:middleware.handleAction(connection, dispatch, next, action)

Dispatches actions based on action types

Kind: static method of redux-autobahn:middleware

ParamTypeDescription
connectionobjectthe connection object
dispatchfunctionthe dispatch function
nextfunctionthe next function
actionobjectthe redux action

redux-autobahn:middleware.assert(assertion, message)

Throws an error if the assertion is falsy

Kind: static method of redux-autobahn:middleware
Throws:

  • Error throws an error with the given message if the assertion is falsy
ParamTypeDescription
assertionobjectthe assertion expression
messageobjectthe assertion message

redux-autobahn:middleware.setConnection(newConnection)

Sets the passed connection for the middleware that dispatches opened and closed connection actions and handles actions

Kind: static method of redux-autobahn:middleware

ParamTypeDescription
newConnectionConnectionthe connection object

redux-autobahn:middleware.closeConnection(reason, message)

Closes the current autobahn connection

Kind: static method of redux-autobahn:middleware

ParamTypeDescription
reasonstring(optional) a WAMP URI providing a closing reason to the server side (e.g. 'com.myapp.close.signout'). default is wamp.goodbye.normal
messagestringhuman-readable closing message

redux-autobahn:reducer : object

Kind: global namespace

redux-autobahn:reducer.connection(state, action) ⇒ object

Kind: static method of redux-autobahn:reducer
Returns: object - the new state

ParamTypeDescription
stateobjectthe state
actionobjectredux action

redux-autobahn:reducer.session(state, action) ⇒ object

Kind: static method of redux-autobahn:reducer
Returns: object - the new state

ParamTypeDescription
stateobjectthe state
actionobjectredux action

redux-autobahn:reducer.subscriptions(state, action) ⇒ object

Kind: static method of redux-autobahn:reducer
Returns: object - the new state

ParamTypeDescription
stateobjectthe state
actionobjectredux action

redux-autobahn:reducer.registrations(state, action) ⇒ object

Kind: static method of redux-autobahn:reducer
Returns: object - the new state

ParamTypeDescription
stateobjectthe state
actionobjectredux action

redux-autobahn:types : object

Kind: global namespace

redux-autobahn:types.CONNECTED : string

Kind: static constant of redux-autobahn:types

redux-autobahn:types.DISCONNECTED : string

Kind: static constant of redux-autobahn:types

redux-autobahn:types.OPEN_CONNECTION : string

Kind: static constant of redux-autobahn:types

redux-autobahn:types.CLOSE_CONNECTION : string

Kind: static constant of redux-autobahn:types

redux-autobahn:types.CONNECTION_OPENED : string

Kind: static constant of redux-autobahn:types

redux-autobahn:types.CONNECTION_CLOSED : string

Kind: static constant of redux-autobahn:types

redux-autobahn:types.SUBSCRIBE : string

Kind: static constant of redux-autobahn:types

redux-autobahn:types.SUBSCRIBED : string

Kind: static constant of redux-autobahn:types

redux-autobahn:types.SUBSCRIBE_ERROR : string

Kind: static constant of redux-autobahn:types

redux-autobahn:types.UNSUBSCRIBE : string

Kind: static constant of redux-autobahn:types

redux-autobahn:types.UNSUBSCRIBED : string

Kind: static constant of redux-autobahn:types

redux-autobahn:types.UNSUBSCRIBE_ERROR : string

Kind: static constant of redux-autobahn:types

redux-autobahn:types.PUBLISH : string

Kind: static constant of redux-autobahn:types

redux-autobahn:types.PUBLISHED : string

Kind: static constant of redux-autobahn:types

redux-autobahn:types.PUBLISH_ERROR : string

Kind: static constant of redux-autobahn:types

redux-autobahn:types.EVENT : string

Kind: static constant of redux-autobahn:types

redux-autobahn:types.REGISTER : string

Kind: static constant of redux-autobahn:types

redux-autobahn:types.REGISTERED : string

Kind: static constant of redux-autobahn:types

redux-autobahn:types.REGISTER_ERROR : string

Kind: static constant of redux-autobahn:types

redux-autobahn:types.UNREGISTER : string

Kind: static constant of redux-autobahn:types

redux-autobahn:types.UNREGISTERED : string

Kind: static constant of redux-autobahn:types

redux-autobahn:types.UNREGISTER_ERROR : string

Kind: static constant of redux-autobahn:types

redux-autobahn:types.CALL : string

Kind: static constant of redux-autobahn:types

redux-autobahn:types.CALL_ERROR : string

Kind: static constant of redux-autobahn:types

redux-autobahn:types.RESULT : string

Kind: static constant of redux-autobahn:types

0.1.2

6 years ago

0.1.1

6 years ago

0.1.0

6 years ago