@ibm-cloud/cloudant 0.0.24 → 0.1.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/cloudant/v1.js CHANGED
@@ -119,6 +119,12 @@ var CloudantV1 = /** @class */ (function (_super) {
119
119
  */
120
120
  CloudantV1.prototype.getServerInformation = function (params) {
121
121
  var _params = __assign({}, params);
122
+ var _requiredParams = [];
123
+ var _validParams = ['headers'];
124
+ var _validationErrors = (0, ibm_cloud_sdk_core_1.validateParams)(_params, _requiredParams, _validParams);
125
+ if (_validationErrors) {
126
+ return Promise.reject(_validationErrors);
127
+ }
122
128
  var sdkHeaders = (0, common_1.getSdkHeaders)(CloudantV1.DEFAULT_SERVICE_NAME, 'v1', 'getServerInformation');
123
129
  var parameters = {
124
130
  options: {
@@ -146,6 +152,12 @@ var CloudantV1 = /** @class */ (function (_super) {
146
152
  */
147
153
  CloudantV1.prototype.getMembershipInformation = function (params) {
148
154
  var _params = __assign({}, params);
155
+ var _requiredParams = [];
156
+ var _validParams = ['headers'];
157
+ var _validationErrors = (0, ibm_cloud_sdk_core_1.validateParams)(_params, _requiredParams, _validParams);
158
+ if (_validationErrors) {
159
+ return Promise.reject(_validationErrors);
160
+ }
149
161
  var sdkHeaders = (0, common_1.getSdkHeaders)(CloudantV1.DEFAULT_SERVICE_NAME, 'v1', 'getMembershipInformation');
150
162
  var parameters = {
151
163
  options: {
@@ -173,6 +185,12 @@ var CloudantV1 = /** @class */ (function (_super) {
173
185
  */
174
186
  CloudantV1.prototype.getUuids = function (params) {
175
187
  var _params = __assign({}, params);
188
+ var _requiredParams = [];
189
+ var _validParams = ['count', 'headers'];
190
+ var _validationErrors = (0, ibm_cloud_sdk_core_1.validateParams)(_params, _requiredParams, _validParams);
191
+ if (_validationErrors) {
192
+ return Promise.reject(_validationErrors);
193
+ }
176
194
  var query = {
177
195
  'count': _params.count,
178
196
  };
@@ -203,6 +221,12 @@ var CloudantV1 = /** @class */ (function (_super) {
203
221
  */
204
222
  CloudantV1.prototype.getCapacityThroughputInformation = function (params) {
205
223
  var _params = __assign({}, params);
224
+ var _requiredParams = [];
225
+ var _validParams = ['headers'];
226
+ var _validationErrors = (0, ibm_cloud_sdk_core_1.validateParams)(_params, _requiredParams, _validParams);
227
+ if (_validationErrors) {
228
+ return Promise.reject(_validationErrors);
229
+ }
206
230
  var sdkHeaders = (0, common_1.getSdkHeaders)(CloudantV1.DEFAULT_SERVICE_NAME, 'v1', 'getCapacityThroughputInformation');
207
231
  var parameters = {
208
232
  options: {
@@ -231,10 +255,11 @@ var CloudantV1 = /** @class */ (function (_super) {
231
255
  */
232
256
  CloudantV1.prototype.putCapacityThroughputConfiguration = function (params) {
233
257
  var _params = __assign({}, params);
234
- var requiredParams = ['blocks'];
235
- var missingParams = (0, ibm_cloud_sdk_core_1.getMissingParams)(_params, requiredParams);
236
- if (missingParams) {
237
- return Promise.reject(missingParams);
258
+ var _requiredParams = ['blocks'];
259
+ var _validParams = ['blocks', 'headers'];
260
+ var _validationErrors = (0, ibm_cloud_sdk_core_1.validateParams)(_params, _requiredParams, _validParams);
261
+ if (_validationErrors) {
262
+ return Promise.reject(_validationErrors);
238
263
  }
239
264
  var body = {
240
265
  'blocks': _params.blocks,
@@ -282,6 +307,12 @@ var CloudantV1 = /** @class */ (function (_super) {
282
307
  */
283
308
  CloudantV1.prototype.getDbUpdates = function (params) {
284
309
  var _params = __assign({}, params);
310
+ var _requiredParams = [];
311
+ var _validParams = ['feed', 'heartbeat', 'timeout', 'since', 'headers'];
312
+ var _validationErrors = (0, ibm_cloud_sdk_core_1.validateParams)(_params, _requiredParams, _validParams);
313
+ if (_validationErrors) {
314
+ return Promise.reject(_validationErrors);
315
+ }
285
316
  var query = {
286
317
  'feed': _params.feed,
287
318
  'heartbeat': _params.heartbeat,
@@ -309,6 +340,12 @@ var CloudantV1 = /** @class */ (function (_super) {
309
340
  * Requests the database changes feed in the same way as `GET /{db}/_changes` does. It is widely used with the
310
341
  * `filter` query parameter because it allows one to pass more information to the filter.
311
342
  *
343
+ * ### Note
344
+ *
345
+ * Before using the changes feed we recommend reading the
346
+ * [FAQs](https://cloud.ibm.com/docs/Cloudant?topic=Cloudant-faq-using-changes-feed) to understand the limitations and
347
+ * appropriate use cases.".
348
+ *
312
349
  * @param {Object} params - The parameters to send to the service.
313
350
  * @param {string} params.db - Path parameter to specify the database name.
314
351
  * @param {string[]} [params.docIds] - Schema for a list of document IDs.
@@ -337,6 +374,11 @@ var CloudantV1 = /** @class */ (function (_super) {
337
374
  * * Condition operators: are specific to a field, and are used to evaluate the value stored in that field. For
338
375
  * instance, the basic `$eq` operator matches when the specified field contains a value that is equal to the supplied
339
376
  * argument.
377
+ * * Only equality operators such as `$eq`, `$gt`, `$gte`, `$lt`, and `$lte` (but not `$ne`) can be used as the basis
378
+ * of a query. You should include at least one of these in a selector.
379
+ *
380
+ * For further reference see
381
+ * [selector syntax](https://cloud.ibm.com/docs/Cloudant?topic=Cloudant-query#selector-syntax).
340
382
  * @param {string} [params.lastEventId] - Header parameter to specify the ID of the last events received by the server
341
383
  * on a previous connection. Overrides `since` query parameter.
342
384
  * @param {boolean} [params.attEncodingInfo] - Query parameter to specify whether to include the encoding information
@@ -389,10 +431,11 @@ var CloudantV1 = /** @class */ (function (_super) {
389
431
  */
390
432
  CloudantV1.prototype.postChanges = function (params) {
391
433
  var _params = __assign({}, params);
392
- var requiredParams = ['db'];
393
- var missingParams = (0, ibm_cloud_sdk_core_1.getMissingParams)(_params, requiredParams);
394
- if (missingParams) {
395
- return Promise.reject(missingParams);
434
+ var _requiredParams = ['db'];
435
+ var _validParams = ['db', 'docIds', 'fields', 'selector', 'lastEventId', 'attEncodingInfo', 'attachments', 'conflicts', 'descending', 'feed', 'filter', 'heartbeat', 'includeDocs', 'limit', 'seqInterval', 'since', 'style', 'timeout', 'view', 'headers'];
436
+ var _validationErrors = (0, ibm_cloud_sdk_core_1.validateParams)(_params, _requiredParams, _validParams);
437
+ if (_validationErrors) {
438
+ return Promise.reject(_validationErrors);
396
439
  }
397
440
  var body = {
398
441
  'doc_ids': _params.docIds,
@@ -443,6 +486,12 @@ var CloudantV1 = /** @class */ (function (_super) {
443
486
  * Requests the database changes feed in the same way as `GET /{db}/_changes` does. It is widely used with the
444
487
  * `filter` query parameter because it allows one to pass more information to the filter.
445
488
  *
489
+ * ### Note
490
+ *
491
+ * Before using the changes feed we recommend reading the
492
+ * [FAQs](https://cloud.ibm.com/docs/Cloudant?topic=Cloudant-faq-using-changes-feed) to understand the limitations and
493
+ * appropriate use cases.".
494
+ *
446
495
  * @param {Object} params - The parameters to send to the service.
447
496
  * @param {string} params.db - Path parameter to specify the database name.
448
497
  * @param {string[]} [params.docIds] - Schema for a list of document IDs.
@@ -471,6 +520,11 @@ var CloudantV1 = /** @class */ (function (_super) {
471
520
  * * Condition operators: are specific to a field, and are used to evaluate the value stored in that field. For
472
521
  * instance, the basic `$eq` operator matches when the specified field contains a value that is equal to the supplied
473
522
  * argument.
523
+ * * Only equality operators such as `$eq`, `$gt`, `$gte`, `$lt`, and `$lte` (but not `$ne`) can be used as the basis
524
+ * of a query. You should include at least one of these in a selector.
525
+ *
526
+ * For further reference see
527
+ * [selector syntax](https://cloud.ibm.com/docs/Cloudant?topic=Cloudant-query#selector-syntax).
474
528
  * @param {string} [params.lastEventId] - Header parameter to specify the ID of the last events received by the server
475
529
  * on a previous connection. Overrides `since` query parameter.
476
530
  * @param {boolean} [params.attEncodingInfo] - Query parameter to specify whether to include the encoding information
@@ -523,10 +577,11 @@ var CloudantV1 = /** @class */ (function (_super) {
523
577
  */
524
578
  CloudantV1.prototype.postChangesAsStream = function (params) {
525
579
  var _params = __assign({}, params);
526
- var requiredParams = ['db'];
527
- var missingParams = (0, ibm_cloud_sdk_core_1.getMissingParams)(_params, requiredParams);
528
- if (missingParams) {
529
- return Promise.reject(missingParams);
580
+ var _requiredParams = ['db'];
581
+ var _validParams = ['db', 'docIds', 'fields', 'selector', 'lastEventId', 'attEncodingInfo', 'attachments', 'conflicts', 'descending', 'feed', 'filter', 'heartbeat', 'includeDocs', 'limit', 'seqInterval', 'since', 'style', 'timeout', 'view', 'headers'];
582
+ var _validationErrors = (0, ibm_cloud_sdk_core_1.validateParams)(_params, _requiredParams, _validParams);
583
+ if (_validationErrors) {
584
+ return Promise.reject(_validationErrors);
530
585
  }
531
586
  var body = {
532
587
  'doc_ids': _params.docIds,
@@ -588,10 +643,11 @@ var CloudantV1 = /** @class */ (function (_super) {
588
643
  */
589
644
  CloudantV1.prototype.headDatabase = function (params) {
590
645
  var _params = __assign({}, params);
591
- var requiredParams = ['db'];
592
- var missingParams = (0, ibm_cloud_sdk_core_1.getMissingParams)(_params, requiredParams);
593
- if (missingParams) {
594
- return Promise.reject(missingParams);
646
+ var _requiredParams = ['db'];
647
+ var _validParams = ['db', 'headers'];
648
+ var _validationErrors = (0, ibm_cloud_sdk_core_1.validateParams)(_params, _requiredParams, _validParams);
649
+ if (_validationErrors) {
650
+ return Promise.reject(_validationErrors);
595
651
  }
596
652
  var path = {
597
653
  'db': _params.db,
@@ -615,25 +671,31 @@ var CloudantV1 = /** @class */ (function (_super) {
615
671
  * @param {Object} [params] - The parameters to send to the service.
616
672
  * @param {boolean} [params.descending] - Query parameter to specify whether to return the documents in descending by
617
673
  * key order.
618
- * @param {string} [params.endkey] - Query parameter to specify to stop returning records when the specified key is
674
+ * @param {string} [params.endKey] - Query parameter to specify to stop returning records when the specified key is
619
675
  * reached. String representation of any JSON type that matches the key type emitted by the view function.
620
676
  * @param {number} [params.limit] - Query parameter to specify the number of returned documents to limit the result
621
677
  * to.
622
678
  * @param {number} [params.skip] - Query parameter to specify the number of records before starting to return the
623
679
  * results.
624
- * @param {string} [params.startkey] - Query parameter to specify to start returning records from the specified key.
680
+ * @param {string} [params.startKey] - Query parameter to specify to start returning records from the specified key.
625
681
  * String representation of any JSON type that matches the key type emitted by the view function.
626
682
  * @param {OutgoingHttpHeaders} [params.headers] - Custom request headers
627
683
  * @returns {Promise<CloudantV1.Response<string[]>>}
628
684
  */
629
685
  CloudantV1.prototype.getAllDbs = function (params) {
630
686
  var _params = __assign({}, params);
687
+ var _requiredParams = [];
688
+ var _validParams = ['descending', 'endKey', 'limit', 'skip', 'startKey', 'headers'];
689
+ var _validationErrors = (0, ibm_cloud_sdk_core_1.validateParams)(_params, _requiredParams, _validParams);
690
+ if (_validationErrors) {
691
+ return Promise.reject(_validationErrors);
692
+ }
631
693
  var query = {
632
694
  'descending': _params.descending,
633
- 'endkey': _params.endkey,
695
+ 'end_key': _params.endKey,
634
696
  'limit': _params.limit,
635
697
  'skip': _params.skip,
636
- 'startkey': _params.startkey,
698
+ 'start_key': _params.startKey,
637
699
  };
638
700
  var sdkHeaders = (0, common_1.getSdkHeaders)(CloudantV1.DEFAULT_SERVICE_NAME, 'v1', 'getAllDbs');
639
701
  var parameters = {
@@ -664,10 +726,11 @@ var CloudantV1 = /** @class */ (function (_super) {
664
726
  */
665
727
  CloudantV1.prototype.postDbsInfo = function (params) {
666
728
  var _params = __assign({}, params);
667
- var requiredParams = ['keys'];
668
- var missingParams = (0, ibm_cloud_sdk_core_1.getMissingParams)(_params, requiredParams);
669
- if (missingParams) {
670
- return Promise.reject(missingParams);
729
+ var _requiredParams = ['keys'];
730
+ var _validParams = ['keys', 'headers'];
731
+ var _validationErrors = (0, ibm_cloud_sdk_core_1.validateParams)(_params, _requiredParams, _validParams);
732
+ if (_validationErrors) {
733
+ return Promise.reject(_validationErrors);
671
734
  }
672
735
  var body = {
673
736
  'keys': _params.keys,
@@ -702,10 +765,11 @@ var CloudantV1 = /** @class */ (function (_super) {
702
765
  */
703
766
  CloudantV1.prototype.deleteDatabase = function (params) {
704
767
  var _params = __assign({}, params);
705
- var requiredParams = ['db'];
706
- var missingParams = (0, ibm_cloud_sdk_core_1.getMissingParams)(_params, requiredParams);
707
- if (missingParams) {
708
- return Promise.reject(missingParams);
768
+ var _requiredParams = ['db'];
769
+ var _validParams = ['db', 'headers'];
770
+ var _validationErrors = (0, ibm_cloud_sdk_core_1.validateParams)(_params, _requiredParams, _validParams);
771
+ if (_validationErrors) {
772
+ return Promise.reject(_validationErrors);
709
773
  }
710
774
  var path = {
711
775
  'db': _params.db,
@@ -735,10 +799,11 @@ var CloudantV1 = /** @class */ (function (_super) {
735
799
  */
736
800
  CloudantV1.prototype.getDatabaseInformation = function (params) {
737
801
  var _params = __assign({}, params);
738
- var requiredParams = ['db'];
739
- var missingParams = (0, ibm_cloud_sdk_core_1.getMissingParams)(_params, requiredParams);
740
- if (missingParams) {
741
- return Promise.reject(missingParams);
802
+ var _requiredParams = ['db'];
803
+ var _validParams = ['db', 'headers'];
804
+ var _validationErrors = (0, ibm_cloud_sdk_core_1.validateParams)(_params, _requiredParams, _validParams);
805
+ if (_validationErrors) {
806
+ return Promise.reject(_validationErrors);
742
807
  }
743
808
  var path = {
744
809
  'db': _params.db,
@@ -766,16 +831,18 @@ var CloudantV1 = /** @class */ (function (_super) {
766
831
  * @param {boolean} [params.partitioned] - Query parameter to specify whether to enable database partitions when
767
832
  * creating a database.
768
833
  * @param {number} [params.q] - The number of shards in the database. Each shard is a partition of the hash value
769
- * range. Default is 8, unless overridden in the `cluster config`.
834
+ * range. Its value is set by the service. For more information about modifying database configuration, contact IBM
835
+ * Cloudant support.
770
836
  * @param {OutgoingHttpHeaders} [params.headers] - Custom request headers
771
837
  * @returns {Promise<CloudantV1.Response<CloudantV1.Ok>>}
772
838
  */
773
839
  CloudantV1.prototype.putDatabase = function (params) {
774
840
  var _params = __assign({}, params);
775
- var requiredParams = ['db'];
776
- var missingParams = (0, ibm_cloud_sdk_core_1.getMissingParams)(_params, requiredParams);
777
- if (missingParams) {
778
- return Promise.reject(missingParams);
841
+ var _requiredParams = ['db'];
842
+ var _validParams = ['db', 'partitioned', 'q', 'headers'];
843
+ var _validationErrors = (0, ibm_cloud_sdk_core_1.validateParams)(_params, _requiredParams, _validParams);
844
+ if (_validationErrors) {
845
+ return Promise.reject(_validationErrors);
779
846
  }
780
847
  var query = {
781
848
  'partitioned': _params.partitioned,
@@ -824,10 +891,11 @@ var CloudantV1 = /** @class */ (function (_super) {
824
891
  */
825
892
  CloudantV1.prototype.headDocument = function (params) {
826
893
  var _params = __assign({}, params);
827
- var requiredParams = ['db', 'docId'];
828
- var missingParams = (0, ibm_cloud_sdk_core_1.getMissingParams)(_params, requiredParams);
829
- if (missingParams) {
830
- return Promise.reject(missingParams);
894
+ var _requiredParams = ['db', 'docId'];
895
+ var _validParams = ['db', 'docId', 'ifNoneMatch', 'latest', 'rev', 'headers'];
896
+ var _validationErrors = (0, ibm_cloud_sdk_core_1.validateParams)(_params, _requiredParams, _validParams);
897
+ if (_validationErrors) {
898
+ return Promise.reject(_validationErrors);
831
899
  }
832
900
  var query = {
833
901
  'latest': _params.latest,
@@ -856,12 +924,15 @@ var CloudantV1 = /** @class */ (function (_super) {
856
924
  /**
857
925
  * Create or modify a document in a database.
858
926
  *
859
- * Creates or modifies a document in the specified database by using the supplied JSON document. If the JSON document
860
- * doesn't specify an `_id` field, then the document is created with a new unique ID generated by the UUID algorithm
861
- * that is configured for the server. If the document includes the `_id` field, then it is created with that `_id` or
862
- * updated if the `_id` already exists, and an appropriate `_rev` is included in the JSON document. If the `_id`
863
- * includes the `_local` or `_design` prefix, then this operation is used to create or modify local or design
864
- * documents respectively.
927
+ * Creates or modifies a document in the specified database by using the supplied JSON document.
928
+ *
929
+ * For creation, you may specify the document ID but you should not specify the revision. If you don't specify the
930
+ * document ID, then the server generates an ID for your document.
931
+ *
932
+ * For modification, you must specify the document ID and a revision identifier in the JSON document.
933
+ *
934
+ * If your document ID includes the `_local/` or `_design/` prefix, then this operation creates or modifies a local or
935
+ * a design document respectively.
865
936
  *
866
937
  * @param {Object} params - The parameters to send to the service.
867
938
  * @param {string} params.db - Path parameter to specify the database name.
@@ -874,10 +945,11 @@ var CloudantV1 = /** @class */ (function (_super) {
874
945
  */
875
946
  CloudantV1.prototype.postDocument = function (params) {
876
947
  var _params = __assign({}, params);
877
- var requiredParams = ['db', 'document'];
878
- var missingParams = (0, ibm_cloud_sdk_core_1.getMissingParams)(_params, requiredParams);
879
- if (missingParams) {
880
- return Promise.reject(missingParams);
948
+ var _requiredParams = ['db', 'document'];
949
+ var _validParams = ['db', 'document', 'contentType', 'batch', 'headers'];
950
+ var _validationErrors = (0, ibm_cloud_sdk_core_1.validateParams)(_params, _requiredParams, _validParams);
951
+ if (_validationErrors) {
952
+ return Promise.reject(_validationErrors);
881
953
  }
882
954
  var body = _params.document;
883
955
  var query = {
@@ -929,19 +1001,20 @@ var CloudantV1 = /** @class */ (function (_super) {
929
1001
  * @param {number} [params.skip] - Parameter to specify the number of records before starting to return the results.
930
1002
  * @param {boolean} [params.updateSeq] - Parameter to specify whether to include in the response an update_seq value
931
1003
  * indicating the sequence id of the database the view reflects.
932
- * @param {string} [params.endkey] - Schema for a document ID.
1004
+ * @param {string} [params.endKey] - Schema for a document ID.
933
1005
  * @param {string} [params.key] - Schema for a document ID.
934
1006
  * @param {string[]} [params.keys] - Schema for a list of document IDs.
935
- * @param {string} [params.startkey] - Schema for a document ID.
1007
+ * @param {string} [params.startKey] - Schema for a document ID.
936
1008
  * @param {OutgoingHttpHeaders} [params.headers] - Custom request headers
937
1009
  * @returns {Promise<CloudantV1.Response<CloudantV1.AllDocsResult>>}
938
1010
  */
939
1011
  CloudantV1.prototype.postAllDocs = function (params) {
940
1012
  var _params = __assign({}, params);
941
- var requiredParams = ['db'];
942
- var missingParams = (0, ibm_cloud_sdk_core_1.getMissingParams)(_params, requiredParams);
943
- if (missingParams) {
944
- return Promise.reject(missingParams);
1013
+ var _requiredParams = ['db'];
1014
+ var _validParams = ['db', 'attEncodingInfo', 'attachments', 'conflicts', 'descending', 'includeDocs', 'inclusiveEnd', 'limit', 'skip', 'updateSeq', 'endKey', 'key', 'keys', 'startKey', 'headers'];
1015
+ var _validationErrors = (0, ibm_cloud_sdk_core_1.validateParams)(_params, _requiredParams, _validParams);
1016
+ if (_validationErrors) {
1017
+ return Promise.reject(_validationErrors);
945
1018
  }
946
1019
  var body = {
947
1020
  'att_encoding_info': _params.attEncodingInfo,
@@ -953,10 +1026,10 @@ var CloudantV1 = /** @class */ (function (_super) {
953
1026
  'limit': _params.limit,
954
1027
  'skip': _params.skip,
955
1028
  'update_seq': _params.updateSeq,
956
- 'endkey': _params.endkey,
1029
+ 'end_key': _params.endKey,
957
1030
  'key': _params.key,
958
1031
  'keys': _params.keys,
959
- 'startkey': _params.startkey,
1032
+ 'start_key': _params.startKey,
960
1033
  };
961
1034
  var path = {
962
1035
  'db': _params.db,
@@ -1003,19 +1076,20 @@ var CloudantV1 = /** @class */ (function (_super) {
1003
1076
  * @param {number} [params.skip] - Parameter to specify the number of records before starting to return the results.
1004
1077
  * @param {boolean} [params.updateSeq] - Parameter to specify whether to include in the response an update_seq value
1005
1078
  * indicating the sequence id of the database the view reflects.
1006
- * @param {string} [params.endkey] - Schema for a document ID.
1079
+ * @param {string} [params.endKey] - Schema for a document ID.
1007
1080
  * @param {string} [params.key] - Schema for a document ID.
1008
1081
  * @param {string[]} [params.keys] - Schema for a list of document IDs.
1009
- * @param {string} [params.startkey] - Schema for a document ID.
1082
+ * @param {string} [params.startKey] - Schema for a document ID.
1010
1083
  * @param {OutgoingHttpHeaders} [params.headers] - Custom request headers
1011
1084
  * @returns {Promise<CloudantV1.Response<NodeJS.ReadableStream>>}
1012
1085
  */
1013
1086
  CloudantV1.prototype.postAllDocsAsStream = function (params) {
1014
1087
  var _params = __assign({}, params);
1015
- var requiredParams = ['db'];
1016
- var missingParams = (0, ibm_cloud_sdk_core_1.getMissingParams)(_params, requiredParams);
1017
- if (missingParams) {
1018
- return Promise.reject(missingParams);
1088
+ var _requiredParams = ['db'];
1089
+ var _validParams = ['db', 'attEncodingInfo', 'attachments', 'conflicts', 'descending', 'includeDocs', 'inclusiveEnd', 'limit', 'skip', 'updateSeq', 'endKey', 'key', 'keys', 'startKey', 'headers'];
1090
+ var _validationErrors = (0, ibm_cloud_sdk_core_1.validateParams)(_params, _requiredParams, _validParams);
1091
+ if (_validationErrors) {
1092
+ return Promise.reject(_validationErrors);
1019
1093
  }
1020
1094
  var body = {
1021
1095
  'att_encoding_info': _params.attEncodingInfo,
@@ -1027,10 +1101,10 @@ var CloudantV1 = /** @class */ (function (_super) {
1027
1101
  'limit': _params.limit,
1028
1102
  'skip': _params.skip,
1029
1103
  'update_seq': _params.updateSeq,
1030
- 'endkey': _params.endkey,
1104
+ 'end_key': _params.endKey,
1031
1105
  'key': _params.key,
1032
1106
  'keys': _params.keys,
1033
- 'startkey': _params.startkey,
1107
+ 'start_key': _params.startKey,
1034
1108
  };
1035
1109
  var path = {
1036
1110
  'db': _params.db,
@@ -1070,10 +1144,11 @@ var CloudantV1 = /** @class */ (function (_super) {
1070
1144
  */
1071
1145
  CloudantV1.prototype.postAllDocsQueries = function (params) {
1072
1146
  var _params = __assign({}, params);
1073
- var requiredParams = ['db', 'queries'];
1074
- var missingParams = (0, ibm_cloud_sdk_core_1.getMissingParams)(_params, requiredParams);
1075
- if (missingParams) {
1076
- return Promise.reject(missingParams);
1147
+ var _requiredParams = ['db', 'queries'];
1148
+ var _validParams = ['db', 'queries', 'headers'];
1149
+ var _validationErrors = (0, ibm_cloud_sdk_core_1.validateParams)(_params, _requiredParams, _validParams);
1150
+ if (_validationErrors) {
1151
+ return Promise.reject(_validationErrors);
1077
1152
  }
1078
1153
  var body = {
1079
1154
  'queries': _params.queries,
@@ -1115,10 +1190,11 @@ var CloudantV1 = /** @class */ (function (_super) {
1115
1190
  */
1116
1191
  CloudantV1.prototype.postAllDocsQueriesAsStream = function (params) {
1117
1192
  var _params = __assign({}, params);
1118
- var requiredParams = ['db', 'queries'];
1119
- var missingParams = (0, ibm_cloud_sdk_core_1.getMissingParams)(_params, requiredParams);
1120
- if (missingParams) {
1121
- return Promise.reject(missingParams);
1193
+ var _requiredParams = ['db', 'queries'];
1194
+ var _validParams = ['db', 'queries', 'headers'];
1195
+ var _validationErrors = (0, ibm_cloud_sdk_core_1.validateParams)(_params, _requiredParams, _validParams);
1196
+ if (_validationErrors) {
1197
+ return Promise.reject(_validationErrors);
1122
1198
  }
1123
1199
  var body = {
1124
1200
  'queries': _params.queries,
@@ -1147,9 +1223,9 @@ var CloudantV1 = /** @class */ (function (_super) {
1147
1223
  /**
1148
1224
  * Bulk modify multiple documents in a database.
1149
1225
  *
1150
- * The bulk document API allows you to create and update multiple documents at the same time within a single request.
1151
- * The basic operation is similar to creating or updating a single document, except that you batch the document
1152
- * structure and information.
1226
+ * The bulk document API allows you to create, update, and delete multiple documents at the same time within a single
1227
+ * request. The basic operation is similar to creating, updating, or deleting a single document, except that you batch
1228
+ * the document structure and information.
1153
1229
  *
1154
1230
  * @param {Object} params - The parameters to send to the service.
1155
1231
  * @param {string} params.db - Path parameter to specify the database name.
@@ -1159,10 +1235,11 @@ var CloudantV1 = /** @class */ (function (_super) {
1159
1235
  */
1160
1236
  CloudantV1.prototype.postBulkDocs = function (params) {
1161
1237
  var _params = __assign({}, params);
1162
- var requiredParams = ['db', 'bulkDocs'];
1163
- var missingParams = (0, ibm_cloud_sdk_core_1.getMissingParams)(_params, requiredParams);
1164
- if (missingParams) {
1165
- return Promise.reject(missingParams);
1238
+ var _requiredParams = ['db', 'bulkDocs'];
1239
+ var _validParams = ['db', 'bulkDocs', 'headers'];
1240
+ var _validationErrors = (0, ibm_cloud_sdk_core_1.validateParams)(_params, _requiredParams, _validParams);
1241
+ if (_validationErrors) {
1242
+ return Promise.reject(_validationErrors);
1166
1243
  }
1167
1244
  var body = _params.bulkDocs;
1168
1245
  var path = {
@@ -1206,10 +1283,11 @@ var CloudantV1 = /** @class */ (function (_super) {
1206
1283
  */
1207
1284
  CloudantV1.prototype.postBulkGet = function (params) {
1208
1285
  var _params = __assign({}, params);
1209
- var requiredParams = ['db', 'docs'];
1210
- var missingParams = (0, ibm_cloud_sdk_core_1.getMissingParams)(_params, requiredParams);
1211
- if (missingParams) {
1212
- return Promise.reject(missingParams);
1286
+ var _requiredParams = ['db', 'docs'];
1287
+ var _validParams = ['db', 'docs', 'attachments', 'attEncodingInfo', 'latest', 'revs', 'headers'];
1288
+ var _validationErrors = (0, ibm_cloud_sdk_core_1.validateParams)(_params, _requiredParams, _validParams);
1289
+ if (_validationErrors) {
1290
+ return Promise.reject(_validationErrors);
1213
1291
  }
1214
1292
  var body = {
1215
1293
  'docs': _params.docs,
@@ -1262,10 +1340,11 @@ var CloudantV1 = /** @class */ (function (_super) {
1262
1340
  */
1263
1341
  CloudantV1.prototype.postBulkGetAsMixed = function (params) {
1264
1342
  var _params = __assign({}, params);
1265
- var requiredParams = ['db', 'docs'];
1266
- var missingParams = (0, ibm_cloud_sdk_core_1.getMissingParams)(_params, requiredParams);
1267
- if (missingParams) {
1268
- return Promise.reject(missingParams);
1343
+ var _requiredParams = ['db', 'docs'];
1344
+ var _validParams = ['db', 'docs', 'attachments', 'attEncodingInfo', 'latest', 'revs', 'headers'];
1345
+ var _validationErrors = (0, ibm_cloud_sdk_core_1.validateParams)(_params, _requiredParams, _validParams);
1346
+ if (_validationErrors) {
1347
+ return Promise.reject(_validationErrors);
1269
1348
  }
1270
1349
  var body = {
1271
1350
  'docs': _params.docs,
@@ -1319,10 +1398,11 @@ var CloudantV1 = /** @class */ (function (_super) {
1319
1398
  */
1320
1399
  CloudantV1.prototype.postBulkGetAsRelated = function (params) {
1321
1400
  var _params = __assign({}, params);
1322
- var requiredParams = ['db', 'docs'];
1323
- var missingParams = (0, ibm_cloud_sdk_core_1.getMissingParams)(_params, requiredParams);
1324
- if (missingParams) {
1325
- return Promise.reject(missingParams);
1401
+ var _requiredParams = ['db', 'docs'];
1402
+ var _validParams = ['db', 'docs', 'attachments', 'attEncodingInfo', 'latest', 'revs', 'headers'];
1403
+ var _validationErrors = (0, ibm_cloud_sdk_core_1.validateParams)(_params, _requiredParams, _validParams);
1404
+ if (_validationErrors) {
1405
+ return Promise.reject(_validationErrors);
1326
1406
  }
1327
1407
  var body = {
1328
1408
  'docs': _params.docs,
@@ -1376,10 +1456,11 @@ var CloudantV1 = /** @class */ (function (_super) {
1376
1456
  */
1377
1457
  CloudantV1.prototype.postBulkGetAsStream = function (params) {
1378
1458
  var _params = __assign({}, params);
1379
- var requiredParams = ['db', 'docs'];
1380
- var missingParams = (0, ibm_cloud_sdk_core_1.getMissingParams)(_params, requiredParams);
1381
- if (missingParams) {
1382
- return Promise.reject(missingParams);
1459
+ var _requiredParams = ['db', 'docs'];
1460
+ var _validParams = ['db', 'docs', 'attachments', 'attEncodingInfo', 'latest', 'revs', 'headers'];
1461
+ var _validationErrors = (0, ibm_cloud_sdk_core_1.validateParams)(_params, _requiredParams, _validParams);
1462
+ if (_validationErrors) {
1463
+ return Promise.reject(_validationErrors);
1383
1464
  }
1384
1465
  var body = {
1385
1466
  'docs': _params.docs,
@@ -1432,10 +1513,11 @@ var CloudantV1 = /** @class */ (function (_super) {
1432
1513
  */
1433
1514
  CloudantV1.prototype.deleteDocument = function (params) {
1434
1515
  var _params = __assign({}, params);
1435
- var requiredParams = ['db', 'docId'];
1436
- var missingParams = (0, ibm_cloud_sdk_core_1.getMissingParams)(_params, requiredParams);
1437
- if (missingParams) {
1438
- return Promise.reject(missingParams);
1516
+ var _requiredParams = ['db', 'docId'];
1517
+ var _validParams = ['db', 'docId', 'ifMatch', 'batch', 'rev', 'headers'];
1518
+ var _validationErrors = (0, ibm_cloud_sdk_core_1.validateParams)(_params, _requiredParams, _validParams);
1519
+ if (_validationErrors) {
1520
+ return Promise.reject(_validationErrors);
1439
1521
  }
1440
1522
  var query = {
1441
1523
  'batch': _params.batch,
@@ -1497,10 +1579,11 @@ var CloudantV1 = /** @class */ (function (_super) {
1497
1579
  */
1498
1580
  CloudantV1.prototype.getDocument = function (params) {
1499
1581
  var _params = __assign({}, params);
1500
- var requiredParams = ['db', 'docId'];
1501
- var missingParams = (0, ibm_cloud_sdk_core_1.getMissingParams)(_params, requiredParams);
1502
- if (missingParams) {
1503
- return Promise.reject(missingParams);
1582
+ var _requiredParams = ['db', 'docId'];
1583
+ var _validParams = ['db', 'docId', 'ifNoneMatch', 'attachments', 'attEncodingInfo', 'conflicts', 'deletedConflicts', 'latest', 'localSeq', 'meta', 'rev', 'revs', 'revsInfo', 'headers'];
1584
+ var _validationErrors = (0, ibm_cloud_sdk_core_1.validateParams)(_params, _requiredParams, _validParams);
1585
+ if (_validationErrors) {
1586
+ return Promise.reject(_validationErrors);
1504
1587
  }
1505
1588
  var query = {
1506
1589
  'attachments': _params.attachments,
@@ -1570,10 +1653,11 @@ var CloudantV1 = /** @class */ (function (_super) {
1570
1653
  */
1571
1654
  CloudantV1.prototype.getDocumentAsMixed = function (params) {
1572
1655
  var _params = __assign({}, params);
1573
- var requiredParams = ['db', 'docId'];
1574
- var missingParams = (0, ibm_cloud_sdk_core_1.getMissingParams)(_params, requiredParams);
1575
- if (missingParams) {
1576
- return Promise.reject(missingParams);
1656
+ var _requiredParams = ['db', 'docId'];
1657
+ var _validParams = ['db', 'docId', 'ifNoneMatch', 'attachments', 'attEncodingInfo', 'conflicts', 'deletedConflicts', 'latest', 'localSeq', 'meta', 'rev', 'revs', 'revsInfo', 'headers'];
1658
+ var _validationErrors = (0, ibm_cloud_sdk_core_1.validateParams)(_params, _requiredParams, _validParams);
1659
+ if (_validationErrors) {
1660
+ return Promise.reject(_validationErrors);
1577
1661
  }
1578
1662
  var query = {
1579
1663
  'attachments': _params.attachments,
@@ -1644,10 +1728,11 @@ var CloudantV1 = /** @class */ (function (_super) {
1644
1728
  */
1645
1729
  CloudantV1.prototype.getDocumentAsRelated = function (params) {
1646
1730
  var _params = __assign({}, params);
1647
- var requiredParams = ['db', 'docId'];
1648
- var missingParams = (0, ibm_cloud_sdk_core_1.getMissingParams)(_params, requiredParams);
1649
- if (missingParams) {
1650
- return Promise.reject(missingParams);
1731
+ var _requiredParams = ['db', 'docId'];
1732
+ var _validParams = ['db', 'docId', 'ifNoneMatch', 'attachments', 'attEncodingInfo', 'conflicts', 'deletedConflicts', 'latest', 'localSeq', 'meta', 'rev', 'revs', 'revsInfo', 'headers'];
1733
+ var _validationErrors = (0, ibm_cloud_sdk_core_1.validateParams)(_params, _requiredParams, _validParams);
1734
+ if (_validationErrors) {
1735
+ return Promise.reject(_validationErrors);
1651
1736
  }
1652
1737
  var query = {
1653
1738
  'attachments': _params.attachments,
@@ -1718,10 +1803,11 @@ var CloudantV1 = /** @class */ (function (_super) {
1718
1803
  */
1719
1804
  CloudantV1.prototype.getDocumentAsStream = function (params) {
1720
1805
  var _params = __assign({}, params);
1721
- var requiredParams = ['db', 'docId'];
1722
- var missingParams = (0, ibm_cloud_sdk_core_1.getMissingParams)(_params, requiredParams);
1723
- if (missingParams) {
1724
- return Promise.reject(missingParams);
1806
+ var _requiredParams = ['db', 'docId'];
1807
+ var _validParams = ['db', 'docId', 'ifNoneMatch', 'attachments', 'attEncodingInfo', 'conflicts', 'deletedConflicts', 'latest', 'localSeq', 'meta', 'rev', 'revs', 'revsInfo', 'headers'];
1808
+ var _validationErrors = (0, ibm_cloud_sdk_core_1.validateParams)(_params, _requiredParams, _validParams);
1809
+ if (_validationErrors) {
1810
+ return Promise.reject(_validationErrors);
1725
1811
  }
1726
1812
  var query = {
1727
1813
  'attachments': _params.attachments,
@@ -1760,8 +1846,11 @@ var CloudantV1 = /** @class */ (function (_super) {
1760
1846
  /**
1761
1847
  * Create or modify a document.
1762
1848
  *
1763
- * The PUT method creates a new named document, or creates a new revision of the existing document. Unlike the `POST
1764
- * /{db}` request, you must specify the document ID in the request URL.
1849
+ * Creates or modifies a document in the specified database.
1850
+ *
1851
+ * For creation, you must specify the document ID but you should not specify the revision.
1852
+ *
1853
+ * For modification, you must specify the document ID and a revision identifier.
1765
1854
  *
1766
1855
  * @param {Object} params - The parameters to send to the service.
1767
1856
  * @param {string} params.db - Path parameter to specify the database name.
@@ -1781,10 +1870,11 @@ var CloudantV1 = /** @class */ (function (_super) {
1781
1870
  */
1782
1871
  CloudantV1.prototype.putDocument = function (params) {
1783
1872
  var _params = __assign({}, params);
1784
- var requiredParams = ['db', 'docId', 'document'];
1785
- var missingParams = (0, ibm_cloud_sdk_core_1.getMissingParams)(_params, requiredParams);
1786
- if (missingParams) {
1787
- return Promise.reject(missingParams);
1873
+ var _requiredParams = ['db', 'docId', 'document'];
1874
+ var _validParams = ['db', 'docId', 'document', 'contentType', 'ifMatch', 'batch', 'newEdits', 'rev', 'headers'];
1875
+ var _validationErrors = (0, ibm_cloud_sdk_core_1.validateParams)(_params, _requiredParams, _validParams);
1876
+ if (_validationErrors) {
1877
+ return Promise.reject(_validationErrors);
1788
1878
  }
1789
1879
  var body = _params.document;
1790
1880
  var query = {
@@ -1838,10 +1928,11 @@ var CloudantV1 = /** @class */ (function (_super) {
1838
1928
  */
1839
1929
  CloudantV1.prototype.headDesignDocument = function (params) {
1840
1930
  var _params = __assign({}, params);
1841
- var requiredParams = ['db', 'ddoc'];
1842
- var missingParams = (0, ibm_cloud_sdk_core_1.getMissingParams)(_params, requiredParams);
1843
- if (missingParams) {
1844
- return Promise.reject(missingParams);
1931
+ var _requiredParams = ['db', 'ddoc'];
1932
+ var _validParams = ['db', 'ddoc', 'ifNoneMatch', 'headers'];
1933
+ var _validationErrors = (0, ibm_cloud_sdk_core_1.validateParams)(_params, _requiredParams, _validParams);
1934
+ if (_validationErrors) {
1935
+ return Promise.reject(_validationErrors);
1845
1936
  }
1846
1937
  var path = {
1847
1938
  'db': _params.db,
@@ -1883,10 +1974,11 @@ var CloudantV1 = /** @class */ (function (_super) {
1883
1974
  */
1884
1975
  CloudantV1.prototype.deleteDesignDocument = function (params) {
1885
1976
  var _params = __assign({}, params);
1886
- var requiredParams = ['db', 'ddoc'];
1887
- var missingParams = (0, ibm_cloud_sdk_core_1.getMissingParams)(_params, requiredParams);
1888
- if (missingParams) {
1889
- return Promise.reject(missingParams);
1977
+ var _requiredParams = ['db', 'ddoc'];
1978
+ var _validParams = ['db', 'ddoc', 'ifMatch', 'batch', 'rev', 'headers'];
1979
+ var _validationErrors = (0, ibm_cloud_sdk_core_1.validateParams)(_params, _requiredParams, _validParams);
1980
+ if (_validationErrors) {
1981
+ return Promise.reject(_validationErrors);
1890
1982
  }
1891
1983
  var query = {
1892
1984
  'batch': _params.batch,
@@ -1949,10 +2041,11 @@ var CloudantV1 = /** @class */ (function (_super) {
1949
2041
  */
1950
2042
  CloudantV1.prototype.getDesignDocument = function (params) {
1951
2043
  var _params = __assign({}, params);
1952
- var requiredParams = ['db', 'ddoc'];
1953
- var missingParams = (0, ibm_cloud_sdk_core_1.getMissingParams)(_params, requiredParams);
1954
- if (missingParams) {
1955
- return Promise.reject(missingParams);
2044
+ var _requiredParams = ['db', 'ddoc'];
2045
+ var _validParams = ['db', 'ddoc', 'ifNoneMatch', 'attachments', 'attEncodingInfo', 'conflicts', 'deletedConflicts', 'latest', 'localSeq', 'meta', 'rev', 'revs', 'revsInfo', 'headers'];
2046
+ var _validationErrors = (0, ibm_cloud_sdk_core_1.validateParams)(_params, _requiredParams, _validParams);
2047
+ if (_validationErrors) {
2048
+ return Promise.reject(_validationErrors);
1956
2049
  }
1957
2050
  var query = {
1958
2051
  'attachments': _params.attachments,
@@ -2010,10 +2103,11 @@ var CloudantV1 = /** @class */ (function (_super) {
2010
2103
  */
2011
2104
  CloudantV1.prototype.putDesignDocument = function (params) {
2012
2105
  var _params = __assign({}, params);
2013
- var requiredParams = ['db', 'ddoc', 'designDocument'];
2014
- var missingParams = (0, ibm_cloud_sdk_core_1.getMissingParams)(_params, requiredParams);
2015
- if (missingParams) {
2016
- return Promise.reject(missingParams);
2106
+ var _requiredParams = ['db', 'ddoc', 'designDocument'];
2107
+ var _validParams = ['db', 'ddoc', 'designDocument', 'ifMatch', 'batch', 'newEdits', 'rev', 'headers'];
2108
+ var _validationErrors = (0, ibm_cloud_sdk_core_1.validateParams)(_params, _requiredParams, _validParams);
2109
+ if (_validationErrors) {
2110
+ return Promise.reject(_validationErrors);
2017
2111
  }
2018
2112
  var body = _params.designDocument;
2019
2113
  var query = {
@@ -2059,10 +2153,11 @@ var CloudantV1 = /** @class */ (function (_super) {
2059
2153
  */
2060
2154
  CloudantV1.prototype.getDesignDocumentInformation = function (params) {
2061
2155
  var _params = __assign({}, params);
2062
- var requiredParams = ['db', 'ddoc'];
2063
- var missingParams = (0, ibm_cloud_sdk_core_1.getMissingParams)(_params, requiredParams);
2064
- if (missingParams) {
2065
- return Promise.reject(missingParams);
2156
+ var _requiredParams = ['db', 'ddoc'];
2157
+ var _validParams = ['db', 'ddoc', 'headers'];
2158
+ var _validationErrors = (0, ibm_cloud_sdk_core_1.validateParams)(_params, _requiredParams, _validParams);
2159
+ if (_validationErrors) {
2160
+ return Promise.reject(_validationErrors);
2066
2161
  }
2067
2162
  var path = {
2068
2163
  'db': _params.db,
@@ -2108,20 +2203,21 @@ var CloudantV1 = /** @class */ (function (_super) {
2108
2203
  * @param {number} [params.skip] - Parameter to specify the number of records before starting to return the results.
2109
2204
  * @param {boolean} [params.updateSeq] - Parameter to specify whether to include in the response an update_seq value
2110
2205
  * indicating the sequence id of the database the view reflects.
2111
- * @param {string} [params.endkey] - Schema for a document ID.
2206
+ * @param {string} [params.endKey] - Schema for a document ID.
2112
2207
  * @param {string} [params.key] - Schema for a document ID.
2113
2208
  * @param {string[]} [params.keys] - Schema for a list of document IDs.
2114
- * @param {string} [params.startkey] - Schema for a document ID.
2209
+ * @param {string} [params.startKey] - Schema for a document ID.
2115
2210
  * @param {string} [params.accept] - The type of the response: application/json or application/octet-stream.
2116
2211
  * @param {OutgoingHttpHeaders} [params.headers] - Custom request headers
2117
2212
  * @returns {Promise<CloudantV1.Response<CloudantV1.AllDocsResult>>}
2118
2213
  */
2119
2214
  CloudantV1.prototype.postDesignDocs = function (params) {
2120
2215
  var _params = __assign({}, params);
2121
- var requiredParams = ['db'];
2122
- var missingParams = (0, ibm_cloud_sdk_core_1.getMissingParams)(_params, requiredParams);
2123
- if (missingParams) {
2124
- return Promise.reject(missingParams);
2216
+ var _requiredParams = ['db'];
2217
+ var _validParams = ['db', 'attEncodingInfo', 'attachments', 'conflicts', 'descending', 'includeDocs', 'inclusiveEnd', 'limit', 'skip', 'updateSeq', 'endKey', 'key', 'keys', 'startKey', 'accept', 'headers'];
2218
+ var _validationErrors = (0, ibm_cloud_sdk_core_1.validateParams)(_params, _requiredParams, _validParams);
2219
+ if (_validationErrors) {
2220
+ return Promise.reject(_validationErrors);
2125
2221
  }
2126
2222
  var body = {
2127
2223
  'att_encoding_info': _params.attEncodingInfo,
@@ -2133,10 +2229,10 @@ var CloudantV1 = /** @class */ (function (_super) {
2133
2229
  'limit': _params.limit,
2134
2230
  'skip': _params.skip,
2135
2231
  'update_seq': _params.updateSeq,
2136
- 'endkey': _params.endkey,
2232
+ 'end_key': _params.endKey,
2137
2233
  'key': _params.key,
2138
2234
  'keys': _params.keys,
2139
- 'startkey': _params.startkey,
2235
+ 'start_key': _params.startKey,
2140
2236
  };
2141
2237
  var path = {
2142
2238
  'db': _params.db,
@@ -2175,10 +2271,11 @@ var CloudantV1 = /** @class */ (function (_super) {
2175
2271
  */
2176
2272
  CloudantV1.prototype.postDesignDocsQueries = function (params) {
2177
2273
  var _params = __assign({}, params);
2178
- var requiredParams = ['db', 'queries'];
2179
- var missingParams = (0, ibm_cloud_sdk_core_1.getMissingParams)(_params, requiredParams);
2180
- if (missingParams) {
2181
- return Promise.reject(missingParams);
2274
+ var _requiredParams = ['db', 'queries'];
2275
+ var _validParams = ['db', 'queries', 'accept', 'headers'];
2276
+ var _validationErrors = (0, ibm_cloud_sdk_core_1.validateParams)(_params, _requiredParams, _validParams);
2277
+ if (_validationErrors) {
2278
+ return Promise.reject(_validationErrors);
2182
2279
  }
2183
2280
  var body = {
2184
2281
  'queries': _params.queries,
@@ -2234,8 +2331,8 @@ var CloudantV1 = /** @class */ (function (_super) {
2234
2331
  * @param {number} [params.skip] - Parameter to specify the number of records before starting to return the results.
2235
2332
  * @param {boolean} [params.updateSeq] - Parameter to specify whether to include in the response an update_seq value
2236
2333
  * indicating the sequence id of the database the view reflects.
2237
- * @param {any} [params.endkey] - Schema for any JSON type.
2238
- * @param {string} [params.endkeyDocid] - Schema for a document ID.
2334
+ * @param {any} [params.endKey] - Schema for any JSON type.
2335
+ * @param {string} [params.endKeyDocId] - Schema for a document ID.
2239
2336
  * @param {boolean} [params.group] - Parameter to specify whether to group the results using the reduce function to a
2240
2337
  * group rather than a single row. Implies reduce is true and the maximum group_level.
2241
2338
  * @param {number} [params.groupLevel] - Parameter to specify the group level to be used. Implies group is true.
@@ -2246,8 +2343,8 @@ var CloudantV1 = /** @class */ (function (_super) {
2246
2343
  * Default is true when a reduce function is defined.
2247
2344
  * @param {boolean} [params.stable] - Parameter to specify whether view results should be returned from a stable set
2248
2345
  * of shards.
2249
- * @param {any} [params.startkey] - Schema for any JSON type.
2250
- * @param {string} [params.startkeyDocid] - Schema for a document ID.
2346
+ * @param {any} [params.startKey] - Schema for any JSON type.
2347
+ * @param {string} [params.startKeyDocId] - Schema for a document ID.
2251
2348
  * @param {string} [params.update] - Parameter to specify whether or not the view in question should be updated prior
2252
2349
  * to responding to the user.
2253
2350
  * @param {OutgoingHttpHeaders} [params.headers] - Custom request headers
@@ -2255,10 +2352,11 @@ var CloudantV1 = /** @class */ (function (_super) {
2255
2352
  */
2256
2353
  CloudantV1.prototype.postView = function (params) {
2257
2354
  var _params = __assign({}, params);
2258
- var requiredParams = ['db', 'ddoc', 'view'];
2259
- var missingParams = (0, ibm_cloud_sdk_core_1.getMissingParams)(_params, requiredParams);
2260
- if (missingParams) {
2261
- return Promise.reject(missingParams);
2355
+ var _requiredParams = ['db', 'ddoc', 'view'];
2356
+ var _validParams = ['db', 'ddoc', 'view', 'attEncodingInfo', 'attachments', 'conflicts', 'descending', 'includeDocs', 'inclusiveEnd', 'limit', 'skip', 'updateSeq', 'endKey', 'endKeyDocId', 'group', 'groupLevel', 'key', 'keys', 'reduce', 'stable', 'startKey', 'startKeyDocId', 'update', 'headers'];
2357
+ var _validationErrors = (0, ibm_cloud_sdk_core_1.validateParams)(_params, _requiredParams, _validParams);
2358
+ if (_validationErrors) {
2359
+ return Promise.reject(_validationErrors);
2262
2360
  }
2263
2361
  var body = {
2264
2362
  'att_encoding_info': _params.attEncodingInfo,
@@ -2270,16 +2368,16 @@ var CloudantV1 = /** @class */ (function (_super) {
2270
2368
  'limit': _params.limit,
2271
2369
  'skip': _params.skip,
2272
2370
  'update_seq': _params.updateSeq,
2273
- 'endkey': _params.endkey,
2274
- 'endkey_docid': _params.endkeyDocid,
2371
+ 'end_key': _params.endKey,
2372
+ 'end_key_doc_id': _params.endKeyDocId,
2275
2373
  'group': _params.group,
2276
2374
  'group_level': _params.groupLevel,
2277
2375
  'key': _params.key,
2278
2376
  'keys': _params.keys,
2279
2377
  'reduce': _params.reduce,
2280
2378
  'stable': _params.stable,
2281
- 'startkey': _params.startkey,
2282
- 'startkey_docid': _params.startkeyDocid,
2379
+ 'start_key': _params.startKey,
2380
+ 'start_key_doc_id': _params.startKeyDocId,
2283
2381
  'update': _params.update,
2284
2382
  };
2285
2383
  var path = {
@@ -2332,8 +2430,8 @@ var CloudantV1 = /** @class */ (function (_super) {
2332
2430
  * @param {number} [params.skip] - Parameter to specify the number of records before starting to return the results.
2333
2431
  * @param {boolean} [params.updateSeq] - Parameter to specify whether to include in the response an update_seq value
2334
2432
  * indicating the sequence id of the database the view reflects.
2335
- * @param {any} [params.endkey] - Schema for any JSON type.
2336
- * @param {string} [params.endkeyDocid] - Schema for a document ID.
2433
+ * @param {any} [params.endKey] - Schema for any JSON type.
2434
+ * @param {string} [params.endKeyDocId] - Schema for a document ID.
2337
2435
  * @param {boolean} [params.group] - Parameter to specify whether to group the results using the reduce function to a
2338
2436
  * group rather than a single row. Implies reduce is true and the maximum group_level.
2339
2437
  * @param {number} [params.groupLevel] - Parameter to specify the group level to be used. Implies group is true.
@@ -2344,8 +2442,8 @@ var CloudantV1 = /** @class */ (function (_super) {
2344
2442
  * Default is true when a reduce function is defined.
2345
2443
  * @param {boolean} [params.stable] - Parameter to specify whether view results should be returned from a stable set
2346
2444
  * of shards.
2347
- * @param {any} [params.startkey] - Schema for any JSON type.
2348
- * @param {string} [params.startkeyDocid] - Schema for a document ID.
2445
+ * @param {any} [params.startKey] - Schema for any JSON type.
2446
+ * @param {string} [params.startKeyDocId] - Schema for a document ID.
2349
2447
  * @param {string} [params.update] - Parameter to specify whether or not the view in question should be updated prior
2350
2448
  * to responding to the user.
2351
2449
  * @param {OutgoingHttpHeaders} [params.headers] - Custom request headers
@@ -2353,10 +2451,11 @@ var CloudantV1 = /** @class */ (function (_super) {
2353
2451
  */
2354
2452
  CloudantV1.prototype.postViewAsStream = function (params) {
2355
2453
  var _params = __assign({}, params);
2356
- var requiredParams = ['db', 'ddoc', 'view'];
2357
- var missingParams = (0, ibm_cloud_sdk_core_1.getMissingParams)(_params, requiredParams);
2358
- if (missingParams) {
2359
- return Promise.reject(missingParams);
2454
+ var _requiredParams = ['db', 'ddoc', 'view'];
2455
+ var _validParams = ['db', 'ddoc', 'view', 'attEncodingInfo', 'attachments', 'conflicts', 'descending', 'includeDocs', 'inclusiveEnd', 'limit', 'skip', 'updateSeq', 'endKey', 'endKeyDocId', 'group', 'groupLevel', 'key', 'keys', 'reduce', 'stable', 'startKey', 'startKeyDocId', 'update', 'headers'];
2456
+ var _validationErrors = (0, ibm_cloud_sdk_core_1.validateParams)(_params, _requiredParams, _validParams);
2457
+ if (_validationErrors) {
2458
+ return Promise.reject(_validationErrors);
2360
2459
  }
2361
2460
  var body = {
2362
2461
  'att_encoding_info': _params.attEncodingInfo,
@@ -2368,16 +2467,16 @@ var CloudantV1 = /** @class */ (function (_super) {
2368
2467
  'limit': _params.limit,
2369
2468
  'skip': _params.skip,
2370
2469
  'update_seq': _params.updateSeq,
2371
- 'endkey': _params.endkey,
2372
- 'endkey_docid': _params.endkeyDocid,
2470
+ 'end_key': _params.endKey,
2471
+ 'end_key_doc_id': _params.endKeyDocId,
2373
2472
  'group': _params.group,
2374
2473
  'group_level': _params.groupLevel,
2375
2474
  'key': _params.key,
2376
2475
  'keys': _params.keys,
2377
2476
  'reduce': _params.reduce,
2378
2477
  'stable': _params.stable,
2379
- 'startkey': _params.startkey,
2380
- 'startkey_docid': _params.startkeyDocid,
2478
+ 'start_key': _params.startKey,
2479
+ 'start_key_doc_id': _params.startKeyDocId,
2381
2480
  'update': _params.update,
2382
2481
  };
2383
2482
  var path = {
@@ -2421,10 +2520,11 @@ var CloudantV1 = /** @class */ (function (_super) {
2421
2520
  */
2422
2521
  CloudantV1.prototype.postViewQueries = function (params) {
2423
2522
  var _params = __assign({}, params);
2424
- var requiredParams = ['db', 'ddoc', 'view', 'queries'];
2425
- var missingParams = (0, ibm_cloud_sdk_core_1.getMissingParams)(_params, requiredParams);
2426
- if (missingParams) {
2427
- return Promise.reject(missingParams);
2523
+ var _requiredParams = ['db', 'ddoc', 'view', 'queries'];
2524
+ var _validParams = ['db', 'ddoc', 'view', 'queries', 'headers'];
2525
+ var _validationErrors = (0, ibm_cloud_sdk_core_1.validateParams)(_params, _requiredParams, _validParams);
2526
+ if (_validationErrors) {
2527
+ return Promise.reject(_validationErrors);
2428
2528
  }
2429
2529
  var body = {
2430
2530
  'queries': _params.queries,
@@ -2469,10 +2569,11 @@ var CloudantV1 = /** @class */ (function (_super) {
2469
2569
  */
2470
2570
  CloudantV1.prototype.postViewQueriesAsStream = function (params) {
2471
2571
  var _params = __assign({}, params);
2472
- var requiredParams = ['db', 'ddoc', 'view', 'queries'];
2473
- var missingParams = (0, ibm_cloud_sdk_core_1.getMissingParams)(_params, requiredParams);
2474
- if (missingParams) {
2475
- return Promise.reject(missingParams);
2572
+ var _requiredParams = ['db', 'ddoc', 'view', 'queries'];
2573
+ var _validParams = ['db', 'ddoc', 'view', 'queries', 'headers'];
2574
+ var _validationErrors = (0, ibm_cloud_sdk_core_1.validateParams)(_params, _requiredParams, _validParams);
2575
+ if (_validationErrors) {
2576
+ return Promise.reject(_validationErrors);
2476
2577
  }
2477
2578
  var body = {
2478
2579
  'queries': _params.queries,
@@ -2516,10 +2617,11 @@ var CloudantV1 = /** @class */ (function (_super) {
2516
2617
  */
2517
2618
  CloudantV1.prototype.getPartitionInformation = function (params) {
2518
2619
  var _params = __assign({}, params);
2519
- var requiredParams = ['db', 'partitionKey'];
2520
- var missingParams = (0, ibm_cloud_sdk_core_1.getMissingParams)(_params, requiredParams);
2521
- if (missingParams) {
2522
- return Promise.reject(missingParams);
2620
+ var _requiredParams = ['db', 'partitionKey'];
2621
+ var _validParams = ['db', 'partitionKey', 'headers'];
2622
+ var _validationErrors = (0, ibm_cloud_sdk_core_1.validateParams)(_params, _requiredParams, _validParams);
2623
+ if (_validationErrors) {
2624
+ return Promise.reject(_validationErrors);
2523
2625
  }
2524
2626
  var path = {
2525
2627
  'db': _params.db,
@@ -2566,19 +2668,20 @@ var CloudantV1 = /** @class */ (function (_super) {
2566
2668
  * @param {number} [params.skip] - Parameter to specify the number of records before starting to return the results.
2567
2669
  * @param {boolean} [params.updateSeq] - Parameter to specify whether to include in the response an update_seq value
2568
2670
  * indicating the sequence id of the database the view reflects.
2569
- * @param {string} [params.endkey] - Schema for a document ID.
2671
+ * @param {string} [params.endKey] - Schema for a document ID.
2570
2672
  * @param {string} [params.key] - Schema for a document ID.
2571
2673
  * @param {string[]} [params.keys] - Schema for a list of document IDs.
2572
- * @param {string} [params.startkey] - Schema for a document ID.
2674
+ * @param {string} [params.startKey] - Schema for a document ID.
2573
2675
  * @param {OutgoingHttpHeaders} [params.headers] - Custom request headers
2574
2676
  * @returns {Promise<CloudantV1.Response<CloudantV1.AllDocsResult>>}
2575
2677
  */
2576
2678
  CloudantV1.prototype.postPartitionAllDocs = function (params) {
2577
2679
  var _params = __assign({}, params);
2578
- var requiredParams = ['db', 'partitionKey'];
2579
- var missingParams = (0, ibm_cloud_sdk_core_1.getMissingParams)(_params, requiredParams);
2580
- if (missingParams) {
2581
- return Promise.reject(missingParams);
2680
+ var _requiredParams = ['db', 'partitionKey'];
2681
+ var _validParams = ['db', 'partitionKey', 'attEncodingInfo', 'attachments', 'conflicts', 'descending', 'includeDocs', 'inclusiveEnd', 'limit', 'skip', 'updateSeq', 'endKey', 'key', 'keys', 'startKey', 'headers'];
2682
+ var _validationErrors = (0, ibm_cloud_sdk_core_1.validateParams)(_params, _requiredParams, _validParams);
2683
+ if (_validationErrors) {
2684
+ return Promise.reject(_validationErrors);
2582
2685
  }
2583
2686
  var body = {
2584
2687
  'att_encoding_info': _params.attEncodingInfo,
@@ -2590,10 +2693,10 @@ var CloudantV1 = /** @class */ (function (_super) {
2590
2693
  'limit': _params.limit,
2591
2694
  'skip': _params.skip,
2592
2695
  'update_seq': _params.updateSeq,
2593
- 'endkey': _params.endkey,
2696
+ 'end_key': _params.endKey,
2594
2697
  'key': _params.key,
2595
2698
  'keys': _params.keys,
2596
- 'startkey': _params.startkey,
2699
+ 'start_key': _params.startKey,
2597
2700
  };
2598
2701
  var path = {
2599
2702
  'db': _params.db,
@@ -2642,19 +2745,20 @@ var CloudantV1 = /** @class */ (function (_super) {
2642
2745
  * @param {number} [params.skip] - Parameter to specify the number of records before starting to return the results.
2643
2746
  * @param {boolean} [params.updateSeq] - Parameter to specify whether to include in the response an update_seq value
2644
2747
  * indicating the sequence id of the database the view reflects.
2645
- * @param {string} [params.endkey] - Schema for a document ID.
2748
+ * @param {string} [params.endKey] - Schema for a document ID.
2646
2749
  * @param {string} [params.key] - Schema for a document ID.
2647
2750
  * @param {string[]} [params.keys] - Schema for a list of document IDs.
2648
- * @param {string} [params.startkey] - Schema for a document ID.
2751
+ * @param {string} [params.startKey] - Schema for a document ID.
2649
2752
  * @param {OutgoingHttpHeaders} [params.headers] - Custom request headers
2650
2753
  * @returns {Promise<CloudantV1.Response<NodeJS.ReadableStream>>}
2651
2754
  */
2652
2755
  CloudantV1.prototype.postPartitionAllDocsAsStream = function (params) {
2653
2756
  var _params = __assign({}, params);
2654
- var requiredParams = ['db', 'partitionKey'];
2655
- var missingParams = (0, ibm_cloud_sdk_core_1.getMissingParams)(_params, requiredParams);
2656
- if (missingParams) {
2657
- return Promise.reject(missingParams);
2757
+ var _requiredParams = ['db', 'partitionKey'];
2758
+ var _validParams = ['db', 'partitionKey', 'attEncodingInfo', 'attachments', 'conflicts', 'descending', 'includeDocs', 'inclusiveEnd', 'limit', 'skip', 'updateSeq', 'endKey', 'key', 'keys', 'startKey', 'headers'];
2759
+ var _validationErrors = (0, ibm_cloud_sdk_core_1.validateParams)(_params, _requiredParams, _validParams);
2760
+ if (_validationErrors) {
2761
+ return Promise.reject(_validationErrors);
2658
2762
  }
2659
2763
  var body = {
2660
2764
  'att_encoding_info': _params.attEncodingInfo,
@@ -2666,10 +2770,10 @@ var CloudantV1 = /** @class */ (function (_super) {
2666
2770
  'limit': _params.limit,
2667
2771
  'skip': _params.skip,
2668
2772
  'update_seq': _params.updateSeq,
2669
- 'endkey': _params.endkey,
2773
+ 'end_key': _params.endKey,
2670
2774
  'key': _params.key,
2671
2775
  'keys': _params.keys,
2672
- 'startkey': _params.startkey,
2776
+ 'start_key': _params.startKey,
2673
2777
  };
2674
2778
  var path = {
2675
2779
  'db': _params.db,
@@ -2734,10 +2838,11 @@ var CloudantV1 = /** @class */ (function (_super) {
2734
2838
  */
2735
2839
  CloudantV1.prototype.postPartitionSearch = function (params) {
2736
2840
  var _params = __assign({}, params);
2737
- var requiredParams = ['db', 'partitionKey', 'ddoc', 'index', 'query'];
2738
- var missingParams = (0, ibm_cloud_sdk_core_1.getMissingParams)(_params, requiredParams);
2739
- if (missingParams) {
2740
- return Promise.reject(missingParams);
2841
+ var _requiredParams = ['db', 'partitionKey', 'ddoc', 'index', 'query'];
2842
+ var _validParams = ['db', 'partitionKey', 'ddoc', 'index', 'query', 'bookmark', 'highlightFields', 'highlightNumber', 'highlightPostTag', 'highlightPreTag', 'highlightSize', 'includeDocs', 'includeFields', 'limit', 'sort', 'stale', 'headers'];
2843
+ var _validationErrors = (0, ibm_cloud_sdk_core_1.validateParams)(_params, _requiredParams, _validParams);
2844
+ if (_validationErrors) {
2845
+ return Promise.reject(_validationErrors);
2741
2846
  }
2742
2847
  var body = {
2743
2848
  'query': _params.query,
@@ -2817,10 +2922,11 @@ var CloudantV1 = /** @class */ (function (_super) {
2817
2922
  */
2818
2923
  CloudantV1.prototype.postPartitionSearchAsStream = function (params) {
2819
2924
  var _params = __assign({}, params);
2820
- var requiredParams = ['db', 'partitionKey', 'ddoc', 'index', 'query'];
2821
- var missingParams = (0, ibm_cloud_sdk_core_1.getMissingParams)(_params, requiredParams);
2822
- if (missingParams) {
2823
- return Promise.reject(missingParams);
2925
+ var _requiredParams = ['db', 'partitionKey', 'ddoc', 'index', 'query'];
2926
+ var _validParams = ['db', 'partitionKey', 'ddoc', 'index', 'query', 'bookmark', 'highlightFields', 'highlightNumber', 'highlightPostTag', 'highlightPreTag', 'highlightSize', 'includeDocs', 'includeFields', 'limit', 'sort', 'stale', 'headers'];
2927
+ var _validationErrors = (0, ibm_cloud_sdk_core_1.validateParams)(_params, _requiredParams, _validParams);
2928
+ if (_validationErrors) {
2929
+ return Promise.reject(_validationErrors);
2824
2930
  }
2825
2931
  var body = {
2826
2932
  'query': _params.query,
@@ -2889,8 +2995,8 @@ var CloudantV1 = /** @class */ (function (_super) {
2889
2995
  * @param {number} [params.skip] - Parameter to specify the number of records before starting to return the results.
2890
2996
  * @param {boolean} [params.updateSeq] - Parameter to specify whether to include in the response an update_seq value
2891
2997
  * indicating the sequence id of the database the view reflects.
2892
- * @param {any} [params.endkey] - Schema for any JSON type.
2893
- * @param {string} [params.endkeyDocid] - Schema for a document ID.
2998
+ * @param {any} [params.endKey] - Schema for any JSON type.
2999
+ * @param {string} [params.endKeyDocId] - Schema for a document ID.
2894
3000
  * @param {boolean} [params.group] - Parameter to specify whether to group the results using the reduce function to a
2895
3001
  * group rather than a single row. Implies reduce is true and the maximum group_level.
2896
3002
  * @param {number} [params.groupLevel] - Parameter to specify the group level to be used. Implies group is true.
@@ -2901,8 +3007,8 @@ var CloudantV1 = /** @class */ (function (_super) {
2901
3007
  * Default is true when a reduce function is defined.
2902
3008
  * @param {boolean} [params.stable] - Parameter to specify whether view results should be returned from a stable set
2903
3009
  * of shards.
2904
- * @param {any} [params.startkey] - Schema for any JSON type.
2905
- * @param {string} [params.startkeyDocid] - Schema for a document ID.
3010
+ * @param {any} [params.startKey] - Schema for any JSON type.
3011
+ * @param {string} [params.startKeyDocId] - Schema for a document ID.
2906
3012
  * @param {string} [params.update] - Parameter to specify whether or not the view in question should be updated prior
2907
3013
  * to responding to the user.
2908
3014
  * @param {OutgoingHttpHeaders} [params.headers] - Custom request headers
@@ -2910,10 +3016,11 @@ var CloudantV1 = /** @class */ (function (_super) {
2910
3016
  */
2911
3017
  CloudantV1.prototype.postPartitionView = function (params) {
2912
3018
  var _params = __assign({}, params);
2913
- var requiredParams = ['db', 'partitionKey', 'ddoc', 'view'];
2914
- var missingParams = (0, ibm_cloud_sdk_core_1.getMissingParams)(_params, requiredParams);
2915
- if (missingParams) {
2916
- return Promise.reject(missingParams);
3019
+ var _requiredParams = ['db', 'partitionKey', 'ddoc', 'view'];
3020
+ var _validParams = ['db', 'partitionKey', 'ddoc', 'view', 'attEncodingInfo', 'attachments', 'conflicts', 'descending', 'includeDocs', 'inclusiveEnd', 'limit', 'skip', 'updateSeq', 'endKey', 'endKeyDocId', 'group', 'groupLevel', 'key', 'keys', 'reduce', 'stable', 'startKey', 'startKeyDocId', 'update', 'headers'];
3021
+ var _validationErrors = (0, ibm_cloud_sdk_core_1.validateParams)(_params, _requiredParams, _validParams);
3022
+ if (_validationErrors) {
3023
+ return Promise.reject(_validationErrors);
2917
3024
  }
2918
3025
  var body = {
2919
3026
  'att_encoding_info': _params.attEncodingInfo,
@@ -2925,16 +3032,16 @@ var CloudantV1 = /** @class */ (function (_super) {
2925
3032
  'limit': _params.limit,
2926
3033
  'skip': _params.skip,
2927
3034
  'update_seq': _params.updateSeq,
2928
- 'endkey': _params.endkey,
2929
- 'endkey_docid': _params.endkeyDocid,
3035
+ 'end_key': _params.endKey,
3036
+ 'end_key_doc_id': _params.endKeyDocId,
2930
3037
  'group': _params.group,
2931
3038
  'group_level': _params.groupLevel,
2932
3039
  'key': _params.key,
2933
3040
  'keys': _params.keys,
2934
3041
  'reduce': _params.reduce,
2935
3042
  'stable': _params.stable,
2936
- 'startkey': _params.startkey,
2937
- 'startkey_docid': _params.startkeyDocid,
3043
+ 'start_key': _params.startKey,
3044
+ 'start_key_doc_id': _params.startKeyDocId,
2938
3045
  'update': _params.update,
2939
3046
  };
2940
3047
  var path = {
@@ -2989,8 +3096,8 @@ var CloudantV1 = /** @class */ (function (_super) {
2989
3096
  * @param {number} [params.skip] - Parameter to specify the number of records before starting to return the results.
2990
3097
  * @param {boolean} [params.updateSeq] - Parameter to specify whether to include in the response an update_seq value
2991
3098
  * indicating the sequence id of the database the view reflects.
2992
- * @param {any} [params.endkey] - Schema for any JSON type.
2993
- * @param {string} [params.endkeyDocid] - Schema for a document ID.
3099
+ * @param {any} [params.endKey] - Schema for any JSON type.
3100
+ * @param {string} [params.endKeyDocId] - Schema for a document ID.
2994
3101
  * @param {boolean} [params.group] - Parameter to specify whether to group the results using the reduce function to a
2995
3102
  * group rather than a single row. Implies reduce is true and the maximum group_level.
2996
3103
  * @param {number} [params.groupLevel] - Parameter to specify the group level to be used. Implies group is true.
@@ -3001,8 +3108,8 @@ var CloudantV1 = /** @class */ (function (_super) {
3001
3108
  * Default is true when a reduce function is defined.
3002
3109
  * @param {boolean} [params.stable] - Parameter to specify whether view results should be returned from a stable set
3003
3110
  * of shards.
3004
- * @param {any} [params.startkey] - Schema for any JSON type.
3005
- * @param {string} [params.startkeyDocid] - Schema for a document ID.
3111
+ * @param {any} [params.startKey] - Schema for any JSON type.
3112
+ * @param {string} [params.startKeyDocId] - Schema for a document ID.
3006
3113
  * @param {string} [params.update] - Parameter to specify whether or not the view in question should be updated prior
3007
3114
  * to responding to the user.
3008
3115
  * @param {OutgoingHttpHeaders} [params.headers] - Custom request headers
@@ -3010,10 +3117,11 @@ var CloudantV1 = /** @class */ (function (_super) {
3010
3117
  */
3011
3118
  CloudantV1.prototype.postPartitionViewAsStream = function (params) {
3012
3119
  var _params = __assign({}, params);
3013
- var requiredParams = ['db', 'partitionKey', 'ddoc', 'view'];
3014
- var missingParams = (0, ibm_cloud_sdk_core_1.getMissingParams)(_params, requiredParams);
3015
- if (missingParams) {
3016
- return Promise.reject(missingParams);
3120
+ var _requiredParams = ['db', 'partitionKey', 'ddoc', 'view'];
3121
+ var _validParams = ['db', 'partitionKey', 'ddoc', 'view', 'attEncodingInfo', 'attachments', 'conflicts', 'descending', 'includeDocs', 'inclusiveEnd', 'limit', 'skip', 'updateSeq', 'endKey', 'endKeyDocId', 'group', 'groupLevel', 'key', 'keys', 'reduce', 'stable', 'startKey', 'startKeyDocId', 'update', 'headers'];
3122
+ var _validationErrors = (0, ibm_cloud_sdk_core_1.validateParams)(_params, _requiredParams, _validParams);
3123
+ if (_validationErrors) {
3124
+ return Promise.reject(_validationErrors);
3017
3125
  }
3018
3126
  var body = {
3019
3127
  'att_encoding_info': _params.attEncodingInfo,
@@ -3025,16 +3133,16 @@ var CloudantV1 = /** @class */ (function (_super) {
3025
3133
  'limit': _params.limit,
3026
3134
  'skip': _params.skip,
3027
3135
  'update_seq': _params.updateSeq,
3028
- 'endkey': _params.endkey,
3029
- 'endkey_docid': _params.endkeyDocid,
3136
+ 'end_key': _params.endKey,
3137
+ 'end_key_doc_id': _params.endKeyDocId,
3030
3138
  'group': _params.group,
3031
3139
  'group_level': _params.groupLevel,
3032
3140
  'key': _params.key,
3033
3141
  'keys': _params.keys,
3034
3142
  'reduce': _params.reduce,
3035
3143
  'stable': _params.stable,
3036
- 'startkey': _params.startkey,
3037
- 'startkey_docid': _params.startkeyDocid,
3144
+ 'start_key': _params.startKey,
3145
+ 'start_key_doc_id': _params.startKeyDocId,
3038
3146
  'update': _params.update,
3039
3147
  };
3040
3148
  var path = {
@@ -3062,10 +3170,14 @@ var CloudantV1 = /** @class */ (function (_super) {
3062
3170
  return this.createRequest(parameters);
3063
3171
  };
3064
3172
  /**
3065
- * Query a database partition index by using selector syntax (POST).
3173
+ * Query a database partition index by using selector syntax.
3174
+ *
3175
+ * Query documents by using a declarative JSON querying syntax. It's best practice to create an appropriate index for
3176
+ * all fields in selector by using the `_index` endpoint.
3066
3177
  *
3067
- * Query documents by using a declarative JSON querying syntax. Queries can use the built-in `_all_docs` index or
3068
- * custom indices, specified by using the `_index` endpoint.
3178
+ * Queries without an appropriate backing index will fallback to using the built-in `_all_docs` index. This is not
3179
+ * recommended because it has a noticeable performance impact causing a full scan of the partition with each request.
3180
+ * In this case the response body will include a warning field recommending that an index is created.
3069
3181
  *
3070
3182
  * @param {Object} params - The parameters to send to the service.
3071
3183
  * @param {string} params.db - Path parameter to specify the database name.
@@ -3093,6 +3205,11 @@ var CloudantV1 = /** @class */ (function (_super) {
3093
3205
  * * Condition operators: are specific to a field, and are used to evaluate the value stored in that field. For
3094
3206
  * instance, the basic `$eq` operator matches when the specified field contains a value that is equal to the supplied
3095
3207
  * argument.
3208
+ * * Only equality operators such as `$eq`, `$gt`, `$gte`, `$lt`, and `$lte` (but not `$ne`) can be used as the basis
3209
+ * of a query. You should include at least one of these in a selector.
3210
+ *
3211
+ * For further reference see
3212
+ * [selector syntax](https://cloud.ibm.com/docs/Cloudant?topic=Cloudant-query#selector-syntax).
3096
3213
  * @param {string} [params.bookmark] - Opaque bookmark token used when paginating results.
3097
3214
  * @param {boolean} [params.conflicts] - A boolean value that indicates whether or not to include information about
3098
3215
  * existing conflicts in the document.
@@ -3104,8 +3221,16 @@ var CloudantV1 = /** @class */ (function (_super) {
3104
3221
  * @param {number} [params.limit] - Maximum number of results returned. The `type: text` indexes are limited to 200
3105
3222
  * results when queried.
3106
3223
  * @param {number} [params.skip] - Skip the first 'n' results, where 'n' is the value that is specified.
3107
- * @param {JsonObject[]} [params.sort] - JSON array of sort syntax elements to determine the sort order of the
3108
- * results.
3224
+ * @param {JsonObject[]} [params.sort] - The sort field contains a list of pairs, each mapping a field name to a sort
3225
+ * direction (asc or desc). The first field name and direction pair is the topmost level of sort. The second pair, if
3226
+ * provided, is the next level of sort. The field can be any field, using dotted notation if desired for sub-document
3227
+ * fields.
3228
+ *
3229
+ * For example in JSON: `[{"fieldName1": "desc"}, {"fieldName2.subFieldName1": "desc"}]`
3230
+ *
3231
+ * When sorting with multiple fields, ensure that there is an index already defined with all the sort fields in the
3232
+ * same order and each object in the sort array has a single key or at least one of the sort fields is included in the
3233
+ * selector. All sorting fields must use the same sort direction, either all ascending or all descending.
3109
3234
  * @param {boolean} [params.stable] - Whether or not the view results should be returned from a "stable" set of
3110
3235
  * shards.
3111
3236
  * @param {string} [params.update] - Whether to update the index prior to returning the result.
@@ -3116,10 +3241,11 @@ var CloudantV1 = /** @class */ (function (_super) {
3116
3241
  */
3117
3242
  CloudantV1.prototype.postPartitionFind = function (params) {
3118
3243
  var _params = __assign({}, params);
3119
- var requiredParams = ['db', 'partitionKey', 'selector'];
3120
- var missingParams = (0, ibm_cloud_sdk_core_1.getMissingParams)(_params, requiredParams);
3121
- if (missingParams) {
3122
- return Promise.reject(missingParams);
3244
+ var _requiredParams = ['db', 'partitionKey', 'selector'];
3245
+ var _validParams = ['db', 'partitionKey', 'selector', 'bookmark', 'conflicts', 'executionStats', 'fields', 'limit', 'skip', 'sort', 'stable', 'update', 'useIndex', 'headers'];
3246
+ var _validationErrors = (0, ibm_cloud_sdk_core_1.validateParams)(_params, _requiredParams, _validParams);
3247
+ if (_validationErrors) {
3248
+ return Promise.reject(_validationErrors);
3123
3249
  }
3124
3250
  var body = {
3125
3251
  'selector': _params.selector,
@@ -3156,10 +3282,14 @@ var CloudantV1 = /** @class */ (function (_super) {
3156
3282
  return this.createRequest(parameters);
3157
3283
  };
3158
3284
  /**
3159
- * Query a database partition index by using selector syntax (POST) as stream.
3285
+ * Query a database partition index by using selector syntax as stream.
3286
+ *
3287
+ * Query documents by using a declarative JSON querying syntax. It's best practice to create an appropriate index for
3288
+ * all fields in selector by using the `_index` endpoint.
3160
3289
  *
3161
- * Query documents by using a declarative JSON querying syntax. Queries can use the built-in `_all_docs` index or
3162
- * custom indices, specified by using the `_index` endpoint.
3290
+ * Queries without an appropriate backing index will fallback to using the built-in `_all_docs` index. This is not
3291
+ * recommended because it has a noticeable performance impact causing a full scan of the partition with each request.
3292
+ * In this case the response body will include a warning field recommending that an index is created.
3163
3293
  *
3164
3294
  * @param {Object} params - The parameters to send to the service.
3165
3295
  * @param {string} params.db - Path parameter to specify the database name.
@@ -3187,6 +3317,11 @@ var CloudantV1 = /** @class */ (function (_super) {
3187
3317
  * * Condition operators: are specific to a field, and are used to evaluate the value stored in that field. For
3188
3318
  * instance, the basic `$eq` operator matches when the specified field contains a value that is equal to the supplied
3189
3319
  * argument.
3320
+ * * Only equality operators such as `$eq`, `$gt`, `$gte`, `$lt`, and `$lte` (but not `$ne`) can be used as the basis
3321
+ * of a query. You should include at least one of these in a selector.
3322
+ *
3323
+ * For further reference see
3324
+ * [selector syntax](https://cloud.ibm.com/docs/Cloudant?topic=Cloudant-query#selector-syntax).
3190
3325
  * @param {string} [params.bookmark] - Opaque bookmark token used when paginating results.
3191
3326
  * @param {boolean} [params.conflicts] - A boolean value that indicates whether or not to include information about
3192
3327
  * existing conflicts in the document.
@@ -3198,8 +3333,16 @@ var CloudantV1 = /** @class */ (function (_super) {
3198
3333
  * @param {number} [params.limit] - Maximum number of results returned. The `type: text` indexes are limited to 200
3199
3334
  * results when queried.
3200
3335
  * @param {number} [params.skip] - Skip the first 'n' results, where 'n' is the value that is specified.
3201
- * @param {JsonObject[]} [params.sort] - JSON array of sort syntax elements to determine the sort order of the
3202
- * results.
3336
+ * @param {JsonObject[]} [params.sort] - The sort field contains a list of pairs, each mapping a field name to a sort
3337
+ * direction (asc or desc). The first field name and direction pair is the topmost level of sort. The second pair, if
3338
+ * provided, is the next level of sort. The field can be any field, using dotted notation if desired for sub-document
3339
+ * fields.
3340
+ *
3341
+ * For example in JSON: `[{"fieldName1": "desc"}, {"fieldName2.subFieldName1": "desc"}]`
3342
+ *
3343
+ * When sorting with multiple fields, ensure that there is an index already defined with all the sort fields in the
3344
+ * same order and each object in the sort array has a single key or at least one of the sort fields is included in the
3345
+ * selector. All sorting fields must use the same sort direction, either all ascending or all descending.
3203
3346
  * @param {boolean} [params.stable] - Whether or not the view results should be returned from a "stable" set of
3204
3347
  * shards.
3205
3348
  * @param {string} [params.update] - Whether to update the index prior to returning the result.
@@ -3210,10 +3353,11 @@ var CloudantV1 = /** @class */ (function (_super) {
3210
3353
  */
3211
3354
  CloudantV1.prototype.postPartitionFindAsStream = function (params) {
3212
3355
  var _params = __assign({}, params);
3213
- var requiredParams = ['db', 'partitionKey', 'selector'];
3214
- var missingParams = (0, ibm_cloud_sdk_core_1.getMissingParams)(_params, requiredParams);
3215
- if (missingParams) {
3216
- return Promise.reject(missingParams);
3356
+ var _requiredParams = ['db', 'partitionKey', 'selector'];
3357
+ var _validParams = ['db', 'partitionKey', 'selector', 'bookmark', 'conflicts', 'executionStats', 'fields', 'limit', 'skip', 'sort', 'stable', 'update', 'useIndex', 'headers'];
3358
+ var _validationErrors = (0, ibm_cloud_sdk_core_1.validateParams)(_params, _requiredParams, _validParams);
3359
+ if (_validationErrors) {
3360
+ return Promise.reject(_validationErrors);
3217
3361
  }
3218
3362
  var body = {
3219
3363
  'selector': _params.selector,
@@ -3284,6 +3428,11 @@ var CloudantV1 = /** @class */ (function (_super) {
3284
3428
  * * Condition operators: are specific to a field, and are used to evaluate the value stored in that field. For
3285
3429
  * instance, the basic `$eq` operator matches when the specified field contains a value that is equal to the supplied
3286
3430
  * argument.
3431
+ * * Only equality operators such as `$eq`, `$gt`, `$gte`, `$lt`, and `$lte` (but not `$ne`) can be used as the basis
3432
+ * of a query. You should include at least one of these in a selector.
3433
+ *
3434
+ * For further reference see
3435
+ * [selector syntax](https://cloud.ibm.com/docs/Cloudant?topic=Cloudant-query#selector-syntax).
3287
3436
  * @param {string} [params.bookmark] - Opaque bookmark token used when paginating results.
3288
3437
  * @param {boolean} [params.conflicts] - A boolean value that indicates whether or not to include information about
3289
3438
  * existing conflicts in the document.
@@ -3295,8 +3444,16 @@ var CloudantV1 = /** @class */ (function (_super) {
3295
3444
  * @param {number} [params.limit] - Maximum number of results returned. The `type: text` indexes are limited to 200
3296
3445
  * results when queried.
3297
3446
  * @param {number} [params.skip] - Skip the first 'n' results, where 'n' is the value that is specified.
3298
- * @param {JsonObject[]} [params.sort] - JSON array of sort syntax elements to determine the sort order of the
3299
- * results.
3447
+ * @param {JsonObject[]} [params.sort] - The sort field contains a list of pairs, each mapping a field name to a sort
3448
+ * direction (asc or desc). The first field name and direction pair is the topmost level of sort. The second pair, if
3449
+ * provided, is the next level of sort. The field can be any field, using dotted notation if desired for sub-document
3450
+ * fields.
3451
+ *
3452
+ * For example in JSON: `[{"fieldName1": "desc"}, {"fieldName2.subFieldName1": "desc"}]`
3453
+ *
3454
+ * When sorting with multiple fields, ensure that there is an index already defined with all the sort fields in the
3455
+ * same order and each object in the sort array has a single key or at least one of the sort fields is included in the
3456
+ * selector. All sorting fields must use the same sort direction, either all ascending or all descending.
3300
3457
  * @param {boolean} [params.stable] - Whether or not the view results should be returned from a "stable" set of
3301
3458
  * shards.
3302
3459
  * @param {string} [params.update] - Whether to update the index prior to returning the result.
@@ -3311,10 +3468,11 @@ var CloudantV1 = /** @class */ (function (_super) {
3311
3468
  */
3312
3469
  CloudantV1.prototype.postExplain = function (params) {
3313
3470
  var _params = __assign({}, params);
3314
- var requiredParams = ['db', 'selector'];
3315
- var missingParams = (0, ibm_cloud_sdk_core_1.getMissingParams)(_params, requiredParams);
3316
- if (missingParams) {
3317
- return Promise.reject(missingParams);
3471
+ var _requiredParams = ['db', 'selector'];
3472
+ var _validParams = ['db', 'selector', 'bookmark', 'conflicts', 'executionStats', 'fields', 'limit', 'skip', 'sort', 'stable', 'update', 'useIndex', 'r', 'headers'];
3473
+ var _validationErrors = (0, ibm_cloud_sdk_core_1.validateParams)(_params, _requiredParams, _validParams);
3474
+ if (_validationErrors) {
3475
+ return Promise.reject(_validationErrors);
3318
3476
  }
3319
3477
  var body = {
3320
3478
  'selector': _params.selector,
@@ -3353,8 +3511,12 @@ var CloudantV1 = /** @class */ (function (_super) {
3353
3511
  /**
3354
3512
  * Query an index by using selector syntax.
3355
3513
  *
3356
- * Query documents by using a declarative JSON querying syntax. Queries can use the built-in `_all_docs` index or
3357
- * custom indices, specified by using the `_index` endpoint.
3514
+ * Query documents by using a declarative JSON querying syntax. It's best practice to create an appropriate index for
3515
+ * all fields in selector by using the `_index` endpoint.
3516
+ *
3517
+ * Queries without an appropriate backing index will fallback to using the built-in `_all_docs` index. This is not
3518
+ * recommended because it has a significant performance impact causing a full scan of the database with each request.
3519
+ * In this case the response body will include a warning field recommending that an index is created.
3358
3520
  *
3359
3521
  * @param {Object} params - The parameters to send to the service.
3360
3522
  * @param {string} params.db - Path parameter to specify the database name.
@@ -3381,6 +3543,11 @@ var CloudantV1 = /** @class */ (function (_super) {
3381
3543
  * * Condition operators: are specific to a field, and are used to evaluate the value stored in that field. For
3382
3544
  * instance, the basic `$eq` operator matches when the specified field contains a value that is equal to the supplied
3383
3545
  * argument.
3546
+ * * Only equality operators such as `$eq`, `$gt`, `$gte`, `$lt`, and `$lte` (but not `$ne`) can be used as the basis
3547
+ * of a query. You should include at least one of these in a selector.
3548
+ *
3549
+ * For further reference see
3550
+ * [selector syntax](https://cloud.ibm.com/docs/Cloudant?topic=Cloudant-query#selector-syntax).
3384
3551
  * @param {string} [params.bookmark] - Opaque bookmark token used when paginating results.
3385
3552
  * @param {boolean} [params.conflicts] - A boolean value that indicates whether or not to include information about
3386
3553
  * existing conflicts in the document.
@@ -3392,8 +3559,16 @@ var CloudantV1 = /** @class */ (function (_super) {
3392
3559
  * @param {number} [params.limit] - Maximum number of results returned. The `type: text` indexes are limited to 200
3393
3560
  * results when queried.
3394
3561
  * @param {number} [params.skip] - Skip the first 'n' results, where 'n' is the value that is specified.
3395
- * @param {JsonObject[]} [params.sort] - JSON array of sort syntax elements to determine the sort order of the
3396
- * results.
3562
+ * @param {JsonObject[]} [params.sort] - The sort field contains a list of pairs, each mapping a field name to a sort
3563
+ * direction (asc or desc). The first field name and direction pair is the topmost level of sort. The second pair, if
3564
+ * provided, is the next level of sort. The field can be any field, using dotted notation if desired for sub-document
3565
+ * fields.
3566
+ *
3567
+ * For example in JSON: `[{"fieldName1": "desc"}, {"fieldName2.subFieldName1": "desc"}]`
3568
+ *
3569
+ * When sorting with multiple fields, ensure that there is an index already defined with all the sort fields in the
3570
+ * same order and each object in the sort array has a single key or at least one of the sort fields is included in the
3571
+ * selector. All sorting fields must use the same sort direction, either all ascending or all descending.
3397
3572
  * @param {boolean} [params.stable] - Whether or not the view results should be returned from a "stable" set of
3398
3573
  * shards.
3399
3574
  * @param {string} [params.update] - Whether to update the index prior to returning the result.
@@ -3408,10 +3583,11 @@ var CloudantV1 = /** @class */ (function (_super) {
3408
3583
  */
3409
3584
  CloudantV1.prototype.postFind = function (params) {
3410
3585
  var _params = __assign({}, params);
3411
- var requiredParams = ['db', 'selector'];
3412
- var missingParams = (0, ibm_cloud_sdk_core_1.getMissingParams)(_params, requiredParams);
3413
- if (missingParams) {
3414
- return Promise.reject(missingParams);
3586
+ var _requiredParams = ['db', 'selector'];
3587
+ var _validParams = ['db', 'selector', 'bookmark', 'conflicts', 'executionStats', 'fields', 'limit', 'skip', 'sort', 'stable', 'update', 'useIndex', 'r', 'headers'];
3588
+ var _validationErrors = (0, ibm_cloud_sdk_core_1.validateParams)(_params, _requiredParams, _validParams);
3589
+ if (_validationErrors) {
3590
+ return Promise.reject(_validationErrors);
3415
3591
  }
3416
3592
  var body = {
3417
3593
  'selector': _params.selector,
@@ -3450,8 +3626,12 @@ var CloudantV1 = /** @class */ (function (_super) {
3450
3626
  /**
3451
3627
  * Query an index by using selector syntax as stream.
3452
3628
  *
3453
- * Query documents by using a declarative JSON querying syntax. Queries can use the built-in `_all_docs` index or
3454
- * custom indices, specified by using the `_index` endpoint.
3629
+ * Query documents by using a declarative JSON querying syntax. It's best practice to create an appropriate index for
3630
+ * all fields in selector by using the `_index` endpoint.
3631
+ *
3632
+ * Queries without an appropriate backing index will fallback to using the built-in `_all_docs` index. This is not
3633
+ * recommended because it has a significant performance impact causing a full scan of the database with each request.
3634
+ * In this case the response body will include a warning field recommending that an index is created.
3455
3635
  *
3456
3636
  * @param {Object} params - The parameters to send to the service.
3457
3637
  * @param {string} params.db - Path parameter to specify the database name.
@@ -3478,6 +3658,11 @@ var CloudantV1 = /** @class */ (function (_super) {
3478
3658
  * * Condition operators: are specific to a field, and are used to evaluate the value stored in that field. For
3479
3659
  * instance, the basic `$eq` operator matches when the specified field contains a value that is equal to the supplied
3480
3660
  * argument.
3661
+ * * Only equality operators such as `$eq`, `$gt`, `$gte`, `$lt`, and `$lte` (but not `$ne`) can be used as the basis
3662
+ * of a query. You should include at least one of these in a selector.
3663
+ *
3664
+ * For further reference see
3665
+ * [selector syntax](https://cloud.ibm.com/docs/Cloudant?topic=Cloudant-query#selector-syntax).
3481
3666
  * @param {string} [params.bookmark] - Opaque bookmark token used when paginating results.
3482
3667
  * @param {boolean} [params.conflicts] - A boolean value that indicates whether or not to include information about
3483
3668
  * existing conflicts in the document.
@@ -3489,8 +3674,16 @@ var CloudantV1 = /** @class */ (function (_super) {
3489
3674
  * @param {number} [params.limit] - Maximum number of results returned. The `type: text` indexes are limited to 200
3490
3675
  * results when queried.
3491
3676
  * @param {number} [params.skip] - Skip the first 'n' results, where 'n' is the value that is specified.
3492
- * @param {JsonObject[]} [params.sort] - JSON array of sort syntax elements to determine the sort order of the
3493
- * results.
3677
+ * @param {JsonObject[]} [params.sort] - The sort field contains a list of pairs, each mapping a field name to a sort
3678
+ * direction (asc or desc). The first field name and direction pair is the topmost level of sort. The second pair, if
3679
+ * provided, is the next level of sort. The field can be any field, using dotted notation if desired for sub-document
3680
+ * fields.
3681
+ *
3682
+ * For example in JSON: `[{"fieldName1": "desc"}, {"fieldName2.subFieldName1": "desc"}]`
3683
+ *
3684
+ * When sorting with multiple fields, ensure that there is an index already defined with all the sort fields in the
3685
+ * same order and each object in the sort array has a single key or at least one of the sort fields is included in the
3686
+ * selector. All sorting fields must use the same sort direction, either all ascending or all descending.
3494
3687
  * @param {boolean} [params.stable] - Whether or not the view results should be returned from a "stable" set of
3495
3688
  * shards.
3496
3689
  * @param {string} [params.update] - Whether to update the index prior to returning the result.
@@ -3505,10 +3698,11 @@ var CloudantV1 = /** @class */ (function (_super) {
3505
3698
  */
3506
3699
  CloudantV1.prototype.postFindAsStream = function (params) {
3507
3700
  var _params = __assign({}, params);
3508
- var requiredParams = ['db', 'selector'];
3509
- var missingParams = (0, ibm_cloud_sdk_core_1.getMissingParams)(_params, requiredParams);
3510
- if (missingParams) {
3511
- return Promise.reject(missingParams);
3701
+ var _requiredParams = ['db', 'selector'];
3702
+ var _validParams = ['db', 'selector', 'bookmark', 'conflicts', 'executionStats', 'fields', 'limit', 'skip', 'sort', 'stable', 'update', 'useIndex', 'r', 'headers'];
3703
+ var _validationErrors = (0, ibm_cloud_sdk_core_1.validateParams)(_params, _requiredParams, _validParams);
3704
+ if (_validationErrors) {
3705
+ return Promise.reject(_validationErrors);
3512
3706
  }
3513
3707
  var body = {
3514
3708
  'selector': _params.selector,
@@ -3559,10 +3753,11 @@ var CloudantV1 = /** @class */ (function (_super) {
3559
3753
  */
3560
3754
  CloudantV1.prototype.getIndexesInformation = function (params) {
3561
3755
  var _params = __assign({}, params);
3562
- var requiredParams = ['db'];
3563
- var missingParams = (0, ibm_cloud_sdk_core_1.getMissingParams)(_params, requiredParams);
3564
- if (missingParams) {
3565
- return Promise.reject(missingParams);
3756
+ var _requiredParams = ['db'];
3757
+ var _validParams = ['db', 'headers'];
3758
+ var _validationErrors = (0, ibm_cloud_sdk_core_1.validateParams)(_params, _requiredParams, _validParams);
3759
+ if (_validationErrors) {
3760
+ return Promise.reject(_validationErrors);
3566
3761
  }
3567
3762
  var path = {
3568
3763
  'db': _params.db,
@@ -3607,10 +3802,11 @@ var CloudantV1 = /** @class */ (function (_super) {
3607
3802
  */
3608
3803
  CloudantV1.prototype.postIndex = function (params) {
3609
3804
  var _params = __assign({}, params);
3610
- var requiredParams = ['db', 'index'];
3611
- var missingParams = (0, ibm_cloud_sdk_core_1.getMissingParams)(_params, requiredParams);
3612
- if (missingParams) {
3613
- return Promise.reject(missingParams);
3805
+ var _requiredParams = ['db', 'index'];
3806
+ var _validParams = ['db', 'index', 'ddoc', 'def', 'name', 'partitioned', 'type', 'headers'];
3807
+ var _validationErrors = (0, ibm_cloud_sdk_core_1.validateParams)(_params, _requiredParams, _validParams);
3808
+ if (_validationErrors) {
3809
+ return Promise.reject(_validationErrors);
3614
3810
  }
3615
3811
  var body = {
3616
3812
  'index': _params.index,
@@ -3654,10 +3850,11 @@ var CloudantV1 = /** @class */ (function (_super) {
3654
3850
  */
3655
3851
  CloudantV1.prototype.deleteIndex = function (params) {
3656
3852
  var _params = __assign({}, params);
3657
- var requiredParams = ['db', 'ddoc', 'type', 'index'];
3658
- var missingParams = (0, ibm_cloud_sdk_core_1.getMissingParams)(_params, requiredParams);
3659
- if (missingParams) {
3660
- return Promise.reject(missingParams);
3853
+ var _requiredParams = ['db', 'ddoc', 'type', 'index'];
3854
+ var _validParams = ['db', 'ddoc', 'type', 'index', 'headers'];
3855
+ var _validationErrors = (0, ibm_cloud_sdk_core_1.validateParams)(_params, _requiredParams, _validParams);
3856
+ if (_validationErrors) {
3857
+ return Promise.reject(_validationErrors);
3661
3858
  }
3662
3859
  var path = {
3663
3860
  'db': _params.db,
@@ -3697,10 +3894,11 @@ var CloudantV1 = /** @class */ (function (_super) {
3697
3894
  */
3698
3895
  CloudantV1.prototype.postSearchAnalyze = function (params) {
3699
3896
  var _params = __assign({}, params);
3700
- var requiredParams = ['analyzer', 'text'];
3701
- var missingParams = (0, ibm_cloud_sdk_core_1.getMissingParams)(_params, requiredParams);
3702
- if (missingParams) {
3703
- return Promise.reject(missingParams);
3897
+ var _requiredParams = ['analyzer', 'text'];
3898
+ var _validParams = ['analyzer', 'text', 'headers'];
3899
+ var _validationErrors = (0, ibm_cloud_sdk_core_1.validateParams)(_params, _requiredParams, _validParams);
3900
+ if (_validationErrors) {
3901
+ return Promise.reject(_validationErrors);
3704
3902
  }
3705
3903
  var body = {
3706
3904
  'analyzer': _params.analyzer,
@@ -3784,10 +3982,11 @@ var CloudantV1 = /** @class */ (function (_super) {
3784
3982
  */
3785
3983
  CloudantV1.prototype.postSearch = function (params) {
3786
3984
  var _params = __assign({}, params);
3787
- var requiredParams = ['db', 'ddoc', 'index', 'query'];
3788
- var missingParams = (0, ibm_cloud_sdk_core_1.getMissingParams)(_params, requiredParams);
3789
- if (missingParams) {
3790
- return Promise.reject(missingParams);
3985
+ var _requiredParams = ['db', 'ddoc', 'index', 'query'];
3986
+ var _validParams = ['db', 'ddoc', 'index', 'query', 'bookmark', 'highlightFields', 'highlightNumber', 'highlightPostTag', 'highlightPreTag', 'highlightSize', 'includeDocs', 'includeFields', 'limit', 'sort', 'stale', 'counts', 'drilldown', 'groupField', 'groupLimit', 'groupSort', 'ranges', 'headers'];
3987
+ var _validationErrors = (0, ibm_cloud_sdk_core_1.validateParams)(_params, _requiredParams, _validParams);
3988
+ if (_validationErrors) {
3989
+ return Promise.reject(_validationErrors);
3791
3990
  }
3792
3991
  var body = {
3793
3992
  'query': _params.query,
@@ -3893,10 +4092,11 @@ var CloudantV1 = /** @class */ (function (_super) {
3893
4092
  */
3894
4093
  CloudantV1.prototype.postSearchAsStream = function (params) {
3895
4094
  var _params = __assign({}, params);
3896
- var requiredParams = ['db', 'ddoc', 'index', 'query'];
3897
- var missingParams = (0, ibm_cloud_sdk_core_1.getMissingParams)(_params, requiredParams);
3898
- if (missingParams) {
3899
- return Promise.reject(missingParams);
4095
+ var _requiredParams = ['db', 'ddoc', 'index', 'query'];
4096
+ var _validParams = ['db', 'ddoc', 'index', 'query', 'bookmark', 'highlightFields', 'highlightNumber', 'highlightPostTag', 'highlightPreTag', 'highlightSize', 'includeDocs', 'includeFields', 'limit', 'sort', 'stale', 'counts', 'drilldown', 'groupField', 'groupLimit', 'groupSort', 'ranges', 'headers'];
4097
+ var _validationErrors = (0, ibm_cloud_sdk_core_1.validateParams)(_params, _requiredParams, _validParams);
4098
+ if (_validationErrors) {
4099
+ return Promise.reject(_validationErrors);
3900
4100
  }
3901
4101
  var body = {
3902
4102
  'query': _params.query,
@@ -3956,10 +4156,11 @@ var CloudantV1 = /** @class */ (function (_super) {
3956
4156
  */
3957
4157
  CloudantV1.prototype.getSearchInfo = function (params) {
3958
4158
  var _params = __assign({}, params);
3959
- var requiredParams = ['db', 'ddoc', 'index'];
3960
- var missingParams = (0, ibm_cloud_sdk_core_1.getMissingParams)(_params, requiredParams);
3961
- if (missingParams) {
3962
- return Promise.reject(missingParams);
4159
+ var _requiredParams = ['db', 'ddoc', 'index'];
4160
+ var _validParams = ['db', 'ddoc', 'index', 'headers'];
4161
+ var _validationErrors = (0, ibm_cloud_sdk_core_1.validateParams)(_params, _requiredParams, _validParams);
4162
+ if (_validationErrors) {
4163
+ return Promise.reject(_validationErrors);
3963
4164
  }
3964
4165
  var path = {
3965
4166
  'db': _params.db,
@@ -4034,10 +4235,11 @@ var CloudantV1 = /** @class */ (function (_super) {
4034
4235
  */
4035
4236
  CloudantV1.prototype.getGeo = function (params) {
4036
4237
  var _params = __assign({}, params);
4037
- var requiredParams = ['db', 'ddoc', 'index'];
4038
- var missingParams = (0, ibm_cloud_sdk_core_1.getMissingParams)(_params, requiredParams);
4039
- if (missingParams) {
4040
- return Promise.reject(missingParams);
4238
+ var _requiredParams = ['db', 'ddoc', 'index'];
4239
+ var _validParams = ['db', 'ddoc', 'index', 'bbox', 'bookmark', 'format', 'g', 'includeDocs', 'lat', 'limit', 'lon', 'nearest', 'radius', 'rangex', 'rangey', 'relation', 'skip', 'stale', 'headers'];
4240
+ var _validationErrors = (0, ibm_cloud_sdk_core_1.validateParams)(_params, _requiredParams, _validParams);
4241
+ if (_validationErrors) {
4242
+ return Promise.reject(_validationErrors);
4041
4243
  }
4042
4244
  var query = {
4043
4245
  'bbox': _params.bbox,
@@ -4127,10 +4329,11 @@ var CloudantV1 = /** @class */ (function (_super) {
4127
4329
  */
4128
4330
  CloudantV1.prototype.getGeoAsStream = function (params) {
4129
4331
  var _params = __assign({}, params);
4130
- var requiredParams = ['db', 'ddoc', 'index'];
4131
- var missingParams = (0, ibm_cloud_sdk_core_1.getMissingParams)(_params, requiredParams);
4132
- if (missingParams) {
4133
- return Promise.reject(missingParams);
4332
+ var _requiredParams = ['db', 'ddoc', 'index'];
4333
+ var _validParams = ['db', 'ddoc', 'index', 'bbox', 'bookmark', 'format', 'g', 'includeDocs', 'lat', 'limit', 'lon', 'nearest', 'radius', 'rangex', 'rangey', 'relation', 'skip', 'stale', 'headers'];
4334
+ var _validationErrors = (0, ibm_cloud_sdk_core_1.validateParams)(_params, _requiredParams, _validParams);
4335
+ if (_validationErrors) {
4336
+ return Promise.reject(_validationErrors);
4134
4337
  }
4135
4338
  var query = {
4136
4339
  'bbox': _params.bbox,
@@ -4183,10 +4386,11 @@ var CloudantV1 = /** @class */ (function (_super) {
4183
4386
  */
4184
4387
  CloudantV1.prototype.postGeoCleanup = function (params) {
4185
4388
  var _params = __assign({}, params);
4186
- var requiredParams = ['db'];
4187
- var missingParams = (0, ibm_cloud_sdk_core_1.getMissingParams)(_params, requiredParams);
4188
- if (missingParams) {
4189
- return Promise.reject(missingParams);
4389
+ var _requiredParams = ['db'];
4390
+ var _validParams = ['db', 'headers'];
4391
+ var _validationErrors = (0, ibm_cloud_sdk_core_1.validateParams)(_params, _requiredParams, _validParams);
4392
+ if (_validationErrors) {
4393
+ return Promise.reject(_validationErrors);
4190
4394
  }
4191
4395
  var path = {
4192
4396
  'db': _params.db,
@@ -4219,10 +4423,11 @@ var CloudantV1 = /** @class */ (function (_super) {
4219
4423
  */
4220
4424
  CloudantV1.prototype.getGeoIndexInformation = function (params) {
4221
4425
  var _params = __assign({}, params);
4222
- var requiredParams = ['db', 'ddoc', 'index'];
4223
- var missingParams = (0, ibm_cloud_sdk_core_1.getMissingParams)(_params, requiredParams);
4224
- if (missingParams) {
4225
- return Promise.reject(missingParams);
4426
+ var _requiredParams = ['db', 'ddoc', 'index'];
4427
+ var _validParams = ['db', 'ddoc', 'index', 'headers'];
4428
+ var _validationErrors = (0, ibm_cloud_sdk_core_1.validateParams)(_params, _requiredParams, _validParams);
4429
+ if (_validationErrors) {
4430
+ return Promise.reject(_validationErrors);
4226
4431
  }
4227
4432
  var path = {
4228
4433
  'db': _params.db,
@@ -4263,10 +4468,11 @@ var CloudantV1 = /** @class */ (function (_super) {
4263
4468
  */
4264
4469
  CloudantV1.prototype.headReplicationDocument = function (params) {
4265
4470
  var _params = __assign({}, params);
4266
- var requiredParams = ['docId'];
4267
- var missingParams = (0, ibm_cloud_sdk_core_1.getMissingParams)(_params, requiredParams);
4268
- if (missingParams) {
4269
- return Promise.reject(missingParams);
4471
+ var _requiredParams = ['docId'];
4472
+ var _validParams = ['docId', 'ifNoneMatch', 'headers'];
4473
+ var _validationErrors = (0, ibm_cloud_sdk_core_1.validateParams)(_params, _requiredParams, _validParams);
4474
+ if (_validationErrors) {
4475
+ return Promise.reject(_validationErrors);
4270
4476
  }
4271
4477
  var path = {
4272
4478
  'doc_id': _params.docId,
@@ -4300,10 +4506,11 @@ var CloudantV1 = /** @class */ (function (_super) {
4300
4506
  */
4301
4507
  CloudantV1.prototype.headSchedulerDocument = function (params) {
4302
4508
  var _params = __assign({}, params);
4303
- var requiredParams = ['docId'];
4304
- var missingParams = (0, ibm_cloud_sdk_core_1.getMissingParams)(_params, requiredParams);
4305
- if (missingParams) {
4306
- return Promise.reject(missingParams);
4509
+ var _requiredParams = ['docId'];
4510
+ var _validParams = ['docId', 'headers'];
4511
+ var _validationErrors = (0, ibm_cloud_sdk_core_1.validateParams)(_params, _requiredParams, _validParams);
4512
+ if (_validationErrors) {
4513
+ return Promise.reject(_validationErrors);
4307
4514
  }
4308
4515
  var path = {
4309
4516
  'doc_id': _params.docId,
@@ -4334,10 +4541,11 @@ var CloudantV1 = /** @class */ (function (_super) {
4334
4541
  */
4335
4542
  CloudantV1.prototype.headSchedulerJob = function (params) {
4336
4543
  var _params = __assign({}, params);
4337
- var requiredParams = ['jobId'];
4338
- var missingParams = (0, ibm_cloud_sdk_core_1.getMissingParams)(_params, requiredParams);
4339
- if (missingParams) {
4340
- return Promise.reject(missingParams);
4544
+ var _requiredParams = ['jobId'];
4545
+ var _validParams = ['jobId', 'headers'];
4546
+ var _validationErrors = (0, ibm_cloud_sdk_core_1.validateParams)(_params, _requiredParams, _validParams);
4547
+ if (_validationErrors) {
4548
+ return Promise.reject(_validationErrors);
4341
4549
  }
4342
4550
  var path = {
4343
4551
  'job_id': _params.jobId,
@@ -4372,10 +4580,11 @@ var CloudantV1 = /** @class */ (function (_super) {
4372
4580
  */
4373
4581
  CloudantV1.prototype.deleteReplicationDocument = function (params) {
4374
4582
  var _params = __assign({}, params);
4375
- var requiredParams = ['docId'];
4376
- var missingParams = (0, ibm_cloud_sdk_core_1.getMissingParams)(_params, requiredParams);
4377
- if (missingParams) {
4378
- return Promise.reject(missingParams);
4583
+ var _requiredParams = ['docId'];
4584
+ var _validParams = ['docId', 'ifMatch', 'batch', 'rev', 'headers'];
4585
+ var _validationErrors = (0, ibm_cloud_sdk_core_1.validateParams)(_params, _requiredParams, _validParams);
4586
+ if (_validationErrors) {
4587
+ return Promise.reject(_validationErrors);
4379
4588
  }
4380
4589
  var query = {
4381
4590
  'batch': _params.batch,
@@ -4435,10 +4644,11 @@ var CloudantV1 = /** @class */ (function (_super) {
4435
4644
  */
4436
4645
  CloudantV1.prototype.getReplicationDocument = function (params) {
4437
4646
  var _params = __assign({}, params);
4438
- var requiredParams = ['docId'];
4439
- var missingParams = (0, ibm_cloud_sdk_core_1.getMissingParams)(_params, requiredParams);
4440
- if (missingParams) {
4441
- return Promise.reject(missingParams);
4647
+ var _requiredParams = ['docId'];
4648
+ var _validParams = ['docId', 'ifNoneMatch', 'attachments', 'attEncodingInfo', 'conflicts', 'deletedConflicts', 'latest', 'localSeq', 'meta', 'rev', 'revs', 'revsInfo', 'headers'];
4649
+ var _validationErrors = (0, ibm_cloud_sdk_core_1.validateParams)(_params, _requiredParams, _validParams);
4650
+ if (_validationErrors) {
4651
+ return Promise.reject(_validationErrors);
4442
4652
  }
4443
4653
  var query = {
4444
4654
  'attachments': _params.attachments,
@@ -4494,10 +4704,11 @@ var CloudantV1 = /** @class */ (function (_super) {
4494
4704
  */
4495
4705
  CloudantV1.prototype.putReplicationDocument = function (params) {
4496
4706
  var _params = __assign({}, params);
4497
- var requiredParams = ['docId', 'replicationDocument'];
4498
- var missingParams = (0, ibm_cloud_sdk_core_1.getMissingParams)(_params, requiredParams);
4499
- if (missingParams) {
4500
- return Promise.reject(missingParams);
4707
+ var _requiredParams = ['docId', 'replicationDocument'];
4708
+ var _validParams = ['docId', 'replicationDocument', 'ifMatch', 'batch', 'newEdits', 'rev', 'headers'];
4709
+ var _validationErrors = (0, ibm_cloud_sdk_core_1.validateParams)(_params, _requiredParams, _validParams);
4710
+ if (_validationErrors) {
4711
+ return Promise.reject(_validationErrors);
4501
4712
  }
4502
4713
  var body = _params.replicationDocument;
4503
4714
  var query = {
@@ -4546,6 +4757,12 @@ var CloudantV1 = /** @class */ (function (_super) {
4546
4757
  */
4547
4758
  CloudantV1.prototype.getSchedulerDocs = function (params) {
4548
4759
  var _params = __assign({}, params);
4760
+ var _requiredParams = [];
4761
+ var _validParams = ['limit', 'skip', 'states', 'headers'];
4762
+ var _validationErrors = (0, ibm_cloud_sdk_core_1.validateParams)(_params, _requiredParams, _validParams);
4763
+ if (_validationErrors) {
4764
+ return Promise.reject(_validationErrors);
4765
+ }
4549
4766
  var query = {
4550
4767
  'limit': _params.limit,
4551
4768
  'skip': _params.skip,
@@ -4579,10 +4796,11 @@ var CloudantV1 = /** @class */ (function (_super) {
4579
4796
  */
4580
4797
  CloudantV1.prototype.getSchedulerDocument = function (params) {
4581
4798
  var _params = __assign({}, params);
4582
- var requiredParams = ['docId'];
4583
- var missingParams = (0, ibm_cloud_sdk_core_1.getMissingParams)(_params, requiredParams);
4584
- if (missingParams) {
4585
- return Promise.reject(missingParams);
4799
+ var _requiredParams = ['docId'];
4800
+ var _validParams = ['docId', 'headers'];
4801
+ var _validationErrors = (0, ibm_cloud_sdk_core_1.validateParams)(_params, _requiredParams, _validParams);
4802
+ if (_validationErrors) {
4803
+ return Promise.reject(_validationErrors);
4586
4804
  }
4587
4805
  var path = {
4588
4806
  'doc_id': _params.docId,
@@ -4620,6 +4838,12 @@ var CloudantV1 = /** @class */ (function (_super) {
4620
4838
  */
4621
4839
  CloudantV1.prototype.getSchedulerJobs = function (params) {
4622
4840
  var _params = __assign({}, params);
4841
+ var _requiredParams = [];
4842
+ var _validParams = ['limit', 'skip', 'headers'];
4843
+ var _validationErrors = (0, ibm_cloud_sdk_core_1.validateParams)(_params, _requiredParams, _validParams);
4844
+ if (_validationErrors) {
4845
+ return Promise.reject(_validationErrors);
4846
+ }
4623
4847
  var query = {
4624
4848
  'limit': _params.limit,
4625
4849
  'skip': _params.skip,
@@ -4651,10 +4875,11 @@ var CloudantV1 = /** @class */ (function (_super) {
4651
4875
  */
4652
4876
  CloudantV1.prototype.getSchedulerJob = function (params) {
4653
4877
  var _params = __assign({}, params);
4654
- var requiredParams = ['jobId'];
4655
- var missingParams = (0, ibm_cloud_sdk_core_1.getMissingParams)(_params, requiredParams);
4656
- if (missingParams) {
4657
- return Promise.reject(missingParams);
4878
+ var _requiredParams = ['jobId'];
4879
+ var _validParams = ['jobId', 'headers'];
4880
+ var _validationErrors = (0, ibm_cloud_sdk_core_1.validateParams)(_params, _requiredParams, _validParams);
4881
+ if (_validationErrors) {
4882
+ return Promise.reject(_validationErrors);
4658
4883
  }
4659
4884
  var path = {
4660
4885
  'job_id': _params.jobId,
@@ -4688,6 +4913,12 @@ var CloudantV1 = /** @class */ (function (_super) {
4688
4913
  */
4689
4914
  CloudantV1.prototype.getSessionInformation = function (params) {
4690
4915
  var _params = __assign({}, params);
4916
+ var _requiredParams = [];
4917
+ var _validParams = ['headers'];
4918
+ var _validationErrors = (0, ibm_cloud_sdk_core_1.validateParams)(_params, _requiredParams, _validParams);
4919
+ if (_validationErrors) {
4920
+ return Promise.reject(_validationErrors);
4921
+ }
4691
4922
  var sdkHeaders = (0, common_1.getSdkHeaders)(CloudantV1.DEFAULT_SERVICE_NAME, 'v1', 'getSessionInformation');
4692
4923
  var parameters = {
4693
4924
  options: {
@@ -4719,10 +4950,11 @@ var CloudantV1 = /** @class */ (function (_super) {
4719
4950
  */
4720
4951
  CloudantV1.prototype.getSecurity = function (params) {
4721
4952
  var _params = __assign({}, params);
4722
- var requiredParams = ['db'];
4723
- var missingParams = (0, ibm_cloud_sdk_core_1.getMissingParams)(_params, requiredParams);
4724
- if (missingParams) {
4725
- return Promise.reject(missingParams);
4953
+ var _requiredParams = ['db'];
4954
+ var _validParams = ['db', 'headers'];
4955
+ var _validationErrors = (0, ibm_cloud_sdk_core_1.validateParams)(_params, _requiredParams, _validParams);
4956
+ if (_validationErrors) {
4957
+ return Promise.reject(_validationErrors);
4726
4958
  }
4727
4959
  var path = {
4728
4960
  'db': _params.db,
@@ -4749,6 +4981,12 @@ var CloudantV1 = /** @class */ (function (_super) {
4749
4981
  * and CouchDB related permissions. Be careful: by removing a Cloudant API key, a member or an admin from the list of
4750
4982
  * users that have access permissions, you remove it from the list of users that have access to the database.
4751
4983
  *
4984
+ * ### Note about nobody role
4985
+ *
4986
+ * The `nobody` username applies to all unauthenticated connection attempts. For example, if an application tries to
4987
+ * read data from a database, but did not identify itself, the task can continue only if the `nobody` user has the
4988
+ * role `_reader`.
4989
+ *
4752
4990
  * @param {Object} params - The parameters to send to the service.
4753
4991
  * @param {string} params.db - Path parameter to specify the database name.
4754
4992
  * @param {SecurityObject} [params.admins] - Schema for names and roles to map to a database permission.
@@ -4760,10 +4998,11 @@ var CloudantV1 = /** @class */ (function (_super) {
4760
4998
  */
4761
4999
  CloudantV1.prototype.putSecurity = function (params) {
4762
5000
  var _params = __assign({}, params);
4763
- var requiredParams = ['db'];
4764
- var missingParams = (0, ibm_cloud_sdk_core_1.getMissingParams)(_params, requiredParams);
4765
- if (missingParams) {
4766
- return Promise.reject(missingParams);
5001
+ var _requiredParams = ['db'];
5002
+ var _validParams = ['db', 'admins', 'members', 'cloudant', 'couchdbAuthOnly', 'headers'];
5003
+ var _validationErrors = (0, ibm_cloud_sdk_core_1.validateParams)(_params, _requiredParams, _validParams);
5004
+ if (_validationErrors) {
5005
+ return Promise.reject(_validationErrors);
4767
5006
  }
4768
5007
  var body = {
4769
5008
  'admins': _params.admins,
@@ -4804,6 +5043,12 @@ var CloudantV1 = /** @class */ (function (_super) {
4804
5043
  */
4805
5044
  CloudantV1.prototype.postApiKeys = function (params) {
4806
5045
  var _params = __assign({}, params);
5046
+ var _requiredParams = [];
5047
+ var _validParams = ['headers'];
5048
+ var _validationErrors = (0, ibm_cloud_sdk_core_1.validateParams)(_params, _requiredParams, _validParams);
5049
+ if (_validationErrors) {
5050
+ return Promise.reject(_validationErrors);
5051
+ }
4807
5052
  var sdkHeaders = (0, common_1.getSdkHeaders)(CloudantV1.DEFAULT_SERVICE_NAME, 'v1', 'postApiKeys');
4808
5053
  var parameters = {
4809
5054
  options: {
@@ -4824,6 +5069,12 @@ var CloudantV1 = /** @class */ (function (_super) {
4824
5069
  * Modify only Cloudant related permissions to database. Be careful: by removing an API key from the list, you remove
4825
5070
  * the API key from the list of users that have access to the database.
4826
5071
  *
5072
+ * ### Note about nobody role
5073
+ *
5074
+ * The `nobody` username applies to all unauthenticated connection attempts. For example, if an application tries to
5075
+ * read data from a database, but did not identify itself, the task can continue only if the `nobody` user has the
5076
+ * role `_reader`.
5077
+ *
4827
5078
  * @param {Object} params - The parameters to send to the service.
4828
5079
  * @param {string} params.db - Path parameter to specify the database name.
4829
5080
  * @param {JsonObject} params.cloudant - Database permissions for Cloudant users and/or API keys.
@@ -4835,10 +5086,11 @@ var CloudantV1 = /** @class */ (function (_super) {
4835
5086
  */
4836
5087
  CloudantV1.prototype.putCloudantSecurityConfiguration = function (params) {
4837
5088
  var _params = __assign({}, params);
4838
- var requiredParams = ['db', 'cloudant'];
4839
- var missingParams = (0, ibm_cloud_sdk_core_1.getMissingParams)(_params, requiredParams);
4840
- if (missingParams) {
4841
- return Promise.reject(missingParams);
5089
+ var _requiredParams = ['db', 'cloudant'];
5090
+ var _validParams = ['db', 'cloudant', 'admins', 'members', 'couchdbAuthOnly', 'headers'];
5091
+ var _validationErrors = (0, ibm_cloud_sdk_core_1.validateParams)(_params, _requiredParams, _validParams);
5092
+ if (_validationErrors) {
5093
+ return Promise.reject(_validationErrors);
4842
5094
  }
4843
5095
  var body = {
4844
5096
  'cloudant': _params.cloudant,
@@ -4881,6 +5133,12 @@ var CloudantV1 = /** @class */ (function (_super) {
4881
5133
  */
4882
5134
  CloudantV1.prototype.getCorsInformation = function (params) {
4883
5135
  var _params = __assign({}, params);
5136
+ var _requiredParams = [];
5137
+ var _validParams = ['headers'];
5138
+ var _validationErrors = (0, ibm_cloud_sdk_core_1.validateParams)(_params, _requiredParams, _validParams);
5139
+ if (_validationErrors) {
5140
+ return Promise.reject(_validationErrors);
5141
+ }
4884
5142
  var sdkHeaders = (0, common_1.getSdkHeaders)(CloudantV1.DEFAULT_SERVICE_NAME, 'v1', 'getCorsInformation');
4885
5143
  var parameters = {
4886
5144
  options: {
@@ -4913,10 +5171,11 @@ var CloudantV1 = /** @class */ (function (_super) {
4913
5171
  */
4914
5172
  CloudantV1.prototype.putCorsConfiguration = function (params) {
4915
5173
  var _params = __assign({}, params);
4916
- var requiredParams = ['origins'];
4917
- var missingParams = (0, ibm_cloud_sdk_core_1.getMissingParams)(_params, requiredParams);
4918
- if (missingParams) {
4919
- return Promise.reject(missingParams);
5174
+ var _requiredParams = ['origins'];
5175
+ var _validParams = ['origins', 'allowCredentials', 'enableCors', 'headers'];
5176
+ var _validationErrors = (0, ibm_cloud_sdk_core_1.validateParams)(_params, _requiredParams, _validParams);
5177
+ if (_validationErrors) {
5178
+ return Promise.reject(_validationErrors);
4920
5179
  }
4921
5180
  var body = {
4922
5181
  'origins': _params.origins,
@@ -4963,10 +5222,11 @@ var CloudantV1 = /** @class */ (function (_super) {
4963
5222
  */
4964
5223
  CloudantV1.prototype.headAttachment = function (params) {
4965
5224
  var _params = __assign({}, params);
4966
- var requiredParams = ['db', 'docId', 'attachmentName'];
4967
- var missingParams = (0, ibm_cloud_sdk_core_1.getMissingParams)(_params, requiredParams);
4968
- if (missingParams) {
4969
- return Promise.reject(missingParams);
5225
+ var _requiredParams = ['db', 'docId', 'attachmentName'];
5226
+ var _validParams = ['db', 'docId', 'attachmentName', 'ifMatch', 'ifNoneMatch', 'rev', 'headers'];
5227
+ var _validationErrors = (0, ibm_cloud_sdk_core_1.validateParams)(_params, _requiredParams, _validParams);
5228
+ if (_validationErrors) {
5229
+ return Promise.reject(_validationErrors);
4970
5230
  }
4971
5231
  var query = {
4972
5232
  'rev': _params.rev,
@@ -5013,10 +5273,11 @@ var CloudantV1 = /** @class */ (function (_super) {
5013
5273
  */
5014
5274
  CloudantV1.prototype.deleteAttachment = function (params) {
5015
5275
  var _params = __assign({}, params);
5016
- var requiredParams = ['db', 'docId', 'attachmentName'];
5017
- var missingParams = (0, ibm_cloud_sdk_core_1.getMissingParams)(_params, requiredParams);
5018
- if (missingParams) {
5019
- return Promise.reject(missingParams);
5276
+ var _requiredParams = ['db', 'docId', 'attachmentName'];
5277
+ var _validParams = ['db', 'docId', 'attachmentName', 'ifMatch', 'rev', 'batch', 'headers'];
5278
+ var _validationErrors = (0, ibm_cloud_sdk_core_1.validateParams)(_params, _requiredParams, _validParams);
5279
+ if (_validationErrors) {
5280
+ return Promise.reject(_validationErrors);
5020
5281
  }
5021
5282
  var query = {
5022
5283
  'rev': _params.rev,
@@ -5068,10 +5329,11 @@ var CloudantV1 = /** @class */ (function (_super) {
5068
5329
  */
5069
5330
  CloudantV1.prototype.getAttachment = function (params) {
5070
5331
  var _params = __assign({}, params);
5071
- var requiredParams = ['db', 'docId', 'attachmentName'];
5072
- var missingParams = (0, ibm_cloud_sdk_core_1.getMissingParams)(_params, requiredParams);
5073
- if (missingParams) {
5074
- return Promise.reject(missingParams);
5332
+ var _requiredParams = ['db', 'docId', 'attachmentName'];
5333
+ var _validParams = ['db', 'docId', 'attachmentName', 'accept', 'ifMatch', 'ifNoneMatch', 'range', 'rev', 'headers'];
5334
+ var _validationErrors = (0, ibm_cloud_sdk_core_1.validateParams)(_params, _requiredParams, _validParams);
5335
+ if (_validationErrors) {
5336
+ return Promise.reject(_validationErrors);
5075
5337
  }
5076
5338
  var query = {
5077
5339
  'rev': _params.rev,
@@ -5126,10 +5388,11 @@ var CloudantV1 = /** @class */ (function (_super) {
5126
5388
  */
5127
5389
  CloudantV1.prototype.putAttachment = function (params) {
5128
5390
  var _params = __assign({}, params);
5129
- var requiredParams = ['db', 'docId', 'attachmentName', 'attachment', 'contentType'];
5130
- var missingParams = (0, ibm_cloud_sdk_core_1.getMissingParams)(_params, requiredParams);
5131
- if (missingParams) {
5132
- return Promise.reject(missingParams);
5391
+ var _requiredParams = ['db', 'docId', 'attachmentName', 'attachment', 'contentType'];
5392
+ var _validParams = ['db', 'docId', 'attachmentName', 'attachment', 'contentType', 'ifMatch', 'rev', 'headers'];
5393
+ var _validationErrors = (0, ibm_cloud_sdk_core_1.validateParams)(_params, _requiredParams, _validParams);
5394
+ if (_validationErrors) {
5395
+ return Promise.reject(_validationErrors);
5133
5396
  }
5134
5397
  var body = _params.attachment;
5135
5398
  var query = {
@@ -5178,10 +5441,11 @@ var CloudantV1 = /** @class */ (function (_super) {
5178
5441
  */
5179
5442
  CloudantV1.prototype.headLocalDocument = function (params) {
5180
5443
  var _params = __assign({}, params);
5181
- var requiredParams = ['db', 'docId'];
5182
- var missingParams = (0, ibm_cloud_sdk_core_1.getMissingParams)(_params, requiredParams);
5183
- if (missingParams) {
5184
- return Promise.reject(missingParams);
5444
+ var _requiredParams = ['db', 'docId'];
5445
+ var _validParams = ['db', 'docId', 'ifNoneMatch', 'headers'];
5446
+ var _validationErrors = (0, ibm_cloud_sdk_core_1.validateParams)(_params, _requiredParams, _validParams);
5447
+ if (_validationErrors) {
5448
+ return Promise.reject(_validationErrors);
5185
5449
  }
5186
5450
  var path = {
5187
5451
  'db': _params.db,
@@ -5218,10 +5482,11 @@ var CloudantV1 = /** @class */ (function (_super) {
5218
5482
  */
5219
5483
  CloudantV1.prototype.deleteLocalDocument = function (params) {
5220
5484
  var _params = __assign({}, params);
5221
- var requiredParams = ['db', 'docId'];
5222
- var missingParams = (0, ibm_cloud_sdk_core_1.getMissingParams)(_params, requiredParams);
5223
- if (missingParams) {
5224
- return Promise.reject(missingParams);
5485
+ var _requiredParams = ['db', 'docId'];
5486
+ var _validParams = ['db', 'docId', 'batch', 'headers'];
5487
+ var _validationErrors = (0, ibm_cloud_sdk_core_1.validateParams)(_params, _requiredParams, _validParams);
5488
+ if (_validationErrors) {
5489
+ return Promise.reject(_validationErrors);
5225
5490
  }
5226
5491
  var query = {
5227
5492
  'batch': _params.batch,
@@ -5270,10 +5535,11 @@ var CloudantV1 = /** @class */ (function (_super) {
5270
5535
  */
5271
5536
  CloudantV1.prototype.getLocalDocument = function (params) {
5272
5537
  var _params = __assign({}, params);
5273
- var requiredParams = ['db', 'docId'];
5274
- var missingParams = (0, ibm_cloud_sdk_core_1.getMissingParams)(_params, requiredParams);
5275
- if (missingParams) {
5276
- return Promise.reject(missingParams);
5538
+ var _requiredParams = ['db', 'docId'];
5539
+ var _validParams = ['db', 'docId', 'accept', 'ifNoneMatch', 'attachments', 'attEncodingInfo', 'localSeq', 'headers'];
5540
+ var _validationErrors = (0, ibm_cloud_sdk_core_1.validateParams)(_params, _requiredParams, _validParams);
5541
+ if (_validationErrors) {
5542
+ return Promise.reject(_validationErrors);
5277
5543
  }
5278
5544
  var query = {
5279
5545
  'attachments': _params.attachments,
@@ -5319,10 +5585,11 @@ var CloudantV1 = /** @class */ (function (_super) {
5319
5585
  */
5320
5586
  CloudantV1.prototype.putLocalDocument = function (params) {
5321
5587
  var _params = __assign({}, params);
5322
- var requiredParams = ['db', 'docId', 'document'];
5323
- var missingParams = (0, ibm_cloud_sdk_core_1.getMissingParams)(_params, requiredParams);
5324
- if (missingParams) {
5325
- return Promise.reject(missingParams);
5588
+ var _requiredParams = ['db', 'docId', 'document'];
5589
+ var _validParams = ['db', 'docId', 'document', 'contentType', 'batch', 'headers'];
5590
+ var _validationErrors = (0, ibm_cloud_sdk_core_1.validateParams)(_params, _requiredParams, _validParams);
5591
+ if (_validationErrors) {
5592
+ return Promise.reject(_validationErrors);
5326
5593
  }
5327
5594
  var body = _params.document;
5328
5595
  var query = {
@@ -5368,10 +5635,11 @@ var CloudantV1 = /** @class */ (function (_super) {
5368
5635
  */
5369
5636
  CloudantV1.prototype.postRevsDiff = function (params) {
5370
5637
  var _params = __assign({}, params);
5371
- var requiredParams = ['db', 'documentRevisions'];
5372
- var missingParams = (0, ibm_cloud_sdk_core_1.getMissingParams)(_params, requiredParams);
5373
- if (missingParams) {
5374
- return Promise.reject(missingParams);
5638
+ var _requiredParams = ['db', 'documentRevisions'];
5639
+ var _validParams = ['db', 'documentRevisions', 'headers'];
5640
+ var _validationErrors = (0, ibm_cloud_sdk_core_1.validateParams)(_params, _requiredParams, _validParams);
5641
+ if (_validationErrors) {
5642
+ return Promise.reject(_validationErrors);
5375
5643
  }
5376
5644
  var body = _params.documentRevisions;
5377
5645
  var path = {
@@ -5406,10 +5674,11 @@ var CloudantV1 = /** @class */ (function (_super) {
5406
5674
  */
5407
5675
  CloudantV1.prototype.getShardsInformation = function (params) {
5408
5676
  var _params = __assign({}, params);
5409
- var requiredParams = ['db'];
5410
- var missingParams = (0, ibm_cloud_sdk_core_1.getMissingParams)(_params, requiredParams);
5411
- if (missingParams) {
5412
- return Promise.reject(missingParams);
5677
+ var _requiredParams = ['db'];
5678
+ var _validParams = ['db', 'headers'];
5679
+ var _validationErrors = (0, ibm_cloud_sdk_core_1.validateParams)(_params, _requiredParams, _validParams);
5680
+ if (_validationErrors) {
5681
+ return Promise.reject(_validationErrors);
5413
5682
  }
5414
5683
  var path = {
5415
5684
  'db': _params.db,
@@ -5443,10 +5712,11 @@ var CloudantV1 = /** @class */ (function (_super) {
5443
5712
  */
5444
5713
  CloudantV1.prototype.getDocumentShardsInfo = function (params) {
5445
5714
  var _params = __assign({}, params);
5446
- var requiredParams = ['db', 'docId'];
5447
- var missingParams = (0, ibm_cloud_sdk_core_1.getMissingParams)(_params, requiredParams);
5448
- if (missingParams) {
5449
- return Promise.reject(missingParams);
5715
+ var _requiredParams = ['db', 'docId'];
5716
+ var _validParams = ['db', 'docId', 'headers'];
5717
+ var _validationErrors = (0, ibm_cloud_sdk_core_1.validateParams)(_params, _requiredParams, _validParams);
5718
+ if (_validationErrors) {
5719
+ return Promise.reject(_validationErrors);
5450
5720
  }
5451
5721
  var path = {
5452
5722
  'db': _params.db,
@@ -5481,6 +5751,12 @@ var CloudantV1 = /** @class */ (function (_super) {
5481
5751
  */
5482
5752
  CloudantV1.prototype.headUpInformation = function (params) {
5483
5753
  var _params = __assign({}, params);
5754
+ var _requiredParams = [];
5755
+ var _validParams = ['headers'];
5756
+ var _validationErrors = (0, ibm_cloud_sdk_core_1.validateParams)(_params, _requiredParams, _validParams);
5757
+ if (_validationErrors) {
5758
+ return Promise.reject(_validationErrors);
5759
+ }
5484
5760
  var sdkHeaders = (0, common_1.getSdkHeaders)(CloudantV1.DEFAULT_SERVICE_NAME, 'v1', 'headUpInformation');
5485
5761
  var parameters = {
5486
5762
  options: {
@@ -5506,6 +5782,12 @@ var CloudantV1 = /** @class */ (function (_super) {
5506
5782
  */
5507
5783
  CloudantV1.prototype.getActiveTasks = function (params) {
5508
5784
  var _params = __assign({}, params);
5785
+ var _requiredParams = [];
5786
+ var _validParams = ['headers'];
5787
+ var _validationErrors = (0, ibm_cloud_sdk_core_1.validateParams)(_params, _requiredParams, _validParams);
5788
+ if (_validationErrors) {
5789
+ return Promise.reject(_validationErrors);
5790
+ }
5509
5791
  var sdkHeaders = (0, common_1.getSdkHeaders)(CloudantV1.DEFAULT_SERVICE_NAME, 'v1', 'getActiveTasks');
5510
5792
  var parameters = {
5511
5793
  options: {
@@ -5532,6 +5814,12 @@ var CloudantV1 = /** @class */ (function (_super) {
5532
5814
  */
5533
5815
  CloudantV1.prototype.getUpInformation = function (params) {
5534
5816
  var _params = __assign({}, params);
5817
+ var _requiredParams = [];
5818
+ var _validParams = ['headers'];
5819
+ var _validationErrors = (0, ibm_cloud_sdk_core_1.validateParams)(_params, _requiredParams, _validParams);
5820
+ if (_validationErrors) {
5821
+ return Promise.reject(_validationErrors);
5822
+ }
5535
5823
  var sdkHeaders = (0, common_1.getSdkHeaders)(CloudantV1.DEFAULT_SERVICE_NAME, 'v1', 'getUpInformation');
5536
5824
  var parameters = {
5537
5825
  options: {
@@ -5557,6 +5845,12 @@ var CloudantV1 = /** @class */ (function (_super) {
5557
5845
  */
5558
5846
  CloudantV1.prototype.getActivityTrackerEvents = function (params) {
5559
5847
  var _params = __assign({}, params);
5848
+ var _requiredParams = [];
5849
+ var _validParams = ['headers'];
5850
+ var _validationErrors = (0, ibm_cloud_sdk_core_1.validateParams)(_params, _requiredParams, _validParams);
5851
+ if (_validationErrors) {
5852
+ return Promise.reject(_validationErrors);
5853
+ }
5560
5854
  var sdkHeaders = (0, common_1.getSdkHeaders)(CloudantV1.DEFAULT_SERVICE_NAME, 'v1', 'getActivityTrackerEvents');
5561
5855
  var parameters = {
5562
5856
  options: {
@@ -5584,10 +5878,11 @@ var CloudantV1 = /** @class */ (function (_super) {
5584
5878
  */
5585
5879
  CloudantV1.prototype.postActivityTrackerEvents = function (params) {
5586
5880
  var _params = __assign({}, params);
5587
- var requiredParams = ['types'];
5588
- var missingParams = (0, ibm_cloud_sdk_core_1.getMissingParams)(_params, requiredParams);
5589
- if (missingParams) {
5590
- return Promise.reject(missingParams);
5881
+ var _requiredParams = ['types'];
5882
+ var _validParams = ['types', 'headers'];
5883
+ var _validationErrors = (0, ibm_cloud_sdk_core_1.validateParams)(_params, _requiredParams, _validParams);
5884
+ if (_validationErrors) {
5885
+ return Promise.reject(_validationErrors);
5591
5886
  }
5592
5887
  var body = {
5593
5888
  'types': _params.types,
@@ -5621,6 +5916,12 @@ var CloudantV1 = /** @class */ (function (_super) {
5621
5916
  */
5622
5917
  CloudantV1.prototype.getCurrentThroughputInformation = function (params) {
5623
5918
  var _params = __assign({}, params);
5919
+ var _requiredParams = [];
5920
+ var _validParams = ['headers'];
5921
+ var _validationErrors = (0, ibm_cloud_sdk_core_1.validateParams)(_params, _requiredParams, _validParams);
5922
+ if (_validationErrors) {
5923
+ return Promise.reject(_validationErrors);
5924
+ }
5624
5925
  var sdkHeaders = (0, common_1.getSdkHeaders)(CloudantV1.DEFAULT_SERVICE_NAME, 'v1', 'getCurrentThroughputInformation');
5625
5926
  var parameters = {
5626
5927
  options: {