Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(ProductSwitcher): TeamChat as default product #1421

Merged
merged 1 commit into from
Nov 6, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -19,11 +19,11 @@ import * as ProductSwitcher from './ProductSwitcher.stories';
ProductSwitcher is a controlled component. To use it, you need to provide the `mainProductId` (type ProductId) and `productOptions` (type ProductOption) props.<br/>

- The `mainProductId` prop is required and should be the id of the product that the user is currently using.<br/>
The available options are: `livechat`, `helpdesk`, `chatbot`, `knowledgebase`, `openwidget`, `hello`, `accounts`. They are described in the TS type value called `ProductId`.<br/>
The available options are: `livechat`, `helpdesk`, `chatbot`, `knowledgebase`, `openwidget`, `teamchat`, `accounts`. They are described in the TS type value called `ProductId`.<br/>
- The `productOptions` prop is an array of products that the user has access to. Object structure is described in type `ProductOption`.<br/>
The `productOptions` can be generated using the `useProductSwitcher` hook. The hook requires the following props:<br/>
- `env` - the environment in which the product switcher is used. It can be either `labs`, `staging` or `prod` .<br/>
- `installedProducts` - an array of objects with the `product` key. The `product` key should be one of the available products: `livechat`, `helpdesk`, `chatbot`, `knowledgebase`, `openwidget`, `hello`, `accounts`.<br/>
- `installedProducts` - an array of objects with the `product` key. The `product` key should be one of the available products: `livechat`, `helpdesk`, `chatbot`, `knowledgebase`, `openwidget`, `teamchat`, `accounts`.<br/>
- `subscriptions` - an object with the subscription status for each product. The key should be the product name and the value should be an object with the `status` and `next_charge_at` keys.<br/>
- `organizationId` - the organization id of the user.<br/>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -214,5 +214,6 @@ export const alwaysVisibleProducts: ProductId[] = [
'livechat',
'chatbot',
'helpdesk',
'teamchat',
'accounts',
];
Loading