Skip to content

Commit ee0d31b

Browse files
committed
ci: regenerated with OpenAPI Doc 0.4.0, Speakeasy CLI 1.180.0
1 parent af12860 commit ee0d31b

33 files changed

+435
-173
lines changed

.speakeasy/gen.lock

Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,18 @@
11
lockVersion: 2.0.0
22
id: f73d2126-985b-4d69-88ee-b7c69254d8bf
33
management:
4-
docChecksum: 557634d4bb5964b949ae70f79f40d856
4+
docChecksum: c81aa4e807522359d28c09ee16d252ba
55
docVersion: 0.4.0
66
speakeasyVersion: internal
7-
generationVersion: 2.253.0
8-
releaseVersion: 5.0.1
9-
configChecksum: f1970ed44322201d4ca3e80f2cc82268
7+
generationVersion: 2.258.0
8+
releaseVersion: 5.0.2
9+
configChecksum: e52374a18288e2218094e21db61361c9
1010
repoURL: https://github.com/speakeasy-api/speakeasy-client-sdk-csharp.git
1111
repoSubDirectory: .
1212
published: true
1313
features:
1414
csharp:
15-
core: 3.3.1
15+
core: 3.3.2
1616
examples: 2.81.3
1717
globalSecurity: 2.83.0
1818
globalServerURLs: 2.82.2
@@ -97,6 +97,8 @@ generatedFiles:
9797
- SpeakeasySDK/Models/Operations/RegisterSchemaRequestBody.cs
9898
- SpeakeasySDK/Models/Operations/RegisterSchemaRequest.cs
9999
- SpeakeasySDK/Models/Operations/RegisterSchemaResponse.cs
100+
- SpeakeasySDK/Models/Operations/GetWorkspaceAccessRequest.cs
101+
- SpeakeasySDK/Models/Operations/GetWorkspaceAccessResponse.cs
100102
- SpeakeasySDK/Models/Operations/ValidateApiKeyResponse.cs
101103
- SpeakeasySDK/Models/Operations/GenerateRequestPostmanCollectionRequest.cs
102104
- SpeakeasySDK/Models/Operations/GenerateRequestPostmanCollectionResponse.cs
@@ -122,6 +124,7 @@ generatedFiles:
122124
- SpeakeasySDK/Models/Shared/Schema.cs
123125
- SpeakeasySDK/Models/Shared/ValueChange.cs
124126
- SpeakeasySDK/Models/Shared/SchemaDiff.cs
127+
- SpeakeasySDK/Models/Shared/AccessDetails.cs
125128
- SpeakeasySDK/Models/Shared/ApiKeyDetails.cs
126129
- SpeakeasySDK/Models/Shared/UnboundedRequest.cs
127130
- SpeakeasySDK/Models/Shared/BoundedRequest.cs
@@ -188,6 +191,8 @@ generatedFiles:
188191
- docs/Models/Operations/RegisterSchemaRequestBody.md
189192
- docs/Models/Operations/RegisterSchemaRequest.md
190193
- docs/Models/Operations/RegisterSchemaResponse.md
194+
- docs/Models/Operations/GetWorkspaceAccessRequest.md
195+
- docs/Models/Operations/GetWorkspaceAccessResponse.md
191196
- docs/Models/Operations/ValidateApiKeyResponse.md
192197
- docs/Models/Operations/GenerateRequestPostmanCollectionRequest.md
193198
- docs/Models/Operations/GenerateRequestPostmanCollectionResponse.md
@@ -213,6 +218,7 @@ generatedFiles:
213218
- docs/Models/Shared/Schema.md
214219
- docs/Models/Shared/ValueChange.md
215220
- docs/Models/Shared/SchemaDiff.md
221+
- docs/Models/Shared/AccessDetails.md
216222
- docs/Models/Shared/ApiKeyDetails.md
217223
- docs/Models/Shared/UnboundedRequest.md
218224
- docs/Models/Shared/BoundedRequest.md

README.md

Lines changed: 12 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ var sdk = new Speakeasy(
2525
security: new Security() {
2626
APIKey = "<YOUR_API_KEY_HERE>",
2727
},
28-
workspaceID: "string");
28+
workspaceID: "<value>");
2929

3030
GetApisRequest req = new GetApisRequest() {};
3131

@@ -77,6 +77,7 @@ var res = await sdk.Apis.GetApisAsync(req);
7777

7878
### [Auth](docs/sdks/auth/README.md)
7979

80+
* [GetWorkspaceAccess](docs/sdks/auth/README.md#getworkspaceaccess) - Get access allowances for a particular workspace
8081
* [ValidateApiKey](docs/sdks/auth/README.md#validateapikey) - Validate the current api key.
8182

8283
### [Requests](docs/sdks/requests/README.md)
@@ -139,11 +140,11 @@ var sdk = new Speakeasy(
139140
security: new Security() {
140141
APIKey = "<YOUR_API_KEY_HERE>",
141142
},
142-
workspaceID: "string");
143+
workspaceID: "<value>");
143144

144145
DeleteApiRequest req = new DeleteApiRequest() {
145-
ApiID = "string",
146-
VersionID = "string",
146+
ApiID = "<value>",
147+
VersionID = "<value>",
147148
};
148149

149150
var res = await sdk.Apis.DeleteApiAsync(req);
@@ -159,7 +160,7 @@ var res = await sdk.Apis.DeleteApiAsync(req);
159160

160161
A parameter is configured globally. This parameter may be set on the SDK client instance itself during initialization. When configured as an option during SDK initialization, This global value will be used as the default on the operations that use it. When such operations are called, there is a place in each to override the global value, if needed.
161162

162-
For example, you can set `workspaceID` to `"string"` at SDK initialization and then you do not have to pass the same value on calls to operations like `PostWorkspaceEvents`. But if you want to do so you may, which will locally override the global setting. See the example code below for a demonstration.
163+
For example, you can set `workspaceID` to `"<value>"` at SDK initialization and then you do not have to pass the same value on calls to operations like `PostWorkspaceEvents`. But if you want to do so you may, which will locally override the global setting. See the example code below for a demonstration.
163164

164165

165166
### Available Globals
@@ -183,20 +184,20 @@ var sdk = new Speakeasy(
183184
security: new Security() {
184185
APIKey = "<YOUR_API_KEY_HERE>",
185186
},
186-
workspaceID: "string");
187+
workspaceID: "<value>");
187188

188189
PostWorkspaceEventsRequest req = new PostWorkspaceEventsRequest() {
189190
RequestBody = new List<CliEvent>() {
190191
new CliEvent() {
191192
CreatedAt = System.DateTime.Parse("2024-11-21T06:58:42.120Z"),
192-
ExecutionId = "string",
193-
Id = "<ID>",
193+
ExecutionId = "<value>",
194+
Id = "<id>",
194195
InteractionType = InteractionType.CliExec,
195196
LocalStartedAt = System.DateTime.Parse("2024-05-07T12:35:47.182Z"),
196-
SpeakeasyApiKeyName = "string",
197-
SpeakeasyVersion = "string",
197+
SpeakeasyApiKeyName = "<value>",
198+
SpeakeasyVersion = "<value>",
198199
Success = false,
199-
WorkspaceId = "string",
200+
WorkspaceId = "<value>",
200201
},
201202
},
202203
};

RELEASES.md

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -438,4 +438,14 @@ Based on:
438438
### Generated
439439
- [csharp v5.0.1] .
440440
### Releases
441-
- [NuGet v5.0.1] https://www.nuget.org/packages/SpeakeasySDK/5.0.1 - .
441+
- [NuGet v5.0.1] https://www.nuget.org/packages/SpeakeasySDK/5.0.1 - .
442+
443+
## 2024-02-15 00:03:28
444+
### Changes
445+
Based on:
446+
- OpenAPI Doc 0.4.0 https://docs.speakeasyapi.dev/openapi.yaml
447+
- Speakeasy CLI 1.180.0 (2.258.0) https://github.com/speakeasy-api/speakeasy
448+
### Generated
449+
- [csharp v5.0.2] .
450+
### Releases
451+
- [NuGet v5.0.2] https://www.nuget.org/packages/SpeakeasySDK/5.0.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.0.1";
100-
private const string _sdkGenVersion = "2.253.0";
99+
private const string _sdkVersion = "5.0.2";
100+
private const string _sdkGenVersion = "2.258.0";
101101
private const string _openapiDocVersion = "0.4.0";
102-
private const string _userAgent = "speakeasy-sdk/csharp 5.0.1 2.253.0 0.4.0 SpeakeasySDK";
102+
private const string _userAgent = "speakeasy-sdk/csharp 5.0.2 2.258.0 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.0.1";
96-
private const string _sdkGenVersion = "2.253.0";
95+
private const string _sdkVersion = "5.0.2";
96+
private const string _sdkGenVersion = "2.258.0";
9797
private const string _openapiDocVersion = "0.4.0";
98-
private const string _userAgent = "speakeasy-sdk/csharp 5.0.1 2.253.0 0.4.0 SpeakeasySDK";
98+
private const string _userAgent = "speakeasy-sdk/csharp 5.0.2 2.258.0 0.4.0 SpeakeasySDK";
9999
private string _serverUrl = "";
100100
private ISpeakeasyHttpClient _defaultClient;
101101
private Func<Security>? _securitySource;

SpeakeasySDK/Auth.cs

Lines changed: 62 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ namespace SpeakeasySDK
1414
using SpeakeasySDK.Models.Operations;
1515
using SpeakeasySDK.Models.Shared;
1616
using SpeakeasySDK.Utils;
17+
using System.Net.Http.Headers;
1718
using System.Net.Http;
1819
using System.Threading.Tasks;
1920
using System;
@@ -24,6 +25,15 @@ namespace SpeakeasySDK
2425
public interface IAuth
2526
{
2627

28+
/// <summary>
29+
/// Get access allowances for a particular workspace
30+
///
31+
/// <remarks>
32+
/// Checks if generation is permitted for a particular run of the CLI
33+
/// </remarks>
34+
/// </summary>
35+
Task<GetWorkspaceAccessResponse> GetWorkspaceAccessAsync(GetWorkspaceAccessRequest? request = null);
36+
2737
/// <summary>
2838
/// Validate the current api key.
2939
/// </summary>
@@ -37,10 +47,10 @@ public class Auth: IAuth
3747
{
3848
public SDKConfig SDKConfiguration { get; private set; }
3949
private const string _language = "csharp";
40-
private const string _sdkVersion = "5.0.1";
41-
private const string _sdkGenVersion = "2.253.0";
50+
private const string _sdkVersion = "5.0.2";
51+
private const string _sdkGenVersion = "2.258.0";
4252
private const string _openapiDocVersion = "0.4.0";
43-
private const string _userAgent = "speakeasy-sdk/csharp 5.0.1 2.253.0 0.4.0 SpeakeasySDK";
53+
private const string _userAgent = "speakeasy-sdk/csharp 5.0.2 2.258.0 0.4.0 SpeakeasySDK";
4454
private string _serverUrl = "";
4555
private ISpeakeasyHttpClient _defaultClient;
4656
private Func<Security>? _securitySource;
@@ -54,6 +64,55 @@ public Auth(ISpeakeasyHttpClient defaultClient, Func<Security>? securitySource,
5464
}
5565

5666

67+
public async Task<GetWorkspaceAccessResponse> GetWorkspaceAccessAsync(GetWorkspaceAccessRequest? request = null)
68+
{
69+
string baseUrl = this.SDKConfiguration.GetTemplatedServerDetails();
70+
var urlString = URLBuilder.Build(baseUrl, "/v1/workspace/access", request);
71+
72+
var httpRequest = new HttpRequestMessage(HttpMethod.Get, urlString);
73+
httpRequest.Headers.Add("user-agent", _userAgent);
74+
75+
76+
var client = _defaultClient;
77+
if (_securitySource != null)
78+
{
79+
client = SecuritySerializer.Apply(_defaultClient, _securitySource);
80+
}
81+
82+
var httpResponse = await client.SendAsync(httpRequest);
83+
84+
var contentType = httpResponse.Content.Headers.ContentType?.MediaType;
85+
86+
var response = new GetWorkspaceAccessResponse
87+
{
88+
StatusCode = (int)httpResponse.StatusCode,
89+
ContentType = contentType,
90+
RawResponse = httpResponse
91+
};
92+
93+
if((response.StatusCode == 200))
94+
{
95+
if(Utilities.IsContentTypeMatch("application/json",response.ContentType))
96+
{
97+
response.AccessDetails = JsonConvert.DeserializeObject<AccessDetails>(await httpResponse.Content.ReadAsStringAsync(), new JsonSerializerSettings(){ NullValueHandling = NullValueHandling.Ignore, Converters = new JsonConverter[] { new FlexibleObjectDeserializer(), new EnumSerializer() }});
98+
}
99+
100+
return response;
101+
}
102+
if((response.StatusCode >= 500 && response.StatusCode < 600))
103+
{
104+
if(Utilities.IsContentTypeMatch("application/json",response.ContentType))
105+
{
106+
response.Error = JsonConvert.DeserializeObject<Error>(await httpResponse.Content.ReadAsStringAsync(), new JsonSerializerSettings(){ NullValueHandling = NullValueHandling.Ignore, Converters = new JsonConverter[] { new FlexibleObjectDeserializer(), new EnumSerializer() }});
107+
}
108+
109+
return response;
110+
}
111+
return response;
112+
}
113+
114+
115+
57116
public async Task<ValidateApiKeyResponse> ValidateApiKeyAsync()
58117
{
59118
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.0.1";
58-
private const string _sdkGenVersion = "2.253.0";
57+
private const string _sdkVersion = "5.0.2";
58+
private const string _sdkGenVersion = "2.258.0";
5959
private const string _openapiDocVersion = "0.4.0";
60-
private const string _userAgent = "speakeasy-sdk/csharp 5.0.1 2.253.0 0.4.0 SpeakeasySDK";
60+
private const string _userAgent = "speakeasy-sdk/csharp 5.0.2 2.258.0 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
@@ -42,10 +42,10 @@ public class Events: IEvents
4242
{
4343
public SDKConfig SDKConfiguration { get; private set; }
4444
private const string _language = "csharp";
45-
private const string _sdkVersion = "5.0.1";
46-
private const string _sdkGenVersion = "2.253.0";
45+
private const string _sdkVersion = "5.0.2";
46+
private const string _sdkGenVersion = "2.258.0";
4747
private const string _openapiDocVersion = "0.4.0";
48-
private const string _userAgent = "speakeasy-sdk/csharp 5.0.1 2.253.0 0.4.0 SpeakeasySDK";
48+
private const string _userAgent = "speakeasy-sdk/csharp 5.0.2 2.258.0 0.4.0 SpeakeasySDK";
4949
private string _serverUrl = "";
5050
private ISpeakeasyHttpClient _defaultClient;
5151
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.0.1";
53-
private const string _sdkGenVersion = "2.253.0";
52+
private const string _sdkVersion = "5.0.2";
53+
private const string _sdkGenVersion = "2.258.0";
5454
private const string _openapiDocVersion = "0.4.0";
55-
private const string _userAgent = "speakeasy-sdk/csharp 5.0.1 2.253.0 0.4.0 SpeakeasySDK";
55+
private const string _userAgent = "speakeasy-sdk/csharp 5.0.2 2.258.0 0.4.0 SpeakeasySDK";
5656
private string _serverUrl = "";
5757
private ISpeakeasyHttpClient _defaultClient;
5858
private Func<Security>? _securitySource;
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
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.Utils;
14+
15+
public class GetWorkspaceAccessRequest
16+
{
17+
18+
/// <summary>
19+
/// Unique identifier of the generation target.
20+
/// </summary>
21+
[SpeakeasyMetadata("queryParam:style=form,explode=true,name=genLockId")]
22+
public string? GenLockId { get; set; }
23+
}
24+
}
Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
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 GetWorkspaceAccessResponse
18+
{
19+
20+
/// <summary>
21+
/// OK
22+
/// </summary>
23+
public AccessDetails? AccessDetails { get; set; }
24+
25+
/// <summary>
26+
/// HTTP response content type for this operation
27+
/// </summary>
28+
public string? ContentType { get; set; } = default!;
29+
30+
public Error? Error { get; set; }
31+
32+
/// <summary>
33+
/// HTTP response status code for this operation
34+
/// </summary>
35+
public int StatusCode { get; set; } = default!;
36+
37+
/// <summary>
38+
/// Raw HTTP response; suitable for custom response parsing
39+
/// </summary>
40+
public HttpResponseMessage RawResponse { get; set; } = default!;
41+
}
42+
}

0 commit comments

Comments
 (0)