Skip to content

Commit 7c53cd3

Browse files
authored
Merge branch 'main' into feat/add-chopper-requester-package
2 parents 14fc833 + e5a0081 commit 7c53cd3

File tree

454 files changed

+18173
-6635
lines changed

Some content is hidden

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

454 files changed

+18173
-6635
lines changed

.github/actions/setup/action.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -211,7 +211,7 @@ runs:
211211
if: ${{ inputs.language == 'swift' }}
212212
id: swiftformat-version
213213
shell: bash
214-
run: echo "SWIFTFORMAT_VERSION=0.54.0" >> $GITHUB_OUTPUT
214+
run: echo "SWIFTFORMAT_VERSION=0.54.1" >> $GITHUB_OUTPUT
215215

216216
- name: Checkout swiftformat
217217
if: ${{ inputs.language == 'swift' }}

.github/workflows/check.yml

Lines changed: 61 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -241,8 +241,18 @@ jobs:
241241
path: tests/output/javascript/node_modules
242242
key: node-modules-tests-${{ hashFiles('tests/output/javascript/yarn.lock') }}
243243

244-
- name: Run CTS
245-
run: yarn cli cts run javascript ${{ fromJSON(needs.setup.outputs.JAVASCRIPT_DATA).toRun }}
244+
- name: Run unit CTS
245+
run: yarn cli cts run javascript ${{ fromJSON(needs.setup.outputs.JAVASCRIPT_DATA).toRun }} --exclude-e2e
246+
247+
- name: Run e2e CTS
248+
id: cts-e2e
249+
continue-on-error: true
250+
if: ${{ !github.event.pull_request.head.repo.fork }}
251+
run: yarn cli cts run javascript ${{ fromJSON(needs.setup.outputs.JAVASCRIPT_DATA).toRun }} --exclude-unit
252+
253+
- name: Retry e2e CTS
254+
if: ${{ !github.event.pull_request.head.repo.fork && steps.cts-e2e.outcome == 'failure' }}
255+
run: yarn cli cts run javascript ${{ fromJSON(needs.setup.outputs.JAVASCRIPT_DATA).toRun }} --exclude-unit
246256

247257
- name: Generate code snippets for documentation
248258
run: yarn cli snippets javascript ${{ fromJSON(needs.setup.outputs.JAVASCRIPT_DATA).toRun }}
@@ -325,8 +335,18 @@ jobs:
325335
- name: Generate CTS
326336
run: yarn cli cts generate ${{ matrix.client.language }} ${{ matrix.client.toRun }}
327337

328-
- name: Run CTS
329-
run: yarn cli cts run ${{ matrix.client.language }} ${{ matrix.client.toRun }}
338+
- name: Run unit CTS
339+
run: yarn cli cts run ${{ matrix.client.language }} ${{ matrix.client.toRun }} --exclude-e2e
340+
341+
- name: Run e2e CTS
342+
id: cts-e2e
343+
continue-on-error: true
344+
if: ${{ !github.event.pull_request.head.repo.fork }}
345+
run: yarn cli cts run ${{ matrix.client.language }} ${{ matrix.client.toRun }} --exclude-unit
346+
347+
- name: Retry e2e CTS
348+
if: ${{ !github.event.pull_request.head.repo.fork && steps.cts-e2e.outcome == 'failure' }}
349+
run: yarn cli cts run ${{ matrix.client.language }} ${{ matrix.client.toRun }} --exclude-unit
330350

331351
- name: Generate code snippets for documentation
332352
run: yarn cli snippets ${{ matrix.client.language }} ${{ matrix.client.toRun }}
@@ -353,6 +373,8 @@ jobs:
353373
needs.setup.outputs.RUN_MACOS_KOTLIN_BUILD == 'true' &&
354374
!contains(needs.*.result, 'cancelled') &&
355375
!contains(needs.*.result, 'failure')
376+
outputs:
377+
success: ${{ steps.setoutput.outputs.success }}
356378
steps:
357379
- uses: actions/checkout@v4
358380

@@ -371,6 +393,10 @@ jobs:
371393

372394
- run: yarn cli build clients kotlin
373395

396+
- name: Set output
397+
id: setoutput
398+
run: echo "success=true" >> "$GITHUB_OUTPUT"
399+
374400
swift_cts_macos:
375401
timeout-minutes: 20
376402
runs-on: macos-latest
@@ -379,7 +405,6 @@ jobs:
379405
- client_gen
380406
if: |
381407
always() &&
382-
startsWith(github.head_ref, 'chore/prepare-release-') &&
383408
needs.setup.outputs.RUN_GEN == 'true' &&
384409
needs.setup.outputs.RUN_MACOS_SWIFT_CTS == 'true' &&
385410
!contains(needs.*.result, 'cancelled') &&
@@ -388,6 +413,8 @@ jobs:
388413
ALGOLIA_APPLICATION_ID: ${{ secrets.ALGOLIA_APPLICATION_ID }}
389414
ALGOLIA_ADMIN_KEY: ${{ secrets.ALGOLIA_ADMIN_KEY }}
390415
MONITORING_API_KEY: ${{ secrets.MONITORING_API_KEY }}
416+
outputs:
417+
success: ${{ steps.setoutput.outputs.success }}
391418
steps:
392419
- uses: actions/checkout@v4
393420

@@ -406,6 +433,10 @@ jobs:
406433

407434
- run: yarn cli cts run swift ${{ fromJSON(needs.setup.outputs.SWIFT_DATA).toRun }}
408435

436+
- name: Set output
437+
id: setoutput
438+
run: echo "success=true" >> "$GITHUB_OUTPUT"
439+
409440
codegen:
410441
runs-on: ubuntu-22.04
411442
timeout-minutes: 15
@@ -443,27 +474,6 @@ jobs:
443474
- name: Generate documentation specs with code snippets
444475
run: yarn cli build specs ${{ fromJSON(needs.setup.outputs.SPECS_MATRIX).toRun }} --docs
445476

446-
- name: Build website
447-
if: ${{ github.ref == 'refs/heads/main' || github.base_ref == 'main' }}
448-
run: yarn website:build
449-
450-
- name: Deploy documentation
451-
if: ${{ github.ref == 'refs/heads/main' || github.base_ref == 'main' }}
452-
uses: nwtgck/[email protected]
453-
with:
454-
publish-dir: 'website/build'
455-
production-branch: main
456-
github-token: ${{ secrets.GITHUB_TOKEN }}
457-
deploy-message: 'Deploy from GitHub Actions'
458-
enable-pull-request-comment: true
459-
enable-commit-comment: true
460-
overwrites-pull-request-comment: true
461-
netlify-config-path: ./netlify.toml
462-
env:
463-
NETLIFY_AUTH_TOKEN: ${{ secrets.NETLIFY_AUTH_TOKEN }}
464-
NETLIFY_SITE_ID: ${{ secrets.NETLIFY_SITE_ID }}
465-
timeout-minutes: 5
466-
467477
- name: Push generated code
468478
id: pushGeneratedCode
469479
run: yarn workspace scripts pushGeneratedCode
@@ -494,6 +504,27 @@ jobs:
494504
| 🪓 Triggered by | [`${{ github.sha }}`](${{ github.event.pull_request.base.repo.html_url }}/commit/${{ github.sha }}) |
495505
| 🍃 Generated commit | [`${{ steps.pushGeneratedCode.outputs.GENERATED_COMMIT }}`](${{ github.event.pull_request.base.repo.html_url }}/commit/${{ steps.pushGeneratedCode.outputs.GENERATED_COMMIT }}) |
496506
| 🌲 Generated branch | [`generated/${{ github.head_ref }}`](${{ github.event.pull_request.base.repo.html_url }}/tree/generated/${{ github.head_ref }}) |
507+
508+
- name: Build website
509+
if: ${{ github.ref == 'refs/heads/main' || github.base_ref == 'main' }}
510+
run: yarn website:build
511+
512+
- name: Deploy documentation
513+
if: ${{ github.ref == 'refs/heads/main' || github.base_ref == 'main' }}
514+
uses: nwtgck/[email protected]
515+
with:
516+
publish-dir: 'website/build'
517+
production-branch: main
518+
github-token: ${{ secrets.GITHUB_TOKEN }}
519+
deploy-message: 'Deploy from GitHub Actions'
520+
enable-pull-request-comment: true
521+
enable-commit-comment: true
522+
overwrites-pull-request-comment: true
523+
netlify-config-path: ./netlify.toml
524+
env:
525+
NETLIFY_AUTH_TOKEN: ${{ secrets.NETLIFY_AUTH_TOKEN }}
526+
NETLIFY_SITE_ID: ${{ secrets.NETLIFY_SITE_ID }}
527+
timeout-minutes: 5
497528

498529
- name: Set output
499530
id: setoutput
@@ -509,8 +540,8 @@ jobs:
509540
if: always()
510541
steps:
511542
- run: |
512-
if [[ "${{ needs.codegen.outputs.success }}" != "true" ]]; then
513-
echo "codegen step didn't succeed"
543+
if [[ ("${{ needs.codegen.outputs.success }}" != "true") || ("${{ needs.swift_cts_macos.result }}" != "skipped" && "${{ needs.swift_cts_macos.outputs.success }}" != "true") || ("${{ needs.kotlin_build_macos.result }}" != "skipped" && "${{ needs.kotlin_build_macos.outputs.success }}" != "true")]]; then
544+
echo "a needed step failed"
514545
exit 1
515546
fi
516547
@@ -522,6 +553,8 @@ jobs:
522553
- check_green
523554
if: |
524555
always() &&
556+
!contains(needs.*.result, 'cancelled') &&
557+
!contains(needs.*.result, 'failure') &&
525558
github.ref == 'refs/heads/main'
526559
permissions:
527560
pull-requests: write

.nvmrc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
20.15.0
1+
20.15.1

clients/algoliasearch-client-csharp/CHANGELOG.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,9 @@
1+
## [7.0.0-beta.9](https://github.com/algolia/algoliasearch-client-csharp/compare/7.0.0-beta.8...7.0.0-beta.9)
2+
3+
- [a009967f6](https://github.com/algolia/api-clients-automation/commit/a009967f6) fix(specs): browse response required properties ([#3348](https://github.com/algolia/api-clients-automation/pull/3348)) by [@millotp](https://github.com/millotp/)
4+
- [04a799417](https://github.com/algolia/api-clients-automation/commit/04a799417) fix(specs): ingestion task and transformation ([#3347](https://github.com/algolia/api-clients-automation/pull/3347)) by [@shortcuts](https://github.com/shortcuts/)
5+
- [dcb1b59dc](https://github.com/algolia/api-clients-automation/commit/dcb1b59dc) fix(specs): clarify browse parameters ([#3333](https://github.com/algolia/api-clients-automation/pull/3333)) by [@kai687](https://github.com/kai687/)
6+
17
## [7.0.0-beta.8](https://github.com/algolia/algoliasearch-client-csharp/compare/7.0.0-beta.7...7.0.0-beta.8)
28

39
- [9776cb3ba](https://github.com/algolia/api-clients-automation/commit/9776cb3ba) feat(specs): add redirect to renderingContent ([#3296](https://github.com/algolia/api-clients-automation/pull/3296)) 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
@@ -21,7 +21,7 @@
2121
<RepositoryType>git</RepositoryType>
2222
<RequireLicenseAcceptance>false</RequireLicenseAcceptance>
2323
<Copyright>Copyright 2019 Algolia</Copyright>
24-
<Version>7.0.0-beta.8</Version>
24+
<Version>7.0.0-beta.9</Version>
2525
<GenerateDocumentationFile>true</GenerateDocumentationFile>
2626
<TargetFrameworks>netstandard2.1;netstandard2.0</TargetFrameworks>
2727
<IncludeSymbols>true</IncludeSymbols>

clients/algoliasearch-client-csharp/algoliasearch/Models/Recommend/BaseSearchResponse.cs

Lines changed: 1 addition & 49 deletions
Original file line numberDiff line numberDiff line change
@@ -27,17 +27,9 @@ public BaseSearchResponse()
2727
/// <summary>
2828
/// Initializes a new instance of the BaseSearchResponse class.
2929
/// </summary>
30-
/// <param name="hitsPerPage">Number of hits per page. (required) (default to 20).</param>
31-
/// <param name="nbHits">Number of results (hits). (required).</param>
32-
/// <param name="nbPages">Number of pages of results. (required).</param>
33-
/// <param name="page">Page of search results to retrieve. (required) (default to 0).</param>
3430
/// <param name="processingTimeMS">Time the server took to process the request, in milliseconds. (required).</param>
35-
public BaseSearchResponse(int hitsPerPage, int nbHits, int nbPages, int page, int processingTimeMS)
31+
public BaseSearchResponse(int processingTimeMS)
3632
{
37-
HitsPerPage = hitsPerPage;
38-
NbHits = nbHits;
39-
NbPages = nbPages;
40-
Page = page;
4133
ProcessingTimeMS = processingTimeMS;
4234
AdditionalProperties = new Dictionary<string, object>();
4335
}
@@ -114,13 +106,6 @@ public BaseSearchResponse(int hitsPerPage, int nbHits, int nbPages, int page, in
114106
[JsonPropertyName("facets_stats")]
115107
public Dictionary<string, FacetsStats> FacetsStats { get; set; }
116108

117-
/// <summary>
118-
/// Number of hits per page.
119-
/// </summary>
120-
/// <value>Number of hits per page.</value>
121-
[JsonPropertyName("hitsPerPage")]
122-
public int HitsPerPage { get; set; }
123-
124109
/// <summary>
125110
/// Index name used for the query.
126111
/// </summary>
@@ -142,34 +127,13 @@ public BaseSearchResponse(int hitsPerPage, int nbHits, int nbPages, int page, in
142127
[JsonPropertyName("message")]
143128
public string Message { get; set; }
144129

145-
/// <summary>
146-
/// Number of results (hits).
147-
/// </summary>
148-
/// <value>Number of results (hits).</value>
149-
[JsonPropertyName("nbHits")]
150-
public int NbHits { get; set; }
151-
152-
/// <summary>
153-
/// Number of pages of results.
154-
/// </summary>
155-
/// <value>Number of pages of results.</value>
156-
[JsonPropertyName("nbPages")]
157-
public int NbPages { get; set; }
158-
159130
/// <summary>
160131
/// Number of hits selected and sorted by the relevant sort algorithm.
161132
/// </summary>
162133
/// <value>Number of hits selected and sorted by the relevant sort algorithm.</value>
163134
[JsonPropertyName("nbSortedHits")]
164135
public int? NbSortedHits { get; set; }
165136

166-
/// <summary>
167-
/// Page of search results to retrieve.
168-
/// </summary>
169-
/// <value>Page of search results to retrieve.</value>
170-
[JsonPropertyName("page")]
171-
public int Page { get; set; }
172-
173137
/// <summary>
174138
/// Post-[normalization](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/#what-does-normalization-mean) query string that will be searched.
175139
/// </summary>
@@ -262,14 +226,10 @@ public override string ToString()
262226
sb.Append(" ExhaustiveTypo: ").Append(ExhaustiveTypo).Append("\n");
263227
sb.Append(" Facets: ").Append(Facets).Append("\n");
264228
sb.Append(" FacetsStats: ").Append(FacetsStats).Append("\n");
265-
sb.Append(" HitsPerPage: ").Append(HitsPerPage).Append("\n");
266229
sb.Append(" Index: ").Append(Index).Append("\n");
267230
sb.Append(" IndexUsed: ").Append(IndexUsed).Append("\n");
268231
sb.Append(" Message: ").Append(Message).Append("\n");
269-
sb.Append(" NbHits: ").Append(NbHits).Append("\n");
270-
sb.Append(" NbPages: ").Append(NbPages).Append("\n");
271232
sb.Append(" NbSortedHits: ").Append(NbSortedHits).Append("\n");
272-
sb.Append(" Page: ").Append(Page).Append("\n");
273233
sb.Append(" ParsedQuery: ").Append(ParsedQuery).Append("\n");
274234
sb.Append(" ProcessingTimeMS: ").Append(ProcessingTimeMS).Append("\n");
275235
sb.Append(" ProcessingTimingsMS: ").Append(ProcessingTimingsMS).Append("\n");
@@ -317,14 +277,10 @@ public override bool Equals(object obj)
317277
(ExhaustiveTypo == input.ExhaustiveTypo || ExhaustiveTypo.Equals(input.ExhaustiveTypo)) &&
318278
(Facets == input.Facets || Facets != null && input.Facets != null && Facets.SequenceEqual(input.Facets)) &&
319279
(FacetsStats == input.FacetsStats || FacetsStats != null && input.FacetsStats != null && FacetsStats.SequenceEqual(input.FacetsStats)) &&
320-
(HitsPerPage == input.HitsPerPage || HitsPerPage.Equals(input.HitsPerPage)) &&
321280
(Index == input.Index || (Index != null && Index.Equals(input.Index))) &&
322281
(IndexUsed == input.IndexUsed || (IndexUsed != null && IndexUsed.Equals(input.IndexUsed))) &&
323282
(Message == input.Message || (Message != null && Message.Equals(input.Message))) &&
324-
(NbHits == input.NbHits || NbHits.Equals(input.NbHits)) &&
325-
(NbPages == input.NbPages || NbPages.Equals(input.NbPages)) &&
326283
(NbSortedHits == input.NbSortedHits || NbSortedHits.Equals(input.NbSortedHits)) &&
327-
(Page == input.Page || Page.Equals(input.Page)) &&
328284
(ParsedQuery == input.ParsedQuery || (ParsedQuery != null && ParsedQuery.Equals(input.ParsedQuery))) &&
329285
(ProcessingTimeMS == input.ProcessingTimeMS || ProcessingTimeMS.Equals(input.ProcessingTimeMS)) &&
330286
(ProcessingTimingsMS == input.ProcessingTimingsMS || (ProcessingTimingsMS != null && ProcessingTimingsMS.Equals(input.ProcessingTimingsMS))) &&
@@ -372,7 +328,6 @@ public override int GetHashCode()
372328
{
373329
hashCode = (hashCode * 59) + FacetsStats.GetHashCode();
374330
}
375-
hashCode = (hashCode * 59) + HitsPerPage.GetHashCode();
376331
if (Index != null)
377332
{
378333
hashCode = (hashCode * 59) + Index.GetHashCode();
@@ -385,10 +340,7 @@ public override int GetHashCode()
385340
{
386341
hashCode = (hashCode * 59) + Message.GetHashCode();
387342
}
388-
hashCode = (hashCode * 59) + NbHits.GetHashCode();
389-
hashCode = (hashCode * 59) + NbPages.GetHashCode();
390343
hashCode = (hashCode * 59) + NbSortedHits.GetHashCode();
391-
hashCode = (hashCode * 59) + Page.GetHashCode();
392344
if (ParsedQuery != null)
393345
{
394346
hashCode = (hashCode * 59) + ParsedQuery.GetHashCode();

clients/algoliasearch-client-csharp/algoliasearch/Models/Recommend/GetRecommendationsResponse.cs

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,15 @@ public partial class GetRecommendationsResponse
1919
/// <summary>
2020
/// Initializes a new instance of the GetRecommendationsResponse class.
2121
/// </summary>
22-
public GetRecommendationsResponse()
22+
[JsonConstructor]
23+
public GetRecommendationsResponse() { }
24+
/// <summary>
25+
/// Initializes a new instance of the GetRecommendationsResponse class.
26+
/// </summary>
27+
/// <param name="results">results (required).</param>
28+
public GetRecommendationsResponse(List<RecommendationsResults> results)
2329
{
30+
Results = results ?? throw new ArgumentNullException(nameof(results));
2431
}
2532

2633
/// <summary>

0 commit comments

Comments
 (0)