@nistrix/chat 0.1.1 → 0.1.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 +8 -0
- package/dist/chat.d.ts +1 -1
- package/dist/chat.js +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -4,6 +4,14 @@ The Nistrix chat for your own site or app: your visitors talk to your Nistrix ag
|
|
|
4
4
|
|
|
5
5
|
It uses a **publishable key** (`nx_pk_live_...`, or `nx_pk_test_...` in your test environment). It is not a secret: it can only open visitor chats on one chat channel, from the sites and apps you listed on it. Never put a secret key (`nx_sk_`, `nx_rk_`) in a site or app.
|
|
6
6
|
|
|
7
|
+
## Install
|
|
8
|
+
|
|
9
|
+
```bash
|
|
10
|
+
npm install @nistrix/chat
|
|
11
|
+
```
|
|
12
|
+
|
|
13
|
+
The SDK and publishable keys are on every Nistrix plan, with no add-on.
|
|
14
|
+
|
|
7
15
|
## Get a key
|
|
8
16
|
|
|
9
17
|
In Nistrix, **Integrations → API and MCP → Nistrix in your apps → Publishable keys**: choose the chat channel, list your sites (`https://shop.example`) and apps (`com.shop.app`), and copy the key.
|
package/dist/chat.d.ts
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
* browsers are recognized by their origin, native apps by `appId` (their bundle id or package
|
|
5
5
|
* name). The key is not a secret and can do nothing else.
|
|
6
6
|
*/
|
|
7
|
-
export declare const DEFAULT_API_URL = "https://api.nistrix.com
|
|
7
|
+
export declare const DEFAULT_API_URL = "https://api.nistrix.com";
|
|
8
8
|
export interface ChatAttachment {
|
|
9
9
|
/** Opens the file for a few minutes; a new link comes with every refresh. */
|
|
10
10
|
url: string;
|
package/dist/chat.js
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
* browsers are recognized by their origin, native apps by `appId` (their bundle id or package
|
|
5
5
|
* name). The key is not a secret and can do nothing else.
|
|
6
6
|
*/
|
|
7
|
-
export const DEFAULT_API_URL = "https://api.nistrix.com
|
|
7
|
+
export const DEFAULT_API_URL = "https://api.nistrix.com";
|
|
8
8
|
const APP_HEADER = "X-Nistrix-App";
|
|
9
9
|
const FIRST_RETRY_MS = 1000;
|
|
10
10
|
const MAX_RETRY_MS = 30_000;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@nistrix/chat",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.3",
|
|
4
4
|
"description": "Nistrix chat for customers' sites and apps: visitors talk to the organization's agents and team with a publishable key (nx_pk_). Runs in browsers and React Native.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"author": "Nistrix <dev@nistrix.com>",
|