Type Definitions
-
AuthTokens
-
Authentication token object for a connection.
Type:
- Object
- Source:
Properties:
Name Type Argument Description access_token
string The Access Token. refresh_token
string The Refresh Token. expires_in
number <optional>
Optional lifetime value of access token in seconds. restricted_to
Array <optional>
Optional (possibly) list of IP from which to grant access. token_type
string <optional>
Optional. Value should normally be 'bearer'. -
BoxInit
-
Constructor options for the Box object.
Type:
- Object
- Source:
Properties:
Name Type Argument Description client_id
string The Box app's Client ID. client_secret
string The Box app's Client Secret. port
number The port on which to listen for the authorization callback. host
string <optional>
Optional host on which to listen for the authorization callback. Defaults to localhost
. -
getFileCallback(error)
-
Called after a
Connection#getFile
is performed.Parameters:
Name Type Argument Description error
Error <optional>
Any error that may have occurred. - Source:
-
optionalErrorCallback(error)
-
A callback with an optional error argument.
Parameters:
Name Type Argument Description error
Error <optional>
Any error that occurred while attempting to stop the server. - Source:
-
OptsSearch
-
Options and parameters for search.
Type:
- Object
- Source:
- See:
Properties:
Name Type Argument Description scope
string <optional>
The scope for which you want to limit your search to. Can be user_content
for a search limited to only the current user orenterprise_content
for the entire enterprise.file_extensions
string <optional>
Limit searches to specific file extensions like pdf,png,doc
. Requires one or a set of comma delimited file extensions.created_at_range
external:ISO8601 <optional>
The date for when the item was created. Specify the date range by using ISO-8601 variables separated by a comma: from_date,to_date
. Trailingfrom_date,
and leadingcommas
are also accepted, where the current date and earliest known date will be designated respectively.updated_at_range
external:ISO8601 <optional>
The date for when the item was updated. Specify the date range by using ISO-8601 variables separated by a comma: from_date,to_date
. Trailingfrom_date,
and leadingcommas
are also accepted, where the current date and earliest known date will be designated respectively.size_range
number <optional>
Filter by a file size range. Specify the file size range in bytes separated by a comma: lower_bound_size,upper_bound_size
, where 1MB is equivalent to 1000000 bytes. Trailinglower_bound_size,
and leading,upper_bound_size
commas are also accepted as parameters.owner_user_ids
string <optional>
Search by item owners. Requires one or a set of comma delimited user_ids. ancestor_folder_ids
string <optional>
Limit searches to specific parent folders. Requires one or a set of comma delimited folder_ids: folder_id_1,folder_id_2,...
. Parent folder results will also include items within subfolders.content_types
string <optional>
Limit searches to specific Box designated content types. Can be name
,description
,file_content
,comments
, ortags
. Requires one or a set of comma delimited content_types.type
string <optional>
The type you want to return in your search. Can be file
,folder
, orweb_link
.limit
number <optional>
Number of search results to return. Default: 30, Max :200. offset
number <optional>
The search result at which to start the response. Default: 0. -
OptsUploadFile
-
Options to set for
Connection#uploadFile
.Type:
- Object
- Source:
- See:
Properties:
Name Type Argument Description content_created_at
timestamp <optional>
The time this file was created on the user’s machine. content_modified_at
timestamp <optional>
The time this file was last modified on the user’s machine. -
OptsUploadFileNewVersion
-
Options to set for
Connection#uploadFileNewVersion
.Type:
- Object
- Source:
- See:
Properties:
Name Type Argument Description content_modified_at
timestamp <optional>
The time this file was last modified on the user’s machine. -
PollingEvent
-
Events captured from an event stream during long-polling. The event name is of the form polling.event.EVENT, where EVENT is the lowercased, (_ -> .)-transformed version of the source event type. This transformation helps leverage
Monologue
subscription filters.Type:
- string
Example
When an event of type
ITEM_CREATE
is read from the event stream, an eventpolling.event.item.create
is emitted. -
requestCallback(error, body)
-
Called after a request is performed on a connection.
Parameters:
Name Type Argument Description error
Error <optional>
Any error that occurred. body
Object The response body. - Source:
-
RequestConfig
-
Options to configure the behaviour of the request itself.
Type:
- Object
- Source:
Properties:
Name Type Argument Description timeout
number <optional>
The response timeout in milliseconds. Defaults to 120000
.num_retries
number <optional>
The number of retries to attempt before giving up. 0
implies no retries. A negative number implies unlimited retries.ebackoff
number <optional>
Initial backoff interval in milliseconds. The request dispatcher will wait for this interval before attempting a retry. The interval is doubled on each successive retry. Defaults to 1000
. -
RequestHeaders
-
Headers to pass alongwith a request on a connection.
Type:
- Object
- Source:
- See:
Properties:
Name Type Argument Description If-Match
string <optional>
If-Match ETAG. If-None-Match
string <optional>
If-None-Match ETAG.