Skip to content

Commit 72e66ca

Browse files
Release 0.10.0
1 parent e8730f2 commit 72e66ca

File tree

693 files changed

+9855
-477
lines changed

Some content is hidden

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

693 files changed

+9855
-477
lines changed

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", "{C28A765C-B8EE-4116-B5CE-958DFFC50869}"
6+
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Vapi.Net", "Vapi.Net\Vapi.Net.csproj", "{1E8D9780-518C-4A7B-B4BC-3904E0B3E9A7}"
77
EndProject
8-
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Vapi.Net.Test", "Vapi.Net.Test\Vapi.Net.Test.csproj", "{5328E64E-7D8A-4E3B-909E-30BAEE11F8AE}"
8+
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Vapi.Net.Test", "Vapi.Net.Test\Vapi.Net.Test.csproj", "{DE87E19F-BD13-445B-8FFD-057E77EE332A}"
99
EndProject
1010
Global
1111
GlobalSection(SolutionConfigurationPlatforms) = preSolution
@@ -16,13 +16,13 @@ Global
1616
HideSolutionNode = FALSE
1717
EndGlobalSection
1818
GlobalSection(ProjectConfigurationPlatforms) = postSolution
19-
{C28A765C-B8EE-4116-B5CE-958DFFC50869}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
20-
{C28A765C-B8EE-4116-B5CE-958DFFC50869}.Debug|Any CPU.Build.0 = Debug|Any CPU
21-
{C28A765C-B8EE-4116-B5CE-958DFFC50869}.Release|Any CPU.ActiveCfg = Release|Any CPU
22-
{C28A765C-B8EE-4116-B5CE-958DFFC50869}.Release|Any CPU.Build.0 = Release|Any CPU
23-
{5328E64E-7D8A-4E3B-909E-30BAEE11F8AE}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
24-
{5328E64E-7D8A-4E3B-909E-30BAEE11F8AE}.Debug|Any CPU.Build.0 = Debug|Any CPU
25-
{5328E64E-7D8A-4E3B-909E-30BAEE11F8AE}.Release|Any CPU.ActiveCfg = Release|Any CPU
26-
{5328E64E-7D8A-4E3B-909E-30BAEE11F8AE}.Release|Any CPU.Build.0 = Release|Any CPU
19+
{1E8D9780-518C-4A7B-B4BC-3904E0B3E9A7}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
20+
{1E8D9780-518C-4A7B-B4BC-3904E0B3E9A7}.Debug|Any CPU.Build.0 = Debug|Any CPU
21+
{1E8D9780-518C-4A7B-B4BC-3904E0B3E9A7}.Release|Any CPU.ActiveCfg = Release|Any CPU
22+
{1E8D9780-518C-4A7B-B4BC-3904E0B3E9A7}.Release|Any CPU.Build.0 = Release|Any CPU
23+
{DE87E19F-BD13-445B-8FFD-057E77EE332A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
24+
{DE87E19F-BD13-445B-8FFD-057E77EE332A}.Debug|Any CPU.Build.0 = Debug|Any CPU
25+
{DE87E19F-BD13-445B-8FFD-057E77EE332A}.Release|Any CPU.ActiveCfg = Release|Any CPU
26+
{DE87E19F-BD13-445B-8FFD-057E77EE332A}.Release|Any CPU.Build.0 = Release|Any CPU
2727
EndGlobalSection
2828
EndGlobal

src/Vapi.Net/Assistants/AssistantsClient.cs

Lines changed: 11 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ internal AssistantsClient(RawClient client)
1616
}
1717

1818
public async Task<IEnumerable<Assistant>> ListAsync(
19-
AssistantsListRequest request,
19+
ListAssistantsRequest request,
2020
RequestOptions? options = null,
2121
CancellationToken cancellationToken = default
2222
)
@@ -28,35 +28,35 @@ public async Task<IEnumerable<Assistant>> ListAsync(
2828
}
2929
if (request.CreatedAtGt != null)
3030
{
31-
_query["createdAtGt"] = request.CreatedAtGt.Value.ToString();
31+
_query["createdAtGt"] = request.CreatedAtGt.Value.ToString(Constants.DateTimeFormat);
3232
}
3333
if (request.CreatedAtLt != null)
3434
{
35-
_query["createdAtLt"] = request.CreatedAtLt.Value.ToString();
35+
_query["createdAtLt"] = request.CreatedAtLt.Value.ToString(Constants.DateTimeFormat);
3636
}
3737
if (request.CreatedAtGe != null)
3838
{
39-
_query["createdAtGe"] = request.CreatedAtGe.Value.ToString();
39+
_query["createdAtGe"] = request.CreatedAtGe.Value.ToString(Constants.DateTimeFormat);
4040
}
4141
if (request.CreatedAtLe != null)
4242
{
43-
_query["createdAtLe"] = request.CreatedAtLe.Value.ToString();
43+
_query["createdAtLe"] = request.CreatedAtLe.Value.ToString(Constants.DateTimeFormat);
4444
}
4545
if (request.UpdatedAtGt != null)
4646
{
47-
_query["updatedAtGt"] = request.UpdatedAtGt.Value.ToString();
47+
_query["updatedAtGt"] = request.UpdatedAtGt.Value.ToString(Constants.DateTimeFormat);
4848
}
4949
if (request.UpdatedAtLt != null)
5050
{
51-
_query["updatedAtLt"] = request.UpdatedAtLt.Value.ToString();
51+
_query["updatedAtLt"] = request.UpdatedAtLt.Value.ToString(Constants.DateTimeFormat);
5252
}
5353
if (request.UpdatedAtGe != null)
5454
{
55-
_query["updatedAtGe"] = request.UpdatedAtGe.Value.ToString();
55+
_query["updatedAtGe"] = request.UpdatedAtGe.Value.ToString(Constants.DateTimeFormat);
5656
}
5757
if (request.UpdatedAtLe != null)
5858
{
59-
_query["updatedAtLe"] = request.UpdatedAtLe.Value.ToString();
59+
_query["updatedAtLe"] = request.UpdatedAtLe.Value.ToString(Constants.DateTimeFormat);
6060
}
6161
var response = await _client
6262
.SendRequestAsync(
@@ -139,6 +139,7 @@ public async Task<Assistant> CreateAsync(
139139

140140
public async Task<Assistant> GetAsync(
141141
string id,
142+
GetAssistantsRequest request,
142143
RequestOptions? options = null,
143144
CancellationToken cancellationToken = default
144145
)
@@ -180,6 +181,7 @@ public async Task<Assistant> GetAsync(
180181

181182
public async Task<Assistant> DeleteAsync(
182183
string id,
184+
DeleteAssistantsRequest request,
183185
RequestOptions? options = null,
184186
CancellationToken cancellationToken = default
185187
)
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
using Vapi.Net.Core;
2+
3+
namespace Vapi.Net;
4+
5+
[Serializable]
6+
public record DeleteAssistantsRequest
7+
{
8+
/// <inheritdoc />
9+
public override string ToString()
10+
{
11+
return JsonUtils.Serialize(this);
12+
}
13+
}
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
using Vapi.Net.Core;
2+
3+
namespace Vapi.Net;
4+
5+
[Serializable]
6+
public record GetAssistantsRequest
7+
{
8+
/// <inheritdoc />
9+
public override string ToString()
10+
{
11+
return JsonUtils.Serialize(this);
12+
}
13+
}

src/Vapi.Net/Assistants/Requests/AssistantsListRequest.cs renamed to src/Vapi.Net/Assistants/Requests/ListAssistantsRequest.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
namespace Vapi.Net;
55

66
[Serializable]
7-
public record AssistantsListRequest
7+
public record ListAssistantsRequest
88
{
99
/// <summary>
1010
/// This is the maximum number of items to return. Defaults to 100.

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

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -51,20 +51,25 @@ public record UpdateAssistantDto
5151

5252
/// <summary>
5353
/// These are the settings to configure or disable voicemail detection. Alternatively, voicemail detection can be configured using the model.tools=[VoicemailTool].
54-
/// This uses Twilio's built-in detection while the VoicemailTool relies on the model to detect if a voicemail was reached.
55-
/// You can use neither of them, one of them, or both of them. By default, Twilio built-in detection is enabled while VoicemailTool is not.
54+
/// By default, voicemail detection is disabled.
5655
/// </summary>
5756
[JsonPropertyName("voicemailDetection")]
58-
public object? VoicemailDetection { get; set; }
57+
public OneOf<
58+
UpdateAssistantDtoVoicemailDetectionZero,
59+
GoogleVoicemailDetectionPlan,
60+
OpenAiVoicemailDetectionPlan,
61+
TwilioVoicemailDetectionPlan,
62+
VapiVoicemailDetectionPlan
63+
>? VoicemailDetection { get; set; }
5964

6065
/// <summary>
61-
/// These are the messages that will be sent to your Client SDKs. Default is conversation-update,function-call,hang,model-output,speech-update,status-update,transfer-update,transcript,tool-calls,user-interrupted,voice-input,workflow.node.started. You can check the shape of the messages in ClientMessage schema.
66+
/// These are the messages that will be sent to your Client SDKs. Default is conversation-update,function-call,hang,model-output,speech-update,status-update,transfer-update,transcript,tool-calls,user-interrupted,voice-input,workflow.node.started,assistant.started. You can check the shape of the messages in ClientMessage schema.
6267
/// </summary>
6368
[JsonPropertyName("clientMessages")]
6469
public IEnumerable<UpdateAssistantDtoClientMessagesItem>? ClientMessages { get; set; }
6570

6671
/// <summary>
67-
/// These are the messages that will be sent to your Server URL. Default is conversation-update,end-of-call-report,function-call,hang,speech-update,status-update,tool-calls,transfer-destination-request,handoff-destination-request,user-interrupted. You can check the shape of the messages in ServerMessage schema.
72+
/// These are the messages that will be sent to your Server URL. Default is conversation-update,end-of-call-report,function-call,hang,speech-update,status-update,tool-calls,transfer-destination-request,handoff-destination-request,user-interrupted,assistant.started. You can check the shape of the messages in ServerMessage schema.
6873
/// </summary>
6974
[JsonPropertyName("serverMessages")]
7075
public IEnumerable<UpdateAssistantDtoServerMessagesItem>? ServerMessages { get; set; }

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

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,4 +57,7 @@ public enum UpdateAssistantDtoClientMessagesItem
5757

5858
[EnumMember(Value = "workflow.node.started")]
5959
WorkflowNodeStarted,
60+
61+
[EnumMember(Value = "assistant.started")]
62+
AssistantStarted,
6063
}

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

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,9 @@ namespace Vapi.Net;
77
[JsonConverter(typeof(EnumSerializer<UpdateAssistantDtoServerMessagesItem>))]
88
public enum UpdateAssistantDtoServerMessagesItem
99
{
10+
[EnumMember(Value = "assistant.started")]
11+
AssistantStarted,
12+
1013
[EnumMember(Value = "conversation-update")]
1114
ConversationUpdate,
1215

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
using System.Runtime.Serialization;
2+
using System.Text.Json.Serialization;
3+
using Vapi.Net.Core;
4+
5+
namespace Vapi.Net;
6+
7+
[JsonConverter(typeof(EnumSerializer<UpdateAssistantDtoVoicemailDetectionZero>))]
8+
public enum UpdateAssistantDtoVoicemailDetectionZero
9+
{
10+
[EnumMember(Value = "off")]
11+
Off,
12+
}

src/Vapi.Net/Calls/CallsClient.cs

Lines changed: 31 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ internal CallsClient(RawClient client)
1717
}
1818

1919
public async Task<IEnumerable<Call>> ListAsync(
20-
CallsListRequest request,
20+
ListCallsRequest request,
2121
RequestOptions? options = null,
2222
CancellationToken cancellationToken = default
2323
)
@@ -41,35 +41,35 @@ public async Task<IEnumerable<Call>> ListAsync(
4141
}
4242
if (request.CreatedAtGt != null)
4343
{
44-
_query["createdAtGt"] = request.CreatedAtGt.Value.ToString();
44+
_query["createdAtGt"] = request.CreatedAtGt.Value.ToString(Constants.DateTimeFormat);
4545
}
4646
if (request.CreatedAtLt != null)
4747
{
48-
_query["createdAtLt"] = request.CreatedAtLt.Value.ToString();
48+
_query["createdAtLt"] = request.CreatedAtLt.Value.ToString(Constants.DateTimeFormat);
4949
}
5050
if (request.CreatedAtGe != null)
5151
{
52-
_query["createdAtGe"] = request.CreatedAtGe.Value.ToString();
52+
_query["createdAtGe"] = request.CreatedAtGe.Value.ToString(Constants.DateTimeFormat);
5353
}
5454
if (request.CreatedAtLe != null)
5555
{
56-
_query["createdAtLe"] = request.CreatedAtLe.Value.ToString();
56+
_query["createdAtLe"] = request.CreatedAtLe.Value.ToString(Constants.DateTimeFormat);
5757
}
5858
if (request.UpdatedAtGt != null)
5959
{
60-
_query["updatedAtGt"] = request.UpdatedAtGt.Value.ToString();
60+
_query["updatedAtGt"] = request.UpdatedAtGt.Value.ToString(Constants.DateTimeFormat);
6161
}
6262
if (request.UpdatedAtLt != null)
6363
{
64-
_query["updatedAtLt"] = request.UpdatedAtLt.Value.ToString();
64+
_query["updatedAtLt"] = request.UpdatedAtLt.Value.ToString(Constants.DateTimeFormat);
6565
}
6666
if (request.UpdatedAtGe != null)
6767
{
68-
_query["updatedAtGe"] = request.UpdatedAtGe.Value.ToString();
68+
_query["updatedAtGe"] = request.UpdatedAtGe.Value.ToString(Constants.DateTimeFormat);
6969
}
7070
if (request.UpdatedAtLe != null)
7171
{
72-
_query["updatedAtLe"] = request.UpdatedAtLe.Value.ToString();
72+
_query["updatedAtLe"] = request.UpdatedAtLe.Value.ToString(Constants.DateTimeFormat);
7373
}
7474
var response = await _client
7575
.SendRequestAsync(
@@ -174,6 +174,14 @@ public async Task<CallPaginatedResponse> CallControllerFindAllPaginatedAsync(
174174
{
175175
_query["assistantName"] = request.AssistantName;
176176
}
177+
if (request.SquadId != null)
178+
{
179+
_query["squadId"] = request.SquadId;
180+
}
181+
if (request.SquadName != null)
182+
{
183+
_query["squadName"] = request.SquadName;
184+
}
177185
if (request.Id != null)
178186
{
179187
_query["id"] = request.Id;
@@ -206,49 +214,53 @@ public async Task<CallPaginatedResponse> CallControllerFindAllPaginatedAsync(
206214
{
207215
_query["structuredOutputs"] = JsonUtils.Serialize(request.StructuredOutputs);
208216
}
217+
if (request.Score != null)
218+
{
219+
_query["score"] = request.Score;
220+
}
209221
if (request.Page != null)
210222
{
211223
_query["page"] = request.Page.Value.ToString();
212224
}
213225
if (request.SortOrder != null)
214226
{
215-
_query["sortOrder"] = request.SortOrder.Value.ToString();
227+
_query["sortOrder"] = request.SortOrder.Value.Stringify();
216228
}
217229
if (request.Limit != null)
218230
{
219231
_query["limit"] = request.Limit.Value.ToString();
220232
}
221233
if (request.CreatedAtGt != null)
222234
{
223-
_query["createdAtGt"] = request.CreatedAtGt.Value.ToString();
235+
_query["createdAtGt"] = request.CreatedAtGt.Value.ToString(Constants.DateTimeFormat);
224236
}
225237
if (request.CreatedAtLt != null)
226238
{
227-
_query["createdAtLt"] = request.CreatedAtLt.Value.ToString();
239+
_query["createdAtLt"] = request.CreatedAtLt.Value.ToString(Constants.DateTimeFormat);
228240
}
229241
if (request.CreatedAtGe != null)
230242
{
231-
_query["createdAtGe"] = request.CreatedAtGe.Value.ToString();
243+
_query["createdAtGe"] = request.CreatedAtGe.Value.ToString(Constants.DateTimeFormat);
232244
}
233245
if (request.CreatedAtLe != null)
234246
{
235-
_query["createdAtLe"] = request.CreatedAtLe.Value.ToString();
247+
_query["createdAtLe"] = request.CreatedAtLe.Value.ToString(Constants.DateTimeFormat);
236248
}
237249
if (request.UpdatedAtGt != null)
238250
{
239-
_query["updatedAtGt"] = request.UpdatedAtGt.Value.ToString();
251+
_query["updatedAtGt"] = request.UpdatedAtGt.Value.ToString(Constants.DateTimeFormat);
240252
}
241253
if (request.UpdatedAtLt != null)
242254
{
243-
_query["updatedAtLt"] = request.UpdatedAtLt.Value.ToString();
255+
_query["updatedAtLt"] = request.UpdatedAtLt.Value.ToString(Constants.DateTimeFormat);
244256
}
245257
if (request.UpdatedAtGe != null)
246258
{
247-
_query["updatedAtGe"] = request.UpdatedAtGe.Value.ToString();
259+
_query["updatedAtGe"] = request.UpdatedAtGe.Value.ToString(Constants.DateTimeFormat);
248260
}
249261
if (request.UpdatedAtLe != null)
250262
{
251-
_query["updatedAtLe"] = request.UpdatedAtLe.Value.ToString();
263+
_query["updatedAtLe"] = request.UpdatedAtLe.Value.ToString(Constants.DateTimeFormat);
252264
}
253265
var response = await _client
254266
.SendRequestAsync(
@@ -288,6 +300,7 @@ public async Task<CallPaginatedResponse> CallControllerFindAllPaginatedAsync(
288300

289301
public async Task<Call> GetAsync(
290302
string id,
303+
GetCallsRequest request,
291304
RequestOptions? options = null,
292305
CancellationToken cancellationToken = default
293306
)

0 commit comments

Comments
 (0)