Skip to content

Commit fcb055a

Browse files
committed
ci: regenerated with OpenAPI Doc 0.4.0, Speakeasy CLI 1.219.2
1 parent 0775f13 commit fcb055a

24 files changed

+321
-59
lines changed

.speakeasy/gen.lock

Lines changed: 11 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
lockVersion: 2.0.0
22
id: f73d2126-985b-4d69-88ee-b7c69254d8bf
33
management:
4-
docChecksum: 3d1ffb0cc7307a0362c5389c0fa1fdb5
4+
docChecksum: 17e2e733dfd588a7103c3c70e91b24b5
55
docVersion: 0.4.0
6-
speakeasyVersion: 1.213.0
7-
generationVersion: 2.283.1
8-
releaseVersion: 5.1.1
9-
configChecksum: 352bf745a0bad5794fafe4677635c66a
6+
speakeasyVersion: 1.219.2
7+
generationVersion: 2.286.7
8+
releaseVersion: 5.1.2
9+
configChecksum: f458212f2aaa0c23c6fc4a78851096f7
1010
repoURL: https://github.com/speakeasy-api/speakeasy-client-sdk-csharp.git
1111
repoSubDirectory: .
1212
published: true
@@ -101,6 +101,7 @@ generatedFiles:
101101
- SpeakeasySDK/Models/Operations/RegisterSchemaResponse.cs
102102
- SpeakeasySDK/Models/Operations/GetAccessTokenRequest.cs
103103
- SpeakeasySDK/Models/Operations/GetAccessTokenResponse.cs
104+
- SpeakeasySDK/Models/Operations/GetUserResponse.cs
104105
- SpeakeasySDK/Models/Operations/GetWorkspaceAccessRequest.cs
105106
- SpeakeasySDK/Models/Operations/GetWorkspaceAccessResponse.cs
106107
- SpeakeasySDK/Models/Operations/ValidateApiKeyResponse.cs
@@ -134,9 +135,10 @@ generatedFiles:
134135
- SpeakeasySDK/Models/Shared/ValueChange.cs
135136
- SpeakeasySDK/Models/Shared/SchemaDiff.cs
136137
- SpeakeasySDK/Models/Shared/Claims.cs
137-
- SpeakeasySDK/Models/Shared/User.cs
138+
- SpeakeasySDK/Models/Shared/AccessTokenUser.cs
138139
- SpeakeasySDK/Models/Shared/Workspaces.cs
139140
- SpeakeasySDK/Models/Shared/AccessToken.cs
141+
- SpeakeasySDK/Models/Shared/User.cs
140142
- SpeakeasySDK/Models/Shared/Level.cs
141143
- SpeakeasySDK/Models/Shared/AccessDetails.cs
142144
- SpeakeasySDK/Models/Shared/AccountType.cs
@@ -211,6 +213,7 @@ generatedFiles:
211213
- docs/Models/Operations/RegisterSchemaResponse.md
212214
- docs/Models/Operations/GetAccessTokenRequest.md
213215
- docs/Models/Operations/GetAccessTokenResponse.md
216+
- docs/Models/Operations/GetUserResponse.md
214217
- docs/Models/Operations/GetWorkspaceAccessRequest.md
215218
- docs/Models/Operations/GetWorkspaceAccessResponse.md
216219
- docs/Models/Operations/ValidateApiKeyResponse.md
@@ -244,9 +247,10 @@ generatedFiles:
244247
- docs/Models/Shared/ValueChange.md
245248
- docs/Models/Shared/SchemaDiff.md
246249
- docs/Models/Shared/Claims.md
247-
- docs/Models/Shared/User.md
250+
- docs/Models/Shared/AccessTokenUser.md
248251
- docs/Models/Shared/Workspaces.md
249252
- docs/Models/Shared/AccessToken.md
253+
- docs/Models/Shared/User.md
250254
- docs/Models/Shared/Level.md
251255
- docs/Models/Shared/AccessDetails.md
252256
- docs/Models/Shared/AccountType.md

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -78,6 +78,7 @@ var res = await sdk.Apis.GetApisAsync(req);
7878
### [Auth](docs/sdks/auth/README.md)
7979

8080
* [GetAccessToken](docs/sdks/auth/README.md#getaccesstoken) - Get or refresh an access token for the current workspace.
81+
* [GetUser](docs/sdks/auth/README.md#getuser) - Get information about the current user.
8182
* [GetWorkspaceAccess](docs/sdks/auth/README.md#getworkspaceaccess) - Get access allowances for a particular workspace
8283
* [ValidateApiKey](docs/sdks/auth/README.md#validateapikey) - Validate the current api key.
8384

RELEASES.md

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -478,4 +478,14 @@ Based on:
478478
### Generated
479479
- [csharp v5.1.1] .
480480
### Releases
481-
- [NuGet v5.1.1] https://www.nuget.org/packages/SpeakeasySDK/5.1.1 - .
481+
- [NuGet v5.1.1] https://www.nuget.org/packages/SpeakeasySDK/5.1.1 - .
482+
483+
## 2024-03-22 00:03:32
484+
### Changes
485+
Based on:
486+
- OpenAPI Doc 0.4.0 https://docs.speakeasyapi.dev/openapi.yaml
487+
- Speakeasy CLI 1.219.2 (2.286.7) https://github.com/speakeasy-api/speakeasy
488+
### Generated
489+
- [csharp v5.1.2] .
490+
### Releases
491+
- [NuGet v5.1.2] https://www.nuget.org/packages/SpeakeasySDK/5.1.2 - .

SpeakeasySDK/ApiEndpoints.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -96,10 +96,10 @@ public class ApiEndpoints: IApiEndpoints
9696
{
9797
public SDKConfig SDKConfiguration { get; private set; }
9898
private const string _language = "csharp";
99-
private const string _sdkVersion = "5.1.1";
100-
private const string _sdkGenVersion = "2.283.1";
99+
private const string _sdkVersion = "5.1.2";
100+
private const string _sdkGenVersion = "2.286.7";
101101
private const string _openapiDocVersion = "0.4.0";
102-
private const string _userAgent = "speakeasy-sdk/csharp 5.1.1 2.283.1 0.4.0 SpeakeasySDK";
102+
private const string _userAgent = "speakeasy-sdk/csharp 5.1.2 2.286.7 0.4.0 SpeakeasySDK";
103103
private string _serverUrl = "";
104104
private ISpeakeasyHttpClient _defaultClient;
105105
private Func<Security>? _securitySource;

SpeakeasySDK/Apis.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -92,10 +92,10 @@ public class Apis: IApis
9292
{
9393
public SDKConfig SDKConfiguration { get; private set; }
9494
private const string _language = "csharp";
95-
private const string _sdkVersion = "5.1.1";
96-
private const string _sdkGenVersion = "2.283.1";
95+
private const string _sdkVersion = "5.1.2";
96+
private const string _sdkGenVersion = "2.286.7";
9797
private const string _openapiDocVersion = "0.4.0";
98-
private const string _userAgent = "speakeasy-sdk/csharp 5.1.1 2.283.1 0.4.0 SpeakeasySDK";
98+
private const string _userAgent = "speakeasy-sdk/csharp 5.1.2 2.286.7 0.4.0 SpeakeasySDK";
9999
private string _serverUrl = "";
100100
private ISpeakeasyHttpClient _defaultClient;
101101
private Func<Security>? _securitySource;

SpeakeasySDK/Auth.cs

Lines changed: 48 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,11 @@ public interface IAuth
3030
/// </summary>
3131
Task<GetAccessTokenResponse> GetAccessTokenAsync(GetAccessTokenRequest request);
3232

33+
/// <summary>
34+
/// Get information about the current user.
35+
/// </summary>
36+
Task<GetUserResponse> GetUserAsync();
37+
3338
/// <summary>
3439
/// Get access allowances for a particular workspace
3540
///
@@ -52,10 +57,10 @@ public class Auth: IAuth
5257
{
5358
public SDKConfig SDKConfiguration { get; private set; }
5459
private const string _language = "csharp";
55-
private const string _sdkVersion = "5.1.1";
56-
private const string _sdkGenVersion = "2.283.1";
60+
private const string _sdkVersion = "5.1.2";
61+
private const string _sdkGenVersion = "2.286.7";
5762
private const string _openapiDocVersion = "0.4.0";
58-
private const string _userAgent = "speakeasy-sdk/csharp 5.1.1 2.283.1 0.4.0 SpeakeasySDK";
63+
private const string _userAgent = "speakeasy-sdk/csharp 5.1.2 2.286.7 0.4.0 SpeakeasySDK";
5964
private string _serverUrl = "";
6065
private ISpeakeasyHttpClient _defaultClient;
6166
private Func<Security>? _securitySource;
@@ -103,6 +108,46 @@ public async Task<GetAccessTokenResponse> GetAccessTokenAsync(GetAccessTokenRequ
103108
}
104109

105110

111+
public async Task<GetUserResponse> GetUserAsync()
112+
{
113+
string baseUrl = this.SDKConfiguration.GetTemplatedServerDetails();
114+
115+
var urlString = baseUrl + "/v1/user";
116+
117+
var httpRequest = new HttpRequestMessage(HttpMethod.Get, urlString);
118+
httpRequest.Headers.Add("user-agent", _userAgent);
119+
120+
var client = _defaultClient;
121+
if (_securitySource != null)
122+
{
123+
client = SecuritySerializer.Apply(_defaultClient, _securitySource);
124+
}
125+
126+
var httpResponse = await client.SendAsync(httpRequest);
127+
128+
var contentType = httpResponse.Content.Headers.ContentType?.MediaType;
129+
130+
var response = new GetUserResponse
131+
{
132+
StatusCode = (int)httpResponse.StatusCode,
133+
ContentType = contentType,
134+
RawResponse = httpResponse
135+
};
136+
137+
if((response.StatusCode == 200))
138+
{
139+
if(Utilities.IsContentTypeMatch("application/json",response.ContentType))
140+
{
141+
response.User = JsonConvert.DeserializeObject<User>(await httpResponse.Content.ReadAsStringAsync(), new JsonSerializerSettings(){ NullValueHandling = NullValueHandling.Ignore, Converters = new JsonConverter[] { new FlexibleObjectDeserializer(), new EnumSerializer() }});
142+
}
143+
144+
return response;
145+
}
146+
response.Error = JsonConvert.DeserializeObject<Error>(await httpResponse.Content.ReadAsStringAsync(), new JsonSerializerSettings(){ NullValueHandling = NullValueHandling.Ignore, Converters = new JsonConverter[] { new FlexibleObjectDeserializer(), new EnumSerializer() }});
147+
return response;
148+
}
149+
150+
106151
public async Task<GetWorkspaceAccessResponse> GetWorkspaceAccessAsync(GetWorkspaceAccessRequest request)
107152
{
108153
string baseUrl = this.SDKConfiguration.GetTemplatedServerDetails();

SpeakeasySDK/Embeds.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -54,10 +54,10 @@ public class Embeds: IEmbeds
5454
{
5555
public SDKConfig SDKConfiguration { get; private set; }
5656
private const string _language = "csharp";
57-
private const string _sdkVersion = "5.1.1";
58-
private const string _sdkGenVersion = "2.283.1";
57+
private const string _sdkVersion = "5.1.2";
58+
private const string _sdkGenVersion = "2.286.7";
5959
private const string _openapiDocVersion = "0.4.0";
60-
private const string _userAgent = "speakeasy-sdk/csharp 5.1.1 2.283.1 0.4.0 SpeakeasySDK";
60+
private const string _userAgent = "speakeasy-sdk/csharp 5.1.2 2.286.7 0.4.0 SpeakeasySDK";
6161
private string _serverUrl = "";
6262
private ISpeakeasyHttpClient _defaultClient;
6363
private Func<Security>? _securitySource;

SpeakeasySDK/Events.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -53,10 +53,10 @@ public class Events: IEvents
5353
{
5454
public SDKConfig SDKConfiguration { get; private set; }
5555
private const string _language = "csharp";
56-
private const string _sdkVersion = "5.1.1";
57-
private const string _sdkGenVersion = "2.283.1";
56+
private const string _sdkVersion = "5.1.2";
57+
private const string _sdkGenVersion = "2.286.7";
5858
private const string _openapiDocVersion = "0.4.0";
59-
private const string _userAgent = "speakeasy-sdk/csharp 5.1.1 2.283.1 0.4.0 SpeakeasySDK";
59+
private const string _userAgent = "speakeasy-sdk/csharp 5.1.2 2.286.7 0.4.0 SpeakeasySDK";
6060
private string _serverUrl = "";
6161
private ISpeakeasyHttpClient _defaultClient;
6262
private Func<Security>? _securitySource;

SpeakeasySDK/Metadata.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -49,10 +49,10 @@ public class Metadata: IMetadata
4949
{
5050
public SDKConfig SDKConfiguration { get; private set; }
5151
private const string _language = "csharp";
52-
private const string _sdkVersion = "5.1.1";
53-
private const string _sdkGenVersion = "2.283.1";
52+
private const string _sdkVersion = "5.1.2";
53+
private const string _sdkGenVersion = "2.286.7";
5454
private const string _openapiDocVersion = "0.4.0";
55-
private const string _userAgent = "speakeasy-sdk/csharp 5.1.1 2.283.1 0.4.0 SpeakeasySDK";
55+
private const string _userAgent = "speakeasy-sdk/csharp 5.1.2 2.286.7 0.4.0 SpeakeasySDK";
5656
private string _serverUrl = "";
5757
private ISpeakeasyHttpClient _defaultClient;
5858
private Func<Security>? _securitySource;
Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
2+
//------------------------------------------------------------------------------
3+
// <auto-generated>
4+
// This code was generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT.
5+
//
6+
// Changes to this file may cause incorrect behavior and will be lost when
7+
// the code is regenerated.
8+
// </auto-generated>
9+
//------------------------------------------------------------------------------
10+
#nullable enable
11+
namespace SpeakeasySDK.Models.Operations
12+
{
13+
using SpeakeasySDK.Models.Shared;
14+
using System.Net.Http;
15+
using System;
16+
17+
public class GetUserResponse
18+
{
19+
20+
/// <summary>
21+
/// HTTP response content type for this operation
22+
/// </summary>
23+
public string? ContentType { get; set; } = default!;
24+
25+
/// <summary>
26+
/// Default error response
27+
/// </summary>
28+
public Error? Error { get; set; }
29+
30+
/// <summary>
31+
/// HTTP response status code for this operation
32+
/// </summary>
33+
public int StatusCode { get; set; } = default!;
34+
35+
/// <summary>
36+
/// Raw HTTP response; suitable for custom response parsing
37+
/// </summary>
38+
public HttpResponseMessage RawResponse { get; set; } = default!;
39+
40+
/// <summary>
41+
/// OK
42+
/// </summary>
43+
public User? User { get; set; }
44+
}
45+
}

SpeakeasySDK/Models/Shared/AccessToken.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ public class AccessToken
2727
public Claims Claims { get; set; } = default!;
2828

2929
[JsonProperty("user")]
30-
public User User { get; set; } = default!;
30+
public AccessTokenUser User { get; set; } = default!;
3131

3232
[JsonProperty("workspaces")]
3333
public List<Workspaces>? Workspaces { get; set; }
Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
2+
//------------------------------------------------------------------------------
3+
// <auto-generated>
4+
// This code was generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT.
5+
//
6+
// Changes to this file may cause incorrect behavior and will be lost when
7+
// the code is regenerated.
8+
// </auto-generated>
9+
//------------------------------------------------------------------------------
10+
#nullable enable
11+
namespace SpeakeasySDK.Models.Shared
12+
{
13+
using Newtonsoft.Json;
14+
using System;
15+
16+
public class AccessTokenUser
17+
{
18+
19+
[JsonProperty("admin")]
20+
public bool? Admin { get; set; }
21+
22+
[JsonProperty("created_at")]
23+
public DateTime? CreatedAt { get; set; }
24+
25+
[JsonProperty("display_name")]
26+
public string? DisplayName { get; set; }
27+
28+
[JsonProperty("email")]
29+
public string? Email { get; set; }
30+
31+
[JsonProperty("email_verified")]
32+
public bool? EmailVerified { get; set; }
33+
34+
[JsonProperty("id")]
35+
public string? Id { get; set; }
36+
}
37+
}

0 commit comments

Comments
 (0)