Type Definitions
-
AuthTokens
-
Authentication token object for a connection.
Type:
- Object
- Source:
Properties:
Name Type Argument Description access_tokenstring The Access Token. refresh_tokenstring The Refresh Token. expires_innumber <optional>
Optional lifetime value of access token in seconds. restricted_toArray <optional>
Optional (possibly) list of IP from which to grant access. token_typestring <optional>
Optional. Value should normally be 'bearer'. -
BoxInit
-
Constructor options for the Box object.
Type:
- Object
- Source:
Properties:
Name Type Argument Description client_idstring The Box app's Client ID. client_secretstring The Box app's Client Secret. portnumber The port on which to listen for the authorization callback. hoststring <optional>
Optional host on which to listen for the authorization callback. Defaults to localhost. -
getFileCallback(error)
-
Called after a
Connection#getFileis performed.Parameters:
Name Type Argument Description errorError <optional>
Any error that may have occurred. - Source:
-
optionalErrorCallback(error)
-
A callback with an optional error argument.
Parameters:
Name Type Argument Description errorError <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 scopestring <optional>
The scope for which you want to limit your search to. Can be user_contentfor a search limited to only the current user orenterprise_contentfor the entire enterprise.file_extensionsstring <optional>
Limit searches to specific file extensions like pdf,png,doc. Requires one or a set of comma delimited file extensions.created_at_rangeexternal: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 leadingcommasare also accepted, where the current date and earliest known date will be designated respectively.updated_at_rangeexternal: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 leadingcommasare also accepted, where the current date and earliest known date will be designated respectively.size_rangenumber <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_sizecommas are also accepted as parameters.owner_user_idsstring <optional>
Search by item owners. Requires one or a set of comma delimited user_ids. ancestor_folder_idsstring <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_typesstring <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.typestring <optional>
The type you want to return in your search. Can be file,folder, orweb_link.limitnumber <optional>
Number of search results to return. Default: 30, Max :200. offsetnumber <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_attimestamp <optional>
The time this file was created on the user’s machine. content_modified_attimestamp <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_attimestamp <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
Monologuesubscription filters.Type:
- string
Example
When an event of type
ITEM_CREATEis read from the event stream, an eventpolling.event.item.createis emitted. -
requestCallback(error, body)
-
Called after a request is performed on a connection.
Parameters:
Name Type Argument Description errorError <optional>
Any error that occurred. bodyObject The response body. - Source:
-
RequestConfig
-
Options to configure the behaviour of the request itself.
Type:
- Object
- Source:
Properties:
Name Type Argument Description timeoutnumber <optional>
The response timeout in milliseconds. Defaults to 120000.num_retriesnumber <optional>
The number of retries to attempt before giving up. 0implies no retries. A negative number implies unlimited retries.ebackoffnumber <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-Matchstring <optional>
If-Match ETAG. If-None-Matchstring <optional>
If-None-Match ETAG.