Snap-in V1 manifest
The following guide is for the version 1 of the manifest spec. For the latest version, refer to Manifest.
The snap-in manifest is what the developers write to define a snap-in. The manifest has the following sections:
Version
The version of the manifest. The below documentation is for version 1 and should be specified in the manifest as:
Connections
Connections are specified in the manifest with the following syntax:
Example:
Service that stores these secrets and has the business logic to refresh tokens, when applicable. Here is the list of currently supported connection types - Connections
Developer connections
Developer connections are defined during the development by the snap-in developer. They are available across all installations and invisible to the installer. Only snap-in secret string type is supported for developer connections.
Example:
The developer connection can be selected while creating the snap_in_version. DevRev CLI detects the developer connections in the manifest and prompts for them:
Developer connections can only be created in the UI. They are of type “snap-in Secret”.
Event sources
Event sources are specified in the manifest with the following syntax:
Here is the list of supported event sources.
Example:
Globals
Globals are implemented today using per-object schemas, which is a customization term to store custom schemas in line with the object. Each global’s schema maps to a FieldDescriptor.
The definition of globals looks like this:
Tags
Define a tag by passing just the name and description of the tag.
Example:
Commands
In the manifest, you need to specify the name of the command, its namespace, the surfaces where it can show up (such as comment discussions), a description that can show up on the UI, usage hints, and the function to be triggered when the command is invoked.
For commands, the <name, namespace>
pair should be unique across the Org in which it’s installed.
Functions
In the manifest, all you need to tell is the name of the function, and its description, just like tags:
For functions, you also need to provide the actual JS/TS code behind this function, for that, you can refer to the README in the provided template.
Automations
Automation is where you would link events from the event sources to your function. The definition of automations looks like this:
For custom event sources, whatever event key you emit from your policy, the event name would be “custom:<your event key>
”.