File tree Expand file tree Collapse file tree 1 file changed +6
-2
lines changed
Expand file tree Collapse file tree 1 file changed +6
-2
lines changed Original file line number Diff line number Diff line change @@ -17,6 +17,7 @@ import {
1717 CreateSquadDTO ,
1818 CreateAssistantDTO ,
1919 AssistantOverrides ,
20+ CreateWorkflowDTO ,
2021} from './api' ;
2122import { client } from './client' ;
2223
@@ -197,9 +198,10 @@ export default class Vapi extends VapiEventEmitter {
197198 assistant ?: CreateAssistantDTO | string ,
198199 assistantOverrides ?: AssistantOverrides ,
199200 squad ?: CreateSquadDTO | string ,
201+ workflow ?: CreateWorkflowDTO | string ,
200202 ) : Promise < Call | null > {
201- if ( ! assistant && ! squad ) {
202- throw new Error ( 'Assistant or Squad must be provided.' ) ;
203+ if ( ! assistant && ! squad && ! workflow ) {
204+ throw new Error ( 'Assistant or Squad or Workflow must be provided.' ) ;
203205 }
204206
205207 if ( this . started ) {
@@ -215,6 +217,8 @@ export default class Vapi extends VapiEventEmitter {
215217 assistantOverrides,
216218 squad : typeof squad === 'string' ? undefined : squad ,
217219 squadId : typeof squad === 'string' ? squad : undefined ,
220+ workflow : typeof workflow === 'string' ? undefined : workflow ,
221+ workflowId : typeof workflow === 'string' ? workflow : undefined ,
218222 } )
219223 ) . data ;
220224
You can’t perform that action at this time.
0 commit comments