@sippet-ai/operator-widget 0.0.16 → 0.0.17

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 CHANGED
@@ -95,13 +95,17 @@ export function SupportWidget() {
95
95
 
96
96
  ## Shared SDK + widget state
97
97
 
98
- If your app already uses `@sippet-ai/sdk-js/client`, pass that same client object
99
- to the widget as a property. This keeps SIP session/call state in one place, so
98
+ Initialize one SDK client with `initClient(...)` and pass that same object to
99
+ the widget as a property. This keeps SIP session/call state in one place, so
100
100
  SDK actions (for example joining a call) are reflected in the widget UI.
101
101
 
102
102
  ```tsx
103
103
  import { SippetAIVoipWidget } from '@sippet-ai/operator-widget/react';
104
- import * as sdkClient from '@sippet-ai/sdk-js/client';
104
+ import { initClient } from '@sippet-ai/sdk-js/client';
105
+
106
+ const sdkClient = initClient({
107
+ baseUrl: 'https://api.sippet.ai',
108
+ });
105
109
 
106
110
  export function SupportWidget({ isWidgetOpen }: { isWidgetOpen: boolean }) {
107
111
  return (
@@ -156,7 +160,11 @@ export function SupportWidget() {
156
160
 
157
161
  ```ts
158
162
  import { sippet } from '@sippet-ai/operator-widget';
159
- import * as sdkClient from '@sippet-ai/sdk-js/client';
163
+ import { initClient } from '@sippet-ai/sdk-js/client';
164
+
165
+ const sdkClient = initClient({
166
+ baseUrl: 'https://api.sippet.ai',
167
+ });
160
168
 
161
169
  sippet.setClient(sdkClient);
162
170
  sippet.setGetAccessToken(async () => {
@@ -1,5 +1,5 @@
1
1
  import { LitElement } from 'lit';
2
- import * as SippetSdkClientModule from '@sippet-ai/sdk-js/client';
2
+ import type { Client as SippetSdkClient } from '@sippet-ai/sdk-js/client';
3
3
  import type { Contact, HistoryEntry, QueuedCall, VoipTab } from './voip-widget.types.js';
4
4
  import './voip-widget-launcher.js';
5
5
  import './voip-widget-panel.js';
@@ -9,7 +9,7 @@ import './voip-widget-contacts-tab.js';
9
9
  import './voip-widget-history-tab.js';
10
10
  import './voip-widget-settings-tab.js';
11
11
  declare const TwLitElement: typeof LitElement;
12
- export type SippetAIVoipWidgetClient = Pick<typeof SippetSdkClientModule, 'answerIncomingSipCall' | 'acceptCallQueueEntry' | 'buildCSRFHeaders' | 'callCodec' | 'connectSipSession' | 'createRealtimeEventsClient' | 'declineIncomingSipCall' | 'DEFAULT_BASE_URL' | 'disconnectSipSession' | 'getSipSessionState' | 'hangupSipCall' | 'issueOperatorSipAccess' | 'listCallParticipants' | 'listCallQueueEntries' | 'listCalls' | 'listContacts' | 'placeSipCall' | 'setConferenceMuted' | 'setOutputDevice' | 'setOperatorStatus' | 'setRemoteAudioElement' | 'setSipCallHeld' | 'subscribeSipSessionState' | 'whoAmI'>;
12
+ export type SippetAIVoipWidgetClient = Pick<SippetSdkClient, 'answerIncomingSipCall' | 'acceptCallQueueEntry' | 'buildCSRFHeaders' | 'callCodec' | 'connectSipSession' | 'createRealtimeEventsClient' | 'declineIncomingSipCall' | 'DEFAULT_BASE_URL' | 'disconnectSipSession' | 'getSipSessionState' | 'hangupSipCall' | 'issueOperatorSipAccess' | 'listCallParticipants' | 'listCallQueueEntries' | 'listCalls' | 'listContacts' | 'placeSipCall' | 'setConferenceMuted' | 'setOutputDevice' | 'setOperatorStatus' | 'setRemoteAudioElement' | 'setSipCallHeld' | 'subscribeSipSessionState' | 'whoAmI'>;
13
13
  /**
14
14
  * A VoIP widget web component allowing real-time telephony for Sippet AI integrations
15
15
  *
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sippet-ai/operator-widget",
3
- "version": "0.0.16",
3
+ "version": "0.0.17",
4
4
  "description": "Sippet AI's operator widget to enable telephony calling features in any web application.",
5
5
  "main": "dist/index.js",
6
6
  "type": "module",
@@ -35,7 +35,7 @@
35
35
  "author": "Sippet AI",
36
36
  "license": "UNLICENSED",
37
37
  "dependencies": {
38
- "@sippet-ai/sdk-js": "^0.0.6",
38
+ "@sippet-ai/sdk-js": "^0.0.7",
39
39
  "code-bubble": "^1.3.3",
40
40
  "lit": "^3.2.1",
41
41
  "lucide": "^0.562.0",