@ibm-cloud/cloudant 0.7.0 → 0.7.2
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/README.md +29 -29
- package/cloudant/v1.d.ts +270 -22
- package/cloudant/v1.js +288 -2
- package/cloudant/v1.js.map +1 -1
- package/package.json +12 -12
package/cloudant/v1.js
CHANGED
|
@@ -863,8 +863,9 @@ var CloudantV1 = /** @class */ (function (_super) {
|
|
|
863
863
|
* @param {boolean} [params.partitioned] - Query parameter to specify whether to enable database partitions when
|
|
864
864
|
* creating a database.
|
|
865
865
|
* @param {number} [params.q] - The number of shards in the database. Each shard is a partition of the hash value
|
|
866
|
-
* range.
|
|
867
|
-
*
|
|
866
|
+
* range. Cloudant recommends using the default value for most databases. However, if your database is expected to be
|
|
867
|
+
* larger than 250 GB or have a lot of indexes, you may need to adjust the settings. In these cases, it's best to
|
|
868
|
+
* reach out to IBM Cloudant customer support for guidance on how to meet your specific needs and requirements.
|
|
868
869
|
* @param {OutgoingHttpHeaders} [params.headers] - Custom request headers
|
|
869
870
|
* @returns {Promise<CloudantV1.Response<CloudantV1.Ok>>}
|
|
870
871
|
*/
|
|
@@ -6335,6 +6336,291 @@ var CloudantV1 = /** @class */ (function (_super) {
|
|
|
6335
6336
|
Types["DATA"] = "data";
|
|
6336
6337
|
})(Types = PostActivityTrackerEventsConstants.Types || (PostActivityTrackerEventsConstants.Types = {}));
|
|
6337
6338
|
})(PostActivityTrackerEventsConstants = CloudantV1.PostActivityTrackerEventsConstants || (CloudantV1.PostActivityTrackerEventsConstants = {}));
|
|
6339
|
+
var ActiveTask;
|
|
6340
|
+
(function (ActiveTask) {
|
|
6341
|
+
var Constants;
|
|
6342
|
+
(function (Constants) {
|
|
6343
|
+
/** The phase the active task is in. `docid_sort`, `docid_copy`, `document_copy` phases are available for `database_compaction`, while `ids` and `view` phases are available for `view_compaction` type tasks. */
|
|
6344
|
+
var Phase;
|
|
6345
|
+
(function (Phase) {
|
|
6346
|
+
Phase["DOCID_SORT"] = "docid_sort";
|
|
6347
|
+
Phase["DOCID_COPY"] = "docid_copy";
|
|
6348
|
+
Phase["DOCUMENT_COPY"] = "document_copy";
|
|
6349
|
+
Phase["IDS"] = "ids";
|
|
6350
|
+
Phase["VIEW"] = "view";
|
|
6351
|
+
})(Phase = Constants.Phase || (Constants.Phase = {}));
|
|
6352
|
+
/** Process status. */
|
|
6353
|
+
var ProcessStatus;
|
|
6354
|
+
(function (ProcessStatus) {
|
|
6355
|
+
ProcessStatus["EXITING"] = "exiting";
|
|
6356
|
+
ProcessStatus["GARBAGE_COLLECTING"] = "garbage_collecting";
|
|
6357
|
+
ProcessStatus["RUNNABLE"] = "runnable";
|
|
6358
|
+
ProcessStatus["RUNNING"] = "running";
|
|
6359
|
+
ProcessStatus["SUSPENDED"] = "suspended";
|
|
6360
|
+
ProcessStatus["WAITING"] = "waiting";
|
|
6361
|
+
})(ProcessStatus = Constants.ProcessStatus || (Constants.ProcessStatus = {}));
|
|
6362
|
+
/** Operation type. */
|
|
6363
|
+
var Type;
|
|
6364
|
+
(function (Type) {
|
|
6365
|
+
Type["DATABASE_COMPACTION"] = "database_compaction";
|
|
6366
|
+
Type["INDEXER"] = "indexer";
|
|
6367
|
+
Type["REPLICATION"] = "replication";
|
|
6368
|
+
Type["SEARCH_INDEXER"] = "search_indexer";
|
|
6369
|
+
Type["VIEW_COMPACTION"] = "view_compaction";
|
|
6370
|
+
})(Type = Constants.Type || (Constants.Type = {}));
|
|
6371
|
+
})(Constants = ActiveTask.Constants || (ActiveTask.Constants = {}));
|
|
6372
|
+
})(ActiveTask = CloudantV1.ActiveTask || (CloudantV1.ActiveTask = {}));
|
|
6373
|
+
var ActivityTrackerEvents;
|
|
6374
|
+
(function (ActivityTrackerEvents) {
|
|
6375
|
+
var Constants;
|
|
6376
|
+
(function (Constants) {
|
|
6377
|
+
/** An array of event types that are being sent to IBM Cloud Activity Tracker for the IBM Cloudant instance. "management" is a required element of this array. */
|
|
6378
|
+
var Types;
|
|
6379
|
+
(function (Types) {
|
|
6380
|
+
Types["MANAGEMENT"] = "management";
|
|
6381
|
+
Types["DATA"] = "data";
|
|
6382
|
+
})(Types = Constants.Types || (Constants.Types = {}));
|
|
6383
|
+
})(Constants = ActivityTrackerEvents.Constants || (ActivityTrackerEvents.Constants = {}));
|
|
6384
|
+
})(ActivityTrackerEvents = CloudantV1.ActivityTrackerEvents || (CloudantV1.ActivityTrackerEvents = {}));
|
|
6385
|
+
var Analyzer;
|
|
6386
|
+
(function (Analyzer) {
|
|
6387
|
+
var Constants;
|
|
6388
|
+
(function (Constants) {
|
|
6389
|
+
/** Schema for the name of the Apache Lucene analyzer to use for text indexing. The default value varies depending on the analyzer usage: * For search indexes the default is `standard` * For query text indexes the default is `keyword` * For a query text index default_field the default is `standard`. */
|
|
6390
|
+
var Name;
|
|
6391
|
+
(function (Name) {
|
|
6392
|
+
Name["CLASSIC"] = "classic";
|
|
6393
|
+
Name["EMAIL"] = "email";
|
|
6394
|
+
Name["KEYWORD"] = "keyword";
|
|
6395
|
+
Name["SIMPLE"] = "simple";
|
|
6396
|
+
Name["STANDARD"] = "standard";
|
|
6397
|
+
Name["WHITESPACE"] = "whitespace";
|
|
6398
|
+
Name["ARABIC"] = "arabic";
|
|
6399
|
+
Name["ARMENIAN"] = "armenian";
|
|
6400
|
+
Name["BASQUE"] = "basque";
|
|
6401
|
+
Name["BULGARIAN"] = "bulgarian";
|
|
6402
|
+
Name["BRAZILIAN"] = "brazilian";
|
|
6403
|
+
Name["CATALAN"] = "catalan";
|
|
6404
|
+
Name["CJK"] = "cjk";
|
|
6405
|
+
Name["CHINESE"] = "chinese";
|
|
6406
|
+
Name["CZECH"] = "czech";
|
|
6407
|
+
Name["DANISH"] = "danish";
|
|
6408
|
+
Name["DUTCH"] = "dutch";
|
|
6409
|
+
Name["ENGLISH"] = "english";
|
|
6410
|
+
Name["FINNISH"] = "finnish";
|
|
6411
|
+
Name["FRENCH"] = "french";
|
|
6412
|
+
Name["GERMAN"] = "german";
|
|
6413
|
+
Name["GREEK"] = "greek";
|
|
6414
|
+
Name["GALICIAN"] = "galician";
|
|
6415
|
+
Name["HINDI"] = "hindi";
|
|
6416
|
+
Name["HUNGARIAN"] = "hungarian";
|
|
6417
|
+
Name["INDONESIAN"] = "indonesian";
|
|
6418
|
+
Name["IRISH"] = "irish";
|
|
6419
|
+
Name["ITALIAN"] = "italian";
|
|
6420
|
+
Name["JAPANESE"] = "japanese";
|
|
6421
|
+
Name["LATVIAN"] = "latvian";
|
|
6422
|
+
Name["NORWEGIAN"] = "norwegian";
|
|
6423
|
+
Name["PERSIAN"] = "persian";
|
|
6424
|
+
Name["POLISH"] = "polish";
|
|
6425
|
+
Name["PORTUGUESE"] = "portuguese";
|
|
6426
|
+
Name["ROMANIAN"] = "romanian";
|
|
6427
|
+
Name["RUSSIAN"] = "russian";
|
|
6428
|
+
Name["SPANISH"] = "spanish";
|
|
6429
|
+
Name["SWEDISH"] = "swedish";
|
|
6430
|
+
Name["THAI"] = "thai";
|
|
6431
|
+
Name["TURKISH"] = "turkish";
|
|
6432
|
+
Name["PERFIELD"] = "perfield";
|
|
6433
|
+
})(Name = Constants.Name || (Constants.Name = {}));
|
|
6434
|
+
})(Constants = Analyzer.Constants || (Analyzer.Constants = {}));
|
|
6435
|
+
})(Analyzer = CloudantV1.Analyzer || (CloudantV1.Analyzer = {}));
|
|
6436
|
+
var AnalyzerConfiguration;
|
|
6437
|
+
(function (AnalyzerConfiguration) {
|
|
6438
|
+
var Constants;
|
|
6439
|
+
(function (Constants) {
|
|
6440
|
+
/** Schema for the name of the Apache Lucene analyzer to use for text indexing. The default value varies depending on the analyzer usage: * For search indexes the default is `standard` * For query text indexes the default is `keyword` * For a query text index default_field the default is `standard`. */
|
|
6441
|
+
var Name;
|
|
6442
|
+
(function (Name) {
|
|
6443
|
+
Name["CLASSIC"] = "classic";
|
|
6444
|
+
Name["EMAIL"] = "email";
|
|
6445
|
+
Name["KEYWORD"] = "keyword";
|
|
6446
|
+
Name["SIMPLE"] = "simple";
|
|
6447
|
+
Name["STANDARD"] = "standard";
|
|
6448
|
+
Name["WHITESPACE"] = "whitespace";
|
|
6449
|
+
Name["ARABIC"] = "arabic";
|
|
6450
|
+
Name["ARMENIAN"] = "armenian";
|
|
6451
|
+
Name["BASQUE"] = "basque";
|
|
6452
|
+
Name["BULGARIAN"] = "bulgarian";
|
|
6453
|
+
Name["BRAZILIAN"] = "brazilian";
|
|
6454
|
+
Name["CATALAN"] = "catalan";
|
|
6455
|
+
Name["CJK"] = "cjk";
|
|
6456
|
+
Name["CHINESE"] = "chinese";
|
|
6457
|
+
Name["CZECH"] = "czech";
|
|
6458
|
+
Name["DANISH"] = "danish";
|
|
6459
|
+
Name["DUTCH"] = "dutch";
|
|
6460
|
+
Name["ENGLISH"] = "english";
|
|
6461
|
+
Name["FINNISH"] = "finnish";
|
|
6462
|
+
Name["FRENCH"] = "french";
|
|
6463
|
+
Name["GERMAN"] = "german";
|
|
6464
|
+
Name["GREEK"] = "greek";
|
|
6465
|
+
Name["GALICIAN"] = "galician";
|
|
6466
|
+
Name["HINDI"] = "hindi";
|
|
6467
|
+
Name["HUNGARIAN"] = "hungarian";
|
|
6468
|
+
Name["INDONESIAN"] = "indonesian";
|
|
6469
|
+
Name["IRISH"] = "irish";
|
|
6470
|
+
Name["ITALIAN"] = "italian";
|
|
6471
|
+
Name["JAPANESE"] = "japanese";
|
|
6472
|
+
Name["LATVIAN"] = "latvian";
|
|
6473
|
+
Name["NORWEGIAN"] = "norwegian";
|
|
6474
|
+
Name["PERSIAN"] = "persian";
|
|
6475
|
+
Name["POLISH"] = "polish";
|
|
6476
|
+
Name["PORTUGUESE"] = "portuguese";
|
|
6477
|
+
Name["ROMANIAN"] = "romanian";
|
|
6478
|
+
Name["RUSSIAN"] = "russian";
|
|
6479
|
+
Name["SPANISH"] = "spanish";
|
|
6480
|
+
Name["SWEDISH"] = "swedish";
|
|
6481
|
+
Name["THAI"] = "thai";
|
|
6482
|
+
Name["TURKISH"] = "turkish";
|
|
6483
|
+
Name["PERFIELD"] = "perfield";
|
|
6484
|
+
})(Name = Constants.Name || (Constants.Name = {}));
|
|
6485
|
+
})(Constants = AnalyzerConfiguration.Constants || (AnalyzerConfiguration.Constants = {}));
|
|
6486
|
+
})(AnalyzerConfiguration = CloudantV1.AnalyzerConfiguration || (CloudantV1.AnalyzerConfiguration = {}));
|
|
6487
|
+
var DbEvent;
|
|
6488
|
+
(function (DbEvent) {
|
|
6489
|
+
var Constants;
|
|
6490
|
+
(function (Constants) {
|
|
6491
|
+
/** A database event. */
|
|
6492
|
+
var Type;
|
|
6493
|
+
(function (Type) {
|
|
6494
|
+
Type["CREATED"] = "created";
|
|
6495
|
+
Type["DELETED"] = "deleted";
|
|
6496
|
+
Type["UPDATED"] = "updated";
|
|
6497
|
+
})(Type = Constants.Type || (Constants.Type = {}));
|
|
6498
|
+
})(Constants = DbEvent.Constants || (DbEvent.Constants = {}));
|
|
6499
|
+
})(DbEvent = CloudantV1.DbEvent || (CloudantV1.DbEvent = {}));
|
|
6500
|
+
var DocumentRevisionStatus;
|
|
6501
|
+
(function (DocumentRevisionStatus) {
|
|
6502
|
+
var Constants;
|
|
6503
|
+
(function (Constants) {
|
|
6504
|
+
/** Status of the revision. May be one of: - `available`: Revision is available for retrieving with rev query parameter - `missing`: Revision is not available - `deleted`: Revision belongs to deleted document. */
|
|
6505
|
+
var Status;
|
|
6506
|
+
(function (Status) {
|
|
6507
|
+
Status["AVAILABLE"] = "available";
|
|
6508
|
+
Status["MISSING"] = "missing";
|
|
6509
|
+
Status["DELETED"] = "deleted";
|
|
6510
|
+
})(Status = Constants.Status || (Constants.Status = {}));
|
|
6511
|
+
})(Constants = DocumentRevisionStatus.Constants || (DocumentRevisionStatus.Constants = {}));
|
|
6512
|
+
})(DocumentRevisionStatus = CloudantV1.DocumentRevisionStatus || (CloudantV1.DocumentRevisionStatus = {}));
|
|
6513
|
+
var ExplainResultMrArgs;
|
|
6514
|
+
(function (ExplainResultMrArgs) {
|
|
6515
|
+
var Constants;
|
|
6516
|
+
(function (Constants) {
|
|
6517
|
+
/** The type of the underlying view. */
|
|
6518
|
+
var ViewType;
|
|
6519
|
+
(function (ViewType) {
|
|
6520
|
+
ViewType["MAP"] = "map";
|
|
6521
|
+
ViewType["REDUCE"] = "reduce";
|
|
6522
|
+
})(ViewType = Constants.ViewType || (Constants.ViewType = {}));
|
|
6523
|
+
})(Constants = ExplainResultMrArgs.Constants || (ExplainResultMrArgs.Constants = {}));
|
|
6524
|
+
})(ExplainResultMrArgs = CloudantV1.ExplainResultMrArgs || (CloudantV1.ExplainResultMrArgs = {}));
|
|
6525
|
+
var IndexField;
|
|
6526
|
+
(function (IndexField) {
|
|
6527
|
+
var Constants;
|
|
6528
|
+
(function (Constants) {
|
|
6529
|
+
/** The type of the named field. */
|
|
6530
|
+
var Type;
|
|
6531
|
+
(function (Type) {
|
|
6532
|
+
Type["BOOLEAN"] = "boolean";
|
|
6533
|
+
Type["NUMBER"] = "number";
|
|
6534
|
+
Type["STRING"] = "string";
|
|
6535
|
+
})(Type = Constants.Type || (Constants.Type = {}));
|
|
6536
|
+
})(Constants = IndexField.Constants || (IndexField.Constants = {}));
|
|
6537
|
+
})(IndexField = CloudantV1.IndexField || (CloudantV1.IndexField = {}));
|
|
6538
|
+
var IndexInformation;
|
|
6539
|
+
(function (IndexInformation) {
|
|
6540
|
+
var Constants;
|
|
6541
|
+
(function (Constants) {
|
|
6542
|
+
/** Schema for the type of an index. */
|
|
6543
|
+
var Type;
|
|
6544
|
+
(function (Type) {
|
|
6545
|
+
Type["JSON"] = "json";
|
|
6546
|
+
Type["SPECIAL"] = "special";
|
|
6547
|
+
Type["TEXT"] = "text";
|
|
6548
|
+
})(Type = Constants.Type || (Constants.Type = {}));
|
|
6549
|
+
})(Constants = IndexInformation.Constants || (IndexInformation.Constants = {}));
|
|
6550
|
+
})(IndexInformation = CloudantV1.IndexInformation || (CloudantV1.IndexInformation = {}));
|
|
6551
|
+
var IndexResult;
|
|
6552
|
+
(function (IndexResult) {
|
|
6553
|
+
var Constants;
|
|
6554
|
+
(function (Constants) {
|
|
6555
|
+
/** Flag to show whether the index was created or one already exists. */
|
|
6556
|
+
var Result;
|
|
6557
|
+
(function (Result) {
|
|
6558
|
+
Result["CREATED"] = "created";
|
|
6559
|
+
Result["EXISTS"] = "exists";
|
|
6560
|
+
})(Result = Constants.Result || (Constants.Result = {}));
|
|
6561
|
+
})(Constants = IndexResult.Constants || (IndexResult.Constants = {}));
|
|
6562
|
+
})(IndexResult = CloudantV1.IndexResult || (CloudantV1.IndexResult = {}));
|
|
6563
|
+
var SchedulerDocument;
|
|
6564
|
+
(function (SchedulerDocument) {
|
|
6565
|
+
var Constants;
|
|
6566
|
+
(function (Constants) {
|
|
6567
|
+
/** Schema for replication state. */
|
|
6568
|
+
var State;
|
|
6569
|
+
(function (State) {
|
|
6570
|
+
State["INITIALIZING"] = "initializing";
|
|
6571
|
+
State["ERROR"] = "error";
|
|
6572
|
+
State["PENDING"] = "pending";
|
|
6573
|
+
State["RUNNING"] = "running";
|
|
6574
|
+
State["CRASHING"] = "crashing";
|
|
6575
|
+
State["COMPLETED"] = "completed";
|
|
6576
|
+
State["FAILED"] = "failed";
|
|
6577
|
+
})(State = Constants.State || (Constants.State = {}));
|
|
6578
|
+
})(Constants = SchedulerDocument.Constants || (SchedulerDocument.Constants = {}));
|
|
6579
|
+
})(SchedulerDocument = CloudantV1.SchedulerDocument || (CloudantV1.SchedulerDocument = {}));
|
|
6580
|
+
var UpInformation;
|
|
6581
|
+
(function (UpInformation) {
|
|
6582
|
+
var Constants;
|
|
6583
|
+
(function (Constants) {
|
|
6584
|
+
/** status. */
|
|
6585
|
+
var Status;
|
|
6586
|
+
(function (Status) {
|
|
6587
|
+
Status["MAINTENANCE_MODE"] = "maintenance_mode";
|
|
6588
|
+
Status["NOLB"] = "nolb";
|
|
6589
|
+
Status["OK"] = "ok";
|
|
6590
|
+
})(Status = Constants.Status || (Constants.Status = {}));
|
|
6591
|
+
})(Constants = UpInformation.Constants || (UpInformation.Constants = {}));
|
|
6592
|
+
})(UpInformation = CloudantV1.UpInformation || (CloudantV1.UpInformation = {}));
|
|
6593
|
+
var UserContext;
|
|
6594
|
+
(function (UserContext) {
|
|
6595
|
+
var Constants;
|
|
6596
|
+
(function (Constants) {
|
|
6597
|
+
/** List of user roles. */
|
|
6598
|
+
var Roles;
|
|
6599
|
+
(function (Roles) {
|
|
6600
|
+
Roles["READER"] = "_reader";
|
|
6601
|
+
Roles["WRITER"] = "_writer";
|
|
6602
|
+
Roles["ADMIN"] = "_admin";
|
|
6603
|
+
Roles["REPLICATOR"] = "_replicator";
|
|
6604
|
+
Roles["DB_UPDATES"] = "_db_updates";
|
|
6605
|
+
Roles["DESIGN"] = "_design";
|
|
6606
|
+
Roles["SHARDS"] = "_shards";
|
|
6607
|
+
Roles["SECURITY"] = "_security";
|
|
6608
|
+
})(Roles = Constants.Roles || (Constants.Roles = {}));
|
|
6609
|
+
})(Constants = UserContext.Constants || (UserContext.Constants = {}));
|
|
6610
|
+
})(UserContext = CloudantV1.UserContext || (CloudantV1.UserContext = {}));
|
|
6611
|
+
var ViewQuery;
|
|
6612
|
+
(function (ViewQuery) {
|
|
6613
|
+
var Constants;
|
|
6614
|
+
(function (Constants) {
|
|
6615
|
+
/** Parameter to specify whether or not the view in question should be updated prior to responding to the user. * `true` - Return results after the view is updated. * `false` - Return results without updating the view. * `lazy` - Return the view results without waiting for an update, but update them immediately after the request. */
|
|
6616
|
+
var Update;
|
|
6617
|
+
(function (Update) {
|
|
6618
|
+
Update["TRUE"] = "true";
|
|
6619
|
+
Update["FALSE"] = "false";
|
|
6620
|
+
Update["LAZY"] = "lazy";
|
|
6621
|
+
})(Update = Constants.Update || (Constants.Update = {}));
|
|
6622
|
+
})(Constants = ViewQuery.Constants || (ViewQuery.Constants = {}));
|
|
6623
|
+
})(ViewQuery = CloudantV1.ViewQuery || (CloudantV1.ViewQuery = {}));
|
|
6338
6624
|
})(CloudantV1 || (CloudantV1 = {}));
|
|
6339
6625
|
module.exports = CloudantV1;
|
|
6340
6626
|
//# sourceMappingURL=v1.js.map
|