couchbase 4.2.10 → 4.2.11-rc.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.
Files changed (59) hide show
  1. package/deps/couchbase-cxx-client/core/bucket.cxx +23 -8
  2. package/deps/couchbase-cxx-client/core/bucket.hxx +1 -0
  3. package/deps/couchbase-cxx-client/core/cluster.cxx +29 -3
  4. package/deps/couchbase-cxx-client/core/impl/collection.cxx +2 -2
  5. package/deps/couchbase-cxx-client/core/impl/query_index_manager.cxx +6 -6
  6. package/deps/couchbase-cxx-client/core/io/http_session_manager.hxx +7 -1
  7. package/deps/couchbase-cxx-client/core/io/mcbp_command.hxx +10 -0
  8. package/deps/couchbase-cxx-client/core/io/mcbp_session.cxx +24 -1
  9. package/deps/couchbase-cxx-client/core/io/mcbp_session.hxx +1 -0
  10. package/deps/couchbase-cxx-client/core/management/design_document.hxx +1 -1
  11. package/deps/couchbase-cxx-client/core/meta/features.hxx +16 -1
  12. package/deps/couchbase-cxx-client/core/operations/document_lookup_in_all_replicas.hxx +1 -1
  13. package/deps/couchbase-cxx-client/core/operations/document_lookup_in_any_replica.hxx +1 -1
  14. package/deps/couchbase-cxx-client/core/operations/document_query.cxx +2 -2
  15. package/deps/couchbase-cxx-client/core/operations/document_search.cxx +10 -10
  16. package/deps/couchbase-cxx-client/core/operations/document_view.cxx +3 -0
  17. package/deps/couchbase-cxx-client/core/operations/document_view.hxx +1 -0
  18. package/deps/couchbase-cxx-client/core/operations/management/query_index_create.cxx +24 -13
  19. package/deps/couchbase-cxx-client/core/operations/management/query_index_create.hxx +1 -1
  20. package/deps/couchbase-cxx-client/core/origin.cxx +14 -0
  21. package/deps/couchbase-cxx-client/core/origin.hxx +6 -0
  22. package/deps/couchbase-cxx-client/core/protocol/status.cxx +2 -0
  23. package/deps/couchbase-cxx-client/core/protocol/status.hxx +1 -0
  24. package/deps/couchbase-cxx-client/core/topology/capabilities.hxx +70 -1
  25. package/deps/couchbase-cxx-client/core/topology/capabilities_fmt.hxx +30 -2
  26. package/deps/couchbase-cxx-client/core/topology/configuration.hxx +1 -34
  27. package/deps/couchbase-cxx-client/core/topology/configuration_fmt.hxx +2 -2
  28. package/deps/couchbase-cxx-client/core/topology/configuration_json.hxx +43 -20
  29. package/deps/couchbase-cxx-client/core/transactions/internal/exceptions_internal.hxx +5 -0
  30. package/deps/couchbase-cxx-client/couchbase/collection_query_index_manager.hxx +80 -11
  31. package/deps/couchbase-cxx-client/couchbase/fmt/key_value_status_code.hxx +3 -1
  32. package/deps/couchbase-cxx-client/couchbase/key_value_status_code.hxx +1 -0
  33. package/deps/couchbase-cxx-client/couchbase/query_index_manager.hxx +6 -8
  34. package/dist/binding.d.ts +24 -2
  35. package/dist/bindingutilities.d.ts +11 -3
  36. package/dist/bindingutilities.js +33 -7
  37. package/dist/couchbase.d.ts +1 -0
  38. package/dist/couchbase.js +1 -0
  39. package/dist/queryindexmanager.d.ts +4 -4
  40. package/dist/queryindexmanager.js +7 -7
  41. package/dist/scope.d.ts +21 -0
  42. package/dist/scope.js +34 -0
  43. package/dist/scopesearchindexmanager.d.ts +116 -0
  44. package/dist/scopesearchindexmanager.js +406 -0
  45. package/dist/sdspecs.js +10 -9
  46. package/dist/sdutils.d.ts +1 -0
  47. package/dist/sdutils.js +4 -0
  48. package/dist/searchexecutor.d.ts +3 -1
  49. package/dist/searchexecutor.js +9 -2
  50. package/dist/searchindexmanager.d.ts +58 -3
  51. package/dist/searchindexmanager.js +188 -104
  52. package/dist/viewexecutor.js +13 -9
  53. package/dist/viewindexmanager.d.ts +70 -7
  54. package/dist/viewindexmanager.js +236 -103
  55. package/dist/viewtypes.d.ts +26 -0
  56. package/dist/viewtypes.js +17 -1
  57. package/package.json +7 -7
  58. package/src/constants.cpp +1 -0
  59. package/src/jstocbpp_autogen.hpp +89 -6
@@ -70,12 +70,33 @@ struct fmt::formatter<couchbase::core::bucket_capability> {
70
70
  case couchbase::core::bucket_capability::range_scan:
71
71
  name = "range_scan";
72
72
  break;
73
- case couchbase::core::bucket_capability::replica_read:
74
- name = "replica_read";
73
+ case couchbase::core::bucket_capability::subdoc_replica_read:
74
+ name = "subdoc_replica_read";
75
75
  break;
76
76
  case couchbase::core::bucket_capability::non_deduped_history:
77
77
  name = "non_deduped_history";
78
78
  break;
79
+ case couchbase::core::bucket_capability::subdoc_replace_body_with_xattr:
80
+ name = "subdoc_replace_body_with_xattr";
81
+ break;
82
+ case couchbase::core::bucket_capability::subdoc_document_macro_support:
83
+ name = "subdoc_document_macro_support";
84
+ break;
85
+ case couchbase::core::bucket_capability::subdoc_revive_document:
86
+ name = "subdoc_revive_document";
87
+ break;
88
+ case couchbase::core::bucket_capability::dcp_ignore_purged_tombstones:
89
+ name = "dcp_ignore_purged_tombstones";
90
+ break;
91
+ case couchbase::core::bucket_capability::preserve_expiry:
92
+ name = "preserve_expiry";
93
+ break;
94
+ case couchbase::core::bucket_capability::query_system_collection:
95
+ name = "query_system_collection";
96
+ break;
97
+ case couchbase::core::bucket_capability::mobile_system_collection:
98
+ name = "mobile_system_collection";
99
+ break;
79
100
  }
80
101
  return format_to(ctx.out(), "{}", name);
81
102
  }
@@ -111,6 +132,13 @@ struct fmt::formatter<couchbase::core::cluster_capability> {
111
132
  break;
112
133
  case couchbase::core::cluster_capability::n1ql_read_from_replica:
113
134
  name = "n1ql_read_from_replica";
135
+ break;
136
+ case couchbase::core::cluster_capability::search_vector_search:
137
+ name = "search_vector_search";
138
+ break;
139
+ case couchbase::core::cluster_capability::search_scoped_search_index:
140
+ name = "search_scoped_search_index";
141
+ break;
114
142
  }
115
143
  return format_to(ctx.out(), "{}", name);
116
144
  }
@@ -89,8 +89,7 @@ struct configuration {
89
89
  std::optional<std::string> bucket{};
90
90
  std::optional<vbucket_map> vbmap{};
91
91
  std::optional<std::uint64_t> collections_manifest_uid{};
92
- std::set<bucket_capability> bucket_capabilities{};
93
- std::set<cluster_capability> cluster_capabilities{};
92
+ configuration_capabilities capabilities{};
94
93
  node_locator_type node_locator{ node_locator_type::unknown };
95
94
  bool force{ false };
96
95
 
@@ -111,38 +110,6 @@ struct configuration {
111
110
 
112
111
  [[nodiscard]] std::string rev_str() const;
113
112
 
114
- [[nodiscard]] bool supports_enhanced_prepared_statements() const
115
- {
116
- return cluster_capabilities.find(cluster_capability::n1ql_enhanced_prepared_statements) != cluster_capabilities.end();
117
- }
118
-
119
- [[nodiscard]] bool supports_read_from_replica() const
120
- {
121
- return cluster_capabilities.find(cluster_capability::n1ql_read_from_replica) != cluster_capabilities.end();
122
- }
123
-
124
- [[nodiscard]] bool supports_range_scan() const
125
- {
126
- return bucket_capabilities.find(bucket_capability::range_scan) != bucket_capabilities.end();
127
- }
128
-
129
- [[nodiscard]] bool ephemeral() const
130
- {
131
- // Use bucket capabilities to identify if couchapi is missing (then its ephemeral). If its null then
132
- // we are running an old version of couchbase which doesn't have ephemeral buckets at all.
133
- return bucket_capabilities.count(couchbase::core::bucket_capability::couchapi) == 0;
134
- }
135
-
136
- [[nodiscard]] bool supports_subdoc_read_replica() const
137
- {
138
- return bucket_capabilities.find(bucket_capability::replica_read) != bucket_capabilities.end();
139
- }
140
-
141
- [[nodiscard]] bool supports_non_deduped_history() const
142
- {
143
- return bucket_capabilities.find(bucket_capability::non_deduped_history) != bucket_capabilities.end();
144
- }
145
-
146
113
  [[nodiscard]] std::size_t index_for_this_node() const;
147
114
  [[nodiscard]] bool has_node(const std::string& network,
148
115
  service_type type,
@@ -160,7 +160,7 @@ struct fmt::formatter<couchbase::core::topology::configuration> {
160
160
  config.vbmap.has_value() ? fmt::format(", partitions={}", config.vbmap->size()) : "",
161
161
  config.nodes.size(),
162
162
  couchbase::core::utils::join_strings_fmt(config.nodes, ", "),
163
- couchbase::core::utils::join_strings_fmt(config.bucket_capabilities, ", "),
164
- couchbase::core::utils::join_strings_fmt(config.cluster_capabilities, ", "));
163
+ couchbase::core::utils::join_strings_fmt(config.capabilities.bucket, ", "),
164
+ couchbase::core::utils::join_strings_fmt(config.capabilities.cluster, ", "));
165
165
  }
166
166
  };
@@ -213,33 +213,47 @@ struct traits<couchbase::core::topology::configuration> {
213
213
  for (const auto& entry : m->get_array()) {
214
214
  const auto& name = entry.get_string();
215
215
  if (name == "couchapi") {
216
- result.bucket_capabilities.insert(couchbase::core::bucket_capability::couchapi);
216
+ result.capabilities.bucket.insert(couchbase::core::bucket_capability::couchapi);
217
217
  } else if (name == "collections") {
218
- result.bucket_capabilities.insert(couchbase::core::bucket_capability::collections);
218
+ result.capabilities.bucket.insert(couchbase::core::bucket_capability::collections);
219
219
  } else if (name == "durableWrite") {
220
- result.bucket_capabilities.insert(couchbase::core::bucket_capability::durable_write);
220
+ result.capabilities.bucket.insert(couchbase::core::bucket_capability::durable_write);
221
221
  } else if (name == "tombstonedUserXAttrs") {
222
- result.bucket_capabilities.insert(couchbase::core::bucket_capability::tombstoned_user_xattrs);
222
+ result.capabilities.bucket.insert(couchbase::core::bucket_capability::tombstoned_user_xattrs);
223
223
  } else if (name == "dcp") {
224
- result.bucket_capabilities.insert(couchbase::core::bucket_capability::dcp);
224
+ result.capabilities.bucket.insert(couchbase::core::bucket_capability::dcp);
225
225
  } else if (name == "cbhello") {
226
- result.bucket_capabilities.insert(couchbase::core::bucket_capability::cbhello);
226
+ result.capabilities.bucket.insert(couchbase::core::bucket_capability::cbhello);
227
227
  } else if (name == "touch") {
228
- result.bucket_capabilities.insert(couchbase::core::bucket_capability::touch);
228
+ result.capabilities.bucket.insert(couchbase::core::bucket_capability::touch);
229
229
  } else if (name == "cccp") {
230
- result.bucket_capabilities.insert(couchbase::core::bucket_capability::cccp);
230
+ result.capabilities.bucket.insert(couchbase::core::bucket_capability::cccp);
231
231
  } else if (name == "xdcrCheckpointing") {
232
- result.bucket_capabilities.insert(couchbase::core::bucket_capability::xdcr_checkpointing);
232
+ result.capabilities.bucket.insert(couchbase::core::bucket_capability::xdcr_checkpointing);
233
233
  } else if (name == "nodesExt") {
234
- result.bucket_capabilities.insert(couchbase::core::bucket_capability::nodes_ext);
234
+ result.capabilities.bucket.insert(couchbase::core::bucket_capability::nodes_ext);
235
235
  } else if (name == "xattr") {
236
- result.bucket_capabilities.insert(couchbase::core::bucket_capability::xattr);
236
+ result.capabilities.bucket.insert(couchbase::core::bucket_capability::xattr);
237
237
  } else if (name == "rangeScan") {
238
- result.bucket_capabilities.insert(couchbase::core::bucket_capability::range_scan);
238
+ result.capabilities.bucket.insert(couchbase::core::bucket_capability::range_scan);
239
239
  } else if (name == "subdoc.ReplicaRead") {
240
- result.bucket_capabilities.insert(couchbase::core::bucket_capability::replica_read);
240
+ result.capabilities.bucket.insert(couchbase::core::bucket_capability::subdoc_replica_read);
241
241
  } else if (name == "nonDedupedHistory") {
242
- result.bucket_capabilities.insert(couchbase::core::bucket_capability::non_deduped_history);
242
+ result.capabilities.bucket.insert(couchbase::core::bucket_capability::non_deduped_history);
243
+ } else if (name == "subdoc.ReplaceBodyWithXattr") {
244
+ result.capabilities.bucket.insert(couchbase::core::bucket_capability::subdoc_replace_body_with_xattr);
245
+ } else if (name == "subdoc.DocumentMacroSupport") {
246
+ result.capabilities.bucket.insert(couchbase::core::bucket_capability::subdoc_document_macro_support);
247
+ } else if (name == "subdoc.ReviveDocument") {
248
+ result.capabilities.bucket.insert(couchbase::core::bucket_capability::subdoc_revive_document);
249
+ } else if (name == "dcp.IgnorePurgedTombstones") {
250
+ result.capabilities.bucket.insert(couchbase::core::bucket_capability::dcp_ignore_purged_tombstones);
251
+ } else if (name == "preserve_expiry") {
252
+ result.capabilities.bucket.insert(couchbase::core::bucket_capability::preserve_expiry);
253
+ } else if (name == "querySystemCollection") {
254
+ result.capabilities.bucket.insert(couchbase::core::bucket_capability::query_system_collection);
255
+ } else if (name == "mobileSystemCollection") {
256
+ result.capabilities.bucket.insert(couchbase::core::bucket_capability::mobile_system_collection);
243
257
  }
244
258
  }
245
259
  }
@@ -247,17 +261,26 @@ struct traits<couchbase::core::topology::configuration> {
247
261
  if (const auto nc = m->find("n1ql"); nc != nullptr && nc->is_array()) {
248
262
  for (const auto& entry : nc->get_array()) {
249
263
  if (const auto& name = entry.get_string(); name == "costBasedOptimizer") {
250
- result.cluster_capabilities.insert(couchbase::core::cluster_capability::n1ql_cost_based_optimizer);
264
+ result.capabilities.cluster.insert(couchbase::core::cluster_capability::n1ql_cost_based_optimizer);
251
265
  } else if (name == "indexAdvisor") {
252
- result.cluster_capabilities.insert(couchbase::core::cluster_capability::n1ql_index_advisor);
266
+ result.capabilities.cluster.insert(couchbase::core::cluster_capability::n1ql_index_advisor);
253
267
  } else if (name == "javaScriptFunctions") {
254
- result.cluster_capabilities.insert(couchbase::core::cluster_capability::n1ql_javascript_functions);
268
+ result.capabilities.cluster.insert(couchbase::core::cluster_capability::n1ql_javascript_functions);
255
269
  } else if (name == "inlineFunctions") {
256
- result.cluster_capabilities.insert(couchbase::core::cluster_capability::n1ql_inline_functions);
270
+ result.capabilities.cluster.insert(couchbase::core::cluster_capability::n1ql_inline_functions);
257
271
  } else if (name == "enhancedPreparedStatements") {
258
- result.cluster_capabilities.insert(couchbase::core::cluster_capability::n1ql_enhanced_prepared_statements);
272
+ result.capabilities.cluster.insert(couchbase::core::cluster_capability::n1ql_enhanced_prepared_statements);
259
273
  } else if (name == "readFromReplica") {
260
- result.cluster_capabilities.insert(couchbase::core::cluster_capability::n1ql_read_from_replica);
274
+ result.capabilities.cluster.insert(couchbase::core::cluster_capability::n1ql_read_from_replica);
275
+ }
276
+ }
277
+ }
278
+ if (const auto sc = m->find("search"); sc != nullptr && sc->is_array()) {
279
+ for (const auto& entry : sc->get_array()) {
280
+ if (const auto& name = entry.get_string(); name == "vectorSearch") {
281
+ result.capabilities.cluster.insert(couchbase::core::cluster_capability::search_vector_search);
282
+ } else if (name == "scopedSearchIndex") {
283
+ result.capabilities.cluster.insert(couchbase::core::cluster_capability::search_scoped_search_index);
261
284
  }
262
285
  }
263
286
  }
@@ -230,6 +230,11 @@ class transaction_operation_failed : public std::runtime_error
230
230
  return cause_;
231
231
  }
232
232
 
233
+ final_error to_raise() const
234
+ {
235
+ return to_raise_;
236
+ }
237
+
233
238
  void do_throw(const transaction_context& context) const
234
239
  {
235
240
  if (to_raise_ == FAILED_POST_COMMIT) {
@@ -53,8 +53,7 @@ class collection_query_index_manager
53
53
  {
54
54
  public:
55
55
  /**
56
- * Get all indexes within a collection.
57
- *
56
+ * Get all indexes within the collection.
58
57
  *
59
58
  * @param options optional parameters
60
59
  * @param handler the handler that implements @ref get_all_query_indexes_handler
@@ -64,13 +63,23 @@ class collection_query_index_manager
64
63
  */
65
64
  void get_all_indexes(const get_all_query_indexes_options& options, get_all_query_indexes_handler&& handler) const;
66
65
 
66
+ /**
67
+ * Get all indexes within the collection..
68
+ *
69
+ * @param options optional parameters
70
+ * @return future object that carries result of the operation
71
+ *
72
+ * @since 1.0.0
73
+ * @committed
74
+ */
67
75
  [[nodiscard]] auto get_all_indexes(const get_all_query_indexes_options& options) const
68
76
  -> std::future<std::pair<manager_error_context, std::vector<couchbase::management::query_index>>>;
77
+
69
78
  /**
70
79
  * Create an index on the collection.
71
80
  *
72
81
  * @param index_name name of the index
73
- * @param fields the fields to create the index over
82
+ * @param keys the keys to create the index over
74
83
  * @param options optional parameters
75
84
  * @param handler the handler that implements @ref create_query_index_handler
76
85
  *
@@ -78,16 +87,26 @@ class collection_query_index_manager
78
87
  * @committed
79
88
  */
80
89
  void create_index(std::string index_name,
81
- std::vector<std::string> fields,
90
+ std::vector<std::string> keys,
82
91
  const create_query_index_options& options,
83
92
  create_query_index_handler&& handler) const;
84
93
 
85
- [[nodiscard]] auto create_index(std::string index_name,
86
- std::vector<std::string> fields,
87
- const create_query_index_options& options) const -> std::future<manager_error_context>;
94
+ /**
95
+ * Create an index on the collection.
96
+ *
97
+ * @param index_name name of the index
98
+ * @param keys the keys to create the index over
99
+ * @param options optional parameters
100
+ * @return future object that carries result of the operation
101
+ *
102
+ * @since 1.0.0
103
+ * @committed
104
+ */
105
+ [[nodiscard]] auto create_index(std::string index_name, std::vector<std::string> keys, const create_query_index_options& options) const
106
+ -> std::future<manager_error_context>;
88
107
 
89
108
  /**
90
- * Create a primary index on a collection.
109
+ * Create a primary index on the collection.
91
110
  *
92
111
  * @param options optional parameters
93
112
  * @param handler the handler that implements @ref create_query_index_handler
@@ -97,10 +116,19 @@ class collection_query_index_manager
97
116
  */
98
117
  void create_primary_index(const create_primary_query_index_options& options, create_query_index_handler&& handler) const;
99
118
 
119
+ /**
120
+ * Create a primary index on the collection.
121
+ *
122
+ * @param options optional parameters
123
+ * @return future object that carries result of the operation
124
+ *
125
+ * @since 1.0.0
126
+ * @committed
127
+ */
100
128
  [[nodiscard]] auto create_primary_index(const create_primary_query_index_options& options) const -> std::future<manager_error_context>;
101
129
 
102
130
  /**
103
- * Drop primary index on a collection.
131
+ * Drop primary index on the collection.
104
132
  *
105
133
  * @param options optional parameters
106
134
  * @param handler the handler that implements @ref drop_query_index_handler
@@ -110,10 +138,19 @@ class collection_query_index_manager
110
138
  */
111
139
  void drop_primary_index(const drop_primary_query_index_options& options, drop_query_index_handler&& handler) const;
112
140
 
141
+ /**
142
+ * Drop primary index on the collection.
143
+ *
144
+ * @param options optional parameters
145
+ * @return future object that carries result of the operation
146
+ *
147
+ * @since 1.0.0
148
+ * @committed
149
+ */
113
150
  [[nodiscard]] auto drop_primary_index(const drop_primary_query_index_options& options) const -> std::future<manager_error_context>;
114
151
 
115
152
  /**
116
- * Drop index in collection.
153
+ * Drop specified query index in the collection.
117
154
  *
118
155
  * @param index_name name of the index to drop
119
156
  * @param options optional parameters
@@ -124,14 +161,25 @@ class collection_query_index_manager
124
161
  */
125
162
  void drop_index(std::string index_name, const drop_query_index_options& options, drop_query_index_handler&& handler) const;
126
163
 
164
+ /**
165
+ * Drop specified query index in the collection.
166
+ *
167
+ * @param index_name name of the index to drop
168
+ * @param options optional parameters
169
+ * @return future object that carries result of the operation
170
+ *
171
+ * @since 1.0.0
172
+ * @committed
173
+ */
127
174
  [[nodiscard]] auto drop_index(std::string index_name, const drop_query_index_options& options) const
128
175
  -> std::future<manager_error_context>;
176
+
129
177
  /**
130
178
  * Builds all currently deferred indexes in this collection.
131
179
  *
132
180
  * By default, this method will build the indexes on the collection.
133
181
  *
134
- * @param options the custom options
182
+ * @param options optional parameters
135
183
  * @param handler the handler that implements @ref build_deferred_query_indexes_handler
136
184
  *
137
185
  * @since 1.0.0
@@ -139,6 +187,17 @@ class collection_query_index_manager
139
187
  */
140
188
  void build_deferred_indexes(const build_query_index_options& options, build_deferred_query_indexes_handler&& handler) const;
141
189
 
190
+ /**
191
+ * Builds all currently deferred indexes in this collection.
192
+ *
193
+ * By default, this method will build the indexes on the collection.
194
+ *
195
+ * @param options optional parameters
196
+ * @return future object that carries result of the operation
197
+ *
198
+ * @since 1.0.0
199
+ * @committed
200
+ */
142
201
  [[nodiscard]] auto build_deferred_indexes(const build_query_index_options& options) const -> std::future<manager_error_context>;
143
202
 
144
203
  /**
@@ -155,6 +214,16 @@ class collection_query_index_manager
155
214
  const watch_query_indexes_options& options,
156
215
  watch_query_indexes_handler&& handler) const;
157
216
 
217
+ /**
218
+ * Polls the state of a set of indexes, until they all are online.
219
+ *
220
+ * @param index_names names of the indexes to watch
221
+ * @param options optional parameters
222
+ * @return future object that carries result of the operation
223
+ *
224
+ * @since 1.0.0
225
+ * @committed
226
+ */
158
227
  [[nodiscard]] auto watch_indexes(std::vector<std::string> index_names, const watch_query_indexes_options& options) const
159
228
  -> std::future<manager_error_context>;
160
229
 
@@ -257,7 +257,9 @@ struct fmt::formatter<couchbase::key_value_status_code> {
257
257
  case key_value_status_code::range_scan_vb_uuid_not_equal:
258
258
  name = "range_scan_vb_uuid_not_equal (0xa8)";
259
259
  break;
260
-
260
+ case key_value_status_code::config_only:
261
+ name = "config_only (0x0d)";
262
+ break;
261
263
  case key_value_status_code::unknown:
262
264
  name = "unknown (0xffff)";
263
265
  break;
@@ -35,6 +35,7 @@ enum class key_value_status_code : std::uint16_t {
35
35
  opaque_no_match = 0x0b,
36
36
  locked = 0x09,
37
37
  not_locked = 0x0e,
38
+ config_only = 0x0d,
38
39
  auth_stale = 0x1f,
39
40
  auth_error = 0x20,
40
41
  auth_continue = 0x21,
@@ -51,7 +51,6 @@ class query_index_manager
51
51
  /**
52
52
  * Get all indexes within a bucket.
53
53
  *
54
- *
55
54
  * @param bucket_name specifies the bucket in which we look for the indexes
56
55
  * @param options optional parameters
57
56
  * @param handler the handler that implements @ref get_all_query_indexes_handler
@@ -66,7 +65,6 @@ class query_index_manager
66
65
  /**
67
66
  * Get all indexes within a bucket.
68
67
  *
69
- *
70
68
  * @param bucket_name specifies the bucket in which we look for the indexes
71
69
  * @param options optional parameters
72
70
  * @return future object that carries result of the operation
@@ -82,7 +80,7 @@ class query_index_manager
82
80
  *
83
81
  * @param bucket_name specifies the bucket in which to create the index
84
82
  * @param index_name name of the index
85
- * @param fields the fields to create the index over
83
+ * @param keys the keys to create the index over
86
84
  * @param options optional parameters
87
85
  * @param handler the handler that implements @ref create_query_index_handler
88
86
  *
@@ -91,7 +89,7 @@ class query_index_manager
91
89
  */
92
90
  void create_index(std::string bucket_name,
93
91
  std::string index_name,
94
- std::vector<std::string> fields,
92
+ std::vector<std::string> keys,
95
93
  const create_query_index_options& options,
96
94
  create_query_index_handler&& handler) const;
97
95
 
@@ -100,7 +98,7 @@ class query_index_manager
100
98
  *
101
99
  * @param bucket_name specifies the bucket in which to create the index
102
100
  * @param index_name name of the index
103
- * @param fields the fields to create the index over
101
+ * @param keys the keys to create the index over
104
102
  * @param options optional parameters
105
103
  * @return future object that carries result of the operation
106
104
  *
@@ -109,7 +107,7 @@ class query_index_manager
109
107
  */
110
108
  [[nodiscard]] auto create_index(std::string bucket_name,
111
109
  std::string index_name,
112
- std::vector<std::string> fields,
110
+ std::vector<std::string> keys,
113
111
  const create_query_index_options& options) const -> std::future<manager_error_context>;
114
112
 
115
113
  /**
@@ -202,7 +200,7 @@ class query_index_manager
202
200
  * By default, this method will build the indexes on the bucket.
203
201
  *
204
202
  * @param bucket_name name of the bucket
205
- * @param options the custom options
203
+ * @param options optional parameters
206
204
  * @param handler the handler that implements @ref build_deferred_query_indexes_handler
207
205
  *
208
206
  * @since 1.0.0
@@ -218,7 +216,7 @@ class query_index_manager
218
216
  * By default, this method will build the indexes on the bucket.
219
217
  *
220
218
  * @param bucket_name name of the bucket
221
- * @param options the custom options
219
+ * @param options optional parameters
222
220
  * @return future object that carries result of the operation
223
221
  *
224
222
  * @since 1.0.0
package/dist/binding.d.ts CHANGED
@@ -208,7 +208,7 @@ export interface CppManagementClusterBucketSettingsNode {
208
208
  };
209
209
  }
210
210
  export interface CppManagementViewsDesignDocument {
211
- rev: string;
211
+ rev?: string;
212
212
  name: string;
213
213
  ns: CppDesignDocumentNamespace;
214
214
  views: {
@@ -860,6 +860,8 @@ export interface CppSearchResponseSearchFacetNumericRangeFacet {
860
860
  export interface CppSearchRequest {
861
861
  index_name: string;
862
862
  query: CppJsonString;
863
+ bucket_name?: string;
864
+ scope_name?: string;
863
865
  show_request?: boolean;
864
866
  vector_search?: CppJsonString;
865
867
  vector_query_combination?: CppVectorQueryCombination;
@@ -957,6 +959,7 @@ export interface CppDocumentViewRequest {
957
959
  raw: {
958
960
  [key: string]: string;
959
961
  };
962
+ full_set?: boolean;
960
963
  order?: CppViewSortOrder;
961
964
  on_error?: CppViewOnError;
962
965
  query_string: string[];
@@ -1201,6 +1204,8 @@ export interface CppManagementSearchIndexGetAllResponse {
1201
1204
  indexes: CppManagementSearchIndex[];
1202
1205
  }
1203
1206
  export interface CppManagementSearchIndexGetAllRequest {
1207
+ bucket_name?: string;
1208
+ scope_name?: string;
1204
1209
  client_context_id?: string;
1205
1210
  timeout?: CppMilliseconds;
1206
1211
  }
@@ -1212,6 +1217,8 @@ export interface CppManagementSearchIndexAnalyzeDocumentResponse {
1212
1217
  export interface CppManagementSearchIndexAnalyzeDocumentRequest {
1213
1218
  index_name: string;
1214
1219
  encoded_document: string;
1220
+ bucket_name?: string;
1221
+ scope_name?: string;
1215
1222
  client_context_id?: string;
1216
1223
  timeout?: CppMilliseconds;
1217
1224
  }
@@ -1279,7 +1286,7 @@ export interface CppManagementQueryIndexCreateRequest {
1279
1286
  scope_name: string;
1280
1287
  collection_name: string;
1281
1288
  index_name: string;
1282
- fields: string[];
1289
+ keys: string[];
1283
1290
  query_ctx: CppQueryContext;
1284
1291
  is_primary: boolean;
1285
1292
  ignore_if_exists: boolean;
@@ -1297,6 +1304,8 @@ export interface CppManagementSearchIndexUpsertResponse {
1297
1304
  }
1298
1305
  export interface CppManagementSearchIndexUpsertRequest {
1299
1306
  index: CppManagementSearchIndex;
1307
+ bucket_name?: string;
1308
+ scope_name?: string;
1300
1309
  client_context_id?: string;
1301
1310
  timeout?: CppMilliseconds;
1302
1311
  }
@@ -1619,6 +1628,8 @@ export interface CppManagementSearchIndexDropResponse {
1619
1628
  }
1620
1629
  export interface CppManagementSearchIndexDropRequest {
1621
1630
  index_name: string;
1631
+ bucket_name?: string;
1632
+ scope_name?: string;
1622
1633
  client_context_id?: string;
1623
1634
  timeout?: CppMilliseconds;
1624
1635
  }
@@ -1629,6 +1640,8 @@ export interface CppManagementSearchIndexControlPlanFreezeResponse {
1629
1640
  export interface CppManagementSearchIndexControlPlanFreezeRequest {
1630
1641
  index_name: string;
1631
1642
  freeze: boolean;
1643
+ bucket_name?: string;
1644
+ scope_name?: string;
1632
1645
  client_context_id?: string;
1633
1646
  timeout?: CppMilliseconds;
1634
1647
  }
@@ -1664,6 +1677,8 @@ export interface CppManagementSearchIndexControlQueryResponse {
1664
1677
  export interface CppManagementSearchIndexControlQueryRequest {
1665
1678
  index_name: string;
1666
1679
  allow: boolean;
1680
+ bucket_name?: string;
1681
+ scope_name?: string;
1667
1682
  client_context_id?: string;
1668
1683
  timeout?: CppMilliseconds;
1669
1684
  }
@@ -1718,6 +1733,8 @@ export interface CppManagementSearchIndexControlIngestResponse {
1718
1733
  export interface CppManagementSearchIndexControlIngestRequest {
1719
1734
  index_name: string;
1720
1735
  pause: boolean;
1736
+ bucket_name?: string;
1737
+ scope_name?: string;
1721
1738
  client_context_id?: string;
1722
1739
  timeout?: CppMilliseconds;
1723
1740
  }
@@ -1780,6 +1797,8 @@ export interface CppManagementSearchIndexGetResponse {
1780
1797
  }
1781
1798
  export interface CppManagementSearchIndexGetRequest {
1782
1799
  index_name: string;
1800
+ bucket_name?: string;
1801
+ scope_name?: string;
1783
1802
  client_context_id?: string;
1784
1803
  timeout?: CppMilliseconds;
1785
1804
  }
@@ -1827,6 +1846,8 @@ export interface CppManagementSearchIndexGetDocumentsCountResponse {
1827
1846
  }
1828
1847
  export interface CppManagementSearchIndexGetDocumentsCountRequest {
1829
1848
  index_name: string;
1849
+ bucket_name?: string;
1850
+ scope_name?: string;
1830
1851
  client_context_id?: string;
1831
1852
  timeout?: CppMilliseconds;
1832
1853
  }
@@ -2367,6 +2388,7 @@ export interface CppBindingAutogen {
2367
2388
  opaque_no_match: CppKeyValueStatusCode;
2368
2389
  locked: CppKeyValueStatusCode;
2369
2390
  not_locked: CppKeyValueStatusCode;
2391
+ config_only: CppKeyValueStatusCode;
2370
2392
  auth_stale: CppKeyValueStatusCode;
2371
2393
  auth_error: CppKeyValueStatusCode;
2372
2394
  auth_continue: CppKeyValueStatusCode;
@@ -1,5 +1,5 @@
1
1
  import { AnalyticsScanConsistency, AnalyticsStatus } from './analyticstypes';
2
- import { CppAnalyticsResponseAnalyticsStatus, CppAnalyticsScanConsistency, CppDiagEndpointState, CppDiagPingState, CppDurabilityLevel, CppError, CppManagementClusterBucketCompression, CppManagementClusterBucketConflictResolution, CppManagementClusterBucketEvictionPolicy, CppManagementClusterBucketStorageBackend, CppManagementClusterBucketType, CppMutationState, CppPersistTo, CppPrefixScan, CppQueryProfile, CppQueryScanConsistency, CppRangeScan, CppReplicateTo, CppSamplingScan, CppSearchHighlightStyle, CppSearchScanConsistency, CppServiceType, CppStoreSemantics, CppTxnExternalException, CppTxnOpException, CppVectorQueryCombination, CppViewScanConsistency, CppViewSortOrder } from './binding';
2
+ import { CppAnalyticsResponseAnalyticsStatus, CppAnalyticsScanConsistency, CppDesignDocumentNamespace, CppDiagEndpointState, CppDiagPingState, CppDurabilityLevel, CppError, CppManagementClusterBucketCompression, CppManagementClusterBucketConflictResolution, CppManagementClusterBucketEvictionPolicy, CppManagementClusterBucketStorageBackend, CppManagementClusterBucketType, CppMutationState, CppPersistTo, CppPrefixScan, CppQueryProfile, CppQueryScanConsistency, CppRangeScan, CppReplicateTo, CppSamplingScan, CppSearchHighlightStyle, CppSearchScanConsistency, CppServiceType, CppStoreSemantics, CppTxnExternalException, CppTxnOpException, CppVectorQueryCombination, CppViewScanConsistency, CppViewSortOrder } from './binding';
3
3
  import { BucketType, CompressionMode, ConflictResolutionType, EvictionPolicy, StorageBackend } from './bucketmanager';
4
4
  import { EndpointState, PingState } from './diagnosticstypes';
5
5
  import { ErrorContext } from './errorcontexts';
@@ -9,7 +9,7 @@ import { QueryProfileMode, QueryScanConsistency } from './querytypes';
9
9
  import { PrefixScan, RangeScan, SamplingScan } from './rangeScan';
10
10
  import { HighlightStyle, SearchScanConsistency } from './searchtypes';
11
11
  import { VectorQueryCombination } from './vectorsearch';
12
- import { ViewOrdering, ViewScanConsistency } from './viewtypes';
12
+ import { DesignDocumentNamespace, ViewOrdering, ViewScanConsistency } from './viewtypes';
13
13
  /**
14
14
  * @internal
15
15
  */
@@ -37,7 +37,7 @@ export declare function viewScanConsistencyToCpp(mode: ViewScanConsistency | und
37
37
  /**
38
38
  * @internal
39
39
  */
40
- export declare function viewOrderingToCpp(mode: ViewOrdering | undefined): CppViewSortOrder | undefined;
40
+ export declare function viewOrderingToCpp(ordering: ViewOrdering | undefined): CppViewSortOrder | undefined;
41
41
  /**
42
42
  * @internal
43
43
  */
@@ -146,3 +146,11 @@ export declare function bucketConflictResolutionTypeFromCpp(type: CppManagementC
146
146
  * @internal
147
147
  */
148
148
  export declare function vectorQueryCombinationToCpp(combination: VectorQueryCombination | undefined): CppVectorQueryCombination;
149
+ /**
150
+ * @internal
151
+ */
152
+ export declare function designDocumentNamespaceFromCpp(namespace: CppDesignDocumentNamespace): DesignDocumentNamespace;
153
+ /**
154
+ * @internal
155
+ */
156
+ export declare function designDocumentNamespaceToCpp(namespace: DesignDocumentNamespace): CppDesignDocumentNamespace;