Skip to content

Commit c417ec0

Browse files
authored
Merge branch 'main' into feat/add-chopper-requester-package
2 parents a97061a + 12c6244 commit c417ec0

File tree

562 files changed

+29578
-5441
lines changed

Some content is hidden

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

562 files changed

+29578
-5441
lines changed

.eslintrc.cjs

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -51,19 +51,20 @@ module.exports = {
5151
files: ['specs/**/*.yml'],
5252
rules: {
5353
'automation-custom/end-with-dot': 'error',
54+
'automation-custom/no-big-int': 'error',
5455
'automation-custom/no-final-dot': 'error',
5556
'automation-custom/single-quote-ref': 'error',
5657
},
5758
overrides: [
5859
{
5960
files: ['!specs/bundled/*.yml'],
6061
rules: {
61-
'automation-custom/out-of-line-enum': 'error',
62-
'automation-custom/out-of-line-one-of': 'error',
6362
'automation-custom/out-of-line-all-of': 'error',
6463
'automation-custom/out-of-line-any-of': 'error',
65-
'automation-custom/valid-acl': 'error',
64+
'automation-custom/out-of-line-enum': 'error',
65+
'automation-custom/out-of-line-one-of': 'error',
6666
'automation-custom/ref-common': 'error',
67+
'automation-custom/valid-acl': 'error',
6768
'automation-custom/valid-inline-title': 'error',
6869
},
6970
},

clients/algoliasearch-client-csharp/CHANGELOG.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,8 @@
1+
## [7.8.1](https://github.com/algolia/algoliasearch-client-csharp/compare/7.8.0...7.8.1)
2+
3+
- [801241e12](https://github.com/algolia/api-clients-automation/commit/801241e12) fix(specs): add secrets payload for updates ([#4061](https://github.com/algolia/api-clients-automation/pull/4061)) by [@shortcuts](https://github.com/shortcuts/)
4+
- [625421783](https://github.com/algolia/api-clients-automation/commit/625421783) fix(clients): update browse iterator ([#4058](https://github.com/algolia/api-clients-automation/pull/4058)) by [@Fluf22](https://github.com/Fluf22/)
5+
16
## [7.8.0](https://github.com/algolia/algoliasearch-client-csharp/compare/7.7.0...7.8.0)
27

38
- [be40cf61d](https://github.com/algolia/api-clients-automation/commit/be40cf61d) feat(specs): add secrets authentications to ingestion ([#4054](https://github.com/algolia/api-clients-automation/pull/4054)) by [@shortcuts](https://github.com/shortcuts/)

clients/algoliasearch-client-csharp/algoliasearch/Algolia.Search.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
<RepositoryUrl>https://github.com/algolia/algoliasearch-client-csharp</RepositoryUrl>
2121
<RepositoryType>git</RepositoryType>
2222
<RequireLicenseAcceptance>false</RequireLicenseAcceptance>
23-
<Version>7.8.0</Version>
23+
<Version>7.8.1</Version>
2424
<GenerateDocumentationFile>true</GenerateDocumentationFile>
2525
<TargetFrameworks>netstandard2.1;netstandard2.0</TargetFrameworks>
2626
<IncludeSymbols>true</IncludeSymbols>

clients/algoliasearch-client-csharp/algoliasearch/Clients/AbtestingClient.cs

Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -189,6 +189,36 @@ public interface IAbtestingClient
189189
/// <returns>ABTestResponse</returns>
190190
ABTestResponse DeleteABTest(int id, RequestOptions options = null, CancellationToken cancellationToken = default);
191191

192+
/// <summary>
193+
/// Given the traffic percentage and the expected effect size, this endpoint estimates the sample size and duration of an A/B test based on historical traffic.
194+
/// </summary>
195+
///
196+
/// Required API Key ACLs:
197+
/// - analytics
198+
/// <param name="estimateABTestRequest"></param>
199+
/// <param name="options">Add extra http header or query parameters to Algolia.</param>
200+
/// <param name="cancellationToken">Cancellation Token to cancel the request.</param>
201+
/// <exception cref="ArgumentException">Thrown when arguments are not correct</exception>
202+
/// <exception cref="Algolia.Search.Exceptions.AlgoliaApiException">Thrown when the API call was rejected by Algolia</exception>
203+
/// <exception cref="Algolia.Search.Exceptions.AlgoliaUnreachableHostException">Thrown when the client failed to call the endpoint</exception>
204+
/// <returns>Task of EstimateABTestResponse</returns>
205+
Task<EstimateABTestResponse> EstimateABTestAsync(EstimateABTestRequest estimateABTestRequest, RequestOptions options = null, CancellationToken cancellationToken = default);
206+
207+
/// <summary>
208+
/// Given the traffic percentage and the expected effect size, this endpoint estimates the sample size and duration of an A/B test based on historical traffic. (Synchronous version)
209+
/// </summary>
210+
///
211+
/// Required API Key ACLs:
212+
/// - analytics
213+
/// <param name="estimateABTestRequest"></param>
214+
/// <param name="options">Add extra http header or query parameters to Algolia.</param>
215+
/// <param name="cancellationToken">Cancellation Token to cancel the request.</param>
216+
/// <exception cref="ArgumentException">Thrown when arguments are not correct</exception>
217+
/// <exception cref="Algolia.Search.Exceptions.AlgoliaApiException">Thrown when the API call was rejected by Algolia</exception>
218+
/// <exception cref="Algolia.Search.Exceptions.AlgoliaUnreachableHostException">Thrown when the client failed to call the endpoint</exception>
219+
/// <returns>EstimateABTestResponse</returns>
220+
EstimateABTestResponse EstimateABTest(EstimateABTestRequest estimateABTestRequest, RequestOptions options = null, CancellationToken cancellationToken = default);
221+
192222
/// <summary>
193223
/// Retrieves the details for an A/B test by its ID.
194224
/// </summary>
@@ -513,6 +543,26 @@ public ABTestResponse DeleteABTest(int id, RequestOptions options = null, Cancel
513543
AsyncHelper.RunSync(() => DeleteABTestAsync(id, options, cancellationToken));
514544

515545

546+
/// <inheritdoc />
547+
public async Task<EstimateABTestResponse> EstimateABTestAsync(EstimateABTestRequest estimateABTestRequest, RequestOptions options = null, CancellationToken cancellationToken = default)
548+
{
549+
550+
if (estimateABTestRequest == null)
551+
throw new ArgumentException("Parameter `estimateABTestRequest` is required when calling `EstimateABTest`.");
552+
553+
var requestOptions = new InternalRequestOptions(options);
554+
555+
556+
requestOptions.Data = estimateABTestRequest;
557+
return await _transport.ExecuteRequestAsync<EstimateABTestResponse>(new HttpMethod("POST"), "/2/abtests/estimate", requestOptions, cancellationToken).ConfigureAwait(false);
558+
}
559+
560+
561+
/// <inheritdoc />
562+
public EstimateABTestResponse EstimateABTest(EstimateABTestRequest estimateABTestRequest, RequestOptions options = null, CancellationToken cancellationToken = default) =>
563+
AsyncHelper.RunSync(() => EstimateABTestAsync(estimateABTestRequest, options, cancellationToken));
564+
565+
516566
/// <inheritdoc />
517567
public async Task<ABTest> GetABTestAsync(int id, RequestOptions options = null, CancellationToken cancellationToken = default)
518568
{

clients/algoliasearch-client-csharp/algoliasearch/Clients/AbtestingConfiguration.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ public sealed class AbtestingConfig : AlgoliaConfig
2828
/// <param name="appId">Your application ID</param>
2929
/// <param name="apiKey">Your API Key</param>
3030
/// <param name="region">Targeted region (optional)</param>
31-
public AbtestingConfig(string appId, string apiKey, string region = null) : base(appId, apiKey, "Abtesting", "7.8.0")
31+
public AbtestingConfig(string appId, string apiKey, string region = null) : base(appId, apiKey, "Abtesting", "7.8.1")
3232
{
3333
DefaultHosts = GetDefaultHosts(region);
3434
Compression = CompressionType.None;

clients/algoliasearch-client-csharp/algoliasearch/Clients/AnalyticsConfiguration.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ public sealed class AnalyticsConfig : AlgoliaConfig
2828
/// <param name="appId">Your application ID</param>
2929
/// <param name="apiKey">Your API Key</param>
3030
/// <param name="region">Targeted region (optional)</param>
31-
public AnalyticsConfig(string appId, string apiKey, string region = null) : base(appId, apiKey, "Analytics", "7.8.0")
31+
public AnalyticsConfig(string appId, string apiKey, string region = null) : base(appId, apiKey, "Analytics", "7.8.1")
3232
{
3333
DefaultHosts = GetDefaultHosts(region);
3434
Compression = CompressionType.None;

clients/algoliasearch-client-csharp/algoliasearch/Clients/IngestionConfiguration.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ public sealed class IngestionConfig : AlgoliaConfig
2828
/// <param name="appId">Your application ID</param>
2929
/// <param name="apiKey">Your API Key</param>
3030
/// <param name="region">Targeted region </param>
31-
public IngestionConfig(string appId, string apiKey, string region) : base(appId, apiKey, "Ingestion", "7.8.0")
31+
public IngestionConfig(string appId, string apiKey, string region) : base(appId, apiKey, "Ingestion", "7.8.1")
3232
{
3333
DefaultHosts = GetDefaultHosts(region);
3434
Compression = CompressionType.None;

clients/algoliasearch-client-csharp/algoliasearch/Clients/InsightsConfiguration.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ public sealed class InsightsConfig : AlgoliaConfig
2828
/// <param name="appId">Your application ID</param>
2929
/// <param name="apiKey">Your API Key</param>
3030
/// <param name="region">Targeted region (optional)</param>
31-
public InsightsConfig(string appId, string apiKey, string region = null) : base(appId, apiKey, "Insights", "7.8.0")
31+
public InsightsConfig(string appId, string apiKey, string region = null) : base(appId, apiKey, "Insights", "7.8.1")
3232
{
3333
DefaultHosts = GetDefaultHosts(region);
3434
Compression = CompressionType.None;

clients/algoliasearch-client-csharp/algoliasearch/Clients/MonitoringConfiguration.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ public sealed class MonitoringConfig : AlgoliaConfig
2727
/// </summary>
2828
/// <param name="appId">Your application ID</param>
2929
/// <param name="apiKey">Your API Key</param>
30-
public MonitoringConfig(string appId, string apiKey) : base(appId, apiKey, "Monitoring", "7.8.0")
30+
public MonitoringConfig(string appId, string apiKey) : base(appId, apiKey, "Monitoring", "7.8.1")
3131
{
3232
DefaultHosts = GetDefaultHosts();
3333
Compression = CompressionType.None;

clients/algoliasearch-client-csharp/algoliasearch/Clients/PersonalizationConfiguration.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ public sealed class PersonalizationConfig : AlgoliaConfig
2828
/// <param name="appId">Your application ID</param>
2929
/// <param name="apiKey">Your API Key</param>
3030
/// <param name="region">Targeted region </param>
31-
public PersonalizationConfig(string appId, string apiKey, string region) : base(appId, apiKey, "Personalization", "7.8.0")
31+
public PersonalizationConfig(string appId, string apiKey, string region) : base(appId, apiKey, "Personalization", "7.8.1")
3232
{
3333
DefaultHosts = GetDefaultHosts(region);
3434
Compression = CompressionType.None;

0 commit comments

Comments
 (0)