Members
(constant) CURRENT_STREAM_POSITION :string
Type:
- string
- Source:
(readonly) EnterpriseRole :EnterpriseRole
List of valid roles
Type:
- Source:
(readonly) EnterpriseUserStatus :EnterpriseUserStatus
List of valid user statuses
Type:
- Source:
(readonly) EnterpriseUserType :EnterpriseUserType
List of valid user types
Type:
- Source:
(readonly) EventType :EventType
Enum of enterprise event types
Type:
- Source:
(readonly) FileRepresentationType :FileRepresentationType
Enum of valid x-rep- hint values for generating representation info
Type:
- Source:
(readonly) grantTypes :string
Collection of grant types that can be used to acquire tokens via OAuth2
Type:
- string
Properties:
Name | Type | Description |
---|---|---|
AUTHORIZATION_CODE |
string | |
REFRESH_TOKEN |
string | |
CLIENT_CREDENTIALS |
string | |
JWT |
string | |
TOKEN_EXCHANGE |
string |
- Source:
GroupAccessLevel :GroupAccessLevel
Enum of valid access levels for groups, which are used to specify who can
perform certain actions on the group.
Type:
- Source:
GroupUserRole :GroupUserRole
Enum of valid user roles within a group
Type:
- Source:
(readonly) LegalHoldPolicyAssignmentType :LegalHoldPolicyAssignmentType
Enum of valid policy assignment types, which specify what object the policy applies to
Type:
- Source:
(readonly) LockType :LockType
Enum of valid lock types
Type:
- Source:
(readonly) MetadataFieldType :MetadataFieldType
Valid metadata field types
Type:
- Source:
(readonly) RetentionPolicyAssignmentType :RetentionPolicyAssignmentType
Enum of valid policy assignment types, which specify what object the policy applies to
Type:
- Source:
(readonly) RetentionPolicyDispositionAction :RetentionPolicyDispositionAction
Enum of valid retention policy disposition actions, which specify what should
be done when the retention period is over
Type:
- Source:
(readonly) RetentionPolicyType :RetentionPolicyType
Enum of valid retention policy types, which specify how long the policy should
remain in effect.
Type:
- Source:
(readonly) RetentionType :RetentionType
Enum of valid retention types.
Type:
- Source:
(readonly) SearchScope :SearchScope
Valid search scopes
Type:
- Source:
(readonly) TaskResolutionState :TaskResolutionState
Enum of valid task resolution states
Type:
- Source:
(readonly) TermsOfServicesStatus :TermsOfServicesStatus
Enum value of status of the custom terms of services, either currently enabled or currently disabled
Type:
- Source:
(readonly) TermsOfServicesType :TermsOfServicesType
Enum value of scope of the custom terms of services set to either managed by an enterprise or enternal to an enterprise
Type:
- Source:
(readonly) tokenPaths :string
Collection of paths to interact with Box OAuth2 tokening system
Type:
- string
- Source:
Methods
constructBoxUAHeader(clientopt) → {string}
Construct the X-Box-UA header to send analytics identifiers
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
client |
Object |
<optional> |
Analytics client information |
- Source:
Returns:
The header value
- Type
- string
deepFreezeWithRequest(obj) → {Object}
Deep freeze an object and all nested objects within it. It doesn't go deep on
Buffers and Readable streams so can be used on objects containing requests.
Parameters:
Name | Type | Description |
---|---|---|
obj |
Object | The object to freeze |
- Source:
Returns:
The frozen object
- Type
- Object
isJWTAuthErrorRetryable(err) → {boolean}
Determines whether a JWT auth error can be retried
Parameters:
Name | Type | Description |
---|---|---|
err |
Error | The JWT auth error |
- Source:
Returns:
True if the error is retryable
- Type
- boolean
pollRepresentationInfo(client, infoURL) → {Promise.<string>}
Poll the representation info URL until representation is generated,
then return content URL template.
Parameters:
Name | Type | Description |
---|---|---|
client |
BoxClient | The client to use for making API calls |
infoURL |
string | The URL to use for getting representation info |
- Source:
Returns:
A promise resolving to the content URL template
- Type
- Promise.<string>
Type Definitions
AccessLevel
An access level constant. Used for setting and updating shared links, folder upload, etc.
Type:
- Object
- Source:
ActorParams
Parameters for creating an actor token via token exchange
Type:
- Object
Properties:
Name | Type | Description |
---|---|---|
id |
string | The external identifier for the actor |
name |
string | The display name of the actor |
id |
string | |
name |
string |
- Source:
APIRequestCallback(errnullable, response, erropt, responseopt)
Callback invoked when an APIRequest request is complete and finalized. On success,
propagates the relevent response information. An err will indicate an unresolvable issue
with the request (permanent failure or temp error response from the server, retried too many times).
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
err |
APIRequest~Error |
<nullable> |
If Error object, API request did not get back the data it was supposed to. This could be either because of a temporary error, or a more serious error connecting to the API. |
response |
APIRequest~ResponseObject | The response returned by an APIRequestManager request | |
err |
APIRequestError | null |
<optional> |
|
response |
APIRequestResponseObject |
<optional> |
- Source:
APIRequestError
The error returned by APIRequest callbacks, which includes any relevent, available information about the request
and response. Note that these properties do not exist on stream errors, only errors retuned to the callback.
Type:
- Error
Properties:
Name | Type | Attributes | Description |
---|---|---|---|
request |
APIRequest~RequestObject | Information about the request that generated this error | |
response |
APIRequest~ResponseObject |
<optional> |
Information about the response related to this error, if available |
statusCode |
int |
<optional> |
The response HTTP status code |
maxRetriesExceeded |
boolean |
<optional> |
True iff the max number of retries were exceeded. Otherwise, undefined. |
request |
APIRequestRequestObject | ||
response |
APIRequestResponseObject |
<optional> |
|
statusCode |
number |
<optional> |
|
maxRetriesExceeded |
boolean |
<optional> |
- Source:
APIRequestRequestObject
The API request object includes information about the request made. The information attached is a subset of the information
of a request module instance, which is too large and complex to be safely handled (contains circular references, errors on
serialization, etc.).
Type:
- Object
Properties:
Name | Type | Description |
---|---|---|
uri |
Object | Information about the request, including host, path, and the full 'href' url |
method |
string | The request method (GET, POST, etc.) |
headers |
Object | A collection of headers sent with the request |
uri |
Record.<string, any> | |
method |
string | |
headers |
Record.<string, string> |
- Source:
APIRequestResponseObject
The API response object includes information about the request made and its response. The information attached is a subset
of the information returned by the request module, which is too large and complex to be safely handled (contains circular
references, errors on serialization, etc.)
Type:
- Object
Properties:
Name | Type | Attributes | Description |
---|---|---|---|
request |
APIRequest~RequestObject | Information about the request that generated this response | |
statusCode |
int | The response HTTP status code | |
headers |
Object | A collection of response headers | |
body |
Object | Buffer | string |
<optional> |
The response body. Encoded to JSON by default, but can be a buffer (if encoding fails or if json encoding is disabled) or a string (if string encoding is enabled). Will be undefined if no response body is sent. |
request |
APIRequestRequestObject | ||
statusCode |
number | ||
headers |
Record.<string, string> | ||
body |
object | Buffer | string |
<optional> |
- Source:
AppAuthConfig
Configuration for App Auth
Type:
- Object
Properties:
Name | Type | Attributes | Default | Description |
---|---|---|---|---|
keyID |
string | The ID of the public key used for app auth | ||
privateKey |
string | Buffer | The private key used for app auth | ||
passphrase |
string | The passphrase associated with the private key | ||
algorithm |
string |
<optional> |
RS256 | The signing algorithm to use, "RS256", "RS384", or "RS512" |
expirationTime |
int |
<optional> |
30 | Number of seconds the JWT should live for |
verifyTimestamp |
boolean |
<optional> |
false | Whether the timestamp when the auth token is created should be validated |
keyID |
string | |||
privateKey |
string | Buffer | |||
passphrase |
string | |||
algorithm |
'RS256' | 'RS384' | 'RS512' | |||
expirationTime |
number | |||
verifyTimestamp |
boolean |
- Source:
CollaborationAllowlistDirection
Collaboration Allowlist parameter constant
Type:
- string
CollaborationRole
A collaboration role constant
Type:
- string
- Source:
ItemType
A Box file or folder type constant
Type:
- string
- Source:
IteratorCallback(errnullable, dataopt) → {void}
Iterator callback
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
err |
Error |
<nullable> |
An error if the iterator encountered one |
data |
IteratorData |
<optional> |
New data from the iterator |
- Source:
Returns:
- Type
- void
IteratorData
The iterator response object
Type:
- Object
Properties:
Name | Type | Attributes | Description |
---|---|---|---|
value |
Array |
<optional> |
The next set of values from the iterator |
done |
boolean | Whether the iterator is completed |
- Source:
MetadataEnumOption
Metadata enum option
Type:
- Object
Properties:
Name | Type | Description |
---|---|---|
key |
string | The option value |
key |
string |
- Source:
MetadataFilterField
Metadata template fields to filter on for assigning a retention policy
Type:
- Object
Properties:
Name | Type | Description |
---|---|---|
field |
string | The field to filter on |
value |
string | int | The value to filter against |
field |
string | |
value |
string | number |
- Source:
MetadataTemplateField
Field definition for a metadata template
Type:
- Object
Properties:
Name | Type | Attributes | Description |
---|---|---|---|
type |
MetadataFieldType | The type of the field | |
key |
string | The programmatic name of the field | |
displayName |
string | The display name of the field | |
hidden |
boolean | Whether this field is hidden in the UI for the user and can only be set through the API instead | |
options |
Array.<MetadataEnumOption> |
<optional> |
For enum fields, the options |
type |
MetadataFieldType | ||
key |
string | ||
displayName |
string | ||
hidden |
boolean | ||
options |
Array |
<optional> |
- Source:
SearchMetadataFilter
Search metadata filter
Type:
- Object
Properties:
Name | Type | Description |
---|---|---|
templateKey |
string | The template to filter against |
scope |
string | The scope of the template, e.g. 'global' or 'enterprise' |
filters |
Object | Key/value filters against individual metadata template properties |
templateKey |
string | |
scope |
string | |
filters |
Record.<string, any> |
- Source:
SearchTrashContent
Type:
- string
- Source:
SharedLinkParams
Parameters for creating a token using a Box shared link via token exchange
Type:
- Object
Properties:
Name | Type | Description |
---|---|---|
url |
string | Shared link URL |
url |
string |
- Source:
TokenInfo
An object representing all token information for a single Box user.
Type:
- Object
Properties:
Name | Type | Attributes | Description |
---|---|---|---|
accessToken |
string | The API access token. Used to authenticate API requests to a certain user and/or application. | |
acquiredAtMS |
int | The time that the tokens were acquired. | |
accessTokenTTLMS |
int | The TTL of the access token. Can be used with acquiredAtMS to calculate if the current access token has expired. | |
refreshToken |
string |
<optional> |
The API refresh token is a Longer-lasting than an access token, and can be used to gain a new access token if the current access token becomes expired. Grants like the 'client credentials' grant don't return a refresh token, and have no refresh capabilities. |
accessToken |
string | ||
acquiredAtMS |
number | ||
accessTokenTTLMS |
number | ||
refreshToken |
string |
<optional> |
- Source:
TokenRequestOptions
Token request options. Set by the consumer to add/modify the params sent to the
request.
Type:
- Object
Properties:
Name | Type | Attributes | Description |
---|---|---|---|
ip |
string |
<optional> |
The IP Address of the requesting user. This IP will be reflected in authentication notification emails sent to your users on login. Defaults to the IP address of the server requesting the tokens. |
ip |
string |
<optional> |
- Source:
TokenStore
Object representing interface functions for PersistentClient to interact with the consumer app's central storage layer.
Type:
- Object
Properties:
Name | Type | Description |
---|---|---|
read |
ReadTokenInfoFromStore | read TokenInfo from app central store. |
write |
WriteTokenInfoToStore | write TokenInfo to the app's central store. |
clear |
ClearTokenInfoFromStore | delete TokenInfo from the app's central store. |
- Source:
UploadPart
Type:
- Object
Properties:
Name | Type | Description |
---|---|---|
part_id |
string | An 8-character hexadecimal string identifying the part |
offset |
int | The byte offset of the part within the whole file |
size |
int | The size of the part in bytes |
part_id |
string | |
offset |
number | |
size |
number |
- Source:
UserConfigurationOptions
Configuration settings used to initialize and customize the SDK
Type:
- Object
Properties:
Name | Type | Attributes | Description | ||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
clientID |
string | Client ID of your Box Application | |||||||||||||
clientSecret |
string | Client secret of your Box Application | |||||||||||||
apiRootURL |
string |
<optional> |
The root URL to Box [Default: 'https://api.box.com'] | ||||||||||||
uploadAPIRootURL |
string |
<optional> |
The root URL to Box for uploads [Default: 'https://upload.box.com/api'] | ||||||||||||
authorizeRootURL |
string |
<optional> |
The root URL for the authorization screen [Default: 'https://account.box.com/api'] | ||||||||||||
uploadRequestTimeoutMS |
int |
<optional> |
Timeout after which an upload request is aborted [Default: 60000] | ||||||||||||
retryIntervalMS |
int |
<optional> |
Time between auto-retries of the API call on a temp failure [Default: 2000] | ||||||||||||
numMaxRetries |
int |
<optional> |
Max # of times a temporarily-failed request should be retried before propagating a permanent failure [Default: 5] | ||||||||||||
expiredBufferMS |
int |
<optional> |
Time before expiration, in milliseconds, when we begin to treat tokens as expired [Default: 3 min.] | ||||||||||||
request |
Object |
<optional> |
Request options
Properties
|
||||||||||||
appAuth |
AppAuthConfig |
<nullable> |
Optional configuration for App Auth | ||||||||||||
clientID |
string | ||||||||||||||
clientSecret |
string | ||||||||||||||
apiRootURL |
string | ||||||||||||||
uploadAPIRootURL |
string | ||||||||||||||
authorizeRootURL |
string | ||||||||||||||
uploadRequestTimeoutMS |
number | ||||||||||||||
retryIntervalMS |
number | ||||||||||||||
numMaxRetries |
number | ||||||||||||||
expiredBufferMS |
number | ||||||||||||||
request |
object |
Properties
|
|||||||||||||
appAuth |
AppAuthConfig |
<optional> |
|||||||||||||
proxy |
object |
<optional> |
Properties
|
- Source:
WebhookTriggerType
A webhook trigger type constant
Type:
- string
- Source: