couchbase 4.2.10 → 4.2.11-rc.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (59) hide show
  1. package/deps/couchbase-cxx-client/core/bucket.cxx +23 -8
  2. package/deps/couchbase-cxx-client/core/bucket.hxx +1 -0
  3. package/deps/couchbase-cxx-client/core/cluster.cxx +29 -3
  4. package/deps/couchbase-cxx-client/core/impl/collection.cxx +2 -2
  5. package/deps/couchbase-cxx-client/core/impl/query_index_manager.cxx +6 -6
  6. package/deps/couchbase-cxx-client/core/io/http_session_manager.hxx +7 -1
  7. package/deps/couchbase-cxx-client/core/io/mcbp_command.hxx +10 -0
  8. package/deps/couchbase-cxx-client/core/io/mcbp_session.cxx +24 -1
  9. package/deps/couchbase-cxx-client/core/io/mcbp_session.hxx +1 -0
  10. package/deps/couchbase-cxx-client/core/management/design_document.hxx +1 -1
  11. package/deps/couchbase-cxx-client/core/meta/features.hxx +16 -1
  12. package/deps/couchbase-cxx-client/core/operations/document_lookup_in_all_replicas.hxx +1 -1
  13. package/deps/couchbase-cxx-client/core/operations/document_lookup_in_any_replica.hxx +1 -1
  14. package/deps/couchbase-cxx-client/core/operations/document_query.cxx +2 -2
  15. package/deps/couchbase-cxx-client/core/operations/document_search.cxx +10 -10
  16. package/deps/couchbase-cxx-client/core/operations/document_view.cxx +3 -0
  17. package/deps/couchbase-cxx-client/core/operations/document_view.hxx +1 -0
  18. package/deps/couchbase-cxx-client/core/operations/management/query_index_create.cxx +24 -13
  19. package/deps/couchbase-cxx-client/core/operations/management/query_index_create.hxx +1 -1
  20. package/deps/couchbase-cxx-client/core/origin.cxx +14 -0
  21. package/deps/couchbase-cxx-client/core/origin.hxx +6 -0
  22. package/deps/couchbase-cxx-client/core/protocol/status.cxx +2 -0
  23. package/deps/couchbase-cxx-client/core/protocol/status.hxx +1 -0
  24. package/deps/couchbase-cxx-client/core/topology/capabilities.hxx +70 -1
  25. package/deps/couchbase-cxx-client/core/topology/capabilities_fmt.hxx +30 -2
  26. package/deps/couchbase-cxx-client/core/topology/configuration.hxx +1 -34
  27. package/deps/couchbase-cxx-client/core/topology/configuration_fmt.hxx +2 -2
  28. package/deps/couchbase-cxx-client/core/topology/configuration_json.hxx +43 -20
  29. package/deps/couchbase-cxx-client/core/transactions/internal/exceptions_internal.hxx +5 -0
  30. package/deps/couchbase-cxx-client/couchbase/collection_query_index_manager.hxx +80 -11
  31. package/deps/couchbase-cxx-client/couchbase/fmt/key_value_status_code.hxx +3 -1
  32. package/deps/couchbase-cxx-client/couchbase/key_value_status_code.hxx +1 -0
  33. package/deps/couchbase-cxx-client/couchbase/query_index_manager.hxx +6 -8
  34. package/dist/binding.d.ts +24 -2
  35. package/dist/bindingutilities.d.ts +11 -3
  36. package/dist/bindingutilities.js +33 -7
  37. package/dist/couchbase.d.ts +1 -0
  38. package/dist/couchbase.js +1 -0
  39. package/dist/queryindexmanager.d.ts +4 -4
  40. package/dist/queryindexmanager.js +7 -7
  41. package/dist/scope.d.ts +21 -0
  42. package/dist/scope.js +34 -0
  43. package/dist/scopesearchindexmanager.d.ts +116 -0
  44. package/dist/scopesearchindexmanager.js +406 -0
  45. package/dist/sdspecs.js +10 -9
  46. package/dist/sdutils.d.ts +1 -0
  47. package/dist/sdutils.js +4 -0
  48. package/dist/searchexecutor.d.ts +3 -1
  49. package/dist/searchexecutor.js +9 -2
  50. package/dist/searchindexmanager.d.ts +58 -3
  51. package/dist/searchindexmanager.js +188 -104
  52. package/dist/viewexecutor.js +13 -9
  53. package/dist/viewindexmanager.d.ts +70 -7
  54. package/dist/viewindexmanager.js +236 -103
  55. package/dist/viewtypes.d.ts +26 -0
  56. package/dist/viewtypes.js +17 -1
  57. package/package.json +7 -7
  58. package/src/constants.cpp +1 -0
  59. package/src/jstocbpp_autogen.hpp +89 -6
@@ -1,9 +1,9 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.ViewIndexManager = exports.DesignDocument = exports.DesignDocumentView = void 0;
4
- const errors_1 = require("./errors");
5
- const httpexecutor_1 = require("./httpexecutor");
6
4
  const utilities_1 = require("./utilities");
5
+ const viewtypes_1 = require("./viewtypes");
6
+ const bindingutilities_1 = require("./bindingutilities");
7
7
  /**
8
8
  * Contains information about a view in a design document.
9
9
  *
@@ -27,6 +27,25 @@ class DesignDocumentView {
27
27
  this.map = data.map;
28
28
  this.reduce = data.reduce;
29
29
  }
30
+ /**
31
+ * @internal
32
+ */
33
+ static _toCppData(name, data) {
34
+ return {
35
+ name: name,
36
+ map: data.map,
37
+ reduce: data.reduce,
38
+ };
39
+ }
40
+ /**
41
+ * @internal
42
+ */
43
+ static _fromCppData(data) {
44
+ return new DesignDocumentView({
45
+ map: data.map,
46
+ reduce: data.reduce,
47
+ });
48
+ }
30
49
  }
31
50
  exports.DesignDocumentView = DesignDocumentView;
32
51
  /**
@@ -59,6 +78,8 @@ class DesignDocument {
59
78
  }
60
79
  this.name = data.name;
61
80
  this.views = data.views || {};
81
+ this.namespace = data.namespace || viewtypes_1.DesignDocumentNamespace.Production;
82
+ this.rev = data.rev;
62
83
  }
63
84
  /**
64
85
  * @internal
@@ -74,6 +95,36 @@ class DesignDocument {
74
95
  }
75
96
  return new DesignDocument({ name: ddocName, views: views });
76
97
  }
98
+ /**
99
+ * @internal
100
+ */
101
+ static _toCppData(data, namespace) {
102
+ const cppView = {};
103
+ for (const [k, v] of Object.entries(data.views)) {
104
+ cppView[k] = DesignDocumentView._toCppData(k, v);
105
+ }
106
+ return {
107
+ rev: data.rev,
108
+ name: data.name,
109
+ ns: (0, bindingutilities_1.designDocumentNamespaceToCpp)(namespace),
110
+ views: cppView,
111
+ };
112
+ }
113
+ /**
114
+ * @internal
115
+ */
116
+ static _fromCppData(ddoc) {
117
+ const views = {};
118
+ for (const [viewName, viewData] of Object.entries(ddoc.views)) {
119
+ views[viewName] = DesignDocumentView._fromCppData(viewData);
120
+ }
121
+ return new DesignDocument({
122
+ name: ddoc.name,
123
+ views: views,
124
+ namespace: (0, bindingutilities_1.designDocumentNamespaceFromCpp)(ddoc.ns),
125
+ rev: ddoc.rev,
126
+ });
127
+ }
77
128
  }
78
129
  exports.DesignDocument = DesignDocument;
79
130
  /**
@@ -89,12 +140,6 @@ class ViewIndexManager {
89
140
  constructor(bucket) {
90
141
  this._bucket = bucket;
91
142
  }
92
- /**
93
- * @internal
94
- */
95
- get _http() {
96
- return new httpexecutor_1.HttpExecutor(this._bucket.conn);
97
- }
98
143
  /**
99
144
  * @internal
100
145
  */
@@ -102,142 +147,232 @@ class ViewIndexManager {
102
147
  return this._bucket.cluster;
103
148
  }
104
149
  /**
105
- * Returns a list of all the design documents in this bucket.
106
- *
107
- * @param options Optional parameters for this operation.
108
- * @param callback A node-style callback to be invoked after execution.
150
+ * @internal
109
151
  */
110
- async getAllDesignDocuments(options, callback) {
111
- if (options instanceof Function) {
112
- callback = arguments[0];
152
+ async getAllDesignDocuments() {
153
+ let namespace;
154
+ let options;
155
+ let callback;
156
+ // deprecated path: options and maybe callback passed in
157
+ if (typeof arguments[0] === 'object') {
158
+ namespace = undefined;
159
+ options = arguments[0];
160
+ callback = arguments[1];
161
+ }
162
+ else if (arguments[0] instanceof Function) {
163
+ // deprecated path: no options, only callback passed in
164
+ namespace = undefined;
113
165
  options = undefined;
166
+ callback = arguments[0];
167
+ }
168
+ else {
169
+ // either no args passed in or desired path (namespace is 1st arg)
170
+ namespace = arguments[0];
171
+ // still need to handle possible no options, but callback passed in
172
+ if (arguments[1] instanceof Function) {
173
+ callback = arguments[1];
174
+ options = undefined;
175
+ }
176
+ else {
177
+ options = arguments[1];
178
+ callback = arguments[2];
179
+ }
114
180
  }
115
181
  if (!options) {
116
182
  options = {};
117
183
  }
118
184
  const timeout = options.timeout || this._cluster.managementTimeout;
119
- return utilities_1.PromiseHelper.wrapAsync(async () => {
120
- const bucketName = this._bucket.name;
121
- const res = await this._http.request({
122
- type: httpexecutor_1.HttpServiceType.Management,
123
- method: httpexecutor_1.HttpMethod.Get,
124
- path: `/pools/default/buckets/${bucketName}/ddocs`,
185
+ const ns = namespace !== null && namespace !== void 0 ? namespace : viewtypes_1.DesignDocumentNamespace.Production;
186
+ return utilities_1.PromiseHelper.wrap((wrapCallback) => {
187
+ this._cluster.conn.managementViewIndexGetAll({
188
+ bucket_name: this._bucket.name,
189
+ ns: (0, bindingutilities_1.designDocumentNamespaceToCpp)(ns),
125
190
  timeout: timeout,
191
+ }, (cppErr, resp) => {
192
+ const err = (0, bindingutilities_1.errorFromCpp)(cppErr);
193
+ if (err) {
194
+ return wrapCallback(err, null);
195
+ }
196
+ const ddocs = [];
197
+ for (const ddoc of resp.design_documents) {
198
+ ddocs.push(DesignDocument._fromCppData(ddoc));
199
+ }
200
+ wrapCallback(null, ddocs);
126
201
  });
127
- if (res.statusCode !== 200) {
128
- const errCtx = httpexecutor_1.HttpExecutor.errorContextFromResponse(res);
129
- throw new errors_1.CouchbaseError('failed to get design documents', undefined, errCtx);
130
- }
131
- const ddocsData = JSON.parse(res.body.toString());
132
- const ddocs = ddocsData.rows.map((ddocData) => {
133
- const ddocName = ddocData.doc.meta.id.substr(8);
134
- return DesignDocument._fromNsData(ddocName, ddocData.doc.json);
135
- });
136
- return ddocs;
137
202
  }, callback);
138
203
  }
139
204
  /**
140
- * Returns the specified design document.
141
- *
142
- * @param designDocName The name of the design document to fetch.
143
- * @param options Optional parameters for this operation.
144
- * @param callback A node-style callback to be invoked after execution.
205
+ * @internal
145
206
  */
146
- async getDesignDocument(designDocName, options, callback) {
147
- if (options instanceof Function) {
148
- callback = arguments[1];
207
+ async getDesignDocument() {
208
+ let designDocName = arguments[0];
209
+ let namespace;
210
+ let options;
211
+ let callback;
212
+ // deprecated path: options and maybe callback passed in
213
+ if (typeof arguments[1] === 'object') {
214
+ namespace = undefined;
215
+ options = arguments[1];
216
+ callback = arguments[2];
217
+ }
218
+ else if (arguments[1] instanceof Function) {
219
+ // deprecated path: no options, only callback passed in
220
+ namespace = undefined;
149
221
  options = undefined;
222
+ callback = arguments[1];
223
+ }
224
+ else {
225
+ // either no other args passed in or desired path (namespace is 2nd arg)
226
+ namespace = arguments[1];
227
+ // still need to handle possible no options, but callback passed in
228
+ if (arguments[2] instanceof Function) {
229
+ callback = arguments[2];
230
+ options = undefined;
231
+ }
232
+ else {
233
+ options = arguments[2];
234
+ callback = arguments[3];
235
+ }
150
236
  }
151
237
  if (!options) {
152
238
  options = {};
153
239
  }
154
240
  const timeout = options.timeout || this._cluster.managementTimeout;
155
- return utilities_1.PromiseHelper.wrapAsync(async () => {
156
- const bucketName = this._bucket.name;
157
- const res = await this._http.request({
158
- type: httpexecutor_1.HttpServiceType.Views,
159
- method: httpexecutor_1.HttpMethod.Get,
160
- path: `/${bucketName}/_design/${designDocName}`,
241
+ // for compatibility with older SDK versions (i.e. deprecated getDesignDocument())
242
+ if (designDocName.startsWith('dev_')) {
243
+ namespace = viewtypes_1.DesignDocumentNamespace.Development;
244
+ designDocName = designDocName.substring(4);
245
+ }
246
+ const ns = namespace !== null && namespace !== void 0 ? namespace : viewtypes_1.DesignDocumentNamespace.Production;
247
+ return utilities_1.PromiseHelper.wrap((wrapCallback) => {
248
+ this._cluster.conn.managementViewIndexGet({
249
+ bucket_name: this._bucket.name,
250
+ document_name: designDocName,
251
+ ns: (0, bindingutilities_1.designDocumentNamespaceToCpp)(ns),
161
252
  timeout: timeout,
162
- });
163
- if (res.statusCode !== 200) {
164
- const errCtx = httpexecutor_1.HttpExecutor.errorContextFromResponse(res);
165
- if (res.statusCode === 404) {
166
- throw new errors_1.DesignDocumentNotFoundError(undefined, errCtx);
253
+ }, (cppErr, resp) => {
254
+ const err = (0, bindingutilities_1.errorFromCpp)(cppErr);
255
+ if (err) {
256
+ return wrapCallback(err, null);
167
257
  }
168
- throw new errors_1.CouchbaseError('failed to get the design document', undefined, errCtx);
169
- }
170
- const ddocData = JSON.parse(res.body.toString());
171
- return DesignDocument._fromNsData(designDocName, ddocData);
258
+ const ddoc = DesignDocument._fromCppData(resp.document);
259
+ wrapCallback(null, ddoc);
260
+ });
172
261
  }, callback);
173
262
  }
174
263
  /**
175
- * Creates or updates a design document.
176
- *
177
- * @param designDoc The DesignDocument to upsert.
178
- * @param options Optional parameters for this operation.
179
- * @param callback A node-style callback to be invoked after execution.
264
+ * @internal
180
265
  */
181
- async upsertDesignDocument(designDoc, options, callback) {
182
- if (options instanceof Function) {
183
- callback = arguments[1];
266
+ async upsertDesignDocument() {
267
+ const designDoc = arguments[0];
268
+ let namespace;
269
+ let options;
270
+ let callback;
271
+ // deprecated path: options and maybe callback passed in
272
+ if (typeof arguments[1] === 'object') {
273
+ namespace = undefined;
274
+ options = arguments[1];
275
+ callback = arguments[2];
276
+ }
277
+ else if (arguments[1] instanceof Function) {
278
+ // deprecated path: no options, only callback passed in
279
+ namespace = undefined;
184
280
  options = undefined;
281
+ callback = arguments[1];
282
+ }
283
+ else {
284
+ // either no other args passed in or desired path (namespace is 2nd arg)
285
+ namespace = arguments[1];
286
+ // still need to handle possible no options, but callback passed in
287
+ if (arguments[2] instanceof Function) {
288
+ callback = arguments[2];
289
+ options = undefined;
290
+ }
291
+ else {
292
+ options = arguments[2];
293
+ callback = arguments[3];
294
+ }
185
295
  }
186
296
  if (!options) {
187
297
  options = {};
188
298
  }
189
299
  const timeout = options.timeout || this._cluster.managementTimeout;
190
- return utilities_1.PromiseHelper.wrapAsync(async () => {
191
- const bucketName = this._bucket.name;
192
- const designDocData = {
193
- views: designDoc.views,
194
- };
195
- const encodedData = JSON.stringify(designDocData);
196
- const res = await this._http.request({
197
- type: httpexecutor_1.HttpServiceType.Views,
198
- method: httpexecutor_1.HttpMethod.Put,
199
- path: `/${bucketName}/_design/${designDoc.name}`,
200
- contentType: 'application/json',
201
- body: encodedData,
300
+ // for compatibility with older SDK versions (i.e. deprecated upsertDesignDocument())
301
+ if (designDoc.name.startsWith('dev_')) {
302
+ namespace = viewtypes_1.DesignDocumentNamespace.Development;
303
+ designDoc.name = designDoc.name.substring(4);
304
+ }
305
+ const ns = namespace !== null && namespace !== void 0 ? namespace : viewtypes_1.DesignDocumentNamespace.Production;
306
+ return utilities_1.PromiseHelper.wrap((wrapCallback) => {
307
+ this._cluster.conn.managementViewIndexUpsert({
308
+ bucket_name: this._bucket.name,
309
+ document: DesignDocument._toCppData(designDoc, ns),
202
310
  timeout: timeout,
311
+ }, (cppErr) => {
312
+ const err = (0, bindingutilities_1.errorFromCpp)(cppErr);
313
+ if (err) {
314
+ return wrapCallback(err, null);
315
+ }
316
+ wrapCallback(err);
203
317
  });
204
- if (res.statusCode !== 201) {
205
- const errCtx = httpexecutor_1.HttpExecutor.errorContextFromResponse(res);
206
- throw new errors_1.CouchbaseError('failed to upsert the design document', undefined, errCtx);
207
- }
208
318
  }, callback);
209
319
  }
210
320
  /**
211
- * Drops an existing design document.
212
- *
213
- * @param designDocName The name of the design document to drop.
214
- * @param options Optional parameters for this operation.
215
- * @param callback A node-style callback to be invoked after execution.
321
+ * @internal
216
322
  */
217
- async dropDesignDocument(designDocName, options, callback) {
218
- if (options instanceof Function) {
219
- callback = arguments[1];
323
+ async dropDesignDocument() {
324
+ let designDocName = arguments[0];
325
+ let namespace;
326
+ let options;
327
+ let callback;
328
+ // deprecated path: options and maybe callback passed in
329
+ if (typeof arguments[1] === 'object') {
330
+ namespace = undefined;
331
+ options = arguments[1];
332
+ callback = arguments[2];
333
+ }
334
+ else if (arguments[1] instanceof Function) {
335
+ // deprecated path: no options, only callback passed in
336
+ namespace = undefined;
220
337
  options = undefined;
338
+ callback = arguments[1];
339
+ }
340
+ else {
341
+ // either no other args passed in or desired path (namespace is 2nd arg)
342
+ namespace = arguments[1];
343
+ // still need to handle possible no options, but callback passed in
344
+ if (arguments[2] instanceof Function) {
345
+ callback = arguments[2];
346
+ options = undefined;
347
+ }
348
+ else {
349
+ options = arguments[2];
350
+ callback = arguments[3];
351
+ }
221
352
  }
222
353
  if (!options) {
223
354
  options = {};
224
355
  }
225
356
  const timeout = options.timeout || this._cluster.managementTimeout;
226
- return utilities_1.PromiseHelper.wrapAsync(async () => {
227
- const bucketName = this._bucket.name;
228
- const res = await this._http.request({
229
- type: httpexecutor_1.HttpServiceType.Views,
230
- method: httpexecutor_1.HttpMethod.Delete,
231
- path: `/${bucketName}/_design/${designDocName}`,
357
+ // for compatibility with older SDK versions (i.e. deprecated dropDesignDocument())
358
+ if (designDocName.startsWith('dev_')) {
359
+ namespace = viewtypes_1.DesignDocumentNamespace.Development;
360
+ designDocName = designDocName.substring(4);
361
+ }
362
+ const ns = namespace !== null && namespace !== void 0 ? namespace : viewtypes_1.DesignDocumentNamespace.Production;
363
+ return utilities_1.PromiseHelper.wrap((wrapCallback) => {
364
+ this._cluster.conn.managementViewIndexDrop({
365
+ bucket_name: this._bucket.name,
366
+ document_name: designDocName,
367
+ ns: (0, bindingutilities_1.designDocumentNamespaceToCpp)(ns),
232
368
  timeout: timeout,
233
- });
234
- if (res.statusCode !== 200) {
235
- const errCtx = httpexecutor_1.HttpExecutor.errorContextFromResponse(res);
236
- if (res.statusCode === 404) {
237
- throw new errors_1.DesignDocumentNotFoundError(undefined, errCtx);
369
+ }, (cppErr) => {
370
+ const err = (0, bindingutilities_1.errorFromCpp)(cppErr);
371
+ if (err) {
372
+ return wrapCallback(err, null);
238
373
  }
239
- throw new errors_1.CouchbaseError('failed to drop the design document', undefined, errCtx);
240
- }
374
+ wrapCallback(err);
375
+ });
241
376
  }, callback);
242
377
  }
243
378
  /**
@@ -261,12 +396,10 @@ class ViewIndexManager {
261
396
  const timeout = options.timeout || this._cluster.managementTimeout;
262
397
  const timer = new utilities_1.CompoundTimeout(timeout);
263
398
  return utilities_1.PromiseHelper.wrapAsync(async () => {
264
- const designDoc = await this.getDesignDocument(`dev_${designDocName}`, {
399
+ const designDoc = await this.getDesignDocument(designDocName, viewtypes_1.DesignDocumentNamespace.Development, {
265
400
  timeout: timer.left(),
266
401
  });
267
- // Replace the name without the `dev_` prefix on it.
268
- designDoc.name = designDocName;
269
- await this.upsertDesignDocument(designDoc, {
402
+ await this.upsertDesignDocument(designDoc, viewtypes_1.DesignDocumentNamespace.Production, {
270
403
  timeout: timer.left(),
271
404
  });
272
405
  }, callback);
@@ -69,6 +69,21 @@ export declare class ViewRow<TValue = any, TKey = any> {
69
69
  */
70
70
  constructor(data: ViewRow);
71
71
  }
72
+ /**
73
+ * Specifies the namespace for the associated Design Document.
74
+ *
75
+ * @category Views
76
+ */
77
+ export declare enum DesignDocumentNamespace {
78
+ /**
79
+ * Indicates that the Design Document namespace is within the development environment.
80
+ */
81
+ Development = "development",
82
+ /**
83
+ * Indicates that the Design Document namespace is within the producion environment.
84
+ */
85
+ Production = "production"
86
+ }
72
87
  /**
73
88
  * Represents the various scan consistency options that are available when
74
89
  * querying against the views service.
@@ -270,4 +285,15 @@ export interface ViewQueryOptions {
270
285
  * @deprecated Use {@link ViewQueryOptions.onError} instead.
271
286
  */
272
287
  on_error?: ViewErrorMode;
288
+ /**
289
+ * Specifies any additional parameters which should be passed to the view engine
290
+ * when executing the view query.
291
+ */
292
+ raw?: {
293
+ [key: string]: string;
294
+ };
295
+ /**
296
+ * Specifies the design document namespace to use when executing the view query.
297
+ */
298
+ namespace?: DesignDocumentNamespace;
273
299
  }
package/dist/viewtypes.js CHANGED
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.ViewErrorMode = exports.ViewOrdering = exports.ViewScanConsistency = exports.ViewRow = exports.ViewMetaData = exports.ViewResult = void 0;
3
+ exports.ViewErrorMode = exports.ViewOrdering = exports.ViewScanConsistency = exports.DesignDocumentNamespace = exports.ViewRow = exports.ViewMetaData = exports.ViewResult = void 0;
4
4
  /**
5
5
  * Contains the results of a view query.
6
6
  *
@@ -56,6 +56,22 @@ class ViewRow {
56
56
  }
57
57
  }
58
58
  exports.ViewRow = ViewRow;
59
+ /**
60
+ * Specifies the namespace for the associated Design Document.
61
+ *
62
+ * @category Views
63
+ */
64
+ var DesignDocumentNamespace;
65
+ (function (DesignDocumentNamespace) {
66
+ /**
67
+ * Indicates that the Design Document namespace is within the development environment.
68
+ */
69
+ DesignDocumentNamespace["Development"] = "development";
70
+ /**
71
+ * Indicates that the Design Document namespace is within the producion environment.
72
+ */
73
+ DesignDocumentNamespace["Production"] = "production";
74
+ })(DesignDocumentNamespace || (exports.DesignDocumentNamespace = DesignDocumentNamespace = {}));
59
75
  /**
60
76
  * Represents the various scan consistency options that are available when
61
77
  * querying against the views service.
package/package.json CHANGED
@@ -54,7 +54,7 @@
54
54
  "type": "git",
55
55
  "url": "http://github.com/couchbase/couchnode.git"
56
56
  },
57
- "version": "4.2.10",
57
+ "version": "4.2.11-rc.1",
58
58
  "config": {
59
59
  "native": false
60
60
  },
@@ -79,12 +79,12 @@
79
79
  ]
80
80
  },
81
81
  "optionalDependencies": {
82
- "@couchbase/couchbase-darwin-arm64-napi": "4.2.10",
83
- "@couchbase/couchbase-darwin-x64-napi": "4.2.10",
84
- "@couchbase/couchbase-linux-arm64-napi": "4.2.10",
85
- "@couchbase/couchbase-linuxmusl-x64-napi": "4.2.10",
86
- "@couchbase/couchbase-linux-x64-napi": "4.2.10",
87
- "@couchbase/couchbase-win32-x64-napi": "4.2.10"
82
+ "@couchbase/couchbase-darwin-arm64-napi": "4.2.11-rc.1",
83
+ "@couchbase/couchbase-darwin-x64-napi": "4.2.11-rc.1",
84
+ "@couchbase/couchbase-linux-arm64-napi": "4.2.11-rc.1",
85
+ "@couchbase/couchbase-linuxmusl-x64-napi": "4.2.11-rc.1",
86
+ "@couchbase/couchbase-linux-x64-napi": "4.2.11-rc.1",
87
+ "@couchbase/couchbase-win32-x64-napi": "4.2.11-rc.1"
88
88
  },
89
89
  "files": [
90
90
  "LICENSE",
package/src/constants.cpp CHANGED
@@ -865,6 +865,7 @@ void Constants::InitAutogen(Napi::Env env, Napi::Object exports)
865
865
  couchbase::key_value_status_code::opaque_no_match},
866
866
  {"locked", couchbase::key_value_status_code::locked},
867
867
  {"not_locked", couchbase::key_value_status_code::not_locked},
868
+ {"config_only", couchbase::key_value_status_code::config_only},
868
869
  {"auth_stale", couchbase::key_value_status_code::auth_stale},
869
870
  {"auth_error", couchbase::key_value_status_code::auth_error},
870
871
  {"auth_continue",