Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@conduitplatform/grpc-sdk

Package Overview
Dependencies
Maintainers
1
Versions
87
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@conduitplatform/grpc-sdk - npm Package Compare versions

Comparing version 0.16.0-alpha.14 to 0.16.0-alpha.15

24

dist/modules/database/index.d.ts

@@ -27,16 +27,16 @@ import { ConduitModule } from '../../classes';

processQuery<T>(query: Query<T>): string;
findOne<T>(schemaName: string, query: Query<T>, select?: string, populate?: string | string[]): Promise<T>;
findOne<T>(schemaName: string, query: Query<T>, select?: string, populate?: string | string[], userId?: string, scope?: string): Promise<T>;
findMany<T>(schemaName: string, query: Query<T>, select?: string, skip?: number, limit?: number, sort?: {
[field: string]: -1 | 1;
} | string[] | string, populate?: string | string[]): Promise<T[]>;
create<T>(schemaName: string, query: Query<T>): Promise<T>;
createMany<T>(schemaName: string, query: Query<T>[]): Promise<T[] | UntypedArray>;
findByIdAndUpdate<T>(schemaName: string, id: string, document: Query<T>, populate?: string | string[]): Promise<T | any>;
findByIdAndReplace<T>(schemaName: string, id: string, document: Query<T>, populate?: string | string[]): Promise<T | any>;
updateMany<T>(schemaName: string, filterQuery: Query<T>, query: Query<T>, populate?: string | string[]): Promise<any>;
updateOne<T>(schemaName: string, filterQuery: Query<T>, query: Query<T>, populate?: string | string[]): Promise<any>;
replaceOne<T>(schemaName: string, filterQuery: Query<T>, query: Query<T>, populate?: string | string[]): Promise<any>;
deleteOne<T>(schemaName: string, query: Query<T>): Promise<any>;
deleteMany<T>(schemaName: string, query: Query<T>): Promise<any>;
countDocuments<T>(schemaName: string, query: Query<T>): Promise<number>;
} | string[] | string, populate?: string | string[], userId?: string, scope?: string): Promise<T[]>;
create<T>(schemaName: string, query: Query<T>, userId?: string, scope?: string): Promise<T>;
createMany<T>(schemaName: string, query: Query<T>[], userId?: string, scope?: string): Promise<T[] | UntypedArray>;
findByIdAndUpdate<T>(schemaName: string, id: string, document: Query<T>, populate?: string | string[], userId?: string, scope?: string): Promise<T | any>;
findByIdAndReplace<T>(schemaName: string, id: string, document: Query<T>, populate?: string | string[], userId?: string, scope?: string): Promise<T | any>;
updateMany<T>(schemaName: string, filterQuery: Query<T>, query: Query<T>, populate?: string | string[], userId?: string, scope?: string): Promise<any>;
updateOne<T>(schemaName: string, filterQuery: Query<T>, query: Query<T>, populate?: string | string[], userId?: string, scope?: string): Promise<any>;
replaceOne<T>(schemaName: string, filterQuery: Query<T>, query: Query<T>, populate?: string | string[], userId?: string, scope?: string): Promise<any>;
deleteOne<T>(schemaName: string, query: Query<T>, userId?: string, scope?: string): Promise<any>;
deleteMany<T>(schemaName: string, query: Query<T>, userId?: string, scope?: string): Promise<any>;
countDocuments<T>(schemaName: string, query: Query<T>, userId?: string, scope?: string): Promise<number>;
rawQuery(schemaName: string, query: RawQuery): Promise<any>;

@@ -43,0 +43,0 @@ createView(schemaName: string, viewName: string, joinedSchemas: string[], query: {

@@ -100,3 +100,3 @@ "use strict";

};
DatabaseProvider.prototype.findOne = function (schemaName, query, select, populate) {
DatabaseProvider.prototype.findOne = function (schemaName, query, select, populate, userId, scope) {
var _a;

@@ -112,2 +112,4 @@ var populateArray = populate;

populate: (_a = populateArray) !== null && _a !== void 0 ? _a : [],
userId: userId,
scope: scope,
}).then(function (res) {

@@ -117,3 +119,3 @@ return JSON.parse(res.result);

};
DatabaseProvider.prototype.findMany = function (schemaName, query, select, skip, limit, sort, populate) {
DatabaseProvider.prototype.findMany = function (schemaName, query, select, skip, limit, sort, populate, userId, scope) {
var _a;

@@ -135,2 +137,4 @@ if (typeof sort === 'string')

populate: (_a = populateArray) !== null && _a !== void 0 ? _a : [],
userId: userId,
scope: scope,
}).then(function (res) {

@@ -140,13 +144,23 @@ return JSON.parse(res.result);

};
DatabaseProvider.prototype.create = function (schemaName, query) {
return this.client.create({ schemaName: schemaName, query: this.processQuery(query) }).then(function (res) {
DatabaseProvider.prototype.create = function (schemaName, query, userId, scope) {
return this.client.create({
schemaName: schemaName,
query: this.processQuery(query),
userId: userId,
scope: scope,
}).then(function (res) {
return JSON.parse(res.result);
});
};
DatabaseProvider.prototype.createMany = function (schemaName, query) {
return this.client.createMany({ schemaName: schemaName, query: this.processQuery(query) }).then(function (res) {
DatabaseProvider.prototype.createMany = function (schemaName, query, userId, scope) {
return this.client.createMany({
schemaName: schemaName,
query: this.processQuery(query),
userId: userId,
scope: scope,
}).then(function (res) {
return JSON.parse(res.result);
});
};
DatabaseProvider.prototype.findByIdAndUpdate = function (schemaName, id, document, populate) {
DatabaseProvider.prototype.findByIdAndUpdate = function (schemaName, id, document, populate, userId, scope) {
var _a;

@@ -162,2 +176,4 @@ var populateArray = populate;

populate: (_a = populateArray) !== null && _a !== void 0 ? _a : [],
userId: userId,
scope: scope,
}).then(function (res) {

@@ -167,3 +183,3 @@ return JSON.parse(res.result);

};
DatabaseProvider.prototype.findByIdAndReplace = function (schemaName, id, document, populate) {
DatabaseProvider.prototype.findByIdAndReplace = function (schemaName, id, document, populate, userId, scope) {
var _a;

@@ -179,2 +195,4 @@ var populateArray = populate;

populate: (_a = populateArray) !== null && _a !== void 0 ? _a : [],
userId: userId,
scope: scope,
}).then(function (res) {

@@ -184,3 +202,3 @@ return JSON.parse(res.result);

};
DatabaseProvider.prototype.updateMany = function (schemaName, filterQuery, query, populate) {
DatabaseProvider.prototype.updateMany = function (schemaName, filterQuery, query, populate, userId, scope) {
var _a;

@@ -196,2 +214,4 @@ var populateArray = populate;

populate: (_a = populateArray) !== null && _a !== void 0 ? _a : [],
userId: userId,
scope: scope,
}).then(function (res) {

@@ -201,3 +221,3 @@ return JSON.parse(res.result);

};
DatabaseProvider.prototype.updateOne = function (schemaName, filterQuery, query, populate) {
DatabaseProvider.prototype.updateOne = function (schemaName, filterQuery, query, populate, userId, scope) {
var _a;

@@ -213,2 +233,4 @@ var populateArray = populate;

populate: (_a = populateArray) !== null && _a !== void 0 ? _a : [],
userId: userId,
scope: scope,
}).then(function (res) {

@@ -218,3 +240,3 @@ return JSON.parse(res.result);

};
DatabaseProvider.prototype.replaceOne = function (schemaName, filterQuery, query, populate) {
DatabaseProvider.prototype.replaceOne = function (schemaName, filterQuery, query, populate, userId, scope) {
var _a;

@@ -230,2 +252,4 @@ var populateArray = populate;

populate: (_a = populateArray) !== null && _a !== void 0 ? _a : [],
userId: userId,
scope: scope,
}).then(function (res) {

@@ -235,16 +259,28 @@ return JSON.parse(res.result);

};
DatabaseProvider.prototype.deleteOne = function (schemaName, query) {
return this.client.deleteOne({ schemaName: schemaName, query: this.processQuery(query) }).then(function (res) {
DatabaseProvider.prototype.deleteOne = function (schemaName, query, userId, scope) {
return this.client.deleteOne({
schemaName: schemaName,
query: this.processQuery(query),
userId: userId,
scope: scope,
}).then(function (res) {
return JSON.parse(res.result);
});
};
DatabaseProvider.prototype.deleteMany = function (schemaName, query) {
return this.client.deleteMany({ schemaName: schemaName, query: this.processQuery(query) }).then(function (res) {
DatabaseProvider.prototype.deleteMany = function (schemaName, query, userId, scope) {
return this.client.deleteMany({
schemaName: schemaName,
query: this.processQuery(query),
userId: userId,
scope: scope,
}).then(function (res) {
return JSON.parse(res.result);
});
};
DatabaseProvider.prototype.countDocuments = function (schemaName, query) {
DatabaseProvider.prototype.countDocuments = function (schemaName, query, userId, scope) {
return this.client.countDocuments({
schemaName: schemaName,
query: this.processQuery(query),
userId: userId,
scope: scope,
}).then(function (res) {

@@ -251,0 +287,0 @@ return JSON.parse(res.result);

{
"name": "@conduitplatform/grpc-sdk",
"version": "0.16.0-alpha.14",
"version": "0.16.0-alpha.15",
"main": "dist/index.js",

@@ -5,0 +5,0 @@ "types": "dist/index.d.ts",

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