npm package: @modea/capacitor-salesforce-chat
Description: Capacitor plugin that launches salesforce chat ui
Author: Jacob Heuman
Latest version: 1.6.0

# @modea/capacitor-salesforce-chat

Capacitor plugin that launches salesforce chat ui

## Setup
`cd ios && pod install && cd ..`

## Local Development
From the root of this repo run `npm link`.
Then, from the consuming library, run `npm link @modea/capacitor-salesforce-chat`.
Run `npm run sync` and then build the app to verify changes to the plugin.

## Install

```bash
npm install @modea/capacitor-salesforce-chat
npx cap sync
```

## API

<docgen-index>

* [`startChat(...)`](#startchat)
* [`setBrandingColors(...)`](#setbrandingcolors)
* [Interfaces](#interfaces)

</docgen-index>

<docgen-api>
<!--Update the source file JSDoc comments and rerun docgen to update the docs below-->

### startChat(...)

```typescript
startChat(options: SalesforceChatConfiguration) => Promise<{ success: boolean; }>
```

| Param         | Type                                                                                |
| ------------- | ----------------------------------------------------------------------------------- |
| **`options`** | <code><a href="#salesforcechatconfiguration">SalesforceChatConfiguration</a></code> |

**Returns:** <code>Promise&lt;{ success: boolean; }&gt;</code>

--------------------


### setBrandingColors(...)

Only available for ios

To change branding colors for android overwrite the salesforce colors in one of your resource files

```typescript
setBrandingColors(colors: SalesforceBrandingColors) => Promise<{ success: boolean; }>
```

| Param        | Type                                                                          |
| ------------ | ----------------------------------------------------------------------------- |
| **`colors`** | <code><a href="#salesforcebrandingcolors">SalesforceBrandingColors</a></code> |

**Returns:** <code>Promise&lt;{ success: boolean; }&gt;</code>

--------------------


### Interfaces


#### SalesforceChatConfiguration

| Prop                     | Type                 | Default             |
| ------------------------ | -------------------- | --------------------|
| **`orgId`**              | <code>string</code>  |
| **`deploymentId`**       | <code>string</code>  |
| **`buttonId`**           | <code>string</code>  |
| **`liveAgentPod`**       | <code>string</code>  |
| **`defaultToMinimized`** | <code>boolean?</code> | <code>false</code>
| **`visitorName`**        | <code>string?</code>  | <code>"Visitor"</code>


#### SalesforceBrandingColors

All of these are optional change what you want

| Prop                         | Type                 | Default             | Description |
| ------------------------ | --------------------     | --------------------| ----------- |
| **`navbarBackground`**       | <code>string?</code> | <code>#FAFAFA</code>| Background of input section |
| **`navbarInverted`**         | <code>string?</code> | <code>#010101</code>| Minimize and close button colors |
| **`brandPrimary`**           | <code>string?</code> | <code>#007F7F</code>| Color of text cursor |
| **`brandSecondary`**         | <code>string?</code> | <code>#2872CC</code>| Self text bubble background |
| **`brandSecondaryInverted`** | <code>string?</code> | <code>#FCFCFC</code>| Self text bubble text|
| **`contrastPrimary`**        | <code>string?</code> | <code>#000000</code>| Agent text bubble text|
| **`contrastInverted`**       | <code>string?</code> | <code>#FFFFFF</code>| Agent text bubble background |
| **`contrastSecondary`**      | <code>string?</code> | <code>#6D6D6D</code>| Background fade on navbar|
| **`contrastQuaternary`**     | <code>string?</code> | <code>#F1F1F1</code>| Background of chat area|

</docgen-api>