From 2fd678efd32725a881152af2b2ee5fa64f422dea Mon Sep 17 00:00:00 2001 From: Vijay Raghavan Aravamudhan Date: Wed, 11 Aug 2021 14:59:55 +0000 Subject: Cleanup all recipes (#605) * Removed legacy properties that are no longer used: 'author' 'customURL' 'description' 'hostedOnly' 'main' 'openDevTools' 'popup' 'repository' 'serviceName' 'webviewOptions' 'wording' - Removed entries for if they were the defaults: 'hasCustomUrl' 'hasDirectMessages' 'hasIndirectMessages' 'hasNotificationSound' 'hasTeamId' 'message' Fixed incorrect 'urlInputSuffix' type. Added validations for ensuring the above do not creep back in. --- docs/configuration.md | 71 ++++++++++++++++++++++----------------------------- 1 file changed, 30 insertions(+), 41 deletions(-) (limited to 'docs/configuration.md') diff --git a/docs/configuration.md b/docs/configuration.md index 923ed19..532a1f7 100644 --- a/docs/configuration.md +++ b/docs/configuration.md @@ -3,40 +3,34 @@ A [Ferdi](https://getferdi.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). ## Table of Contents -* [Config flags](#user-content-config-flags) -* [Examples](#user-content-examples) + +- [Integration Config](#integration-config) + - [Table of Contents](#table-of-contents) + - [Config flags](#config-flags) + - [Example](#example) ## Config flags -`string` **id**
+`string` **id** _mandatory_
Unique identifier name of the plugin. The name of the plugin folder has to be the same. This ID cannot contain any special characters or spaces. -`string` **name**
+`string` **name** _mandatory_
Display name of the service. -`string` **version**
-Version number. Will be used for auto updating the integrations. The version number must be in a semver compatible format: `1.0.0`. +`string` **version** _mandatory_
+Version number. Will be used for auto updating the integrations. The version number must be in a semver compatible format: eg `1.0.0`. **important:** the version will be used to figure out if a new recipe update should be deployed to the user. If you make changes to a recipe, **always** increase the version number or Ferdi won't update your recipe. -`string` **description**
-Short description about your integration. Not currently used. - -`string` **main**
-The plugins main entry point. In our case `index.js`. - -`string` **author**
-Author of the integration. Not currently used. - `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/ `string` **repository**
-Link to your Github, Gitlab or Bitbucket public repository +Link to your Github, Gitlab or Bitbucket public repository. Not used in the application, but is very helpful if we need to log bugs or update to newer versions, etc. -`object` **config**
-This is the Ferdi specific integration config. +`object` **config** _mandatory_
+This is the Ferdi-specific integration config. * `string` **serviceURL**
Defines the URL that should be loaded into the Ferdi webview. @@ -46,11 +40,13 @@ If you want to load a simple URL like `https://www.messenger.com`, you can simpl If your service works with custom URLs, just leave this empty.

**Examples** + ```json { "serviceURL": "https://www.messenger.com" } ``` +
```json @@ -58,35 +54,28 @@ If your service works with custom URLs, just leave this empty. "serviceURL": "https://{teamId}.slack.com" } ``` -* `boolean` **hasTeamId** _default: true_
+ +* `boolean` **hasTeamId** _default: false_
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` **urlInputSuffix**
-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_ +* `string` **urlInputPrefix**
+This option is only used in combination with `hasTeamId: true` in order to display the value of `urlInputPrefix` before the input for TeamId to make it obvious to the user what input is required from them. Eg. _<TeamID>.hipchat.com_ +* `string` **urlInputSuffix**
+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 them. Eg. _<TeamID>.hipchat.com_ +* `boolean` **hasHostedOption** _default: false_
+If a service can be hosted and has a teamId or customUrl * `boolean` **hasCustomUrl** _default: false_
-On premise services like HipChat, Mattermost, ... require a custom URL. This option enables the user to enter a custom URL when adding the service. +On-premise services like HipChat, Mattermost, ... require a custom URL. This option enables the user to enter a custom URL when adding the service. * `boolean` **hasNotificationSound** _default: false_
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` **hasDirectMessages** _default: true_
+Some services have direct 1x1 messages e.g. a mention or message to every user in a channel (@channel). If this flag is set to `true`, the user can enable/disable if there should be a badge for direct messages. * `boolean` **hasIndirectMessages** _default: false_
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. +Info message that will be displayed in the add/edit service preferences screen. +* `string` **disablewebsecurity**
+Some services like hangoutschat need the web security disabled. ## Example -### Mattermost configuration -```json -{ - "id": "mattermost", - "name": "Mattermost", - "version": "1.0.0", - "description": "Mattermost", - "main": "index.js", - "author": "Stefan Malzner ", - "license": "MIT", - "repository": "https://github.com/meetFerdi/recipe-mattermost", - "config": { - "hasNotificationSound": true, - "hasIndirectMessages": true, - "hasCustomUrl": true - } -} -``` + +The [mattermost configuration](https://github.com/getferdi/recipes/blob/master/recipes/mattermost/package.json) is a typical example. -- cgit v1.2.3-70-g09d2