Skip to content

Latest commit

 

History

History
151 lines (136 loc) · 5.21 KB

configuration.md

File metadata and controls

151 lines (136 loc) · 5.21 KB

Integration Config

A Franz integration plugin is a node module. In order to learn more about node modules and their configuration check the official Node.js documentation / npm package.json documentation.

Table of Contents

Config flags

string name
Unique identifier name of the plugin. The name of the plugin folder should also be this name.

string version
Version number. Will be used for auto updating the integrations. The version number must be in the following format: 1.0.0.

string description
Short description about your integration. Will be displayed in a future release.

string main
The plugins main entry point. In our case index.js.

string author
Author of the integration. Will be displayed in a future release.

string license
The license of the integration. We prefer MIT, but here is a list of all the available SPDX licenses http://spdx.org/licenses/

object config
This is the Franz specific integration config.

  • string serviceURL
    Defines the URL that should be loaded into the Franz webview.

    If you want to load a simple URL like https://www.messenger.com, you can simply define it via the serviceURL parameter. If your service URL is team based, e.g. Slack or HipChat you can use https://{teamID}.slack.com.

    If your service works with custom URLs, just leave this empty.

    Examples
{
    "serviceURL": "https://www.messenger.com"
}

```json { "serviceURL": "https://{teamID}.slack.com" } ``` * `string` **serviceName**
Display name of the service. * `array` **popup**
Array with regular expressions to open external links in a popup instead of a new browser window. This is used for Slack, Messenger or Yodel calls.

**Examples** ```json { "popup": [ "^https:\/\/([a-zA-Z0-9\\-]*).slack.com\/call\/([^~])*", "^https:\/\/slack-redir.net\/link\\?url=https:\/\/yodel.io\/c\/([^~])*" ] } ``` * `boolean` **hasTeamID**
Is this a team based service? If true, the interface to add the service will require a team identifier. e.g. `[teamID]`.slack.com * `boolean` **hasNotificationSound**
Some services provide their own notification sound. In order to avoid multiple sounds when the user receives a message set this to `true`. If the service has no built in notification sound set this to `false`. * `boolean` **hasIndirectMessages**
Services like Slack or HipChat have direct messages e.g. a mention or message to every user in a channel (@channel) and indirect messages e.g. general discussion in a channel. If this flag is set to `true`, the user can enable/disable if there should be a badge for indirect messages. * `string` **message**
Info message that will be displayed in the add/edit service interface. * `object` **wording**
In some cases, e.g. team based servies, you need custom wording in the add/edit service interface that differs from the `serviceName` * `string` **url**
e.g. slack.com or hipchat.com * `string` **team**
e.g. Slack, HipChat, ... is followed "Team" * `boolean` **webviewOptions**
The webview wil be generated with the given webviewOptions. **Only use this if you absolutely know what you are doing.** A list of all available tags can be found at the [electron webview documentation](http://electron.atom.io/docs/api/web-view-tag/#tag-attributes)

**Examples** ```json { "webviewOptions": { "disablewebsecurity": "" } } ``` * `object` **openDevTools**
Opens the webviews dev tools. This is very useful when developing an integration but should never be set to true in production.

Examples

Slack configuration

{
  "name": "slack",
  "version": "1.0.1",
  "description": "A messaging app for teams",
  "main": "index.js",
  "author": "Stefan Malzner <stefan@meetfranz.com>",
  "license": "MIT",
  "config": {
    "serviceURL": "http://{teamID}.slack.com",
    "serviceName": "Slack",
    "popup": [
      "^https:\/\/([a-zA-Z0-9\\-]*).slack.com\/call\/([^~])*",
      "^https:\/\/slack-redir.net\/link\\?url=https:\/\/yodel.io\/c\/([^~])*"
    ],
    "hasTeamID": true,
    "hasNotificationSound": true,
    "hasIndirectMessages": true,
    "wording": {
        "url": "slack.com",
        "team": "Slack"
    },
    "webviewOptions": {
      "disablewebsecurity": ""
    },
    "openDevTools": false
  }
}

Messenger configuration

{
  "name": "messenger",
  "version": "1.0.0",
  "description": "Facebook Messenger",
  "main": "index.js",
  "author": "Stefan Malzner <stefan@meetfranz.com>",
  "license": "MIT",
  "config": {
    "serviceURL": "http://messenger.com",
    "serviceName": "Messenger",
    "message": "This is a random info text that is shown when adding/editing a service",
    "popup": [],
    "hasNotificationSound": true,
    "hasIndirectMessages": false,
    "hasTeamID": false,
    "customURL": false,
    "hostedOnly": false,
    "webviewOptions": {
      "disablewebsecurity": ""
    },
    "openDevTools": false
  }
}