|
| 1 | +# Integration Config |
| 2 | + |
| 3 | +A [Franz](http://meetfranz.com) recipe is a node module. In order to learn more about node modules and their configuration check the official [Node.js documentation](https://nodejs.org/api/modules.html) / [npm package.json documentation](https://docs.npmjs.com/files/package.json). |
| 4 | + |
| 5 | +## Table of Contents |
| 6 | +* [Config flags](#user-content-config-flags) |
| 7 | +* [Examples](#user-content-examples) |
| 8 | + |
| 9 | +## Config flags |
| 10 | + |
| 11 | +`string` **id**<br /> |
| 12 | +Unique identifier name of the plugin. The name of the plugin folder has to be the same. |
| 13 | + |
| 14 | +`string` **name**<br /> |
| 15 | +Display name of the service. |
| 16 | + |
| 17 | +`string` **version**<br /> |
| 18 | +Version number. Will be used for auto updating the integrations. The version number must be in a semver compatible format: `1.0.0`. |
| 19 | +**important:** the version will be used to figure out if a new recipe update should be deployed to the user. |
| 20 | + |
| 21 | +`string` **desciption**<br /> |
| 22 | +Short description about your integration. Will be displayed in a future release. |
| 23 | + |
| 24 | +`string` **main**<br /> |
| 25 | +The plugins main entry point. In our case `index.js`. |
| 26 | + |
| 27 | +`string` **author**<br /> |
| 28 | +Author of the integration. Will be displayed in a future release. |
| 29 | + |
| 30 | +`string` **license**<br /> |
| 31 | +The license of the integration. We prefer MIT, but here is a list of all the available SPDX licenses http://spdx.org/licenses/ |
| 32 | + |
| 33 | +`object` **config**<br /> |
| 34 | +This is the Franz specific integration config. |
| 35 | + |
| 36 | +* `string` **serviceURL**<br/> |
| 37 | +Defines the URL that should be loaded into the Franz webview. |
| 38 | +<br /><br /> |
| 39 | +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`. |
| 40 | +<br /><br /> |
| 41 | +If your service works with custom URLs, just leave this empty. |
| 42 | +<br /><br /> |
| 43 | +**Examples** |
| 44 | +```json |
| 45 | +{ |
| 46 | + "serviceURL": "https://www.messenger.com" |
| 47 | +} |
| 48 | +``` |
| 49 | +<br /> |
| 50 | +```json |
| 51 | +{ |
| 52 | + "serviceURL": "https://{teamID}.slack.com" |
| 53 | +} |
| 54 | +``` |
| 55 | +* `boolean` **hasTeamID** _default: true_<br /> |
| 56 | +Is this a team based service? If true, the interface to add the service will require a team identifier. e.g. `[teamID]`.slack.com |
| 57 | +* `boolean` **urlInputSuffix**<br /> |
| 58 | +This option is only used in combination with `hasTeamId: true` in order to display the value of `urlInputSuffix` after the input for TeamId to make it obvious to the user what input is required from him. Eg. _<TeamID>.hipchat.com_ |
| 59 | +* `boolean` **hasCustomUrl** _default: false_<br /> |
| 60 | +On premise services like HipChat, Mattermost, ... require a custom URL. This option enables the user to enter a custom URL when adding the service. |
| 61 | +* `boolean` **hasNotificationSound** _default: false_<br /> |
| 62 | +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`. |
| 63 | +* `boolean` **hasIndirectMessages** _default: false_<br /> |
| 64 | +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. |
| 65 | +* `string` **message**<br /> |
| 66 | +Info message that will be displayed in the add/edit service interface. |
| 67 | + |
| 68 | +## Example |
| 69 | +### HipChat configuration |
| 70 | +```json |
| 71 | +{ |
| 72 | + "id": "mattermost", |
| 73 | + "name": "Mattermost", |
| 74 | + "version": "1.0.0", |
| 75 | + "description": "Mattermost", |
| 76 | + "main": "index.js", |
| 77 | + "author": "Stefan Malzner <[email protected]>", |
| 78 | + "license": "MIT", |
| 79 | + "config": { |
| 80 | + "hasNotificationSound": true, |
| 81 | + "hasIndirectMessages": true, |
| 82 | + "hasCustomUrl": true |
| 83 | + } |
| 84 | +} |
| 85 | +``` |
0 commit comments