cevro-messenger-sdk 0.1.2 → 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 +10 -10
- package/dist/cjs/index.js +2 -2
- package/dist/cjs/index.js.map +1 -1
- package/dist/esm/index.js +205 -13
- package/dist/esm/index.js.map +1 -1
- package/dist/types/core/ApiClient.d.ts +6 -1
- package/dist/types/core/ApiClient.d.ts.map +1 -1
- package/dist/types/core/CevroMessenger.d.ts +5 -0
- package/dist/types/core/CevroMessenger.d.ts.map +1 -1
- package/dist/types/i18n/strings.d.ts +10 -0
- package/dist/types/i18n/strings.d.ts.map +1 -1
- package/dist/types/ui/ChatWindow.d.ts +18 -0
- package/dist/types/ui/ChatWindow.d.ts.map +1 -1
- package/dist/umd/cevro-messenger.min.js +2 -2
- package/dist/umd/cevro-messenger.min.js.map +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -38,7 +38,7 @@ Add the script tag to your HTML:
|
|
|
38
38
|
import { CevroMessenger } from 'cevro-messenger-sdk';
|
|
39
39
|
|
|
40
40
|
const messenger = new CevroMessenger({
|
|
41
|
-
apiBase: 'https://
|
|
41
|
+
apiBase: 'https://chat.chatform.com',
|
|
42
42
|
workspaceId: 'your-workspace-id',
|
|
43
43
|
brandId: 'your-brand-id',
|
|
44
44
|
});
|
|
@@ -52,7 +52,7 @@ messenger.boot();
|
|
|
52
52
|
<script src="https://unpkg.com/cevro-messenger-sdk/dist/umd/cevro-messenger.min.js"></script>
|
|
53
53
|
<script>
|
|
54
54
|
const messenger = new CevroMessenger({
|
|
55
|
-
apiBase: 'https://
|
|
55
|
+
apiBase: 'https://chat.chatform.com',
|
|
56
56
|
workspaceId: 'your-workspace-id',
|
|
57
57
|
brandId: 'your-brand-id',
|
|
58
58
|
});
|
|
@@ -86,7 +86,7 @@ Pass user information to identify authenticated users:
|
|
|
86
86
|
|
|
87
87
|
```javascript
|
|
88
88
|
const messenger = new CevroMessenger({
|
|
89
|
-
apiBase: 'https://
|
|
89
|
+
apiBase: 'https://chat.chatform.com',
|
|
90
90
|
workspaceId: 'your-workspace-id',
|
|
91
91
|
brandId: 'your-brand-id',
|
|
92
92
|
player: {
|
|
@@ -296,7 +296,7 @@ function App() {
|
|
|
296
296
|
|
|
297
297
|
useEffect(() => {
|
|
298
298
|
messengerRef.current = new CevroMessenger({
|
|
299
|
-
apiBase: 'https://
|
|
299
|
+
apiBase: 'https://chat.chatform.com',
|
|
300
300
|
workspaceId: 'your-workspace-id',
|
|
301
301
|
brandId: 'your-brand-id',
|
|
302
302
|
});
|
|
@@ -323,7 +323,7 @@ const messenger = ref(null);
|
|
|
323
323
|
|
|
324
324
|
onMounted(() => {
|
|
325
325
|
messenger.value = new CevroMessenger({
|
|
326
|
-
apiBase: 'https://
|
|
326
|
+
apiBase: 'https://chat.chatform.com',
|
|
327
327
|
workspaceId: 'your-workspace-id',
|
|
328
328
|
brandId: 'your-brand-id',
|
|
329
329
|
});
|
|
@@ -356,7 +356,7 @@ export class AppComponent implements OnInit, OnDestroy {
|
|
|
356
356
|
|
|
357
357
|
ngOnInit() {
|
|
358
358
|
this.messenger = new CevroMessenger({
|
|
359
|
-
apiBase: 'https://
|
|
359
|
+
apiBase: 'https://chat.chatform.com',
|
|
360
360
|
workspaceId: 'your-workspace-id',
|
|
361
361
|
brandId: 'your-brand-id',
|
|
362
362
|
});
|
|
@@ -385,7 +385,7 @@ export default function ChatWidget() {
|
|
|
385
385
|
// Only run on client side
|
|
386
386
|
if (typeof window !== 'undefined') {
|
|
387
387
|
messengerRef.current = new CevroMessenger({
|
|
388
|
-
apiBase: 'https://
|
|
388
|
+
apiBase: 'https://chat.chatform.com',
|
|
389
389
|
workspaceId: 'your-workspace-id',
|
|
390
390
|
brandId: 'your-brand-id',
|
|
391
391
|
});
|
|
@@ -411,7 +411,7 @@ Use your own button to open the chat:
|
|
|
411
411
|
|
|
412
412
|
<script>
|
|
413
413
|
const messenger = new CevroMessenger({
|
|
414
|
-
apiBase: 'https://
|
|
414
|
+
apiBase: 'https://chat.chatform.com',
|
|
415
415
|
workspaceId: 'your-workspace-id',
|
|
416
416
|
brandId: 'your-brand-id',
|
|
417
417
|
hideDefaultLauncher: true,
|
|
@@ -426,7 +426,7 @@ Or control it programmatically:
|
|
|
426
426
|
|
|
427
427
|
```javascript
|
|
428
428
|
const messenger = new CevroMessenger({
|
|
429
|
-
apiBase: 'https://
|
|
429
|
+
apiBase: 'https://chat.chatform.com',
|
|
430
430
|
workspaceId: 'your-workspace-id',
|
|
431
431
|
brandId: 'your-brand-id',
|
|
432
432
|
hideDefaultLauncher: true,
|
|
@@ -447,7 +447,7 @@ The SDK is written in TypeScript and includes full type definitions:
|
|
|
447
447
|
import { CevroMessenger, CevroMessengerConfig } from 'cevro-messenger-sdk';
|
|
448
448
|
|
|
449
449
|
const config: CevroMessengerConfig = {
|
|
450
|
-
apiBase: 'https://
|
|
450
|
+
apiBase: 'https://chat.chatform.com',
|
|
451
451
|
workspaceId: 'your-workspace-id',
|
|
452
452
|
brandId: 'your-brand-id',
|
|
453
453
|
};
|