node-sparky
Cisco Spark SDK for Node JS (Version 3)
var Spark = ; var spark = token: '<my token>' ; spark ;
If you are coming from using node-sparky version 2.x or earlier, note that the architecture, commands, and some variable names have changed. While this release is similar to previous versions, there are some major differences. Please read the API docs below before migrating your code to this release. If you are looking for the old release version, node-sparky@2.0.27 is still available to be installed through NPM.
Features
- Built in rate limiter and outbound queue that allows control over the number of parallel API calls and the minimum time between each call.
- Transparently handles 429 (and/or other customizable) http errors and re-queues those requests.
- File processor for retrieving attachments from room.
- Event emitters tied to request, response, error, retry, and queue drops.
- Returns promises that comply with A+ standards..
- Handles pagination transparently. (Receive unlimited records)
- (new) Support for Spark API Advanced Webhooks
- (new) Support Teams API
- (new) Support for markdown formatted messages
- (new) Support for authenticated HMAC-SHA1 webhooks
Installation
This module can be installed via NPM:
npm install node-sparky --save
Reference
Initialization and Configuration
var Spark = ; var spark = token: 'mytoken' webhookUrl: 'http://mywebhook.url/path';
Classes
Objects
- Room :
object
Room Object
- Person :
object
Person Object
- Message :
object
Message Object
- File :
object
File Object
- Team :
object
Team Object
- TeamMembership :
object
Team Membership Object
- Membership :
object
Membership Object
- Webhook :
object
Webhook Object
- Validator :
object
Spark Validation functions.
Events
- "drop"
Spark Queue Drop Event.
- "request"
Spark request event.
- "reponse"
Spark response event.
- "retry"
Spark retry event.
Spark
Kind: global class
Throw: Error
Throws on spark token missing in options object.
- Spark
- new Spark(options)
- .options :
object
- .roomsGet([max]) ⇒
Promise.<Array>
- .roomsDirect([max]) ⇒
Promise.<Array>
- .roomsGroup([max]) ⇒
Promise.<Array>
- .roomsByTeam(teamId, [max]) ⇒
Promise.<Array>
- .roomGet(roomId) ⇒
Promise.<Room>
- .roomAdd(title) ⇒
Promise.<Room>
- .roomRename(roomId, title) ⇒
Promise.<Room>
- .roomRemove(roomId) ⇒
Promise
- .peopleSearch(displayName, [max]) ⇒
Promise.<Array>
- .personGet(personId) ⇒
Promise.<Person>
- .personMe() ⇒
Promise.<Person>
- .personByEmail(email) ⇒
Promise.<Person>
- .attachmentActionGet(attachmentActionId) ⇒
Promise.<AttachmentAction>
- .attachmentActionCreate(attachmentAction) ⇒
Promise.<AttachmentAction>
- .messagesGet(roomId, [max]) ⇒
Promise.<Array>
- .messageGet(messageId) ⇒
Promise.<Message>
- .messageSendPerson(email, message) ⇒
Promise.<Message>
- .messageSendRoom(roomId, message) ⇒
Promise.<Message>
- .messageStreamRoom(roomId, message) ⇒
Promise.<Message>
- .upload(roomId, filepath) ⇒
Promise.<Message>
- .messageRemove(messageId) ⇒
Promise
- .contentGet(id) ⇒
Promise.<File>
- .contentByUrl(url) ⇒
Promise.<File>
- .teamsGet([max]) ⇒
Promise.<Array>
- .teamGet(teamId) ⇒
Promise.<Team>
- .teamAdd(name) ⇒
Promise.<Team>
- .teamRoomAdd(teamId, title) ⇒
Promise.<Room>
- .teamRename(teamId, name) ⇒
Promise.<Team>
- .teamRemove(teamId) ⇒
Promise
- .teamMembershipsGet(teamId, [max]) ⇒
Promise.<Array>
- .teamMembershipGet(membershipId) ⇒
Promise.<TeamMembership>
- .teamMembershipAdd(teamId, email, moderator) ⇒
Promise.<TeamMembership>
- .teamMembershipSetModerator(membershipId) ⇒
Promise.<TeamMembership>
- .teamMembershipClearModerator(membershipId) ⇒
Promise.<TeamMembership>
- .teamMembershipRemove(membershipId) ⇒
Promise
- .membershipsGet([max]) ⇒
Promise.<Array>
- .membershipsByRoom(roomId, [max]) ⇒
Promise.<Array>
- .membershipGet(membershipId) ⇒
Promise.<Membership>
- .membershipByRoomByEmail(roomId, personEmail) ⇒
Promise.<Membership>
- .membershipAdd(roomId, email, moderator) ⇒
Promise.<Membership>
- .membershipSetModerator(membershipId) ⇒
Promise.<Membership>
- .membershipClearModerator(membershipId) ⇒
Promise.<Membership>
- .membershipRemove(membershipId) ⇒
Promise
- .webhooksGet([max]) ⇒
Promise.<Array>
- .webhookGet(webhookId) ⇒
Promise.<Webhook>
- .webhookAdd(resource, event, name, [filter]) ⇒
Promise.<Webhook>
- .webhookRemove(webhookId) ⇒
Promise
- .webhookAuth(signature, payload) ⇒
Boolen
new Spark(options)
Creates a Spark API instance that is then attached to a Spark Account.
Param | Type | Description |
---|---|---|
options | Object |
Configuration object containing Spark settings |
object
spark.options : Options Object
Kind: instance namespace of Spark
Properties
Name | Type | Default | Description |
---|---|---|---|
token | string |
Spark Token. | |
webhookUrl | string |
URL that is used for SPark API to send callbacks. | |
webhookSecret | string |
If specified, creates webhooks using this secret. The incoming webhook must still be authenticated. See Spark.webhookAuth(). | |
maxPageItems | number |
50 |
Max results that the paginator uses. |
maxConcurrent | number |
3 |
Max concurrent sessions to the Spark API |
minTime | number |
600 |
Min time between consecutive request starts. |
requeueMinTime | number |
minTime*10 |
Min time between consecutive request starts of requests that have been re-queued. |
requeueMaxRetry | number |
3 |
Msx number of atteempts to make for failed request. |
requeueCodes | array |
[429,500,503] |
Array of http result codes that should be retried. |
requestTimeout | number |
20000 |
Timeout for an individual request recieving a response. |
queueSize | number |
10000 |
Size of the buffer that holds outbound requests. |
requeueSize | number |
10000 |
Size of the buffer that holds outbound re-queue requests. |
Promise.<Array>
spark.roomsGet([max]) ⇒ Return all Spark Rooms registered to account.
Kind: instance method of Spark
Param | Type | Description |
---|---|---|
[max] | Integer |
Number of records to return |
Example
spark ;
Promise.<Array>
spark.roomsDirect([max]) ⇒ Return all Spark 1:1 Rooms.
Kind: instance method of Spark
Param | Type | Description |
---|---|---|
[max] | Integer |
Number of records to return |
Example
spark ;
Promise.<Array>
spark.roomsGroup([max]) ⇒ Return all Spark Group Rooms.
Kind: instance method of Spark
Param | Type | Description |
---|---|---|
[max] | Integer |
Number of records to return |
Example
spark ;
Promise.<Array>
spark.roomsByTeam(teamId, [max]) ⇒ Return all Spark Rooms for a particular Team ID.
Kind: instance method of Spark
Param | Type | Description |
---|---|---|
teamId | String |
The Spark Team ID |
[max] | Integer |
Number of records to return |
Example
spark ;
Promise.<Room>
spark.roomGet(roomId) ⇒ Return details of Spark Room by ID.
Kind: instance method of Spark
Param | Type | Description |
---|---|---|
roomId | String |
Spark Room ID |
Example
spark ;
Promise.<Room>
spark.roomAdd(title) ⇒ Add new Spark Room.
Kind: instance method of Spark
Param | Type | Description |
---|---|---|
title | String |
Title for new Room |
Example
spark ;
Promise.<Room>
spark.roomRename(roomId, title) ⇒ Rename Spark Room.
Kind: instance method of Spark
Param | Type | Description |
---|---|---|
roomId | String |
Spark Room ID |
title | String |
Title for new Room |
Example
spark ;
Promise
spark.roomRemove(roomId) ⇒ Remove Spark Room by ID.
Kind: instance method of Spark
Param | Type | Description |
---|---|---|
roomId | String |
Spark Room ID |
Example
spark ;
Promise.<Array>
spark.peopleSearch(displayName, [max]) ⇒ Search Spark for People by display name.
Kind: instance method of Spark
Param | Type | Description |
---|---|---|
displayName | String |
Search String to find as display name |
[max] | Integer |
Number of records to return |
Example
spark ;
Promise.<Person>
spark.personGet(personId) ⇒ Return details of Spark User by ID.
Kind: instance method of Spark
Param | Type | Description |
---|---|---|
personId | String |
Spark Person ID |
Example
spark ;
Promise.<Person>
spark.personMe() ⇒ Return details of Spark User that has authenticated.
Kind: instance method of Spark
Example
spark ;
Promise.<Person>
spark.personByEmail(email) ⇒ Return details of Spark User by Email.
Kind: instance method of Spark
Param | Type | Description |
---|---|---|
String |
Email address of Spark User |
Example
spark ;
Promise.<AttachmentAction>
spark.attachmentActionGet(attachmentActionId) ⇒ Return details of an attachment action by ID.
Kind: instance method of Spark
Returns: Promise.<AttachmentAction>
- AttachmentAction object
Param | Type | Description |
---|---|---|
attachmentActionId | String |
AttachmentAction ID |
Example
spark ;
Promise.<AttachmentAction>
spark.attachmentActionCreate(attachmentAction) ⇒ Create an Attachment Action.
Kind: instance method of Spark
Returns: Promise.<AttachmentAction>
- AttachmentAction object
Param | Type | Description |
---|---|---|
attachmentAction | Object.<AttachmentAction> |
Attachment Action to create |
Example
const newAttachmentAction = type: 'submit' messageId: 'Tm90aGluZyB0byBzZWUgaGVy' "inputs": "Name": "John Andersen" "Url": "https://example.com" "Email": "john.andersen@example.com" "Tel": "+1 408 526 7209" spark ;
Promise.<Array>
spark.messagesGet(roomId, [max]) ⇒ Return messages in a Spark Room.
Kind: instance method of Spark
Param | Type | Description |
---|---|---|
roomId | String |
Spark Room ID |
[max] | Integer |
Number of records to return |
Example
spark ;
Promise.<Message>
spark.messageGet(messageId) ⇒ Return details of Spark Message by ID.
Kind: instance method of Spark
Param | Type | Description |
---|---|---|
messageId | String |
Spark Message ID |
Example
spark ;
Promise.<Message>
spark.messageSendPerson(email, message) ⇒ Sends 1:1 Spark message to a person.
Kind: instance method of Spark
Param | Type | Description |
---|---|---|
String |
Email address of Spark User | |
message | Object |
Message Object |
Example
spark ;
Promise.<Message>
spark.messageSendRoom(roomId, message) ⇒ Sends Spark message to a room.
Kind: instance method of Spark
Param | Type | Description |
---|---|---|
roomId | String |
Spark Room ID |
message | Object |
Message Object |
Example
spark ;
Promise.<Message>
spark.messageStreamRoom(roomId, message) ⇒ Streams Spark message to a room.
Kind: instance method of Spark
Param | Type | Description |
---|---|---|
roomId | String |
Spark Room ID |
message | Object |
Message Object |
Example
var roomId = 'Tm90aGluZyB0byBzZWUgaGVyZS4uLiBNb3ZlIGFsb25nLi4u';var text = 'Hello';var filename = 'test.png';var stream = fs;var message = 'text': text 'filename': filename 'stream': stream ;spark ;
Promise.<Message>
spark.upload(roomId, filepath) ⇒ Upload a file by path to Spark Room
Kind: instance method of Spark
Param | Type | Description |
---|---|---|
roomId | String |
Spark Room ID |
filepath | String |
path to file |
Example
var roomId = 'Tm90aGluZyB0byBzZWUgaGVyZS4uLiBNb3ZlIGFsb25nLi4u';spark;
Promise
spark.messageRemove(messageId) ⇒ Remove Spark Message by ID.
Kind: instance method of Spark
Param | Type | Description |
---|---|---|
messageId | String |
Spark Message ID |
Example
spark ;
Promise.<File>
spark.contentGet(id) ⇒ Return details of Spark File by Content ID.
Kind: instance method of Spark
Param | Type | Description |
---|---|---|
id | String |
Spark Content ID |
Example
spark ;
Promise.<File>
spark.contentByUrl(url) ⇒ Return details of Spark File by Spark Content URL.
Kind: instance method of Spark
Param | Type | Description |
---|---|---|
url | String |
Spark Content URL |
Example
spark ;
Promise.<Array>
spark.teamsGet([max]) ⇒ Return all Spark Teams registered to account.
Kind: instance method of Spark
Param | Type | Description |
---|---|---|
[max] | Integer |
Number of records to return |
Example
spark ;
Promise.<Team>
spark.teamGet(teamId) ⇒ Return details of Spark Team by ID.
Kind: instance method of Spark
Param | Type | Description |
---|---|---|
teamId | String |
Spark Team ID |
Example
spark ;
Promise.<Team>
spark.teamAdd(name) ⇒ Add new Spark Team.
Kind: instance method of Spark
Param | Type | Description |
---|---|---|
name | String |
Name for new Team |
Example
spark ;
Promise.<Room>
spark.teamRoomAdd(teamId, title) ⇒ Add new Spark Team Room.
Kind: instance method of Spark
Param | Type | Description |
---|---|---|
teamId | String |
Spark Team ID |
title | String |
Title for new Room |
Example
spark ;
Promise.<Team>
spark.teamRename(teamId, name) ⇒ Rename a Spark Team.
Kind: instance method of Spark
Param | Type | Description |
---|---|---|
teamId | String |
Spark Team ID |
name | String |
Name for new Team |
Example
spark ;
Promise
spark.teamRemove(teamId) ⇒ Remove Spark Team by ID.
Kind: instance method of Spark
Param | Type | Description |
---|---|---|
teamId | String |
Spark Team ID |
Example
spark ;
Promise.<Array>
spark.teamMembershipsGet(teamId, [max]) ⇒ Return all Spark Team Memberships for a specific Team.
Kind: instance method of Spark
Param | Type | Description |
---|---|---|
teamId | String |
Spark Team ID |
[max] | Integer |
Number of records to return |
Example
spark ;
Promise.<TeamMembership>
spark.teamMembershipGet(membershipId) ⇒ Return Spark Team Membership by ID.
Kind: instance method of Spark
Param | Type | Description |
---|---|---|
membershipId | String |
Spark Membership ID |
Example
spark ;
Promise.<TeamMembership>
spark.teamMembershipAdd(teamId, email, moderator) ⇒ Add new Spark Team Membership.
Kind: instance method of Spark
Param | Type | Description |
---|---|---|
teamId | String |
Spark Team ID |
String |
Email address of person to add | |
moderator | Boolean |
Boolean value to add as moderator |
Example
spark ;
Promise.<TeamMembership>
spark.teamMembershipSetModerator(membershipId) ⇒ Set a Team Membership as moderator.
Kind: instance method of Spark
Param | Type | Description |
---|---|---|
membershipId | String |
Spark Membership ID |
Example
spark ;
Promise.<TeamMembership>
spark.teamMembershipClearModerator(membershipId) ⇒ Remove a Team Membership as moderator.
Kind: instance method of Spark
Param | Type | Description |
---|---|---|
membershipId | String |
Spark Membership ID |
Example
spark ;
Promise
spark.teamMembershipRemove(membershipId) ⇒ Remove Spark Team Membership by ID..
Kind: instance method of Spark
Param | Type | Description |
---|---|---|
membershipId | String |
Spark Membership ID |
Example
spark ;
Promise.<Array>
spark.membershipsGet([max]) ⇒ Return all Spark Memberships registered to account..
Kind: instance method of Spark
Param | Type | Description |
---|---|---|
[max] | Integer |
Number of records to return |
Example
spark ;
Promise.<Array>
spark.membershipsByRoom(roomId, [max]) ⇒ Return all Spark Memberships in a Spark Room..
Kind: instance method of Spark
Param | Type | Description |
---|---|---|
roomId | String |
Spark Room ID |
[max] | Integer |
Number of records to return |
Example
spark ;
Promise.<Membership>
spark.membershipGet(membershipId) ⇒ Return Spark Membership by ID..
Kind: instance method of Spark
Param | Type | Description |
---|---|---|
membershipId | String |
Spark Membership ID |
Example
spark ;
Promise.<Membership>
spark.membershipByRoomByEmail(roomId, personEmail) ⇒ Return Spark Membership by Room and Email..
Kind: instance method of Spark
Param | Type | Description |
---|---|---|
roomId | String |
Spark Membership ID |
personEmail | String |
Email of Person |
Example
spark ;
Promise.<Membership>
spark.membershipAdd(roomId, email, moderator) ⇒ Add new Spark Membership..
Kind: instance method of Spark
Param | Type | Description |
---|---|---|
roomId | String |
Spark Room ID |
String |
Email address of person to add | |
moderator | Boolean |
Boolean value to add as moderator |
Example
spark ;
Promise.<Membership>
spark.membershipSetModerator(membershipId) ⇒ Set a Membership as moderator.
Kind: instance method of Spark
Param | Type | Description |
---|---|---|
membershipId | String |
Spark Membership ID |
Example
spark ;
Promise.<Membership>
spark.membershipClearModerator(membershipId) ⇒ Remove a Membership as moderator.
Kind: instance method of Spark
Param | Type | Description |
---|---|---|
membershipId | String |
Spark Membership ID |
Example
spark ;
Promise
spark.membershipRemove(membershipId) ⇒ Remove Spark Membership by ID.
Kind: instance method of Spark
Param | Type | Description |
---|---|---|
membershipId | String |
Spark Membership ID |
Example
spark ;
Promise.<Array>
spark.webhooksGet([max]) ⇒ Return all Spark Webhooks registered to account.
Kind: instance method of Spark
Param | Type | Description |
---|---|---|
[max] | Integer |
Number of records to return |
Example
spark ;
Promise.<Webhook>
spark.webhookGet(webhookId) ⇒ Return details of Spark Webhook by ID.
Kind: instance method of Spark
Param | Type | Description |
---|---|---|
webhookId | String |
Spark Webhook ID |
Example
spark ;
Promise.<Webhook>
spark.webhookAdd(resource, event, name, [filter]) ⇒ Add new Spark Webhook.
Kind: instance method of Spark
Param | Type | Description |
---|---|---|
resource | String |
Resource for webhook |
event | String |
Event for webhook |
name | String |
Name assigned to webhook to add |
[filter] | String |
filter |
Example
spark ;
Promise
spark.webhookRemove(webhookId) ⇒ Remove Spark Webhook by ID.
Kind: instance method of Spark
Param | Type | Description |
---|---|---|
webhookId | String |
Spark Webhook ID. |
Example
spark ;
Boolen
spark.webhookAuth(signature, payload) ⇒ Authenticate X-Spark-Signature HMAC-SHA1 Hash.
Kind: instance method of Spark
Param | Type | Description |
---|---|---|
signature | String |
Value of "X-Spark-Signature" from header |
payload | String | Object |
This can either be the json object or a string representation of the webhook's body json payload |
Example
var sig = reqheaders'x-spark-signature';ifspark // webhook is valid else // webhook is invalid
object
Room : Room Object
Kind: global namespace
Properties
Name | Type | Description |
---|---|---|
id | string |
Room ID |
title | string |
Room Title |
type | string |
Room Type |
isLocked | boolean |
Room Moderated/Locked |
teamId | string |
Team ID |
lastActivity | date |
Last Activity in Room |
created | date |
Room Created |
object
Person : Person Object
Kind: global namespace
Properties
Name | Type | Description |
---|---|---|
id | string |
Person ID |
emails | array |
Emails |
displayName | string |
Display Name |
avatar | string |
Avatar URL |
created | date |
Date created |
string |
||
username | string |
Username |
domain | string |
Domain name |
object
Message : Message Object
Kind: global namespace
Properties
Name | Type | Description |
---|---|---|
id | string |
Message ID |
personId | string |
Person ID |
personEmail | string |
Person Email |
roomId | string |
Room ID |
text | string |
Message text |
files | array |
Array of File objects |
created | date |
Date Message created |
object
File : File Object
Kind: global namespace
Properties
Name | Type | Description |
---|---|---|
id | string |
Spark API Content ID |
name | string |
File name |
ext | string |
File extension |
type | string |
Header [content-type] for file |
binary | buffer |
File contents as binary |
base64 | string |
File contents as base64 encoded string |
object
Team : Team Object
Kind: global namespace
Properties
Name | Type | Description |
---|---|---|
id | string |
Message ID |
name | string |
Team name |
created | date |
Date Team created |
object
TeamMembership : Team Membership Object
Kind: global namespace
Properties
Name | Type | Description |
---|---|---|
id | string |
Membership ID |
teamId | string |
Team ID |
personId | string |
Person ID |
personEmail | string |
Person Email |
isModerator | boolean |
Membership is a moderator |
created | date |
Date Membership created |
object
Membership : Membership Object
Kind: global namespace
Properties
Name | Type | Description |
---|---|---|
id | string |
Membership ID |
personId | string |
Person ID |
personEmail | string |
Person Email |
isModerator | boolean |
Membership is a moderator |
isMonitor | boolean |
Membership is a monitor |
created | date |
Date Membership created |
object
Webhook : Webhook Object
Kind: global namespace
Properties
Name | Type | Description |
---|---|---|
id | string |
Webhook ID |
name | string |
Webhook name |
targetUrl | string |
Webhook target URL |
resource | boolean |
Webhook resource |
event | boolean |
Webhook event |
filter | boolean |
Webhook filter |
created | date |
Date Webhook created |
object
Validator : Spark Validation functions.
Kind: global namespace
- Validator :
object
- .isEmail(email) ⇒
Boolean
- .isUrl(url) ⇒
Boolean
- .isFilePath(path) ⇒
Boolean
- .isRoom(object) ⇒
Boolean
- .isPerson(object) ⇒
Boolean
- .isMessage(object) ⇒
Boolean
- .isMembership(object) ⇒
Boolean
- .isWebhook(object) ⇒
Boolean
- .isTeam(object) ⇒
Boolean
- .isRooms(rooms) ⇒
Boolean
- .isPeople(persons) ⇒
Boolean
- .isMessages(messages) ⇒
Boolean
- .isMemberships(memberships) ⇒
Boolean
- .isWebhooks(webhooks) ⇒
Boolean
- .isTeams(teams) ⇒
Boolean
- .isEmail(email) ⇒
Boolean
Validator.isEmail(email) ⇒ Validate String is Email.
Kind: static method of Validator
Param | Type |
---|---|
String |
Boolean
Validator.isUrl(url) ⇒ Validate String is URL.
Kind: static method of Validator
Param | Type |
---|---|
url | String |
Boolean
Validator.isFilePath(path) ⇒ Validate String is File path.
Kind: static method of Validator
Param | Type |
---|---|
path | String |
Boolean
Validator.isRoom(object) ⇒ Validate Spark Room Object.
Kind: static method of Validator
Param | Type |
---|---|
object | Room |
Boolean
Validator.isPerson(object) ⇒ Validate Spark Person Object.
Kind: static method of Validator
Param | Type |
---|---|
object | Room |
Boolean
Validator.isMessage(object) ⇒ Validate Spark Message Object.
Kind: static method of Validator
Param | Type |
---|---|
object | Message |
Boolean
Validator.isMembership(object) ⇒ Validate Spark Membership Object.
Kind: static method of Validator
Param | Type |
---|---|
object | Membership |
Boolean
Validator.isWebhook(object) ⇒ Validate Spark Webhook Object.
Kind: static method of Validator
Param | Type |
---|---|
object | Webhook |
Boolean
Validator.isTeam(object) ⇒ Validate Spark Team Object.
Kind: static method of Validator
Param | Type |
---|---|
object | Team |
Boolean
Validator.isRooms(rooms) ⇒ Validate Spark Room Objects in Array.
Kind: static method of Validator
Param | Type |
---|---|
rooms | Array |
Boolean
Validator.isPeople(persons) ⇒ Validate Spark Person Objects in Array.
Kind: static method of Validator
Param | Type |
---|---|
persons | Array |
Boolean
Validator.isMessages(messages) ⇒ Validate Spark Message Objects in Array.
Kind: static method of Validator
Param | Type |
---|---|
messages | Array |
Boolean
Validator.isMemberships(memberships) ⇒ Validate Spark Membership Objects in Array.
Kind: static method of Validator
Param | Type |
---|---|
memberships | Array |
Boolean
Validator.isWebhooks(webhooks) ⇒ Validate Spark Webhook Objects in Array.
Kind: static method of Validator
Param | Type |
---|---|
webhooks | Array |
Boolean
Validator.isTeams(teams) ⇒ Validate Spark Team Objects in Array.
Kind: static method of Validator
Param | Type |
---|---|
teams | Array |
"drop"
Spark Queue Drop Event.
Kind: event emitted
Properties
Name | Type | Description |
---|---|---|
request | options |
API Request |
id | string |
Spark UUID |
"request"
Spark request event.
Kind: event emitted
Properties
Name | Type | Description |
---|---|---|
request | options |
API Request |
id | string |
Spark UUID |
"reponse"
Spark response event.
Kind: event emitted
Properties
Name | Type | Description |
---|---|---|
response | options |
Response |
id | string |
Spark UUID |
"retry"
Spark retry event.
Kind: event emitted
Properties
Name | Type | Description |
---|---|---|
request | options |
API Request |
id | string |
Spark UUID |
License
The MIT License (MIT)
Copyright (c) 2016-2017
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.