6.0.0 • Published 5 years ago

@datafire/ritc v6.0.0

Weekly downloads
1
License
MIT
Repository
github
Last release
5 years ago

@datafire/ritc

Client library for Ritc

Installation and Usage

npm install --save @datafire/ritc
let ritc = require('@datafire/ritc').create({
  Authorization: ""
});

.then(data => {
  console.log(data);
});

Description

Rules in the Cloud

Actions

listActions

List actions

ritc.listActions(null, context)

Input

This action has no parameters

Output

addAction

Create a new action

ritc.addAction({
  "Action Object": {
    "name": "",
    "channelId": 0,
    "functionId": ""
  }
}, context)

Input

  • input object

Output

removeAction

Delete an action

ritc.removeAction({
  "action_id": ""
}, context)

Input

  • input object
    • action_id required string: Id of action

Output

Output schema unknown

getAction

Get an action

ritc.getAction({
  "action_id": ""
}, context)

Input

  • input object
    • action_id required string: Id of action_id

Output

updateAction

Update information about a specific action

ritc.updateAction({
  "action_id": "",
  "Action Object": {
    "name": "",
    "channelId": 0,
    "functionId": ""
  }
}, context)

Input

  • input object
    • action_id required string: Id of user
    • Action Object required Action59

Output

admin

Ping the server

ritc.admin(null, context)

Input

This action has no parameters

Output

  • output object

logInRitc

Log a message

ritc.logInRitc({
  "message": {}
}, context)

Input

  • input object
    • message required object

Output

  • output object

pingRitc

Ping the server

ritc.pingRitc(null, context)

Input

This action has no parameters

Output

  • output object

listApps

Get apps information

ritc.listApps(null, context)

Input

This action has no parameters

Output

addApp

Create a new app

ritc.addApp({
  "App Object": {}
}, context)

Input

  • input object
    • App Object required App

Output

listAppChannels

Get app channels

ritc.listAppChannels(null, context)

Input

This action has no parameters

Output

listAppChannelUsers

Get users of a specified channel

ritc.listAppChannelUsers({
  "channel_id": ""
}, context)

Input

  • input object
    • channel_id required string: Id of Channel

Output

getAppChannelUser

Get user of a specified channel

ritc.getAppChannelUser({
  "channel_id": "",
  "user_id": ""
}, context)

Input

  • input object
    • channel_id required string: Id of Channel
    • user_id required string: Id of User

Output

addAppChannelUser

Create user channel

ritc.addAppChannelUser({
  "channel_id": "",
  "user_id": ""
}, context)

Input

  • input object
    • channel_id required string: Id of Channel
    • user_id required string: Id of User

Output

listChannelExternalCredentials

Get external credentials

ritc.listChannelExternalCredentials(null, context)

Input

This action has no parameters

Output

addChannelExternalCredentials

Create new external credentials

ritc.addChannelExternalCredentials({
  "App_External_Credentials Object": {}
}, context)

Input

Output

removeChannelExternalCredentials

Delete credentials for a channel

ritc.removeChannelExternalCredentials({
  "channel_id": ""
}, context)

Input

  • input object
    • channel_id required string: Id of Channel

Output

Output schema unknown

getChannelExternalCredentials

Get credentials for a channel in an app

ritc.getChannelExternalCredentials({
  "channel_id": ""
}, context)

Input

  • input object
    • channel_id required string: Id of Channel

Output

updateChannelExternalCredentials

Update credentials for a channel

ritc.updateChannelExternalCredentials({
  "channel_id": "",
  "App_External_Credentials Object": {}
}, context)

Input

  • input object

Output

runRuleGroup

Run specified rule group in the app

ritc.runRuleGroup({
  "rule_id_list": ""
}, context)

Input

  • input object
    • rule_id_list required string: Ids of rules in the group, separated by commas, no spaces
    • initial_data object
    • break_when_rule_fires boolean: Do not continue with remaining rules after a rule fires

Output

runApp

Run active app rules

ritc.runApp({}, context)

Input

  • input object
    • initial_data object
    • break_when_rule_fires boolean: Do not continue with remaining rules after a rule fires

Output

removeApp

Delete an app

ritc.removeApp({
  "app_id": ""
}, context)

Input

  • input object
    • app_id required string: Id of App

Output

Output schema unknown

getApp

Get app information

ritc.getApp({
  "app_id": ""
}, context)

Input

  • input object
    • app_id required string: Id of App

Output

updateApp

Update an app

ritc.updateApp({
  "app_id": "",
  "App Object": {}
}, context)

Input

  • input object
    • app_id required string: Id of app
    • App Object required App

Output

listChannels

Retrieve Channels

ritc.listChannels(null, context)

Input

This action has no parameters

Output

addChannel

Create a channel

ritc.addChannel({
  "Channel Object": {}
}, context)

Input

  • input object

Output

listAnonymousChannels

Retrieve Channels anonymously

ritc.listAnonymousChannels(null, context)

Input

This action has no parameters

Output

removeChannel

Delete a channel

ritc.removeChannel({
  "channel_id": ""
}, context)

Input

  • input object
    • channel_id required string: Id of Channel

Output

Output schema unknown

getChannel

Get channel information

ritc.getChannel({
  "channel_id": ""
}, context)

Input

  • input object
    • channel_id required string: Id of Channel

Output

updateChannel

Update a channel

ritc.updateChannel({
  "channel_id": "",
  "Channel Object": {}
}, context)

Input

  • input object
    • channel_id required string: Id of Channel
    • Channel Object required Rule

Output

listChannelFunctions

Retrieve Channel Functions

ritc.listChannelFunctions({
  "channel_id": ""
}, context)

Input

  • input object
    • channel_id required string: Id of Channel

Output

addChannelFunction

Create a channel function

ritc.addChannelFunction({
  "channel_id": "",
  "Channel Function Object": {}
}, context)

Input

  • input object
    • channel_id required string: Id of Channel
    • Channel Function Object required Function7

Output

getChannelFunction

Get channel function information

ritc.getChannelFunction({
  "channel_id": "",
  "function_id": ""
}, context)

Input

  • input object
    • channel_id required string: Id of Channel
    • function_id required string: Id of Channel Function

Output

addOrganization

Create an org

ritc.addOrganization({
  "Org Object": {
    "name": ""
  }
}, context)

Input

  • input object
    • Org Object required Org

Output

getMyOrganization

Get org information

ritc.getMyOrganization(null, context)

Input

This action has no parameters

Output

listRules

List rules

ritc.listRules(null, context)

Input

This action has no parameters

Output

addRule

Create a new rule

ritc.addRule({
  "Rule Object": {}
}, context)

Input

  • input object
    • Rule Object required Rule

Output

removeRule

Delete a rule

ritc.removeRule({
  "rule_id": ""
}, context)

Input

  • input object
    • rule_id required string: Id of rule

Output

Output schema unknown

getRule

Get a rule

ritc.getRule({
  "rule_id": ""
}, context)

Input

  • input object
    • rule_id required string: Id of rule

Output

updateRule

Update information about a specific rule

ritc.updateRule({
  "rule_id": "",
  "Rule Object": {}
}, context)

Input

  • input object
    • rule_id required string: Id of user
    • Rule Object required Rule

Output

runRule

Run a rule

ritc.runRule({
  "rule_id": ""
}, context)

Input

  • input object
    • rule_id required string: Id of rule
    • initial_data object

Output

  • output object

listTriggers

Triggers in an app

ritc.listTriggers(null, context)

Input

This action has no parameters

Output

addTrigger

Create a new trigger in an app

ritc.addTrigger({
  "Trigger Object": {
    "name": "",
    "channelId": 0,
    "functionId": ""
  }
}, context)

Input

  • input object

Output

removeTrigger

Delete a trigger

ritc.removeTrigger({
  "trigger_id": ""
}, context)

Input

  • input object
    • trigger_id required string: Id of Trigger

Output

Output schema unknown

getTrigger

Get a trigger

ritc.getTrigger({
  "trigger_id": ""
}, context)

Input

  • input object
    • trigger_id required string: Id of Trigger

Output

updateTrigger

Update a trigger

ritc.updateTrigger({
  "trigger_id": "",
  "Trigger Object": {
    "name": "",
    "channelId": 0,
    "functionId": ""
  }
}, context)

Input

  • input object
    • trigger_id required string: Id of user
    • Trigger Object required Trigger54

Output

listAppUsers

Users

ritc.listAppUsers(null, context)

Input

This action has no parameters

Output

addAppUser

Create a new App User

ritc.addAppUser({
  "App User Object": {}
}, context)

Input

  • input object

Output

listAdminUsers

Admin users

ritc.listAdminUsers(null, context)

Input

This action has no parameters

Output

addAdminUser

Create a new admin user

ritc.addAdminUser({
  "Admin_User Object": {}
}, context)

Input

  • input object

Output

removeAdminUser

Remove an admin user

ritc.removeAdminUser({
  "user_id": ""
}, context)

Input

  • input object
    • user_id required string: Id of Admin_User

Output

Output schema unknown

getAdminUser

Get an admin user

ritc.getAdminUser({
  "user_id": ""
}, context)

Input

  • input object
    • user_id required string: Id of Admin_User

Output

updateAdminUser

Update information about an admin user

ritc.updateAdminUser({
  "user_id": "",
  "Admin_User Object": {}
}, context)

Input

  • input object
    • user_id required string: Id of user
    • Admin_User Object required AdminUser

Output

authenticateAppUserForChannel

Authenticate a user for a channel

ritc.authenticateAppUserForChannel({
  "user_id": "",
  "channel_id": ""
}, context)

Input

  • input object
    • user_id required string: Id of User
    • channel_id required string: Id of Channel

Output

removeAppUser

Remove a user

ritc.removeAppUser({
  "user_id": ""
}, context)

Input

  • input object
    • user_id required string: Id of user

Output

Output schema unknown

getAppUser

Get an App User

ritc.getAppUser({
  "user_id": ""
}, context)

Input

  • input object
    • user_id required string: Id of App User

Output

updateAppUser

Update information about an App User

ritc.updateAppUser({
  "user_id": "",
  "App User Object": {}
}, context)

Input

  • input object
    • user_id required string: Id of user
    • App User Object required AppUser

Output

listAppUserChannels

Channels available to a User

ritc.listAppUserChannels({
  "user_id": ""
}, context)

Input

  • input object
    • user_id required string: Id of user

Output

addAppUserToChannel

Assign a channel to a user

ritc.addAppUserToChannel({
  "user_id": "",
  "channel_id": ""
}, context)

Input

  • input object
    • user_id required string: Id of user
    • channel_id required string

Output

removeAppUserFromChannel

Remove a user channel assignment

ritc.removeAppUserFromChannel({
  "user_id": "",
  "channel_id": ""
}, context)

Input

  • input object
    • user_id required string: Id of User
    • channel_id required string: Id of Channel

Output

Output schema unknown

getAppUserChannel

Get a user channel

ritc.getAppUserChannel({
  "user_id": "",
  "channel_id": ""
}, context)

Input

  • input object
    • user_id required string: Id of User
    • channel_id required string: Id of Channel

Output

listAppUserRules

Rules for a User

ritc.listAppUserRules({
  "user_id": ""
}, context)

Input

  • input object
    • user_id required string: Id of user

Output

removeAppUserFromRule

Remove a rule user

ritc.removeAppUserFromRule({
  "user_id": "",
  "rule_id": ""
}, context)

Input

  • input object
    • user_id required string: Id of User
    • rule_id required string: Id of Rule

Output

Output schema unknown

getAppUserRule

Get a user

ritc.getAppUserRule({
  "user_id": "",
  "rule_id": ""
}, context)

Input

  • input object
    • user_id required string: Id of User
    • rule_id required string: Id of Rule

Output

addAppUserToRule

Assign a user to a rule

ritc.addAppUserToRule({
  "user_id": "",
  "rule_id": ""
}, context)

Input

  • input object
    • user_id required string: Id of User
    • rule_id required string: Id of Rule

Output

runRuleForAppUser

Run rule for a user

ritc.runRuleForAppUser({
  "user_id": "",
  "rule_id": ""
}, context)

Input

  • input object
    • user_id required string: Id of User
    • rule_id required string: Id of Rule

Output

  • output object

Definitions

Action

  • Action object
    • channelId string
    • createdDate string: The date the rule was created
    • description string
    • functionId string
    • id string
    • modifiedDate string: The date the rule was modified
    • name string
    • status Status

Action59

  • Action59 object
    • channelId required integer: Id of channel used by action
    • codes object: Object containing named Javascript code sets
    • desc string: Action description
    • functionId required string: Hash id of channel function used by action
    • name required string: Action name
    • parameters object: Object containing channel-defined action parameters

ActionFullResponse

  • Action_Full_Response object
    • channelId integer
    • codes object
    • createdDate string: The date the action was created
    • description string: Action description
    • functionId string
    • id integer
    • modifiedDate string: The date the action was modified
    • name string: Action name
    • parameters object
    • status Status

ActionShortResponse

  • Action_Short_Response object
    • channelId string
    • createdDate string: The date the action was created
    • description string: Action description
    • functionId string
    • id string
    • modifiedDate string: The date the action was modified
    • name string: Action name
    • status Status

AdminUser

  • Admin_User object
    • email string: Admin User email address
    • password string: Admin User password
    • type Type41

AdminUserResponse

  • Admin_User_Response object
    • createdDate string: The date the admin user was created
    • email string: Admin User email address
    • id integer
    • modifiedDate string: The date the admin user was modified
    • name string: Admin User name
    • status Status

ApiType

  • ApiType string (values: Internal, REST, SDK)

App

  • App object
    • desc string: App description
    • name string: App name

AppChannelResponse

  • App_Channel_Response object
    • channelId integer: Channel Id
    • createdDate string: The date the user was created
    • id integer
    • status Status
    • userId integer: Id of App User assigned to Channel

AppExternalCredentials

  • App_External_Credentials object
    • authType AuthType
    • channel_id string
    • credentials object
    • name string: App external credentials api name

AppExternalCredentialsResponse

  • App_External_Credentials_Response object
    • authType AuthType
    • channel_id string
    • credentials object
    • id string
    • name string: App external credentials api name

AppResponse

  • App_Response object
    • apiKey string: App ApiKey
    • createdDate string: The date the app was created
    • description string: App description
    • id string
    • modifiedDate string: The date the app was modified
    • name string: App name
    • status Status

AppUser

  • App_User object
    • config object: Object containing user-defined app user configuration
    • name string: Display name of App User
    • password string: App User password

AppUserResponse

  • App_User_Response object
    • createdDate string: The date the user was created
    • description string: Description of App User
    • id string: Id of App User
    • modifiedDate string: The date the user was modified
    • name string: Display name of App User
    • status Status

AuthType

  • AuthType string (values: apikey, basic, none, oauth2)

AuthorizeUrlResponse

  • Authorize_Url_Response object
    • url string

Channel

  • Channel object
    • description string: Channel description
    • functions array
    • id string: Id of channel
    • name string: Channel name
    • type object: Type of channel. Choices are 'public' or 'private'. Private channels are only viewable within an account, while public channels are viewable to everyone in the system

ChannelResponse

  • Channel_Response object
    • description string: Channel description
    • functions array
    • id string: Id of channel
    • name string: Channel name
    • type object: Type of channel. Choices are 'public' or 'private'. Private channels are only viewable within an account, while public channels are viewable to everyone

Error

  • Error object
    • code integer
    • fields string
    • message string

Function

  • Function object
    • id string
    • name string: Function name
    • parameters array
    • type Type

Function5

  • Function5 object
    • description string: Function description
    • id string
    • name string: Function name
    • type Type

Function7

FunctionResponse

HttpMethod

  • HttpMethod string (values: DELETE, GET, PATCH, POST)

Org

  • Org object
    • desc string: Org description
    • name required string: Org name
    • type string: Org type

OrgResponse

  • Org_Response object
    • createdDate string: The date the org was created
    • id string
    • modifiedDate string: The date the org was modified
    • name string: Org name
    • plan Plan
    • planCat object
    • status string: Org name
    • type object

Parameter

  • Parameter object
    • key required string
    • value required string

Plan

  • Plan string (values: free, basic)

RequestParameter

  • RequestParameter object
    • description string
    • fieldType string
    • label string
    • name string
    • schema Schema

ResponseFormat

  • ResponseFormat string (values: Html, Json, Text, Xml)

Rule

  • Rule object
    • actionIds string: Rule description
    • description string: Rule description
    • name string: Rule name
    • status Status
    • triggerIds string: Rule description

RuleFullResponse

  • Rule_Full_Response object
    • actions array
    • createdDate string: The date the rule was created
    • description string: Rule description
    • id integer: Rule Id
    • modifiedDate string: The date the rule was modified
    • name string: Rule name
    • status Status
    • triggers array

RuleResults

  • Rule_Results object
    • id string
    • name string: Name of rule results
    • type Type

RuleShortResponse

  • Rule_Short_Response object
    • createdDate string: The date the rule was created
    • description string: Rule description
    • id integer: Rule Id
    • modifiedDate string: The date the rule was modified
    • name string: Rule name
    • status Status

Schema

  • Schema object
    • datatype object
    • default string
    • expose object
    • required object
    • style Style

Status

  • Status string (values: active, inactive)

Style

  • Style string (values: postbody, query, template)

Trigger

  • Trigger object
    • channelId string
    • createdDate string: The date the rule was created
    • description string
    • functionId string
    • id string
    • modifiedDate string: The date the rule was modified
    • name string
    • status Status

Trigger54

  • Trigger54 object
    • channelId required integer: Id of channel used by trigger
    • codes object: Object containing named Javascript code sets
    • desc string: Trigger description
    • functionId required string: Hash id of channel function used by trigger
    • name required string: Trigger name
    • parameters object: Object containing channel-defined trigger parameters

TriggerFullResponse

  • Trigger_Full_Response object
    • channelId integer
    • codes object
    • createdDate string: The date the trigger was created
    • description string: Trigger description
    • functionId string
    • id integer
    • modifiedDate string: The date the trigger was modified
    • name string: Trigger name
    • parameters object
    • status Status

TriggerShortResponse

  • Trigger_Short_Response object
    • channelId integer
    • createdDate string: The date the trigger was created
    • description string: Trigger description
    • functionId string
    • id integer
    • modifiedDate string: The date the trigger was modified
    • name string: Trigger name
    • status Status

Type

  • Type string (values: action, trigger)

Type41

  • Type41 string (values: admin, guest)

UserChannel

  • User_Channel object
    • channelId integer
    • userId integer
6.0.0

5 years ago

5.0.0

7 years ago

4.0.0

7 years ago

3.0.0

8 years ago

2.0.3

8 years ago

2.0.2

8 years ago

2.0.1

8 years ago

2.0.0

8 years ago