gleap 18.0.0 → 18.1.0
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/AUTHENTICATED_FILES.md +7 -0
- package/README.md +9 -5
- package/build/browser/index.js +1 -1
- package/build/browser/index.js.map +1 -1
- package/build/cjs/index.js +1 -1
- package/build/cjs/index.js.map +1 -1
- package/build/esm/index.mjs +1 -1
- package/build/esm/index.mjs.map +1 -1
- package/index.d.ts +10 -0
- package/package.json +9 -4
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
# Authenticated conversation files
|
|
2
|
+
|
|
3
|
+
Companion to Server `AUTHENTICATED_FILES.md`. When the API flags a project as requiring authenticated files, a successful server-verified `identify` call supplies a short-lived file session to Messenger. The SDK refreshes it while active, preserves it only for the same identity, and requests revocation on logout. Unverified anonymous sessions cannot read protected files.
|
|
4
|
+
|
|
5
|
+
A customer application configured for emailed file links must preserve `gleapFile` through its own login flow and call verified `identify`; the SDK then asks the API for the authorized conversation and opens it. Deploy the API and compatible Messenger before enabling the per-project setting. Offline revocation cannot reach the server; tokens still expire after 15 minutes.
|
|
6
|
+
|
|
7
|
+
Validation: `npm test -- --runInBand --watchman=false` (277 tests), `npm run build`. No package publishing or synchronized SDK version bump is included.
|
package/README.md
CHANGED
|
@@ -1,20 +1,22 @@
|
|
|
1
|
-
# Gleap JavaScript SDK
|
|
1
|
+
# Gleap JavaScript and TypeScript SDK
|
|
2
2
|
|
|
3
3
|

|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
Add AI-native customer support, live chat, in-app bug reporting, a help center and surveys to websites and web apps using JavaScript or TypeScript with [Gleap](https://www.gleap.ai). Gleap is an Intercom alternative for software teams that connects customer conversations and feedback with product development.
|
|
6
|
+
|
|
7
|
+
[SDK documentation](https://docs.gleap.ai/documentation/javascript/README) · [Website](https://www.gleap.ai) · [Plans and pricing](https://www.gleap.ai/pricing)
|
|
6
8
|
|
|
7
9
|
## 📖 Docs & Examples
|
|
8
10
|
|
|
9
|
-
Checkout our [documentation](https://docs.gleap.
|
|
11
|
+
Checkout our [documentation](https://docs.gleap.ai/documentation/javascript/README) for full reference.
|
|
10
12
|
|
|
11
13
|
## 🚀 Getting started
|
|
12
14
|
|
|
13
|
-
1.)
|
|
15
|
+
1.) Create a Gleap account and project. See the [current plans and trial terms](https://www.gleap.ai/pricing).
|
|
14
16
|
|
|
15
17
|
2.) Include the Gleap JS SDK within your apps.
|
|
16
18
|
|
|
17
|
-
### Installation via
|
|
19
|
+
### Installation via npm
|
|
18
20
|
|
|
19
21
|
Install the **Gleap** package via npm or yarn.
|
|
20
22
|
```
|
|
@@ -26,6 +28,8 @@ Import the **Gleap** package.
|
|
|
26
28
|
import Gleap from 'gleap';
|
|
27
29
|
```
|
|
28
30
|
|
|
31
|
+
**TypeScript projects:** the package types the `<gleap-*>` elements for both React 18 and React 19. This requires `@types/react` 18.2.6 or newer (17.0.51+ / 16.14.41+ on older React lines). If you see errors like `Type '"span"' is not assignable to type 'ElementType'` after installing, run `npm i -D @types/react@latest`.
|
|
32
|
+
|
|
29
33
|
### Initialize the SDK
|
|
30
34
|
|
|
31
35
|
Add the following code to initialize the Gleap JavaScript SDK. Replace "SDK-TOKEN" with your actual SDK token from the [Gleap dashboard](https://app.gleap.io).
|