Skip to content

Commit

Permalink
Merge pull request VapiAI#13 from VapiAI/vap-1106-update-web-sdk-vapi…
Browse files Browse the repository at this point in the history
…clienttoservermessage-type-to-include

Added types for VapiClientToServerMessage to mirror the backend types
  • Loading branch information
Husamui authored Mar 7, 2024
2 parents c298fa1 + 63fac3f commit 59e4b49
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -128,3 +128,6 @@ dist
.yarn/build-state.yml
.yarn/install-state.gz
.pnp.*

# mac
.DS_Store
7 changes: 6 additions & 1 deletion vapi.ts
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,12 @@ export interface AddMessageMessage {
message: ChatCompletionMessageParam;
}

type VapiClientToServerMessage = AddMessageMessage;
export interface ControlMessages {
type: 'control';
control: 'mute-assistant' | 'unmute-assistant';
}

type VapiClientToServerMessage = AddMessageMessage | ControlMessages;

type VapiEventNames =
| 'call-end'
Expand Down

0 comments on commit 59e4b49

Please sign in to comment.