couchbase 4.4.2 → 4.4.4

Sign up to get free protection for your applications and to get access to all the features.
Files changed (252) hide show
  1. package/BUILDING.md +182 -0
  2. package/CMakeLists.txt +13 -0
  3. package/CONTRIBUTING.md +1 -1
  4. package/README.md +4 -2
  5. package/deps/couchbase-cxx-cache/boringssl/e31ea00c1ea52052d2d78d44006cc88c80fa24a9/boringssl/src/BUILDING.md +206 -0
  6. package/deps/couchbase-cxx-client/CMakeLists.txt +18 -13
  7. package/deps/couchbase-cxx-client/README.md +2 -2
  8. package/deps/couchbase-cxx-client/cmake/APKBUILD.in +54 -0
  9. package/deps/couchbase-cxx-client/cmake/CompilerWarnings.cmake +0 -5
  10. package/deps/couchbase-cxx-client/cmake/Packaging.cmake +177 -10
  11. package/deps/couchbase-cxx-client/cmake/RPath.cmake +10 -0
  12. package/deps/couchbase-cxx-client/cmake/Testing.cmake +1 -1
  13. package/deps/couchbase-cxx-client/cmake/VersionInfo.cmake +28 -2
  14. package/deps/couchbase-cxx-client/cmake/build_version.hxx.in +1 -0
  15. package/deps/couchbase-cxx-client/cmake/couchbase-cxx-client.spec.in +45 -6
  16. package/deps/couchbase-cxx-client/cmake/couchbase_cxx_client.pc.in +2 -2
  17. package/deps/couchbase-cxx-client/cmake/debian/changelog.in +5 -0
  18. package/deps/couchbase-cxx-client/cmake/debian/compat +1 -0
  19. package/deps/couchbase-cxx-client/cmake/debian/control +40 -0
  20. package/deps/couchbase-cxx-client/cmake/debian/rules +41 -0
  21. package/deps/couchbase-cxx-client/cmake/debian/source/format +1 -0
  22. package/deps/couchbase-cxx-client/core/agent_group.cxx +8 -0
  23. package/deps/couchbase-cxx-client/core/agent_group.hxx +4 -0
  24. package/deps/couchbase-cxx-client/core/bucket.cxx +16 -20
  25. package/deps/couchbase-cxx-client/core/bucket.hxx +12 -12
  26. package/deps/couchbase-cxx-client/core/cluster.cxx +44 -52
  27. package/deps/couchbase-cxx-client/core/cluster_agent.cxx +8 -0
  28. package/deps/couchbase-cxx-client/core/cluster_agent.hxx +4 -0
  29. package/deps/couchbase-cxx-client/core/collections_component.cxx +2 -2
  30. package/deps/couchbase-cxx-client/core/columnar/agent.cxx +2 -2
  31. package/deps/couchbase-cxx-client/core/columnar/agent.hxx +1 -1
  32. package/deps/couchbase-cxx-client/core/columnar/management_component.cxx +3 -3
  33. package/deps/couchbase-cxx-client/core/columnar/query_component.cxx +103 -45
  34. package/deps/couchbase-cxx-client/core/columnar/query_component.hxx +1 -0
  35. package/deps/couchbase-cxx-client/core/free_form_http_request.hxx +8 -0
  36. package/deps/couchbase-cxx-client/core/http_component.cxx +55 -24
  37. package/deps/couchbase-cxx-client/core/http_component.hxx +4 -0
  38. package/deps/couchbase-cxx-client/core/impl/analytics.cxx +1 -0
  39. package/deps/couchbase-cxx-client/core/impl/analytics_index_manager.cxx +15 -15
  40. package/deps/couchbase-cxx-client/core/impl/bootstrap_error.hxx +10 -2
  41. package/deps/couchbase-cxx-client/core/impl/bucket.cxx +1 -1
  42. package/deps/couchbase-cxx-client/core/impl/bucket_manager.cxx +6 -6
  43. package/deps/couchbase-cxx-client/core/impl/cluster.cxx +36 -40
  44. package/deps/couchbase-cxx-client/core/impl/collection.cxx +29 -5
  45. package/deps/couchbase-cxx-client/core/impl/collection_manager.cxx +5 -5
  46. package/deps/couchbase-cxx-client/core/impl/error.cxx +24 -3
  47. package/deps/couchbase-cxx-client/core/impl/get_replica.hxx +2 -0
  48. package/deps/couchbase-cxx-client/core/impl/lookup_in_replica.hxx +2 -0
  49. package/deps/couchbase-cxx-client/core/impl/observe_poll.cxx +13 -5
  50. package/deps/couchbase-cxx-client/core/impl/observe_poll.hxx +1 -3
  51. package/deps/couchbase-cxx-client/core/impl/observe_seqno.hxx +2 -0
  52. package/deps/couchbase-cxx-client/core/impl/query.cxx +1 -0
  53. package/deps/couchbase-cxx-client/core/impl/query_index_manager.cxx +6 -6
  54. package/deps/couchbase-cxx-client/core/impl/scan_result.cxx +1 -1
  55. package/deps/couchbase-cxx-client/core/impl/search.cxx +2 -0
  56. package/deps/couchbase-cxx-client/core/impl/search_index_manager.cxx +12 -12
  57. package/deps/couchbase-cxx-client/core/io/http_command.hxx +31 -20
  58. package/deps/couchbase-cxx-client/core/io/http_session.cxx +5 -0
  59. package/deps/couchbase-cxx-client/core/io/http_session.hxx +17 -4
  60. package/deps/couchbase-cxx-client/core/io/http_session_manager.hxx +97 -49
  61. package/deps/couchbase-cxx-client/core/io/mcbp_command.hxx +15 -14
  62. package/deps/couchbase-cxx-client/core/io/mcbp_session.cxx +48 -33
  63. package/deps/couchbase-cxx-client/core/io/streams.cxx +256 -0
  64. package/deps/couchbase-cxx-client/core/io/streams.hxx +31 -155
  65. package/deps/couchbase-cxx-client/core/logger/configuration.hxx +5 -0
  66. package/deps/couchbase-cxx-client/core/logger/custom_rotating_file_sink.cxx +2 -3
  67. package/deps/couchbase-cxx-client/core/logger/logger.cxx +39 -7
  68. package/deps/couchbase-cxx-client/core/logger/logger.hxx +7 -0
  69. package/deps/couchbase-cxx-client/core/meta/features.hxx +11 -0
  70. package/deps/couchbase-cxx-client/core/meta/version.cxx +47 -6
  71. package/deps/couchbase-cxx-client/core/metrics/meter_wrapper.cxx +188 -0
  72. package/deps/couchbase-cxx-client/core/metrics/meter_wrapper.hxx +73 -0
  73. package/deps/couchbase-cxx-client/core/operations/document_analytics.cxx +23 -17
  74. package/deps/couchbase-cxx-client/core/operations/document_analytics.hxx +1 -0
  75. package/deps/couchbase-cxx-client/core/operations/document_append.hxx +2 -0
  76. package/deps/couchbase-cxx-client/core/operations/document_decrement.hxx +2 -0
  77. package/deps/couchbase-cxx-client/core/operations/document_exists.hxx +2 -0
  78. package/deps/couchbase-cxx-client/core/operations/document_get.hxx +2 -0
  79. package/deps/couchbase-cxx-client/core/operations/document_get_all_replicas.hxx +2 -0
  80. package/deps/couchbase-cxx-client/core/operations/document_get_and_lock.hxx +2 -0
  81. package/deps/couchbase-cxx-client/core/operations/document_get_and_touch.hxx +2 -0
  82. package/deps/couchbase-cxx-client/core/operations/document_get_any_replica.hxx +2 -0
  83. package/deps/couchbase-cxx-client/core/operations/document_get_projected.hxx +2 -0
  84. package/deps/couchbase-cxx-client/core/operations/document_increment.hxx +2 -0
  85. package/deps/couchbase-cxx-client/core/operations/document_insert.hxx +2 -0
  86. package/deps/couchbase-cxx-client/core/operations/document_lookup_in.hxx +2 -0
  87. package/deps/couchbase-cxx-client/core/operations/document_lookup_in_all_replicas.hxx +2 -0
  88. package/deps/couchbase-cxx-client/core/operations/document_lookup_in_any_replica.hxx +2 -0
  89. package/deps/couchbase-cxx-client/core/operations/document_mutate_in.hxx +2 -0
  90. package/deps/couchbase-cxx-client/core/operations/document_prepend.hxx +2 -0
  91. package/deps/couchbase-cxx-client/core/operations/document_query.hxx +1 -0
  92. package/deps/couchbase-cxx-client/core/operations/document_remove.hxx +2 -0
  93. package/deps/couchbase-cxx-client/core/operations/document_replace.hxx +2 -0
  94. package/deps/couchbase-cxx-client/core/operations/document_search.hxx +1 -0
  95. package/deps/couchbase-cxx-client/core/operations/document_touch.hxx +2 -0
  96. package/deps/couchbase-cxx-client/core/operations/document_unlock.hxx +2 -0
  97. package/deps/couchbase-cxx-client/core/operations/document_upsert.hxx +2 -0
  98. package/deps/couchbase-cxx-client/core/operations/document_view.hxx +1 -0
  99. package/deps/couchbase-cxx-client/core/operations/http_noop.hxx +2 -0
  100. package/deps/couchbase-cxx-client/core/operations/management/analytics_dataset_create.hxx +1 -0
  101. package/deps/couchbase-cxx-client/core/operations/management/analytics_dataset_drop.hxx +1 -0
  102. package/deps/couchbase-cxx-client/core/operations/management/analytics_dataset_get_all.hxx +1 -0
  103. package/deps/couchbase-cxx-client/core/operations/management/analytics_dataverse_create.hxx +1 -0
  104. package/deps/couchbase-cxx-client/core/operations/management/analytics_dataverse_drop.hxx +1 -0
  105. package/deps/couchbase-cxx-client/core/operations/management/analytics_get_pending_mutations.hxx +2 -0
  106. package/deps/couchbase-cxx-client/core/operations/management/analytics_index_create.hxx +1 -0
  107. package/deps/couchbase-cxx-client/core/operations/management/analytics_index_drop.hxx +1 -0
  108. package/deps/couchbase-cxx-client/core/operations/management/analytics_index_get_all.hxx +1 -0
  109. package/deps/couchbase-cxx-client/core/operations/management/analytics_link_connect.hxx +1 -0
  110. package/deps/couchbase-cxx-client/core/operations/management/analytics_link_create.hxx +1 -0
  111. package/deps/couchbase-cxx-client/core/operations/management/analytics_link_disconnect.hxx +1 -0
  112. package/deps/couchbase-cxx-client/core/operations/management/analytics_link_drop.hxx +1 -0
  113. package/deps/couchbase-cxx-client/core/operations/management/analytics_link_get_all.cxx +23 -15
  114. package/deps/couchbase-cxx-client/core/operations/management/analytics_link_get_all.hxx +4 -3
  115. package/deps/couchbase-cxx-client/core/operations/management/analytics_link_replace.hxx +1 -0
  116. package/deps/couchbase-cxx-client/core/operations/management/bucket_create.hxx +1 -0
  117. package/deps/couchbase-cxx-client/core/operations/management/bucket_describe.cxx +2 -1
  118. package/deps/couchbase-cxx-client/core/operations/management/bucket_describe.hxx +1 -0
  119. package/deps/couchbase-cxx-client/core/operations/management/bucket_drop.cxx +3 -1
  120. package/deps/couchbase-cxx-client/core/operations/management/bucket_drop.hxx +1 -0
  121. package/deps/couchbase-cxx-client/core/operations/management/bucket_flush.cxx +3 -1
  122. package/deps/couchbase-cxx-client/core/operations/management/bucket_flush.hxx +1 -0
  123. package/deps/couchbase-cxx-client/core/operations/management/bucket_get.cxx +3 -1
  124. package/deps/couchbase-cxx-client/core/operations/management/bucket_get.hxx +1 -0
  125. package/deps/couchbase-cxx-client/core/operations/management/bucket_get_all.hxx +1 -0
  126. package/deps/couchbase-cxx-client/core/operations/management/bucket_update.cxx +3 -1
  127. package/deps/couchbase-cxx-client/core/operations/management/bucket_update.hxx +1 -0
  128. package/deps/couchbase-cxx-client/core/operations/management/change_password.hxx +1 -0
  129. package/deps/couchbase-cxx-client/core/operations/management/cluster_describe.hxx +1 -0
  130. package/deps/couchbase-cxx-client/core/operations/management/cluster_developer_preview_enable.hxx +1 -0
  131. package/deps/couchbase-cxx-client/core/operations/management/collection_create.cxx +3 -2
  132. package/deps/couchbase-cxx-client/core/operations/management/collection_create.hxx +2 -0
  133. package/deps/couchbase-cxx-client/core/operations/management/collection_drop.cxx +5 -2
  134. package/deps/couchbase-cxx-client/core/operations/management/collection_drop.hxx +1 -0
  135. package/deps/couchbase-cxx-client/core/operations/management/collection_update.cxx +4 -2
  136. package/deps/couchbase-cxx-client/core/operations/management/collection_update.hxx +2 -0
  137. package/deps/couchbase-cxx-client/core/operations/management/collections_manifest_get.hxx +2 -0
  138. package/deps/couchbase-cxx-client/core/operations/management/eventing_deploy_function.hxx +3 -2
  139. package/deps/couchbase-cxx-client/core/operations/management/eventing_drop_function.hxx +3 -2
  140. package/deps/couchbase-cxx-client/core/operations/management/eventing_get_all_functions.hxx +3 -2
  141. package/deps/couchbase-cxx-client/core/operations/management/eventing_get_function.hxx +3 -2
  142. package/deps/couchbase-cxx-client/core/operations/management/eventing_get_status.hxx +3 -2
  143. package/deps/couchbase-cxx-client/core/operations/management/eventing_pause_function.hxx +3 -2
  144. package/deps/couchbase-cxx-client/core/operations/management/eventing_resume_function.hxx +3 -2
  145. package/deps/couchbase-cxx-client/core/operations/management/eventing_undeploy_function.hxx +3 -2
  146. package/deps/couchbase-cxx-client/core/operations/management/eventing_upsert_function.hxx +3 -2
  147. package/deps/couchbase-cxx-client/core/operations/management/freeform.hxx +2 -0
  148. package/deps/couchbase-cxx-client/core/operations/management/group_drop.hxx +1 -0
  149. package/deps/couchbase-cxx-client/core/operations/management/group_get.hxx +1 -0
  150. package/deps/couchbase-cxx-client/core/operations/management/group_get_all.hxx +1 -0
  151. package/deps/couchbase-cxx-client/core/operations/management/group_upsert.cxx +3 -3
  152. package/deps/couchbase-cxx-client/core/operations/management/group_upsert.hxx +1 -0
  153. package/deps/couchbase-cxx-client/core/operations/management/query_index_build.hxx +2 -0
  154. package/deps/couchbase-cxx-client/core/operations/management/query_index_build_deferred.hxx +3 -0
  155. package/deps/couchbase-cxx-client/core/operations/management/query_index_create.hxx +1 -0
  156. package/deps/couchbase-cxx-client/core/operations/management/query_index_drop.hxx +1 -0
  157. package/deps/couchbase-cxx-client/core/operations/management/query_index_get_all.hxx +2 -0
  158. package/deps/couchbase-cxx-client/core/operations/management/query_index_get_all_deferred.hxx +3 -0
  159. package/deps/couchbase-cxx-client/core/operations/management/role_get_all.hxx +1 -0
  160. package/deps/couchbase-cxx-client/core/operations/management/scope_create.cxx +2 -1
  161. package/deps/couchbase-cxx-client/core/operations/management/scope_create.hxx +1 -0
  162. package/deps/couchbase-cxx-client/core/operations/management/scope_drop.cxx +4 -1
  163. package/deps/couchbase-cxx-client/core/operations/management/scope_drop.hxx +1 -0
  164. package/deps/couchbase-cxx-client/core/operations/management/scope_get_all.cxx +3 -1
  165. package/deps/couchbase-cxx-client/core/operations/management/scope_get_all.hxx +1 -0
  166. package/deps/couchbase-cxx-client/core/operations/management/search_get_stats.hxx +1 -0
  167. package/deps/couchbase-cxx-client/core/operations/management/search_index_analyze_document.cxx +3 -2
  168. package/deps/couchbase-cxx-client/core/operations/management/search_index_analyze_document.hxx +1 -0
  169. package/deps/couchbase-cxx-client/core/operations/management/search_index_control_ingest.cxx +3 -2
  170. package/deps/couchbase-cxx-client/core/operations/management/search_index_control_ingest.hxx +1 -0
  171. package/deps/couchbase-cxx-client/core/operations/management/search_index_control_plan_freeze.cxx +3 -2
  172. package/deps/couchbase-cxx-client/core/operations/management/search_index_control_plan_freeze.hxx +1 -0
  173. package/deps/couchbase-cxx-client/core/operations/management/search_index_control_query.cxx +3 -2
  174. package/deps/couchbase-cxx-client/core/operations/management/search_index_control_query.hxx +1 -0
  175. package/deps/couchbase-cxx-client/core/operations/management/search_index_drop.cxx +5 -2
  176. package/deps/couchbase-cxx-client/core/operations/management/search_index_drop.hxx +1 -0
  177. package/deps/couchbase-cxx-client/core/operations/management/search_index_get.cxx +5 -2
  178. package/deps/couchbase-cxx-client/core/operations/management/search_index_get.hxx +1 -0
  179. package/deps/couchbase-cxx-client/core/operations/management/search_index_get_all.cxx +4 -2
  180. package/deps/couchbase-cxx-client/core/operations/management/search_index_get_all.hxx +1 -0
  181. package/deps/couchbase-cxx-client/core/operations/management/search_index_get_documents_count.cxx +3 -2
  182. package/deps/couchbase-cxx-client/core/operations/management/search_index_get_documents_count.hxx +2 -0
  183. package/deps/couchbase-cxx-client/core/operations/management/search_index_get_stats.hxx +1 -0
  184. package/deps/couchbase-cxx-client/core/operations/management/search_index_upsert.cxx +5 -2
  185. package/deps/couchbase-cxx-client/core/operations/management/search_index_upsert.hxx +1 -0
  186. package/deps/couchbase-cxx-client/core/operations/management/user_drop.hxx +1 -0
  187. package/deps/couchbase-cxx-client/core/operations/management/user_get.hxx +1 -0
  188. package/deps/couchbase-cxx-client/core/operations/management/user_get_all.hxx +1 -0
  189. package/deps/couchbase-cxx-client/core/operations/management/user_upsert.cxx +3 -3
  190. package/deps/couchbase-cxx-client/core/operations/management/user_upsert.hxx +1 -0
  191. package/deps/couchbase-cxx-client/core/operations/management/view_index_drop.cxx +2 -1
  192. package/deps/couchbase-cxx-client/core/operations/management/view_index_drop.hxx +1 -0
  193. package/deps/couchbase-cxx-client/core/operations/management/view_index_get.cxx +2 -1
  194. package/deps/couchbase-cxx-client/core/operations/management/view_index_get.hxx +1 -0
  195. package/deps/couchbase-cxx-client/core/operations/management/view_index_get_all.cxx +3 -1
  196. package/deps/couchbase-cxx-client/core/operations/management/view_index_get_all.hxx +2 -0
  197. package/deps/couchbase-cxx-client/core/operations/management/view_index_upsert.cxx +2 -1
  198. package/deps/couchbase-cxx-client/core/operations/management/view_index_upsert.hxx +1 -0
  199. package/deps/couchbase-cxx-client/core/origin.cxx +37 -17
  200. package/deps/couchbase-cxx-client/core/platform/base64.cc +1 -1
  201. package/deps/couchbase-cxx-client/core/platform/random.cc +2 -0
  202. package/deps/couchbase-cxx-client/core/platform/uuid.h +6 -6
  203. package/deps/couchbase-cxx-client/core/row_streamer.cxx +1 -1
  204. package/deps/couchbase-cxx-client/core/sasl/scram-sha/stringutils.cc +1 -1
  205. package/deps/couchbase-cxx-client/core/sasl/scram-sha/stringutils.h +4 -4
  206. package/deps/couchbase-cxx-client/core/topology/configuration.hxx +2 -0
  207. package/deps/couchbase-cxx-client/core/topology/configuration_json.hxx +8 -0
  208. package/deps/couchbase-cxx-client/core/tracing/constants.hxx +3 -0
  209. package/deps/couchbase-cxx-client/core/tracing/tracer_wrapper.cxx +87 -0
  210. package/deps/couchbase-cxx-client/core/tracing/tracer_wrapper.hxx +57 -0
  211. package/deps/couchbase-cxx-client/core/transactions/async_attempt_context.hxx +9 -21
  212. package/deps/couchbase-cxx-client/core/transactions/attempt_context.hxx +6 -33
  213. package/deps/couchbase-cxx-client/core/transactions/attempt_context_impl.cxx +57 -56
  214. package/deps/couchbase-cxx-client/core/transactions/attempt_context_impl.hxx +17 -18
  215. package/deps/couchbase-cxx-client/core/transactions/staged_mutation.cxx +2 -2
  216. package/deps/couchbase-cxx-client/core/transactions/transaction_context.cxx +2 -2
  217. package/deps/couchbase-cxx-client/core/transactions/transaction_get_result.hxx +0 -20
  218. package/deps/couchbase-cxx-client/core/transactions/transactions.cxx +2 -2
  219. package/deps/couchbase-cxx-client/core/utils/connection_string.cxx +128 -52
  220. package/deps/couchbase-cxx-client/couchbase/analytics_options.hxx +4 -3
  221. package/deps/couchbase-cxx-client/couchbase/codec/tao_json_serializer.hxx +1 -1
  222. package/deps/couchbase-cxx-client/couchbase/common_options.hxx +16 -1
  223. package/deps/couchbase-cxx-client/couchbase/metrics/otel_meter.hxx +16 -20
  224. package/deps/couchbase-cxx-client/couchbase/mutate_in_specs.hxx +2 -2
  225. package/deps/couchbase-cxx-client/couchbase/query_options.hxx +4 -3
  226. package/deps/couchbase-cxx-client/couchbase/search_options.hxx +1 -1
  227. package/dist/analyticsindexmanager.d.ts +98 -14
  228. package/dist/analyticsindexmanager.js +452 -411
  229. package/dist/binding.d.ts +53 -4
  230. package/dist/bindingutilities.d.ts +26 -1
  231. package/dist/bindingutilities.js +108 -1
  232. package/dist/couchbase.d.ts +3 -1
  233. package/dist/couchbase.js +2 -0
  234. package/dist/rangeScan.d.ts +1 -1
  235. package/dist/rangeScan.js +1 -1
  236. package/dist/transactions.d.ts +34 -3
  237. package/dist/transactions.js +25 -18
  238. package/dist/transcoders.d.ts +68 -0
  239. package/dist/transcoders.js +194 -1
  240. package/dist/usermanager.d.ts +14 -14
  241. package/dist/usermanager.js +178 -228
  242. package/dist/utilities.js +4 -6
  243. package/dist/utilities_internal.js +1 -2
  244. package/package.json +9 -8
  245. package/src/binding.cpp +13 -13
  246. package/src/connection.cpp +22 -0
  247. package/src/connection.hpp +12 -0
  248. package/src/connection_autogen.cpp +100 -0
  249. package/src/jstocbpp_autogen.hpp +315 -8
  250. package/src/jstocbpp_transactions.hpp +1 -2
  251. package/tools/gen-bindings-js.js +38 -3
  252. package/tools/gen-bindings-json.py +575 -328
package/src/binding.cpp CHANGED
@@ -9,7 +9,6 @@
9
9
  #include <core/logger/configuration.hxx>
10
10
  #include <core/meta/version.hxx>
11
11
  #include <napi.h>
12
- #include <spdlog/spdlog.h>
13
12
 
14
13
  namespace couchnode
15
14
  {
@@ -39,40 +38,41 @@ Napi::Value shutdown_logger(const Napi::CallbackInfo &info)
39
38
 
40
39
  Napi::Object Init(Napi::Env env, Napi::Object exports)
41
40
  {
42
- spdlog::set_pattern("[%Y-%m-%d %T.%e] [%P,%t] [%^%l%$] %oms, %v");
43
-
44
- auto spdLogLevel = spdlog::level::off;
45
41
  auto cbppLogLevel = couchbase::core::logger::level::off;
46
42
  {
47
43
  const char *logLevelCstr = getenv("CBPPLOGLEVEL");
48
44
  if (logLevelCstr) {
49
45
  std::string logLevelStr = logLevelCstr;
50
46
  if (logLevelStr == "trace") {
51
- spdLogLevel = spdlog::level::trace;
52
47
  cbppLogLevel = couchbase::core::logger::level::trace;
53
48
  } else if (logLevelStr == "debug") {
54
- spdLogLevel = spdlog::level::debug;
55
49
  cbppLogLevel = couchbase::core::logger::level::debug;
56
50
  } else if (logLevelStr == "info") {
57
- spdLogLevel = spdlog::level::info;
58
51
  cbppLogLevel = couchbase::core::logger::level::info;
59
52
  } else if (logLevelStr == "warn") {
60
- spdLogLevel = spdlog::level::warn;
61
53
  cbppLogLevel = couchbase::core::logger::level::warn;
62
54
  } else if (logLevelStr == "err") {
63
- spdLogLevel = spdlog::level::err;
64
55
  cbppLogLevel = couchbase::core::logger::level::err;
65
56
  } else if (logLevelStr == "critical") {
66
- spdLogLevel = spdlog::level::critical;
67
57
  cbppLogLevel = couchbase::core::logger::level::critical;
68
58
  }
69
59
  }
70
60
  }
61
+
71
62
  if (cbppLogLevel != couchbase::core::logger::level::off) {
72
- couchbase::core::logger::create_console_logger();
63
+ const char *logFileCstr = getenv("CBPPLOGFILE");
64
+ if (logFileCstr) {
65
+ std::string logFileStr = logFileCstr;
66
+ couchbase::core::logger::configuration configuration{};
67
+ configuration.filename = logFileStr;
68
+ configuration.log_level = cbppLogLevel;
69
+ couchbase::core::logger::create_file_logger(configuration);
70
+
71
+ } else {
72
+ couchbase::core::logger::create_console_logger();
73
+ couchbase::core::logger::set_log_levels(cbppLogLevel);
74
+ }
73
75
  }
74
- spdlog::set_level(spdLogLevel);
75
- couchbase::core::logger::set_log_levels(cbppLogLevel);
76
76
 
77
77
  AddonData::Init(env, exports);
78
78
  Constants::Init(env, exports);
@@ -171,6 +171,17 @@ void Connection::Init(Napi::Env env, Napi::Object exports)
171
171
  "managementEventingGetFunction"),
172
172
  InstanceMethod<&Connection::jsManagementViewIndexDrop>(
173
173
  "managementViewIndexDrop"),
174
+ InstanceMethod<
175
+ &Connection::
176
+ jsManagementAnalyticsLinkReplaceAzureBlobExternalLink>(
177
+ "managementAnalyticsLinkReplaceAzureBlobExternalLink"),
178
+ InstanceMethod<
179
+ &Connection::
180
+ jsManagementAnalyticsLinkReplaceCouchbaseRemoteLink>(
181
+ "managementAnalyticsLinkReplaceCouchbaseRemoteLink"),
182
+ InstanceMethod<
183
+ &Connection::jsManagementAnalyticsLinkReplaceS3ExternalLink>(
184
+ "managementAnalyticsLinkReplaceS3ExternalLink"),
174
185
  InstanceMethod<&Connection::jsManagementAnalyticsLinkDisconnect>(
175
186
  "managementAnalyticsLinkDisconnect"),
176
187
  InstanceMethod<&Connection::jsManagementUserUpsert>(
@@ -202,6 +213,17 @@ void Connection::Init(Napi::Env env, Napi::Object exports)
202
213
  "managementRoleGetAll"),
203
214
  InstanceMethod<&Connection::jsManagementGroupGetAll>(
204
215
  "managementGroupGetAll"),
216
+ InstanceMethod<
217
+ &Connection::
218
+ jsManagementAnalyticsLinkCreateAzureBlobExternalLink>(
219
+ "managementAnalyticsLinkCreateAzureBlobExternalLink"),
220
+ InstanceMethod<
221
+ &Connection::
222
+ jsManagementAnalyticsLinkCreateCouchbaseRemoteLink>(
223
+ "managementAnalyticsLinkCreateCouchbaseRemoteLink"),
224
+ InstanceMethod<
225
+ &Connection::jsManagementAnalyticsLinkCreateS3ExternalLink>(
226
+ "managementAnalyticsLinkCreateS3ExternalLink"),
205
227
  InstanceMethod<&Connection::jsManagementEventingDropFunction>(
206
228
  "managementEventingDropFunction"),
207
229
  InstanceMethod<&Connection::jsManagementCollectionDrop>(
@@ -161,6 +161,12 @@ public:
161
161
  Napi::Value jsManagementScopeCreate(const Napi::CallbackInfo &info);
162
162
  Napi::Value jsManagementEventingGetFunction(const Napi::CallbackInfo &info);
163
163
  Napi::Value jsManagementViewIndexDrop(const Napi::CallbackInfo &info);
164
+ Napi::Value jsManagementAnalyticsLinkReplaceAzureBlobExternalLink(
165
+ const Napi::CallbackInfo &info);
166
+ Napi::Value jsManagementAnalyticsLinkReplaceCouchbaseRemoteLink(
167
+ const Napi::CallbackInfo &info);
168
+ Napi::Value jsManagementAnalyticsLinkReplaceS3ExternalLink(
169
+ const Napi::CallbackInfo &info);
164
170
  Napi::Value
165
171
  jsManagementAnalyticsLinkDisconnect(const Napi::CallbackInfo &info);
166
172
  Napi::Value jsManagementUserUpsert(const Napi::CallbackInfo &info);
@@ -182,6 +188,12 @@ public:
182
188
  jsManagementSearchIndexControlQuery(const Napi::CallbackInfo &info);
183
189
  Napi::Value jsManagementRoleGetAll(const Napi::CallbackInfo &info);
184
190
  Napi::Value jsManagementGroupGetAll(const Napi::CallbackInfo &info);
191
+ Napi::Value jsManagementAnalyticsLinkCreateAzureBlobExternalLink(
192
+ const Napi::CallbackInfo &info);
193
+ Napi::Value jsManagementAnalyticsLinkCreateCouchbaseRemoteLink(
194
+ const Napi::CallbackInfo &info);
195
+ Napi::Value jsManagementAnalyticsLinkCreateS3ExternalLink(
196
+ const Napi::CallbackInfo &info);
185
197
  Napi::Value
186
198
  jsManagementEventingDropFunction(const Napi::CallbackInfo &info);
187
199
  Napi::Value jsManagementCollectionDrop(const Napi::CallbackInfo &info);
@@ -1046,6 +1046,56 @@ Connection::jsManagementViewIndexDrop(const Napi::CallbackInfo &info)
1046
1046
  return info.Env().Null();
1047
1047
  }
1048
1048
 
1049
+ Napi::Value Connection::jsManagementAnalyticsLinkReplaceAzureBlobExternalLink(
1050
+ const Napi::CallbackInfo &info)
1051
+ {
1052
+ auto optsJsObj = info[0].As<Napi::Object>();
1053
+ auto callbackJsFn = info[1].As<Napi::Function>();
1054
+
1055
+ executeOp("managementAnalyticsLinkReplaceAzureBlobExternalLink",
1056
+ jsToCbpp<couchbase::core::operations::management::
1057
+ analytics_link_replace_request<
1058
+ couchbase::core::management::analytics::
1059
+ azure_blob_external_link>>(optsJsObj),
1060
+ callbackJsFn);
1061
+
1062
+ return info.Env().Null();
1063
+ }
1064
+
1065
+ Napi::Value Connection::jsManagementAnalyticsLinkReplaceCouchbaseRemoteLink(
1066
+ const Napi::CallbackInfo &info)
1067
+ {
1068
+ auto optsJsObj = info[0].As<Napi::Object>();
1069
+ auto callbackJsFn = info[1].As<Napi::Function>();
1070
+
1071
+ executeOp("managementAnalyticsLinkReplaceCouchbaseRemoteLink",
1072
+ jsToCbpp<couchbase::core::operations::management::
1073
+ analytics_link_replace_request<
1074
+ couchbase::core::management::analytics::
1075
+ couchbase_remote_link>>(optsJsObj),
1076
+ callbackJsFn);
1077
+
1078
+ return info.Env().Null();
1079
+ }
1080
+
1081
+ Napi::Value Connection::jsManagementAnalyticsLinkReplaceS3ExternalLink(
1082
+ const Napi::CallbackInfo &info)
1083
+ {
1084
+ auto optsJsObj = info[0].As<Napi::Object>();
1085
+ auto callbackJsFn = info[1].As<Napi::Function>();
1086
+
1087
+ executeOp(
1088
+ "managementAnalyticsLinkReplaceS3ExternalLink",
1089
+ jsToCbpp<
1090
+ couchbase::core::operations::management::
1091
+ analytics_link_replace_request<
1092
+ couchbase::core::management::analytics::s3_external_link>>(
1093
+ optsJsObj),
1094
+ callbackJsFn);
1095
+
1096
+ return info.Env().Null();
1097
+ }
1098
+
1049
1099
  Napi::Value
1050
1100
  Connection::jsManagementAnalyticsLinkDisconnect(const Napi::CallbackInfo &info)
1051
1101
  {
@@ -1262,6 +1312,56 @@ Napi::Value Connection::jsManagementGroupGetAll(const Napi::CallbackInfo &info)
1262
1312
  return info.Env().Null();
1263
1313
  }
1264
1314
 
1315
+ Napi::Value Connection::jsManagementAnalyticsLinkCreateAzureBlobExternalLink(
1316
+ const Napi::CallbackInfo &info)
1317
+ {
1318
+ auto optsJsObj = info[0].As<Napi::Object>();
1319
+ auto callbackJsFn = info[1].As<Napi::Function>();
1320
+
1321
+ executeOp("managementAnalyticsLinkCreateAzureBlobExternalLink",
1322
+ jsToCbpp<couchbase::core::operations::management::
1323
+ analytics_link_create_request<
1324
+ couchbase::core::management::analytics::
1325
+ azure_blob_external_link>>(optsJsObj),
1326
+ callbackJsFn);
1327
+
1328
+ return info.Env().Null();
1329
+ }
1330
+
1331
+ Napi::Value Connection::jsManagementAnalyticsLinkCreateCouchbaseRemoteLink(
1332
+ const Napi::CallbackInfo &info)
1333
+ {
1334
+ auto optsJsObj = info[0].As<Napi::Object>();
1335
+ auto callbackJsFn = info[1].As<Napi::Function>();
1336
+
1337
+ executeOp("managementAnalyticsLinkCreateCouchbaseRemoteLink",
1338
+ jsToCbpp<couchbase::core::operations::management::
1339
+ analytics_link_create_request<
1340
+ couchbase::core::management::analytics::
1341
+ couchbase_remote_link>>(optsJsObj),
1342
+ callbackJsFn);
1343
+
1344
+ return info.Env().Null();
1345
+ }
1346
+
1347
+ Napi::Value Connection::jsManagementAnalyticsLinkCreateS3ExternalLink(
1348
+ const Napi::CallbackInfo &info)
1349
+ {
1350
+ auto optsJsObj = info[0].As<Napi::Object>();
1351
+ auto callbackJsFn = info[1].As<Napi::Function>();
1352
+
1353
+ executeOp(
1354
+ "managementAnalyticsLinkCreateS3ExternalLink",
1355
+ jsToCbpp<
1356
+ couchbase::core::operations::management::
1357
+ analytics_link_create_request<
1358
+ couchbase::core::management::analytics::s3_external_link>>(
1359
+ optsJsObj),
1360
+ callbackJsFn);
1361
+
1362
+ return info.Env().Null();
1363
+ }
1364
+
1265
1365
  Napi::Value
1266
1366
  Connection::jsManagementEventingDropFunction(const Napi::CallbackInfo &info)
1267
1367
  {
@@ -1105,6 +1105,13 @@ struct js_to_cbpp_t<couchbase::core::management::rbac::role_and_description> {
1105
1105
  couchbase::core::management::rbac::role_and_description cppObj;
1106
1106
  js_to_cbpp<std::string>(cppObj.display_name, jsObj.Get("display_name"));
1107
1107
  js_to_cbpp<std::string>(cppObj.description, jsObj.Get("description"));
1108
+ js_to_cbpp<std::string>(cppObj.name, jsObj.Get("name"));
1109
+ js_to_cbpp<std::optional<std::string>>(cppObj.bucket,
1110
+ jsObj.Get("bucket"));
1111
+ js_to_cbpp<std::optional<std::string>>(cppObj.scope,
1112
+ jsObj.Get("scope"));
1113
+ js_to_cbpp<std::optional<std::string>>(cppObj.collection,
1114
+ jsObj.Get("collection"));
1108
1115
  return cppObj;
1109
1116
  }
1110
1117
  static inline Napi::Value
@@ -1116,6 +1123,13 @@ struct js_to_cbpp_t<couchbase::core::management::rbac::role_and_description> {
1116
1123
  cbpp_to_js<std::string>(env, cppObj.display_name));
1117
1124
  resObj.Set("description",
1118
1125
  cbpp_to_js<std::string>(env, cppObj.description));
1126
+ resObj.Set("name", cbpp_to_js<std::string>(env, cppObj.name));
1127
+ resObj.Set("bucket",
1128
+ cbpp_to_js<std::optional<std::string>>(env, cppObj.bucket));
1129
+ resObj.Set("scope",
1130
+ cbpp_to_js<std::optional<std::string>>(env, cppObj.scope));
1131
+ resObj.Set("collection", cbpp_to_js<std::optional<std::string>>(
1132
+ env, cppObj.collection));
1119
1133
  return resObj;
1120
1134
  }
1121
1135
  };
@@ -1152,6 +1166,13 @@ struct js_to_cbpp_t<couchbase::core::management::rbac::role_and_origins> {
1152
1166
  couchbase::core::management::rbac::role_and_origins cppObj;
1153
1167
  js_to_cbpp<std::vector<couchbase::core::management::rbac::origin>>(
1154
1168
  cppObj.origins, jsObj.Get("origins"));
1169
+ js_to_cbpp<std::string>(cppObj.name, jsObj.Get("name"));
1170
+ js_to_cbpp<std::optional<std::string>>(cppObj.bucket,
1171
+ jsObj.Get("bucket"));
1172
+ js_to_cbpp<std::optional<std::string>>(cppObj.scope,
1173
+ jsObj.Get("scope"));
1174
+ js_to_cbpp<std::optional<std::string>>(cppObj.collection,
1175
+ jsObj.Get("collection"));
1155
1176
  return cppObj;
1156
1177
  }
1157
1178
  static inline Napi::Value
@@ -1163,6 +1184,13 @@ struct js_to_cbpp_t<couchbase::core::management::rbac::role_and_origins> {
1163
1184
  "origins",
1164
1185
  cbpp_to_js<std::vector<couchbase::core::management::rbac::origin>>(
1165
1186
  env, cppObj.origins));
1187
+ resObj.Set("name", cbpp_to_js<std::string>(env, cppObj.name));
1188
+ resObj.Set("bucket",
1189
+ cbpp_to_js<std::optional<std::string>>(env, cppObj.bucket));
1190
+ resObj.Set("scope",
1191
+ cbpp_to_js<std::optional<std::string>>(env, cppObj.scope));
1192
+ resObj.Set("collection", cbpp_to_js<std::optional<std::string>>(
1193
+ env, cppObj.collection));
1166
1194
  return resObj;
1167
1195
  }
1168
1196
  };
@@ -1219,6 +1247,14 @@ struct js_to_cbpp_t<couchbase::core::management::rbac::user_and_metadata> {
1219
1247
  jsObj.Get("password_changed"));
1220
1248
  js_to_cbpp<std::set<std::string>>(cppObj.external_groups,
1221
1249
  jsObj.Get("external_groups"));
1250
+ js_to_cbpp<std::string>(cppObj.username, jsObj.Get("username"));
1251
+ js_to_cbpp<std::optional<std::string>>(cppObj.display_name,
1252
+ jsObj.Get("display_name"));
1253
+ js_to_cbpp<std::set<std::string>>(cppObj.groups, jsObj.Get("groups"));
1254
+ js_to_cbpp<std::vector<couchbase::core::management::rbac::role>>(
1255
+ cppObj.roles, jsObj.Get("roles"));
1256
+ js_to_cbpp<std::optional<std::string>>(cppObj.password,
1257
+ jsObj.Get("password"));
1222
1258
  return cppObj;
1223
1259
  }
1224
1260
  static inline Napi::Value
@@ -1237,6 +1273,17 @@ struct js_to_cbpp_t<couchbase::core::management::rbac::user_and_metadata> {
1237
1273
  env, cppObj.password_changed));
1238
1274
  resObj.Set("external_groups", cbpp_to_js<std::set<std::string>>(
1239
1275
  env, cppObj.external_groups));
1276
+ resObj.Set("username", cbpp_to_js<std::string>(env, cppObj.username));
1277
+ resObj.Set("display_name", cbpp_to_js<std::optional<std::string>>(
1278
+ env, cppObj.display_name));
1279
+ resObj.Set("groups",
1280
+ cbpp_to_js<std::set<std::string>>(env, cppObj.groups));
1281
+ resObj.Set(
1282
+ "roles",
1283
+ cbpp_to_js<std::vector<couchbase::core::management::rbac::role>>(
1284
+ env, cppObj.roles));
1285
+ resObj.Set("password", cbpp_to_js<std::optional<std::string>>(
1286
+ env, cppObj.password));
1240
1287
  return resObj;
1241
1288
  }
1242
1289
  };
@@ -8329,6 +8376,134 @@ struct js_to_cbpp_t<couchbase::core::operations::management::
8329
8376
  }
8330
8377
  };
8331
8378
 
8379
+ template <>
8380
+ struct js_to_cbpp_t<
8381
+ couchbase::core::operations::management::analytics_link_replace_request<
8382
+ couchbase::core::management::analytics::azure_blob_external_link>> {
8383
+ static inline couchbase::core::operations::management::
8384
+ analytics_link_replace_request<
8385
+ couchbase::core::management::analytics::azure_blob_external_link>
8386
+ from_js(Napi::Value jsVal)
8387
+ {
8388
+ auto jsObj = jsVal.ToObject();
8389
+ couchbase::core::operations::management::analytics_link_replace_request<
8390
+ couchbase::core::management::analytics::azure_blob_external_link>
8391
+ cppObj;
8392
+ js_to_cbpp<
8393
+ couchbase::core::management::analytics::azure_blob_external_link>(
8394
+ cppObj.link, jsObj.Get("link"));
8395
+ js_to_cbpp<std::optional<std::string>>(cppObj.client_context_id,
8396
+ jsObj.Get("client_context_id"));
8397
+ js_to_cbpp<std::optional<std::chrono::milliseconds>>(
8398
+ cppObj.timeout, jsObj.Get("timeout"));
8399
+ return cppObj;
8400
+ }
8401
+ static inline Napi::Value
8402
+ to_js(Napi::Env env, const couchbase::core::operations::management::
8403
+ analytics_link_replace_request<
8404
+ couchbase::core::management::analytics::
8405
+ azure_blob_external_link> &cppObj)
8406
+ {
8407
+ auto resObj = Napi::Object::New(env);
8408
+ resObj.Set("link",
8409
+ cbpp_to_js<couchbase::core::management::analytics::
8410
+ azure_blob_external_link>(env, cppObj.link));
8411
+ resObj.Set("client_context_id", cbpp_to_js<std::optional<std::string>>(
8412
+ env, cppObj.client_context_id));
8413
+ resObj.Set("timeout",
8414
+ cbpp_to_js<std::optional<std::chrono::milliseconds>>(
8415
+ env, cppObj.timeout));
8416
+ return resObj;
8417
+ }
8418
+ };
8419
+
8420
+ template <>
8421
+ struct js_to_cbpp_t<
8422
+ couchbase::core::operations::management::analytics_link_replace_request<
8423
+ couchbase::core::management::analytics::couchbase_remote_link>> {
8424
+ static inline couchbase::core::operations::management::
8425
+ analytics_link_replace_request<
8426
+ couchbase::core::management::analytics::couchbase_remote_link>
8427
+ from_js(Napi::Value jsVal)
8428
+ {
8429
+ auto jsObj = jsVal.ToObject();
8430
+ couchbase::core::operations::management::analytics_link_replace_request<
8431
+ couchbase::core::management::analytics::couchbase_remote_link>
8432
+ cppObj;
8433
+ js_to_cbpp<
8434
+ couchbase::core::management::analytics::couchbase_remote_link>(
8435
+ cppObj.link, jsObj.Get("link"));
8436
+ js_to_cbpp<std::optional<std::string>>(cppObj.client_context_id,
8437
+ jsObj.Get("client_context_id"));
8438
+ js_to_cbpp<std::optional<std::chrono::milliseconds>>(
8439
+ cppObj.timeout, jsObj.Get("timeout"));
8440
+ return cppObj;
8441
+ }
8442
+ static inline Napi::Value
8443
+ to_js(Napi::Env env,
8444
+ const couchbase::core::operations::management::
8445
+ analytics_link_replace_request<
8446
+ couchbase::core::management::analytics::couchbase_remote_link>
8447
+ &cppObj)
8448
+ {
8449
+ auto resObj = Napi::Object::New(env);
8450
+ resObj.Set(
8451
+ "link",
8452
+ cbpp_to_js<
8453
+ couchbase::core::management::analytics::couchbase_remote_link>(
8454
+ env, cppObj.link));
8455
+ resObj.Set("client_context_id", cbpp_to_js<std::optional<std::string>>(
8456
+ env, cppObj.client_context_id));
8457
+ resObj.Set("timeout",
8458
+ cbpp_to_js<std::optional<std::chrono::milliseconds>>(
8459
+ env, cppObj.timeout));
8460
+ return resObj;
8461
+ }
8462
+ };
8463
+
8464
+ template <>
8465
+ struct js_to_cbpp_t<
8466
+ couchbase::core::operations::management::analytics_link_replace_request<
8467
+ couchbase::core::management::analytics::s3_external_link>> {
8468
+ static inline couchbase::core::operations::management::
8469
+ analytics_link_replace_request<
8470
+ couchbase::core::management::analytics::s3_external_link>
8471
+ from_js(Napi::Value jsVal)
8472
+ {
8473
+ auto jsObj = jsVal.ToObject();
8474
+ couchbase::core::operations::management::analytics_link_replace_request<
8475
+ couchbase::core::management::analytics::s3_external_link>
8476
+ cppObj;
8477
+ js_to_cbpp<couchbase::core::management::analytics::s3_external_link>(
8478
+ cppObj.link, jsObj.Get("link"));
8479
+ js_to_cbpp<std::optional<std::string>>(cppObj.client_context_id,
8480
+ jsObj.Get("client_context_id"));
8481
+ js_to_cbpp<std::optional<std::chrono::milliseconds>>(
8482
+ cppObj.timeout, jsObj.Get("timeout"));
8483
+ return cppObj;
8484
+ }
8485
+ static inline Napi::Value
8486
+ to_js(Napi::Env env,
8487
+ const couchbase::core::operations::management::
8488
+ analytics_link_replace_request<
8489
+ couchbase::core::management::analytics::s3_external_link>
8490
+ &cppObj)
8491
+ {
8492
+ auto resObj = Napi::Object::New(env);
8493
+ resObj.Set(
8494
+ "link",
8495
+ cbpp_to_js<
8496
+ couchbase::core::management::analytics::s3_external_link>(
8497
+ env, cppObj.link));
8498
+ resObj.Set("client_context_id", cbpp_to_js<std::optional<std::string>>(
8499
+ env, cppObj.client_context_id));
8500
+ resObj.Set("timeout",
8501
+ cbpp_to_js<std::optional<std::chrono::milliseconds>>(
8502
+ env, cppObj.timeout));
8503
+ return resObj;
8504
+ }
8505
+ };
8506
+
8332
8507
  template <>
8333
8508
  struct js_to_cbpp_t<couchbase::core::operations::management::
8334
8509
  analytics_link_disconnect_response> {
@@ -9415,6 +9590,134 @@ struct js_to_cbpp_t<couchbase::core::operations::management::
9415
9590
  }
9416
9591
  };
9417
9592
 
9593
+ template <>
9594
+ struct js_to_cbpp_t<
9595
+ couchbase::core::operations::management::analytics_link_create_request<
9596
+ couchbase::core::management::analytics::azure_blob_external_link>> {
9597
+ static inline couchbase::core::operations::management::
9598
+ analytics_link_create_request<
9599
+ couchbase::core::management::analytics::azure_blob_external_link>
9600
+ from_js(Napi::Value jsVal)
9601
+ {
9602
+ auto jsObj = jsVal.ToObject();
9603
+ couchbase::core::operations::management::analytics_link_create_request<
9604
+ couchbase::core::management::analytics::azure_blob_external_link>
9605
+ cppObj;
9606
+ js_to_cbpp<
9607
+ couchbase::core::management::analytics::azure_blob_external_link>(
9608
+ cppObj.link, jsObj.Get("link"));
9609
+ js_to_cbpp<std::optional<std::string>>(cppObj.client_context_id,
9610
+ jsObj.Get("client_context_id"));
9611
+ js_to_cbpp<std::optional<std::chrono::milliseconds>>(
9612
+ cppObj.timeout, jsObj.Get("timeout"));
9613
+ return cppObj;
9614
+ }
9615
+ static inline Napi::Value
9616
+ to_js(Napi::Env env, const couchbase::core::operations::management::
9617
+ analytics_link_create_request<
9618
+ couchbase::core::management::analytics::
9619
+ azure_blob_external_link> &cppObj)
9620
+ {
9621
+ auto resObj = Napi::Object::New(env);
9622
+ resObj.Set("link",
9623
+ cbpp_to_js<couchbase::core::management::analytics::
9624
+ azure_blob_external_link>(env, cppObj.link));
9625
+ resObj.Set("client_context_id", cbpp_to_js<std::optional<std::string>>(
9626
+ env, cppObj.client_context_id));
9627
+ resObj.Set("timeout",
9628
+ cbpp_to_js<std::optional<std::chrono::milliseconds>>(
9629
+ env, cppObj.timeout));
9630
+ return resObj;
9631
+ }
9632
+ };
9633
+
9634
+ template <>
9635
+ struct js_to_cbpp_t<
9636
+ couchbase::core::operations::management::analytics_link_create_request<
9637
+ couchbase::core::management::analytics::couchbase_remote_link>> {
9638
+ static inline couchbase::core::operations::management::
9639
+ analytics_link_create_request<
9640
+ couchbase::core::management::analytics::couchbase_remote_link>
9641
+ from_js(Napi::Value jsVal)
9642
+ {
9643
+ auto jsObj = jsVal.ToObject();
9644
+ couchbase::core::operations::management::analytics_link_create_request<
9645
+ couchbase::core::management::analytics::couchbase_remote_link>
9646
+ cppObj;
9647
+ js_to_cbpp<
9648
+ couchbase::core::management::analytics::couchbase_remote_link>(
9649
+ cppObj.link, jsObj.Get("link"));
9650
+ js_to_cbpp<std::optional<std::string>>(cppObj.client_context_id,
9651
+ jsObj.Get("client_context_id"));
9652
+ js_to_cbpp<std::optional<std::chrono::milliseconds>>(
9653
+ cppObj.timeout, jsObj.Get("timeout"));
9654
+ return cppObj;
9655
+ }
9656
+ static inline Napi::Value
9657
+ to_js(Napi::Env env,
9658
+ const couchbase::core::operations::management::
9659
+ analytics_link_create_request<
9660
+ couchbase::core::management::analytics::couchbase_remote_link>
9661
+ &cppObj)
9662
+ {
9663
+ auto resObj = Napi::Object::New(env);
9664
+ resObj.Set(
9665
+ "link",
9666
+ cbpp_to_js<
9667
+ couchbase::core::management::analytics::couchbase_remote_link>(
9668
+ env, cppObj.link));
9669
+ resObj.Set("client_context_id", cbpp_to_js<std::optional<std::string>>(
9670
+ env, cppObj.client_context_id));
9671
+ resObj.Set("timeout",
9672
+ cbpp_to_js<std::optional<std::chrono::milliseconds>>(
9673
+ env, cppObj.timeout));
9674
+ return resObj;
9675
+ }
9676
+ };
9677
+
9678
+ template <>
9679
+ struct js_to_cbpp_t<
9680
+ couchbase::core::operations::management::analytics_link_create_request<
9681
+ couchbase::core::management::analytics::s3_external_link>> {
9682
+ static inline couchbase::core::operations::management::
9683
+ analytics_link_create_request<
9684
+ couchbase::core::management::analytics::s3_external_link>
9685
+ from_js(Napi::Value jsVal)
9686
+ {
9687
+ auto jsObj = jsVal.ToObject();
9688
+ couchbase::core::operations::management::analytics_link_create_request<
9689
+ couchbase::core::management::analytics::s3_external_link>
9690
+ cppObj;
9691
+ js_to_cbpp<couchbase::core::management::analytics::s3_external_link>(
9692
+ cppObj.link, jsObj.Get("link"));
9693
+ js_to_cbpp<std::optional<std::string>>(cppObj.client_context_id,
9694
+ jsObj.Get("client_context_id"));
9695
+ js_to_cbpp<std::optional<std::chrono::milliseconds>>(
9696
+ cppObj.timeout, jsObj.Get("timeout"));
9697
+ return cppObj;
9698
+ }
9699
+ static inline Napi::Value
9700
+ to_js(Napi::Env env,
9701
+ const couchbase::core::operations::management::
9702
+ analytics_link_create_request<
9703
+ couchbase::core::management::analytics::s3_external_link>
9704
+ &cppObj)
9705
+ {
9706
+ auto resObj = Napi::Object::New(env);
9707
+ resObj.Set(
9708
+ "link",
9709
+ cbpp_to_js<
9710
+ couchbase::core::management::analytics::s3_external_link>(
9711
+ env, cppObj.link));
9712
+ resObj.Set("client_context_id", cbpp_to_js<std::optional<std::string>>(
9713
+ env, cppObj.client_context_id));
9714
+ resObj.Set("timeout",
9715
+ cbpp_to_js<std::optional<std::chrono::milliseconds>>(
9716
+ env, cppObj.timeout));
9717
+ return resObj;
9718
+ }
9719
+ };
9720
+
9418
9721
  template <>
9419
9722
  struct js_to_cbpp_t<
9420
9723
  couchbase::core::operations::management::eventing_drop_function_response> {
@@ -10524,10 +10827,12 @@ struct js_to_cbpp_t<
10524
10827
  auto jsObj = jsVal.ToObject();
10525
10828
  couchbase::core::operations::management::analytics_link_get_all_request
10526
10829
  cppObj;
10527
- js_to_cbpp<std::string>(cppObj.link_type, jsObj.Get("link_type"));
10528
- js_to_cbpp<std::string>(cppObj.link_name, jsObj.Get("link_name"));
10529
- js_to_cbpp<std::string>(cppObj.dataverse_name,
10530
- jsObj.Get("dataverse_name"));
10830
+ js_to_cbpp<std::optional<std::string>>(cppObj.link_type,
10831
+ jsObj.Get("link_type"));
10832
+ js_to_cbpp<std::optional<std::string>>(cppObj.link_name,
10833
+ jsObj.Get("link_name"));
10834
+ js_to_cbpp<std::optional<std::string>>(cppObj.dataverse_name,
10835
+ jsObj.Get("dataverse_name"));
10531
10836
  js_to_cbpp<std::optional<std::string>>(cppObj.client_context_id,
10532
10837
  jsObj.Get("client_context_id"));
10533
10838
  js_to_cbpp<std::optional<std::chrono::milliseconds>>(
@@ -10539,10 +10844,12 @@ struct js_to_cbpp_t<
10539
10844
  analytics_link_get_all_request &cppObj)
10540
10845
  {
10541
10846
  auto resObj = Napi::Object::New(env);
10542
- resObj.Set("link_type", cbpp_to_js<std::string>(env, cppObj.link_type));
10543
- resObj.Set("link_name", cbpp_to_js<std::string>(env, cppObj.link_name));
10544
- resObj.Set("dataverse_name",
10545
- cbpp_to_js<std::string>(env, cppObj.dataverse_name));
10847
+ resObj.Set("link_type", cbpp_to_js<std::optional<std::string>>(
10848
+ env, cppObj.link_type));
10849
+ resObj.Set("link_name", cbpp_to_js<std::optional<std::string>>(
10850
+ env, cppObj.link_name));
10851
+ resObj.Set("dataverse_name", cbpp_to_js<std::optional<std::string>>(
10852
+ env, cppObj.dataverse_name));
10546
10853
  resObj.Set("client_context_id", cbpp_to_js<std::optional<std::string>>(
10547
10854
  env, cppObj.client_context_id));
10548
10855
  resObj.Set("timeout",
@@ -255,8 +255,7 @@ struct js_to_cbpp_t<cbcoretxns::transaction_get_result> {
255
255
  {
256
256
  auto resObj = Napi::Object::New(env);
257
257
  resObj.Set("id", cbpp_to_js(env, res.id()));
258
- resObj.Set("content",
259
- cbpp_to_js<std::vector<std::byte>>(env, res.content().data));
258
+ resObj.Set("content", cbpp_to_js(env, res.content()));
260
259
  resObj.Set("cas", cbpp_to_js(env, couchbase::cas{res.cas()}));
261
260
  resObj.Set("links", cbpp_to_js(env, res.links()));
262
261
  resObj.Set("metadata", cbpp_to_js(env, res.metadata()));