@qualified-salesforce/web 0.1.0 → 0.1.1
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/CAPABILITY-REFERENCE.md +5 -8
- package/CHANGELOG.md +9 -0
- package/README.md +65 -0
- package/package.json +2 -2
package/CAPABILITY-REFERENCE.md
CHANGED
|
@@ -1,12 +1,10 @@
|
|
|
1
1
|
<!-- Generated file — do not edit by hand. -->
|
|
2
2
|
# Capability reference — Qualified text-only npm/ESM package
|
|
3
3
|
|
|
4
|
-
Every optional feature
|
|
5
|
-
run, and what enrolling each one lets it do.
|
|
4
|
+
Every optional feature in `@qualified-salesforce/web`, and what enrolling each one lets it do.
|
|
6
5
|
|
|
7
|
-
**
|
|
8
|
-
|
|
9
|
-
absent — this build ships text-only and cannot activate a call.
|
|
6
|
+
**Every capability below is off unless you enroll it in `setup({ capabilities: [...] })`.**
|
|
7
|
+
This is the text-only build: it ships no voice/video call code.
|
|
10
8
|
|
|
11
9
|
```ts
|
|
12
10
|
import { setup, CAPABILITY_KEYS, type Capability } from "@qualified-salesforce/web";
|
|
@@ -15,9 +13,8 @@ import { setup, CAPABILITY_KEYS, type Capability } from "@qualified-salesforce/w
|
|
|
15
13
|
await setup({ token, apiHost, capabilities: ["analytics", "formCapture"] });
|
|
16
14
|
```
|
|
17
15
|
|
|
18
|
-
`
|
|
19
|
-
|
|
20
|
-
returned `q(...)` command function (for `identify`, `teardown`, etc.) or want to handle a boot failure.
|
|
16
|
+
`setup()` boots the widget and resolves to the `q(...)` command function (`identify`, `teardown`,
|
|
17
|
+
and the rest). Await it only if you need that function or want to catch a boot failure.
|
|
21
18
|
|
|
22
19
|
| Capability | Feature unlocked | Data egress / third-party origin | Default |
|
|
23
20
|
| -- | -- | -- | -- |
|
package/CHANGELOG.md
CHANGED
|
@@ -4,6 +4,14 @@ All notable changes to `@qualified-salesforce/web` are recorded here. The format
|
|
|
4
4
|
[Keep a Changelog](https://keepachangelog.com/en/1.1.0/); the package aims to follow
|
|
5
5
|
[Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
|
6
6
|
|
|
7
|
+
## [0.1.1]
|
|
8
|
+
|
|
9
|
+
### Added
|
|
10
|
+
|
|
11
|
+
- **Package README.** The npm package now ships a consumer-facing `README.md` — install, a
|
|
12
|
+
minimal `setup()` example, the stylesheet/assets note, and a pointer to the capability
|
|
13
|
+
reference — so it renders on the npm package page. No runtime or API change.
|
|
14
|
+
|
|
7
15
|
## [0.1.0]
|
|
8
16
|
|
|
9
17
|
### Added
|
|
@@ -72,4 +80,5 @@ All notable changes to `@qualified-salesforce/web` are recorded here. The format
|
|
|
72
80
|
reviewed package is equivalent to absence for what runs in the browser — while letting you enable
|
|
73
81
|
a feature later by changing one `setup()` option, with no separate build.
|
|
74
82
|
|
|
83
|
+
[0.1.1]: https://github.com/FatbearLabs/fireball/tree/master/npm-package/package-esm
|
|
75
84
|
[0.1.0]: https://github.com/FatbearLabs/fireball/tree/master/npm-package/package-esm
|
package/README.md
ADDED
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
# @qualified-salesforce/web
|
|
2
|
+
|
|
3
|
+
The embeddable Qualified messenger widget, distributed as an unbundled ESM package. You import it
|
|
4
|
+
into your own app and boot it with your team token.
|
|
5
|
+
|
|
6
|
+
This is the **text-only** build: it ships the chat runtime, its stylesheet, and its fonts, and no
|
|
7
|
+
voice/video call code.
|
|
8
|
+
|
|
9
|
+
## Install
|
|
10
|
+
|
|
11
|
+
```bash
|
|
12
|
+
npm install @qualified-salesforce/web
|
|
13
|
+
```
|
|
14
|
+
|
|
15
|
+
## Quick start
|
|
16
|
+
|
|
17
|
+
```js
|
|
18
|
+
import { setup } from "@qualified-salesforce/web";
|
|
19
|
+
|
|
20
|
+
const qualified = await setup({
|
|
21
|
+
token: "<team-token>",
|
|
22
|
+
apiHost: "https://app.qualified.com",
|
|
23
|
+
// Off by default: list only the capabilities you want. See "Capabilities".
|
|
24
|
+
capabilities: ["formCapture"],
|
|
25
|
+
});
|
|
26
|
+
|
|
27
|
+
qualified("identify", { email: "visitor@example.com" });
|
|
28
|
+
```
|
|
29
|
+
|
|
30
|
+
`setup()` boots the widget and resolves to the `q(...)` command function (`identify`, `teardown`,
|
|
31
|
+
and the rest). Await it only if you need that function or want to catch a boot failure.
|
|
32
|
+
|
|
33
|
+
## Styling
|
|
34
|
+
|
|
35
|
+
Don't import the stylesheet yourself — `setup()` loads it. Importing it through your own bundler
|
|
36
|
+
renders the widget unstyled.
|
|
37
|
+
|
|
38
|
+
## Capabilities
|
|
39
|
+
|
|
40
|
+
Every optional feature is **off unless you enroll it** in the `capabilities` option. Omitting
|
|
41
|
+
`capabilities` (or passing `[]`) leaves them all off.
|
|
42
|
+
|
|
43
|
+
See [`CAPABILITY-REFERENCE.md`](./CAPABILITY-REFERENCE.md) for the full list — what each capability
|
|
44
|
+
does, the data it sends, whether it needs a CSP change, and its default.
|
|
45
|
+
|
|
46
|
+
## TypeScript
|
|
47
|
+
|
|
48
|
+
The package ships its own type declarations. `Capability` is a literal union, so a mistyped key is
|
|
49
|
+
a compile error, and `CAPABILITY_KEYS` exposes the same set as a runtime value:
|
|
50
|
+
|
|
51
|
+
```ts
|
|
52
|
+
import { setup, CAPABILITY_KEYS, type Capability } from "@qualified-salesforce/web";
|
|
53
|
+
|
|
54
|
+
const permitted: Capability[] = ["analytics", "formCapture"];
|
|
55
|
+
|
|
56
|
+
const qualified = await setup({
|
|
57
|
+
token: "<team-token>",
|
|
58
|
+
apiHost: "https://app.qualified.com",
|
|
59
|
+
capabilities: permitted,
|
|
60
|
+
});
|
|
61
|
+
```
|
|
62
|
+
|
|
63
|
+
## License
|
|
64
|
+
|
|
65
|
+
Proprietary. See [`LICENSE.txt`](./LICENSE.txt).
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@qualified-salesforce/web",
|
|
3
|
-
"version": "0.1.
|
|
4
|
-
"description": "Embeddable Qualified messenger widget
|
|
3
|
+
"version": "0.1.1",
|
|
4
|
+
"description": "Embeddable Qualified messenger widget (text-only ESM build).",
|
|
5
5
|
"license": "SEE LICENSE IN LICENSE.txt",
|
|
6
6
|
"private": false,
|
|
7
7
|
"type": "module",
|