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

box-view-cli

Package Overview
Dependencies
Maintainers
1
Versions
21
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

box-view-cli - npm Package Compare versions

Comparing version 0.7.0 to 0.8.0-annotations

23

cli/session.js

@@ -6,3 +6,4 @@ var open = require('open'),

module.exports = function (prog) {
function requestSession(cmd) {
function validateParams(cmd) {
var params = {};

@@ -22,3 +23,20 @@

}
if (cmd.annotations) {
params['is_annotatable'] = true;
if (!cmd.authorName) {
throw new Error('--author-name is required when annotations are enabled');
}
if (!cmd.authorId) {
throw new Error('--author-id is required when annotations are enabled');
}
params['author_name'] = cmd.authorName || 'Test User';
params['author_external_id'] = cmd.authorId || 1;
}
return params;
}
function requestSession(cmd) {
var params = validateParams(cmd);
if (cmd.documentId) {

@@ -53,2 +71,5 @@ debug('session requested with document id "%s"', cmd.documentId);

['-T, --disable-text', 'disable text selection'],
['-a, --annotations', 'enable annotations'],
['-N, --author-name [authorName]', 'annotation author name'],
['-A, --author-id [authorId]', 'annotation author id'],
['-o, --open', 'open the viewing session URL on success']

@@ -55,0 +76,0 @@ ],

{
"name": "box-view-cli",
"version": "0.7.0",
"version": "0.8.0-annotations",
"description": "A CLI for Box View API",

@@ -5,0 +6,0 @@ "author": "Cameron Lakenen <lakenen@box.com>",

17

README.md

@@ -88,9 +88,12 @@ # Box View API CLI

-h, --help output usage information
-i, --document-id [id] the document ID
-d, --duration [duration] the duration (in minutes) of the session
-e, --expires [expires] the timestamp at which this session should expire
-D, --downloadable allow downloads
-T, --disable-text disable text selection
-o, --open open the viewing session URL on success
-h, --help output usage information
-i, --document-id [id] the document ID
-d, --duration [duration] the duration (in minutes) of the session
-e, --expires [expires] the timestamp at which this session should expire
-D, --downloadable allow downloads
-T, --disable-text disable text selection
-a, --annotations enable annotations
-N, --author-name [authorName] annotation author name
-A, --author-id [authorId] annotation author id
-o, --open open the viewing session URL on success
```

@@ -97,0 +100,0 @@

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