@mongosh/service-provider-core 3.0.4 → 3.1.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/AUTHORS CHANGED
@@ -21,3 +21,4 @@ Alena Khineika <alena.khineika@mongodb.com>
21
21
  Gagik Amaryan <me@gagik.co>
22
22
  mongodb-devtools-bot[bot] <189715634+mongodb-devtools-bot[bot]@users.noreply.github.com>
23
23
  Ubuntu <ubuntu@ip-10-0-5-160.ec2.internal>
24
+ Ubuntu <ubuntu@ip-10-0-4-95.ec2.internal>
@@ -1 +1 @@
1
- export type { AggregateOptions, AggregationCursor, AnyBulkWriteOperation, Batch, BulkWriteOptions, BulkWriteResult, ChangeStream, ChangeStreamOptions, ClientSession, CollationOptions, Collection, CommandOperationOptions, CountDocumentsOptions, CountOptions, CreateCollectionOptions, CreateIndexesOptions, ClientSessionOptions, ClusterTime, FindCursor, CursorFlag, RunCommandCursor, Db, DbOptions, DeleteOptions, DeleteResult, DistinctOptions, Document, DropCollectionOptions, DropDatabaseOptions, EstimatedDocumentCountOptions, ExplainOptions, ExplainVerbosityLike, FindOneAndDeleteOptions, FindOneAndUpdateOptions, FindOneAndReplaceOptions, FindOperators, FindOptions, HedgeOptions, IndexDescription, InsertManyResult, InsertOneOptions, InsertOneResult, ListCollectionsOptions, ListDatabasesOptions, ListIndexesOptions, MongoClientOptions, OrderedBulkOperation, ReadConcern, ReadConcernLike, ReadConcernLevel, ReadPreference, ReadPreferenceLike, ReadPreferenceFromOptions, ReadPreferenceMode, RenameOptions, ReplaceOptions, ResumeToken, RunCommandOptions, ServerSessionId, TagSet, TransactionOptions, UpdateOptions, UpdateResult, UnorderedBulkOperation, WriteConcern, ObjectId as ObjectIdType, Timestamp as TimestampType, Binary as BinaryType, TopologyDescription, TopologyType, ServerType, AutoEncryptionOptions, ServerApi, ServerApiVersion, MongoClient, } from 'mongodb';
1
+ export type { AggregateOptions, AggregationCursor, AnyBulkWriteOperation, Batch, BulkWriteOptions, BulkWriteResult, ChangeStream, ChangeStreamOptions, ClientSession, CollationOptions, Collection, CommandOperationOptions, CountDocumentsOptions, CountOptions, CreateCollectionOptions, CreateIndexesOptions, ClientSessionOptions, ClusterTime, FindCursor, CursorFlag, RunCommandCursor, Db, DbOptions, DeleteOptions, DeleteResult, DistinctOptions, Document, DropCollectionOptions, DropDatabaseOptions, EstimatedDocumentCountOptions, ExplainOptions, ExplainVerbosityLike, FindOneAndDeleteOptions, FindOneAndUpdateOptions, FindOneAndReplaceOptions, FindOperators, FindOptions, HedgeOptions, IndexDescription, InsertManyResult, InsertOneOptions, InsertOneResult, ListCollectionsOptions, ListDatabasesOptions, ListIndexesOptions, MongoClientOptions, OrderedBulkOperation, ReadConcern, ReadConcernLike, ReadConcernLevel, ReadPreference, ReadPreferenceLike, ReadPreferenceFromOptions, ReadPreferenceMode, RenameOptions, ReplaceOptions, ResumeToken, RunCommandOptions, SearchIndexDescription, ServerSessionId, TagSet, TransactionOptions, UpdateOptions, UpdateResult, UnorderedBulkOperation, WriteConcern, ObjectId as ObjectIdType, Timestamp as TimestampType, Binary as BinaryType, TopologyDescription, TopologyType, ServerType, AutoEncryptionOptions, ServerApi, ServerApiVersion, MongoClient, } from 'mongodb';
package/lib/writable.d.ts CHANGED
@@ -1,5 +1,5 @@
1
1
  import type { RunCursorCommandOptions } from 'mongodb';
2
- import type { Document, InsertOneOptions, InsertOneResult, Collection, RenameOptions, FindOneAndDeleteOptions, FindOneAndReplaceOptions, FindOneAndUpdateOptions, BulkWriteOptions, AnyBulkWriteOperation, DeleteOptions, DeleteResult, InsertManyResult, ReplaceOptions, UpdateResult, UpdateOptions, DropDatabaseOptions, CreateIndexesOptions, DropCollectionOptions, BulkWriteResult, RunCommandOptions, DbOptions, OrderedBulkOperation, UnorderedBulkOperation } from './all-transport-types';
2
+ import type { Document, InsertOneOptions, InsertOneResult, Collection, RenameOptions, FindOneAndDeleteOptions, FindOneAndReplaceOptions, FindOneAndUpdateOptions, BulkWriteOptions, AnyBulkWriteOperation, DeleteOptions, DeleteResult, InsertManyResult, ReplaceOptions, UpdateResult, UpdateOptions, DropDatabaseOptions, CreateIndexesOptions, DropCollectionOptions, BulkWriteResult, RunCommandOptions, DbOptions, OrderedBulkOperation, UnorderedBulkOperation, SearchIndexDescription } from './all-transport-types';
3
3
  import type { ServiceProviderRunCommandCursor } from './cursors';
4
4
  export default interface Writable {
5
5
  runCommand(db: string, spec: Document, options: RunCommandOptions, dbOptions?: DbOptions): Promise<Document>;
@@ -21,11 +21,7 @@ export default interface Writable {
21
21
  dropCollection(database: string, collection: string, options: DropCollectionOptions, dbOptions?: DbOptions): Promise<boolean>;
22
22
  renameCollection(database: string, oldName: string, newName: string, options?: RenameOptions, dbOptions?: DbOptions): Promise<Collection>;
23
23
  initializeBulkOp(dbName: string, collName: string, ordered: boolean, options?: BulkWriteOptions, dbOptions?: DbOptions): Promise<OrderedBulkOperation | UnorderedBulkOperation>;
24
- createSearchIndexes(database: string, collection: string, specs: {
25
- name: string;
26
- type?: 'search' | 'vectorSearch';
27
- definition: Document;
28
- }[], dbOptions?: DbOptions): Promise<string[]>;
24
+ createSearchIndexes(database: string, collection: string, descriptions: SearchIndexDescription[], dbOptions?: DbOptions): Promise<string[]>;
29
25
  dropSearchIndex(database: string, collection: string, index: string, dbOptions?: DbOptions): Promise<void>;
30
26
  updateSearchIndex(database: string, collection: string, index: string, definition: Document, dbOptions?: DbOptions): Promise<void>;
31
27
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mongosh/service-provider-core",
3
- "version": "3.0.4",
3
+ "version": "3.1.0",
4
4
  "description": "MongoDB Shell Core Service Provider Package",
5
5
  "main": "lib/index.js",
6
6
  "types": "lib/index.d.ts",
@@ -46,13 +46,12 @@
46
46
  "@aws-sdk/credential-providers": "^3.525.0",
47
47
  "@mongosh/errors": "2.4.0",
48
48
  "bson": "^6.10.3",
49
- "mongodb": "^6.13.0",
49
+ "mongodb": "^6.14.2",
50
50
  "mongodb-build-info": "^1.7.2",
51
- "mongodb-client-encryption": "^6.1.1",
52
51
  "mongodb-connection-string-url": "^3.0.1"
53
52
  },
54
53
  "optionalDependencies": {
55
- "mongodb-client-encryption": "^6.1.1"
54
+ "mongodb-client-encryption": "^6.3.0"
56
55
  },
57
56
  "devDependencies": {
58
57
  "@mongodb-js/eslint-config-mongosh": "^1.0.0",
@@ -62,5 +61,5 @@
62
61
  "eslint": "^7.25.0",
63
62
  "prettier": "^2.8.8"
64
63
  },
65
- "gitHead": "27df9518d3f56ec3028e0c320936fedf2dcd6764"
64
+ "gitHead": "c21eacff12e630a42eda406cb350b1c2a66fe356"
66
65
  }
@@ -57,6 +57,7 @@ export type {
57
57
  ReplaceOptions,
58
58
  ResumeToken,
59
59
  RunCommandOptions,
60
+ SearchIndexDescription,
60
61
  ServerSessionId,
61
62
  TagSet,
62
63
  TransactionOptions,
package/src/writable.ts CHANGED
@@ -24,6 +24,7 @@ import type {
24
24
  DbOptions,
25
25
  OrderedBulkOperation,
26
26
  UnorderedBulkOperation,
27
+ SearchIndexDescription,
27
28
  } from './all-transport-types';
28
29
  import type { ServiceProviderRunCommandCursor } from './cursors';
29
30
 
@@ -312,7 +313,7 @@ export default interface Writable {
312
313
  *
313
314
  * @param {String} database - The db name.
314
315
  * @param {String} collection - The collection name.
315
- * @param {Object[]} indexSpecs the spec of the indexes to be created.
316
+ * @param {Object[]} indexSpecs - The spec of the indexes to be created.
316
317
  * @param {Object} options - The command options.
317
318
  * @param {DbOptions} dbOptions - The database options
318
319
  * @return {Promise}
@@ -385,12 +386,7 @@ export default interface Writable {
385
386
  createSearchIndexes(
386
387
  database: string,
387
388
  collection: string,
388
- // TODO(MONGOSH-1471): use SearchIndexDescription[] once available
389
- specs: {
390
- name: string;
391
- type?: 'search' | 'vectorSearch';
392
- definition: Document;
393
- }[],
389
+ descriptions: SearchIndexDescription[],
394
390
  dbOptions?: DbOptions
395
391
  ): Promise<string[]>;
396
392