Skip to content

Commit f1c7c42

Browse files
committed
Release 0.3.0
1 parent 4911aaf commit f1c7c42

File tree

181 files changed

+3573
-1102
lines changed

Some content is hidden

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

181 files changed

+3573
-1102
lines changed

reference.md

Lines changed: 61 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -578,7 +578,7 @@ await client.PhoneNumbers.DeleteAsync("id");
578578
</dl>
579579
</details>
580580

581-
<details><summary><code>client.PhoneNumbers.<a href="/src/Vapi.Net/PhoneNumbers/PhoneNumbersClient.cs">UpdateAsync</a>(id, UpdatePhoneNumberDto { ... }) -> object</code></summary>
581+
<details><summary><code>client.PhoneNumbers.<a href="/src/Vapi.Net/PhoneNumbers/PhoneNumbersClient.cs">UpdateAsync</a>(id, object { ... }) -> object</code></summary>
582582
<dl>
583583
<dd>
584584

@@ -591,7 +591,7 @@ await client.PhoneNumbers.DeleteAsync("id");
591591
<dd>
592592

593593
```csharp
594-
await client.PhoneNumbers.UpdateAsync("id", new UpdatePhoneNumberDto());
594+
await client.PhoneNumbers.UpdateAsync("id", new UpdateVapiPhoneNumberDto());
595595
```
596596
</dd>
597597
</dl>
@@ -614,7 +614,7 @@ await client.PhoneNumbers.UpdateAsync("id", new UpdatePhoneNumberDto());
614614
<dl>
615615
<dd>
616616

617-
**request:** `UpdatePhoneNumberDto`
617+
**request:** `object`
618618

619619
</dd>
620620
</dl>
@@ -1003,7 +1003,7 @@ await client.KnowledgeBases.DeleteAsync("id");
10031003
</dl>
10041004
</details>
10051005

1006-
<details><summary><code>client.KnowledgeBases.<a href="/src/Vapi.Net/KnowledgeBases/KnowledgeBasesClient.cs">UpdateAsync</a>(id) -> object</code></summary>
1006+
<details><summary><code>client.KnowledgeBases.<a href="/src/Vapi.Net/KnowledgeBases/KnowledgeBasesClient.cs">UpdateAsync</a>(id, object { ... }) -> object</code></summary>
10071007
<dl>
10081008
<dd>
10091009

@@ -1016,7 +1016,7 @@ await client.KnowledgeBases.DeleteAsync("id");
10161016
<dd>
10171017

10181018
```csharp
1019-
await client.KnowledgeBases.UpdateAsync("id");
1019+
await client.KnowledgeBases.UpdateAsync("id", new UpdateCustomKnowledgeBaseDto());
10201020
```
10211021
</dd>
10221022
</dl>
@@ -1033,6 +1033,14 @@ await client.KnowledgeBases.UpdateAsync("id");
10331033

10341034
**id:** `string`
10351035

1036+
</dd>
1037+
</dl>
1038+
1039+
<dl>
1040+
<dd>
1041+
1042+
**request:** `object`
1043+
10361044
</dd>
10371045
</dl>
10381046
</dd>
@@ -1204,7 +1212,7 @@ await client.Blocks.DeleteAsync("id");
12041212
</dl>
12051213
</details>
12061214

1207-
<details><summary><code>client.Blocks.<a href="/src/Vapi.Net/Blocks/BlocksClient.cs">UpdateAsync</a>(id, UpdateBlockDto { ... }) -> object</code></summary>
1215+
<details><summary><code>client.Blocks.<a href="/src/Vapi.Net/Blocks/BlocksClient.cs">UpdateAsync</a>(id, object { ... }) -> object</code></summary>
12081216
<dl>
12091217
<dd>
12101218

@@ -1217,7 +1225,7 @@ await client.Blocks.DeleteAsync("id");
12171225
<dd>
12181226

12191227
```csharp
1220-
await client.Blocks.UpdateAsync("id", new UpdateBlockDto());
1228+
await client.Blocks.UpdateAsync("id", new UpdateWorkflowBlockDto());
12211229
```
12221230
</dd>
12231231
</dl>
@@ -1240,7 +1248,7 @@ await client.Blocks.UpdateAsync("id", new UpdateBlockDto());
12401248
<dl>
12411249
<dd>
12421250

1243-
**request:** `UpdateBlockDto`
1251+
**request:** `object`
12441252

12451253
</dd>
12461254
</dl>
@@ -1420,7 +1428,7 @@ await client.Tools.DeleteAsync("id");
14201428
</dl>
14211429
</details>
14221430

1423-
<details><summary><code>client.Tools.<a href="/src/Vapi.Net/Tools/ToolsClient.cs">UpdateAsync</a>(id, UpdateToolDto { ... }) -> object</code></summary>
1431+
<details><summary><code>client.Tools.<a href="/src/Vapi.Net/Tools/ToolsClient.cs">UpdateAsync</a>(id, object { ... }) -> object</code></summary>
14241432
<dl>
14251433
<dd>
14261434

@@ -1433,7 +1441,7 @@ await client.Tools.DeleteAsync("id");
14331441
<dd>
14341442

14351443
```csharp
1436-
await client.Tools.UpdateAsync("id", new UpdateToolDto());
1444+
await client.Tools.UpdateAsync("id", new UpdateTextEditorToolDto { Async = false });
14371445
```
14381446
</dd>
14391447
</dl>
@@ -1456,7 +1464,7 @@ await client.Tools.UpdateAsync("id", new UpdateToolDto());
14561464
<dl>
14571465
<dd>
14581466

1459-
**request:** `UpdateToolDto`
1467+
**request:** `object`
14601468

14611469
</dd>
14621470
</dl>
@@ -1685,6 +1693,48 @@ await client.Logs.GetAsync(new LogsGetRequest());
16851693
</dl>
16861694

16871695

1696+
</dd>
1697+
</dl>
1698+
</details>
1699+
1700+
<details><summary><code>client.Logs.<a href="/src/Vapi.Net/Logs/LogsClient.cs">LoggingControllerLogsDeleteQueryAsync</a>(LoggingControllerLogsDeleteQueryRequest { ... })</code></summary>
1701+
<dl>
1702+
<dd>
1703+
1704+
#### 🔌 Usage
1705+
1706+
<dl>
1707+
<dd>
1708+
1709+
<dl>
1710+
<dd>
1711+
1712+
```csharp
1713+
await client.Logs.LoggingControllerLogsDeleteQueryAsync(
1714+
new LoggingControllerLogsDeleteQueryRequest()
1715+
);
1716+
```
1717+
</dd>
1718+
</dl>
1719+
</dd>
1720+
</dl>
1721+
1722+
#### ⚙️ Parameters
1723+
1724+
<dl>
1725+
<dd>
1726+
1727+
<dl>
1728+
<dd>
1729+
1730+
**request:** `LoggingControllerLogsDeleteQueryRequest`
1731+
1732+
</dd>
1733+
</dl>
1734+
</dd>
1735+
</dl>
1736+
1737+
16881738
</dd>
16891739
</dl>
16901740
</details>

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", "{57D38CAA-CBE8-4282-A3BA-13C5EAE34973}"
6+
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Vapi.Net", "Vapi.Net\Vapi.Net.csproj", "{F72D6E6D-4D32-4B6D-BF1B-19C67359633F}"
77
EndProject
8-
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Vapi.Net.Test", "Vapi.Net.Test\Vapi.Net.Test.csproj", "{63A8FF3A-85C8-406C-A783-68BB569A5872}"
8+
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Vapi.Net.Test", "Vapi.Net.Test\Vapi.Net.Test.csproj", "{DFC3F8FF-5581-4744-9BBC-86486FA8D255}"
99
EndProject
1010
Global
1111
GlobalSection(SolutionConfigurationPlatforms) = preSolution
@@ -16,13 +16,13 @@ Global
1616
HideSolutionNode = FALSE
1717
EndGlobalSection
1818
GlobalSection(ProjectConfigurationPlatforms) = postSolution
19-
{57D38CAA-CBE8-4282-A3BA-13C5EAE34973}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
20-
{57D38CAA-CBE8-4282-A3BA-13C5EAE34973}.Debug|Any CPU.Build.0 = Debug|Any CPU
21-
{57D38CAA-CBE8-4282-A3BA-13C5EAE34973}.Release|Any CPU.ActiveCfg = Release|Any CPU
22-
{57D38CAA-CBE8-4282-A3BA-13C5EAE34973}.Release|Any CPU.Build.0 = Release|Any CPU
23-
{63A8FF3A-85C8-406C-A783-68BB569A5872}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
24-
{63A8FF3A-85C8-406C-A783-68BB569A5872}.Debug|Any CPU.Build.0 = Debug|Any CPU
25-
{63A8FF3A-85C8-406C-A783-68BB569A5872}.Release|Any CPU.ActiveCfg = Release|Any CPU
26-
{63A8FF3A-85C8-406C-A783-68BB569A5872}.Release|Any CPU.Build.0 = Release|Any CPU
19+
{F72D6E6D-4D32-4B6D-BF1B-19C67359633F}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
20+
{F72D6E6D-4D32-4B6D-BF1B-19C67359633F}.Debug|Any CPU.Build.0 = Debug|Any CPU
21+
{F72D6E6D-4D32-4B6D-BF1B-19C67359633F}.Release|Any CPU.ActiveCfg = Release|Any CPU
22+
{F72D6E6D-4D32-4B6D-BF1B-19C67359633F}.Release|Any CPU.Build.0 = Release|Any CPU
23+
{DFC3F8FF-5581-4744-9BBC-86486FA8D255}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
24+
{DFC3F8FF-5581-4744-9BBC-86486FA8D255}.Debug|Any CPU.Build.0 = Debug|Any CPU
25+
{DFC3F8FF-5581-4744-9BBC-86486FA8D255}.Release|Any CPU.ActiveCfg = Release|Any CPU
26+
{DFC3F8FF-5581-4744-9BBC-86486FA8D255}.Release|Any CPU.Build.0 = Release|Any CPU
2727
EndGlobalSection
2828
EndGlobal

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

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -112,6 +112,12 @@ public record UpdateAssistantDto
112112
[JsonPropertyName("transportConfigurations")]
113113
public IEnumerable<TransportConfigurationTwilio>? TransportConfigurations { get; set; }
114114

115+
/// <summary>
116+
/// These are dynamic credentials that will be used for the assistant calls. By default, all the credentials are available for use in the call but you can supplement an additional credentials using this. Dynamic credentials override existing credentials.
117+
/// </summary>
118+
[JsonPropertyName("credentials")]
119+
public IEnumerable<object>? Credentials { get; set; }
120+
115121
/// <summary>
116122
/// This is the name of the assistant.
117123
///

src/Vapi.Net/Blocks/BlocksClient.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -222,12 +222,12 @@ public async Task<object> DeleteAsync(
222222

223223
/// <example>
224224
/// <code>
225-
/// await client.Blocks.UpdateAsync("id", new UpdateBlockDto());
225+
/// await client.Blocks.UpdateAsync("id", new UpdateWorkflowBlockDto());
226226
/// </code>
227227
/// </example>
228228
public async Task<object> UpdateAsync(
229229
string id,
230-
UpdateBlockDto request,
230+
object request,
231231
RequestOptions? options = null,
232232
CancellationToken cancellationToken = default
233233
)

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.2.0";
5+
public const string Current = "0.3.0";
66
}

src/Vapi.Net/KnowledgeBases/KnowledgeBasesClient.cs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -224,11 +224,12 @@ public async Task<object> DeleteAsync(
224224

225225
/// <example>
226226
/// <code>
227-
/// await client.KnowledgeBases.UpdateAsync("id");
227+
/// await client.KnowledgeBases.UpdateAsync("id", new UpdateCustomKnowledgeBaseDto());
228228
/// </code>
229229
/// </example>
230230
public async Task<object> UpdateAsync(
231231
string id,
232+
object request,
232233
RequestOptions? options = null,
233234
CancellationToken cancellationToken = default
234235
)
@@ -239,6 +240,8 @@ public async Task<object> UpdateAsync(
239240
BaseUrl = _client.Options.BaseUrl,
240241
Method = HttpMethodExtensions.Patch,
241242
Path = $"knowledge-base/{id}",
243+
Body = request,
244+
ContentType = "application/json",
242245
Options = options,
243246
},
244247
cancellationToken

src/Vapi.Net/Logs/LogsClient.cs

Lines changed: 62 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
using System.Net.Http;
22
using System.Text.Json;
33
using System.Threading;
4+
using System.Threading.Tasks;
45
using Vapi.Net.Core;
56

67
#nullable enable
@@ -50,6 +51,67 @@ public Pager<Log> GetAsync(LogsGetRequest request, RequestOptions? options = nul
5051
return pager;
5152
}
5253

54+
/// <example>
55+
/// <code>
56+
/// await client.Logs.LoggingControllerLogsDeleteQueryAsync(
57+
/// new LoggingControllerLogsDeleteQueryRequest()
58+
/// );
59+
/// </code>
60+
/// </example>
61+
public async Task LoggingControllerLogsDeleteQueryAsync(
62+
LoggingControllerLogsDeleteQueryRequest request,
63+
RequestOptions? options = null,
64+
CancellationToken cancellationToken = default
65+
)
66+
{
67+
var _query = new Dictionary<string, object>();
68+
if (request.OrgId != null)
69+
{
70+
_query["orgId"] = request.OrgId;
71+
}
72+
if (request.AssistantId != null)
73+
{
74+
_query["assistantId"] = request.AssistantId;
75+
}
76+
if (request.PhoneNumberId != null)
77+
{
78+
_query["phoneNumberId"] = request.PhoneNumberId;
79+
}
80+
if (request.CustomerId != null)
81+
{
82+
_query["customerId"] = request.CustomerId;
83+
}
84+
if (request.SquadId != null)
85+
{
86+
_query["squadId"] = request.SquadId;
87+
}
88+
if (request.CallId != null)
89+
{
90+
_query["callId"] = request.CallId;
91+
}
92+
var response = await _client.MakeRequestAsync(
93+
new RawClient.JsonApiRequest
94+
{
95+
BaseUrl = _client.Options.BaseUrl,
96+
Method = HttpMethod.Delete,
97+
Path = "logs",
98+
Query = _query,
99+
Options = options,
100+
},
101+
cancellationToken
102+
);
103+
if (response.StatusCode is >= 200 and < 400)
104+
{
105+
return;
106+
}
107+
var responseBody = await response.Raw.Content.ReadAsStringAsync();
108+
throw new VapiClientApiException(
109+
$"Error with status code {response.StatusCode}",
110+
response.StatusCode,
111+
responseBody
112+
);
113+
}
114+
53115
internal async Task<LogsPaginatedResponse> GetAsync(
54116
LogsGetRequest request,
55117
RequestOptions? options = null,
Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
using Vapi.Net.Core;
2+
3+
#nullable enable
4+
5+
namespace Vapi.Net;
6+
7+
public record LoggingControllerLogsDeleteQueryRequest
8+
{
9+
/// <summary>
10+
/// This is the unique identifier for the org that this log belongs to.
11+
/// </summary>
12+
public string? OrgId { get; set; }
13+
14+
/// <summary>
15+
/// This is the ID of the assistant.
16+
/// </summary>
17+
public string? AssistantId { get; set; }
18+
19+
/// <summary>
20+
/// This is the ID of the phone number.
21+
/// </summary>
22+
public string? PhoneNumberId { get; set; }
23+
24+
/// <summary>
25+
/// This is the ID of the customer.
26+
/// </summary>
27+
public string? CustomerId { get; set; }
28+
29+
/// <summary>
30+
/// This is the ID of the squad.
31+
/// </summary>
32+
public string? SquadId { get; set; }
33+
34+
/// <summary>
35+
/// This is the ID of the call.
36+
/// </summary>
37+
public string? CallId { get; set; }
38+
39+
public override string ToString()
40+
{
41+
return JsonUtils.Serialize(this);
42+
}
43+
}

src/Vapi.Net/PhoneNumbers/PhoneNumbersClient.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -222,12 +222,12 @@ public async Task<object> DeleteAsync(
222222

223223
/// <example>
224224
/// <code>
225-
/// await client.PhoneNumbers.UpdateAsync("id", new UpdatePhoneNumberDto());
225+
/// await client.PhoneNumbers.UpdateAsync("id", new UpdateVapiPhoneNumberDto());
226226
/// </code>
227227
/// </example>
228228
public async Task<object> UpdateAsync(
229229
string id,
230-
UpdatePhoneNumberDto request,
230+
object request,
231231
RequestOptions? options = null,
232232
CancellationToken cancellationToken = default
233233
)

0 commit comments

Comments
 (0)