Plugins allow you to customize the behavior of the SDk with additional logging, retry, or additional functionality.
A plugin is a function which returns a Promise<Response
Next is a function which takes in requestContext returns a promise. You must await/then that promise which will contain the response from further plugins, allowing you to log those results or handle errors.
RequestContext is an object which controls what operation is happening, against which endpoint, and more. Modifying this and passing it along via next is how you modify future SDK behavior.
-The database Id
-The collection Id
-The document Id\
-The attachment Id
-A conflict link in the format of dbs/{0}/colls/{1}/conflicts/{2} \ with {0} being a Uri escaped version of the databaseId, {1} being collectionId and {2} being the conflictId
-The database Id
-The collection Id
-The conflict Id
-A conflict link in the format of dbs/{0}/colls/{1}/conflicts/{2} \ with {0} being a Uri escaped version of the databaseId, {1} being collectionId and {2} being the conflictId
Given a database id, this creates a database link.
-The database id
-A database link in the format of dbs/{0} \ with {0} being a Uri escaped version of the databaseId
Given a database and collection id, this creates a collection link.
-The database id
-The collection id
A collection link in the format of dbs/{0}/colls/{1} \ with {0} being a Uri escaped version of the databaseId and {1} being collectionId
Given a database and collection id, this creates a collection link.
-The database id
-The collection id
-The document id
-A document link in the format of \ dbs/{0}/colls/{1}/docs/{2} with {0} being a Uri escaped version of \ the databaseId, {1} being collectionId and {2} being the documentId
-The database Id
-The collection Id
-A partition key ranges link in the format of \ dbs/{0}/colls/{1}/pkranges with {0} being a Uri escaped version of the databaseId and {1} being collectionId
Given a database, collection and document id, this creates a document link.
-The database Id
-The user Id
The permissionId
A permission link in the format of dbs/{0}/users/{1}/permissions/{2} \ with {0} being a Uri escaped version of the databaseId, {1} being userId and {2} being permissionId
Given a database, collection and stored proc id, this creates a stored proc link.
-The database Id
-The collection Id
-The stored procedure Id
-A stored procedure link in the format of \ dbs/{0}/colls/{1}/sprocs/{2} with {0} being a Uri escaped version of the databaseId, \ {1} being collectionId and {2} being the storedProcedureId
-The database Id
-The collection Id
-The trigger Id
-A trigger link in the format of \ dbs/{0}/colls/{1}/triggers/{2} with {0} being a Uri escaped version of the databaseId, \ {1} being collectionId and {2} being the triggerId
-The database Id
-The collection Id
-The User Defined Function Id
-A udf link in the format of dbs/{0}/colls/{1}/udfs/{2} \ with {0} being a Uri escaped version of the databaseId, {1} being collectionId and {2} being the udfId
Given a database and user id, this creates a user link.
-The database id
-The user id
A user link in the format of dbs/{0}/users/{1} \ with {0} being a Uri escaped version of the databaseId and {1} being userId
The default function for setting header token using the masterKey
Generated using TypeDoc
Next is a function which takes in requestContext returns a promise. You must await/then that promise which will contain the response from further plugins, allowing you to log those results or handle errors.