@empathyco/x-components
Version:
Empathy X Components
287 lines (123 loc) • 3.42 kB
Markdown
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
[Home](./index.md) > [@empathyco/x-components](./x-components.md) > [SnippetConfig](./x-components.snippetconfig.md)
## SnippetConfig interface
Interface with the possible parameters to receive through the snippet integration.
**Signature:**
```typescript
export interface SnippetConfig
```
## Properties
<table><thead><tr><th>
Property
</th><th>
Modifiers
</th><th>
Type
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
[callbacks?](./x-components.snippetconfig.callbacks.md)
</td><td>
</td><td>
[XEventListeners](./x-components.xeventlisteners.md)
</td><td>
_(Optional)_ Callbacks to be triggered when an XEvent is emitted.
</td></tr>
<tr><td>
[consent?](./x-components.snippetconfig.consent.md)
</td><td>
</td><td>
boolean
</td><td>
_(Optional)_ User GDPR consent.
</td></tr>
<tr><td>
[currency?](./x-components.snippetconfig.currency.md)
</td><td>
</td><td>
string
</td><td>
_(Optional)_ The currency name. There should be a currency format associated to this name in the app.
</td></tr>
<tr><td>
[documentDirection?](./x-components.snippetconfig.documentdirection.md)
</td><td>
</td><td>
[DocumentDirection](./x-components.documentdirection.md)
</td><td>
_(Optional)_ Document direction.
</td></tr>
<tr><td>
[env?](./x-components.snippetconfig.env.md)
</td><td>
</td><td>
'staging'
</td><td>
_(Optional)_ Backend services environment.
</td></tr>
<tr><td>
[filters?](./x-components.snippetconfig.filters.md)
</td><td>
</td><td>
string\[\]
</td><td>
_(Optional)_ The filters to be applied on the first request.
</td></tr>
<tr><td>
[instance](./x-components.snippetconfig.instance.md)
</td><td>
</td><td>
string
</td><td>
Customer instance.
</td></tr>
<tr><td>
[isSpa?](./x-components.snippetconfig.isspa.md)
</td><td>
</td><td>
boolean
</td><td>
_(Optional)_ Flag determining if the page is a single page application or not.
</td></tr>
<tr><td>
[lang](./x-components.snippetconfig.lang.md)
</td><td>
</td><td>
string
</td><td>
Language for the API request, and default value for [SnippetConfig.uiLang](./x-components.snippetconfig.uilang.md)<!-- -->.
</td></tr>
<tr><td>
[productId?](./x-components.snippetconfig.productid.md)
</td><td>
</td><td>
string
</td><td>
_(Optional)_ The id for the current product when product page is loaded.
</td></tr>
<tr><td>
[queriesPreview?](./x-components.snippetconfig.queriespreview.md)
</td><td>
</td><td>
[QueryPreviewInfo](./x-components.querypreviewinfo.md)<!-- -->\[\]
</td><td>
_(Optional)_ List of queries to preview.
</td></tr>
<tr><td>
[scope](./x-components.snippetconfig.scope.md)
</td><td>
</td><td>
string
</td><td>
Execution scope (desktop, mobile, app, ...).
</td></tr>
<tr><td>
[uiLang?](./x-components.snippetconfig.uilang.md)
</td><td>
</td><td>
string
</td><td>
_(Optional)_ Language to use for the messages. Defaults to [SnippetConfig.lang](./x-components.snippetconfig.lang.md)<!-- -->.
</td></tr>
</tbody></table>