couchbase 4.6.1 → 4.7.0-dev.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CMakeLists.txt +2 -1
- package/deps/couchbase-cxx-cache/mozilla-ca-bundle.crt +23 -5
- package/deps/couchbase-cxx-cache/mozilla-ca-bundle.sha256 +1 -1
- package/deps/couchbase-cxx-client/CMakeLists.txt +24 -11
- package/deps/couchbase-cxx-client/README.md +2 -2
- package/deps/couchbase-cxx-client/cmake/APKBUILD.in +17 -1
- package/deps/couchbase-cxx-client/cmake/Bundler.cmake +9 -1
- package/deps/couchbase-cxx-client/cmake/Cache.cmake +48 -19
- package/deps/couchbase-cxx-client/cmake/CompilerOptions.cmake +3 -1
- package/deps/couchbase-cxx-client/cmake/OpenSSL.cmake +10 -2
- package/deps/couchbase-cxx-client/cmake/Packaging.cmake +48 -8
- package/deps/couchbase-cxx-client/cmake/ThirdPartyDependencies.cmake +41 -0
- package/deps/couchbase-cxx-client/cmake/build_config.hxx.in +2 -0
- package/deps/couchbase-cxx-client/cmake/couchbase-cxx-client.spec.in +18 -0
- package/deps/couchbase-cxx-client/cmake/debian/control +6 -1
- package/deps/couchbase-cxx-client/cmake/debian/rules +1 -0
- package/deps/couchbase-cxx-client/cmake/tarball_glob.txt +10 -0
- package/deps/couchbase-cxx-client/core/app_telemetry_meter.cxx +1 -0
- package/deps/couchbase-cxx-client/core/app_telemetry_reporter.cxx +45 -43
- package/deps/couchbase-cxx-client/core/app_telemetry_reporter.hxx +4 -3
- package/deps/couchbase-cxx-client/core/bucket.cxx +128 -13
- package/deps/couchbase-cxx-client/core/bucket.hxx +12 -2
- package/deps/couchbase-cxx-client/core/cluster.cxx +304 -152
- package/deps/couchbase-cxx-client/core/cluster.hxx +32 -0
- package/deps/couchbase-cxx-client/core/cluster_credentials.cxx +25 -0
- package/deps/couchbase-cxx-client/core/cluster_credentials.hxx +5 -0
- package/deps/couchbase-cxx-client/core/cluster_label_listener.cxx +72 -0
- package/deps/couchbase-cxx-client/core/cluster_label_listener.hxx +46 -0
- package/deps/couchbase-cxx-client/core/cluster_options.hxx +4 -0
- package/deps/couchbase-cxx-client/core/deprecation_utils.hxx +26 -0
- package/deps/couchbase-cxx-client/core/error.hxx +27 -0
- package/deps/couchbase-cxx-client/core/free_form_http_request.hxx +0 -2
- package/deps/couchbase-cxx-client/core/http_component.cxx +12 -48
- package/deps/couchbase-cxx-client/core/impl/analytics.cxx +3 -2
- package/deps/couchbase-cxx-client/core/impl/analytics.hxx +2 -1
- package/deps/couchbase-cxx-client/core/impl/analytics_index_manager.cxx +249 -137
- package/deps/couchbase-cxx-client/core/impl/binary_collection.cxx +134 -58
- package/deps/couchbase-cxx-client/core/impl/bucket_manager.cxx +87 -35
- package/deps/couchbase-cxx-client/core/impl/collection.cxx +560 -245
- package/deps/couchbase-cxx-client/core/impl/collection_manager.cxx +89 -49
- package/deps/couchbase-cxx-client/core/impl/dns_srv_tracker.cxx +3 -3
- package/deps/couchbase-cxx-client/core/impl/error.cxx +20 -13
- package/deps/couchbase-cxx-client/core/impl/error.hxx +15 -10
- package/deps/couchbase-cxx-client/core/impl/get_all_replicas.hxx +1 -1
- package/deps/couchbase-cxx-client/core/impl/get_any_replica.hxx +2 -1
- package/deps/couchbase-cxx-client/core/impl/get_replica.hxx +2 -0
- package/deps/couchbase-cxx-client/core/impl/lookup_in_replica.hxx +1 -1
- package/deps/couchbase-cxx-client/core/impl/observability_recorder.cxx +161 -0
- package/deps/couchbase-cxx-client/core/impl/observability_recorder.hxx +77 -0
- package/deps/couchbase-cxx-client/core/impl/observe_seqno.hxx +2 -0
- package/deps/couchbase-cxx-client/core/impl/public_bucket.cxx +31 -7
- package/deps/couchbase-cxx-client/core/impl/public_cluster.cxx +107 -19
- package/deps/couchbase-cxx-client/core/impl/query.cxx +6 -3
- package/deps/couchbase-cxx-client/core/impl/query.hxx +3 -1
- package/deps/couchbase-cxx-client/core/impl/query_index_manager.cxx +267 -102
- package/deps/couchbase-cxx-client/core/impl/scope.cxx +53 -11
- package/deps/couchbase-cxx-client/core/impl/search.cxx +8 -4
- package/deps/couchbase-cxx-client/core/impl/search.hxx +6 -2
- package/deps/couchbase-cxx-client/core/impl/search_index_manager.cxx +131 -41
- package/deps/couchbase-cxx-client/core/impl/with_cancellation.hxx +75 -0
- package/deps/couchbase-cxx-client/core/io/config_tracker.cxx +9 -9
- package/deps/couchbase-cxx-client/core/io/config_tracker.hxx +2 -1
- package/deps/couchbase-cxx-client/core/io/http_command.hxx +98 -49
- package/deps/couchbase-cxx-client/core/io/http_context.hxx +2 -0
- package/deps/couchbase-cxx-client/core/io/http_session.cxx +23 -10
- package/deps/couchbase-cxx-client/core/io/http_session.hxx +17 -9
- package/deps/couchbase-cxx-client/core/io/http_session_manager.hxx +163 -228
- package/deps/couchbase-cxx-client/core/io/http_traits.hxx +0 -7
- package/deps/couchbase-cxx-client/core/io/mcbp_command.hxx +123 -44
- package/deps/couchbase-cxx-client/core/io/mcbp_session.cxx +251 -26
- package/deps/couchbase-cxx-client/core/io/mcbp_session.hxx +9 -1
- package/deps/couchbase-cxx-client/core/io/mcbp_traits.hxx +0 -8
- package/deps/couchbase-cxx-client/core/io/streams.cxx +3 -3
- package/deps/couchbase-cxx-client/core/io/streams.hxx +3 -2
- package/deps/couchbase-cxx-client/core/meta/features.hxx +15 -0
- package/deps/couchbase-cxx-client/core/meta/version.cxx +13 -0
- package/deps/couchbase-cxx-client/core/meta/version.hxx +3 -0
- package/deps/couchbase-cxx-client/core/metrics/constants.hxx +23 -0
- package/deps/couchbase-cxx-client/core/metrics/logging_meter.cxx +5 -5
- package/deps/couchbase-cxx-client/core/metrics/meter_wrapper.cxx +65 -63
- package/deps/couchbase-cxx-client/core/metrics/meter_wrapper.hxx +12 -10
- package/deps/couchbase-cxx-client/core/operations/document_analytics.hxx +0 -5
- package/deps/couchbase-cxx-client/core/operations/document_append.hxx +0 -4
- package/deps/couchbase-cxx-client/core/operations/document_decrement.hxx +0 -5
- package/deps/couchbase-cxx-client/core/operations/document_exists.hxx +0 -7
- package/deps/couchbase-cxx-client/core/operations/document_get.hxx +0 -7
- package/deps/couchbase-cxx-client/core/operations/document_get_all_replicas.hxx +77 -27
- package/deps/couchbase-cxx-client/core/operations/document_get_and_lock.hxx +0 -9
- package/deps/couchbase-cxx-client/core/operations/document_get_and_touch.hxx +0 -9
- package/deps/couchbase-cxx-client/core/operations/document_get_any_replica.hxx +83 -2
- package/deps/couchbase-cxx-client/core/operations/document_get_projected.hxx +0 -9
- package/deps/couchbase-cxx-client/core/operations/document_increment.hxx +0 -5
- package/deps/couchbase-cxx-client/core/operations/document_insert.hxx +0 -4
- package/deps/couchbase-cxx-client/core/operations/document_lookup_in.hxx +0 -9
- package/deps/couchbase-cxx-client/core/operations/document_lookup_in_all_replicas.hxx +46 -4
- package/deps/couchbase-cxx-client/core/operations/document_lookup_in_any_replica.hxx +121 -43
- package/deps/couchbase-cxx-client/core/operations/document_mutate_in.hxx +0 -5
- package/deps/couchbase-cxx-client/core/operations/document_prepend.hxx +0 -4
- package/deps/couchbase-cxx-client/core/operations/document_query.hxx +0 -4
- package/deps/couchbase-cxx-client/core/operations/document_remove.hxx +0 -4
- package/deps/couchbase-cxx-client/core/operations/document_replace.hxx +0 -4
- package/deps/couchbase-cxx-client/core/operations/document_search.hxx +0 -7
- package/deps/couchbase-cxx-client/core/operations/document_touch.hxx +0 -7
- package/deps/couchbase-cxx-client/core/operations/document_unlock.hxx +0 -6
- package/deps/couchbase-cxx-client/core/operations/document_upsert.hxx +0 -4
- package/deps/couchbase-cxx-client/core/operations/document_view.cxx +2 -0
- package/deps/couchbase-cxx-client/core/operations/document_view.hxx +10 -13
- package/deps/couchbase-cxx-client/core/operations/http_noop.hxx +2 -0
- package/deps/couchbase-cxx-client/core/operations/management/analytics_dataset_create.hxx +2 -0
- package/deps/couchbase-cxx-client/core/operations/management/analytics_dataset_drop.hxx +2 -0
- package/deps/couchbase-cxx-client/core/operations/management/analytics_dataset_get_all.hxx +2 -0
- package/deps/couchbase-cxx-client/core/operations/management/analytics_dataverse_create.hxx +2 -0
- package/deps/couchbase-cxx-client/core/operations/management/analytics_dataverse_drop.hxx +2 -0
- package/deps/couchbase-cxx-client/core/operations/management/analytics_get_pending_mutations.hxx +2 -0
- package/deps/couchbase-cxx-client/core/operations/management/analytics_index_create.hxx +2 -0
- package/deps/couchbase-cxx-client/core/operations/management/analytics_index_drop.hxx +2 -0
- package/deps/couchbase-cxx-client/core/operations/management/analytics_index_get_all.hxx +2 -0
- package/deps/couchbase-cxx-client/core/operations/management/analytics_link_connect.hxx +2 -0
- package/deps/couchbase-cxx-client/core/operations/management/analytics_link_create.hxx +2 -0
- package/deps/couchbase-cxx-client/core/operations/management/analytics_link_disconnect.hxx +2 -0
- package/deps/couchbase-cxx-client/core/operations/management/analytics_link_drop.hxx +2 -0
- package/deps/couchbase-cxx-client/core/operations/management/analytics_link_get_all.hxx +2 -0
- package/deps/couchbase-cxx-client/core/operations/management/analytics_link_replace.hxx +2 -0
- package/deps/couchbase-cxx-client/core/operations/management/bucket_create.hxx +2 -0
- package/deps/couchbase-cxx-client/core/operations/management/bucket_describe.hxx +2 -0
- package/deps/couchbase-cxx-client/core/operations/management/bucket_drop.hxx +2 -0
- package/deps/couchbase-cxx-client/core/operations/management/bucket_flush.hxx +2 -0
- package/deps/couchbase-cxx-client/core/operations/management/bucket_get.hxx +2 -0
- package/deps/couchbase-cxx-client/core/operations/management/bucket_get_all.hxx +2 -0
- package/deps/couchbase-cxx-client/core/operations/management/bucket_update.hxx +2 -0
- package/deps/couchbase-cxx-client/core/operations/management/change_password.hxx +2 -0
- package/deps/couchbase-cxx-client/core/operations/management/cluster_describe.hxx +2 -0
- package/deps/couchbase-cxx-client/core/operations/management/cluster_developer_preview_enable.hxx +2 -0
- package/deps/couchbase-cxx-client/core/operations/management/collection_create.hxx +2 -0
- package/deps/couchbase-cxx-client/core/operations/management/collection_drop.hxx +2 -0
- package/deps/couchbase-cxx-client/core/operations/management/collection_update.hxx +2 -0
- package/deps/couchbase-cxx-client/core/operations/management/collections_manifest_get.hxx +2 -0
- package/deps/couchbase-cxx-client/core/operations/management/error_utils.cxx +4 -1
- package/deps/couchbase-cxx-client/core/operations/management/eventing_deploy_function.hxx +2 -0
- package/deps/couchbase-cxx-client/core/operations/management/eventing_drop_function.hxx +2 -0
- package/deps/couchbase-cxx-client/core/operations/management/eventing_get_all_functions.hxx +2 -0
- package/deps/couchbase-cxx-client/core/operations/management/eventing_get_function.hxx +2 -0
- package/deps/couchbase-cxx-client/core/operations/management/eventing_get_status.hxx +2 -0
- package/deps/couchbase-cxx-client/core/operations/management/eventing_pause_function.hxx +2 -0
- package/deps/couchbase-cxx-client/core/operations/management/eventing_resume_function.hxx +2 -0
- package/deps/couchbase-cxx-client/core/operations/management/eventing_undeploy_function.hxx +2 -0
- package/deps/couchbase-cxx-client/core/operations/management/eventing_upsert_function.hxx +2 -0
- package/deps/couchbase-cxx-client/core/operations/management/freeform.hxx +2 -0
- package/deps/couchbase-cxx-client/core/operations/management/group_drop.hxx +2 -0
- package/deps/couchbase-cxx-client/core/operations/management/group_get.hxx +2 -0
- package/deps/couchbase-cxx-client/core/operations/management/group_get_all.hxx +2 -0
- package/deps/couchbase-cxx-client/core/operations/management/group_upsert.hxx +2 -0
- package/deps/couchbase-cxx-client/core/operations/management/query_index_build.hxx +2 -0
- package/deps/couchbase-cxx-client/core/operations/management/query_index_build_deferred.hxx +68 -30
- package/deps/couchbase-cxx-client/core/operations/management/query_index_create.hxx +2 -0
- package/deps/couchbase-cxx-client/core/operations/management/query_index_drop.hxx +2 -0
- package/deps/couchbase-cxx-client/core/operations/management/query_index_get_all.hxx +4 -3
- package/deps/couchbase-cxx-client/core/operations/management/query_index_get_all_deferred.hxx +2 -1
- package/deps/couchbase-cxx-client/core/operations/management/role_get_all.hxx +2 -0
- package/deps/couchbase-cxx-client/core/operations/management/scope_create.hxx +2 -0
- package/deps/couchbase-cxx-client/core/operations/management/scope_drop.hxx +2 -0
- package/deps/couchbase-cxx-client/core/operations/management/scope_get_all.hxx +2 -0
- package/deps/couchbase-cxx-client/core/operations/management/search_get_stats.hxx +2 -0
- package/deps/couchbase-cxx-client/core/operations/management/search_index_analyze_document.hxx +2 -0
- package/deps/couchbase-cxx-client/core/operations/management/search_index_control_ingest.hxx +2 -0
- package/deps/couchbase-cxx-client/core/operations/management/search_index_control_plan_freeze.hxx +2 -0
- package/deps/couchbase-cxx-client/core/operations/management/search_index_control_query.hxx +2 -0
- package/deps/couchbase-cxx-client/core/operations/management/search_index_drop.hxx +2 -0
- package/deps/couchbase-cxx-client/core/operations/management/search_index_get.hxx +2 -0
- package/deps/couchbase-cxx-client/core/operations/management/search_index_get_all.hxx +2 -0
- package/deps/couchbase-cxx-client/core/operations/management/search_index_get_documents_count.hxx +2 -0
- package/deps/couchbase-cxx-client/core/operations/management/search_index_get_stats.hxx +2 -0
- package/deps/couchbase-cxx-client/core/operations/management/search_index_upsert.hxx +2 -0
- package/deps/couchbase-cxx-client/core/operations/management/user_drop.hxx +2 -0
- package/deps/couchbase-cxx-client/core/operations/management/user_get.hxx +2 -0
- package/deps/couchbase-cxx-client/core/operations/management/user_get_all.hxx +2 -0
- package/deps/couchbase-cxx-client/core/operations/management/user_upsert.hxx +2 -0
- package/deps/couchbase-cxx-client/core/operations/management/view_index_drop.hxx +2 -0
- package/deps/couchbase-cxx-client/core/operations/management/view_index_get.hxx +2 -0
- package/deps/couchbase-cxx-client/core/operations/management/view_index_get_all.hxx +2 -0
- package/deps/couchbase-cxx-client/core/operations/management/view_index_upsert.hxx +2 -0
- package/deps/couchbase-cxx-client/core/operations/operation_traits.hxx +6 -0
- package/deps/couchbase-cxx-client/core/operations.hxx +0 -1
- package/deps/couchbase-cxx-client/core/operations_fwd.hxx +8 -0
- package/deps/couchbase-cxx-client/core/origin.cxx +67 -12
- package/deps/couchbase-cxx-client/core/origin.hxx +13 -8
- package/deps/couchbase-cxx-client/core/orphan_reporter.cxx +164 -0
- package/deps/couchbase-cxx-client/core/orphan_reporter.hxx +65 -0
- package/deps/couchbase-cxx-client/core/sasl/CMakeLists.txt +1 -0
- package/deps/couchbase-cxx-client/core/sasl/client.cc +6 -0
- package/deps/couchbase-cxx-client/core/sasl/mechanism.cc +2 -1
- package/deps/couchbase-cxx-client/core/sasl/mechanism.h +2 -1
- package/deps/couchbase-cxx-client/core/sasl/oauthbearer/oauthbearer.cc +41 -0
- package/deps/couchbase-cxx-client/core/sasl/oauthbearer/oauthbearer.h +47 -0
- package/deps/couchbase-cxx-client/core/tls_context_provider.cxx +44 -0
- package/deps/couchbase-cxx-client/core/tls_context_provider.hxx +44 -0
- package/deps/couchbase-cxx-client/core/tracing/attribute_helpers.hxx +45 -0
- package/deps/couchbase-cxx-client/core/tracing/constants.hxx +148 -68
- package/deps/couchbase-cxx-client/core/tracing/threshold_logging_options.hxx +0 -3
- package/deps/couchbase-cxx-client/core/tracing/threshold_logging_tracer.cxx +122 -170
- package/deps/couchbase-cxx-client/core/tracing/tracer_wrapper.cxx +17 -24
- package/deps/couchbase-cxx-client/core/tracing/tracer_wrapper.hxx +8 -10
- package/deps/couchbase-cxx-client/core/tracing/wrapper_sdk_tracer.cxx +114 -0
- package/deps/couchbase-cxx-client/core/tracing/wrapper_sdk_tracer.hxx +85 -0
- package/deps/couchbase-cxx-client/core/transactions/attempt_context_impl.cxx +16 -14
- package/deps/couchbase-cxx-client/core/transactions/attempt_context_impl.hxx +4 -4
- package/deps/couchbase-cxx-client/core/transactions/transactions.cxx +1 -1
- package/deps/couchbase-cxx-client/core/transactions/transactions_cleanup.cxx +1 -2
- package/deps/couchbase-cxx-client/core/utils/byteswap.hxx +12 -0
- package/deps/couchbase-cxx-client/core/utils/concurrent_fixed_priority_queue.hxx +102 -0
- package/deps/couchbase-cxx-client/core/utils/connection_string.cxx +2 -0
- package/deps/couchbase-cxx-client/couchbase/certificate_authenticator.hxx +1 -0
- package/deps/couchbase-cxx-client/couchbase/cluster.hxx +47 -0
- package/deps/couchbase-cxx-client/couchbase/cluster_options.hxx +16 -0
- package/deps/couchbase-cxx-client/couchbase/collection.hxx +60 -15
- package/deps/couchbase-cxx-client/couchbase/error_codes.hxx +48 -48
- package/deps/couchbase-cxx-client/couchbase/jwt_authenticator.hxx +52 -0
- package/deps/couchbase-cxx-client/couchbase/metrics/meter.hxx +2 -1
- package/deps/couchbase-cxx-client/couchbase/metrics/otel_meter.hxx +75 -80
- package/deps/couchbase-cxx-client/couchbase/network_options.hxx +19 -0
- package/deps/couchbase-cxx-client/couchbase/password_authenticator.hxx +1 -0
- package/deps/couchbase-cxx-client/couchbase/tracing/otel_tracer.hxx +15 -17
- package/deps/couchbase-cxx-client/couchbase/tracing/request_span.hxx +2 -2
- package/dist/analyticsexecutor.d.ts +15 -0
- package/dist/analyticsexecutor.js +79 -50
- package/dist/analyticsindexmanager.d.ts +66 -0
- package/dist/analyticsindexmanager.js +404 -277
- package/dist/analyticstypes.d.ts +5 -0
- package/dist/authenticators.d.ts +34 -1
- package/dist/authenticators.js +19 -1
- package/dist/binarycollection.d.ts +17 -0
- package/dist/binding.d.ts +245 -228
- package/dist/bindingutilities.js +1 -1
- package/dist/bucket.d.ts +8 -0
- package/dist/bucket.js +8 -0
- package/dist/bucketmanager.d.ts +30 -0
- package/dist/bucketmanager.js +128 -69
- package/dist/cluster.d.ts +45 -0
- package/dist/cluster.js +133 -21
- package/dist/collection.d.ts +75 -2
- package/dist/collection.js +772 -551
- package/dist/collectionmanager.d.ts +34 -0
- package/dist/collectionmanager.js +172 -89
- package/dist/couchbase.d.ts +5 -0
- package/dist/couchbase.js +5 -0
- package/dist/datastructures.js +310 -97
- package/dist/errors.d.ts +8 -0
- package/dist/errors.js +12 -1
- package/dist/eventingfunctionmanager.d.ts +42 -0
- package/dist/eventingfunctionmanager.js +172 -100
- package/dist/logger.d.ts +192 -0
- package/dist/logger.js +213 -0
- package/dist/loggingmeter.d.ts +120 -0
- package/dist/loggingmeter.js +226 -0
- package/dist/metrics.d.ts +33 -0
- package/dist/metrics.js +5 -0
- package/dist/observability.d.ts +60 -0
- package/dist/observability.js +86 -0
- package/dist/observabilityhandler.d.ts +176 -0
- package/dist/observabilityhandler.js +733 -0
- package/dist/observabilitytypes.d.ts +320 -0
- package/dist/observabilitytypes.js +362 -0
- package/dist/observabilityutilities.d.ts +60 -0
- package/dist/observabilityutilities.js +175 -0
- package/dist/otelmeter.d.ts +51 -0
- package/dist/otelmeter.js +100 -0
- package/dist/oteltracer.d.ts +69 -0
- package/dist/oteltracer.js +141 -0
- package/dist/queryexecutor.d.ts +16 -0
- package/dist/queryexecutor.js +128 -86
- package/dist/queryindexmanager.d.ts +29 -0
- package/dist/queryindexmanager.js +277 -150
- package/dist/querytypes.d.ts +5 -0
- package/dist/scope.js +2 -2
- package/dist/scopeeventingfunctionmanager.d.ts +5 -0
- package/dist/scopeeventingfunctionmanager.js +217 -119
- package/dist/scopesearchindexmanager.d.ts +5 -0
- package/dist/scopesearchindexmanager.js +295 -166
- package/dist/sdspecs.js +6 -1
- package/dist/searchexecutor.d.ts +15 -0
- package/dist/searchexecutor.js +54 -26
- package/dist/searchindexmanager.d.ts +54 -0
- package/dist/searchindexmanager.js +235 -142
- package/dist/searchtypes.d.ts +5 -0
- package/dist/thresholdlogging.d.ts +301 -0
- package/dist/thresholdlogging.js +657 -0
- package/dist/tracing.d.ts +55 -0
- package/dist/tracing.js +2 -0
- package/dist/usermanager.d.ts +46 -0
- package/dist/usermanager.js +199 -118
- package/dist/utilities.d.ts +4 -0
- package/dist/utilities.js +11 -1
- package/dist/version.d.ts +2 -0
- package/dist/version.js +7 -0
- package/dist/viewexecutor.d.ts +15 -0
- package/dist/viewexecutor.js +54 -29
- package/dist/viewindexmanager.d.ts +30 -0
- package/dist/viewindexmanager.js +129 -100
- package/dist/viewtypes.d.ts +5 -0
- package/package.json +19 -9
- package/scripts/prebuilds.js +1 -1
- package/scripts/updateVersion.js +26 -0
- package/src/connection.cpp +79 -98
- package/src/connection.hpp +46 -38
- package/src/connection_autogen.cpp +1236 -292
- package/src/jstocbpp_autogen.hpp +1117 -313
- package/src/jstocbpp_basic.hpp +73 -0
- package/src/jstocbpp_defs.hpp +37 -9
- package/src/jstocbpp_errors.hpp +37 -11
- package/tools/gen-bindings-js.js +100 -22
- package/tools/gen-bindings-json.py +40 -6
- package/src/transcoder.hpp +0 -96
|
@@ -3,6 +3,9 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.AnalyticsIndexManager = exports.AzureExternalAnalyticsLink = exports.S3ExternalAnalyticsLink = exports.CouchbaseRemoteAnalyticsLink = exports.AnalyticsLink = exports.CouchbaseAnalyticsEncryptionSettings = exports.AnalyticsIndex = exports.AnalyticsDataset = exports.AnalyticsEncryptionLevel = exports.AnalyticsLinkType = void 0;
|
|
4
4
|
const errors_1 = require("./errors");
|
|
5
5
|
const bindingutilities_1 = require("./bindingutilities");
|
|
6
|
+
const observability_1 = require("./observability");
|
|
7
|
+
const observabilityhandler_1 = require("./observabilityhandler");
|
|
8
|
+
const observabilitytypes_1 = require("./observabilitytypes");
|
|
6
9
|
const utilities_1 = require("./utilities");
|
|
7
10
|
/**
|
|
8
11
|
* Represents the type of an analytics link.
|
|
@@ -376,6 +379,12 @@ class AnalyticsIndexManager {
|
|
|
376
379
|
constructor(cluster) {
|
|
377
380
|
this._cluster = cluster;
|
|
378
381
|
}
|
|
382
|
+
/**
|
|
383
|
+
* @internal
|
|
384
|
+
*/
|
|
385
|
+
get observabilityInstruments() {
|
|
386
|
+
return this._cluster.observabilityInstruments;
|
|
387
|
+
}
|
|
379
388
|
/**
|
|
380
389
|
* Creates a new dataverse.
|
|
381
390
|
*
|
|
@@ -391,21 +400,28 @@ class AnalyticsIndexManager {
|
|
|
391
400
|
if (!options) {
|
|
392
401
|
options = {};
|
|
393
402
|
}
|
|
394
|
-
const
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
this._cluster.
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
403
|
+
const obsReqHandler = new observabilityhandler_1.ObservableRequestHandler(observabilitytypes_1.AnalyticsMgmtOp.AnalyticsDataverseCreate, this.observabilityInstruments, options === null || options === void 0 ? void 0 : options.parentSpan);
|
|
404
|
+
obsReqHandler.setRequestHttpAttributes();
|
|
405
|
+
try {
|
|
406
|
+
const timeout = options.timeout || this._cluster.managementTimeout;
|
|
407
|
+
const ignoreIfExists = options.ignoreIfExists || false;
|
|
408
|
+
return utilities_1.PromiseHelper.wrapAsync(async () => {
|
|
409
|
+
const [err, _] = await (0, observability_1.wrapObservableBindingCall)(this._cluster.conn.managementAnalyticsDataverseCreate.bind(this._cluster.conn), {
|
|
410
|
+
dataverse_name: dataverseName,
|
|
411
|
+
timeout: timeout,
|
|
412
|
+
ignore_if_exists: ignoreIfExists,
|
|
413
|
+
}, obsReqHandler);
|
|
403
414
|
if (err) {
|
|
404
|
-
|
|
415
|
+
obsReqHandler.endWithError(err);
|
|
416
|
+
throw err;
|
|
405
417
|
}
|
|
406
|
-
|
|
407
|
-
});
|
|
408
|
-
}
|
|
418
|
+
obsReqHandler.end();
|
|
419
|
+
}, callback);
|
|
420
|
+
}
|
|
421
|
+
catch (err) {
|
|
422
|
+
obsReqHandler.endWithError(err);
|
|
423
|
+
throw err;
|
|
424
|
+
}
|
|
409
425
|
}
|
|
410
426
|
/**
|
|
411
427
|
* Drops a previously created dataverse.
|
|
@@ -422,21 +438,28 @@ class AnalyticsIndexManager {
|
|
|
422
438
|
if (!options) {
|
|
423
439
|
options = {};
|
|
424
440
|
}
|
|
425
|
-
const
|
|
426
|
-
|
|
427
|
-
|
|
428
|
-
this._cluster.
|
|
429
|
-
|
|
430
|
-
|
|
431
|
-
|
|
432
|
-
|
|
433
|
-
|
|
441
|
+
const obsReqHandler = new observabilityhandler_1.ObservableRequestHandler(observabilitytypes_1.AnalyticsMgmtOp.AnalyticsDataverseDrop, this.observabilityInstruments, options === null || options === void 0 ? void 0 : options.parentSpan);
|
|
442
|
+
obsReqHandler.setRequestHttpAttributes();
|
|
443
|
+
try {
|
|
444
|
+
const timeout = options.timeout || this._cluster.managementTimeout;
|
|
445
|
+
const ignoreIfNotExists = options.ignoreIfNotExists || false;
|
|
446
|
+
return utilities_1.PromiseHelper.wrapAsync(async () => {
|
|
447
|
+
const [err, _] = await (0, observability_1.wrapObservableBindingCall)(this._cluster.conn.managementAnalyticsDataverseDrop.bind(this._cluster.conn), {
|
|
448
|
+
dataverse_name: dataverseName,
|
|
449
|
+
timeout: timeout,
|
|
450
|
+
ignore_if_does_not_exist: ignoreIfNotExists,
|
|
451
|
+
}, obsReqHandler);
|
|
434
452
|
if (err) {
|
|
435
|
-
|
|
453
|
+
obsReqHandler.endWithError(err);
|
|
454
|
+
throw err;
|
|
436
455
|
}
|
|
437
|
-
|
|
438
|
-
});
|
|
439
|
-
}
|
|
456
|
+
obsReqHandler.end();
|
|
457
|
+
}, callback);
|
|
458
|
+
}
|
|
459
|
+
catch (err) {
|
|
460
|
+
obsReqHandler.endWithError(err);
|
|
461
|
+
throw err;
|
|
462
|
+
}
|
|
440
463
|
}
|
|
441
464
|
/**
|
|
442
465
|
* Creates a new dataset.
|
|
@@ -454,25 +477,32 @@ class AnalyticsIndexManager {
|
|
|
454
477
|
if (!options) {
|
|
455
478
|
options = {};
|
|
456
479
|
}
|
|
457
|
-
const
|
|
458
|
-
|
|
459
|
-
|
|
460
|
-
|
|
461
|
-
|
|
462
|
-
|
|
463
|
-
|
|
464
|
-
|
|
465
|
-
|
|
466
|
-
|
|
467
|
-
|
|
468
|
-
|
|
469
|
-
|
|
480
|
+
const obsReqHandler = new observabilityhandler_1.ObservableRequestHandler(observabilitytypes_1.AnalyticsMgmtOp.AnalyticsDatasetCreate, this.observabilityInstruments, options === null || options === void 0 ? void 0 : options.parentSpan);
|
|
481
|
+
obsReqHandler.setRequestHttpAttributes();
|
|
482
|
+
try {
|
|
483
|
+
const dataverseName = options.dataverseName || 'Default';
|
|
484
|
+
const ignoreIfExists = options.ignoreIfExists || false;
|
|
485
|
+
const timeout = options.timeout || this._cluster.managementTimeout;
|
|
486
|
+
return utilities_1.PromiseHelper.wrapAsync(async () => {
|
|
487
|
+
const [err, _] = await (0, observability_1.wrapObservableBindingCall)(this._cluster.conn.managementAnalyticsDatasetCreate.bind(this._cluster.conn), {
|
|
488
|
+
dataverse_name: dataverseName,
|
|
489
|
+
dataset_name: datasetName,
|
|
490
|
+
bucket_name: bucketName,
|
|
491
|
+
condition: options === null || options === void 0 ? void 0 : options.condition,
|
|
492
|
+
timeout: timeout,
|
|
493
|
+
ignore_if_exists: ignoreIfExists,
|
|
494
|
+
}, obsReqHandler);
|
|
470
495
|
if (err) {
|
|
471
|
-
|
|
496
|
+
obsReqHandler.endWithError(err);
|
|
497
|
+
throw err;
|
|
472
498
|
}
|
|
473
|
-
|
|
474
|
-
});
|
|
475
|
-
}
|
|
499
|
+
obsReqHandler.end();
|
|
500
|
+
}, callback);
|
|
501
|
+
}
|
|
502
|
+
catch (err) {
|
|
503
|
+
obsReqHandler.endWithError(err);
|
|
504
|
+
throw err;
|
|
505
|
+
}
|
|
476
506
|
}
|
|
477
507
|
/**
|
|
478
508
|
* Drops a previously created dataset.
|
|
@@ -489,23 +519,30 @@ class AnalyticsIndexManager {
|
|
|
489
519
|
if (!options) {
|
|
490
520
|
options = {};
|
|
491
521
|
}
|
|
492
|
-
const
|
|
493
|
-
|
|
494
|
-
|
|
495
|
-
|
|
496
|
-
|
|
497
|
-
|
|
498
|
-
|
|
499
|
-
|
|
500
|
-
|
|
501
|
-
|
|
502
|
-
|
|
522
|
+
const obsReqHandler = new observabilityhandler_1.ObservableRequestHandler(observabilitytypes_1.AnalyticsMgmtOp.AnalyticsDatasetDrop, this.observabilityInstruments, options === null || options === void 0 ? void 0 : options.parentSpan);
|
|
523
|
+
obsReqHandler.setRequestHttpAttributes();
|
|
524
|
+
try {
|
|
525
|
+
const dataverseName = options.dataverseName || 'Default';
|
|
526
|
+
const ignoreIfNotExists = options.ignoreIfNotExists || false;
|
|
527
|
+
const timeout = options.timeout || this._cluster.managementTimeout;
|
|
528
|
+
return utilities_1.PromiseHelper.wrapAsync(async () => {
|
|
529
|
+
const [err, _] = await (0, observability_1.wrapObservableBindingCall)(this._cluster.conn.managementAnalyticsDatasetDrop.bind(this._cluster.conn), {
|
|
530
|
+
dataverse_name: dataverseName,
|
|
531
|
+
dataset_name: datasetName,
|
|
532
|
+
timeout: timeout,
|
|
533
|
+
ignore_if_does_not_exist: ignoreIfNotExists,
|
|
534
|
+
}, obsReqHandler);
|
|
503
535
|
if (err) {
|
|
504
|
-
|
|
536
|
+
obsReqHandler.endWithError(err);
|
|
537
|
+
throw err;
|
|
505
538
|
}
|
|
506
|
-
|
|
507
|
-
});
|
|
508
|
-
}
|
|
539
|
+
obsReqHandler.end();
|
|
540
|
+
}, callback);
|
|
541
|
+
}
|
|
542
|
+
catch (err) {
|
|
543
|
+
obsReqHandler.endWithError(err);
|
|
544
|
+
throw err;
|
|
545
|
+
}
|
|
509
546
|
}
|
|
510
547
|
/**
|
|
511
548
|
* Returns a list of all existing datasets.
|
|
@@ -521,24 +558,31 @@ class AnalyticsIndexManager {
|
|
|
521
558
|
if (!options) {
|
|
522
559
|
options = {};
|
|
523
560
|
}
|
|
524
|
-
const
|
|
525
|
-
|
|
526
|
-
|
|
527
|
-
|
|
528
|
-
|
|
529
|
-
const err = (0,
|
|
561
|
+
const obsReqHandler = new observabilityhandler_1.ObservableRequestHandler(observabilitytypes_1.AnalyticsMgmtOp.AnalyticsDatasetGetAll, this.observabilityInstruments, options === null || options === void 0 ? void 0 : options.parentSpan);
|
|
562
|
+
obsReqHandler.setRequestHttpAttributes();
|
|
563
|
+
try {
|
|
564
|
+
const timeout = options.timeout || this._cluster.managementTimeout;
|
|
565
|
+
return utilities_1.PromiseHelper.wrapAsync(async () => {
|
|
566
|
+
const [err, resp] = await (0, observability_1.wrapObservableBindingCall)(this._cluster.conn.managementAnalyticsDatasetGetAll.bind(this._cluster.conn), {
|
|
567
|
+
timeout: timeout,
|
|
568
|
+
}, obsReqHandler);
|
|
530
569
|
if (err) {
|
|
531
|
-
|
|
570
|
+
obsReqHandler.endWithError(err);
|
|
571
|
+
throw err;
|
|
532
572
|
}
|
|
533
|
-
|
|
573
|
+
obsReqHandler.end();
|
|
574
|
+
return resp.datasets.map((dataset) => new AnalyticsDataset({
|
|
534
575
|
name: dataset.name,
|
|
535
576
|
dataverseName: dataset.dataverse_name,
|
|
536
577
|
linkName: dataset.link_name,
|
|
537
578
|
bucketName: dataset.bucket_name,
|
|
538
579
|
}));
|
|
539
|
-
|
|
540
|
-
|
|
541
|
-
|
|
580
|
+
}, callback);
|
|
581
|
+
}
|
|
582
|
+
catch (err) {
|
|
583
|
+
obsReqHandler.endWithError(err);
|
|
584
|
+
throw err;
|
|
585
|
+
}
|
|
542
586
|
}
|
|
543
587
|
/**
|
|
544
588
|
* Creates a new index.
|
|
@@ -557,25 +601,32 @@ class AnalyticsIndexManager {
|
|
|
557
601
|
if (!options) {
|
|
558
602
|
options = {};
|
|
559
603
|
}
|
|
560
|
-
const
|
|
561
|
-
|
|
562
|
-
|
|
563
|
-
|
|
564
|
-
|
|
565
|
-
|
|
566
|
-
|
|
567
|
-
|
|
568
|
-
|
|
569
|
-
|
|
570
|
-
|
|
571
|
-
|
|
572
|
-
|
|
604
|
+
const obsReqHandler = new observabilityhandler_1.ObservableRequestHandler(observabilitytypes_1.AnalyticsMgmtOp.AnalyticsIndexCreate, this.observabilityInstruments, options === null || options === void 0 ? void 0 : options.parentSpan);
|
|
605
|
+
obsReqHandler.setRequestHttpAttributes();
|
|
606
|
+
try {
|
|
607
|
+
const dataverseName = options.dataverseName || 'Default';
|
|
608
|
+
const ignoreIfExists = options.ignoreIfExists || false;
|
|
609
|
+
const timeout = options.timeout || this._cluster.managementTimeout;
|
|
610
|
+
return utilities_1.PromiseHelper.wrapAsync(async () => {
|
|
611
|
+
const [err, _] = await (0, observability_1.wrapObservableBindingCall)(this._cluster.conn.managementAnalyticsIndexCreate.bind(this._cluster.conn), {
|
|
612
|
+
dataverse_name: dataverseName,
|
|
613
|
+
dataset_name: datasetName,
|
|
614
|
+
index_name: indexName,
|
|
615
|
+
fields: fields,
|
|
616
|
+
timeout: timeout,
|
|
617
|
+
ignore_if_exists: ignoreIfExists,
|
|
618
|
+
}, obsReqHandler);
|
|
573
619
|
if (err) {
|
|
574
|
-
|
|
620
|
+
obsReqHandler.endWithError(err);
|
|
621
|
+
throw err;
|
|
575
622
|
}
|
|
576
|
-
|
|
577
|
-
});
|
|
578
|
-
}
|
|
623
|
+
obsReqHandler.end();
|
|
624
|
+
}, callback);
|
|
625
|
+
}
|
|
626
|
+
catch (err) {
|
|
627
|
+
obsReqHandler.endWithError(err);
|
|
628
|
+
throw err;
|
|
629
|
+
}
|
|
579
630
|
}
|
|
580
631
|
/**
|
|
581
632
|
* Drops a previously created index.
|
|
@@ -593,24 +644,31 @@ class AnalyticsIndexManager {
|
|
|
593
644
|
if (!options) {
|
|
594
645
|
options = {};
|
|
595
646
|
}
|
|
596
|
-
const
|
|
597
|
-
|
|
598
|
-
|
|
599
|
-
|
|
600
|
-
|
|
601
|
-
|
|
602
|
-
|
|
603
|
-
|
|
604
|
-
|
|
605
|
-
|
|
606
|
-
|
|
607
|
-
|
|
647
|
+
const obsReqHandler = new observabilityhandler_1.ObservableRequestHandler(observabilitytypes_1.AnalyticsMgmtOp.AnalyticsIndexDrop, this.observabilityInstruments, options === null || options === void 0 ? void 0 : options.parentSpan);
|
|
648
|
+
obsReqHandler.setRequestHttpAttributes();
|
|
649
|
+
try {
|
|
650
|
+
const dataverseName = options.dataverseName || 'Default';
|
|
651
|
+
const ignoreIfNotExists = options.ignoreIfNotExists || false;
|
|
652
|
+
const timeout = options.timeout || this._cluster.managementTimeout;
|
|
653
|
+
return utilities_1.PromiseHelper.wrapAsync(async () => {
|
|
654
|
+
const [err, _] = await (0, observability_1.wrapObservableBindingCall)(this._cluster.conn.managementAnalyticsIndexDrop.bind(this._cluster.conn), {
|
|
655
|
+
dataverse_name: dataverseName,
|
|
656
|
+
dataset_name: datasetName,
|
|
657
|
+
index_name: indexName,
|
|
658
|
+
timeout: timeout,
|
|
659
|
+
ignore_if_does_not_exist: ignoreIfNotExists,
|
|
660
|
+
}, obsReqHandler);
|
|
608
661
|
if (err) {
|
|
609
|
-
|
|
662
|
+
obsReqHandler.endWithError(err);
|
|
663
|
+
throw err;
|
|
610
664
|
}
|
|
611
|
-
|
|
612
|
-
});
|
|
613
|
-
}
|
|
665
|
+
obsReqHandler.end();
|
|
666
|
+
}, callback);
|
|
667
|
+
}
|
|
668
|
+
catch (err) {
|
|
669
|
+
obsReqHandler.endWithError(err);
|
|
670
|
+
throw err;
|
|
671
|
+
}
|
|
614
672
|
}
|
|
615
673
|
/**
|
|
616
674
|
* Returns a list of all existing indexes.
|
|
@@ -626,24 +684,31 @@ class AnalyticsIndexManager {
|
|
|
626
684
|
if (!options) {
|
|
627
685
|
options = {};
|
|
628
686
|
}
|
|
629
|
-
const
|
|
630
|
-
|
|
631
|
-
|
|
632
|
-
|
|
633
|
-
|
|
634
|
-
const err = (0,
|
|
687
|
+
const obsReqHandler = new observabilityhandler_1.ObservableRequestHandler(observabilitytypes_1.AnalyticsMgmtOp.AnalyticsIndexGetAll, this.observabilityInstruments, options === null || options === void 0 ? void 0 : options.parentSpan);
|
|
688
|
+
obsReqHandler.setRequestHttpAttributes();
|
|
689
|
+
try {
|
|
690
|
+
const timeout = options.timeout || this._cluster.managementTimeout;
|
|
691
|
+
return utilities_1.PromiseHelper.wrapAsync(async () => {
|
|
692
|
+
const [err, resp] = await (0, observability_1.wrapObservableBindingCall)(this._cluster.conn.managementAnalyticsIndexGetAll.bind(this._cluster.conn), {
|
|
693
|
+
timeout: timeout,
|
|
694
|
+
}, obsReqHandler);
|
|
635
695
|
if (err) {
|
|
636
|
-
|
|
696
|
+
obsReqHandler.endWithError(err);
|
|
697
|
+
throw err;
|
|
637
698
|
}
|
|
638
|
-
|
|
699
|
+
obsReqHandler.end();
|
|
700
|
+
return resp.indexes.map((index) => new AnalyticsIndex({
|
|
639
701
|
name: index.name,
|
|
640
702
|
dataverseName: index.dataverse_name,
|
|
641
703
|
datasetName: index.dataset_name,
|
|
642
704
|
isPrimary: index.is_primary,
|
|
643
705
|
}));
|
|
644
|
-
|
|
645
|
-
|
|
646
|
-
|
|
706
|
+
}, callback);
|
|
707
|
+
}
|
|
708
|
+
catch (err) {
|
|
709
|
+
obsReqHandler.endWithError(err);
|
|
710
|
+
throw err;
|
|
711
|
+
}
|
|
647
712
|
}
|
|
648
713
|
/**
|
|
649
714
|
* @internal
|
|
@@ -668,17 +733,26 @@ class AnalyticsIndexManager {
|
|
|
668
733
|
if (!options) {
|
|
669
734
|
options = {};
|
|
670
735
|
}
|
|
671
|
-
const
|
|
672
|
-
|
|
673
|
-
|
|
674
|
-
|
|
675
|
-
|
|
736
|
+
const obsReqHandler = new observabilityhandler_1.ObservableRequestHandler(observabilitytypes_1.AnalyticsMgmtOp.AnalyticsLinkConnect, this.observabilityInstruments, options === null || options === void 0 ? void 0 : options.parentSpan);
|
|
737
|
+
obsReqHandler.setRequestHttpAttributes();
|
|
738
|
+
try {
|
|
739
|
+
const force = options.force || false;
|
|
740
|
+
const timeout = options.timeout || this._cluster.managementTimeout;
|
|
741
|
+
let qs = 'CONNECT LINK ' + linkStr;
|
|
742
|
+
if (force) {
|
|
743
|
+
qs += ' WITH {"force": true}';
|
|
744
|
+
}
|
|
745
|
+
return utilities_1.PromiseHelper.wrapAsync(async () => {
|
|
746
|
+
await this._cluster.analyticsQuery(qs, {
|
|
747
|
+
timeout: timeout,
|
|
748
|
+
parentSpan: obsReqHandler.wrappedSpan,
|
|
749
|
+
});
|
|
750
|
+
}, callback);
|
|
751
|
+
}
|
|
752
|
+
catch (err) {
|
|
753
|
+
obsReqHandler.endWithError(err);
|
|
754
|
+
throw err;
|
|
676
755
|
}
|
|
677
|
-
return utilities_1.PromiseHelper.wrapAsync(async () => {
|
|
678
|
-
await this._cluster.analyticsQuery(qs, {
|
|
679
|
-
timeout: timeout,
|
|
680
|
-
});
|
|
681
|
-
}, callback);
|
|
682
756
|
}
|
|
683
757
|
/**
|
|
684
758
|
* @internal
|
|
@@ -691,24 +765,31 @@ class AnalyticsIndexManager {
|
|
|
691
765
|
if (!options) {
|
|
692
766
|
options = {};
|
|
693
767
|
}
|
|
694
|
-
const
|
|
695
|
-
|
|
696
|
-
|
|
697
|
-
|
|
698
|
-
|
|
699
|
-
|
|
700
|
-
|
|
701
|
-
|
|
702
|
-
|
|
703
|
-
|
|
704
|
-
|
|
705
|
-
|
|
768
|
+
const obsReqHandler = new observabilityhandler_1.ObservableRequestHandler(observabilitytypes_1.AnalyticsMgmtOp.AnalyticsLinkConnect, this.observabilityInstruments, options === null || options === void 0 ? void 0 : options.parentSpan);
|
|
769
|
+
obsReqHandler.setRequestHttpAttributes();
|
|
770
|
+
try {
|
|
771
|
+
const dataverseName = options.dataverseName || 'Default';
|
|
772
|
+
const linkName = options.linkName || 'Local';
|
|
773
|
+
const force = options.force || false;
|
|
774
|
+
const timeout = options.timeout || this._cluster.managementTimeout;
|
|
775
|
+
return utilities_1.PromiseHelper.wrapAsync(async () => {
|
|
776
|
+
const [err, _] = await (0, observability_1.wrapObservableBindingCall)(this._cluster.conn.managementAnalyticsLinkConnect.bind(this._cluster.conn), {
|
|
777
|
+
dataverse_name: dataverseName,
|
|
778
|
+
link_name: linkName,
|
|
779
|
+
timeout: timeout,
|
|
780
|
+
force: force,
|
|
781
|
+
}, obsReqHandler);
|
|
706
782
|
if (err) {
|
|
707
|
-
|
|
783
|
+
obsReqHandler.endWithError(err);
|
|
784
|
+
throw err;
|
|
708
785
|
}
|
|
709
|
-
|
|
710
|
-
});
|
|
711
|
-
}
|
|
786
|
+
obsReqHandler.end();
|
|
787
|
+
}, callback);
|
|
788
|
+
}
|
|
789
|
+
catch (err) {
|
|
790
|
+
obsReqHandler.endWithError(err);
|
|
791
|
+
throw err;
|
|
792
|
+
}
|
|
712
793
|
}
|
|
713
794
|
/**
|
|
714
795
|
* @internal
|
|
@@ -733,13 +814,22 @@ class AnalyticsIndexManager {
|
|
|
733
814
|
if (!options) {
|
|
734
815
|
options = {};
|
|
735
816
|
}
|
|
736
|
-
const
|
|
737
|
-
|
|
738
|
-
|
|
739
|
-
|
|
740
|
-
|
|
741
|
-
|
|
742
|
-
|
|
817
|
+
const obsReqHandler = new observabilityhandler_1.ObservableRequestHandler(observabilitytypes_1.AnalyticsMgmtOp.AnalyticsLinkDisconnect, this.observabilityInstruments, options === null || options === void 0 ? void 0 : options.parentSpan);
|
|
818
|
+
obsReqHandler.setRequestHttpAttributes();
|
|
819
|
+
try {
|
|
820
|
+
const qs = 'DISCONNECT LINK ' + linkStr;
|
|
821
|
+
const timeout = options.timeout || this._cluster.managementTimeout;
|
|
822
|
+
return utilities_1.PromiseHelper.wrapAsync(async () => {
|
|
823
|
+
await this._cluster.analyticsQuery(qs, {
|
|
824
|
+
timeout: timeout,
|
|
825
|
+
parentSpan: obsReqHandler.wrappedSpan,
|
|
826
|
+
});
|
|
827
|
+
}, callback);
|
|
828
|
+
}
|
|
829
|
+
catch (err) {
|
|
830
|
+
obsReqHandler.endWithError(err);
|
|
831
|
+
throw err;
|
|
832
|
+
}
|
|
743
833
|
}
|
|
744
834
|
/**
|
|
745
835
|
* @internal
|
|
@@ -752,22 +842,29 @@ class AnalyticsIndexManager {
|
|
|
752
842
|
if (!options) {
|
|
753
843
|
options = {};
|
|
754
844
|
}
|
|
755
|
-
const
|
|
756
|
-
|
|
757
|
-
|
|
758
|
-
|
|
759
|
-
|
|
760
|
-
|
|
761
|
-
|
|
762
|
-
|
|
763
|
-
|
|
764
|
-
|
|
845
|
+
const obsReqHandler = new observabilityhandler_1.ObservableRequestHandler(observabilitytypes_1.AnalyticsMgmtOp.AnalyticsLinkDisconnect, this.observabilityInstruments, options === null || options === void 0 ? void 0 : options.parentSpan);
|
|
846
|
+
obsReqHandler.setRequestHttpAttributes();
|
|
847
|
+
try {
|
|
848
|
+
const dataverseName = options.dataverseName || 'Default';
|
|
849
|
+
const linkName = options.linkName || 'Local';
|
|
850
|
+
const timeout = options.timeout || this._cluster.managementTimeout;
|
|
851
|
+
return utilities_1.PromiseHelper.wrapAsync(async () => {
|
|
852
|
+
const [err, _] = await (0, observability_1.wrapObservableBindingCall)(this._cluster.conn.managementAnalyticsLinkDisconnect.bind(this._cluster.conn), {
|
|
853
|
+
dataverse_name: dataverseName,
|
|
854
|
+
link_name: linkName,
|
|
855
|
+
timeout: timeout,
|
|
856
|
+
}, obsReqHandler);
|
|
765
857
|
if (err) {
|
|
766
|
-
|
|
858
|
+
obsReqHandler.endWithError(err);
|
|
859
|
+
throw err;
|
|
767
860
|
}
|
|
768
|
-
|
|
769
|
-
});
|
|
770
|
-
}
|
|
861
|
+
obsReqHandler.end();
|
|
862
|
+
}, callback);
|
|
863
|
+
}
|
|
864
|
+
catch (err) {
|
|
865
|
+
obsReqHandler.endWithError(err);
|
|
866
|
+
throw err;
|
|
867
|
+
}
|
|
771
868
|
}
|
|
772
869
|
/**
|
|
773
870
|
* Returns a list of all pending mutations.
|
|
@@ -783,21 +880,26 @@ class AnalyticsIndexManager {
|
|
|
783
880
|
if (!options) {
|
|
784
881
|
options = {};
|
|
785
882
|
}
|
|
786
|
-
const
|
|
787
|
-
|
|
788
|
-
|
|
789
|
-
|
|
790
|
-
|
|
791
|
-
const err = (0,
|
|
883
|
+
const obsReqHandler = new observabilityhandler_1.ObservableRequestHandler(observabilitytypes_1.AnalyticsMgmtOp.AnalyticsGetPendingMutations, this.observabilityInstruments, options === null || options === void 0 ? void 0 : options.parentSpan);
|
|
884
|
+
obsReqHandler.setRequestHttpAttributes();
|
|
885
|
+
try {
|
|
886
|
+
const timeout = options.timeout || this._cluster.managementTimeout;
|
|
887
|
+
return utilities_1.PromiseHelper.wrapAsync(async () => {
|
|
888
|
+
const [err, resp] = await (0, observability_1.wrapObservableBindingCall)(this._cluster.conn.managementAnalyticsGetPendingMutations.bind(this._cluster.conn), {
|
|
889
|
+
timeout: timeout,
|
|
890
|
+
}, obsReqHandler);
|
|
792
891
|
if (err) {
|
|
793
|
-
|
|
892
|
+
obsReqHandler.endWithError(err);
|
|
893
|
+
throw err;
|
|
794
894
|
}
|
|
795
|
-
|
|
796
|
-
|
|
797
|
-
|
|
798
|
-
|
|
799
|
-
|
|
800
|
-
|
|
895
|
+
obsReqHandler.end();
|
|
896
|
+
return { stats: resp.stats };
|
|
897
|
+
}, callback);
|
|
898
|
+
}
|
|
899
|
+
catch (err) {
|
|
900
|
+
obsReqHandler.endWithError(err);
|
|
901
|
+
throw err;
|
|
902
|
+
}
|
|
801
903
|
}
|
|
802
904
|
/**
|
|
803
905
|
* Creates a new analytics remote link.
|
|
@@ -814,51 +916,56 @@ class AnalyticsIndexManager {
|
|
|
814
916
|
if (!options) {
|
|
815
917
|
options = {};
|
|
816
918
|
}
|
|
817
|
-
const
|
|
818
|
-
|
|
819
|
-
|
|
820
|
-
|
|
821
|
-
|
|
822
|
-
|
|
823
|
-
|
|
824
|
-
|
|
919
|
+
const obsReqHandler = new observabilityhandler_1.ObservableRequestHandler(observabilitytypes_1.AnalyticsMgmtOp.AnalyticsLinkCreate, this.observabilityInstruments, options === null || options === void 0 ? void 0 : options.parentSpan);
|
|
920
|
+
obsReqHandler.setRequestHttpAttributes();
|
|
921
|
+
try {
|
|
922
|
+
const timeout = options.timeout || this._cluster.managementTimeout;
|
|
923
|
+
if (link.linkType == AnalyticsLinkType.CouchbaseRemote) {
|
|
924
|
+
return utilities_1.PromiseHelper.wrapAsync(async () => {
|
|
925
|
+
const [err, _] = await (0, observability_1.wrapObservableBindingCall)(this._cluster.conn.managementAnalyticsLinkCreateCouchbaseRemoteLink.bind(this._cluster.conn), {
|
|
926
|
+
link: CouchbaseRemoteAnalyticsLink._toCppData(new CouchbaseRemoteAnalyticsLink(link)),
|
|
927
|
+
timeout: timeout,
|
|
928
|
+
}, obsReqHandler);
|
|
825
929
|
if (err) {
|
|
826
|
-
|
|
930
|
+
obsReqHandler.endWithError(err);
|
|
931
|
+
throw err;
|
|
827
932
|
}
|
|
828
|
-
|
|
829
|
-
});
|
|
830
|
-
}
|
|
831
|
-
|
|
832
|
-
|
|
833
|
-
|
|
834
|
-
|
|
835
|
-
|
|
836
|
-
|
|
837
|
-
}, (cppErr) => {
|
|
838
|
-
const err = (0, bindingutilities_1.errorFromCpp)(cppErr);
|
|
933
|
+
obsReqHandler.end();
|
|
934
|
+
}, callback);
|
|
935
|
+
}
|
|
936
|
+
else if (link.linkType == AnalyticsLinkType.S3External) {
|
|
937
|
+
return utilities_1.PromiseHelper.wrapAsync(async () => {
|
|
938
|
+
const [err, _] = await (0, observability_1.wrapObservableBindingCall)(this._cluster.conn.managementAnalyticsLinkCreateS3ExternalLink.bind(this._cluster.conn), {
|
|
939
|
+
link: S3ExternalAnalyticsLink._toCppData(new S3ExternalAnalyticsLink(link)),
|
|
940
|
+
timeout: timeout,
|
|
941
|
+
}, obsReqHandler);
|
|
839
942
|
if (err) {
|
|
840
|
-
|
|
943
|
+
obsReqHandler.endWithError(err);
|
|
944
|
+
throw err;
|
|
841
945
|
}
|
|
842
|
-
|
|
843
|
-
});
|
|
844
|
-
}
|
|
845
|
-
|
|
846
|
-
|
|
847
|
-
|
|
848
|
-
|
|
849
|
-
|
|
850
|
-
|
|
851
|
-
}, (cppErr) => {
|
|
852
|
-
const err = (0, bindingutilities_1.errorFromCpp)(cppErr);
|
|
946
|
+
obsReqHandler.end();
|
|
947
|
+
}, callback);
|
|
948
|
+
}
|
|
949
|
+
else if (link.linkType == AnalyticsLinkType.AzureBlobExternal) {
|
|
950
|
+
return utilities_1.PromiseHelper.wrapAsync(async () => {
|
|
951
|
+
const [err, _] = await (0, observability_1.wrapObservableBindingCall)(this._cluster.conn.managementAnalyticsLinkCreateAzureBlobExternalLink.bind(this._cluster.conn), {
|
|
952
|
+
link: AzureExternalAnalyticsLink._toCppData(new AzureExternalAnalyticsLink(link)),
|
|
953
|
+
timeout: timeout,
|
|
954
|
+
}, obsReqHandler);
|
|
853
955
|
if (err) {
|
|
854
|
-
|
|
956
|
+
obsReqHandler.endWithError(err);
|
|
957
|
+
throw err;
|
|
855
958
|
}
|
|
856
|
-
|
|
857
|
-
});
|
|
858
|
-
}
|
|
959
|
+
obsReqHandler.end();
|
|
960
|
+
}, callback);
|
|
961
|
+
}
|
|
962
|
+
else {
|
|
963
|
+
throw new Error('invalid link type');
|
|
964
|
+
}
|
|
859
965
|
}
|
|
860
|
-
|
|
861
|
-
|
|
966
|
+
catch (err) {
|
|
967
|
+
obsReqHandler.endWithError(err);
|
|
968
|
+
throw err;
|
|
862
969
|
}
|
|
863
970
|
}
|
|
864
971
|
/**
|
|
@@ -876,51 +983,56 @@ class AnalyticsIndexManager {
|
|
|
876
983
|
if (!options) {
|
|
877
984
|
options = {};
|
|
878
985
|
}
|
|
879
|
-
const
|
|
880
|
-
|
|
881
|
-
|
|
882
|
-
|
|
883
|
-
|
|
884
|
-
|
|
885
|
-
|
|
886
|
-
|
|
986
|
+
const obsReqHandler = new observabilityhandler_1.ObservableRequestHandler(observabilitytypes_1.AnalyticsMgmtOp.AnalyticsLinkReplace, this.observabilityInstruments, options === null || options === void 0 ? void 0 : options.parentSpan);
|
|
987
|
+
obsReqHandler.setRequestHttpAttributes();
|
|
988
|
+
try {
|
|
989
|
+
const timeout = options.timeout || this._cluster.managementTimeout;
|
|
990
|
+
if (link.linkType == AnalyticsLinkType.CouchbaseRemote) {
|
|
991
|
+
return utilities_1.PromiseHelper.wrapAsync(async () => {
|
|
992
|
+
const [err, _] = await (0, observability_1.wrapObservableBindingCall)(this._cluster.conn.managementAnalyticsLinkReplaceCouchbaseRemoteLink.bind(this._cluster.conn), {
|
|
993
|
+
link: CouchbaseRemoteAnalyticsLink._toCppData(new CouchbaseRemoteAnalyticsLink(link)),
|
|
994
|
+
timeout: timeout,
|
|
995
|
+
}, obsReqHandler);
|
|
887
996
|
if (err) {
|
|
888
|
-
|
|
997
|
+
obsReqHandler.endWithError(err);
|
|
998
|
+
throw err;
|
|
889
999
|
}
|
|
890
|
-
|
|
891
|
-
});
|
|
892
|
-
}
|
|
893
|
-
|
|
894
|
-
|
|
895
|
-
|
|
896
|
-
|
|
897
|
-
|
|
898
|
-
|
|
899
|
-
}, (cppErr) => {
|
|
900
|
-
const err = (0, bindingutilities_1.errorFromCpp)(cppErr);
|
|
1000
|
+
obsReqHandler.end();
|
|
1001
|
+
}, callback);
|
|
1002
|
+
}
|
|
1003
|
+
else if (link.linkType == AnalyticsLinkType.S3External) {
|
|
1004
|
+
return utilities_1.PromiseHelper.wrapAsync(async () => {
|
|
1005
|
+
const [err, _] = await (0, observability_1.wrapObservableBindingCall)(this._cluster.conn.managementAnalyticsLinkReplaceS3ExternalLink.bind(this._cluster.conn), {
|
|
1006
|
+
link: S3ExternalAnalyticsLink._toCppData(new S3ExternalAnalyticsLink(link)),
|
|
1007
|
+
timeout: timeout,
|
|
1008
|
+
}, obsReqHandler);
|
|
901
1009
|
if (err) {
|
|
902
|
-
|
|
1010
|
+
obsReqHandler.endWithError(err);
|
|
1011
|
+
throw err;
|
|
903
1012
|
}
|
|
904
|
-
|
|
905
|
-
});
|
|
906
|
-
}
|
|
907
|
-
|
|
908
|
-
|
|
909
|
-
|
|
910
|
-
|
|
911
|
-
|
|
912
|
-
|
|
913
|
-
}, (cppErr) => {
|
|
914
|
-
const err = (0, bindingutilities_1.errorFromCpp)(cppErr);
|
|
1013
|
+
obsReqHandler.end();
|
|
1014
|
+
}, callback);
|
|
1015
|
+
}
|
|
1016
|
+
else if (link.linkType == AnalyticsLinkType.AzureBlobExternal) {
|
|
1017
|
+
return utilities_1.PromiseHelper.wrapAsync(async () => {
|
|
1018
|
+
const [err, _] = await (0, observability_1.wrapObservableBindingCall)(this._cluster.conn.managementAnalyticsLinkReplaceAzureBlobExternalLink.bind(this._cluster.conn), {
|
|
1019
|
+
link: AzureExternalAnalyticsLink._toCppData(new AzureExternalAnalyticsLink(link)),
|
|
1020
|
+
timeout: timeout,
|
|
1021
|
+
}, obsReqHandler);
|
|
915
1022
|
if (err) {
|
|
916
|
-
|
|
1023
|
+
obsReqHandler.endWithError(err);
|
|
1024
|
+
throw err;
|
|
917
1025
|
}
|
|
918
|
-
|
|
919
|
-
});
|
|
920
|
-
}
|
|
1026
|
+
obsReqHandler.end();
|
|
1027
|
+
}, callback);
|
|
1028
|
+
}
|
|
1029
|
+
else {
|
|
1030
|
+
throw new Error('invalid link type');
|
|
1031
|
+
}
|
|
921
1032
|
}
|
|
922
|
-
|
|
923
|
-
|
|
1033
|
+
catch (err) {
|
|
1034
|
+
obsReqHandler.endWithError(err);
|
|
1035
|
+
throw err;
|
|
924
1036
|
}
|
|
925
1037
|
}
|
|
926
1038
|
/**
|
|
@@ -939,20 +1051,27 @@ class AnalyticsIndexManager {
|
|
|
939
1051
|
if (!options) {
|
|
940
1052
|
options = {};
|
|
941
1053
|
}
|
|
942
|
-
const
|
|
943
|
-
|
|
944
|
-
|
|
945
|
-
|
|
946
|
-
|
|
947
|
-
|
|
948
|
-
|
|
949
|
-
|
|
1054
|
+
const obsReqHandler = new observabilityhandler_1.ObservableRequestHandler(observabilitytypes_1.AnalyticsMgmtOp.AnalyticsLinkDrop, this.observabilityInstruments, options === null || options === void 0 ? void 0 : options.parentSpan);
|
|
1055
|
+
obsReqHandler.setRequestHttpAttributes();
|
|
1056
|
+
try {
|
|
1057
|
+
const timeout = options.timeout || this._cluster.managementTimeout;
|
|
1058
|
+
return utilities_1.PromiseHelper.wrapAsync(async () => {
|
|
1059
|
+
const [err, _] = await (0, observability_1.wrapObservableBindingCall)(this._cluster.conn.managementAnalyticsLinkDrop.bind(this._cluster.conn), {
|
|
1060
|
+
dataverse_name: dataverseName,
|
|
1061
|
+
link_name: linkName,
|
|
1062
|
+
timeout: timeout,
|
|
1063
|
+
}, obsReqHandler);
|
|
950
1064
|
if (err) {
|
|
951
|
-
|
|
1065
|
+
obsReqHandler.endWithError(err);
|
|
1066
|
+
throw err;
|
|
952
1067
|
}
|
|
953
|
-
|
|
954
|
-
});
|
|
955
|
-
}
|
|
1068
|
+
obsReqHandler.end();
|
|
1069
|
+
}, callback);
|
|
1070
|
+
}
|
|
1071
|
+
catch (err) {
|
|
1072
|
+
obsReqHandler.endWithError(err);
|
|
1073
|
+
throw err;
|
|
1074
|
+
}
|
|
956
1075
|
}
|
|
957
1076
|
/**
|
|
958
1077
|
* Returns a list of existing analytics remote links.
|
|
@@ -968,21 +1087,25 @@ class AnalyticsIndexManager {
|
|
|
968
1087
|
if (!options) {
|
|
969
1088
|
options = {};
|
|
970
1089
|
}
|
|
971
|
-
const
|
|
972
|
-
|
|
973
|
-
|
|
974
|
-
|
|
975
|
-
|
|
976
|
-
|
|
977
|
-
|
|
978
|
-
|
|
979
|
-
|
|
980
|
-
|
|
981
|
-
|
|
982
|
-
|
|
1090
|
+
const obsReqHandler = new observabilityhandler_1.ObservableRequestHandler(observabilitytypes_1.AnalyticsMgmtOp.AnalyticsLinkGetAll, this.observabilityInstruments, options === null || options === void 0 ? void 0 : options.parentSpan);
|
|
1091
|
+
obsReqHandler.setRequestHttpAttributes();
|
|
1092
|
+
try {
|
|
1093
|
+
const dataverseName = options.dataverse;
|
|
1094
|
+
const linkName = options.name;
|
|
1095
|
+
const linkType = options.linkType;
|
|
1096
|
+
const timeout = options.timeout || this._cluster.managementTimeout;
|
|
1097
|
+
return utilities_1.PromiseHelper.wrapAsync(async () => {
|
|
1098
|
+
const [err, resp] = await (0, observability_1.wrapObservableBindingCall)(this._cluster.conn.managementAnalyticsLinkGetAll.bind(this._cluster.conn), {
|
|
1099
|
+
link_type: linkType,
|
|
1100
|
+
link_name: linkName,
|
|
1101
|
+
dataverse_name: dataverseName,
|
|
1102
|
+
timeout: timeout,
|
|
1103
|
+
}, obsReqHandler);
|
|
983
1104
|
if (err) {
|
|
984
|
-
|
|
1105
|
+
obsReqHandler.endWithError(err);
|
|
1106
|
+
throw err;
|
|
985
1107
|
}
|
|
1108
|
+
obsReqHandler.end();
|
|
986
1109
|
const links = [];
|
|
987
1110
|
resp.couchbase.forEach((link) => {
|
|
988
1111
|
links.push(CouchbaseRemoteAnalyticsLink._fromCppData(link));
|
|
@@ -993,9 +1116,13 @@ class AnalyticsIndexManager {
|
|
|
993
1116
|
resp.azure_blob.forEach((link) => {
|
|
994
1117
|
links.push(AzureExternalAnalyticsLink._fromCppData(link));
|
|
995
1118
|
});
|
|
996
|
-
|
|
997
|
-
});
|
|
998
|
-
}
|
|
1119
|
+
return links;
|
|
1120
|
+
}, callback);
|
|
1121
|
+
}
|
|
1122
|
+
catch (err) {
|
|
1123
|
+
obsReqHandler.endWithError(err);
|
|
1124
|
+
throw err;
|
|
1125
|
+
}
|
|
999
1126
|
}
|
|
1000
1127
|
}
|
|
1001
1128
|
exports.AnalyticsIndexManager = AnalyticsIndexManager;
|