algolia 3.0.0.beta.8 → 3.0.0.beta.10
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.github/workflows/release.yml +2 -0
- data/CHANGELOG.md +15 -0
- data/Gemfile.lock +6 -31
- data/Rakefile +0 -2
- data/algolia.gemspec +1 -1
- data/lib/algolia/api/abtesting_client.rb +52 -37
- data/lib/algolia/api/analytics_client.rb +415 -116
- data/lib/algolia/api/ingestion_client.rb +462 -182
- data/lib/algolia/api/insights_client.rb +45 -28
- data/lib/algolia/api/monitoring_client.rb +50 -44
- data/lib/algolia/api/personalization_client.rb +57 -32
- data/lib/algolia/api/query_suggestions_client.rb +59 -40
- data/lib/algolia/api/recommend_client.rb +70 -43
- data/lib/algolia/api/search_client.rb +474 -277
- data/lib/algolia/api/usage_client.rb +48 -28
- data/lib/algolia/api_client.rb +25 -24
- data/lib/algolia/api_error.rb +8 -8
- data/lib/algolia/configuration.rb +17 -6
- data/lib/algolia/error.rb +2 -2
- data/lib/algolia/logger_helper.rb +4 -4
- data/lib/algolia/models/abtesting/ab_test.rb +62 -37
- data/lib/algolia/models/abtesting/ab_test_configuration.rb +35 -20
- data/lib/algolia/models/abtesting/ab_test_response.rb +35 -20
- data/lib/algolia/models/abtesting/ab_tests_variant.rb +38 -23
- data/lib/algolia/models/abtesting/ab_tests_variant_search_params.rb +41 -26
- data/lib/algolia/models/abtesting/add_ab_tests_request.rb +38 -23
- data/lib/algolia/models/abtesting/add_ab_tests_variant.rb +33 -24
- data/lib/algolia/models/abtesting/currency.rb +32 -20
- data/lib/algolia/models/abtesting/custom_search_params.rb +33 -18
- data/lib/algolia/models/abtesting/effect.rb +2 -3
- data/lib/algolia/models/abtesting/empty_search.rb +33 -18
- data/lib/algolia/models/abtesting/error_base.rb +24 -13
- data/lib/algolia/models/abtesting/filter_effects.rb +34 -19
- data/lib/algolia/models/abtesting/filter_effects_empty_search.rb +34 -19
- data/lib/algolia/models/abtesting/filter_effects_outliers.rb +34 -19
- data/lib/algolia/models/abtesting/list_ab_tests_response.rb +37 -22
- data/lib/algolia/models/abtesting/minimum_detectable_effect.rb +37 -22
- data/lib/algolia/models/abtesting/outliers.rb +29 -17
- data/lib/algolia/models/abtesting/status.rb +2 -3
- data/lib/algolia/models/abtesting/variant.rb +83 -51
- data/lib/algolia/models/analytics/click_positions_inner.rb +39 -24
- data/lib/algolia/models/analytics/currencies_value.rb +34 -19
- data/lib/algolia/models/analytics/daily_add_to_cart_rates.rb +42 -27
- data/lib/algolia/models/analytics/daily_average_clicks.rb +40 -25
- data/lib/algolia/models/analytics/daily_click_through_rates.rb +42 -27
- data/lib/algolia/models/analytics/daily_conversion_rates.rb +42 -27
- data/lib/algolia/models/analytics/daily_no_click_rates.rb +41 -26
- data/lib/algolia/models/analytics/daily_no_results_rates.rb +39 -24
- data/lib/algolia/models/analytics/daily_purchase_rates.rb +40 -25
- data/lib/algolia/models/analytics/daily_revenue.rb +34 -19
- data/lib/algolia/models/analytics/daily_searches.rb +34 -19
- data/lib/algolia/models/analytics/daily_searches_no_clicks.rb +37 -22
- data/lib/algolia/models/analytics/daily_searches_no_results.rb +37 -22
- data/lib/algolia/models/analytics/daily_users.rb +34 -19
- data/lib/algolia/models/analytics/direction.rb +2 -3
- data/lib/algolia/models/analytics/error_base.rb +24 -13
- data/lib/algolia/models/analytics/get_add_to_cart_rate_response.rb +42 -27
- data/lib/algolia/models/analytics/get_average_click_position_response.rb +40 -25
- data/lib/algolia/models/analytics/get_click_positions_response.rb +36 -21
- data/lib/algolia/models/analytics/get_click_through_rate_response.rb +42 -27
- data/lib/algolia/models/analytics/get_conversion_rate_response.rb +42 -27
- data/lib/algolia/models/analytics/get_no_click_rate_response.rb +41 -26
- data/lib/algolia/models/analytics/get_no_results_rate_response.rb +39 -24
- data/lib/algolia/models/analytics/get_purchase_rate_response.rb +40 -25
- data/lib/algolia/models/analytics/get_revenue.rb +34 -19
- data/lib/algolia/models/analytics/get_searches_count_response.rb +34 -19
- data/lib/algolia/models/analytics/get_searches_no_clicks_response.rb +33 -18
- data/lib/algolia/models/analytics/get_searches_no_results_response.rb +33 -18
- data/lib/algolia/models/analytics/get_status_response.rb +35 -20
- data/lib/algolia/models/analytics/get_top_countries_response.rb +33 -18
- data/lib/algolia/models/analytics/get_top_filter_attribute.rb +34 -19
- data/lib/algolia/models/analytics/get_top_filter_attributes_response.rb +33 -18
- data/lib/algolia/models/analytics/get_top_filter_for_attribute.rb +36 -21
- data/lib/algolia/models/analytics/get_top_filter_for_attribute_response.rb +33 -18
- data/lib/algolia/models/analytics/get_top_filters_no_results_response.rb +35 -20
- data/lib/algolia/models/analytics/get_top_filters_no_results_value.rb +35 -20
- data/lib/algolia/models/analytics/get_top_filters_no_results_values.rb +34 -19
- data/lib/algolia/models/analytics/get_top_hits_response.rb +34 -25
- data/lib/algolia/models/analytics/get_top_searches_response.rb +34 -25
- data/lib/algolia/models/analytics/get_users_count_response.rb +34 -19
- data/lib/algolia/models/analytics/operator.rb +2 -3
- data/lib/algolia/models/analytics/order_by.rb +2 -3
- data/lib/algolia/models/analytics/top_country.rb +34 -19
- data/lib/algolia/models/analytics/top_hit.rb +30 -18
- data/lib/algolia/models/analytics/top_hit_with_analytics.rb +50 -35
- data/lib/algolia/models/analytics/top_hit_with_revenue_analytics.rb +77 -50
- data/lib/algolia/models/analytics/top_hits_response.rb +33 -18
- data/lib/algolia/models/analytics/top_hits_response_with_analytics.rb +33 -18
- data/lib/algolia/models/analytics/top_hits_response_with_revenue_analytics.rb +33 -18
- data/lib/algolia/models/analytics/top_search.rb +35 -20
- data/lib/algolia/models/analytics/top_search_with_analytics.rb +76 -44
- data/lib/algolia/models/analytics/top_search_with_revenue_analytics.rb +94 -58
- data/lib/algolia/models/analytics/top_searches_response.rb +33 -18
- data/lib/algolia/models/analytics/top_searches_response_with_analytics.rb +33 -18
- data/lib/algolia/models/analytics/top_searches_response_with_revenue_analytics.rb +33 -18
- data/lib/algolia/models/ingestion/action_type.rb +2 -3
- data/lib/algolia/models/ingestion/auth_algolia.rb +34 -19
- data/lib/algolia/models/ingestion/auth_algolia_insights.rb +34 -19
- data/lib/algolia/models/ingestion/auth_algolia_insights_partial.rb +34 -19
- data/lib/algolia/models/ingestion/auth_algolia_partial.rb +34 -19
- data/lib/algolia/models/ingestion/auth_api_key.rb +33 -18
- data/lib/algolia/models/ingestion/auth_api_key_partial.rb +33 -18
- data/lib/algolia/models/ingestion/auth_basic.rb +34 -19
- data/lib/algolia/models/ingestion/auth_basic_partial.rb +34 -19
- data/lib/algolia/models/ingestion/auth_google_service_account.rb +34 -19
- data/lib/algolia/models/ingestion/auth_google_service_account_partial.rb +34 -19
- data/lib/algolia/models/ingestion/auth_input.rb +37 -28
- data/lib/algolia/models/ingestion/auth_input_partial.rb +37 -28
- data/lib/algolia/models/ingestion/auth_o_auth.rb +36 -21
- data/lib/algolia/models/ingestion/auth_o_auth_partial.rb +36 -21
- data/lib/algolia/models/ingestion/authentication.rb +41 -26
- data/lib/algolia/models/ingestion/authentication_create.rb +38 -23
- data/lib/algolia/models/ingestion/authentication_create_response.rb +35 -20
- data/lib/algolia/models/ingestion/authentication_search.rb +33 -18
- data/lib/algolia/models/ingestion/authentication_sort_keys.rb +2 -3
- data/lib/algolia/models/ingestion/authentication_type.rb +2 -3
- data/lib/algolia/models/ingestion/authentication_update.rb +38 -23
- data/lib/algolia/models/ingestion/authentication_update_response.rb +35 -20
- data/lib/algolia/models/ingestion/big_commerce_channel.rb +34 -19
- data/lib/algolia/models/ingestion/big_commerce_metafield.rb +34 -19
- data/lib/algolia/models/ingestion/big_query_data_type.rb +2 -3
- data/lib/algolia/models/ingestion/commercetools_custom_fields.rb +39 -24
- data/lib/algolia/models/ingestion/delete_response.rb +33 -18
- data/lib/algolia/models/ingestion/destination.rb +39 -24
- data/lib/algolia/models/ingestion/destination_create.rb +36 -21
- data/lib/algolia/models/ingestion/destination_create_response.rb +35 -20
- data/lib/algolia/models/ingestion/destination_index_name.rb +35 -20
- data/lib/algolia/models/ingestion/destination_index_prefix.rb +33 -18
- data/lib/algolia/models/ingestion/destination_input.rb +33 -24
- data/lib/algolia/models/ingestion/destination_search.rb +33 -18
- data/lib/algolia/models/ingestion/destination_sort_keys.rb +2 -3
- data/lib/algolia/models/ingestion/destination_type.rb +2 -3
- data/lib/algolia/models/ingestion/destination_update.rb +36 -21
- data/lib/algolia/models/ingestion/destination_update_response.rb +35 -20
- data/lib/algolia/models/ingestion/docker_image_type.rb +2 -3
- data/lib/algolia/models/ingestion/docker_registry.rb +2 -3
- data/lib/algolia/models/ingestion/{on_demand_date_utils_input.rb → docker_streams_input.rb} +41 -49
- data/lib/algolia/models/ingestion/error_base.rb +24 -13
- data/lib/algolia/models/ingestion/event.rb +38 -26
- data/lib/algolia/models/ingestion/event_sort_keys.rb +2 -3
- data/lib/algolia/models/ingestion/event_status.rb +2 -3
- data/lib/algolia/models/ingestion/event_type.rb +2 -3
- data/lib/algolia/models/ingestion/list_authentications_response.rb +34 -19
- data/lib/algolia/models/ingestion/list_destinations_response.rb +34 -19
- data/lib/algolia/models/ingestion/list_events_response.rb +35 -20
- data/lib/algolia/models/ingestion/list_sources_response.rb +34 -19
- data/lib/algolia/models/ingestion/list_tasks_response.rb +34 -19
- data/lib/algolia/models/ingestion/list_transformations_response.rb +34 -19
- data/lib/algolia/models/ingestion/mapping_field_directive.rb +34 -19
- data/lib/algolia/models/ingestion/mapping_format_schema.rb +2 -3
- data/lib/algolia/models/ingestion/mapping_input.rb +34 -19
- data/lib/algolia/models/ingestion/mapping_kit_action.rb +36 -21
- data/lib/algolia/models/ingestion/mapping_type_csv.rb +2 -3
- data/lib/algolia/models/ingestion/method_type.rb +2 -3
- data/lib/algolia/models/ingestion/on_demand_trigger.rb +34 -19
- data/lib/algolia/models/ingestion/on_demand_trigger_input.rb +33 -18
- data/lib/algolia/models/ingestion/on_demand_trigger_type.rb +2 -3
- data/lib/algolia/models/ingestion/order_keys.rb +2 -3
- data/lib/algolia/models/ingestion/pagination.rb +45 -30
- data/lib/algolia/models/ingestion/platform.rb +2 -3
- data/lib/algolia/models/ingestion/platform_none.rb +2 -3
- data/lib/algolia/models/ingestion/platform_with_none.rb +33 -24
- data/lib/algolia/models/ingestion/record_type.rb +2 -3
- data/lib/algolia/models/ingestion/run.rb +59 -33
- data/lib/algolia/models/ingestion/run_list_response.rb +35 -20
- data/lib/algolia/models/ingestion/run_outcome.rb +2 -3
- data/lib/algolia/models/ingestion/run_progress.rb +34 -19
- data/lib/algolia/models/ingestion/run_reason_code.rb +2 -3
- data/lib/algolia/models/ingestion/run_response.rb +34 -19
- data/lib/algolia/models/ingestion/run_sort_keys.rb +2 -3
- data/lib/algolia/models/ingestion/run_status.rb +2 -3
- data/lib/algolia/models/ingestion/run_type.rb +2 -3
- data/lib/algolia/models/ingestion/schedule_trigger.rb +36 -21
- data/lib/algolia/models/ingestion/schedule_trigger_input.rb +34 -19
- data/lib/algolia/models/ingestion/schedule_trigger_type.rb +2 -3
- data/lib/algolia/models/ingestion/shopify_input.rb +34 -19
- data/lib/algolia/models/ingestion/shopify_market.rb +35 -20
- data/lib/algolia/models/ingestion/shopify_metafield.rb +35 -20
- data/lib/algolia/models/ingestion/sort_keys.rb +2 -3
- data/lib/algolia/models/ingestion/source.rb +35 -23
- data/lib/algolia/models/ingestion/source_big_commerce.rb +37 -22
- data/lib/algolia/models/ingestion/source_big_query.rb +39 -24
- data/lib/algolia/models/ingestion/source_commercetools.rb +38 -23
- data/lib/algolia/models/ingestion/source_create.rb +36 -21
- data/lib/algolia/models/ingestion/source_create_response.rb +35 -20
- data/lib/algolia/models/ingestion/source_csv.rb +43 -25
- data/lib/algolia/models/ingestion/source_docker.rb +37 -22
- data/lib/algolia/models/ingestion/source_ga4_big_query_export.rb +35 -20
- data/lib/algolia/models/ingestion/source_input.rb +39 -30
- data/lib/algolia/models/ingestion/source_json.rb +35 -20
- data/lib/algolia/models/ingestion/source_search.rb +33 -18
- data/lib/algolia/models/ingestion/source_shopify.rb +45 -89
- data/lib/algolia/models/ingestion/source_shopify_base.rb +33 -18
- data/lib/algolia/models/ingestion/source_sort_keys.rb +2 -3
- data/lib/algolia/models/ingestion/source_type.rb +2 -3
- data/lib/algolia/models/ingestion/source_update.rb +35 -20
- data/lib/algolia/models/ingestion/source_update_commercetools.rb +37 -22
- data/lib/algolia/models/ingestion/source_update_docker.rb +36 -21
- data/lib/algolia/models/ingestion/source_update_input.rb +38 -29
- data/lib/algolia/models/ingestion/source_update_response.rb +35 -20
- data/lib/algolia/models/ingestion/source_update_shopify.rb +42 -86
- data/lib/algolia/models/ingestion/source_watch_response.rb +36 -21
- data/lib/algolia/models/ingestion/{streaming_utils_input.rb → streaming_input.rb} +34 -19
- data/lib/algolia/models/ingestion/streaming_trigger.rb +33 -18
- data/lib/algolia/models/ingestion/streaming_trigger_type.rb +2 -3
- data/lib/algolia/models/ingestion/subscription_trigger.rb +33 -18
- data/lib/algolia/models/ingestion/subscription_trigger_type.rb +2 -3
- data/lib/algolia/models/ingestion/task.rb +55 -31
- data/lib/algolia/models/ingestion/task_create.rb +43 -28
- data/lib/algolia/models/ingestion/task_create_response.rb +34 -19
- data/lib/algolia/models/ingestion/task_create_trigger.rb +35 -26
- data/lib/algolia/models/ingestion/task_input.rb +34 -26
- data/lib/algolia/models/ingestion/task_search.rb +33 -18
- data/lib/algolia/models/ingestion/task_sort_keys.rb +2 -3
- data/lib/algolia/models/ingestion/task_update.rb +40 -25
- data/lib/algolia/models/ingestion/task_update_response.rb +34 -19
- data/lib/algolia/models/ingestion/transformation.rb +38 -25
- data/lib/algolia/models/ingestion/transformation_create.rb +35 -22
- data/lib/algolia/models/ingestion/transformation_create_response.rb +34 -19
- data/lib/algolia/models/ingestion/transformation_search.rb +33 -18
- data/lib/algolia/models/ingestion/transformation_try.rb +34 -19
- data/lib/algolia/models/ingestion/transformation_try_response.rb +34 -19
- data/lib/algolia/models/ingestion/transformation_try_response_error.rb +34 -19
- data/lib/algolia/models/ingestion/transformation_update_response.rb +34 -19
- data/lib/algolia/models/ingestion/trigger.rb +35 -26
- data/lib/algolia/models/ingestion/trigger_type.rb +2 -3
- data/lib/algolia/models/ingestion/trigger_update_input.rb +33 -18
- data/lib/algolia/models/ingestion/window.rb +30 -18
- data/lib/algolia/models/insights/add_to_cart_event.rb +2 -3
- data/lib/algolia/models/insights/added_to_cart_object_ids.rb +91 -46
- data/lib/algolia/models/insights/added_to_cart_object_ids_after_search.rb +99 -50
- data/lib/algolia/models/insights/click_event.rb +2 -3
- data/lib/algolia/models/insights/clicked_filters.rb +71 -38
- data/lib/algolia/models/insights/clicked_object_ids.rb +71 -38
- data/lib/algolia/models/insights/clicked_object_ids_after_search.rb +93 -47
- data/lib/algolia/models/insights/conversion_event.rb +2 -3
- data/lib/algolia/models/insights/converted_filters.rb +71 -38
- data/lib/algolia/models/insights/converted_object_ids.rb +71 -38
- data/lib/algolia/models/insights/converted_object_ids_after_search.rb +78 -42
- data/lib/algolia/models/insights/discount.rb +33 -24
- data/lib/algolia/models/insights/error_base.rb +24 -13
- data/lib/algolia/models/insights/events_items.rb +43 -34
- data/lib/algolia/models/insights/events_response.rb +34 -19
- data/lib/algolia/models/insights/insights_events.rb +36 -21
- data/lib/algolia/models/insights/object_data.rb +35 -20
- data/lib/algolia/models/insights/object_data_after_search.rb +42 -24
- data/lib/algolia/models/insights/price.rb +33 -24
- data/lib/algolia/models/insights/purchase_event.rb +2 -3
- data/lib/algolia/models/insights/purchased_object_ids.rb +91 -46
- data/lib/algolia/models/insights/purchased_object_ids_after_search.rb +91 -46
- data/lib/algolia/models/insights/value.rb +33 -24
- data/lib/algolia/models/insights/view_event.rb +2 -3
- data/lib/algolia/models/insights/viewed_filters.rb +71 -38
- data/lib/algolia/models/insights/viewed_object_ids.rb +71 -38
- data/lib/algolia/models/monitoring/error_base.rb +24 -13
- data/lib/algolia/models/monitoring/get_servers403_response.rb +33 -18
- data/lib/algolia/models/monitoring/incident.rb +30 -18
- data/lib/algolia/models/monitoring/incidents_inner.rb +34 -19
- data/lib/algolia/models/monitoring/incidents_response.rb +33 -18
- data/lib/algolia/models/monitoring/indexing_time_response.rb +33 -18
- data/lib/algolia/models/monitoring/indexing_time_response_metrics.rb +33 -18
- data/lib/algolia/models/monitoring/infrastructure_response.rb +33 -18
- data/lib/algolia/models/monitoring/infrastructure_response_metrics.rb +37 -22
- data/lib/algolia/models/monitoring/inventory_response.rb +33 -18
- data/lib/algolia/models/monitoring/latency_response.rb +33 -18
- data/lib/algolia/models/monitoring/latency_response_metrics.rb +33 -18
- data/lib/algolia/models/monitoring/metric.rb +2 -3
- data/lib/algolia/models/monitoring/period.rb +2 -3
- data/lib/algolia/models/monitoring/probes_metric.rb +34 -19
- data/lib/algolia/models/monitoring/region.rb +2 -3
- data/lib/algolia/models/monitoring/server.rb +35 -23
- data/lib/algolia/models/monitoring/server_status.rb +2 -3
- data/lib/algolia/models/monitoring/status.rb +2 -3
- data/lib/algolia/models/monitoring/status_response.rb +33 -18
- data/lib/algolia/models/monitoring/time_inner.rb +34 -19
- data/lib/algolia/models/monitoring/type.rb +2 -3
- data/lib/algolia/models/personalization/delete_user_profile_response.rb +34 -19
- data/lib/algolia/models/personalization/error_base.rb +24 -13
- data/lib/algolia/models/personalization/event_scoring.rb +35 -20
- data/lib/algolia/models/personalization/event_type.rb +2 -3
- data/lib/algolia/models/personalization/facet_scoring.rb +34 -19
- data/lib/algolia/models/personalization/get_user_token_response.rb +35 -20
- data/lib/algolia/models/personalization/personalization_strategy_params.rb +38 -23
- data/lib/algolia/models/personalization/set_personalization_strategy_response.rb +33 -18
- data/lib/algolia/models/query-suggestions/app_id.rb +29 -17
- data/lib/algolia/models/query-suggestions/base_query_suggestions_configuration_response.rb +22 -9
- data/lib/algolia/models/query-suggestions/base_query_suggestions_configuration_with_index.rb +22 -9
- data/lib/algolia/models/query-suggestions/base_response.rb +34 -19
- data/lib/algolia/models/query-suggestions/configuration.rb +44 -26
- data/lib/algolia/models/query-suggestions/configuration_response.rb +48 -30
- data/lib/algolia/models/query-suggestions/configuration_with_index.rb +46 -28
- data/lib/algolia/models/query-suggestions/error_base.rb +24 -13
- data/lib/algolia/models/query-suggestions/facet.rb +30 -18
- data/lib/algolia/models/query-suggestions/get_config_status200_response.rb +37 -22
- data/lib/algolia/models/query-suggestions/get_log_file200_response.rb +36 -21
- data/lib/algolia/models/query-suggestions/languages.rb +33 -24
- data/lib/algolia/models/query-suggestions/log_level.rb +2 -3
- data/lib/algolia/models/query-suggestions/query_suggestions_configuration.rb +34 -16
- data/lib/algolia/models/query-suggestions/query_suggestions_configuration_response.rb +34 -16
- data/lib/algolia/models/query-suggestions/query_suggestions_configuration_with_index.rb +34 -16
- data/lib/algolia/models/query-suggestions/source_index.rb +49 -34
- data/lib/algolia/models/recommend/advanced_syntax_features.rb +2 -3
- data/lib/algolia/models/recommend/alternatives_as_exact.rb +2 -3
- data/lib/algolia/models/recommend/around_precision.rb +33 -24
- data/lib/algolia/models/recommend/around_precision_from_value_inner.rb +34 -19
- data/lib/algolia/models/recommend/around_radius.rb +33 -24
- data/lib/algolia/models/recommend/around_radius_all.rb +2 -3
- data/lib/algolia/models/recommend/auto_facet_filter.rb +34 -19
- data/lib/algolia/models/recommend/base_recommend_request.rb +42 -27
- data/lib/algolia/models/recommend/base_search_params.rb +110 -63
- data/lib/algolia/models/recommend/base_search_params_without_query.rb +106 -60
- data/lib/algolia/models/recommend/base_search_response.rb +76 -121
- data/lib/algolia/models/recommend/bought_together_query.rb +46 -31
- data/lib/algolia/models/recommend/condition.rb +35 -20
- data/lib/algolia/models/recommend/consequence.rb +39 -24
- data/lib/algolia/models/recommend/deleted_at_response.rb +34 -19
- data/lib/algolia/models/recommend/distinct.rb +33 -24
- data/lib/algolia/models/recommend/error_base.rb +24 -13
- data/lib/algolia/models/recommend/exact_on_single_word_query.rb +2 -3
- data/lib/algolia/models/recommend/exhaustive.rb +37 -22
- data/lib/algolia/models/recommend/facet_filters.rb +33 -24
- data/lib/algolia/models/recommend/facet_ordering.rb +34 -19
- data/lib/algolia/models/recommend/facets.rb +29 -17
- data/lib/algolia/models/recommend/facets_stats.rb +36 -21
- data/lib/algolia/models/recommend/fallback_params.rb +207 -118
- data/lib/algolia/models/recommend/fbt_model.rb +2 -3
- data/lib/algolia/models/recommend/frequently_bought_together.rb +34 -19
- data/lib/algolia/models/recommend/get_recommend_task_response.rb +33 -18
- data/lib/algolia/models/recommend/get_recommendations_params.rb +33 -18
- data/lib/algolia/models/recommend/get_recommendations_response.rb +35 -18
- data/lib/algolia/models/recommend/hide_consequence_object.rb +33 -18
- data/lib/algolia/models/recommend/highlight_result.rb +34 -25
- data/lib/algolia/models/recommend/highlight_result_option.rb +36 -21
- data/lib/algolia/models/recommend/ignore_plurals.rb +33 -24
- data/lib/algolia/models/recommend/index_settings_as_search_params.rb +134 -75
- data/lib/algolia/models/recommend/looking_similar.rb +35 -20
- data/lib/algolia/models/recommend/looking_similar_model.rb +2 -3
- data/lib/algolia/models/recommend/looking_similar_query.rb +47 -32
- data/lib/algolia/models/recommend/match_level.rb +2 -3
- data/lib/algolia/models/recommend/matched_geo_location.rb +35 -20
- data/lib/algolia/models/recommend/mode.rb +2 -3
- data/lib/algolia/models/recommend/numeric_filters.rb +33 -24
- data/lib/algolia/models/recommend/optional_filters.rb +33 -24
- data/lib/algolia/models/recommend/params_consequence.rb +35 -20
- data/lib/algolia/models/recommend/personalization.rb +35 -20
- data/lib/algolia/models/recommend/promote_consequence_object.rb +36 -21
- data/lib/algolia/models/recommend/query_type.rb +2 -3
- data/lib/algolia/models/recommend/ranking_info.rb +76 -48
- data/lib/algolia/models/recommend/re_ranking_apply_filter.rb +33 -24
- data/lib/algolia/models/recommend/recommend_hit.rb +32 -21
- data/lib/algolia/models/recommend/recommend_models.rb +2 -3
- data/lib/algolia/models/recommend/recommend_rule.rb +38 -23
- data/lib/algolia/models/recommend/recommend_rule_metadata.rb +33 -18
- data/lib/algolia/models/recommend/recommendations_hit.rb +33 -24
- data/lib/algolia/models/recommend/recommendations_hits.rb +33 -18
- data/lib/algolia/models/recommend/recommendations_request.rb +37 -28
- data/lib/algolia/models/recommend/recommendations_results.rb +159 -114
- data/lib/algolia/models/recommend/recommended_for_you.rb +34 -19
- data/lib/algolia/models/recommend/recommended_for_you_model.rb +2 -3
- data/lib/algolia/models/recommend/recommended_for_you_query.rb +46 -31
- data/lib/algolia/models/recommend/redirect.rb +29 -17
- data/lib/algolia/models/recommend/redirect_rule_index_metadata.rb +37 -22
- data/lib/algolia/models/recommend/redirect_rule_index_metadata_data.rb +33 -18
- data/lib/algolia/models/recommend/redirect_url.rb +33 -18
- data/lib/algolia/models/recommend/related_model.rb +2 -3
- data/lib/algolia/models/recommend/related_products.rb +35 -20
- data/lib/algolia/models/recommend/related_query.rb +47 -32
- data/lib/algolia/models/recommend/remove_stop_words.rb +33 -24
- data/lib/algolia/models/recommend/remove_words_if_no_results.rb +2 -3
- data/lib/algolia/models/recommend/rendering_content.rb +34 -19
- data/lib/algolia/models/recommend/search_pagination.rb +282 -0
- data/lib/algolia/models/recommend/search_params.rb +207 -118
- data/lib/algolia/models/recommend/search_params_object.rb +208 -119
- data/lib/algolia/models/recommend/search_params_query.rb +33 -18
- data/lib/algolia/models/recommend/search_recommend_rules_params.rb +48 -33
- data/lib/algolia/models/recommend/search_recommend_rules_response.rb +38 -23
- data/lib/algolia/models/recommend/semantic_search.rb +35 -20
- data/lib/algolia/models/recommend/snippet_result.rb +34 -25
- data/lib/algolia/models/recommend/snippet_result_option.rb +34 -19
- data/lib/algolia/models/recommend/sort_remaining_by.rb +2 -3
- data/lib/algolia/models/recommend/supported_language.rb +72 -5
- data/lib/algolia/models/recommend/tag_filters.rb +33 -24
- data/lib/algolia/models/recommend/task_status.rb +2 -3
- data/lib/algolia/models/recommend/trending_facet_hit.rb +38 -23
- data/lib/algolia/models/recommend/trending_facets.rb +37 -22
- data/lib/algolia/models/recommend/trending_facets_model.rb +2 -3
- data/lib/algolia/models/recommend/trending_facets_query.rb +49 -34
- data/lib/algolia/models/recommend/trending_items.rb +36 -25
- data/lib/algolia/models/recommend/trending_items_model.rb +2 -3
- data/lib/algolia/models/recommend/trending_items_query.rb +58 -38
- data/lib/algolia/models/recommend/typo_tolerance.rb +33 -24
- data/lib/algolia/models/recommend/typo_tolerance_enum.rb +2 -3
- data/lib/algolia/models/recommend/value.rb +31 -19
- data/lib/algolia/models/search/acl.rb +19 -5
- data/lib/algolia/models/search/action.rb +11 -4
- data/lib/algolia/models/search/add_api_key_response.rb +34 -19
- data/lib/algolia/models/search/advanced_syntax_features.rb +2 -3
- data/lib/algolia/models/search/alternatives_as_exact.rb +2 -3
- data/lib/algolia/models/search/anchoring.rb +2 -3
- data/lib/algolia/models/search/api_key.rb +46 -25
- data/lib/algolia/models/search/api_key_operation.rb +2 -3
- data/lib/algolia/models/search/around_precision.rb +33 -24
- data/lib/algolia/models/search/around_precision_from_value_inner.rb +34 -19
- data/lib/algolia/models/search/around_radius.rb +33 -24
- data/lib/algolia/models/search/around_radius_all.rb +2 -3
- data/lib/algolia/models/search/assign_user_id_params.rb +33 -18
- data/lib/algolia/models/search/attribute_to_update.rb +33 -24
- data/lib/algolia/models/search/automatic_facet_filter.rb +35 -20
- data/lib/algolia/models/search/automatic_facet_filters.rb +33 -24
- data/lib/algolia/models/search/base_get_api_key_response.rb +34 -19
- data/lib/algolia/models/search/base_index_settings.rb +71 -39
- data/lib/algolia/models/search/base_search_params.rb +110 -63
- data/lib/algolia/models/search/base_search_params_without_query.rb +106 -60
- data/lib/algolia/models/search/base_search_response.rb +76 -121
- data/lib/algolia/models/search/batch_assign_user_ids_params.rb +34 -19
- data/lib/algolia/models/search/batch_dictionary_entries_params.rb +34 -19
- data/lib/algolia/models/search/batch_dictionary_entries_request.rb +34 -19
- data/lib/algolia/models/search/batch_params.rb +33 -18
- data/lib/algolia/models/search/batch_request.rb +34 -19
- data/lib/algolia/models/search/batch_response.rb +34 -19
- data/lib/algolia/models/search/batch_write_params.rb +33 -18
- data/lib/algolia/models/{ingestion/schedule_date_utils_input.rb → search/browse_pagination.rb} +92 -45
- data/lib/algolia/models/search/browse_params.rb +33 -24
- data/lib/algolia/models/search/browse_params_object.rb +210 -120
- data/lib/algolia/models/search/browse_response.rb +158 -118
- data/lib/algolia/models/search/built_in_operation.rb +34 -19
- data/lib/algolia/models/search/built_in_operation_type.rb +2 -3
- data/lib/algolia/models/search/condition.rb +38 -23
- data/lib/algolia/models/search/consequence.rb +43 -28
- data/lib/algolia/models/search/consequence_hide.rb +33 -18
- data/lib/algolia/models/search/consequence_params.rb +213 -122
- data/lib/algolia/models/search/consequence_query.rb +33 -24
- data/lib/algolia/models/search/consequence_query_object.rb +34 -19
- data/lib/algolia/models/search/created_at_response.rb +33 -18
- data/lib/algolia/models/search/cursor.rb +29 -17
- data/lib/algolia/models/search/delete_api_key_response.rb +33 -18
- data/lib/algolia/models/search/delete_by_params.rb +50 -26
- data/lib/algolia/models/search/delete_source_response.rb +33 -18
- data/lib/algolia/models/search/deleted_at_response.rb +34 -19
- data/lib/algolia/models/search/dictionary_action.rb +2 -3
- data/lib/algolia/models/search/dictionary_entry.rb +29 -18
- data/lib/algolia/models/search/dictionary_entry_state.rb +2 -3
- data/lib/algolia/models/search/dictionary_language.rb +33 -18
- data/lib/algolia/models/search/dictionary_settings_params.rb +33 -18
- data/lib/algolia/models/search/dictionary_type.rb +2 -3
- data/lib/algolia/models/search/distinct.rb +33 -24
- data/lib/algolia/models/search/edit.rb +31 -19
- data/lib/algolia/models/search/edit_type.rb +2 -3
- data/lib/algolia/models/search/error_base.rb +24 -13
- data/lib/algolia/models/search/exact_on_single_word_query.rb +2 -3
- data/lib/algolia/models/search/exhaustive.rb +37 -22
- data/lib/algolia/models/search/facet_filters.rb +33 -24
- data/lib/algolia/models/search/facet_hits.rb +35 -20
- data/lib/algolia/models/search/facet_ordering.rb +34 -19
- data/lib/algolia/models/search/facets.rb +29 -17
- data/lib/algolia/models/search/facets_stats.rb +36 -21
- data/lib/algolia/models/search/fetched_index.rb +58 -30
- data/lib/algolia/models/search/get_api_key_response.rb +56 -30
- data/lib/algolia/models/search/get_dictionary_settings_response.rb +33 -18
- data/lib/algolia/models/search/get_logs_response.rb +33 -18
- data/lib/algolia/models/search/get_objects_params.rb +33 -18
- data/lib/algolia/models/search/get_objects_request.rb +35 -20
- data/lib/algolia/models/search/get_objects_response.rb +33 -18
- data/lib/algolia/models/search/get_task_response.rb +33 -18
- data/lib/algolia/models/search/get_top_user_ids_response.rb +33 -18
- data/lib/algolia/models/search/has_pending_mappings_response.rb +34 -19
- data/lib/algolia/models/search/highlight_result.rb +34 -25
- data/lib/algolia/models/search/highlight_result_option.rb +36 -21
- data/lib/algolia/models/search/hit.rb +24 -16
- data/lib/algolia/models/search/ignore_plurals.rb +33 -24
- data/lib/algolia/models/search/index_settings.rb +171 -97
- data/lib/algolia/models/search/index_settings_as_search_params.rb +134 -75
- data/lib/algolia/models/search/languages.rb +39 -24
- data/lib/algolia/models/search/list_api_keys_response.rb +33 -18
- data/lib/algolia/models/search/list_clusters_response.rb +33 -18
- data/lib/algolia/models/search/list_indices_response.rb +34 -19
- data/lib/algolia/models/search/list_user_ids_response.rb +33 -18
- data/lib/algolia/models/search/log.rb +70 -37
- data/lib/algolia/models/search/log_query.rb +31 -19
- data/lib/algolia/models/search/log_type.rb +2 -3
- data/lib/algolia/models/search/match_level.rb +2 -3
- data/lib/algolia/models/search/matched_geo_location.rb +35 -20
- data/lib/algolia/models/search/mode.rb +2 -3
- data/lib/algolia/models/search/multiple_batch_request.rb +35 -20
- data/lib/algolia/models/search/multiple_batch_response.rb +34 -19
- data/lib/algolia/models/search/numeric_filters.rb +33 -24
- data/lib/algolia/models/search/operation_index_params.rb +35 -20
- data/lib/algolia/models/search/operation_type.rb +2 -3
- data/lib/algolia/models/search/optional_filters.rb +33 -24
- data/lib/algolia/models/search/params.rb +32 -20
- data/lib/algolia/models/search/personalization.rb +35 -20
- data/lib/algolia/models/search/promote.rb +33 -24
- data/lib/algolia/models/search/promote_object_id.rb +34 -19
- data/lib/algolia/models/search/promote_object_ids.rb +36 -21
- data/lib/algolia/models/search/query_type.rb +2 -3
- data/lib/algolia/models/search/ranking_info.rb +76 -48
- data/lib/algolia/models/search/re_ranking_apply_filter.rb +33 -24
- data/lib/algolia/models/search/redirect.rb +29 -17
- data/lib/algolia/models/search/redirect_rule_index_metadata.rb +37 -22
- data/lib/algolia/models/search/redirect_rule_index_metadata_data.rb +33 -18
- data/lib/algolia/models/search/redirect_url.rb +33 -18
- data/lib/algolia/models/search/remove_stop_words.rb +33 -24
- data/lib/algolia/models/search/remove_user_id_response.rb +33 -18
- data/lib/algolia/models/search/remove_words_if_no_results.rb +2 -3
- data/lib/algolia/models/search/rendering_content.rb +34 -19
- data/lib/algolia/models/search/replace_all_objects_response.rb +35 -20
- data/lib/algolia/models/search/replace_source_response.rb +33 -18
- data/lib/algolia/models/search/rule.rb +37 -25
- data/lib/algolia/models/search/save_object_response.rb +35 -20
- data/lib/algolia/models/search/save_synonym_response.rb +35 -20
- data/lib/algolia/models/search/scope_type.rb +2 -3
- data/lib/algolia/models/search/search_dictionary_entries_params.rb +41 -26
- data/lib/algolia/models/search/search_dictionary_entries_response.rb +38 -23
- data/lib/algolia/models/search/search_for_facet_values_request.rb +37 -22
- data/lib/algolia/models/search/search_for_facet_values_response.rb +35 -20
- data/lib/algolia/models/search/search_for_facets.rb +218 -124
- data/lib/algolia/models/search/search_for_facets_options.rb +39 -24
- data/lib/algolia/models/search/search_for_hits.rb +214 -122
- data/lib/algolia/models/search/search_for_hits_options.rb +34 -19
- data/lib/algolia/models/search/search_hits.rb +26 -15
- data/lib/algolia/models/search/search_method_params.rb +34 -19
- data/lib/algolia/models/search/search_pagination.rb +282 -0
- data/lib/algolia/models/search/search_params.rb +33 -24
- data/lib/algolia/models/search/search_params_object.rb +208 -119
- data/lib/algolia/models/search/search_params_query.rb +33 -18
- data/lib/algolia/models/search/search_params_string.rb +33 -18
- data/lib/algolia/models/search/search_query.rb +33 -24
- data/lib/algolia/models/search/search_response.rb +154 -111
- data/lib/algolia/models/search/search_responses.rb +33 -18
- data/lib/algolia/models/search/search_result.rb +33 -24
- data/lib/algolia/models/search/search_rules_params.rb +45 -30
- data/lib/algolia/models/search/search_rules_response.rb +36 -21
- data/lib/algolia/models/search/search_strategy.rb +2 -3
- data/lib/algolia/models/search/search_synonyms_params.rb +41 -26
- data/lib/algolia/models/search/search_synonyms_response.rb +25 -14
- data/lib/algolia/models/search/search_type_default.rb +2 -3
- data/lib/algolia/models/search/search_type_facet.rb +2 -3
- data/lib/algolia/models/search/search_user_ids_params.rb +41 -26
- data/lib/algolia/models/search/search_user_ids_response.rb +42 -27
- data/lib/algolia/models/search/secured_api_key_restrictions.rb +38 -23
- data/lib/algolia/models/search/semantic_search.rb +35 -20
- data/lib/algolia/models/search/snippet_result.rb +34 -25
- data/lib/algolia/models/search/snippet_result_option.rb +34 -19
- data/lib/algolia/models/search/sort_remaining_by.rb +2 -3
- data/lib/algolia/models/search/source.rb +30 -18
- data/lib/algolia/models/search/standard_entries.rb +39 -24
- data/lib/algolia/models/search/supported_language.rb +72 -5
- data/lib/algolia/models/search/synonym_hit.rb +40 -25
- data/lib/algolia/models/search/synonym_type.rb +2 -3
- data/lib/algolia/models/search/tag_filters.rb +33 -24
- data/lib/algolia/models/search/task_status.rb +2 -3
- data/lib/algolia/models/search/time_range.rb +34 -19
- data/lib/algolia/models/search/typo_tolerance.rb +33 -24
- data/lib/algolia/models/search/typo_tolerance_enum.rb +2 -3
- data/lib/algolia/models/search/update_api_key_response.rb +34 -19
- data/lib/algolia/models/search/updated_at_response.rb +34 -19
- data/lib/algolia/models/search/updated_at_with_object_id_response.rb +35 -20
- data/lib/algolia/models/search/updated_rule_response.rb +35 -20
- data/lib/algolia/models/search/user_highlight_result.rb +34 -19
- data/lib/algolia/models/search/user_hit.rb +35 -23
- data/lib/algolia/models/search/user_id.rb +33 -21
- data/lib/algolia/models/search/value.rb +31 -19
- data/lib/algolia/models/usage/error_base.rb +24 -13
- data/lib/algolia/models/usage/get_usage200_response.rb +33 -18
- data/lib/algolia/models/usage/get_usage200_response_statistics_inner.rb +34 -19
- data/lib/algolia/models/usage/get_usage400_response.rb +33 -18
- data/lib/algolia/models/usage/get_usage400_response_error.rb +35 -20
- data/lib/algolia/models/usage/get_usage400_response_error_errors_inner.rb +36 -21
- data/lib/algolia/models/usage/granularity.rb +2 -3
- data/lib/algolia/models/usage/statistic.rb +88 -5
- data/lib/algolia/models/usage/statistic_value.rb +33 -24
- data/lib/algolia/transport/call_type.rb +1 -1
- data/lib/algolia/transport/echo_requester.rb +11 -2
- data/lib/algolia/transport/http/http_requester.rb +23 -15
- data/lib/algolia/transport/http/response.rb +8 -8
- data/lib/algolia/transport/request_options.rb +6 -4
- data/lib/algolia/transport/retry_outcome_type.rb +3 -3
- data/lib/algolia/transport/retry_strategy.rb +8 -7
- data/lib/algolia/transport/stateful_host.rb +6 -6
- data/lib/algolia/transport/transport.rb +28 -21
- data/lib/algolia/user_agent.rb +1 -1
- data/lib/algolia/version.rb +1 -1
- data/lib/algolia.rb +16 -16
- metadata +20 -13
- data/.rubocop.yml +0 -99
@@ -1,7 +1,7 @@
|
|
1
1
|
# Code generated by OpenAPI Generator (https://openapi-generator.tech), manual changes will be lost - read more on https://github.com/algolia/api-clients-automation. DO NOT EDIT.
|
2
2
|
|
3
|
-
require
|
4
|
-
require
|
3
|
+
require "date"
|
4
|
+
require "time"
|
5
5
|
|
6
6
|
module Algolia
|
7
7
|
module Insights
|
@@ -84,41 +84,49 @@ module Algolia
|
|
84
84
|
# Attribute type mapping.
|
85
85
|
def self.types_mapping
|
86
86
|
{
|
87
|
-
:event_name => :String,
|
88
|
-
:event_type => :ConversionEvent,
|
89
|
-
:event_subtype => :AddToCartEvent,
|
90
|
-
:index => :String,
|
91
|
-
:object_ids => :
|
92
|
-
:user_token => :String,
|
93
|
-
:authenticated_user_token => :String,
|
94
|
-
:currency => :String,
|
95
|
-
:object_data => :
|
96
|
-
:timestamp => :Integer,
|
97
|
-
:value => :Value
|
87
|
+
:event_name => :"String",
|
88
|
+
:event_type => :"ConversionEvent",
|
89
|
+
:event_subtype => :"AddToCartEvent",
|
90
|
+
:index => :"String",
|
91
|
+
:object_ids => :"Array<String>",
|
92
|
+
:user_token => :"String",
|
93
|
+
:authenticated_user_token => :"String",
|
94
|
+
:currency => :"String",
|
95
|
+
:object_data => :"Array<ObjectData>",
|
96
|
+
:timestamp => :"Integer",
|
97
|
+
:value => :"Value"
|
98
98
|
}
|
99
99
|
end
|
100
100
|
|
101
101
|
# List of attributes with nullable: true
|
102
102
|
def self.openapi_nullable
|
103
|
-
Set.new(
|
103
|
+
Set.new(
|
104
|
+
[]
|
105
|
+
)
|
104
106
|
end
|
105
107
|
|
106
108
|
# Initializes the object
|
107
109
|
# @param [Hash] attributes Model attributes in the form of hash
|
108
110
|
def initialize(attributes = {})
|
109
|
-
|
110
|
-
raise
|
111
|
+
if (!attributes.is_a?(Hash))
|
112
|
+
raise(
|
113
|
+
ArgumentError,
|
114
|
+
"The input argument (attributes) must be a hash in `Algolia::AddedToCartObjectIDs` initialize method"
|
115
|
+
)
|
111
116
|
end
|
112
117
|
|
113
118
|
# check to see if the attribute exists and convert string to symbol for hash key
|
114
|
-
attributes = attributes.each_with_object({})
|
115
|
-
|
116
|
-
raise
|
117
|
-
|
119
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
120
|
+
if (!self.class.attribute_map.key?(k.to_sym))
|
121
|
+
raise(
|
122
|
+
ArgumentError,
|
123
|
+
"`#{k}` is not a valid attribute in `Algolia::AddedToCartObjectIDs`. Please check the name to make sure it's valid. List of attributes: " +
|
124
|
+
self.class.attribute_map.keys.inspect
|
125
|
+
)
|
118
126
|
end
|
119
127
|
|
120
128
|
h[k.to_sym] = v
|
121
|
-
|
129
|
+
}
|
122
130
|
|
123
131
|
if attributes.key?(:event_name)
|
124
132
|
self.event_name = attributes[:event_name]
|
@@ -185,15 +193,21 @@ module Algolia
|
|
185
193
|
# @param [Object] event_name Value to be assigned
|
186
194
|
def event_name=(event_name)
|
187
195
|
if event_name.nil?
|
188
|
-
raise ArgumentError,
|
196
|
+
raise ArgumentError, "event_name cannot be nil"
|
189
197
|
end
|
190
198
|
|
191
199
|
if event_name.to_s.length > 64
|
192
|
-
raise
|
200
|
+
raise(
|
201
|
+
ArgumentError,
|
202
|
+
"invalid value for \"event_name\", the character length must be smaller than or equal to 64."
|
203
|
+
)
|
193
204
|
end
|
194
205
|
|
195
206
|
if event_name.to_s.length < 1
|
196
|
-
raise
|
207
|
+
raise(
|
208
|
+
ArgumentError,
|
209
|
+
"invalid value for \"event_name\", the character length must be great than or equal to 1."
|
210
|
+
)
|
197
211
|
end
|
198
212
|
|
199
213
|
pattern = /[\x20-\x7E]{1,64}/
|
@@ -208,15 +222,15 @@ module Algolia
|
|
208
222
|
# @param [Object] object_ids Value to be assigned
|
209
223
|
def object_ids=(object_ids)
|
210
224
|
if object_ids.nil?
|
211
|
-
raise ArgumentError,
|
225
|
+
raise ArgumentError, "object_ids cannot be nil"
|
212
226
|
end
|
213
227
|
|
214
228
|
if object_ids.length > 20
|
215
|
-
raise ArgumentError,
|
229
|
+
raise ArgumentError, "invalid value for \"object_ids\", number of items must be less than or equal to 20."
|
216
230
|
end
|
217
231
|
|
218
232
|
if object_ids.length < 1
|
219
|
-
raise ArgumentError,
|
233
|
+
raise ArgumentError, "invalid value for \"object_ids\", number of items must be greater than or equal to 1."
|
220
234
|
end
|
221
235
|
|
222
236
|
@object_ids = object_ids
|
@@ -226,18 +240,24 @@ module Algolia
|
|
226
240
|
# @param [Object] user_token Value to be assigned
|
227
241
|
def user_token=(user_token)
|
228
242
|
if user_token.nil?
|
229
|
-
raise ArgumentError,
|
243
|
+
raise ArgumentError, "user_token cannot be nil"
|
230
244
|
end
|
231
245
|
|
232
246
|
if user_token.to_s.length > 129
|
233
|
-
raise
|
247
|
+
raise(
|
248
|
+
ArgumentError,
|
249
|
+
"invalid value for \"user_token\", the character length must be smaller than or equal to 129."
|
250
|
+
)
|
234
251
|
end
|
235
252
|
|
236
253
|
if user_token.to_s.length < 1
|
237
|
-
raise
|
254
|
+
raise(
|
255
|
+
ArgumentError,
|
256
|
+
"invalid value for \"user_token\", the character length must be great than or equal to 1."
|
257
|
+
)
|
238
258
|
end
|
239
259
|
|
240
|
-
pattern =
|
260
|
+
pattern = /[a-zA-Z0-9_=\/+-]{1,129}/
|
241
261
|
if user_token !~ pattern
|
242
262
|
raise ArgumentError, "invalid value for \"user_token\", must conform to the pattern #{pattern}."
|
243
263
|
end
|
@@ -249,18 +269,24 @@ module Algolia
|
|
249
269
|
# @param [Object] authenticated_user_token Value to be assigned
|
250
270
|
def authenticated_user_token=(authenticated_user_token)
|
251
271
|
if authenticated_user_token.nil?
|
252
|
-
raise ArgumentError,
|
272
|
+
raise ArgumentError, "authenticated_user_token cannot be nil"
|
253
273
|
end
|
254
274
|
|
255
275
|
if authenticated_user_token.to_s.length > 129
|
256
|
-
raise
|
276
|
+
raise(
|
277
|
+
ArgumentError,
|
278
|
+
"invalid value for \"authenticated_user_token\", the character length must be smaller than or equal to 129."
|
279
|
+
)
|
257
280
|
end
|
258
281
|
|
259
282
|
if authenticated_user_token.to_s.length < 1
|
260
|
-
raise
|
283
|
+
raise(
|
284
|
+
ArgumentError,
|
285
|
+
"invalid value for \"authenticated_user_token\", the character length must be great than or equal to 1."
|
286
|
+
)
|
261
287
|
end
|
262
288
|
|
263
|
-
pattern =
|
289
|
+
pattern = /[a-zA-Z0-9_=\/+-]{1,129}/
|
264
290
|
if authenticated_user_token !~ pattern
|
265
291
|
raise ArgumentError, "invalid value for \"authenticated_user_token\", must conform to the pattern #{pattern}."
|
266
292
|
end
|
@@ -272,15 +298,15 @@ module Algolia
|
|
272
298
|
# @param [Object] object_data Value to be assigned
|
273
299
|
def object_data=(object_data)
|
274
300
|
if object_data.nil?
|
275
|
-
raise ArgumentError,
|
301
|
+
raise ArgumentError, "object_data cannot be nil"
|
276
302
|
end
|
277
303
|
|
278
304
|
if object_data.length > 20
|
279
|
-
raise ArgumentError,
|
305
|
+
raise ArgumentError, "invalid value for \"object_data\", number of items must be less than or equal to 20."
|
280
306
|
end
|
281
307
|
|
282
308
|
if object_data.length < 1
|
283
|
-
raise ArgumentError,
|
309
|
+
raise ArgumentError, "invalid value for \"object_data\", number of items must be greater than or equal to 1."
|
284
310
|
end
|
285
311
|
|
286
312
|
@object_data = object_data
|
@@ -289,8 +315,7 @@ module Algolia
|
|
289
315
|
# Checks equality by comparing each attribute.
|
290
316
|
# @param [Object] Object to be compared
|
291
317
|
def ==(other)
|
292
|
-
return true if equal?(other)
|
293
|
-
|
318
|
+
return true if self.equal?(other)
|
294
319
|
self.class == other.class &&
|
295
320
|
event_name == other.event_name &&
|
296
321
|
event_type == other.event_type &&
|
@@ -314,7 +339,19 @@ module Algolia
|
|
314
339
|
# Calculates hash code according to all attributes.
|
315
340
|
# @return [Integer] Hash code
|
316
341
|
def hash
|
317
|
-
[
|
342
|
+
[
|
343
|
+
event_name,
|
344
|
+
event_type,
|
345
|
+
event_subtype,
|
346
|
+
index,
|
347
|
+
object_ids,
|
348
|
+
user_token,
|
349
|
+
authenticated_user_token,
|
350
|
+
currency,
|
351
|
+
object_data,
|
352
|
+
timestamp,
|
353
|
+
value
|
354
|
+
].hash
|
318
355
|
end
|
319
356
|
|
320
357
|
# Builds the object from hash
|
@@ -322,7 +359,6 @@ module Algolia
|
|
322
359
|
# @return [Object] Returns the model itself
|
323
360
|
def self.build_from_hash(attributes)
|
324
361
|
return nil unless attributes.is_a?(Hash)
|
325
|
-
|
326
362
|
attributes = attributes.transform_keys(&:to_sym)
|
327
363
|
transformed_hash = {}
|
328
364
|
types_mapping.each_pair do |key, type|
|
@@ -332,12 +368,15 @@ module Algolia
|
|
332
368
|
# check to ensure the input is an array given that the attribute
|
333
369
|
# is documented as an array but the input is not
|
334
370
|
if attributes[attribute_map[key]].is_a?(Array)
|
335
|
-
transformed_hash[key.to_sym] = attributes[attribute_map[key]].map { |v|
|
371
|
+
transformed_hash[key.to_sym] = attributes[attribute_map[key]].map { |v|
|
372
|
+
_deserialize(::Regexp.last_match(1), v)
|
373
|
+
}
|
336
374
|
end
|
337
375
|
elsif !attributes[attribute_map[key]].nil?
|
338
376
|
transformed_hash[key.to_sym] = _deserialize(type, attributes[attribute_map[key]])
|
339
377
|
end
|
340
378
|
end
|
379
|
+
|
341
380
|
new(transformed_hash)
|
342
381
|
end
|
343
382
|
|
@@ -363,6 +402,7 @@ module Algolia
|
|
363
402
|
else
|
364
403
|
false
|
365
404
|
end
|
405
|
+
|
366
406
|
when :Object
|
367
407
|
# generic object (usually a Hash), return directly
|
368
408
|
value
|
@@ -377,10 +417,12 @@ module Algolia
|
|
377
417
|
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
378
418
|
end
|
379
419
|
end
|
380
|
-
|
420
|
+
# model
|
421
|
+
else
|
381
422
|
# models (e.g. Pet) or oneOf
|
382
423
|
klass = Algolia::Insights.const_get(type)
|
383
|
-
klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass
|
424
|
+
klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass
|
425
|
+
.build_from_hash(value)
|
384
426
|
end
|
385
427
|
end
|
386
428
|
|
@@ -413,6 +455,7 @@ module Algolia
|
|
413
455
|
|
414
456
|
hash[param] = _to_hash(value)
|
415
457
|
end
|
458
|
+
|
416
459
|
hash
|
417
460
|
end
|
418
461
|
|
@@ -427,12 +470,14 @@ module Algolia
|
|
427
470
|
{}.tap do |hash|
|
428
471
|
value.each { |k, v| hash[k] = _to_hash(v) }
|
429
472
|
end
|
430
|
-
elsif value.respond_to?
|
473
|
+
elsif value.respond_to?(:to_hash)
|
431
474
|
value.to_hash
|
432
475
|
else
|
433
476
|
value
|
434
477
|
end
|
435
478
|
end
|
479
|
+
|
436
480
|
end
|
481
|
+
|
437
482
|
end
|
438
483
|
end
|
@@ -1,7 +1,7 @@
|
|
1
1
|
# Code generated by OpenAPI Generator (https://openapi-generator.tech), manual changes will be lost - read more on https://github.com/algolia/api-clients-automation. DO NOT EDIT.
|
2
2
|
|
3
|
-
require
|
4
|
-
require
|
3
|
+
require "date"
|
4
|
+
require "time"
|
5
5
|
|
6
6
|
module Algolia
|
7
7
|
module Insights
|
@@ -88,42 +88,50 @@ module Algolia
|
|
88
88
|
# Attribute type mapping.
|
89
89
|
def self.types_mapping
|
90
90
|
{
|
91
|
-
:event_name => :String,
|
92
|
-
:event_type => :ConversionEvent,
|
93
|
-
:event_subtype => :AddToCartEvent,
|
94
|
-
:index => :String,
|
95
|
-
:query_id => :String,
|
96
|
-
:object_ids => :
|
97
|
-
:user_token => :String,
|
98
|
-
:authenticated_user_token => :String,
|
99
|
-
:currency => :String,
|
100
|
-
:object_data => :
|
101
|
-
:timestamp => :Integer,
|
102
|
-
:value => :Value
|
91
|
+
:event_name => :"String",
|
92
|
+
:event_type => :"ConversionEvent",
|
93
|
+
:event_subtype => :"AddToCartEvent",
|
94
|
+
:index => :"String",
|
95
|
+
:query_id => :"String",
|
96
|
+
:object_ids => :"Array<String>",
|
97
|
+
:user_token => :"String",
|
98
|
+
:authenticated_user_token => :"String",
|
99
|
+
:currency => :"String",
|
100
|
+
:object_data => :"Array<ObjectDataAfterSearch>",
|
101
|
+
:timestamp => :"Integer",
|
102
|
+
:value => :"Value"
|
103
103
|
}
|
104
104
|
end
|
105
105
|
|
106
106
|
# List of attributes with nullable: true
|
107
107
|
def self.openapi_nullable
|
108
|
-
Set.new(
|
108
|
+
Set.new(
|
109
|
+
[]
|
110
|
+
)
|
109
111
|
end
|
110
112
|
|
111
113
|
# Initializes the object
|
112
114
|
# @param [Hash] attributes Model attributes in the form of hash
|
113
115
|
def initialize(attributes = {})
|
114
|
-
|
115
|
-
raise
|
116
|
+
if (!attributes.is_a?(Hash))
|
117
|
+
raise(
|
118
|
+
ArgumentError,
|
119
|
+
"The input argument (attributes) must be a hash in `Algolia::AddedToCartObjectIDsAfterSearch` initialize method"
|
120
|
+
)
|
116
121
|
end
|
117
122
|
|
118
123
|
# check to see if the attribute exists and convert string to symbol for hash key
|
119
|
-
attributes = attributes.each_with_object({})
|
120
|
-
|
121
|
-
raise
|
122
|
-
|
124
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
125
|
+
if (!self.class.attribute_map.key?(k.to_sym))
|
126
|
+
raise(
|
127
|
+
ArgumentError,
|
128
|
+
"`#{k}` is not a valid attribute in `Algolia::AddedToCartObjectIDsAfterSearch`. Please check the name to make sure it's valid. List of attributes: " +
|
129
|
+
self.class.attribute_map.keys.inspect
|
130
|
+
)
|
123
131
|
end
|
124
132
|
|
125
133
|
h[k.to_sym] = v
|
126
|
-
|
134
|
+
}
|
127
135
|
|
128
136
|
if attributes.key?(:event_name)
|
129
137
|
self.event_name = attributes[:event_name]
|
@@ -196,15 +204,21 @@ module Algolia
|
|
196
204
|
# @param [Object] event_name Value to be assigned
|
197
205
|
def event_name=(event_name)
|
198
206
|
if event_name.nil?
|
199
|
-
raise ArgumentError,
|
207
|
+
raise ArgumentError, "event_name cannot be nil"
|
200
208
|
end
|
201
209
|
|
202
210
|
if event_name.to_s.length > 64
|
203
|
-
raise
|
211
|
+
raise(
|
212
|
+
ArgumentError,
|
213
|
+
"invalid value for \"event_name\", the character length must be smaller than or equal to 64."
|
214
|
+
)
|
204
215
|
end
|
205
216
|
|
206
217
|
if event_name.to_s.length < 1
|
207
|
-
raise
|
218
|
+
raise(
|
219
|
+
ArgumentError,
|
220
|
+
"invalid value for \"event_name\", the character length must be great than or equal to 1."
|
221
|
+
)
|
208
222
|
end
|
209
223
|
|
210
224
|
pattern = /[\x20-\x7E]{1,64}/
|
@@ -219,15 +233,18 @@ module Algolia
|
|
219
233
|
# @param [Object] query_id Value to be assigned
|
220
234
|
def query_id=(query_id)
|
221
235
|
if query_id.nil?
|
222
|
-
raise ArgumentError,
|
236
|
+
raise ArgumentError, "query_id cannot be nil"
|
223
237
|
end
|
224
238
|
|
225
239
|
if query_id.to_s.length > 32
|
226
|
-
raise
|
240
|
+
raise(
|
241
|
+
ArgumentError,
|
242
|
+
"invalid value for \"query_id\", the character length must be smaller than or equal to 32."
|
243
|
+
)
|
227
244
|
end
|
228
245
|
|
229
246
|
if query_id.to_s.length < 32
|
230
|
-
raise ArgumentError,
|
247
|
+
raise ArgumentError, "invalid value for \"query_id\", the character length must be great than or equal to 32."
|
231
248
|
end
|
232
249
|
|
233
250
|
pattern = /[0-9a-f]{32}/
|
@@ -242,15 +259,15 @@ module Algolia
|
|
242
259
|
# @param [Object] object_ids Value to be assigned
|
243
260
|
def object_ids=(object_ids)
|
244
261
|
if object_ids.nil?
|
245
|
-
raise ArgumentError,
|
262
|
+
raise ArgumentError, "object_ids cannot be nil"
|
246
263
|
end
|
247
264
|
|
248
265
|
if object_ids.length > 20
|
249
|
-
raise ArgumentError,
|
266
|
+
raise ArgumentError, "invalid value for \"object_ids\", number of items must be less than or equal to 20."
|
250
267
|
end
|
251
268
|
|
252
269
|
if object_ids.length < 1
|
253
|
-
raise ArgumentError,
|
270
|
+
raise ArgumentError, "invalid value for \"object_ids\", number of items must be greater than or equal to 1."
|
254
271
|
end
|
255
272
|
|
256
273
|
@object_ids = object_ids
|
@@ -260,18 +277,24 @@ module Algolia
|
|
260
277
|
# @param [Object] user_token Value to be assigned
|
261
278
|
def user_token=(user_token)
|
262
279
|
if user_token.nil?
|
263
|
-
raise ArgumentError,
|
280
|
+
raise ArgumentError, "user_token cannot be nil"
|
264
281
|
end
|
265
282
|
|
266
283
|
if user_token.to_s.length > 129
|
267
|
-
raise
|
284
|
+
raise(
|
285
|
+
ArgumentError,
|
286
|
+
"invalid value for \"user_token\", the character length must be smaller than or equal to 129."
|
287
|
+
)
|
268
288
|
end
|
269
289
|
|
270
290
|
if user_token.to_s.length < 1
|
271
|
-
raise
|
291
|
+
raise(
|
292
|
+
ArgumentError,
|
293
|
+
"invalid value for \"user_token\", the character length must be great than or equal to 1."
|
294
|
+
)
|
272
295
|
end
|
273
296
|
|
274
|
-
pattern =
|
297
|
+
pattern = /[a-zA-Z0-9_=\/+-]{1,129}/
|
275
298
|
if user_token !~ pattern
|
276
299
|
raise ArgumentError, "invalid value for \"user_token\", must conform to the pattern #{pattern}."
|
277
300
|
end
|
@@ -283,18 +306,24 @@ module Algolia
|
|
283
306
|
# @param [Object] authenticated_user_token Value to be assigned
|
284
307
|
def authenticated_user_token=(authenticated_user_token)
|
285
308
|
if authenticated_user_token.nil?
|
286
|
-
raise ArgumentError,
|
309
|
+
raise ArgumentError, "authenticated_user_token cannot be nil"
|
287
310
|
end
|
288
311
|
|
289
312
|
if authenticated_user_token.to_s.length > 129
|
290
|
-
raise
|
313
|
+
raise(
|
314
|
+
ArgumentError,
|
315
|
+
"invalid value for \"authenticated_user_token\", the character length must be smaller than or equal to 129."
|
316
|
+
)
|
291
317
|
end
|
292
318
|
|
293
319
|
if authenticated_user_token.to_s.length < 1
|
294
|
-
raise
|
320
|
+
raise(
|
321
|
+
ArgumentError,
|
322
|
+
"invalid value for \"authenticated_user_token\", the character length must be great than or equal to 1."
|
323
|
+
)
|
295
324
|
end
|
296
325
|
|
297
|
-
pattern =
|
326
|
+
pattern = /[a-zA-Z0-9_=\/+-]{1,129}/
|
298
327
|
if authenticated_user_token !~ pattern
|
299
328
|
raise ArgumentError, "invalid value for \"authenticated_user_token\", must conform to the pattern #{pattern}."
|
300
329
|
end
|
@@ -306,15 +335,15 @@ module Algolia
|
|
306
335
|
# @param [Object] object_data Value to be assigned
|
307
336
|
def object_data=(object_data)
|
308
337
|
if object_data.nil?
|
309
|
-
raise ArgumentError,
|
338
|
+
raise ArgumentError, "object_data cannot be nil"
|
310
339
|
end
|
311
340
|
|
312
341
|
if object_data.length > 20
|
313
|
-
raise ArgumentError,
|
342
|
+
raise ArgumentError, "invalid value for \"object_data\", number of items must be less than or equal to 20."
|
314
343
|
end
|
315
344
|
|
316
345
|
if object_data.length < 1
|
317
|
-
raise ArgumentError,
|
346
|
+
raise ArgumentError, "invalid value for \"object_data\", number of items must be greater than or equal to 1."
|
318
347
|
end
|
319
348
|
|
320
349
|
@object_data = object_data
|
@@ -323,8 +352,7 @@ module Algolia
|
|
323
352
|
# Checks equality by comparing each attribute.
|
324
353
|
# @param [Object] Object to be compared
|
325
354
|
def ==(other)
|
326
|
-
return true if equal?(other)
|
327
|
-
|
355
|
+
return true if self.equal?(other)
|
328
356
|
self.class == other.class &&
|
329
357
|
event_name == other.event_name &&
|
330
358
|
event_type == other.event_type &&
|
@@ -349,7 +377,20 @@ module Algolia
|
|
349
377
|
# Calculates hash code according to all attributes.
|
350
378
|
# @return [Integer] Hash code
|
351
379
|
def hash
|
352
|
-
[
|
380
|
+
[
|
381
|
+
event_name,
|
382
|
+
event_type,
|
383
|
+
event_subtype,
|
384
|
+
index,
|
385
|
+
query_id,
|
386
|
+
object_ids,
|
387
|
+
user_token,
|
388
|
+
authenticated_user_token,
|
389
|
+
currency,
|
390
|
+
object_data,
|
391
|
+
timestamp,
|
392
|
+
value
|
393
|
+
].hash
|
353
394
|
end
|
354
395
|
|
355
396
|
# Builds the object from hash
|
@@ -357,7 +398,6 @@ module Algolia
|
|
357
398
|
# @return [Object] Returns the model itself
|
358
399
|
def self.build_from_hash(attributes)
|
359
400
|
return nil unless attributes.is_a?(Hash)
|
360
|
-
|
361
401
|
attributes = attributes.transform_keys(&:to_sym)
|
362
402
|
transformed_hash = {}
|
363
403
|
types_mapping.each_pair do |key, type|
|
@@ -367,12 +407,15 @@ module Algolia
|
|
367
407
|
# check to ensure the input is an array given that the attribute
|
368
408
|
# is documented as an array but the input is not
|
369
409
|
if attributes[attribute_map[key]].is_a?(Array)
|
370
|
-
transformed_hash[key.to_sym] = attributes[attribute_map[key]].map { |v|
|
410
|
+
transformed_hash[key.to_sym] = attributes[attribute_map[key]].map { |v|
|
411
|
+
_deserialize(::Regexp.last_match(1), v)
|
412
|
+
}
|
371
413
|
end
|
372
414
|
elsif !attributes[attribute_map[key]].nil?
|
373
415
|
transformed_hash[key.to_sym] = _deserialize(type, attributes[attribute_map[key]])
|
374
416
|
end
|
375
417
|
end
|
418
|
+
|
376
419
|
new(transformed_hash)
|
377
420
|
end
|
378
421
|
|
@@ -398,6 +441,7 @@ module Algolia
|
|
398
441
|
else
|
399
442
|
false
|
400
443
|
end
|
444
|
+
|
401
445
|
when :Object
|
402
446
|
# generic object (usually a Hash), return directly
|
403
447
|
value
|
@@ -412,10 +456,12 @@ module Algolia
|
|
412
456
|
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
413
457
|
end
|
414
458
|
end
|
415
|
-
|
459
|
+
# model
|
460
|
+
else
|
416
461
|
# models (e.g. Pet) or oneOf
|
417
462
|
klass = Algolia::Insights.const_get(type)
|
418
|
-
klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass
|
463
|
+
klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass
|
464
|
+
.build_from_hash(value)
|
419
465
|
end
|
420
466
|
end
|
421
467
|
|
@@ -448,6 +494,7 @@ module Algolia
|
|
448
494
|
|
449
495
|
hash[param] = _to_hash(value)
|
450
496
|
end
|
497
|
+
|
451
498
|
hash
|
452
499
|
end
|
453
500
|
|
@@ -462,12 +509,14 @@ module Algolia
|
|
462
509
|
{}.tap do |hash|
|
463
510
|
value.each { |k, v| hash[k] = _to_hash(v) }
|
464
511
|
end
|
465
|
-
elsif value.respond_to?
|
512
|
+
elsif value.respond_to?(:to_hash)
|
466
513
|
value.to_hash
|
467
514
|
else
|
468
515
|
value
|
469
516
|
end
|
470
517
|
end
|
518
|
+
|
471
519
|
end
|
520
|
+
|
472
521
|
end
|
473
522
|
end
|
@@ -1,7 +1,7 @@
|
|
1
1
|
# Code generated by OpenAPI Generator (https://openapi-generator.tech), manual changes will be lost - read more on https://github.com/algolia/api-clients-automation. DO NOT EDIT.
|
2
2
|
|
3
|
-
require
|
4
|
-
require
|
3
|
+
require "date"
|
4
|
+
require "time"
|
5
5
|
|
6
6
|
module Algolia
|
7
7
|
module Insights
|
@@ -24,7 +24,6 @@ module Algolia
|
|
24
24
|
# @return [String] The enum value
|
25
25
|
def build_from_hash(value)
|
26
26
|
return value if ClickEvent.all_vars.include?(value)
|
27
|
-
|
28
27
|
raise "Invalid ENUM value #{value} for class #ClickEvent"
|
29
28
|
end
|
30
29
|
end
|