Skip to content

Commit 9491108

Browse files
authored
Merge branch 'main' into fix/dio-requester-requestUri
2 parents ba634c1 + b445b9f commit 9491108

File tree

516 files changed

+6750
-11225
lines changed

Some content is hidden

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

516 files changed

+6750
-11225
lines changed

.eslintrc.cjs

Lines changed: 32 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@ module.exports = {
88
'**/dist',
99
'**/target',
1010
'**/.yarn',
11-
'website/specs',
1211
'**/project.packagespec.json',
1312
],
1413

@@ -127,14 +126,42 @@ module.exports = {
127126
],
128127
},
129128
],
130-
'@typescript-eslint/ban-types': [
129+
'@typescript-eslint/no-restricted-types': [
131130
'error',
132131
{
133132
types: {
133+
String: {
134+
message: 'Use `string` instead.',
135+
fixWith: 'string',
136+
},
137+
Number: {
138+
message: 'Use `number` instead.',
139+
fixWith: 'number',
140+
},
141+
Boolean: {
142+
message: 'Use `boolean` instead.',
143+
fixWith: 'boolean',
144+
},
145+
Symbol: {
146+
message: 'Use `symbol` instead.',
147+
fixWith: 'symbol',
148+
},
149+
Object: {
150+
message:
151+
'The `Object` type is mostly the same as `unknown`. You probably want `Record<string, unknown>` instead. See https://github.com/typescript-eslint/typescript-eslint/pull/848',
152+
fixWith: 'Record<string, unknown>',
153+
},
154+
'{}': {
155+
message:
156+
'The `{}` type is mostly the same as `unknown`. You probably want `Record<string, unknown>` instead.',
157+
fixWith: 'Record<string, unknown>',
158+
},
134159
object: {
135-
message: 'Use Record instead',
136-
fixWith: 'Record<string, any>',
160+
message:
161+
'The `object` type is hard to use. Use `Record<string, unknown>` instead. See: https://github.com/typescript-eslint/typescript-eslint/pull/848',
162+
fixWith: 'Record<string, unknown>',
137163
},
164+
Function: 'Use a specific function type instead, like `() => void`.',
138165
},
139166
},
140167
],
@@ -146,15 +173,9 @@ module.exports = {
146173
],
147174
},
148175
},
149-
// JS client rules
150176
{
151177
files: ['clients/algoliasearch-client-javascript/packages/**/*.ts'],
152178

153-
parserOptions: {
154-
tsconfigRootDir: __dirname,
155-
project: './clients/algoliasearch-client-javascript/tsconfig.json',
156-
},
157-
158179
rules: {
159180
// For a wider browser support (IE>=11), we forbid those two
160181
'no-restricted-syntax': [
@@ -171,7 +192,7 @@ module.exports = {
171192
},
172193
],
173194
'@typescript-eslint/prefer-optional-chain': 0,
174-
},
195+
}
175196
},
176197
{
177198
files: ['*.json'],

.github/actions/setup/action.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,7 @@ runs:
114114
if: ${{ inputs.language == 'go' }}
115115
shell: bash
116116
run: |
117-
curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s -- -b $(go env GOPATH)/bin v1.59.0
117+
curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s -- -b $(go env GOPATH)/bin v1.60.3
118118
echo "$(go env GOPATH)/bin" >> $GITHUB_PATH
119119
go install golang.org/x/tools/cmd/goimports@latest
120120

.nvmrc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
20.16.0
1+
22.7.0

.yarn/releases/yarn-4.4.0.cjs renamed to .yarn/releases/yarn-4.4.1.cjs

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

.yarnrc.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,4 +4,4 @@ enableGlobalCache: false
44

55
nodeLinker: node-modules
66

7-
yarnPath: .yarn/releases/yarn-4.4.0.cjs
7+
yarnPath: .yarn/releases/yarn-4.4.1.cjs

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

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -847,6 +847,7 @@ public interface IIngestionClient
847847
/// <param name="itemsPerPage">Number of items per page. (optional, default to 10)</param>
848848
/// <param name="page">Page number of the paginated API response. (optional)</param>
849849
/// <param name="status">Run status for filtering the list of task runs. (optional)</param>
850+
/// <param name="type">Run type for filtering the list of task runs. (optional)</param>
850851
/// <param name="taskID">Task ID for filtering the list of task runs. (optional)</param>
851852
/// <param name="sort">Property by which to sort the list of task runs. (optional)</param>
852853
/// <param name="order">Sort order of the response, ascending or descending. (optional)</param>
@@ -858,14 +859,15 @@ public interface IIngestionClient
858859
/// <exception cref="Algolia.Search.Exceptions.AlgoliaApiException">Thrown when the API call was rejected by Algolia</exception>
859860
/// <exception cref="Algolia.Search.Exceptions.AlgoliaUnreachableHostException">Thrown when the client failed to call the endpoint</exception>
860861
/// <returns>Task of RunListResponse</returns>
861-
Task<RunListResponse> ListRunsAsync(int? itemsPerPage = default, int? page = default, List<RunStatus> status = default, string taskID = default, RunSortKeys? sort = default, OrderKeys? order = default, string startDate = default, string endDate = default, RequestOptions options = null, CancellationToken cancellationToken = default);
862+
Task<RunListResponse> ListRunsAsync(int? itemsPerPage = default, int? page = default, List<RunStatus> status = default, List<RunType> type = default, string taskID = default, RunSortKeys? sort = default, OrderKeys? order = default, string startDate = default, string endDate = default, RequestOptions options = null, CancellationToken cancellationToken = default);
862863

863864
/// <summary>
864865
/// Retrieve a list of task runs. (Synchronous version)
865866
/// </summary>
866867
/// <param name="itemsPerPage">Number of items per page. (optional, default to 10)</param>
867868
/// <param name="page">Page number of the paginated API response. (optional)</param>
868869
/// <param name="status">Run status for filtering the list of task runs. (optional)</param>
870+
/// <param name="type">Run type for filtering the list of task runs. (optional)</param>
869871
/// <param name="taskID">Task ID for filtering the list of task runs. (optional)</param>
870872
/// <param name="sort">Property by which to sort the list of task runs. (optional)</param>
871873
/// <param name="order">Sort order of the response, ascending or descending. (optional)</param>
@@ -877,7 +879,7 @@ public interface IIngestionClient
877879
/// <exception cref="Algolia.Search.Exceptions.AlgoliaApiException">Thrown when the API call was rejected by Algolia</exception>
878880
/// <exception cref="Algolia.Search.Exceptions.AlgoliaUnreachableHostException">Thrown when the client failed to call the endpoint</exception>
879881
/// <returns>RunListResponse</returns>
880-
RunListResponse ListRuns(int? itemsPerPage = default, int? page = default, List<RunStatus> status = default, string taskID = default, RunSortKeys? sort = default, OrderKeys? order = default, string startDate = default, string endDate = default, RequestOptions options = null, CancellationToken cancellationToken = default);
882+
RunListResponse ListRuns(int? itemsPerPage = default, int? page = default, List<RunStatus> status = default, List<RunType> type = default, string taskID = default, RunSortKeys? sort = default, OrderKeys? order = default, string startDate = default, string endDate = default, RequestOptions options = null, CancellationToken cancellationToken = default);
881883

882884
/// <summary>
883885
/// Retrieves a list of sources.
@@ -3153,6 +3155,7 @@ public ListEventsResponse ListEvents(string runID, int? itemsPerPage = default,
31533155
/// <param name="itemsPerPage">Number of items per page. (optional, default to 10)</param>
31543156
/// <param name="page">Page number of the paginated API response. (optional)</param>
31553157
/// <param name="status">Run status for filtering the list of task runs. (optional)</param>
3158+
/// <param name="type">Run type for filtering the list of task runs. (optional)</param>
31563159
/// <param name="taskID">Task ID for filtering the list of task runs. (optional)</param>
31573160
/// <param name="sort">Property by which to sort the list of task runs. (optional)</param>
31583161
/// <param name="order">Sort order of the response, ascending or descending. (optional)</param>
@@ -3164,14 +3167,15 @@ public ListEventsResponse ListEvents(string runID, int? itemsPerPage = default,
31643167
/// <exception cref="Algolia.Search.Exceptions.AlgoliaApiException">Thrown when the API call was rejected by Algolia</exception>
31653168
/// <exception cref="Algolia.Search.Exceptions.AlgoliaUnreachableHostException">Thrown when the client failed to call the endpoint</exception>
31663169
/// <returns>Task of RunListResponse</returns>
3167-
public async Task<RunListResponse> ListRunsAsync(int? itemsPerPage = default, int? page = default, List<RunStatus> status = default, string taskID = default, RunSortKeys? sort = default, OrderKeys? order = default, string startDate = default, string endDate = default, RequestOptions options = null, CancellationToken cancellationToken = default)
3170+
public async Task<RunListResponse> ListRunsAsync(int? itemsPerPage = default, int? page = default, List<RunStatus> status = default, List<RunType> type = default, string taskID = default, RunSortKeys? sort = default, OrderKeys? order = default, string startDate = default, string endDate = default, RequestOptions options = null, CancellationToken cancellationToken = default)
31683171
{
31693172
var requestOptions = new InternalRequestOptions(options);
31703173

31713174

31723175
requestOptions.AddQueryParameter("itemsPerPage", itemsPerPage);
31733176
requestOptions.AddQueryParameter("page", page);
31743177
requestOptions.AddQueryParameter("status", status);
3178+
requestOptions.AddQueryParameter("type", type);
31753179
requestOptions.AddQueryParameter("taskID", taskID);
31763180
requestOptions.AddQueryParameter("sort", sort);
31773181
requestOptions.AddQueryParameter("order", order);
@@ -3192,6 +3196,7 @@ public async Task<RunListResponse> ListRunsAsync(int? itemsPerPage = default, in
31923196
/// <param name="itemsPerPage">Number of items per page. (optional, default to 10)</param>
31933197
/// <param name="page">Page number of the paginated API response. (optional)</param>
31943198
/// <param name="status">Run status for filtering the list of task runs. (optional)</param>
3199+
/// <param name="type">Run type for filtering the list of task runs. (optional)</param>
31953200
/// <param name="taskID">Task ID for filtering the list of task runs. (optional)</param>
31963201
/// <param name="sort">Property by which to sort the list of task runs. (optional)</param>
31973202
/// <param name="order">Sort order of the response, ascending or descending. (optional)</param>
@@ -3203,8 +3208,8 @@ public async Task<RunListResponse> ListRunsAsync(int? itemsPerPage = default, in
32033208
/// <exception cref="Algolia.Search.Exceptions.AlgoliaApiException">Thrown when the API call was rejected by Algolia</exception>
32043209
/// <exception cref="Algolia.Search.Exceptions.AlgoliaUnreachableHostException">Thrown when the client failed to call the endpoint</exception>
32053210
/// <returns>RunListResponse</returns>
3206-
public RunListResponse ListRuns(int? itemsPerPage = default, int? page = default, List<RunStatus> status = default, string taskID = default, RunSortKeys? sort = default, OrderKeys? order = default, string startDate = default, string endDate = default, RequestOptions options = null, CancellationToken cancellationToken = default) =>
3207-
AsyncHelper.RunSync(() => ListRunsAsync(itemsPerPage, page, status, taskID, sort, order, startDate, endDate, options, cancellationToken));
3211+
public RunListResponse ListRuns(int? itemsPerPage = default, int? page = default, List<RunStatus> status = default, List<RunType> type = default, string taskID = default, RunSortKeys? sort = default, OrderKeys? order = default, string startDate = default, string endDate = default, RequestOptions options = null, CancellationToken cancellationToken = default) =>
3212+
AsyncHelper.RunSync(() => ListRunsAsync(itemsPerPage, page, status, type, taskID, sort, order, startDate, endDate, options, cancellationToken));
32083213

32093214

32103215
/// <summary>
Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -14,12 +14,12 @@ namespace Algolia.Search.Models.Analytics;
1414
/// <summary>
1515
/// Currency code.
1616
/// </summary>
17-
public partial class CurrenciesValue
17+
public partial class CurrencyCode
1818
{
1919
/// <summary>
20-
/// Initializes a new instance of the CurrenciesValue class.
20+
/// Initializes a new instance of the CurrencyCode class.
2121
/// </summary>
22-
public CurrenciesValue()
22+
public CurrencyCode()
2323
{
2424
}
2525

@@ -44,7 +44,7 @@ public CurrenciesValue()
4444
public override string ToString()
4545
{
4646
StringBuilder sb = new StringBuilder();
47-
sb.Append("class CurrenciesValue {\n");
47+
sb.Append("class CurrencyCode {\n");
4848
sb.Append(" Currency: ").Append(Currency).Append("\n");
4949
sb.Append(" Revenue: ").Append(Revenue).Append("\n");
5050
sb.Append("}\n");
@@ -67,7 +67,7 @@ public virtual string ToJson()
6767
/// <returns>Boolean</returns>
6868
public override bool Equals(object obj)
6969
{
70-
if (obj is not CurrenciesValue input)
70+
if (obj is not CurrencyCode input)
7171
{
7272
return false;
7373
}

clients/algoliasearch-client-csharp/algoliasearch/Models/Analytics/DailyRevenue.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ public DailyRevenue() { }
2626
/// </summary>
2727
/// <param name="currencies">Revenue associated with this search, broken-down by currencies. (required).</param>
2828
/// <param name="date">Date in the format YYYY-MM-DD. (required).</param>
29-
public DailyRevenue(Dictionary<string, CurrenciesValue> currencies, string date)
29+
public DailyRevenue(Dictionary<string, CurrencyCode> currencies, string date)
3030
{
3131
Currencies = currencies ?? throw new ArgumentNullException(nameof(currencies));
3232
Date = date ?? throw new ArgumentNullException(nameof(date));
@@ -37,7 +37,7 @@ public DailyRevenue(Dictionary<string, CurrenciesValue> currencies, string date)
3737
/// </summary>
3838
/// <value>Revenue associated with this search, broken-down by currencies.</value>
3939
[JsonPropertyName("currencies")]
40-
public Dictionary<string, CurrenciesValue> Currencies { get; set; }
40+
public Dictionary<string, CurrencyCode> Currencies { get; set; }
4141

4242
/// <summary>
4343
/// Date in the format YYYY-MM-DD.

clients/algoliasearch-client-csharp/algoliasearch/Models/Analytics/GetRevenue.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ public GetRevenue() { }
2626
/// </summary>
2727
/// <param name="currencies">Revenue associated with this search, broken-down by currencies. (required).</param>
2828
/// <param name="dates">Daily revenue. (required).</param>
29-
public GetRevenue(Dictionary<string, CurrenciesValue> currencies, List<DailyRevenue> dates)
29+
public GetRevenue(Dictionary<string, CurrencyCode> currencies, List<DailyRevenue> dates)
3030
{
3131
Currencies = currencies ?? throw new ArgumentNullException(nameof(currencies));
3232
Dates = dates ?? throw new ArgumentNullException(nameof(dates));
@@ -37,7 +37,7 @@ public GetRevenue(Dictionary<string, CurrenciesValue> currencies, List<DailyReve
3737
/// </summary>
3838
/// <value>Revenue associated with this search, broken-down by currencies.</value>
3939
[JsonPropertyName("currencies")]
40-
public Dictionary<string, CurrenciesValue> Currencies { get; set; }
40+
public Dictionary<string, CurrencyCode> Currencies { get; set; }
4141

4242
/// <summary>
4343
/// Daily revenue.

clients/algoliasearch-client-csharp/algoliasearch/Models/Analytics/TopHitWithRevenueAnalytics.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ public TopHitWithRevenueAnalytics() { }
3636
/// <param name="purchaseRate">Purchase rate, calculated as number of tracked searches with at least one purchase event divided by the number of tracked searches. If null, Algolia didn&#39;t receive any search requests with &#x60;clickAnalytics&#x60; set to true. (required).</param>
3737
/// <param name="purchaseCount">Number of purchase events from this search. (required) (default to 0).</param>
3838
/// <param name="currencies">Revenue associated with this search, broken-down by currencies. (required).</param>
39-
public TopHitWithRevenueAnalytics(string hit, int count, double? clickThroughRate, double? conversionRate, int trackedHitCount, int clickCount, int conversionCount, double? addToCartRate, int addToCartCount, double? purchaseRate, int purchaseCount, Dictionary<string, CurrenciesValue> currencies)
39+
public TopHitWithRevenueAnalytics(string hit, int count, double? clickThroughRate, double? conversionRate, int trackedHitCount, int clickCount, int conversionCount, double? addToCartRate, int addToCartCount, double? purchaseRate, int purchaseCount, Dictionary<string, CurrencyCode> currencies)
4040
{
4141
Hit = hit ?? throw new ArgumentNullException(nameof(hit));
4242
Count = count;
@@ -134,7 +134,7 @@ public TopHitWithRevenueAnalytics(string hit, int count, double? clickThroughRat
134134
/// </summary>
135135
/// <value>Revenue associated with this search, broken-down by currencies.</value>
136136
[JsonPropertyName("currencies")]
137-
public Dictionary<string, CurrenciesValue> Currencies { get; set; }
137+
public Dictionary<string, CurrencyCode> Currencies { get; set; }
138138

139139
/// <summary>
140140
/// Returns the string presentation of the object

0 commit comments

Comments
 (0)