Skip to content

Commit 1b7c88d

Browse files
authored
Merge branch 'main' into feat/add-onboarding-snippets
2 parents 6cf9d12 + 6ac345b commit 1b7c88d

File tree

709 files changed

+15554
-2628
lines changed

Some content is hidden

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

709 files changed

+15554
-2628
lines changed

.eslintrc.cjs

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -121,7 +121,7 @@ module.exports = {
121121
'@typescript-eslint/no-namespace': 0,
122122
'import/dynamic-import-chunkname': 0,
123123

124-
'unused-imports/no-unused-imports-ts': 2,
124+
'unused-imports/no-unused-imports': 2,
125125
'@typescript-eslint/no-unused-vars': 2,
126126
'@typescript-eslint/consistent-indexed-object-style': 2,
127127
'@typescript-eslint/member-ordering': [
@@ -205,8 +205,6 @@ module.exports = {
205205
{
206206
files: ['clients/algoliasearch-client-javascript/packages/**/__tests__/**/*.ts'],
207207

208-
extends: ["plugin:vitest/legacy-recommended"],
209-
210208
plugins: ['@vitest/eslint-plugin'],
211209
},
212210
{

.github/actions/setup/action.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ runs:
3434
- name: Download Java formatter
3535
if: inputs.type != 'minimal'
3636
shell: bash
37-
run: curl --retry 3 -L "https://github.com/google/google-java-format/releases/download/v1.23.0/google-java-format-1.23.0-all-deps.jar" > /tmp/java-formatter.jar
37+
run: curl --retry 3 -L "https://github.com/google/google-java-format/releases/download/v1.24.0/google-java-format-1.24.0-all-deps.jar" > /tmp/java-formatter.jar
3838

3939
# JavaScript for monorepo and tooling
4040
- name: Install Node

.github/workflows/check.yml

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -571,12 +571,17 @@ jobs:
571571
} >> "$GITHUB_OUTPUT"
572572
rm -rf tests/output/**/benchmarkResult.json
573573
574+
- name: Extract branch name
575+
id: extract_branch
576+
run: echo "branch=${GITHUB_HEAD_REF:-${GITHUB_REF#refs/heads/}}" >> $GITHUB_OUTPUT
577+
574578
- name: Push generated code
575579
id: pushGeneratedCode
576580
run: yarn workspace scripts pushGeneratedCode
577581
env:
578582
GITHUB_TOKEN: ${{ secrets.ALGOLIA_BOT_TOKEN != '' && secrets.ALGOLIA_BOT_TOKEN || secrets.GITHUB_TOKEN }}
579583
PR_NUMBER: ${{ github.event.number }}
584+
BRANCH_NAME: ${{ steps.extract_branch.outputs.branch }}
580585

581586
- name: update generation comment
582587
uses: marocchino/sticky-pull-request-comment@v2
@@ -663,8 +668,9 @@ jobs:
663668
- uses: actions/checkout@v4
664669
with:
665670
fetch-depth: 0
666-
ref: ${{ github.event.pull_request.head.ref }}
671+
ref: ${{ needs.codegen.outputs.generatedCommit }}
667672
token: ${{ secrets.ALGOLIA_BOT_TOKEN }}
673+
repository: ${{ github.event.pull_request.head.repo.full_name }}
668674

669675
- name: Setup
670676
uses: ./.github/actions/setup

.github/workflows/cleanup.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,4 +14,4 @@ jobs:
1414
steps:
1515
- uses: actions/checkout@v4
1616

17-
- run: git push -d origin generated/${{ github.head_ref }} || true
17+
- run: git push -d origin "generated/${{ github.head_ref }}" || true

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ target
2020
**/.DS_Store
2121
.gradle
2222
build
23+
.build
2324
pom.xml
2425

2526
dist

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

Lines changed: 16 additions & 16 deletions
Large diffs are not rendered by default.

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
/*
22
* Search API
33
*
4-
* The Algolia Search API lets you search, configure, and mange your indices and records. ## Client libraries Use Algolia's API clients and libraries to reliably integrate Algolia's APIs with your apps. The official API clients are covered by Algolia's [Service Level Agreement](https://www.algolia.com/policies/sla/). See: [Algolia's ecosystem](https://www.algolia.com/doc/guides/getting-started/how-algolia-works/in-depth/ecosystem/) ## Base URLs The base URLs for requests to the Search API are: - `https://{APPLICATION_ID}.algolia.net` - `https://{APPLICATION_ID}-dsn.algolia.net`. If your subscription includes a [Distributed Search Network](https://dashboard.algolia.com/infra), this ensures that requests are sent to servers closest to users. Both URLs provide high availability by distributing requests with load balancing. **All requests must use HTTPS.** ## Retry strategy To guarantee a high availability, implement a retry strategy for all API requests using the URLs of your servers as fallbacks: - `https://{APPLICATION_ID}-1.algolianet.com` - `https://{APPLICATION_ID}-2.algolianet.com` - `https://{APPLICATION_ID}-3.algolianet.com` These URLs use a different DNS provider than the primary URLs. You should randomize this list to ensure an even load across the three servers. All Algolia API clients implement this retry strategy. ## Authentication To authenticate your API requests, add these headers: - `x-algolia-application-id`. Your Algolia application ID. - `x-algolia-api-key`. An API key with the necessary permissions to make the request. The required access control list (ACL) to make a request is listed in each endpoint's reference. You can find your application ID and API key in the [Algolia dashboard](https://dashboard.algolia.com/account). ## Request format Depending on the endpoint, request bodies are either JSON objects or arrays of JSON objects, ## Parameters Parameters are passed as query parameters for GET and DELETE requests, and in the request body for POST and PUT requests. Query parameters must be [URL-encoded](https://developer.mozilla.org/en-US/docs/Glossary/Percent-encoding). Non-ASCII characters must be UTF-8 encoded. Plus characters (`+`) are interpreted as spaces. Arrays as query parameters must be one of: - A comma-separated string: `attributesToRetrieve=title,description` - A URL-encoded JSON array: `attributesToRetrieve=%5B%22title%22,%22description%22%D` ## Response status and errors The Search API returns JSON responses. Since JSON doesn't guarantee any specific ordering, don't rely on the order of attributes in the API response. Successful responses return a `2xx` status. Client errors return a `4xx` status. Server errors are indicated by a `5xx` status. Error responses have a `message` property with more information. ## Version The current version of the Search API is version 1, as indicated by the `/1/` in each endpoint's URL.
4+
* The Algolia Search API lets you search, configure, and manage your indices and records. ## Client libraries Use Algolia's API clients and libraries to reliably integrate Algolia's APIs with your apps. The official API clients are covered by Algolia's [Service Level Agreement](https://www.algolia.com/policies/sla/). See: [Algolia's ecosystem](https://www.algolia.com/doc/guides/getting-started/how-algolia-works/in-depth/ecosystem/) ## Base URLs The base URLs for requests to the Search API are: - `https://{APPLICATION_ID}.algolia.net` - `https://{APPLICATION_ID}-dsn.algolia.net`. If your subscription includes a [Distributed Search Network](https://dashboard.algolia.com/infra), this ensures that requests are sent to servers closest to users. Both URLs provide high availability by distributing requests with load balancing. **All requests must use HTTPS.** ## Retry strategy To guarantee high availability, implement a retry strategy for all API requests using the URLs of your servers as fallbacks: - `https://{APPLICATION_ID}-1.algolianet.com` - `https://{APPLICATION_ID}-2.algolianet.com` - `https://{APPLICATION_ID}-3.algolianet.com` These URLs use a different DNS provider than the primary URLs. You should randomize this list to ensure an even load across the three servers. All Algolia API clients implement this retry strategy. ## Authentication To authenticate your API requests, add these headers: - `x-algolia-application-id`. Your Algolia application ID. - `x-algolia-api-key`. An API key with the necessary permissions to make the request. The required access control list (ACL) to make a request is listed in each endpoint's reference. You can find your application ID and API key in the [Algolia dashboard](https://dashboard.algolia.com/account). ## Request format Depending on the endpoint, request bodies are either JSON objects or arrays of JSON objects, ## Parameters Parameters are passed as query parameters for GET and DELETE requests, and in the request body for POST and PUT requests. Query parameters must be [URL-encoded](https://developer.mozilla.org/en-US/docs/Glossary/Percent-encoding). Non-ASCII characters must be UTF-8 encoded. Plus characters (`+`) are interpreted as spaces. Arrays as query parameters must be one of: - A comma-separated string: `attributesToRetrieve=title,description` - A URL-encoded JSON array: `attributesToRetrieve=%5B%22title%22,%22description%22%D` ## Response status and errors The Search API returns JSON responses. Since JSON doesn't guarantee any specific ordering, don't rely on the order of attributes in the API response. Successful responses return a `2xx` status. Client errors return a `4xx` status. Server errors are indicated by a `5xx` status. Error responses have a `message` property with more information. ## Version The current version of the Search API is version 1, as indicated by the `/1/` in each endpoint's URL.
55
*
66
* The version of the OpenAPI document: 1.0.0
77
* Generated by: https://github.com/openapitools/openapi-generator.git
Lines changed: 100 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,100 @@
1+
//
2+
// Code generated by OpenAPI Generator (https://openapi-generator.tech), manual changes will be lost - read more on https://github.com/algolia/api-clients-automation. DO NOT EDIT.
3+
//
4+
using System;
5+
using System.Text;
6+
using System.Linq;
7+
using System.Text.Json.Serialization;
8+
using System.Collections.Generic;
9+
using Algolia.Search.Serializer;
10+
using System.Text.Json;
11+
12+
namespace Algolia.Search.Models.Recommend;
13+
14+
/// <summary>
15+
/// a search banner with image and url.
16+
/// </summary>
17+
public partial class Banner
18+
{
19+
/// <summary>
20+
/// Initializes a new instance of the Banner class.
21+
/// </summary>
22+
public Banner()
23+
{
24+
}
25+
26+
/// <summary>
27+
/// Gets or Sets Image
28+
/// </summary>
29+
[JsonPropertyName("image")]
30+
public BannerImage Image { get; set; }
31+
32+
/// <summary>
33+
/// Gets or Sets Link
34+
/// </summary>
35+
[JsonPropertyName("link")]
36+
public BannerLink Link { get; set; }
37+
38+
/// <summary>
39+
/// Returns the string presentation of the object
40+
/// </summary>
41+
/// <returns>String presentation of the object</returns>
42+
public override string ToString()
43+
{
44+
StringBuilder sb = new StringBuilder();
45+
sb.Append("class Banner {\n");
46+
sb.Append(" Image: ").Append(Image).Append("\n");
47+
sb.Append(" Link: ").Append(Link).Append("\n");
48+
sb.Append("}\n");
49+
return sb.ToString();
50+
}
51+
52+
/// <summary>
53+
/// Returns the JSON string presentation of the object
54+
/// </summary>
55+
/// <returns>JSON string presentation of the object</returns>
56+
public virtual string ToJson()
57+
{
58+
return JsonSerializer.Serialize(this, JsonConfig.Options);
59+
}
60+
61+
/// <summary>
62+
/// Returns true if objects are equal
63+
/// </summary>
64+
/// <param name="obj">Object to be compared</param>
65+
/// <returns>Boolean</returns>
66+
public override bool Equals(object obj)
67+
{
68+
if (obj is not Banner input)
69+
{
70+
return false;
71+
}
72+
73+
return
74+
(Image == input.Image || (Image != null && Image.Equals(input.Image))) &&
75+
(Link == input.Link || (Link != null && Link.Equals(input.Link)));
76+
}
77+
78+
/// <summary>
79+
/// Gets the hash code
80+
/// </summary>
81+
/// <returns>Hash code</returns>
82+
public override int GetHashCode()
83+
{
84+
unchecked // Overflow is fine, just wrap
85+
{
86+
int hashCode = 41;
87+
if (Image != null)
88+
{
89+
hashCode = (hashCode * 59) + Image.GetHashCode();
90+
}
91+
if (Link != null)
92+
{
93+
hashCode = (hashCode * 59) + Link.GetHashCode();
94+
}
95+
return hashCode;
96+
}
97+
}
98+
99+
}
100+
Lines changed: 100 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,100 @@
1+
//
2+
// Code generated by OpenAPI Generator (https://openapi-generator.tech), manual changes will be lost - read more on https://github.com/algolia/api-clients-automation. DO NOT EDIT.
3+
//
4+
using System;
5+
using System.Text;
6+
using System.Linq;
7+
using System.Text.Json.Serialization;
8+
using System.Collections.Generic;
9+
using Algolia.Search.Serializer;
10+
using System.Text.Json;
11+
12+
namespace Algolia.Search.Models.Recommend;
13+
14+
/// <summary>
15+
/// image of a search banner.
16+
/// </summary>
17+
public partial class BannerImage
18+
{
19+
/// <summary>
20+
/// Initializes a new instance of the BannerImage class.
21+
/// </summary>
22+
public BannerImage()
23+
{
24+
}
25+
26+
/// <summary>
27+
/// Gets or Sets Urls
28+
/// </summary>
29+
[JsonPropertyName("urls")]
30+
public BannerImageUrl Urls { get; set; }
31+
32+
/// <summary>
33+
/// Gets or Sets Title
34+
/// </summary>
35+
[JsonPropertyName("title")]
36+
public string Title { get; set; }
37+
38+
/// <summary>
39+
/// Returns the string presentation of the object
40+
/// </summary>
41+
/// <returns>String presentation of the object</returns>
42+
public override string ToString()
43+
{
44+
StringBuilder sb = new StringBuilder();
45+
sb.Append("class BannerImage {\n");
46+
sb.Append(" Urls: ").Append(Urls).Append("\n");
47+
sb.Append(" Title: ").Append(Title).Append("\n");
48+
sb.Append("}\n");
49+
return sb.ToString();
50+
}
51+
52+
/// <summary>
53+
/// Returns the JSON string presentation of the object
54+
/// </summary>
55+
/// <returns>JSON string presentation of the object</returns>
56+
public virtual string ToJson()
57+
{
58+
return JsonSerializer.Serialize(this, JsonConfig.Options);
59+
}
60+
61+
/// <summary>
62+
/// Returns true if objects are equal
63+
/// </summary>
64+
/// <param name="obj">Object to be compared</param>
65+
/// <returns>Boolean</returns>
66+
public override bool Equals(object obj)
67+
{
68+
if (obj is not BannerImage input)
69+
{
70+
return false;
71+
}
72+
73+
return
74+
(Urls == input.Urls || (Urls != null && Urls.Equals(input.Urls))) &&
75+
(Title == input.Title || (Title != null && Title.Equals(input.Title)));
76+
}
77+
78+
/// <summary>
79+
/// Gets the hash code
80+
/// </summary>
81+
/// <returns>Hash code</returns>
82+
public override int GetHashCode()
83+
{
84+
unchecked // Overflow is fine, just wrap
85+
{
86+
int hashCode = 41;
87+
if (Urls != null)
88+
{
89+
hashCode = (hashCode * 59) + Urls.GetHashCode();
90+
}
91+
if (Title != null)
92+
{
93+
hashCode = (hashCode * 59) + Title.GetHashCode();
94+
}
95+
return hashCode;
96+
}
97+
}
98+
99+
}
100+
Lines changed: 88 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,88 @@
1+
//
2+
// Code generated by OpenAPI Generator (https://openapi-generator.tech), manual changes will be lost - read more on https://github.com/algolia/api-clients-automation. DO NOT EDIT.
3+
//
4+
using System;
5+
using System.Text;
6+
using System.Linq;
7+
using System.Text.Json.Serialization;
8+
using System.Collections.Generic;
9+
using Algolia.Search.Serializer;
10+
using System.Text.Json;
11+
12+
namespace Algolia.Search.Models.Recommend;
13+
14+
/// <summary>
15+
/// url for a search banner image.
16+
/// </summary>
17+
public partial class BannerImageUrl
18+
{
19+
/// <summary>
20+
/// Initializes a new instance of the BannerImageUrl class.
21+
/// </summary>
22+
public BannerImageUrl()
23+
{
24+
}
25+
26+
/// <summary>
27+
/// Gets or Sets Url
28+
/// </summary>
29+
[JsonPropertyName("url")]
30+
public string Url { get; set; }
31+
32+
/// <summary>
33+
/// Returns the string presentation of the object
34+
/// </summary>
35+
/// <returns>String presentation of the object</returns>
36+
public override string ToString()
37+
{
38+
StringBuilder sb = new StringBuilder();
39+
sb.Append("class BannerImageUrl {\n");
40+
sb.Append(" Url: ").Append(Url).Append("\n");
41+
sb.Append("}\n");
42+
return sb.ToString();
43+
}
44+
45+
/// <summary>
46+
/// Returns the JSON string presentation of the object
47+
/// </summary>
48+
/// <returns>JSON string presentation of the object</returns>
49+
public virtual string ToJson()
50+
{
51+
return JsonSerializer.Serialize(this, JsonConfig.Options);
52+
}
53+
54+
/// <summary>
55+
/// Returns true if objects are equal
56+
/// </summary>
57+
/// <param name="obj">Object to be compared</param>
58+
/// <returns>Boolean</returns>
59+
public override bool Equals(object obj)
60+
{
61+
if (obj is not BannerImageUrl input)
62+
{
63+
return false;
64+
}
65+
66+
return
67+
(Url == input.Url || (Url != null && Url.Equals(input.Url)));
68+
}
69+
70+
/// <summary>
71+
/// Gets the hash code
72+
/// </summary>
73+
/// <returns>Hash code</returns>
74+
public override int GetHashCode()
75+
{
76+
unchecked // Overflow is fine, just wrap
77+
{
78+
int hashCode = 41;
79+
if (Url != null)
80+
{
81+
hashCode = (hashCode * 59) + Url.GetHashCode();
82+
}
83+
return hashCode;
84+
}
85+
}
86+
87+
}
88+

0 commit comments

Comments
 (0)