New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@nodescript/adapter-mongodb-protocol

Package Overview
Dependencies
Maintainers
2
Versions
77
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@nodescript/adapter-mongodb-protocol - npm Package Compare versions

Comparing version 0.1.2 to 1.0.0

out/schema/MongoAggregate.d.ts

60

out/domains/MongoDomain.d.ts
import { DomainDef } from '@nodescript/protocomm';
import { MongoAggregate } from '../schema/MongoAggregate.js';
import { MongoDocument } from '../schema/MongoDocument.js';

@@ -6,2 +7,3 @@ import { MongoFilter } from '../schema/MongoFilter.js';

import { MongoSort } from '../schema/MongoSort.js';
import { MongoUpdate } from '../schema/MongoUpdate.js';
export interface MongoDomain {

@@ -28,3 +30,61 @@ connect(req: {

}>;
insertOne(req: {
collection: string;
document: MongoDocument;
}): Promise<{
insertedId: string;
}>;
insertMany(req: {
collection: string;
documents: MongoDocument[];
}): Promise<{
insertedIds: string[];
}>;
updateOne(req: {
collection: string;
filter: MongoFilter;
update: MongoUpdate;
upsert: boolean;
}): Promise<{
matchedCount: number;
modifiedCount: number;
upsertedId?: string;
}>;
updateMany(req: {
collection: string;
filter: MongoFilter;
update: MongoUpdate;
}): Promise<{
matchedCount: number;
modifiedCount: number;
}>;
replaceOne(req: {
collection: string;
filter: MongoFilter;
replacement: MongoDocument;
upsert: boolean;
}): Promise<{
matchedCount: number;
modifiedCount: number;
upsertedId?: string;
}>;
deleteOne(req: {
collection: string;
filter: MongoFilter;
}): Promise<{
deletedCount: number;
}>;
deleteMany(req: {
collection: string;
filter: MongoFilter;
}): Promise<{
deletedCount: number;
}>;
aggregate(req: {
collection: string;
pipeline: MongoAggregate[];
}): Promise<{
documents: MongoDocument[];
}>;
}
export declare const MongoDomain: DomainDef<MongoDomain>;

118

out/domains/MongoDomain.js

@@ -0,1 +1,2 @@

import { MongoAggregateSchema } from '../schema/MongoAggregate.js';
import { MongoDocumentSchema } from '../schema/MongoDocument.js';

@@ -5,2 +6,3 @@ import { MongoFilterSchema } from '../schema/MongoFilter.js';

import { MongoSortSchema } from '../schema/MongoSort.js';
import { MongoUpdateSchema } from '../schema/MongoUpdate.js';
export const MongoDomain = {

@@ -20,5 +22,3 @@ name: 'Mongo',

collection: { type: 'string' },
filter: {
...MongoFilterSchema.schema,
},
filter: MongoFilterSchema.schema,
projection: {

@@ -40,5 +40,3 @@ ...MongoProjectionSchema.schema,

collection: { type: 'string' },
filter: {
...MongoFilterSchema.schema,
},
filter: MongoFilterSchema.schema,
projection: {

@@ -68,2 +66,110 @@ ...MongoProjectionSchema.schema,

},
insertOne: {
type: 'command',
params: {
collection: { type: 'string' },
document: MongoDocumentSchema.schema,
},
returns: {
insertedId: { type: 'string' },
}
},
insertMany: {
type: 'command',
params: {
collection: { type: 'string' },
documents: {
type: 'array',
items: MongoDocumentSchema.schema
},
},
returns: {
insertedIds: {
type: 'array',
items: { type: 'string' },
},
}
},
updateOne: {
type: 'command',
params: {
collection: { type: 'string' },
filter: MongoFilterSchema.schema,
update: MongoUpdateSchema.schema,
upsert: { type: 'boolean' },
},
returns: {
matchedCount: { type: 'number' },
modifiedCount: { type: 'number' },
upsertedId: {
type: 'string',
optional: true,
},
}
},
updateMany: {
type: 'command',
params: {
collection: { type: 'string' },
filter: MongoFilterSchema.schema,
update: MongoUpdateSchema.schema,
},
returns: {
matchedCount: { type: 'number' },
modifiedCount: { type: 'number' },
}
},
replaceOne: {
type: 'command',
params: {
collection: { type: 'string' },
filter: MongoFilterSchema.schema,
replacement: MongoDocumentSchema.schema,
upsert: { type: 'boolean' },
},
returns: {
matchedCount: { type: 'number' },
modifiedCount: { type: 'number' },
upsertedId: {
type: 'string',
optional: true,
},
}
},
deleteOne: {
type: 'command',
params: {
collection: { type: 'string' },
filter: MongoFilterSchema.schema,
},
returns: {
deletedCount: { type: 'number' },
}
},
deleteMany: {
type: 'command',
params: {
collection: { type: 'string' },
filter: MongoFilterSchema.schema,
},
returns: {
deletedCount: { type: 'number' },
}
},
aggregate: {
type: 'command',
params: {
collection: { type: 'string' },
pipeline: {
type: 'array',
items: MongoAggregateSchema.schema,
},
},
returns: {
documents: {
type: 'array',
items: MongoDocumentSchema.schema,
}
}
},
},

@@ -70,0 +176,0 @@ events: {},

4

out/index.d.ts
export * from './domains/MongoDomain.js';
export * from './protocol.js';
export * from './schema/MongoAggregate.js';
export * from './schema/MongoDocument.js';

@@ -6,2 +8,2 @@ export * from './schema/MongoFilter.js';

export * from './schema/MongoSort.js';
export * from './protocol.js';
export * from './schema/MongoUpdate.js';
export * from './domains/MongoDomain.js';
export * from './protocol.js';
export * from './schema/MongoAggregate.js';
export * from './schema/MongoDocument.js';

@@ -6,3 +8,3 @@ export * from './schema/MongoFilter.js';

export * from './schema/MongoSort.js';
export * from './protocol.js';
export * from './schema/MongoUpdate.js';
//# sourceMappingURL=index.js.map
{
"name": "@nodescript/adapter-mongodb-protocol",
"version": "0.1.2",
"version": "1.0.0",
"description": "MongoDb Adapter Protocol",

@@ -5,0 +5,0 @@ "type": "module",

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc