@_solaris/messenger-widget 0.5.2 → 0.5.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +29 -2
- package/dist/iframe/iframe.css +1 -0
- package/dist/iframe/iframe.js +73 -0
- package/dist/messenger.cjs +24 -24
- package/dist/messenger.js +1635 -1675
- package/dist/snippet.js +1 -0
- package/dist/style.css +1 -1
- package/dist/types/core/media.d.ts +1 -1
- package/dist/types/core/store.d.ts +2 -2
- package/dist/types/core/transport.d.ts +34 -57
- package/dist/types/iframe.d.ts +1 -0
- package/dist/types/snippet.d.ts +7 -0
- package/package.json +50 -49
- package/dist/messenger.embed.js +0 -77
- package/dist/types/embed.d.ts +0 -40
package/dist/types/embed.d.ts
DELETED
|
@@ -1,40 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Mount (or remount) the widget.
|
|
3
|
-
*
|
|
4
|
-
* @param {{
|
|
5
|
-
* baseUrl: string, widgetId: string, token?: string,
|
|
6
|
-
* displayMode?: 'floating'|'sheet'|'embedded',
|
|
7
|
-
* target?: string|Element, devtools?: boolean, language?: 'fr'|'en',
|
|
8
|
-
* context?: { customer?: { name?: string, email?: string, [variable: string]: unknown } }
|
|
9
|
-
* }} opts
|
|
10
|
-
* `token` — JWT signed by the merchant backend (linked mode). Omit to run
|
|
11
|
-
* in visitor mode (the widget bootstraps a brispr-issued token).
|
|
12
|
-
* `language` — UI language. When omitted, the widget config's
|
|
13
|
-
* `default_language` is used, falling back to French.
|
|
14
|
-
* `context.customer` — flat object pushed once to the server on boot
|
|
15
|
-
* (PATCH /customers/me) so the agent has it as context. `name`/`email`
|
|
16
|
-
* map to the customer's canonical columns; every other key is a named
|
|
17
|
-
* variable value sent under `values` (the server does a partial set,
|
|
18
|
-
* keeping variables not passed).
|
|
19
|
-
* @returns {import('vue').App|null} the Vue app, or null when not mounted
|
|
20
|
-
* (missing baseUrl/widgetId).
|
|
21
|
-
*/
|
|
22
|
-
export function init(opts?: {
|
|
23
|
-
baseUrl: string;
|
|
24
|
-
widgetId: string;
|
|
25
|
-
token?: string;
|
|
26
|
-
displayMode?: "floating" | "sheet" | "embedded";
|
|
27
|
-
target?: string | Element;
|
|
28
|
-
devtools?: boolean;
|
|
29
|
-
language?: "fr" | "en";
|
|
30
|
-
context?: {
|
|
31
|
-
customer?: {
|
|
32
|
-
name?: string;
|
|
33
|
-
email?: string;
|
|
34
|
-
[variable: string]: unknown;
|
|
35
|
-
};
|
|
36
|
-
};
|
|
37
|
-
}): import("vue").App | null;
|
|
38
|
-
/** Unmount the widget and clean up the host element we created. */
|
|
39
|
-
export function destroy(): void;
|
|
40
|
-
export const version: string;
|