From a53457f6d0de47a13e266c4c190618481256c591 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gast=C3=B3n=20Fournier?= Date: Fri, 21 Apr 2023 14:33:09 +0200 Subject: [PATCH] docs: removal of event hook in v5 (#3586) ## About the changes Make it explicit that eventHook is no longer an option in v5, the migration should be to https://docs.getunleash.io/reference/addons/webhook which is already linked in the docs since v4 --- .../how-to/how-to-send-feature-updates-to-slack-deprecated.md | 2 ++ website/docs/reference/deploy/configuring-unleash.md | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/website/docs/how-to/how-to-send-feature-updates-to-slack-deprecated.md b/website/docs/how-to/how-to-send-feature-updates-to-slack-deprecated.md index ae7830e47d..f80f35ca7f 100644 --- a/website/docs/how-to/how-to-send-feature-updates-to-slack-deprecated.md +++ b/website/docs/how-to/how-to-send-feature-updates-to-slack-deprecated.md @@ -6,6 +6,8 @@ title: Feature Updates To slack This guide is deprecated. If you're looking for ways to integrate with Slack, you should refer to [the Slack add-on guide](../reference/addons/slack.md) instead. +Event hook option is removed in Unleash v5 + ::: ## Create a custom Slack WebHook url: {#create-a-custom-slack-webhook-url} diff --git a/website/docs/reference/deploy/configuring-unleash.md b/website/docs/reference/deploy/configuring-unleash.md index e46df40f8b..3f9e9378ec 100644 --- a/website/docs/reference/deploy/configuring-unleash.md +++ b/website/docs/reference/deploy/configuring-unleash.md @@ -95,7 +95,7 @@ unleash.start(unleashOptions); - `sender` - Which email should be set as sender of mails being sent from Unleash? - `smtpuser` - Username for your SMTP server - `smtppass` - Password for your SMTP server -- **eventHook** (`function(event, data)`) - (_deprecated in Unleash 4.3_ in favor of the [Webhook addon](../addons/webhook.md)) If provided, this function will be invoked whenever a feature is mutated. The possible values for `event` are `'feature-created'`, `'feature-archived'` and `'feature-revived'`. The `data` argument contains information about the mutation. Its fields are `type` (string) - the event type (same as `event`); `createdBy` (string) - the user who performed the mutation; `data` - the contents of the change. The contents in `data` differs based on the event type; For `'feature-archived'` and `'feature-revived'`, the only field will be `name` - the name of the feature. For `'feature-created'` the data follows a schema defined in the code [here](https://github.com/Unleash/unleash/blob/7b7f0b84e8cddd5880dcf29c231672113224b9a7/src/lib/schema/feature-schema.ts#L77). See an [api here](/reference/api/legacy/unleash/admin/events). +- ~~eventHook~~ (`function(event, data)`) - (_deprecated in Unleash 4.3_ in favor of the [Webhook addon](../addons/webhook.md). **Removed in Unleash 5**) If provided, this function will be invoked whenever a feature is mutated. The possible values for `event` are `'feature-created'`, `'feature-archived'` and `'feature-revived'`. The `data` argument contains information about the mutation. Its fields are `type` (string) - the event type (same as `event`); `createdBy` (string) - the user who performed the mutation; `data` - the contents of the change. The contents in `data` differs based on the event type; For `'feature-archived'` and `'feature-revived'`, the only field will be `name` - the name of the feature. For `'feature-created'` the data follows a schema defined in the code [here](https://github.com/Unleash/unleash/blob/7b7f0b84e8cddd5880dcf29c231672113224b9a7/src/lib/schema/feature-schema.ts#L77). See an [api here](/reference/api/legacy/unleash/admin/events). - **getLogger** (function) - Used to register a [custom log provider](#how-do-i-configure-the-log-output). - **logLevel** (`debug` | `info` | `warn` | `error` | `fatal`) - The lowest level to log at, also configurable using environment variable `LOG_LEVEL`. - **preHook** (function) - this is a hook if you need to provide any middlewares to express before `unleash` adds any. Express app instance is injected as first argument.