Socket
Socket
Sign inDemoInstall

documentdb-util

Package Overview
Dependencies
Maintainers
1
Versions
27
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

documentdb-util - npm Package Compare versions

Comparing version 2.3.0 to 2.4.0

18

index.d.ts

@@ -5,13 +5,17 @@ declare class DocumentDbUtility {

collection(database: {}, collectionId: string): Promise<{}>;
userDefinedFunction(collection:{}, udf:{ id: string, serverScript: Function });
trigger(collection: {}, proc: { id: string, serverScript: Function });
storedProcedure(collection: {}, proc: { id: string, serverScript: Function });
insert(collection: {}, documentDefinition: {}): Promise<{}>;
update(docLink: string, documentDefinition: {}): Promise<{}>;
query(collection: {}, querySpec: { query: string, parameters: { name: string, value: string }[] }): Promise<{}>;
executeStoredProcedure(proc: {}, params?: any[]);
createDocumentLink(databaseId: string, collectionId: string, documentId: string): string;
delete(docLink: string): Promise<void>;
query(collection: {}, querySpec: { query: string, parameters: { name: string, value: string }[] }): Promise<{}>;
update(docLink: string, documentDefinition: {}): Promise<{}>;
deleteDatabase(databaseId: string): Promise<{}>;
deleteCollection(databaseId: string, collectionId: string): Promise<{}>;
createDocumentLink(databaseId: string, collectionId: string, documentId: string): string;
storedProcedure(collection: {}, proc: { id: string, serverScript: Function });
//userDefinedFunction(collection:{}, udf:{ id: string, serverScript: Function })
//createTrigger(collection: {}, proc: { id: string, serverScript: Function })
executeStoredProcedure(proc: {}, params?: any[]);
deleteStoredProcedure(procedureLink: string): Promise<{}>;
}

@@ -18,0 +22,0 @@

@@ -115,3 +115,3 @@ var DocumentDBClient = require('documentdb').DocumentClient;

if (err) return reject(err);
console.log('created new');
resolve(response);

@@ -121,2 +121,3 @@ });

} else {
console.log('using existing')
resolve(results[0]);

@@ -129,2 +130,17 @@ }

/**
* Delete stored procedure
*
* @param {string} procedureLink - Procedure Link
*/
deleteStoredProcedure(procedureLink) {
return new Promise((resolve, reject) => {
this.client.deleteStoredProcedure(procedureLink, null, (err, response) => {
if (err) return reject(err);
resolve(response);
});
});
}
/**
* Create user defined function

@@ -131,0 +147,0 @@ *

{
"name": "documentdb-util",
"version": "2.3.0",
"version": "2.4.0",
"description": "A little wrapper utility around document db to perform simple operations",

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

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