This is an automated email from the ASF dual-hosted git repository.

glynnbird pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/couchdb-nano.git


The following commit(s) were added to refs/heads/main by this push:
     new d45b2ee  Add head response type (#304)
d45b2ee is described below

commit d45b2ee70eec7c7e5f6518f5b0179f3fe8b46a92
Author: Lukas <[email protected]>
AuthorDate: Thu Nov 3 10:33:50 2022 +0100

    Add head response type (#304)
---
 lib/nano.d.ts | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)

diff --git a/lib/nano.d.ts b/lib/nano.d.ts
index 548f73f..abc79d3 100644
--- a/lib/nano.d.ts
+++ b/lib/nano.d.ts
@@ -338,7 +338,7 @@ declare namespace nano {
     get(docname: string, params?: DocumentGetParams, callback?: 
Callback<DocumentGetResponse & D>): Promise<DocumentGetResponse & D>;
     /** Fetch document meta data, useful for fetching a document's current 
revision.
      * @see Docs: {@link 
http://docs.couchdb.org/en/latest/api/document/common.html#head--db-docid} */
-    head(docname: string, callback?: Callback<any>): Promise<any>;
+    head(docname: string, callback?: Callback<DocumentHeadResponseHeaders>): 
Promise<DocumentHeadResponseHeaders>;
     /** Delete a document from this database.
      * @see Docs: {@link 
http://docs.couchdb.org/en/latest/api/document/common.html#delete--db-docid} */
     destroy(docname: string, rev: string, callback?: 
Callback<DocumentDestroyResponse>): Promise<DocumentDestroyResponse>;
@@ -1249,6 +1249,13 @@ declare namespace nano {
     _revisions?: any;
   }
 
+  /** Document head response headers:
+   * @see docs: {@link 
https://docs.couchdb.org/en/latest/api/document/common.html#head--db-docid} */
+  interface DocumentHeadResponseHeaders {
+    /** Double quoted document’s revision token. */
+    etag: string;
+  }
+
   /** _all_docs parameters
    * @see Docs: {@link 
http://docs.couchdb.org/en/latest/api/database/bulk-api.html#get--db-_all_docs} 
*/
   interface DocumentListParams {

Reply via email to