couchbase 4.4.3 → 4.4.4
Sign up to get free protection for your applications and to get access to all the features.
- package/BUILDING.md +182 -0
- package/CMakeLists.txt +11 -0
- package/CONTRIBUTING.md +1 -1
- package/README.md +4 -2
- package/deps/couchbase-cxx-cache/boringssl/e31ea00c1ea52052d2d78d44006cc88c80fa24a9/boringssl/src/BUILDING.md +206 -0
- package/deps/couchbase-cxx-client/CMakeLists.txt +3 -1
- package/deps/couchbase-cxx-client/README.md +2 -2
- package/deps/couchbase-cxx-client/cmake/APKBUILD.in +54 -0
- package/deps/couchbase-cxx-client/cmake/CompilerWarnings.cmake +0 -5
- package/deps/couchbase-cxx-client/cmake/Packaging.cmake +174 -11
- package/deps/couchbase-cxx-client/cmake/RPath.cmake +10 -0
- package/deps/couchbase-cxx-client/cmake/VersionInfo.cmake +4 -0
- package/deps/couchbase-cxx-client/cmake/build_version.hxx.in +1 -0
- package/deps/couchbase-cxx-client/cmake/couchbase-cxx-client.spec.in +2 -2
- package/deps/couchbase-cxx-client/cmake/couchbase_cxx_client.pc.in +2 -2
- package/deps/couchbase-cxx-client/cmake/debian/changelog.in +5 -0
- package/deps/couchbase-cxx-client/cmake/debian/compat +1 -0
- package/deps/couchbase-cxx-client/cmake/debian/control +40 -0
- package/deps/couchbase-cxx-client/cmake/debian/rules +41 -0
- package/deps/couchbase-cxx-client/cmake/debian/source/format +1 -0
- package/deps/couchbase-cxx-client/core/impl/analytics.cxx +1 -0
- package/deps/couchbase-cxx-client/core/impl/collection.cxx +27 -3
- package/deps/couchbase-cxx-client/core/impl/error.cxx +24 -3
- package/deps/couchbase-cxx-client/core/impl/get_replica.hxx +2 -0
- package/deps/couchbase-cxx-client/core/impl/lookup_in_replica.hxx +2 -0
- package/deps/couchbase-cxx-client/core/impl/observe_seqno.hxx +2 -0
- package/deps/couchbase-cxx-client/core/impl/query.cxx +1 -0
- package/deps/couchbase-cxx-client/core/impl/search.cxx +2 -0
- package/deps/couchbase-cxx-client/core/io/http_command.hxx +2 -2
- package/deps/couchbase-cxx-client/core/io/mcbp_command.hxx +1 -1
- package/deps/couchbase-cxx-client/core/meta/features.hxx +11 -0
- package/deps/couchbase-cxx-client/core/meta/version.cxx +47 -6
- package/deps/couchbase-cxx-client/core/operations/document_analytics.cxx +23 -17
- package/deps/couchbase-cxx-client/core/operations/document_analytics.hxx +1 -0
- package/deps/couchbase-cxx-client/core/operations/document_append.hxx +2 -0
- package/deps/couchbase-cxx-client/core/operations/document_decrement.hxx +2 -0
- package/deps/couchbase-cxx-client/core/operations/document_exists.hxx +2 -0
- package/deps/couchbase-cxx-client/core/operations/document_get.hxx +2 -0
- package/deps/couchbase-cxx-client/core/operations/document_get_all_replicas.hxx +2 -0
- package/deps/couchbase-cxx-client/core/operations/document_get_and_lock.hxx +2 -0
- package/deps/couchbase-cxx-client/core/operations/document_get_and_touch.hxx +2 -0
- package/deps/couchbase-cxx-client/core/operations/document_get_any_replica.hxx +2 -0
- package/deps/couchbase-cxx-client/core/operations/document_get_projected.hxx +2 -0
- package/deps/couchbase-cxx-client/core/operations/document_increment.hxx +2 -0
- package/deps/couchbase-cxx-client/core/operations/document_insert.hxx +2 -0
- package/deps/couchbase-cxx-client/core/operations/document_lookup_in.hxx +2 -0
- package/deps/couchbase-cxx-client/core/operations/document_lookup_in_all_replicas.hxx +2 -0
- package/deps/couchbase-cxx-client/core/operations/document_lookup_in_any_replica.hxx +2 -0
- package/deps/couchbase-cxx-client/core/operations/document_mutate_in.hxx +2 -0
- package/deps/couchbase-cxx-client/core/operations/document_prepend.hxx +2 -0
- package/deps/couchbase-cxx-client/core/operations/document_query.hxx +1 -0
- package/deps/couchbase-cxx-client/core/operations/document_remove.hxx +2 -0
- package/deps/couchbase-cxx-client/core/operations/document_replace.hxx +2 -0
- package/deps/couchbase-cxx-client/core/operations/document_search.hxx +1 -0
- package/deps/couchbase-cxx-client/core/operations/document_touch.hxx +2 -0
- package/deps/couchbase-cxx-client/core/operations/document_unlock.hxx +2 -0
- package/deps/couchbase-cxx-client/core/operations/document_upsert.hxx +2 -0
- package/deps/couchbase-cxx-client/core/operations/document_view.hxx +1 -0
- package/deps/couchbase-cxx-client/core/operations/http_noop.hxx +2 -0
- package/deps/couchbase-cxx-client/core/operations/management/analytics_dataset_create.hxx +1 -0
- package/deps/couchbase-cxx-client/core/operations/management/analytics_dataset_drop.hxx +1 -0
- package/deps/couchbase-cxx-client/core/operations/management/analytics_dataset_get_all.hxx +1 -0
- package/deps/couchbase-cxx-client/core/operations/management/analytics_dataverse_create.hxx +1 -0
- package/deps/couchbase-cxx-client/core/operations/management/analytics_dataverse_drop.hxx +1 -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 +1 -0
- package/deps/couchbase-cxx-client/core/operations/management/analytics_index_drop.hxx +1 -0
- package/deps/couchbase-cxx-client/core/operations/management/analytics_index_get_all.hxx +1 -0
- package/deps/couchbase-cxx-client/core/operations/management/analytics_link_connect.hxx +1 -0
- package/deps/couchbase-cxx-client/core/operations/management/analytics_link_create.hxx +1 -0
- package/deps/couchbase-cxx-client/core/operations/management/analytics_link_disconnect.hxx +1 -0
- package/deps/couchbase-cxx-client/core/operations/management/analytics_link_drop.hxx +1 -0
- package/deps/couchbase-cxx-client/core/operations/management/analytics_link_get_all.cxx +23 -15
- package/deps/couchbase-cxx-client/core/operations/management/analytics_link_get_all.hxx +4 -3
- package/deps/couchbase-cxx-client/core/operations/management/analytics_link_replace.hxx +1 -0
- package/deps/couchbase-cxx-client/core/operations/management/bucket_create.hxx +1 -0
- package/deps/couchbase-cxx-client/core/operations/management/bucket_describe.hxx +1 -0
- package/deps/couchbase-cxx-client/core/operations/management/bucket_drop.hxx +1 -0
- package/deps/couchbase-cxx-client/core/operations/management/bucket_flush.hxx +1 -0
- package/deps/couchbase-cxx-client/core/operations/management/bucket_get.hxx +1 -0
- package/deps/couchbase-cxx-client/core/operations/management/bucket_get_all.hxx +1 -0
- package/deps/couchbase-cxx-client/core/operations/management/bucket_update.hxx +1 -0
- package/deps/couchbase-cxx-client/core/operations/management/change_password.hxx +1 -0
- package/deps/couchbase-cxx-client/core/operations/management/cluster_describe.hxx +1 -0
- package/deps/couchbase-cxx-client/core/operations/management/cluster_developer_preview_enable.hxx +1 -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 +1 -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/eventing_deploy_function.hxx +3 -2
- package/deps/couchbase-cxx-client/core/operations/management/eventing_drop_function.hxx +3 -2
- package/deps/couchbase-cxx-client/core/operations/management/eventing_get_all_functions.hxx +3 -2
- package/deps/couchbase-cxx-client/core/operations/management/eventing_get_function.hxx +3 -2
- package/deps/couchbase-cxx-client/core/operations/management/eventing_get_status.hxx +3 -2
- package/deps/couchbase-cxx-client/core/operations/management/eventing_pause_function.hxx +3 -2
- package/deps/couchbase-cxx-client/core/operations/management/eventing_resume_function.hxx +3 -2
- package/deps/couchbase-cxx-client/core/operations/management/eventing_undeploy_function.hxx +3 -2
- package/deps/couchbase-cxx-client/core/operations/management/eventing_upsert_function.hxx +3 -2
- package/deps/couchbase-cxx-client/core/operations/management/freeform.hxx +2 -0
- package/deps/couchbase-cxx-client/core/operations/management/group_drop.hxx +1 -0
- package/deps/couchbase-cxx-client/core/operations/management/group_get.hxx +1 -0
- package/deps/couchbase-cxx-client/core/operations/management/group_get_all.hxx +1 -0
- package/deps/couchbase-cxx-client/core/operations/management/group_upsert.hxx +1 -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 +3 -0
- package/deps/couchbase-cxx-client/core/operations/management/query_index_create.hxx +1 -0
- package/deps/couchbase-cxx-client/core/operations/management/query_index_drop.hxx +1 -0
- package/deps/couchbase-cxx-client/core/operations/management/query_index_get_all.hxx +2 -0
- package/deps/couchbase-cxx-client/core/operations/management/query_index_get_all_deferred.hxx +3 -0
- package/deps/couchbase-cxx-client/core/operations/management/role_get_all.hxx +1 -0
- package/deps/couchbase-cxx-client/core/operations/management/scope_create.hxx +1 -0
- package/deps/couchbase-cxx-client/core/operations/management/scope_drop.hxx +1 -0
- package/deps/couchbase-cxx-client/core/operations/management/scope_get_all.hxx +1 -0
- package/deps/couchbase-cxx-client/core/operations/management/search_get_stats.hxx +1 -0
- package/deps/couchbase-cxx-client/core/operations/management/search_index_analyze_document.hxx +1 -0
- package/deps/couchbase-cxx-client/core/operations/management/search_index_control_ingest.hxx +1 -0
- package/deps/couchbase-cxx-client/core/operations/management/search_index_control_plan_freeze.hxx +1 -0
- package/deps/couchbase-cxx-client/core/operations/management/search_index_control_query.hxx +1 -0
- package/deps/couchbase-cxx-client/core/operations/management/search_index_drop.hxx +1 -0
- package/deps/couchbase-cxx-client/core/operations/management/search_index_get.hxx +1 -0
- package/deps/couchbase-cxx-client/core/operations/management/search_index_get_all.hxx +1 -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 +1 -0
- package/deps/couchbase-cxx-client/core/operations/management/search_index_upsert.hxx +1 -0
- package/deps/couchbase-cxx-client/core/operations/management/user_drop.hxx +1 -0
- package/deps/couchbase-cxx-client/core/operations/management/user_get.hxx +1 -0
- package/deps/couchbase-cxx-client/core/operations/management/user_get_all.hxx +1 -0
- package/deps/couchbase-cxx-client/core/operations/management/user_upsert.cxx +3 -3
- package/deps/couchbase-cxx-client/core/operations/management/user_upsert.hxx +1 -0
- package/deps/couchbase-cxx-client/core/operations/management/view_index_drop.hxx +1 -0
- package/deps/couchbase-cxx-client/core/operations/management/view_index_get.hxx +1 -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 +1 -0
- package/deps/couchbase-cxx-client/core/transactions/async_attempt_context.hxx +9 -21
- package/deps/couchbase-cxx-client/core/transactions/attempt_context.hxx +6 -33
- package/deps/couchbase-cxx-client/core/transactions/attempt_context_impl.cxx +41 -41
- package/deps/couchbase-cxx-client/core/transactions/attempt_context_impl.hxx +15 -16
- package/deps/couchbase-cxx-client/core/transactions/transaction_context.cxx +2 -2
- package/deps/couchbase-cxx-client/core/transactions/transaction_get_result.hxx +0 -20
- package/deps/couchbase-cxx-client/couchbase/common_options.hxx +16 -1
- package/deps/couchbase-cxx-client/couchbase/metrics/otel_meter.hxx +16 -20
- package/dist/analyticsindexmanager.d.ts +98 -14
- package/dist/analyticsindexmanager.js +452 -411
- package/dist/binding.d.ts +53 -4
- package/dist/bindingutilities.d.ts +26 -1
- package/dist/bindingutilities.js +108 -1
- package/dist/couchbase.d.ts +3 -1
- package/dist/couchbase.js +2 -0
- package/dist/rangeScan.d.ts +1 -1
- package/dist/rangeScan.js +1 -1
- package/dist/transactions.d.ts +34 -3
- package/dist/transactions.js +25 -18
- package/dist/transcoders.d.ts +68 -0
- package/dist/transcoders.js +194 -1
- package/dist/usermanager.d.ts +14 -14
- package/dist/usermanager.js +178 -228
- package/dist/utilities.js +4 -6
- package/dist/utilities_internal.js +1 -2
- package/package.json +9 -8
- package/src/connection.cpp +22 -0
- package/src/connection.hpp +12 -0
- package/src/connection_autogen.cpp +100 -0
- package/src/jstocbpp_autogen.hpp +315 -8
- package/src/jstocbpp_transactions.hpp +1 -2
- package/tools/gen-bindings-js.js +38 -3
- package/tools/gen-bindings-json.py +575 -328
package/dist/binding.d.ts
CHANGED
@@ -329,6 +329,10 @@ export interface CppManagementRbacRole {
|
|
329
329
|
export interface CppManagementRbacRoleAndDescription {
|
330
330
|
display_name: string;
|
331
331
|
description: string;
|
332
|
+
name: string;
|
333
|
+
bucket?: string;
|
334
|
+
scope?: string;
|
335
|
+
collection?: string;
|
332
336
|
}
|
333
337
|
export interface CppManagementRbacOrigin {
|
334
338
|
type: string;
|
@@ -336,6 +340,10 @@ export interface CppManagementRbacOrigin {
|
|
336
340
|
}
|
337
341
|
export interface CppManagementRbacRoleAndOrigins {
|
338
342
|
origins: CppManagementRbacOrigin[];
|
343
|
+
name: string;
|
344
|
+
bucket?: string;
|
345
|
+
scope?: string;
|
346
|
+
collection?: string;
|
339
347
|
}
|
340
348
|
export interface CppManagementRbacUser {
|
341
349
|
username: string;
|
@@ -349,6 +357,11 @@ export interface CppManagementRbacUserAndMetadata {
|
|
349
357
|
effective_roles: CppManagementRbacRoleAndOrigins[];
|
350
358
|
password_changed?: string;
|
351
359
|
external_groups: string[];
|
360
|
+
username: string;
|
361
|
+
display_name?: string;
|
362
|
+
groups: string[];
|
363
|
+
roles: CppManagementRbacRole[];
|
364
|
+
password?: string;
|
352
365
|
}
|
353
366
|
export interface CppManagementRbacGroup {
|
354
367
|
name: string;
|
@@ -1592,6 +1605,21 @@ export interface CppManagementAnalyticsLinkReplaceResponseProblem {
|
|
1592
1605
|
code: number;
|
1593
1606
|
message: string;
|
1594
1607
|
}
|
1608
|
+
export interface CppManagementAnalyticsLinkReplaceAzureBlobExternalLinkRequest {
|
1609
|
+
link: CppManagementAnalyticsAzureBlobExternalLink;
|
1610
|
+
client_context_id?: string;
|
1611
|
+
timeout?: CppMilliseconds;
|
1612
|
+
}
|
1613
|
+
export interface CppManagementAnalyticsLinkReplaceCouchbaseRemoteLinkRequest {
|
1614
|
+
link: CppManagementAnalyticsCouchbaseRemoteLink;
|
1615
|
+
client_context_id?: string;
|
1616
|
+
timeout?: CppMilliseconds;
|
1617
|
+
}
|
1618
|
+
export interface CppManagementAnalyticsLinkReplaceS3ExternalLinkRequest {
|
1619
|
+
link: CppManagementAnalyticsS3ExternalLink;
|
1620
|
+
client_context_id?: string;
|
1621
|
+
timeout?: CppMilliseconds;
|
1622
|
+
}
|
1595
1623
|
export interface CppManagementAnalyticsLinkDisconnectResponse {
|
1596
1624
|
status: string;
|
1597
1625
|
errors: CppManagementAnalyticsLinkDisconnectResponseProblem[];
|
@@ -1749,6 +1777,21 @@ export interface CppManagementAnalyticsLinkCreateResponseProblem {
|
|
1749
1777
|
code: number;
|
1750
1778
|
message: string;
|
1751
1779
|
}
|
1780
|
+
export interface CppManagementAnalyticsLinkCreateAzureBlobExternalLinkRequest {
|
1781
|
+
link: CppManagementAnalyticsAzureBlobExternalLink;
|
1782
|
+
client_context_id?: string;
|
1783
|
+
timeout?: CppMilliseconds;
|
1784
|
+
}
|
1785
|
+
export interface CppManagementAnalyticsLinkCreateCouchbaseRemoteLinkRequest {
|
1786
|
+
link: CppManagementAnalyticsCouchbaseRemoteLink;
|
1787
|
+
client_context_id?: string;
|
1788
|
+
timeout?: CppMilliseconds;
|
1789
|
+
}
|
1790
|
+
export interface CppManagementAnalyticsLinkCreateS3ExternalLinkRequest {
|
1791
|
+
link: CppManagementAnalyticsS3ExternalLink;
|
1792
|
+
client_context_id?: string;
|
1793
|
+
timeout?: CppMilliseconds;
|
1794
|
+
}
|
1752
1795
|
export interface CppManagementEventingDropFunctionResponse {
|
1753
1796
|
error?: CppManagementEventingProblem;
|
1754
1797
|
}
|
@@ -1914,9 +1957,9 @@ export interface CppManagementAnalyticsLinkGetAllResponseProblem {
|
|
1914
1957
|
message: string;
|
1915
1958
|
}
|
1916
1959
|
export interface CppManagementAnalyticsLinkGetAllRequest {
|
1917
|
-
link_type
|
1918
|
-
link_name
|
1919
|
-
dataverse_name
|
1960
|
+
link_type?: string;
|
1961
|
+
link_name?: string;
|
1962
|
+
dataverse_name?: string;
|
1920
1963
|
client_context_id?: string;
|
1921
1964
|
timeout?: CppMilliseconds;
|
1922
1965
|
}
|
@@ -2076,6 +2119,9 @@ export interface CppConnectionAutogen {
|
|
2076
2119
|
managementScopeCreate(options: CppManagementScopeCreateRequest, callback: (err: CppError | null, result: CppManagementScopeCreateResponse) => void): void;
|
2077
2120
|
managementEventingGetFunction(options: CppManagementEventingGetFunctionRequest, callback: (err: CppError | null, result: CppManagementEventingGetFunctionResponse) => void): void;
|
2078
2121
|
managementViewIndexDrop(options: CppManagementViewIndexDropRequest, callback: (err: CppError | null, result: CppManagementViewIndexDropResponse) => void): void;
|
2122
|
+
managementAnalyticsLinkReplaceAzureBlobExternalLink(options: CppManagementAnalyticsLinkReplaceAzureBlobExternalLinkRequest, callback: (err: CppError | null, result: CppManagementAnalyticsLinkReplaceResponse) => void): void;
|
2123
|
+
managementAnalyticsLinkReplaceCouchbaseRemoteLink(options: CppManagementAnalyticsLinkReplaceCouchbaseRemoteLinkRequest, callback: (err: CppError | null, result: CppManagementAnalyticsLinkReplaceResponse) => void): void;
|
2124
|
+
managementAnalyticsLinkReplaceS3ExternalLink(options: CppManagementAnalyticsLinkReplaceS3ExternalLinkRequest, callback: (err: CppError | null, result: CppManagementAnalyticsLinkReplaceResponse) => void): void;
|
2079
2125
|
managementAnalyticsLinkDisconnect(options: CppManagementAnalyticsLinkDisconnectRequest, callback: (err: CppError | null, result: CppManagementAnalyticsLinkDisconnectResponse) => void): void;
|
2080
2126
|
managementUserUpsert(options: CppManagementUserUpsertRequest, callback: (err: CppError | null, result: CppManagementUserUpsertResponse) => void): void;
|
2081
2127
|
managementEventingGetStatus(options: CppManagementEventingGetStatusRequest, callback: (err: CppError | null, result: CppManagementEventingGetStatusResponse) => void): void;
|
@@ -2091,6 +2137,9 @@ export interface CppConnectionAutogen {
|
|
2091
2137
|
managementSearchIndexControlQuery(options: CppManagementSearchIndexControlQueryRequest, callback: (err: CppError | null, result: CppManagementSearchIndexControlQueryResponse) => void): void;
|
2092
2138
|
managementRoleGetAll(options: CppManagementRoleGetAllRequest, callback: (err: CppError | null, result: CppManagementRoleGetAllResponse) => void): void;
|
2093
2139
|
managementGroupGetAll(options: CppManagementGroupGetAllRequest, callback: (err: CppError | null, result: CppManagementGroupGetAllResponse) => void): void;
|
2140
|
+
managementAnalyticsLinkCreateAzureBlobExternalLink(options: CppManagementAnalyticsLinkCreateAzureBlobExternalLinkRequest, callback: (err: CppError | null, result: CppManagementAnalyticsLinkCreateResponse) => void): void;
|
2141
|
+
managementAnalyticsLinkCreateCouchbaseRemoteLink(options: CppManagementAnalyticsLinkCreateCouchbaseRemoteLinkRequest, callback: (err: CppError | null, result: CppManagementAnalyticsLinkCreateResponse) => void): void;
|
2142
|
+
managementAnalyticsLinkCreateS3ExternalLink(options: CppManagementAnalyticsLinkCreateS3ExternalLinkRequest, callback: (err: CppError | null, result: CppManagementAnalyticsLinkCreateResponse) => void): void;
|
2094
2143
|
managementEventingDropFunction(options: CppManagementEventingDropFunctionRequest, callback: (err: CppError | null, result: CppManagementEventingDropFunctionResponse) => void): void;
|
2095
2144
|
managementCollectionDrop(options: CppManagementCollectionDropRequest, callback: (err: CppError | null, result: CppManagementCollectionDropResponse) => void): void;
|
2096
2145
|
managementSearchIndexControlIngest(options: CppManagementSearchIndexControlIngestRequest, callback: (err: CppError | null, result: CppManagementSearchIndexControlIngestResponse) => void): void;
|
@@ -2773,7 +2822,7 @@ export interface CppTransactionGetMetaData {
|
|
2773
2822
|
export interface CppTransactionGetResult {
|
2774
2823
|
id: CppDocumentId;
|
2775
2824
|
cas: CppCas;
|
2776
|
-
content:
|
2825
|
+
content: CppEncodedValue;
|
2777
2826
|
links: CppTransactionLinks;
|
2778
2827
|
metadata: CppTransactionGetMetaData;
|
2779
2828
|
}
|
@@ -1,5 +1,6 @@
|
|
1
1
|
import { AnalyticsScanConsistency, AnalyticsStatus } from './analyticstypes';
|
2
|
-
import {
|
2
|
+
import { AnalyticsEncryptionLevel, CouchbaseAnalyticsEncryptionSettings } from './analyticsindexmanager';
|
3
|
+
import { CppAnalyticsResponseAnalyticsStatus, CppAnalyticsScanConsistency, CppDesignDocumentNamespace, CppDiagEndpointState, CppDiagPingState, CppDurabilityLevel, CppError, CppManagementAnalyticsCouchbaseLinkEncryptionLevel, CppManagementAnalyticsCouchbaseLinkEncryptionSettings, CppManagementClusterBucketCompression, CppManagementClusterBucketConflictResolution, CppManagementClusterBucketEvictionPolicy, CppManagementClusterBucketStorageBackend, CppManagementClusterBucketType, CppManagementEventingFunctionBucketAccess, CppManagementEventingFunctionDcpBoundary, CppManagementEventingFunctionDeploymentStatus, CppManagementEventingFunctionLanguageCompatibility, CppManagementEventingFunctionLogLevel, CppManagementEventingFunctionProcessingStatus, CppManagementEventingFunctionStatus, CppManagementRbacAuthDomain, CppMutationState, CppPersistTo, CppPrefixScan, CppQueryProfile, CppQueryScanConsistency, CppRangeScan, CppReplicateTo, CppSamplingScan, CppSearchHighlightStyle, CppSearchScanConsistency, CppServiceType, CppStoreSemantics, CppTransactionKeyspace, CppTxnExternalException, CppTxnOpException, CppVectorQueryCombination, CppViewScanConsistency, CppViewSortOrder } from './binding';
|
3
4
|
import { BucketType, CompressionMode, ConflictResolutionType, EvictionPolicy, StorageBackend } from './bucketmanager';
|
4
5
|
import { EndpointState, PingState } from './diagnosticstypes';
|
5
6
|
import { ErrorContext } from './errorcontexts';
|
@@ -216,3 +217,27 @@ export declare function eventingFunctionLanguageCompatibilityFromCpp(compatibili
|
|
216
217
|
* @internal
|
217
218
|
*/
|
218
219
|
export declare function eventingFunctionStatusFromCpp(status: CppManagementEventingFunctionStatus): EventingFunctionStatus;
|
220
|
+
/**
|
221
|
+
* @internal
|
222
|
+
*/
|
223
|
+
export declare function couchbaseLinkEncryptionLevelFromCpp(level: CppManagementAnalyticsCouchbaseLinkEncryptionLevel): AnalyticsEncryptionLevel;
|
224
|
+
/**
|
225
|
+
* @internal
|
226
|
+
*/
|
227
|
+
export declare function encryptionLevelToCpp(level: AnalyticsEncryptionLevel): CppManagementAnalyticsCouchbaseLinkEncryptionLevel;
|
228
|
+
/**
|
229
|
+
* @internal
|
230
|
+
*/
|
231
|
+
export declare function encryptionSettingsToCpp(settings?: CouchbaseAnalyticsEncryptionSettings): CppManagementAnalyticsCouchbaseLinkEncryptionSettings;
|
232
|
+
/**
|
233
|
+
* @internal
|
234
|
+
*/
|
235
|
+
export declare function encryptionSettingsFromCpp(settings: CppManagementAnalyticsCouchbaseLinkEncryptionSettings): CouchbaseAnalyticsEncryptionSettings;
|
236
|
+
/**
|
237
|
+
* @internal
|
238
|
+
*/
|
239
|
+
export declare function authDomainToCpp(domain: string): CppManagementRbacAuthDomain;
|
240
|
+
/**
|
241
|
+
* @internal
|
242
|
+
*/
|
243
|
+
export declare function authDomainFromCpp(domain: CppManagementRbacAuthDomain): string;
|
package/dist/bindingutilities.js
CHANGED
@@ -27,8 +27,9 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
27
27
|
};
|
28
28
|
Object.defineProperty(exports, "__esModule", { value: true });
|
29
29
|
exports.eventingFunctionLanguageCompatibilityFromCpp = exports.eventingFunctionLanguageCompatibilityToCpp = exports.eventingFunctionLogLevelFromCpp = exports.eventingFunctionLogLevelToCpp = exports.eventingFunctionProcessingStatusFromCpp = exports.eventingFunctionProcessingStatusToCpp = exports.eventingFunctionDeploymentStatusFromCpp = exports.eventingFunctionDeploymentStatusToCpp = exports.eventingFunctionDcpBoundaryFromCpp = exports.eventingFunctionDcpBoundaryToCpp = exports.eventingBucketBindingAccessFromCpp = exports.eventingBucketBindingAccessToCpp = exports.transactionKeyspaceToCpp = exports.designDocumentNamespaceToCpp = exports.designDocumentNamespaceFromCpp = exports.vectorQueryCombinationToCpp = exports.bucketConflictResolutionTypeFromCpp = exports.bucketConflictResolutionTypeToCpp = exports.bucketStorageBackendFromCpp = exports.bucketStorageBackendToCpp = exports.bucketEvictionPolicyFromCpp = exports.bucketEvictionPolicyToCpp = exports.bucketCompressionModeFromCpp = exports.bucketCompressionModeToCpp = exports.bucketTypeFromCpp = exports.bucketTypeToCpp = exports.scanTypeToCpp = exports.errorFromCpp = exports.contextFromCpp = exports.pingStateFromCpp = exports.txnOpExeptionFromCpp = exports.txnExternalExceptionStringFromCpp = exports.endpointStateFromCpp = exports.serviceTypeFromCpp = exports.serviceTypeToCpp = exports.mutationStateToCpp = exports.searchHighlightStyleToCpp = exports.searchScanConsistencyToCpp = exports.analyticsStatusFromCpp = exports.analyticsScanConsistencyToCpp = exports.queryProfileToCpp = exports.queryScanConsistencyFromCpp = exports.queryScanConsistencyToCpp = exports.viewOrderingToCpp = exports.viewScanConsistencyToCpp = exports.storeSemanticToCpp = exports.replicateToToCpp = exports.persistToToCpp = exports.durabilityFromCpp = exports.durabilityToCpp = void 0;
|
30
|
-
exports.eventingFunctionStatusFromCpp = void 0;
|
30
|
+
exports.authDomainFromCpp = exports.authDomainToCpp = exports.encryptionSettingsFromCpp = exports.encryptionSettingsToCpp = exports.encryptionLevelToCpp = exports.couchbaseLinkEncryptionLevelFromCpp = exports.eventingFunctionStatusFromCpp = void 0;
|
31
31
|
const analyticstypes_1 = require("./analyticstypes");
|
32
|
+
const analyticsindexmanager_1 = require("./analyticsindexmanager");
|
32
33
|
const binding_1 = __importDefault(require("./binding"));
|
33
34
|
const bucketmanager_1 = require("./bucketmanager");
|
34
35
|
const diagnosticstypes_1 = require("./diagnosticstypes");
|
@@ -621,6 +622,11 @@ function errorFromCpp(err) {
|
|
621
622
|
}
|
622
623
|
// BUG(JSCBC-1010): We shouldn't need to special case these.
|
623
624
|
if (err.ctxtype === 'transaction_operation_failed') {
|
625
|
+
const cause = txnExternalExceptionStringFromCpp(err.cause);
|
626
|
+
if (cause == 'feature_not_available_exception') {
|
627
|
+
const msg = 'Possibly attempting a binary transaction operation with a server version < 7.6.2';
|
628
|
+
return new errs.TransactionOperationFailedError(new errs.FeatureNotAvailableError(new Error(msg)));
|
629
|
+
}
|
624
630
|
return new errs.TransactionOperationFailedError(new Error(txnExternalExceptionStringFromCpp(err.cause)));
|
625
631
|
}
|
626
632
|
else if (err.ctxtype === 'transaction_op_exception') {
|
@@ -1321,3 +1327,104 @@ function eventingFunctionStatusFromCpp(status) {
|
|
1321
1327
|
throw new errs.InvalidArgumentError(new Error('Unrecognized EventingFunctionStatus'));
|
1322
1328
|
}
|
1323
1329
|
exports.eventingFunctionStatusFromCpp = eventingFunctionStatusFromCpp;
|
1330
|
+
/**
|
1331
|
+
* @internal
|
1332
|
+
*/
|
1333
|
+
function couchbaseLinkEncryptionLevelFromCpp(level) {
|
1334
|
+
if (level === binding_1.default.management_analytics_couchbase_link_encryption_level.none) {
|
1335
|
+
return analyticsindexmanager_1.AnalyticsEncryptionLevel.None;
|
1336
|
+
}
|
1337
|
+
if (level === binding_1.default.management_analytics_couchbase_link_encryption_level.half) {
|
1338
|
+
return analyticsindexmanager_1.AnalyticsEncryptionLevel.Half;
|
1339
|
+
}
|
1340
|
+
if (level === binding_1.default.management_analytics_couchbase_link_encryption_level.full) {
|
1341
|
+
return analyticsindexmanager_1.AnalyticsEncryptionLevel.Full;
|
1342
|
+
}
|
1343
|
+
throw new errs.InvalidArgumentError(new Error('Unrecognized CppManagementAnalyticsCouchbaseLinkEncryptionLevel'));
|
1344
|
+
}
|
1345
|
+
exports.couchbaseLinkEncryptionLevelFromCpp = couchbaseLinkEncryptionLevelFromCpp;
|
1346
|
+
/**
|
1347
|
+
* @internal
|
1348
|
+
*/
|
1349
|
+
function encryptionLevelToCpp(level) {
|
1350
|
+
if (level === analyticsindexmanager_1.AnalyticsEncryptionLevel.None) {
|
1351
|
+
return binding_1.default.management_analytics_couchbase_link_encryption_level.none;
|
1352
|
+
}
|
1353
|
+
if (level === analyticsindexmanager_1.AnalyticsEncryptionLevel.Half) {
|
1354
|
+
return binding_1.default.management_analytics_couchbase_link_encryption_level.half;
|
1355
|
+
}
|
1356
|
+
if (level === analyticsindexmanager_1.AnalyticsEncryptionLevel.Full) {
|
1357
|
+
return binding_1.default.management_analytics_couchbase_link_encryption_level.full;
|
1358
|
+
}
|
1359
|
+
throw new errs.InvalidArgumentError(new Error('Unrecognized AnalyticsEncryptionLevel'));
|
1360
|
+
}
|
1361
|
+
exports.encryptionLevelToCpp = encryptionLevelToCpp;
|
1362
|
+
/**
|
1363
|
+
* @internal
|
1364
|
+
*/
|
1365
|
+
function encryptionSettingsToCpp(settings) {
|
1366
|
+
if (!settings) {
|
1367
|
+
return {
|
1368
|
+
level: binding_1.default.management_analytics_couchbase_link_encryption_level.none,
|
1369
|
+
};
|
1370
|
+
}
|
1371
|
+
return {
|
1372
|
+
level: encryptionLevelToCpp(settings.encryptionLevel),
|
1373
|
+
certificate: settings.certificate
|
1374
|
+
? settings.certificate.toString()
|
1375
|
+
: undefined,
|
1376
|
+
client_certificate: settings.clientCertificate
|
1377
|
+
? settings.clientCertificate.toString()
|
1378
|
+
: undefined,
|
1379
|
+
client_key: settings.clientKey ? settings.clientKey.toString() : undefined,
|
1380
|
+
};
|
1381
|
+
}
|
1382
|
+
exports.encryptionSettingsToCpp = encryptionSettingsToCpp;
|
1383
|
+
/**
|
1384
|
+
* @internal
|
1385
|
+
*/
|
1386
|
+
function encryptionSettingsFromCpp(settings) {
|
1387
|
+
return new analyticsindexmanager_1.CouchbaseAnalyticsEncryptionSettings({
|
1388
|
+
encryptionLevel: couchbaseLinkEncryptionLevelFromCpp(settings.level),
|
1389
|
+
certificate: settings.certificate
|
1390
|
+
? Buffer.from(settings.certificate)
|
1391
|
+
: undefined,
|
1392
|
+
clientCertificate: settings.client_certificate
|
1393
|
+
? Buffer.from(settings.client_certificate)
|
1394
|
+
: undefined,
|
1395
|
+
clientKey: undefined,
|
1396
|
+
});
|
1397
|
+
}
|
1398
|
+
exports.encryptionSettingsFromCpp = encryptionSettingsFromCpp;
|
1399
|
+
/**
|
1400
|
+
* @internal
|
1401
|
+
*/
|
1402
|
+
function authDomainToCpp(domain) {
|
1403
|
+
if (domain === 'unknown') {
|
1404
|
+
return binding_1.default.management_rbac_auth_domain.unknown;
|
1405
|
+
}
|
1406
|
+
if (domain === 'local') {
|
1407
|
+
return binding_1.default.management_rbac_auth_domain.local;
|
1408
|
+
}
|
1409
|
+
if (domain === 'external') {
|
1410
|
+
return binding_1.default.management_rbac_auth_domain.external;
|
1411
|
+
}
|
1412
|
+
throw new errs.InvalidArgumentError(new Error('Unrecognized auth domain.'));
|
1413
|
+
}
|
1414
|
+
exports.authDomainToCpp = authDomainToCpp;
|
1415
|
+
/**
|
1416
|
+
* @internal
|
1417
|
+
*/
|
1418
|
+
function authDomainFromCpp(domain) {
|
1419
|
+
if (domain === binding_1.default.management_rbac_auth_domain.unknown) {
|
1420
|
+
return 'unknown';
|
1421
|
+
}
|
1422
|
+
if (domain === binding_1.default.management_rbac_auth_domain.local) {
|
1423
|
+
return 'local';
|
1424
|
+
}
|
1425
|
+
if (domain === binding_1.default.management_rbac_auth_domain.external) {
|
1426
|
+
return 'external';
|
1427
|
+
}
|
1428
|
+
throw new errs.InvalidArgumentError(new Error('Unrecognized CppManagementRbacAuthDomain.'));
|
1429
|
+
}
|
1430
|
+
exports.authDomainFromCpp = authDomainFromCpp;
|
package/dist/couchbase.d.ts
CHANGED
@@ -59,7 +59,9 @@ export * from './generaltypes';
|
|
59
59
|
export * from './mutationstate';
|
60
60
|
export * from './queryindexmanager';
|
61
61
|
export * from './querytypes';
|
62
|
+
export * from './rangeScan';
|
62
63
|
export * from './scope';
|
64
|
+
export * from './scopeeventingfunctionmanager';
|
63
65
|
export * from './scopesearchindexmanager';
|
64
66
|
export * from './sdspecs';
|
65
67
|
export * from './searchfacet';
|
@@ -75,4 +77,4 @@ export * from './vectorsearch';
|
|
75
77
|
export * from './viewexecutor';
|
76
78
|
export * from './viewindexmanager';
|
77
79
|
export * from './viewtypes';
|
78
|
-
export { Cas, NodeCallback } from './utilities';
|
80
|
+
export { Cas, CasInput, NodeCallback } from './utilities';
|
package/dist/couchbase.js
CHANGED
@@ -88,7 +88,9 @@ __exportStar(require("./generaltypes"), exports);
|
|
88
88
|
__exportStar(require("./mutationstate"), exports);
|
89
89
|
__exportStar(require("./queryindexmanager"), exports);
|
90
90
|
__exportStar(require("./querytypes"), exports);
|
91
|
+
__exportStar(require("./rangeScan"), exports);
|
91
92
|
__exportStar(require("./scope"), exports);
|
93
|
+
__exportStar(require("./scopeeventingfunctionmanager"), exports);
|
92
94
|
__exportStar(require("./scopesearchindexmanager"), exports);
|
93
95
|
__exportStar(require("./sdspecs"), exports);
|
94
96
|
__exportStar(require("./searchfacet"), exports);
|
package/dist/rangeScan.d.ts
CHANGED
@@ -81,7 +81,7 @@ export declare class SamplingScan implements ScanType {
|
|
81
81
|
/**
|
82
82
|
* A PrefixScan scan type selects every document whose ID starts with a certain prefix.
|
83
83
|
*
|
84
|
-
* @category
|
84
|
+
* @category Key-Value
|
85
85
|
*/
|
86
86
|
export declare class PrefixScan implements ScanType {
|
87
87
|
/**
|
package/dist/rangeScan.js
CHANGED
package/dist/transactions.d.ts
CHANGED
@@ -4,6 +4,7 @@ import { Collection } from './collection';
|
|
4
4
|
import { DurabilityLevel } from './generaltypes';
|
5
5
|
import { QueryMetaData, QueryProfileMode, QueryResult, QueryScanConsistency } from './querytypes';
|
6
6
|
import { Scope } from './scope';
|
7
|
+
import { Transcoder } from './transcoders';
|
7
8
|
import { Cas } from './utilities';
|
8
9
|
/**
|
9
10
|
* Represents the path to a document.
|
@@ -276,6 +277,33 @@ export interface TransactionQueryOptions {
|
|
276
277
|
*/
|
277
278
|
scope?: Scope;
|
278
279
|
}
|
280
|
+
/**
|
281
|
+
* @category Transactions
|
282
|
+
*/
|
283
|
+
export interface TransactionGetOptions {
|
284
|
+
/**
|
285
|
+
* Specifies an explicit transcoder to use for this specific operation.
|
286
|
+
*/
|
287
|
+
transcoder?: Transcoder;
|
288
|
+
}
|
289
|
+
/**
|
290
|
+
* @category Transactions
|
291
|
+
*/
|
292
|
+
export interface TransactionInsertOptions {
|
293
|
+
/**
|
294
|
+
* Specifies an explicit transcoder to use for this specific operation.
|
295
|
+
*/
|
296
|
+
transcoder?: Transcoder;
|
297
|
+
}
|
298
|
+
/**
|
299
|
+
* @category Transactions
|
300
|
+
*/
|
301
|
+
export interface TransactionReplaceOptions {
|
302
|
+
/**
|
303
|
+
* Specifies an explicit transcoder to use for this specific operation.
|
304
|
+
*/
|
305
|
+
transcoder?: Transcoder;
|
306
|
+
}
|
279
307
|
/**
|
280
308
|
* Provides an interface to preform transactional operations in a transaction.
|
281
309
|
*
|
@@ -301,23 +329,26 @@ export declare class TransactionAttemptContext {
|
|
301
329
|
*
|
302
330
|
* @param collection The collection the document lives in.
|
303
331
|
* @param key The document key to retrieve.
|
332
|
+
* @param options Optional parameters for this operation.
|
304
333
|
*/
|
305
|
-
get(collection: Collection, key: string): Promise<TransactionGetResult>;
|
334
|
+
get(collection: Collection, key: string, options?: TransactionGetOptions): Promise<TransactionGetResult>;
|
306
335
|
/**
|
307
336
|
* Inserts a new document to the collection, failing if the document already exists.
|
308
337
|
*
|
309
338
|
* @param collection The collection the document lives in.
|
310
339
|
* @param key The document key to insert.
|
311
340
|
* @param content The document content to insert.
|
341
|
+
* @param options Optional parameters for this operation.
|
312
342
|
*/
|
313
|
-
insert(collection: Collection, key: string, content: any): Promise<TransactionGetResult>;
|
343
|
+
insert(collection: Collection, key: string, content: any, options?: TransactionInsertOptions): Promise<TransactionGetResult>;
|
314
344
|
/**
|
315
345
|
* Replaces a document in a collection.
|
316
346
|
*
|
317
347
|
* @param doc The document to replace.
|
318
348
|
* @param content The document content to insert.
|
349
|
+
* @param options Optional parameters for this operation.
|
319
350
|
*/
|
320
|
-
replace(doc: TransactionGetResult, content: any): Promise<TransactionGetResult>;
|
351
|
+
replace(doc: TransactionGetResult, content: any, options?: TransactionReplaceOptions): Promise<TransactionGetResult>;
|
321
352
|
/**
|
322
353
|
* Removes a document from a collection.
|
323
354
|
*
|
package/dist/transactions.js
CHANGED
@@ -75,18 +75,13 @@ exports.TransactionQueryResult = TransactionQueryResult;
|
|
75
75
|
/**
|
76
76
|
* @internal
|
77
77
|
*/
|
78
|
-
function translateGetResult(cppRes) {
|
78
|
+
function translateGetResult(cppRes, transcoder) {
|
79
79
|
if (!cppRes) {
|
80
80
|
return null;
|
81
81
|
}
|
82
82
|
let content;
|
83
|
-
if (cppRes.content && cppRes.content.length > 0) {
|
84
|
-
|
85
|
-
content = JSON.parse(cppRes.content.toString('utf8'));
|
86
|
-
}
|
87
|
-
catch (e) {
|
88
|
-
content = cppRes.content;
|
89
|
-
}
|
83
|
+
if (cppRes.content && cppRes.content.data && cppRes.content.data.length > 0) {
|
84
|
+
content = transcoder.decode(cppRes.content.data, cppRes.content.flags);
|
90
85
|
}
|
91
86
|
return new TransactionGetResult({
|
92
87
|
id: cppRes.id,
|
@@ -138,8 +133,10 @@ class TransactionAttemptContext {
|
|
138
133
|
*
|
139
134
|
* @param collection The collection the document lives in.
|
140
135
|
* @param key The document key to retrieve.
|
136
|
+
* @param options Optional parameters for this operation.
|
141
137
|
*/
|
142
|
-
async get(collection, key) {
|
138
|
+
async get(collection, key, options) {
|
139
|
+
const transcoder = (options === null || options === void 0 ? void 0 : options.transcoder) || this._transcoder;
|
143
140
|
return utilities_1.PromiseHelper.wrap((wrapCallback) => {
|
144
141
|
const id = collection._cppDocId(key);
|
145
142
|
this._impl.get({
|
@@ -149,7 +146,7 @@ class TransactionAttemptContext {
|
|
149
146
|
if (err) {
|
150
147
|
return wrapCallback(err, null);
|
151
148
|
}
|
152
|
-
wrapCallback(err, translateGetResult(cppRes));
|
149
|
+
wrapCallback(err, translateGetResult(cppRes, transcoder));
|
153
150
|
});
|
154
151
|
});
|
155
152
|
}
|
@@ -159,11 +156,13 @@ class TransactionAttemptContext {
|
|
159
156
|
* @param collection The collection the document lives in.
|
160
157
|
* @param key The document key to insert.
|
161
158
|
* @param content The document content to insert.
|
159
|
+
* @param options Optional parameters for this operation.
|
162
160
|
*/
|
163
|
-
async insert(collection, key, content) {
|
161
|
+
async insert(collection, key, content, options) {
|
164
162
|
return utilities_1.PromiseHelper.wrap((wrapCallback) => {
|
165
163
|
const id = collection._cppDocId(key);
|
166
|
-
const
|
164
|
+
const transcoder = (options === null || options === void 0 ? void 0 : options.transcoder) || this._transcoder;
|
165
|
+
const [data, flags] = transcoder.encode(content);
|
167
166
|
this._impl.insert({
|
168
167
|
id,
|
169
168
|
content: {
|
@@ -175,7 +174,7 @@ class TransactionAttemptContext {
|
|
175
174
|
if (err) {
|
176
175
|
return wrapCallback(err, null);
|
177
176
|
}
|
178
|
-
wrapCallback(err, translateGetResult(cppRes));
|
177
|
+
wrapCallback(err, translateGetResult(cppRes, transcoder));
|
179
178
|
});
|
180
179
|
});
|
181
180
|
}
|
@@ -184,14 +183,19 @@ class TransactionAttemptContext {
|
|
184
183
|
*
|
185
184
|
* @param doc The document to replace.
|
186
185
|
* @param content The document content to insert.
|
186
|
+
* @param options Optional parameters for this operation.
|
187
187
|
*/
|
188
|
-
async replace(doc, content) {
|
188
|
+
async replace(doc, content, options) {
|
189
189
|
return utilities_1.PromiseHelper.wrap((wrapCallback) => {
|
190
|
-
const
|
190
|
+
const transcoder = (options === null || options === void 0 ? void 0 : options.transcoder) || this._transcoder;
|
191
|
+
const [data, flags] = transcoder.encode(content);
|
191
192
|
this._impl.replace({
|
192
193
|
doc: {
|
193
194
|
id: doc.id,
|
194
|
-
content:
|
195
|
+
content: {
|
196
|
+
data: Buffer.from(''),
|
197
|
+
flags: 0,
|
198
|
+
},
|
195
199
|
cas: doc.cas,
|
196
200
|
links: doc._links,
|
197
201
|
metadata: doc._metadata,
|
@@ -205,7 +209,7 @@ class TransactionAttemptContext {
|
|
205
209
|
if (err) {
|
206
210
|
return wrapCallback(err, null);
|
207
211
|
}
|
208
|
-
wrapCallback(err, translateGetResult(cppRes));
|
212
|
+
wrapCallback(err, translateGetResult(cppRes, transcoder));
|
209
213
|
});
|
210
214
|
});
|
211
215
|
}
|
@@ -219,7 +223,10 @@ class TransactionAttemptContext {
|
|
219
223
|
this._impl.remove({
|
220
224
|
doc: {
|
221
225
|
id: doc.id,
|
222
|
-
content:
|
226
|
+
content: {
|
227
|
+
data: Buffer.from(''),
|
228
|
+
flags: 0,
|
229
|
+
},
|
223
230
|
cas: doc.cas,
|
224
231
|
links: doc._links,
|
225
232
|
metadata: doc._metadata,
|
package/dist/transcoders.d.ts
CHANGED
@@ -47,3 +47,71 @@ export declare class DefaultTranscoder implements Transcoder {
|
|
47
47
|
*/
|
48
48
|
decode(bytes: Buffer, flags: number): any;
|
49
49
|
}
|
50
|
+
/**
|
51
|
+
* The raw binary transcoder provides an explicit mechanism for storing and retrieving raw
|
52
|
+
* byte data.
|
53
|
+
*
|
54
|
+
* @category Key-Value
|
55
|
+
*/
|
56
|
+
export declare class RawBinaryTranscoder implements Transcoder {
|
57
|
+
/**
|
58
|
+
* Encodes the specified value, returning a buffer and flags that are
|
59
|
+
* stored to the server and later used for decoding.
|
60
|
+
*
|
61
|
+
* @param value The value to encode.
|
62
|
+
*/
|
63
|
+
encode(value: Buffer): [Buffer, number];
|
64
|
+
/**
|
65
|
+
* Decodes a buffer and flags tuple back to the original type of the
|
66
|
+
* document.
|
67
|
+
*
|
68
|
+
* @param bytes The bytes that were previously encoded.
|
69
|
+
* @param flags The flags associated with the data.
|
70
|
+
*/
|
71
|
+
decode(bytes: Buffer, flags: number): any;
|
72
|
+
}
|
73
|
+
/**
|
74
|
+
* The raw string transcoder provides an explicit mechanism for storing and retrieving raw
|
75
|
+
* string data.
|
76
|
+
*
|
77
|
+
* @category Key-Value
|
78
|
+
*/
|
79
|
+
export declare class RawStringTranscoder implements Transcoder {
|
80
|
+
/**
|
81
|
+
* Encodes the specified value, returning a buffer and flags that are
|
82
|
+
* stored to the server and later used for decoding.
|
83
|
+
*
|
84
|
+
* @param value The value to encode.
|
85
|
+
*/
|
86
|
+
encode(value: string): [Buffer, number];
|
87
|
+
/**
|
88
|
+
* Decodes a buffer and flags tuple back to the original type of the
|
89
|
+
* document.
|
90
|
+
*
|
91
|
+
* @param bytes The bytes that were previously encoded.
|
92
|
+
* @param flags The flags associated with the data.
|
93
|
+
*/
|
94
|
+
decode(bytes: Buffer, flags: number): string;
|
95
|
+
}
|
96
|
+
/**
|
97
|
+
* The raw JSON transcoder provides an explicit mechanism for storing and retrieving JSON data.
|
98
|
+
*
|
99
|
+
* @category Key-Value
|
100
|
+
*/
|
101
|
+
export declare class RawJsonTranscoder implements Transcoder {
|
102
|
+
/**
|
103
|
+
* Encodes the specified value, returning a buffer and flags that are
|
104
|
+
* stored to the server and later used for decoding.
|
105
|
+
*
|
106
|
+
* @param value The value to encode.
|
107
|
+
*/
|
108
|
+
encode(value: string): [Buffer, number];
|
109
|
+
/**
|
110
|
+
* Decodes a buffer and flags tuple back to the original type of the
|
111
|
+
* document.
|
112
|
+
*
|
113
|
+
* @param bytes The bytes that were previously encoded.
|
114
|
+
* @param flags The flags associated with the data.
|
115
|
+
*/
|
116
|
+
decode(bytes: Buffer, flags: number): Buffer;
|
117
|
+
}
|