@ibm-cloud/cloudant 0.8.2 → 0.9.0

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.d.ts CHANGED
@@ -132,6 +132,8 @@ declare class CloudantV1 extends CloudantBaseService {
132
132
  * and might repeat changes. Polling modes for this method work like polling modes for the changes feed.
133
133
  *
134
134
  * @param {Object} [params] - The parameters to send to the service.
135
+ * @param {boolean} [params.descending] - Query parameter to specify whether to return the documents in descending by
136
+ * key order.
135
137
  * @param {string} [params.feed] - Query parameter to specify the changes feed type.
136
138
  * @param {number} [params.heartbeat] - Query parameter to specify the period in milliseconds after which an empty
137
139
  * line is sent in the results. Off by default and only applicable for
@@ -145,6 +147,8 @@ declare class CloudantV1 extends CloudantBaseService {
145
147
  * * Switch to scheduled usage of one of the non-continuous changes feed types
146
148
  * (`normal` or `longpoll`).
147
149
  * * Use TCP keepalive.
150
+ * @param {number} [params.limit] - Query parameter to specify the number of returned documents to limit the result
151
+ * to.
148
152
  * @param {number} [params.timeout] - Query parameter to specify the maximum period in milliseconds to wait for a
149
153
  * change before the response is sent, even if there are no results. Only applicable for `longpoll` or `continuous`
150
154
  * feeds. Default value is specified by `httpd/changes_timeout` configuration option. Note that `60000` value is also
@@ -2663,8 +2667,10 @@ declare namespace CloudantV1 {
2663
2667
  interface EmptyObject {
2664
2668
  }
2665
2669
  /** A standard JS object, defined to avoid the limitations of `Object` and `object` */
2666
- interface JsonObject {
2670
+ class JsonObject {
2667
2671
  [key: string]: any;
2672
+ static serialize(obj: any): any;
2673
+ static deserialize(obj: any): any;
2668
2674
  }
2669
2675
  /*************************
2670
2676
  * request interfaces
@@ -2697,6 +2703,8 @@ declare namespace CloudantV1 {
2697
2703
  }
2698
2704
  /** Parameters for the `getDbUpdates` operation. */
2699
2705
  interface GetDbUpdatesParams {
2706
+ /** Query parameter to specify whether to return the documents in descending by key order. */
2707
+ descending?: boolean;
2700
2708
  /** Query parameter to specify the changes feed type. */
2701
2709
  feed?: GetDbUpdatesConstants.Feed | string;
2702
2710
  /** Query parameter to specify the period in milliseconds after which an empty line is sent in the results. Off
@@ -2713,6 +2721,8 @@ declare namespace CloudantV1 {
2713
2721
  * * Use TCP keepalive.
2714
2722
  */
2715
2723
  heartbeat?: number;
2724
+ /** Query parameter to specify the number of returned documents to limit the result to. */
2725
+ limit?: number;
2716
2726
  /** Query parameter to specify the maximum period in milliseconds to wait for a change before the response is
2717
2727
  * sent, even if there are no results. Only applicable for `longpoll` or `continuous` feeds. Default value is
2718
2728
  * specified by `httpd/changes_timeout` configuration option. Note that `60000` value is also the default maximum
@@ -5581,21 +5591,21 @@ declare namespace CloudantV1 {
5581
5591
  * model interfaces
5582
5592
  ************************/
5583
5593
  /** Schema for information about a running task. */
5584
- interface ActiveTask {
5594
+ class ActiveTask {
5585
5595
  /** The total count of attempted doc revisions fetched with `_bulk_get`. Available for `replication` type tasks. */
5586
- bulk_get_attempts?: number;
5596
+ bulkGetAttempts?: number;
5587
5597
  /** The total count of successful docs fetched with `_bulk_get`. Available for `replication` type tasks. */
5588
- bulk_get_docs?: number;
5598
+ bulkGetDocs?: number;
5589
5599
  /** Processed changes. Available for `database_compaction`, `indexer`, `search_indexer`, `view_compaction` type
5590
5600
  * tasks.
5591
5601
  */
5592
- changes_done?: number;
5602
+ changesDone?: number;
5593
5603
  /** The count of changes not yet replicated. Available for `replication` type tasks. */
5594
- changes_pending?: number;
5604
+ changesPending?: number;
5595
5605
  /** Specifies the checkpoint interval in ms. Available for `replication` type tasks. */
5596
- checkpoint_interval?: number;
5606
+ checkpointInterval?: number;
5597
5607
  /** The source sequence id which was last successfully replicated. Available for `replication` type tasks. */
5598
- checkpointed_source_seq?: string;
5608
+ checkpointedSourceSeq?: string;
5599
5609
  /** The replication configured to be continuous. Available for `replication` type tasks. */
5600
5610
  continuous?: boolean;
5601
5611
  /** Source database. */
@@ -5603,21 +5613,21 @@ declare namespace CloudantV1 {
5603
5613
  /** The design document that belongs to this task. Available for `indexer`, `search_indexer`, `view_compaction`
5604
5614
  * type tasks.
5605
5615
  */
5606
- design_document?: string;
5616
+ designDocument?: string;
5607
5617
  /** Replication document ID. Available for `replication` type tasks. */
5608
- doc_id?: string;
5618
+ docId?: string;
5609
5619
  /** Number of document write failures. Available for `replication` type tasks. */
5610
- doc_write_failures?: number;
5620
+ docWriteFailures?: number;
5611
5621
  /** Number of documents read. Available for `replication` type tasks. */
5612
- docs_read?: number;
5622
+ docsRead?: number;
5613
5623
  /** Number of documents written to target. Available for `replication` type tasks. */
5614
- docs_written?: number;
5624
+ docsWritten?: number;
5615
5625
  /** The search index that belongs to this task. Available for `search_indexer` type tasks. */
5616
5626
  index?: string;
5617
5627
  /** Indexer process ID. Available for `indexer` type tasks. */
5618
- indexer_pid?: string;
5628
+ indexerPid?: string;
5619
5629
  /** The count of docs which have been read from the source. Available for `replication` type tasks. */
5620
- missing_revisions_found?: number;
5630
+ missingRevisionsFound?: number;
5621
5631
  /** Cluster node where the task is running. */
5622
5632
  node: string;
5623
5633
  /** The phase the active task is in. `docid_sort`, `docid_copy`, `document_copy` phases are available for
@@ -5627,13 +5637,13 @@ declare namespace CloudantV1 {
5627
5637
  /** Process ID. */
5628
5638
  pid: string;
5629
5639
  /** Process status. */
5630
- process_status?: ActiveTask.Constants.ProcessStatus | string;
5640
+ processStatus?: ActiveTask.Constants.ProcessStatus | string;
5631
5641
  /** Current percentage progress. Available for `database_compaction`, `indexer`, `search_indexer`,
5632
5642
  * `view_compaction` type tasks.
5633
5643
  */
5634
5644
  progress?: number;
5635
5645
  /** Replication ID. Available for `replication` type tasks. */
5636
- replication_id?: string;
5646
+ replicationId?: string;
5637
5647
  /** Indicates whether a compaction retry is currently running on the database. Available for
5638
5648
  * `database_compaction` type tasks.
5639
5649
  */
@@ -5641,31 +5651,33 @@ declare namespace CloudantV1 {
5641
5651
  /** The count of revisions which have been checked since this replication began. Available for `replication`
5642
5652
  * type tasks.
5643
5653
  */
5644
- revisions_checked?: number;
5654
+ revisionsChecked?: number;
5645
5655
  /** Replication source. Available for `replication` type tasks. */
5646
5656
  source?: string;
5647
5657
  /** The last sequence number obtained from the source database changes feed. Available for `replication` type
5648
5658
  * tasks.
5649
5659
  */
5650
- source_seq?: string;
5660
+ sourceSeq?: string;
5651
5661
  /** Schema for a Unix epoch timestamp. */
5652
- started_on: number;
5662
+ startedOn: number;
5653
5663
  /** Replication target. Available for `replication` type tasks. */
5654
5664
  target?: string;
5655
5665
  /** The last sequence number processed by the replicator. Available for `replication` type tasks. */
5656
- through_seq?: string;
5666
+ throughSeq?: string;
5657
5667
  /** Total changes to process. Available for `database_compaction`, `indexer`, `search_indexer`,
5658
5668
  * `view_compaction` type tasks.
5659
5669
  */
5660
- total_changes?: number;
5670
+ totalChanges?: number;
5661
5671
  /** Operation type. */
5662
5672
  type: ActiveTask.Constants.Type | string;
5663
5673
  /** Schema for a Unix epoch timestamp. */
5664
- updated_on: number;
5674
+ updatedOn: number;
5665
5675
  /** Name of user running replication or owning the indexer. Available for `indexer`, `replication` type tasks. */
5666
- user?: string;
5676
+ user?: string | null;
5667
5677
  /** Number of view indexes. Available for `view_compaction` type tasks. */
5668
5678
  view?: number;
5679
+ static serialize(obj: any): ActiveTask.Transport;
5680
+ static deserialize(obj: any): ActiveTask;
5669
5681
  }
5670
5682
  namespace ActiveTask {
5671
5683
  namespace Constants {
@@ -5695,13 +5707,51 @@ declare namespace CloudantV1 {
5695
5707
  VIEW_COMPACTION = "view_compaction"
5696
5708
  }
5697
5709
  }
5710
+ interface Transport {
5711
+ bulk_get_attempts?: number;
5712
+ bulk_get_docs?: number;
5713
+ changes_done?: number;
5714
+ changes_pending?: number;
5715
+ checkpoint_interval?: number;
5716
+ checkpointed_source_seq?: string;
5717
+ continuous?: boolean;
5718
+ database: string;
5719
+ design_document?: string;
5720
+ doc_id?: string;
5721
+ doc_write_failures?: number;
5722
+ docs_read?: number;
5723
+ docs_written?: number;
5724
+ index?: string;
5725
+ indexer_pid?: string;
5726
+ missing_revisions_found?: number;
5727
+ node: string;
5728
+ phase?: string;
5729
+ pid: string;
5730
+ process_status?: string;
5731
+ progress?: number;
5732
+ replication_id?: string;
5733
+ retry?: boolean;
5734
+ revisions_checked?: number;
5735
+ source?: string;
5736
+ source_seq?: string;
5737
+ started_on: number;
5738
+ target?: string;
5739
+ through_seq?: string;
5740
+ total_changes?: number;
5741
+ type: string;
5742
+ updated_on: number;
5743
+ user?: string;
5744
+ view?: number;
5745
+ }
5698
5746
  }
5699
5747
  /** Schema for Activity Tracker events. */
5700
- interface ActivityTrackerEvents {
5748
+ class ActivityTrackerEvents {
5701
5749
  /** An array of event types that are being sent to IBM Cloud Activity Tracker for the IBM Cloudant instance.
5702
5750
  * "management" is a required element of this array.
5703
5751
  */
5704
5752
  types: ActivityTrackerEvents.Constants.Types[] | string[];
5753
+ static serialize(obj: any): ActivityTrackerEvents.Transport;
5754
+ static deserialize(obj: any): ActivityTrackerEvents;
5705
5755
  }
5706
5756
  namespace ActivityTrackerEvents {
5707
5757
  namespace Constants {
@@ -5711,20 +5761,30 @@ declare namespace CloudantV1 {
5711
5761
  DATA = "data"
5712
5762
  }
5713
5763
  }
5764
+ interface Transport {
5765
+ types: string[];
5766
+ }
5714
5767
  }
5715
5768
  /** Schema for the result of an all documents queries operation. */
5716
- interface AllDocsQueriesResult {
5769
+ class AllDocsQueriesResult {
5717
5770
  /** An array of result objects - one for each query. Each result object contains the same fields as the response
5718
5771
  * to a regular `/_all_docs` request.
5719
5772
  */
5720
5773
  results: AllDocsResult[];
5774
+ static serialize(obj: any): AllDocsQueriesResult.Transport;
5775
+ static deserialize(obj: any): AllDocsQueriesResult;
5776
+ }
5777
+ namespace AllDocsQueriesResult {
5778
+ interface Transport {
5779
+ results: AllDocsResult[];
5780
+ }
5721
5781
  }
5722
5782
  /** Schema for an all documents query operation. */
5723
- interface AllDocsQuery {
5783
+ class AllDocsQuery {
5724
5784
  /** Parameter to specify whether to include the encoding information in attachment stubs if the particular
5725
5785
  * attachment is compressed.
5726
5786
  */
5727
- att_encoding_info?: boolean;
5787
+ attEncodingInfo?: boolean;
5728
5788
  /** Parameter to specify whether to include attachments bodies in a response. */
5729
5789
  attachments?: boolean;
5730
5790
  /** Parameter to specify whether to include a list of conflicted revisions in each returned document. Active
@@ -5734,9 +5794,9 @@ declare namespace CloudantV1 {
5734
5794
  /** Parameter to specify whether to return the documents in descending by key order. */
5735
5795
  descending?: boolean;
5736
5796
  /** Parameter to specify whether to include the full content of the documents in the response. */
5737
- include_docs?: boolean;
5797
+ includeDocs?: boolean;
5738
5798
  /** Parameter to specify whether the specified end key should be included in the result. */
5739
- inclusive_end?: boolean;
5799
+ inclusiveEnd?: boolean;
5740
5800
  /** Parameter to specify the number of returned documents to limit the result to. */
5741
5801
  limit?: number;
5742
5802
  /** Parameter to specify the number of records before starting to return the results. */
@@ -5744,27 +5804,55 @@ declare namespace CloudantV1 {
5744
5804
  /** Parameter to specify whether to include in the response an update_seq value indicating the sequence id of
5745
5805
  * the database the view reflects.
5746
5806
  */
5747
- update_seq?: boolean;
5807
+ updateSeq?: boolean;
5748
5808
  /** Schema for a document ID. */
5749
- end_key?: string;
5809
+ endKey?: string;
5750
5810
  /** Schema for a document ID. */
5751
5811
  key?: string;
5752
5812
  /** Schema for a list of document IDs. */
5753
5813
  keys?: string[];
5754
5814
  /** Schema for a document ID. */
5755
- start_key?: string;
5815
+ startKey?: string;
5816
+ static serialize(obj: any): AllDocsQuery.Transport;
5817
+ static deserialize(obj: any): AllDocsQuery;
5818
+ }
5819
+ namespace AllDocsQuery {
5820
+ interface Transport {
5821
+ att_encoding_info?: boolean;
5822
+ attachments?: boolean;
5823
+ conflicts?: boolean;
5824
+ descending?: boolean;
5825
+ include_docs?: boolean;
5826
+ inclusive_end?: boolean;
5827
+ limit?: number;
5828
+ skip?: number;
5829
+ update_seq?: boolean;
5830
+ end_key?: string;
5831
+ key?: string;
5832
+ keys?: string[];
5833
+ start_key?: string;
5834
+ }
5756
5835
  }
5757
5836
  /** Schema for the result of an all documents operation. */
5758
- interface AllDocsResult {
5837
+ class AllDocsResult {
5759
5838
  /** Number of total rows. */
5760
- total_rows: number;
5839
+ totalRows: number | null;
5761
5840
  /** List of doc results. */
5762
5841
  rows: DocsResultRow[];
5763
5842
  /** Current update sequence for the database. */
5764
- update_seq?: string;
5843
+ updateSeq?: string;
5844
+ static serialize(obj: any): AllDocsResult.Transport;
5845
+ static deserialize(obj: any): AllDocsResult;
5846
+ }
5847
+ namespace AllDocsResult {
5848
+ interface Transport {
5849
+ total_rows: number;
5850
+ rows: DocsResultRow[];
5851
+ update_seq?: string;
5852
+ }
5765
5853
  }
5766
5854
  /** Schema for a full text search analyzer. */
5767
- interface Analyzer {
5855
+ class Analyzer {
5768
5856
  /** Schema for the name of the Apache Lucene analyzer to use for text indexing. The default value varies
5769
5857
  * depending on the analyzer usage:
5770
5858
  * * For search indexes the default is `standard` * For query text indexes the default is `keyword` * For a query
@@ -5773,6 +5861,8 @@ declare namespace CloudantV1 {
5773
5861
  name?: Analyzer.Constants.Name | string;
5774
5862
  /** Custom stopwords to use with the named analyzer. */
5775
5863
  stopwords?: string[];
5864
+ static serialize(obj: any): Analyzer.Transport;
5865
+ static deserialize(obj: any): Analyzer;
5776
5866
  }
5777
5867
  namespace Analyzer {
5778
5868
  namespace Constants {
@@ -5821,9 +5911,13 @@ declare namespace CloudantV1 {
5821
5911
  PERFIELD = "perfield"
5822
5912
  }
5823
5913
  }
5914
+ interface Transport {
5915
+ name?: string;
5916
+ stopwords?: string[];
5917
+ }
5824
5918
  }
5825
5919
  /** Schema for a search analyzer configuration. */
5826
- interface AnalyzerConfiguration {
5920
+ class AnalyzerConfiguration {
5827
5921
  /** Schema for the name of the Apache Lucene analyzer to use for text indexing. The default value varies
5828
5922
  * depending on the analyzer usage:
5829
5923
  * * For search indexes the default is `standard` * For query text indexes the default is `keyword` * For a query
@@ -5833,7 +5927,11 @@ declare namespace CloudantV1 {
5833
5927
  /** Custom stopwords to use with the named analyzer. */
5834
5928
  stopwords?: string[];
5835
5929
  /** Schema for mapping a field name to a per field analyzer. */
5836
- fields?: JsonObject;
5930
+ fields?: {
5931
+ [key: string]: Analyzer;
5932
+ };
5933
+ static serialize(obj: any): AnalyzerConfiguration.Transport;
5934
+ static deserialize(obj: any): AnalyzerConfiguration;
5837
5935
  }
5838
5936
  namespace AnalyzerConfiguration {
5839
5937
  namespace Constants {
@@ -5882,20 +5980,36 @@ declare namespace CloudantV1 {
5882
5980
  PERFIELD = "perfield"
5883
5981
  }
5884
5982
  }
5983
+ interface Transport {
5984
+ name?: string;
5985
+ stopwords?: string[];
5986
+ fields?: {
5987
+ [key: string]: Analyzer.Transport;
5988
+ };
5989
+ }
5885
5990
  }
5886
5991
  /** Schema for api keys. */
5887
- interface ApiKeysResult {
5992
+ class ApiKeysResult {
5888
5993
  /** ok. */
5889
5994
  ok: boolean;
5890
5995
  /** The generated api key. */
5891
5996
  key: string;
5892
5997
  /** The password associated with the api key. */
5893
5998
  password: string;
5999
+ static serialize(obj: any): ApiKeysResult.Transport;
6000
+ static deserialize(obj: any): ApiKeysResult;
6001
+ }
6002
+ namespace ApiKeysResult {
6003
+ interface Transport {
6004
+ ok: boolean;
6005
+ key: string;
6006
+ password: string;
6007
+ }
5894
6008
  }
5895
6009
  /** Schema for an attachment. */
5896
- interface Attachment {
6010
+ class Attachment {
5897
6011
  /** Attachment MIME type. */
5898
- content_type?: string;
6012
+ contentType?: string;
5899
6013
  /** Base64-encoded content. Available if attachment content is requested by using the query parameters
5900
6014
  * `attachments=true` or `atts_since`. Note that when used with a view or changes feed `include_docs` must also be
5901
6015
  * `true`.
@@ -5909,7 +6023,7 @@ declare namespace CloudantV1 {
5909
6023
  * attachment was added and the query parameter `att_encoding_info` is `true`. Note that when used with a view or
5910
6024
  * changes feed `include_docs` must also be `true`.
5911
6025
  */
5912
- encoded_length?: number;
6026
+ encodedLength?: number;
5913
6027
  /** Compression codec. Available if content_type was in list of compressible types when the attachment was added
5914
6028
  * and the and the query parameter `att_encoding_info` is `true`. Note that when used with a view or changes feed
5915
6029
  * `include_docs` must also be `true`.
@@ -5923,79 +6037,172 @@ declare namespace CloudantV1 {
5923
6037
  revpos?: number;
5924
6038
  /** Has `true` value if object contains stub info and no content. Otherwise omitted in response. */
5925
6039
  stub?: boolean;
6040
+ static serialize(obj: any): Attachment.Transport;
6041
+ static deserialize(obj: any): Attachment;
6042
+ }
6043
+ namespace Attachment {
6044
+ interface Transport {
6045
+ content_type?: string;
6046
+ data?: string;
6047
+ digest?: string;
6048
+ encoded_length?: number;
6049
+ encoding?: string;
6050
+ follows?: boolean;
6051
+ length?: number;
6052
+ revpos?: number;
6053
+ stub?: boolean;
6054
+ }
5926
6055
  }
5927
6056
  /** Schema for submitting documents for bulk modifications. */
5928
- interface BulkDocs {
6057
+ class BulkDocs {
5929
6058
  /** Array of documents. */
5930
6059
  docs: Document[];
5931
6060
  /** If `false`, prevents the database from assigning them new revision IDs. Default is `true`. */
5932
- new_edits?: boolean;
6061
+ newEdits?: boolean;
6062
+ static serialize(obj: any): BulkDocs.Transport;
6063
+ static deserialize(obj: any): BulkDocs;
6064
+ }
6065
+ namespace BulkDocs {
6066
+ interface Transport {
6067
+ docs: Document[];
6068
+ new_edits?: boolean;
6069
+ }
5933
6070
  }
5934
6071
  /** Schema for a document item in a bulk get query. */
5935
- interface BulkGetQueryDocument {
6072
+ class BulkGetQueryDocument {
5936
6073
  /** Includes attachments only since specified revisions. */
5937
- atts_since?: string[];
6074
+ attsSince?: string[];
5938
6075
  /** Schema for a document ID. */
5939
6076
  id: string;
5940
6077
  /** Schema for a document revision identifier. */
5941
6078
  rev?: string;
6079
+ static serialize(obj: any): BulkGetQueryDocument.Transport;
6080
+ static deserialize(obj: any): BulkGetQueryDocument;
6081
+ }
6082
+ namespace BulkGetQueryDocument {
6083
+ interface Transport {
6084
+ atts_since?: string[];
6085
+ id: string;
6086
+ rev?: string;
6087
+ }
5942
6088
  }
5943
6089
  /** Schema for the results object of a bulk get operation. */
5944
- interface BulkGetResult {
6090
+ class BulkGetResult {
5945
6091
  /** Results. */
5946
6092
  results: BulkGetResultItem[];
6093
+ static serialize(obj: any): BulkGetResult.Transport;
6094
+ static deserialize(obj: any): BulkGetResult;
6095
+ }
6096
+ namespace BulkGetResult {
6097
+ interface Transport {
6098
+ results: BulkGetResultItem[];
6099
+ }
5947
6100
  }
5948
6101
  /** Schema for BulkGetResult object containing a successfully retrieved document or error information. */
5949
- interface BulkGetResultDocument {
6102
+ class BulkGetResultDocument {
5950
6103
  /** Schema for the result of a document modification. */
5951
6104
  error?: DocumentResult;
5952
6105
  /** Schema for a document. */
5953
6106
  ok?: Document;
6107
+ static serialize(obj: any): BulkGetResultDocument.Transport;
6108
+ static deserialize(obj: any): BulkGetResultDocument;
6109
+ }
6110
+ namespace BulkGetResultDocument {
6111
+ interface Transport {
6112
+ error?: DocumentResult.Transport;
6113
+ ok?: Document.Transport;
6114
+ }
5954
6115
  }
5955
6116
  /** Schema for the document revisions information from a bulk get operation. */
5956
- interface BulkGetResultItem {
6117
+ class BulkGetResultItem {
5957
6118
  /** Array of document revisions or error information. */
5958
6119
  docs: BulkGetResultDocument[];
5959
6120
  /** Schema for a document ID. */
5960
6121
  id: string;
6122
+ static serialize(obj: any): BulkGetResultItem.Transport;
6123
+ static deserialize(obj: any): BulkGetResultItem;
6124
+ }
6125
+ namespace BulkGetResultItem {
6126
+ interface Transport {
6127
+ docs: BulkGetResultDocument[];
6128
+ id: string;
6129
+ }
5961
6130
  }
5962
6131
  /** Schema for information about the currently provisioned and target throughput capacity. */
5963
- interface CapacityThroughputInformation {
6132
+ class CapacityThroughputInformation {
5964
6133
  /** Detailed information about provisioned throughput capacity. */
5965
6134
  current: CapacityThroughputInformationCurrent;
5966
6135
  /** Detailed information about target throughput capacity. */
5967
6136
  target?: CapacityThroughputInformationTarget;
6137
+ static serialize(obj: any): CapacityThroughputInformation.Transport;
6138
+ static deserialize(obj: any): CapacityThroughputInformation;
6139
+ }
6140
+ namespace CapacityThroughputInformation {
6141
+ interface Transport {
6142
+ current: CapacityThroughputInformationCurrent.Transport;
6143
+ target?: CapacityThroughputInformationTarget.Transport;
6144
+ }
5968
6145
  }
5969
6146
  /** Detailed information about provisioned throughput capacity. */
5970
- interface CapacityThroughputInformationCurrent {
6147
+ class CapacityThroughputInformationCurrent {
5971
6148
  /** Schema for detailed information about throughput capacity with breakdown by specific throughput requests
5972
6149
  * classes.
5973
6150
  */
5974
6151
  throughput: ThroughputInformation;
6152
+ static serialize(obj: any): CapacityThroughputInformationCurrent.Transport;
6153
+ static deserialize(obj: any): CapacityThroughputInformationCurrent;
6154
+ }
6155
+ namespace CapacityThroughputInformationCurrent {
6156
+ interface Transport {
6157
+ throughput: ThroughputInformation.Transport;
6158
+ }
5975
6159
  }
5976
6160
  /** Detailed information about target throughput capacity. */
5977
- interface CapacityThroughputInformationTarget {
6161
+ class CapacityThroughputInformationTarget {
5978
6162
  /** Schema for detailed information about throughput capacity with breakdown by specific throughput requests
5979
6163
  * classes.
5980
6164
  */
5981
6165
  throughput: ThroughputInformation;
6166
+ static serialize(obj: any): CapacityThroughputInformationTarget.Transport;
6167
+ static deserialize(obj: any): CapacityThroughputInformationTarget;
6168
+ }
6169
+ namespace CapacityThroughputInformationTarget {
6170
+ interface Transport {
6171
+ throughput: ThroughputInformation.Transport;
6172
+ }
5982
6173
  }
5983
6174
  /** Schema for a document leaf with single field rev. */
5984
- interface Change {
6175
+ class Change {
5985
6176
  /** Schema for a document revision identifier. */
5986
6177
  rev: string;
6178
+ static serialize(obj: any): Change.Transport;
6179
+ static deserialize(obj: any): Change;
6180
+ }
6181
+ namespace Change {
6182
+ interface Transport {
6183
+ rev: string;
6184
+ }
5987
6185
  }
5988
6186
  /** Schema for normal changes feed result. */
5989
- interface ChangesResult {
6187
+ class ChangesResult {
5990
6188
  /** last_seq. */
5991
- last_seq: string;
6189
+ lastSeq: string;
5992
6190
  /** pending. */
5993
6191
  pending: number;
5994
6192
  /** results. */
5995
6193
  results: ChangesResultItem[];
6194
+ static serialize(obj: any): ChangesResult.Transport;
6195
+ static deserialize(obj: any): ChangesResult;
6196
+ }
6197
+ namespace ChangesResult {
6198
+ interface Transport {
6199
+ last_seq: string;
6200
+ pending: number;
6201
+ results: ChangesResultItem[];
6202
+ }
5996
6203
  }
5997
6204
  /** Schema for an item in the changes results array. */
5998
- interface ChangesResultItem {
6205
+ class ChangesResultItem {
5999
6206
  /** List of document's leaves with single field rev. */
6000
6207
  changes: Change[];
6001
6208
  /** if `true` then the document is deleted. */
@@ -6006,62 +6213,107 @@ declare namespace CloudantV1 {
6006
6213
  id: string;
6007
6214
  /** Update sequence. */
6008
6215
  seq: string;
6216
+ static serialize(obj: any): ChangesResultItem.Transport;
6217
+ static deserialize(obj: any): ChangesResultItem;
6218
+ }
6219
+ namespace ChangesResultItem {
6220
+ interface Transport {
6221
+ changes: Change[];
6222
+ deleted?: boolean;
6223
+ doc?: Document.Transport;
6224
+ id: string;
6225
+ seq: string;
6226
+ }
6009
6227
  }
6010
6228
  /** Schema for size information of content. */
6011
- interface ContentInformationSizes {
6229
+ class ContentInformationSizes {
6012
6230
  /** The active size of the content, in bytes. */
6013
6231
  active: number;
6014
6232
  /** The total uncompressed size of the content, in bytes. */
6015
6233
  external: number;
6016
6234
  /** The total size of the content as stored on disk, in bytes. */
6017
6235
  file: number;
6236
+ static serialize(obj: any): ContentInformationSizes.Transport;
6237
+ static deserialize(obj: any): ContentInformationSizes;
6238
+ }
6239
+ namespace ContentInformationSizes {
6240
+ interface Transport {
6241
+ active: number;
6242
+ external: number;
6243
+ file: number;
6244
+ }
6018
6245
  }
6019
6246
  /** Schema for information about the CORS configuration. */
6020
- interface CorsInformation {
6247
+ class CorsInformation {
6021
6248
  /** Boolean value to allow authentication credentials. If set to true, browser requests must be done by using
6022
6249
  * withCredentials = true.
6023
6250
  */
6024
- allow_credentials: boolean;
6251
+ allowCredentials: boolean;
6025
6252
  /** Boolean value to turn CORS on and off. */
6026
- enable_cors: boolean;
6253
+ enableCors: boolean;
6027
6254
  /** An array of strings that contain allowed origin domains. You have to specify the full URL including the
6028
6255
  * protocol. It is recommended that only the HTTPS protocol is used. Subdomains count as separate domains, so you
6029
6256
  * have to specify all subdomains used.
6030
6257
  */
6031
6258
  origins: string[];
6259
+ static serialize(obj: any): CorsInformation.Transport;
6260
+ static deserialize(obj: any): CorsInformation;
6261
+ }
6262
+ namespace CorsInformation {
6263
+ interface Transport {
6264
+ allow_credentials: boolean;
6265
+ enable_cors: boolean;
6266
+ origins: string[];
6267
+ }
6032
6268
  }
6033
6269
  /** Schema for information about current consumption of a provisioned throughput capacity. */
6034
- interface CurrentThroughputInformation {
6270
+ class CurrentThroughputInformation {
6035
6271
  /** Detailed information about current consumption. */
6036
6272
  throughput: CurrentThroughputInformationThroughput;
6273
+ static serialize(obj: any): CurrentThroughputInformation.Transport;
6274
+ static deserialize(obj: any): CurrentThroughputInformation;
6275
+ }
6276
+ namespace CurrentThroughputInformation {
6277
+ interface Transport {
6278
+ throughput: CurrentThroughputInformationThroughput.Transport;
6279
+ }
6037
6280
  }
6038
6281
  /** Detailed information about current consumption. */
6039
- interface CurrentThroughputInformationThroughput {
6282
+ class CurrentThroughputInformationThroughput {
6040
6283
  /** Number of global queries conducted against the instance for a given second. */
6041
6284
  query: number;
6042
6285
  /** Number of reads conducted against the instance for a given second. */
6043
6286
  read: number;
6044
6287
  /** Number of writes conducted against the instance for a given second. */
6045
6288
  write: number;
6289
+ static serialize(obj: any): CurrentThroughputInformationThroughput.Transport;
6290
+ static deserialize(obj: any): CurrentThroughputInformationThroughput;
6291
+ }
6292
+ namespace CurrentThroughputInformationThroughput {
6293
+ interface Transport {
6294
+ query: number;
6295
+ read: number;
6296
+ write: number;
6297
+ }
6046
6298
  }
6047
6299
  /** Schema for information about a database. */
6048
- interface DatabaseInformation {
6300
+ class DatabaseInformation {
6049
6301
  /** Schema for database cluster information. */
6050
6302
  cluster: DatabaseInformationCluster;
6051
6303
  /** An opaque string that describes the committed state of the database. */
6052
- committed_update_seq?: string;
6304
+ committedUpdateSeq?: string;
6053
6305
  /** True if the database compaction routine is operating on this database. */
6054
- compact_running: boolean;
6306
+ compactRunning: boolean;
6055
6307
  /** An opaque string that describes the compaction state of the database. */
6056
- compacted_seq?: string;
6308
+ compactedSeq?: string;
6057
6309
  /** The name of the database. */
6058
- db_name: string;
6310
+ dbName: string;
6059
6311
  /** The version of the physical format used for the data when it is stored on disk. */
6060
- disk_format_version: number;
6312
+ diskFormatVersion: number;
6061
6313
  /** A count of the documents in the specified database. */
6062
- doc_count: number;
6314
+ docCount: number;
6063
6315
  /** Number of deleted documents. */
6064
- doc_del_count: number;
6316
+ docDelCount: number;
6065
6317
  /** The engine used for the database. */
6066
6318
  engine?: string;
6067
6319
  /** Schema for database properties. */
@@ -6071,14 +6323,34 @@ declare namespace CloudantV1 {
6071
6323
  /** An opaque string that describes the state of the database. Do not rely on this string for counting the
6072
6324
  * number of updates.
6073
6325
  */
6074
- update_seq: string;
6326
+ updateSeq: string;
6075
6327
  /** The UUID of the database. */
6076
6328
  uuid?: string;
6077
6329
  /** Information about database's partitioned indexes. */
6078
- partitioned_indexes?: PartitionedIndexesInformation;
6330
+ partitionedIndexes?: PartitionedIndexesInformation;
6331
+ static serialize(obj: any): DatabaseInformation.Transport;
6332
+ static deserialize(obj: any): DatabaseInformation;
6333
+ }
6334
+ namespace DatabaseInformation {
6335
+ interface Transport {
6336
+ cluster: DatabaseInformationCluster.Transport;
6337
+ committed_update_seq?: string;
6338
+ compact_running: boolean;
6339
+ compacted_seq?: string;
6340
+ db_name: string;
6341
+ disk_format_version: number;
6342
+ doc_count: number;
6343
+ doc_del_count: number;
6344
+ engine?: string;
6345
+ props: DatabaseInformationProps.Transport;
6346
+ sizes: ContentInformationSizes.Transport;
6347
+ update_seq: string;
6348
+ uuid?: string;
6349
+ partitioned_indexes?: PartitionedIndexesInformation.Transport;
6350
+ }
6079
6351
  }
6080
6352
  /** Schema for database cluster information. */
6081
- interface DatabaseInformationCluster {
6353
+ class DatabaseInformationCluster {
6082
6354
  /** Schema for the number of replicas of a database in a cluster. The cluster is using the default value and it
6083
6355
  * cannot be changed by the user.
6084
6356
  */
@@ -6089,20 +6361,39 @@ declare namespace CloudantV1 {
6089
6361
  r: number;
6090
6362
  /** Write quorum. The number of copies of a document that need to be written before a successful reply. */
6091
6363
  w: number;
6364
+ static serialize(obj: any): DatabaseInformationCluster.Transport;
6365
+ static deserialize(obj: any): DatabaseInformationCluster;
6366
+ }
6367
+ namespace DatabaseInformationCluster {
6368
+ interface Transport {
6369
+ n: number;
6370
+ q: number;
6371
+ r: number;
6372
+ w: number;
6373
+ }
6092
6374
  }
6093
6375
  /** Schema for database properties. */
6094
- interface DatabaseInformationProps {
6376
+ class DatabaseInformationProps {
6095
6377
  /** The value is `true` for a partitioned database. */
6096
6378
  partitioned?: boolean;
6379
+ static serialize(obj: any): DatabaseInformationProps.Transport;
6380
+ static deserialize(obj: any): DatabaseInformationProps;
6381
+ }
6382
+ namespace DatabaseInformationProps {
6383
+ interface Transport {
6384
+ partitioned?: boolean;
6385
+ }
6097
6386
  }
6098
6387
  /** Schema for a database change event. */
6099
- interface DbEvent {
6388
+ class DbEvent {
6100
6389
  /** Database name. */
6101
- db_name: string;
6390
+ dbName: string;
6102
6391
  /** Sequence number. */
6103
6392
  seq: string;
6104
6393
  /** A database event. */
6105
6394
  type: DbEvent.Constants.Type | string;
6395
+ static serialize(obj: any): DbEvent.Transport;
6396
+ static deserialize(obj: any): DbEvent;
6106
6397
  }
6107
6398
  namespace DbEvent {
6108
6399
  namespace Constants {
@@ -6113,27 +6404,51 @@ declare namespace CloudantV1 {
6113
6404
  UPDATED = "updated"
6114
6405
  }
6115
6406
  }
6407
+ interface Transport {
6408
+ db_name: string;
6409
+ seq: string;
6410
+ type: string;
6411
+ }
6116
6412
  }
6117
6413
  /** Schema for database updates. */
6118
- interface DbUpdates {
6414
+ class DbUpdates {
6119
6415
  /** Last sequence number. */
6120
- last_seq: string;
6416
+ lastSeq: string;
6121
6417
  /** results. */
6122
6418
  results: DbEvent[];
6419
+ static serialize(obj: any): DbUpdates.Transport;
6420
+ static deserialize(obj: any): DbUpdates;
6421
+ }
6422
+ namespace DbUpdates {
6423
+ interface Transport {
6424
+ last_seq: string;
6425
+ results: DbEvent[];
6426
+ }
6123
6427
  }
6124
6428
  /** Schema for database information keyed by database name. */
6125
- interface DbsInfoResult {
6429
+ class DbsInfoResult {
6126
6430
  /** The name of the error. */
6127
6431
  error?: string;
6128
6432
  /** Schema for information about a database. */
6129
6433
  info?: DatabaseInformation;
6130
6434
  /** Database name. */
6131
6435
  key: string;
6436
+ static serialize(obj: any): DbsInfoResult.Transport;
6437
+ static deserialize(obj: any): DbsInfoResult;
6438
+ }
6439
+ namespace DbsInfoResult {
6440
+ interface Transport {
6441
+ error?: string;
6442
+ info?: DatabaseInformation.Transport;
6443
+ key: string;
6444
+ }
6132
6445
  }
6133
6446
  /** Schema for a design document. */
6134
- interface DesignDocument {
6447
+ class DesignDocument {
6135
6448
  /** Schema for a map of attachment name to attachment metadata. */
6136
- _attachments?: JsonObject;
6449
+ _attachments?: {
6450
+ [key: string]: Attachment;
6451
+ };
6137
6452
  /** Schema for a list of document revision identifiers. */
6138
6453
  _conflicts?: string[];
6139
6454
  /** Deletion flag. Available if document was removed. */
@@ -6196,7 +6511,9 @@ declare namespace CloudantV1 {
6196
6511
  */
6197
6512
  filters?: JsonObject;
6198
6513
  /** Search (text) index function definitions. */
6199
- indexes?: JsonObject;
6514
+ indexes?: {
6515
+ [key: string]: SearchIndexDefinition;
6516
+ };
6200
6517
  /** Defines Query Server key to process design document functions. */
6201
6518
  language?: string;
6202
6519
  /** Schema for design document options. */
@@ -6227,32 +6544,79 @@ declare namespace CloudantV1 {
6227
6544
  * * `secObj` - Security Object, with lists of database security roles,
6228
6545
  * see the `SecurityObject`.
6229
6546
  */
6230
- validate_doc_update?: string;
6547
+ validateDocUpdate?: string;
6231
6548
  /** Schema for design document views. */
6232
- views?: JsonObject;
6549
+ views?: {
6550
+ [key: string]: DesignDocumentViewsMapReduce;
6551
+ };
6233
6552
  /** DesignDocument accepts additional properties. */
6234
6553
  [propName: string]: any;
6554
+ static serialize(obj: any): DesignDocument.Transport;
6555
+ static deserialize(obj: any): DesignDocument;
6556
+ }
6557
+ namespace DesignDocument {
6558
+ interface Transport {
6559
+ _attachments?: {
6560
+ [key: string]: Attachment.Transport;
6561
+ };
6562
+ _conflicts?: string[];
6563
+ _deleted?: boolean;
6564
+ _deleted_conflicts?: string[];
6565
+ _id?: string;
6566
+ _local_seq?: string;
6567
+ _rev?: string;
6568
+ _revisions?: Revisions.Transport;
6569
+ _revs_info?: DocumentRevisionStatus[];
6570
+ autoupdate?: boolean;
6571
+ filters?: JsonObject;
6572
+ indexes?: {
6573
+ [key: string]: SearchIndexDefinition.Transport;
6574
+ };
6575
+ language?: string;
6576
+ options?: DesignDocumentOptions.Transport;
6577
+ validate_doc_update?: string;
6578
+ views?: {
6579
+ [key: string]: DesignDocumentViewsMapReduce.Transport;
6580
+ };
6581
+ /** DesignDocument.DesignDocument.Transport accepts additional properties. */
6582
+ [propName: string]: any;
6583
+ }
6235
6584
  }
6236
6585
  /** Schema for information about a design document. */
6237
- interface DesignDocumentInformation {
6586
+ class DesignDocumentInformation {
6238
6587
  /** name. */
6239
6588
  name: string;
6240
6589
  /** View index information. */
6241
- view_index: DesignDocumentViewIndex;
6590
+ viewIndex: DesignDocumentViewIndex;
6591
+ static serialize(obj: any): DesignDocumentInformation.Transport;
6592
+ static deserialize(obj: any): DesignDocumentInformation;
6593
+ }
6594
+ namespace DesignDocumentInformation {
6595
+ interface Transport {
6596
+ name: string;
6597
+ view_index: DesignDocumentViewIndex.Transport;
6598
+ }
6242
6599
  }
6243
6600
  /** Schema for design document options. */
6244
- interface DesignDocumentOptions {
6601
+ class DesignDocumentOptions {
6245
6602
  /** Whether this design document describes partitioned or global indexes. */
6246
6603
  partitioned?: boolean;
6604
+ static serialize(obj: any): DesignDocumentOptions.Transport;
6605
+ static deserialize(obj: any): DesignDocumentOptions;
6606
+ }
6607
+ namespace DesignDocumentOptions {
6608
+ interface Transport {
6609
+ partitioned?: boolean;
6610
+ }
6247
6611
  }
6248
6612
  /** View index information. */
6249
- interface DesignDocumentViewIndex {
6613
+ class DesignDocumentViewIndex {
6250
6614
  /** List of collator versions. If there are multiple entries this implies a libicu upgrade has occurred but
6251
6615
  * compaction has not run yet.
6252
6616
  */
6253
- collator_versions: string[];
6617
+ collatorVersions: string[];
6254
6618
  /** Indicates whether a compaction routine is currently running on the view. */
6255
- compact_running: boolean;
6619
+ compactRunning: boolean;
6256
6620
  /** Language for the defined views. */
6257
6621
  language: string;
6258
6622
  /** MD5 signature of the views for the design document. */
@@ -6260,25 +6624,48 @@ declare namespace CloudantV1 {
6260
6624
  /** Schema for size information of content. */
6261
6625
  sizes: ContentInformationSizes;
6262
6626
  /** Indicates if the view is currently being updated. */
6263
- updater_running: boolean;
6627
+ updaterRunning: boolean;
6264
6628
  /** Schema for an ability to tell if view is up-to-date without querying it. */
6265
- updates_pending: UpdatesPending;
6629
+ updatesPending: UpdatesPending;
6266
6630
  /** Number of clients waiting on views from this design document. */
6267
- waiting_clients: number;
6631
+ waitingClients: number;
6268
6632
  /** Indicates if there are outstanding commits to the underlying database that need to processed. */
6269
- waiting_commit: boolean;
6633
+ waitingCommit: boolean;
6634
+ static serialize(obj: any): DesignDocumentViewIndex.Transport;
6635
+ static deserialize(obj: any): DesignDocumentViewIndex;
6636
+ }
6637
+ namespace DesignDocumentViewIndex {
6638
+ interface Transport {
6639
+ collator_versions: string[];
6640
+ compact_running: boolean;
6641
+ language: string;
6642
+ signature: string;
6643
+ sizes: ContentInformationSizes.Transport;
6644
+ updater_running: boolean;
6645
+ updates_pending: UpdatesPending.Transport;
6646
+ waiting_clients: number;
6647
+ waiting_commit: boolean;
6648
+ }
6270
6649
  }
6271
6650
  /** Schema for view functions definition. */
6272
- interface DesignDocumentViewsMapReduce {
6651
+ class DesignDocumentViewsMapReduce {
6273
6652
  /** JavaScript map function as a string. */
6274
6653
  map: string;
6275
6654
  /** JavaScript reduce function as a string. */
6276
6655
  reduce?: string;
6656
+ static serialize(obj: any): DesignDocumentViewsMapReduce.Transport;
6657
+ static deserialize(obj: any): DesignDocumentViewsMapReduce;
6658
+ }
6659
+ namespace DesignDocumentViewsMapReduce {
6660
+ interface Transport {
6661
+ map: string;
6662
+ reduce?: string;
6663
+ }
6277
6664
  }
6278
6665
  /** Schema for a row of document information in a DocsResult. */
6279
- interface DocsResultRow {
6666
+ class DocsResultRow {
6280
6667
  /** The cause of the error (if available). */
6281
- caused_by?: string;
6668
+ causedBy?: string;
6282
6669
  /** The name of the error. */
6283
6670
  error?: string;
6284
6671
  /** The reason the error occurred (if available). */
@@ -6291,18 +6678,41 @@ declare namespace CloudantV1 {
6291
6678
  key: string;
6292
6679
  /** Value of built-in `/_all_docs` style view. */
6293
6680
  value?: DocsResultRowValue;
6681
+ static serialize(obj: any): DocsResultRow.Transport;
6682
+ static deserialize(obj: any): DocsResultRow;
6683
+ }
6684
+ namespace DocsResultRow {
6685
+ interface Transport {
6686
+ caused_by?: string;
6687
+ error?: string;
6688
+ reason?: string;
6689
+ doc?: Document.Transport;
6690
+ id?: string;
6691
+ key: string;
6692
+ value?: DocsResultRowValue.Transport;
6693
+ }
6294
6694
  }
6295
6695
  /** Value of built-in `/_all_docs` style view. */
6296
- interface DocsResultRowValue {
6696
+ class DocsResultRowValue {
6297
6697
  /** If `true` then the document is deleted. Not present for undeleted documents. */
6298
6698
  deleted?: boolean;
6299
6699
  /** Schema for a document revision identifier. */
6300
6700
  rev: string;
6701
+ static serialize(obj: any): DocsResultRowValue.Transport;
6702
+ static deserialize(obj: any): DocsResultRowValue;
6703
+ }
6704
+ namespace DocsResultRowValue {
6705
+ interface Transport {
6706
+ deleted?: boolean;
6707
+ rev: string;
6708
+ }
6301
6709
  }
6302
6710
  /** Schema for a document. */
6303
- interface Document {
6711
+ class Document {
6304
6712
  /** Schema for a map of attachment name to attachment metadata. */
6305
- _attachments?: JsonObject;
6713
+ _attachments?: {
6714
+ [key: string]: Attachment;
6715
+ };
6306
6716
  /** Schema for a list of document revision identifiers. */
6307
6717
  _conflicts?: string[];
6308
6718
  /** Deletion flag. Available if document was removed. */
@@ -6321,9 +6731,28 @@ declare namespace CloudantV1 {
6321
6731
  _revs_info?: DocumentRevisionStatus[];
6322
6732
  /** Document accepts additional properties. */
6323
6733
  [propName: string]: any;
6734
+ static serialize(obj: any): Document.Transport;
6735
+ static deserialize(obj: any): Document;
6736
+ }
6737
+ namespace Document {
6738
+ interface Transport {
6739
+ _attachments?: {
6740
+ [key: string]: Attachment.Transport;
6741
+ };
6742
+ _conflicts?: string[];
6743
+ _deleted?: boolean;
6744
+ _deleted_conflicts?: string[];
6745
+ _id?: string;
6746
+ _local_seq?: string;
6747
+ _rev?: string;
6748
+ _revisions?: Revisions.Transport;
6749
+ _revs_info?: DocumentRevisionStatus[];
6750
+ /** Document.Document.Transport accepts additional properties. */
6751
+ [propName: string]: any;
6752
+ }
6324
6753
  }
6325
6754
  /** Schema for the result of a document modification. */
6326
- interface DocumentResult {
6755
+ class DocumentResult {
6327
6756
  /** Schema for a document ID. */
6328
6757
  id: string;
6329
6758
  /** Schema for a document revision identifier. */
@@ -6331,20 +6760,34 @@ declare namespace CloudantV1 {
6331
6760
  /** ok. */
6332
6761
  ok?: boolean;
6333
6762
  /** The cause of the error (if available). */
6334
- caused_by?: string;
6763
+ causedBy?: string;
6335
6764
  /** The name of the error. */
6336
6765
  error?: string;
6337
6766
  /** The reason the error occurred (if available). */
6338
6767
  reason?: string;
6768
+ static serialize(obj: any): DocumentResult.Transport;
6769
+ static deserialize(obj: any): DocumentResult;
6770
+ }
6771
+ namespace DocumentResult {
6772
+ interface Transport {
6773
+ id: string;
6774
+ rev?: string;
6775
+ ok?: boolean;
6776
+ caused_by?: string;
6777
+ error?: string;
6778
+ reason?: string;
6779
+ }
6339
6780
  }
6340
6781
  /** Schema for information about revisions and their status. */
6341
- interface DocumentRevisionStatus {
6782
+ class DocumentRevisionStatus {
6342
6783
  /** Schema for a document revision identifier. */
6343
6784
  rev: string;
6344
6785
  /** Status of the revision. May be one of: - `available`: Revision is available for retrieving with rev query
6345
6786
  * parameter - `missing`: Revision is not available - `deleted`: Revision belongs to deleted document.
6346
6787
  */
6347
6788
  status: DocumentRevisionStatus.Constants.Status | string;
6789
+ static serialize(obj: any): DocumentRevisionStatus.Transport;
6790
+ static deserialize(obj: any): DocumentRevisionStatus;
6348
6791
  }
6349
6792
  namespace DocumentRevisionStatus {
6350
6793
  namespace Constants {
@@ -6355,29 +6798,52 @@ declare namespace CloudantV1 {
6355
6798
  DELETED = "deleted"
6356
6799
  }
6357
6800
  }
6801
+ interface Transport {
6802
+ rev: string;
6803
+ status: string;
6804
+ }
6358
6805
  }
6359
6806
  /** Schema for document shard information. */
6360
- interface DocumentShardInfo {
6807
+ class DocumentShardInfo {
6361
6808
  /** List of nodes serving a replica of the shard. */
6362
6809
  nodes: string[];
6363
6810
  /** The shard range in which the document is stored. */
6364
6811
  range: string;
6812
+ static serialize(obj: any): DocumentShardInfo.Transport;
6813
+ static deserialize(obj: any): DocumentShardInfo;
6814
+ }
6815
+ namespace DocumentShardInfo {
6816
+ interface Transport {
6817
+ nodes: string[];
6818
+ range: string;
6819
+ }
6365
6820
  }
6366
6821
  /** Schema for find query execution statistics. */
6367
- interface ExecutionStats {
6822
+ class ExecutionStats {
6368
6823
  /** Time to execute the query. */
6369
- execution_time_ms: number;
6824
+ executionTimeMs: number;
6370
6825
  /** Number of results returned. */
6371
- results_returned: number;
6826
+ resultsReturned: number;
6372
6827
  /** Number of documents fetched from the index. */
6373
- total_docs_examined: number;
6828
+ totalDocsExamined: number;
6374
6829
  /** Number of rows scanned in the index. */
6375
- total_keys_examined: number;
6830
+ totalKeysExamined: number;
6376
6831
  /** Number of documents fetched from the primary index with the specified read quorum. */
6377
- total_quorum_docs_examined: number;
6832
+ totalQuorumDocsExamined: number;
6833
+ static serialize(obj: any): ExecutionStats.Transport;
6834
+ static deserialize(obj: any): ExecutionStats;
6835
+ }
6836
+ namespace ExecutionStats {
6837
+ interface Transport {
6838
+ execution_time_ms: number;
6839
+ results_returned: number;
6840
+ total_docs_examined: number;
6841
+ total_keys_examined: number;
6842
+ total_quorum_docs_examined: number;
6843
+ }
6378
6844
  }
6379
6845
  /** Schema for information about the index used for a find query. */
6380
- interface ExplainResult {
6846
+ class ExplainResult {
6381
6847
  /** When `true`, the query is answered using the index only and no documents are fetched. */
6382
6848
  covering: boolean;
6383
6849
  /** Name of database. */
@@ -6395,7 +6861,7 @@ declare namespace CloudantV1 {
6395
6861
  /** Options used for the request. */
6396
6862
  opts: ExplainResultOpts;
6397
6863
  /** Schema for any JSON type. */
6398
- partitioned?: any;
6864
+ partitioned?: any | null;
6399
6865
  /** JSON object describing criteria used to select documents. The selector specifies fields in the document, and
6400
6866
  * provides an expression to evaluate with the field content or other data.
6401
6867
  *
@@ -6427,21 +6893,37 @@ declare namespace CloudantV1 {
6427
6893
  selector: JsonObject;
6428
6894
  /** Skip parameter used. */
6429
6895
  skip: number;
6896
+ static serialize(obj: any): ExplainResult.Transport;
6897
+ static deserialize(obj: any): ExplainResult;
6898
+ }
6899
+ namespace ExplainResult {
6900
+ interface Transport {
6901
+ covering: boolean;
6902
+ dbname: string;
6903
+ fields: string[];
6904
+ index: IndexInformation.Transport;
6905
+ limit: number;
6906
+ mrargs?: ExplainResultMrArgs.Transport;
6907
+ opts: ExplainResultOpts.Transport;
6908
+ partitioned?: any;
6909
+ selector: JsonObject;
6910
+ skip: number;
6911
+ }
6430
6912
  }
6431
6913
  /** Arguments passed to the underlying view. */
6432
- interface ExplainResultMrArgs {
6914
+ class ExplainResultMrArgs {
6433
6915
  /** Schema for any JSON type. */
6434
- conflicts?: any;
6916
+ conflicts?: any | null;
6435
6917
  /** Direction parameter passed to the underlying view. */
6436
6918
  direction?: string;
6437
6919
  /** Schema for any JSON type. */
6438
- end_key?: any;
6920
+ endKey?: any | null;
6439
6921
  /** A parameter that specifies whether to include the full content of the documents in the response in the
6440
6922
  * underlying view.
6441
6923
  */
6442
- include_docs?: boolean;
6924
+ includeDocs?: boolean;
6443
6925
  /** Partition parameter passed to the underlying view. */
6444
- partition?: string;
6926
+ partition?: string | null;
6445
6927
  /** A parameter that specifies returning only documents that match any of the specified keys in the underlying
6446
6928
  * view.
6447
6929
  */
@@ -6451,11 +6933,13 @@ declare namespace CloudantV1 {
6451
6933
  */
6452
6934
  stable?: boolean;
6453
6935
  /** Schema for any JSON type. */
6454
- start_key?: any;
6936
+ startKey?: any | null;
6455
6937
  /** Schema for any JSON type. */
6456
- update?: any;
6938
+ update?: any | null;
6457
6939
  /** The type of the underlying view. */
6458
- view_type?: ExplainResultMrArgs.Constants.ViewType | string;
6940
+ viewType?: ExplainResultMrArgs.Constants.ViewType | string;
6941
+ static serialize(obj: any): ExplainResultMrArgs.Transport;
6942
+ static deserialize(obj: any): ExplainResultMrArgs;
6459
6943
  }
6460
6944
  namespace ExplainResultMrArgs {
6461
6945
  namespace Constants {
@@ -6465,15 +6949,27 @@ declare namespace CloudantV1 {
6465
6949
  REDUCE = "reduce"
6466
6950
  }
6467
6951
  }
6952
+ interface Transport {
6953
+ conflicts?: any;
6954
+ direction?: string;
6955
+ end_key?: any;
6956
+ include_docs?: boolean;
6957
+ partition?: string;
6958
+ reduce?: boolean;
6959
+ stable?: boolean;
6960
+ start_key?: any;
6961
+ update?: any;
6962
+ view_type?: string;
6963
+ }
6468
6964
  }
6469
6965
  /** Options used for the request. */
6470
- interface ExplainResultOpts {
6966
+ class ExplainResultOpts {
6471
6967
  /** Opaque bookmark token used when paginating results. */
6472
6968
  bookmark: string;
6473
6969
  /** Conflicts used in the request query. */
6474
6970
  conflicts: boolean;
6475
6971
  /** Execution statistics used in the request query. */
6476
- execution_stats: boolean;
6972
+ executionStats: boolean;
6477
6973
  /** JSON array that uses the field syntax. Use this parameter to specify which fields of a document must be
6478
6974
  * returned. If it is omitted or empty, the entire document is returned.
6479
6975
  */
@@ -6489,7 +6985,7 @@ declare namespace CloudantV1 {
6489
6985
  /** Skip used in the request query. */
6490
6986
  skip: number;
6491
6987
  /** Schema for any JSON type. */
6492
- sort: any;
6988
+ sort: any | null;
6493
6989
  /** Stable used in the request query. */
6494
6990
  stable: boolean;
6495
6991
  /** Deprecated: Stale used in the request query. */
@@ -6497,27 +6993,56 @@ declare namespace CloudantV1 {
6497
6993
  /** Update used in the request query. */
6498
6994
  update: boolean;
6499
6995
  /** Use index used in the request query. */
6500
- use_index: string[];
6996
+ useIndex: string[];
6997
+ static serialize(obj: any): ExplainResultOpts.Transport;
6998
+ static deserialize(obj: any): ExplainResultOpts;
6999
+ }
7000
+ namespace ExplainResultOpts {
7001
+ interface Transport {
7002
+ bookmark: string;
7003
+ conflicts: boolean;
7004
+ execution_stats: boolean;
7005
+ fields: string[];
7006
+ limit: number;
7007
+ partition: string;
7008
+ r: number;
7009
+ skip: number;
7010
+ sort: any;
7011
+ stable: boolean;
7012
+ stale: boolean;
7013
+ update: boolean;
7014
+ use_index: string[];
7015
+ }
6501
7016
  }
6502
7017
  /** Schema for the result of a query find operation. */
6503
- interface FindResult {
7018
+ class FindResult {
6504
7019
  /** Opaque bookmark token used when paginating results. */
6505
7020
  bookmark: string;
6506
7021
  /** Documents matching the selector. */
6507
7022
  docs: Document[];
6508
7023
  /** Schema for find query execution statistics. */
6509
- execution_stats?: ExecutionStats;
7024
+ executionStats?: ExecutionStats;
6510
7025
  /** warning. */
6511
7026
  warning?: string;
7027
+ static serialize(obj: any): FindResult.Transport;
7028
+ static deserialize(obj: any): FindResult;
7029
+ }
7030
+ namespace FindResult {
7031
+ interface Transport {
7032
+ bookmark: string;
7033
+ docs: Document[];
7034
+ execution_stats?: ExecutionStats.Transport;
7035
+ warning?: string;
7036
+ }
6512
7037
  }
6513
7038
  /** Schema for a `json` or `text` query index definition. Indexes of type `text` have additional configuration properties that do not apply to `json` indexes, these are: * `default_analyzer` - the default text analyzer to use * `default_field` - whether to index the text in all document fields and what analyzer to use for that purpose. */
6514
- interface IndexDefinition {
7039
+ class IndexDefinition {
6515
7040
  /** Schema for a full text search analyzer. */
6516
- default_analyzer?: Analyzer;
7041
+ defaultAnalyzer?: Analyzer;
6517
7042
  /** Schema for the text index default field configuration. The default field is used to index the text of all
6518
7043
  * fields within a document for use with the `$text` operator.
6519
7044
  */
6520
- default_field?: IndexTextOperatorDefaultField;
7045
+ defaultField?: IndexTextOperatorDefaultField;
6521
7046
  /** List of field objects to index. Nested fields are also allowed, e.g. `person.name`.
6522
7047
  *
6523
7048
  * For "json" type indexes each object is a mapping of field name to sort direction (asc or desc).
@@ -6532,7 +7057,7 @@ declare namespace CloudantV1 {
6532
7057
  * database are complex, or not completely under your control. As a result, it is difficult to estimate the impact
6533
7058
  * of the extra processing that is needed to determine and store the arrays lengths.
6534
7059
  */
6535
- index_array_lengths?: boolean;
7060
+ indexArrayLengths?: boolean;
6536
7061
  /** JSON object describing criteria used to select documents. The selector specifies fields in the document, and
6537
7062
  * provides an expression to evaluate with the field content or other data.
6538
7063
  *
@@ -6561,16 +7086,29 @@ declare namespace CloudantV1 {
6561
7086
  * For further reference see
6562
7087
  * [selector syntax](https://cloud.ibm.com/docs/Cloudant?topic=Cloudant-selector-syntax).
6563
7088
  */
6564
- partial_filter_selector?: JsonObject;
7089
+ partialFilterSelector?: JsonObject;
7090
+ static serialize(obj: any): IndexDefinition.Transport;
7091
+ static deserialize(obj: any): IndexDefinition;
7092
+ }
7093
+ namespace IndexDefinition {
7094
+ interface Transport {
7095
+ default_analyzer?: Analyzer.Transport;
7096
+ default_field?: IndexTextOperatorDefaultField.Transport;
7097
+ fields?: IndexField[];
7098
+ index_array_lengths?: boolean;
7099
+ partial_filter_selector?: JsonObject;
7100
+ }
6565
7101
  }
6566
7102
  /** Schema for indexed fields for use with declarative JSON query. */
6567
- interface IndexField {
7103
+ class IndexField {
6568
7104
  /** Name of the field. */
6569
7105
  name?: string;
6570
7106
  /** The type of the named field. */
6571
7107
  type?: IndexField.Constants.Type | string;
6572
7108
  /** IndexField accepts additional properties. */
6573
7109
  [propName: string]: any;
7110
+ static serialize(obj: any): IndexField.Transport;
7111
+ static deserialize(obj: any): IndexField;
6574
7112
  }
6575
7113
  namespace IndexField {
6576
7114
  namespace Constants {
@@ -6581,11 +7119,17 @@ declare namespace CloudantV1 {
6581
7119
  STRING = "string"
6582
7120
  }
6583
7121
  }
7122
+ interface Transport {
7123
+ name?: string;
7124
+ type?: string;
7125
+ /** IndexField.IndexField.Transport accepts additional properties. */
7126
+ [propName: string]: any;
7127
+ }
6584
7128
  }
6585
7129
  /** Schema for information about an index. */
6586
- interface IndexInformation {
7130
+ class IndexInformation {
6587
7131
  /** Design document ID including a `_design/` prefix. */
6588
- ddoc: string;
7132
+ ddoc: string | null;
6589
7133
  /** Schema for a `json` or `text` query index definition. Indexes of type `text` have additional configuration
6590
7134
  * properties that do not apply to `json` indexes, these are:
6591
7135
  * * `default_analyzer` - the default text analyzer to use * `default_field` - whether to index the text in all
@@ -6598,6 +7142,8 @@ declare namespace CloudantV1 {
6598
7142
  partitioned?: boolean;
6599
7143
  /** Schema for the type of an index. */
6600
7144
  type: IndexInformation.Constants.Type | string;
7145
+ static serialize(obj: any): IndexInformation.Transport;
7146
+ static deserialize(obj: any): IndexInformation;
6601
7147
  }
6602
7148
  namespace IndexInformation {
6603
7149
  namespace Constants {
@@ -6608,15 +7154,24 @@ declare namespace CloudantV1 {
6608
7154
  TEXT = "text"
6609
7155
  }
6610
7156
  }
7157
+ interface Transport {
7158
+ ddoc: string;
7159
+ def: IndexDefinition.Transport;
7160
+ name: string;
7161
+ partitioned?: boolean;
7162
+ type: string;
7163
+ }
6611
7164
  }
6612
7165
  /** Schema for the result of creating an index. */
6613
- interface IndexResult {
7166
+ class IndexResult {
6614
7167
  /** Id of the design document the index was created in. */
6615
7168
  id: string;
6616
7169
  /** Name of the index created. */
6617
7170
  name: string;
6618
7171
  /** Flag to show whether the index was created or one already exists. */
6619
7172
  result: IndexResult.Constants.Result | string;
7173
+ static serialize(obj: any): IndexResult.Transport;
7174
+ static deserialize(obj: any): IndexResult;
6620
7175
  }
6621
7176
  namespace IndexResult {
6622
7177
  namespace Constants {
@@ -6626,89 +7181,179 @@ declare namespace CloudantV1 {
6626
7181
  EXISTS = "exists"
6627
7182
  }
6628
7183
  }
7184
+ interface Transport {
7185
+ id: string;
7186
+ name: string;
7187
+ result: string;
7188
+ }
6629
7189
  }
6630
7190
  /** Schema for the text index default field configuration. The default field is used to index the text of all fields within a document for use with the `$text` operator. */
6631
- interface IndexTextOperatorDefaultField {
7191
+ class IndexTextOperatorDefaultField {
6632
7192
  /** Schema for a full text search analyzer. */
6633
7193
  analyzer?: Analyzer;
6634
7194
  /** Whether or not the default_field is enabled. */
6635
7195
  enabled?: boolean;
7196
+ static serialize(obj: any): IndexTextOperatorDefaultField.Transport;
7197
+ static deserialize(obj: any): IndexTextOperatorDefaultField;
7198
+ }
7199
+ namespace IndexTextOperatorDefaultField {
7200
+ interface Transport {
7201
+ analyzer?: Analyzer.Transport;
7202
+ enabled?: boolean;
7203
+ }
6636
7204
  }
6637
7205
  /** Schema for information about the indexes in a database. */
6638
- interface IndexesInformation {
7206
+ class IndexesInformation {
6639
7207
  /** Number of total rows. */
6640
- total_rows: number;
7208
+ totalRows: number | null;
6641
7209
  /** Indexes. */
6642
7210
  indexes: IndexInformation[];
7211
+ static serialize(obj: any): IndexesInformation.Transport;
7212
+ static deserialize(obj: any): IndexesInformation;
7213
+ }
7214
+ namespace IndexesInformation {
7215
+ interface Transport {
7216
+ total_rows: number;
7217
+ indexes: IndexInformation[];
7218
+ }
6643
7219
  }
6644
7220
  /** Schema for information about known nodes and cluster membership. */
6645
- interface MembershipInformation {
7221
+ class MembershipInformation {
6646
7222
  /** List of nodes this node knows about, including the ones that are part of the cluster. */
6647
- all_nodes: string[];
7223
+ allNodes: string[];
6648
7224
  /** All cluster nodes. */
6649
- cluster_nodes: string[];
7225
+ clusterNodes: string[];
7226
+ static serialize(obj: any): MembershipInformation.Transport;
7227
+ static deserialize(obj: any): MembershipInformation;
7228
+ }
7229
+ namespace MembershipInformation {
7230
+ interface Transport {
7231
+ all_nodes: string[];
7232
+ cluster_nodes: string[];
7233
+ }
6650
7234
  }
6651
7235
  /** Schema for an OK result. */
6652
- interface Ok {
7236
+ class Ok {
6653
7237
  /** ok. */
6654
7238
  ok?: boolean;
7239
+ static serialize(obj: any): Ok.Transport;
7240
+ static deserialize(obj: any): Ok;
7241
+ }
7242
+ namespace Ok {
7243
+ interface Transport {
7244
+ ok?: boolean;
7245
+ }
6655
7246
  }
6656
7247
  /** Schema for information about a database partition. */
6657
- interface PartitionInformation {
7248
+ class PartitionInformation {
6658
7249
  /** The name of the database. */
6659
- db_name: string;
7250
+ dbName: string;
6660
7251
  /** A count of the documents in the specified database partition. */
6661
- doc_count: number;
7252
+ docCount: number;
6662
7253
  /** Number of deleted documents. */
6663
- doc_del_count: number;
7254
+ docDelCount: number;
6664
7255
  /** The name of the partition in the database. */
6665
7256
  partition: string;
6666
7257
  /** Schema for information about the partition index count and limit in a database. */
6667
- partitioned_indexes?: PartitionInformationIndexes;
7258
+ partitionedIndexes?: PartitionInformationIndexes;
6668
7259
  /** The size of active and external data, in bytes. */
6669
7260
  sizes: PartitionInformationSizes;
7261
+ static serialize(obj: any): PartitionInformation.Transport;
7262
+ static deserialize(obj: any): PartitionInformation;
7263
+ }
7264
+ namespace PartitionInformation {
7265
+ interface Transport {
7266
+ db_name: string;
7267
+ doc_count: number;
7268
+ doc_del_count: number;
7269
+ partition: string;
7270
+ partitioned_indexes?: PartitionInformationIndexes.Transport;
7271
+ sizes: PartitionInformationSizes.Transport;
7272
+ }
6670
7273
  }
6671
7274
  /** Schema for information about the partition index count and limit in a database. */
6672
- interface PartitionInformationIndexes {
7275
+ class PartitionInformationIndexes {
6673
7276
  /** Total count of the partitioned indexes. */
6674
7277
  count?: number;
6675
7278
  /** The count breakdown of partitioned indexes. */
6676
7279
  indexes?: PartitionInformationIndexesIndexes;
6677
7280
  /** The partitioned index limit. */
6678
7281
  limit?: number;
7282
+ static serialize(obj: any): PartitionInformationIndexes.Transport;
7283
+ static deserialize(obj: any): PartitionInformationIndexes;
7284
+ }
7285
+ namespace PartitionInformationIndexes {
7286
+ interface Transport {
7287
+ count?: number;
7288
+ indexes?: PartitionInformationIndexesIndexes.Transport;
7289
+ limit?: number;
7290
+ }
6679
7291
  }
6680
7292
  /** The count breakdown of partitioned indexes. */
6681
- interface PartitionInformationIndexesIndexes {
7293
+ class PartitionInformationIndexesIndexes {
6682
7294
  /** Number of partitioned search indexes. */
6683
7295
  search?: number;
6684
7296
  /** Number of partitioned view indexes. */
6685
7297
  view?: number;
7298
+ static serialize(obj: any): PartitionInformationIndexesIndexes.Transport;
7299
+ static deserialize(obj: any): PartitionInformationIndexesIndexes;
7300
+ }
7301
+ namespace PartitionInformationIndexesIndexes {
7302
+ interface Transport {
7303
+ search?: number;
7304
+ view?: number;
7305
+ }
6686
7306
  }
6687
7307
  /** The size of active and external data, in bytes. */
6688
- interface PartitionInformationSizes {
7308
+ class PartitionInformationSizes {
6689
7309
  /** The size of live data inside the database, in bytes. */
6690
7310
  active?: number;
6691
7311
  /** The uncompressed size of database contents in bytes. */
6692
7312
  external?: number;
7313
+ static serialize(obj: any): PartitionInformationSizes.Transport;
7314
+ static deserialize(obj: any): PartitionInformationSizes;
7315
+ }
7316
+ namespace PartitionInformationSizes {
7317
+ interface Transport {
7318
+ active?: number;
7319
+ external?: number;
7320
+ }
6693
7321
  }
6694
7322
  /** Number of partitioned indexes by type. */
6695
- interface PartitionedIndexesDetailedInformation {
7323
+ class PartitionedIndexesDetailedInformation {
6696
7324
  /** Number of partitioned indexes of search type. */
6697
7325
  search?: number;
6698
7326
  /** Number of partitioned indexes of view type. */
6699
7327
  view?: number;
7328
+ static serialize(obj: any): PartitionedIndexesDetailedInformation.Transport;
7329
+ static deserialize(obj: any): PartitionedIndexesDetailedInformation;
7330
+ }
7331
+ namespace PartitionedIndexesDetailedInformation {
7332
+ interface Transport {
7333
+ search?: number;
7334
+ view?: number;
7335
+ }
6700
7336
  }
6701
7337
  /** Information about database's partitioned indexes. */
6702
- interface PartitionedIndexesInformation {
7338
+ class PartitionedIndexesInformation {
6703
7339
  /** Total number of partitioned indexes in the database. */
6704
7340
  count?: number;
6705
7341
  /** Number of partitioned indexes by type. */
6706
7342
  indexes?: PartitionedIndexesDetailedInformation;
6707
7343
  /** Maximum allowed number of partitioned indexes in the database. */
6708
7344
  limit?: number;
7345
+ static serialize(obj: any): PartitionedIndexesInformation.Transport;
7346
+ static deserialize(obj: any): PartitionedIndexesInformation;
7347
+ }
7348
+ namespace PartitionedIndexesInformation {
7349
+ interface Transport {
7350
+ count?: number;
7351
+ indexes?: PartitionedIndexesDetailedInformation.Transport;
7352
+ limit?: number;
7353
+ }
6709
7354
  }
6710
7355
  /** Request parameters to use during target database creation. */
6711
- interface ReplicationCreateTargetParameters {
7356
+ class ReplicationCreateTargetParameters {
6712
7357
  /** Schema for the number of replicas of a database in a cluster. The cluster is using the default value and it
6713
7358
  * cannot be changed by the user.
6714
7359
  */
@@ -6717,39 +7362,82 @@ declare namespace CloudantV1 {
6717
7362
  partitioned?: boolean;
6718
7363
  /** Schema for the number of shards in a database. Each shard is a partition of the hash value range. */
6719
7364
  q?: number;
7365
+ static serialize(obj: any): ReplicationCreateTargetParameters.Transport;
7366
+ static deserialize(obj: any): ReplicationCreateTargetParameters;
7367
+ }
7368
+ namespace ReplicationCreateTargetParameters {
7369
+ interface Transport {
7370
+ n?: number;
7371
+ partitioned?: boolean;
7372
+ q?: number;
7373
+ }
6720
7374
  }
6721
7375
  /** Schema for a replication source or target database. */
6722
- interface ReplicationDatabase {
7376
+ class ReplicationDatabase {
6723
7377
  /** Schema for replication source or target database authentication. */
6724
7378
  auth?: ReplicationDatabaseAuth;
6725
7379
  /** Replication request headers. */
6726
7380
  headers?: JsonObject;
6727
7381
  /** Replication database URL. */
6728
7382
  url: string;
7383
+ static serialize(obj: any): ReplicationDatabase.Transport;
7384
+ static deserialize(obj: any): ReplicationDatabase;
7385
+ }
7386
+ namespace ReplicationDatabase {
7387
+ interface Transport {
7388
+ auth?: ReplicationDatabaseAuth.Transport;
7389
+ headers?: JsonObject;
7390
+ url: string;
7391
+ }
6729
7392
  }
6730
7393
  /** Schema for replication source or target database authentication. */
6731
- interface ReplicationDatabaseAuth {
7394
+ class ReplicationDatabaseAuth {
6732
7395
  /** Schema for basic authentication of replication source or target database. */
6733
7396
  basic?: ReplicationDatabaseAuthBasic;
6734
7397
  /** Schema for an IAM API key for replication database authentication. */
6735
7398
  iam?: ReplicationDatabaseAuthIam;
7399
+ static serialize(obj: any): ReplicationDatabaseAuth.Transport;
7400
+ static deserialize(obj: any): ReplicationDatabaseAuth;
7401
+ }
7402
+ namespace ReplicationDatabaseAuth {
7403
+ interface Transport {
7404
+ basic?: ReplicationDatabaseAuthBasic.Transport;
7405
+ iam?: ReplicationDatabaseAuthIam.Transport;
7406
+ }
6736
7407
  }
6737
7408
  /** Schema for basic authentication of replication source or target database. */
6738
- interface ReplicationDatabaseAuthBasic {
7409
+ class ReplicationDatabaseAuthBasic {
6739
7410
  /** The password associated with the username. */
6740
7411
  password: string;
6741
7412
  /** The username. */
6742
7413
  username: string;
7414
+ static serialize(obj: any): ReplicationDatabaseAuthBasic.Transport;
7415
+ static deserialize(obj: any): ReplicationDatabaseAuthBasic;
7416
+ }
7417
+ namespace ReplicationDatabaseAuthBasic {
7418
+ interface Transport {
7419
+ password: string;
7420
+ username: string;
7421
+ }
6743
7422
  }
6744
7423
  /** Schema for an IAM API key for replication database authentication. */
6745
- interface ReplicationDatabaseAuthIam {
7424
+ class ReplicationDatabaseAuthIam {
6746
7425
  /** IAM API key. */
6747
- api_key: string;
7426
+ apiKey: string;
7427
+ static serialize(obj: any): ReplicationDatabaseAuthIam.Transport;
7428
+ static deserialize(obj: any): ReplicationDatabaseAuthIam;
7429
+ }
7430
+ namespace ReplicationDatabaseAuthIam {
7431
+ interface Transport {
7432
+ api_key: string;
7433
+ }
6748
7434
  }
6749
7435
  /** Schema for a replication document. Note that `selector`, `doc_ids`, and `filter` are incompatible with each other. */
6750
- interface ReplicationDocument {
7436
+ class ReplicationDocument {
6751
7437
  /** Schema for a map of attachment name to attachment metadata. */
6752
- _attachments?: JsonObject;
7438
+ _attachments?: {
7439
+ [key: string]: Attachment;
7440
+ };
6753
7441
  /** Schema for a list of document revision identifiers. */
6754
7442
  _conflicts?: string[];
6755
7443
  /** Deletion flag. Available if document was removed. */
@@ -6769,32 +7457,32 @@ declare namespace CloudantV1 {
6769
7457
  /** Cancels the replication. */
6770
7458
  cancel?: boolean;
6771
7459
  /** Defines replication checkpoint interval in milliseconds. */
6772
- checkpoint_interval?: number;
7460
+ checkpointInterval?: number;
6773
7461
  /** HTTP connection timeout per replication. Even for very fast/reliable networks it might need to be increased
6774
7462
  * if a remote database is too busy.
6775
7463
  */
6776
- connection_timeout?: number;
7464
+ connectionTimeout?: number;
6777
7465
  /** Configure the replication to be continuous. */
6778
7466
  continuous?: boolean;
6779
7467
  /** Creates the target database. Requires administrator privileges on target server. */
6780
- create_target?: boolean;
7468
+ createTarget?: boolean;
6781
7469
  /** Request parameters to use during target database creation. */
6782
- create_target_params?: ReplicationCreateTargetParameters;
7470
+ createTargetParams?: ReplicationCreateTargetParameters;
6783
7471
  /** Schema for a list of document IDs. */
6784
- doc_ids?: string[];
7472
+ docIds?: string[];
6785
7473
  /** The name of a filter function which is defined in a design document in the source database in
6786
7474
  * {ddoc_id}/{filter} format. It determines which documents get replicated. Using the selector option provides
6787
7475
  * performance benefits when compared with using the filter option. Use the selector option when possible.
6788
7476
  */
6789
7477
  filter?: string;
6790
7478
  /** Maximum number of HTTP connections per replication. */
6791
- http_connections?: number;
7479
+ httpConnections?: number;
6792
7480
  /** Schema for a map of string key value pairs, such as query parameters. */
6793
- query_params?: JsonObject;
7481
+ queryParams?: JsonObject;
6794
7482
  /** Number of times a replication request is retried. The requests are retried with a doubling exponential
6795
7483
  * backoff starting at 0.25 seconds, with a cap at 5 minutes.
6796
7484
  */
6797
- retries_per_request?: number;
7485
+ retriesPerRequest?: number;
6798
7486
  /** JSON object describing criteria used to select documents. The selector specifies fields in the document, and
6799
7487
  * provides an expression to evaluate with the field content or other data.
6800
7488
  *
@@ -6825,9 +7513,9 @@ declare namespace CloudantV1 {
6825
7513
  */
6826
7514
  selector?: JsonObject;
6827
7515
  /** Start the replication at a specific sequence value. */
6828
- since_seq?: string;
7516
+ sinceSeq?: string;
6829
7517
  /** Replication socket options. */
6830
- socket_options?: string;
7518
+ socketOptions?: string;
6831
7519
  /** Schema for a replication source or target database. */
6832
7520
  source: ReplicationDatabase;
6833
7521
  /** Deprecated: This setting is forbidden in IBM Cloudant replication documents. This setting may be used with
@@ -6836,7 +7524,7 @@ declare namespace CloudantV1 {
6836
7524
  * Address of a (http or socks5 protocol) proxy server through which replication with the source database should
6837
7525
  * occur.
6838
7526
  */
6839
- source_proxy?: string;
7527
+ sourceProxy?: string | null;
6840
7528
  /** Schema for a replication source or target database. */
6841
7529
  target: ReplicationDatabase;
6842
7530
  /** Deprecated: This setting is forbidden in IBM Cloudant replication documents. This setting may be used with
@@ -6845,73 +7533,140 @@ declare namespace CloudantV1 {
6845
7533
  * Address of a (http or socks5 protocol) proxy server through which replication with the target database should
6846
7534
  * occur.
6847
7535
  */
6848
- target_proxy?: string;
7536
+ targetProxy?: string | null;
6849
7537
  /** Specify whether to use _bulk_get for fetching documents from the source. If unset, the server configured
6850
7538
  * default will be used.
6851
7539
  */
6852
- use_bulk_get?: boolean;
7540
+ useBulkGet?: boolean;
6853
7541
  /** Specify if checkpoints should be saved during replication. Using checkpoints means a replication can be
6854
7542
  * efficiently resumed.
6855
7543
  */
6856
- use_checkpoints?: boolean;
7544
+ useCheckpoints?: boolean;
6857
7545
  /** Schema for the user context of a session. */
6858
- user_ctx?: UserContext;
7546
+ userCtx?: UserContext;
6859
7547
  /** Replicate only the winning revisions. Replication with this mode discards conflicting revisions. Replication
6860
7548
  * IDs and checkpoints generated by this mode are different to those generated by default, so it is possible to
6861
7549
  * first replicate the winning revisions then later backfill remaining revisions with a regular replication job.
6862
7550
  */
6863
- winning_revs_only?: boolean;
7551
+ winningRevsOnly?: boolean;
6864
7552
  /** Controls how many documents are processed. After each batch a checkpoint is written so this controls how
6865
7553
  * frequently checkpointing occurs.
6866
7554
  */
6867
- worker_batch_size?: number;
7555
+ workerBatchSize?: number;
6868
7556
  /** Controls how many separate processes will read from the changes manager and write to the target. A higher
6869
7557
  * number can improve throughput.
6870
7558
  */
6871
- worker_processes?: number;
7559
+ workerProcesses?: number;
6872
7560
  /** ReplicationDocument accepts additional properties. */
6873
7561
  [propName: string]: any;
7562
+ static serialize(obj: any): ReplicationDocument.Transport;
7563
+ static deserialize(obj: any): ReplicationDocument;
7564
+ }
7565
+ namespace ReplicationDocument {
7566
+ interface Transport {
7567
+ _attachments?: {
7568
+ [key: string]: Attachment.Transport;
7569
+ };
7570
+ _conflicts?: string[];
7571
+ _deleted?: boolean;
7572
+ _deleted_conflicts?: string[];
7573
+ _id?: string;
7574
+ _local_seq?: string;
7575
+ _rev?: string;
7576
+ _revisions?: Revisions.Transport;
7577
+ _revs_info?: DocumentRevisionStatus[];
7578
+ cancel?: boolean;
7579
+ checkpoint_interval?: number;
7580
+ connection_timeout?: number;
7581
+ continuous?: boolean;
7582
+ create_target?: boolean;
7583
+ create_target_params?: ReplicationCreateTargetParameters.Transport;
7584
+ doc_ids?: string[];
7585
+ filter?: string;
7586
+ http_connections?: number;
7587
+ query_params?: JsonObject;
7588
+ retries_per_request?: number;
7589
+ selector?: JsonObject;
7590
+ since_seq?: string;
7591
+ socket_options?: string;
7592
+ source: ReplicationDatabase.Transport;
7593
+ source_proxy?: string;
7594
+ target: ReplicationDatabase.Transport;
7595
+ target_proxy?: string;
7596
+ use_bulk_get?: boolean;
7597
+ use_checkpoints?: boolean;
7598
+ user_ctx?: UserContext.Transport;
7599
+ winning_revs_only?: boolean;
7600
+ worker_batch_size?: number;
7601
+ worker_processes?: number;
7602
+ /** ReplicationDocument.ReplicationDocument.Transport accepts additional properties. */
7603
+ [propName: string]: any;
7604
+ }
6874
7605
  }
6875
7606
  /** Schema for list of revision information. */
6876
- interface Revisions {
7607
+ class Revisions {
6877
7608
  /** Array of valid revision IDs, in reverse order (latest first). */
6878
7609
  ids: string[];
6879
7610
  /** Prefix number for the latest revision. */
6880
7611
  start: number;
7612
+ static serialize(obj: any): Revisions.Transport;
7613
+ static deserialize(obj: any): Revisions;
7614
+ }
7615
+ namespace Revisions {
7616
+ interface Transport {
7617
+ ids: string[];
7618
+ start: number;
7619
+ }
6881
7620
  }
6882
7621
  /** Schema for information about missing revs and possible ancestors. */
6883
- interface RevsDiff {
7622
+ class RevsDiff {
6884
7623
  /** List of missing revisions. */
6885
7624
  missing?: string[];
6886
7625
  /** List of possible ancestor revisions. */
6887
- possible_ancestors?: string[];
7626
+ possibleAncestors?: string[];
7627
+ static serialize(obj: any): RevsDiff.Transport;
7628
+ static deserialize(obj: any): RevsDiff;
7629
+ }
7630
+ namespace RevsDiff {
7631
+ interface Transport {
7632
+ missing?: string[];
7633
+ possible_ancestors?: string[];
7634
+ }
6888
7635
  }
6889
7636
  /** Schema for a listing of replication scheduler documents. */
6890
- interface SchedulerDocsResult {
7637
+ class SchedulerDocsResult {
6891
7638
  /** Number of total rows. */
6892
- total_rows: number;
7639
+ totalRows: number | null;
6893
7640
  /** Array of replication scheduler doc objects. */
6894
7641
  docs: SchedulerDocument[];
7642
+ static serialize(obj: any): SchedulerDocsResult.Transport;
7643
+ static deserialize(obj: any): SchedulerDocsResult;
7644
+ }
7645
+ namespace SchedulerDocsResult {
7646
+ interface Transport {
7647
+ total_rows: number;
7648
+ docs: SchedulerDocument[];
7649
+ }
6895
7650
  }
6896
7651
  /** Schema for a replication scheduler document. */
6897
- interface SchedulerDocument {
7652
+ class SchedulerDocument {
6898
7653
  /** Database where replication document came from. */
6899
7654
  database: string;
6900
7655
  /** Replication document ID. */
6901
- doc_id: string;
7656
+ docId: string;
6902
7657
  /** Consecutive errors count. Indicates how many times in a row this replication has crashed. Replication will
6903
7658
  * be retried with an exponential backoff based on this number. As soon as the replication succeeds this count is
6904
7659
  * reset to 0. To can be used to get an idea why a particular replication is not making progress.
6905
7660
  */
6906
- error_count: number;
7661
+ errorCount: number;
6907
7662
  /** Replication ID, or null if state is completed or failed. */
6908
- id: string;
7663
+ id: string | null;
6909
7664
  /** Schema for scheduler document information. A JSON object that may contain additional information about the
6910
7665
  * state. For error states this will contain an error field and string value.
6911
7666
  */
6912
- info: SchedulerInfo;
7667
+ info: SchedulerInfo | null;
6913
7668
  /** Timestamp of last state update. */
6914
- last_updated: string;
7669
+ lastUpdated: string;
6915
7670
  /** Cluster node where the job is running. */
6916
7671
  node?: string;
6917
7672
  /** Replication source. */
@@ -6920,9 +7675,9 @@ declare namespace CloudantV1 {
6920
7675
  *
6921
7676
  * Address of the (http or socks5 protocol) proxy server through which replication with the source database occurs.
6922
7677
  */
6923
- source_proxy?: string;
7678
+ sourceProxy?: string | null;
6924
7679
  /** Timestamp of when the replication was started. */
6925
- start_time: string;
7680
+ startTime: string;
6926
7681
  /** Schema for replication state. */
6927
7682
  state: SchedulerDocument.Constants.State | string;
6928
7683
  /** Replication target. */
@@ -6931,7 +7686,9 @@ declare namespace CloudantV1 {
6931
7686
  *
6932
7687
  * Address of the (http or socks5 protocol) proxy server through which replication with the target database occurs.
6933
7688
  */
6934
- target_proxy?: string;
7689
+ targetProxy?: string | null;
7690
+ static serialize(obj: any): SchedulerDocument.Transport;
7691
+ static deserialize(obj: any): SchedulerDocument;
6935
7692
  }
6936
7693
  namespace SchedulerDocument {
6937
7694
  namespace Constants {
@@ -6946,36 +7703,67 @@ declare namespace CloudantV1 {
6946
7703
  FAILED = "failed"
6947
7704
  }
6948
7705
  }
7706
+ interface Transport {
7707
+ database: string;
7708
+ doc_id: string;
7709
+ error_count: number;
7710
+ id: string;
7711
+ info: SchedulerInfo.Transport;
7712
+ last_updated: string;
7713
+ node?: string;
7714
+ source?: string;
7715
+ source_proxy?: string;
7716
+ start_time: string;
7717
+ state: string;
7718
+ target?: string;
7719
+ target_proxy?: string;
7720
+ }
6949
7721
  }
6950
7722
  /** Schema for scheduler document information. A JSON object that may contain additional information about the state. For error states this will contain an error field and string value. */
6951
- interface SchedulerInfo {
7723
+ class SchedulerInfo {
6952
7724
  /** The count of changes not yet replicated. */
6953
- changes_pending?: number;
7725
+ changesPending?: number | null;
6954
7726
  /** The source sequence id which was last successfully replicated. */
6955
- checkpointed_source_seq?: string;
7727
+ checkpointedSourceSeq?: string;
6956
7728
  /** The count of docs which failed to be written to the target. */
6957
- doc_write_failures?: number;
7729
+ docWriteFailures?: number;
6958
7730
  /** The count of docs which have been read from the source. */
6959
- docs_read?: number;
7731
+ docsRead?: number;
6960
7732
  /** The count of docs which have been written to the target. */
6961
- docs_written?: number;
7733
+ docsWritten?: number;
6962
7734
  /** Replication error message. */
6963
7735
  error?: string;
6964
7736
  /** The count of revisions which were found on the source, but missing from the target. */
6965
- missing_revisions_found?: number;
7737
+ missingRevisionsFound?: number;
6966
7738
  /** The count of revisions which have been checked since this replication began. */
6967
- revisions_checked?: number;
7739
+ revisionsChecked?: number;
6968
7740
  /** The last sequence number obtained from the source database changes feed. */
6969
- source_seq?: string;
7741
+ sourceSeq?: string;
6970
7742
  /** The last sequence number processed by the replicator. */
6971
- through_seq?: string;
7743
+ throughSeq?: string;
7744
+ static serialize(obj: any): SchedulerInfo.Transport;
7745
+ static deserialize(obj: any): SchedulerInfo;
7746
+ }
7747
+ namespace SchedulerInfo {
7748
+ interface Transport {
7749
+ changes_pending?: number;
7750
+ checkpointed_source_seq?: string;
7751
+ doc_write_failures?: number;
7752
+ docs_read?: number;
7753
+ docs_written?: number;
7754
+ error?: string;
7755
+ missing_revisions_found?: number;
7756
+ revisions_checked?: number;
7757
+ source_seq?: string;
7758
+ through_seq?: string;
7759
+ }
6972
7760
  }
6973
7761
  /** Schema for a replication scheduler job. */
6974
- interface SchedulerJob {
7762
+ class SchedulerJob {
6975
7763
  /** Replication document database. */
6976
7764
  database: string;
6977
7765
  /** Replication document ID. */
6978
- doc_id: string;
7766
+ docId: string;
6979
7767
  /** Timestamped history of events as a list of objects. */
6980
7768
  history: SchedulerJobEvent[];
6981
7769
  /** Schema for a replication job id. */
@@ -6983,43 +7771,84 @@ declare namespace CloudantV1 {
6983
7771
  /** Schema for scheduler document information. A JSON object that may contain additional information about the
6984
7772
  * state. For error states this will contain an error field and string value.
6985
7773
  */
6986
- info: SchedulerInfo;
7774
+ info: SchedulerInfo | null;
6987
7775
  /** Cluster node where the job is running. */
6988
7776
  node: string;
6989
7777
  /** Replication process ID. */
6990
- pid: string;
7778
+ pid: string | null;
6991
7779
  /** Replication source. */
6992
7780
  source: string;
6993
7781
  /** Timestamp of when the replication was started. */
6994
- start_time: string;
7782
+ startTime: string;
6995
7783
  /** Replication target. */
6996
7784
  target: string;
6997
7785
  /** Name of user running replication. */
6998
- user: string;
7786
+ user: string | null;
7787
+ static serialize(obj: any): SchedulerJob.Transport;
7788
+ static deserialize(obj: any): SchedulerJob;
7789
+ }
7790
+ namespace SchedulerJob {
7791
+ interface Transport {
7792
+ database: string;
7793
+ doc_id: string;
7794
+ history: SchedulerJobEvent[];
7795
+ id: string;
7796
+ info: SchedulerInfo.Transport;
7797
+ node: string;
7798
+ pid: string;
7799
+ source: string;
7800
+ start_time: string;
7801
+ target: string;
7802
+ user: string;
7803
+ }
6999
7804
  }
7000
7805
  /** Schema for a replication scheduler job event. */
7001
- interface SchedulerJobEvent {
7806
+ class SchedulerJobEvent {
7002
7807
  /** Reason for current state of event. */
7003
7808
  reason?: string;
7004
7809
  /** Timestamp of the event. */
7005
7810
  timestamp: string;
7006
7811
  /** Type of the event. */
7007
7812
  type: string;
7813
+ static serialize(obj: any): SchedulerJobEvent.Transport;
7814
+ static deserialize(obj: any): SchedulerJobEvent;
7815
+ }
7816
+ namespace SchedulerJobEvent {
7817
+ interface Transport {
7818
+ reason?: string;
7819
+ timestamp: string;
7820
+ type: string;
7821
+ }
7008
7822
  }
7009
7823
  /** Schema for a listing of replication scheduler jobs. */
7010
- interface SchedulerJobsResult {
7824
+ class SchedulerJobsResult {
7011
7825
  /** Number of total rows. */
7012
- total_rows: number;
7826
+ totalRows: number | null;
7013
7827
  /** Array of replication job objects. */
7014
7828
  jobs: SchedulerJob[];
7829
+ static serialize(obj: any): SchedulerJobsResult.Transport;
7830
+ static deserialize(obj: any): SchedulerJobsResult;
7831
+ }
7832
+ namespace SchedulerJobsResult {
7833
+ interface Transport {
7834
+ total_rows: number;
7835
+ jobs: SchedulerJob[];
7836
+ }
7015
7837
  }
7016
7838
  /** Schema for the output of testing search analyzer tokenization. */
7017
- interface SearchAnalyzeResult {
7839
+ class SearchAnalyzeResult {
7018
7840
  /** tokens. */
7019
7841
  tokens: string[];
7842
+ static serialize(obj: any): SearchAnalyzeResult.Transport;
7843
+ static deserialize(obj: any): SearchAnalyzeResult;
7844
+ }
7845
+ namespace SearchAnalyzeResult {
7846
+ interface Transport {
7847
+ tokens: string[];
7848
+ }
7020
7849
  }
7021
7850
  /** Schema for a search index definition. */
7022
- interface SearchIndexDefinition {
7851
+ class SearchIndexDefinition {
7023
7852
  /** Schema for a search analyzer configuration. */
7024
7853
  analyzer?: AnalyzerConfiguration;
7025
7854
  /** String form of a JavaScript function that is called for each document in the database. The function takes
@@ -7043,67 +7872,136 @@ declare namespace CloudantV1 {
7043
7872
  * in the search result; otherwise, the value is not returned.
7044
7873
  */
7045
7874
  index: string;
7875
+ static serialize(obj: any): SearchIndexDefinition.Transport;
7876
+ static deserialize(obj: any): SearchIndexDefinition;
7877
+ }
7878
+ namespace SearchIndexDefinition {
7879
+ interface Transport {
7880
+ analyzer?: AnalyzerConfiguration.Transport;
7881
+ index: string;
7882
+ }
7046
7883
  }
7047
7884
  /** Schema for metadata information about a search index. */
7048
- interface SearchIndexInfo {
7885
+ class SearchIndexInfo {
7049
7886
  /** The committed sequence identifier. */
7050
- committed_seq: number;
7887
+ committedSeq: number;
7051
7888
  /** The size of the search index on disk. */
7052
- disk_size: number;
7889
+ diskSize: number;
7053
7890
  /** The count of the number of indexed documents. */
7054
- doc_count: number;
7891
+ docCount: number;
7055
7892
  /** The number of deleted documents. */
7056
- doc_del_count: number;
7893
+ docDelCount: number;
7057
7894
  /** The pending sequence identifier. */
7058
- pending_seq: number;
7895
+ pendingSeq: number;
7059
7896
  /** Unique signature of the search index. */
7060
7897
  signature: string;
7898
+ static serialize(obj: any): SearchIndexInfo.Transport;
7899
+ static deserialize(obj: any): SearchIndexInfo;
7900
+ }
7901
+ namespace SearchIndexInfo {
7902
+ interface Transport {
7903
+ committed_seq: number;
7904
+ disk_size: number;
7905
+ doc_count: number;
7906
+ doc_del_count: number;
7907
+ pending_seq: number;
7908
+ signature: string;
7909
+ }
7061
7910
  }
7062
7911
  /** Schema for search index information. */
7063
- interface SearchInfoResult {
7912
+ class SearchInfoResult {
7064
7913
  /** The name of the search index prefixed by the design document ID where the index is stored. */
7065
7914
  name: string;
7066
7915
  /** Schema for metadata information about a search index. */
7067
- search_index: SearchIndexInfo;
7916
+ searchIndex: SearchIndexInfo;
7917
+ static serialize(obj: any): SearchInfoResult.Transport;
7918
+ static deserialize(obj: any): SearchInfoResult;
7919
+ }
7920
+ namespace SearchInfoResult {
7921
+ interface Transport {
7922
+ name: string;
7923
+ search_index: SearchIndexInfo.Transport;
7924
+ }
7068
7925
  }
7069
7926
  /** Schema for the result of a query search operation. */
7070
- interface SearchResult {
7927
+ class SearchResult {
7071
7928
  /** Number of total rows. */
7072
- total_rows: number;
7929
+ totalRows: number | null;
7073
7930
  /** Opaque bookmark token used when paginating results. */
7074
7931
  bookmark?: string;
7075
7932
  /** Grouped search matches. */
7076
7933
  by?: string;
7077
7934
  /** The counts facet syntax returns the number of query results for each unique value of each named field. */
7078
- counts?: JsonObject;
7935
+ counts?: {
7936
+ [key: string]: JsonObject;
7937
+ };
7079
7938
  /** The range facet syntax reuses the standard Lucene syntax for ranges to return counts of results that fit
7080
7939
  * into each specified category.
7081
7940
  */
7082
- ranges?: JsonObject;
7941
+ ranges?: {
7942
+ [key: string]: JsonObject;
7943
+ };
7083
7944
  /** Array of row objects. */
7084
7945
  rows?: SearchResultRow[];
7085
7946
  /** Array of grouped search matches. */
7086
7947
  groups?: SearchResultProperties[];
7948
+ static serialize(obj: any): SearchResult.Transport;
7949
+ static deserialize(obj: any): SearchResult;
7950
+ }
7951
+ namespace SearchResult {
7952
+ interface Transport {
7953
+ total_rows: number;
7954
+ bookmark?: string;
7955
+ by?: string;
7956
+ counts?: {
7957
+ [key: string]: JsonObject;
7958
+ };
7959
+ ranges?: {
7960
+ [key: string]: JsonObject;
7961
+ };
7962
+ rows?: SearchResultRow[];
7963
+ groups?: SearchResultProperties[];
7964
+ }
7087
7965
  }
7088
7966
  /** Schema for the result of a query search operation. */
7089
- interface SearchResultProperties {
7967
+ class SearchResultProperties {
7090
7968
  /** Number of total rows. */
7091
- total_rows: number;
7969
+ totalRows: number | null;
7092
7970
  /** Opaque bookmark token used when paginating results. */
7093
7971
  bookmark?: string;
7094
7972
  /** Grouped search matches. */
7095
7973
  by?: string;
7096
7974
  /** The counts facet syntax returns the number of query results for each unique value of each named field. */
7097
- counts?: JsonObject;
7975
+ counts?: {
7976
+ [key: string]: JsonObject;
7977
+ };
7098
7978
  /** The range facet syntax reuses the standard Lucene syntax for ranges to return counts of results that fit
7099
7979
  * into each specified category.
7100
7980
  */
7101
- ranges?: JsonObject;
7981
+ ranges?: {
7982
+ [key: string]: JsonObject;
7983
+ };
7102
7984
  /** Array of row objects. */
7103
7985
  rows?: SearchResultRow[];
7986
+ static serialize(obj: any): SearchResultProperties.Transport;
7987
+ static deserialize(obj: any): SearchResultProperties;
7988
+ }
7989
+ namespace SearchResultProperties {
7990
+ interface Transport {
7991
+ total_rows: number;
7992
+ bookmark?: string;
7993
+ by?: string;
7994
+ counts?: {
7995
+ [key: string]: JsonObject;
7996
+ };
7997
+ ranges?: {
7998
+ [key: string]: JsonObject;
7999
+ };
8000
+ rows?: SearchResultRow[];
8001
+ }
7104
8002
  }
7105
8003
  /** Schema for a row of the result of a query search operation. */
7106
- interface SearchResultRow {
8004
+ class SearchResultRow {
7107
8005
  /** Schema for a document. */
7108
8006
  doc?: Document;
7109
8007
  /** Schema for the fields returned by a query search operation, a map of field name to value. */
@@ -7114,9 +8012,19 @@ declare namespace CloudantV1 {
7114
8012
  highlights?: JsonObject;
7115
8013
  /** Schema for a document ID. */
7116
8014
  id: string;
8015
+ static serialize(obj: any): SearchResultRow.Transport;
8016
+ static deserialize(obj: any): SearchResultRow;
8017
+ }
8018
+ namespace SearchResultRow {
8019
+ interface Transport {
8020
+ doc?: Document.Transport;
8021
+ fields: JsonObject;
8022
+ highlights?: JsonObject;
8023
+ id: string;
8024
+ }
7117
8025
  }
7118
8026
  /** Schema for a security document. */
7119
- interface Security {
8027
+ class Security {
7120
8028
  /** Schema for names and roles to map to a database permission. */
7121
8029
  admins?: SecurityObject;
7122
8030
  /** Schema for names and roles to map to a database permission. */
@@ -7124,17 +8032,35 @@ declare namespace CloudantV1 {
7124
8032
  /** Database permissions for Cloudant users and/or API keys. */
7125
8033
  cloudant?: JsonObject;
7126
8034
  /** Manage permissions using the `_users` database only. */
7127
- couchdb_auth_only?: boolean;
8035
+ couchdbAuthOnly?: boolean;
8036
+ static serialize(obj: any): Security.Transport;
8037
+ static deserialize(obj: any): Security;
8038
+ }
8039
+ namespace Security {
8040
+ interface Transport {
8041
+ admins?: SecurityObject.Transport;
8042
+ members?: SecurityObject.Transport;
8043
+ cloudant?: JsonObject;
8044
+ couchdb_auth_only?: boolean;
8045
+ }
7128
8046
  }
7129
8047
  /** Schema for names and roles to map to a database permission. */
7130
- interface SecurityObject {
8048
+ class SecurityObject {
7131
8049
  /** List of usernames. */
7132
8050
  names?: string[];
7133
8051
  /** List of roles. */
7134
8052
  roles?: string[];
8053
+ static serialize(obj: any): SecurityObject.Transport;
8054
+ static deserialize(obj: any): SecurityObject;
8055
+ }
8056
+ namespace SecurityObject {
8057
+ interface Transport {
8058
+ names?: string[];
8059
+ roles?: string[];
8060
+ }
7135
8061
  }
7136
8062
  /** Schema for information about the server instance. */
7137
- interface ServerInformation {
8063
+ class ServerInformation {
7138
8064
  /** Welcome message. */
7139
8065
  couchdb: string;
7140
8066
  /** List of enabled optional features. */
@@ -7144,42 +8070,87 @@ declare namespace CloudantV1 {
7144
8070
  /** Apache CouchDB version. */
7145
8071
  version: string;
7146
8072
  /** List of feature flags. */
7147
- features_flags: string[];
8073
+ featuresFlags: string[];
8074
+ static serialize(obj: any): ServerInformation.Transport;
8075
+ static deserialize(obj: any): ServerInformation;
8076
+ }
8077
+ namespace ServerInformation {
8078
+ interface Transport {
8079
+ couchdb: string;
8080
+ features: string[];
8081
+ vendor: ServerVendor.Transport;
8082
+ version: string;
8083
+ features_flags: string[];
8084
+ }
7148
8085
  }
7149
8086
  /** Schema for server vendor information. */
7150
- interface ServerVendor {
8087
+ class ServerVendor {
7151
8088
  /** Vendor name. */
7152
8089
  name: string;
7153
8090
  /** Vendor variant. */
7154
8091
  variant?: string;
7155
8092
  /** Vendor version. */
7156
8093
  version?: string;
8094
+ static serialize(obj: any): ServerVendor.Transport;
8095
+ static deserialize(obj: any): ServerVendor;
8096
+ }
8097
+ namespace ServerVendor {
8098
+ interface Transport {
8099
+ name: string;
8100
+ variant?: string;
8101
+ version?: string;
8102
+ }
7157
8103
  }
7158
8104
  /** Schema for session authentication information. */
7159
- interface SessionAuthentication {
8105
+ class SessionAuthentication {
7160
8106
  /** authenticated. */
7161
8107
  authenticated?: string;
7162
8108
  /** authentication_db. */
7163
- authentication_db?: string;
8109
+ authenticationDb?: string;
7164
8110
  /** authentication_handlers. */
7165
- authentication_handlers: string[];
8111
+ authenticationHandlers: string[];
8112
+ static serialize(obj: any): SessionAuthentication.Transport;
8113
+ static deserialize(obj: any): SessionAuthentication;
8114
+ }
8115
+ namespace SessionAuthentication {
8116
+ interface Transport {
8117
+ authenticated?: string;
8118
+ authentication_db?: string;
8119
+ authentication_handlers: string[];
8120
+ }
7166
8121
  }
7167
8122
  /** Schema for information about a session. */
7168
- interface SessionInformation {
8123
+ class SessionInformation {
7169
8124
  /** ok. */
7170
8125
  ok: boolean;
7171
8126
  /** Schema for session authentication information. */
7172
8127
  info: SessionAuthentication;
7173
8128
  /** Schema for the user context of a session. */
7174
8129
  userCtx: UserContext;
8130
+ static serialize(obj: any): SessionInformation.Transport;
8131
+ static deserialize(obj: any): SessionInformation;
8132
+ }
8133
+ namespace SessionInformation {
8134
+ interface Transport {
8135
+ ok: boolean;
8136
+ info: SessionAuthentication.Transport;
8137
+ userCtx: UserContext.Transport;
8138
+ }
7175
8139
  }
7176
8140
  /** Schema for a shards object that maps the hash value range for each shard to the array of nodes that contain a copy of that shard. */
7177
- interface ShardsInformation {
8141
+ class ShardsInformation {
7178
8142
  /** Mapping of shard hash value range to a list of nodes. */
7179
8143
  shards: JsonObject;
8144
+ static serialize(obj: any): ShardsInformation.Transport;
8145
+ static deserialize(obj: any): ShardsInformation;
8146
+ }
8147
+ namespace ShardsInformation {
8148
+ interface Transport {
8149
+ shards: JsonObject;
8150
+ }
7180
8151
  }
7181
8152
  /** Schema for detailed information about throughput capacity with breakdown by specific throughput requests classes. */
7182
- interface ThroughputInformation {
8153
+ class ThroughputInformation {
7183
8154
  /** A number of blocks of throughput units. A block consists of 100 reads/sec, 50 writes/sec, and 5 global
7184
8155
  * queries/sec of provisioned throughput capacity.
7185
8156
  */
@@ -7190,13 +8161,25 @@ declare namespace CloudantV1 {
7190
8161
  read: number;
7191
8162
  /** Provisioned writes capacity in operations per second. */
7192
8163
  write: number;
8164
+ static serialize(obj: any): ThroughputInformation.Transport;
8165
+ static deserialize(obj: any): ThroughputInformation;
8166
+ }
8167
+ namespace ThroughputInformation {
8168
+ interface Transport {
8169
+ blocks: number;
8170
+ query: number;
8171
+ read: number;
8172
+ write: number;
8173
+ }
7193
8174
  }
7194
8175
  /** Schema for information about the up state of the server. */
7195
- interface UpInformation {
8176
+ class UpInformation {
7196
8177
  /** seeds. */
7197
8178
  seeds: JsonObject;
7198
8179
  /** status. */
7199
8180
  status: UpInformation.Constants.Status | string;
8181
+ static serialize(obj: any): UpInformation.Transport;
8182
+ static deserialize(obj: any): UpInformation;
7200
8183
  }
7201
8184
  namespace UpInformation {
7202
8185
  namespace Constants {
@@ -7207,9 +8190,13 @@ declare namespace CloudantV1 {
7207
8190
  OK = "ok"
7208
8191
  }
7209
8192
  }
8193
+ interface Transport {
8194
+ seeds: JsonObject;
8195
+ status: string;
8196
+ }
7210
8197
  }
7211
8198
  /** Schema for an ability to tell if view is up-to-date without querying it. */
7212
- interface UpdatesPending {
8199
+ class UpdatesPending {
7213
8200
  /** Sum of shard copies with the least amount of work to do. */
7214
8201
  minimum: number;
7215
8202
  /** Sum of unique shards. This value is zero when at least one copy of every shard range is up-to-date and the
@@ -7218,15 +8205,26 @@ declare namespace CloudantV1 {
7218
8205
  preferred: number;
7219
8206
  /** Sum of all shard copies. */
7220
8207
  total: number;
8208
+ static serialize(obj: any): UpdatesPending.Transport;
8209
+ static deserialize(obj: any): UpdatesPending;
8210
+ }
8211
+ namespace UpdatesPending {
8212
+ interface Transport {
8213
+ minimum: number;
8214
+ preferred: number;
8215
+ total: number;
8216
+ }
7221
8217
  }
7222
8218
  /** Schema for the user context of a session. */
7223
- interface UserContext {
8219
+ class UserContext {
7224
8220
  /** Database name in the context of the provided operation. */
7225
8221
  db?: string;
7226
8222
  /** User name. */
7227
- name: string;
8223
+ name: string | null;
7228
8224
  /** List of user roles. */
7229
8225
  roles: UserContext.Constants.Roles[] | string[];
8226
+ static serialize(obj: any): UserContext.Transport;
8227
+ static deserialize(obj: any): UserContext;
7230
8228
  }
7231
8229
  namespace UserContext {
7232
8230
  namespace Constants {
@@ -7242,25 +8240,44 @@ declare namespace CloudantV1 {
7242
8240
  SECURITY = "_security"
7243
8241
  }
7244
8242
  }
8243
+ interface Transport {
8244
+ db?: string;
8245
+ name: string;
8246
+ roles: string[];
8247
+ }
7245
8248
  }
7246
8249
  /** Schema for a set of uuids generated by the server. */
7247
- interface UuidsResult {
8250
+ class UuidsResult {
7248
8251
  /** uuids. */
7249
8252
  uuids: string[];
8253
+ static serialize(obj: any): UuidsResult.Transport;
8254
+ static deserialize(obj: any): UuidsResult;
8255
+ }
8256
+ namespace UuidsResult {
8257
+ interface Transport {
8258
+ uuids: string[];
8259
+ }
7250
8260
  }
7251
8261
  /** Schema for the results of a queries view operation. */
7252
- interface ViewQueriesResult {
8262
+ class ViewQueriesResult {
7253
8263
  /** An array of result objects - one for each query. Each result object contains the same fields as the response
7254
8264
  * to a regular view request.
7255
8265
  */
7256
8266
  results: ViewResult[];
8267
+ static serialize(obj: any): ViewQueriesResult.Transport;
8268
+ static deserialize(obj: any): ViewQueriesResult;
8269
+ }
8270
+ namespace ViewQueriesResult {
8271
+ interface Transport {
8272
+ results: ViewResult[];
8273
+ }
7257
8274
  }
7258
8275
  /** Schema for a query view operation. */
7259
- interface ViewQuery {
8276
+ class ViewQuery {
7260
8277
  /** Parameter to specify whether to include the encoding information in attachment stubs if the particular
7261
8278
  * attachment is compressed.
7262
8279
  */
7263
- att_encoding_info?: boolean;
8280
+ attEncodingInfo?: boolean;
7264
8281
  /** Parameter to specify whether to include attachments bodies in a response. */
7265
8282
  attachments?: boolean;
7266
8283
  /** Parameter to specify whether to include a list of conflicted revisions in each returned document. Active
@@ -7270,9 +8287,9 @@ declare namespace CloudantV1 {
7270
8287
  /** Parameter to specify whether to return the documents in descending by key order. */
7271
8288
  descending?: boolean;
7272
8289
  /** Parameter to specify whether to include the full content of the documents in the response. */
7273
- include_docs?: boolean;
8290
+ includeDocs?: boolean;
7274
8291
  /** Parameter to specify whether the specified end key should be included in the result. */
7275
- inclusive_end?: boolean;
8292
+ inclusiveEnd?: boolean;
7276
8293
  /** Parameter to specify the number of returned documents to limit the result to. */
7277
8294
  limit?: number;
7278
8295
  /** Parameter to specify the number of records before starting to return the results. */
@@ -7280,11 +8297,11 @@ declare namespace CloudantV1 {
7280
8297
  /** Parameter to specify whether to include in the response an update_seq value indicating the sequence id of
7281
8298
  * the database the view reflects.
7282
8299
  */
7283
- update_seq?: boolean;
8300
+ updateSeq?: boolean;
7284
8301
  /** Schema for any JSON type. */
7285
- end_key?: any;
8302
+ endKey?: any | null;
7286
8303
  /** Schema for a document ID. */
7287
- end_key_doc_id?: string;
8304
+ endKeyDocId?: string;
7288
8305
  /** Parameter to specify whether to group reduced results by key. Valid only if a reduce function defined in the
7289
8306
  * view. If the view emits key in JSON array format, then it is possible to reduce groups further based on the
7290
8307
  * number of array elements with the `group_level` parameter.
@@ -7294,9 +8311,9 @@ declare namespace CloudantV1 {
7294
8311
  * Implies group is `true`. Group level groups the reduced results by the specified number of array elements. If
7295
8312
  * unset, results are grouped by the entire array key, returning a reduced value for each complete key.
7296
8313
  */
7297
- group_level?: number;
8314
+ groupLevel?: number;
7298
8315
  /** Schema for any JSON type. */
7299
- key?: any;
8316
+ key?: any | null;
7300
8317
  /** Parameter to specify returning only documents that match any of the specified keys. A JSON array of keys
7301
8318
  * that match the key type emitted by the view function.
7302
8319
  */
@@ -7314,9 +8331,9 @@ declare namespace CloudantV1 {
7314
8331
  */
7315
8332
  stable?: boolean;
7316
8333
  /** Schema for any JSON type. */
7317
- start_key?: any;
8334
+ startKey?: any | null;
7318
8335
  /** Schema for a document ID. */
7319
- start_key_doc_id?: string;
8336
+ startKeyDocId?: string;
7320
8337
  /** Parameter to specify whether or not the view in question should be updated prior to responding to the user.
7321
8338
  *
7322
8339
  * * `true` - Return results after the view is updated.
@@ -7324,6 +8341,8 @@ declare namespace CloudantV1 {
7324
8341
  * * `lazy` - Return the view results without waiting for an update, but update them immediately after the request.
7325
8342
  */
7326
8343
  update?: ViewQuery.Constants.Update | string;
8344
+ static serialize(obj: any): ViewQuery.Transport;
8345
+ static deserialize(obj: any): ViewQuery;
7327
8346
  }
7328
8347
  namespace ViewQuery {
7329
8348
  namespace Constants {
@@ -7334,20 +8353,51 @@ declare namespace CloudantV1 {
7334
8353
  LAZY = "lazy"
7335
8354
  }
7336
8355
  }
8356
+ interface Transport {
8357
+ att_encoding_info?: boolean;
8358
+ attachments?: boolean;
8359
+ conflicts?: boolean;
8360
+ descending?: boolean;
8361
+ include_docs?: boolean;
8362
+ inclusive_end?: boolean;
8363
+ limit?: number;
8364
+ skip?: number;
8365
+ update_seq?: boolean;
8366
+ end_key?: any;
8367
+ end_key_doc_id?: string;
8368
+ group?: boolean;
8369
+ group_level?: number;
8370
+ key?: any;
8371
+ keys?: any[];
8372
+ reduce?: boolean;
8373
+ stable?: boolean;
8374
+ start_key?: any;
8375
+ start_key_doc_id?: string;
8376
+ update?: string;
8377
+ }
7337
8378
  }
7338
8379
  /** Schema for the result of a query view operation. */
7339
- interface ViewResult {
8380
+ class ViewResult {
7340
8381
  /** Number of total rows. */
7341
- total_rows?: number;
8382
+ totalRows?: number | null;
7342
8383
  /** Current update sequence for the database. */
7343
- update_seq?: string;
8384
+ updateSeq?: string;
7344
8385
  /** rows. */
7345
8386
  rows: ViewResultRow[];
8387
+ static serialize(obj: any): ViewResult.Transport;
8388
+ static deserialize(obj: any): ViewResult;
8389
+ }
8390
+ namespace ViewResult {
8391
+ interface Transport {
8392
+ total_rows?: number;
8393
+ update_seq?: string;
8394
+ rows: ViewResultRow[];
8395
+ }
7346
8396
  }
7347
8397
  /** Schema for a row of a view result. */
7348
- interface ViewResultRow {
8398
+ class ViewResultRow {
7349
8399
  /** The cause of the error (if available). */
7350
- caused_by?: string;
8400
+ causedBy?: string;
7351
8401
  /** The name of the error. */
7352
8402
  error?: string;
7353
8403
  /** The reason the error occurred (if available). */
@@ -7357,9 +8407,22 @@ declare namespace CloudantV1 {
7357
8407
  /** Schema for a document ID. */
7358
8408
  id?: string;
7359
8409
  /** Schema for any JSON type. */
7360
- key: any;
8410
+ key: any | null;
7361
8411
  /** Schema for any JSON type. */
7362
- value: any;
8412
+ value: any | null;
8413
+ static serialize(obj: any): ViewResultRow.Transport;
8414
+ static deserialize(obj: any): ViewResultRow;
8415
+ }
8416
+ namespace ViewResultRow {
8417
+ interface Transport {
8418
+ caused_by?: string;
8419
+ error?: string;
8420
+ reason?: string;
8421
+ doc?: Document.Transport;
8422
+ id?: string;
8423
+ key: any;
8424
+ value: any;
8425
+ }
7363
8426
  }
7364
8427
  }
7365
8428
  export = CloudantV1;