Component Descriptor

When you are developing a component for platform then you need to adhere to the necessary structure for easy integration the environment. While the internal message processing may be implemented in different programming languages that platform currently supports, but

the component must have a Component Descriptor called component.json which is a JSON file and must be located in the root folder of the component.

Here is an example to demonstrate structure of a component written in Node.js:

   - component.json
     - lib
       - actions
         - createAction.js
       - triggers
         - getTrigger.js
       - schemas
         - getTrigger.out.json

The component descriptor here has two functions: one action createAction and one trigger getTrigger. Obviously the naming is arbitrary.

The metadata of messages consumed and produced by the component are defined in the JSON schema files inside the schemas folder. In this example we have action function with and trigger function with getTrigger.out.

Please Note

  • For each action function you are required to provide a schema file with in.json extension.
  • Similarly, for each trigger function you are required to provide a schema file with out.json extension.

We support draft-03 JSON Schema with the number of exceptions and differences. Consult JSON Schema Support pages for more.

Objects used to describe the component

Here is the overview of Objects used in component descriptor:

Objects Implementation
Root Object used to declare the component
envVars Object used to declare the environment variables
Credentials Object used to grant component the access
Fields Object used to specify how to render an input field
OAuth1 Object used to specify the OAuth 1.0 specific details
OAuth2 Object used to specify the OAuth 2.0 specific details
Trigger Object used to expose component's triggers
Actions Object used to expose component's actions

In addition to Objects View Classes for input fields are used to specify input field rendering in UI.