Skip to content

Commit 90df368

Browse files
committed
Release 0.8.1
1 parent 639838a commit 90df368

File tree

214 files changed

+4422
-1107
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

214 files changed

+4422
-1107
lines changed

.github/workflows/ci.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ jobs:
88

99
steps:
1010
- name: Checkout repo
11-
uses: actions/checkout@v3
11+
uses: actions/checkout@v4
1212

1313
- uses: actions/checkout@master
1414

@@ -29,7 +29,7 @@ jobs:
2929

3030
steps:
3131
- name: Checkout repo
32-
uses: actions/checkout@v3
32+
uses: actions/checkout@v4
3333

3434
- uses: actions/checkout@master
3535

@@ -54,7 +54,7 @@ jobs:
5454

5555
steps:
5656
- name: Checkout repo
57-
uses: actions/checkout@v3
57+
uses: actions/checkout@v4
5858

5959
- name: Setup .NET
6060
uses: actions/setup-dotnet@v1

src/Vapi.Net.Test/Core/QueryStringConverterTests.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -109,8 +109,8 @@ public void ToQueryStringCollection_OnString_ThrowsException()
109109
[Test]
110110
public void ToQueryStringCollection_OnArray_ThrowsException()
111111
{
112-
var exception = Assert.Throws<Exception>(
113-
() => QueryStringConverter.ToForm(Array.Empty<object>())
112+
var exception = Assert.Throws<Exception>(() =>
113+
QueryStringConverter.ToForm(Array.Empty<object>())
114114
);
115115
Assert.That(
116116
exception.Message,

src/Vapi.Net.Test/Vapi.Net.Test.Custom.props

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,5 +3,4 @@ Configure additional MSBuild properties for your project in this file:
33
- Step 1: Add this file to your .fernignore file to ensure it is not overwritten.
44
- Step 2: Modify this file to your liking.
55
-->
6-
<Project>
7-
</Project>
6+
<Project></Project>
Lines changed: 32 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -1,37 +1,33 @@
11
<Project Sdk="Microsoft.NET.Sdk">
2-
3-
<PropertyGroup>
4-
<TargetFramework>net8.0</TargetFramework>
5-
<LangVersion>12</LangVersion>
6-
<ImplicitUsings>enable</ImplicitUsings>
7-
<Nullable>enable</Nullable>
8-
<IsPackable>false</IsPackable>
9-
<IsTestProject>true</IsTestProject>
10-
<PolySharpIncludeRuntimeSupportedAttributes>true</PolySharpIncludeRuntimeSupportedAttributes>
11-
</PropertyGroup>
12-
13-
<ItemGroup>
14-
<PackageReference Include="PolySharp" Version="1.15.0">
15-
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
16-
<PrivateAssets>all</PrivateAssets>
17-
</PackageReference>
18-
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.13.0"/>
19-
<PackageReference Include="NUnit" Version="4.3.2"/>
20-
<PackageReference Include="NUnit3TestAdapter" Version="5.0.0"/>
21-
<PackageReference Include="NUnit.Analyzers" Version="4.6.0">
22-
<PrivateAssets>all</PrivateAssets>
23-
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
24-
</PackageReference>
25-
<PackageReference Include="coverlet.collector" Version="6.0.4">
26-
<PrivateAssets>all</PrivateAssets>
27-
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
28-
</PackageReference>
29-
<PackageReference Include="WireMock.Net" Version="1.7.4" />
30-
</ItemGroup>
31-
32-
<ItemGroup>
33-
<ProjectReference Include="..\Vapi.Net\Vapi.Net.csproj" />
34-
</ItemGroup>
35-
36-
<Import Project="Vapi.Net.Test.Custom.props" Condition="Exists('Vapi.Net.Test.Custom.props')" />
37-
</Project>
2+
<PropertyGroup>
3+
<TargetFramework>net8.0</TargetFramework>
4+
<LangVersion>12</LangVersion>
5+
<ImplicitUsings>enable</ImplicitUsings>
6+
<Nullable>enable</Nullable>
7+
<IsPackable>false</IsPackable>
8+
<IsTestProject>true</IsTestProject>
9+
<PolySharpIncludeRuntimeSupportedAttributes>true</PolySharpIncludeRuntimeSupportedAttributes>
10+
</PropertyGroup>
11+
<ItemGroup>
12+
<PackageReference Include="PolySharp" Version="1.15.0">
13+
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
14+
<PrivateAssets>all</PrivateAssets>
15+
</PackageReference>
16+
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.13.0" />
17+
<PackageReference Include="NUnit" Version="4.3.2" />
18+
<PackageReference Include="NUnit3TestAdapter" Version="5.0.0" />
19+
<PackageReference Include="NUnit.Analyzers" Version="4.6.0">
20+
<PrivateAssets>all</PrivateAssets>
21+
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
22+
</PackageReference>
23+
<PackageReference Include="coverlet.collector" Version="6.0.4">
24+
<PrivateAssets>all</PrivateAssets>
25+
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
26+
</PackageReference>
27+
<PackageReference Include="WireMock.Net" Version="1.7.4" />
28+
</ItemGroup>
29+
<ItemGroup>
30+
<ProjectReference Include="..\Vapi.Net\Vapi.Net.csproj" />
31+
</ItemGroup>
32+
<Import Project="Vapi.Net.Test.Custom.props" Condition="Exists('Vapi.Net.Test.Custom.props')" />
33+
</Project>

src/Vapi.Net.sln

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,9 @@ Microsoft Visual Studio Solution File, Format Version 12.00
33
# Visual Studio Version 17
44
VisualStudioVersion = 17.0.31903.59
55
MinimumVisualStudioVersion = 10.0.40219.1
6-
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Vapi.Net", "Vapi.Net\Vapi.Net.csproj", "{97511217-C45A-49CD-A9C8-4B0F42EA576C}"
6+
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Vapi.Net", "Vapi.Net\Vapi.Net.csproj", "{B7822B17-E7D4-4F82-A255-BAE4080C361A}"
77
EndProject
8-
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Vapi.Net.Test", "Vapi.Net.Test\Vapi.Net.Test.csproj", "{1A0450D4-0B00-479A-88B4-38C53981E4B5}"
8+
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Vapi.Net.Test", "Vapi.Net.Test\Vapi.Net.Test.csproj", "{0CBE75AE-B4F0-450F-8577-7EFCC284FE08}"
99
EndProject
1010
Global
1111
GlobalSection(SolutionConfigurationPlatforms) = preSolution
@@ -16,13 +16,13 @@ Global
1616
HideSolutionNode = FALSE
1717
EndGlobalSection
1818
GlobalSection(ProjectConfigurationPlatforms) = postSolution
19-
{97511217-C45A-49CD-A9C8-4B0F42EA576C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
20-
{97511217-C45A-49CD-A9C8-4B0F42EA576C}.Debug|Any CPU.Build.0 = Debug|Any CPU
21-
{97511217-C45A-49CD-A9C8-4B0F42EA576C}.Release|Any CPU.ActiveCfg = Release|Any CPU
22-
{97511217-C45A-49CD-A9C8-4B0F42EA576C}.Release|Any CPU.Build.0 = Release|Any CPU
23-
{1A0450D4-0B00-479A-88B4-38C53981E4B5}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
24-
{1A0450D4-0B00-479A-88B4-38C53981E4B5}.Debug|Any CPU.Build.0 = Debug|Any CPU
25-
{1A0450D4-0B00-479A-88B4-38C53981E4B5}.Release|Any CPU.ActiveCfg = Release|Any CPU
26-
{1A0450D4-0B00-479A-88B4-38C53981E4B5}.Release|Any CPU.Build.0 = Release|Any CPU
19+
{B7822B17-E7D4-4F82-A255-BAE4080C361A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
20+
{B7822B17-E7D4-4F82-A255-BAE4080C361A}.Debug|Any CPU.Build.0 = Debug|Any CPU
21+
{B7822B17-E7D4-4F82-A255-BAE4080C361A}.Release|Any CPU.ActiveCfg = Release|Any CPU
22+
{B7822B17-E7D4-4F82-A255-BAE4080C361A}.Release|Any CPU.Build.0 = Release|Any CPU
23+
{0CBE75AE-B4F0-450F-8577-7EFCC284FE08}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
24+
{0CBE75AE-B4F0-450F-8577-7EFCC284FE08}.Debug|Any CPU.Build.0 = Debug|Any CPU
25+
{0CBE75AE-B4F0-450F-8577-7EFCC284FE08}.Release|Any CPU.ActiveCfg = Release|Any CPU
26+
{0CBE75AE-B4F0-450F-8577-7EFCC284FE08}.Release|Any CPU.Build.0 = Release|Any CPU
2727
EndGlobalSection
2828
EndGlobal

src/Vapi.Net/Assistants/Requests/UpdateAssistantDto.cs

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -130,6 +130,12 @@ public record UpdateAssistantDto
130130
[JsonPropertyName("credentials")]
131131
public IEnumerable<object>? Credentials { get; set; }
132132

133+
/// <summary>
134+
/// This is a set of actions that will be performed on certain events.
135+
/// </summary>
136+
[JsonPropertyName("hooks")]
137+
public IEnumerable<object>? Hooks { get; set; }
138+
133139
/// <summary>
134140
/// This is the name of the assistant.
135141
///
@@ -245,12 +251,6 @@ public record UpdateAssistantDto
245251
[JsonPropertyName("server")]
246252
public Server? Server { get; set; }
247253

248-
/// <summary>
249-
/// This is a set of actions that will be performed on certain events.
250-
/// </summary>
251-
[JsonPropertyName("hooks")]
252-
public IEnumerable<AssistantHooks>? Hooks { get; set; }
253-
254254
[JsonPropertyName("keypadInputPlan")]
255255
public KeypadInputPlan? KeypadInputPlan { get; set; }
256256

src/Vapi.Net/Assistants/Types/UpdateAssistantDtoClientMessagesItem.cs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,9 @@ public enum UpdateAssistantDtoClientMessagesItem
4343
[EnumMember(Value = "tool-calls-result")]
4444
ToolCallsResult,
4545

46+
[EnumMember(Value = "tool.completed")]
47+
ToolCompleted,
48+
4649
[EnumMember(Value = "transfer-update")]
4750
TransferUpdate,
4851

Lines changed: 18 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -1,60 +1,43 @@
1-
using System.Runtime.Serialization;
21
using System.Text.Json.Serialization;
32
using Vapi.Net.Core;
3+
using System.Runtime.Serialization;
44

55
namespace Vapi.Net;
66

77
[JsonConverter(typeof(EnumSerializer<UpdateAssistantDtoServerMessagesItem>))]
88
public enum UpdateAssistantDtoServerMessagesItem
99
{
10-
[EnumMember(Value = "conversation-update")]
11-
ConversationUpdate,
10+
[EnumMember(Value = "conversation-update")]ConversationUpdate,
1211

13-
[EnumMember(Value = "end-of-call-report")]
14-
EndOfCallReport,
12+
[EnumMember(Value = "end-of-call-report")]EndOfCallReport,
1513

16-
[EnumMember(Value = "function-call")]
17-
FunctionCall,
14+
[EnumMember(Value = "function-call")]FunctionCall,
1815

19-
[EnumMember(Value = "hang")]
20-
Hang,
16+
[EnumMember(Value = "hang")]Hang,
2117

22-
[EnumMember(Value = "language-changed")]
23-
LanguageChanged,
18+
[EnumMember(Value = "language-changed")]LanguageChanged,
2419

25-
[EnumMember(Value = "language-change-detected")]
26-
LanguageChangeDetected,
20+
[EnumMember(Value = "language-change-detected")]LanguageChangeDetected,
2721

28-
[EnumMember(Value = "model-output")]
29-
ModelOutput,
22+
[EnumMember(Value = "model-output")]ModelOutput,
3023

31-
[EnumMember(Value = "phone-call-control")]
32-
PhoneCallControl,
24+
[EnumMember(Value = "phone-call-control")]PhoneCallControl,
3325

34-
[EnumMember(Value = "speech-update")]
35-
SpeechUpdate,
26+
[EnumMember(Value = "speech-update")]SpeechUpdate,
3627

37-
[EnumMember(Value = "status-update")]
38-
StatusUpdate,
28+
[EnumMember(Value = "status-update")]StatusUpdate,
3929

40-
[EnumMember(Value = "transcript")]
41-
Transcript,
30+
[EnumMember(Value = "transcript")]Transcript,
4231

43-
[EnumMember(Value = "transcript[transcriptType='final']")]
44-
TranscriptTranscriptTypeFinal,
32+
[EnumMember(Value = "transcript[transcriptType="final"]")]TranscriptTranscriptTypeFinal,
4533

46-
[EnumMember(Value = "tool-calls")]
47-
ToolCalls,
34+
[EnumMember(Value = "tool-calls")]ToolCalls,
4835

49-
[EnumMember(Value = "transfer-destination-request")]
50-
TransferDestinationRequest,
36+
[EnumMember(Value = "transfer-destination-request")]TransferDestinationRequest,
5137

52-
[EnumMember(Value = "transfer-update")]
53-
TransferUpdate,
38+
[EnumMember(Value = "transfer-update")]TransferUpdate,
5439

55-
[EnumMember(Value = "user-interrupted")]
56-
UserInterrupted,
40+
[EnumMember(Value = "user-interrupted")]UserInterrupted,
5741

58-
[EnumMember(Value = "voice-input")]
59-
VoiceInput,
42+
[EnumMember(Value = "voice-input")]VoiceInput
6043
}

src/Vapi.Net/Calls/Requests/CreateCallDto.cs

Lines changed: 47 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,13 +32,23 @@ public record CreateCallDto
3232
public object? Transport { get; set; }
3333

3434
/// <summary>
35-
/// This is the assistant that will be used for the call. To use a transient assistant, use `assistant` instead.
35+
/// This is the assistant ID that will be used for the call. To use a transient assistant, use `assistant` instead.
36+
///
37+
/// To start a call with:
38+
/// - Assistant, use `assistantId` or `assistant`
39+
/// - Squad, use `squadId` or `squad`
40+
/// - Workflow, use `workflowId` or `workflow`
3641
/// </summary>
3742
[JsonPropertyName("assistantId")]
3843
public string? AssistantId { get; set; }
3944

4045
/// <summary>
4146
/// This is the assistant that will be used for the call. To use an existing assistant, use `assistantId` instead.
47+
///
48+
/// To start a call with:
49+
/// - Assistant, use `assistant`
50+
/// - Squad, use `squad`
51+
/// - Workflow, use `workflow`
4252
/// </summary>
4353
[JsonPropertyName("assistant")]
4454
public CreateAssistantDto? Assistant { get; set; }
@@ -51,16 +61,52 @@ public record CreateCallDto
5161

5262
/// <summary>
5363
/// This is the squad that will be used for the call. To use a transient squad, use `squad` instead.
64+
///
65+
/// To start a call with:
66+
/// - Assistant, use `assistant` or `assistantId`
67+
/// - Squad, use `squad` or `squadId`
68+
/// - Workflow, use `workflow` or `workflowId`
5469
/// </summary>
5570
[JsonPropertyName("squadId")]
5671
public string? SquadId { get; set; }
5772

5873
/// <summary>
5974
/// This is a squad that will be used for the call. To use an existing squad, use `squadId` instead.
75+
///
76+
/// To start a call with:
77+
/// - Assistant, use `assistant` or `assistantId`
78+
/// - Squad, use `squad` or `squadId`
79+
/// - Workflow, use `workflow` or `workflowId`
6080
/// </summary>
6181
[JsonPropertyName("squad")]
6282
public CreateSquadDto? Squad { get; set; }
6383

84+
/// <summary>
85+
/// [BETA] This feature is in active development. The API and behavior are subject to change as we refine it based on user feedback.
86+
///
87+
/// This is the workflow that will be used for the call. To use a transient workflow, use `workflow` instead.
88+
///
89+
/// To start a call with:
90+
/// - Assistant, use `assistant` or `assistantId`
91+
/// - Squad, use `squad` or `squadId`
92+
/// - Workflow, use `workflow` or `workflowId`
93+
/// </summary>
94+
[JsonPropertyName("workflowId")]
95+
public string? WorkflowId { get; set; }
96+
97+
/// <summary>
98+
/// [BETA] This feature is in active development. The API and behavior are subject to change as we refine it based on user feedback.
99+
///
100+
/// This is a workflow that will be used for the call. To use an existing workflow, use `workflowId` instead.
101+
///
102+
/// To start a call with:
103+
/// - Assistant, use `assistant` or `assistantId`
104+
/// - Squad, use `squad` or `squadId`
105+
/// - Workflow, use `workflow` or `workflowId`
106+
/// </summary>
107+
[JsonPropertyName("workflow")]
108+
public CreateWorkflowDto? Workflow { get; set; }
109+
64110
/// <summary>
65111
/// This is the phone number that will be used for the call. To use a transient number, use `phoneNumber` instead.
66112
///

src/Vapi.Net/Core/DateOnlyConverter.cs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -169,7 +169,6 @@ internal static class JsonConstants
169169
// ReSharper disable SuggestVarOrType_SimpleTypes
170170
// ReSharper disable SuggestVarOrType_BuiltInTypes
171171

172-
173172
internal static class JsonHelpers
174173
{
175174
[MethodImpl(MethodImplOptions.AggressiveInlining)]

src/Vapi.Net/Core/Public/Version.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,5 +2,5 @@ namespace Vapi.Net;
22

33
internal class Version
44
{
5-
public const string Current = "0.6.0";
5+
public const string Current = "0.8.1";
66
}

src/Vapi.Net/Core/ValueConvert.cs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,8 @@ public static class ValueConvert
2929

3030
internal static string ToPathParameterString(ulong v) => ToString(v);
3131

32+
internal static string ToPathParameterString(string v) => ToString(v);
33+
3234
internal static string ToPathParameterString(char v) => ToString(v);
3335

3436
internal static string ToPathParameterString(Guid v) => ToString(v);
@@ -55,6 +57,8 @@ public static class ValueConvert
5557

5658
internal static string ToQueryStringValue(ulong v) => ToString(v);
5759

60+
internal static string ToQueryStringValue(string v) => v is null ? "" : v;
61+
5862
internal static string ToQueryStringValue(char v) => ToString(v);
5963

6064
internal static string ToQueryStringValue(Guid v) => ToString(v);
@@ -105,5 +109,7 @@ internal static string ToString<T>(T value)
105109

106110
internal static string ToString(char v) => v.ToString(CultureInfo.InvariantCulture);
107111

112+
internal static string ToString(string v) => v;
113+
108114
internal static string ToString(Guid v) => v.ToString("D");
109115
}

src/Vapi.Net/Types/AnthropicModelModel.cs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,4 +27,10 @@ public enum AnthropicModelModel
2727

2828
[EnumMember(Value = "claude-3-7-sonnet-20250219")]
2929
Claude37Sonnet20250219,
30+
31+
[EnumMember(Value = "claude-opus-4-20250514")]
32+
ClaudeOpus420250514,
33+
34+
[EnumMember(Value = "claude-sonnet-4-20250514")]
35+
ClaudeSonnet420250514,
3036
}

0 commit comments

Comments
 (0)