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

tdoc-api

Package Overview
Dependencies
Maintainers
1
Versions
38
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

tdoc-api

Wrapper around tDoc REST-ful APIs

  • 0.1.0
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
0
decreased by-100%
Maintainers
1
Weekly downloads
 
Created
Source

tdoc-api

node wrapper around tDoc REST-ful APIs

API

All the methods have a single object parameter, used to have optional parameters.

upload

Upload a document.

Arguments

  • document content (optional if ready is false), either:
    • file: path of the file to be uploaded
    • data: a Buffer or binary string with raw data
  • mimetype: the content media type (defaults to application/pdf)
  • doctype: docType to upload the document into
  • period: fiscal period the document refers to; use current year for documents that don't have such concept
  • meta: all the metadata to associate to the document (optional if ready is false)
  • ready: if the document is ready for preservation or still incomplete (defaults to true)
  • company: if the user has access to more than one company, use this optional field to specify which one the doctype refers to
  • alias & pin: specify those fields when you need to apply a digital signature to the document
  • overwrite: the document identifier of a (not yet preserved) document to overwrite (optional)
  • user: (optional) the user the upload is made on the behalf of (to be used if and only if the authentication user is root)
  • callback(err, data): err in case of error or data will contain full document metadata

update

Update a document.

Arguments

  • id: the identifier of the document to update
  • document content (optional if ready is false), either:
    • file: path of the file to be uploaded
    • data: a Buffer or binary string with raw data
  • mimetype: the content media type (defaults to application/pdf)
  • meta: all the metadata to associate to the document (optional if ready is false)
  • ready: if the document is ready for preservation or still incomplete (defaults to true)
  • company: if the user has access to more than one company, use this optional field to specify which one the doctype refers to
  • alias & pin: specify those fields when you need to apply a digital signature to the document
  • overwrite: the document identifier of a (not yet preserved) document to overwrite (optional)
  • user: (optional) the user the upload is made on the behalf of (to be used if and only if the authentication user is root)
  • callback(err, data): err in case of error or data will contain full document metadata

documentMeta

Retrieves the full metadata of a document.

Arguments

  • id: the identifier of the document
  • user: (optional) the user the upload is made on the behalf of (to be used if and only if the authentication user is root)
  • callback(err, data): err in case of error or data will contain full document metadata

Search for documents matching some metadata.

Arguments

  • doctype: docType to search
  • period: (optional) fiscal period to search
  • meta: any metadata to search for
  • user: (optional) the user the upload is made on the behalf of (to be used if and only if the authentication user is root)
  • callback(err, data): err in case of error or data will be an array of document identifiers

searchOne

Search for a single document matching some metadata. Returns full metadata of the searched document.

Warning: it is implemented using search and documentMeta and thus requires two round trip times.

Arguments

  • doctype: docType to search
  • period: (optional) fiscal period to search
  • meta: any metadata to search for
  • user: (optional) the user the upload is made on the behalf of (to be used if and only if the authentication user is root)
  • callback(err, data): err in case of error or data will contain full document metadata

FAQs

Package last updated on 20 May 2014

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

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