├── CHANGELOG.md ├── packages ├── client_core │ ├── lib │ │ ├── src │ │ │ ├── extension.dart │ │ │ ├── version.dart │ │ │ ├── transport │ │ │ │ └── dio │ │ │ │ │ ├── platform │ │ │ │ │ ├── platform_stub.dart │ │ │ │ │ ├── platform_web.dart │ │ │ │ │ ├── platform.dart │ │ │ │ │ └── platform_io.dart │ │ │ │ │ ├── agent_interceptor.dart │ │ │ │ │ └── auth_interceptor.dart │ │ │ ├── api_client.dart │ │ │ └── config │ │ │ │ └── agent_segment.dart │ │ └── algolia_client_core.dart │ ├── pubspec.yaml │ ├── test │ │ └── version_test.dart │ └── example │ │ └── example.dart ├── client_insights │ ├── lib │ │ └── src │ │ │ ├── extension.dart │ │ │ ├── version.dart │ │ │ └── model │ │ │ ├── view_event.dart │ │ │ ├── click_event.dart │ │ │ ├── purchase_event.dart │ │ │ ├── add_to_cart_event.dart │ │ │ ├── conversion_event.dart │ │ │ ├── insights_events.g.dart │ │ │ └── error_base.g.dart │ ├── build.yaml │ ├── test │ │ └── version_test.dart │ ├── pubspec.yaml │ └── example │ │ └── example.dart ├── client_recommend │ ├── lib │ │ └── src │ │ │ ├── extension.dart │ │ │ ├── version.dart │ │ │ └── model │ │ │ ├── boolean_string.dart │ │ │ ├── recommendations_hits.g.dart │ │ │ ├── advanced_syntax_features.dart │ │ │ ├── around_radius_all.dart │ │ │ ├── match_level.dart │ │ │ ├── task_status.dart │ │ │ ├── redirect_rule_index_data.g.dart │ │ │ ├── banner_link.g.dart │ │ │ ├── fbt_model.dart │ │ │ ├── get_recommendations_params.g.dart │ │ │ ├── redirect_url.g.dart │ │ │ ├── recommend_models.dart │ │ │ ├── trending_items_model.dart │ │ │ ├── trending_facets_model.dart │ │ │ ├── deleted_at_response.g.dart │ │ │ ├── alternatives_as_exact.dart │ │ │ ├── banner_image_url.g.dart │ │ │ ├── rule_metadata.g.dart │ │ │ ├── looking_similar_model.dart │ │ │ ├── related_model.dart │ │ │ ├── search_params_query.g.dart │ │ │ ├── range.g.dart │ │ │ ├── banner_link.dart │ │ │ ├── error_base.g.dart │ │ │ ├── redirect_url.dart │ │ │ ├── condition.g.dart │ │ │ ├── recommend_updated_at_response.g.dart │ │ │ ├── time_range.g.dart │ │ │ ├── banner_image_url.dart │ │ │ └── hide_consequence_object.g.dart │ ├── build.yaml │ ├── test │ │ └── version_test.dart │ └── pubspec.yaml ├── client_abtesting_v3 │ ├── lib │ │ └── src │ │ │ ├── extension.dart │ │ │ ├── version.dart │ │ │ └── model │ │ │ ├── custom_search_params.g.dart │ │ │ ├── direction.dart │ │ │ ├── error_correction_type.dart │ │ │ ├── error_base.g.dart │ │ │ ├── ab_test_response.g.dart │ │ │ └── effect_metric.dart │ ├── build.yaml │ ├── example │ │ └── example.dart │ ├── test │ │ └── version_test.dart │ └── pubspec.yaml ├── client_composition │ ├── lib │ │ └── src │ │ │ ├── extension.dart │ │ │ ├── version.dart │ │ │ └── model │ │ │ ├── main.g.dart │ │ │ ├── boolean_string.dart │ │ │ ├── task_id_response.g.dart │ │ │ ├── action.dart │ │ │ ├── external_ordering.dart │ │ │ ├── search_source.g.dart │ │ │ ├── advanced_syntax_features.dart │ │ │ ├── around_radius_all.dart │ │ │ ├── match_level.dart │ │ │ ├── task_status.dart │ │ │ ├── delete_composition_action.g.dart │ │ │ ├── redirect_rule_index_data.g.dart │ │ │ ├── multiple_batch_response.g.dart │ │ │ ├── banner_link.g.dart │ │ │ ├── composition_behavior.g.dart │ │ │ ├── external_source.g.dart │ │ │ ├── rules_multiple_batch_response.g.dart │ │ │ ├── composition_run_applied_rules.g.dart │ │ │ ├── redirect_url.g.dart │ │ │ ├── composition_source.g.dart │ │ │ ├── delete_composition_rule_action.g.dart │ │ │ ├── alternatives_as_exact.dart │ │ │ ├── banner_image_url.g.dart │ │ │ ├── facet_hits.g.dart │ │ │ ├── get_task_response.g.dart │ │ │ ├── batch_params.g.dart │ │ │ ├── composition_rule_consequence.g.dart │ │ │ ├── banner_link.dart │ │ │ ├── range.g.dart │ │ │ ├── deduplication.g.dart │ │ │ ├── error_base.g.dart │ │ │ ├── search_results.g.dart │ │ │ ├── redirect_url.dart │ │ │ ├── time_range.g.dart │ │ │ └── banner_image_url.dart │ ├── build.yaml │ ├── example │ │ └── example.dart │ ├── test │ │ └── version_test.dart │ └── pubspec.yaml ├── client_realtime_personalization │ ├── lib │ │ └── src │ │ │ └── extension.dart │ └── build.yaml ├── algoliasearch │ ├── lib │ │ ├── src │ │ │ ├── version.dart │ │ │ └── model │ │ │ │ ├── boolean_string.dart │ │ │ │ ├── edit_type.dart │ │ │ │ ├── search_responses.g.dart │ │ │ │ ├── recommendations_hits.g.dart │ │ │ │ ├── advanced_syntax_features.dart │ │ │ │ ├── around_radius_all.dart │ │ │ │ ├── match_level.dart │ │ │ │ ├── cursor.g.dart │ │ │ │ ├── redirect_rule_index_data.g.dart │ │ │ │ ├── banner_link.g.dart │ │ │ │ ├── fbt_model.dart │ │ │ │ ├── get_recommendations_params.g.dart │ │ │ │ ├── redirect_url.g.dart │ │ │ │ ├── trending_items_model.dart │ │ │ │ ├── mode.dart │ │ │ │ ├── trending_facets_model.dart │ │ │ │ ├── with_primary.g.dart │ │ │ │ ├── alternatives_as_exact.dart │ │ │ │ ├── banner_image_url.g.dart │ │ │ │ ├── facet_hits.g.dart │ │ │ │ ├── search_type_facet.dart │ │ │ │ ├── looking_similar_model.dart │ │ │ │ ├── search_type_default.dart │ │ │ │ ├── related_model.dart │ │ │ │ ├── search_params_query.g.dart │ │ │ │ ├── base_get_api_key_response.g.dart │ │ │ │ ├── search_params_string.g.dart │ │ │ │ ├── banner_link.dart │ │ │ │ ├── range.g.dart │ │ │ │ ├── error_base.g.dart │ │ │ │ ├── redirect_url.dart │ │ │ │ ├── search_strategy.dart │ │ │ │ ├── banner_image_url.dart │ │ │ │ └── semantic_search.g.dart │ │ └── algoliasearch.dart │ ├── build.yaml │ ├── test │ │ └── version_test.dart │ └── pubspec.yaml └── client_search │ ├── lib │ └── src │ │ ├── version.dart │ │ ├── extension.dart │ │ └── model │ │ ├── boolean_string.dart │ │ ├── consequence_hide.g.dart │ │ ├── edit_type.dart │ │ ├── log_type.dart │ │ ├── scope_type.dart │ │ ├── search_responses.g.dart │ │ ├── assign_user_id_params.g.dart │ │ ├── created_at_response.g.dart │ │ ├── api_key_operation.dart │ │ ├── event_type.dart │ │ ├── operation_type.dart │ │ ├── dictionary_type.dart │ │ ├── dictionary_action.dart │ │ ├── advanced_syntax_features.dart │ │ ├── around_radius_all.dart │ │ ├── match_level.dart │ │ ├── delete_source_response.g.dart │ │ ├── delete_api_key_response.g.dart │ │ ├── dictionary_entry_state.dart │ │ ├── remove_user_id_response.g.dart │ │ ├── replace_source_response.g.dart │ │ ├── task_status.dart │ │ ├── cursor.g.dart │ │ ├── redirect_rule_index_data.g.dart │ │ ├── event_status.dart │ │ ├── banner_link.g.dart │ │ ├── add_api_key_response.g.dart │ │ ├── redirect_url.g.dart │ │ ├── promote_object_id.g.dart │ │ ├── dictionary_entry_type.dart │ │ ├── list_clusters_response.g.dart │ │ ├── mode.dart │ │ ├── deleted_at_response.g.dart │ │ ├── updated_at_response.g.dart │ │ ├── with_primary.g.dart │ │ ├── facets.g.dart │ │ ├── alternatives_as_exact.dart │ │ ├── banner_image_url.g.dart │ │ ├── batch_response.g.dart │ │ ├── facet_hits.g.dart │ │ ├── search_type_facet.dart │ │ ├── update_api_key_response.g.dart │ │ ├── get_logs_response.g.dart │ │ ├── search_type_default.dart │ │ ├── get_task_response.g.dart │ │ ├── search_params_query.g.dart │ │ ├── batch_params.g.dart │ │ ├── base_get_api_key_response.g.dart │ │ ├── promote_object_ids.g.dart │ │ ├── search_params_string.g.dart │ │ ├── banner_link.dart │ │ ├── batch_write_params.g.dart │ │ ├── range.g.dart │ │ ├── error_base.g.dart │ │ ├── redirect_url.dart │ │ ├── source.g.dart │ │ ├── dictionary_settings_params.g.dart │ │ ├── built_in_operation_type.dart │ │ ├── search_strategy.dart │ │ ├── list_user_ids_response.g.dart │ │ ├── time_range.g.dart │ │ ├── get_objects_params.g.dart │ │ ├── banner_image_url.dart │ │ └── semantic_search.g.dart │ ├── build.yaml │ ├── test │ └── version_test.dart │ └── pubspec.yaml ├── pubspec.yaml ├── analysis_options.yaml ├── sync.sh ├── .gitignore └── .github └── workflows └── do-not-edit-this-repository.yml /CHANGELOG.md: -------------------------------------------------------------------------------- 1 | packages/algoliasearch/CHANGELOG.md -------------------------------------------------------------------------------- /packages/client_core/lib/src/extension.dart: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /packages/client_insights/lib/src/extension.dart: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /packages/client_recommend/lib/src/extension.dart: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /packages/client_abtesting_v3/lib/src/extension.dart: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /packages/client_composition/lib/src/extension.dart: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /packages/client_realtime_personalization/lib/src/extension.dart: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /packages/algoliasearch/lib/src/version.dart: -------------------------------------------------------------------------------- 1 | /// Current package version 2 | const packageVersion = '1.43.0'; 3 | -------------------------------------------------------------------------------- /packages/client_core/lib/src/version.dart: -------------------------------------------------------------------------------- 1 | /// Current package version 2 | const packageVersion = '1.43.0'; 3 | -------------------------------------------------------------------------------- /packages/client_search/lib/src/version.dart: -------------------------------------------------------------------------------- 1 | /// Current package version 2 | const packageVersion = '1.43.0'; 3 | -------------------------------------------------------------------------------- /packages/client_abtesting_v3/lib/src/version.dart: -------------------------------------------------------------------------------- 1 | /// Current package version 2 | const packageVersion = '1.43.0'; 3 | -------------------------------------------------------------------------------- /packages/client_composition/lib/src/version.dart: -------------------------------------------------------------------------------- 1 | /// Current package version 2 | const packageVersion = '1.43.0'; 3 | -------------------------------------------------------------------------------- /packages/client_insights/lib/src/version.dart: -------------------------------------------------------------------------------- 1 | /// Current package version 2 | const packageVersion = '1.43.0'; 3 | -------------------------------------------------------------------------------- /packages/client_recommend/lib/src/version.dart: -------------------------------------------------------------------------------- 1 | /// Current package version 2 | const packageVersion = '1.43.0'; 3 | -------------------------------------------------------------------------------- /packages/client_search/lib/src/extension.dart: -------------------------------------------------------------------------------- 1 | export 'extension/search.dart'; 2 | export 'extension/wait_task.dart'; 3 | -------------------------------------------------------------------------------- /pubspec.yaml: -------------------------------------------------------------------------------- 1 | name: algolia_client_workspace 2 | 3 | environment: 4 | sdk: '>=3.0.0 <4.0.0' 5 | 6 | dev_dependencies: 7 | lints: ^6.0.0 8 | melos: ^6.0.0 9 | -------------------------------------------------------------------------------- /analysis_options.yaml: -------------------------------------------------------------------------------- 1 | include: package:lints/recommended.yaml 2 | 3 | linter: 4 | rules: 5 | deprecated_member_use_from_same_package: false 6 | 7 | analyzer: 8 | exclude: 9 | - "**/*.g.dart" 10 | errors: 11 | deprecated_member_use_from_same_package: ignore 12 | -------------------------------------------------------------------------------- /packages/algoliasearch/lib/algoliasearch.dart: -------------------------------------------------------------------------------- 1 | // Dart Algolia Search API client to interact with Algolia 2 | library; 3 | 4 | export 'package:algolia_client_insights/algolia_client_insights.dart' 5 | hide ErrorBase; 6 | export 'package:algolia_client_search/algolia_client_search.dart' 7 | hide ErrorBase; 8 | -------------------------------------------------------------------------------- /sync.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | if [[ "$(uname)" == "Darwin" ]]; then 4 | sed_arg=('-i' '' '-e') 5 | else 6 | sed_arg=('-i' '-e') 7 | fi 8 | 9 | for dir in packages/*/ ; do 10 | dir=${dir%/} 11 | version=$(grep "^version:" "${dir}/pubspec.yaml" | sed 's/version: //') 12 | sed "${sed_arg[@]}" "s/^const packageVersion = .*;$/const packageVersion = '$version';/" "${dir}/lib/src/version.dart"; 13 | done 14 | -------------------------------------------------------------------------------- /packages/algoliasearch/build.yaml: -------------------------------------------------------------------------------- 1 | targets: 2 | $default: 3 | builders: 4 | json_serializable: 5 | options: 6 | any_map: false 7 | checked: true 8 | create_factory: true 9 | create_to_json: true 10 | disallow_unrecognized_keys: false 11 | explicit_to_json: true 12 | field_rename: none 13 | ignore_unannotated: false 14 | include_if_null: false -------------------------------------------------------------------------------- /packages/client_insights/build.yaml: -------------------------------------------------------------------------------- 1 | targets: 2 | $default: 3 | builders: 4 | json_serializable: 5 | options: 6 | any_map: false 7 | checked: true 8 | create_factory: true 9 | create_to_json: true 10 | disallow_unrecognized_keys: false 11 | explicit_to_json: true 12 | field_rename: none 13 | ignore_unannotated: false 14 | include_if_null: false -------------------------------------------------------------------------------- /packages/client_search/build.yaml: -------------------------------------------------------------------------------- 1 | targets: 2 | $default: 3 | builders: 4 | json_serializable: 5 | options: 6 | any_map: false 7 | checked: true 8 | create_factory: true 9 | create_to_json: true 10 | disallow_unrecognized_keys: false 11 | explicit_to_json: true 12 | field_rename: none 13 | ignore_unannotated: false 14 | include_if_null: false -------------------------------------------------------------------------------- /packages/client_abtesting_v3/build.yaml: -------------------------------------------------------------------------------- 1 | targets: 2 | $default: 3 | builders: 4 | json_serializable: 5 | options: 6 | any_map: false 7 | checked: true 8 | create_factory: true 9 | create_to_json: true 10 | disallow_unrecognized_keys: false 11 | explicit_to_json: true 12 | field_rename: none 13 | ignore_unannotated: false 14 | include_if_null: false -------------------------------------------------------------------------------- /packages/client_composition/build.yaml: -------------------------------------------------------------------------------- 1 | targets: 2 | $default: 3 | builders: 4 | json_serializable: 5 | options: 6 | any_map: false 7 | checked: true 8 | create_factory: true 9 | create_to_json: true 10 | disallow_unrecognized_keys: false 11 | explicit_to_json: true 12 | field_rename: none 13 | ignore_unannotated: false 14 | include_if_null: false -------------------------------------------------------------------------------- /packages/client_recommend/build.yaml: -------------------------------------------------------------------------------- 1 | targets: 2 | $default: 3 | builders: 4 | json_serializable: 5 | options: 6 | any_map: false 7 | checked: true 8 | create_factory: true 9 | create_to_json: true 10 | disallow_unrecognized_keys: false 11 | explicit_to_json: true 12 | field_rename: none 13 | ignore_unannotated: false 14 | include_if_null: false -------------------------------------------------------------------------------- /packages/client_realtime_personalization/build.yaml: -------------------------------------------------------------------------------- 1 | targets: 2 | $default: 3 | builders: 4 | json_serializable: 5 | options: 6 | any_map: false 7 | checked: true 8 | create_factory: true 9 | create_to_json: true 10 | disallow_unrecognized_keys: false 11 | explicit_to_json: true 12 | field_rename: none 13 | ignore_unannotated: false 14 | include_if_null: false 15 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # Files and directories created by pub 2 | .dart_tool/ 3 | .buildlog 4 | .packages 5 | .project 6 | .pub/ 7 | build/ 8 | 9 | # Files created by dart2js 10 | *.dart.js 11 | *.part.js 12 | *.js.deps 13 | *.js.map 14 | *.info.json 15 | 16 | # Directory created by dartdoc 17 | doc/api/ 18 | 19 | # Don't commit pubspec lock file 20 | pubspec.lock 21 | 22 | # IntelliJ 23 | .idea 24 | *.iml 25 | *.ipr 26 | *.iws 27 | 28 | 29 | # Melos 30 | pubspec_overrides.yaml 31 | -------------------------------------------------------------------------------- /packages/client_core/lib/src/transport/dio/platform/platform_stub.dart: -------------------------------------------------------------------------------- 1 | import 'package:algolia_client_core/src/config/agent_segment.dart'; 2 | import 'package:algolia_client_core/src/transport/algolia_agent.dart'; 3 | import 'package:dio/dio.dart' as dio; 4 | 5 | /// [AgentSegment]s for unsupported platforms. 6 | Iterable platformAgentSegments() => const []; 7 | 8 | /// [AlgoliaAgent] for unsupported platforms. 9 | void platformAlgoliaAgent(dio.RequestOptions options, String agent) { 10 | // NO-OP. 11 | } 12 | -------------------------------------------------------------------------------- /packages/client_core/lib/src/api_client.dart: -------------------------------------------------------------------------------- 1 | import 'package:algolia_client_core/src/config/client_options.dart'; 2 | 3 | /// An abstract class representing an API client with specific properties and options. 4 | abstract interface class ApiClient { 5 | /// A set of custom client options to configure the behavior of the API client. 6 | ClientOptions get options; 7 | 8 | /// Allow switching the API key used to authenticate requests. 9 | void setClientApiKey({required String apiKey}); 10 | 11 | /// Dispose of underlying resources. 12 | void dispose(); 13 | } 14 | -------------------------------------------------------------------------------- /packages/client_abtesting_v3/example/example.dart: -------------------------------------------------------------------------------- 1 | import 'package:algolia_client_abtesting_v3/algolia_client_abtesting_v3.dart'; 2 | 3 | void main() async { 4 | // Creating an instance of the Abtesting V3 client with the provided App ID and API key. 5 | final abtesting = AbtestingV3Client( 6 | appId: 'latency', 7 | apiKey: '6be0576ff61c053d5f9a3225e2a90f76', 8 | region: 'us', 9 | ); 10 | 11 | await abtesting.getABTest( 12 | id: 123, 13 | ); 14 | 15 | // Close the client and dispose of all underlying resources. 16 | abtesting.dispose(); 17 | } 18 | -------------------------------------------------------------------------------- /packages/client_core/pubspec.yaml: -------------------------------------------------------------------------------- 1 | name: algolia_client_core 2 | description: >- 3 | Algolia Client Core is a Dart package for seamless Algolia API integration, 4 | offering HTTP request handling, retry strategy, and robust exception 5 | management. 6 | version: 1.43.0 7 | homepage: https://www.algolia.com/doc/ 8 | repository: >- 9 | https://github.com/algolia/algoliasearch-client-dart/tree/main/packages/client_core 10 | environment: 11 | sdk: '>=3.0.0 <4.0.0' 12 | dependencies: 13 | dio: ^5.2.1 14 | web: ^1.1.1 15 | dev_dependencies: 16 | lints: ^6.0.0 17 | test: ^1.25.8 18 | -------------------------------------------------------------------------------- /packages/client_core/lib/src/transport/dio/platform/platform_web.dart: -------------------------------------------------------------------------------- 1 | import 'package:web/web.dart' as web; 2 | 3 | import 'package:algolia_client_core/src/config/agent_segment.dart'; 4 | import 'package:dio/dio.dart' as dio; 5 | 6 | /// [AgentSegment]s for web platforms. 7 | Iterable platformAgentSegments() => [ 8 | AgentSegment( 9 | value: 'Platform', 10 | version: 'Web ${web.window.navigator.platform}', 11 | ), 12 | ]; 13 | 14 | /// [AlgoliaAgent] for web platforms as query param. 15 | void platformAlgoliaAgent(dio.RequestOptions options, String agent) { 16 | options.queryParameters["x-algolia-agent"] = agent; 17 | } 18 | -------------------------------------------------------------------------------- /packages/client_composition/example/example.dart: -------------------------------------------------------------------------------- 1 | import 'package:algolia_client_composition/algolia_client_composition.dart'; 2 | 3 | void main() async { 4 | // Creating an instance of the Composition client with the provided App ID and API key. 5 | final composition = CompositionClient( 6 | appId: 'latency', 7 | apiKey: '6be0576ff61c053d5f9a3225e2a90f76', 8 | ); 9 | 10 | await composition.search( 11 | compositionID: "foo", 12 | requestBody: RequestBody( 13 | params: Params( 14 | query: "batman", 15 | ), 16 | ), 17 | ); 18 | 19 | // Close the client and dispose of all underlying resources. 20 | composition.dispose(); 21 | } 22 | -------------------------------------------------------------------------------- /packages/algoliasearch/test/version_test.dart: -------------------------------------------------------------------------------- 1 | import 'dart:io'; 2 | 3 | import 'package:algoliasearch/src/version.dart'; 4 | import 'package:test/test.dart'; 5 | 6 | void main() { 7 | if (Directory.current.path.endsWith('/test')) { 8 | Directory.current = Directory.current.parent; 9 | } 10 | test('package version matches pubspec', () { 11 | final pubspecPath = '${Directory.current.path}/pubspec.yaml'; 12 | final pubspec = File(pubspecPath).readAsStringSync(); 13 | final regex = RegExp('version:s*(.*)'); 14 | final match = regex.firstMatch(pubspec); 15 | expect(match, isNotNull); 16 | expect(packageVersion, match?.group(1)?.trim()); 17 | }); 18 | } 19 | -------------------------------------------------------------------------------- /packages/client_core/test/version_test.dart: -------------------------------------------------------------------------------- 1 | import 'dart:io'; 2 | 3 | import 'package:algolia_client_core/src/version.dart'; 4 | import 'package:test/test.dart'; 5 | 6 | void main() { 7 | if (Directory.current.path.endsWith('/test')) { 8 | Directory.current = Directory.current.parent; 9 | } 10 | test('package version matches pubspec', () { 11 | final pubspecPath = '${Directory.current.path}/pubspec.yaml'; 12 | final pubspec = File(pubspecPath).readAsStringSync(); 13 | final regex = RegExp('version:s*(.*)'); 14 | final match = regex.firstMatch(pubspec); 15 | expect(match, isNotNull); 16 | expect(packageVersion, match?.group(1)?.trim()); 17 | }); 18 | } 19 | -------------------------------------------------------------------------------- /packages/client_search/test/version_test.dart: -------------------------------------------------------------------------------- 1 | import 'dart:io'; 2 | 3 | import 'package:algolia_client_search/src/version.dart'; 4 | import 'package:test/test.dart'; 5 | 6 | void main() { 7 | if (Directory.current.path.endsWith('/test')) { 8 | Directory.current = Directory.current.parent; 9 | } 10 | test('package version matches pubspec', () { 11 | final pubspecPath = '${Directory.current.path}/pubspec.yaml'; 12 | final pubspec = File(pubspecPath).readAsStringSync(); 13 | final regex = RegExp('version:s*(.*)'); 14 | final match = regex.firstMatch(pubspec); 15 | expect(match, isNotNull); 16 | expect(packageVersion, match?.group(1)?.trim()); 17 | }); 18 | } 19 | -------------------------------------------------------------------------------- /packages/client_insights/test/version_test.dart: -------------------------------------------------------------------------------- 1 | import 'dart:io'; 2 | 3 | import 'package:algolia_client_insights/src/version.dart'; 4 | import 'package:test/test.dart'; 5 | 6 | void main() { 7 | if (Directory.current.path.endsWith('/test')) { 8 | Directory.current = Directory.current.parent; 9 | } 10 | test('package version matches pubspec', () { 11 | final pubspecPath = '${Directory.current.path}/pubspec.yaml'; 12 | final pubspec = File(pubspecPath).readAsStringSync(); 13 | final regex = RegExp('version:s*(.*)'); 14 | final match = regex.firstMatch(pubspec); 15 | expect(match, isNotNull); 16 | expect(packageVersion, match?.group(1)?.trim()); 17 | }); 18 | } 19 | -------------------------------------------------------------------------------- /packages/client_recommend/test/version_test.dart: -------------------------------------------------------------------------------- 1 | import 'dart:io'; 2 | 3 | import 'package:algolia_client_recommend/src/version.dart'; 4 | import 'package:test/test.dart'; 5 | 6 | void main() { 7 | if (Directory.current.path.endsWith('/test')) { 8 | Directory.current = Directory.current.parent; 9 | } 10 | test('package version matches pubspec', () { 11 | final pubspecPath = '${Directory.current.path}/pubspec.yaml'; 12 | final pubspec = File(pubspecPath).readAsStringSync(); 13 | final regex = RegExp('version:s*(.*)'); 14 | final match = regex.firstMatch(pubspec); 15 | expect(match, isNotNull); 16 | expect(packageVersion, match?.group(1)?.trim()); 17 | }); 18 | } 19 | -------------------------------------------------------------------------------- /packages/client_abtesting_v3/test/version_test.dart: -------------------------------------------------------------------------------- 1 | import 'dart:io'; 2 | 3 | import 'package:algolia_client_abtesting_v3/src/version.dart'; 4 | import 'package:test/test.dart'; 5 | 6 | void main() { 7 | if (Directory.current.path.endsWith('/test')) { 8 | Directory.current = Directory.current.parent; 9 | } 10 | test('package version matches pubspec', () { 11 | final pubspecPath = '${Directory.current.path}/pubspec.yaml'; 12 | final pubspec = File(pubspecPath).readAsStringSync(); 13 | final regex = RegExp('version:s*(.*)'); 14 | final match = regex.firstMatch(pubspec); 15 | expect(match, isNotNull); 16 | expect(packageVersion, match?.group(1)?.trim()); 17 | }); 18 | } 19 | -------------------------------------------------------------------------------- /packages/client_composition/test/version_test.dart: -------------------------------------------------------------------------------- 1 | import 'dart:io'; 2 | 3 | import 'package:algolia_client_composition/src/version.dart'; 4 | import 'package:test/test.dart'; 5 | 6 | void main() { 7 | if (Directory.current.path.endsWith('/test')) { 8 | Directory.current = Directory.current.parent; 9 | } 10 | test('package version matches pubspec', () { 11 | final pubspecPath = '${Directory.current.path}/pubspec.yaml'; 12 | final pubspec = File(pubspecPath).readAsStringSync(); 13 | final regex = RegExp('version:s*(.*)'); 14 | final match = regex.firstMatch(pubspec); 15 | expect(match, isNotNull); 16 | expect(packageVersion, match?.group(1)?.trim()); 17 | }); 18 | } 19 | -------------------------------------------------------------------------------- /packages/client_core/lib/src/transport/dio/platform/platform.dart: -------------------------------------------------------------------------------- 1 | import 'package:algolia_client_core/algolia_client_core.dart'; 2 | import 'package:dio/dio.dart' as dio; 3 | 4 | import 'platform_stub.dart' 5 | if (dart.library.html) 'platform_web.dart' 6 | if (dart.library.io) 'platform_io.dart'; 7 | 8 | final class Platform { 9 | /// Get [AgentSegment]s for the current platform. 10 | static Iterable agentSegments() => platformAgentSegments(); 11 | 12 | /// Set Algolia Agent as User-Agent or as query param depending on the platform. 13 | static void algoliaAgent(dio.RequestOptions options, String agent) => 14 | platformAlgoliaAgent(options, agent); 15 | 16 | Platform._(); 17 | } 18 | -------------------------------------------------------------------------------- /packages/client_core/lib/algolia_client_core.dart: -------------------------------------------------------------------------------- 1 | /// Core functionality for interacting with the Algolia API. 2 | /// 3 | /// This library provides the essential logic for configuring and executing 4 | /// HTTP requests to the Algolia API. It includes support for retry strategies 5 | /// and comprehensive exception handling. 6 | library; 7 | 8 | export 'src/algolia_exception.dart'; 9 | export 'src/api_client.dart'; 10 | export 'src/config/agent_segment.dart'; 11 | export 'src/config/client_options.dart'; 12 | export 'src/config/host.dart'; 13 | export 'src/transport/api_request.dart'; 14 | export 'src/transport/request_options.dart'; 15 | export 'src/transport/requester.dart'; 16 | export 'src/transport/retry_strategy.dart'; 17 | -------------------------------------------------------------------------------- /packages/client_search/pubspec.yaml: -------------------------------------------------------------------------------- 1 | name: algolia_client_search 2 | version: 1.43.0 3 | description: A sub-package of the AlgoliaSearch library, offering search-specific functionalities for enhanced search and discovery in Dart/Flutter apps. 4 | homepage: https://www.algolia.com/doc/ 5 | repository: https://github.com/algolia/algoliasearch-client-dart/tree/main/packages/client_search 6 | topics: 7 | - search 8 | - discovery 9 | 10 | environment: 11 | sdk: '>=3.0.0 <4.0.0' 12 | 13 | dependencies: 14 | algolia_client_core: ^1.43.0 15 | json_annotation: ^4.8.1 16 | collection: ^1.17.1 17 | 18 | dev_dependencies: 19 | build_runner: ^2.4.7 20 | json_serializable: '>=6.0.0 <6.9.0' 21 | lints: ^6.0.0 22 | logging: ^1.2.0 23 | test: ^1.25.8 -------------------------------------------------------------------------------- /packages/client_insights/pubspec.yaml: -------------------------------------------------------------------------------- 1 | name: algolia_client_insights 2 | version: 1.43.0 3 | description: A sub-package of the AlgoliaSearch library, offering insights-specific functionalities for enhanced search and discovery in Dart/Flutter apps. 4 | homepage: https://www.algolia.com/doc/ 5 | repository: https://github.com/algolia/algoliasearch-client-dart/tree/main/packages/client_insights 6 | topics: 7 | - search 8 | - discovery 9 | 10 | environment: 11 | sdk: '>=3.0.0 <4.0.0' 12 | 13 | dependencies: 14 | algolia_client_core: ^1.43.0 15 | json_annotation: ^4.8.1 16 | collection: ^1.17.1 17 | 18 | dev_dependencies: 19 | build_runner: ^2.4.7 20 | json_serializable: '>=6.0.0 <6.9.0' 21 | lints: ^6.0.0 22 | logging: ^1.2.0 23 | test: ^1.25.8 -------------------------------------------------------------------------------- /packages/client_recommend/pubspec.yaml: -------------------------------------------------------------------------------- 1 | name: algolia_client_recommend 2 | version: 1.43.0 3 | description: A sub-package of the AlgoliaSearch library, offering recommend-specific functionalities for enhanced search and discovery in Dart/Flutter apps. 4 | homepage: https://www.algolia.com/doc/ 5 | repository: https://github.com/algolia/algoliasearch-client-dart/tree/main/packages/client_recommend 6 | topics: 7 | - search 8 | - discovery 9 | 10 | environment: 11 | sdk: '>=3.0.0 <4.0.0' 12 | 13 | dependencies: 14 | algolia_client_core: ^1.43.0 15 | json_annotation: ^4.8.1 16 | collection: ^1.17.1 17 | 18 | dev_dependencies: 19 | build_runner: ^2.4.7 20 | json_serializable: '>=6.0.0 <6.9.0' 21 | lints: ^6.0.0 22 | logging: ^1.2.0 23 | test: ^1.25.8 -------------------------------------------------------------------------------- /packages/client_composition/pubspec.yaml: -------------------------------------------------------------------------------- 1 | name: algolia_client_composition 2 | version: 1.43.0 3 | description: A sub-package of the AlgoliaSearch library, offering composition-specific functionalities for enhanced search and discovery in Dart/Flutter apps. 4 | homepage: https://www.algolia.com/doc/ 5 | repository: https://github.com/algolia/algoliasearch-client-dart/tree/main/packages/client_composition 6 | topics: 7 | - search 8 | - discovery 9 | 10 | environment: 11 | sdk: '>=3.0.0 <4.0.0' 12 | 13 | dependencies: 14 | algolia_client_core: ^1.43.0 15 | json_annotation: ^4.8.1 16 | collection: ^1.17.1 17 | 18 | dev_dependencies: 19 | build_runner: ^2.4.7 20 | json_serializable: '>=6.0.0 <6.9.0' 21 | lints: ^6.0.0 22 | logging: ^1.2.0 23 | test: ^1.25.8 -------------------------------------------------------------------------------- /packages/client_abtesting_v3/pubspec.yaml: -------------------------------------------------------------------------------- 1 | name: algolia_client_abtesting_v3 2 | version: 1.43.0 3 | description: A sub-package of the AlgoliaSearch library, offering abtesting v3-specific functionalities for enhanced search and discovery in Dart/Flutter apps. 4 | homepage: https://www.algolia.com/doc/ 5 | repository: https://github.com/algolia/algoliasearch-client-dart/tree/main/packages/client_abtesting_v3 6 | topics: 7 | - search 8 | - discovery 9 | 10 | environment: 11 | sdk: '>=3.0.0 <4.0.0' 12 | 13 | dependencies: 14 | algolia_client_core: ^1.43.0 15 | json_annotation: ^4.8.1 16 | collection: ^1.17.1 17 | 18 | dev_dependencies: 19 | build_runner: ^2.4.7 20 | json_serializable: '>=6.0.0 <6.9.0' 21 | lints: ^6.0.0 22 | logging: ^1.2.0 23 | test: ^1.25.8 -------------------------------------------------------------------------------- /packages/client_core/lib/src/transport/dio/platform/platform_io.dart: -------------------------------------------------------------------------------- 1 | import 'dart:io' as io; 2 | 3 | import 'package:algolia_client_core/src/config/agent_segment.dart'; 4 | import 'package:dio/dio.dart' as dio; 5 | 6 | /// [AgentSegment]s for native platforms. 7 | Iterable platformAgentSegments() => [ 8 | AgentSegment( 9 | value: 'Dart', 10 | version: io.Platform.version, 11 | ), 12 | AgentSegment( 13 | value: io.Platform.operatingSystem, 14 | version: io.Platform.operatingSystemVersion, 15 | ), 16 | ]; 17 | 18 | /// [AlgoliaAgent] for native platforms as user-agent. 19 | void platformAlgoliaAgent(dio.RequestOptions options, String agent) { 20 | options.headers.addAll({"user-agent": agent}); 21 | } 22 | -------------------------------------------------------------------------------- /packages/algoliasearch/pubspec.yaml: -------------------------------------------------------------------------------- 1 | name: algoliasearch 2 | version: 1.43.0 3 | description: A Dart package for Algolia. Enables seamless integration for instant search, typo tolerance & user insights, and more, in Dart/Flutter apps. 4 | homepage: https://www.algolia.com/doc/ 5 | repository: https://github.com/algolia/algoliasearch-client-dart/tree/main/packages/algoliasearch 6 | topics: 7 | - search 8 | - discovery 9 | 10 | environment: 11 | sdk: '>=3.0.0 <4.0.0' 12 | 13 | dependencies: 14 | algolia_client_core: ^1.43.0 15 | algolia_client_search: ^1.43.0 16 | algolia_client_insights: ^1.43.0 17 | json_annotation: ^4.8.1 18 | collection: ^1.17.1 19 | 20 | dev_dependencies: 21 | build_runner: ^2.4.7 22 | json_serializable: '>=6.0.0 <6.9.0' 23 | lints: ^6.0.0 24 | logging: ^1.2.0 25 | test: ^1.25.8 -------------------------------------------------------------------------------- /packages/client_insights/lib/src/model/view_event.dart: -------------------------------------------------------------------------------- 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 | // ignore_for_file: unused_element 3 | import 'package:json_annotation/json_annotation.dart'; 4 | 5 | @JsonEnum(valueField: 'raw') 6 | enum ViewEvent { 7 | view(r'view'); 8 | 9 | const ViewEvent(this.raw); 10 | final dynamic raw; 11 | 12 | dynamic toJson() => raw; 13 | 14 | static ViewEvent fromJson(dynamic json) { 15 | for (final value in values) { 16 | if (value.raw == json) return value; 17 | } 18 | throw ArgumentError.value(json, "raw", "No enum value with that value"); 19 | } 20 | 21 | @override 22 | String toString() => raw.toString(); 23 | } 24 | -------------------------------------------------------------------------------- /packages/client_composition/lib/src/model/main.g.dart: -------------------------------------------------------------------------------- 1 | // GENERATED CODE - DO NOT MODIFY BY HAND 2 | 3 | part of 'main.dart'; 4 | 5 | // ************************************************************************** 6 | // JsonSerializableGenerator 7 | // ************************************************************************** 8 | 9 | Main _$MainFromJson(Map json) => $checkedCreate( 10 | 'Main', 11 | json, 12 | ($checkedConvert) { 13 | final val = Main( 14 | source: $checkedConvert('source', 15 | (v) => CompositionSource.fromJson(v as Map)), 16 | ); 17 | return val; 18 | }, 19 | ); 20 | 21 | Map _$MainToJson(Main instance) => { 22 | 'source': instance.source.toJson(), 23 | }; 24 | -------------------------------------------------------------------------------- /packages/client_insights/lib/src/model/click_event.dart: -------------------------------------------------------------------------------- 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 | // ignore_for_file: unused_element 3 | import 'package:json_annotation/json_annotation.dart'; 4 | 5 | @JsonEnum(valueField: 'raw') 6 | enum ClickEvent { 7 | click(r'click'); 8 | 9 | const ClickEvent(this.raw); 10 | final dynamic raw; 11 | 12 | dynamic toJson() => raw; 13 | 14 | static ClickEvent fromJson(dynamic json) { 15 | for (final value in values) { 16 | if (value.raw == json) return value; 17 | } 18 | throw ArgumentError.value(json, "raw", "No enum value with that value"); 19 | } 20 | 21 | @override 22 | String toString() => raw.toString(); 23 | } 24 | -------------------------------------------------------------------------------- /packages/client_insights/lib/src/model/purchase_event.dart: -------------------------------------------------------------------------------- 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 | // ignore_for_file: unused_element 3 | import 'package:json_annotation/json_annotation.dart'; 4 | 5 | @JsonEnum(valueField: 'raw') 6 | enum PurchaseEvent { 7 | purchase(r'purchase'); 8 | 9 | const PurchaseEvent(this.raw); 10 | final dynamic raw; 11 | 12 | dynamic toJson() => raw; 13 | 14 | static PurchaseEvent fromJson(dynamic json) { 15 | for (final value in values) { 16 | if (value.raw == json) return value; 17 | } 18 | throw ArgumentError.value(json, "raw", "No enum value with that value"); 19 | } 20 | 21 | @override 22 | String toString() => raw.toString(); 23 | } 24 | -------------------------------------------------------------------------------- /packages/client_insights/lib/src/model/add_to_cart_event.dart: -------------------------------------------------------------------------------- 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 | // ignore_for_file: unused_element 3 | import 'package:json_annotation/json_annotation.dart'; 4 | 5 | @JsonEnum(valueField: 'raw') 6 | enum AddToCartEvent { 7 | addToCart(r'addToCart'); 8 | 9 | const AddToCartEvent(this.raw); 10 | final dynamic raw; 11 | 12 | dynamic toJson() => raw; 13 | 14 | static AddToCartEvent fromJson(dynamic json) { 15 | for (final value in values) { 16 | if (value.raw == json) return value; 17 | } 18 | throw ArgumentError.value(json, "raw", "No enum value with that value"); 19 | } 20 | 21 | @override 22 | String toString() => raw.toString(); 23 | } 24 | -------------------------------------------------------------------------------- /packages/client_insights/lib/src/model/conversion_event.dart: -------------------------------------------------------------------------------- 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 | // ignore_for_file: unused_element 3 | import 'package:json_annotation/json_annotation.dart'; 4 | 5 | @JsonEnum(valueField: 'raw') 6 | enum ConversionEvent { 7 | conversion(r'conversion'); 8 | 9 | const ConversionEvent(this.raw); 10 | final dynamic raw; 11 | 12 | dynamic toJson() => raw; 13 | 14 | static ConversionEvent fromJson(dynamic json) { 15 | for (final value in values) { 16 | if (value.raw == json) return value; 17 | } 18 | throw ArgumentError.value(json, "raw", "No enum value with that value"); 19 | } 20 | 21 | @override 22 | String toString() => raw.toString(); 23 | } 24 | -------------------------------------------------------------------------------- /packages/algoliasearch/lib/src/model/boolean_string.dart: -------------------------------------------------------------------------------- 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 | // ignore_for_file: unused_element 3 | import 'package:json_annotation/json_annotation.dart'; 4 | 5 | @JsonEnum(valueField: 'raw') 6 | enum BooleanString { 7 | true_(r'true'), 8 | false_(r'false'); 9 | 10 | const BooleanString(this.raw); 11 | final dynamic raw; 12 | 13 | dynamic toJson() => raw; 14 | 15 | static BooleanString fromJson(dynamic json) { 16 | for (final value in values) { 17 | if (value.raw == json) return value; 18 | } 19 | throw ArgumentError.value(json, "raw", "No enum value with that value"); 20 | } 21 | 22 | @override 23 | String toString() => raw.toString(); 24 | } 25 | -------------------------------------------------------------------------------- /packages/client_search/lib/src/model/boolean_string.dart: -------------------------------------------------------------------------------- 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 | // ignore_for_file: unused_element 3 | import 'package:json_annotation/json_annotation.dart'; 4 | 5 | @JsonEnum(valueField: 'raw') 6 | enum BooleanString { 7 | true_(r'true'), 8 | false_(r'false'); 9 | 10 | const BooleanString(this.raw); 11 | final dynamic raw; 12 | 13 | dynamic toJson() => raw; 14 | 15 | static BooleanString fromJson(dynamic json) { 16 | for (final value in values) { 17 | if (value.raw == json) return value; 18 | } 19 | throw ArgumentError.value(json, "raw", "No enum value with that value"); 20 | } 21 | 22 | @override 23 | String toString() => raw.toString(); 24 | } 25 | -------------------------------------------------------------------------------- /packages/client_composition/lib/src/model/boolean_string.dart: -------------------------------------------------------------------------------- 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 | // ignore_for_file: unused_element 3 | import 'package:json_annotation/json_annotation.dart'; 4 | 5 | @JsonEnum(valueField: 'raw') 6 | enum BooleanString { 7 | true_(r'true'), 8 | false_(r'false'); 9 | 10 | const BooleanString(this.raw); 11 | final dynamic raw; 12 | 13 | dynamic toJson() => raw; 14 | 15 | static BooleanString fromJson(dynamic json) { 16 | for (final value in values) { 17 | if (value.raw == json) return value; 18 | } 19 | throw ArgumentError.value(json, "raw", "No enum value with that value"); 20 | } 21 | 22 | @override 23 | String toString() => raw.toString(); 24 | } 25 | -------------------------------------------------------------------------------- /packages/client_composition/lib/src/model/task_id_response.g.dart: -------------------------------------------------------------------------------- 1 | // GENERATED CODE - DO NOT MODIFY BY HAND 2 | 3 | part of 'task_id_response.dart'; 4 | 5 | // ************************************************************************** 6 | // JsonSerializableGenerator 7 | // ************************************************************************** 8 | 9 | TaskIDResponse _$TaskIDResponseFromJson(Map json) => 10 | $checkedCreate( 11 | 'TaskIDResponse', 12 | json, 13 | ($checkedConvert) { 14 | final val = TaskIDResponse( 15 | taskID: $checkedConvert('taskID', (v) => (v as num).toInt()), 16 | ); 17 | return val; 18 | }, 19 | ); 20 | 21 | Map _$TaskIDResponseToJson(TaskIDResponse instance) => 22 | { 23 | 'taskID': instance.taskID, 24 | }; 25 | -------------------------------------------------------------------------------- /packages/client_recommend/lib/src/model/boolean_string.dart: -------------------------------------------------------------------------------- 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 | // ignore_for_file: unused_element 3 | import 'package:json_annotation/json_annotation.dart'; 4 | 5 | @JsonEnum(valueField: 'raw') 6 | enum BooleanString { 7 | true_(r'true'), 8 | false_(r'false'); 9 | 10 | const BooleanString(this.raw); 11 | final dynamic raw; 12 | 13 | dynamic toJson() => raw; 14 | 15 | static BooleanString fromJson(dynamic json) { 16 | for (final value in values) { 17 | if (value.raw == json) return value; 18 | } 19 | throw ArgumentError.value(json, "raw", "No enum value with that value"); 20 | } 21 | 22 | @override 23 | String toString() => raw.toString(); 24 | } 25 | -------------------------------------------------------------------------------- /packages/algoliasearch/lib/src/model/edit_type.dart: -------------------------------------------------------------------------------- 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 | // ignore_for_file: unused_element 3 | import 'package:json_annotation/json_annotation.dart'; 4 | 5 | /// Type of edit. 6 | @JsonEnum(valueField: 'raw') 7 | enum EditType { 8 | remove(r'remove'), 9 | replace(r'replace'); 10 | 11 | const EditType(this.raw); 12 | final dynamic raw; 13 | 14 | dynamic toJson() => raw; 15 | 16 | static EditType fromJson(dynamic json) { 17 | for (final value in values) { 18 | if (value.raw == json) return value; 19 | } 20 | throw ArgumentError.value(json, "raw", "No enum value with that value"); 21 | } 22 | 23 | @override 24 | String toString() => raw.toString(); 25 | } 26 | -------------------------------------------------------------------------------- /packages/client_core/lib/src/config/agent_segment.dart: -------------------------------------------------------------------------------- 1 | /// Represents a segment of algolia agent header. 2 | final class AgentSegment { 3 | /// Segment string value 4 | final String value; 5 | 6 | /// Optional version 7 | final String? version; 8 | 9 | /// Constructs an [AgentSegment] instance. 10 | const AgentSegment({ 11 | required this.value, 12 | this.version, 13 | }); 14 | 15 | @override 16 | bool operator ==(Object other) => 17 | identical(this, other) || 18 | other is AgentSegment && 19 | runtimeType == other.runtimeType && 20 | value == other.value && 21 | version == other.version; 22 | 23 | @override 24 | int get hashCode => value.hashCode ^ version.hashCode; 25 | 26 | @override 27 | String toString() { 28 | return 'AgentSegment{value: $value, version: $version}'; 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /packages/client_insights/lib/src/model/insights_events.g.dart: -------------------------------------------------------------------------------- 1 | // GENERATED CODE - DO NOT MODIFY BY HAND 2 | 3 | part of 'insights_events.dart'; 4 | 5 | // ************************************************************************** 6 | // JsonSerializableGenerator 7 | // ************************************************************************** 8 | 9 | InsightsEvents _$InsightsEventsFromJson(Map json) => 10 | $checkedCreate( 11 | 'InsightsEvents', 12 | json, 13 | ($checkedConvert) { 14 | final val = InsightsEvents( 15 | events: $checkedConvert('events', (v) => v as List), 16 | ); 17 | return val; 18 | }, 19 | ); 20 | 21 | Map _$InsightsEventsToJson(InsightsEvents instance) => 22 | { 23 | 'events': instance.events.toList(), 24 | }; 25 | -------------------------------------------------------------------------------- /packages/client_search/lib/src/model/consequence_hide.g.dart: -------------------------------------------------------------------------------- 1 | // GENERATED CODE - DO NOT MODIFY BY HAND 2 | 3 | part of 'consequence_hide.dart'; 4 | 5 | // ************************************************************************** 6 | // JsonSerializableGenerator 7 | // ************************************************************************** 8 | 9 | ConsequenceHide _$ConsequenceHideFromJson(Map json) => 10 | $checkedCreate( 11 | 'ConsequenceHide', 12 | json, 13 | ($checkedConvert) { 14 | final val = ConsequenceHide( 15 | objectID: $checkedConvert('objectID', (v) => v as String), 16 | ); 17 | return val; 18 | }, 19 | ); 20 | 21 | Map _$ConsequenceHideToJson(ConsequenceHide instance) => 22 | { 23 | 'objectID': instance.objectID, 24 | }; 25 | -------------------------------------------------------------------------------- /packages/client_search/lib/src/model/edit_type.dart: -------------------------------------------------------------------------------- 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 | // ignore_for_file: unused_element 3 | import 'package:json_annotation/json_annotation.dart'; 4 | 5 | /// Type of edit. 6 | @JsonEnum(valueField: 'raw') 7 | enum EditType { 8 | remove(r'remove'), 9 | replace(r'replace'); 10 | 11 | const EditType(this.raw); 12 | final dynamic raw; 13 | 14 | dynamic toJson() => raw; 15 | 16 | static EditType fromJson(dynamic json) { 17 | for (final value in values) { 18 | if (value.raw == json) return value; 19 | } 20 | throw ArgumentError.value(json, "raw", "No enum value with that value"); 21 | } 22 | 23 | @override 24 | String toString() => raw.toString(); 25 | } 26 | -------------------------------------------------------------------------------- /packages/algoliasearch/lib/src/model/search_responses.g.dart: -------------------------------------------------------------------------------- 1 | // GENERATED CODE - DO NOT MODIFY BY HAND 2 | 3 | part of 'search_responses.dart'; 4 | 5 | // ************************************************************************** 6 | // JsonSerializableGenerator 7 | // ************************************************************************** 8 | 9 | SearchResponses _$SearchResponsesFromJson(Map json) => 10 | $checkedCreate( 11 | 'SearchResponses', 12 | json, 13 | ($checkedConvert) { 14 | final val = SearchResponses( 15 | results: $checkedConvert('results', (v) => v as List), 16 | ); 17 | return val; 18 | }, 19 | ); 20 | 21 | Map _$SearchResponsesToJson(SearchResponses instance) => 22 | { 23 | 'results': instance.results.toList(), 24 | }; 25 | -------------------------------------------------------------------------------- /packages/client_search/lib/src/model/log_type.dart: -------------------------------------------------------------------------------- 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 | // ignore_for_file: unused_element 3 | import 'package:json_annotation/json_annotation.dart'; 4 | 5 | @JsonEnum(valueField: 'raw') 6 | enum LogType { 7 | all(r'all'), 8 | query(r'query'), 9 | build(r'build'), 10 | error(r'error'); 11 | 12 | const LogType(this.raw); 13 | final dynamic raw; 14 | 15 | dynamic toJson() => raw; 16 | 17 | static LogType fromJson(dynamic json) { 18 | for (final value in values) { 19 | if (value.raw == json) return value; 20 | } 21 | throw ArgumentError.value(json, "raw", "No enum value with that value"); 22 | } 23 | 24 | @override 25 | String toString() => raw.toString(); 26 | } 27 | -------------------------------------------------------------------------------- /packages/client_search/lib/src/model/scope_type.dart: -------------------------------------------------------------------------------- 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 | // ignore_for_file: unused_element 3 | import 'package:json_annotation/json_annotation.dart'; 4 | 5 | @JsonEnum(valueField: 'raw') 6 | enum ScopeType { 7 | settings(r'settings'), 8 | synonyms(r'synonyms'), 9 | rules(r'rules'); 10 | 11 | const ScopeType(this.raw); 12 | final dynamic raw; 13 | 14 | dynamic toJson() => raw; 15 | 16 | static ScopeType fromJson(dynamic json) { 17 | for (final value in values) { 18 | if (value.raw == json) return value; 19 | } 20 | throw ArgumentError.value(json, "raw", "No enum value with that value"); 21 | } 22 | 23 | @override 24 | String toString() => raw.toString(); 25 | } 26 | -------------------------------------------------------------------------------- /packages/client_search/lib/src/model/search_responses.g.dart: -------------------------------------------------------------------------------- 1 | // GENERATED CODE - DO NOT MODIFY BY HAND 2 | 3 | part of 'search_responses.dart'; 4 | 5 | // ************************************************************************** 6 | // JsonSerializableGenerator 7 | // ************************************************************************** 8 | 9 | SearchResponses _$SearchResponsesFromJson(Map json) => 10 | $checkedCreate( 11 | 'SearchResponses', 12 | json, 13 | ($checkedConvert) { 14 | final val = SearchResponses( 15 | results: $checkedConvert('results', (v) => v as List), 16 | ); 17 | return val; 18 | }, 19 | ); 20 | 21 | Map _$SearchResponsesToJson(SearchResponses instance) => 22 | { 23 | 'results': instance.results.toList(), 24 | }; 25 | -------------------------------------------------------------------------------- /packages/client_composition/lib/src/model/action.dart: -------------------------------------------------------------------------------- 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 | // ignore_for_file: unused_element 3 | import 'package:json_annotation/json_annotation.dart'; 4 | 5 | /// Type of Composition Batch operation. 6 | @JsonEnum(valueField: 'raw') 7 | enum Action { 8 | upsert(r'upsert'), 9 | delete(r'delete'); 10 | 11 | const Action(this.raw); 12 | final dynamic raw; 13 | 14 | dynamic toJson() => raw; 15 | 16 | static Action fromJson(dynamic json) { 17 | for (final value in values) { 18 | if (value.raw == json) return value; 19 | } 20 | throw ArgumentError.value(json, "raw", "No enum value with that value"); 21 | } 22 | 23 | @override 24 | String toString() => raw.toString(); 25 | } 26 | -------------------------------------------------------------------------------- /packages/client_search/lib/src/model/assign_user_id_params.g.dart: -------------------------------------------------------------------------------- 1 | // GENERATED CODE - DO NOT MODIFY BY HAND 2 | 3 | part of 'assign_user_id_params.dart'; 4 | 5 | // ************************************************************************** 6 | // JsonSerializableGenerator 7 | // ************************************************************************** 8 | 9 | AssignUserIdParams _$AssignUserIdParamsFromJson(Map json) => 10 | $checkedCreate( 11 | 'AssignUserIdParams', 12 | json, 13 | ($checkedConvert) { 14 | final val = AssignUserIdParams( 15 | cluster: $checkedConvert('cluster', (v) => v as String), 16 | ); 17 | return val; 18 | }, 19 | ); 20 | 21 | Map _$AssignUserIdParamsToJson(AssignUserIdParams instance) => 22 | { 23 | 'cluster': instance.cluster, 24 | }; 25 | -------------------------------------------------------------------------------- /packages/client_search/lib/src/model/created_at_response.g.dart: -------------------------------------------------------------------------------- 1 | // GENERATED CODE - DO NOT MODIFY BY HAND 2 | 3 | part of 'created_at_response.dart'; 4 | 5 | // ************************************************************************** 6 | // JsonSerializableGenerator 7 | // ************************************************************************** 8 | 9 | CreatedAtResponse _$CreatedAtResponseFromJson(Map json) => 10 | $checkedCreate( 11 | 'CreatedAtResponse', 12 | json, 13 | ($checkedConvert) { 14 | final val = CreatedAtResponse( 15 | createdAt: $checkedConvert('createdAt', (v) => v as String), 16 | ); 17 | return val; 18 | }, 19 | ); 20 | 21 | Map _$CreatedAtResponseToJson(CreatedAtResponse instance) => 22 | { 23 | 'createdAt': instance.createdAt, 24 | }; 25 | -------------------------------------------------------------------------------- /packages/client_composition/lib/src/model/external_ordering.dart: -------------------------------------------------------------------------------- 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 | // ignore_for_file: unused_element 3 | import 'package:json_annotation/json_annotation.dart'; 4 | 5 | @JsonEnum(valueField: 'raw') 6 | enum ExternalOrdering { 7 | default_(r'default'), 8 | userDefined(r'userDefined'); 9 | 10 | const ExternalOrdering(this.raw); 11 | final dynamic raw; 12 | 13 | dynamic toJson() => raw; 14 | 15 | static ExternalOrdering fromJson(dynamic json) { 16 | for (final value in values) { 17 | if (value.raw == json) return value; 18 | } 19 | throw ArgumentError.value(json, "raw", "No enum value with that value"); 20 | } 21 | 22 | @override 23 | String toString() => raw.toString(); 24 | } 25 | -------------------------------------------------------------------------------- /packages/client_search/lib/src/model/api_key_operation.dart: -------------------------------------------------------------------------------- 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 | // ignore_for_file: unused_element 3 | import 'package:json_annotation/json_annotation.dart'; 4 | 5 | @JsonEnum(valueField: 'raw') 6 | enum ApiKeyOperation { 7 | add(r'add'), 8 | delete(r'delete'), 9 | update(r'update'); 10 | 11 | const ApiKeyOperation(this.raw); 12 | final dynamic raw; 13 | 14 | dynamic toJson() => raw; 15 | 16 | static ApiKeyOperation fromJson(dynamic json) { 17 | for (final value in values) { 18 | if (value.raw == json) return value; 19 | } 20 | throw ArgumentError.value(json, "raw", "No enum value with that value"); 21 | } 22 | 23 | @override 24 | String toString() => raw.toString(); 25 | } 26 | -------------------------------------------------------------------------------- /packages/client_composition/lib/src/model/search_source.g.dart: -------------------------------------------------------------------------------- 1 | // GENERATED CODE - DO NOT MODIFY BY HAND 2 | 3 | part of 'search_source.dart'; 4 | 5 | // ************************************************************************** 6 | // JsonSerializableGenerator 7 | // ************************************************************************** 8 | 9 | SearchSource _$SearchSourceFromJson(Map json) => 10 | $checkedCreate( 11 | 'SearchSource', 12 | json, 13 | ($checkedConvert) { 14 | final val = SearchSource( 15 | search: $checkedConvert( 16 | 'search', (v) => Search.fromJson(v as Map)), 17 | ); 18 | return val; 19 | }, 20 | ); 21 | 22 | Map _$SearchSourceToJson(SearchSource instance) => 23 | { 24 | 'search': instance.search.toJson(), 25 | }; 26 | -------------------------------------------------------------------------------- /packages/client_search/lib/src/model/event_type.dart: -------------------------------------------------------------------------------- 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 | // ignore_for_file: unused_element 3 | import 'package:json_annotation/json_annotation.dart'; 4 | 5 | @JsonEnum(valueField: 'raw') 6 | enum EventType { 7 | fetch(r'fetch'), 8 | record(r'record'), 9 | log(r'log'), 10 | transform(r'transform'); 11 | 12 | const EventType(this.raw); 13 | final dynamic raw; 14 | 15 | dynamic toJson() => raw; 16 | 17 | static EventType fromJson(dynamic json) { 18 | for (final value in values) { 19 | if (value.raw == json) return value; 20 | } 21 | throw ArgumentError.value(json, "raw", "No enum value with that value"); 22 | } 23 | 24 | @override 25 | String toString() => raw.toString(); 26 | } 27 | -------------------------------------------------------------------------------- /packages/client_search/lib/src/model/operation_type.dart: -------------------------------------------------------------------------------- 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 | // ignore_for_file: unused_element 3 | import 'package:json_annotation/json_annotation.dart'; 4 | 5 | /// Operation to perform on the index. 6 | @JsonEnum(valueField: 'raw') 7 | enum OperationType { 8 | move(r'move'), 9 | copy(r'copy'); 10 | 11 | const OperationType(this.raw); 12 | final dynamic raw; 13 | 14 | dynamic toJson() => raw; 15 | 16 | static OperationType fromJson(dynamic json) { 17 | for (final value in values) { 18 | if (value.raw == json) return value; 19 | } 20 | throw ArgumentError.value(json, "raw", "No enum value with that value"); 21 | } 22 | 23 | @override 24 | String toString() => raw.toString(); 25 | } 26 | -------------------------------------------------------------------------------- /packages/client_search/lib/src/model/dictionary_type.dart: -------------------------------------------------------------------------------- 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 | // ignore_for_file: unused_element 3 | import 'package:json_annotation/json_annotation.dart'; 4 | 5 | @JsonEnum(valueField: 'raw') 6 | enum DictionaryType { 7 | plurals(r'plurals'), 8 | stopwords(r'stopwords'), 9 | compounds(r'compounds'); 10 | 11 | const DictionaryType(this.raw); 12 | final dynamic raw; 13 | 14 | dynamic toJson() => raw; 15 | 16 | static DictionaryType fromJson(dynamic json) { 17 | for (final value in values) { 18 | if (value.raw == json) return value; 19 | } 20 | throw ArgumentError.value(json, "raw", "No enum value with that value"); 21 | } 22 | 23 | @override 24 | String toString() => raw.toString(); 25 | } 26 | -------------------------------------------------------------------------------- /packages/algoliasearch/lib/src/model/recommendations_hits.g.dart: -------------------------------------------------------------------------------- 1 | // GENERATED CODE - DO NOT MODIFY BY HAND 2 | 3 | part of 'recommendations_hits.dart'; 4 | 5 | // ************************************************************************** 6 | // JsonSerializableGenerator 7 | // ************************************************************************** 8 | 9 | RecommendationsHits _$RecommendationsHitsFromJson(Map json) => 10 | $checkedCreate( 11 | 'RecommendationsHits', 12 | json, 13 | ($checkedConvert) { 14 | final val = RecommendationsHits( 15 | hits: $checkedConvert('hits', (v) => v as List), 16 | ); 17 | return val; 18 | }, 19 | ); 20 | 21 | Map _$RecommendationsHitsToJson( 22 | RecommendationsHits instance) => 23 | { 24 | 'hits': instance.hits.toList(), 25 | }; 26 | -------------------------------------------------------------------------------- /packages/client_recommend/lib/src/model/recommendations_hits.g.dart: -------------------------------------------------------------------------------- 1 | // GENERATED CODE - DO NOT MODIFY BY HAND 2 | 3 | part of 'recommendations_hits.dart'; 4 | 5 | // ************************************************************************** 6 | // JsonSerializableGenerator 7 | // ************************************************************************** 8 | 9 | RecommendationsHits _$RecommendationsHitsFromJson(Map json) => 10 | $checkedCreate( 11 | 'RecommendationsHits', 12 | json, 13 | ($checkedConvert) { 14 | final val = RecommendationsHits( 15 | hits: $checkedConvert('hits', (v) => v as List), 16 | ); 17 | return val; 18 | }, 19 | ); 20 | 21 | Map _$RecommendationsHitsToJson( 22 | RecommendationsHits instance) => 23 | { 24 | 'hits': instance.hits.toList(), 25 | }; 26 | -------------------------------------------------------------------------------- /packages/client_search/lib/src/model/dictionary_action.dart: -------------------------------------------------------------------------------- 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 | // ignore_for_file: unused_element 3 | import 'package:json_annotation/json_annotation.dart'; 4 | 5 | /// Actions to perform. 6 | @JsonEnum(valueField: 'raw') 7 | enum DictionaryAction { 8 | addEntry(r'addEntry'), 9 | deleteEntry(r'deleteEntry'); 10 | 11 | const DictionaryAction(this.raw); 12 | final dynamic raw; 13 | 14 | dynamic toJson() => raw; 15 | 16 | static DictionaryAction fromJson(dynamic json) { 17 | for (final value in values) { 18 | if (value.raw == json) return value; 19 | } 20 | throw ArgumentError.value(json, "raw", "No enum value with that value"); 21 | } 22 | 23 | @override 24 | String toString() => raw.toString(); 25 | } 26 | -------------------------------------------------------------------------------- /packages/algoliasearch/lib/src/model/advanced_syntax_features.dart: -------------------------------------------------------------------------------- 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 | // ignore_for_file: unused_element 3 | import 'package:json_annotation/json_annotation.dart'; 4 | 5 | @JsonEnum(valueField: 'raw') 6 | enum AdvancedSyntaxFeatures { 7 | exactPhrase(r'exactPhrase'), 8 | excludeWords(r'excludeWords'); 9 | 10 | const AdvancedSyntaxFeatures(this.raw); 11 | final dynamic raw; 12 | 13 | dynamic toJson() => raw; 14 | 15 | static AdvancedSyntaxFeatures fromJson(dynamic json) { 16 | for (final value in values) { 17 | if (value.raw == json) return value; 18 | } 19 | throw ArgumentError.value(json, "raw", "No enum value with that value"); 20 | } 21 | 22 | @override 23 | String toString() => raw.toString(); 24 | } 25 | -------------------------------------------------------------------------------- /packages/client_recommend/lib/src/model/advanced_syntax_features.dart: -------------------------------------------------------------------------------- 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 | // ignore_for_file: unused_element 3 | import 'package:json_annotation/json_annotation.dart'; 4 | 5 | @JsonEnum(valueField: 'raw') 6 | enum AdvancedSyntaxFeatures { 7 | exactPhrase(r'exactPhrase'), 8 | excludeWords(r'excludeWords'); 9 | 10 | const AdvancedSyntaxFeatures(this.raw); 11 | final dynamic raw; 12 | 13 | dynamic toJson() => raw; 14 | 15 | static AdvancedSyntaxFeatures fromJson(dynamic json) { 16 | for (final value in values) { 17 | if (value.raw == json) return value; 18 | } 19 | throw ArgumentError.value(json, "raw", "No enum value with that value"); 20 | } 21 | 22 | @override 23 | String toString() => raw.toString(); 24 | } 25 | -------------------------------------------------------------------------------- /packages/client_search/lib/src/model/advanced_syntax_features.dart: -------------------------------------------------------------------------------- 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 | // ignore_for_file: unused_element 3 | import 'package:json_annotation/json_annotation.dart'; 4 | 5 | @JsonEnum(valueField: 'raw') 6 | enum AdvancedSyntaxFeatures { 7 | exactPhrase(r'exactPhrase'), 8 | excludeWords(r'excludeWords'); 9 | 10 | const AdvancedSyntaxFeatures(this.raw); 11 | final dynamic raw; 12 | 13 | dynamic toJson() => raw; 14 | 15 | static AdvancedSyntaxFeatures fromJson(dynamic json) { 16 | for (final value in values) { 17 | if (value.raw == json) return value; 18 | } 19 | throw ArgumentError.value(json, "raw", "No enum value with that value"); 20 | } 21 | 22 | @override 23 | String toString() => raw.toString(); 24 | } 25 | -------------------------------------------------------------------------------- /packages/algoliasearch/lib/src/model/around_radius_all.dart: -------------------------------------------------------------------------------- 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 | // ignore_for_file: unused_element 3 | import 'package:json_annotation/json_annotation.dart'; 4 | 5 | /// Return all records with a valid `_geoloc` attribute. Don't filter by distance. 6 | @JsonEnum(valueField: 'raw') 7 | enum AroundRadiusAll { 8 | all(r'all'); 9 | 10 | const AroundRadiusAll(this.raw); 11 | final dynamic raw; 12 | 13 | dynamic toJson() => raw; 14 | 15 | static AroundRadiusAll fromJson(dynamic json) { 16 | for (final value in values) { 17 | if (value.raw == json) return value; 18 | } 19 | throw ArgumentError.value(json, "raw", "No enum value with that value"); 20 | } 21 | 22 | @override 23 | String toString() => raw.toString(); 24 | } 25 | -------------------------------------------------------------------------------- /packages/client_composition/lib/src/model/advanced_syntax_features.dart: -------------------------------------------------------------------------------- 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 | // ignore_for_file: unused_element 3 | import 'package:json_annotation/json_annotation.dart'; 4 | 5 | @JsonEnum(valueField: 'raw') 6 | enum AdvancedSyntaxFeatures { 7 | exactPhrase(r'exactPhrase'), 8 | excludeWords(r'excludeWords'); 9 | 10 | const AdvancedSyntaxFeatures(this.raw); 11 | final dynamic raw; 12 | 13 | dynamic toJson() => raw; 14 | 15 | static AdvancedSyntaxFeatures fromJson(dynamic json) { 16 | for (final value in values) { 17 | if (value.raw == json) return value; 18 | } 19 | throw ArgumentError.value(json, "raw", "No enum value with that value"); 20 | } 21 | 22 | @override 23 | String toString() => raw.toString(); 24 | } 25 | -------------------------------------------------------------------------------- /packages/client_recommend/lib/src/model/around_radius_all.dart: -------------------------------------------------------------------------------- 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 | // ignore_for_file: unused_element 3 | import 'package:json_annotation/json_annotation.dart'; 4 | 5 | /// Return all records with a valid `_geoloc` attribute. Don't filter by distance. 6 | @JsonEnum(valueField: 'raw') 7 | enum AroundRadiusAll { 8 | all(r'all'); 9 | 10 | const AroundRadiusAll(this.raw); 11 | final dynamic raw; 12 | 13 | dynamic toJson() => raw; 14 | 15 | static AroundRadiusAll fromJson(dynamic json) { 16 | for (final value in values) { 17 | if (value.raw == json) return value; 18 | } 19 | throw ArgumentError.value(json, "raw", "No enum value with that value"); 20 | } 21 | 22 | @override 23 | String toString() => raw.toString(); 24 | } 25 | -------------------------------------------------------------------------------- /packages/client_search/lib/src/model/around_radius_all.dart: -------------------------------------------------------------------------------- 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 | // ignore_for_file: unused_element 3 | import 'package:json_annotation/json_annotation.dart'; 4 | 5 | /// Return all records with a valid `_geoloc` attribute. Don't filter by distance. 6 | @JsonEnum(valueField: 'raw') 7 | enum AroundRadiusAll { 8 | all(r'all'); 9 | 10 | const AroundRadiusAll(this.raw); 11 | final dynamic raw; 12 | 13 | dynamic toJson() => raw; 14 | 15 | static AroundRadiusAll fromJson(dynamic json) { 16 | for (final value in values) { 17 | if (value.raw == json) return value; 18 | } 19 | throw ArgumentError.value(json, "raw", "No enum value with that value"); 20 | } 21 | 22 | @override 23 | String toString() => raw.toString(); 24 | } 25 | -------------------------------------------------------------------------------- /packages/algoliasearch/lib/src/model/match_level.dart: -------------------------------------------------------------------------------- 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 | // ignore_for_file: unused_element 3 | import 'package:json_annotation/json_annotation.dart'; 4 | 5 | /// Whether the whole query string matches or only a part. 6 | @JsonEnum(valueField: 'raw') 7 | enum MatchLevel { 8 | none(r'none'), 9 | partial(r'partial'), 10 | full(r'full'); 11 | 12 | const MatchLevel(this.raw); 13 | final dynamic raw; 14 | 15 | dynamic toJson() => raw; 16 | 17 | static MatchLevel fromJson(dynamic json) { 18 | for (final value in values) { 19 | if (value.raw == json) return value; 20 | } 21 | throw ArgumentError.value(json, "raw", "No enum value with that value"); 22 | } 23 | 24 | @override 25 | String toString() => raw.toString(); 26 | } 27 | -------------------------------------------------------------------------------- /packages/client_composition/lib/src/model/around_radius_all.dart: -------------------------------------------------------------------------------- 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 | // ignore_for_file: unused_element 3 | import 'package:json_annotation/json_annotation.dart'; 4 | 5 | /// Return all records with a valid `_geoloc` attribute. Don't filter by distance. 6 | @JsonEnum(valueField: 'raw') 7 | enum AroundRadiusAll { 8 | all(r'all'); 9 | 10 | const AroundRadiusAll(this.raw); 11 | final dynamic raw; 12 | 13 | dynamic toJson() => raw; 14 | 15 | static AroundRadiusAll fromJson(dynamic json) { 16 | for (final value in values) { 17 | if (value.raw == json) return value; 18 | } 19 | throw ArgumentError.value(json, "raw", "No enum value with that value"); 20 | } 21 | 22 | @override 23 | String toString() => raw.toString(); 24 | } 25 | -------------------------------------------------------------------------------- /packages/client_search/lib/src/model/match_level.dart: -------------------------------------------------------------------------------- 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 | // ignore_for_file: unused_element 3 | import 'package:json_annotation/json_annotation.dart'; 4 | 5 | /// Whether the whole query string matches or only a part. 6 | @JsonEnum(valueField: 'raw') 7 | enum MatchLevel { 8 | none(r'none'), 9 | partial(r'partial'), 10 | full(r'full'); 11 | 12 | const MatchLevel(this.raw); 13 | final dynamic raw; 14 | 15 | dynamic toJson() => raw; 16 | 17 | static MatchLevel fromJson(dynamic json) { 18 | for (final value in values) { 19 | if (value.raw == json) return value; 20 | } 21 | throw ArgumentError.value(json, "raw", "No enum value with that value"); 22 | } 23 | 24 | @override 25 | String toString() => raw.toString(); 26 | } 27 | -------------------------------------------------------------------------------- /packages/client_composition/lib/src/model/match_level.dart: -------------------------------------------------------------------------------- 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 | // ignore_for_file: unused_element 3 | import 'package:json_annotation/json_annotation.dart'; 4 | 5 | /// Whether the whole query string matches or only a part. 6 | @JsonEnum(valueField: 'raw') 7 | enum MatchLevel { 8 | none(r'none'), 9 | partial(r'partial'), 10 | full(r'full'); 11 | 12 | const MatchLevel(this.raw); 13 | final dynamic raw; 14 | 15 | dynamic toJson() => raw; 16 | 17 | static MatchLevel fromJson(dynamic json) { 18 | for (final value in values) { 19 | if (value.raw == json) return value; 20 | } 21 | throw ArgumentError.value(json, "raw", "No enum value with that value"); 22 | } 23 | 24 | @override 25 | String toString() => raw.toString(); 26 | } 27 | -------------------------------------------------------------------------------- /packages/client_recommend/lib/src/model/match_level.dart: -------------------------------------------------------------------------------- 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 | // ignore_for_file: unused_element 3 | import 'package:json_annotation/json_annotation.dart'; 4 | 5 | /// Whether the whole query string matches or only a part. 6 | @JsonEnum(valueField: 'raw') 7 | enum MatchLevel { 8 | none(r'none'), 9 | partial(r'partial'), 10 | full(r'full'); 11 | 12 | const MatchLevel(this.raw); 13 | final dynamic raw; 14 | 15 | dynamic toJson() => raw; 16 | 17 | static MatchLevel fromJson(dynamic json) { 18 | for (final value in values) { 19 | if (value.raw == json) return value; 20 | } 21 | throw ArgumentError.value(json, "raw", "No enum value with that value"); 22 | } 23 | 24 | @override 25 | String toString() => raw.toString(); 26 | } 27 | -------------------------------------------------------------------------------- /packages/client_search/lib/src/model/delete_source_response.g.dart: -------------------------------------------------------------------------------- 1 | // GENERATED CODE - DO NOT MODIFY BY HAND 2 | 3 | part of 'delete_source_response.dart'; 4 | 5 | // ************************************************************************** 6 | // JsonSerializableGenerator 7 | // ************************************************************************** 8 | 9 | DeleteSourceResponse _$DeleteSourceResponseFromJson( 10 | Map json) => 11 | $checkedCreate( 12 | 'DeleteSourceResponse', 13 | json, 14 | ($checkedConvert) { 15 | final val = DeleteSourceResponse( 16 | deletedAt: $checkedConvert('deletedAt', (v) => v as String), 17 | ); 18 | return val; 19 | }, 20 | ); 21 | 22 | Map _$DeleteSourceResponseToJson( 23 | DeleteSourceResponse instance) => 24 | { 25 | 'deletedAt': instance.deletedAt, 26 | }; 27 | -------------------------------------------------------------------------------- /packages/client_search/lib/src/model/delete_api_key_response.g.dart: -------------------------------------------------------------------------------- 1 | // GENERATED CODE - DO NOT MODIFY BY HAND 2 | 3 | part of 'delete_api_key_response.dart'; 4 | 5 | // ************************************************************************** 6 | // JsonSerializableGenerator 7 | // ************************************************************************** 8 | 9 | DeleteApiKeyResponse _$DeleteApiKeyResponseFromJson( 10 | Map json) => 11 | $checkedCreate( 12 | 'DeleteApiKeyResponse', 13 | json, 14 | ($checkedConvert) { 15 | final val = DeleteApiKeyResponse( 16 | deletedAt: $checkedConvert('deletedAt', (v) => v as String), 17 | ); 18 | return val; 19 | }, 20 | ); 21 | 22 | Map _$DeleteApiKeyResponseToJson( 23 | DeleteApiKeyResponse instance) => 24 | { 25 | 'deletedAt': instance.deletedAt, 26 | }; 27 | -------------------------------------------------------------------------------- /packages/client_search/lib/src/model/dictionary_entry_state.dart: -------------------------------------------------------------------------------- 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 | // ignore_for_file: unused_element 3 | import 'package:json_annotation/json_annotation.dart'; 4 | 5 | /// Whether a dictionary entry is active. 6 | @JsonEnum(valueField: 'raw') 7 | enum DictionaryEntryState { 8 | enabled(r'enabled'), 9 | disabled(r'disabled'); 10 | 11 | const DictionaryEntryState(this.raw); 12 | final dynamic raw; 13 | 14 | dynamic toJson() => raw; 15 | 16 | static DictionaryEntryState fromJson(dynamic json) { 17 | for (final value in values) { 18 | if (value.raw == json) return value; 19 | } 20 | throw ArgumentError.value(json, "raw", "No enum value with that value"); 21 | } 22 | 23 | @override 24 | String toString() => raw.toString(); 25 | } 26 | -------------------------------------------------------------------------------- /packages/client_search/lib/src/model/remove_user_id_response.g.dart: -------------------------------------------------------------------------------- 1 | // GENERATED CODE - DO NOT MODIFY BY HAND 2 | 3 | part of 'remove_user_id_response.dart'; 4 | 5 | // ************************************************************************** 6 | // JsonSerializableGenerator 7 | // ************************************************************************** 8 | 9 | RemoveUserIdResponse _$RemoveUserIdResponseFromJson( 10 | Map json) => 11 | $checkedCreate( 12 | 'RemoveUserIdResponse', 13 | json, 14 | ($checkedConvert) { 15 | final val = RemoveUserIdResponse( 16 | deletedAt: $checkedConvert('deletedAt', (v) => v as String), 17 | ); 18 | return val; 19 | }, 20 | ); 21 | 22 | Map _$RemoveUserIdResponseToJson( 23 | RemoveUserIdResponse instance) => 24 | { 25 | 'deletedAt': instance.deletedAt, 26 | }; 27 | -------------------------------------------------------------------------------- /packages/client_search/lib/src/model/replace_source_response.g.dart: -------------------------------------------------------------------------------- 1 | // GENERATED CODE - DO NOT MODIFY BY HAND 2 | 3 | part of 'replace_source_response.dart'; 4 | 5 | // ************************************************************************** 6 | // JsonSerializableGenerator 7 | // ************************************************************************** 8 | 9 | ReplaceSourceResponse _$ReplaceSourceResponseFromJson( 10 | Map json) => 11 | $checkedCreate( 12 | 'ReplaceSourceResponse', 13 | json, 14 | ($checkedConvert) { 15 | final val = ReplaceSourceResponse( 16 | updatedAt: $checkedConvert('updatedAt', (v) => v as String), 17 | ); 18 | return val; 19 | }, 20 | ); 21 | 22 | Map _$ReplaceSourceResponseToJson( 23 | ReplaceSourceResponse instance) => 24 | { 25 | 'updatedAt': instance.updatedAt, 26 | }; 27 | -------------------------------------------------------------------------------- /packages/client_search/lib/src/model/task_status.dart: -------------------------------------------------------------------------------- 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 | // ignore_for_file: unused_element 3 | import 'package:json_annotation/json_annotation.dart'; 4 | 5 | /// Task status, `published` if the task is completed, `notPublished` otherwise. 6 | @JsonEnum(valueField: 'raw') 7 | enum TaskStatus { 8 | published(r'published'), 9 | notPublished(r'notPublished'); 10 | 11 | const TaskStatus(this.raw); 12 | final dynamic raw; 13 | 14 | dynamic toJson() => raw; 15 | 16 | static TaskStatus fromJson(dynamic json) { 17 | for (final value in values) { 18 | if (value.raw == json) return value; 19 | } 20 | throw ArgumentError.value(json, "raw", "No enum value with that value"); 21 | } 22 | 23 | @override 24 | String toString() => raw.toString(); 25 | } 26 | -------------------------------------------------------------------------------- /packages/algoliasearch/lib/src/model/cursor.g.dart: -------------------------------------------------------------------------------- 1 | // GENERATED CODE - DO NOT MODIFY BY HAND 2 | 3 | part of 'cursor.dart'; 4 | 5 | // ************************************************************************** 6 | // JsonSerializableGenerator 7 | // ************************************************************************** 8 | 9 | Cursor _$CursorFromJson(Map json) => $checkedCreate( 10 | 'Cursor', 11 | json, 12 | ($checkedConvert) { 13 | final val = Cursor( 14 | cursor: $checkedConvert('cursor', (v) => v as String?), 15 | ); 16 | return val; 17 | }, 18 | ); 19 | 20 | Map _$CursorToJson(Cursor instance) { 21 | final val = {}; 22 | 23 | void writeNotNull(String key, dynamic value) { 24 | if (value != null) { 25 | val[key] = value; 26 | } 27 | } 28 | 29 | writeNotNull('cursor', instance.cursor); 30 | return val; 31 | } 32 | -------------------------------------------------------------------------------- /packages/client_composition/lib/src/model/task_status.dart: -------------------------------------------------------------------------------- 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 | // ignore_for_file: unused_element 3 | import 'package:json_annotation/json_annotation.dart'; 4 | 5 | /// Task status, `published` if the task is completed, `notPublished` otherwise. 6 | @JsonEnum(valueField: 'raw') 7 | enum TaskStatus { 8 | published(r'published'), 9 | notPublished(r'notPublished'); 10 | 11 | const TaskStatus(this.raw); 12 | final dynamic raw; 13 | 14 | dynamic toJson() => raw; 15 | 16 | static TaskStatus fromJson(dynamic json) { 17 | for (final value in values) { 18 | if (value.raw == json) return value; 19 | } 20 | throw ArgumentError.value(json, "raw", "No enum value with that value"); 21 | } 22 | 23 | @override 24 | String toString() => raw.toString(); 25 | } 26 | -------------------------------------------------------------------------------- /packages/client_recommend/lib/src/model/task_status.dart: -------------------------------------------------------------------------------- 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 | // ignore_for_file: unused_element 3 | import 'package:json_annotation/json_annotation.dart'; 4 | 5 | /// Task status, `published` if the task is completed, `notPublished` otherwise. 6 | @JsonEnum(valueField: 'raw') 7 | enum TaskStatus { 8 | published(r'published'), 9 | notPublished(r'notPublished'); 10 | 11 | const TaskStatus(this.raw); 12 | final dynamic raw; 13 | 14 | dynamic toJson() => raw; 15 | 16 | static TaskStatus fromJson(dynamic json) { 17 | for (final value in values) { 18 | if (value.raw == json) return value; 19 | } 20 | throw ArgumentError.value(json, "raw", "No enum value with that value"); 21 | } 22 | 23 | @override 24 | String toString() => raw.toString(); 25 | } 26 | -------------------------------------------------------------------------------- /packages/client_search/lib/src/model/cursor.g.dart: -------------------------------------------------------------------------------- 1 | // GENERATED CODE - DO NOT MODIFY BY HAND 2 | 3 | part of 'cursor.dart'; 4 | 5 | // ************************************************************************** 6 | // JsonSerializableGenerator 7 | // ************************************************************************** 8 | 9 | Cursor _$CursorFromJson(Map json) => $checkedCreate( 10 | 'Cursor', 11 | json, 12 | ($checkedConvert) { 13 | final val = Cursor( 14 | cursor: $checkedConvert('cursor', (v) => v as String?), 15 | ); 16 | return val; 17 | }, 18 | ); 19 | 20 | Map _$CursorToJson(Cursor instance) { 21 | final val = {}; 22 | 23 | void writeNotNull(String key, dynamic value) { 24 | if (value != null) { 25 | val[key] = value; 26 | } 27 | } 28 | 29 | writeNotNull('cursor', instance.cursor); 30 | return val; 31 | } 32 | -------------------------------------------------------------------------------- /packages/algoliasearch/lib/src/model/redirect_rule_index_data.g.dart: -------------------------------------------------------------------------------- 1 | // GENERATED CODE - DO NOT MODIFY BY HAND 2 | 3 | part of 'redirect_rule_index_data.dart'; 4 | 5 | // ************************************************************************** 6 | // JsonSerializableGenerator 7 | // ************************************************************************** 8 | 9 | RedirectRuleIndexData _$RedirectRuleIndexDataFromJson( 10 | Map json) => 11 | $checkedCreate( 12 | 'RedirectRuleIndexData', 13 | json, 14 | ($checkedConvert) { 15 | final val = RedirectRuleIndexData( 16 | ruleObjectID: $checkedConvert('ruleObjectID', (v) => v as String), 17 | ); 18 | return val; 19 | }, 20 | ); 21 | 22 | Map _$RedirectRuleIndexDataToJson( 23 | RedirectRuleIndexData instance) => 24 | { 25 | 'ruleObjectID': instance.ruleObjectID, 26 | }; 27 | -------------------------------------------------------------------------------- /packages/client_composition/lib/src/model/delete_composition_action.g.dart: -------------------------------------------------------------------------------- 1 | // GENERATED CODE - DO NOT MODIFY BY HAND 2 | 3 | part of 'delete_composition_action.dart'; 4 | 5 | // ************************************************************************** 6 | // JsonSerializableGenerator 7 | // ************************************************************************** 8 | 9 | DeleteCompositionAction _$DeleteCompositionActionFromJson( 10 | Map json) => 11 | $checkedCreate( 12 | 'DeleteCompositionAction', 13 | json, 14 | ($checkedConvert) { 15 | final val = DeleteCompositionAction( 16 | objectID: $checkedConvert('objectID', (v) => v as String), 17 | ); 18 | return val; 19 | }, 20 | ); 21 | 22 | Map _$DeleteCompositionActionToJson( 23 | DeleteCompositionAction instance) => 24 | { 25 | 'objectID': instance.objectID, 26 | }; 27 | -------------------------------------------------------------------------------- /packages/client_recommend/lib/src/model/redirect_rule_index_data.g.dart: -------------------------------------------------------------------------------- 1 | // GENERATED CODE - DO NOT MODIFY BY HAND 2 | 3 | part of 'redirect_rule_index_data.dart'; 4 | 5 | // ************************************************************************** 6 | // JsonSerializableGenerator 7 | // ************************************************************************** 8 | 9 | RedirectRuleIndexData _$RedirectRuleIndexDataFromJson( 10 | Map json) => 11 | $checkedCreate( 12 | 'RedirectRuleIndexData', 13 | json, 14 | ($checkedConvert) { 15 | final val = RedirectRuleIndexData( 16 | ruleObjectID: $checkedConvert('ruleObjectID', (v) => v as String), 17 | ); 18 | return val; 19 | }, 20 | ); 21 | 22 | Map _$RedirectRuleIndexDataToJson( 23 | RedirectRuleIndexData instance) => 24 | { 25 | 'ruleObjectID': instance.ruleObjectID, 26 | }; 27 | -------------------------------------------------------------------------------- /packages/client_search/lib/src/model/redirect_rule_index_data.g.dart: -------------------------------------------------------------------------------- 1 | // GENERATED CODE - DO NOT MODIFY BY HAND 2 | 3 | part of 'redirect_rule_index_data.dart'; 4 | 5 | // ************************************************************************** 6 | // JsonSerializableGenerator 7 | // ************************************************************************** 8 | 9 | RedirectRuleIndexData _$RedirectRuleIndexDataFromJson( 10 | Map json) => 11 | $checkedCreate( 12 | 'RedirectRuleIndexData', 13 | json, 14 | ($checkedConvert) { 15 | final val = RedirectRuleIndexData( 16 | ruleObjectID: $checkedConvert('ruleObjectID', (v) => v as String), 17 | ); 18 | return val; 19 | }, 20 | ); 21 | 22 | Map _$RedirectRuleIndexDataToJson( 23 | RedirectRuleIndexData instance) => 24 | { 25 | 'ruleObjectID': instance.ruleObjectID, 26 | }; 27 | -------------------------------------------------------------------------------- /packages/client_composition/lib/src/model/redirect_rule_index_data.g.dart: -------------------------------------------------------------------------------- 1 | // GENERATED CODE - DO NOT MODIFY BY HAND 2 | 3 | part of 'redirect_rule_index_data.dart'; 4 | 5 | // ************************************************************************** 6 | // JsonSerializableGenerator 7 | // ************************************************************************** 8 | 9 | RedirectRuleIndexData _$RedirectRuleIndexDataFromJson( 10 | Map json) => 11 | $checkedCreate( 12 | 'RedirectRuleIndexData', 13 | json, 14 | ($checkedConvert) { 15 | final val = RedirectRuleIndexData( 16 | ruleObjectID: $checkedConvert('ruleObjectID', (v) => v as String), 17 | ); 18 | return val; 19 | }, 20 | ); 21 | 22 | Map _$RedirectRuleIndexDataToJson( 23 | RedirectRuleIndexData instance) => 24 | { 25 | 'ruleObjectID': instance.ruleObjectID, 26 | }; 27 | -------------------------------------------------------------------------------- /packages/client_abtesting_v3/lib/src/model/custom_search_params.g.dart: -------------------------------------------------------------------------------- 1 | // GENERATED CODE - DO NOT MODIFY BY HAND 2 | 3 | part of 'custom_search_params.dart'; 4 | 5 | // ************************************************************************** 6 | // JsonSerializableGenerator 7 | // ************************************************************************** 8 | 9 | CustomSearchParams _$CustomSearchParamsFromJson(Map json) => 10 | $checkedCreate( 11 | 'CustomSearchParams', 12 | json, 13 | ($checkedConvert) { 14 | final val = CustomSearchParams( 15 | customSearchParameters: 16 | $checkedConvert('customSearchParameters', (v) => v as Object), 17 | ); 18 | return val; 19 | }, 20 | ); 21 | 22 | Map _$CustomSearchParamsToJson(CustomSearchParams instance) => 23 | { 24 | 'customSearchParameters': instance.customSearchParameters, 25 | }; 26 | -------------------------------------------------------------------------------- /packages/client_core/lib/src/transport/dio/agent_interceptor.dart: -------------------------------------------------------------------------------- 1 | import 'package:algolia_client_core/src/transport/algolia_agent.dart'; 2 | import 'package:algolia_client_core/src/transport/dio/platform/platform.dart'; 3 | import 'package:dio/dio.dart'; 4 | 5 | /// Interceptor that attaches the Algolia agent to outgoing requests. 6 | /// 7 | /// This interceptor modifies the query parameters of each request to include the 8 | /// formatted representation of the Algolia agent. 9 | class AgentInterceptor extends Interceptor { 10 | /// The Algolia agent to be attached to outgoing requests. 11 | final AlgoliaAgent agent; 12 | 13 | /// Constructs an [AgentInterceptor] with the provided Algolia agent. 14 | AgentInterceptor({required this.agent}); 15 | 16 | @override 17 | void onRequest(RequestOptions options, RequestInterceptorHandler handler) { 18 | Platform.algoliaAgent(options, agent.formatted()); 19 | super.onRequest(options, handler); 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /packages/client_search/lib/src/model/event_status.dart: -------------------------------------------------------------------------------- 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 | // ignore_for_file: unused_element 3 | import 'package:json_annotation/json_annotation.dart'; 4 | 5 | @JsonEnum(valueField: 'raw') 6 | enum EventStatus { 7 | created(r'created'), 8 | started(r'started'), 9 | retried(r'retried'), 10 | failed(r'failed'), 11 | succeeded(r'succeeded'), 12 | critical(r'critical'); 13 | 14 | const EventStatus(this.raw); 15 | final dynamic raw; 16 | 17 | dynamic toJson() => raw; 18 | 19 | static EventStatus fromJson(dynamic json) { 20 | for (final value in values) { 21 | if (value.raw == json) return value; 22 | } 23 | throw ArgumentError.value(json, "raw", "No enum value with that value"); 24 | } 25 | 26 | @override 27 | String toString() => raw.toString(); 28 | } 29 | -------------------------------------------------------------------------------- /packages/algoliasearch/lib/src/model/banner_link.g.dart: -------------------------------------------------------------------------------- 1 | // GENERATED CODE - DO NOT MODIFY BY HAND 2 | 3 | part of 'banner_link.dart'; 4 | 5 | // ************************************************************************** 6 | // JsonSerializableGenerator 7 | // ************************************************************************** 8 | 9 | BannerLink _$BannerLinkFromJson(Map json) => $checkedCreate( 10 | 'BannerLink', 11 | json, 12 | ($checkedConvert) { 13 | final val = BannerLink( 14 | url: $checkedConvert('url', (v) => v as String?), 15 | ); 16 | return val; 17 | }, 18 | ); 19 | 20 | Map _$BannerLinkToJson(BannerLink instance) { 21 | final val = {}; 22 | 23 | void writeNotNull(String key, dynamic value) { 24 | if (value != null) { 25 | val[key] = value; 26 | } 27 | } 28 | 29 | writeNotNull('url', instance.url); 30 | return val; 31 | } 32 | -------------------------------------------------------------------------------- /packages/client_composition/lib/src/model/multiple_batch_response.g.dart: -------------------------------------------------------------------------------- 1 | // GENERATED CODE - DO NOT MODIFY BY HAND 2 | 3 | part of 'multiple_batch_response.dart'; 4 | 5 | // ************************************************************************** 6 | // JsonSerializableGenerator 7 | // ************************************************************************** 8 | 9 | MultipleBatchResponse _$MultipleBatchResponseFromJson( 10 | Map json) => 11 | $checkedCreate( 12 | 'MultipleBatchResponse', 13 | json, 14 | ($checkedConvert) { 15 | final val = MultipleBatchResponse( 16 | taskID: 17 | $checkedConvert('taskID', (v) => Map.from(v as Map)), 18 | ); 19 | return val; 20 | }, 21 | ); 22 | 23 | Map _$MultipleBatchResponseToJson( 24 | MultipleBatchResponse instance) => 25 | { 26 | 'taskID': instance.taskID, 27 | }; 28 | -------------------------------------------------------------------------------- /packages/client_search/lib/src/model/banner_link.g.dart: -------------------------------------------------------------------------------- 1 | // GENERATED CODE - DO NOT MODIFY BY HAND 2 | 3 | part of 'banner_link.dart'; 4 | 5 | // ************************************************************************** 6 | // JsonSerializableGenerator 7 | // ************************************************************************** 8 | 9 | BannerLink _$BannerLinkFromJson(Map json) => $checkedCreate( 10 | 'BannerLink', 11 | json, 12 | ($checkedConvert) { 13 | final val = BannerLink( 14 | url: $checkedConvert('url', (v) => v as String?), 15 | ); 16 | return val; 17 | }, 18 | ); 19 | 20 | Map _$BannerLinkToJson(BannerLink instance) { 21 | final val = {}; 22 | 23 | void writeNotNull(String key, dynamic value) { 24 | if (value != null) { 25 | val[key] = value; 26 | } 27 | } 28 | 29 | writeNotNull('url', instance.url); 30 | return val; 31 | } 32 | -------------------------------------------------------------------------------- /packages/algoliasearch/lib/src/model/fbt_model.dart: -------------------------------------------------------------------------------- 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 | // ignore_for_file: unused_element 3 | import 'package:json_annotation/json_annotation.dart'; 4 | 5 | /// Frequently bought together model. This model recommends items that have been purchased within 1 day with the item with the ID `objectID`. 6 | @JsonEnum(valueField: 'raw') 7 | enum FbtModel { 8 | boughtTogether(r'bought-together'); 9 | 10 | const FbtModel(this.raw); 11 | final dynamic raw; 12 | 13 | dynamic toJson() => raw; 14 | 15 | static FbtModel fromJson(dynamic json) { 16 | for (final value in values) { 17 | if (value.raw == json) return value; 18 | } 19 | throw ArgumentError.value(json, "raw", "No enum value with that value"); 20 | } 21 | 22 | @override 23 | String toString() => raw.toString(); 24 | } 25 | -------------------------------------------------------------------------------- /packages/algoliasearch/lib/src/model/get_recommendations_params.g.dart: -------------------------------------------------------------------------------- 1 | // GENERATED CODE - DO NOT MODIFY BY HAND 2 | 3 | part of 'get_recommendations_params.dart'; 4 | 5 | // ************************************************************************** 6 | // JsonSerializableGenerator 7 | // ************************************************************************** 8 | 9 | GetRecommendationsParams _$GetRecommendationsParamsFromJson( 10 | Map json) => 11 | $checkedCreate( 12 | 'GetRecommendationsParams', 13 | json, 14 | ($checkedConvert) { 15 | final val = GetRecommendationsParams( 16 | requests: $checkedConvert('requests', (v) => v as List), 17 | ); 18 | return val; 19 | }, 20 | ); 21 | 22 | Map _$GetRecommendationsParamsToJson( 23 | GetRecommendationsParams instance) => 24 | { 25 | 'requests': instance.requests.toList(), 26 | }; 27 | -------------------------------------------------------------------------------- /packages/client_abtesting_v3/lib/src/model/direction.dart: -------------------------------------------------------------------------------- 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 | // ignore_for_file: unused_element 3 | import 'package:json_annotation/json_annotation.dart'; 4 | 5 | /// Sort order for A/B tests by start date. Use 'asc' for ascending or 'desc' for descending. Active A/B tests are always listed first. 6 | @JsonEnum(valueField: 'raw') 7 | enum Direction { 8 | asc(r'asc'), 9 | desc(r'desc'); 10 | 11 | const Direction(this.raw); 12 | final dynamic raw; 13 | 14 | dynamic toJson() => raw; 15 | 16 | static Direction fromJson(dynamic json) { 17 | for (final value in values) { 18 | if (value.raw == json) return value; 19 | } 20 | throw ArgumentError.value(json, "raw", "No enum value with that value"); 21 | } 22 | 23 | @override 24 | String toString() => raw.toString(); 25 | } 26 | -------------------------------------------------------------------------------- /packages/client_composition/lib/src/model/banner_link.g.dart: -------------------------------------------------------------------------------- 1 | // GENERATED CODE - DO NOT MODIFY BY HAND 2 | 3 | part of 'banner_link.dart'; 4 | 5 | // ************************************************************************** 6 | // JsonSerializableGenerator 7 | // ************************************************************************** 8 | 9 | BannerLink _$BannerLinkFromJson(Map json) => $checkedCreate( 10 | 'BannerLink', 11 | json, 12 | ($checkedConvert) { 13 | final val = BannerLink( 14 | url: $checkedConvert('url', (v) => v as String?), 15 | ); 16 | return val; 17 | }, 18 | ); 19 | 20 | Map _$BannerLinkToJson(BannerLink instance) { 21 | final val = {}; 22 | 23 | void writeNotNull(String key, dynamic value) { 24 | if (value != null) { 25 | val[key] = value; 26 | } 27 | } 28 | 29 | writeNotNull('url', instance.url); 30 | return val; 31 | } 32 | -------------------------------------------------------------------------------- /packages/client_composition/lib/src/model/composition_behavior.g.dart: -------------------------------------------------------------------------------- 1 | // GENERATED CODE - DO NOT MODIFY BY HAND 2 | 3 | part of 'composition_behavior.dart'; 4 | 5 | // ************************************************************************** 6 | // JsonSerializableGenerator 7 | // ************************************************************************** 8 | 9 | CompositionBehavior _$CompositionBehaviorFromJson(Map json) => 10 | $checkedCreate( 11 | 'CompositionBehavior', 12 | json, 13 | ($checkedConvert) { 14 | final val = CompositionBehavior( 15 | injection: $checkedConvert('injection', 16 | (v) => Injection.fromJson(v as Map)), 17 | ); 18 | return val; 19 | }, 20 | ); 21 | 22 | Map _$CompositionBehaviorToJson( 23 | CompositionBehavior instance) => 24 | { 25 | 'injection': instance.injection.toJson(), 26 | }; 27 | -------------------------------------------------------------------------------- /packages/client_composition/lib/src/model/external_source.g.dart: -------------------------------------------------------------------------------- 1 | // GENERATED CODE - DO NOT MODIFY BY HAND 2 | 3 | part of 'external_source.dart'; 4 | 5 | // ************************************************************************** 6 | // JsonSerializableGenerator 7 | // ************************************************************************** 8 | 9 | ExternalSource _$ExternalSourceFromJson(Map json) => 10 | $checkedCreate( 11 | 'ExternalSource', 12 | json, 13 | ($checkedConvert) { 14 | final val = ExternalSource( 15 | external_: $checkedConvert( 16 | 'external', (v) => External.fromJson(v as Map)), 17 | ); 18 | return val; 19 | }, 20 | fieldKeyMap: const {'external_': 'external'}, 21 | ); 22 | 23 | Map _$ExternalSourceToJson(ExternalSource instance) => 24 | { 25 | 'external': instance.external_.toJson(), 26 | }; 27 | -------------------------------------------------------------------------------- /packages/client_recommend/lib/src/model/banner_link.g.dart: -------------------------------------------------------------------------------- 1 | // GENERATED CODE - DO NOT MODIFY BY HAND 2 | 3 | part of 'banner_link.dart'; 4 | 5 | // ************************************************************************** 6 | // JsonSerializableGenerator 7 | // ************************************************************************** 8 | 9 | BannerLink _$BannerLinkFromJson(Map json) => $checkedCreate( 10 | 'BannerLink', 11 | json, 12 | ($checkedConvert) { 13 | final val = BannerLink( 14 | url: $checkedConvert('url', (v) => v as String?), 15 | ); 16 | return val; 17 | }, 18 | ); 19 | 20 | Map _$BannerLinkToJson(BannerLink instance) { 21 | final val = {}; 22 | 23 | void writeNotNull(String key, dynamic value) { 24 | if (value != null) { 25 | val[key] = value; 26 | } 27 | } 28 | 29 | writeNotNull('url', instance.url); 30 | return val; 31 | } 32 | -------------------------------------------------------------------------------- /packages/client_recommend/lib/src/model/fbt_model.dart: -------------------------------------------------------------------------------- 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 | // ignore_for_file: unused_element 3 | import 'package:json_annotation/json_annotation.dart'; 4 | 5 | /// Frequently bought together model. This model recommends items that have been purchased within 1 day with the item with the ID `objectID`. 6 | @JsonEnum(valueField: 'raw') 7 | enum FbtModel { 8 | boughtTogether(r'bought-together'); 9 | 10 | const FbtModel(this.raw); 11 | final dynamic raw; 12 | 13 | dynamic toJson() => raw; 14 | 15 | static FbtModel fromJson(dynamic json) { 16 | for (final value in values) { 17 | if (value.raw == json) return value; 18 | } 19 | throw ArgumentError.value(json, "raw", "No enum value with that value"); 20 | } 21 | 22 | @override 23 | String toString() => raw.toString(); 24 | } 25 | -------------------------------------------------------------------------------- /packages/algoliasearch/lib/src/model/redirect_url.g.dart: -------------------------------------------------------------------------------- 1 | // GENERATED CODE - DO NOT MODIFY BY HAND 2 | 3 | part of 'redirect_url.dart'; 4 | 5 | // ************************************************************************** 6 | // JsonSerializableGenerator 7 | // ************************************************************************** 8 | 9 | RedirectURL _$RedirectURLFromJson(Map json) => $checkedCreate( 10 | 'RedirectURL', 11 | json, 12 | ($checkedConvert) { 13 | final val = RedirectURL( 14 | url: $checkedConvert('url', (v) => v as String?), 15 | ); 16 | return val; 17 | }, 18 | ); 19 | 20 | Map _$RedirectURLToJson(RedirectURL instance) { 21 | final val = {}; 22 | 23 | void writeNotNull(String key, dynamic value) { 24 | if (value != null) { 25 | val[key] = value; 26 | } 27 | } 28 | 29 | writeNotNull('url', instance.url); 30 | return val; 31 | } 32 | -------------------------------------------------------------------------------- /packages/algoliasearch/lib/src/model/trending_items_model.dart: -------------------------------------------------------------------------------- 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 | // ignore_for_file: unused_element 3 | import 'package:json_annotation/json_annotation.dart'; 4 | 5 | /// Trending items model. Trending items are determined from the number of conversion events collected on them. 6 | @JsonEnum(valueField: 'raw') 7 | enum TrendingItemsModel { 8 | trendingItems(r'trending-items'); 9 | 10 | const TrendingItemsModel(this.raw); 11 | final dynamic raw; 12 | 13 | dynamic toJson() => raw; 14 | 15 | static TrendingItemsModel fromJson(dynamic json) { 16 | for (final value in values) { 17 | if (value.raw == json) return value; 18 | } 19 | throw ArgumentError.value(json, "raw", "No enum value with that value"); 20 | } 21 | 22 | @override 23 | String toString() => raw.toString(); 24 | } 25 | -------------------------------------------------------------------------------- /packages/client_composition/lib/src/model/rules_multiple_batch_response.g.dart: -------------------------------------------------------------------------------- 1 | // GENERATED CODE - DO NOT MODIFY BY HAND 2 | 3 | part of 'rules_multiple_batch_response.dart'; 4 | 5 | // ************************************************************************** 6 | // JsonSerializableGenerator 7 | // ************************************************************************** 8 | 9 | RulesMultipleBatchResponse _$RulesMultipleBatchResponseFromJson( 10 | Map json) => 11 | $checkedCreate( 12 | 'RulesMultipleBatchResponse', 13 | json, 14 | ($checkedConvert) { 15 | final val = RulesMultipleBatchResponse( 16 | taskID: $checkedConvert('taskID', (v) => (v as num).toInt()), 17 | ); 18 | return val; 19 | }, 20 | ); 21 | 22 | Map _$RulesMultipleBatchResponseToJson( 23 | RulesMultipleBatchResponse instance) => 24 | { 25 | 'taskID': instance.taskID, 26 | }; 27 | -------------------------------------------------------------------------------- /packages/client_recommend/lib/src/model/get_recommendations_params.g.dart: -------------------------------------------------------------------------------- 1 | // GENERATED CODE - DO NOT MODIFY BY HAND 2 | 3 | part of 'get_recommendations_params.dart'; 4 | 5 | // ************************************************************************** 6 | // JsonSerializableGenerator 7 | // ************************************************************************** 8 | 9 | GetRecommendationsParams _$GetRecommendationsParamsFromJson( 10 | Map json) => 11 | $checkedCreate( 12 | 'GetRecommendationsParams', 13 | json, 14 | ($checkedConvert) { 15 | final val = GetRecommendationsParams( 16 | requests: $checkedConvert('requests', (v) => v as List), 17 | ); 18 | return val; 19 | }, 20 | ); 21 | 22 | Map _$GetRecommendationsParamsToJson( 23 | GetRecommendationsParams instance) => 24 | { 25 | 'requests': instance.requests.toList(), 26 | }; 27 | -------------------------------------------------------------------------------- /packages/client_recommend/lib/src/model/redirect_url.g.dart: -------------------------------------------------------------------------------- 1 | // GENERATED CODE - DO NOT MODIFY BY HAND 2 | 3 | part of 'redirect_url.dart'; 4 | 5 | // ************************************************************************** 6 | // JsonSerializableGenerator 7 | // ************************************************************************** 8 | 9 | RedirectURL _$RedirectURLFromJson(Map json) => $checkedCreate( 10 | 'RedirectURL', 11 | json, 12 | ($checkedConvert) { 13 | final val = RedirectURL( 14 | url: $checkedConvert('url', (v) => v as String?), 15 | ); 16 | return val; 17 | }, 18 | ); 19 | 20 | Map _$RedirectURLToJson(RedirectURL instance) { 21 | final val = {}; 22 | 23 | void writeNotNull(String key, dynamic value) { 24 | if (value != null) { 25 | val[key] = value; 26 | } 27 | } 28 | 29 | writeNotNull('url', instance.url); 30 | return val; 31 | } 32 | -------------------------------------------------------------------------------- /packages/client_search/lib/src/model/add_api_key_response.g.dart: -------------------------------------------------------------------------------- 1 | // GENERATED CODE - DO NOT MODIFY BY HAND 2 | 3 | part of 'add_api_key_response.dart'; 4 | 5 | // ************************************************************************** 6 | // JsonSerializableGenerator 7 | // ************************************************************************** 8 | 9 | AddApiKeyResponse _$AddApiKeyResponseFromJson(Map json) => 10 | $checkedCreate( 11 | 'AddApiKeyResponse', 12 | json, 13 | ($checkedConvert) { 14 | final val = AddApiKeyResponse( 15 | key: $checkedConvert('key', (v) => v as String), 16 | createdAt: $checkedConvert('createdAt', (v) => v as String), 17 | ); 18 | return val; 19 | }, 20 | ); 21 | 22 | Map _$AddApiKeyResponseToJson(AddApiKeyResponse instance) => 23 | { 24 | 'key': instance.key, 25 | 'createdAt': instance.createdAt, 26 | }; 27 | -------------------------------------------------------------------------------- /packages/client_search/lib/src/model/redirect_url.g.dart: -------------------------------------------------------------------------------- 1 | // GENERATED CODE - DO NOT MODIFY BY HAND 2 | 3 | part of 'redirect_url.dart'; 4 | 5 | // ************************************************************************** 6 | // JsonSerializableGenerator 7 | // ************************************************************************** 8 | 9 | RedirectURL _$RedirectURLFromJson(Map json) => $checkedCreate( 10 | 'RedirectURL', 11 | json, 12 | ($checkedConvert) { 13 | final val = RedirectURL( 14 | url: $checkedConvert('url', (v) => v as String?), 15 | ); 16 | return val; 17 | }, 18 | ); 19 | 20 | Map _$RedirectURLToJson(RedirectURL instance) { 21 | final val = {}; 22 | 23 | void writeNotNull(String key, dynamic value) { 24 | if (value != null) { 25 | val[key] = value; 26 | } 27 | } 28 | 29 | writeNotNull('url', instance.url); 30 | return val; 31 | } 32 | -------------------------------------------------------------------------------- /packages/client_composition/lib/src/model/composition_run_applied_rules.g.dart: -------------------------------------------------------------------------------- 1 | // GENERATED CODE - DO NOT MODIFY BY HAND 2 | 3 | part of 'composition_run_applied_rules.dart'; 4 | 5 | // ************************************************************************** 6 | // JsonSerializableGenerator 7 | // ************************************************************************** 8 | 9 | CompositionRunAppliedRules _$CompositionRunAppliedRulesFromJson( 10 | Map json) => 11 | $checkedCreate( 12 | 'CompositionRunAppliedRules', 13 | json, 14 | ($checkedConvert) { 15 | final val = CompositionRunAppliedRules( 16 | objectID: $checkedConvert('objectID', (v) => v as String), 17 | ); 18 | return val; 19 | }, 20 | ); 21 | 22 | Map _$CompositionRunAppliedRulesToJson( 23 | CompositionRunAppliedRules instance) => 24 | { 25 | 'objectID': instance.objectID, 26 | }; 27 | -------------------------------------------------------------------------------- /packages/client_composition/lib/src/model/redirect_url.g.dart: -------------------------------------------------------------------------------- 1 | // GENERATED CODE - DO NOT MODIFY BY HAND 2 | 3 | part of 'redirect_url.dart'; 4 | 5 | // ************************************************************************** 6 | // JsonSerializableGenerator 7 | // ************************************************************************** 8 | 9 | RedirectURL _$RedirectURLFromJson(Map json) => $checkedCreate( 10 | 'RedirectURL', 11 | json, 12 | ($checkedConvert) { 13 | final val = RedirectURL( 14 | url: $checkedConvert('url', (v) => v as String?), 15 | ); 16 | return val; 17 | }, 18 | ); 19 | 20 | Map _$RedirectURLToJson(RedirectURL instance) { 21 | final val = {}; 22 | 23 | void writeNotNull(String key, dynamic value) { 24 | if (value != null) { 25 | val[key] = value; 26 | } 27 | } 28 | 29 | writeNotNull('url', instance.url); 30 | return val; 31 | } 32 | -------------------------------------------------------------------------------- /packages/client_recommend/lib/src/model/recommend_models.dart: -------------------------------------------------------------------------------- 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 | // ignore_for_file: unused_element 3 | import 'package:json_annotation/json_annotation.dart'; 4 | 5 | @JsonEnum(valueField: 'raw') 6 | enum RecommendModels { 7 | relatedProducts(r'related-products'), 8 | boughtTogether(r'bought-together'), 9 | trendingFacets(r'trending-facets'), 10 | trendingItems(r'trending-items'); 11 | 12 | const RecommendModels(this.raw); 13 | final dynamic raw; 14 | 15 | dynamic toJson() => raw; 16 | 17 | static RecommendModels fromJson(dynamic json) { 18 | for (final value in values) { 19 | if (value.raw == json) return value; 20 | } 21 | throw ArgumentError.value(json, "raw", "No enum value with that value"); 22 | } 23 | 24 | @override 25 | String toString() => raw.toString(); 26 | } 27 | -------------------------------------------------------------------------------- /packages/client_recommend/lib/src/model/trending_items_model.dart: -------------------------------------------------------------------------------- 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 | // ignore_for_file: unused_element 3 | import 'package:json_annotation/json_annotation.dart'; 4 | 5 | /// Trending items model. Trending items are determined from the number of conversion events collected on them. 6 | @JsonEnum(valueField: 'raw') 7 | enum TrendingItemsModel { 8 | trendingItems(r'trending-items'); 9 | 10 | const TrendingItemsModel(this.raw); 11 | final dynamic raw; 12 | 13 | dynamic toJson() => raw; 14 | 15 | static TrendingItemsModel fromJson(dynamic json) { 16 | for (final value in values) { 17 | if (value.raw == json) return value; 18 | } 19 | throw ArgumentError.value(json, "raw", "No enum value with that value"); 20 | } 21 | 22 | @override 23 | String toString() => raw.toString(); 24 | } 25 | -------------------------------------------------------------------------------- /packages/client_search/lib/src/model/promote_object_id.g.dart: -------------------------------------------------------------------------------- 1 | // GENERATED CODE - DO NOT MODIFY BY HAND 2 | 3 | part of 'promote_object_id.dart'; 4 | 5 | // ************************************************************************** 6 | // JsonSerializableGenerator 7 | // ************************************************************************** 8 | 9 | PromoteObjectID _$PromoteObjectIDFromJson(Map json) => 10 | $checkedCreate( 11 | 'PromoteObjectID', 12 | json, 13 | ($checkedConvert) { 14 | final val = PromoteObjectID( 15 | objectID: $checkedConvert('objectID', (v) => v as String), 16 | position: $checkedConvert('position', (v) => (v as num).toInt()), 17 | ); 18 | return val; 19 | }, 20 | ); 21 | 22 | Map _$PromoteObjectIDToJson(PromoteObjectID instance) => 23 | { 24 | 'objectID': instance.objectID, 25 | 'position': instance.position, 26 | }; 27 | -------------------------------------------------------------------------------- /packages/algoliasearch/lib/src/model/mode.dart: -------------------------------------------------------------------------------- 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 | // ignore_for_file: unused_element 3 | import 'package:json_annotation/json_annotation.dart'; 4 | 5 | /// Search mode the index will use to query for results. This setting only applies to indices, for which Algolia enabled NeuralSearch for you. 6 | @JsonEnum(valueField: 'raw') 7 | enum Mode { 8 | neuralSearch(r'neuralSearch'), 9 | keywordSearch(r'keywordSearch'); 10 | 11 | const Mode(this.raw); 12 | final dynamic raw; 13 | 14 | dynamic toJson() => raw; 15 | 16 | static Mode fromJson(dynamic json) { 17 | for (final value in values) { 18 | if (value.raw == json) return value; 19 | } 20 | throw ArgumentError.value(json, "raw", "No enum value with that value"); 21 | } 22 | 23 | @override 24 | String toString() => raw.toString(); 25 | } 26 | -------------------------------------------------------------------------------- /packages/algoliasearch/lib/src/model/trending_facets_model.dart: -------------------------------------------------------------------------------- 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 | // ignore_for_file: unused_element 3 | import 'package:json_annotation/json_annotation.dart'; 4 | 5 | /// Trending facet values model. This model recommends trending facet values for the specified facet attribute. 6 | @JsonEnum(valueField: 'raw') 7 | enum TrendingFacetsModel { 8 | trendingFacets(r'trending-facets'); 9 | 10 | const TrendingFacetsModel(this.raw); 11 | final dynamic raw; 12 | 13 | dynamic toJson() => raw; 14 | 15 | static TrendingFacetsModel fromJson(dynamic json) { 16 | for (final value in values) { 17 | if (value.raw == json) return value; 18 | } 19 | throw ArgumentError.value(json, "raw", "No enum value with that value"); 20 | } 21 | 22 | @override 23 | String toString() => raw.toString(); 24 | } 25 | -------------------------------------------------------------------------------- /packages/client_composition/lib/src/model/composition_source.g.dart: -------------------------------------------------------------------------------- 1 | // GENERATED CODE - DO NOT MODIFY BY HAND 2 | 3 | part of 'composition_source.dart'; 4 | 5 | // ************************************************************************** 6 | // JsonSerializableGenerator 7 | // ************************************************************************** 8 | 9 | CompositionSource _$CompositionSourceFromJson(Map json) => 10 | $checkedCreate( 11 | 'CompositionSource', 12 | json, 13 | ($checkedConvert) { 14 | final val = CompositionSource( 15 | search: $checkedConvert( 16 | 'search', 17 | (v) => 18 | CompositionSourceSearch.fromJson(v as Map)), 19 | ); 20 | return val; 21 | }, 22 | ); 23 | 24 | Map _$CompositionSourceToJson(CompositionSource instance) => 25 | { 26 | 'search': instance.search.toJson(), 27 | }; 28 | -------------------------------------------------------------------------------- /packages/client_composition/lib/src/model/delete_composition_rule_action.g.dart: -------------------------------------------------------------------------------- 1 | // GENERATED CODE - DO NOT MODIFY BY HAND 2 | 3 | part of 'delete_composition_rule_action.dart'; 4 | 5 | // ************************************************************************** 6 | // JsonSerializableGenerator 7 | // ************************************************************************** 8 | 9 | DeleteCompositionRuleAction _$DeleteCompositionRuleActionFromJson( 10 | Map json) => 11 | $checkedCreate( 12 | 'DeleteCompositionRuleAction', 13 | json, 14 | ($checkedConvert) { 15 | final val = DeleteCompositionRuleAction( 16 | objectID: $checkedConvert('objectID', (v) => v as String), 17 | ); 18 | return val; 19 | }, 20 | ); 21 | 22 | Map _$DeleteCompositionRuleActionToJson( 23 | DeleteCompositionRuleAction instance) => 24 | { 25 | 'objectID': instance.objectID, 26 | }; 27 | -------------------------------------------------------------------------------- /packages/client_insights/example/example.dart: -------------------------------------------------------------------------------- 1 | import 'package:algolia_client_insights/algolia_client_insights.dart'; 2 | 3 | void main() async { 4 | // Creating an instance of the Insights client with the provided App ID and API key. 5 | final insights = InsightsClient( 6 | appId: 'latency', 7 | apiKey: '6be0576ff61c053d5f9a3225e2a90f76', 8 | ); 9 | 10 | // Creating an InsightsEvents object with a list of EventsItems objects. 11 | // Each EventsItems represents an event such as a user viewing a specific item. 12 | final events = InsightsEvents( 13 | events: [ 14 | ViewedObjectIDs( 15 | eventType: ViewEvent.view, 16 | eventName: 'View event', 17 | index: 'instant_search', 18 | userToken: 'anonymous', 19 | objectIDs: ['5477500'], 20 | ) 21 | ], 22 | ); 23 | await insights.pushEvents(insightsEvents: events); 24 | 25 | // Close the client and dispose of all underlying resources. 26 | insights.dispose(); 27 | } 28 | -------------------------------------------------------------------------------- /packages/client_recommend/lib/src/model/trending_facets_model.dart: -------------------------------------------------------------------------------- 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 | // ignore_for_file: unused_element 3 | import 'package:json_annotation/json_annotation.dart'; 4 | 5 | /// Trending facet values model. This model recommends trending facet values for the specified facet attribute. 6 | @JsonEnum(valueField: 'raw') 7 | enum TrendingFacetsModel { 8 | trendingFacets(r'trending-facets'); 9 | 10 | const TrendingFacetsModel(this.raw); 11 | final dynamic raw; 12 | 13 | dynamic toJson() => raw; 14 | 15 | static TrendingFacetsModel fromJson(dynamic json) { 16 | for (final value in values) { 17 | if (value.raw == json) return value; 18 | } 19 | throw ArgumentError.value(json, "raw", "No enum value with that value"); 20 | } 21 | 22 | @override 23 | String toString() => raw.toString(); 24 | } 25 | -------------------------------------------------------------------------------- /packages/client_search/lib/src/model/dictionary_entry_type.dart: -------------------------------------------------------------------------------- 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 | // ignore_for_file: unused_element 3 | import 'package:json_annotation/json_annotation.dart'; 4 | 5 | /// Whether a dictionary entry is provided by Algolia (standard), or has been added by you (custom). 6 | @JsonEnum(valueField: 'raw') 7 | enum DictionaryEntryType { 8 | custom(r'custom'), 9 | standard(r'standard'); 10 | 11 | const DictionaryEntryType(this.raw); 12 | final dynamic raw; 13 | 14 | dynamic toJson() => raw; 15 | 16 | static DictionaryEntryType fromJson(dynamic json) { 17 | for (final value in values) { 18 | if (value.raw == json) return value; 19 | } 20 | throw ArgumentError.value(json, "raw", "No enum value with that value"); 21 | } 22 | 23 | @override 24 | String toString() => raw.toString(); 25 | } 26 | -------------------------------------------------------------------------------- /packages/client_search/lib/src/model/list_clusters_response.g.dart: -------------------------------------------------------------------------------- 1 | // GENERATED CODE - DO NOT MODIFY BY HAND 2 | 3 | part of 'list_clusters_response.dart'; 4 | 5 | // ************************************************************************** 6 | // JsonSerializableGenerator 7 | // ************************************************************************** 8 | 9 | ListClustersResponse _$ListClustersResponseFromJson( 10 | Map json) => 11 | $checkedCreate( 12 | 'ListClustersResponse', 13 | json, 14 | ($checkedConvert) { 15 | final val = ListClustersResponse( 16 | topUsers: $checkedConvert('topUsers', 17 | (v) => (v as List).map((e) => e as String).toList()), 18 | ); 19 | return val; 20 | }, 21 | ); 22 | 23 | Map _$ListClustersResponseToJson( 24 | ListClustersResponse instance) => 25 | { 26 | 'topUsers': instance.topUsers, 27 | }; 28 | -------------------------------------------------------------------------------- /packages/client_search/lib/src/model/mode.dart: -------------------------------------------------------------------------------- 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 | // ignore_for_file: unused_element 3 | import 'package:json_annotation/json_annotation.dart'; 4 | 5 | /// Search mode the index will use to query for results. This setting only applies to indices, for which Algolia enabled NeuralSearch for you. 6 | @JsonEnum(valueField: 'raw') 7 | enum Mode { 8 | neuralSearch(r'neuralSearch'), 9 | keywordSearch(r'keywordSearch'); 10 | 11 | const Mode(this.raw); 12 | final dynamic raw; 13 | 14 | dynamic toJson() => raw; 15 | 16 | static Mode fromJson(dynamic json) { 17 | for (final value in values) { 18 | if (value.raw == json) return value; 19 | } 20 | throw ArgumentError.value(json, "raw", "No enum value with that value"); 21 | } 22 | 23 | @override 24 | String toString() => raw.toString(); 25 | } 26 | -------------------------------------------------------------------------------- /packages/algoliasearch/lib/src/model/with_primary.g.dart: -------------------------------------------------------------------------------- 1 | // GENERATED CODE - DO NOT MODIFY BY HAND 2 | 3 | part of 'with_primary.dart'; 4 | 5 | // ************************************************************************** 6 | // JsonSerializableGenerator 7 | // ************************************************************************** 8 | 9 | WithPrimary _$WithPrimaryFromJson(Map json) => $checkedCreate( 10 | 'WithPrimary', 11 | json, 12 | ($checkedConvert) { 13 | final val = WithPrimary( 14 | primary: $checkedConvert('primary', (v) => v as String?), 15 | ); 16 | return val; 17 | }, 18 | ); 19 | 20 | Map _$WithPrimaryToJson(WithPrimary instance) { 21 | final val = {}; 22 | 23 | void writeNotNull(String key, dynamic value) { 24 | if (value != null) { 25 | val[key] = value; 26 | } 27 | } 28 | 29 | writeNotNull('primary', instance.primary); 30 | return val; 31 | } 32 | -------------------------------------------------------------------------------- /packages/client_search/lib/src/model/deleted_at_response.g.dart: -------------------------------------------------------------------------------- 1 | // GENERATED CODE - DO NOT MODIFY BY HAND 2 | 3 | part of 'deleted_at_response.dart'; 4 | 5 | // ************************************************************************** 6 | // JsonSerializableGenerator 7 | // ************************************************************************** 8 | 9 | DeletedAtResponse _$DeletedAtResponseFromJson(Map json) => 10 | $checkedCreate( 11 | 'DeletedAtResponse', 12 | json, 13 | ($checkedConvert) { 14 | final val = DeletedAtResponse( 15 | taskID: $checkedConvert('taskID', (v) => (v as num).toInt()), 16 | deletedAt: $checkedConvert('deletedAt', (v) => v as String), 17 | ); 18 | return val; 19 | }, 20 | ); 21 | 22 | Map _$DeletedAtResponseToJson(DeletedAtResponse instance) => 23 | { 24 | 'taskID': instance.taskID, 25 | 'deletedAt': instance.deletedAt, 26 | }; 27 | -------------------------------------------------------------------------------- /packages/client_search/lib/src/model/updated_at_response.g.dart: -------------------------------------------------------------------------------- 1 | // GENERATED CODE - DO NOT MODIFY BY HAND 2 | 3 | part of 'updated_at_response.dart'; 4 | 5 | // ************************************************************************** 6 | // JsonSerializableGenerator 7 | // ************************************************************************** 8 | 9 | UpdatedAtResponse _$UpdatedAtResponseFromJson(Map json) => 10 | $checkedCreate( 11 | 'UpdatedAtResponse', 12 | json, 13 | ($checkedConvert) { 14 | final val = UpdatedAtResponse( 15 | taskID: $checkedConvert('taskID', (v) => (v as num).toInt()), 16 | updatedAt: $checkedConvert('updatedAt', (v) => v as String), 17 | ); 18 | return val; 19 | }, 20 | ); 21 | 22 | Map _$UpdatedAtResponseToJson(UpdatedAtResponse instance) => 23 | { 24 | 'taskID': instance.taskID, 25 | 'updatedAt': instance.updatedAt, 26 | }; 27 | -------------------------------------------------------------------------------- /packages/client_search/lib/src/model/with_primary.g.dart: -------------------------------------------------------------------------------- 1 | // GENERATED CODE - DO NOT MODIFY BY HAND 2 | 3 | part of 'with_primary.dart'; 4 | 5 | // ************************************************************************** 6 | // JsonSerializableGenerator 7 | // ************************************************************************** 8 | 9 | WithPrimary _$WithPrimaryFromJson(Map json) => $checkedCreate( 10 | 'WithPrimary', 11 | json, 12 | ($checkedConvert) { 13 | final val = WithPrimary( 14 | primary: $checkedConvert('primary', (v) => v as String?), 15 | ); 16 | return val; 17 | }, 18 | ); 19 | 20 | Map _$WithPrimaryToJson(WithPrimary instance) { 21 | final val = {}; 22 | 23 | void writeNotNull(String key, dynamic value) { 24 | if (value != null) { 25 | val[key] = value; 26 | } 27 | } 28 | 29 | writeNotNull('primary', instance.primary); 30 | return val; 31 | } 32 | -------------------------------------------------------------------------------- /packages/client_recommend/lib/src/model/deleted_at_response.g.dart: -------------------------------------------------------------------------------- 1 | // GENERATED CODE - DO NOT MODIFY BY HAND 2 | 3 | part of 'deleted_at_response.dart'; 4 | 5 | // ************************************************************************** 6 | // JsonSerializableGenerator 7 | // ************************************************************************** 8 | 9 | DeletedAtResponse _$DeletedAtResponseFromJson(Map json) => 10 | $checkedCreate( 11 | 'DeletedAtResponse', 12 | json, 13 | ($checkedConvert) { 14 | final val = DeletedAtResponse( 15 | taskID: $checkedConvert('taskID', (v) => (v as num).toInt()), 16 | deletedAt: $checkedConvert('deletedAt', (v) => v as String), 17 | ); 18 | return val; 19 | }, 20 | ); 21 | 22 | Map _$DeletedAtResponseToJson(DeletedAtResponse instance) => 23 | { 24 | 'taskID': instance.taskID, 25 | 'deletedAt': instance.deletedAt, 26 | }; 27 | -------------------------------------------------------------------------------- /packages/client_abtesting_v3/lib/src/model/error_correction_type.dart: -------------------------------------------------------------------------------- 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 | // ignore_for_file: unused_element 3 | import 'package:json_annotation/json_annotation.dart'; 4 | 5 | /// Multiple-testing correction method applied when evaluating metric significance. 6 | @JsonEnum(valueField: 'raw') 7 | enum ErrorCorrectionType { 8 | bonferroni(r'bonferroni'), 9 | benjaminiHochberg(r'benjamini-hochberg'); 10 | 11 | const ErrorCorrectionType(this.raw); 12 | final dynamic raw; 13 | 14 | dynamic toJson() => raw; 15 | 16 | static ErrorCorrectionType fromJson(dynamic json) { 17 | for (final value in values) { 18 | if (value.raw == json) return value; 19 | } 20 | throw ArgumentError.value(json, "raw", "No enum value with that value"); 21 | } 22 | 23 | @override 24 | String toString() => raw.toString(); 25 | } 26 | -------------------------------------------------------------------------------- /packages/client_search/lib/src/model/facets.g.dart: -------------------------------------------------------------------------------- 1 | // GENERATED CODE - DO NOT MODIFY BY HAND 2 | 3 | part of 'facets.dart'; 4 | 5 | // ************************************************************************** 6 | // JsonSerializableGenerator 7 | // ************************************************************************** 8 | 9 | Facets _$FacetsFromJson(Map json) => $checkedCreate( 10 | 'Facets', 11 | json, 12 | ($checkedConvert) { 13 | final val = Facets( 14 | order: $checkedConvert('order', 15 | (v) => (v as List?)?.map((e) => e as String).toList()), 16 | ); 17 | return val; 18 | }, 19 | ); 20 | 21 | Map _$FacetsToJson(Facets instance) { 22 | final val = {}; 23 | 24 | void writeNotNull(String key, dynamic value) { 25 | if (value != null) { 26 | val[key] = value; 27 | } 28 | } 29 | 30 | writeNotNull('order', instance.order); 31 | return val; 32 | } 33 | -------------------------------------------------------------------------------- /packages/algoliasearch/lib/src/model/alternatives_as_exact.dart: -------------------------------------------------------------------------------- 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 | // ignore_for_file: unused_element 3 | import 'package:json_annotation/json_annotation.dart'; 4 | 5 | @JsonEnum(valueField: 'raw') 6 | enum AlternativesAsExact { 7 | ignorePlurals(r'ignorePlurals'), 8 | singleWordSynonym(r'singleWordSynonym'), 9 | multiWordsSynonym(r'multiWordsSynonym'), 10 | ignoreConjugations(r'ignoreConjugations'); 11 | 12 | const AlternativesAsExact(this.raw); 13 | final dynamic raw; 14 | 15 | dynamic toJson() => raw; 16 | 17 | static AlternativesAsExact fromJson(dynamic json) { 18 | for (final value in values) { 19 | if (value.raw == json) return value; 20 | } 21 | throw ArgumentError.value(json, "raw", "No enum value with that value"); 22 | } 23 | 24 | @override 25 | String toString() => raw.toString(); 26 | } 27 | -------------------------------------------------------------------------------- /packages/algoliasearch/lib/src/model/banner_image_url.g.dart: -------------------------------------------------------------------------------- 1 | // GENERATED CODE - DO NOT MODIFY BY HAND 2 | 3 | part of 'banner_image_url.dart'; 4 | 5 | // ************************************************************************** 6 | // JsonSerializableGenerator 7 | // ************************************************************************** 8 | 9 | BannerImageUrl _$BannerImageUrlFromJson(Map json) => 10 | $checkedCreate( 11 | 'BannerImageUrl', 12 | json, 13 | ($checkedConvert) { 14 | final val = BannerImageUrl( 15 | url: $checkedConvert('url', (v) => v as String?), 16 | ); 17 | return val; 18 | }, 19 | ); 20 | 21 | Map _$BannerImageUrlToJson(BannerImageUrl instance) { 22 | final val = {}; 23 | 24 | void writeNotNull(String key, dynamic value) { 25 | if (value != null) { 26 | val[key] = value; 27 | } 28 | } 29 | 30 | writeNotNull('url', instance.url); 31 | return val; 32 | } 33 | -------------------------------------------------------------------------------- /packages/client_recommend/lib/src/model/alternatives_as_exact.dart: -------------------------------------------------------------------------------- 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 | // ignore_for_file: unused_element 3 | import 'package:json_annotation/json_annotation.dart'; 4 | 5 | @JsonEnum(valueField: 'raw') 6 | enum AlternativesAsExact { 7 | ignorePlurals(r'ignorePlurals'), 8 | singleWordSynonym(r'singleWordSynonym'), 9 | multiWordsSynonym(r'multiWordsSynonym'), 10 | ignoreConjugations(r'ignoreConjugations'); 11 | 12 | const AlternativesAsExact(this.raw); 13 | final dynamic raw; 14 | 15 | dynamic toJson() => raw; 16 | 17 | static AlternativesAsExact fromJson(dynamic json) { 18 | for (final value in values) { 19 | if (value.raw == json) return value; 20 | } 21 | throw ArgumentError.value(json, "raw", "No enum value with that value"); 22 | } 23 | 24 | @override 25 | String toString() => raw.toString(); 26 | } 27 | -------------------------------------------------------------------------------- /packages/client_recommend/lib/src/model/banner_image_url.g.dart: -------------------------------------------------------------------------------- 1 | // GENERATED CODE - DO NOT MODIFY BY HAND 2 | 3 | part of 'banner_image_url.dart'; 4 | 5 | // ************************************************************************** 6 | // JsonSerializableGenerator 7 | // ************************************************************************** 8 | 9 | BannerImageUrl _$BannerImageUrlFromJson(Map json) => 10 | $checkedCreate( 11 | 'BannerImageUrl', 12 | json, 13 | ($checkedConvert) { 14 | final val = BannerImageUrl( 15 | url: $checkedConvert('url', (v) => v as String?), 16 | ); 17 | return val; 18 | }, 19 | ); 20 | 21 | Map _$BannerImageUrlToJson(BannerImageUrl instance) { 22 | final val = {}; 23 | 24 | void writeNotNull(String key, dynamic value) { 25 | if (value != null) { 26 | val[key] = value; 27 | } 28 | } 29 | 30 | writeNotNull('url', instance.url); 31 | return val; 32 | } 33 | -------------------------------------------------------------------------------- /packages/client_search/lib/src/model/alternatives_as_exact.dart: -------------------------------------------------------------------------------- 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 | // ignore_for_file: unused_element 3 | import 'package:json_annotation/json_annotation.dart'; 4 | 5 | @JsonEnum(valueField: 'raw') 6 | enum AlternativesAsExact { 7 | ignorePlurals(r'ignorePlurals'), 8 | singleWordSynonym(r'singleWordSynonym'), 9 | multiWordsSynonym(r'multiWordsSynonym'), 10 | ignoreConjugations(r'ignoreConjugations'); 11 | 12 | const AlternativesAsExact(this.raw); 13 | final dynamic raw; 14 | 15 | dynamic toJson() => raw; 16 | 17 | static AlternativesAsExact fromJson(dynamic json) { 18 | for (final value in values) { 19 | if (value.raw == json) return value; 20 | } 21 | throw ArgumentError.value(json, "raw", "No enum value with that value"); 22 | } 23 | 24 | @override 25 | String toString() => raw.toString(); 26 | } 27 | -------------------------------------------------------------------------------- /packages/client_search/lib/src/model/banner_image_url.g.dart: -------------------------------------------------------------------------------- 1 | // GENERATED CODE - DO NOT MODIFY BY HAND 2 | 3 | part of 'banner_image_url.dart'; 4 | 5 | // ************************************************************************** 6 | // JsonSerializableGenerator 7 | // ************************************************************************** 8 | 9 | BannerImageUrl _$BannerImageUrlFromJson(Map json) => 10 | $checkedCreate( 11 | 'BannerImageUrl', 12 | json, 13 | ($checkedConvert) { 14 | final val = BannerImageUrl( 15 | url: $checkedConvert('url', (v) => v as String?), 16 | ); 17 | return val; 18 | }, 19 | ); 20 | 21 | Map _$BannerImageUrlToJson(BannerImageUrl instance) { 22 | final val = {}; 23 | 24 | void writeNotNull(String key, dynamic value) { 25 | if (value != null) { 26 | val[key] = value; 27 | } 28 | } 29 | 30 | writeNotNull('url', instance.url); 31 | return val; 32 | } 33 | -------------------------------------------------------------------------------- /packages/algoliasearch/lib/src/model/facet_hits.g.dart: -------------------------------------------------------------------------------- 1 | // GENERATED CODE - DO NOT MODIFY BY HAND 2 | 3 | part of 'facet_hits.dart'; 4 | 5 | // ************************************************************************** 6 | // JsonSerializableGenerator 7 | // ************************************************************************** 8 | 9 | FacetHits _$FacetHitsFromJson(Map json) => $checkedCreate( 10 | 'FacetHits', 11 | json, 12 | ($checkedConvert) { 13 | final val = FacetHits( 14 | value: $checkedConvert('value', (v) => v as String), 15 | highlighted: $checkedConvert('highlighted', (v) => v as String), 16 | count: $checkedConvert('count', (v) => (v as num).toInt()), 17 | ); 18 | return val; 19 | }, 20 | ); 21 | 22 | Map _$FacetHitsToJson(FacetHits instance) => { 23 | 'value': instance.value, 24 | 'highlighted': instance.highlighted, 25 | 'count': instance.count, 26 | }; 27 | -------------------------------------------------------------------------------- /packages/algoliasearch/lib/src/model/search_type_facet.dart: -------------------------------------------------------------------------------- 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 | // ignore_for_file: unused_element 3 | import 'package:json_annotation/json_annotation.dart'; 4 | 5 | /// - `default`: perform a search query - `facet` [searches for facet values](https://www.algolia.com/doc/guides/managing-results/refine-results/faceting/#search-for-facet-values). 6 | @JsonEnum(valueField: 'raw') 7 | enum SearchTypeFacet { 8 | facet(r'facet'); 9 | 10 | const SearchTypeFacet(this.raw); 11 | final dynamic raw; 12 | 13 | dynamic toJson() => raw; 14 | 15 | static SearchTypeFacet fromJson(dynamic json) { 16 | for (final value in values) { 17 | if (value.raw == json) return value; 18 | } 19 | throw ArgumentError.value(json, "raw", "No enum value with that value"); 20 | } 21 | 22 | @override 23 | String toString() => raw.toString(); 24 | } 25 | -------------------------------------------------------------------------------- /packages/client_composition/lib/src/model/alternatives_as_exact.dart: -------------------------------------------------------------------------------- 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 | // ignore_for_file: unused_element 3 | import 'package:json_annotation/json_annotation.dart'; 4 | 5 | @JsonEnum(valueField: 'raw') 6 | enum AlternativesAsExact { 7 | ignorePlurals(r'ignorePlurals'), 8 | singleWordSynonym(r'singleWordSynonym'), 9 | multiWordsSynonym(r'multiWordsSynonym'), 10 | ignoreConjugations(r'ignoreConjugations'); 11 | 12 | const AlternativesAsExact(this.raw); 13 | final dynamic raw; 14 | 15 | dynamic toJson() => raw; 16 | 17 | static AlternativesAsExact fromJson(dynamic json) { 18 | for (final value in values) { 19 | if (value.raw == json) return value; 20 | } 21 | throw ArgumentError.value(json, "raw", "No enum value with that value"); 22 | } 23 | 24 | @override 25 | String toString() => raw.toString(); 26 | } 27 | -------------------------------------------------------------------------------- /packages/client_composition/lib/src/model/banner_image_url.g.dart: -------------------------------------------------------------------------------- 1 | // GENERATED CODE - DO NOT MODIFY BY HAND 2 | 3 | part of 'banner_image_url.dart'; 4 | 5 | // ************************************************************************** 6 | // JsonSerializableGenerator 7 | // ************************************************************************** 8 | 9 | BannerImageUrl _$BannerImageUrlFromJson(Map json) => 10 | $checkedCreate( 11 | 'BannerImageUrl', 12 | json, 13 | ($checkedConvert) { 14 | final val = BannerImageUrl( 15 | url: $checkedConvert('url', (v) => v as String?), 16 | ); 17 | return val; 18 | }, 19 | ); 20 | 21 | Map _$BannerImageUrlToJson(BannerImageUrl instance) { 22 | final val = {}; 23 | 24 | void writeNotNull(String key, dynamic value) { 25 | if (value != null) { 26 | val[key] = value; 27 | } 28 | } 29 | 30 | writeNotNull('url', instance.url); 31 | return val; 32 | } 33 | -------------------------------------------------------------------------------- /packages/client_search/lib/src/model/batch_response.g.dart: -------------------------------------------------------------------------------- 1 | // GENERATED CODE - DO NOT MODIFY BY HAND 2 | 3 | part of 'batch_response.dart'; 4 | 5 | // ************************************************************************** 6 | // JsonSerializableGenerator 7 | // ************************************************************************** 8 | 9 | BatchResponse _$BatchResponseFromJson(Map json) => 10 | $checkedCreate( 11 | 'BatchResponse', 12 | json, 13 | ($checkedConvert) { 14 | final val = BatchResponse( 15 | taskID: $checkedConvert('taskID', (v) => (v as num).toInt()), 16 | objectIDs: $checkedConvert('objectIDs', 17 | (v) => (v as List).map((e) => e as String).toList()), 18 | ); 19 | return val; 20 | }, 21 | ); 22 | 23 | Map _$BatchResponseToJson(BatchResponse instance) => 24 | { 25 | 'taskID': instance.taskID, 26 | 'objectIDs': instance.objectIDs, 27 | }; 28 | -------------------------------------------------------------------------------- /packages/client_search/lib/src/model/facet_hits.g.dart: -------------------------------------------------------------------------------- 1 | // GENERATED CODE - DO NOT MODIFY BY HAND 2 | 3 | part of 'facet_hits.dart'; 4 | 5 | // ************************************************************************** 6 | // JsonSerializableGenerator 7 | // ************************************************************************** 8 | 9 | FacetHits _$FacetHitsFromJson(Map json) => $checkedCreate( 10 | 'FacetHits', 11 | json, 12 | ($checkedConvert) { 13 | final val = FacetHits( 14 | value: $checkedConvert('value', (v) => v as String), 15 | highlighted: $checkedConvert('highlighted', (v) => v as String), 16 | count: $checkedConvert('count', (v) => (v as num).toInt()), 17 | ); 18 | return val; 19 | }, 20 | ); 21 | 22 | Map _$FacetHitsToJson(FacetHits instance) => { 23 | 'value': instance.value, 24 | 'highlighted': instance.highlighted, 25 | 'count': instance.count, 26 | }; 27 | -------------------------------------------------------------------------------- /packages/client_search/lib/src/model/search_type_facet.dart: -------------------------------------------------------------------------------- 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 | // ignore_for_file: unused_element 3 | import 'package:json_annotation/json_annotation.dart'; 4 | 5 | /// - `default`: perform a search query - `facet` [searches for facet values](https://www.algolia.com/doc/guides/managing-results/refine-results/faceting/#search-for-facet-values). 6 | @JsonEnum(valueField: 'raw') 7 | enum SearchTypeFacet { 8 | facet(r'facet'); 9 | 10 | const SearchTypeFacet(this.raw); 11 | final dynamic raw; 12 | 13 | dynamic toJson() => raw; 14 | 15 | static SearchTypeFacet fromJson(dynamic json) { 16 | for (final value in values) { 17 | if (value.raw == json) return value; 18 | } 19 | throw ArgumentError.value(json, "raw", "No enum value with that value"); 20 | } 21 | 22 | @override 23 | String toString() => raw.toString(); 24 | } 25 | -------------------------------------------------------------------------------- /packages/algoliasearch/lib/src/model/looking_similar_model.dart: -------------------------------------------------------------------------------- 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 | // ignore_for_file: unused_element 3 | import 'package:json_annotation/json_annotation.dart'; 4 | 5 | /// Looking similar model. This model recommends items that look similar to the item with the ID `objectID` based on image attributes in your index. 6 | @JsonEnum(valueField: 'raw') 7 | enum LookingSimilarModel { 8 | lookingSimilar(r'looking-similar'); 9 | 10 | const LookingSimilarModel(this.raw); 11 | final dynamic raw; 12 | 13 | dynamic toJson() => raw; 14 | 15 | static LookingSimilarModel fromJson(dynamic json) { 16 | for (final value in values) { 17 | if (value.raw == json) return value; 18 | } 19 | throw ArgumentError.value(json, "raw", "No enum value with that value"); 20 | } 21 | 22 | @override 23 | String toString() => raw.toString(); 24 | } 25 | -------------------------------------------------------------------------------- /packages/client_composition/lib/src/model/facet_hits.g.dart: -------------------------------------------------------------------------------- 1 | // GENERATED CODE - DO NOT MODIFY BY HAND 2 | 3 | part of 'facet_hits.dart'; 4 | 5 | // ************************************************************************** 6 | // JsonSerializableGenerator 7 | // ************************************************************************** 8 | 9 | FacetHits _$FacetHitsFromJson(Map json) => $checkedCreate( 10 | 'FacetHits', 11 | json, 12 | ($checkedConvert) { 13 | final val = FacetHits( 14 | value: $checkedConvert('value', (v) => v as String), 15 | highlighted: $checkedConvert('highlighted', (v) => v as String), 16 | count: $checkedConvert('count', (v) => (v as num).toInt()), 17 | ); 18 | return val; 19 | }, 20 | ); 21 | 22 | Map _$FacetHitsToJson(FacetHits instance) => { 23 | 'value': instance.value, 24 | 'highlighted': instance.highlighted, 25 | 'count': instance.count, 26 | }; 27 | -------------------------------------------------------------------------------- /packages/client_recommend/lib/src/model/rule_metadata.g.dart: -------------------------------------------------------------------------------- 1 | // GENERATED CODE - DO NOT MODIFY BY HAND 2 | 3 | part of 'rule_metadata.dart'; 4 | 5 | // ************************************************************************** 6 | // JsonSerializableGenerator 7 | // ************************************************************************** 8 | 9 | RuleMetadata _$RuleMetadataFromJson(Map json) => 10 | $checkedCreate( 11 | 'RuleMetadata', 12 | json, 13 | ($checkedConvert) { 14 | final val = RuleMetadata( 15 | lastUpdate: $checkedConvert('lastUpdate', (v) => v as String?), 16 | ); 17 | return val; 18 | }, 19 | ); 20 | 21 | Map _$RuleMetadataToJson(RuleMetadata instance) { 22 | final val = {}; 23 | 24 | void writeNotNull(String key, dynamic value) { 25 | if (value != null) { 26 | val[key] = value; 27 | } 28 | } 29 | 30 | writeNotNull('lastUpdate', instance.lastUpdate); 31 | return val; 32 | } 33 | -------------------------------------------------------------------------------- /packages/client_recommend/lib/src/model/looking_similar_model.dart: -------------------------------------------------------------------------------- 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 | // ignore_for_file: unused_element 3 | import 'package:json_annotation/json_annotation.dart'; 4 | 5 | /// Looking similar model. This model recommends items that look similar to the item with the ID `objectID` based on image attributes in your index. 6 | @JsonEnum(valueField: 'raw') 7 | enum LookingSimilarModel { 8 | lookingSimilar(r'looking-similar'); 9 | 10 | const LookingSimilarModel(this.raw); 11 | final dynamic raw; 12 | 13 | dynamic toJson() => raw; 14 | 15 | static LookingSimilarModel fromJson(dynamic json) { 16 | for (final value in values) { 17 | if (value.raw == json) return value; 18 | } 19 | throw ArgumentError.value(json, "raw", "No enum value with that value"); 20 | } 21 | 22 | @override 23 | String toString() => raw.toString(); 24 | } 25 | -------------------------------------------------------------------------------- /packages/client_search/lib/src/model/update_api_key_response.g.dart: -------------------------------------------------------------------------------- 1 | // GENERATED CODE - DO NOT MODIFY BY HAND 2 | 3 | part of 'update_api_key_response.dart'; 4 | 5 | // ************************************************************************** 6 | // JsonSerializableGenerator 7 | // ************************************************************************** 8 | 9 | UpdateApiKeyResponse _$UpdateApiKeyResponseFromJson( 10 | Map json) => 11 | $checkedCreate( 12 | 'UpdateApiKeyResponse', 13 | json, 14 | ($checkedConvert) { 15 | final val = UpdateApiKeyResponse( 16 | key: $checkedConvert('key', (v) => v as String), 17 | updatedAt: $checkedConvert('updatedAt', (v) => v as String), 18 | ); 19 | return val; 20 | }, 21 | ); 22 | 23 | Map _$UpdateApiKeyResponseToJson( 24 | UpdateApiKeyResponse instance) => 25 | { 26 | 'key': instance.key, 27 | 'updatedAt': instance.updatedAt, 28 | }; 29 | -------------------------------------------------------------------------------- /packages/algoliasearch/lib/src/model/search_type_default.dart: -------------------------------------------------------------------------------- 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 | // ignore_for_file: unused_element 3 | import 'package:json_annotation/json_annotation.dart'; 4 | 5 | /// - `default`: perform a search query - `facet` [searches for facet values](https://www.algolia.com/doc/guides/managing-results/refine-results/faceting/#search-for-facet-values). 6 | @JsonEnum(valueField: 'raw') 7 | enum SearchTypeDefault { 8 | default_(r'default'); 9 | 10 | const SearchTypeDefault(this.raw); 11 | final dynamic raw; 12 | 13 | dynamic toJson() => raw; 14 | 15 | static SearchTypeDefault fromJson(dynamic json) { 16 | for (final value in values) { 17 | if (value.raw == json) return value; 18 | } 19 | throw ArgumentError.value(json, "raw", "No enum value with that value"); 20 | } 21 | 22 | @override 23 | String toString() => raw.toString(); 24 | } 25 | -------------------------------------------------------------------------------- /packages/client_search/lib/src/model/get_logs_response.g.dart: -------------------------------------------------------------------------------- 1 | // GENERATED CODE - DO NOT MODIFY BY HAND 2 | 3 | part of 'get_logs_response.dart'; 4 | 5 | // ************************************************************************** 6 | // JsonSerializableGenerator 7 | // ************************************************************************** 8 | 9 | GetLogsResponse _$GetLogsResponseFromJson(Map json) => 10 | $checkedCreate( 11 | 'GetLogsResponse', 12 | json, 13 | ($checkedConvert) { 14 | final val = GetLogsResponse( 15 | logs: $checkedConvert( 16 | 'logs', 17 | (v) => (v as List) 18 | .map((e) => Log.fromJson(e as Map)) 19 | .toList()), 20 | ); 21 | return val; 22 | }, 23 | ); 24 | 25 | Map _$GetLogsResponseToJson(GetLogsResponse instance) => 26 | { 27 | 'logs': instance.logs.map((e) => e.toJson()).toList(), 28 | }; 29 | -------------------------------------------------------------------------------- /packages/client_search/lib/src/model/search_type_default.dart: -------------------------------------------------------------------------------- 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 | // ignore_for_file: unused_element 3 | import 'package:json_annotation/json_annotation.dart'; 4 | 5 | /// - `default`: perform a search query - `facet` [searches for facet values](https://www.algolia.com/doc/guides/managing-results/refine-results/faceting/#search-for-facet-values). 6 | @JsonEnum(valueField: 'raw') 7 | enum SearchTypeDefault { 8 | default_(r'default'); 9 | 10 | const SearchTypeDefault(this.raw); 11 | final dynamic raw; 12 | 13 | dynamic toJson() => raw; 14 | 15 | static SearchTypeDefault fromJson(dynamic json) { 16 | for (final value in values) { 17 | if (value.raw == json) return value; 18 | } 19 | throw ArgumentError.value(json, "raw", "No enum value with that value"); 20 | } 21 | 22 | @override 23 | String toString() => raw.toString(); 24 | } 25 | -------------------------------------------------------------------------------- /packages/algoliasearch/lib/src/model/related_model.dart: -------------------------------------------------------------------------------- 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 | // ignore_for_file: unused_element 3 | import 'package:json_annotation/json_annotation.dart'; 4 | 5 | /// Related products or similar content model. This model recommends items that are similar to the item with the ID `objectID`. Similarity is determined from the user interactions and attributes. 6 | @JsonEnum(valueField: 'raw') 7 | enum RelatedModel { 8 | relatedProducts(r'related-products'); 9 | 10 | const RelatedModel(this.raw); 11 | final dynamic raw; 12 | 13 | dynamic toJson() => raw; 14 | 15 | static RelatedModel fromJson(dynamic json) { 16 | for (final value in values) { 17 | if (value.raw == json) return value; 18 | } 19 | throw ArgumentError.value(json, "raw", "No enum value with that value"); 20 | } 21 | 22 | @override 23 | String toString() => raw.toString(); 24 | } 25 | -------------------------------------------------------------------------------- /packages/algoliasearch/lib/src/model/search_params_query.g.dart: -------------------------------------------------------------------------------- 1 | // GENERATED CODE - DO NOT MODIFY BY HAND 2 | 3 | part of 'search_params_query.dart'; 4 | 5 | // ************************************************************************** 6 | // JsonSerializableGenerator 7 | // ************************************************************************** 8 | 9 | SearchParamsQuery _$SearchParamsQueryFromJson(Map json) => 10 | $checkedCreate( 11 | 'SearchParamsQuery', 12 | json, 13 | ($checkedConvert) { 14 | final val = SearchParamsQuery( 15 | query: $checkedConvert('query', (v) => v as String?), 16 | ); 17 | return val; 18 | }, 19 | ); 20 | 21 | Map _$SearchParamsQueryToJson(SearchParamsQuery instance) { 22 | final val = {}; 23 | 24 | void writeNotNull(String key, dynamic value) { 25 | if (value != null) { 26 | val[key] = value; 27 | } 28 | } 29 | 30 | writeNotNull('query', instance.query); 31 | return val; 32 | } 33 | -------------------------------------------------------------------------------- /packages/client_core/lib/src/transport/dio/auth_interceptor.dart: -------------------------------------------------------------------------------- 1 | import 'package:dio/dio.dart'; 2 | 3 | /// Interceptor that attaches the application id and API key to outgoing requests. 4 | /// 5 | /// This interceptor modifies the headers of each request to include the 6 | /// application id and API key for Algolia authentication. 7 | class AuthInterceptor extends Interceptor { 8 | /// The application id used for Algolia authentication. 9 | final String appId; 10 | 11 | /// The API key used for Algolia authentication. 12 | String apiKey; 13 | 14 | /// Constructs an [AuthInterceptor] with the provided application id and API key. 15 | AuthInterceptor({ 16 | required this.appId, 17 | required this.apiKey, 18 | }); 19 | 20 | @override 21 | void onRequest(RequestOptions options, RequestInterceptorHandler handler) { 22 | options.headers.putIfAbsent("x-algolia-application-id", () => appId); 23 | options.headers.putIfAbsent("x-algolia-api-key", () => apiKey); 24 | super.onRequest(options, handler); 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /packages/client_search/lib/src/model/get_task_response.g.dart: -------------------------------------------------------------------------------- 1 | // GENERATED CODE - DO NOT MODIFY BY HAND 2 | 3 | part of 'get_task_response.dart'; 4 | 5 | // ************************************************************************** 6 | // JsonSerializableGenerator 7 | // ************************************************************************** 8 | 9 | GetTaskResponse _$GetTaskResponseFromJson(Map json) => 10 | $checkedCreate( 11 | 'GetTaskResponse', 12 | json, 13 | ($checkedConvert) { 14 | final val = GetTaskResponse( 15 | status: $checkedConvert( 16 | 'status', (v) => $enumDecode(_$TaskStatusEnumMap, v)), 17 | ); 18 | return val; 19 | }, 20 | ); 21 | 22 | Map _$GetTaskResponseToJson(GetTaskResponse instance) => 23 | { 24 | 'status': instance.status.toJson(), 25 | }; 26 | 27 | const _$TaskStatusEnumMap = { 28 | TaskStatus.published: 'published', 29 | TaskStatus.notPublished: 'notPublished', 30 | }; 31 | -------------------------------------------------------------------------------- /packages/client_search/lib/src/model/search_params_query.g.dart: -------------------------------------------------------------------------------- 1 | // GENERATED CODE - DO NOT MODIFY BY HAND 2 | 3 | part of 'search_params_query.dart'; 4 | 5 | // ************************************************************************** 6 | // JsonSerializableGenerator 7 | // ************************************************************************** 8 | 9 | SearchParamsQuery _$SearchParamsQueryFromJson(Map json) => 10 | $checkedCreate( 11 | 'SearchParamsQuery', 12 | json, 13 | ($checkedConvert) { 14 | final val = SearchParamsQuery( 15 | query: $checkedConvert('query', (v) => v as String?), 16 | ); 17 | return val; 18 | }, 19 | ); 20 | 21 | Map _$SearchParamsQueryToJson(SearchParamsQuery instance) { 22 | final val = {}; 23 | 24 | void writeNotNull(String key, dynamic value) { 25 | if (value != null) { 26 | val[key] = value; 27 | } 28 | } 29 | 30 | writeNotNull('query', instance.query); 31 | return val; 32 | } 33 | -------------------------------------------------------------------------------- /packages/client_composition/lib/src/model/get_task_response.g.dart: -------------------------------------------------------------------------------- 1 | // GENERATED CODE - DO NOT MODIFY BY HAND 2 | 3 | part of 'get_task_response.dart'; 4 | 5 | // ************************************************************************** 6 | // JsonSerializableGenerator 7 | // ************************************************************************** 8 | 9 | GetTaskResponse _$GetTaskResponseFromJson(Map json) => 10 | $checkedCreate( 11 | 'GetTaskResponse', 12 | json, 13 | ($checkedConvert) { 14 | final val = GetTaskResponse( 15 | status: $checkedConvert( 16 | 'status', (v) => $enumDecode(_$TaskStatusEnumMap, v)), 17 | ); 18 | return val; 19 | }, 20 | ); 21 | 22 | Map _$GetTaskResponseToJson(GetTaskResponse instance) => 23 | { 24 | 'status': instance.status.toJson(), 25 | }; 26 | 27 | const _$TaskStatusEnumMap = { 28 | TaskStatus.published: 'published', 29 | TaskStatus.notPublished: 'notPublished', 30 | }; 31 | -------------------------------------------------------------------------------- /packages/client_recommend/lib/src/model/related_model.dart: -------------------------------------------------------------------------------- 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 | // ignore_for_file: unused_element 3 | import 'package:json_annotation/json_annotation.dart'; 4 | 5 | /// Related products or similar content model. This model recommends items that are similar to the item with the ID `objectID`. Similarity is determined from the user interactions and attributes. 6 | @JsonEnum(valueField: 'raw') 7 | enum RelatedModel { 8 | relatedProducts(r'related-products'); 9 | 10 | const RelatedModel(this.raw); 11 | final dynamic raw; 12 | 13 | dynamic toJson() => raw; 14 | 15 | static RelatedModel fromJson(dynamic json) { 16 | for (final value in values) { 17 | if (value.raw == json) return value; 18 | } 19 | throw ArgumentError.value(json, "raw", "No enum value with that value"); 20 | } 21 | 22 | @override 23 | String toString() => raw.toString(); 24 | } 25 | -------------------------------------------------------------------------------- /packages/client_recommend/lib/src/model/search_params_query.g.dart: -------------------------------------------------------------------------------- 1 | // GENERATED CODE - DO NOT MODIFY BY HAND 2 | 3 | part of 'search_params_query.dart'; 4 | 5 | // ************************************************************************** 6 | // JsonSerializableGenerator 7 | // ************************************************************************** 8 | 9 | SearchParamsQuery _$SearchParamsQueryFromJson(Map json) => 10 | $checkedCreate( 11 | 'SearchParamsQuery', 12 | json, 13 | ($checkedConvert) { 14 | final val = SearchParamsQuery( 15 | query: $checkedConvert('query', (v) => v as String?), 16 | ); 17 | return val; 18 | }, 19 | ); 20 | 21 | Map _$SearchParamsQueryToJson(SearchParamsQuery instance) { 22 | final val = {}; 23 | 24 | void writeNotNull(String key, dynamic value) { 25 | if (value != null) { 26 | val[key] = value; 27 | } 28 | } 29 | 30 | writeNotNull('query', instance.query); 31 | return val; 32 | } 33 | -------------------------------------------------------------------------------- /packages/client_search/lib/src/model/batch_params.g.dart: -------------------------------------------------------------------------------- 1 | // GENERATED CODE - DO NOT MODIFY BY HAND 2 | 3 | part of 'batch_params.dart'; 4 | 5 | // ************************************************************************** 6 | // JsonSerializableGenerator 7 | // ************************************************************************** 8 | 9 | BatchParams _$BatchParamsFromJson(Map json) => $checkedCreate( 10 | 'BatchParams', 11 | json, 12 | ($checkedConvert) { 13 | final val = BatchParams( 14 | requests: $checkedConvert( 15 | 'requests', 16 | (v) => (v as List) 17 | .map((e) => 18 | MultipleBatchRequest.fromJson(e as Map)) 19 | .toList()), 20 | ); 21 | return val; 22 | }, 23 | ); 24 | 25 | Map _$BatchParamsToJson(BatchParams instance) => 26 | { 27 | 'requests': instance.requests.map((e) => e.toJson()).toList(), 28 | }; 29 | -------------------------------------------------------------------------------- /.github/workflows/do-not-edit-this-repository.yml: -------------------------------------------------------------------------------- 1 | name: Do not edit files in this repository 2 | 3 | on: 4 | pull_request_target: 5 | types: 6 | - opened 7 | - synchronize 8 | - reopened 9 | branches: 10 | - 'main' 11 | 12 | jobs: 13 | auto_close_pr: 14 | name: Close PR 15 | runs-on: ubuntu-latest 16 | steps: 17 | - uses: actions/checkout@v6 18 | 19 | - name: Close PR 20 | env: 21 | GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} 22 | PR_NUMBER: ${{ github.event.pull_request.number }} 23 | run: | 24 | gh pr close "${PR_NUMBER}" -d -c "Thanks for contributing to our API clients! Sorry to close your PR, but this repository is fully generated, you can port your changes to [the API Clients Automation repository](https://github.com/algolia/api-clients-automation). If you need some guidance, feel free to [open an issue](https://github.com/algolia/api-clients-automation/issues) or [read our contribution guide](https://api-clients-automation.netlify.app/docs/introduction)." 25 | -------------------------------------------------------------------------------- /packages/algoliasearch/lib/src/model/base_get_api_key_response.g.dart: -------------------------------------------------------------------------------- 1 | // GENERATED CODE - DO NOT MODIFY BY HAND 2 | 3 | part of 'base_get_api_key_response.dart'; 4 | 5 | // ************************************************************************** 6 | // JsonSerializableGenerator 7 | // ************************************************************************** 8 | 9 | BaseGetApiKeyResponse _$BaseGetApiKeyResponseFromJson( 10 | Map json) => 11 | $checkedCreate( 12 | 'BaseGetApiKeyResponse', 13 | json, 14 | ($checkedConvert) { 15 | final val = BaseGetApiKeyResponse( 16 | value: $checkedConvert('value', (v) => v as String), 17 | createdAt: $checkedConvert('createdAt', (v) => (v as num).toInt()), 18 | ); 19 | return val; 20 | }, 21 | ); 22 | 23 | Map _$BaseGetApiKeyResponseToJson( 24 | BaseGetApiKeyResponse instance) => 25 | { 26 | 'value': instance.value, 27 | 'createdAt': instance.createdAt, 28 | }; 29 | -------------------------------------------------------------------------------- /packages/algoliasearch/lib/src/model/search_params_string.g.dart: -------------------------------------------------------------------------------- 1 | // GENERATED CODE - DO NOT MODIFY BY HAND 2 | 3 | part of 'search_params_string.dart'; 4 | 5 | // ************************************************************************** 6 | // JsonSerializableGenerator 7 | // ************************************************************************** 8 | 9 | SearchParamsString _$SearchParamsStringFromJson(Map json) => 10 | $checkedCreate( 11 | 'SearchParamsString', 12 | json, 13 | ($checkedConvert) { 14 | final val = SearchParamsString( 15 | params: $checkedConvert('params', (v) => v as String?), 16 | ); 17 | return val; 18 | }, 19 | ); 20 | 21 | Map _$SearchParamsStringToJson(SearchParamsString instance) { 22 | final val = {}; 23 | 24 | void writeNotNull(String key, dynamic value) { 25 | if (value != null) { 26 | val[key] = value; 27 | } 28 | } 29 | 30 | writeNotNull('params', instance.params); 31 | return val; 32 | } 33 | -------------------------------------------------------------------------------- /packages/client_composition/lib/src/model/batch_params.g.dart: -------------------------------------------------------------------------------- 1 | // GENERATED CODE - DO NOT MODIFY BY HAND 2 | 3 | part of 'batch_params.dart'; 4 | 5 | // ************************************************************************** 6 | // JsonSerializableGenerator 7 | // ************************************************************************** 8 | 9 | BatchParams _$BatchParamsFromJson(Map json) => $checkedCreate( 10 | 'BatchParams', 11 | json, 12 | ($checkedConvert) { 13 | final val = BatchParams( 14 | requests: $checkedConvert( 15 | 'requests', 16 | (v) => (v as List) 17 | .map((e) => 18 | MultipleBatchRequest.fromJson(e as Map)) 19 | .toList()), 20 | ); 21 | return val; 22 | }, 23 | ); 24 | 25 | Map _$BatchParamsToJson(BatchParams instance) => 26 | { 27 | 'requests': instance.requests.map((e) => e.toJson()).toList(), 28 | }; 29 | -------------------------------------------------------------------------------- /packages/client_composition/lib/src/model/composition_rule_consequence.g.dart: -------------------------------------------------------------------------------- 1 | // GENERATED CODE - DO NOT MODIFY BY HAND 2 | 3 | part of 'composition_rule_consequence.dart'; 4 | 5 | // ************************************************************************** 6 | // JsonSerializableGenerator 7 | // ************************************************************************** 8 | 9 | CompositionRuleConsequence _$CompositionRuleConsequenceFromJson( 10 | Map json) => 11 | $checkedCreate( 12 | 'CompositionRuleConsequence', 13 | json, 14 | ($checkedConvert) { 15 | final val = CompositionRuleConsequence( 16 | behavior: $checkedConvert('behavior', 17 | (v) => CompositionBehavior.fromJson(v as Map)), 18 | ); 19 | return val; 20 | }, 21 | ); 22 | 23 | Map _$CompositionRuleConsequenceToJson( 24 | CompositionRuleConsequence instance) => 25 | { 26 | 'behavior': instance.behavior.toJson(), 27 | }; 28 | -------------------------------------------------------------------------------- /packages/client_search/lib/src/model/base_get_api_key_response.g.dart: -------------------------------------------------------------------------------- 1 | // GENERATED CODE - DO NOT MODIFY BY HAND 2 | 3 | part of 'base_get_api_key_response.dart'; 4 | 5 | // ************************************************************************** 6 | // JsonSerializableGenerator 7 | // ************************************************************************** 8 | 9 | BaseGetApiKeyResponse _$BaseGetApiKeyResponseFromJson( 10 | Map json) => 11 | $checkedCreate( 12 | 'BaseGetApiKeyResponse', 13 | json, 14 | ($checkedConvert) { 15 | final val = BaseGetApiKeyResponse( 16 | value: $checkedConvert('value', (v) => v as String), 17 | createdAt: $checkedConvert('createdAt', (v) => (v as num).toInt()), 18 | ); 19 | return val; 20 | }, 21 | ); 22 | 23 | Map _$BaseGetApiKeyResponseToJson( 24 | BaseGetApiKeyResponse instance) => 25 | { 26 | 'value': instance.value, 27 | 'createdAt': instance.createdAt, 28 | }; 29 | -------------------------------------------------------------------------------- /packages/client_search/lib/src/model/promote_object_ids.g.dart: -------------------------------------------------------------------------------- 1 | // GENERATED CODE - DO NOT MODIFY BY HAND 2 | 3 | part of 'promote_object_ids.dart'; 4 | 5 | // ************************************************************************** 6 | // JsonSerializableGenerator 7 | // ************************************************************************** 8 | 9 | PromoteObjectIDs _$PromoteObjectIDsFromJson(Map json) => 10 | $checkedCreate( 11 | 'PromoteObjectIDs', 12 | json, 13 | ($checkedConvert) { 14 | final val = PromoteObjectIDs( 15 | objectIDs: $checkedConvert('objectIDs', 16 | (v) => (v as List).map((e) => e as String).toList()), 17 | position: $checkedConvert('position', (v) => (v as num).toInt()), 18 | ); 19 | return val; 20 | }, 21 | ); 22 | 23 | Map _$PromoteObjectIDsToJson(PromoteObjectIDs instance) => 24 | { 25 | 'objectIDs': instance.objectIDs, 26 | 'position': instance.position, 27 | }; 28 | -------------------------------------------------------------------------------- /packages/client_search/lib/src/model/search_params_string.g.dart: -------------------------------------------------------------------------------- 1 | // GENERATED CODE - DO NOT MODIFY BY HAND 2 | 3 | part of 'search_params_string.dart'; 4 | 5 | // ************************************************************************** 6 | // JsonSerializableGenerator 7 | // ************************************************************************** 8 | 9 | SearchParamsString _$SearchParamsStringFromJson(Map json) => 10 | $checkedCreate( 11 | 'SearchParamsString', 12 | json, 13 | ($checkedConvert) { 14 | final val = SearchParamsString( 15 | params: $checkedConvert('params', (v) => v as String?), 16 | ); 17 | return val; 18 | }, 19 | ); 20 | 21 | Map _$SearchParamsStringToJson(SearchParamsString instance) { 22 | final val = {}; 23 | 24 | void writeNotNull(String key, dynamic value) { 25 | if (value != null) { 26 | val[key] = value; 27 | } 28 | } 29 | 30 | writeNotNull('params', instance.params); 31 | return val; 32 | } 33 | -------------------------------------------------------------------------------- /packages/algoliasearch/lib/src/model/banner_link.dart: -------------------------------------------------------------------------------- 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 | // ignore_for_file: unused_element 3 | 4 | import 'package:json_annotation/json_annotation.dart'; 5 | 6 | part 'banner_link.g.dart'; 7 | 8 | @JsonSerializable() 9 | final class BannerLink { 10 | /// Returns a new [BannerLink] instance. 11 | const BannerLink({ 12 | this.url, 13 | }); 14 | 15 | @JsonKey(name: r'url') 16 | final String? url; 17 | 18 | @override 19 | bool operator ==(Object other) => 20 | identical(this, other) || other is BannerLink && other.url == url; 21 | 22 | @override 23 | int get hashCode => url.hashCode; 24 | 25 | factory BannerLink.fromJson(Map json) => 26 | _$BannerLinkFromJson(json); 27 | 28 | Map toJson() => _$BannerLinkToJson(this); 29 | 30 | @override 31 | String toString() { 32 | return toJson().toString(); 33 | } 34 | } 35 | -------------------------------------------------------------------------------- /packages/algoliasearch/lib/src/model/range.g.dart: -------------------------------------------------------------------------------- 1 | // GENERATED CODE - DO NOT MODIFY BY HAND 2 | 3 | part of 'range.dart'; 4 | 5 | // ************************************************************************** 6 | // JsonSerializableGenerator 7 | // ************************************************************************** 8 | 9 | Range _$RangeFromJson(Map json) => $checkedCreate( 10 | 'Range', 11 | json, 12 | ($checkedConvert) { 13 | final val = Range( 14 | from: $checkedConvert('from', (v) => (v as num?)?.toInt()), 15 | value: $checkedConvert('value', (v) => (v as num?)?.toInt()), 16 | ); 17 | return val; 18 | }, 19 | ); 20 | 21 | Map _$RangeToJson(Range instance) { 22 | final val = {}; 23 | 24 | void writeNotNull(String key, dynamic value) { 25 | if (value != null) { 26 | val[key] = value; 27 | } 28 | } 29 | 30 | writeNotNull('from', instance.from); 31 | writeNotNull('value', instance.value); 32 | return val; 33 | } 34 | -------------------------------------------------------------------------------- /packages/client_recommend/lib/src/model/range.g.dart: -------------------------------------------------------------------------------- 1 | // GENERATED CODE - DO NOT MODIFY BY HAND 2 | 3 | part of 'range.dart'; 4 | 5 | // ************************************************************************** 6 | // JsonSerializableGenerator 7 | // ************************************************************************** 8 | 9 | Range _$RangeFromJson(Map json) => $checkedCreate( 10 | 'Range', 11 | json, 12 | ($checkedConvert) { 13 | final val = Range( 14 | from: $checkedConvert('from', (v) => (v as num?)?.toInt()), 15 | value: $checkedConvert('value', (v) => (v as num?)?.toInt()), 16 | ); 17 | return val; 18 | }, 19 | ); 20 | 21 | Map _$RangeToJson(Range instance) { 22 | final val = {}; 23 | 24 | void writeNotNull(String key, dynamic value) { 25 | if (value != null) { 26 | val[key] = value; 27 | } 28 | } 29 | 30 | writeNotNull('from', instance.from); 31 | writeNotNull('value', instance.value); 32 | return val; 33 | } 34 | -------------------------------------------------------------------------------- /packages/client_search/lib/src/model/banner_link.dart: -------------------------------------------------------------------------------- 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 | // ignore_for_file: unused_element 3 | 4 | import 'package:json_annotation/json_annotation.dart'; 5 | 6 | part 'banner_link.g.dart'; 7 | 8 | @JsonSerializable() 9 | final class BannerLink { 10 | /// Returns a new [BannerLink] instance. 11 | const BannerLink({ 12 | this.url, 13 | }); 14 | 15 | @JsonKey(name: r'url') 16 | final String? url; 17 | 18 | @override 19 | bool operator ==(Object other) => 20 | identical(this, other) || other is BannerLink && other.url == url; 21 | 22 | @override 23 | int get hashCode => url.hashCode; 24 | 25 | factory BannerLink.fromJson(Map json) => 26 | _$BannerLinkFromJson(json); 27 | 28 | Map toJson() => _$BannerLinkToJson(this); 29 | 30 | @override 31 | String toString() { 32 | return toJson().toString(); 33 | } 34 | } 35 | -------------------------------------------------------------------------------- /packages/client_search/lib/src/model/batch_write_params.g.dart: -------------------------------------------------------------------------------- 1 | // GENERATED CODE - DO NOT MODIFY BY HAND 2 | 3 | part of 'batch_write_params.dart'; 4 | 5 | // ************************************************************************** 6 | // JsonSerializableGenerator 7 | // ************************************************************************** 8 | 9 | BatchWriteParams _$BatchWriteParamsFromJson(Map json) => 10 | $checkedCreate( 11 | 'BatchWriteParams', 12 | json, 13 | ($checkedConvert) { 14 | final val = BatchWriteParams( 15 | requests: $checkedConvert( 16 | 'requests', 17 | (v) => (v as List) 18 | .map((e) => BatchRequest.fromJson(e as Map)) 19 | .toList()), 20 | ); 21 | return val; 22 | }, 23 | ); 24 | 25 | Map _$BatchWriteParamsToJson(BatchWriteParams instance) => 26 | { 27 | 'requests': instance.requests.map((e) => e.toJson()).toList(), 28 | }; 29 | -------------------------------------------------------------------------------- /packages/client_search/lib/src/model/range.g.dart: -------------------------------------------------------------------------------- 1 | // GENERATED CODE - DO NOT MODIFY BY HAND 2 | 3 | part of 'range.dart'; 4 | 5 | // ************************************************************************** 6 | // JsonSerializableGenerator 7 | // ************************************************************************** 8 | 9 | Range _$RangeFromJson(Map json) => $checkedCreate( 10 | 'Range', 11 | json, 12 | ($checkedConvert) { 13 | final val = Range( 14 | from: $checkedConvert('from', (v) => (v as num?)?.toInt()), 15 | value: $checkedConvert('value', (v) => (v as num?)?.toInt()), 16 | ); 17 | return val; 18 | }, 19 | ); 20 | 21 | Map _$RangeToJson(Range instance) { 22 | final val = {}; 23 | 24 | void writeNotNull(String key, dynamic value) { 25 | if (value != null) { 26 | val[key] = value; 27 | } 28 | } 29 | 30 | writeNotNull('from', instance.from); 31 | writeNotNull('value', instance.value); 32 | return val; 33 | } 34 | -------------------------------------------------------------------------------- /packages/algoliasearch/lib/src/model/error_base.g.dart: -------------------------------------------------------------------------------- 1 | // GENERATED CODE - DO NOT MODIFY BY HAND 2 | 3 | part of 'error_base.dart'; 4 | 5 | // ************************************************************************** 6 | // JsonSerializableGenerator 7 | // ************************************************************************** 8 | 9 | ErrorBase _$ErrorBaseFromJson(Map json) => $checkedCreate( 10 | 'ErrorBase', 11 | json, 12 | ($checkedConvert) { 13 | final val = ErrorBase( 14 | message: $checkedConvert('message', (v) => v as String?), 15 | ); 16 | return val; 17 | }, 18 | ); 19 | 20 | const _$ErrorBaseFieldMap = { 21 | 'message': 'message', 22 | }; 23 | 24 | Map _$ErrorBaseToJson(ErrorBase instance) { 25 | final val = {}; 26 | 27 | void writeNotNull(String key, dynamic value) { 28 | if (value != null) { 29 | val[key] = value; 30 | } 31 | } 32 | 33 | writeNotNull('message', instance.message); 34 | return val; 35 | } 36 | -------------------------------------------------------------------------------- /packages/client_composition/lib/src/model/banner_link.dart: -------------------------------------------------------------------------------- 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 | // ignore_for_file: unused_element 3 | 4 | import 'package:json_annotation/json_annotation.dart'; 5 | 6 | part 'banner_link.g.dart'; 7 | 8 | @JsonSerializable() 9 | final class BannerLink { 10 | /// Returns a new [BannerLink] instance. 11 | const BannerLink({ 12 | this.url, 13 | }); 14 | 15 | @JsonKey(name: r'url') 16 | final String? url; 17 | 18 | @override 19 | bool operator ==(Object other) => 20 | identical(this, other) || other is BannerLink && other.url == url; 21 | 22 | @override 23 | int get hashCode => url.hashCode; 24 | 25 | factory BannerLink.fromJson(Map json) => 26 | _$BannerLinkFromJson(json); 27 | 28 | Map toJson() => _$BannerLinkToJson(this); 29 | 30 | @override 31 | String toString() { 32 | return toJson().toString(); 33 | } 34 | } 35 | -------------------------------------------------------------------------------- /packages/client_composition/lib/src/model/range.g.dart: -------------------------------------------------------------------------------- 1 | // GENERATED CODE - DO NOT MODIFY BY HAND 2 | 3 | part of 'range.dart'; 4 | 5 | // ************************************************************************** 6 | // JsonSerializableGenerator 7 | // ************************************************************************** 8 | 9 | Range _$RangeFromJson(Map json) => $checkedCreate( 10 | 'Range', 11 | json, 12 | ($checkedConvert) { 13 | final val = Range( 14 | from: $checkedConvert('from', (v) => (v as num?)?.toInt()), 15 | value: $checkedConvert('value', (v) => (v as num?)?.toInt()), 16 | ); 17 | return val; 18 | }, 19 | ); 20 | 21 | Map _$RangeToJson(Range instance) { 22 | final val = {}; 23 | 24 | void writeNotNull(String key, dynamic value) { 25 | if (value != null) { 26 | val[key] = value; 27 | } 28 | } 29 | 30 | writeNotNull('from', instance.from); 31 | writeNotNull('value', instance.value); 32 | return val; 33 | } 34 | -------------------------------------------------------------------------------- /packages/client_recommend/lib/src/model/banner_link.dart: -------------------------------------------------------------------------------- 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 | // ignore_for_file: unused_element 3 | 4 | import 'package:json_annotation/json_annotation.dart'; 5 | 6 | part 'banner_link.g.dart'; 7 | 8 | @JsonSerializable() 9 | final class BannerLink { 10 | /// Returns a new [BannerLink] instance. 11 | const BannerLink({ 12 | this.url, 13 | }); 14 | 15 | @JsonKey(name: r'url') 16 | final String? url; 17 | 18 | @override 19 | bool operator ==(Object other) => 20 | identical(this, other) || other is BannerLink && other.url == url; 21 | 22 | @override 23 | int get hashCode => url.hashCode; 24 | 25 | factory BannerLink.fromJson(Map json) => 26 | _$BannerLinkFromJson(json); 27 | 28 | Map toJson() => _$BannerLinkToJson(this); 29 | 30 | @override 31 | String toString() { 32 | return toJson().toString(); 33 | } 34 | } 35 | -------------------------------------------------------------------------------- /packages/client_search/lib/src/model/error_base.g.dart: -------------------------------------------------------------------------------- 1 | // GENERATED CODE - DO NOT MODIFY BY HAND 2 | 3 | part of 'error_base.dart'; 4 | 5 | // ************************************************************************** 6 | // JsonSerializableGenerator 7 | // ************************************************************************** 8 | 9 | ErrorBase _$ErrorBaseFromJson(Map json) => $checkedCreate( 10 | 'ErrorBase', 11 | json, 12 | ($checkedConvert) { 13 | final val = ErrorBase( 14 | message: $checkedConvert('message', (v) => v as String?), 15 | ); 16 | return val; 17 | }, 18 | ); 19 | 20 | const _$ErrorBaseFieldMap = { 21 | 'message': 'message', 22 | }; 23 | 24 | Map _$ErrorBaseToJson(ErrorBase instance) { 25 | final val = {}; 26 | 27 | void writeNotNull(String key, dynamic value) { 28 | if (value != null) { 29 | val[key] = value; 30 | } 31 | } 32 | 33 | writeNotNull('message', instance.message); 34 | return val; 35 | } 36 | -------------------------------------------------------------------------------- /packages/algoliasearch/lib/src/model/redirect_url.dart: -------------------------------------------------------------------------------- 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 | // ignore_for_file: unused_element 3 | 4 | import 'package:json_annotation/json_annotation.dart'; 5 | 6 | part 'redirect_url.g.dart'; 7 | 8 | @JsonSerializable() 9 | final class RedirectURL { 10 | /// Returns a new [RedirectURL] instance. 11 | const RedirectURL({ 12 | this.url, 13 | }); 14 | 15 | @JsonKey(name: r'url') 16 | final String? url; 17 | 18 | @override 19 | bool operator ==(Object other) => 20 | identical(this, other) || other is RedirectURL && other.url == url; 21 | 22 | @override 23 | int get hashCode => url.hashCode; 24 | 25 | factory RedirectURL.fromJson(Map json) => 26 | _$RedirectURLFromJson(json); 27 | 28 | Map toJson() => _$RedirectURLToJson(this); 29 | 30 | @override 31 | String toString() { 32 | return toJson().toString(); 33 | } 34 | } 35 | -------------------------------------------------------------------------------- /packages/client_composition/lib/src/model/deduplication.g.dart: -------------------------------------------------------------------------------- 1 | // GENERATED CODE - DO NOT MODIFY BY HAND 2 | 3 | part of 'deduplication.dart'; 4 | 5 | // ************************************************************************** 6 | // JsonSerializableGenerator 7 | // ************************************************************************** 8 | 9 | Deduplication _$DeduplicationFromJson(Map json) => 10 | $checkedCreate( 11 | 'Deduplication', 12 | json, 13 | ($checkedConvert) { 14 | final val = Deduplication( 15 | positioning: $checkedConvert( 16 | 'positioning', (v) => $enumDecode(_$DedupPositioningEnumMap, v)), 17 | ); 18 | return val; 19 | }, 20 | ); 21 | 22 | Map _$DeduplicationToJson(Deduplication instance) => 23 | { 24 | 'positioning': instance.positioning.toJson(), 25 | }; 26 | 27 | const _$DedupPositioningEnumMap = { 28 | DedupPositioning.highest: 'highest', 29 | DedupPositioning.highestInjected: 'highestInjected', 30 | }; 31 | -------------------------------------------------------------------------------- /packages/client_composition/lib/src/model/error_base.g.dart: -------------------------------------------------------------------------------- 1 | // GENERATED CODE - DO NOT MODIFY BY HAND 2 | 3 | part of 'error_base.dart'; 4 | 5 | // ************************************************************************** 6 | // JsonSerializableGenerator 7 | // ************************************************************************** 8 | 9 | ErrorBase _$ErrorBaseFromJson(Map json) => $checkedCreate( 10 | 'ErrorBase', 11 | json, 12 | ($checkedConvert) { 13 | final val = ErrorBase( 14 | message: $checkedConvert('message', (v) => v as String?), 15 | ); 16 | return val; 17 | }, 18 | ); 19 | 20 | const _$ErrorBaseFieldMap = { 21 | 'message': 'message', 22 | }; 23 | 24 | Map _$ErrorBaseToJson(ErrorBase instance) { 25 | final val = {}; 26 | 27 | void writeNotNull(String key, dynamic value) { 28 | if (value != null) { 29 | val[key] = value; 30 | } 31 | } 32 | 33 | writeNotNull('message', instance.message); 34 | return val; 35 | } 36 | -------------------------------------------------------------------------------- /packages/client_composition/lib/src/model/search_results.g.dart: -------------------------------------------------------------------------------- 1 | // GENERATED CODE - DO NOT MODIFY BY HAND 2 | 3 | part of 'search_results.dart'; 4 | 5 | // ************************************************************************** 6 | // JsonSerializableGenerator 7 | // ************************************************************************** 8 | 9 | SearchResults _$SearchResultsFromJson(Map json) => 10 | $checkedCreate( 11 | 'SearchResults', 12 | json, 13 | ($checkedConvert) { 14 | final val = SearchResults( 15 | results: $checkedConvert( 16 | 'results', 17 | (v) => (v as List) 18 | .map((e) => 19 | SearchResultsItem.fromJson(e as Map)) 20 | .toList()), 21 | ); 22 | return val; 23 | }, 24 | ); 25 | 26 | Map _$SearchResultsToJson(SearchResults instance) => 27 | { 28 | 'results': instance.results.map((e) => e.toJson()).toList(), 29 | }; 30 | -------------------------------------------------------------------------------- /packages/client_insights/lib/src/model/error_base.g.dart: -------------------------------------------------------------------------------- 1 | // GENERATED CODE - DO NOT MODIFY BY HAND 2 | 3 | part of 'error_base.dart'; 4 | 5 | // ************************************************************************** 6 | // JsonSerializableGenerator 7 | // ************************************************************************** 8 | 9 | ErrorBase _$ErrorBaseFromJson(Map json) => $checkedCreate( 10 | 'ErrorBase', 11 | json, 12 | ($checkedConvert) { 13 | final val = ErrorBase( 14 | message: $checkedConvert('message', (v) => v as String?), 15 | ); 16 | return val; 17 | }, 18 | ); 19 | 20 | const _$ErrorBaseFieldMap = { 21 | 'message': 'message', 22 | }; 23 | 24 | Map _$ErrorBaseToJson(ErrorBase instance) { 25 | final val = {}; 26 | 27 | void writeNotNull(String key, dynamic value) { 28 | if (value != null) { 29 | val[key] = value; 30 | } 31 | } 32 | 33 | writeNotNull('message', instance.message); 34 | return val; 35 | } 36 | -------------------------------------------------------------------------------- /packages/client_recommend/lib/src/model/error_base.g.dart: -------------------------------------------------------------------------------- 1 | // GENERATED CODE - DO NOT MODIFY BY HAND 2 | 3 | part of 'error_base.dart'; 4 | 5 | // ************************************************************************** 6 | // JsonSerializableGenerator 7 | // ************************************************************************** 8 | 9 | ErrorBase _$ErrorBaseFromJson(Map json) => $checkedCreate( 10 | 'ErrorBase', 11 | json, 12 | ($checkedConvert) { 13 | final val = ErrorBase( 14 | message: $checkedConvert('message', (v) => v as String?), 15 | ); 16 | return val; 17 | }, 18 | ); 19 | 20 | const _$ErrorBaseFieldMap = { 21 | 'message': 'message', 22 | }; 23 | 24 | Map _$ErrorBaseToJson(ErrorBase instance) { 25 | final val = {}; 26 | 27 | void writeNotNull(String key, dynamic value) { 28 | if (value != null) { 29 | val[key] = value; 30 | } 31 | } 32 | 33 | writeNotNull('message', instance.message); 34 | return val; 35 | } 36 | -------------------------------------------------------------------------------- /packages/client_recommend/lib/src/model/redirect_url.dart: -------------------------------------------------------------------------------- 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 | // ignore_for_file: unused_element 3 | 4 | import 'package:json_annotation/json_annotation.dart'; 5 | 6 | part 'redirect_url.g.dart'; 7 | 8 | @JsonSerializable() 9 | final class RedirectURL { 10 | /// Returns a new [RedirectURL] instance. 11 | const RedirectURL({ 12 | this.url, 13 | }); 14 | 15 | @JsonKey(name: r'url') 16 | final String? url; 17 | 18 | @override 19 | bool operator ==(Object other) => 20 | identical(this, other) || other is RedirectURL && other.url == url; 21 | 22 | @override 23 | int get hashCode => url.hashCode; 24 | 25 | factory RedirectURL.fromJson(Map json) => 26 | _$RedirectURLFromJson(json); 27 | 28 | Map toJson() => _$RedirectURLToJson(this); 29 | 30 | @override 31 | String toString() { 32 | return toJson().toString(); 33 | } 34 | } 35 | -------------------------------------------------------------------------------- /packages/client_search/lib/src/model/redirect_url.dart: -------------------------------------------------------------------------------- 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 | // ignore_for_file: unused_element 3 | 4 | import 'package:json_annotation/json_annotation.dart'; 5 | 6 | part 'redirect_url.g.dart'; 7 | 8 | @JsonSerializable() 9 | final class RedirectURL { 10 | /// Returns a new [RedirectURL] instance. 11 | const RedirectURL({ 12 | this.url, 13 | }); 14 | 15 | @JsonKey(name: r'url') 16 | final String? url; 17 | 18 | @override 19 | bool operator ==(Object other) => 20 | identical(this, other) || other is RedirectURL && other.url == url; 21 | 22 | @override 23 | int get hashCode => url.hashCode; 24 | 25 | factory RedirectURL.fromJson(Map json) => 26 | _$RedirectURLFromJson(json); 27 | 28 | Map toJson() => _$RedirectURLToJson(this); 29 | 30 | @override 31 | String toString() { 32 | return toJson().toString(); 33 | } 34 | } 35 | -------------------------------------------------------------------------------- /packages/client_abtesting_v3/lib/src/model/error_base.g.dart: -------------------------------------------------------------------------------- 1 | // GENERATED CODE - DO NOT MODIFY BY HAND 2 | 3 | part of 'error_base.dart'; 4 | 5 | // ************************************************************************** 6 | // JsonSerializableGenerator 7 | // ************************************************************************** 8 | 9 | ErrorBase _$ErrorBaseFromJson(Map json) => $checkedCreate( 10 | 'ErrorBase', 11 | json, 12 | ($checkedConvert) { 13 | final val = ErrorBase( 14 | message: $checkedConvert('message', (v) => v as String?), 15 | ); 16 | return val; 17 | }, 18 | ); 19 | 20 | const _$ErrorBaseFieldMap = { 21 | 'message': 'message', 22 | }; 23 | 24 | Map _$ErrorBaseToJson(ErrorBase instance) { 25 | final val = {}; 26 | 27 | void writeNotNull(String key, dynamic value) { 28 | if (value != null) { 29 | val[key] = value; 30 | } 31 | } 32 | 33 | writeNotNull('message', instance.message); 34 | return val; 35 | } 36 | -------------------------------------------------------------------------------- /packages/client_composition/lib/src/model/redirect_url.dart: -------------------------------------------------------------------------------- 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 | // ignore_for_file: unused_element 3 | 4 | import 'package:json_annotation/json_annotation.dart'; 5 | 6 | part 'redirect_url.g.dart'; 7 | 8 | @JsonSerializable() 9 | final class RedirectURL { 10 | /// Returns a new [RedirectURL] instance. 11 | const RedirectURL({ 12 | this.url, 13 | }); 14 | 15 | @JsonKey(name: r'url') 16 | final String? url; 17 | 18 | @override 19 | bool operator ==(Object other) => 20 | identical(this, other) || other is RedirectURL && other.url == url; 21 | 22 | @override 23 | int get hashCode => url.hashCode; 24 | 25 | factory RedirectURL.fromJson(Map json) => 26 | _$RedirectURLFromJson(json); 27 | 28 | Map toJson() => _$RedirectURLToJson(this); 29 | 30 | @override 31 | String toString() { 32 | return toJson().toString(); 33 | } 34 | } 35 | -------------------------------------------------------------------------------- /packages/client_core/example/example.dart: -------------------------------------------------------------------------------- 1 | import 'package:algolia_client_core/algolia_client_core.dart'; 2 | 3 | void main() async { 4 | // Creating an instance of the RetryStrategy with necessary parameters. 5 | // This will retry the failed requests with a backoff strategy. 6 | final requester = RetryStrategy.create( 7 | segment: AgentSegment(value: 'CustomClient'), 8 | appId: 'latency', 9 | apiKey: '6be0576ff61c053d5f9a3225e2a90f76', 10 | defaultHosts: () => [ 11 | Host(url: 'latency-dsn.algolia.net'), 12 | Host(url: 'latency-1.algolianet.com'), 13 | ], 14 | ); 15 | 16 | // Executing a GET request on the '/1/indexes/instant_search' endpoint. 17 | final response = await requester.execute( 18 | request: ApiRequest( 19 | method: RequestMethod.get, 20 | path: '/1/indexes/instant_search', 21 | queryParams: {'query': 'a', 'hitsPerPage': '5'}), 22 | ); 23 | 24 | // Printing json response. 25 | print(response); 26 | 27 | // Dispose of the requester to clean up its resources. 28 | requester.dispose(); 29 | } 30 | -------------------------------------------------------------------------------- /packages/client_search/lib/src/model/source.g.dart: -------------------------------------------------------------------------------- 1 | // GENERATED CODE - DO NOT MODIFY BY HAND 2 | 3 | part of 'source.dart'; 4 | 5 | // ************************************************************************** 6 | // JsonSerializableGenerator 7 | // ************************************************************************** 8 | 9 | Source _$SourceFromJson(Map json) => $checkedCreate( 10 | 'Source', 11 | json, 12 | ($checkedConvert) { 13 | final val = Source( 14 | source: $checkedConvert('source', (v) => v as String), 15 | description: $checkedConvert('description', (v) => v as String?), 16 | ); 17 | return val; 18 | }, 19 | ); 20 | 21 | Map _$SourceToJson(Source instance) { 22 | final val = { 23 | 'source': instance.source, 24 | }; 25 | 26 | void writeNotNull(String key, dynamic value) { 27 | if (value != null) { 28 | val[key] = value; 29 | } 30 | } 31 | 32 | writeNotNull('description', instance.description); 33 | return val; 34 | } 35 | -------------------------------------------------------------------------------- /packages/client_abtesting_v3/lib/src/model/ab_test_response.g.dart: -------------------------------------------------------------------------------- 1 | // GENERATED CODE - DO NOT MODIFY BY HAND 2 | 3 | part of 'ab_test_response.dart'; 4 | 5 | // ************************************************************************** 6 | // JsonSerializableGenerator 7 | // ************************************************************************** 8 | 9 | ABTestResponse _$ABTestResponseFromJson(Map json) => 10 | $checkedCreate( 11 | 'ABTestResponse', 12 | json, 13 | ($checkedConvert) { 14 | final val = ABTestResponse( 15 | index: $checkedConvert('index', (v) => v as String), 16 | abTestID: $checkedConvert('abTestID', (v) => (v as num).toInt()), 17 | taskID: $checkedConvert('taskID', (v) => (v as num).toInt()), 18 | ); 19 | return val; 20 | }, 21 | ); 22 | 23 | Map _$ABTestResponseToJson(ABTestResponse instance) => 24 | { 25 | 'index': instance.index, 26 | 'abTestID': instance.abTestID, 27 | 'taskID': instance.taskID, 28 | }; 29 | -------------------------------------------------------------------------------- /packages/client_search/lib/src/model/dictionary_settings_params.g.dart: -------------------------------------------------------------------------------- 1 | // GENERATED CODE - DO NOT MODIFY BY HAND 2 | 3 | part of 'dictionary_settings_params.dart'; 4 | 5 | // ************************************************************************** 6 | // JsonSerializableGenerator 7 | // ************************************************************************** 8 | 9 | DictionarySettingsParams _$DictionarySettingsParamsFromJson( 10 | Map json) => 11 | $checkedCreate( 12 | 'DictionarySettingsParams', 13 | json, 14 | ($checkedConvert) { 15 | final val = DictionarySettingsParams( 16 | disableStandardEntries: $checkedConvert('disableStandardEntries', 17 | (v) => StandardEntries.fromJson(v as Map)), 18 | ); 19 | return val; 20 | }, 21 | ); 22 | 23 | Map _$DictionarySettingsParamsToJson( 24 | DictionarySettingsParams instance) => 25 | { 26 | 'disableStandardEntries': instance.disableStandardEntries.toJson(), 27 | }; 28 | -------------------------------------------------------------------------------- /packages/algoliasearch/lib/src/model/search_strategy.dart: -------------------------------------------------------------------------------- 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 | // ignore_for_file: unused_element 3 | import 'package:json_annotation/json_annotation.dart'; 4 | 5 | /// Strategy for multiple search queries: - `none`. Run all queries. - `stopIfEnoughMatches`. Run the queries one by one, stopping as soon as a query matches at least the `hitsPerPage` number of results. 6 | @JsonEnum(valueField: 'raw') 7 | enum SearchStrategy { 8 | none(r'none'), 9 | stopIfEnoughMatches(r'stopIfEnoughMatches'); 10 | 11 | const SearchStrategy(this.raw); 12 | final dynamic raw; 13 | 14 | dynamic toJson() => raw; 15 | 16 | static SearchStrategy fromJson(dynamic json) { 17 | for (final value in values) { 18 | if (value.raw == json) return value; 19 | } 20 | throw ArgumentError.value(json, "raw", "No enum value with that value"); 21 | } 22 | 23 | @override 24 | String toString() => raw.toString(); 25 | } 26 | -------------------------------------------------------------------------------- /packages/client_abtesting_v3/lib/src/model/effect_metric.dart: -------------------------------------------------------------------------------- 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 | // ignore_for_file: unused_element 3 | import 'package:json_annotation/json_annotation.dart'; 4 | 5 | /// Metric for which you want to detect the smallest relative difference. 6 | @JsonEnum(valueField: 'raw') 7 | enum EffectMetric { 8 | addToCartRate(r'addToCartRate'), 9 | clickThroughRate(r'clickThroughRate'), 10 | conversionRate(r'conversionRate'), 11 | purchaseRate(r'purchaseRate'), 12 | noResultsRate(r'noResultsRate'); 13 | 14 | const EffectMetric(this.raw); 15 | final dynamic raw; 16 | 17 | dynamic toJson() => raw; 18 | 19 | static EffectMetric fromJson(dynamic json) { 20 | for (final value in values) { 21 | if (value.raw == json) return value; 22 | } 23 | throw ArgumentError.value(json, "raw", "No enum value with that value"); 24 | } 25 | 26 | @override 27 | String toString() => raw.toString(); 28 | } 29 | -------------------------------------------------------------------------------- /packages/client_search/lib/src/model/built_in_operation_type.dart: -------------------------------------------------------------------------------- 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 | // ignore_for_file: unused_element 3 | import 'package:json_annotation/json_annotation.dart'; 4 | 5 | /// How to change the attribute. 6 | @JsonEnum(valueField: 'raw') 7 | enum BuiltInOperationType { 8 | increment(r'Increment'), 9 | decrement(r'Decrement'), 10 | add(r'Add'), 11 | remove(r'Remove'), 12 | addUnique(r'AddUnique'), 13 | incrementFrom(r'IncrementFrom'), 14 | incrementSet(r'IncrementSet'); 15 | 16 | const BuiltInOperationType(this.raw); 17 | final dynamic raw; 18 | 19 | dynamic toJson() => raw; 20 | 21 | static BuiltInOperationType fromJson(dynamic json) { 22 | for (final value in values) { 23 | if (value.raw == json) return value; 24 | } 25 | throw ArgumentError.value(json, "raw", "No enum value with that value"); 26 | } 27 | 28 | @override 29 | String toString() => raw.toString(); 30 | } 31 | -------------------------------------------------------------------------------- /packages/client_search/lib/src/model/search_strategy.dart: -------------------------------------------------------------------------------- 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 | // ignore_for_file: unused_element 3 | import 'package:json_annotation/json_annotation.dart'; 4 | 5 | /// Strategy for multiple search queries: - `none`. Run all queries. - `stopIfEnoughMatches`. Run the queries one by one, stopping as soon as a query matches at least the `hitsPerPage` number of results. 6 | @JsonEnum(valueField: 'raw') 7 | enum SearchStrategy { 8 | none(r'none'), 9 | stopIfEnoughMatches(r'stopIfEnoughMatches'); 10 | 11 | const SearchStrategy(this.raw); 12 | final dynamic raw; 13 | 14 | dynamic toJson() => raw; 15 | 16 | static SearchStrategy fromJson(dynamic json) { 17 | for (final value in values) { 18 | if (value.raw == json) return value; 19 | } 20 | throw ArgumentError.value(json, "raw", "No enum value with that value"); 21 | } 22 | 23 | @override 24 | String toString() => raw.toString(); 25 | } 26 | -------------------------------------------------------------------------------- /packages/client_search/lib/src/model/list_user_ids_response.g.dart: -------------------------------------------------------------------------------- 1 | // GENERATED CODE - DO NOT MODIFY BY HAND 2 | 3 | part of 'list_user_ids_response.dart'; 4 | 5 | // ************************************************************************** 6 | // JsonSerializableGenerator 7 | // ************************************************************************** 8 | 9 | ListUserIdsResponse _$ListUserIdsResponseFromJson(Map json) => 10 | $checkedCreate( 11 | 'ListUserIdsResponse', 12 | json, 13 | ($checkedConvert) { 14 | final val = ListUserIdsResponse( 15 | userIDs: $checkedConvert( 16 | 'userIDs', 17 | (v) => (v as List) 18 | .map((e) => UserId.fromJson(e as Map)) 19 | .toList()), 20 | ); 21 | return val; 22 | }, 23 | ); 24 | 25 | Map _$ListUserIdsResponseToJson( 26 | ListUserIdsResponse instance) => 27 | { 28 | 'userIDs': instance.userIDs.map((e) => e.toJson()).toList(), 29 | }; 30 | -------------------------------------------------------------------------------- /packages/client_search/lib/src/model/time_range.g.dart: -------------------------------------------------------------------------------- 1 | // GENERATED CODE - DO NOT MODIFY BY HAND 2 | 3 | part of 'time_range.dart'; 4 | 5 | // ************************************************************************** 6 | // JsonSerializableGenerator 7 | // ************************************************************************** 8 | 9 | TimeRange _$TimeRangeFromJson(Map json) => $checkedCreate( 10 | 'TimeRange', 11 | json, 12 | ($checkedConvert) { 13 | final val = TimeRange( 14 | from: $checkedConvert('from', (v) => (v as num?)?.toInt()), 15 | until: $checkedConvert('until', (v) => (v as num?)?.toInt()), 16 | ); 17 | return val; 18 | }, 19 | ); 20 | 21 | Map _$TimeRangeToJson(TimeRange instance) { 22 | final val = {}; 23 | 24 | void writeNotNull(String key, dynamic value) { 25 | if (value != null) { 26 | val[key] = value; 27 | } 28 | } 29 | 30 | writeNotNull('from', instance.from); 31 | writeNotNull('until', instance.until); 32 | return val; 33 | } 34 | -------------------------------------------------------------------------------- /packages/client_composition/lib/src/model/time_range.g.dart: -------------------------------------------------------------------------------- 1 | // GENERATED CODE - DO NOT MODIFY BY HAND 2 | 3 | part of 'time_range.dart'; 4 | 5 | // ************************************************************************** 6 | // JsonSerializableGenerator 7 | // ************************************************************************** 8 | 9 | TimeRange _$TimeRangeFromJson(Map json) => $checkedCreate( 10 | 'TimeRange', 11 | json, 12 | ($checkedConvert) { 13 | final val = TimeRange( 14 | from: $checkedConvert('from', (v) => (v as num?)?.toInt()), 15 | until: $checkedConvert('until', (v) => (v as num?)?.toInt()), 16 | ); 17 | return val; 18 | }, 19 | ); 20 | 21 | Map _$TimeRangeToJson(TimeRange instance) { 22 | final val = {}; 23 | 24 | void writeNotNull(String key, dynamic value) { 25 | if (value != null) { 26 | val[key] = value; 27 | } 28 | } 29 | 30 | writeNotNull('from', instance.from); 31 | writeNotNull('until', instance.until); 32 | return val; 33 | } 34 | -------------------------------------------------------------------------------- /packages/client_recommend/lib/src/model/condition.g.dart: -------------------------------------------------------------------------------- 1 | // GENERATED CODE - DO NOT MODIFY BY HAND 2 | 3 | part of 'condition.dart'; 4 | 5 | // ************************************************************************** 6 | // JsonSerializableGenerator 7 | // ************************************************************************** 8 | 9 | Condition _$ConditionFromJson(Map json) => $checkedCreate( 10 | 'Condition', 11 | json, 12 | ($checkedConvert) { 13 | final val = Condition( 14 | filters: $checkedConvert('filters', (v) => v as String?), 15 | context: $checkedConvert('context', (v) => v as String?), 16 | ); 17 | return val; 18 | }, 19 | ); 20 | 21 | Map _$ConditionToJson(Condition instance) { 22 | final val = {}; 23 | 24 | void writeNotNull(String key, dynamic value) { 25 | if (value != null) { 26 | val[key] = value; 27 | } 28 | } 29 | 30 | writeNotNull('filters', instance.filters); 31 | writeNotNull('context', instance.context); 32 | return val; 33 | } 34 | -------------------------------------------------------------------------------- /packages/client_recommend/lib/src/model/recommend_updated_at_response.g.dart: -------------------------------------------------------------------------------- 1 | // GENERATED CODE - DO NOT MODIFY BY HAND 2 | 3 | part of 'recommend_updated_at_response.dart'; 4 | 5 | // ************************************************************************** 6 | // JsonSerializableGenerator 7 | // ************************************************************************** 8 | 9 | RecommendUpdatedAtResponse _$RecommendUpdatedAtResponseFromJson( 10 | Map json) => 11 | $checkedCreate( 12 | 'RecommendUpdatedAtResponse', 13 | json, 14 | ($checkedConvert) { 15 | final val = RecommendUpdatedAtResponse( 16 | taskID: $checkedConvert('taskID', (v) => (v as num).toInt()), 17 | updatedAt: $checkedConvert('updatedAt', (v) => v as String), 18 | ); 19 | return val; 20 | }, 21 | ); 22 | 23 | Map _$RecommendUpdatedAtResponseToJson( 24 | RecommendUpdatedAtResponse instance) => 25 | { 26 | 'taskID': instance.taskID, 27 | 'updatedAt': instance.updatedAt, 28 | }; 29 | -------------------------------------------------------------------------------- /packages/client_recommend/lib/src/model/time_range.g.dart: -------------------------------------------------------------------------------- 1 | // GENERATED CODE - DO NOT MODIFY BY HAND 2 | 3 | part of 'time_range.dart'; 4 | 5 | // ************************************************************************** 6 | // JsonSerializableGenerator 7 | // ************************************************************************** 8 | 9 | TimeRange _$TimeRangeFromJson(Map json) => $checkedCreate( 10 | 'TimeRange', 11 | json, 12 | ($checkedConvert) { 13 | final val = TimeRange( 14 | from: $checkedConvert('from', (v) => (v as num?)?.toInt()), 15 | until: $checkedConvert('until', (v) => (v as num?)?.toInt()), 16 | ); 17 | return val; 18 | }, 19 | ); 20 | 21 | Map _$TimeRangeToJson(TimeRange instance) { 22 | final val = {}; 23 | 24 | void writeNotNull(String key, dynamic value) { 25 | if (value != null) { 26 | val[key] = value; 27 | } 28 | } 29 | 30 | writeNotNull('from', instance.from); 31 | writeNotNull('until', instance.until); 32 | return val; 33 | } 34 | -------------------------------------------------------------------------------- /packages/client_search/lib/src/model/get_objects_params.g.dart: -------------------------------------------------------------------------------- 1 | // GENERATED CODE - DO NOT MODIFY BY HAND 2 | 3 | part of 'get_objects_params.dart'; 4 | 5 | // ************************************************************************** 6 | // JsonSerializableGenerator 7 | // ************************************************************************** 8 | 9 | GetObjectsParams _$GetObjectsParamsFromJson(Map json) => 10 | $checkedCreate( 11 | 'GetObjectsParams', 12 | json, 13 | ($checkedConvert) { 14 | final val = GetObjectsParams( 15 | requests: $checkedConvert( 16 | 'requests', 17 | (v) => (v as List) 18 | .map((e) => 19 | GetObjectsRequest.fromJson(e as Map)) 20 | .toList()), 21 | ); 22 | return val; 23 | }, 24 | ); 25 | 26 | Map _$GetObjectsParamsToJson(GetObjectsParams instance) => 27 | { 28 | 'requests': instance.requests.map((e) => e.toJson()).toList(), 29 | }; 30 | -------------------------------------------------------------------------------- /packages/algoliasearch/lib/src/model/banner_image_url.dart: -------------------------------------------------------------------------------- 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 | // ignore_for_file: unused_element 3 | 4 | import 'package:json_annotation/json_annotation.dart'; 5 | 6 | part 'banner_image_url.g.dart'; 7 | 8 | @JsonSerializable() 9 | final class BannerImageUrl { 10 | /// Returns a new [BannerImageUrl] instance. 11 | const BannerImageUrl({ 12 | this.url, 13 | }); 14 | 15 | @JsonKey(name: r'url') 16 | final String? url; 17 | 18 | @override 19 | bool operator ==(Object other) => 20 | identical(this, other) || other is BannerImageUrl && other.url == url; 21 | 22 | @override 23 | int get hashCode => url.hashCode; 24 | 25 | factory BannerImageUrl.fromJson(Map json) => 26 | _$BannerImageUrlFromJson(json); 27 | 28 | Map toJson() => _$BannerImageUrlToJson(this); 29 | 30 | @override 31 | String toString() { 32 | return toJson().toString(); 33 | } 34 | } 35 | -------------------------------------------------------------------------------- /packages/client_recommend/lib/src/model/banner_image_url.dart: -------------------------------------------------------------------------------- 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 | // ignore_for_file: unused_element 3 | 4 | import 'package:json_annotation/json_annotation.dart'; 5 | 6 | part 'banner_image_url.g.dart'; 7 | 8 | @JsonSerializable() 9 | final class BannerImageUrl { 10 | /// Returns a new [BannerImageUrl] instance. 11 | const BannerImageUrl({ 12 | this.url, 13 | }); 14 | 15 | @JsonKey(name: r'url') 16 | final String? url; 17 | 18 | @override 19 | bool operator ==(Object other) => 20 | identical(this, other) || other is BannerImageUrl && other.url == url; 21 | 22 | @override 23 | int get hashCode => url.hashCode; 24 | 25 | factory BannerImageUrl.fromJson(Map json) => 26 | _$BannerImageUrlFromJson(json); 27 | 28 | Map toJson() => _$BannerImageUrlToJson(this); 29 | 30 | @override 31 | String toString() { 32 | return toJson().toString(); 33 | } 34 | } 35 | -------------------------------------------------------------------------------- /packages/client_search/lib/src/model/banner_image_url.dart: -------------------------------------------------------------------------------- 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 | // ignore_for_file: unused_element 3 | 4 | import 'package:json_annotation/json_annotation.dart'; 5 | 6 | part 'banner_image_url.g.dart'; 7 | 8 | @JsonSerializable() 9 | final class BannerImageUrl { 10 | /// Returns a new [BannerImageUrl] instance. 11 | const BannerImageUrl({ 12 | this.url, 13 | }); 14 | 15 | @JsonKey(name: r'url') 16 | final String? url; 17 | 18 | @override 19 | bool operator ==(Object other) => 20 | identical(this, other) || other is BannerImageUrl && other.url == url; 21 | 22 | @override 23 | int get hashCode => url.hashCode; 24 | 25 | factory BannerImageUrl.fromJson(Map json) => 26 | _$BannerImageUrlFromJson(json); 27 | 28 | Map toJson() => _$BannerImageUrlToJson(this); 29 | 30 | @override 31 | String toString() { 32 | return toJson().toString(); 33 | } 34 | } 35 | -------------------------------------------------------------------------------- /packages/algoliasearch/lib/src/model/semantic_search.g.dart: -------------------------------------------------------------------------------- 1 | // GENERATED CODE - DO NOT MODIFY BY HAND 2 | 3 | part of 'semantic_search.dart'; 4 | 5 | // ************************************************************************** 6 | // JsonSerializableGenerator 7 | // ************************************************************************** 8 | 9 | SemanticSearch _$SemanticSearchFromJson(Map json) => 10 | $checkedCreate( 11 | 'SemanticSearch', 12 | json, 13 | ($checkedConvert) { 14 | final val = SemanticSearch( 15 | eventSources: $checkedConvert('eventSources', 16 | (v) => (v as List?)?.map((e) => e as String).toList()), 17 | ); 18 | return val; 19 | }, 20 | ); 21 | 22 | Map _$SemanticSearchToJson(SemanticSearch instance) { 23 | final val = {}; 24 | 25 | void writeNotNull(String key, dynamic value) { 26 | if (value != null) { 27 | val[key] = value; 28 | } 29 | } 30 | 31 | writeNotNull('eventSources', instance.eventSources); 32 | return val; 33 | } 34 | -------------------------------------------------------------------------------- /packages/client_composition/lib/src/model/banner_image_url.dart: -------------------------------------------------------------------------------- 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 | // ignore_for_file: unused_element 3 | 4 | import 'package:json_annotation/json_annotation.dart'; 5 | 6 | part 'banner_image_url.g.dart'; 7 | 8 | @JsonSerializable() 9 | final class BannerImageUrl { 10 | /// Returns a new [BannerImageUrl] instance. 11 | const BannerImageUrl({ 12 | this.url, 13 | }); 14 | 15 | @JsonKey(name: r'url') 16 | final String? url; 17 | 18 | @override 19 | bool operator ==(Object other) => 20 | identical(this, other) || other is BannerImageUrl && other.url == url; 21 | 22 | @override 23 | int get hashCode => url.hashCode; 24 | 25 | factory BannerImageUrl.fromJson(Map json) => 26 | _$BannerImageUrlFromJson(json); 27 | 28 | Map toJson() => _$BannerImageUrlToJson(this); 29 | 30 | @override 31 | String toString() { 32 | return toJson().toString(); 33 | } 34 | } 35 | -------------------------------------------------------------------------------- /packages/client_search/lib/src/model/semantic_search.g.dart: -------------------------------------------------------------------------------- 1 | // GENERATED CODE - DO NOT MODIFY BY HAND 2 | 3 | part of 'semantic_search.dart'; 4 | 5 | // ************************************************************************** 6 | // JsonSerializableGenerator 7 | // ************************************************************************** 8 | 9 | SemanticSearch _$SemanticSearchFromJson(Map json) => 10 | $checkedCreate( 11 | 'SemanticSearch', 12 | json, 13 | ($checkedConvert) { 14 | final val = SemanticSearch( 15 | eventSources: $checkedConvert('eventSources', 16 | (v) => (v as List?)?.map((e) => e as String).toList()), 17 | ); 18 | return val; 19 | }, 20 | ); 21 | 22 | Map _$SemanticSearchToJson(SemanticSearch instance) { 23 | final val = {}; 24 | 25 | void writeNotNull(String key, dynamic value) { 26 | if (value != null) { 27 | val[key] = value; 28 | } 29 | } 30 | 31 | writeNotNull('eventSources', instance.eventSources); 32 | return val; 33 | } 34 | -------------------------------------------------------------------------------- /packages/client_recommend/lib/src/model/hide_consequence_object.g.dart: -------------------------------------------------------------------------------- 1 | // GENERATED CODE - DO NOT MODIFY BY HAND 2 | 3 | part of 'hide_consequence_object.dart'; 4 | 5 | // ************************************************************************** 6 | // JsonSerializableGenerator 7 | // ************************************************************************** 8 | 9 | HideConsequenceObject _$HideConsequenceObjectFromJson( 10 | Map json) => 11 | $checkedCreate( 12 | 'HideConsequenceObject', 13 | json, 14 | ($checkedConvert) { 15 | final val = HideConsequenceObject( 16 | objectID: $checkedConvert('objectID', (v) => v as String?), 17 | ); 18 | return val; 19 | }, 20 | ); 21 | 22 | Map _$HideConsequenceObjectToJson( 23 | HideConsequenceObject instance) { 24 | final val = {}; 25 | 26 | void writeNotNull(String key, dynamic value) { 27 | if (value != null) { 28 | val[key] = value; 29 | } 30 | } 31 | 32 | writeNotNull('objectID', instance.objectID); 33 | return val; 34 | } 35 | --------------------------------------------------------------------------------