diff --git a/clients/algoliasearch-client-csharp/algoliasearch/Models/Ingestion/AuthInput.cs b/clients/algoliasearch-client-csharp/algoliasearch/Models/Ingestion/AuthInput.cs index 34953826db7..595953151c8 100644 --- a/clients/algoliasearch-client-csharp/algoliasearch/Models/Ingestion/AuthInput.cs +++ b/clients/algoliasearch-client-csharp/algoliasearch/Models/Ingestion/AuthInput.cs @@ -80,6 +80,16 @@ public AuthInput(AuthAlgoliaInsights actualInstance) ActualInstance = actualInstance ?? throw new ArgumentException("Invalid instance found. Must not be null."); } + /// + /// Initializes a new instance of the AuthInput class + /// with a Dictionary{string, string} + /// + /// An instance of Dictionary<string, string>. + public AuthInput(Dictionary actualInstance) + { + ActualInstance = actualInstance; + } + /// /// Gets or Sets ActualInstance @@ -146,6 +156,16 @@ public AuthAlgoliaInsights AsAuthAlgoliaInsights() return (AuthAlgoliaInsights)ActualInstance; } + /// + /// Get the actual instance of `Dictionary{string, string}`. If the actual instance is not `Dictionary{string, string}`, + /// the InvalidClassException will be thrown + /// + /// An instance of Dictionary<string, string> + public Dictionary AsDictionaryString() + { + return (Dictionary)ActualInstance; + } + /// /// Check if the actual instance is of `AuthOAuth` type. @@ -201,6 +221,15 @@ public bool IsAuthAlgoliaInsights() return ActualInstance.GetType() == typeof(AuthAlgoliaInsights); } + /// + /// Check if the actual instance is of `Dictionary{string, string}` type. + /// + /// Whether or not the instance is the type + public bool IsDictionaryString() + { + return ActualInstance.GetType() == typeof(Dictionary); + } + /// /// Returns the string presentation of the object /// @@ -357,6 +386,18 @@ public override AuthInput Read(ref Utf8JsonReader reader, Type typeToConvert, Js System.Diagnostics.Debug.WriteLine($"Failed to deserialize into AuthAlgoliaInsights: {exception}"); } } + if (root.ValueKind == JsonValueKind.Object) + { + try + { + return new AuthInput(jsonDocument.Deserialize>(JsonConfig.Options)); + } + catch (Exception exception) + { + // deserialization failed, try the next one + System.Diagnostics.Debug.WriteLine($"Failed to deserialize into Dictionary: {exception}"); + } + } throw new InvalidDataException($"The JSON string cannot be deserialized into any schema defined."); } diff --git a/clients/algoliasearch-client-csharp/algoliasearch/Models/Ingestion/AuthenticationType.cs b/clients/algoliasearch-client-csharp/algoliasearch/Models/Ingestion/AuthenticationType.cs index 444a8d24759..059c5528a0f 100644 --- a/clients/algoliasearch-client-csharp/algoliasearch/Models/Ingestion/AuthenticationType.cs +++ b/clients/algoliasearch-client-csharp/algoliasearch/Models/Ingestion/AuthenticationType.cs @@ -52,6 +52,12 @@ public enum AuthenticationType /// Enum AlgoliaInsights for value: algoliaInsights /// [JsonPropertyName("algoliaInsights")] - AlgoliaInsights = 6 + AlgoliaInsights = 6, + + /// + /// Enum Secrets for value: secrets + /// + [JsonPropertyName("secrets")] + Secrets = 7 } diff --git a/clients/algoliasearch-client-go/algolia/abtesting/client.go b/clients/algoliasearch-client-go/algolia/abtesting/client.go index aabfeb0b0ee..7d5be59791a 100644 --- a/clients/algoliasearch-client-go/algolia/abtesting/client.go +++ b/clients/algoliasearch-client-go/algolia/abtesting/client.go @@ -218,14 +218,14 @@ func reportError(format string, a ...any) error { } // A wrapper for strict JSON decoding. -func newStrictDecoder(data []byte) *json.Decoder { +func newStrictDecoder(data []byte) *json.Decoder { dec := json.NewDecoder(bytes.NewBuffer(data)) dec.DisallowUnknownFields() return dec } // A wrapper for validating a struct, returns nil if value is not a struct. -func validateStruct(v any) error { +func validateStruct(v any) error { err := validator.New().Struct(v) validationErrors, ok := err.(validator.ValidationErrors) if ok && len(validationErrors) > 0 { diff --git a/clients/algoliasearch-client-go/algolia/analytics/client.go b/clients/algoliasearch-client-go/algolia/analytics/client.go index 3f3397fa07c..7ee32a7bb9c 100644 --- a/clients/algoliasearch-client-go/algolia/analytics/client.go +++ b/clients/algoliasearch-client-go/algolia/analytics/client.go @@ -218,14 +218,14 @@ func reportError(format string, a ...any) error { } // A wrapper for strict JSON decoding. -func newStrictDecoder(data []byte) *json.Decoder { +func newStrictDecoder(data []byte) *json.Decoder { dec := json.NewDecoder(bytes.NewBuffer(data)) dec.DisallowUnknownFields() return dec } // A wrapper for validating a struct, returns nil if value is not a struct. -func validateStruct(v any) error { +func validateStruct(v any) error { err := validator.New().Struct(v) validationErrors, ok := err.(validator.ValidationErrors) if ok && len(validationErrors) > 0 { diff --git a/clients/algoliasearch-client-go/algolia/ingestion/model_auth_input.go b/clients/algoliasearch-client-go/algolia/ingestion/model_auth_input.go index 650f0a6a31a..8b7756c4df7 100644 --- a/clients/algoliasearch-client-go/algolia/ingestion/model_auth_input.go +++ b/clients/algoliasearch-client-go/algolia/ingestion/model_auth_input.go @@ -16,6 +16,7 @@ type AuthInput struct { AuthBasic *AuthBasic AuthGoogleServiceAccount *AuthGoogleServiceAccount AuthOAuth *AuthOAuth + MapmapOfStringstring *map[string]string } // AuthOAuthAsAuthInput is a convenience function that returns AuthOAuth wrapped in AuthInput. @@ -60,6 +61,13 @@ func AuthAlgoliaInsightsAsAuthInput(v *AuthAlgoliaInsights) *AuthInput { } } +// map[string]stringAsAuthInput is a convenience function that returns map[string]string wrapped in AuthInput. +func MapmapOfStringstringAsAuthInput(v map[string]string) *AuthInput { + return &AuthInput{ + MapmapOfStringstring: &v, + } +} + // Unmarshal JSON data into one of the pointers in the struct. func (dst *AuthInput) UnmarshalJSON(data []byte) error { var err error @@ -116,6 +124,13 @@ func (dst *AuthInput) UnmarshalJSON(data []byte) error { } else { dst.AuthAlgoliaInsights = nil } + // try to unmarshal data into MapmapOfStringstring + err = newStrictDecoder(data).Decode(&dst.MapmapOfStringstring) + if err == nil && validateStruct(dst.MapmapOfStringstring) == nil { + return nil // found the correct type + } else { + dst.MapmapOfStringstring = nil + } return fmt.Errorf("Data failed to match schemas in oneOf(AuthInput)") } @@ -176,6 +191,15 @@ func (src AuthInput) MarshalJSON() ([]byte, error) { return serialized, nil } + if src.MapmapOfStringstring != nil { + serialized, err := json.Marshal(&src.MapmapOfStringstring) + if err != nil { + return nil, fmt.Errorf("failed to unmarshal one of MapmapOfStringstring of AuthInput: %w", err) + } + + return serialized, nil + } + return nil, nil // no data in oneOf schemas } @@ -205,6 +229,10 @@ func (obj AuthInput) GetActualInstance() any { return *obj.AuthOAuth } + if obj.MapmapOfStringstring != nil { + return *obj.MapmapOfStringstring + } + // all schemas are nil return nil } diff --git a/clients/algoliasearch-client-go/algolia/ingestion/model_authentication_type.go b/clients/algoliasearch-client-go/algolia/ingestion/model_authentication_type.go index 6dedd29e330..1c4c4ff113b 100644 --- a/clients/algoliasearch-client-go/algolia/ingestion/model_authentication_type.go +++ b/clients/algoliasearch-client-go/algolia/ingestion/model_authentication_type.go @@ -17,6 +17,7 @@ const ( AUTHENTICATION_TYPE_OAUTH AuthenticationType = "oauth" AUTHENTICATION_TYPE_ALGOLIA AuthenticationType = "algolia" AUTHENTICATION_TYPE_ALGOLIA_INSIGHTS AuthenticationType = "algoliaInsights" + AUTHENTICATION_TYPE_SECRETS AuthenticationType = "secrets" ) // All allowed values of AuthenticationType enum. @@ -27,6 +28,7 @@ var AllowedAuthenticationTypeEnumValues = []AuthenticationType{ "oauth", "algolia", "algoliaInsights", + "secrets", } func (v *AuthenticationType) UnmarshalJSON(src []byte) error { diff --git a/clients/algoliasearch-client-go/algolia/insights/client.go b/clients/algoliasearch-client-go/algolia/insights/client.go index b1d2d614db9..b66560b2dbd 100644 --- a/clients/algoliasearch-client-go/algolia/insights/client.go +++ b/clients/algoliasearch-client-go/algolia/insights/client.go @@ -218,14 +218,14 @@ func reportError(format string, a ...any) error { } // A wrapper for strict JSON decoding. -func newStrictDecoder(data []byte) *json.Decoder { +func newStrictDecoder(data []byte) *json.Decoder { dec := json.NewDecoder(bytes.NewBuffer(data)) dec.DisallowUnknownFields() return dec } // A wrapper for validating a struct, returns nil if value is not a struct. -func validateStruct(v any) error { +func validateStruct(v any) error { err := validator.New().Struct(v) validationErrors, ok := err.(validator.ValidationErrors) if ok && len(validationErrors) > 0 { diff --git a/clients/algoliasearch-client-go/algolia/monitoring/client.go b/clients/algoliasearch-client-go/algolia/monitoring/client.go index 83df2930293..e85629db413 100644 --- a/clients/algoliasearch-client-go/algolia/monitoring/client.go +++ b/clients/algoliasearch-client-go/algolia/monitoring/client.go @@ -211,14 +211,14 @@ func reportError(format string, a ...any) error { } // A wrapper for strict JSON decoding. -func newStrictDecoder(data []byte) *json.Decoder { +func newStrictDecoder(data []byte) *json.Decoder { dec := json.NewDecoder(bytes.NewBuffer(data)) dec.DisallowUnknownFields() return dec } // A wrapper for validating a struct, returns nil if value is not a struct. -func validateStruct(v any) error { +func validateStruct(v any) error { err := validator.New().Struct(v) validationErrors, ok := err.(validator.ValidationErrors) if ok && len(validationErrors) > 0 { diff --git a/clients/algoliasearch-client-go/algolia/personalization/client.go b/clients/algoliasearch-client-go/algolia/personalization/client.go index 4760b3db51a..eb32eaab0f6 100644 --- a/clients/algoliasearch-client-go/algolia/personalization/client.go +++ b/clients/algoliasearch-client-go/algolia/personalization/client.go @@ -214,14 +214,14 @@ func reportError(format string, a ...any) error { } // A wrapper for strict JSON decoding. -func newStrictDecoder(data []byte) *json.Decoder { +func newStrictDecoder(data []byte) *json.Decoder { dec := json.NewDecoder(bytes.NewBuffer(data)) dec.DisallowUnknownFields() return dec } // A wrapper for validating a struct, returns nil if value is not a struct. -func validateStruct(v any) error { +func validateStruct(v any) error { err := validator.New().Struct(v) validationErrors, ok := err.(validator.ValidationErrors) if ok && len(validationErrors) > 0 { diff --git a/clients/algoliasearch-client-go/algolia/query-suggestions/client.go b/clients/algoliasearch-client-go/algolia/query-suggestions/client.go index 1af67f4e4f4..fdbc5cbcf07 100644 --- a/clients/algoliasearch-client-go/algolia/query-suggestions/client.go +++ b/clients/algoliasearch-client-go/algolia/query-suggestions/client.go @@ -214,14 +214,14 @@ func reportError(format string, a ...any) error { } // A wrapper for strict JSON decoding. -func newStrictDecoder(data []byte) *json.Decoder { +func newStrictDecoder(data []byte) *json.Decoder { dec := json.NewDecoder(bytes.NewBuffer(data)) dec.DisallowUnknownFields() return dec } // A wrapper for validating a struct, returns nil if value is not a struct. -func validateStruct(v any) error { +func validateStruct(v any) error { err := validator.New().Struct(v) validationErrors, ok := err.(validator.ValidationErrors) if ok && len(validationErrors) > 0 { diff --git a/clients/algoliasearch-client-go/algolia/recommend/client.go b/clients/algoliasearch-client-go/algolia/recommend/client.go index 6f789f6b29d..9881472659e 100644 --- a/clients/algoliasearch-client-go/algolia/recommend/client.go +++ b/clients/algoliasearch-client-go/algolia/recommend/client.go @@ -220,14 +220,14 @@ func reportError(format string, a ...any) error { } // A wrapper for strict JSON decoding. -func newStrictDecoder(data []byte) *json.Decoder { +func newStrictDecoder(data []byte) *json.Decoder { dec := json.NewDecoder(bytes.NewBuffer(data)) dec.DisallowUnknownFields() return dec } // A wrapper for validating a struct, returns nil if value is not a struct. -func validateStruct(v any) error { +func validateStruct(v any) error { err := validator.New().Struct(v) validationErrors, ok := err.(validator.ValidationErrors) if ok && len(validationErrors) > 0 { diff --git a/clients/algoliasearch-client-go/algolia/search/api_search.go b/clients/algoliasearch-client-go/algolia/search/api_search.go index 28d9a4c9b79..ad590607d6f 100644 --- a/clients/algoliasearch-client-go/algolia/search/api_search.go +++ b/clients/algoliasearch-client-go/algolia/search/api_search.go @@ -9392,7 +9392,7 @@ func (c *APIClient) WaitForTask( return time.Duration(min(200*count, 5000)) * time.Millisecond }), WithMaxRetries(50)}, opts...) - return CreateIterable( + return CreateIterable( func(*GetTaskResponse, error) (*GetTaskResponse, error) { return c.GetTask(c.NewApiGetTaskRequest(indexName, taskID), toRequestOptions(opts)...) }, @@ -9426,7 +9426,7 @@ func (c *APIClient) WaitForAppTask( return time.Duration(min(200*count, 5000)) * time.Millisecond }), WithMaxRetries(50)}, opts...) - return CreateIterable( + return CreateIterable( func(*GetTaskResponse, error) (*GetTaskResponse, error) { return c.GetAppTask(c.NewApiGetAppTaskRequest(taskID), toRequestOptions(opts)...) }, @@ -9559,7 +9559,7 @@ func (c *APIClient) WaitForApiKey( return time.Duration(min(200*count, 5000)) * time.Millisecond }), WithMaxRetries(50)}, opts...) - return CreateIterable( + return CreateIterable( func(*GetApiKeyResponse, error) (*GetApiKeyResponse, error) { return c.GetApiKey(c.NewApiGetApiKeyRequest(key), toRequestOptions(opts)...) }, @@ -9583,7 +9583,7 @@ func (c *APIClient) BrowseObjects( browseParams BrowseParamsObject, opts ...IterableOption, ) error { - _, err := CreateIterable( + _, err := CreateIterable( func(previousResponse *BrowseResponse, previousErr error) (*BrowseResponse, error) { if previousResponse != nil { browseParams.Cursor = previousResponse.Cursor @@ -9623,7 +9623,7 @@ func (c *APIClient) BrowseRules( hitsPerPage = *searchRulesParams.HitsPerPage } - _, err := CreateIterable( + _, err := CreateIterable( func(previousResponse *SearchRulesResponse, previousErr error) (*SearchRulesResponse, error) { searchRulesParams.HitsPerPage = &hitsPerPage @@ -9673,7 +9673,7 @@ func (c *APIClient) BrowseSynonyms( searchSynonymsParams.Page = utils.ToPtr(int32(0)) } - _, err := CreateIterable( + _, err := CreateIterable( func(previousResponse *SearchSynonymsResponse, previousErr error) (*SearchSynonymsResponse, error) { searchSynonymsParams.HitsPerPage = &hitsPerPage diff --git a/clients/algoliasearch-client-go/algolia/search/client.go b/clients/algoliasearch-client-go/algolia/search/client.go index b39008762c4..efcbf02fc7a 100644 --- a/clients/algoliasearch-client-go/algolia/search/client.go +++ b/clients/algoliasearch-client-go/algolia/search/client.go @@ -220,14 +220,14 @@ func reportError(format string, a ...any) error { } // A wrapper for strict JSON decoding. -func newStrictDecoder(data []byte) *json.Decoder { +func newStrictDecoder(data []byte) *json.Decoder { dec := json.NewDecoder(bytes.NewBuffer(data)) dec.DisallowUnknownFields() return dec } // A wrapper for validating a struct, returns nil if value is not a struct. -func validateStruct(v any) error { +func validateStruct(v any) error { err := validator.New().Struct(v) validationErrors, ok := err.(validator.ValidationErrors) if ok && len(validationErrors) > 0 { diff --git a/clients/algoliasearch-client-java/algoliasearch/src/main/java/com/algolia/model/ingestion/AuthInput.java b/clients/algoliasearch-client-java/algoliasearch/src/main/java/com/algolia/model/ingestion/AuthInput.java index ba6c1f97610..23c64ea253b 100644 --- a/clients/algoliasearch-client-java/algoliasearch/src/main/java/com/algolia/model/ingestion/AuthInput.java +++ b/clients/algoliasearch-client-java/algoliasearch/src/main/java/com/algolia/model/ingestion/AuthInput.java @@ -6,14 +6,44 @@ import com.algolia.exceptions.AlgoliaRuntimeException; import com.fasterxml.jackson.annotation.*; import com.fasterxml.jackson.core.*; +import com.fasterxml.jackson.core.type.TypeReference; import com.fasterxml.jackson.databind.*; import com.fasterxml.jackson.databind.annotation.*; import java.io.IOException; +import java.util.Map; import java.util.logging.Logger; /** AuthInput */ @JsonDeserialize(using = AuthInput.Deserializer.class) public interface AuthInput { + // AuthInput as Map wrapper. + static AuthInput of(Map value) { + return new MapOfStringStringWrapper(value); + } + + // AuthInput as Map wrapper. + @JsonSerialize(using = MapOfStringStringWrapper.Serializer.class) + class MapOfStringStringWrapper implements AuthInput { + + private final Map value; + + MapOfStringStringWrapper(Map value) { + this.value = value; + } + + public Map getValue() { + return value; + } + + static class Serializer extends JsonSerializer { + + @Override + public void serialize(MapOfStringStringWrapper value, JsonGenerator gen, SerializerProvider provider) throws IOException { + gen.writeObject(value.getValue()); + } + } + } + class Deserializer extends JsonDeserializer { private static final Logger LOGGER = Logger.getLogger(Deserializer.class.getName()); @@ -77,6 +107,16 @@ public AuthInput deserialize(JsonParser jp, DeserializationContext ctxt) throws LOGGER.finest("Failed to deserialize oneOf AuthAlgoliaInsights (error: " + e.getMessage() + ") (type: AuthAlgoliaInsights)"); } } + // deserialize Map + if (tree.isObject()) { + try (JsonParser parser = tree.traverse(jp.getCodec())) { + Map value = parser.readValueAs(new TypeReference>() {}); + return new AuthInput.MapOfStringStringWrapper(value); + } catch (Exception e) { + // deserialization failed, continue + LOGGER.finest("Failed to deserialize oneOf Map (error: " + e.getMessage() + ") (type: Map)"); + } + } throw new AlgoliaRuntimeException(String.format("Failed to deserialize json element: %s", tree)); } diff --git a/clients/algoliasearch-client-java/algoliasearch/src/main/java/com/algolia/model/ingestion/AuthenticationType.java b/clients/algoliasearch-client-java/algoliasearch/src/main/java/com/algolia/model/ingestion/AuthenticationType.java index 74177914d5d..7023e85c5c8 100644 --- a/clients/algoliasearch-client-java/algoliasearch/src/main/java/com/algolia/model/ingestion/AuthenticationType.java +++ b/clients/algoliasearch-client-java/algoliasearch/src/main/java/com/algolia/model/ingestion/AuthenticationType.java @@ -20,7 +20,9 @@ public enum AuthenticationType { ALGOLIA("algolia"), - ALGOLIA_INSIGHTS("algoliaInsights"); + ALGOLIA_INSIGHTS("algoliaInsights"), + + SECRETS("secrets"); private final String value; diff --git a/clients/algoliasearch-client-javascript/packages/ingestion/model/authInput.ts b/clients/algoliasearch-client-javascript/packages/ingestion/model/authInput.ts index cc29b6121e1..788fdec7ce9 100644 --- a/clients/algoliasearch-client-javascript/packages/ingestion/model/authInput.ts +++ b/clients/algoliasearch-client-javascript/packages/ingestion/model/authInput.ts @@ -13,4 +13,5 @@ export type AuthInput = | AuthAPIKey | AuthOAuth | AuthAlgolia - | AuthAlgoliaInsights; + | AuthAlgoliaInsights + | { [key: string]: string }; diff --git a/clients/algoliasearch-client-javascript/packages/ingestion/model/authenticationType.ts b/clients/algoliasearch-client-javascript/packages/ingestion/model/authenticationType.ts index c43bec24171..e161faf80b3 100644 --- a/clients/algoliasearch-client-javascript/packages/ingestion/model/authenticationType.ts +++ b/clients/algoliasearch-client-javascript/packages/ingestion/model/authenticationType.ts @@ -3,4 +3,11 @@ /** * Type of authentication. This determines the type of credentials required in the `input` object. */ -export type AuthenticationType = 'googleServiceAccount' | 'basic' | 'apiKey' | 'oauth' | 'algolia' | 'algoliaInsights'; +export type AuthenticationType = + | 'googleServiceAccount' + | 'basic' + | 'apiKey' + | 'oauth' + | 'algolia' + | 'algoliaInsights' + | 'secrets'; diff --git a/clients/algoliasearch-client-kotlin/client/src/commonMain/kotlin/com/algolia/client/model/ingestion/AuthInput.kt b/clients/algoliasearch-client-kotlin/client/src/commonMain/kotlin/com/algolia/client/model/ingestion/AuthInput.kt index ca9604aa272..000693867b1 100644 --- a/clients/algoliasearch-client-kotlin/client/src/commonMain/kotlin/com/algolia/client/model/ingestion/AuthInput.kt +++ b/clients/algoliasearch-client-kotlin/client/src/commonMain/kotlin/com/algolia/client/model/ingestion/AuthInput.kt @@ -20,6 +20,7 @@ import kotlin.jvm.JvmInline * - [AuthBasic] * - [AuthGoogleServiceAccount] * - [AuthOAuth] + * - [Map] - *[AuthInput.of]* */ @Serializable(AuthInputSerializer::class) public sealed interface AuthInput { @@ -47,6 +48,10 @@ public sealed interface AuthInput { @JvmInline public value class AuthAlgoliaInsightsValue(public val value: AuthAlgoliaInsights) : AuthInput + @Serializable + @JvmInline + public value class MapOfkotlinStringStringValue(public val value: Map) : AuthInput + public companion object { public fun of(value: AuthOAuth): AuthInput { @@ -67,6 +72,9 @@ public sealed interface AuthInput { public fun of(value: AuthAlgoliaInsights): AuthInput { return AuthAlgoliaInsightsValue(value) } + public fun of(value: Map): AuthInput { + return MapOfkotlinStringStringValue(value) + } } } @@ -79,6 +87,7 @@ internal class AuthInputSerializer : JsonContentPolymorphicSerializer element is JsonObject && element.containsKey("key") -> AuthAPIKey.serializer() element is JsonObject -> AuthAlgolia.serializer() element is JsonObject -> AuthAlgoliaInsights.serializer() + element is JsonObject -> AuthInput.MapOfkotlinStringStringValue.serializer() else -> throw AlgoliaClientException("Failed to deserialize json element: $element") } } diff --git a/clients/algoliasearch-client-kotlin/client/src/commonMain/kotlin/com/algolia/client/model/ingestion/AuthenticationType.kt b/clients/algoliasearch-client-kotlin/client/src/commonMain/kotlin/com/algolia/client/model/ingestion/AuthenticationType.kt index 9cf24024827..15eeb0aaee3 100644 --- a/clients/algoliasearch-client-kotlin/client/src/commonMain/kotlin/com/algolia/client/model/ingestion/AuthenticationType.kt +++ b/clients/algoliasearch-client-kotlin/client/src/commonMain/kotlin/com/algolia/client/model/ingestion/AuthenticationType.kt @@ -25,7 +25,10 @@ public enum class AuthenticationType(public val value: kotlin.String) { Algolia("algolia"), @SerialName(value = "algoliaInsights") - AlgoliaInsights("algoliaInsights"); + AlgoliaInsights("algoliaInsights"), + + @SerialName(value = "secrets") + Secrets("secrets"); override fun toString(): kotlin.String = value } diff --git a/clients/algoliasearch-client-php/lib/Api/AbtestingClient.php b/clients/algoliasearch-client-php/lib/Api/AbtestingClient.php index 5858f8c728b..4ca976723d4 100644 --- a/clients/algoliasearch-client-php/lib/Api/AbtestingClient.php +++ b/clients/algoliasearch-client-php/lib/Api/AbtestingClient.php @@ -6,7 +6,11 @@ use Algolia\AlgoliaSearch\Algolia; use Algolia\AlgoliaSearch\Configuration\AbtestingConfig; +use Algolia\AlgoliaSearch\Model\Abtesting\ABTest; +use Algolia\AlgoliaSearch\Model\Abtesting\ABTestResponse; use Algolia\AlgoliaSearch\Model\Abtesting\AddABTestsRequest; +use Algolia\AlgoliaSearch\Model\Abtesting\ListABTestsResponse; +use Algolia\AlgoliaSearch\Model\Abtesting\ScheduleABTestResponse; use Algolia\AlgoliaSearch\Model\Abtesting\ScheduleABTestsRequest; use Algolia\AlgoliaSearch\ObjectSerializer; use Algolia\AlgoliaSearch\RetryStrategy\ApiWrapper; @@ -124,7 +128,7 @@ public function setClientApiKey($apiKey) * * @param array $requestOptions the requestOptions to send along with the query, they will be merged with the transporter requestOptions * - * @return \Algolia\AlgoliaSearch\Model\Abtesting\ABTestResponse|array + * @return ABTestResponse|array */ public function addABTests($addABTestsRequest, $requestOptions = []) { @@ -310,7 +314,7 @@ public function customPut($path, $parameters = null, $body = null, $requestOptio * @param int $id Unique A/B test identifier. (required) * @param array $requestOptions the requestOptions to send along with the query, they will be merged with the transporter requestOptions * - * @return \Algolia\AlgoliaSearch\Model\Abtesting\ABTestResponse|array + * @return ABTestResponse|array */ public function deleteABTest($id, $requestOptions = []) { @@ -347,7 +351,7 @@ public function deleteABTest($id, $requestOptions = []) * @param int $id Unique A/B test identifier. (required) * @param array $requestOptions the requestOptions to send along with the query, they will be merged with the transporter requestOptions * - * @return \Algolia\AlgoliaSearch\Model\Abtesting\ABTest|array + * @return ABTest|array */ public function getABTest($id, $requestOptions = []) { @@ -387,7 +391,7 @@ public function getABTest($id, $requestOptions = []) * @param string $indexSuffix Index name suffix. Only A/B tests for indices ending with this string are included in the response. (optional) * @param array $requestOptions the requestOptions to send along with the query, they will be merged with the transporter requestOptions * - * @return \Algolia\AlgoliaSearch\Model\Abtesting\ListABTestsResponse|array + * @return array|ListABTestsResponse */ public function listABTests($offset = null, $limit = null, $indexPrefix = null, $indexSuffix = null, $requestOptions = []) { @@ -431,7 +435,7 @@ public function listABTests($offset = null, $limit = null, $indexPrefix = null, * * @param array $requestOptions the requestOptions to send along with the query, they will be merged with the transporter requestOptions * - * @return \Algolia\AlgoliaSearch\Model\Abtesting\ScheduleABTestResponse|array + * @return array|ScheduleABTestResponse */ public function scheduleABTest($scheduleABTestsRequest, $requestOptions = []) { @@ -459,7 +463,7 @@ public function scheduleABTest($scheduleABTestsRequest, $requestOptions = []) * @param int $id Unique A/B test identifier. (required) * @param array $requestOptions the requestOptions to send along with the query, they will be merged with the transporter requestOptions * - * @return \Algolia\AlgoliaSearch\Model\Abtesting\ABTestResponse|array + * @return ABTestResponse|array */ public function stopABTest($id, $requestOptions = []) { diff --git a/clients/algoliasearch-client-php/lib/Api/AnalyticsClient.php b/clients/algoliasearch-client-php/lib/Api/AnalyticsClient.php index abaaf346919..cba806107cf 100644 --- a/clients/algoliasearch-client-php/lib/Api/AnalyticsClient.php +++ b/clients/algoliasearch-client-php/lib/Api/AnalyticsClient.php @@ -6,6 +6,26 @@ use Algolia\AlgoliaSearch\Algolia; use Algolia\AlgoliaSearch\Configuration\AnalyticsConfig; +use Algolia\AlgoliaSearch\Model\Analytics\GetAddToCartRateResponse; +use Algolia\AlgoliaSearch\Model\Analytics\GetAverageClickPositionResponse; +use Algolia\AlgoliaSearch\Model\Analytics\GetClickPositionsResponse; +use Algolia\AlgoliaSearch\Model\Analytics\GetClickThroughRateResponse; +use Algolia\AlgoliaSearch\Model\Analytics\GetConversionRateResponse; +use Algolia\AlgoliaSearch\Model\Analytics\GetNoClickRateResponse; +use Algolia\AlgoliaSearch\Model\Analytics\GetNoResultsRateResponse; +use Algolia\AlgoliaSearch\Model\Analytics\GetPurchaseRateResponse; +use Algolia\AlgoliaSearch\Model\Analytics\GetRevenue; +use Algolia\AlgoliaSearch\Model\Analytics\GetSearchesCountResponse; +use Algolia\AlgoliaSearch\Model\Analytics\GetSearchesNoClicksResponse; +use Algolia\AlgoliaSearch\Model\Analytics\GetSearchesNoResultsResponse; +use Algolia\AlgoliaSearch\Model\Analytics\GetStatusResponse; +use Algolia\AlgoliaSearch\Model\Analytics\GetTopCountriesResponse; +use Algolia\AlgoliaSearch\Model\Analytics\GetTopFilterAttributesResponse; +use Algolia\AlgoliaSearch\Model\Analytics\GetTopFilterForAttributeResponse; +use Algolia\AlgoliaSearch\Model\Analytics\GetTopFiltersNoResultsResponse; +use Algolia\AlgoliaSearch\Model\Analytics\GetTopHitsResponse; +use Algolia\AlgoliaSearch\Model\Analytics\GetTopSearchesResponse; +use Algolia\AlgoliaSearch\Model\Analytics\GetUsersCountResponse; use Algolia\AlgoliaSearch\ObjectSerializer; use Algolia\AlgoliaSearch\RetryStrategy\ApiWrapper; use Algolia\AlgoliaSearch\RetryStrategy\ApiWrapperInterface; @@ -277,7 +297,7 @@ public function customPut($path, $parameters = null, $body = null, $requestOptio * @param string $tags Tags by which to segment the analytics. You can combine multiple tags with `OR` and `AND`. Tags must be URL-encoded. For more information, see [Segment your analytics data](https://www.algolia.com/doc/guides/search-analytics/guides/segments/). (optional) * @param array $requestOptions the requestOptions to send along with the query, they will be merged with the transporter requestOptions * - * @return \Algolia\AlgoliaSearch\Model\Analytics\GetAddToCartRateResponse|array + * @return array|GetAddToCartRateResponse */ public function getAddToCartRate($index, $startDate = null, $endDate = null, $tags = null, $requestOptions = []) { @@ -324,7 +344,7 @@ public function getAddToCartRate($index, $startDate = null, $endDate = null, $ta * @param string $tags Tags by which to segment the analytics. You can combine multiple tags with `OR` and `AND`. Tags must be URL-encoded. For more information, see [Segment your analytics data](https://www.algolia.com/doc/guides/search-analytics/guides/segments/). (optional) * @param array $requestOptions the requestOptions to send along with the query, they will be merged with the transporter requestOptions * - * @return \Algolia\AlgoliaSearch\Model\Analytics\GetAverageClickPositionResponse|array + * @return array|GetAverageClickPositionResponse */ public function getAverageClickPosition($index, $startDate = null, $endDate = null, $tags = null, $requestOptions = []) { @@ -371,7 +391,7 @@ public function getAverageClickPosition($index, $startDate = null, $endDate = nu * @param string $tags Tags by which to segment the analytics. You can combine multiple tags with `OR` and `AND`. Tags must be URL-encoded. For more information, see [Segment your analytics data](https://www.algolia.com/doc/guides/search-analytics/guides/segments/). (optional) * @param array $requestOptions the requestOptions to send along with the query, they will be merged with the transporter requestOptions * - * @return \Algolia\AlgoliaSearch\Model\Analytics\GetClickPositionsResponse|array + * @return array|GetClickPositionsResponse */ public function getClickPositions($index, $startDate = null, $endDate = null, $tags = null, $requestOptions = []) { @@ -418,7 +438,7 @@ public function getClickPositions($index, $startDate = null, $endDate = null, $t * @param string $tags Tags by which to segment the analytics. You can combine multiple tags with `OR` and `AND`. Tags must be URL-encoded. For more information, see [Segment your analytics data](https://www.algolia.com/doc/guides/search-analytics/guides/segments/). (optional) * @param array $requestOptions the requestOptions to send along with the query, they will be merged with the transporter requestOptions * - * @return \Algolia\AlgoliaSearch\Model\Analytics\GetClickThroughRateResponse|array + * @return array|GetClickThroughRateResponse */ public function getClickThroughRate($index, $startDate = null, $endDate = null, $tags = null, $requestOptions = []) { @@ -465,7 +485,7 @@ public function getClickThroughRate($index, $startDate = null, $endDate = null, * @param string $tags Tags by which to segment the analytics. You can combine multiple tags with `OR` and `AND`. Tags must be URL-encoded. For more information, see [Segment your analytics data](https://www.algolia.com/doc/guides/search-analytics/guides/segments/). (optional) * @param array $requestOptions the requestOptions to send along with the query, they will be merged with the transporter requestOptions * - * @return \Algolia\AlgoliaSearch\Model\Analytics\GetConversionRateResponse|array + * @return array|GetConversionRateResponse */ public function getConversionRate($index, $startDate = null, $endDate = null, $tags = null, $requestOptions = []) { @@ -512,7 +532,7 @@ public function getConversionRate($index, $startDate = null, $endDate = null, $t * @param string $tags Tags by which to segment the analytics. You can combine multiple tags with `OR` and `AND`. Tags must be URL-encoded. For more information, see [Segment your analytics data](https://www.algolia.com/doc/guides/search-analytics/guides/segments/). (optional) * @param array $requestOptions the requestOptions to send along with the query, they will be merged with the transporter requestOptions * - * @return \Algolia\AlgoliaSearch\Model\Analytics\GetNoClickRateResponse|array + * @return array|GetNoClickRateResponse */ public function getNoClickRate($index, $startDate = null, $endDate = null, $tags = null, $requestOptions = []) { @@ -559,7 +579,7 @@ public function getNoClickRate($index, $startDate = null, $endDate = null, $tags * @param string $tags Tags by which to segment the analytics. You can combine multiple tags with `OR` and `AND`. Tags must be URL-encoded. For more information, see [Segment your analytics data](https://www.algolia.com/doc/guides/search-analytics/guides/segments/). (optional) * @param array $requestOptions the requestOptions to send along with the query, they will be merged with the transporter requestOptions * - * @return \Algolia\AlgoliaSearch\Model\Analytics\GetNoResultsRateResponse|array + * @return array|GetNoResultsRateResponse */ public function getNoResultsRate($index, $startDate = null, $endDate = null, $tags = null, $requestOptions = []) { @@ -606,7 +626,7 @@ public function getNoResultsRate($index, $startDate = null, $endDate = null, $ta * @param string $tags Tags by which to segment the analytics. You can combine multiple tags with `OR` and `AND`. Tags must be URL-encoded. For more information, see [Segment your analytics data](https://www.algolia.com/doc/guides/search-analytics/guides/segments/). (optional) * @param array $requestOptions the requestOptions to send along with the query, they will be merged with the transporter requestOptions * - * @return \Algolia\AlgoliaSearch\Model\Analytics\GetPurchaseRateResponse|array + * @return array|GetPurchaseRateResponse */ public function getPurchaseRate($index, $startDate = null, $endDate = null, $tags = null, $requestOptions = []) { @@ -653,7 +673,7 @@ public function getPurchaseRate($index, $startDate = null, $endDate = null, $tag * @param string $tags Tags by which to segment the analytics. You can combine multiple tags with `OR` and `AND`. Tags must be URL-encoded. For more information, see [Segment your analytics data](https://www.algolia.com/doc/guides/search-analytics/guides/segments/). (optional) * @param array $requestOptions the requestOptions to send along with the query, they will be merged with the transporter requestOptions * - * @return \Algolia\AlgoliaSearch\Model\Analytics\GetRevenue|array + * @return array|GetRevenue */ public function getRevenue($index, $startDate = null, $endDate = null, $tags = null, $requestOptions = []) { @@ -700,7 +720,7 @@ public function getRevenue($index, $startDate = null, $endDate = null, $tags = n * @param string $tags Tags by which to segment the analytics. You can combine multiple tags with `OR` and `AND`. Tags must be URL-encoded. For more information, see [Segment your analytics data](https://www.algolia.com/doc/guides/search-analytics/guides/segments/). (optional) * @param array $requestOptions the requestOptions to send along with the query, they will be merged with the transporter requestOptions * - * @return \Algolia\AlgoliaSearch\Model\Analytics\GetSearchesCountResponse|array + * @return array|GetSearchesCountResponse */ public function getSearchesCount($index, $startDate = null, $endDate = null, $tags = null, $requestOptions = []) { @@ -749,7 +769,7 @@ public function getSearchesCount($index, $startDate = null, $endDate = null, $ta * @param string $tags Tags by which to segment the analytics. You can combine multiple tags with `OR` and `AND`. Tags must be URL-encoded. For more information, see [Segment your analytics data](https://www.algolia.com/doc/guides/search-analytics/guides/segments/). (optional) * @param array $requestOptions the requestOptions to send along with the query, they will be merged with the transporter requestOptions * - * @return \Algolia\AlgoliaSearch\Model\Analytics\GetSearchesNoClicksResponse|array + * @return array|GetSearchesNoClicksResponse */ public function getSearchesNoClicks($index, $startDate = null, $endDate = null, $limit = null, $offset = null, $tags = null, $requestOptions = []) { @@ -806,7 +826,7 @@ public function getSearchesNoClicks($index, $startDate = null, $endDate = null, * @param string $tags Tags by which to segment the analytics. You can combine multiple tags with `OR` and `AND`. Tags must be URL-encoded. For more information, see [Segment your analytics data](https://www.algolia.com/doc/guides/search-analytics/guides/segments/). (optional) * @param array $requestOptions the requestOptions to send along with the query, they will be merged with the transporter requestOptions * - * @return \Algolia\AlgoliaSearch\Model\Analytics\GetSearchesNoResultsResponse|array + * @return array|GetSearchesNoResultsResponse */ public function getSearchesNoResults($index, $startDate = null, $endDate = null, $limit = null, $offset = null, $tags = null, $requestOptions = []) { @@ -858,7 +878,7 @@ public function getSearchesNoResults($index, $startDate = null, $endDate = null, * @param string $index Index name. (required) * @param array $requestOptions the requestOptions to send along with the query, they will be merged with the transporter requestOptions * - * @return \Algolia\AlgoliaSearch\Model\Analytics\GetStatusResponse|array + * @return array|GetStatusResponse */ public function getStatus($index, $requestOptions = []) { @@ -895,7 +915,7 @@ public function getStatus($index, $requestOptions = []) * @param string $tags Tags by which to segment the analytics. You can combine multiple tags with `OR` and `AND`. Tags must be URL-encoded. For more information, see [Segment your analytics data](https://www.algolia.com/doc/guides/search-analytics/guides/segments/). (optional) * @param array $requestOptions the requestOptions to send along with the query, they will be merged with the transporter requestOptions * - * @return \Algolia\AlgoliaSearch\Model\Analytics\GetTopCountriesResponse|array + * @return array|GetTopCountriesResponse */ public function getTopCountries($index, $startDate = null, $endDate = null, $limit = null, $offset = null, $tags = null, $requestOptions = []) { @@ -953,7 +973,7 @@ public function getTopCountries($index, $startDate = null, $endDate = null, $lim * @param string $tags Tags by which to segment the analytics. You can combine multiple tags with `OR` and `AND`. Tags must be URL-encoded. For more information, see [Segment your analytics data](https://www.algolia.com/doc/guides/search-analytics/guides/segments/). (optional) * @param array $requestOptions the requestOptions to send along with the query, they will be merged with the transporter requestOptions * - * @return \Algolia\AlgoliaSearch\Model\Analytics\GetTopFilterAttributesResponse|array + * @return array|GetTopFilterAttributesResponse */ public function getTopFilterAttributes($index, $search = null, $startDate = null, $endDate = null, $limit = null, $offset = null, $tags = null, $requestOptions = []) { @@ -1016,7 +1036,7 @@ public function getTopFilterAttributes($index, $search = null, $startDate = null * @param string $tags Tags by which to segment the analytics. You can combine multiple tags with `OR` and `AND`. Tags must be URL-encoded. For more information, see [Segment your analytics data](https://www.algolia.com/doc/guides/search-analytics/guides/segments/). (optional) * @param array $requestOptions the requestOptions to send along with the query, they will be merged with the transporter requestOptions * - * @return \Algolia\AlgoliaSearch\Model\Analytics\GetTopFilterForAttributeResponse|array + * @return array|GetTopFilterForAttributeResponse */ public function getTopFilterForAttribute($attribute, $index, $search = null, $startDate = null, $endDate = null, $limit = null, $offset = null, $tags = null, $requestOptions = []) { @@ -1093,7 +1113,7 @@ public function getTopFilterForAttribute($attribute, $index, $search = null, $st * @param string $tags Tags by which to segment the analytics. You can combine multiple tags with `OR` and `AND`. Tags must be URL-encoded. For more information, see [Segment your analytics data](https://www.algolia.com/doc/guides/search-analytics/guides/segments/). (optional) * @param array $requestOptions the requestOptions to send along with the query, they will be merged with the transporter requestOptions * - * @return \Algolia\AlgoliaSearch\Model\Analytics\GetTopFiltersNoResultsResponse|array + * @return array|GetTopFiltersNoResultsResponse */ public function getTopFiltersNoResults($index, $search = null, $startDate = null, $endDate = null, $limit = null, $offset = null, $tags = null, $requestOptions = []) { @@ -1157,7 +1177,7 @@ public function getTopFiltersNoResults($index, $search = null, $startDate = null * @param string $tags Tags by which to segment the analytics. You can combine multiple tags with `OR` and `AND`. Tags must be URL-encoded. For more information, see [Segment your analytics data](https://www.algolia.com/doc/guides/search-analytics/guides/segments/). (optional) * @param array $requestOptions the requestOptions to send along with the query, they will be merged with the transporter requestOptions * - * @return \Algolia\AlgoliaSearch\Model\Analytics\GetTopHitsResponse|array + * @return array|GetTopHitsResponse */ public function getTopHits($index, $search = null, $clickAnalytics = null, $revenueAnalytics = null, $startDate = null, $endDate = null, $limit = null, $offset = null, $tags = null, $requestOptions = []) { @@ -1230,7 +1250,7 @@ public function getTopHits($index, $search = null, $clickAnalytics = null, $reve * @param string $tags Tags by which to segment the analytics. You can combine multiple tags with `OR` and `AND`. Tags must be URL-encoded. For more information, see [Segment your analytics data](https://www.algolia.com/doc/guides/search-analytics/guides/segments/). (optional) * @param array $requestOptions the requestOptions to send along with the query, they will be merged with the transporter requestOptions * - * @return \Algolia\AlgoliaSearch\Model\Analytics\GetTopSearchesResponse|array + * @return array|GetTopSearchesResponse */ public function getTopSearches($index, $clickAnalytics = null, $revenueAnalytics = null, $startDate = null, $endDate = null, $orderBy = null, $direction = null, $limit = null, $offset = null, $tags = null, $requestOptions = []) { @@ -1301,7 +1321,7 @@ public function getTopSearches($index, $clickAnalytics = null, $revenueAnalytics * @param string $tags Tags by which to segment the analytics. You can combine multiple tags with `OR` and `AND`. Tags must be URL-encoded. For more information, see [Segment your analytics data](https://www.algolia.com/doc/guides/search-analytics/guides/segments/). (optional) * @param array $requestOptions the requestOptions to send along with the query, they will be merged with the transporter requestOptions * - * @return \Algolia\AlgoliaSearch\Model\Analytics\GetUsersCountResponse|array + * @return array|GetUsersCountResponse */ public function getUsersCount($index, $startDate = null, $endDate = null, $tags = null, $requestOptions = []) { diff --git a/clients/algoliasearch-client-php/lib/Api/InsightsClient.php b/clients/algoliasearch-client-php/lib/Api/InsightsClient.php index aa45acbd9f6..2310b547bd6 100644 --- a/clients/algoliasearch-client-php/lib/Api/InsightsClient.php +++ b/clients/algoliasearch-client-php/lib/Api/InsightsClient.php @@ -6,6 +6,7 @@ use Algolia\AlgoliaSearch\Algolia; use Algolia\AlgoliaSearch\Configuration\InsightsConfig; +use Algolia\AlgoliaSearch\Model\Insights\EventsResponse; use Algolia\AlgoliaSearch\Model\Insights\InsightsEvents; use Algolia\AlgoliaSearch\ObjectSerializer; use Algolia\AlgoliaSearch\RetryStrategy\ApiWrapper; @@ -308,7 +309,7 @@ public function deleteUserToken($userToken, $requestOptions = []) * * @param array $requestOptions the requestOptions to send along with the query, they will be merged with the transporter requestOptions * - * @return \Algolia\AlgoliaSearch\Model\Insights\EventsResponse|array + * @return array|EventsResponse */ public function pushEvents($insightsEvents, $requestOptions = []) { diff --git a/clients/algoliasearch-client-php/lib/Api/MonitoringClient.php b/clients/algoliasearch-client-php/lib/Api/MonitoringClient.php index 26c3a302bd4..6a4754ca8b7 100644 --- a/clients/algoliasearch-client-php/lib/Api/MonitoringClient.php +++ b/clients/algoliasearch-client-php/lib/Api/MonitoringClient.php @@ -6,6 +6,12 @@ use Algolia\AlgoliaSearch\Algolia; use Algolia\AlgoliaSearch\Configuration\MonitoringConfig; +use Algolia\AlgoliaSearch\Model\Monitoring\IncidentsResponse; +use Algolia\AlgoliaSearch\Model\Monitoring\IndexingTimeResponse; +use Algolia\AlgoliaSearch\Model\Monitoring\InfrastructureResponse; +use Algolia\AlgoliaSearch\Model\Monitoring\InventoryResponse; +use Algolia\AlgoliaSearch\Model\Monitoring\LatencyResponse; +use Algolia\AlgoliaSearch\Model\Monitoring\StatusResponse; use Algolia\AlgoliaSearch\ObjectSerializer; use Algolia\AlgoliaSearch\RetryStrategy\ApiWrapper; use Algolia\AlgoliaSearch\RetryStrategy\ApiWrapperInterface; @@ -267,7 +273,7 @@ public function customPut($path, $parameters = null, $body = null, $requestOptio * @param string $clusters Subset of clusters, separated by commas. (required) * @param array $requestOptions the requestOptions to send along with the query, they will be merged with the transporter requestOptions * - * @return \Algolia\AlgoliaSearch\Model\Monitoring\IncidentsResponse|array + * @return array|IncidentsResponse */ public function getClusterIncidents($clusters, $requestOptions = []) { @@ -301,7 +307,7 @@ public function getClusterIncidents($clusters, $requestOptions = []) * @param string $clusters Subset of clusters, separated by commas. (required) * @param array $requestOptions the requestOptions to send along with the query, they will be merged with the transporter requestOptions * - * @return \Algolia\AlgoliaSearch\Model\Monitoring\StatusResponse|array + * @return array|StatusResponse */ public function getClusterStatus($clusters, $requestOptions = []) { @@ -334,7 +340,7 @@ public function getClusterStatus($clusters, $requestOptions = []) * * @param array $requestOptions the requestOptions to send along with the query, they will be merged with the transporter requestOptions * - * @return \Algolia\AlgoliaSearch\Model\Monitoring\IncidentsResponse|array + * @return array|IncidentsResponse */ public function getIncidents($requestOptions = []) { @@ -352,7 +358,7 @@ public function getIncidents($requestOptions = []) * @param string $clusters Subset of clusters, separated by commas. (required) * @param array $requestOptions the requestOptions to send along with the query, they will be merged with the transporter requestOptions * - * @return \Algolia\AlgoliaSearch\Model\Monitoring\IndexingTimeResponse|array + * @return array|IndexingTimeResponse */ public function getIndexingTime($clusters, $requestOptions = []) { @@ -386,7 +392,7 @@ public function getIndexingTime($clusters, $requestOptions = []) * @param string $clusters Subset of clusters, separated by commas. (required) * @param array $requestOptions the requestOptions to send along with the query, they will be merged with the transporter requestOptions * - * @return \Algolia\AlgoliaSearch\Model\Monitoring\LatencyResponse|array + * @return array|LatencyResponse */ public function getLatency($clusters, $requestOptions = []) { @@ -421,7 +427,7 @@ public function getLatency($clusters, $requestOptions = []) * @param array $period Period over which to aggregate the metrics: - `minute`. Aggregate the last minute. 1 data point per 10 seconds. - `hour`. Aggregate the last hour. 1 data point per minute. - `day`. Aggregate the last day. 1 data point per 10 minutes. - `week`. Aggregate the last week. 1 data point per hour. - `month`. Aggregate the last month. 1 data point per day. (required) * @param array $requestOptions the requestOptions to send along with the query, they will be merged with the transporter requestOptions * - * @return \Algolia\AlgoliaSearch\Model\Monitoring\InfrastructureResponse|array + * @return array|InfrastructureResponse */ public function getMetrics($metric, $period, $requestOptions = []) { @@ -503,7 +509,7 @@ public function getReachability($clusters, $requestOptions = []) * * @param array $requestOptions the requestOptions to send along with the query, they will be merged with the transporter requestOptions * - * @return \Algolia\AlgoliaSearch\Model\Monitoring\InventoryResponse|array + * @return array|InventoryResponse */ public function getServers($requestOptions = []) { @@ -520,7 +526,7 @@ public function getServers($requestOptions = []) * * @param array $requestOptions the requestOptions to send along with the query, they will be merged with the transporter requestOptions * - * @return \Algolia\AlgoliaSearch\Model\Monitoring\StatusResponse|array + * @return array|StatusResponse */ public function getStatus($requestOptions = []) { diff --git a/clients/algoliasearch-client-php/lib/Api/PersonalizationClient.php b/clients/algoliasearch-client-php/lib/Api/PersonalizationClient.php index e1f5938ee89..064d970b7af 100644 --- a/clients/algoliasearch-client-php/lib/Api/PersonalizationClient.php +++ b/clients/algoliasearch-client-php/lib/Api/PersonalizationClient.php @@ -6,7 +6,10 @@ use Algolia\AlgoliaSearch\Algolia; use Algolia\AlgoliaSearch\Configuration\PersonalizationConfig; +use Algolia\AlgoliaSearch\Model\Personalization\DeleteUserProfileResponse; +use Algolia\AlgoliaSearch\Model\Personalization\GetUserTokenResponse; use Algolia\AlgoliaSearch\Model\Personalization\PersonalizationStrategyParams; +use Algolia\AlgoliaSearch\Model\Personalization\SetPersonalizationStrategyResponse; use Algolia\AlgoliaSearch\ObjectSerializer; use Algolia\AlgoliaSearch\RetryStrategy\ApiWrapper; use Algolia\AlgoliaSearch\RetryStrategy\ApiWrapperInterface; @@ -275,7 +278,7 @@ public function customPut($path, $parameters = null, $body = null, $requestOptio * @param string $userToken Unique identifier representing a user for which to fetch the personalization profile. (required) * @param array $requestOptions the requestOptions to send along with the query, they will be merged with the transporter requestOptions * - * @return \Algolia\AlgoliaSearch\Model\Personalization\DeleteUserProfileResponse|array + * @return array|DeleteUserProfileResponse */ public function deleteUserProfile($userToken, $requestOptions = []) { @@ -311,7 +314,7 @@ public function deleteUserProfile($userToken, $requestOptions = []) * * @param array $requestOptions the requestOptions to send along with the query, they will be merged with the transporter requestOptions * - * @return \Algolia\AlgoliaSearch\Model\Personalization\PersonalizationStrategyParams|array + * @return array|PersonalizationStrategyParams */ public function getPersonalizationStrategy($requestOptions = []) { @@ -332,7 +335,7 @@ public function getPersonalizationStrategy($requestOptions = []) * @param string $userToken Unique identifier representing a user for which to fetch the personalization profile. (required) * @param array $requestOptions the requestOptions to send along with the query, they will be merged with the transporter requestOptions * - * @return \Algolia\AlgoliaSearch\Model\Personalization\GetUserTokenResponse|array + * @return array|GetUserTokenResponse */ public function getUserTokenProfile($userToken, $requestOptions = []) { @@ -375,7 +378,7 @@ public function getUserTokenProfile($userToken, $requestOptions = []) * * @param array $requestOptions the requestOptions to send along with the query, they will be merged with the transporter requestOptions * - * @return \Algolia\AlgoliaSearch\Model\Personalization\SetPersonalizationStrategyResponse|array + * @return array|SetPersonalizationStrategyResponse */ public function setPersonalizationStrategy($personalizationStrategyParams, $requestOptions = []) { diff --git a/clients/algoliasearch-client-php/lib/Api/QuerySuggestionsClient.php b/clients/algoliasearch-client-php/lib/Api/QuerySuggestionsClient.php index c7c3d8466d3..b398b11cebb 100644 --- a/clients/algoliasearch-client-php/lib/Api/QuerySuggestionsClient.php +++ b/clients/algoliasearch-client-php/lib/Api/QuerySuggestionsClient.php @@ -6,8 +6,12 @@ use Algolia\AlgoliaSearch\Algolia; use Algolia\AlgoliaSearch\Configuration\QuerySuggestionsConfig; +use Algolia\AlgoliaSearch\Model\QuerySuggestions\BaseResponse; +use Algolia\AlgoliaSearch\Model\QuerySuggestions\ConfigStatus; use Algolia\AlgoliaSearch\Model\QuerySuggestions\Configuration; +use Algolia\AlgoliaSearch\Model\QuerySuggestions\ConfigurationResponse; use Algolia\AlgoliaSearch\Model\QuerySuggestions\ConfigurationWithIndex; +use Algolia\AlgoliaSearch\Model\QuerySuggestions\LogFile; use Algolia\AlgoliaSearch\ObjectSerializer; use Algolia\AlgoliaSearch\RetryStrategy\ApiWrapper; use Algolia\AlgoliaSearch\RetryStrategy\ApiWrapperInterface; @@ -121,7 +125,7 @@ public function setClientApiKey($apiKey) * * @param array $requestOptions the requestOptions to send along with the query, they will be merged with the transporter requestOptions * - * @return \Algolia\AlgoliaSearch\Model\QuerySuggestions\BaseResponse|array + * @return array|BaseResponse */ public function createConfig($configurationWithIndex, $requestOptions = []) { @@ -307,7 +311,7 @@ public function customPut($path, $parameters = null, $body = null, $requestOptio * @param string $indexName Query Suggestions index name. (required) * @param array $requestOptions the requestOptions to send along with the query, they will be merged with the transporter requestOptions * - * @return \Algolia\AlgoliaSearch\Model\QuerySuggestions\BaseResponse|array + * @return array|BaseResponse */ public function deleteConfig($indexName, $requestOptions = []) { @@ -364,7 +368,7 @@ public function getAllConfigs($requestOptions = []) * @param string $indexName Query Suggestions index name. (required) * @param array $requestOptions the requestOptions to send along with the query, they will be merged with the transporter requestOptions * - * @return \Algolia\AlgoliaSearch\Model\QuerySuggestions\ConfigurationResponse|array + * @return array|ConfigurationResponse */ public function getConfig($indexName, $requestOptions = []) { @@ -401,7 +405,7 @@ public function getConfig($indexName, $requestOptions = []) * @param string $indexName Query Suggestions index name. (required) * @param array $requestOptions the requestOptions to send along with the query, they will be merged with the transporter requestOptions * - * @return \Algolia\AlgoliaSearch\Model\QuerySuggestions\ConfigStatus|array + * @return array|ConfigStatus */ public function getConfigStatus($indexName, $requestOptions = []) { @@ -438,7 +442,7 @@ public function getConfigStatus($indexName, $requestOptions = []) * @param string $indexName Query Suggestions index name. (required) * @param array $requestOptions the requestOptions to send along with the query, they will be merged with the transporter requestOptions * - * @return \Algolia\AlgoliaSearch\Model\QuerySuggestions\LogFile|array + * @return array|LogFile */ public function getLogFile($indexName, $requestOptions = []) { @@ -484,7 +488,7 @@ public function getLogFile($indexName, $requestOptions = []) * * @param array $requestOptions the requestOptions to send along with the query, they will be merged with the transporter requestOptions * - * @return \Algolia\AlgoliaSearch\Model\QuerySuggestions\BaseResponse|array + * @return array|BaseResponse */ public function updateConfig($indexName, $configuration, $requestOptions = []) { diff --git a/clients/algoliasearch-client-php/lib/Api/RecommendClient.php b/clients/algoliasearch-client-php/lib/Api/RecommendClient.php index 6a74980d7fc..00b06bd02ea 100644 --- a/clients/algoliasearch-client-php/lib/Api/RecommendClient.php +++ b/clients/algoliasearch-client-php/lib/Api/RecommendClient.php @@ -6,8 +6,14 @@ use Algolia\AlgoliaSearch\Algolia; use Algolia\AlgoliaSearch\Configuration\RecommendConfig; +use Algolia\AlgoliaSearch\Model\Recommend\DeletedAtResponse; use Algolia\AlgoliaSearch\Model\Recommend\GetRecommendationsParams; +use Algolia\AlgoliaSearch\Model\Recommend\GetRecommendationsResponse; +use Algolia\AlgoliaSearch\Model\Recommend\GetRecommendTaskResponse; +use Algolia\AlgoliaSearch\Model\Recommend\RecommendRule; +use Algolia\AlgoliaSearch\Model\Recommend\RecommendUpdatedAtResponse; use Algolia\AlgoliaSearch\Model\Recommend\SearchRecommendRulesParams; +use Algolia\AlgoliaSearch\Model\Recommend\SearchRecommendRulesResponse; use Algolia\AlgoliaSearch\ObjectSerializer; use Algolia\AlgoliaSearch\RetryStrategy\ApiWrapper; use Algolia\AlgoliaSearch\RetryStrategy\ApiWrapperInterface; @@ -120,7 +126,7 @@ public function setClientApiKey($apiKey) * @param array $recommendRule recommendRule (optional) * @param array $requestOptions the requestOptions to send along with the query, they will be merged with the transporter requestOptions * - * @return \Algolia\AlgoliaSearch\Model\Recommend\RecommendUpdatedAtResponse|array + * @return array|RecommendUpdatedAtResponse */ public function batchRecommendRules($indexName, $model, $recommendRule = null, $requestOptions = []) { @@ -332,7 +338,7 @@ public function customPut($path, $parameters = null, $body = null, $requestOptio * @param string $objectID Unique record identifier. (required) * @param array $requestOptions the requestOptions to send along with the query, they will be merged with the transporter requestOptions * - * @return \Algolia\AlgoliaSearch\Model\Recommend\DeletedAtResponse|array + * @return array|DeletedAtResponse */ public function deleteRecommendRule($indexName, $model, $objectID, $requestOptions = []) { @@ -401,7 +407,7 @@ public function deleteRecommendRule($indexName, $model, $objectID, $requestOptio * @param string $objectID Unique record identifier. (required) * @param array $requestOptions the requestOptions to send along with the query, they will be merged with the transporter requestOptions * - * @return \Algolia\AlgoliaSearch\Model\Recommend\RecommendRule|array + * @return array|RecommendRule */ public function getRecommendRule($indexName, $model, $objectID, $requestOptions = []) { @@ -470,7 +476,7 @@ public function getRecommendRule($indexName, $model, $objectID, $requestOptions * @param int $taskID Unique task identifier. (required) * @param array $requestOptions the requestOptions to send along with the query, they will be merged with the transporter requestOptions * - * @return \Algolia\AlgoliaSearch\Model\Recommend\GetRecommendTaskResponse|array + * @return array|GetRecommendTaskResponse */ public function getRecommendStatus($indexName, $model, $taskID, $requestOptions = []) { @@ -541,7 +547,7 @@ public function getRecommendStatus($indexName, $model, $taskID, $requestOptions * * @param array $requestOptions the requestOptions to send along with the query, they will be merged with the transporter requestOptions * - * @return \Algolia\AlgoliaSearch\Model\Recommend\GetRecommendationsResponse|array + * @return array|GetRecommendationsResponse */ public function getRecommendations($getRecommendationsParams, $requestOptions = []) { @@ -582,7 +588,7 @@ public function getRecommendations($getRecommendationsParams, $requestOptions = * * @param array $requestOptions the requestOptions to send along with the query, they will be merged with the transporter requestOptions * - * @return \Algolia\AlgoliaSearch\Model\Recommend\SearchRecommendRulesResponse|array + * @return array|SearchRecommendRulesResponse */ public function searchRecommendRules($indexName, $model, $searchRecommendRulesParams = null, $requestOptions = []) { diff --git a/clients/algoliasearch-client-php/lib/Api/SearchClient.php b/clients/algoliasearch-client-php/lib/Api/SearchClient.php index aae3b26c73a..bd8d3a24752 100644 --- a/clients/algoliasearch-client-php/lib/Api/SearchClient.php +++ b/clients/algoliasearch-client-php/lib/Api/SearchClient.php @@ -12,29 +12,64 @@ use Algolia\AlgoliaSearch\Iterators\ObjectIterator; use Algolia\AlgoliaSearch\Iterators\RuleIterator; use Algolia\AlgoliaSearch\Iterators\SynonymIterator; +use Algolia\AlgoliaSearch\Model\Search\AddApiKeyResponse; use Algolia\AlgoliaSearch\Model\Search\ApiKey; use Algolia\AlgoliaSearch\Model\Search\AssignUserIdParams; use Algolia\AlgoliaSearch\Model\Search\BatchAssignUserIdsParams; use Algolia\AlgoliaSearch\Model\Search\BatchDictionaryEntriesParams; use Algolia\AlgoliaSearch\Model\Search\BatchParams; +use Algolia\AlgoliaSearch\Model\Search\BatchResponse; use Algolia\AlgoliaSearch\Model\Search\BatchWriteParams; use Algolia\AlgoliaSearch\Model\Search\BrowseParams; +use Algolia\AlgoliaSearch\Model\Search\BrowseResponse; +use Algolia\AlgoliaSearch\Model\Search\CreatedAtResponse; +use Algolia\AlgoliaSearch\Model\Search\DeleteApiKeyResponse; use Algolia\AlgoliaSearch\Model\Search\DeleteByParams; +use Algolia\AlgoliaSearch\Model\Search\DeletedAtResponse; +use Algolia\AlgoliaSearch\Model\Search\DeleteSourceResponse; use Algolia\AlgoliaSearch\Model\Search\DictionarySettingsParams; +use Algolia\AlgoliaSearch\Model\Search\GetApiKeyResponse; +use Algolia\AlgoliaSearch\Model\Search\GetDictionarySettingsResponse; +use Algolia\AlgoliaSearch\Model\Search\GetLogsResponse; use Algolia\AlgoliaSearch\Model\Search\GetObjectsParams; +use Algolia\AlgoliaSearch\Model\Search\GetObjectsResponse; use Algolia\AlgoliaSearch\Model\Search\GetTaskResponse; +use Algolia\AlgoliaSearch\Model\Search\GetTopUserIdsResponse; +use Algolia\AlgoliaSearch\Model\Search\HasPendingMappingsResponse; use Algolia\AlgoliaSearch\Model\Search\IndexSettings; +use Algolia\AlgoliaSearch\Model\Search\ListApiKeysResponse; +use Algolia\AlgoliaSearch\Model\Search\ListClustersResponse; +use Algolia\AlgoliaSearch\Model\Search\ListIndicesResponse; +use Algolia\AlgoliaSearch\Model\Search\ListUserIdsResponse; +use Algolia\AlgoliaSearch\Model\Search\MultipleBatchResponse; use Algolia\AlgoliaSearch\Model\Search\OperationIndexParams; +use Algolia\AlgoliaSearch\Model\Search\RemoveUserIdResponse; +use Algolia\AlgoliaSearch\Model\Search\ReplaceSourceResponse; use Algolia\AlgoliaSearch\Model\Search\Rule; +use Algolia\AlgoliaSearch\Model\Search\SaveObjectResponse; +use Algolia\AlgoliaSearch\Model\Search\SaveSynonymResponse; use Algolia\AlgoliaSearch\Model\Search\SearchDictionaryEntriesParams; +use Algolia\AlgoliaSearch\Model\Search\SearchDictionaryEntriesResponse; use Algolia\AlgoliaSearch\Model\Search\SearchForFacetValuesRequest; +use Algolia\AlgoliaSearch\Model\Search\SearchForFacetValuesResponse; use Algolia\AlgoliaSearch\Model\Search\SearchMethodParams; use Algolia\AlgoliaSearch\Model\Search\SearchParams; +use Algolia\AlgoliaSearch\Model\Search\SearchResponse; +use Algolia\AlgoliaSearch\Model\Search\SearchResponses; use Algolia\AlgoliaSearch\Model\Search\SearchRulesParams; +use Algolia\AlgoliaSearch\Model\Search\SearchRulesResponse; use Algolia\AlgoliaSearch\Model\Search\SearchSynonymsParams; +use Algolia\AlgoliaSearch\Model\Search\SearchSynonymsResponse; use Algolia\AlgoliaSearch\Model\Search\SearchUserIdsParams; +use Algolia\AlgoliaSearch\Model\Search\SearchUserIdsResponse; +use Algolia\AlgoliaSearch\Model\Search\SettingsResponse; use Algolia\AlgoliaSearch\Model\Search\Source; use Algolia\AlgoliaSearch\Model\Search\SynonymHit; +use Algolia\AlgoliaSearch\Model\Search\UpdateApiKeyResponse; +use Algolia\AlgoliaSearch\Model\Search\UpdatedAtResponse; +use Algolia\AlgoliaSearch\Model\Search\UpdatedAtWithObjectIdResponse; +use Algolia\AlgoliaSearch\Model\Search\UpdatedRuleResponse; +use Algolia\AlgoliaSearch\Model\Search\UserId; use Algolia\AlgoliaSearch\ObjectSerializer; use Algolia\AlgoliaSearch\RetryStrategy\ApiWrapper; use Algolia\AlgoliaSearch\RetryStrategy\ApiWrapperInterface; @@ -157,7 +192,7 @@ public function setClientApiKey($apiKey) * * @param array $requestOptions the requestOptions to send along with the query, they will be merged with the transporter requestOptions * - * @return \Algolia\AlgoliaSearch\Model\Search\AddApiKeyResponse|array + * @return AddApiKeyResponse|array */ public function addApiKey($apiKey, $requestOptions = []) { @@ -187,7 +222,7 @@ public function addApiKey($apiKey, $requestOptions = []) * @param array $body The record. A schemaless object with attributes that are useful in the context of search and discovery. (required) * @param array $requestOptions the requestOptions to send along with the query, they will be merged with the transporter requestOptions * - * @return \Algolia\AlgoliaSearch\Model\Search\UpdatedAtWithObjectIdResponse|array + * @return array|UpdatedAtWithObjectIdResponse */ public function addOrUpdateObject($indexName, $objectID, $body, $requestOptions = []) { @@ -250,7 +285,7 @@ public function addOrUpdateObject($indexName, $objectID, $body, $requestOptions * * @param array $requestOptions the requestOptions to send along with the query, they will be merged with the transporter requestOptions * - * @return \Algolia\AlgoliaSearch\Model\Search\CreatedAtResponse|array + * @return array|CreatedAtResponse */ public function appendSource($source, $requestOptions = []) { @@ -283,7 +318,7 @@ public function appendSource($source, $requestOptions = []) * * @param array $requestOptions the requestOptions to send along with the query, they will be merged with the transporter requestOptions * - * @return \Algolia\AlgoliaSearch\Model\Search\CreatedAtResponse|array + * @return array|CreatedAtResponse */ public function assignUserId($xAlgoliaUserID, $assignUserIdParams, $requestOptions = []) { @@ -321,7 +356,7 @@ public function assignUserId($xAlgoliaUserID, $assignUserIdParams, $requestOptio * * @param array $requestOptions the requestOptions to send along with the query, they will be merged with the transporter requestOptions * - * @return \Algolia\AlgoliaSearch\Model\Search\BatchResponse|array + * @return array|BatchResponse */ public function batch($indexName, $batchWriteParams, $requestOptions = []) { @@ -370,7 +405,7 @@ public function batch($indexName, $batchWriteParams, $requestOptions = []) * * @param array $requestOptions the requestOptions to send along with the query, they will be merged with the transporter requestOptions * - * @return \Algolia\AlgoliaSearch\Model\Search\CreatedAtResponse|array + * @return array|CreatedAtResponse */ public function batchAssignUserIds($xAlgoliaUserID, $batchAssignUserIdsParams, $requestOptions = []) { @@ -412,7 +447,7 @@ public function batchAssignUserIds($xAlgoliaUserID, $batchAssignUserIdsParams, $ * * @param array $requestOptions the requestOptions to send along with the query, they will be merged with the transporter requestOptions * - * @return \Algolia\AlgoliaSearch\Model\Search\UpdatedAtResponse|array + * @return array|UpdatedAtResponse */ public function batchDictionaryEntries($dictionaryName, $batchDictionaryEntriesParams, $requestOptions = []) { @@ -459,7 +494,7 @@ public function batchDictionaryEntries($dictionaryName, $batchDictionaryEntriesP * * @param array $requestOptions the requestOptions to send along with the query, they will be merged with the transporter requestOptions * - * @return \Algolia\AlgoliaSearch\Model\Search\BrowseResponse|array + * @return array|BrowseResponse */ public function browse($indexName, $browseParams = null, $requestOptions = []) { @@ -496,7 +531,7 @@ public function browse($indexName, $browseParams = null, $requestOptions = []) * @param string $indexName Name of the index on which to perform the operation. (required) * @param array $requestOptions the requestOptions to send along with the query, they will be merged with the transporter requestOptions * - * @return \Algolia\AlgoliaSearch\Model\Search\UpdatedAtResponse|array + * @return array|UpdatedAtResponse */ public function clearObjects($indexName, $requestOptions = []) { @@ -534,7 +569,7 @@ public function clearObjects($indexName, $requestOptions = []) * @param bool $forwardToReplicas Whether changes are applied to replica indices. (optional) * @param array $requestOptions the requestOptions to send along with the query, they will be merged with the transporter requestOptions * - * @return \Algolia\AlgoliaSearch\Model\Search\UpdatedAtResponse|array + * @return array|UpdatedAtResponse */ public function clearRules($indexName, $forwardToReplicas = null, $requestOptions = []) { @@ -576,7 +611,7 @@ public function clearRules($indexName, $forwardToReplicas = null, $requestOption * @param bool $forwardToReplicas Whether changes are applied to replica indices. (optional) * @param array $requestOptions the requestOptions to send along with the query, they will be merged with the transporter requestOptions * - * @return \Algolia\AlgoliaSearch\Model\Search\UpdatedAtResponse|array + * @return array|UpdatedAtResponse */ public function clearSynonyms($indexName, $forwardToReplicas = null, $requestOptions = []) { @@ -775,7 +810,7 @@ public function customPut($path, $parameters = null, $body = null, $requestOptio * @param string $key API key. (required) * @param array $requestOptions the requestOptions to send along with the query, they will be merged with the transporter requestOptions * - * @return \Algolia\AlgoliaSearch\Model\Search\DeleteApiKeyResponse|array + * @return array|DeleteApiKeyResponse */ public function deleteApiKey($key, $requestOptions = []) { @@ -824,7 +859,7 @@ public function deleteApiKey($key, $requestOptions = []) * * @param array $requestOptions the requestOptions to send along with the query, they will be merged with the transporter requestOptions * - * @return \Algolia\AlgoliaSearch\Model\Search\DeletedAtResponse|array + * @return array|DeletedAtResponse */ public function deleteBy($indexName, $deleteByParams, $requestOptions = []) { @@ -867,7 +902,7 @@ public function deleteBy($indexName, $deleteByParams, $requestOptions = []) * @param string $indexName Name of the index on which to perform the operation. (required) * @param array $requestOptions the requestOptions to send along with the query, they will be merged with the transporter requestOptions * - * @return \Algolia\AlgoliaSearch\Model\Search\DeletedAtResponse|array + * @return array|DeletedAtResponse */ public function deleteIndex($indexName, $requestOptions = []) { @@ -905,7 +940,7 @@ public function deleteIndex($indexName, $requestOptions = []) * @param string $objectID Unique record identifier. (required) * @param array $requestOptions the requestOptions to send along with the query, they will be merged with the transporter requestOptions * - * @return \Algolia\AlgoliaSearch\Model\Search\DeletedAtResponse|array + * @return array|DeletedAtResponse */ public function deleteObject($indexName, $objectID, $requestOptions = []) { @@ -959,7 +994,7 @@ public function deleteObject($indexName, $objectID, $requestOptions = []) * @param bool $forwardToReplicas Whether changes are applied to replica indices. (optional) * @param array $requestOptions the requestOptions to send along with the query, they will be merged with the transporter requestOptions * - * @return \Algolia\AlgoliaSearch\Model\Search\UpdatedAtResponse|array + * @return array|UpdatedAtResponse */ public function deleteRule($indexName, $objectID, $forwardToReplicas = null, $requestOptions = []) { @@ -1015,7 +1050,7 @@ public function deleteRule($indexName, $objectID, $forwardToReplicas = null, $re * @param string $source IP address range of the source. (required) * @param array $requestOptions the requestOptions to send along with the query, they will be merged with the transporter requestOptions * - * @return \Algolia\AlgoliaSearch\Model\Search\DeleteSourceResponse|array + * @return array|DeleteSourceResponse */ public function deleteSource($source, $requestOptions = []) { @@ -1054,7 +1089,7 @@ public function deleteSource($source, $requestOptions = []) * @param bool $forwardToReplicas Whether changes are applied to replica indices. (optional) * @param array $requestOptions the requestOptions to send along with the query, they will be merged with the transporter requestOptions * - * @return \Algolia\AlgoliaSearch\Model\Search\DeletedAtResponse|array + * @return array|DeletedAtResponse */ public function deleteSynonym($indexName, $objectID, $forwardToReplicas = null, $requestOptions = []) { @@ -1107,7 +1142,7 @@ public function deleteSynonym($indexName, $objectID, $forwardToReplicas = null, * @param string $key API key. (required) * @param array $requestOptions the requestOptions to send along with the query, they will be merged with the transporter requestOptions * - * @return \Algolia\AlgoliaSearch\Model\Search\GetApiKeyResponse|array + * @return array|GetApiKeyResponse */ public function getApiKey($key, $requestOptions = []) { @@ -1144,7 +1179,7 @@ public function getApiKey($key, $requestOptions = []) * @param int $taskID Unique task identifier. (required) * @param array $requestOptions the requestOptions to send along with the query, they will be merged with the transporter requestOptions * - * @return \Algolia\AlgoliaSearch\Model\Search\GetTaskResponse|array + * @return array|GetTaskResponse */ public function getAppTask($taskID, $requestOptions = []) { @@ -1200,7 +1235,7 @@ public function getDictionaryLanguages($requestOptions = []) * * @param array $requestOptions the requestOptions to send along with the query, they will be merged with the transporter requestOptions * - * @return \Algolia\AlgoliaSearch\Model\Search\GetDictionarySettingsResponse|array + * @return array|GetDictionarySettingsResponse */ public function getDictionarySettings($requestOptions = []) { @@ -1224,7 +1259,7 @@ public function getDictionarySettings($requestOptions = []) * @param array $type Type of log entries to retrieve. By default, all log entries are retrieved. (optional) * @param array $requestOptions the requestOptions to send along with the query, they will be merged with the transporter requestOptions * - * @return \Algolia\AlgoliaSearch\Model\Search\GetLogsResponse|array + * @return array|GetLogsResponse */ public function getLogs($offset = null, $length = null, $indexName = null, $type = null, $requestOptions = []) { @@ -1323,7 +1358,7 @@ public function getObject($indexName, $objectID, $attributesToRetrieve = null, $ * * @param array $requestOptions the requestOptions to send along with the query, they will be merged with the transporter requestOptions * - * @return \Algolia\AlgoliaSearch\Model\Search\GetObjectsResponse|array + * @return array|GetObjectsResponse */ public function getObjects($getObjectsParams, $requestOptions = []) { @@ -1352,7 +1387,7 @@ public function getObjects($getObjectsParams, $requestOptions = []) * @param string $objectID Unique identifier of a rule object. (required) * @param array $requestOptions the requestOptions to send along with the query, they will be merged with the transporter requestOptions * - * @return \Algolia\AlgoliaSearch\Model\Search\Rule|array + * @return array|Rule */ public function getRule($indexName, $objectID, $requestOptions = []) { @@ -1404,7 +1439,7 @@ public function getRule($indexName, $objectID, $requestOptions = []) * @param string $indexName Name of the index on which to perform the operation. (required) * @param array $requestOptions the requestOptions to send along with the query, they will be merged with the transporter requestOptions * - * @return \Algolia\AlgoliaSearch\Model\Search\SettingsResponse|array + * @return array|SettingsResponse */ public function getSettings($indexName, $requestOptions = []) { @@ -1462,7 +1497,7 @@ public function getSources($requestOptions = []) * @param string $objectID Unique identifier of a synonym object. (required) * @param array $requestOptions the requestOptions to send along with the query, they will be merged with the transporter requestOptions * - * @return \Algolia\AlgoliaSearch\Model\Search\SynonymHit|array + * @return array|SynonymHit */ public function getSynonym($indexName, $objectID, $requestOptions = []) { @@ -1515,7 +1550,7 @@ public function getSynonym($indexName, $objectID, $requestOptions = []) * @param int $taskID Unique task identifier. (required) * @param array $requestOptions the requestOptions to send along with the query, they will be merged with the transporter requestOptions * - * @return \Algolia\AlgoliaSearch\Model\Search\GetTaskResponse|array + * @return array|GetTaskResponse */ public function getTask($indexName, $taskID, $requestOptions = []) { @@ -1566,7 +1601,7 @@ public function getTask($indexName, $taskID, $requestOptions = []) * * @param array $requestOptions the requestOptions to send along with the query, they will be merged with the transporter requestOptions * - * @return \Algolia\AlgoliaSearch\Model\Search\GetTopUserIdsResponse|array + * @return array|GetTopUserIdsResponse */ public function getTopUserIds($requestOptions = []) { @@ -1587,7 +1622,7 @@ public function getTopUserIds($requestOptions = []) * @param string $userID Unique identifier of the user who makes the search request. (required) * @param array $requestOptions the requestOptions to send along with the query, they will be merged with the transporter requestOptions * - * @return \Algolia\AlgoliaSearch\Model\Search\UserId|array + * @return array|UserId */ public function getUserId($userID, $requestOptions = []) { @@ -1624,7 +1659,7 @@ public function getUserId($userID, $requestOptions = []) * @param bool $getClusters Whether to include the cluster's pending mapping state in the response. (optional) * @param array $requestOptions the requestOptions to send along with the query, they will be merged with the transporter requestOptions * - * @return \Algolia\AlgoliaSearch\Model\Search\HasPendingMappingsResponse|array + * @return array|HasPendingMappingsResponse */ public function hasPendingMappings($getClusters = null, $requestOptions = []) { @@ -1648,7 +1683,7 @@ public function hasPendingMappings($getClusters = null, $requestOptions = []) * * @param array $requestOptions the requestOptions to send along with the query, they will be merged with the transporter requestOptions * - * @return \Algolia\AlgoliaSearch\Model\Search\ListApiKeysResponse|array + * @return array|ListApiKeysResponse */ public function listApiKeys($requestOptions = []) { @@ -1668,7 +1703,7 @@ public function listApiKeys($requestOptions = []) * * @param array $requestOptions the requestOptions to send along with the query, they will be merged with the transporter requestOptions * - * @return \Algolia\AlgoliaSearch\Model\Search\ListClustersResponse|array + * @return array|ListClustersResponse */ public function listClusters($requestOptions = []) { @@ -1690,7 +1725,7 @@ public function listClusters($requestOptions = []) * @param int $hitsPerPage Number of hits per page. (optional, default to 100) * @param array $requestOptions the requestOptions to send along with the query, they will be merged with the transporter requestOptions * - * @return \Algolia\AlgoliaSearch\Model\Search\ListIndicesResponse|array + * @return array|ListIndicesResponse */ public function listIndices($page = null, $hitsPerPage = null, $requestOptions = []) { @@ -1720,7 +1755,7 @@ public function listIndices($page = null, $hitsPerPage = null, $requestOptions = * @param int $hitsPerPage Number of hits per page. (optional, default to 100) * @param array $requestOptions the requestOptions to send along with the query, they will be merged with the transporter requestOptions * - * @return \Algolia\AlgoliaSearch\Model\Search\ListUserIdsResponse|array + * @return array|ListUserIdsResponse */ public function listUserIds($page = null, $hitsPerPage = null, $requestOptions = []) { @@ -1750,7 +1785,7 @@ public function listUserIds($page = null, $hitsPerPage = null, $requestOptions = * * @param array $requestOptions the requestOptions to send along with the query, they will be merged with the transporter requestOptions * - * @return \Algolia\AlgoliaSearch\Model\Search\MultipleBatchResponse|array + * @return array|MultipleBatchResponse */ public function multipleBatch($batchParams, $requestOptions = []) { @@ -1785,7 +1820,7 @@ public function multipleBatch($batchParams, $requestOptions = []) * * @param array $requestOptions the requestOptions to send along with the query, they will be merged with the transporter requestOptions * - * @return \Algolia\AlgoliaSearch\Model\Search\UpdatedAtResponse|array + * @return array|UpdatedAtResponse */ public function operationIndex($indexName, $operationIndexParams, $requestOptions = []) { @@ -1831,7 +1866,7 @@ public function operationIndex($indexName, $operationIndexParams, $requestOption * @param bool $createIfNotExists Whether to create a new record if it doesn't exist. (optional, default to true) * @param array $requestOptions the requestOptions to send along with the query, they will be merged with the transporter requestOptions * - * @return \Algolia\AlgoliaSearch\Model\Search\UpdatedAtWithObjectIdResponse|array + * @return array|UpdatedAtWithObjectIdResponse */ public function partialUpdateObject($indexName, $objectID, $attributesToUpdate, $createIfNotExists = null, $requestOptions = []) { @@ -1893,7 +1928,7 @@ public function partialUpdateObject($indexName, $objectID, $attributesToUpdate, * @param string $userID Unique identifier of the user who makes the search request. (required) * @param array $requestOptions the requestOptions to send along with the query, they will be merged with the transporter requestOptions * - * @return \Algolia\AlgoliaSearch\Model\Search\RemoveUserIdResponse|array + * @return array|RemoveUserIdResponse */ public function removeUserId($userID, $requestOptions = []) { @@ -1930,7 +1965,7 @@ public function removeUserId($userID, $requestOptions = []) * @param array $source Allowed sources. (required) * @param array $requestOptions the requestOptions to send along with the query, they will be merged with the transporter requestOptions * - * @return \Algolia\AlgoliaSearch\Model\Search\ReplaceSourceResponse|array + * @return array|ReplaceSourceResponse */ public function replaceSources($source, $requestOptions = []) { @@ -1958,7 +1993,7 @@ public function replaceSources($source, $requestOptions = []) * @param string $key API key. (required) * @param array $requestOptions the requestOptions to send along with the query, they will be merged with the transporter requestOptions * - * @return \Algolia\AlgoliaSearch\Model\Search\AddApiKeyResponse|array + * @return AddApiKeyResponse|array */ public function restoreApiKey($key, $requestOptions = []) { @@ -1996,7 +2031,7 @@ public function restoreApiKey($key, $requestOptions = []) * @param array $body The record. A schemaless object with attributes that are useful in the context of search and discovery. (required) * @param array $requestOptions the requestOptions to send along with the query, they will be merged with the transporter requestOptions * - * @return \Algolia\AlgoliaSearch\Model\Search\SaveObjectResponse|array + * @return array|SaveObjectResponse */ public function saveObject($indexName, $body, $requestOptions = []) { @@ -2051,7 +2086,7 @@ public function saveObject($indexName, $body, $requestOptions = []) * @param bool $forwardToReplicas Whether changes are applied to replica indices. (optional) * @param array $requestOptions the requestOptions to send along with the query, they will be merged with the transporter requestOptions * - * @return \Algolia\AlgoliaSearch\Model\Search\UpdatedRuleResponse|array + * @return array|UpdatedRuleResponse */ public function saveRule($indexName, $objectID, $rule, $forwardToReplicas = null, $requestOptions = []) { @@ -2116,7 +2151,7 @@ public function saveRule($indexName, $objectID, $rule, $forwardToReplicas = null * @param bool $clearExistingRules Whether existing rules should be deleted before adding this batch. (optional) * @param array $requestOptions the requestOptions to send along with the query, they will be merged with the transporter requestOptions * - * @return \Algolia\AlgoliaSearch\Model\Search\UpdatedAtResponse|array + * @return array|UpdatedAtResponse */ public function saveRules($indexName, $rules, $forwardToReplicas = null, $clearExistingRules = null, $requestOptions = []) { @@ -2181,7 +2216,7 @@ public function saveRules($indexName, $rules, $forwardToReplicas = null, $clearE * @param bool $forwardToReplicas Whether changes are applied to replica indices. (optional) * @param array $requestOptions the requestOptions to send along with the query, they will be merged with the transporter requestOptions * - * @return \Algolia\AlgoliaSearch\Model\Search\SaveSynonymResponse|array + * @return array|SaveSynonymResponse */ public function saveSynonym($indexName, $objectID, $synonymHit, $forwardToReplicas = null, $requestOptions = []) { @@ -2246,7 +2281,7 @@ public function saveSynonym($indexName, $objectID, $synonymHit, $forwardToReplic * @param bool $replaceExistingSynonyms Whether to replace all synonyms in the index with the ones sent with this request. (optional) * @param array $requestOptions the requestOptions to send along with the query, they will be merged with the transporter requestOptions * - * @return \Algolia\AlgoliaSearch\Model\Search\UpdatedAtResponse|array + * @return array|UpdatedAtResponse */ public function saveSynonyms($indexName, $synonymHit, $forwardToReplicas = null, $replaceExistingSynonyms = null, $requestOptions = []) { @@ -2302,7 +2337,7 @@ public function saveSynonyms($indexName, $synonymHit, $forwardToReplicas = null, * * @param array $requestOptions the requestOptions to send along with the query, they will be merged with the transporter requestOptions * - * @return \Algolia\AlgoliaSearch\Model\Search\SearchResponses|array + * @return array|SearchResponses */ public function search($searchMethodParams, $requestOptions = []) { @@ -2338,7 +2373,7 @@ public function search($searchMethodParams, $requestOptions = []) * * @param array $requestOptions the requestOptions to send along with the query, they will be merged with the transporter requestOptions * - * @return \Algolia\AlgoliaSearch\Model\Search\SearchDictionaryEntriesResponse|array + * @return array|SearchDictionaryEntriesResponse */ public function searchDictionaryEntries($dictionaryName, $searchDictionaryEntriesParams, $requestOptions = []) { @@ -2389,7 +2424,7 @@ public function searchDictionaryEntries($dictionaryName, $searchDictionaryEntrie * * @param array $requestOptions the requestOptions to send along with the query, they will be merged with the transporter requestOptions * - * @return \Algolia\AlgoliaSearch\Model\Search\SearchForFacetValuesResponse|array + * @return array|SearchForFacetValuesResponse */ public function searchForFacetValues($indexName, $facetName, $searchForFacetValuesRequest = null, $requestOptions = []) { @@ -2451,7 +2486,7 @@ public function searchForFacetValues($indexName, $facetName, $searchForFacetValu * * @param array $requestOptions the requestOptions to send along with the query, they will be merged with the transporter requestOptions * - * @return \Algolia\AlgoliaSearch\Model\Search\SearchRulesResponse|array + * @return array|SearchRulesResponse */ public function searchRules($indexName, $searchRulesParams = null, $requestOptions = []) { @@ -2492,7 +2527,7 @@ public function searchRules($indexName, $searchRulesParams = null, $requestOptio * * @param array $requestOptions the requestOptions to send along with the query, they will be merged with the transporter requestOptions * - * @return \Algolia\AlgoliaSearch\Model\Search\SearchResponse|array + * @return array|SearchResponse */ public function searchSingleIndex($indexName, $searchParams = null, $requestOptions = []) { @@ -2537,7 +2572,7 @@ public function searchSingleIndex($indexName, $searchParams = null, $requestOpti * * @param array $requestOptions the requestOptions to send along with the query, they will be merged with the transporter requestOptions * - * @return \Algolia\AlgoliaSearch\Model\Search\SearchSynonymsResponse|array + * @return array|SearchSynonymsResponse */ public function searchSynonyms($indexName, $searchSynonymsParams = null, $requestOptions = []) { @@ -2581,7 +2616,7 @@ public function searchSynonyms($indexName, $searchSynonymsParams = null, $reques * * @param array $requestOptions the requestOptions to send along with the query, they will be merged with the transporter requestOptions * - * @return \Algolia\AlgoliaSearch\Model\Search\SearchUserIdsResponse|array + * @return array|SearchUserIdsResponse */ public function searchUserIds($searchUserIdsParams, $requestOptions = []) { @@ -2613,7 +2648,7 @@ public function searchUserIds($searchUserIdsParams, $requestOptions = []) * * @param array $requestOptions the requestOptions to send along with the query, they will be merged with the transporter requestOptions * - * @return \Algolia\AlgoliaSearch\Model\Search\UpdatedAtResponse|array + * @return array|UpdatedAtResponse */ public function setDictionarySettings($dictionarySettingsParams, $requestOptions = []) { @@ -2646,7 +2681,7 @@ public function setDictionarySettings($dictionarySettingsParams, $requestOptions * @param bool $forwardToReplicas Whether changes are applied to replica indices. (optional) * @param array $requestOptions the requestOptions to send along with the query, they will be merged with the transporter requestOptions * - * @return \Algolia\AlgoliaSearch\Model\Search\UpdatedAtResponse|array + * @return array|UpdatedAtResponse */ public function setSettings($indexName, $indexSettings, $forwardToReplicas = null, $requestOptions = []) { @@ -2705,7 +2740,7 @@ public function setSettings($indexName, $indexSettings, $forwardToReplicas = nul * * @param array $requestOptions the requestOptions to send along with the query, they will be merged with the transporter requestOptions * - * @return \Algolia\AlgoliaSearch\Model\Search\UpdateApiKeyResponse|array + * @return array|UpdateApiKeyResponse */ public function updateApiKey($key, $apiKey, $requestOptions = []) { diff --git a/clients/algoliasearch-client-php/lib/Model/Ingestion/AuthenticationType.php b/clients/algoliasearch-client-php/lib/Model/Ingestion/AuthenticationType.php index 4e0c627e4ed..57bb3019b1a 100644 --- a/clients/algoliasearch-client-php/lib/Model/Ingestion/AuthenticationType.php +++ b/clients/algoliasearch-client-php/lib/Model/Ingestion/AuthenticationType.php @@ -28,6 +28,8 @@ class AuthenticationType public const ALGOLIA_INSIGHTS = 'algoliaInsights'; + public const SECRETS = 'secrets'; + /** * Gets allowable values of the enum. * @@ -42,6 +44,7 @@ public static function getAllowableEnumValues() self::OAUTH, self::ALGOLIA, self::ALGOLIA_INSIGHTS, + self::SECRETS, ]; } } diff --git a/clients/algoliasearch-client-python/algoliasearch/ingestion/models/auth_input.py b/clients/algoliasearch-client-python/algoliasearch/ingestion/models/auth_input.py index 74a044795c7..e679c46fbc6 100644 --- a/clients/algoliasearch-client-python/algoliasearch/ingestion/models/auth_input.py +++ b/clients/algoliasearch-client-python/algoliasearch/ingestion/models/auth_input.py @@ -6,7 +6,7 @@ from __future__ import annotations -from json import dumps +from json import dumps, loads from sys import version_info from typing import Any, Dict, Optional, Set, Union @@ -45,6 +45,8 @@ class AuthInput(BaseModel): oneof_schema_6_validator: Optional[AuthAlgoliaInsights] = Field(default=None) + oneof_schema_7_validator: Optional[Dict[str, str]] = Field(default=None) + """ A key:value authentication for your transformations. """ actual_instance: Union[ AuthAPIKey, AuthAlgolia, @@ -52,6 +54,7 @@ class AuthInput(BaseModel): AuthBasic, AuthGoogleServiceAccount, AuthOAuth, + Dict[str, str], None, ] = None one_of_schemas: Set[str] = { @@ -61,6 +64,7 @@ class AuthInput(BaseModel): "AuthBasic", "AuthGoogleServiceAccount", "AuthOAuth", + "Dict[str, str]", } def __init__(self, *args, **kwargs) -> None: @@ -87,6 +91,7 @@ def unwrap_actual_instance( AuthBasic, AuthGoogleServiceAccount, AuthOAuth, + Dict[str, str], Self, None, ]: @@ -139,12 +144,19 @@ def from_json(cls, json_str: str) -> Self: try: instance.actual_instance = AuthAlgoliaInsights.from_json(json_str) + return instance + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + try: + instance.oneof_schema_7_validator = loads(json_str) + instance.actual_instance = instance.oneof_schema_7_validator + return instance except (ValidationError, ValueError) as e: error_messages.append(str(e)) raise ValueError( - "No match found when deserializing the JSON string into AuthInput with oneOf schemas: AuthAPIKey, AuthAlgolia, AuthAlgoliaInsights, AuthBasic, AuthGoogleServiceAccount, AuthOAuth. Details: " + "No match found when deserializing the JSON string into AuthInput with oneOf schemas: AuthAPIKey, AuthAlgolia, AuthAlgoliaInsights, AuthBasic, AuthGoogleServiceAccount, AuthOAuth, Dict[str, str]. Details: " + ", ".join(error_messages) ) @@ -171,6 +183,7 @@ def to_dict( AuthBasic, AuthGoogleServiceAccount, AuthOAuth, + Dict[str, str], ] ]: """Returns the dict representation of the actual instance""" diff --git a/clients/algoliasearch-client-python/algoliasearch/ingestion/models/authentication_type.py b/clients/algoliasearch-client-python/algoliasearch/ingestion/models/authentication_type.py index cf9ee837408..0fb65aa853e 100644 --- a/clients/algoliasearch-client-python/algoliasearch/ingestion/models/authentication_type.py +++ b/clients/algoliasearch-client-python/algoliasearch/ingestion/models/authentication_type.py @@ -36,6 +36,8 @@ class AuthenticationType(str, Enum): ALGOLIAINSIGHTS = "algoliaInsights" + SECRETS = "secrets" + @classmethod def from_json(cls, json_str: str) -> Self: """Create an instance of AuthenticationType from a JSON string""" diff --git a/clients/algoliasearch-client-ruby/lib/algolia/models/ingestion/auth_input.rb b/clients/algoliasearch-client-ruby/lib/algolia/models/ingestion/auth_input.rb index 0da4dbdd92c..d018297b73c 100644 --- a/clients/algoliasearch-client-ruby/lib/algolia/models/ingestion/auth_input.rb +++ b/clients/algoliasearch-client-ruby/lib/algolia/models/ingestion/auth_input.rb @@ -15,7 +15,8 @@ def openapi_one_of :"AuthAlgoliaInsights", :"AuthBasic", :"AuthGoogleServiceAccount", - :"AuthOAuth" + :"AuthOAuth", + :"Hash" ] end diff --git a/clients/algoliasearch-client-ruby/lib/algolia/models/ingestion/authentication_type.rb b/clients/algoliasearch-client-ruby/lib/algolia/models/ingestion/authentication_type.rb index 5a0771cc10f..c22d01dff3a 100644 --- a/clients/algoliasearch-client-ruby/lib/algolia/models/ingestion/authentication_type.rb +++ b/clients/algoliasearch-client-ruby/lib/algolia/models/ingestion/authentication_type.rb @@ -12,9 +12,10 @@ class AuthenticationType OAUTH = "oauth".freeze ALGOLIA = "algolia".freeze ALGOLIA_INSIGHTS = "algoliaInsights".freeze + SECRETS = "secrets".freeze def self.all_vars - @all_vars ||= [GOOGLE_SERVICE_ACCOUNT, BASIC, API_KEY, OAUTH, ALGOLIA, ALGOLIA_INSIGHTS].freeze + @all_vars ||= [GOOGLE_SERVICE_ACCOUNT, BASIC, API_KEY, OAUTH, ALGOLIA, ALGOLIA_INSIGHTS, SECRETS].freeze end # Builds the enum from string diff --git a/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/ingestion/AuthInput.scala b/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/ingestion/AuthInput.scala index d89f5cc425e..d8528e5853a 100644 --- a/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/ingestion/AuthInput.scala +++ b/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/ingestion/AuthInput.scala @@ -27,7 +27,15 @@ sealed trait AuthInput trait AuthInputTrait extends AuthInput -object AuthInput {} +object AuthInput { + + case class MapOfStringString(value: Map[String, String]) extends AuthInput + + def apply(value: Map[String, String]): AuthInput = { + AuthInput.MapOfStringString(value) + } + +} object AuthInputSerializer extends Serializer[AuthInput] { override def deserialize(implicit format: Formats): PartialFunction[(TypeInfo, JValue), AuthInput] = { @@ -45,7 +53,8 @@ object AuthInputSerializer extends Serializer[AuthInput] { case value: JObject if value.obj.exists(_._1 == "key") => Extraction.extract[AuthAPIKey](value) case value: JObject => Extraction.extract[AuthAlgolia](value) case value: JObject => Extraction.extract[AuthAlgoliaInsights](value) - case _ => throw new MappingException("Can't convert " + json + " to AuthInput") + case value: JObject => AuthInput.apply(Extraction.extract[Map[String, String]](value)) + case _ => throw new MappingException("Can't convert " + json + " to AuthInput") } } diff --git a/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/ingestion/AuthenticationType.scala b/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/ingestion/AuthenticationType.scala index 6b227b582e3..cdf5981c879 100644 --- a/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/ingestion/AuthenticationType.scala +++ b/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/ingestion/AuthenticationType.scala @@ -44,7 +44,11 @@ object AuthenticationType { case object AlgoliaInsights extends AuthenticationType { override def toString = "algoliaInsights" } - val values: Seq[AuthenticationType] = Seq(GoogleServiceAccount, Basic, ApiKey, Oauth, Algolia, AlgoliaInsights) + case object Secrets extends AuthenticationType { + override def toString = "secrets" + } + val values: Seq[AuthenticationType] = + Seq(GoogleServiceAccount, Basic, ApiKey, Oauth, Algolia, AlgoliaInsights, Secrets) def withName(name: String): AuthenticationType = AuthenticationType.values .find(_.toString == name) diff --git a/clients/algoliasearch-client-swift/Sources/Ingestion/Models/AuthInput.swift b/clients/algoliasearch-client-swift/Sources/Ingestion/Models/AuthInput.swift index 761af7d588f..e05104c762a 100644 --- a/clients/algoliasearch-client-swift/Sources/Ingestion/Models/AuthInput.swift +++ b/clients/algoliasearch-client-swift/Sources/Ingestion/Models/AuthInput.swift @@ -13,6 +13,7 @@ public enum AuthInput: Codable, JSONEncodable, AbstractEncodable { case authAPIKey(AuthAPIKey) case authAlgolia(AuthAlgolia) case authAlgoliaInsights(AuthAlgoliaInsights) + case dictionaryOfStringToString([String: String]) public func encode(to encoder: Encoder) throws { var container = encoder.singleValueContainer() @@ -29,6 +30,8 @@ public enum AuthInput: Codable, JSONEncodable, AbstractEncodable { try container.encode(value) case let .authAlgoliaInsights(value): try container.encode(value) + case let .dictionaryOfStringToString(value): + try container.encode(value) } } @@ -46,6 +49,8 @@ public enum AuthInput: Codable, JSONEncodable, AbstractEncodable { self = .authAlgolia(value) } else if let value = try? container.decode(AuthAlgoliaInsights.self) { self = .authAlgoliaInsights(value) + } else if let value = try? container.decode([String: String].self) { + self = .dictionaryOfStringToString(value) } else { throw DecodingError.typeMismatch( Self.Type.self, @@ -68,6 +73,8 @@ public enum AuthInput: Codable, JSONEncodable, AbstractEncodable { value as AuthAlgolia case let .authAlgoliaInsights(value): value as AuthAlgoliaInsights + case let .dictionaryOfStringToString(value): + value as [String: String] } } } diff --git a/clients/algoliasearch-client-swift/Sources/Ingestion/Models/AuthenticationType.swift b/clients/algoliasearch-client-swift/Sources/Ingestion/Models/AuthenticationType.swift index 7a014fe81eb..ef3353f6aca 100644 --- a/clients/algoliasearch-client-swift/Sources/Ingestion/Models/AuthenticationType.swift +++ b/clients/algoliasearch-client-swift/Sources/Ingestion/Models/AuthenticationType.swift @@ -14,6 +14,7 @@ public enum AuthenticationType: String, Codable, CaseIterable { case oauth case algolia case algoliaInsights + case secrets } extension AuthenticationType: Hashable {} diff --git a/clients/algoliasearch-client-swift/Sources/Recommend/Models/BaseRecommendIndexSettings.swift b/clients/algoliasearch-client-swift/Sources/Recommend/Models/BaseRecommendIndexSettings.swift index e366c7e2b96..a1bc2434b2f 100644 --- a/clients/algoliasearch-client-swift/Sources/Recommend/Models/BaseRecommendIndexSettings.swift +++ b/clients/algoliasearch-client-swift/Sources/Recommend/Models/BaseRecommendIndexSettings.swift @@ -115,7 +115,7 @@ public struct BaseRecommendIndexSettings: Codable, JSONEncodable { /// matches. - `singleWordSynonym`. Single-word synonyms, such as \"NY\" = \"NYC\", are considered exact matches. /// - `multiWordsSynonym`. Multi-word synonyms, such as \"NY\" = \"New York\", are considered exact matches. public var alternativesAsExact: [RecommendAlternativesAsExact]? - /// Advanced search syntax features you want to support. - `exactPhrase`. Phrases in quotes must match exactly. + // Advanced search syntax features you want to support. - `exactPhrase`. Phrases in quotes must match exactly. /// For example, `sparkly blue \"iPhone case\"` only returns records with the exact string \"iPhone case\". - /// `excludeWords`. Query words prefixed with a `-` must not occur in a record. For example, `search -engine` /// matches records that contain \"search\" but not \"engine\". This setting only has an effect if `advancedSyntax` @@ -155,7 +155,7 @@ public struct BaseRecommendIndexSettings: Codable, JSONEncodable { /// attribute is determined by the order in the `searchableAttributes` setting. public var attributeCriteriaComputedByMinProximity: Bool? public var renderingContent: RecommendRenderingContent? - /// Whether this search will use [Dynamic Re-Ranking](https://www.algolia.com/doc/guides/algolia-ai/re-ranking/). + // Whether this search will use [Dynamic Re-Ranking](https://www.algolia.com/doc/guides/algolia-ai/re-ranking/). /// This setting only has an effect if you activated Dynamic Re-Ranking for this index in the Algolia dashboard. public var enableReRanking: Bool? public var reRankingApplyFilter: RecommendReRankingApplyFilter? diff --git a/clients/algoliasearch-client-swift/Sources/Recommend/Models/BaseRecommendSearchParams.swift b/clients/algoliasearch-client-swift/Sources/Recommend/Models/BaseRecommendSearchParams.swift index faadcb269c2..3a3ae4091bf 100644 --- a/clients/algoliasearch-client-swift/Sources/Recommend/Models/BaseRecommendSearchParams.swift +++ b/clients/algoliasearch-client-swift/Sources/Recommend/Models/BaseRecommendSearchParams.swift @@ -19,7 +19,7 @@ public struct BaseRecommendSearchParams: Codable, JSONEncodable { /// upper limits of the range (inclusive). - **Facet filters.** `:` where `` is a facet /// attribute (case-sensitive) and `` a facet value. - **Tag filters.** `_tags:` or just `` /// (case-sensitive). - **Boolean filters.** `: true | false`. You can combine filters with `AND`, `OR`, and - /// `NOT` operators with the following restrictions: - You can only combine filters of the same type with `OR`. + // `NOT` operators with the following restrictions: - You can only combine filters of the same type with `OR`. /// **Not supported:** `facet:value OR num > 3`. - You can't use `NOT` with combinations of filters. **Not /// supported:** `NOT(facet:value OR facet:value)` - You can't combine conjunctions (`AND`) with `OR`. **Not /// supported:** `facet:value OR (facet:value AND facet:value)` Use quotes around your filters, if the facet diff --git a/clients/algoliasearch-client-swift/Sources/Recommend/Models/FallbackParams.swift b/clients/algoliasearch-client-swift/Sources/Recommend/Models/FallbackParams.swift index df0d3ccb990..b48aa37c788 100644 --- a/clients/algoliasearch-client-swift/Sources/Recommend/Models/FallbackParams.swift +++ b/clients/algoliasearch-client-swift/Sources/Recommend/Models/FallbackParams.swift @@ -19,7 +19,7 @@ public struct FallbackParams: Codable, JSONEncodable { /// upper limits of the range (inclusive). - **Facet filters.** `:` where `` is a facet /// attribute (case-sensitive) and `` a facet value. - **Tag filters.** `_tags:` or just `` /// (case-sensitive). - **Boolean filters.** `: true | false`. You can combine filters with `AND`, `OR`, and - /// `NOT` operators with the following restrictions: - You can only combine filters of the same type with `OR`. + // `NOT` operators with the following restrictions: - You can only combine filters of the same type with `OR`. /// **Not supported:** `facet:value OR num > 3`. - You can't use `NOT` with combinations of filters. **Not /// supported:** `NOT(facet:value OR facet:value)` - You can't combine conjunctions (`AND`) with `OR`. **Not /// supported:** `facet:value OR (facet:value AND facet:value)` Use quotes around your filters, if the facet @@ -97,16 +97,16 @@ public struct FallbackParams: Codable, JSONEncodable { public var enableABTest: Bool? /// Search query. public var query: String? - /// Attributes used for [faceting](https://www.algolia.com/doc/guides/managing-results/refine-results/faceting/). + /// Attributes used for [faceting](https://www.algolia.com/doc/guides/managing-results/refine-results/faceting/). /// Facets are attributes that let you categorize search results. They can be used for filtering search results. By /// default, no attribute is used for faceting. Attribute names are case-sensitive. **Modifiers** - /// `filterOnly(\"ATTRIBUTE\")`. Allows the attribute to be used as a filter but doesn't evaluate the facet - /// values. - `searchable(\"ATTRIBUTE\")`. Allows searching for facet values. - `afterDistinct(\"ATTRIBUTE\")`. + /// values. - `searchable(\"ATTRIBUTE\")`. Allows searching for facet values. - `afterDistinct(\"ATTRIBUTE\")`. /// Evaluates the facet count _after_ deduplication with `distinct`. This ensures accurate facet counts. You /// can apply this modifier to searchable facets: `afterDistinct(searchable(ATTRIBUTE))`. public var attributesForFaceting: [String]? /// Creates [replica - /// indices](https://www.algolia.com/doc/guides/managing-results/refine-results/sorting/in-depth/replicas/). + /// indices](https://www.algolia.com/doc/guides/managing-results/refine-results/sorting/in-depth/replicas/). /// Replicas are copies of a primary index with the same records but different settings, synonyms, or rules. If you /// want to offer a different ranking or sorting of your search results, you'll use replica indices. All index /// operations on a primary index are automatically forwarded to its replicas. To add a replica index, you must @@ -297,7 +297,7 @@ public struct FallbackParams: Codable, JSONEncodable { /// matches. - `singleWordSynonym`. Single-word synonyms, such as \"NY\" = \"NYC\", are considered exact matches. /// - `multiWordsSynonym`. Multi-word synonyms, such as \"NY\" = \"New York\", are considered exact matches. public var alternativesAsExact: [RecommendAlternativesAsExact]? - /// Advanced search syntax features you want to support. - `exactPhrase`. Phrases in quotes must match exactly. + // Advanced search syntax features you want to support. - `exactPhrase`. Phrases in quotes must match exactly. /// For example, `sparkly blue \"iPhone case\"` only returns records with the exact string \"iPhone case\". - /// `excludeWords`. Query words prefixed with a `-` must not occur in a record. For example, `search -engine` /// matches records that contain \"search\" but not \"engine\". This setting only has an effect if `advancedSyntax` @@ -337,7 +337,7 @@ public struct FallbackParams: Codable, JSONEncodable { /// attribute is determined by the order in the `searchableAttributes` setting. public var attributeCriteriaComputedByMinProximity: Bool? public var renderingContent: RecommendRenderingContent? - /// Whether this search will use [Dynamic Re-Ranking](https://www.algolia.com/doc/guides/algolia-ai/re-ranking/). + // Whether this search will use [Dynamic Re-Ranking](https://www.algolia.com/doc/guides/algolia-ai/re-ranking/). /// This setting only has an effect if you activated Dynamic Re-Ranking for this index in the Algolia dashboard. public var enableReRanking: Bool? public var reRankingApplyFilter: RecommendReRankingApplyFilter? diff --git a/clients/algoliasearch-client-swift/Sources/Recommend/Models/ParamsConsequence.swift b/clients/algoliasearch-client-swift/Sources/Recommend/Models/ParamsConsequence.swift index 69a4e344396..19e76c14175 100644 --- a/clients/algoliasearch-client-swift/Sources/Recommend/Models/ParamsConsequence.swift +++ b/clients/algoliasearch-client-swift/Sources/Recommend/Models/ParamsConsequence.swift @@ -16,7 +16,7 @@ public struct ParamsConsequence: Codable, JSONEncodable { /// upper limits of the range (inclusive). - **Facet filters.** `:` where `` is a facet /// attribute (case-sensitive) and `` a facet value. - **Tag filters.** `_tags:` or just `` /// (case-sensitive). - **Boolean filters.** `: true | false`. You can combine filters with `AND`, `OR`, and - /// `NOT` operators with the following restrictions: - You can only combine filters of the same type with `OR`. + /// `NOT` operators with the following restrictions: - You can only combine filters of the same type with `OR`. /// **Not supported:** `facet:value OR num > 3`. - You can't use `NOT` with combinations of filters. **Not /// supported:** `NOT(facet:value OR facet:value)` - You can't combine conjunctions (`AND`) with `OR`. **Not /// supported:** `facet:value OR (facet:value AND facet:value)` Use quotes around your filters, if the facet diff --git a/clients/algoliasearch-client-swift/Sources/Recommend/Models/RecommendBaseIndexSettings.swift b/clients/algoliasearch-client-swift/Sources/Recommend/Models/RecommendBaseIndexSettings.swift index afd026af490..c728e20160d 100644 --- a/clients/algoliasearch-client-swift/Sources/Recommend/Models/RecommendBaseIndexSettings.swift +++ b/clients/algoliasearch-client-swift/Sources/Recommend/Models/RecommendBaseIndexSettings.swift @@ -7,16 +7,16 @@ import Foundation #endif public struct RecommendBaseIndexSettings: Codable, JSONEncodable { - /// Attributes used for [faceting](https://www.algolia.com/doc/guides/managing-results/refine-results/faceting/). + /// Attributes used for [faceting](https://www.algolia.com/doc/guides/managing-results/refine-results/faceting/). /// Facets are attributes that let you categorize search results. They can be used for filtering search results. By /// default, no attribute is used for faceting. Attribute names are case-sensitive. **Modifiers** - /// `filterOnly(\"ATTRIBUTE\")`. Allows the attribute to be used as a filter but doesn't evaluate the facet - /// values. - `searchable(\"ATTRIBUTE\")`. Allows searching for facet values. - `afterDistinct(\"ATTRIBUTE\")`. + /// values. - `searchable(\"ATTRIBUTE\")`. Allows searching for facet values. - `afterDistinct(\"ATTRIBUTE\")`. /// Evaluates the facet count _after_ deduplication with `distinct`. This ensures accurate facet counts. You /// can apply this modifier to searchable facets: `afterDistinct(searchable(ATTRIBUTE))`. public var attributesForFaceting: [String]? /// Creates [replica - /// indices](https://www.algolia.com/doc/guides/managing-results/refine-results/sorting/in-depth/replicas/). + /// indices](https://www.algolia.com/doc/guides/managing-results/refine-results/sorting/in-depth/replicas/). /// Replicas are copies of a primary index with the same records but different settings, synonyms, or rules. If you /// want to offer a different ranking or sorting of your search results, you'll use replica indices. All index /// operations on a primary index are automatically forwarded to its replicas. To add a replica index, you must diff --git a/clients/algoliasearch-client-swift/Sources/Recommend/Models/RecommendCondition.swift b/clients/algoliasearch-client-swift/Sources/Recommend/Models/RecommendCondition.swift index 155022f98da..8b71b27eb23 100644 --- a/clients/algoliasearch-client-swift/Sources/Recommend/Models/RecommendCondition.swift +++ b/clients/algoliasearch-client-swift/Sources/Recommend/Models/RecommendCondition.swift @@ -14,7 +14,7 @@ public struct RecommendCondition: Codable, JSONEncodable { /// upper limits of the range (inclusive). - **Facet filters.** `:` where `` is a facet /// attribute (case-sensitive) and `` a facet value. - **Tag filters.** `_tags:` or just `` /// (case-sensitive). - **Boolean filters.** `: true | false`. You can combine filters with `AND`, `OR`, and - /// `NOT` operators with the following restrictions: - You can only combine filters of the same type with `OR`. + /// `NOT` operators with the following restrictions: - You can only combine filters of the same type with `OR`. /// **Not supported:** `facet:value OR num > 3`. - You can't use `NOT` with combinations of filters. **Not /// supported:** `NOT(facet:value OR facet:value)` - You can't combine conjunctions (`AND`) with `OR`. **Not /// supported:** `facet:value OR (facet:value AND facet:value)` Use quotes around your filters, if the facet diff --git a/clients/algoliasearch-client-swift/Sources/Recommend/Models/RecommendIndexSettings.swift b/clients/algoliasearch-client-swift/Sources/Recommend/Models/RecommendIndexSettings.swift index 6003913bc5d..3c8be783ec5 100644 --- a/clients/algoliasearch-client-swift/Sources/Recommend/Models/RecommendIndexSettings.swift +++ b/clients/algoliasearch-client-swift/Sources/Recommend/Models/RecommendIndexSettings.swift @@ -8,16 +8,16 @@ import Foundation /// Index settings. public struct RecommendIndexSettings: Codable, JSONEncodable { - /// Attributes used for [faceting](https://www.algolia.com/doc/guides/managing-results/refine-results/faceting/). + /// Attributes used for [faceting](https://www.algolia.com/doc/guides/managing-results/refine-results/faceting/). /// Facets are attributes that let you categorize search results. They can be used for filtering search results. By /// default, no attribute is used for faceting. Attribute names are case-sensitive. **Modifiers** - /// `filterOnly(\"ATTRIBUTE\")`. Allows the attribute to be used as a filter but doesn't evaluate the facet - /// values. - `searchable(\"ATTRIBUTE\")`. Allows searching for facet values. - `afterDistinct(\"ATTRIBUTE\")`. + /// values. - `searchable(\"ATTRIBUTE\")`. Allows searching for facet values. - `afterDistinct(\"ATTRIBUTE\")`. /// Evaluates the facet count _after_ deduplication with `distinct`. This ensures accurate facet counts. You /// can apply this modifier to searchable facets: `afterDistinct(searchable(ATTRIBUTE))`. public var attributesForFaceting: [String]? /// Creates [replica - /// indices](https://www.algolia.com/doc/guides/managing-results/refine-results/sorting/in-depth/replicas/). + /// indices](https://www.algolia.com/doc/guides/managing-results/refine-results/sorting/in-depth/replicas/). /// Replicas are copies of a primary index with the same records but different settings, synonyms, or rules. If you /// want to offer a different ranking or sorting of your search results, you'll use replica indices. All index /// operations on a primary index are automatically forwarded to its replicas. To add a replica index, you must @@ -208,7 +208,7 @@ public struct RecommendIndexSettings: Codable, JSONEncodable { /// matches. - `singleWordSynonym`. Single-word synonyms, such as \"NY\" = \"NYC\", are considered exact matches. /// - `multiWordsSynonym`. Multi-word synonyms, such as \"NY\" = \"New York\", are considered exact matches. public var alternativesAsExact: [RecommendAlternativesAsExact]? - /// Advanced search syntax features you want to support. - `exactPhrase`. Phrases in quotes must match exactly. + // Advanced search syntax features you want to support. - `exactPhrase`. Phrases in quotes must match exactly. /// For example, `sparkly blue \"iPhone case\"` only returns records with the exact string \"iPhone case\". - /// `excludeWords`. Query words prefixed with a `-` must not occur in a record. For example, `search -engine` /// matches records that contain \"search\" but not \"engine\". This setting only has an effect if `advancedSyntax` @@ -248,7 +248,7 @@ public struct RecommendIndexSettings: Codable, JSONEncodable { /// attribute is determined by the order in the `searchableAttributes` setting. public var attributeCriteriaComputedByMinProximity: Bool? public var renderingContent: RecommendRenderingContent? - /// Whether this search will use [Dynamic Re-Ranking](https://www.algolia.com/doc/guides/algolia-ai/re-ranking/). + // Whether this search will use [Dynamic Re-Ranking](https://www.algolia.com/doc/guides/algolia-ai/re-ranking/). /// This setting only has an effect if you activated Dynamic Re-Ranking for this index in the Algolia dashboard. public var enableReRanking: Bool? public var reRankingApplyFilter: RecommendReRankingApplyFilter? diff --git a/clients/algoliasearch-client-swift/Sources/Recommend/Models/RecommendSearchParams.swift b/clients/algoliasearch-client-swift/Sources/Recommend/Models/RecommendSearchParams.swift index 26e244bbaa1..942c4651acf 100644 --- a/clients/algoliasearch-client-swift/Sources/Recommend/Models/RecommendSearchParams.swift +++ b/clients/algoliasearch-client-swift/Sources/Recommend/Models/RecommendSearchParams.swift @@ -20,7 +20,7 @@ public struct RecommendSearchParams: Codable, JSONEncodable { /// upper limits of the range (inclusive). - **Facet filters.** `:` where `` is a facet /// attribute (case-sensitive) and `` a facet value. - **Tag filters.** `_tags:` or just `` /// (case-sensitive). - **Boolean filters.** `: true | false`. You can combine filters with `AND`, `OR`, and - /// `NOT` operators with the following restrictions: - You can only combine filters of the same type with `OR`. + // `NOT` operators with the following restrictions: - You can only combine filters of the same type with `OR`. /// **Not supported:** `facet:value OR num > 3`. - You can't use `NOT` with combinations of filters. **Not /// supported:** `NOT(facet:value OR facet:value)` - You can't combine conjunctions (`AND`) with `OR`. **Not /// supported:** `facet:value OR (facet:value AND facet:value)` Use quotes around your filters, if the facet @@ -98,16 +98,16 @@ public struct RecommendSearchParams: Codable, JSONEncodable { public var enableABTest: Bool? /// Search query. public var query: String? - /// Attributes used for [faceting](https://www.algolia.com/doc/guides/managing-results/refine-results/faceting/). + /// Attributes used for [faceting](https://www.algolia.com/doc/guides/managing-results/refine-results/faceting/). /// Facets are attributes that let you categorize search results. They can be used for filtering search results. By /// default, no attribute is used for faceting. Attribute names are case-sensitive. **Modifiers** - /// `filterOnly(\"ATTRIBUTE\")`. Allows the attribute to be used as a filter but doesn't evaluate the facet - /// values. - `searchable(\"ATTRIBUTE\")`. Allows searching for facet values. - `afterDistinct(\"ATTRIBUTE\")`. + /// values. - `searchable(\"ATTRIBUTE\")`. Allows searching for facet values. - `afterDistinct(\"ATTRIBUTE\")`. /// Evaluates the facet count _after_ deduplication with `distinct`. This ensures accurate facet counts. You /// can apply this modifier to searchable facets: `afterDistinct(searchable(ATTRIBUTE))`. public var attributesForFaceting: [String]? /// Creates [replica - /// indices](https://www.algolia.com/doc/guides/managing-results/refine-results/sorting/in-depth/replicas/). + /// indices](https://www.algolia.com/doc/guides/managing-results/refine-results/sorting/in-depth/replicas/). /// Replicas are copies of a primary index with the same records but different settings, synonyms, or rules. If you /// want to offer a different ranking or sorting of your search results, you'll use replica indices. All index /// operations on a primary index are automatically forwarded to its replicas. To add a replica index, you must @@ -298,7 +298,7 @@ public struct RecommendSearchParams: Codable, JSONEncodable { /// matches. - `singleWordSynonym`. Single-word synonyms, such as \"NY\" = \"NYC\", are considered exact matches. /// - `multiWordsSynonym`. Multi-word synonyms, such as \"NY\" = \"New York\", are considered exact matches. public var alternativesAsExact: [RecommendAlternativesAsExact]? - /// Advanced search syntax features you want to support. - `exactPhrase`. Phrases in quotes must match exactly. + // Advanced search syntax features you want to support. - `exactPhrase`. Phrases in quotes must match exactly. /// For example, `sparkly blue \"iPhone case\"` only returns records with the exact string \"iPhone case\". - /// `excludeWords`. Query words prefixed with a `-` must not occur in a record. For example, `search -engine` /// matches records that contain \"search\" but not \"engine\". This setting only has an effect if `advancedSyntax` @@ -338,7 +338,7 @@ public struct RecommendSearchParams: Codable, JSONEncodable { /// attribute is determined by the order in the `searchableAttributes` setting. public var attributeCriteriaComputedByMinProximity: Bool? public var renderingContent: RecommendRenderingContent? - /// Whether this search will use [Dynamic Re-Ranking](https://www.algolia.com/doc/guides/algolia-ai/re-ranking/). + // Whether this search will use [Dynamic Re-Ranking](https://www.algolia.com/doc/guides/algolia-ai/re-ranking/). /// This setting only has an effect if you activated Dynamic Re-Ranking for this index in the Algolia dashboard. public var enableReRanking: Bool? public var reRankingApplyFilter: RecommendReRankingApplyFilter? diff --git a/clients/algoliasearch-client-swift/Sources/Search/Models/BrowseParamsObject.swift b/clients/algoliasearch-client-swift/Sources/Search/Models/BrowseParamsObject.swift index d4b7356c859..7cff6532afc 100644 --- a/clients/algoliasearch-client-swift/Sources/Search/Models/BrowseParamsObject.swift +++ b/clients/algoliasearch-client-swift/Sources/Search/Models/BrowseParamsObject.swift @@ -21,7 +21,7 @@ public struct BrowseParamsObject: Codable, JSONEncodable { /// upper limits of the range (inclusive). - **Facet filters.** `:` where `` is a facet /// attribute (case-sensitive) and `` a facet value. - **Tag filters.** `_tags:` or just `` /// (case-sensitive). - **Boolean filters.** `: true | false`. You can combine filters with `AND`, `OR`, and - /// `NOT` operators with the following restrictions: - You can only combine filters of the same type with `OR`. + // `NOT` operators with the following restrictions: - You can only combine filters of the same type with `OR`. /// **Not supported:** `facet:value OR num > 3`. - You can't use `NOT` with combinations of filters. **Not /// supported:** `NOT(facet:value OR facet:value)` - You can't combine conjunctions (`AND`) with `OR`. **Not /// supported:** `facet:value OR (facet:value AND facet:value)` Use quotes around your filters, if the facet @@ -228,7 +228,7 @@ public struct BrowseParamsObject: Codable, JSONEncodable { /// matches. - `singleWordSynonym`. Single-word synonyms, such as \"NY\" = \"NYC\", are considered exact matches. /// - `multiWordsSynonym`. Multi-word synonyms, such as \"NY\" = \"New York\", are considered exact matches. public var alternativesAsExact: [SearchAlternativesAsExact]? - /// Advanced search syntax features you want to support. - `exactPhrase`. Phrases in quotes must match exactly. + // Advanced search syntax features you want to support. - `exactPhrase`. Phrases in quotes must match exactly. /// For example, `sparkly blue \"iPhone case\"` only returns records with the exact string \"iPhone case\". - /// `excludeWords`. Query words prefixed with a `-` must not occur in a record. For example, `search -engine` /// matches records that contain \"search\" but not \"engine\". This setting only has an effect if `advancedSyntax` @@ -268,7 +268,7 @@ public struct BrowseParamsObject: Codable, JSONEncodable { /// attribute is determined by the order in the `searchableAttributes` setting. public var attributeCriteriaComputedByMinProximity: Bool? public var renderingContent: SearchRenderingContent? - /// Whether this search will use [Dynamic Re-Ranking](https://www.algolia.com/doc/guides/algolia-ai/re-ranking/). + // Whether this search will use [Dynamic Re-Ranking](https://www.algolia.com/doc/guides/algolia-ai/re-ranking/). /// This setting only has an effect if you activated Dynamic Re-Ranking for this index in the Algolia dashboard. public var enableReRanking: Bool? public var reRankingApplyFilter: SearchReRankingApplyFilter? diff --git a/clients/algoliasearch-client-swift/Sources/Search/Models/DeleteByParams.swift b/clients/algoliasearch-client-swift/Sources/Search/Models/DeleteByParams.swift index 5fe1eabd95a..2d1c132f5e3 100644 --- a/clients/algoliasearch-client-swift/Sources/Search/Models/DeleteByParams.swift +++ b/clients/algoliasearch-client-swift/Sources/Search/Models/DeleteByParams.swift @@ -14,7 +14,7 @@ public struct DeleteByParams: Codable, JSONEncodable { /// upper limits of the range (inclusive). - **Facet filters.** `:` where `` is a facet /// attribute (case-sensitive) and `` a facet value. - **Tag filters.** `_tags:` or just `` /// (case-sensitive). - **Boolean filters.** `: true | false`. You can combine filters with `AND`, `OR`, and - /// `NOT` operators with the following restrictions: - You can only combine filters of the same type with `OR`. + // `NOT` operators with the following restrictions: - You can only combine filters of the same type with `OR`. /// **Not supported:** `facet:value OR num > 3`. - You can't use `NOT` with combinations of filters. **Not /// supported:** `NOT(facet:value OR facet:value)` - You can't combine conjunctions (`AND`) with `OR`. **Not /// supported:** `facet:value OR (facet:value AND facet:value)` Use quotes around your filters, if the facet diff --git a/clients/algoliasearch-client-swift/Sources/Search/Models/IndexSettings.swift b/clients/algoliasearch-client-swift/Sources/Search/Models/IndexSettings.swift index 1b89d358d95..73c855c07d9 100644 --- a/clients/algoliasearch-client-swift/Sources/Search/Models/IndexSettings.swift +++ b/clients/algoliasearch-client-swift/Sources/Search/Models/IndexSettings.swift @@ -8,16 +8,16 @@ import Foundation /// Index settings. public struct IndexSettings: Codable, JSONEncodable { - /// Attributes used for [faceting](https://www.algolia.com/doc/guides/managing-results/refine-results/faceting/). + /// Attributes used for [faceting](https://www.algolia.com/doc/guides/managing-results/refine-results/faceting/). /// Facets are attributes that let you categorize search results. They can be used for filtering search results. By /// default, no attribute is used for faceting. Attribute names are case-sensitive. **Modifiers** - /// `filterOnly(\"ATTRIBUTE\")`. Allows the attribute to be used as a filter but doesn't evaluate the facet - /// values. - `searchable(\"ATTRIBUTE\")`. Allows searching for facet values. - `afterDistinct(\"ATTRIBUTE\")`. + /// values. - `searchable(\"ATTRIBUTE\")`. Allows searching for facet values. - `afterDistinct(\"ATTRIBUTE\")`. /// Evaluates the facet count _after_ deduplication with `distinct`. This ensures accurate facet counts. You /// can apply this modifier to searchable facets: `afterDistinct(searchable(ATTRIBUTE))`. public var attributesForFaceting: [String]? /// Creates [replica - /// indices](https://www.algolia.com/doc/guides/managing-results/refine-results/sorting/in-depth/replicas/). + /// indices](https://www.algolia.com/doc/guides/managing-results/refine-results/sorting/in-depth/replicas/). /// Replicas are copies of a primary index with the same records but different settings, synonyms, or rules. If you /// want to offer a different ranking or sorting of your search results, you'll use replica indices. All index /// operations on a primary index are automatically forwarded to its replicas. To add a replica index, you must @@ -225,7 +225,7 @@ public struct IndexSettings: Codable, JSONEncodable { /// matches. - `singleWordSynonym`. Single-word synonyms, such as \"NY\" = \"NYC\", are considered exact matches. /// - `multiWordsSynonym`. Multi-word synonyms, such as \"NY\" = \"New York\", are considered exact matches. public var alternativesAsExact: [SearchAlternativesAsExact]? - /// Advanced search syntax features you want to support. - `exactPhrase`. Phrases in quotes must match exactly. + // Advanced search syntax features you want to support. - `exactPhrase`. Phrases in quotes must match exactly. /// For example, `sparkly blue \"iPhone case\"` only returns records with the exact string \"iPhone case\". - /// `excludeWords`. Query words prefixed with a `-` must not occur in a record. For example, `search -engine` /// matches records that contain \"search\" but not \"engine\". This setting only has an effect if `advancedSyntax` @@ -265,7 +265,7 @@ public struct IndexSettings: Codable, JSONEncodable { /// attribute is determined by the order in the `searchableAttributes` setting. public var attributeCriteriaComputedByMinProximity: Bool? public var renderingContent: SearchRenderingContent? - /// Whether this search will use [Dynamic Re-Ranking](https://www.algolia.com/doc/guides/algolia-ai/re-ranking/). + // Whether this search will use [Dynamic Re-Ranking](https://www.algolia.com/doc/guides/algolia-ai/re-ranking/). /// This setting only has an effect if you activated Dynamic Re-Ranking for this index in the Algolia dashboard. public var enableReRanking: Bool? public var reRankingApplyFilter: SearchReRankingApplyFilter? diff --git a/clients/algoliasearch-client-swift/Sources/Search/Models/SearchBaseIndexSettings.swift b/clients/algoliasearch-client-swift/Sources/Search/Models/SearchBaseIndexSettings.swift index d8247d37235..cb2c2bba983 100644 --- a/clients/algoliasearch-client-swift/Sources/Search/Models/SearchBaseIndexSettings.swift +++ b/clients/algoliasearch-client-swift/Sources/Search/Models/SearchBaseIndexSettings.swift @@ -7,16 +7,16 @@ import Foundation #endif public struct SearchBaseIndexSettings: Codable, JSONEncodable { - /// Attributes used for [faceting](https://www.algolia.com/doc/guides/managing-results/refine-results/faceting/). + /// Attributes used for [faceting](https://www.algolia.com/doc/guides/managing-results/refine-results/faceting/). /// Facets are attributes that let you categorize search results. They can be used for filtering search results. By /// default, no attribute is used for faceting. Attribute names are case-sensitive. **Modifiers** - /// `filterOnly(\"ATTRIBUTE\")`. Allows the attribute to be used as a filter but doesn't evaluate the facet - /// values. - `searchable(\"ATTRIBUTE\")`. Allows searching for facet values. - `afterDistinct(\"ATTRIBUTE\")`. + /// values. - `searchable(\"ATTRIBUTE\")`. Allows searching for facet values. - `afterDistinct(\"ATTRIBUTE\")`. /// Evaluates the facet count _after_ deduplication with `distinct`. This ensures accurate facet counts. You /// can apply this modifier to searchable facets: `afterDistinct(searchable(ATTRIBUTE))`. public var attributesForFaceting: [String]? /// Creates [replica - /// indices](https://www.algolia.com/doc/guides/managing-results/refine-results/sorting/in-depth/replicas/). + /// indices](https://www.algolia.com/doc/guides/managing-results/refine-results/sorting/in-depth/replicas/). /// Replicas are copies of a primary index with the same records but different settings, synonyms, or rules. If you /// want to offer a different ranking or sorting of your search results, you'll use replica indices. All index /// operations on a primary index are automatically forwarded to its replicas. To add a replica index, you must diff --git a/clients/algoliasearch-client-swift/Sources/Search/Models/SearchBaseSearchParams.swift b/clients/algoliasearch-client-swift/Sources/Search/Models/SearchBaseSearchParams.swift index 111f8b23e8d..8d59777b0c7 100644 --- a/clients/algoliasearch-client-swift/Sources/Search/Models/SearchBaseSearchParams.swift +++ b/clients/algoliasearch-client-swift/Sources/Search/Models/SearchBaseSearchParams.swift @@ -21,7 +21,7 @@ public struct SearchBaseSearchParams: Codable, JSONEncodable { /// upper limits of the range (inclusive). - **Facet filters.** `:` where `` is a facet /// attribute (case-sensitive) and `` a facet value. - **Tag filters.** `_tags:` or just `` /// (case-sensitive). - **Boolean filters.** `: true | false`. You can combine filters with `AND`, `OR`, and - /// `NOT` operators with the following restrictions: - You can only combine filters of the same type with `OR`. + // `NOT` operators with the following restrictions: - You can only combine filters of the same type with `OR`. /// **Not supported:** `facet:value OR num > 3`. - You can't use `NOT` with combinations of filters. **Not /// supported:** `NOT(facet:value OR facet:value)` - You can't combine conjunctions (`AND`) with `OR`. **Not /// supported:** `facet:value OR (facet:value AND facet:value)` Use quotes around your filters, if the facet diff --git a/clients/algoliasearch-client-swift/Sources/Search/Models/SearchBaseSearchParamsWithoutQuery.swift b/clients/algoliasearch-client-swift/Sources/Search/Models/SearchBaseSearchParamsWithoutQuery.swift index dd69dc8246a..0454a48ecd2 100644 --- a/clients/algoliasearch-client-swift/Sources/Search/Models/SearchBaseSearchParamsWithoutQuery.swift +++ b/clients/algoliasearch-client-swift/Sources/Search/Models/SearchBaseSearchParamsWithoutQuery.swift @@ -19,7 +19,7 @@ public struct SearchBaseSearchParamsWithoutQuery: Codable, JSONEncodable { /// upper limits of the range (inclusive). - **Facet filters.** `:` where `` is a facet /// attribute (case-sensitive) and `` a facet value. - **Tag filters.** `_tags:` or just `` /// (case-sensitive). - **Boolean filters.** `: true | false`. You can combine filters with `AND`, `OR`, and - /// `NOT` operators with the following restrictions: - You can only combine filters of the same type with `OR`. + // `NOT` operators with the following restrictions: - You can only combine filters of the same type with `OR`. /// **Not supported:** `facet:value OR num > 3`. - You can't use `NOT` with combinations of filters. **Not /// supported:** `NOT(facet:value OR facet:value)` - You can't combine conjunctions (`AND`) with `OR`. **Not /// supported:** `facet:value OR (facet:value AND facet:value)` Use quotes around your filters, if the facet diff --git a/clients/algoliasearch-client-swift/Sources/Search/Models/SearchConsequenceParams.swift b/clients/algoliasearch-client-swift/Sources/Search/Models/SearchConsequenceParams.swift index 17374ced1a2..dae4877c038 100644 --- a/clients/algoliasearch-client-swift/Sources/Search/Models/SearchConsequenceParams.swift +++ b/clients/algoliasearch-client-swift/Sources/Search/Models/SearchConsequenceParams.swift @@ -19,7 +19,7 @@ public struct SearchConsequenceParams: Codable, JSONEncodable { /// upper limits of the range (inclusive). - **Facet filters.** `:` where `` is a facet /// attribute (case-sensitive) and `` a facet value. - **Tag filters.** `_tags:` or just `` /// (case-sensitive). - **Boolean filters.** `: true | false`. You can combine filters with `AND`, `OR`, and - /// `NOT` operators with the following restrictions: - You can only combine filters of the same type with `OR`. + // `NOT` operators with the following restrictions: - You can only combine filters of the same type with `OR`. /// **Not supported:** `facet:value OR num > 3`. - You can't use `NOT` with combinations of filters. **Not /// supported:** `NOT(facet:value OR facet:value)` - You can't combine conjunctions (`AND`) with `OR`. **Not /// supported:** `facet:value OR (facet:value AND facet:value)` Use quotes around your filters, if the facet @@ -226,7 +226,7 @@ public struct SearchConsequenceParams: Codable, JSONEncodable { /// matches. - `singleWordSynonym`. Single-word synonyms, such as \"NY\" = \"NYC\", are considered exact matches. /// - `multiWordsSynonym`. Multi-word synonyms, such as \"NY\" = \"New York\", are considered exact matches. public var alternativesAsExact: [SearchAlternativesAsExact]? - /// Advanced search syntax features you want to support. - `exactPhrase`. Phrases in quotes must match exactly. + // Advanced search syntax features you want to support. - `exactPhrase`. Phrases in quotes must match exactly. /// For example, `sparkly blue \"iPhone case\"` only returns records with the exact string \"iPhone case\". - /// `excludeWords`. Query words prefixed with a `-` must not occur in a record. For example, `search -engine` /// matches records that contain \"search\" but not \"engine\". This setting only has an effect if `advancedSyntax` @@ -266,7 +266,7 @@ public struct SearchConsequenceParams: Codable, JSONEncodable { /// attribute is determined by the order in the `searchableAttributes` setting. public var attributeCriteriaComputedByMinProximity: Bool? public var renderingContent: SearchRenderingContent? - /// Whether this search will use [Dynamic Re-Ranking](https://www.algolia.com/doc/guides/algolia-ai/re-ranking/). + // Whether this search will use [Dynamic Re-Ranking](https://www.algolia.com/doc/guides/algolia-ai/re-ranking/). /// This setting only has an effect if you activated Dynamic Re-Ranking for this index in the Algolia dashboard. public var enableReRanking: Bool? public var reRankingApplyFilter: SearchReRankingApplyFilter? diff --git a/clients/algoliasearch-client-swift/Sources/Search/Models/SearchForFacets.swift b/clients/algoliasearch-client-swift/Sources/Search/Models/SearchForFacets.swift index 35c24b5158b..c46ef2ad972 100644 --- a/clients/algoliasearch-client-swift/Sources/Search/Models/SearchForFacets.swift +++ b/clients/algoliasearch-client-swift/Sources/Search/Models/SearchForFacets.swift @@ -23,7 +23,7 @@ public struct SearchForFacets: Codable, JSONEncodable { /// upper limits of the range (inclusive). - **Facet filters.** `:` where `` is a facet /// attribute (case-sensitive) and `` a facet value. - **Tag filters.** `_tags:` or just `` /// (case-sensitive). - **Boolean filters.** `: true | false`. You can combine filters with `AND`, `OR`, and - /// `NOT` operators with the following restrictions: - You can only combine filters of the same type with `OR`. + // `NOT` operators with the following restrictions: - You can only combine filters of the same type with `OR`. /// **Not supported:** `facet:value OR num > 3`. - You can't use `NOT` with combinations of filters. **Not /// supported:** `NOT(facet:value OR facet:value)` - You can't combine conjunctions (`AND`) with `OR`. **Not /// supported:** `facet:value OR (facet:value AND facet:value)` Use quotes around your filters, if the facet @@ -230,7 +230,7 @@ public struct SearchForFacets: Codable, JSONEncodable { /// matches. - `singleWordSynonym`. Single-word synonyms, such as \"NY\" = \"NYC\", are considered exact matches. /// - `multiWordsSynonym`. Multi-word synonyms, such as \"NY\" = \"New York\", are considered exact matches. public var alternativesAsExact: [SearchAlternativesAsExact]? - /// Advanced search syntax features you want to support. - `exactPhrase`. Phrases in quotes must match exactly. + // Advanced search syntax features you want to support. - `exactPhrase`. Phrases in quotes must match exactly. /// For example, `sparkly blue \"iPhone case\"` only returns records with the exact string \"iPhone case\". - /// `excludeWords`. Query words prefixed with a `-` must not occur in a record. For example, `search -engine` /// matches records that contain \"search\" but not \"engine\". This setting only has an effect if `advancedSyntax` @@ -270,7 +270,7 @@ public struct SearchForFacets: Codable, JSONEncodable { /// attribute is determined by the order in the `searchableAttributes` setting. public var attributeCriteriaComputedByMinProximity: Bool? public var renderingContent: SearchRenderingContent? - /// Whether this search will use [Dynamic Re-Ranking](https://www.algolia.com/doc/guides/algolia-ai/re-ranking/). + // Whether this search will use [Dynamic Re-Ranking](https://www.algolia.com/doc/guides/algolia-ai/re-ranking/). /// This setting only has an effect if you activated Dynamic Re-Ranking for this index in the Algolia dashboard. public var enableReRanking: Bool? public var reRankingApplyFilter: SearchReRankingApplyFilter? diff --git a/clients/algoliasearch-client-swift/Sources/Search/Models/SearchForHits.swift b/clients/algoliasearch-client-swift/Sources/Search/Models/SearchForHits.swift index e61182d9027..55e2bbc54eb 100644 --- a/clients/algoliasearch-client-swift/Sources/Search/Models/SearchForHits.swift +++ b/clients/algoliasearch-client-swift/Sources/Search/Models/SearchForHits.swift @@ -23,7 +23,7 @@ public struct SearchForHits: Codable, JSONEncodable { /// upper limits of the range (inclusive). - **Facet filters.** `:` where `` is a facet /// attribute (case-sensitive) and `` a facet value. - **Tag filters.** `_tags:` or just `` /// (case-sensitive). - **Boolean filters.** `: true | false`. You can combine filters with `AND`, `OR`, and - /// `NOT` operators with the following restrictions: - You can only combine filters of the same type with `OR`. + // `NOT` operators with the following restrictions: - You can only combine filters of the same type with `OR`. /// **Not supported:** `facet:value OR num > 3`. - You can't use `NOT` with combinations of filters. **Not /// supported:** `NOT(facet:value OR facet:value)` - You can't combine conjunctions (`AND`) with `OR`. **Not /// supported:** `facet:value OR (facet:value AND facet:value)` Use quotes around your filters, if the facet @@ -230,7 +230,7 @@ public struct SearchForHits: Codable, JSONEncodable { /// matches. - `singleWordSynonym`. Single-word synonyms, such as \"NY\" = \"NYC\", are considered exact matches. /// - `multiWordsSynonym`. Multi-word synonyms, such as \"NY\" = \"New York\", are considered exact matches. public var alternativesAsExact: [SearchAlternativesAsExact]? - /// Advanced search syntax features you want to support. - `exactPhrase`. Phrases in quotes must match exactly. + // Advanced search syntax features you want to support. - `exactPhrase`. Phrases in quotes must match exactly. /// For example, `sparkly blue \"iPhone case\"` only returns records with the exact string \"iPhone case\". - /// `excludeWords`. Query words prefixed with a `-` must not occur in a record. For example, `search -engine` /// matches records that contain \"search\" but not \"engine\". This setting only has an effect if `advancedSyntax` @@ -270,7 +270,7 @@ public struct SearchForHits: Codable, JSONEncodable { /// attribute is determined by the order in the `searchableAttributes` setting. public var attributeCriteriaComputedByMinProximity: Bool? public var renderingContent: SearchRenderingContent? - /// Whether this search will use [Dynamic Re-Ranking](https://www.algolia.com/doc/guides/algolia-ai/re-ranking/). + // Whether this search will use [Dynamic Re-Ranking](https://www.algolia.com/doc/guides/algolia-ai/re-ranking/). /// This setting only has an effect if you activated Dynamic Re-Ranking for this index in the Algolia dashboard. public var enableReRanking: Bool? public var reRankingApplyFilter: SearchReRankingApplyFilter? diff --git a/clients/algoliasearch-client-swift/Sources/Search/Models/SearchIndexSettingsAsSearchParams.swift b/clients/algoliasearch-client-swift/Sources/Search/Models/SearchIndexSettingsAsSearchParams.swift index eabbb44a551..763e32d8c90 100644 --- a/clients/algoliasearch-client-swift/Sources/Search/Models/SearchIndexSettingsAsSearchParams.swift +++ b/clients/algoliasearch-client-swift/Sources/Search/Models/SearchIndexSettingsAsSearchParams.swift @@ -132,7 +132,7 @@ public struct SearchIndexSettingsAsSearchParams: Codable, JSONEncodable { /// matches. - `singleWordSynonym`. Single-word synonyms, such as \"NY\" = \"NYC\", are considered exact matches. /// - `multiWordsSynonym`. Multi-word synonyms, such as \"NY\" = \"New York\", are considered exact matches. public var alternativesAsExact: [SearchAlternativesAsExact]? - /// Advanced search syntax features you want to support. - `exactPhrase`. Phrases in quotes must match exactly. + // Advanced search syntax features you want to support. - `exactPhrase`. Phrases in quotes must match exactly. /// For example, `sparkly blue \"iPhone case\"` only returns records with the exact string \"iPhone case\". - /// `excludeWords`. Query words prefixed with a `-` must not occur in a record. For example, `search -engine` /// matches records that contain \"search\" but not \"engine\". This setting only has an effect if `advancedSyntax` @@ -172,7 +172,7 @@ public struct SearchIndexSettingsAsSearchParams: Codable, JSONEncodable { /// attribute is determined by the order in the `searchableAttributes` setting. public var attributeCriteriaComputedByMinProximity: Bool? public var renderingContent: SearchRenderingContent? - /// Whether this search will use [Dynamic Re-Ranking](https://www.algolia.com/doc/guides/algolia-ai/re-ranking/). + // Whether this search will use [Dynamic Re-Ranking](https://www.algolia.com/doc/guides/algolia-ai/re-ranking/). /// This setting only has an effect if you activated Dynamic Re-Ranking for this index in the Algolia dashboard. public var enableReRanking: Bool? public var reRankingApplyFilter: SearchReRankingApplyFilter? diff --git a/clients/algoliasearch-client-swift/Sources/Search/Models/SearchSearchParamsObject.swift b/clients/algoliasearch-client-swift/Sources/Search/Models/SearchSearchParamsObject.swift index ea33669acd4..ba8b46f1560 100644 --- a/clients/algoliasearch-client-swift/Sources/Search/Models/SearchSearchParamsObject.swift +++ b/clients/algoliasearch-client-swift/Sources/Search/Models/SearchSearchParamsObject.swift @@ -22,7 +22,7 @@ public struct SearchSearchParamsObject: Codable, JSONEncodable { /// upper limits of the range (inclusive). - **Facet filters.** `:` where `` is a facet /// attribute (case-sensitive) and `` a facet value. - **Tag filters.** `_tags:` or just `` /// (case-sensitive). - **Boolean filters.** `: true | false`. You can combine filters with `AND`, `OR`, and - /// `NOT` operators with the following restrictions: - You can only combine filters of the same type with `OR`. + // `NOT` operators with the following restrictions: - You can only combine filters of the same type with `OR`. /// **Not supported:** `facet:value OR num > 3`. - You can't use `NOT` with combinations of filters. **Not /// supported:** `NOT(facet:value OR facet:value)` - You can't combine conjunctions (`AND`) with `OR`. **Not /// supported:** `facet:value OR (facet:value AND facet:value)` Use quotes around your filters, if the facet @@ -229,7 +229,7 @@ public struct SearchSearchParamsObject: Codable, JSONEncodable { /// matches. - `singleWordSynonym`. Single-word synonyms, such as \"NY\" = \"NYC\", are considered exact matches. /// - `multiWordsSynonym`. Multi-word synonyms, such as \"NY\" = \"New York\", are considered exact matches. public var alternativesAsExact: [SearchAlternativesAsExact]? - /// Advanced search syntax features you want to support. - `exactPhrase`. Phrases in quotes must match exactly. + // Advanced search syntax features you want to support. - `exactPhrase`. Phrases in quotes must match exactly. /// For example, `sparkly blue \"iPhone case\"` only returns records with the exact string \"iPhone case\". - /// `excludeWords`. Query words prefixed with a `-` must not occur in a record. For example, `search -engine` /// matches records that contain \"search\" but not \"engine\". This setting only has an effect if `advancedSyntax` @@ -269,7 +269,7 @@ public struct SearchSearchParamsObject: Codable, JSONEncodable { /// attribute is determined by the order in the `searchableAttributes` setting. public var attributeCriteriaComputedByMinProximity: Bool? public var renderingContent: SearchRenderingContent? - /// Whether this search will use [Dynamic Re-Ranking](https://www.algolia.com/doc/guides/algolia-ai/re-ranking/). + // Whether this search will use [Dynamic Re-Ranking](https://www.algolia.com/doc/guides/algolia-ai/re-ranking/). /// This setting only has an effect if you activated Dynamic Re-Ranking for this index in the Algolia dashboard. public var enableReRanking: Bool? public var reRankingApplyFilter: SearchReRankingApplyFilter? diff --git a/clients/algoliasearch-client-swift/Sources/Search/Models/SettingsResponse.swift b/clients/algoliasearch-client-swift/Sources/Search/Models/SettingsResponse.swift index e41e8a96035..1ea3468bf23 100644 --- a/clients/algoliasearch-client-swift/Sources/Search/Models/SettingsResponse.swift +++ b/clients/algoliasearch-client-swift/Sources/Search/Models/SettingsResponse.swift @@ -7,16 +7,16 @@ import Foundation #endif public struct SettingsResponse: Codable, JSONEncodable { - /// Attributes used for [faceting](https://www.algolia.com/doc/guides/managing-results/refine-results/faceting/). + /// Attributes used for [faceting](https://www.algolia.com/doc/guides/managing-results/refine-results/faceting/). /// Facets are attributes that let you categorize search results. They can be used for filtering search results. By /// default, no attribute is used for faceting. Attribute names are case-sensitive. **Modifiers** - /// `filterOnly(\"ATTRIBUTE\")`. Allows the attribute to be used as a filter but doesn't evaluate the facet - /// values. - `searchable(\"ATTRIBUTE\")`. Allows searching for facet values. - `afterDistinct(\"ATTRIBUTE\")`. + /// values. - `searchable(\"ATTRIBUTE\")`. Allows searching for facet values. - `afterDistinct(\"ATTRIBUTE\")`. /// Evaluates the facet count _after_ deduplication with `distinct`. This ensures accurate facet counts. You /// can apply this modifier to searchable facets: `afterDistinct(searchable(ATTRIBUTE))`. public var attributesForFaceting: [String]? /// Creates [replica - /// indices](https://www.algolia.com/doc/guides/managing-results/refine-results/sorting/in-depth/replicas/). + /// indices](https://www.algolia.com/doc/guides/managing-results/refine-results/sorting/in-depth/replicas/). /// Replicas are copies of a primary index with the same records but different settings, synonyms, or rules. If you /// want to offer a different ranking or sorting of your search results, you'll use replica indices. All index /// operations on a primary index are automatically forwarded to its replicas. To add a replica index, you must @@ -224,7 +224,7 @@ public struct SettingsResponse: Codable, JSONEncodable { /// matches. - `singleWordSynonym`. Single-word synonyms, such as \"NY\" = \"NYC\", are considered exact matches. /// - `multiWordsSynonym`. Multi-word synonyms, such as \"NY\" = \"New York\", are considered exact matches. public var alternativesAsExact: [SearchAlternativesAsExact]? - /// Advanced search syntax features you want to support. - `exactPhrase`. Phrases in quotes must match exactly. + // Advanced search syntax features you want to support. - `exactPhrase`. Phrases in quotes must match exactly. /// For example, `sparkly blue \"iPhone case\"` only returns records with the exact string \"iPhone case\". - /// `excludeWords`. Query words prefixed with a `-` must not occur in a record. For example, `search -engine` /// matches records that contain \"search\" but not \"engine\". This setting only has an effect if `advancedSyntax` @@ -264,7 +264,7 @@ public struct SettingsResponse: Codable, JSONEncodable { /// attribute is determined by the order in the `searchableAttributes` setting. public var attributeCriteriaComputedByMinProximity: Bool? public var renderingContent: SearchRenderingContent? - /// Whether this search will use [Dynamic Re-Ranking](https://www.algolia.com/doc/guides/algolia-ai/re-ranking/). + // Whether this search will use [Dynamic Re-Ranking](https://www.algolia.com/doc/guides/algolia-ai/re-ranking/). /// This setting only has an effect if you activated Dynamic Re-Ranking for this index in the Algolia dashboard. public var enableReRanking: Bool? public var reRankingApplyFilter: SearchReRankingApplyFilter? diff --git a/clients/algoliasearch-client-swift/Sources/Search/SearchClient.swift b/clients/algoliasearch-client-swift/Sources/Search/SearchClient.swift index 37a88edda82..493de0145c3 100644 --- a/clients/algoliasearch-client-swift/Sources/Search/SearchClient.swift +++ b/clients/algoliasearch-client-swift/Sources/Search/SearchClient.swift @@ -1652,7 +1652,7 @@ open class SearchClient { /// - parameter length: (query) Maximum number of entries to retrieve. (optional, default to 10) /// - parameter indexName: (query) Index for which to retrieve log entries. By default, log entries are retrieved /// for all indices. (optional) - /// - parameter type: (query) Type of log entries to retrieve. By default, all log entries are retrieved. + /// - parameter type: (query) Type of log entries to retrieve. By default, all log entries are retrieved. /// (optional) /// - returns: GetLogsResponse @available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *) @@ -2402,7 +2402,7 @@ open class SearchClient { ) } - /// - parameter page: (query) Requested page of the API response. If `null`, the API response is not paginated. + /// - parameter page: (query) Requested page of the API response. If `null`, the API response is not paginated. /// (optional) /// - parameter hitsPerPage: (query) Number of hits per page. (optional, default to 100) /// - returns: ListIndicesResponse @@ -2430,7 +2430,7 @@ open class SearchClient { // Required API Key ACLs: // - listIndexes // - // - parameter page: (query) Requested page of the API response. If `null`, the API response is not paginated. + // - parameter page: (query) Requested page of the API response. If `null`, the API response is not paginated. // (optional) // // - parameter hitsPerPage: (query) Number of hits per page. (optional, default to 100) @@ -2460,7 +2460,7 @@ open class SearchClient { ) } - /// - parameter page: (query) Requested page of the API response. If `null`, the API response is not paginated. + /// - parameter page: (query) Requested page of the API response. If `null`, the API response is not paginated. /// (optional) /// - parameter hitsPerPage: (query) Number of hits per page. (optional, default to 100) /// - returns: ListUserIdsResponse @@ -2488,7 +2488,7 @@ open class SearchClient { // Required API Key ACLs: // - admin // - // - parameter page: (query) Requested page of the API response. If `null`, the API response is not paginated. + // - parameter page: (query) Requested page of the API response. If `null`, the API response is not paginated. // (optional) // // - parameter hitsPerPage: (query) Number of hits per page. (optional, default to 100) @@ -2587,7 +2587,7 @@ open class SearchClient { } // Copies or moves (renames) an index within the same Algolia application. - Existing destination indices are - // overwritten, except for their analytics data. - If the destination index doesn't exist yet, it'll be created. + // overwritten, except for their analytics data. - If the destination index doesn't exist yet, it'll be created. // **Copy** - Copying a source index that doesn't exist creates a new index with 0 records and default settings. - // The API keys of the source index are merged with the existing keys in the destination index. - You can't copy the // `enableReRanking`, `mode`, and `replicas` settings. - You can't copy to a destination index that already has @@ -2596,7 +2596,7 @@ open class SearchClient { // - // Related guide: [Copy indices](https://www.algolia.com/doc/guides/sending-and-managing-data/manage-indices-and-apps/manage-indices/how-to/copy-indices/) // **Move** - Moving a source index that doesn't exist is ignored without returning an error. - When moving an - // index, the analytics data keeps its original name, and a new set of analytics data is started for the new name. + // index, the analytics data keeps its original name, and a new set of analytics data is started for the new name. // To access the original analytics in the dashboard, create an index with the original name. - If the destination // index has replicas, moving will overwrite the existing index and copy the data to the replica indices. - Related // guide: [Move indices](https://www.algolia.com/doc/guides/sending-and-managing-data/manage-indices-and-apps/manage-indices/how-to/move-indices/). @@ -3484,7 +3484,7 @@ open class SearchClient { return body } - // Searches for values of a specified facet attribute. - By default, facet values are sorted by decreasing count. + // Searches for values of a specified facet attribute. - By default, facet values are sorted by decreasing count. // You can adjust this with the `sortFacetValueBy` parameter. - Searching for facet values doesn't work if you have // **more than 65 searchable facets and searchable attributes combined**. // Required API Key ACLs: diff --git a/specs/bundled/ingestion.doc.yml b/specs/bundled/ingestion.doc.yml index 6b26d5fb6e6..029bcdea5fe 100644 --- a/specs/bundled/ingestion.doc.yml +++ b/specs/bundled/ingestion.doc.yml @@ -12573,6 +12573,7 @@ components: - oauth - algolia - algoliaInsights + - secrets Platform: default: null oneOf: @@ -12883,6 +12884,11 @@ components: required: - appID - apiKey + AuthSecrets: + type: object + description: A key:value authentication for your transformations. + additionalProperties: + type: string AuthInput: oneOf: - $ref: '#/components/schemas/AuthGoogleServiceAccount' @@ -12891,6 +12897,7 @@ components: - $ref: '#/components/schemas/AuthOAuth' - $ref: '#/components/schemas/AuthAlgolia' - $ref: '#/components/schemas/AuthAlgoliaInsights' + - $ref: '#/components/schemas/AuthSecrets' AuthenticationCreate: type: object description: Request body for creating a new authentication resource. diff --git a/specs/bundled/ingestion.yml b/specs/bundled/ingestion.yml index 0a7408e0643..0403fbde6ab 100644 --- a/specs/bundled/ingestion.yml +++ b/specs/bundled/ingestion.yml @@ -2101,6 +2101,7 @@ components: - oauth - algolia - algoliaInsights + - secrets Platform: default: null oneOf: @@ -2411,6 +2412,11 @@ components: required: - appID - apiKey + AuthSecrets: + type: object + description: A key:value authentication for your transformations. + additionalProperties: + type: string AuthInput: oneOf: - $ref: '#/components/schemas/AuthGoogleServiceAccount' @@ -2419,6 +2425,7 @@ components: - $ref: '#/components/schemas/AuthOAuth' - $ref: '#/components/schemas/AuthAlgolia' - $ref: '#/components/schemas/AuthAlgoliaInsights' + - $ref: '#/components/schemas/AuthSecrets' AuthenticationCreate: type: object description: Request body for creating a new authentication resource.