Skip to content

Commit 1e5df47

Browse files
committed
ci: regenerated with OpenAPI Doc 1.0.0, Speakeasy CLI 1.205.2
1 parent 5d9f5e9 commit 1e5df47

25 files changed

+177
-95
lines changed

.speakeasy/gen.lock

Lines changed: 11 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,26 +1,27 @@
11
lockVersion: 2.0.0
22
id: 76b4d38c-5441-40d8-8002-c456a3ea1652
33
management:
4-
docChecksum: 01bd42610039f89b431afa7eb1a3c56c
4+
docChecksum: a2a29dc8a8df536c8b2553db26987fad
55
docVersion: 1.0.0
6-
speakeasyVersion: internal
7-
generationVersion: 2.263.3
8-
releaseVersion: 0.10.0
9-
configChecksum: bc5cf47881374f9c236900b242e1ffce
6+
speakeasyVersion: 1.205.2
7+
generationVersion: 2.279.1
8+
releaseVersion: 0.11.0
9+
configChecksum: c7e1482b1d0492ec328470a6ca1158a4
1010
repoURL: https://github.com/ding-live/ding-csharp.git
1111
repoSubDirectory: .
1212
published: true
1313
features:
1414
csharp:
15-
core: 3.3.2
15+
core: 3.4.3
1616
examples: 2.81.3
1717
flattening: 2.81.1
18-
globalSecurity: 2.83.1
19-
globalServerURLs: 2.82.2
18+
globalSecurity: 2.83.3
19+
globalServerURLs: 2.82.3
2020
generatedFiles:
2121
- DingSDK/Otp.cs
2222
- DingSDK/Lookup.cs
2323
- DingSDK/Ding.cs
24+
- global.json
2425
- DingSDK/Utils/BigIntSerializer.cs
2526
- DingSDK/Utils/DecimalSerializer.cs
2627
- DingSDK/Utils/EnumSerializer.cs
@@ -36,7 +37,7 @@ generatedFiles:
3637
- DingSDK/DingSDK.csproj
3738
- DingSDK.sln
3839
- DingSDK/Models/Requests/CheckResponse.cs
39-
- DingSDK/Models/Requests/CreateAutenticationResponse.cs
40+
- DingSDK/Models/Requests/CreateAuthenticationResponse.cs
4041
- DingSDK/Models/Requests/RetryResponse.cs
4142
- DingSDK/Models/Requests/LookupRequest.cs
4243
- DingSDK/Models/Requests/LookupResponse.cs
@@ -56,7 +57,7 @@ generatedFiles:
5657
- DingSDK/Models/Components/LookupResponse.cs
5758
- DingSDK/Models/Components/Security.cs
5859
- docs/Models/Requests/CheckResponse.md
59-
- docs/Models/Requests/CreateAutenticationResponse.md
60+
- docs/Models/Requests/CreateAuthenticationResponse.md
6061
- docs/Models/Requests/RetryResponse.md
6162
- docs/Models/Requests/LookupRequest.md
6263
- docs/Models/Requests/LookupResponse.md

DingSDK/Ding.cs

Lines changed: 13 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,6 @@ namespace DingSDK
1818
using System.Threading.Tasks;
1919
using System;
2020

21-
22-
2321
/// <summary>
2422
/// Ding: The OTP API allows you to send authentication codes to your users using their phone numbers.
2523
/// </summary>
@@ -36,14 +34,16 @@ public interface IDing
3634
/// </summary>
3735
public ILookup Lookup { get; }
3836
}
39-
37+
4038
public class SDKConfig
4139
{
42-
public static string[] ServerList = new string[]
43-
{
40+
/// <summary>
41+
/// List of server URLs available to the SDK.
42+
/// </summary>
43+
public static readonly string[] ServerList = {
4444
"https://api.ding.live/v1",
4545
};
46-
/// Contains the list of servers available to the SDK
46+
4747
public string serverUrl = "";
4848
public int serverIndex = 0;
4949

@@ -65,10 +65,10 @@ public class Ding: IDing
6565
public SDKConfig SDKConfiguration { get; private set; }
6666

6767
private const string _language = "csharp";
68-
private const string _sdkVersion = "0.10.0";
69-
private const string _sdkGenVersion = "2.263.3";
68+
private const string _sdkVersion = "0.11.0";
69+
private const string _sdkGenVersion = "2.279.1";
7070
private const string _openapiDocVersion = "1.0.0";
71-
private const string _userAgent = "speakeasy-sdk/csharp 0.10.0 2.263.3 1.0.0 DingSDK";
71+
private const string _userAgent = "speakeasy-sdk/csharp 0.11.0 2.279.1 1.0.0 DingSDK";
7272
private string _serverUrl = "";
7373
private int _serverIndex = 0;
7474
private ISpeakeasyHttpClient _defaultClient;
@@ -80,6 +80,10 @@ public Ding(Security? security = null, Func<Security>? securitySource = null, in
8080
{
8181
if (serverIndex != null)
8282
{
83+
if (serverIndex.Value < 0 || serverIndex.Value >= SDKConfig.ServerList.Length)
84+
{
85+
throw new Exception($"Invalid server index {serverIndex.Value}");
86+
}
8387
_serverIndex = serverIndex.Value;
8488
}
8589

DingSDK/DingSDK.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
<PropertyGroup>
33
<IsPackable>true</IsPackable>
44
<PackageId>DingSDK</PackageId>
5-
<Version>0.10.0</Version>
5+
<Version>0.11.0</Version>
66
<Authors>Ding</Authors>
77
<TargetFramework>net5.0</TargetFramework>
88
<Nullable>enable</Nullable>

DingSDK/Lookup.cs

Lines changed: 8 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -38,10 +38,10 @@ public class Lookup: ILookup
3838
{
3939
public SDKConfig SDKConfiguration { get; private set; }
4040
private const string _language = "csharp";
41-
private const string _sdkVersion = "0.10.0";
42-
private const string _sdkGenVersion = "2.263.3";
41+
private const string _sdkVersion = "0.11.0";
42+
private const string _sdkGenVersion = "2.279.1";
4343
private const string _openapiDocVersion = "1.0.0";
44-
private const string _userAgent = "speakeasy-sdk/csharp 0.10.0 2.263.3 1.0.0 DingSDK";
44+
private const string _userAgent = "speakeasy-sdk/csharp 0.11.0 2.279.1 1.0.0 DingSDK";
4545
private string _serverUrl = "";
4646
private ISpeakeasyHttpClient _defaultClient;
4747
private Func<Security>? _securitySource;
@@ -53,7 +53,6 @@ public Lookup(ISpeakeasyHttpClient defaultClient, Func<Security>? securitySource
5353
_serverUrl = serverUrl;
5454
SDKConfiguration = config;
5555
}
56-
5756

5857
public async Task<Models.Requests.LookupResponse> LookupAsync(string customerUuid, string phoneNumber)
5958
{
@@ -64,12 +63,11 @@ public Lookup(ISpeakeasyHttpClient defaultClient, Func<Security>? securitySource
6463
};
6564
string baseUrl = this.SDKConfiguration.GetTemplatedServerDetails();
6665
var urlString = URLBuilder.Build(baseUrl, "/lookup/{phone_number}", request);
67-
66+
6867
var httpRequest = new HttpRequestMessage(HttpMethod.Get, urlString);
6968
httpRequest.Headers.Add("user-agent", _userAgent);
7069
HeaderSerializer.PopulateHeaders(ref httpRequest, request);
71-
72-
70+
7371
var client = _defaultClient;
7472
if (_securitySource != null)
7573
{
@@ -79,14 +77,14 @@ public Lookup(ISpeakeasyHttpClient defaultClient, Func<Security>? securitySource
7977
var httpResponse = await client.SendAsync(httpRequest);
8078

8179
var contentType = httpResponse.Content.Headers.ContentType?.MediaType;
82-
80+
8381
var response = new Models.Requests.LookupResponse
8482
{
8583
StatusCode = (int)httpResponse.StatusCode,
8684
ContentType = contentType,
8785
RawResponse = httpResponse
8886
};
89-
87+
9088
if((response.StatusCode == 200))
9189
{
9290
if(Utilities.IsContentTypeMatch("application/json",response.ContentType))
@@ -96,6 +94,7 @@ public Lookup(ISpeakeasyHttpClient defaultClient, Func<Security>? securitySource
9694

9795
return response;
9896
}
97+
9998
if((response.StatusCode == 400))
10099
{
101100
if(Utilities.IsContentTypeMatch("application/json",response.ContentType))
@@ -108,6 +107,5 @@ public Lookup(ISpeakeasyHttpClient defaultClient, Func<Security>? securitySource
108107
return response;
109108
}
110109

111-
112110
}
113111
}

DingSDK/Models/Components/Code.cs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@ namespace DingSDK.Models.Components
3030
/// * `invalid_os_version` - The provided OS version is invalid.<br/>
3131
/// * `invalid_device_model` - The provided device model is invalid.<br/>
3232
/// * `invalid_device_id` - The provided device ID is invalid.<br/>
33+
/// * `invalid_template_id` - The provided template ID is invalid.<br/>
3334
///
3435
/// </remarks>
3536
/// </summary>
@@ -67,6 +68,8 @@ public enum Code
6768
InvalidDeviceModel,
6869
[JsonProperty("invalid_device_id")]
6970
InvalidDeviceId,
71+
[JsonProperty("invalid_template_id")]
72+
InvalidTemplateId,
7073
}
7174

7275
public static class CodeExtension

DingSDK/Models/Components/CreateAuthenticationRequest.cs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -80,5 +80,11 @@ public class CreateAuthenticationRequest
8080
/// </summary>
8181
[JsonProperty("phone_number")]
8282
public string PhoneNumber { get; set; } = default!;
83+
84+
/// <summary>
85+
/// The template id associated with the message content variant to be sent.
86+
/// </summary>
87+
[JsonProperty("template_id")]
88+
public string? TemplateId { get; set; }
8389
}
8490
}

DingSDK/Models/Components/ErrorResponse.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@ public class ErrorResponse
3232
/// * `invalid_os_version` - The provided OS version is invalid.<br/>
3333
/// * `invalid_device_model` - The provided device model is invalid.<br/>
3434
/// * `invalid_device_id` - The provided device ID is invalid.<br/>
35+
/// * `invalid_template_id` - The provided template ID is invalid.<br/>
3536
///
3637
/// </remarks>
3738
/// </summary>

DingSDK/Models/Requests/CreateAutenticationResponse.cs renamed to DingSDK/Models/Requests/CreateAuthenticationResponse.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ namespace DingSDK.Models.Requests
1414
using System.Net.Http;
1515
using System;
1616

17-
public class CreateAutenticationResponse
17+
public class CreateAuthenticationResponse
1818
{
1919

2020
/// <summary>
@@ -25,7 +25,7 @@ public class CreateAutenticationResponse
2525
/// <summary>
2626
/// OK
2727
/// </summary>
28-
public CreateAuthenticationResponse? CreateAuthenticationResponse { get; set; }
28+
public Models.Components.CreateAuthenticationResponse? CreateAuthenticationResponseValue { get; set; }
2929

3030
/// <summary>
3131
/// Bad Request

0 commit comments

Comments
 (0)