diff --git a/clients/algoliasearch-client-dart/packages/algoliasearch/pubspec.yaml b/clients/algoliasearch-client-dart/packages/algoliasearch/pubspec.yaml index e41c6de3cdf..04f6561b787 100644 --- a/clients/algoliasearch-client-dart/packages/algoliasearch/pubspec.yaml +++ b/clients/algoliasearch-client-dart/packages/algoliasearch/pubspec.yaml @@ -22,4 +22,4 @@ dev_dependencies: json_serializable: ^6.7.0 lints: ^4.0.0 logging: ^1.2.0 - test: ^1.24.3 \ No newline at end of file + test: ^1.25.8 diff --git a/clients/algoliasearch-client-dart/packages/client_insights/pubspec.yaml b/clients/algoliasearch-client-dart/packages/client_insights/pubspec.yaml index e7592b71808..667198b011d 100644 --- a/clients/algoliasearch-client-dart/packages/client_insights/pubspec.yaml +++ b/clients/algoliasearch-client-dart/packages/client_insights/pubspec.yaml @@ -20,4 +20,4 @@ dev_dependencies: json_serializable: ^6.7.0 lints: ^4.0.0 logging: ^1.2.0 - test: ^1.24.3 \ No newline at end of file + test: ^1.25.8 diff --git a/clients/algoliasearch-client-dart/packages/client_recommend/pubspec.yaml b/clients/algoliasearch-client-dart/packages/client_recommend/pubspec.yaml index 09e218a905c..43c590219d4 100644 --- a/clients/algoliasearch-client-dart/packages/client_recommend/pubspec.yaml +++ b/clients/algoliasearch-client-dart/packages/client_recommend/pubspec.yaml @@ -20,4 +20,4 @@ dev_dependencies: json_serializable: ^6.7.0 lints: ^4.0.0 logging: ^1.2.0 - test: ^1.24.3 \ No newline at end of file + test: ^1.25.8 diff --git a/clients/algoliasearch-client-dart/packages/client_search/pubspec.yaml b/clients/algoliasearch-client-dart/packages/client_search/pubspec.yaml index 2677306d9fb..414954bf2ce 100644 --- a/clients/algoliasearch-client-dart/packages/client_search/pubspec.yaml +++ b/clients/algoliasearch-client-dart/packages/client_search/pubspec.yaml @@ -20,4 +20,4 @@ dev_dependencies: json_serializable: ^6.7.0 lints: ^4.0.0 logging: ^1.2.0 - test: ^1.24.3 \ No newline at end of file + test: ^1.25.8 diff --git a/clients/algoliasearch-client-javascript/packages/monitoring/package.json b/clients/algoliasearch-client-javascript/packages/monitoring/package.json index 3056da3c643..3588d784e7b 100644 --- a/clients/algoliasearch-client-javascript/packages/monitoring/package.json +++ b/clients/algoliasearch-client-javascript/packages/monitoring/package.json @@ -54,10 +54,10 @@ "@algolia/requester-node-http": "5.4.2" }, "devDependencies": { - "@arethetypeswrong/cli": "0.16.2", + "@arethetypeswrong/cli": "0.15.4", "@types/node": "22.5.1", "publint": "0.2.10", - "rollup": "4.21.3", + "rollup": "4.21.2", "tsup": "8.2.4", "typescript": "5.5.4" }, diff --git a/clients/algoliasearch-client-javascript/yarn.lock b/clients/algoliasearch-client-javascript/yarn.lock index 6c7cee06d39..143b3962b53 100644 --- a/clients/algoliasearch-client-javascript/yarn.lock +++ b/clients/algoliasearch-client-javascript/yarn.lock @@ -147,10 +147,10 @@ __metadata: "@algolia/requester-browser-xhr": "npm:5.4.2" "@algolia/requester-fetch": "npm:5.4.2" "@algolia/requester-node-http": "npm:5.4.2" - "@arethetypeswrong/cli": "npm:0.16.2" + "@arethetypeswrong/cli": "npm:0.15.4" "@types/node": "npm:22.5.1" publint: "npm:0.2.10" - rollup: "npm:4.21.3" + rollup: "npm:4.21.2" tsup: "npm:8.2.4" typescript: "npm:5.5.4" languageName: unknown diff --git a/snippets/csharp/src/Abtesting.cs b/snippets/csharp/src/Abtesting.cs index c1c3c74593f..c964dfb36ce 100644 --- a/snippets/csharp/src/Abtesting.cs +++ b/snippets/csharp/src/Abtesting.cs @@ -29,10 +29,8 @@ public async Task SnippetForAbtestingClientAddABTests() Name = "myABTest", Variants = new List { - new AddABTestsVariant( - new AbTestsVariant { Index = "AB_TEST_1", TrafficPercentage = 30, } - ), - new AddABTestsVariant(new AbTestsVariant { Index = "AB_TEST_2", TrafficPercentage = 50, }) + new AddABTestsVariant(new AbTestsVariant { Index = "AB_TEST_1", TrafficPercentage = 30 }), + new AddABTestsVariant(new AbTestsVariant { Index = "AB_TEST_2", TrafficPercentage = 50 }), }, } ); @@ -195,10 +193,8 @@ public async Task SnippetForAbtestingClientScheduleABTest() Name = "myABTest", Variants = new List { - new AddABTestsVariant( - new AbTestsVariant { Index = "AB_TEST_1", TrafficPercentage = 30, } - ), - new AddABTestsVariant(new AbTestsVariant { Index = "AB_TEST_2", TrafficPercentage = 50, }) + new AddABTestsVariant(new AbTestsVariant { Index = "AB_TEST_1", TrafficPercentage = 30 }), + new AddABTestsVariant(new AbTestsVariant { Index = "AB_TEST_2", TrafficPercentage = 50 }), }, } ); diff --git a/snippets/csharp/src/Ingestion.cs b/snippets/csharp/src/Ingestion.cs index 08e45ff4642..13bcb503b03 100644 --- a/snippets/csharp/src/Ingestion.cs +++ b/snippets/csharp/src/Ingestion.cs @@ -60,7 +60,7 @@ public async Task SnippetForIngestionClientCreateDestination() { Type = Enum.Parse("Search"), Name = "destinationName", - Input = new DestinationInput(new DestinationIndexName { IndexName = "", }), + Input = new DestinationInput(new DestinationIndexName { IndexName = "" }), AuthenticationID = "6c02aeb1-775e-418e-870b-1faccd4b2c0f", } ); @@ -149,7 +149,7 @@ public async Task SnippetForIngestionClientCreateTaskV1() SourceID = "search", DestinationID = "destinationName", Trigger = new TaskCreateTrigger( - new OnDemandTriggerInput { Type = Enum.Parse("OnDemand"), } + new OnDemandTriggerInput { Type = Enum.Parse("OnDemand") } ), Action = Enum.Parse("Replace"), } @@ -830,7 +830,7 @@ public async Task SnippetForIngestionClientPushTask() { { "key", "bar" }, { "foo", "1" }, - } + }, }, new PushTaskRecords { @@ -839,8 +839,8 @@ public async Task SnippetForIngestionClientPushTask() { { "key", "baz" }, { "foo", "2" }, - } - } + }, + }, }, } ); @@ -933,7 +933,7 @@ public async Task SnippetForIngestionClientSearchAuthentications() AuthenticationIDs = new List { "6c02aeb1-775e-418e-870b-1faccd4b2c0f", - "947ac9c4-7e58-4c87-b1e7-14a68e99699a" + "947ac9c4-7e58-4c87-b1e7-14a68e99699a", }, } ); @@ -961,7 +961,7 @@ public async Task SnippetForIngestionClientSearchDestinations() DestinationIDs = new List { "6c02aeb1-775e-418e-870b-1faccd4b2c0f", - "947ac9c4-7e58-4c87-b1e7-14a68e99699a" + "947ac9c4-7e58-4c87-b1e7-14a68e99699a", }, } ); @@ -989,7 +989,7 @@ public async Task SnippetForIngestionClientSearchSources() SourceIDs = new List { "6c02aeb1-775e-418e-870b-1faccd4b2c0f", - "947ac9c4-7e58-4c87-b1e7-14a68e99699a" + "947ac9c4-7e58-4c87-b1e7-14a68e99699a", }, } ); @@ -1018,7 +1018,7 @@ public async Task SnippetForIngestionClientSearchTasks() { "6c02aeb1-775e-418e-870b-1faccd4b2c0f", "947ac9c4-7e58-4c87-b1e7-14a68e99699a", - "76ab4c2a-ce17-496f-b7a6-506dc59ee498" + "76ab4c2a-ce17-496f-b7a6-506dc59ee498", }, } ); @@ -1047,7 +1047,7 @@ public async Task SnippetForIngestionClientSearchTasksV1() { "6c02aeb1-775e-418e-870b-1faccd4b2c0f", "947ac9c4-7e58-4c87-b1e7-14a68e99699a", - "76ab4c2a-ce17-496f-b7a6-506dc59ee498" + "76ab4c2a-ce17-496f-b7a6-506dc59ee498", }, } ); @@ -1076,7 +1076,7 @@ public async Task SnippetForIngestionClientSearchTransformations() { "6c02aeb1-775e-418e-870b-1faccd4b2c0f", "947ac9c4-7e58-4c87-b1e7-14a68e99699a", - "76ab4c2a-ce17-496f-b7a6-506dc59ee498" + "76ab4c2a-ce17-496f-b7a6-506dc59ee498", }, } ); @@ -1191,7 +1191,7 @@ public async Task SnippetForIngestionClientUpdateAuthentication() // Call the API var response = await client.UpdateAuthenticationAsync( "6c02aeb1-775e-418e-870b-1faccd4b2c0f", - new AuthenticationUpdate { Name = "newName", } + new AuthenticationUpdate { Name = "newName" } ); // >LOG // SEPARATOR< @@ -1213,7 +1213,7 @@ public async Task SnippetForIngestionClientUpdateDestination() // Call the API var response = await client.UpdateDestinationAsync( "6c02aeb1-775e-418e-870b-1faccd4b2c0f", - new DestinationUpdate { Name = "newName", } + new DestinationUpdate { Name = "newName" } ); // >LOG // SEPARATOR< @@ -1235,7 +1235,7 @@ public async Task SnippetForIngestionClientUpdateSource() // Call the API var response = await client.UpdateSourceAsync( "6c02aeb1-775e-418e-870b-1faccd4b2c0f", - new SourceUpdate { Name = "newName", } + new SourceUpdate { Name = "newName" } ); // >LOG // SEPARATOR< @@ -1257,7 +1257,7 @@ public async Task SnippetForIngestionClientUpdateTask() // Call the API var response = await client.UpdateTaskAsync( "6c02aeb1-775e-418e-870b-1faccd4b2c0f", - new TaskUpdate { Enabled = false, Cron = "* * * * *", } + new TaskUpdate { Enabled = false, Cron = "* * * * *" } ); // >LOG // SEPARATOR< @@ -1279,7 +1279,7 @@ public async Task SnippetForIngestionClientUpdateTaskV1() // Call the API var response = await client.UpdateTaskV1Async( "6c02aeb1-775e-418e-870b-1faccd4b2c0f", - new TaskUpdateV1 { Enabled = false, } + new TaskUpdateV1 { Enabled = false } ); // >LOG // SEPARATOR< @@ -1363,7 +1363,7 @@ public async Task SnippetForIngestionClientValidateSourceBeforeUpdate() // Call the API var response = await client.ValidateSourceBeforeUpdateAsync( "6c02aeb1-775e-418e-870b-1faccd4b2c0f", - new SourceUpdate { Name = "newName", } + new SourceUpdate { Name = "newName" } ); // >LOG // SEPARATOR< diff --git a/snippets/csharp/src/Insights.cs b/snippets/csharp/src/Insights.cs index c6566acc1af..23ffa6f5151 100644 --- a/snippets/csharp/src/Insights.cs +++ b/snippets/csharp/src/Insights.cs @@ -135,7 +135,7 @@ public async Task SnippetForInsightsClientPushEvents() QueryID = "43b15df305339e827f0ac0bdc5ebcaa7", Positions = new List { 7, 6 }, } - ) + ), }, } ); diff --git a/snippets/csharp/src/Personalization.cs b/snippets/csharp/src/Personalization.cs index 7662aed426e..4c89c0533f2 100644 --- a/snippets/csharp/src/Personalization.cs +++ b/snippets/csharp/src/Personalization.cs @@ -184,11 +184,11 @@ public async Task SnippetForPersonalizationClientSetPersonalizationStrategy() Score = 42, EventName = "Algolia", EventType = Enum.Parse("Click"), - } + }, }, FacetScoring = new List { - new FacetScoring { Score = 42, FacetName = "Event", } + new FacetScoring { Score = 42, FacetName = "Event" }, }, PersonalizationImpact = 42, } diff --git a/snippets/csharp/src/QuerySuggestions.cs b/snippets/csharp/src/QuerySuggestions.cs index 6709e509b95..36419de85cb 100644 --- a/snippets/csharp/src/QuerySuggestions.cs +++ b/snippets/csharp/src/QuerySuggestions.cs @@ -31,13 +31,13 @@ public async Task SnippetForQuerySuggestionsClientCreateConfig() new SourceIndex { IndexName = "", - Facets = new List { new Facet { Attribute = "test", } }, + Facets = new List { new Facet { Attribute = "test" } }, Generate = new List> { new List { "facetA", "facetB" }, - new List { "facetC" } + new List { "facetC" }, }, - } + }, }, Languages = new Languages(new List { "french" }), Exclude = new List { "test" }, @@ -260,13 +260,13 @@ public async Task SnippetForQuerySuggestionsClientUpdateConfig() new SourceIndex { IndexName = "", - Facets = new List { new Facet { Attribute = "test", } }, + Facets = new List { new Facet { Attribute = "test" } }, Generate = new List> { new List { "facetA", "facetB" }, - new List { "facetC" } + new List { "facetC" }, }, - } + }, }, Languages = new Languages(new List { "french" }), Exclude = new List { "test" }, diff --git a/snippets/csharp/src/Recommend.cs b/snippets/csharp/src/Recommend.cs index a828e2e264f..1557d13d64a 100644 --- a/snippets/csharp/src/Recommend.cs +++ b/snippets/csharp/src/Recommend.cs @@ -164,7 +164,7 @@ public async Task SnippetForRecommendClientGetRecommendations() Model = Enum.Parse("RelatedProducts"), Threshold = 42.1, } - ) + ), }, } ); diff --git a/snippets/csharp/src/Search.cs b/snippets/csharp/src/Search.cs index 33b09876da2..b2c3450975a 100644 --- a/snippets/csharp/src/Search.cs +++ b/snippets/csharp/src/Search.cs @@ -68,7 +68,7 @@ public async Task SnippetForSearchClientAppendSource() // Call the API var response = await client.AppendSourceAsync( - new Source { VarSource = "theSource", Description = "theDescription", } + new Source { VarSource = "theSource", Description = "theDescription" } ); // >LOG // SEPARATOR< @@ -88,7 +88,7 @@ public async Task SnippetForSearchClientAssignUserId() // Call the API var response = await client.AssignUserIdAsync( "userID", - new AssignUserIdParams { Cluster = "theCluster", } + new AssignUserIdParams { Cluster = "theCluster" } ); // >LOG // SEPARATOR< @@ -121,7 +121,7 @@ public async Task SnippetForSearchClientBatch() { Action = Enum.Parse("AddObject"), Body = new Dictionary { { "key", "baz" }, { "foo", "2" } }, - } + }, }, } ); @@ -151,7 +151,7 @@ public async Task SnippetForSearchClientBatch1() { Action = Enum.Parse("Clear"), Body = new Dictionary { { "key", "value" } }, - } + }, }, } ); @@ -181,7 +181,7 @@ public async Task SnippetForSearchClientBatch2() { Action = Enum.Parse("Delete"), Body = new Dictionary { { "key", "value" } }, - } + }, }, } ); @@ -211,7 +211,7 @@ public async Task SnippetForSearchClientBatch3() { Action = Enum.Parse("DeleteObject"), Body = new Dictionary { { "key", "value" } }, - } + }, }, } ); @@ -241,7 +241,7 @@ public async Task SnippetForSearchClientBatch4() { Action = Enum.Parse("PartialUpdateObject"), Body = new Dictionary { { "key", "value" } }, - } + }, }, } ); @@ -271,7 +271,7 @@ public async Task SnippetForSearchClientBatch5() { Action = Enum.Parse("PartialUpdateObjectNoCreate"), Body = new Dictionary { { "key", "value" } }, - } + }, }, } ); @@ -301,7 +301,7 @@ public async Task SnippetForSearchClientBatch6() { Action = Enum.Parse("UpdateObject"), Body = new Dictionary { { "key", "value" } }, - } + }, }, } ); @@ -364,7 +364,7 @@ public async Task SnippetForSearchClientBatchDictionaryEntries() Decomposition = new List { "trust", "algolia" }, State = Enum.Parse("Enabled"), }, - } + }, }, } ); @@ -394,8 +394,8 @@ public async Task SnippetForSearchClientBatchDictionaryEntries1() new BatchDictionaryEntriesRequest { Action = Enum.Parse("DeleteEntry"), - Body = new DictionaryEntry { ObjectID = "1", }, - } + Body = new DictionaryEntry { ObjectID = "1" }, + }, }, } ); @@ -428,9 +428,9 @@ public async Task SnippetForSearchClientBatchDictionaryEntries2() { ObjectID = "1", Language = Enum.Parse("En"), - AdditionalProperties = new Dictionary { { "additional", "try me" }, } + AdditionalProperties = new Dictionary { { "additional", "try me" } }, }, - } + }, }, } ); @@ -605,7 +605,7 @@ public async Task SnippetForSearchClientDeleteBy() // Call the API var response = await client.DeleteByAsync( "", - new DeleteByParams { Filters = "brand:brandName", } + new DeleteByParams { Filters = "brand:brandName" } ); // >LOG // SEPARATOR< @@ -904,7 +904,7 @@ public async Task SnippetForSearchClientGetObjects() AttributesToRetrieve = new List { "attr1", "attr2" }, ObjectID = "uniqueID", IndexName = "", - } + }, }, } ); @@ -1189,7 +1189,7 @@ public async Task SnippetForSearchClientMultipleBatch() Action = Enum.Parse("AddObject"), Body = new Dictionary { { "key", "value" } }, IndexName = "", - } + }, }, } ); @@ -1218,7 +1218,7 @@ public async Task SnippetForSearchClientOperationIndex() Scope = new List { Enum.Parse("Rules"), - Enum.Parse("Settings") + Enum.Parse("Settings"), }, } ); @@ -1312,7 +1312,7 @@ public async Task SnippetForSearchClientPartialUpdateObjects() new List { new Dictionary { { "objectID", "1" }, { "name", "Adam" } }, - new Dictionary { { "objectID", "2" }, { "name", "Benoit" } } + new Dictionary { { "objectID", "2" }, { "name", "Benoit" } }, }, true ); @@ -1337,7 +1337,7 @@ public async Task SnippetForSearchClientPartialUpdateObjects1() new List { new Dictionary { { "objectID", "3" }, { "name", "Cyril" } }, - new Dictionary { { "objectID", "4" }, { "name", "David" } } + new Dictionary { { "objectID", "4" }, { "name", "David" } }, }, false ); @@ -1387,7 +1387,7 @@ public async Task SnippetForSearchClientReplaceAllObjects() new Dictionary { { "objectID", "7" }, { "name", "Gael" } }, new Dictionary { { "objectID", "8" }, { "name", "Hugo" } }, new Dictionary { { "objectID", "9" }, { "name", "Igor" } }, - new Dictionary { { "objectID", "10" }, { "name", "Julia" } } + new Dictionary { { "objectID", "10" }, { "name", "Julia" } }, }, 3 ); @@ -1410,7 +1410,7 @@ public async Task SnippetForSearchClientReplaceSources() var response = await client.ReplaceSourcesAsync( new List { - new Source { VarSource = "theSource", Description = "theDescription", } + new Source { VarSource = "theSource", Description = "theDescription" }, } ); // >LOG @@ -1471,7 +1471,7 @@ public async Task SnippetForSearchClientSaveObjects() new List { new Dictionary { { "objectID", "1" }, { "name", "Adam" } }, - new Dictionary { { "objectID", "2" }, { "name", "Benoit" } } + new Dictionary { { "objectID", "2" }, { "name", "Benoit" } }, } ); // >LOG @@ -1495,7 +1495,7 @@ public async Task SnippetForSearchClientSaveObjects1() new List { new Dictionary { { "objectID", "1" }, { "name", "Adam" } }, - new Dictionary { { "objectID", "2" }, { "name", "Benoit" } } + new Dictionary { { "objectID", "2" }, { "name", "Benoit" } }, } ); // >LOG @@ -1522,7 +1522,7 @@ public async Task SnippetForSearchClientSaveRule() ObjectID = "id1", Conditions = new List { - new Condition { Pattern = "apple", Anchoring = Enum.Parse("Contains"), } + new Condition { Pattern = "apple", Anchoring = Enum.Parse("Contains") }, }, } ); @@ -1551,7 +1551,7 @@ public async Task SnippetForSearchClientSaveRules() ObjectID = "a-rule-id", Conditions = new List { - new Condition { Pattern = "smartphone", Anchoring = Enum.Parse("Contains"), } + new Condition { Pattern = "smartphone", Anchoring = Enum.Parse("Contains") }, }, }, new Rule @@ -1559,9 +1559,9 @@ public async Task SnippetForSearchClientSaveRules() ObjectID = "a-second-rule-id", Conditions = new List { - new Condition { Pattern = "apple", Anchoring = Enum.Parse("Contains"), } + new Condition { Pattern = "apple", Anchoring = Enum.Parse("Contains") }, }, - } + }, }, false, true @@ -1625,7 +1625,7 @@ public async Task SnippetForSearchClientSaveSynonyms() Type = Enum.Parse("Onewaysynonym"), Input = "iphone", Synonyms = new List { "ephone", "aphone", "yphone" }, - } + }, }, true, true @@ -1658,7 +1658,7 @@ public async Task SnippetForSearchClientSearch() Query = "", HitsPerPage = 50, } - ) + ), }, } ); @@ -1690,7 +1690,7 @@ public async Task SnippetForSearchClientSearch1() Query = "", Filters = "actor:Scarlett Johansson", } - ) + ), }, } ); @@ -1722,7 +1722,7 @@ public async Task SnippetForSearchClientSearch2() Query = "", Filters = "actor:Tom Cruise OR actor:Scarlett Johansson", } - ) + ), }, } ); @@ -1754,7 +1754,7 @@ public async Task SnippetForSearchClientSearch3() Query = "", Filters = "NOT actor:Nicolas Cage", } - ) + ), }, } ); @@ -1786,7 +1786,7 @@ public async Task SnippetForSearchClientSearch4() Query = "", Facets = new List { "author", "genre" }, } - ) + ), }, } ); @@ -1818,7 +1818,7 @@ public async Task SnippetForSearchClientSearch5() Query = "", Facets = new List { "*" }, } - ) + ), }, } ); @@ -1840,7 +1840,7 @@ public async Task SnippetForSearchClientSearchDictionaryEntries() // Call the API var response = await client.SearchDictionaryEntriesAsync( Enum.Parse("Stopwords"), - new SearchDictionaryEntriesParams { Query = "about", } + new SearchDictionaryEntriesParams { Query = "about" } ); // >LOG // SEPARATOR< @@ -1877,7 +1877,7 @@ public async Task SnippetForSearchClientSearchRules() // Call the API var response = await client.SearchRulesAsync( "", - new SearchRulesParams { Query = "zorro", } + new SearchRulesParams { Query = "zorro" } ); // >LOG // SEPARATOR< @@ -1980,7 +1980,7 @@ public async Task SnippetForSearchClientSetDictionarySettings() { { "fr", false }, { "en", false }, - { "ru", true } + { "ru", true }, }, }, } @@ -2009,7 +2009,7 @@ public async Task SnippetForSearchClientSetSettings() { "actor", "filterOnly(category)", - "searchable(publisher)" + "searchable(publisher)", }, } ); @@ -2085,7 +2085,7 @@ public async Task SnippetForSearchClientWaitForApiKey1() { Enum.Parse("Search"), Enum.Parse("AddObject"), - Enum.Parse("DeleteObject") + Enum.Parse("DeleteObject"), }, Indexes = new List { "Movies", "Books" }, Referers = new List { "*google.com", "*algolia.com" }, diff --git a/snippets/guides/abtesting-snippets.json b/snippets/guides/abtesting-snippets.json index 510ee23f45b..4e61c495e45 100644 --- a/snippets/guides/abtesting-snippets.json +++ b/snippets/guides/abtesting-snippets.json @@ -4,7 +4,7 @@ "default": "using Algolia.Search.Clients;\nusing Algolia.Search.Http;" }, "addABTests": { - "default": "var response = await client.AddABTestsAsync(\n new AddABTestsRequest\n {\n EndAt = \"2022-12-31T00:00:00.000Z\",\n Name = \"myABTest\",\n Variants = new List\n {\n new AddABTestsVariant(\n new AbTestsVariant { Index = \"AB_TEST_1\", TrafficPercentage = 30, }\n ),\n new AddABTestsVariant(new AbTestsVariant { Index = \"AB_TEST_2\", TrafficPercentage = 50, })\n },\n }\n);" + "default": "var response = await client.AddABTestsAsync(\n new AddABTestsRequest\n {\n EndAt = \"2022-12-31T00:00:00.000Z\",\n Name = \"myABTest\",\n Variants = new List\n {\n new AddABTestsVariant(new AbTestsVariant { Index = \"AB_TEST_1\", TrafficPercentage = 30 }),\n new AddABTestsVariant(new AbTestsVariant { Index = \"AB_TEST_2\", TrafficPercentage = 50 }),\n },\n }\n);" }, "customDelete": { "default": "var response = await client.CustomDeleteAsync(\"test/minimal\");" @@ -28,7 +28,7 @@ "default": "var response = await client.ListABTestsAsync();" }, "scheduleABTest": { - "default": "var response = await client.ScheduleABTestAsync(\n new ScheduleABTestsRequest\n {\n EndAt = \"2022-12-31T00:00:00.000Z\",\n ScheduledAt = \"2022-11-31T00:00:00.000Z\",\n Name = \"myABTest\",\n Variants = new List\n {\n new AddABTestsVariant(\n new AbTestsVariant { Index = \"AB_TEST_1\", TrafficPercentage = 30, }\n ),\n new AddABTestsVariant(new AbTestsVariant { Index = \"AB_TEST_2\", TrafficPercentage = 50, })\n },\n }\n);" + "default": "var response = await client.ScheduleABTestAsync(\n new ScheduleABTestsRequest\n {\n EndAt = \"2022-12-31T00:00:00.000Z\",\n ScheduledAt = \"2022-11-31T00:00:00.000Z\",\n Name = \"myABTest\",\n Variants = new List\n {\n new AddABTestsVariant(new AbTestsVariant { Index = \"AB_TEST_1\", TrafficPercentage = 30 }),\n new AddABTestsVariant(new AbTestsVariant { Index = \"AB_TEST_2\", TrafficPercentage = 50 }),\n },\n }\n);" }, "setClientApiKey": { "default": "client.SetClientApiKey(\"updated-api-key\");" diff --git a/snippets/guides/ingestion-snippets.json b/snippets/guides/ingestion-snippets.json index 65da9d19a60..1edd4f24ad1 100644 --- a/snippets/guides/ingestion-snippets.json +++ b/snippets/guides/ingestion-snippets.json @@ -7,7 +7,7 @@ "default": "var response = await client.CreateAuthenticationAsync(\n new AuthenticationCreate\n {\n Type = Enum.Parse(\"Oauth\"),\n Name = \"authName\",\n Input = new AuthInput(\n new AuthOAuth\n {\n Url = \"http://test.oauth\",\n ClientId = \"myID\",\n ClientSecret = \"mySecret\",\n }\n ),\n }\n);" }, "createDestination": { - "default": "var response = await client.CreateDestinationAsync(\n new DestinationCreate\n {\n Type = Enum.Parse(\"Search\"),\n Name = \"destinationName\",\n Input = new DestinationInput(new DestinationIndexName { IndexName = \"\", }),\n AuthenticationID = \"6c02aeb1-775e-418e-870b-1faccd4b2c0f\",\n }\n);" + "default": "var response = await client.CreateDestinationAsync(\n new DestinationCreate\n {\n Type = Enum.Parse(\"Search\"),\n Name = \"destinationName\",\n Input = new DestinationInput(new DestinationIndexName { IndexName = \"\" }),\n AuthenticationID = \"6c02aeb1-775e-418e-870b-1faccd4b2c0f\",\n }\n);" }, "createSource": { "default": "var response = await client.CreateSourceAsync(\n new SourceCreate\n {\n Type = Enum.Parse(\"Commercetools\"),\n Name = \"sourceName\",\n Input = new SourceInput(\n new SourceCommercetools\n {\n StoreKeys = new List { \"myStore\" },\n Locales = new List { \"de\" },\n Url = \"http://commercetools.com\",\n ProjectKey = \"keyID\",\n }\n ),\n AuthenticationID = \"6c02aeb1-775e-418e-870b-1faccd4b2c0f\",\n }\n);" @@ -16,7 +16,7 @@ "default": "var response = await client.CreateTaskAsync(\n new TaskCreate\n {\n SourceID = \"search\",\n DestinationID = \"destinationName\",\n Action = Enum.Parse(\"Replace\"),\n }\n);" }, "createTaskV1": { - "default": "var response = await client.CreateTaskV1Async(\n new TaskCreateV1\n {\n SourceID = \"search\",\n DestinationID = \"destinationName\",\n Trigger = new TaskCreateTrigger(\n new OnDemandTriggerInput { Type = Enum.Parse(\"OnDemand\"), }\n ),\n Action = Enum.Parse(\"Replace\"),\n }\n);" + "default": "var response = await client.CreateTaskV1Async(\n new TaskCreateV1\n {\n SourceID = \"search\",\n DestinationID = \"destinationName\",\n Trigger = new TaskCreateTrigger(\n new OnDemandTriggerInput { Type = Enum.Parse(\"OnDemand\") }\n ),\n Action = Enum.Parse(\"Replace\"),\n }\n);" }, "createTransformation": { "default": "var response = await client.CreateTransformationAsync(\n new TransformationCreate\n {\n Code = \"foo\",\n Name = \"bar\",\n Description = \"baz\",\n }\n);" @@ -118,7 +118,7 @@ "default": "var response = await client.ListTransformationsAsync();" }, "pushTask": { - "default": "var response = await client.PushTaskAsync(\n \"6c02aeb1-775e-418e-870b-1faccd4b2c0f\",\n new PushTaskPayload\n {\n Action = Enum.Parse(\"AddObject\"),\n Records = new List\n {\n new PushTaskRecords\n {\n ObjectID = \"o\",\n AdditionalProperties = new Dictionary\n {\n { \"key\", \"bar\" },\n { \"foo\", \"1\" },\n }\n },\n new PushTaskRecords\n {\n ObjectID = \"k\",\n AdditionalProperties = new Dictionary\n {\n { \"key\", \"baz\" },\n { \"foo\", \"2\" },\n }\n }\n },\n }\n);" + "default": "var response = await client.PushTaskAsync(\n \"6c02aeb1-775e-418e-870b-1faccd4b2c0f\",\n new PushTaskPayload\n {\n Action = Enum.Parse(\"AddObject\"),\n Records = new List\n {\n new PushTaskRecords\n {\n ObjectID = \"o\",\n AdditionalProperties = new Dictionary\n {\n { \"key\", \"bar\" },\n { \"foo\", \"1\" },\n },\n },\n new PushTaskRecords\n {\n ObjectID = \"k\",\n AdditionalProperties = new Dictionary\n {\n { \"key\", \"baz\" },\n { \"foo\", \"2\" },\n },\n },\n },\n }\n);" }, "runSource": { "default": "var response = await client.RunSourceAsync(\n \"6c02aeb1-775e-418e-870b-1faccd4b2c0f\",\n new RunSourcePayload\n {\n IndexToInclude = new List { \"products_us\", \"products eu\" },\n EntityIDs = new List { \"1234\", \"5678\" },\n EntityType = Enum.Parse(\"Product\"),\n }\n);" @@ -130,22 +130,22 @@ "default": "var response = await client.RunTaskV1Async(\"6c02aeb1-775e-418e-870b-1faccd4b2c0f\");" }, "searchAuthentications": { - "default": "var response = await client.SearchAuthenticationsAsync(\n new AuthenticationSearch\n {\n AuthenticationIDs = new List\n {\n \"6c02aeb1-775e-418e-870b-1faccd4b2c0f\",\n \"947ac9c4-7e58-4c87-b1e7-14a68e99699a\"\n },\n }\n);" + "default": "var response = await client.SearchAuthenticationsAsync(\n new AuthenticationSearch\n {\n AuthenticationIDs = new List\n {\n \"6c02aeb1-775e-418e-870b-1faccd4b2c0f\",\n \"947ac9c4-7e58-4c87-b1e7-14a68e99699a\",\n },\n }\n);" }, "searchDestinations": { - "default": "var response = await client.SearchDestinationsAsync(\n new DestinationSearch\n {\n DestinationIDs = new List\n {\n \"6c02aeb1-775e-418e-870b-1faccd4b2c0f\",\n \"947ac9c4-7e58-4c87-b1e7-14a68e99699a\"\n },\n }\n);" + "default": "var response = await client.SearchDestinationsAsync(\n new DestinationSearch\n {\n DestinationIDs = new List\n {\n \"6c02aeb1-775e-418e-870b-1faccd4b2c0f\",\n \"947ac9c4-7e58-4c87-b1e7-14a68e99699a\",\n },\n }\n);" }, "searchSources": { - "default": "var response = await client.SearchSourcesAsync(\n new SourceSearch\n {\n SourceIDs = new List\n {\n \"6c02aeb1-775e-418e-870b-1faccd4b2c0f\",\n \"947ac9c4-7e58-4c87-b1e7-14a68e99699a\"\n },\n }\n);" + "default": "var response = await client.SearchSourcesAsync(\n new SourceSearch\n {\n SourceIDs = new List\n {\n \"6c02aeb1-775e-418e-870b-1faccd4b2c0f\",\n \"947ac9c4-7e58-4c87-b1e7-14a68e99699a\",\n },\n }\n);" }, "searchTasks": { - "default": "var response = await client.SearchTasksAsync(\n new TaskSearch\n {\n TaskIDs = new List\n {\n \"6c02aeb1-775e-418e-870b-1faccd4b2c0f\",\n \"947ac9c4-7e58-4c87-b1e7-14a68e99699a\",\n \"76ab4c2a-ce17-496f-b7a6-506dc59ee498\"\n },\n }\n);" + "default": "var response = await client.SearchTasksAsync(\n new TaskSearch\n {\n TaskIDs = new List\n {\n \"6c02aeb1-775e-418e-870b-1faccd4b2c0f\",\n \"947ac9c4-7e58-4c87-b1e7-14a68e99699a\",\n \"76ab4c2a-ce17-496f-b7a6-506dc59ee498\",\n },\n }\n);" }, "searchTasksV1": { - "default": "var response = await client.SearchTasksV1Async(\n new TaskSearch\n {\n TaskIDs = new List\n {\n \"6c02aeb1-775e-418e-870b-1faccd4b2c0f\",\n \"947ac9c4-7e58-4c87-b1e7-14a68e99699a\",\n \"76ab4c2a-ce17-496f-b7a6-506dc59ee498\"\n },\n }\n);" + "default": "var response = await client.SearchTasksV1Async(\n new TaskSearch\n {\n TaskIDs = new List\n {\n \"6c02aeb1-775e-418e-870b-1faccd4b2c0f\",\n \"947ac9c4-7e58-4c87-b1e7-14a68e99699a\",\n \"76ab4c2a-ce17-496f-b7a6-506dc59ee498\",\n },\n }\n);" }, "searchTransformations": { - "default": "var response = await client.SearchTransformationsAsync(\n new TransformationSearch\n {\n TransformationIDs = new List\n {\n \"6c02aeb1-775e-418e-870b-1faccd4b2c0f\",\n \"947ac9c4-7e58-4c87-b1e7-14a68e99699a\",\n \"76ab4c2a-ce17-496f-b7a6-506dc59ee498\"\n },\n }\n);" + "default": "var response = await client.SearchTransformationsAsync(\n new TransformationSearch\n {\n TransformationIDs = new List\n {\n \"6c02aeb1-775e-418e-870b-1faccd4b2c0f\",\n \"947ac9c4-7e58-4c87-b1e7-14a68e99699a\",\n \"76ab4c2a-ce17-496f-b7a6-506dc59ee498\",\n },\n }\n);" }, "setClientApiKey": { "default": "client.SetClientApiKey(\"updated-api-key\");" @@ -160,19 +160,19 @@ "default": "var response = await client.TryTransformationBeforeUpdateAsync(\n \"6c02aeb1-775e-418e-870b-1faccd4b2c0f\",\n new TransformationTry\n {\n Code = \"foo\",\n SampleRecord = new Dictionary { { \"bar\", \"baz\" } },\n }\n);" }, "updateAuthentication": { - "default": "var response = await client.UpdateAuthenticationAsync(\n \"6c02aeb1-775e-418e-870b-1faccd4b2c0f\",\n new AuthenticationUpdate { Name = \"newName\", }\n);" + "default": "var response = await client.UpdateAuthenticationAsync(\n \"6c02aeb1-775e-418e-870b-1faccd4b2c0f\",\n new AuthenticationUpdate { Name = \"newName\" }\n);" }, "updateDestination": { - "default": "var response = await client.UpdateDestinationAsync(\n \"6c02aeb1-775e-418e-870b-1faccd4b2c0f\",\n new DestinationUpdate { Name = \"newName\", }\n);" + "default": "var response = await client.UpdateDestinationAsync(\n \"6c02aeb1-775e-418e-870b-1faccd4b2c0f\",\n new DestinationUpdate { Name = \"newName\" }\n);" }, "updateSource": { - "default": "var response = await client.UpdateSourceAsync(\n \"6c02aeb1-775e-418e-870b-1faccd4b2c0f\",\n new SourceUpdate { Name = \"newName\", }\n);" + "default": "var response = await client.UpdateSourceAsync(\n \"6c02aeb1-775e-418e-870b-1faccd4b2c0f\",\n new SourceUpdate { Name = \"newName\" }\n);" }, "updateTask": { - "default": "var response = await client.UpdateTaskAsync(\n \"6c02aeb1-775e-418e-870b-1faccd4b2c0f\",\n new TaskUpdate { Enabled = false, Cron = \"* * * * *\", }\n);" + "default": "var response = await client.UpdateTaskAsync(\n \"6c02aeb1-775e-418e-870b-1faccd4b2c0f\",\n new TaskUpdate { Enabled = false, Cron = \"* * * * *\" }\n);" }, "updateTaskV1": { - "default": "var response = await client.UpdateTaskV1Async(\n \"6c02aeb1-775e-418e-870b-1faccd4b2c0f\",\n new TaskUpdateV1 { Enabled = false, }\n);" + "default": "var response = await client.UpdateTaskV1Async(\n \"6c02aeb1-775e-418e-870b-1faccd4b2c0f\",\n new TaskUpdateV1 { Enabled = false }\n);" }, "updateTransformation": { "default": "var response = await client.UpdateTransformationAsync(\n \"6c02aeb1-775e-418e-870b-1faccd4b2c0f\",\n new TransformationCreate\n {\n Code = \"foo\",\n Name = \"bar\",\n Description = \"baz\",\n }\n);" @@ -181,7 +181,7 @@ "default": "var response = await client.ValidateSourceAsync(\n new SourceCreate\n {\n Type = Enum.Parse(\"Commercetools\"),\n Name = \"sourceName\",\n Input = new SourceInput(\n new SourceCommercetools\n {\n StoreKeys = new List { \"myStore\" },\n Locales = new List { \"de\" },\n Url = \"http://commercetools.com\",\n ProjectKey = \"keyID\",\n }\n ),\n AuthenticationID = \"6c02aeb1-775e-418e-870b-1faccd4b2c0f\",\n }\n);" }, "validateSourceBeforeUpdate": { - "default": "var response = await client.ValidateSourceBeforeUpdateAsync(\n \"6c02aeb1-775e-418e-870b-1faccd4b2c0f\",\n new SourceUpdate { Name = \"newName\", }\n);" + "default": "var response = await client.ValidateSourceBeforeUpdateAsync(\n \"6c02aeb1-775e-418e-870b-1faccd4b2c0f\",\n new SourceUpdate { Name = \"newName\" }\n);" }, "init": { "default": "var client = new IngestionClient(" diff --git a/snippets/guides/insights-snippets.json b/snippets/guides/insights-snippets.json index bafbfe8528b..b97f8aee677 100644 --- a/snippets/guides/insights-snippets.json +++ b/snippets/guides/insights-snippets.json @@ -19,7 +19,7 @@ "default": "await client.DeleteUserTokenAsync(\"test-user-1\");" }, "pushEvents": { - "default": "var response = await client.PushEventsAsync(\n new InsightsEvents\n {\n Events = new List\n {\n new EventsItems(\n new ClickedObjectIDsAfterSearch\n {\n EventType = Enum.Parse(\"Click\"),\n EventName = \"Product Clicked\",\n Index = \"products\",\n UserToken = \"user-123456\",\n AuthenticatedUserToken = \"user-123456\",\n Timestamp = 1641290601962L,\n ObjectIDs = new List { \"9780545139700\", \"9780439784542\" },\n QueryID = \"43b15df305339e827f0ac0bdc5ebcaa7\",\n Positions = new List { 7, 6 },\n }\n )\n },\n }\n);" + "default": "var response = await client.PushEventsAsync(\n new InsightsEvents\n {\n Events = new List\n {\n new EventsItems(\n new ClickedObjectIDsAfterSearch\n {\n EventType = Enum.Parse(\"Click\"),\n EventName = \"Product Clicked\",\n Index = \"products\",\n UserToken = \"user-123456\",\n AuthenticatedUserToken = \"user-123456\",\n Timestamp = 1641290601962L,\n ObjectIDs = new List { \"9780545139700\", \"9780439784542\" },\n QueryID = \"43b15df305339e827f0ac0bdc5ebcaa7\",\n Positions = new List { 7, 6 },\n }\n ),\n },\n }\n);" }, "setClientApiKey": { "default": "client.SetClientApiKey(\"updated-api-key\");" diff --git a/snippets/guides/personalization-snippets.json b/snippets/guides/personalization-snippets.json index 9f6cc06a79c..1fdf00cbc82 100644 --- a/snippets/guides/personalization-snippets.json +++ b/snippets/guides/personalization-snippets.json @@ -28,7 +28,7 @@ "default": "client.SetClientApiKey(\"updated-api-key\");" }, "setPersonalizationStrategy": { - "default": "var response = await client.SetPersonalizationStrategyAsync(\n new PersonalizationStrategyParams\n {\n EventScoring = new List\n {\n new EventScoring\n {\n Score = 42,\n EventName = \"Algolia\",\n EventType = Enum.Parse(\"Click\"),\n }\n },\n FacetScoring = new List\n {\n new FacetScoring { Score = 42, FacetName = \"Event\", }\n },\n PersonalizationImpact = 42,\n }\n);" + "default": "var response = await client.SetPersonalizationStrategyAsync(\n new PersonalizationStrategyParams\n {\n EventScoring = new List\n {\n new EventScoring\n {\n Score = 42,\n EventName = \"Algolia\",\n EventType = Enum.Parse(\"Click\"),\n },\n },\n FacetScoring = new List\n {\n new FacetScoring { Score = 42, FacetName = \"Event\" },\n },\n PersonalizationImpact = 42,\n }\n);" }, "init": { "default": "var client = new PersonalizationClient(" diff --git a/snippets/guides/query-suggestions-snippets.json b/snippets/guides/query-suggestions-snippets.json index 3df1f5df0cf..8e698815d2c 100644 --- a/snippets/guides/query-suggestions-snippets.json +++ b/snippets/guides/query-suggestions-snippets.json @@ -4,7 +4,7 @@ "default": "using Algolia.Search.Clients;\nusing Algolia.Search.Http;" }, "createConfig": { - "default": "var response = await client.CreateConfigAsync(\n new ConfigurationWithIndex\n {\n IndexName = \"\",\n SourceIndices = new List\n {\n new SourceIndex\n {\n IndexName = \"\",\n Facets = new List { new Facet { Attribute = \"test\", } },\n Generate = new List>\n {\n new List { \"facetA\", \"facetB\" },\n new List { \"facetC\" }\n },\n }\n },\n Languages = new Languages(new List { \"french\" }),\n Exclude = new List { \"test\" },\n }\n);" + "default": "var response = await client.CreateConfigAsync(\n new ConfigurationWithIndex\n {\n IndexName = \"\",\n SourceIndices = new List\n {\n new SourceIndex\n {\n IndexName = \"\",\n Facets = new List { new Facet { Attribute = \"test\" } },\n Generate = new List>\n {\n new List { \"facetA\", \"facetB\" },\n new List { \"facetC\" },\n },\n },\n },\n Languages = new Languages(new List { \"french\" }),\n Exclude = new List { \"test\" },\n }\n);" }, "customDelete": { "default": "var response = await client.CustomDeleteAsync(\"test/minimal\");" @@ -37,7 +37,7 @@ "default": "client.SetClientApiKey(\"updated-api-key\");" }, "updateConfig": { - "default": "var response = await client.UpdateConfigAsync(\n \"\",\n new Configuration\n {\n SourceIndices = new List\n {\n new SourceIndex\n {\n IndexName = \"\",\n Facets = new List { new Facet { Attribute = \"test\", } },\n Generate = new List>\n {\n new List { \"facetA\", \"facetB\" },\n new List { \"facetC\" }\n },\n }\n },\n Languages = new Languages(new List { \"french\" }),\n Exclude = new List { \"test\" },\n }\n);" + "default": "var response = await client.UpdateConfigAsync(\n \"\",\n new Configuration\n {\n SourceIndices = new List\n {\n new SourceIndex\n {\n IndexName = \"\",\n Facets = new List { new Facet { Attribute = \"test\" } },\n Generate = new List>\n {\n new List { \"facetA\", \"facetB\" },\n new List { \"facetC\" },\n },\n },\n },\n Languages = new Languages(new List { \"french\" }),\n Exclude = new List { \"test\" },\n }\n);" }, "init": { "default": "var client = new QuerySuggestionsClient(" diff --git a/snippets/guides/recommend-snippets.json b/snippets/guides/recommend-snippets.json index 6d8ef693fef..d4285124dc5 100644 --- a/snippets/guides/recommend-snippets.json +++ b/snippets/guides/recommend-snippets.json @@ -25,7 +25,7 @@ "default": "var response = await client.GetRecommendStatusAsync(\n \"\",\n Enum.Parse(\"RelatedProducts\"),\n 12345L\n);" }, "getRecommendations": { - "default": "var response = await client.GetRecommendationsAsync(\n new GetRecommendationsParams\n {\n Requests = new List\n {\n new RecommendationsRequest(\n new RelatedQuery\n {\n IndexName = \"\",\n ObjectID = \"objectID\",\n Model = Enum.Parse(\"RelatedProducts\"),\n Threshold = 42.1,\n }\n )\n },\n }\n);" + "default": "var response = await client.GetRecommendationsAsync(\n new GetRecommendationsParams\n {\n Requests = new List\n {\n new RecommendationsRequest(\n new RelatedQuery\n {\n IndexName = \"\",\n ObjectID = \"objectID\",\n Model = Enum.Parse(\"RelatedProducts\"),\n Threshold = 42.1,\n }\n ),\n },\n }\n);" }, "searchRecommendRules": { "default": "var response = await client.SearchRecommendRulesAsync(\n \"\",\n Enum.Parse(\"RelatedProducts\")\n);" diff --git a/snippets/guides/search-snippets.json b/snippets/guides/search-snippets.json index 29cfaa207d9..645207266cb 100644 --- a/snippets/guides/search-snippets.json +++ b/snippets/guides/search-snippets.json @@ -10,27 +10,27 @@ "default": "var response = await client.AddOrUpdateObjectAsync(\n \"\",\n \"uniqueID\",\n new Dictionary { { \"key\", \"value\" } }\n);" }, "appendSource": { - "default": "var response = await client.AppendSourceAsync(\n new Source { VarSource = \"theSource\", Description = \"theDescription\", }\n);" + "default": "var response = await client.AppendSourceAsync(\n new Source { VarSource = \"theSource\", Description = \"theDescription\" }\n);" }, "assignUserId": { - "default": "var response = await client.AssignUserIdAsync(\n \"userID\",\n new AssignUserIdParams { Cluster = \"theCluster\", }\n);" + "default": "var response = await client.AssignUserIdAsync(\n \"userID\",\n new AssignUserIdParams { Cluster = \"theCluster\" }\n);" }, "batch": { - "addObject": "var response = await client.BatchAsync(\n \"\",\n new BatchWriteParams\n {\n Requests = new List\n {\n new BatchRequest\n {\n Action = Enum.Parse(\"AddObject\"),\n Body = new Dictionary { { \"key\", \"bar\" }, { \"foo\", \"1\" } },\n },\n new BatchRequest\n {\n Action = Enum.Parse(\"AddObject\"),\n Body = new Dictionary { { \"key\", \"baz\" }, { \"foo\", \"2\" } },\n }\n },\n }\n);", - "clear": "var response = await client.BatchAsync(\n \"\",\n new BatchWriteParams\n {\n Requests = new List\n {\n new BatchRequest\n {\n Action = Enum.Parse(\"Clear\"),\n Body = new Dictionary { { \"key\", \"value\" } },\n }\n },\n }\n);", - "delete": "var response = await client.BatchAsync(\n \"\",\n new BatchWriteParams\n {\n Requests = new List\n {\n new BatchRequest\n {\n Action = Enum.Parse(\"Delete\"),\n Body = new Dictionary { { \"key\", \"value\" } },\n }\n },\n }\n);", - "deleteObject": "var response = await client.BatchAsync(\n \"\",\n new BatchWriteParams\n {\n Requests = new List\n {\n new BatchRequest\n {\n Action = Enum.Parse(\"DeleteObject\"),\n Body = new Dictionary { { \"key\", \"value\" } },\n }\n },\n }\n);", - "partialUpdateObject": "var response = await client.BatchAsync(\n \"\",\n new BatchWriteParams\n {\n Requests = new List\n {\n new BatchRequest\n {\n Action = Enum.Parse(\"PartialUpdateObject\"),\n Body = new Dictionary { { \"key\", \"value\" } },\n }\n },\n }\n);", - "partialUpdateObjectNoCreate": "var response = await client.BatchAsync(\n \"\",\n new BatchWriteParams\n {\n Requests = new List\n {\n new BatchRequest\n {\n Action = Enum.Parse(\"PartialUpdateObjectNoCreate\"),\n Body = new Dictionary { { \"key\", \"value\" } },\n }\n },\n }\n);", - "updateObject": "var response = await client.BatchAsync(\n \"\",\n new BatchWriteParams\n {\n Requests = new List\n {\n new BatchRequest\n {\n Action = Enum.Parse(\"UpdateObject\"),\n Body = new Dictionary { { \"key\", \"value\" } },\n }\n },\n }\n);" + "addObject": "var response = await client.BatchAsync(\n \"\",\n new BatchWriteParams\n {\n Requests = new List\n {\n new BatchRequest\n {\n Action = Enum.Parse(\"AddObject\"),\n Body = new Dictionary { { \"key\", \"bar\" }, { \"foo\", \"1\" } },\n },\n new BatchRequest\n {\n Action = Enum.Parse(\"AddObject\"),\n Body = new Dictionary { { \"key\", \"baz\" }, { \"foo\", \"2\" } },\n },\n },\n }\n);", + "clear": "var response = await client.BatchAsync(\n \"\",\n new BatchWriteParams\n {\n Requests = new List\n {\n new BatchRequest\n {\n Action = Enum.Parse(\"Clear\"),\n Body = new Dictionary { { \"key\", \"value\" } },\n },\n },\n }\n);", + "delete": "var response = await client.BatchAsync(\n \"\",\n new BatchWriteParams\n {\n Requests = new List\n {\n new BatchRequest\n {\n Action = Enum.Parse(\"Delete\"),\n Body = new Dictionary { { \"key\", \"value\" } },\n },\n },\n }\n);", + "deleteObject": "var response = await client.BatchAsync(\n \"\",\n new BatchWriteParams\n {\n Requests = new List\n {\n new BatchRequest\n {\n Action = Enum.Parse(\"DeleteObject\"),\n Body = new Dictionary { { \"key\", \"value\" } },\n },\n },\n }\n);", + "partialUpdateObject": "var response = await client.BatchAsync(\n \"\",\n new BatchWriteParams\n {\n Requests = new List\n {\n new BatchRequest\n {\n Action = Enum.Parse(\"PartialUpdateObject\"),\n Body = new Dictionary { { \"key\", \"value\" } },\n },\n },\n }\n);", + "partialUpdateObjectNoCreate": "var response = await client.BatchAsync(\n \"\",\n new BatchWriteParams\n {\n Requests = new List\n {\n new BatchRequest\n {\n Action = Enum.Parse(\"PartialUpdateObjectNoCreate\"),\n Body = new Dictionary { { \"key\", \"value\" } },\n },\n },\n }\n);", + "updateObject": "var response = await client.BatchAsync(\n \"\",\n new BatchWriteParams\n {\n Requests = new List\n {\n new BatchRequest\n {\n Action = Enum.Parse(\"UpdateObject\"),\n Body = new Dictionary { { \"key\", \"value\" } },\n },\n },\n }\n);" }, "batchAssignUserIds": { "default": "var response = await client.BatchAssignUserIdsAsync(\n \"userID\",\n new BatchAssignUserIdsParams\n {\n Cluster = \"theCluster\",\n Users = new List { \"user1\", \"user2\" },\n }\n);" }, "batchDictionaryEntries": { - "replace": "var response = await client.BatchDictionaryEntriesAsync(\n Enum.Parse(\"Plurals\"),\n new BatchDictionaryEntriesParams\n {\n ClearExistingDictionaryEntries = true,\n Requests = new List\n {\n new BatchDictionaryEntriesRequest\n {\n Action = Enum.Parse(\"AddEntry\"),\n Body = new DictionaryEntry\n {\n ObjectID = \"1\",\n Language = Enum.Parse(\"En\"),\n Word = \"fancy\",\n Words = new List { \"believe\", \"algolia\" },\n Decomposition = new List { \"trust\", \"algolia\" },\n State = Enum.Parse(\"Enabled\"),\n },\n }\n },\n }\n);", - "delete": "var response = await client.BatchDictionaryEntriesAsync(\n Enum.Parse(\"Plurals\"),\n new BatchDictionaryEntriesParams\n {\n ClearExistingDictionaryEntries = true,\n Requests = new List\n {\n new BatchDictionaryEntriesRequest\n {\n Action = Enum.Parse(\"DeleteEntry\"),\n Body = new DictionaryEntry { ObjectID = \"1\", },\n }\n },\n }\n);", - "append": "var response = await client.BatchDictionaryEntriesAsync(\n Enum.Parse(\"Stopwords\"),\n new BatchDictionaryEntriesParams\n {\n Requests = new List\n {\n new BatchDictionaryEntriesRequest\n {\n Action = Enum.Parse(\"AddEntry\"),\n Body = new DictionaryEntry\n {\n ObjectID = \"1\",\n Language = Enum.Parse(\"En\"),\n AdditionalProperties = new Dictionary { { \"additional\", \"try me\" }, }\n },\n }\n },\n }\n);" + "replace": "var response = await client.BatchDictionaryEntriesAsync(\n Enum.Parse(\"Plurals\"),\n new BatchDictionaryEntriesParams\n {\n ClearExistingDictionaryEntries = true,\n Requests = new List\n {\n new BatchDictionaryEntriesRequest\n {\n Action = Enum.Parse(\"AddEntry\"),\n Body = new DictionaryEntry\n {\n ObjectID = \"1\",\n Language = Enum.Parse(\"En\"),\n Word = \"fancy\",\n Words = new List { \"believe\", \"algolia\" },\n Decomposition = new List { \"trust\", \"algolia\" },\n State = Enum.Parse(\"Enabled\"),\n },\n },\n },\n }\n);", + "delete": "var response = await client.BatchDictionaryEntriesAsync(\n Enum.Parse(\"Plurals\"),\n new BatchDictionaryEntriesParams\n {\n ClearExistingDictionaryEntries = true,\n Requests = new List\n {\n new BatchDictionaryEntriesRequest\n {\n Action = Enum.Parse(\"DeleteEntry\"),\n Body = new DictionaryEntry { ObjectID = \"1\" },\n },\n },\n }\n);", + "append": "var response = await client.BatchDictionaryEntriesAsync(\n Enum.Parse(\"Stopwords\"),\n new BatchDictionaryEntriesParams\n {\n Requests = new List\n {\n new BatchDictionaryEntriesRequest\n {\n Action = Enum.Parse(\"AddEntry\"),\n Body = new DictionaryEntry\n {\n ObjectID = \"1\",\n Language = Enum.Parse(\"En\"),\n AdditionalProperties = new Dictionary { { \"additional\", \"try me\" } },\n },\n },\n },\n }\n);" }, "browse": { "default": "var response = await client.BrowseAsync(\"\");" @@ -60,7 +60,7 @@ "default": "var response = await client.DeleteApiKeyAsync(\"myTestApiKey\");" }, "deleteBy": { - "default": "var response = await client.DeleteByAsync(\n \"\",\n new DeleteByParams { Filters = \"brand:brandName\", }\n);" + "default": "var response = await client.DeleteByAsync(\n \"\",\n new DeleteByParams { Filters = \"brand:brandName\" }\n);" }, "deleteIndex": { "default": "var response = await client.DeleteIndexAsync(\"\");" @@ -103,7 +103,7 @@ "default": "var response = await client.GetObjectAsync(\n \"\",\n \"uniqueID\",\n new List { \"attr1\", \"attr2\" }\n);" }, "getObjects": { - "default": "var response = await client.GetObjectsAsync(\n new GetObjectsParams\n {\n Requests = new List\n {\n new GetObjectsRequest\n {\n AttributesToRetrieve = new List { \"attr1\", \"attr2\" },\n ObjectID = \"uniqueID\",\n IndexName = \"\",\n }\n },\n }\n);" + "default": "var response = await client.GetObjectsAsync(\n new GetObjectsParams\n {\n Requests = new List\n {\n new GetObjectsRequest\n {\n AttributesToRetrieve = new List { \"attr1\", \"attr2\" },\n ObjectID = \"uniqueID\",\n IndexName = \"\",\n },\n },\n }\n);" }, "getRule": { "default": "var response = await client.GetRuleAsync(\"\", \"qr-1725004648916\");" @@ -147,10 +147,10 @@ "default": "var response = await client.ListUserIdsAsync();" }, "multipleBatch": { - "default": "var response = await client.MultipleBatchAsync(\n new BatchParams\n {\n Requests = new List\n {\n new MultipleBatchRequest\n {\n Action = Enum.Parse(\"AddObject\"),\n Body = new Dictionary { { \"key\", \"value\" } },\n IndexName = \"\",\n }\n },\n }\n);" + "default": "var response = await client.MultipleBatchAsync(\n new BatchParams\n {\n Requests = new List\n {\n new MultipleBatchRequest\n {\n Action = Enum.Parse(\"AddObject\"),\n Body = new Dictionary { { \"key\", \"value\" } },\n IndexName = \"\",\n },\n },\n }\n);" }, "operationIndex": { - "scopes": "var response = await client.OperationIndexAsync(\n \"\",\n new OperationIndexParams\n {\n Operation = Enum.Parse(\"Move\"),\n Destination = \"\",\n Scope = new List\n {\n Enum.Parse(\"Rules\"),\n Enum.Parse(\"Settings\")\n },\n }\n);", + "scopes": "var response = await client.OperationIndexAsync(\n \"\",\n new OperationIndexParams\n {\n Operation = Enum.Parse(\"Move\"),\n Destination = \"\",\n Scope = new List\n {\n Enum.Parse(\"Rules\"),\n Enum.Parse(\"Settings\"),\n },\n }\n);", "copy": "var response = await client.OperationIndexAsync(\n \"\",\n new OperationIndexParams\n {\n Operation = Enum.Parse(\"Copy\"),\n Destination = \"\",\n }\n);", "move": "var response = await client.OperationIndexAsync(\n \"\",\n new OperationIndexParams\n {\n Operation = Enum.Parse(\"Move\"),\n Destination = \"\",\n }\n);" }, @@ -158,17 +158,17 @@ "default": "var response = await client.PartialUpdateObjectAsync(\n \"\",\n \"uniqueID\",\n new Dictionary { { \"attributeId\", \"new value\" } }\n);" }, "partialUpdateObjects": { - "call partialUpdateObjects with createIfNotExists=true": "var response = await client.PartialUpdateObjectsAsync(\n \"\",\n new List\n {\n new Dictionary { { \"objectID\", \"1\" }, { \"name\", \"Adam\" } },\n new Dictionary { { \"objectID\", \"2\" }, { \"name\", \"Benoit\" } }\n },\n true\n);", - "call partialUpdateObjects with createIfNotExists=false": "var response = await client.PartialUpdateObjectsAsync(\n \"\",\n new List\n {\n new Dictionary { { \"objectID\", \"3\" }, { \"name\", \"Cyril\" } },\n new Dictionary { { \"objectID\", \"4\" }, { \"name\", \"David\" } }\n },\n false\n);" + "call partialUpdateObjects with createIfNotExists=true": "var response = await client.PartialUpdateObjectsAsync(\n \"\",\n new List\n {\n new Dictionary { { \"objectID\", \"1\" }, { \"name\", \"Adam\" } },\n new Dictionary { { \"objectID\", \"2\" }, { \"name\", \"Benoit\" } },\n },\n true\n);", + "call partialUpdateObjects with createIfNotExists=false": "var response = await client.PartialUpdateObjectsAsync(\n \"\",\n new List\n {\n new Dictionary { { \"objectID\", \"3\" }, { \"name\", \"Cyril\" } },\n new Dictionary { { \"objectID\", \"4\" }, { \"name\", \"David\" } },\n },\n false\n);" }, "removeUserId": { "default": "var response = await client.RemoveUserIdAsync(\"uniqueID\");" }, "replaceAllObjects": { - "default": "var response = await client.ReplaceAllObjectsAsync(\n \"\",\n new List\n {\n new Dictionary { { \"objectID\", \"1\" }, { \"name\", \"Adam\" } },\n new Dictionary { { \"objectID\", \"2\" }, { \"name\", \"Benoit\" } },\n new Dictionary { { \"objectID\", \"3\" }, { \"name\", \"Cyril\" } },\n new Dictionary { { \"objectID\", \"4\" }, { \"name\", \"David\" } },\n new Dictionary { { \"objectID\", \"5\" }, { \"name\", \"Eva\" } },\n new Dictionary { { \"objectID\", \"6\" }, { \"name\", \"Fiona\" } },\n new Dictionary { { \"objectID\", \"7\" }, { \"name\", \"Gael\" } },\n new Dictionary { { \"objectID\", \"8\" }, { \"name\", \"Hugo\" } },\n new Dictionary { { \"objectID\", \"9\" }, { \"name\", \"Igor\" } },\n new Dictionary { { \"objectID\", \"10\" }, { \"name\", \"Julia\" } }\n },\n 3\n);" + "default": "var response = await client.ReplaceAllObjectsAsync(\n \"\",\n new List\n {\n new Dictionary { { \"objectID\", \"1\" }, { \"name\", \"Adam\" } },\n new Dictionary { { \"objectID\", \"2\" }, { \"name\", \"Benoit\" } },\n new Dictionary { { \"objectID\", \"3\" }, { \"name\", \"Cyril\" } },\n new Dictionary { { \"objectID\", \"4\" }, { \"name\", \"David\" } },\n new Dictionary { { \"objectID\", \"5\" }, { \"name\", \"Eva\" } },\n new Dictionary { { \"objectID\", \"6\" }, { \"name\", \"Fiona\" } },\n new Dictionary { { \"objectID\", \"7\" }, { \"name\", \"Gael\" } },\n new Dictionary { { \"objectID\", \"8\" }, { \"name\", \"Hugo\" } },\n new Dictionary { { \"objectID\", \"9\" }, { \"name\", \"Igor\" } },\n new Dictionary { { \"objectID\", \"10\" }, { \"name\", \"Julia\" } },\n },\n 3\n);" }, "replaceSources": { - "default": "var response = await client.ReplaceSourcesAsync(\n new List\n {\n new Source { VarSource = \"theSource\", Description = \"theDescription\", }\n }\n);" + "default": "var response = await client.ReplaceSourcesAsync(\n new List\n {\n new Source { VarSource = \"theSource\", Description = \"theDescription\" },\n }\n);" }, "restoreApiKey": { "default": "var response = await client.RestoreApiKeyAsync(\"myApiKey\");" @@ -177,37 +177,37 @@ "default": "var response = await client.SaveObjectAsync(\n \"\",\n new Dictionary { { \"objectID\", \"id\" }, { \"test\", \"val\" } }\n);" }, "saveObjects": { - "call saveObjects without error": "var response = await client.SaveObjectsAsync(\n \"\",\n new List\n {\n new Dictionary { { \"objectID\", \"1\" }, { \"name\", \"Adam\" } },\n new Dictionary { { \"objectID\", \"2\" }, { \"name\", \"Benoit\" } }\n }\n);", - "saveObjects should report errors": "var response = await client.SaveObjectsAsync(\n \"\",\n new List\n {\n new Dictionary { { \"objectID\", \"1\" }, { \"name\", \"Adam\" } },\n new Dictionary { { \"objectID\", \"2\" }, { \"name\", \"Benoit\" } }\n }\n);" + "call saveObjects without error": "var response = await client.SaveObjectsAsync(\n \"\",\n new List\n {\n new Dictionary { { \"objectID\", \"1\" }, { \"name\", \"Adam\" } },\n new Dictionary { { \"objectID\", \"2\" }, { \"name\", \"Benoit\" } },\n }\n);", + "saveObjects should report errors": "var response = await client.SaveObjectsAsync(\n \"\",\n new List\n {\n new Dictionary { { \"objectID\", \"1\" }, { \"name\", \"Adam\" } },\n new Dictionary { { \"objectID\", \"2\" }, { \"name\", \"Benoit\" } },\n }\n);" }, "saveRule": { - "default": "var response = await client.SaveRuleAsync(\n \"\",\n \"id1\",\n new Rule\n {\n ObjectID = \"id1\",\n Conditions = new List\n {\n new Condition { Pattern = \"apple\", Anchoring = Enum.Parse(\"Contains\"), }\n },\n }\n);" + "default": "var response = await client.SaveRuleAsync(\n \"\",\n \"id1\",\n new Rule\n {\n ObjectID = \"id1\",\n Conditions = new List\n {\n new Condition { Pattern = \"apple\", Anchoring = Enum.Parse(\"Contains\") },\n },\n }\n);" }, "saveRules": { - "default": "var response = await client.SaveRulesAsync(\n \"\",\n new List\n {\n new Rule\n {\n ObjectID = \"a-rule-id\",\n Conditions = new List\n {\n new Condition { Pattern = \"smartphone\", Anchoring = Enum.Parse(\"Contains\"), }\n },\n },\n new Rule\n {\n ObjectID = \"a-second-rule-id\",\n Conditions = new List\n {\n new Condition { Pattern = \"apple\", Anchoring = Enum.Parse(\"Contains\"), }\n },\n }\n },\n false,\n true\n);" + "default": "var response = await client.SaveRulesAsync(\n \"\",\n new List\n {\n new Rule\n {\n ObjectID = \"a-rule-id\",\n Conditions = new List\n {\n new Condition { Pattern = \"smartphone\", Anchoring = Enum.Parse(\"Contains\") },\n },\n },\n new Rule\n {\n ObjectID = \"a-second-rule-id\",\n Conditions = new List\n {\n new Condition { Pattern = \"apple\", Anchoring = Enum.Parse(\"Contains\") },\n },\n },\n },\n false,\n true\n);" }, "saveSynonym": { "default": "var response = await client.SaveSynonymAsync(\n \"\",\n \"id1\",\n new SynonymHit\n {\n ObjectID = \"id1\",\n Type = Enum.Parse(\"Synonym\"),\n Synonyms = new List { \"car\", \"vehicule\", \"auto\" },\n },\n true\n);" }, "saveSynonyms": { - "default": "var response = await client.SaveSynonymsAsync(\n \"\",\n new List\n {\n new SynonymHit\n {\n ObjectID = \"id1\",\n Type = Enum.Parse(\"Synonym\"),\n Synonyms = new List { \"car\", \"vehicule\", \"auto\" },\n },\n new SynonymHit\n {\n ObjectID = \"id2\",\n Type = Enum.Parse(\"Onewaysynonym\"),\n Input = \"iphone\",\n Synonyms = new List { \"ephone\", \"aphone\", \"yphone\" },\n }\n },\n true,\n true\n);" + "default": "var response = await client.SaveSynonymsAsync(\n \"\",\n new List\n {\n new SynonymHit\n {\n ObjectID = \"id1\",\n Type = Enum.Parse(\"Synonym\"),\n Synonyms = new List { \"car\", \"vehicule\", \"auto\" },\n },\n new SynonymHit\n {\n ObjectID = \"id2\",\n Type = Enum.Parse(\"Onewaysynonym\"),\n Input = \"iphone\",\n Synonyms = new List { \"ephone\", \"aphone\", \"yphone\" },\n },\n },\n true,\n true\n);" }, "search": { - "withHitsPerPage": "var response = await client.SearchAsync(\n new SearchMethodParams\n {\n Requests = new List\n {\n new SearchQuery(\n new SearchForHits\n {\n IndexName = \"\",\n Query = \"\",\n HitsPerPage = 50,\n }\n )\n },\n }\n);", - "filterOnly": "var response = await client.SearchAsync(\n new SearchMethodParams\n {\n Requests = new List\n {\n new SearchQuery(\n new SearchForHits\n {\n IndexName = \"\",\n Query = \"\",\n Filters = \"actor:Scarlett Johansson\",\n }\n )\n },\n }\n);", - "filterOr": "var response = await client.SearchAsync(\n new SearchMethodParams\n {\n Requests = new List\n {\n new SearchQuery(\n new SearchForHits\n {\n IndexName = \"\",\n Query = \"\",\n Filters = \"actor:Tom Cruise OR actor:Scarlett Johansson\",\n }\n )\n },\n }\n);", - "filterNot": "var response = await client.SearchAsync(\n new SearchMethodParams\n {\n Requests = new List\n {\n new SearchQuery(\n new SearchForHits\n {\n IndexName = \"\",\n Query = \"\",\n Filters = \"NOT actor:Nicolas Cage\",\n }\n )\n },\n }\n);", - "retrieveFacets": "var response = await client.SearchAsync(\n new SearchMethodParams\n {\n Requests = new List\n {\n new SearchQuery(\n new SearchForHits\n {\n IndexName = \"\",\n Query = \"\",\n Facets = new List { \"author\", \"genre\" },\n }\n )\n },\n }\n);", - "retrieveFacetsWildcard": "var response = await client.SearchAsync(\n new SearchMethodParams\n {\n Requests = new List\n {\n new SearchQuery(\n new SearchForHits\n {\n IndexName = \"\",\n Query = \"\",\n Facets = new List { \"*\" },\n }\n )\n },\n }\n);" + "withHitsPerPage": "var response = await client.SearchAsync(\n new SearchMethodParams\n {\n Requests = new List\n {\n new SearchQuery(\n new SearchForHits\n {\n IndexName = \"\",\n Query = \"\",\n HitsPerPage = 50,\n }\n ),\n },\n }\n);", + "filterOnly": "var response = await client.SearchAsync(\n new SearchMethodParams\n {\n Requests = new List\n {\n new SearchQuery(\n new SearchForHits\n {\n IndexName = \"\",\n Query = \"\",\n Filters = \"actor:Scarlett Johansson\",\n }\n ),\n },\n }\n);", + "filterOr": "var response = await client.SearchAsync(\n new SearchMethodParams\n {\n Requests = new List\n {\n new SearchQuery(\n new SearchForHits\n {\n IndexName = \"\",\n Query = \"\",\n Filters = \"actor:Tom Cruise OR actor:Scarlett Johansson\",\n }\n ),\n },\n }\n);", + "filterNot": "var response = await client.SearchAsync(\n new SearchMethodParams\n {\n Requests = new List\n {\n new SearchQuery(\n new SearchForHits\n {\n IndexName = \"\",\n Query = \"\",\n Filters = \"NOT actor:Nicolas Cage\",\n }\n ),\n },\n }\n);", + "retrieveFacets": "var response = await client.SearchAsync(\n new SearchMethodParams\n {\n Requests = new List\n {\n new SearchQuery(\n new SearchForHits\n {\n IndexName = \"\",\n Query = \"\",\n Facets = new List { \"author\", \"genre\" },\n }\n ),\n },\n }\n);", + "retrieveFacetsWildcard": "var response = await client.SearchAsync(\n new SearchMethodParams\n {\n Requests = new List\n {\n new SearchQuery(\n new SearchForHits\n {\n IndexName = \"\",\n Query = \"\",\n Facets = new List { \"*\" },\n }\n ),\n },\n }\n);" }, "searchDictionaryEntries": { - "default": "var response = await client.SearchDictionaryEntriesAsync(\n Enum.Parse(\"Stopwords\"),\n new SearchDictionaryEntriesParams { Query = \"about\", }\n);" + "default": "var response = await client.SearchDictionaryEntriesAsync(\n Enum.Parse(\"Stopwords\"),\n new SearchDictionaryEntriesParams { Query = \"about\" }\n);" }, "searchForFacetValues": { "default": "var response = await client.SearchForFacetValuesAsync(\"\", \"facetName\");" }, "searchRules": { - "default": "var response = await client.SearchRulesAsync(\n \"\",\n new SearchRulesParams { Query = \"zorro\", }\n);" + "default": "var response = await client.SearchRulesAsync(\n \"\",\n new SearchRulesParams { Query = \"zorro\" }\n);" }, "searchSingleIndex": { "default": "var response = await client.SearchSingleIndexAsync(\"\");" @@ -222,17 +222,17 @@ "default": "client.SetClientApiKey(\"updated-api-key\");" }, "setDictionarySettings": { - "default": "var response = await client.SetDictionarySettingsAsync(\n new DictionarySettingsParams\n {\n DisableStandardEntries = new StandardEntries\n {\n Plurals = new Dictionary\n {\n { \"fr\", false },\n { \"en\", false },\n { \"ru\", true }\n },\n },\n }\n);" + "default": "var response = await client.SetDictionarySettingsAsync(\n new DictionarySettingsParams\n {\n DisableStandardEntries = new StandardEntries\n {\n Plurals = new Dictionary\n {\n { \"fr\", false },\n { \"en\", false },\n { \"ru\", true },\n },\n },\n }\n);" }, "setSettings": { - "default": "var response = await client.SetSettingsAsync(\n \"\",\n new IndexSettings\n {\n AttributesForFaceting = new List\n {\n \"actor\",\n \"filterOnly(category)\",\n \"searchable(publisher)\"\n },\n }\n);" + "default": "var response = await client.SetSettingsAsync(\n \"\",\n new IndexSettings\n {\n AttributesForFaceting = new List\n {\n \"actor\",\n \"filterOnly(category)\",\n \"searchable(publisher)\",\n },\n }\n);" }, "updateApiKey": { "default": "var response = await client.UpdateApiKeyAsync(\n \"myApiKey\",\n new ApiKey\n {\n Acl = new List { Enum.Parse(\"Search\"), Enum.Parse(\"AddObject\") },\n Validity = 300,\n MaxQueriesPerIPPerHour = 100,\n MaxHitsPerQuery = 20,\n }\n);" }, "waitForApiKey": { "wait for api key helper - add": "var response = await client.WaitForApiKeyAsync(\n \"api-key-add-operation-test-csharp\",\n Enum.Parse(\"Add\")\n);", - "wait for api key - update": "var response = await client.WaitForApiKeyAsync(\n \"api-key-update-operation-test-csharp\",\n Enum.Parse(\"Update\"),\n new ApiKey\n {\n Description = \"my updated api key\",\n Acl = new List\n {\n Enum.Parse(\"Search\"),\n Enum.Parse(\"AddObject\"),\n Enum.Parse(\"DeleteObject\")\n },\n Indexes = new List { \"Movies\", \"Books\" },\n Referers = new List { \"*google.com\", \"*algolia.com\" },\n Validity = 305,\n MaxQueriesPerIPPerHour = 95,\n MaxHitsPerQuery = 20,\n }\n);", + "wait for api key - update": "var response = await client.WaitForApiKeyAsync(\n \"api-key-update-operation-test-csharp\",\n Enum.Parse(\"Update\"),\n new ApiKey\n {\n Description = \"my updated api key\",\n Acl = new List\n {\n Enum.Parse(\"Search\"),\n Enum.Parse(\"AddObject\"),\n Enum.Parse(\"DeleteObject\"),\n },\n Indexes = new List { \"Movies\", \"Books\" },\n Referers = new List { \"*google.com\", \"*algolia.com\" },\n Validity = 305,\n MaxQueriesPerIPPerHour = 95,\n MaxHitsPerQuery = 20,\n }\n);", "wait for api key - delete": "var response = await client.WaitForApiKeyAsync(\n \"api-key-delete-operation-test-csharp\",\n Enum.Parse(\"Delete\")\n);" }, "waitForAppTask": { diff --git a/specs/bundled/abtesting.doc.yml b/specs/bundled/abtesting.doc.yml index e8be16f4dab..5249b2dffd8 100644 --- a/specs/bundled/abtesting.doc.yml +++ b/specs/bundled/abtesting.doc.yml @@ -1105,10 +1105,8 @@ paths: Name = "myABTest", Variants = new List { - new AddABTestsVariant( - new AbTestsVariant { Index = "AB_TEST_1", TrafficPercentage = 30, } - ), - new AddABTestsVariant(new AbTestsVariant { Index = "AB_TEST_2", TrafficPercentage = 50, }) + new AddABTestsVariant(new AbTestsVariant { Index = "AB_TEST_1", TrafficPercentage = 30 }), + new AddABTestsVariant(new AbTestsVariant { Index = "AB_TEST_2", TrafficPercentage = 50 }), }, } ); @@ -2447,10 +2445,8 @@ paths: Name = "myABTest", Variants = new List { - new AddABTestsVariant( - new AbTestsVariant { Index = "AB_TEST_1", TrafficPercentage = 30, } - ), - new AddABTestsVariant(new AbTestsVariant { Index = "AB_TEST_2", TrafficPercentage = 50, }) + new AddABTestsVariant(new AbTestsVariant { Index = "AB_TEST_1", TrafficPercentage = 30 }), + new AddABTestsVariant(new AbTestsVariant { Index = "AB_TEST_2", TrafficPercentage = 50 }), }, } ); diff --git a/specs/bundled/ingestion.doc.yml b/specs/bundled/ingestion.doc.yml index 1bbf38fb49c..3ec6a333dd3 100644 --- a/specs/bundled/ingestion.doc.yml +++ b/specs/bundled/ingestion.doc.yml @@ -1633,7 +1633,7 @@ paths: AuthenticationIDs = new List { "6c02aeb1-775e-418e-870b-1faccd4b2c0f", - "947ac9c4-7e58-4c87-b1e7-14a68e99699a" + "947ac9c4-7e58-4c87-b1e7-14a68e99699a", }, } ); @@ -2133,7 +2133,7 @@ paths: // Call the API var response = await client.UpdateAuthenticationAsync( "6c02aeb1-775e-418e-870b-1faccd4b2c0f", - new AuthenticationUpdate { Name = "newName", } + new AuthenticationUpdate { Name = "newName" } ); // >LOG - lang: go @@ -2865,7 +2865,7 @@ paths: { Type = Enum.Parse("Search"), Name = "destinationName", - Input = new DestinationInput(new DestinationIndexName { IndexName = "", }), + Input = new DestinationInput(new DestinationIndexName { IndexName = "" }), AuthenticationID = "6c02aeb1-775e-418e-870b-1faccd4b2c0f", } ); @@ -3160,7 +3160,7 @@ paths: DestinationIDs = new List { "6c02aeb1-775e-418e-870b-1faccd4b2c0f", - "947ac9c4-7e58-4c87-b1e7-14a68e99699a" + "947ac9c4-7e58-4c87-b1e7-14a68e99699a", }, } ); @@ -3662,7 +3662,7 @@ paths: // Call the API var response = await client.UpdateDestinationAsync( "6c02aeb1-775e-418e-870b-1faccd4b2c0f", - new DestinationUpdate { Name = "newName", } + new DestinationUpdate { Name = "newName" } ); // >LOG - lang: go @@ -5075,7 +5075,7 @@ paths: SourceIDs = new List { "6c02aeb1-775e-418e-870b-1faccd4b2c0f", - "947ac9c4-7e58-4c87-b1e7-14a68e99699a" + "947ac9c4-7e58-4c87-b1e7-14a68e99699a", }, } ); @@ -5571,7 +5571,7 @@ paths: // Call the API var response = await client.UpdateSourceAsync( "6c02aeb1-775e-418e-870b-1faccd4b2c0f", - new SourceUpdate { Name = "newName", } + new SourceUpdate { Name = "newName" } ); // >LOG - lang: go @@ -6066,7 +6066,7 @@ paths: // Call the API var response = await client.ValidateSourceBeforeUpdateAsync( "6c02aeb1-775e-418e-870b-1faccd4b2c0f", - new SourceUpdate { Name = "newName", } + new SourceUpdate { Name = "newName" } ); // >LOG - lang: go @@ -7124,7 +7124,7 @@ paths: SourceID = "search", DestinationID = "destinationName", Trigger = new TaskCreateTrigger( - new OnDemandTriggerInput { Type = Enum.Parse("OnDemand"), } + new OnDemandTriggerInput { Type = Enum.Parse("OnDemand") } ), Action = Enum.Parse("Replace"), } @@ -7423,7 +7423,7 @@ paths: { "6c02aeb1-775e-418e-870b-1faccd4b2c0f", "947ac9c4-7e58-4c87-b1e7-14a68e99699a", - "76ab4c2a-ce17-496f-b7a6-506dc59ee498" + "76ab4c2a-ce17-496f-b7a6-506dc59ee498", }, } ); @@ -7946,7 +7946,7 @@ paths: // Call the API var response = await client.UpdateTaskV1Async( "6c02aeb1-775e-418e-870b-1faccd4b2c0f", - new TaskUpdateV1 { Enabled = false, } + new TaskUpdateV1 { Enabled = false } ); // >LOG - lang: go @@ -9644,7 +9644,7 @@ paths: { "6c02aeb1-775e-418e-870b-1faccd4b2c0f", "947ac9c4-7e58-4c87-b1e7-14a68e99699a", - "76ab4c2a-ce17-496f-b7a6-506dc59ee498" + "76ab4c2a-ce17-496f-b7a6-506dc59ee498", }, } ); @@ -10160,7 +10160,7 @@ paths: // Call the API var response = await client.UpdateTaskAsync( "6c02aeb1-775e-418e-870b-1faccd4b2c0f", - new TaskUpdate { Enabled = false, Cron = "* * * * *", } + new TaskUpdate { Enabled = false, Cron = "* * * * *" } ); // >LOG - lang: go @@ -10920,7 +10920,7 @@ paths: { { "key", "bar" }, { "foo", "1" }, - } + }, }, new PushTaskRecords { @@ -10929,8 +10929,8 @@ paths: { { "key", "baz" }, { "foo", "2" }, - } - } + }, + }, }, } ); @@ -12516,7 +12516,7 @@ paths: { "6c02aeb1-775e-418e-870b-1faccd4b2c0f", "947ac9c4-7e58-4c87-b1e7-14a68e99699a", - "76ab4c2a-ce17-496f-b7a6-506dc59ee498" + "76ab4c2a-ce17-496f-b7a6-506dc59ee498", }, } ); diff --git a/specs/bundled/insights.doc.yml b/specs/bundled/insights.doc.yml index 79ef0226ed1..eff949f462d 100644 --- a/specs/bundled/insights.doc.yml +++ b/specs/bundled/insights.doc.yml @@ -1567,7 +1567,7 @@ paths: QueryID = "43b15df305339e827f0ac0bdc5ebcaa7", Positions = new List { 7, 6 }, } - ) + ), }, } ); diff --git a/specs/bundled/personalization.doc.yml b/specs/bundled/personalization.doc.yml index 3ba178d5ce7..901eca195cb 100644 --- a/specs/bundled/personalization.doc.yml +++ b/specs/bundled/personalization.doc.yml @@ -1815,11 +1815,11 @@ paths: Score = 42, EventName = "Algolia", EventType = Enum.Parse("Click"), - } + }, }, FacetScoring = new List { - new FacetScoring { Score = 42, FacetName = "Event", } + new FacetScoring { Score = 42, FacetName = "Event" }, }, PersonalizationImpact = 42, } diff --git a/specs/bundled/query-suggestions.doc.yml b/specs/bundled/query-suggestions.doc.yml index c0f896b66bb..101b1489bb8 100644 --- a/specs/bundled/query-suggestions.doc.yml +++ b/specs/bundled/query-suggestions.doc.yml @@ -1266,13 +1266,13 @@ paths: new SourceIndex { IndexName = "", - Facets = new List { new Facet { Attribute = "test", } }, + Facets = new List { new Facet { Attribute = "test" } }, Generate = new List> { new List { "facetA", "facetB" }, - new List { "facetC" } + new List { "facetC" }, }, - } + }, }, Languages = new Languages(new List { "french" }), Exclude = new List { "test" }, @@ -1880,13 +1880,13 @@ paths: new SourceIndex { IndexName = "", - Facets = new List { new Facet { Attribute = "test", } }, + Facets = new List { new Facet { Attribute = "test" } }, Generate = new List> { new List { "facetA", "facetB" }, - new List { "facetC" } + new List { "facetC" }, }, - } + }, }, Languages = new Languages(new List { "french" }), Exclude = new List { "test" }, diff --git a/specs/bundled/recommend.doc.yml b/specs/bundled/recommend.doc.yml index d0f30e69bc2..e729108c0dc 100644 --- a/specs/bundled/recommend.doc.yml +++ b/specs/bundled/recommend.doc.yml @@ -1133,7 +1133,7 @@ paths: Model = Enum.Parse("RelatedProducts"), Threshold = 42.1, } - ) + ), }, } ); diff --git a/specs/bundled/search.doc.yml b/specs/bundled/search.doc.yml index 68fd9908df2..a21ab1f1f9f 100644 --- a/specs/bundled/search.doc.yml +++ b/specs/bundled/search.doc.yml @@ -1441,7 +1441,7 @@ paths: Query = "", HitsPerPage = 50, } - ) + ), }, } ); @@ -3582,7 +3582,7 @@ paths: var response = await client.DeleteByAsync( "", - new DeleteByParams { Filters = "brand:brandName", } + new DeleteByParams { Filters = "brand:brandName" } ); // >LOG @@ -4407,7 +4407,7 @@ paths: { Action = Enum.Parse("AddObject"), Body = new Dictionary { { "key", "baz" }, { "foo", "2" } }, - } + }, }, } ); @@ -4833,7 +4833,7 @@ paths: Action = Enum.Parse("AddObject"), Body = new Dictionary { { "key", "value" } }, IndexName = "", - } + }, }, } ); @@ -5199,7 +5199,7 @@ paths: AttributesToRetrieve = new List { "attr1", "attr2" }, ObjectID = "uniqueID", IndexName = "", - } + }, }, } ); @@ -5722,7 +5722,7 @@ paths: { "actor", "filterOnly(category)", - "searchable(publisher)" + "searchable(publisher)", }, } ); @@ -6770,7 +6770,7 @@ paths: Type = Enum.Parse("Onewaysynonym"), Input = "iphone", Synonyms = new List { "ephone", "aphone", "yphone" }, - } + }, }, true, true @@ -9305,7 +9305,7 @@ paths: ObjectID = "id1", Conditions = new List { - new Condition { Pattern = "apple", Anchoring = Enum.Parse("Contains"), } + new Condition { Pattern = "apple", Anchoring = Enum.Parse("Contains") }, }, } ); @@ -9831,7 +9831,7 @@ paths: ObjectID = "a-rule-id", Conditions = new List { - new Condition { Pattern = "smartphone", Anchoring = Enum.Parse("Contains"), } + new Condition { Pattern = "smartphone", Anchoring = Enum.Parse("Contains") }, }, }, new Rule @@ -9839,9 +9839,9 @@ paths: ObjectID = "a-second-rule-id", Conditions = new List { - new Condition { Pattern = "apple", Anchoring = Enum.Parse("Contains"), } + new Condition { Pattern = "apple", Anchoring = Enum.Parse("Contains") }, }, - } + }, }, false, true @@ -10476,7 +10476,7 @@ paths: var response = await client.SearchRulesAsync( "", - new SearchRulesParams { Query = "zorro", } + new SearchRulesParams { Query = "zorro" } ); // >LOG @@ -10771,7 +10771,7 @@ paths: Decomposition = new List { "trust", "algolia" }, State = Enum.Parse("Enabled"), }, - } + }, }, } ); @@ -11187,7 +11187,7 @@ paths: var response = await client.SearchDictionaryEntriesAsync( Enum.Parse("Stopwords"), - new SearchDictionaryEntriesParams { Query = "about", } + new SearchDictionaryEntriesParams { Query = "about" } ); // >LOG @@ -11659,7 +11659,7 @@ paths: { { "fr", false }, { "en", false }, - { "ru", true } + { "ru", true }, }, }, } @@ -12158,7 +12158,7 @@ paths: var response = await client.AssignUserIdAsync( "userID", - new AssignUserIdParams { Cluster = "theCluster", } + new AssignUserIdParams { Cluster = "theCluster" } ); // >LOG @@ -14576,7 +14576,7 @@ paths: var response = await client.ReplaceSourcesAsync( new List { - new Source { VarSource = "theSource", Description = "theDescription", } + new Source { VarSource = "theSource", Description = "theDescription" }, } ); @@ -14842,7 +14842,7 @@ paths: // Call the API var response = await client.AppendSourceAsync( - new Source { VarSource = "theSource", Description = "theDescription", } + new Source { VarSource = "theSource", Description = "theDescription" } ); // >LOG @@ -16232,7 +16232,7 @@ paths: Scope = new List { Enum.Parse("Rules"), - Enum.Parse("Settings") + Enum.Parse("Settings"), }, } ); diff --git a/tests/output/csharp/src/generated/benchmark/Search.test.cs b/tests/output/csharp/src/generated/benchmark/Search.test.cs index 9d252380cfe..60ea0ab7c58 100644 --- a/tests/output/csharp/src/generated/benchmark/Search.test.cs +++ b/tests/output/csharp/src/generated/benchmark/Search.test.cs @@ -37,8 +37,8 @@ public async Task BenchmarkTest0() Up = true, LastUse = DateTime.UtcNow, Accept = CallType.Read | CallType.Write, - } - } + }, + }, }; var client = new SearchClient(_config); @@ -56,7 +56,7 @@ public async Task BenchmarkTest0() Query = "iphone 15 pro max 512gb", HitsPerPage = 50, } - ) + ), }, } ); diff --git a/tests/output/csharp/src/generated/client/Abtesting.test.cs b/tests/output/csharp/src/generated/client/Abtesting.test.cs index 1da543b8876..915a7ea2435 100644 --- a/tests/output/csharp/src/generated/client/Abtesting.test.cs +++ b/tests/output/csharp/src/generated/client/Abtesting.test.cs @@ -127,8 +127,8 @@ public async Task SetClientApiKeyTest0() Up = true, LastUse = DateTime.UtcNow, Accept = CallType.Read | CallType.Write, - } - } + }, + }, }; var client = new AbtestingClient(_config); diff --git a/tests/output/csharp/src/generated/client/Analytics.test.cs b/tests/output/csharp/src/generated/client/Analytics.test.cs index c0cd107cf0e..47004db398e 100644 --- a/tests/output/csharp/src/generated/client/Analytics.test.cs +++ b/tests/output/csharp/src/generated/client/Analytics.test.cs @@ -142,8 +142,8 @@ public async Task SetClientApiKeyTest0() Up = true, LastUse = DateTime.UtcNow, Accept = CallType.Read | CallType.Write, - } - } + }, + }, }; var client = new AnalyticsClient(_config); diff --git a/tests/output/csharp/src/generated/client/Ingestion.test.cs b/tests/output/csharp/src/generated/client/Ingestion.test.cs index 47873ab6911..e157ce24790 100644 --- a/tests/output/csharp/src/generated/client/Ingestion.test.cs +++ b/tests/output/csharp/src/generated/client/Ingestion.test.cs @@ -116,8 +116,8 @@ public async Task SetClientApiKeyTest0() Up = true, LastUse = DateTime.UtcNow, Accept = CallType.Read | CallType.Write, - } - } + }, + }, }; var client = new IngestionClient(_config); diff --git a/tests/output/csharp/src/generated/client/Insights.test.cs b/tests/output/csharp/src/generated/client/Insights.test.cs index 2851b1c553e..bc25e5ece14 100644 --- a/tests/output/csharp/src/generated/client/Insights.test.cs +++ b/tests/output/csharp/src/generated/client/Insights.test.cs @@ -97,7 +97,7 @@ await client.PushEventsAsync( QueryID = "43b15df305339e827f0ac0bdc5ebcaa7", Positions = new List { 7, 6 }, } - ) + ), }, } ); @@ -148,8 +148,8 @@ public async Task SetClientApiKeyTest0() Up = true, LastUse = DateTime.UtcNow, Accept = CallType.Read | CallType.Write, - } - } + }, + }, }; var client = new InsightsClient(_config); diff --git a/tests/output/csharp/src/generated/client/Monitoring.test.cs b/tests/output/csharp/src/generated/client/Monitoring.test.cs index bdba54d8138..ce4c4aaac3d 100644 --- a/tests/output/csharp/src/generated/client/Monitoring.test.cs +++ b/tests/output/csharp/src/generated/client/Monitoring.test.cs @@ -100,8 +100,8 @@ public async Task SetClientApiKeyTest0() Up = true, LastUse = DateTime.UtcNow, Accept = CallType.Read | CallType.Write, - } - } + }, + }, }; var client = new MonitoringClient(_config); diff --git a/tests/output/csharp/src/generated/client/Personalization.test.cs b/tests/output/csharp/src/generated/client/Personalization.test.cs index 5bbdcd044d6..d7a58400026 100644 --- a/tests/output/csharp/src/generated/client/Personalization.test.cs +++ b/tests/output/csharp/src/generated/client/Personalization.test.cs @@ -142,8 +142,8 @@ public async Task SetClientApiKeyTest0() Up = true, LastUse = DateTime.UtcNow, Accept = CallType.Read | CallType.Write, - } - } + }, + }, }; var client = new PersonalizationClient(_config); diff --git a/tests/output/csharp/src/generated/client/QuerySuggestions.test.cs b/tests/output/csharp/src/generated/client/QuerySuggestions.test.cs index a51ff83fa0b..9454d9aec83 100644 --- a/tests/output/csharp/src/generated/client/QuerySuggestions.test.cs +++ b/tests/output/csharp/src/generated/client/QuerySuggestions.test.cs @@ -142,8 +142,8 @@ public async Task SetClientApiKeyTest0() Up = true, LastUse = DateTime.UtcNow, Accept = CallType.Read | CallType.Write, - } - } + }, + }, }; var client = new QuerySuggestionsClient(_config); diff --git a/tests/output/csharp/src/generated/client/Recommend.test.cs b/tests/output/csharp/src/generated/client/Recommend.test.cs index 38d1c86cd26..abd945093dd 100644 --- a/tests/output/csharp/src/generated/client/Recommend.test.cs +++ b/tests/output/csharp/src/generated/client/Recommend.test.cs @@ -111,8 +111,8 @@ public async Task SetClientApiKeyTest0() Up = true, LastUse = DateTime.UtcNow, Accept = CallType.Read | CallType.Write, - } - } + }, + }, }; var client = new RecommendClient(_config); diff --git a/tests/output/csharp/src/generated/client/Search.test.cs b/tests/output/csharp/src/generated/client/Search.test.cs index a68e86e83de..64f866de34f 100644 --- a/tests/output/csharp/src/generated/client/Search.test.cs +++ b/tests/output/csharp/src/generated/client/Search.test.cs @@ -81,8 +81,8 @@ public async Task ApiTest2() Up = true, LastUse = DateTime.UtcNow, Accept = CallType.Read | CallType.Write, - } - } + }, + }, }; var client = new SearchClient(_config); @@ -110,8 +110,8 @@ public async Task ApiTest3() Up = true, LastUse = DateTime.UtcNow, Accept = CallType.Read | CallType.Write, - } - } + }, + }, }; var client = new SearchClient(_config); @@ -140,9 +140,9 @@ public async Task ApiTest4() Up = true, LastUse = DateTime.UtcNow, Accept = CallType.Read | CallType.Write, - } + }, }, - Compression = CompressionType.Gzip + Compression = CompressionType.Gzip, }; var client = new SearchClient(_config); @@ -222,8 +222,8 @@ public async Task DeleteObjectsTest0() Up = true, LastUse = DateTime.UtcNow, Accept = CallType.Read | CallType.Write, - } - } + }, + }, }; var client = new SearchClient(_config); @@ -310,8 +310,8 @@ public async Task IndexExistsTest0() Up = true, LastUse = DateTime.UtcNow, Accept = CallType.Read | CallType.Write, - } - } + }, + }, }; var client = new SearchClient(_config); @@ -337,8 +337,8 @@ public async Task IndexExistsTest1() Up = true, LastUse = DateTime.UtcNow, Accept = CallType.Read | CallType.Write, - } - } + }, + }, }; var client = new SearchClient(_config); @@ -364,8 +364,8 @@ public async Task IndexExistsTest2() Up = true, LastUse = DateTime.UtcNow, Accept = CallType.Read | CallType.Write, - } - } + }, + }, }; var client = new SearchClient(_config); @@ -470,8 +470,8 @@ public async Task PartialUpdateObjectsTest0() Up = true, LastUse = DateTime.UtcNow, Accept = CallType.Read | CallType.Write, - } - } + }, + }, }; var client = new SearchClient(_config); @@ -481,7 +481,7 @@ public async Task PartialUpdateObjectsTest0() new List { new Dictionary { { "objectID", "1" }, { "name", "Adam" } }, - new Dictionary { { "objectID", "2" }, { "name", "Benoit" } } + new Dictionary { { "objectID", "2" }, { "name", "Benoit" } }, }, true ); @@ -509,8 +509,8 @@ public async Task PartialUpdateObjectsTest1() Up = true, LastUse = DateTime.UtcNow, Accept = CallType.Read | CallType.Write, - } - } + }, + }, }; var client = new SearchClient(_config); @@ -520,7 +520,7 @@ public async Task PartialUpdateObjectsTest1() new List { new Dictionary { { "objectID", "3" }, { "name", "Cyril" } }, - new Dictionary { { "objectID", "4" }, { "name", "David" } } + new Dictionary { { "objectID", "4" }, { "name", "David" } }, }, false ); @@ -548,8 +548,8 @@ public async Task ReplaceAllObjectsTest0() Up = true, LastUse = DateTime.UtcNow, Accept = CallType.Read | CallType.Write, - } - } + }, + }, }; var client = new SearchClient(_config); @@ -567,7 +567,7 @@ public async Task ReplaceAllObjectsTest0() new Dictionary { { "objectID", "7" }, { "name", "Gael" } }, new Dictionary { { "objectID", "8" }, { "name", "Hugo" } }, new Dictionary { { "objectID", "9" }, { "name", "Igor" } }, - new Dictionary { { "objectID", "10" }, { "name", "Julia" } } + new Dictionary { { "objectID", "10" }, { "name", "Julia" } }, }, 3 ); @@ -595,8 +595,8 @@ public async Task SaveObjectsTest0() Up = true, LastUse = DateTime.UtcNow, Accept = CallType.Read | CallType.Write, - } - } + }, + }, }; var client = new SearchClient(_config); @@ -606,7 +606,7 @@ public async Task SaveObjectsTest0() new List { new Dictionary { { "objectID", "1" }, { "name", "Adam" } }, - new Dictionary { { "objectID", "2" }, { "name", "Benoit" } } + new Dictionary { { "objectID", "2" }, { "name", "Benoit" } }, } ); @@ -633,8 +633,8 @@ public async Task SaveObjectsTest1() Up = true, LastUse = DateTime.UtcNow, Accept = CallType.Read | CallType.Write, - } - } + }, + }, }; var client = new SearchClient(_config); @@ -645,7 +645,7 @@ public async Task SaveObjectsTest1() new List { new Dictionary { { "objectID", "1" }, { "name", "Adam" } }, - new Dictionary { { "objectID", "2" }, { "name", "Benoit" } } + new Dictionary { { "objectID", "2" }, { "name", "Benoit" } }, } ); }); @@ -670,8 +670,8 @@ public async Task SetClientApiKeyTest0() Up = true, LastUse = DateTime.UtcNow, Accept = CallType.Read | CallType.Write, - } - } + }, + }, }; var client = new SearchClient(_config); @@ -713,8 +713,8 @@ public async Task WaitForApiKeyTest0() Up = true, LastUse = DateTime.UtcNow, Accept = CallType.Read | CallType.Write, - } - } + }, + }, }; var client = new SearchClient(_config); @@ -747,8 +747,8 @@ public async Task WaitForApiKeyTest1() Up = true, LastUse = DateTime.UtcNow, Accept = CallType.Read | CallType.Write, - } - } + }, + }, }; var client = new SearchClient(_config); @@ -763,7 +763,7 @@ public async Task WaitForApiKeyTest1() { Enum.Parse("Search"), Enum.Parse("AddObject"), - Enum.Parse("DeleteObject") + Enum.Parse("DeleteObject"), }, Indexes = new List { "Movies", "Books" }, Referers = new List { "*google.com", "*algolia.com" }, @@ -796,8 +796,8 @@ public async Task WaitForApiKeyTest2() Up = true, LastUse = DateTime.UtcNow, Accept = CallType.Read | CallType.Write, - } - } + }, + }, }; var client = new SearchClient(_config); @@ -826,8 +826,8 @@ public async Task WaitForAppTaskTest0() Up = true, LastUse = DateTime.UtcNow, Accept = CallType.Read | CallType.Write, - } - } + }, + }, }; var client = new SearchClient(_config); @@ -857,8 +857,8 @@ public async Task WaitForTaskTest0() Up = true, LastUse = DateTime.UtcNow, Accept = CallType.Read | CallType.Write, - } - } + }, + }, }; var client = new SearchClient(_config); diff --git a/tests/output/csharp/src/generated/e2e/Ingestion.test.cs b/tests/output/csharp/src/generated/e2e/Ingestion.test.cs index 88fbbee1903..3f1d1aaca28 100644 --- a/tests/output/csharp/src/generated/e2e/Ingestion.test.cs +++ b/tests/output/csharp/src/generated/e2e/Ingestion.test.cs @@ -119,7 +119,7 @@ public async Task ListAuthenticationsTest1() new List { Enum.Parse("Basic"), - Enum.Parse("Algolia") + Enum.Parse("Algolia"), }, new List { new PlatformWithNone(Enum.Parse("None")) }, Enum.Parse("CreatedAt"), @@ -152,7 +152,7 @@ public async Task SearchTasksTest() { "6c02aeb1-775e-418e-870b-1faccd4b2c0f", "947ac9c4-7e58-4c87-b1e7-14a68e99699a", - "76ab4c2a-ce17-496f-b7a6-506dc59ee498" + "76ab4c2a-ce17-496f-b7a6-506dc59ee498", }, } ); @@ -183,7 +183,7 @@ public async Task SearchTasksV1Test() { "6c02aeb1-775e-418e-870b-1faccd4b2c0f", "947ac9c4-7e58-4c87-b1e7-14a68e99699a", - "76ab4c2a-ce17-496f-b7a6-506dc59ee498" + "76ab4c2a-ce17-496f-b7a6-506dc59ee498", }, } ); diff --git a/tests/output/csharp/src/generated/e2e/Insights.test.cs b/tests/output/csharp/src/generated/e2e/Insights.test.cs index 7511826b303..05428b537b2 100644 --- a/tests/output/csharp/src/generated/e2e/Insights.test.cs +++ b/tests/output/csharp/src/generated/e2e/Insights.test.cs @@ -79,7 +79,7 @@ public async Task PushEventsTest1() Timestamp = 1726272000000L, ObjectIDs = new List { "9780545139700", "9780439784542" }, } - ) + ), }, } ); diff --git a/tests/output/csharp/src/generated/e2e/Search.test.cs b/tests/output/csharp/src/generated/e2e/Search.test.cs index 73048723dd4..851c76ab48e 100644 --- a/tests/output/csharp/src/generated/e2e/Search.test.cs +++ b/tests/output/csharp/src/generated/e2e/Search.test.cs @@ -118,7 +118,7 @@ public async Task SearchTest4() { Requests = new List { - new SearchQuery(new SearchForHits { IndexName = "cts_e2e_search_empty_index", }) + new SearchQuery(new SearchForHits { IndexName = "cts_e2e_search_empty_index" }), }, } ); @@ -156,7 +156,7 @@ public async Task SearchTest5() AttributesToHighlight = new List { "*" }, AttributesToRetrieve = new List { "*" }, } - ) + ), }, } ); @@ -192,7 +192,7 @@ public async Task SearchTest8() Type = Enum.Parse("Facet"), Facet = "editor", } - ) + ), }, Strategy = Enum.Parse("StopIfEnoughMatches"), } @@ -237,7 +237,7 @@ public async Task SearchTest14() new List { new FacetFilters("editor:'visual studio'"), - new FacetFilters("editor:neovim") + new FacetFilters("editor:neovim"), } ), } @@ -250,7 +250,7 @@ public async Task SearchTest14() new List { new FacetFilters("editor:'visual studio'"), - new FacetFilters(new List { new FacetFilters("editor:neovim") }) + new FacetFilters(new List { new FacetFilters("editor:neovim") }), } ), } @@ -269,13 +269,13 @@ public async Task SearchTest14() new FacetFilters("editor:neovim"), new FacetFilters( new List { new FacetFilters("editor:goland") } - ) + ), } - ) + ), } ), } - ) + ), }, } ); @@ -301,7 +301,7 @@ public async Task SearchDictionaryEntriesTest() { var resp = await client.SearchDictionaryEntriesAsync( Enum.Parse("Stopwords"), - new SearchDictionaryEntriesParams { Query = "about", } + new SearchDictionaryEntriesParams { Query = "about" } ); // Check status code 200 Assert.NotNull(resp); @@ -325,7 +325,7 @@ public async Task SearchRulesTest() { var resp = await client.SearchRulesAsync( "cts_e2e_browse", - new SearchRulesParams { Query = "zorro", } + new SearchRulesParams { Query = "zorro" } ); // Check status code 200 Assert.NotNull(resp); @@ -395,7 +395,7 @@ public async Task SetSettingsTest1() { var resp = await client.SetSettingsAsync( "cts_e2e_settings", - new IndexSettings { PaginationLimitedTo = 10, }, + new IndexSettings { PaginationLimitedTo = 10 }, true ); // Check status code 200 diff --git a/tests/output/csharp/src/generated/requests/Abtesting.test.cs b/tests/output/csharp/src/generated/requests/Abtesting.test.cs index 790fa9d89be..41bd722bdb6 100644 --- a/tests/output/csharp/src/generated/requests/Abtesting.test.cs +++ b/tests/output/csharp/src/generated/requests/Abtesting.test.cs @@ -36,10 +36,8 @@ await client.AddABTestsAsync( Name = "myABTest", Variants = new List { - new AddABTestsVariant( - new AbTestsVariant { Index = "AB_TEST_1", TrafficPercentage = 30, } - ), - new AddABTestsVariant(new AbTestsVariant { Index = "AB_TEST_2", TrafficPercentage = 50, }) + new AddABTestsVariant(new AbTestsVariant { Index = "AB_TEST_1", TrafficPercentage = 30 }), + new AddABTestsVariant(new AbTestsVariant { Index = "AB_TEST_2", TrafficPercentage = 50 }), }, } ); @@ -613,10 +611,8 @@ await client.ScheduleABTestAsync( Name = "myABTest", Variants = new List { - new AddABTestsVariant( - new AbTestsVariant { Index = "AB_TEST_1", TrafficPercentage = 30, } - ), - new AddABTestsVariant(new AbTestsVariant { Index = "AB_TEST_2", TrafficPercentage = 50, }) + new AddABTestsVariant(new AbTestsVariant { Index = "AB_TEST_1", TrafficPercentage = 30 }), + new AddABTestsVariant(new AbTestsVariant { Index = "AB_TEST_2", TrafficPercentage = 50 }), }, } ); diff --git a/tests/output/csharp/src/generated/requests/Ingestion.test.cs b/tests/output/csharp/src/generated/requests/Ingestion.test.cs index 4a282c9e74b..e4776b087c2 100644 --- a/tests/output/csharp/src/generated/requests/Ingestion.test.cs +++ b/tests/output/csharp/src/generated/requests/Ingestion.test.cs @@ -63,7 +63,7 @@ await client.CreateAuthenticationAsync( { Type = Enum.Parse("Algolia"), Name = "authName", - Input = new AuthInput(new AuthAlgolia { AppID = "myappID", ApiKey = "randomApiKey", }), + Input = new AuthInput(new AuthAlgolia { AppID = "myappID", ApiKey = "randomApiKey" }), } ); @@ -85,7 +85,7 @@ await client.CreateDestinationAsync( { Type = Enum.Parse("Search"), Name = "destinationName", - Input = new DestinationInput(new DestinationIndexName { IndexName = "full_name______", }), + Input = new DestinationInput(new DestinationIndexName { IndexName = "full_name______" }), AuthenticationID = "6c02aeb1-775e-418e-870b-1faccd4b2c0f", } ); @@ -108,7 +108,7 @@ await client.CreateDestinationAsync( { Type = Enum.Parse("Search"), Name = "destinationName", - Input = new DestinationInput(new DestinationIndexName { IndexName = "full_name______", }), + Input = new DestinationInput(new DestinationIndexName { IndexName = "full_name______" }), TransformationIDs = new List { "6c02aeb1-775e-418e-870b-1faccd4b2c0f" }, } ); @@ -158,7 +158,7 @@ await client.CreateSourceAsync( public async Task CreateSourceTest1() { await client.CreateSourceAsync( - new SourceCreate { Type = Enum.Parse("Push"), Name = "pushezpourentrer", } + new SourceCreate { Type = Enum.Parse("Push"), Name = "pushezpourentrer" } ); var req = _echo.LastResponse; @@ -235,7 +235,7 @@ await client.CreateTaskAsync( { Name = "foo", SyncMode = Enum.Parse("Incremental"), - } + }, }, } ), @@ -261,7 +261,7 @@ await client.CreateTaskV1Async( SourceID = "search", DestinationID = "destinationName", Trigger = new TaskCreateTrigger( - new OnDemandTriggerInput { Type = Enum.Parse("OnDemand"), } + new OnDemandTriggerInput { Type = Enum.Parse("OnDemand") } ), Action = Enum.Parse("Replace"), } @@ -315,7 +315,7 @@ await client.CreateTaskV1Async( SourceID = "search", DestinationID = "destinationName", Trigger = new TaskCreateTrigger( - new OnDemandTriggerInput { Type = Enum.Parse("OnDemand"), } + new OnDemandTriggerInput { Type = Enum.Parse("OnDemand") } ), Action = Enum.Parse("Replace"), } @@ -340,7 +340,7 @@ await client.CreateTaskV1Async( SourceID = "search", DestinationID = "destinationName", Trigger = new TaskCreateTrigger( - new OnDemandTriggerInput { Type = Enum.Parse("OnDemand"), } + new OnDemandTriggerInput { Type = Enum.Parse("OnDemand") } ), Action = Enum.Parse("Replace"), Input = new TaskInput( @@ -352,7 +352,7 @@ await client.CreateTaskV1Async( { Name = "foo", SyncMode = Enum.Parse("Incremental"), - } + }, }, } ), @@ -1128,7 +1128,7 @@ await client.ListAuthenticationsAsync( new List { Enum.Parse("Basic"), - Enum.Parse("Algolia") + Enum.Parse("Algolia"), }, new List { new PlatformWithNone(Enum.Parse("None")) }, Enum.Parse("CreatedAt"), @@ -1259,7 +1259,7 @@ await client.PushTaskAsync( { { "key", "bar" }, { "foo", "1" }, - } + }, }, new PushTaskRecords { @@ -1268,8 +1268,8 @@ await client.PushTaskAsync( { { "key", "baz" }, { "foo", "2" }, - } - } + }, + }, }, } ); @@ -1338,7 +1338,7 @@ await client.SearchAuthenticationsAsync( AuthenticationIDs = new List { "6c02aeb1-775e-418e-870b-1faccd4b2c0f", - "947ac9c4-7e58-4c87-b1e7-14a68e99699a" + "947ac9c4-7e58-4c87-b1e7-14a68e99699a", }, } ); @@ -1362,7 +1362,7 @@ await client.SearchDestinationsAsync( DestinationIDs = new List { "6c02aeb1-775e-418e-870b-1faccd4b2c0f", - "947ac9c4-7e58-4c87-b1e7-14a68e99699a" + "947ac9c4-7e58-4c87-b1e7-14a68e99699a", }, } ); @@ -1386,7 +1386,7 @@ await client.SearchSourcesAsync( SourceIDs = new List { "6c02aeb1-775e-418e-870b-1faccd4b2c0f", - "947ac9c4-7e58-4c87-b1e7-14a68e99699a" + "947ac9c4-7e58-4c87-b1e7-14a68e99699a", }, } ); @@ -1411,7 +1411,7 @@ await client.SearchTasksAsync( { "6c02aeb1-775e-418e-870b-1faccd4b2c0f", "947ac9c4-7e58-4c87-b1e7-14a68e99699a", - "76ab4c2a-ce17-496f-b7a6-506dc59ee498" + "76ab4c2a-ce17-496f-b7a6-506dc59ee498", }, } ); @@ -1436,7 +1436,7 @@ await client.SearchTasksV1Async( { "6c02aeb1-775e-418e-870b-1faccd4b2c0f", "947ac9c4-7e58-4c87-b1e7-14a68e99699a", - "76ab4c2a-ce17-496f-b7a6-506dc59ee498" + "76ab4c2a-ce17-496f-b7a6-506dc59ee498", }, } ); @@ -1461,7 +1461,7 @@ await client.SearchTransformationsAsync( { "6c02aeb1-775e-418e-870b-1faccd4b2c0f", "947ac9c4-7e58-4c87-b1e7-14a68e99699a", - "76ab4c2a-ce17-496f-b7a6-506dc59ee498" + "76ab4c2a-ce17-496f-b7a6-506dc59ee498", }, } ); @@ -1530,7 +1530,7 @@ await client.TryTransformationAsync( ClientSecret = "mySecret", } ), - } + }, }, } ); @@ -1590,7 +1590,7 @@ await client.TryTransformationBeforeUpdateAsync( ClientSecret = "mySecret", } ), - } + }, }, } ); @@ -1610,7 +1610,7 @@ public async Task UpdateAuthenticationTest() { await client.UpdateAuthenticationAsync( "6c02aeb1-775e-418e-870b-1faccd4b2c0f", - new AuthenticationUpdate { Name = "newName", } + new AuthenticationUpdate { Name = "newName" } ); var req = _echo.LastResponse; @@ -1624,7 +1624,7 @@ public async Task UpdateDestinationTest() { await client.UpdateDestinationAsync( "6c02aeb1-775e-418e-870b-1faccd4b2c0f", - new DestinationUpdate { Name = "newName", } + new DestinationUpdate { Name = "newName" } ); var req = _echo.LastResponse; @@ -1638,7 +1638,7 @@ public async Task UpdateSourceTest() { await client.UpdateSourceAsync( "6c02aeb1-775e-418e-870b-1faccd4b2c0f", - new SourceUpdate { Name = "newName", } + new SourceUpdate { Name = "newName" } ); var req = _echo.LastResponse; @@ -1652,7 +1652,7 @@ public async Task UpdateTaskTest() { await client.UpdateTaskAsync( "6c02aeb1-775e-418e-870b-1faccd4b2c0f", - new TaskUpdate { Enabled = false, Cron = "* * * * *", } + new TaskUpdate { Enabled = false, Cron = "* * * * *" } ); var req = _echo.LastResponse; @@ -1670,7 +1670,7 @@ public async Task UpdateTaskV1Test() { await client.UpdateTaskV1Async( "6c02aeb1-775e-418e-870b-1faccd4b2c0f", - new TaskUpdateV1 { Enabled = false, } + new TaskUpdateV1 { Enabled = false } ); var req = _echo.LastResponse; @@ -1738,7 +1738,7 @@ public async Task ValidateSourceBeforeUpdateTest() { await client.ValidateSourceBeforeUpdateAsync( "6c02aeb1-775e-418e-870b-1faccd4b2c0f", - new SourceUpdate { Name = "newName", } + new SourceUpdate { Name = "newName" } ); var req = _echo.LastResponse; diff --git a/tests/output/csharp/src/generated/requests/Insights.test.cs b/tests/output/csharp/src/generated/requests/Insights.test.cs index bcb66dc18cc..bea87c8464a 100644 --- a/tests/output/csharp/src/generated/requests/Insights.test.cs +++ b/tests/output/csharp/src/generated/requests/Insights.test.cs @@ -549,7 +549,7 @@ await client.PushEventsAsync( QueryID = "43b15df305339e827f0ac0bdc5ebcaa7", Positions = new List { 7, 6 }, } - ) + ), }, } ); @@ -596,7 +596,7 @@ await client.PushEventsAsync( Timestamp = 1726272000000L, ObjectIDs = new List { "9780545139700", "9780439784542" }, } - ) + ), }, } ); @@ -631,7 +631,7 @@ await client.PushEventsAsync( ObjectIDs = new List { "9780545139700", "9780439784542" }, QueryID = "43b15df305339e827f0ac0bdc5ebcaa7", } - ) + ), }, } ); @@ -665,7 +665,7 @@ await client.PushEventsAsync( Timestamp = 1641290601962L, ObjectIDs = new List { "9780545139700", "9780439784542" }, } - ) + ), }, } ); @@ -713,11 +713,11 @@ await client.PushEventsAsync( Price = new Price("8$"), Quantity = 7, Discount = new Discount("30%"), - } + }, }, Currency = "USD", } - ) + ), }, } ); diff --git a/tests/output/csharp/src/generated/requests/Personalization.test.cs b/tests/output/csharp/src/generated/requests/Personalization.test.cs index e01a6ee50c8..19df9bc2274 100644 --- a/tests/output/csharp/src/generated/requests/Personalization.test.cs +++ b/tests/output/csharp/src/generated/requests/Personalization.test.cs @@ -563,11 +563,11 @@ await client.SetPersonalizationStrategyAsync( Score = 42, EventName = "Algolia", EventType = Enum.Parse("Click"), - } + }, }, FacetScoring = new List { - new FacetScoring { Score = 42, FacetName = "Event", } + new FacetScoring { Score = 42, FacetName = "Event" }, }, PersonalizationImpact = 42, } diff --git a/tests/output/csharp/src/generated/requests/QuerySuggestions.test.cs b/tests/output/csharp/src/generated/requests/QuerySuggestions.test.cs index 47dbba515a9..bcf596ac807 100644 --- a/tests/output/csharp/src/generated/requests/QuerySuggestions.test.cs +++ b/tests/output/csharp/src/generated/requests/QuerySuggestions.test.cs @@ -38,13 +38,13 @@ await client.CreateConfigAsync( new SourceIndex { IndexName = "testIndex", - Facets = new List { new Facet { Attribute = "test", } }, + Facets = new List { new Facet { Attribute = "test" } }, Generate = new List> { new List { "facetA", "facetB" }, - new List { "facetC" } + new List { "facetC" }, }, - } + }, }, Languages = new Languages(new List { "french" }), Exclude = new List { "test" }, @@ -619,13 +619,13 @@ await client.UpdateConfigAsync( new SourceIndex { IndexName = "testIndex", - Facets = new List { new Facet { Attribute = "test", } }, + Facets = new List { new Facet { Attribute = "test" } }, Generate = new List> { new List { "facetA", "facetB" }, - new List { "facetC" } + new List { "facetC" }, }, - } + }, }, Languages = new Languages(new List { "french" }), Exclude = new List { "test" }, diff --git a/tests/output/csharp/src/generated/requests/Recommend.test.cs b/tests/output/csharp/src/generated/requests/Recommend.test.cs index 6cea5dd9f19..fc8b6c450c7 100644 --- a/tests/output/csharp/src/generated/requests/Recommend.test.cs +++ b/tests/output/csharp/src/generated/requests/Recommend.test.cs @@ -578,7 +578,7 @@ await client.GetRecommendationsAsync( Model = Enum.Parse("RelatedProducts"), Threshold = 42.1, } - ) + ), }, } ); @@ -624,7 +624,7 @@ await client.GetRecommendationsAsync( ), }, } - ) + ), }, } ); @@ -656,7 +656,7 @@ await client.GetRecommendationsAsync( FacetName = "facet", FacetValue = "value", } - ) + ), }, } ); @@ -703,7 +703,7 @@ await client.GetRecommendationsAsync( ), }, } - ) + ), }, } ); @@ -743,7 +743,7 @@ await client.GetRecommendationsAsync( Model = Enum.Parse("RelatedProducts"), Threshold = 21.7, } - ) + ), }, } ); @@ -813,7 +813,7 @@ await client.GetRecommendationsAsync( ), }, } - ) + ), }, } ); @@ -844,7 +844,7 @@ await client.GetRecommendationsAsync( Model = Enum.Parse("BoughtTogether"), Threshold = 42.7, } - ) + ), }, } ); diff --git a/tests/output/csharp/src/generated/requests/Search.test.cs b/tests/output/csharp/src/generated/requests/Search.test.cs index 9716c6d7073..16f50d43b7e 100644 --- a/tests/output/csharp/src/generated/requests/Search.test.cs +++ b/tests/output/csharp/src/generated/requests/Search.test.cs @@ -69,7 +69,7 @@ await client.AddOrUpdateObjectAsync( public async Task AppendSourceTest() { await client.AppendSourceAsync( - new Source { VarSource = "theSource", Description = "theDescription", } + new Source { VarSource = "theSource", Description = "theDescription" } ); var req = _echo.LastResponse; @@ -85,7 +85,7 @@ await client.AppendSourceAsync( [Fact(DisplayName = "assignUserId")] public async Task AssignUserIdTest() { - await client.AssignUserIdAsync("userID", new AssignUserIdParams { Cluster = "theCluster", }); + await client.AssignUserIdAsync("userID", new AssignUserIdParams { Cluster = "theCluster" }); var req = _echo.LastResponse; Assert.Equal("/1/clusters/mapping", req.Path); @@ -112,7 +112,7 @@ public async Task AssignUserIdTest1() { await client.AssignUserIdAsync( "user id with spaces", - new AssignUserIdParams { Cluster = "cluster with spaces", } + new AssignUserIdParams { Cluster = "cluster with spaces" } ); var req = _echo.LastResponse; @@ -153,7 +153,7 @@ await client.BatchAsync( { Action = Enum.Parse("AddObject"), Body = new Dictionary { { "key", "baz" }, { "foo", "2" } }, - } + }, }, } ); @@ -181,7 +181,7 @@ await client.BatchAsync( { Action = Enum.Parse("Clear"), Body = new Dictionary { { "key", "value" } }, - } + }, }, } ); @@ -209,7 +209,7 @@ await client.BatchAsync( { Action = Enum.Parse("Delete"), Body = new Dictionary { { "key", "value" } }, - } + }, }, } ); @@ -237,7 +237,7 @@ await client.BatchAsync( { Action = Enum.Parse("DeleteObject"), Body = new Dictionary { { "key", "value" } }, - } + }, }, } ); @@ -265,7 +265,7 @@ await client.BatchAsync( { Action = Enum.Parse("PartialUpdateObject"), Body = new Dictionary { { "key", "value" } }, - } + }, }, } ); @@ -293,7 +293,7 @@ await client.BatchAsync( { Action = Enum.Parse("PartialUpdateObjectNoCreate"), Body = new Dictionary { { "key", "value" } }, - } + }, }, } ); @@ -321,7 +321,7 @@ await client.BatchAsync( { Action = Enum.Parse("UpdateObject"), Body = new Dictionary { { "key", "value" } }, - } + }, }, } ); @@ -390,7 +390,7 @@ await client.BatchDictionaryEntriesAsync( Decomposition = new List { "trust", "algolia" }, State = Enum.Parse("Enabled"), }, - } + }, }, } ); @@ -418,8 +418,8 @@ await client.BatchDictionaryEntriesAsync( new BatchDictionaryEntriesRequest { Action = Enum.Parse("DeleteEntry"), - Body = new DictionaryEntry { ObjectID = "1", }, - } + Body = new DictionaryEntry { ObjectID = "1" }, + }, }, } ); @@ -450,9 +450,9 @@ await client.BatchDictionaryEntriesAsync( { ObjectID = "1", Language = Enum.Parse("En"), - AdditionalProperties = new Dictionary { { "additional", "try me" }, } + AdditionalProperties = new Dictionary { { "additional", "try me" } }, }, - } + }, }, } ); @@ -509,7 +509,7 @@ public async Task BrowseTest2() { await client.BrowseAsync( "indexName", - new BrowseParams(new BrowseParamsObject { Cursor = "test", }) + new BrowseParams(new BrowseParamsObject { Cursor = "test" }) ); var req = _echo.LastResponse; @@ -1056,7 +1056,7 @@ public async Task DeleteApiKeyTest() [Fact(DisplayName = "deleteBy")] public async Task DeleteByTest() { - await client.DeleteByAsync("theIndexName", new DeleteByParams { Filters = "brand:brandName", }); + await client.DeleteByAsync("theIndexName", new DeleteByParams { Filters = "brand:brandName" }); var req = _echo.LastResponse; Assert.Equal("/1/indexes/theIndexName/deleteByQuery", req.Path); @@ -1250,7 +1250,7 @@ await client.GetObjectsAsync( AttributesToRetrieve = new List { "attr1", "attr2" }, ObjectID = "uniqueID", IndexName = "theIndexName", - } + }, }, } ); @@ -1482,7 +1482,7 @@ await client.MultipleBatchAsync( Action = Enum.Parse("AddObject"), Body = new Dictionary { { "key", "value" } }, IndexName = "theIndexName", - } + }, }, } ); @@ -1509,7 +1509,7 @@ await client.OperationIndexAsync( Scope = new List { Enum.Parse("Rules"), - Enum.Parse("Settings") + Enum.Parse("Settings"), }, } ); @@ -1628,7 +1628,7 @@ await client.PartialUpdateObjectAsync( { "attributeId", new List { "one", "two", "three" } - } + }, } ); @@ -1653,7 +1653,7 @@ await client.PartialUpdateObjectAsync( { "attributeId", new Dictionary { { "nested", "value" } } - } + }, } ); @@ -1684,7 +1684,7 @@ public async Task ReplaceSourcesTest() await client.ReplaceSourcesAsync( new List { - new Source { VarSource = "theSource", Description = "theDescription", } + new Source { VarSource = "theSource", Description = "theDescription" }, } ); @@ -1738,7 +1738,7 @@ await client.SaveRuleAsync( ObjectID = "id1", Conditions = new List { - new Condition { Pattern = "apple", Anchoring = Enum.Parse("Contains"), } + new Condition { Pattern = "apple", Anchoring = Enum.Parse("Contains") }, }, } ); @@ -1770,7 +1770,7 @@ await client.SaveRuleAsync( Anchoring = Enum.Parse("Contains"), Alternatives = false, Context = "search", - } + }, }, Consequence = new Consequence { @@ -1794,31 +1794,31 @@ await client.SaveRuleAsync( Type = Enum.Parse("Replace"), Delete = "abc", Insert = "cde", - } + }, }, } ), }, - Hide = new List { new ConsequenceHide { ObjectID = "321", } }, + Hide = new List { new ConsequenceHide { ObjectID = "321" } }, FilterPromotes = false, UserData = new Dictionary { { "algolia", "aloglia" } }, Promote = new List { - new Promote(new PromoteObjectID { ObjectID = "abc", Position = 3, }), + new Promote(new PromoteObjectID { ObjectID = "abc", Position = 3 }), new Promote( new PromoteObjectIDs { ObjectIDs = new List { "abc", "def" }, Position = 1, } - ) + ), }, }, Description = "test", Enabled = true, Validity = new List { - new TimeRange { From = 1656670273, Until = 1656670277, } + new TimeRange { From = 1656670273, Until = 1656670277 }, }, }, true @@ -1859,7 +1859,7 @@ await client.SaveRulesAsync( ObjectID = "a-rule-id", Conditions = new List { - new Condition { Pattern = "smartphone", Anchoring = Enum.Parse("Contains"), } + new Condition { Pattern = "smartphone", Anchoring = Enum.Parse("Contains") }, }, }, new Rule @@ -1867,9 +1867,9 @@ await client.SaveRulesAsync( ObjectID = "a-second-rule-id", Conditions = new List { - new Condition { Pattern = "apple", Anchoring = Enum.Parse("Contains"), } + new Condition { Pattern = "apple", Anchoring = Enum.Parse("Contains") }, }, - } + }, }, false, true @@ -1916,7 +1916,7 @@ await client.SaveRulesAsync( Anchoring = Enum.Parse("Contains"), Alternatives = false, Context = "search", - } + }, }, Consequence = new Consequence { @@ -1940,33 +1940,33 @@ await client.SaveRulesAsync( Type = Enum.Parse("Replace"), Delete = "abc", Insert = "cde", - } + }, }, } ), }, - Hide = new List { new ConsequenceHide { ObjectID = "321", } }, + Hide = new List { new ConsequenceHide { ObjectID = "321" } }, FilterPromotes = false, UserData = new Dictionary { { "algolia", "aloglia" } }, Promote = new List { - new Promote(new PromoteObjectID { ObjectID = "abc", Position = 3, }), + new Promote(new PromoteObjectID { ObjectID = "abc", Position = 3 }), new Promote( new PromoteObjectIDs { ObjectIDs = new List { "abc", "def" }, Position = 1, } - ) + ), }, }, Description = "test", Enabled = true, Validity = new List { - new TimeRange { From = 1656670273, Until = 1656670277, } + new TimeRange { From = 1656670273, Until = 1656670277 }, }, - } + }, }, true, true @@ -2052,7 +2052,7 @@ await client.SaveSynonymsAsync( Type = Enum.Parse("Onewaysynonym"), Input = "iphone", Synonyms = new List { "ephone", "aphone", "yphone" }, - } + }, }, true, true @@ -2096,7 +2096,7 @@ await client.SearchAsync( Query = "", HitsPerPage = 50, } - ) + ), }, } ); @@ -2126,7 +2126,7 @@ await client.SearchAsync( Query = "", Filters = "actor:Scarlett Johansson", } - ) + ), }, } ); @@ -2156,7 +2156,7 @@ await client.SearchAsync( Query = "", Filters = "actor:Tom Cruise OR actor:Scarlett Johansson", } - ) + ), }, } ); @@ -2186,7 +2186,7 @@ await client.SearchAsync( Query = "", Filters = "NOT actor:Nicolas Cage", } - ) + ), }, } ); @@ -2209,7 +2209,7 @@ await client.SearchAsync( { Requests = new List { - new SearchQuery(new SearchForHits { IndexName = "cts_e2e_search_empty_index", }) + new SearchQuery(new SearchForHits { IndexName = "cts_e2e_search_empty_index" }), }, } ); @@ -2241,7 +2241,7 @@ await client.SearchAsync( AttributesToHighlight = new List { "*" }, AttributesToRetrieve = new List { "*" }, } - ) + ), }, } ); @@ -2271,7 +2271,7 @@ await client.SearchAsync( Query = "", Facets = new List { "author", "genre" }, } - ) + ), }, } ); @@ -2301,7 +2301,7 @@ await client.SearchAsync( Query = "", Facets = new List { "*" }, } - ) + ), }, } ); @@ -2331,7 +2331,7 @@ await client.SearchAsync( Type = Enum.Parse("Facet"), Facet = "editor", } - ) + ), }, Strategy = Enum.Parse("StopIfEnoughMatches"), } @@ -2363,7 +2363,7 @@ await client.SearchAsync( HitsPerPage = 50, Type = Enum.Parse("Default"), } - ) + ), }, } ); @@ -2396,7 +2396,7 @@ await client.SearchAsync( Query = "theQuery", MaxFacetHits = 50, } - ) + ), }, Strategy = Enum.Parse("StopIfEnoughMatches"), } @@ -2422,7 +2422,7 @@ await client.SearchAsync( { Requests = new List { - new SearchQuery(new SearchForHits { IndexName = "theIndexName", }), + new SearchQuery(new SearchForHits { IndexName = "theIndexName" }), new SearchQuery( new SearchForFacets { @@ -2437,7 +2437,7 @@ await client.SearchAsync( IndexName = "theIndexName", Type = Enum.Parse("Default"), } - ) + ), }, Strategy = Enum.Parse("StopIfEnoughMatches"), } @@ -2480,7 +2480,7 @@ await client.SearchAsync( HitsPerPage = 50, Type = Enum.Parse("Default"), } - ) + ), }, Strategy = Enum.Parse("StopIfEnoughMatches"), } @@ -2529,9 +2529,9 @@ await client.SearchAsync( new FacetFilters("mySearch:filters"), new FacetFilters( new List { new FacetFilters("mySearch:filters") } - ) + ), } - ) + ), } ), ReRankingApplyFilter = new ReRankingApplyFilter( @@ -2540,14 +2540,14 @@ await client.SearchAsync( new ReRankingApplyFilter("mySearch:filters"), new ReRankingApplyFilter( new List { new ReRankingApplyFilter("mySearch:filters") } - ) + ), } ), TagFilters = new TagFilters( new List { new TagFilters("mySearch:filters"), - new TagFilters(new List { new TagFilters("mySearch:filters") }) + new TagFilters(new List { new TagFilters("mySearch:filters") }), } ), NumericFilters = new NumericFilters( @@ -2556,7 +2556,7 @@ await client.SearchAsync( new NumericFilters("mySearch:filters"), new NumericFilters( new List { new NumericFilters("mySearch:filters") } - ) + ), } ), OptionalFilters = new OptionalFilters( @@ -2565,11 +2565,11 @@ await client.SearchAsync( new OptionalFilters("mySearch:filters"), new OptionalFilters( new List { new OptionalFilters("mySearch:filters") } - ) + ), } ), } - ) + ), }, } ); @@ -2607,7 +2607,7 @@ await client.SearchAsync( new List { new FacetFilters("editor:'visual studio'"), - new FacetFilters("editor:neovim") + new FacetFilters("editor:neovim"), } ), } @@ -2620,7 +2620,7 @@ await client.SearchAsync( new List { new FacetFilters("editor:'visual studio'"), - new FacetFilters(new List { new FacetFilters("editor:neovim") }) + new FacetFilters(new List { new FacetFilters("editor:neovim") }), } ), } @@ -2637,13 +2637,15 @@ await client.SearchAsync( new List { new FacetFilters("editor:neovim"), - new FacetFilters(new List { new FacetFilters("editor:goland") }) + new FacetFilters( + new List { new FacetFilters("editor:goland") } + ), } - ) + ), } ), } - ) + ), }, } ); @@ -2672,12 +2674,12 @@ await client.SearchAsync( AdvancedSyntax = true, AdvancedSyntaxFeatures = new List { - Enum.Parse("ExactPhrase") + Enum.Parse("ExactPhrase"), }, AllowTyposOnNumericTokens = true, AlternativesAsExact = new List { - Enum.Parse("MultiWordsSynonym") + Enum.Parse("MultiWordsSynonym"), }, Analytics = true, AnalyticsTags = new List { "" }, @@ -2713,12 +2715,12 @@ await client.SearchAsync( InsideBoundingBox = new List> { new List { 47.3165, 4.9665, 47.3424, 5.0201 }, - new List { 40.9234, 2.1185, 38.643, 1.9916 } + new List { 40.9234, 2.1185, 38.643, 1.9916 }, }, InsidePolygon = new List> { new List { 47.3165, 4.9665, 47.3424, 5.0201, 47.32, 4.9 }, - new List { 40.9234, 2.1185, 38.643, 1.9916, 39.2587, 2.0104 } + new List { 40.9234, 2.1185, 38.643, 1.9916, 39.2587, 2.0104 }, }, KeepDiacriticsOnCharacters = "", Length = 1, @@ -2729,7 +2731,7 @@ await client.SearchAsync( MinimumAroundRadius = 1, NaturalLanguages = new List { - Enum.Parse("Fr") + Enum.Parse("Fr"), }, NumericFilters = new NumericFilters( new List { new NumericFilters("") } @@ -2769,7 +2771,7 @@ await client.SearchAsync( Order = new List { "b" }, SortRemainingBy = Enum.Parse("Count"), } - } + }, }, }, }, @@ -2788,7 +2790,7 @@ await client.SearchAsync( TypoTolerance = new TypoTolerance(Enum.Parse("Min")), UserToken = "", } - ) + ), }, } ); @@ -2808,7 +2810,7 @@ public async Task SearchDictionaryEntriesTest() { await client.SearchDictionaryEntriesAsync( Enum.Parse("Stopwords"), - new SearchDictionaryEntriesParams { Query = "about", } + new SearchDictionaryEntriesParams { Query = "about" } ); var req = _echo.LastResponse; @@ -2879,7 +2881,7 @@ await client.SearchForFacetValuesAsync( [Fact(DisplayName = "searchRules")] public async Task SearchRulesTest() { - await client.SearchRulesAsync("cts_e2e_browse", new SearchRulesParams { Query = "zorro", }); + await client.SearchRulesAsync("cts_e2e_browse", new SearchRulesParams { Query = "zorro" }); var req = _echo.LastResponse; Assert.Equal("/1/indexes/cts_e2e_browse/rules/search", req.Path); @@ -3030,7 +3032,7 @@ await client.SetDictionarySettingsAsync( { { "fr", false }, { "en", false }, - { "ru", true } + { "ru", true }, }, }, } @@ -3058,7 +3060,7 @@ await client.SetDictionarySettingsAsync( { { "fr", false }, { "en", false }, - { "ru", true } + { "ru", true }, }, Stopwords = new Dictionary { { "fr", false } }, Compounds = new Dictionary { { "ru", true } }, @@ -3087,7 +3089,7 @@ await client.SetSettingsAsync( { "actor", "filterOnly(category)", - "searchable(publisher)" + "searchable(publisher)", }, } ); @@ -3107,7 +3109,7 @@ public async Task SetSettingsTest1() { await client.SetSettingsAsync( "cts_e2e_settings", - new IndexSettings { PaginationLimitedTo = 10, }, + new IndexSettings { PaginationLimitedTo = 10 }, true ); @@ -3139,7 +3141,7 @@ public async Task SetSettingsTest2() { await client.SetSettingsAsync( "theIndexName", - new IndexSettings { TypoTolerance = new TypoTolerance(true), }, + new IndexSettings { TypoTolerance = new TypoTolerance(true) }, true ); @@ -3171,10 +3173,7 @@ public async Task SetSettingsTest3() { await client.SetSettingsAsync( "theIndexName", - new IndexSettings - { - TypoTolerance = new TypoTolerance(Enum.Parse("Min")), - }, + new IndexSettings { TypoTolerance = new TypoTolerance(Enum.Parse("Min")) }, true ); @@ -3206,7 +3205,7 @@ public async Task SetSettingsTest4() { await client.SetSettingsAsync( "theIndexName", - new IndexSettings { IgnorePlurals = new IgnorePlurals(true), }, + new IndexSettings { IgnorePlurals = new IgnorePlurals(true) }, true ); @@ -3275,7 +3274,7 @@ public async Task SetSettingsTest6() { await client.SetSettingsAsync( "theIndexName", - new IndexSettings { RemoveStopWords = new RemoveStopWords(true), }, + new IndexSettings { RemoveStopWords = new RemoveStopWords(true) }, true ); @@ -3344,7 +3343,7 @@ public async Task SetSettingsTest8() { await client.SetSettingsAsync( "theIndexName", - new IndexSettings { Distinct = new Distinct(true), }, + new IndexSettings { Distinct = new Distinct(true) }, true ); @@ -3372,7 +3371,7 @@ public async Task SetSettingsTest9() { await client.SetSettingsAsync( "theIndexName", - new IndexSettings { Distinct = new Distinct(1), }, + new IndexSettings { Distinct = new Distinct(1) }, true ); @@ -3405,13 +3404,13 @@ await client.SetSettingsAsync( AdvancedSyntax = true, AdvancedSyntaxFeatures = new List { - Enum.Parse("ExactPhrase") + Enum.Parse("ExactPhrase"), }, AllowCompressionOfIntegerArray = true, AllowTyposOnNumericTokens = true, AlternativesAsExact = new List { - Enum.Parse("SingleWordSynonym") + Enum.Parse("SingleWordSynonym"), }, AttributeCriteriaComputedByMinProximity = true, AttributeForDistinct = "test", @@ -3426,7 +3425,7 @@ await client.SetSettingsAsync( { "algolia", new Dictionary { { "aloglia", "aglolia" } } - } + }, }, CustomRanking = new List { "algolia" }, DecompoundQuery = false, @@ -3479,7 +3478,7 @@ await client.SetSettingsAsync( Order = new List { "b" }, SortRemainingBy = Enum.Parse("Count"), } - } + }, }, }, }, @@ -3488,7 +3487,7 @@ await client.SetSettingsAsync( ResponseFields = new List { "algolia" }, RestrictHighlightAndSnippetArrays = true, SearchableAttributes = new List { "foo" }, - SemanticSearch = new SemanticSearch { EventSources = new List { "foo" }, }, + SemanticSearch = new SemanticSearch { EventSources = new List { "foo" } }, SeparatorsToIndex = "bar", SnippetEllipsisText = "---", SortFacetValuesBy = "date", diff --git a/tests/output/javascript/package.json b/tests/output/javascript/package.json index 2d3063386a7..3490b56d800 100644 --- a/tests/output/javascript/package.json +++ b/tests/output/javascript/package.json @@ -19,7 +19,7 @@ "algoliasearch": "link:../../../clients/algoliasearch-client-javascript/packages/algoliasearch" }, "devDependencies": { - "@types/jest": "29.5.12", + "@types/jest": "29.5.13", "@types/node": "22.5.1", "dotenv": "16.4.5", "jest": "29.7.0",