@vogent/vogent-web-client 0.0.2 → 0.0.4
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/VogentCall.ts +78 -9
- package/__generated__/gql.ts +10 -0
- package/__generated__/graphql.ts +165 -13
- package/devices/VogentDevice.ts +2 -2
- package/devices/VonageDevice.ts +2 -2
- package/package.json +1 -1
- package/queries.ts +18 -0
package/VogentCall.ts
CHANGED
|
@@ -13,25 +13,45 @@ import {
|
|
|
13
13
|
AI_GET_TOKEN,
|
|
14
14
|
AI_HANGUP_CALL,
|
|
15
15
|
AI_START_DIAL_SESSION,
|
|
16
|
+
AI_SET_PAUSED,
|
|
17
|
+
REFRESH_TRANSCRIPT,
|
|
16
18
|
} from './queries';
|
|
17
19
|
import { createClient } from 'graphql-ws';
|
|
18
|
-
import { VogentDevice } from './devices/VogentDevice';
|
|
20
|
+
import { VogentAudioConn, VogentDevice } from './devices/VogentDevice';
|
|
19
21
|
import { VonageDevice } from './devices/VonageDevice';
|
|
20
22
|
import { dialStatusIsComplete } from './utils';
|
|
21
23
|
|
|
24
|
+
export type Transcript = {
|
|
25
|
+
text: string;
|
|
26
|
+
speaker: string;
|
|
27
|
+
}[]
|
|
28
|
+
|
|
22
29
|
export class VogentCall {
|
|
23
30
|
client: ApolloClient<NormalizedCacheObject>;
|
|
24
31
|
sessionId: string;
|
|
32
|
+
dialId: string;
|
|
25
33
|
subscription?: ObservableSubscription;
|
|
34
|
+
baseUrl: string;
|
|
26
35
|
dial?: Dial;
|
|
27
36
|
_handlers: {
|
|
28
37
|
ev: 'status';
|
|
29
38
|
fn: (...args: any[]) => void;
|
|
30
39
|
}[];
|
|
31
40
|
|
|
32
|
-
constructor(
|
|
41
|
+
constructor(dialDetails: {
|
|
42
|
+
sessionId: string;
|
|
43
|
+
dialId: string;
|
|
44
|
+
token: string;
|
|
45
|
+
}, config: {
|
|
46
|
+
baseUrl: string;
|
|
47
|
+
} = {
|
|
48
|
+
baseUrl: 'https://api.getelto.com',
|
|
49
|
+
}) {
|
|
33
50
|
this._handlers = [];
|
|
34
|
-
this.sessionId =
|
|
51
|
+
this.sessionId = dialDetails.sessionId;
|
|
52
|
+
this.dialId = dialDetails.dialId;
|
|
53
|
+
let token = dialDetails.token;
|
|
54
|
+
|
|
35
55
|
const authLink = setContext((_, { headers }) => {
|
|
36
56
|
return {
|
|
37
57
|
headers: {
|
|
@@ -41,13 +61,20 @@ export class VogentCall {
|
|
|
41
61
|
};
|
|
42
62
|
});
|
|
43
63
|
|
|
64
|
+
this.baseUrl = config.baseUrl;
|
|
65
|
+
|
|
44
66
|
const httpLink = createHttpLink({
|
|
45
|
-
uri:
|
|
67
|
+
uri: `${this.baseUrl}/query`,
|
|
68
|
+
headers: {
|
|
69
|
+
Authorization: `Bearer ${token}`,
|
|
70
|
+
}
|
|
46
71
|
});
|
|
47
72
|
|
|
73
|
+
const wsBaseUrl = this.baseUrl.replace('https://', 'wss://').replace("http://", "ws://");
|
|
74
|
+
|
|
48
75
|
const wsLink = new GraphQLWsLink(
|
|
49
76
|
createClient({
|
|
50
|
-
url:
|
|
77
|
+
url: `${wsBaseUrl}/query`,
|
|
51
78
|
connectionParams: () => ({
|
|
52
79
|
authToken: token,
|
|
53
80
|
}),
|
|
@@ -77,6 +104,32 @@ export class VogentCall {
|
|
|
77
104
|
});
|
|
78
105
|
}
|
|
79
106
|
|
|
107
|
+
monitorTranscript(fn: (transcript: Transcript) => void): () => void {
|
|
108
|
+
const subscription = this.client
|
|
109
|
+
.subscribe({
|
|
110
|
+
query: REFRESH_TRANSCRIPT,
|
|
111
|
+
variables: {
|
|
112
|
+
dialId: this.dialId,
|
|
113
|
+
},
|
|
114
|
+
})
|
|
115
|
+
.subscribe(({ data }) => {
|
|
116
|
+
console.log('monitorTranscript', data);
|
|
117
|
+
|
|
118
|
+
if (!data?.watchTranscript) {
|
|
119
|
+
return;
|
|
120
|
+
}
|
|
121
|
+
|
|
122
|
+
fn(data.watchTranscript.map((t) => ({
|
|
123
|
+
text: t.text,
|
|
124
|
+
speaker: t.speaker,
|
|
125
|
+
})));
|
|
126
|
+
});
|
|
127
|
+
|
|
128
|
+
return () => {
|
|
129
|
+
subscription.unsubscribe();
|
|
130
|
+
}
|
|
131
|
+
}
|
|
132
|
+
|
|
80
133
|
updateDial(dial: Dial) {
|
|
81
134
|
if (!this.dial || dial.status !== this.dial.status) {
|
|
82
135
|
this._handlers.forEach((h) => {
|
|
@@ -96,7 +149,7 @@ export class VogentCall {
|
|
|
96
149
|
};
|
|
97
150
|
}
|
|
98
151
|
|
|
99
|
-
async
|
|
152
|
+
async connectAudio(liveListen: boolean = false): Promise<VogentAudioConn> {
|
|
100
153
|
const token = await this.client.mutate({
|
|
101
154
|
mutation: AI_GET_TOKEN,
|
|
102
155
|
variables: {
|
|
@@ -109,8 +162,14 @@ export class VogentCall {
|
|
|
109
162
|
|
|
110
163
|
const d: VogentDevice = await VonageDevice.getDevice(token.data!.browserDialToken.token, true);
|
|
111
164
|
|
|
112
|
-
|
|
165
|
+
const c = await d.connect({
|
|
166
|
+
params: { EltoDialSessionID: this.sessionId, LiveListen: liveListen, DialID: this.dialId },
|
|
167
|
+
});
|
|
168
|
+
|
|
169
|
+
return c;
|
|
170
|
+
}
|
|
113
171
|
|
|
172
|
+
async start() {
|
|
114
173
|
this.subscription = this.client
|
|
115
174
|
.subscribe({
|
|
116
175
|
query: AI_CONNECT_SESSION,
|
|
@@ -139,9 +198,19 @@ export class VogentCall {
|
|
|
139
198
|
}
|
|
140
199
|
}
|
|
141
200
|
});
|
|
201
|
+
}
|
|
142
202
|
|
|
143
|
-
|
|
144
|
-
|
|
203
|
+
async setPaused(paused: boolean) {
|
|
204
|
+
if (!this.dial) {
|
|
205
|
+
return;
|
|
206
|
+
}
|
|
207
|
+
|
|
208
|
+
await this.client.mutate({
|
|
209
|
+
mutation: AI_SET_PAUSED,
|
|
210
|
+
variables: {
|
|
211
|
+
dialId: this.dial.id,
|
|
212
|
+
pauseStatus: paused,
|
|
213
|
+
},
|
|
145
214
|
});
|
|
146
215
|
}
|
|
147
216
|
|
package/__generated__/gql.ts
CHANGED
|
@@ -17,6 +17,8 @@ const documents = {
|
|
|
17
17
|
"\nmutation CreateAdHocDialSession($input: CreateAdHocDialSessionInput!) {\n createAdHocDialSession(input: $input) {\n id\n telephonyProvider\n }\n}": types.CreateAdHocDialSessionDocument,
|
|
18
18
|
"\n mutation StartDialSession($sessionId: ID!) {\n startDialSession(dialSessionId: $sessionId)\n }\n": types.StartDialSessionDocument,
|
|
19
19
|
"\n mutation HangupCall($dialId: ID!, $dropVoicemail: Boolean, $transferNumber: String) {\n hangupCall(dialId: $dialId, dropVoicemail: $dropVoicemail, transferNumber: $transferNumber)\n }\n": types.HangupCallDocument,
|
|
20
|
+
"\n mutation SetPaused($dialId: ID!, $pauseStatus: Boolean!) {\n pauseAI(dialId: $dialId, pauseStatus: $pauseStatus) {\n id\n }\n }\n": types.SetPausedDocument,
|
|
21
|
+
"\n subscription RefreshTranscript($dialId: ID!) {\n watchTranscript(dialId: $dialId) {\n speaker\n text\n detailType\n }\n }\n": types.RefreshTranscriptDocument,
|
|
20
22
|
"\n mutation BrowserDialToken($input: BrowserDialTokenInput!) {\n browserDialToken(input: $input) {\n token\n iceConfig\n }\n }\n": types.BrowserDialTokenDocument,
|
|
21
23
|
"\n subscription ConnectSession($sessionId: ID!) {\n connectSession(sessionId: $sessionId) {\n messageType\n content {\n __typename\n ... on DialsUpdatedMessage {\n contactId\n dials {\n id\n status\n answerType\n phoneField\n callDispositionId\n systemResultType\n toNumber\n }\n contactComplete\n }\n ... on DialConnectMessage {\n dialId\n }\n ... on SessionUpdatedMessage {\n dialSession {\n id\n status\n }\n reason\n }\n }\n }\n }\n": types.ConnectSessionDocument,
|
|
22
24
|
};
|
|
@@ -47,6 +49,14 @@ export function gql(source: "\n mutation StartDialSession($sessionId: ID!) {\n
|
|
|
47
49
|
* The gql function is used to parse GraphQL queries into a document that can be used by GraphQL clients.
|
|
48
50
|
*/
|
|
49
51
|
export function gql(source: "\n mutation HangupCall($dialId: ID!, $dropVoicemail: Boolean, $transferNumber: String) {\n hangupCall(dialId: $dialId, dropVoicemail: $dropVoicemail, transferNumber: $transferNumber)\n }\n"): (typeof documents)["\n mutation HangupCall($dialId: ID!, $dropVoicemail: Boolean, $transferNumber: String) {\n hangupCall(dialId: $dialId, dropVoicemail: $dropVoicemail, transferNumber: $transferNumber)\n }\n"];
|
|
52
|
+
/**
|
|
53
|
+
* The gql function is used to parse GraphQL queries into a document that can be used by GraphQL clients.
|
|
54
|
+
*/
|
|
55
|
+
export function gql(source: "\n mutation SetPaused($dialId: ID!, $pauseStatus: Boolean!) {\n pauseAI(dialId: $dialId, pauseStatus: $pauseStatus) {\n id\n }\n }\n"): (typeof documents)["\n mutation SetPaused($dialId: ID!, $pauseStatus: Boolean!) {\n pauseAI(dialId: $dialId, pauseStatus: $pauseStatus) {\n id\n }\n }\n"];
|
|
56
|
+
/**
|
|
57
|
+
* The gql function is used to parse GraphQL queries into a document that can be used by GraphQL clients.
|
|
58
|
+
*/
|
|
59
|
+
export function gql(source: "\n subscription RefreshTranscript($dialId: ID!) {\n watchTranscript(dialId: $dialId) {\n speaker\n text\n detailType\n }\n }\n"): (typeof documents)["\n subscription RefreshTranscript($dialId: ID!) {\n watchTranscript(dialId: $dialId) {\n speaker\n text\n detailType\n }\n }\n"];
|
|
50
60
|
/**
|
|
51
61
|
* The gql function is used to parse GraphQL queries into a document that can be used by GraphQL clients.
|
|
52
62
|
*/
|
package/__generated__/graphql.ts
CHANGED
|
@@ -14,6 +14,7 @@ export type Scalars = {
|
|
|
14
14
|
Boolean: { input: boolean; output: boolean; }
|
|
15
15
|
Int: { input: number; output: number; }
|
|
16
16
|
Float: { input: number; output: number; }
|
|
17
|
+
Any: { input: any; output: any; }
|
|
17
18
|
Map: { input: any; output: any; }
|
|
18
19
|
Time: { input: any; output: any; }
|
|
19
20
|
Upload: { input: any; output: any; }
|
|
@@ -143,6 +144,24 @@ export enum AnswerType {
|
|
|
143
144
|
Unknown = 'UNKNOWN'
|
|
144
145
|
}
|
|
145
146
|
|
|
147
|
+
export type ApiFlowNode = {
|
|
148
|
+
__typename?: 'ApiFlowNode';
|
|
149
|
+
id: Scalars['ID']['output'];
|
|
150
|
+
name: Scalars['String']['output'];
|
|
151
|
+
nodeData: Scalars['Map']['output'];
|
|
152
|
+
outputSchema?: Maybe<Scalars['String']['output']>;
|
|
153
|
+
transitionRules: Array<FlowTransitionRule>;
|
|
154
|
+
type: Scalars['String']['output'];
|
|
155
|
+
};
|
|
156
|
+
|
|
157
|
+
export type ApiFlowNodeInput = {
|
|
158
|
+
id: Scalars['ID']['input'];
|
|
159
|
+
name: Scalars['String']['input'];
|
|
160
|
+
nodeData: Scalars['Map']['input'];
|
|
161
|
+
transitionRules: Array<FlowTransitionRuleInput>;
|
|
162
|
+
type: Scalars['String']['input'];
|
|
163
|
+
};
|
|
164
|
+
|
|
146
165
|
export type ApolloPurpose = {
|
|
147
166
|
__typename?: 'ApolloPurpose';
|
|
148
167
|
id: Scalars['ID']['output'];
|
|
@@ -170,6 +189,15 @@ export type AuthPayload = {
|
|
|
170
189
|
user: User;
|
|
171
190
|
};
|
|
172
191
|
|
|
192
|
+
export type BasicUtteranceDetectorConfig = {
|
|
193
|
+
__typename?: 'BasicUtteranceDetectorConfig';
|
|
194
|
+
sensitivity: UtteranceDetectorSensitivity;
|
|
195
|
+
};
|
|
196
|
+
|
|
197
|
+
export type BasicUtteranceDetectorConfigInput = {
|
|
198
|
+
sensitivity: UtteranceDetectorSensitivity;
|
|
199
|
+
};
|
|
200
|
+
|
|
173
201
|
export type BillingSubscription = {
|
|
174
202
|
__typename?: 'BillingSubscription';
|
|
175
203
|
manageUrl: Scalars['String']['output'];
|
|
@@ -251,6 +279,10 @@ export type CallAgent = {
|
|
|
251
279
|
extractors: Array<CallAgentExtractor>;
|
|
252
280
|
functionDefinitions: Array<FunctionDefinition>;
|
|
253
281
|
id: Scalars['ID']['output'];
|
|
282
|
+
ivrDetectionType: IvrDetectionType;
|
|
283
|
+
ivrTaggingText?: Maybe<Scalars['String']['output']>;
|
|
284
|
+
ivrVersionedPrompt?: Maybe<VersionedPrompt>;
|
|
285
|
+
ivrVoice?: Maybe<AiVoice>;
|
|
254
286
|
language: Scalars['String']['output'];
|
|
255
287
|
name: Scalars['String']['output'];
|
|
256
288
|
openingLine?: Maybe<Scalars['String']['output']>;
|
|
@@ -260,6 +292,7 @@ export type CallAgent = {
|
|
|
260
292
|
prompts: Array<VersionedPrompt>;
|
|
261
293
|
pronunciationMap?: Maybe<PronunciationMap>;
|
|
262
294
|
transferNumber?: Maybe<Scalars['String']['output']>;
|
|
295
|
+
utteranceDetectorConfig: UtteranceDetectorConfig;
|
|
263
296
|
voiceVolumeLevel: Scalars['Int']['output'];
|
|
264
297
|
workspaceId: Scalars['ID']['output'];
|
|
265
298
|
};
|
|
@@ -538,6 +571,11 @@ export type CreateCallAgentExtractorInput = {
|
|
|
538
571
|
workspaceId: Scalars['ID']['input'];
|
|
539
572
|
};
|
|
540
573
|
|
|
574
|
+
export type CreateCallAgentNodeInput = {
|
|
575
|
+
nodeInput: ApiFlowNodeInput;
|
|
576
|
+
versionedPromptId: Scalars['ID']['input'];
|
|
577
|
+
};
|
|
578
|
+
|
|
541
579
|
export type CreateCallDataPresetInput = {
|
|
542
580
|
callAgentId: Scalars['ID']['input'];
|
|
543
581
|
data: Scalars['Map']['input'];
|
|
@@ -634,6 +672,7 @@ export type CreateFunctionDefinitionInput = {
|
|
|
634
672
|
description: Scalars['String']['input'];
|
|
635
673
|
dsl: Scalars['String']['input'];
|
|
636
674
|
name: Scalars['String']['input'];
|
|
675
|
+
outputs?: InputMaybe<Array<ExtractorFieldInput>>;
|
|
637
676
|
workspaceId: Scalars['ID']['input'];
|
|
638
677
|
};
|
|
639
678
|
|
|
@@ -666,7 +705,6 @@ export type CreateVersionedPromptInput = {
|
|
|
666
705
|
agentType: AgentType;
|
|
667
706
|
aiModelId: Scalars['ID']['input'];
|
|
668
707
|
callAgentId: Scalars['ID']['input'];
|
|
669
|
-
flowDefinition?: InputMaybe<Scalars['String']['input']>;
|
|
670
708
|
name?: InputMaybe<Scalars['String']['input']>;
|
|
671
709
|
prompt?: InputMaybe<Scalars['String']['input']>;
|
|
672
710
|
};
|
|
@@ -923,6 +961,41 @@ export type FilterableField = {
|
|
|
923
961
|
fieldName: Scalars['String']['output'];
|
|
924
962
|
};
|
|
925
963
|
|
|
964
|
+
export enum FlowConditionType {
|
|
965
|
+
Always = 'always',
|
|
966
|
+
Equal = 'equal',
|
|
967
|
+
Greater = 'greater',
|
|
968
|
+
In = 'in',
|
|
969
|
+
Language = 'language',
|
|
970
|
+
Less = 'less'
|
|
971
|
+
}
|
|
972
|
+
|
|
973
|
+
export type FlowDefinition = {
|
|
974
|
+
__typename?: 'FlowDefinition';
|
|
975
|
+
nodes: Array<ApiFlowNode>;
|
|
976
|
+
};
|
|
977
|
+
|
|
978
|
+
export type FlowDefinitionInput = {
|
|
979
|
+
nodes: Array<ApiFlowNodeInput>;
|
|
980
|
+
};
|
|
981
|
+
|
|
982
|
+
export type FlowTransitionRule = {
|
|
983
|
+
__typename?: 'FlowTransitionRule';
|
|
984
|
+
conditionType: FlowConditionType;
|
|
985
|
+
field?: Maybe<Scalars['String']['output']>;
|
|
986
|
+
transitionNodeId: Scalars['String']['output'];
|
|
987
|
+
value?: Maybe<Scalars['String']['output']>;
|
|
988
|
+
values?: Maybe<Array<Scalars['String']['output']>>;
|
|
989
|
+
};
|
|
990
|
+
|
|
991
|
+
export type FlowTransitionRuleInput = {
|
|
992
|
+
conditionType: FlowConditionType;
|
|
993
|
+
field?: InputMaybe<Scalars['String']['input']>;
|
|
994
|
+
transitionNodeId: Scalars['String']['input'];
|
|
995
|
+
value?: InputMaybe<Scalars['String']['input']>;
|
|
996
|
+
values?: InputMaybe<Array<Scalars['String']['input']>>;
|
|
997
|
+
};
|
|
998
|
+
|
|
926
999
|
export type FunctionDefinition = {
|
|
927
1000
|
__typename?: 'FunctionDefinition';
|
|
928
1001
|
arguments: Array<ExtractorField>;
|
|
@@ -931,6 +1004,7 @@ export type FunctionDefinition = {
|
|
|
931
1004
|
functionType: FunctionType;
|
|
932
1005
|
id: Scalars['ID']['output'];
|
|
933
1006
|
name: Scalars['String']['output'];
|
|
1007
|
+
outputs: Array<ExtractorField>;
|
|
934
1008
|
};
|
|
935
1009
|
|
|
936
1010
|
export type FunctionDefinitionFilter = {
|
|
@@ -961,6 +1035,11 @@ export type HubspotSettingsInput = {
|
|
|
961
1035
|
workspaceId: Scalars['ID']['input'];
|
|
962
1036
|
};
|
|
963
1037
|
|
|
1038
|
+
export enum IvrDetectionType {
|
|
1039
|
+
None = 'NONE',
|
|
1040
|
+
Standard = 'STANDARD'
|
|
1041
|
+
}
|
|
1042
|
+
|
|
964
1043
|
export type InboundForwardNumberInput = {
|
|
965
1044
|
number?: InputMaybe<Scalars['String']['input']>;
|
|
966
1045
|
workspaceId: Scalars['ID']['input'];
|
|
@@ -1068,7 +1147,6 @@ export type LookupKnowledgeBaseResult = {
|
|
|
1068
1147
|
export type MemberCountRes = {
|
|
1069
1148
|
__typename?: 'MemberCountRes';
|
|
1070
1149
|
dialing: Scalars['Int']['output'];
|
|
1071
|
-
nonDialing: Scalars['Int']['output'];
|
|
1072
1150
|
};
|
|
1073
1151
|
|
|
1074
1152
|
export type MonitorActiveUsersInput = {
|
|
@@ -1094,6 +1172,7 @@ export type Mutation = {
|
|
|
1094
1172
|
createAiVoice: AiVoice;
|
|
1095
1173
|
createCallAgent: CallAgent;
|
|
1096
1174
|
createCallAgentExtractor: CallAgentExtractor;
|
|
1175
|
+
createCallAgentNode: ApiFlowNode;
|
|
1097
1176
|
createCallDataPreset: CallDataPreset;
|
|
1098
1177
|
createCoachingComment: CoachingComment;
|
|
1099
1178
|
createContact: Contact;
|
|
@@ -1155,6 +1234,7 @@ export type Mutation = {
|
|
|
1155
1234
|
updateApolloSettings: CrmSpecification;
|
|
1156
1235
|
updateCallAgent: CallAgent;
|
|
1157
1236
|
updateCallAgentExtractor: CallAgentExtractor;
|
|
1237
|
+
updateCallAgentNode: ApiFlowNode;
|
|
1158
1238
|
updateCallAgentPronunciationMap: CallAgent;
|
|
1159
1239
|
updateCustomDetectorRegexps: Workspace;
|
|
1160
1240
|
updateDialMetadata: Dial;
|
|
@@ -1263,6 +1343,11 @@ export type MutationCreateCallAgentExtractorArgs = {
|
|
|
1263
1343
|
};
|
|
1264
1344
|
|
|
1265
1345
|
|
|
1346
|
+
export type MutationCreateCallAgentNodeArgs = {
|
|
1347
|
+
input: CreateCallAgentNodeInput;
|
|
1348
|
+
};
|
|
1349
|
+
|
|
1350
|
+
|
|
1266
1351
|
export type MutationCreateCallDataPresetArgs = {
|
|
1267
1352
|
input: CreateCallDataPresetInput;
|
|
1268
1353
|
};
|
|
@@ -1505,7 +1590,6 @@ export type MutationRunExtractorArgs = {
|
|
|
1505
1590
|
|
|
1506
1591
|
export type MutationSetMemberAccessArgs = {
|
|
1507
1592
|
email: Scalars['String']['input'];
|
|
1508
|
-
nonDialing: Scalars['Boolean']['input'];
|
|
1509
1593
|
role: Role;
|
|
1510
1594
|
workspaceId: Scalars['ID']['input'];
|
|
1511
1595
|
};
|
|
@@ -1577,6 +1661,11 @@ export type MutationUpdateCallAgentExtractorArgs = {
|
|
|
1577
1661
|
};
|
|
1578
1662
|
|
|
1579
1663
|
|
|
1664
|
+
export type MutationUpdateCallAgentNodeArgs = {
|
|
1665
|
+
input: UpdateCallAgentNodeInput;
|
|
1666
|
+
};
|
|
1667
|
+
|
|
1668
|
+
|
|
1580
1669
|
export type MutationUpdateCallAgentPronunciationMapArgs = {
|
|
1581
1670
|
input: UpdateCallAgentPronunciationMapInput;
|
|
1582
1671
|
};
|
|
@@ -1661,6 +1750,13 @@ export type MutationUpdateWorkspaceWebhookArgs = {
|
|
|
1661
1750
|
input: WorkspaceWebhookInput;
|
|
1662
1751
|
};
|
|
1663
1752
|
|
|
1753
|
+
export type NodeTransitionResult = {
|
|
1754
|
+
__typename?: 'NodeTransitionResult';
|
|
1755
|
+
fromNodeId: Scalars['String']['output'];
|
|
1756
|
+
result?: Maybe<Scalars['Any']['output']>;
|
|
1757
|
+
toNodeId: Scalars['String']['output'];
|
|
1758
|
+
};
|
|
1759
|
+
|
|
1664
1760
|
export type NullableIdInput = {
|
|
1665
1761
|
value?: InputMaybe<Scalars['ID']['input']>;
|
|
1666
1762
|
};
|
|
@@ -2053,6 +2149,7 @@ export type SpeakerTextRes = {
|
|
|
2053
2149
|
audioStart: Scalars['Int']['output'];
|
|
2054
2150
|
detailType?: Maybe<Scalars['String']['output']>;
|
|
2055
2151
|
knowledgeBaseContext?: Maybe<Array<SpeakerTextKnowledgeBaseContext>>;
|
|
2152
|
+
nodeTransitionResult?: Maybe<NodeTransitionResult>;
|
|
2056
2153
|
speaker: Scalars['String']['output'];
|
|
2057
2154
|
text: Scalars['String']['output'];
|
|
2058
2155
|
};
|
|
@@ -2147,6 +2244,7 @@ export enum SystemResultType {
|
|
|
2147
2244
|
Failed = 'FAILED',
|
|
2148
2245
|
NoAnswer = 'NO_ANSWER',
|
|
2149
2246
|
NumberSkipped = 'NUMBER_SKIPPED',
|
|
2247
|
+
RateLimited = 'RATE_LIMITED',
|
|
2150
2248
|
Timeout = 'TIMEOUT',
|
|
2151
2249
|
UserHangup = 'USER_HANGUP',
|
|
2152
2250
|
VoicemailLeft = 'VOICEMAIL_LEFT',
|
|
@@ -2238,16 +2336,26 @@ export type UpdateCallAgentInput = {
|
|
|
2238
2336
|
backgroundNoiseType?: InputMaybe<Scalars['String']['input']>;
|
|
2239
2337
|
callAgentExtractorId?: InputMaybe<NullableStringInput>;
|
|
2240
2338
|
defaultPromptId?: InputMaybe<Scalars['ID']['input']>;
|
|
2339
|
+
ivrDetectionType?: InputMaybe<IvrDetectionType>;
|
|
2340
|
+
ivrTaggingText?: InputMaybe<NullableStringInput>;
|
|
2341
|
+
ivrVersionedPromptId?: InputMaybe<NullableStringInput>;
|
|
2342
|
+
ivrVoiceId?: InputMaybe<NullableStringInput>;
|
|
2241
2343
|
language?: InputMaybe<Scalars['String']['input']>;
|
|
2242
2344
|
linkedFunctionDefinitionIds?: InputMaybe<Array<Scalars['ID']['input']>>;
|
|
2243
2345
|
name?: InputMaybe<Scalars['String']['input']>;
|
|
2244
2346
|
openingLine?: InputMaybe<NullableStringInput>;
|
|
2245
2347
|
openingLineType?: InputMaybe<OpeningLineType>;
|
|
2246
2348
|
transferNumber?: InputMaybe<NullableStringInput>;
|
|
2349
|
+
utteranceDetectorConfig?: InputMaybe<UtteranceDetectorConfigInput>;
|
|
2247
2350
|
voiceId?: InputMaybe<Scalars['ID']['input']>;
|
|
2248
2351
|
voiceVolumeLevel?: InputMaybe<Scalars['Int']['input']>;
|
|
2249
2352
|
};
|
|
2250
2353
|
|
|
2354
|
+
export type UpdateCallAgentNodeInput = {
|
|
2355
|
+
nodeInput: ApiFlowNodeInput;
|
|
2356
|
+
versionedPromptId: Scalars['ID']['input'];
|
|
2357
|
+
};
|
|
2358
|
+
|
|
2251
2359
|
export type UpdateCallAgentPronunciationMapInput = {
|
|
2252
2360
|
agentId: Scalars['ID']['input'];
|
|
2253
2361
|
pronunciationMapJson?: InputMaybe<Scalars['String']['input']>;
|
|
@@ -2279,6 +2387,7 @@ export type UpdateFunctionDefinitionInput = {
|
|
|
2279
2387
|
dsl?: InputMaybe<Scalars['String']['input']>;
|
|
2280
2388
|
functionDefinitionId: Scalars['ID']['input'];
|
|
2281
2389
|
name?: InputMaybe<Scalars['String']['input']>;
|
|
2390
|
+
outputs?: InputMaybe<Array<ExtractorFieldInput>>;
|
|
2282
2391
|
};
|
|
2283
2392
|
|
|
2284
2393
|
export type UpdateRefillSettingsInput = {
|
|
@@ -2298,7 +2407,8 @@ export type UpdateSystemResultMappingInput = {
|
|
|
2298
2407
|
export type UpdateVersionedPromptInput = {
|
|
2299
2408
|
agentType?: InputMaybe<AgentType>;
|
|
2300
2409
|
aiModelId?: InputMaybe<Scalars['ID']['input']>;
|
|
2301
|
-
flowDefinition?: InputMaybe<
|
|
2410
|
+
flowDefinition?: InputMaybe<FlowDefinitionInput>;
|
|
2411
|
+
flowDefinitionJSON?: InputMaybe<Scalars['String']['input']>;
|
|
2302
2412
|
name?: InputMaybe<Scalars['String']['input']>;
|
|
2303
2413
|
prompt?: InputMaybe<Scalars['String']['input']>;
|
|
2304
2414
|
versionedPromptId: Scalars['ID']['input'];
|
|
@@ -2393,12 +2503,35 @@ export type UserWorkspaceSettingsInput = {
|
|
|
2393
2503
|
workspaceId: Scalars['ID']['input'];
|
|
2394
2504
|
};
|
|
2395
2505
|
|
|
2506
|
+
export type UtteranceDetectorConfig = {
|
|
2507
|
+
__typename?: 'UtteranceDetectorConfig';
|
|
2508
|
+
basic?: Maybe<BasicUtteranceDetectorConfig>;
|
|
2509
|
+
type: UtteranceDetectorConfigType;
|
|
2510
|
+
};
|
|
2511
|
+
|
|
2512
|
+
export type UtteranceDetectorConfigInput = {
|
|
2513
|
+
basic?: InputMaybe<BasicUtteranceDetectorConfigInput>;
|
|
2514
|
+
type: UtteranceDetectorConfigType;
|
|
2515
|
+
};
|
|
2516
|
+
|
|
2517
|
+
export enum UtteranceDetectorConfigType {
|
|
2518
|
+
Advanced = 'ADVANCED',
|
|
2519
|
+
Basic = 'BASIC'
|
|
2520
|
+
}
|
|
2521
|
+
|
|
2522
|
+
export enum UtteranceDetectorSensitivity {
|
|
2523
|
+
Fast = 'FAST',
|
|
2524
|
+
Medium = 'MEDIUM',
|
|
2525
|
+
Slow = 'SLOW',
|
|
2526
|
+
UltraFast = 'ULTRA_FAST'
|
|
2527
|
+
}
|
|
2528
|
+
|
|
2396
2529
|
export type VersionedPrompt = {
|
|
2397
2530
|
__typename?: 'VersionedPrompt';
|
|
2398
2531
|
agentType: AgentType;
|
|
2399
2532
|
aiModel?: Maybe<AiModel>;
|
|
2400
2533
|
createdAt: Scalars['Time']['output'];
|
|
2401
|
-
flowDefinition?: Maybe<
|
|
2534
|
+
flowDefinition?: Maybe<FlowDefinition>;
|
|
2402
2535
|
id: Scalars['ID']['output'];
|
|
2403
2536
|
name: Scalars['String']['output'];
|
|
2404
2537
|
prompt?: Maybe<Scalars['String']['output']>;
|
|
@@ -2411,6 +2544,11 @@ export type VideoTokenResp = {
|
|
|
2411
2544
|
token: Scalars['String']['output'];
|
|
2412
2545
|
};
|
|
2413
2546
|
|
|
2547
|
+
export type VisibleWorkspaceLimits = {
|
|
2548
|
+
__typename?: 'VisibleWorkspaceLimits';
|
|
2549
|
+
concurrentDialLimit: Scalars['Int']['output'];
|
|
2550
|
+
};
|
|
2551
|
+
|
|
2414
2552
|
export type VoiceFilter = {
|
|
2415
2553
|
text?: InputMaybe<Scalars['String']['input']>;
|
|
2416
2554
|
};
|
|
@@ -2441,6 +2579,7 @@ export type Workspace = {
|
|
|
2441
2579
|
bannerMessage?: Maybe<Scalars['String']['output']>;
|
|
2442
2580
|
billingUsage: Array<UsageLineItem>;
|
|
2443
2581
|
callAgents: CallAgentsResult;
|
|
2582
|
+
concurrentDialCount: Scalars['Int']['output'];
|
|
2444
2583
|
contactLists: ContactListResult;
|
|
2445
2584
|
crmSpecification: CrmSpecification;
|
|
2446
2585
|
crmSpecifications: Array<CrmSpecification>;
|
|
@@ -2456,7 +2595,7 @@ export type Workspace = {
|
|
|
2456
2595
|
knowledgeBases: ListKnowledgeBasesResult;
|
|
2457
2596
|
limits: WorkspaceLimits;
|
|
2458
2597
|
member: WorkspaceMember;
|
|
2459
|
-
memberCount:
|
|
2598
|
+
memberCount: Scalars['Int']['output'];
|
|
2460
2599
|
name?: Maybe<Scalars['String']['output']>;
|
|
2461
2600
|
overLimit: OverLimitResult;
|
|
2462
2601
|
phoneNumbers: PhoneNumbersResult;
|
|
@@ -2471,6 +2610,7 @@ export type Workspace = {
|
|
|
2471
2610
|
timeStats: TimeStatsResult;
|
|
2472
2611
|
userSettings: UserWorkspaceSettings;
|
|
2473
2612
|
viewerRole: Role;
|
|
2613
|
+
visibleLimits: VisibleWorkspaceLimits;
|
|
2474
2614
|
voicemails: Array<Voicemail>;
|
|
2475
2615
|
voices: AiVoicesResult;
|
|
2476
2616
|
wallet?: Maybe<WorkspaceWallet>;
|
|
@@ -2608,26 +2748,21 @@ export type WorkspaceDialStatusChangeMessage = {
|
|
|
2608
2748
|
|
|
2609
2749
|
export type WorkspaceLimits = {
|
|
2610
2750
|
__typename?: 'WorkspaceLimits';
|
|
2611
|
-
|
|
2612
|
-
nonDialingUserPhoneNumberLimit: Scalars['Int']['output'];
|
|
2751
|
+
concurrentDialLimit: Scalars['Int']['output'];
|
|
2613
2752
|
spamLimit: Scalars['Int']['output'];
|
|
2614
|
-
userLimit: Scalars['Int']['output'];
|
|
2615
2753
|
userPhoneNumberLimit: Scalars['Int']['output'];
|
|
2616
2754
|
};
|
|
2617
2755
|
|
|
2618
2756
|
export type WorkspaceLimitsInput = {
|
|
2619
|
-
|
|
2620
|
-
nonDialingUserPhoneNumberLimit?: InputMaybe<Scalars['Int']['input']>;
|
|
2757
|
+
concurrentDialLimit?: InputMaybe<Scalars['Int']['input']>;
|
|
2621
2758
|
salesfloorType?: InputMaybe<SalesfloorType>;
|
|
2622
2759
|
spamLimit?: InputMaybe<Scalars['Int']['input']>;
|
|
2623
|
-
userLimit?: InputMaybe<Scalars['Int']['input']>;
|
|
2624
2760
|
userPhoneNumberLimit?: InputMaybe<Scalars['Int']['input']>;
|
|
2625
2761
|
workspaceId: Scalars['ID']['input'];
|
|
2626
2762
|
};
|
|
2627
2763
|
|
|
2628
2764
|
export type WorkspaceMember = {
|
|
2629
2765
|
__typename?: 'WorkspaceMember';
|
|
2630
|
-
nonDialing: Scalars['Boolean']['output'];
|
|
2631
2766
|
role: Role;
|
|
2632
2767
|
user: User;
|
|
2633
2768
|
};
|
|
@@ -2669,6 +2804,21 @@ export type HangupCallMutationVariables = Exact<{
|
|
|
2669
2804
|
|
|
2670
2805
|
export type HangupCallMutation = { __typename?: 'Mutation', hangupCall: boolean };
|
|
2671
2806
|
|
|
2807
|
+
export type SetPausedMutationVariables = Exact<{
|
|
2808
|
+
dialId: Scalars['ID']['input'];
|
|
2809
|
+
pauseStatus: Scalars['Boolean']['input'];
|
|
2810
|
+
}>;
|
|
2811
|
+
|
|
2812
|
+
|
|
2813
|
+
export type SetPausedMutation = { __typename?: 'Mutation', pauseAI: { __typename?: 'Dial', id: string } };
|
|
2814
|
+
|
|
2815
|
+
export type RefreshTranscriptSubscriptionVariables = Exact<{
|
|
2816
|
+
dialId: Scalars['ID']['input'];
|
|
2817
|
+
}>;
|
|
2818
|
+
|
|
2819
|
+
|
|
2820
|
+
export type RefreshTranscriptSubscription = { __typename?: 'Subscription', watchTranscript: Array<{ __typename?: 'SpeakerTextRes', speaker: string, text: string, detailType?: string | null }> };
|
|
2821
|
+
|
|
2672
2822
|
export type BrowserDialTokenMutationVariables = Exact<{
|
|
2673
2823
|
input: BrowserDialTokenInput;
|
|
2674
2824
|
}>;
|
|
@@ -2687,5 +2837,7 @@ export type ConnectSessionSubscription = { __typename?: 'Subscription', connectS
|
|
|
2687
2837
|
export const CreateAdHocDialSessionDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"mutation","name":{"kind":"Name","value":"CreateAdHocDialSession"},"variableDefinitions":[{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"input"}},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"CreateAdHocDialSessionInput"}}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"createAdHocDialSession"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"input"},"value":{"kind":"Variable","name":{"kind":"Name","value":"input"}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"telephonyProvider"}}]}}]}}]} as unknown as DocumentNode<CreateAdHocDialSessionMutation, CreateAdHocDialSessionMutationVariables>;
|
|
2688
2838
|
export const StartDialSessionDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"mutation","name":{"kind":"Name","value":"StartDialSession"},"variableDefinitions":[{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"sessionId"}},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"ID"}}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"startDialSession"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"dialSessionId"},"value":{"kind":"Variable","name":{"kind":"Name","value":"sessionId"}}}]}]}}]} as unknown as DocumentNode<StartDialSessionMutation, StartDialSessionMutationVariables>;
|
|
2689
2839
|
export const HangupCallDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"mutation","name":{"kind":"Name","value":"HangupCall"},"variableDefinitions":[{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"dialId"}},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"ID"}}}},{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"dropVoicemail"}},"type":{"kind":"NamedType","name":{"kind":"Name","value":"Boolean"}}},{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"transferNumber"}},"type":{"kind":"NamedType","name":{"kind":"Name","value":"String"}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"hangupCall"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"dialId"},"value":{"kind":"Variable","name":{"kind":"Name","value":"dialId"}}},{"kind":"Argument","name":{"kind":"Name","value":"dropVoicemail"},"value":{"kind":"Variable","name":{"kind":"Name","value":"dropVoicemail"}}},{"kind":"Argument","name":{"kind":"Name","value":"transferNumber"},"value":{"kind":"Variable","name":{"kind":"Name","value":"transferNumber"}}}]}]}}]} as unknown as DocumentNode<HangupCallMutation, HangupCallMutationVariables>;
|
|
2840
|
+
export const SetPausedDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"mutation","name":{"kind":"Name","value":"SetPaused"},"variableDefinitions":[{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"dialId"}},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"ID"}}}},{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"pauseStatus"}},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"Boolean"}}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"pauseAI"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"dialId"},"value":{"kind":"Variable","name":{"kind":"Name","value":"dialId"}}},{"kind":"Argument","name":{"kind":"Name","value":"pauseStatus"},"value":{"kind":"Variable","name":{"kind":"Name","value":"pauseStatus"}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}}]}}]}}]} as unknown as DocumentNode<SetPausedMutation, SetPausedMutationVariables>;
|
|
2841
|
+
export const RefreshTranscriptDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"subscription","name":{"kind":"Name","value":"RefreshTranscript"},"variableDefinitions":[{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"dialId"}},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"ID"}}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"watchTranscript"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"dialId"},"value":{"kind":"Variable","name":{"kind":"Name","value":"dialId"}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"speaker"}},{"kind":"Field","name":{"kind":"Name","value":"text"}},{"kind":"Field","name":{"kind":"Name","value":"detailType"}}]}}]}}]} as unknown as DocumentNode<RefreshTranscriptSubscription, RefreshTranscriptSubscriptionVariables>;
|
|
2690
2842
|
export const BrowserDialTokenDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"mutation","name":{"kind":"Name","value":"BrowserDialToken"},"variableDefinitions":[{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"input"}},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"BrowserDialTokenInput"}}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"browserDialToken"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"input"},"value":{"kind":"Variable","name":{"kind":"Name","value":"input"}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"token"}},{"kind":"Field","name":{"kind":"Name","value":"iceConfig"}}]}}]}}]} as unknown as DocumentNode<BrowserDialTokenMutation, BrowserDialTokenMutationVariables>;
|
|
2691
2843
|
export const ConnectSessionDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"subscription","name":{"kind":"Name","value":"ConnectSession"},"variableDefinitions":[{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"sessionId"}},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"ID"}}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"connectSession"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"sessionId"},"value":{"kind":"Variable","name":{"kind":"Name","value":"sessionId"}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"messageType"}},{"kind":"Field","name":{"kind":"Name","value":"content"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"__typename"}},{"kind":"InlineFragment","typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"DialsUpdatedMessage"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"contactId"}},{"kind":"Field","name":{"kind":"Name","value":"dials"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"status"}},{"kind":"Field","name":{"kind":"Name","value":"answerType"}},{"kind":"Field","name":{"kind":"Name","value":"phoneField"}},{"kind":"Field","name":{"kind":"Name","value":"callDispositionId"}},{"kind":"Field","name":{"kind":"Name","value":"systemResultType"}},{"kind":"Field","name":{"kind":"Name","value":"toNumber"}}]}},{"kind":"Field","name":{"kind":"Name","value":"contactComplete"}}]}},{"kind":"InlineFragment","typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"DialConnectMessage"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"dialId"}}]}},{"kind":"InlineFragment","typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"SessionUpdatedMessage"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"dialSession"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"status"}}]}},{"kind":"Field","name":{"kind":"Name","value":"reason"}}]}}]}}]}}]}}]} as unknown as DocumentNode<ConnectSessionSubscription, ConnectSessionSubscriptionVariables>;
|
package/devices/VogentDevice.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
// eslint-disable-next-line @typescript-eslint/no-empty-interface
|
|
2
2
|
|
|
3
|
-
export interface
|
|
3
|
+
export interface VogentAudioConn {
|
|
4
4
|
on: (ev: 'mute' | 'disconnect', fn: (...args: any[]) => void) => void;
|
|
5
5
|
mute: (status: boolean) => void;
|
|
6
6
|
disconnect: () => void;
|
|
@@ -8,5 +8,5 @@ export interface VogentCall {
|
|
|
8
8
|
}
|
|
9
9
|
|
|
10
10
|
export interface VogentDevice {
|
|
11
|
-
connect: (p: any) => Promise<
|
|
11
|
+
connect: (p: any) => Promise<VogentAudioConn>;
|
|
12
12
|
}
|
package/devices/VonageDevice.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { VogentAudioConn } from './VogentDevice';
|
|
2
2
|
import { VonageClient, LoggingLevel } from '@vonage/client-sdk';
|
|
3
3
|
|
|
4
4
|
export class VonageCall {
|
|
@@ -95,7 +95,7 @@ export class VonageDevice {
|
|
|
95
95
|
return new VonageDevice(sessId, client, disableEffects);
|
|
96
96
|
}
|
|
97
97
|
|
|
98
|
-
async connect(p: any): Promise<
|
|
98
|
+
async connect(p: any): Promise<VogentAudioConn> {
|
|
99
99
|
const call = await this._client.serverCall(p.params);
|
|
100
100
|
const v = new VonageCall(call, this._client, p.params);
|
|
101
101
|
return v;
|
package/package.json
CHANGED
package/queries.ts
CHANGED
|
@@ -20,6 +20,24 @@ export const AI_HANGUP_CALL = gql(`
|
|
|
20
20
|
}
|
|
21
21
|
`);
|
|
22
22
|
|
|
23
|
+
export const AI_SET_PAUSED = gql(`
|
|
24
|
+
mutation SetPaused($dialId: ID!, $pauseStatus: Boolean!) {
|
|
25
|
+
pauseAI(dialId: $dialId, pauseStatus: $pauseStatus) {
|
|
26
|
+
id
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
`);
|
|
30
|
+
|
|
31
|
+
export const REFRESH_TRANSCRIPT = gql(`
|
|
32
|
+
subscription RefreshTranscript($dialId: ID!) {
|
|
33
|
+
watchTranscript(dialId: $dialId) {
|
|
34
|
+
speaker
|
|
35
|
+
text
|
|
36
|
+
detailType
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
`);
|
|
40
|
+
|
|
23
41
|
export const AI_GET_TOKEN = gql(`
|
|
24
42
|
mutation BrowserDialToken($input: BrowserDialTokenInput!) {
|
|
25
43
|
browserDialToken(input: $input) {
|