box-node-sdk 1.35.0 → 1.37.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (126) hide show
  1. package/CHANGELOG.md +37 -2
  2. package/README.md +1 -1
  3. package/lib/api-request-manager.d.ts +38 -0
  4. package/lib/api-request-manager.js +48 -55
  5. package/lib/api-request-manager.js.map +1 -0
  6. package/lib/api-request.d.ts +141 -0
  7. package/lib/api-request.js +202 -281
  8. package/lib/api-request.js.map +1 -0
  9. package/lib/box-client.d.ts +269 -0
  10. package/lib/box-client.js +551 -713
  11. package/lib/box-client.js.map +1 -0
  12. package/lib/box-node-sdk.d.ts +216 -0
  13. package/lib/box-node-sdk.js +317 -352
  14. package/lib/box-node-sdk.js.map +1 -0
  15. package/lib/chunked-uploader.d.ts +129 -0
  16. package/lib/chunked-uploader.js +287 -358
  17. package/lib/chunked-uploader.js.map +1 -0
  18. package/lib/enterprise-event-stream.d.ts +82 -0
  19. package/lib/enterprise-event-stream.js +189 -203
  20. package/lib/enterprise-event-stream.js.map +1 -0
  21. package/lib/event-stream.d.ts +92 -0
  22. package/lib/event-stream.js +274 -302
  23. package/lib/event-stream.js.map +1 -0
  24. package/lib/managers/collaboration-allowlist.d.ts +137 -0
  25. package/lib/managers/collaboration-allowlist.js +200 -0
  26. package/lib/managers/collaboration-allowlist.js.map +1 -0
  27. package/lib/managers/collaboration-whitelist.d.ts +3 -0
  28. package/lib/managers/collaboration-whitelist.js +8 -222
  29. package/lib/managers/collaboration-whitelist.js.map +1 -0
  30. package/lib/managers/collaborations.d.ts +166 -0
  31. package/lib/managers/collaborations.js +225 -258
  32. package/lib/managers/collaborations.js.map +1 -0
  33. package/lib/managers/collections.d.ts +42 -0
  34. package/lib/managers/collections.js +45 -50
  35. package/lib/managers/collections.js.map +1 -0
  36. package/lib/managers/comments.d.ts +103 -0
  37. package/lib/managers/comments.js +158 -173
  38. package/lib/managers/comments.js.map +1 -0
  39. package/lib/managers/device-pins.d.ts +52 -0
  40. package/lib/managers/device-pins.js +75 -88
  41. package/lib/managers/device-pins.js.map +1 -0
  42. package/lib/managers/enterprise.d.ts +162 -0
  43. package/lib/managers/enterprise.js +168 -199
  44. package/lib/managers/enterprise.js.map +1 -0
  45. package/lib/managers/events.d.ts +177 -0
  46. package/lib/managers/events.js +230 -254
  47. package/lib/managers/events.js.map +1 -0
  48. package/lib/managers/files.d.ts +772 -0
  49. package/lib/managers/files.js +1400 -1602
  50. package/lib/managers/files.js.map +1 -0
  51. package/lib/managers/folders.d.ts +347 -0
  52. package/lib/managers/folders.js +551 -567
  53. package/lib/managers/folders.js.map +1 -0
  54. package/lib/managers/groups.d.ts +202 -0
  55. package/lib/managers/groups.js +238 -287
  56. package/lib/managers/groups.js.map +1 -0
  57. package/lib/managers/legal-hold-policies.d.ts +190 -0
  58. package/lib/managers/legal-hold-policies.js +228 -272
  59. package/lib/managers/legal-hold-policies.js.map +1 -0
  60. package/lib/managers/metadata.d.ts +228 -0
  61. package/lib/managers/metadata.js +265 -328
  62. package/lib/managers/metadata.js.map +1 -0
  63. package/lib/managers/recent-items.d.ts +38 -0
  64. package/lib/managers/recent-items.js +32 -39
  65. package/lib/managers/recent-items.js.map +1 -0
  66. package/lib/managers/retention-policies.d.ts +213 -0
  67. package/lib/managers/retention-policies.js +235 -281
  68. package/lib/managers/retention-policies.js.map +1 -0
  69. package/lib/managers/search.d.ts +82 -0
  70. package/lib/managers/search.js +68 -88
  71. package/lib/managers/search.js.map +1 -0
  72. package/lib/managers/shared-items.d.ts +33 -0
  73. package/lib/managers/shared-items.js +54 -62
  74. package/lib/managers/shared-items.js.map +1 -0
  75. package/lib/managers/storage-policies.d.ts +86 -0
  76. package/lib/managers/storage-policies.js +108 -142
  77. package/lib/managers/storage-policies.js.map +1 -0
  78. package/lib/managers/tasks.d.ts +161 -0
  79. package/lib/managers/tasks.js +219 -260
  80. package/lib/managers/tasks.js.map +1 -0
  81. package/lib/managers/terms-of-service.d.ts +161 -0
  82. package/lib/managers/terms-of-service.js +250 -273
  83. package/lib/managers/terms-of-service.js.map +1 -0
  84. package/lib/managers/trash.d.ts +30 -0
  85. package/lib/managers/trash.js +30 -41
  86. package/lib/managers/trash.js.map +1 -0
  87. package/lib/managers/users.d.ts +131 -0
  88. package/lib/managers/users.js +160 -203
  89. package/lib/managers/users.js.map +1 -0
  90. package/lib/managers/web-links.d.ts +127 -0
  91. package/lib/managers/web-links.js +183 -209
  92. package/lib/managers/web-links.js.map +1 -0
  93. package/lib/managers/webhooks.d.ts +166 -0
  94. package/lib/managers/webhooks.js +312 -305
  95. package/lib/managers/webhooks.js.map +1 -0
  96. package/lib/sessions/anonymous-session.d.ts +69 -0
  97. package/lib/sessions/anonymous-session.js +88 -102
  98. package/lib/sessions/anonymous-session.js.map +1 -0
  99. package/lib/sessions/app-auth-session.d.ts +92 -0
  100. package/lib/sessions/app-auth-session.js +140 -160
  101. package/lib/sessions/app-auth-session.js.map +1 -0
  102. package/lib/sessions/basic-session.d.ts +56 -0
  103. package/lib/sessions/basic-session.js +40 -50
  104. package/lib/sessions/basic-session.js.map +1 -0
  105. package/lib/sessions/persistent-session.d.ts +96 -0
  106. package/lib/sessions/persistent-session.js +191 -211
  107. package/lib/sessions/persistent-session.js.map +1 -0
  108. package/lib/token-manager.d.ts +191 -0
  109. package/lib/token-manager.js +390 -465
  110. package/lib/token-manager.js.map +1 -0
  111. package/lib/util/config.d.ts +86 -0
  112. package/lib/util/config.js +124 -152
  113. package/lib/util/config.js.map +1 -0
  114. package/lib/util/errors.d.ts +50 -0
  115. package/lib/util/errors.js +134 -145
  116. package/lib/util/errors.js.map +1 -0
  117. package/lib/util/exponential-backoff.d.ts +11 -0
  118. package/lib/util/exponential-backoff.js +10 -22
  119. package/lib/util/exponential-backoff.js.map +1 -0
  120. package/lib/util/paging-iterator.d.ts +53 -0
  121. package/lib/util/paging-iterator.js +202 -218
  122. package/lib/util/paging-iterator.js.map +1 -0
  123. package/lib/util/url-path.d.ts +16 -0
  124. package/lib/util/url-path.js +20 -35
  125. package/lib/util/url-path.js.map +1 -0
  126. package/package.json +24 -9
@@ -1,26 +1,22 @@
1
+ "use strict";
1
2
  /**
2
3
  * @fileoverview Manager for the Device Pins resource
3
4
  * @author mwiller
4
5
  */
5
-
6
- 'use strict';
7
-
8
- // ------------------------------------------------------------------------------
9
- // Requirements
10
- // ------------------------------------------------------------------------------
11
- var urlPath = require('../util/url-path');
12
-
6
+ var __importDefault = (this && this.__importDefault) || function (mod) {
7
+ return (mod && mod.__esModule) ? mod : { "default": mod };
8
+ };
9
+ var url_path_1 = __importDefault(require("../util/url-path"));
10
+ // -----------------------------------------------------------------------------
11
+ // Typedefs
12
+ // -----------------------------------------------------------------------------
13
13
  // ------------------------------------------------------------------------------
14
14
  // Private
15
15
  // ------------------------------------------------------------------------------
16
- var BASE_PATH = '/device_pinners',
17
- ENTERPRISES_PATH = '/enterprises',
18
- DEVICE_PINNERS_SUBRESOURCE = 'device_pinners';
19
-
16
+ var BASE_PATH = '/device_pinners', ENTERPRISES_PATH = '/enterprises', DEVICE_PINNERS_SUBRESOURCE = 'device_pinners';
20
17
  // ------------------------------------------------------------------------------
21
18
  // Public
22
19
  // ------------------------------------------------------------------------------
23
-
24
20
  /**
25
21
  * Simple manager for interacting with all Device Pin endpoints and actions.
26
22
  *
@@ -28,79 +24,70 @@ var BASE_PATH = '/device_pinners',
28
24
  * @param {BoxClient} client - The Box API Client that is responsible for making calls to the API
29
25
  * @returns {void}
30
26
  */
31
- function DevicePins(client) {
32
- this.client = client;
33
- }
34
-
35
- /**
36
- * Get a specific device pinning record
37
- *
38
- * API Endpoint: '/device_pinners/:pinID'
39
- * Method: GET
40
- *
41
- * @param {string} pinID - The ID of the pin to retrieve
42
- * @param {Object} [options] - Optional paramters, can be left null in many cases
43
- * @param {Function} [callback] - Passed the device pin if successful, error otherwise
44
- * @returns {Promise<Object>} A promise resolving to the device pin object
45
- */
46
- DevicePins.prototype.get = function(pinID, options, callback) {
47
-
48
- var apiPath = urlPath(BASE_PATH, pinID),
49
- params = {
50
- qs: options
51
- };
52
-
53
- return this.client.wrapWithDefaultHandler(this.client.get)(apiPath, params, callback);
54
- };
55
-
56
- /**
57
- * Delete a specific device pinning record
58
- *
59
- * API Endpoint: '/device_pinners/:pinID'
60
- * Method: DELETE
61
- *
62
- * @param {string} pinID - The ID of the pin to delete
63
- * @param {Object} [options] - Optional paramters, can be left null in many cases
64
- * @param {Function} [callback] - Passed nothing if successful, error otherwise
65
- * @returns {Promise<void>} A promise resolving to nothing
66
- */
67
- DevicePins.prototype.delete = function(pinID, options, callback) {
68
-
69
- var apiPath = urlPath(BASE_PATH, pinID),
70
- params = {
71
- qs: options
72
- };
73
-
74
- return this.client.wrapWithDefaultHandler(this.client.del)(apiPath, params, callback);
75
- };
76
-
77
- /**
78
- * Get all device pin records for the current enterprise
79
- *
80
- * API Endpoint: '/enterprises/:enterpriseID/device_pinners'
81
- * Method: GET
82
- *
83
- * @param {Object} [options] - Optional paramters, can be left null in many cases
84
- * @param {Function} [callback] - Passed a list of device pins if successful, error otherwise
85
- * @returns {Promise<Object>} A promise resolving to the collection of device pins
86
- */
87
- DevicePins.prototype.getAll = function(options, callback) {
88
-
89
- return this.client.users.get(this.client.CURRENT_USER_ID, {fields: 'enterprise'})
90
- .then(data => {
91
-
92
- if (!data.enterprise || !data.enterprise.id) {
93
- throw new Error('User must be in an enterprise to view device pins');
94
- }
95
-
96
- var apiPath = urlPath(ENTERPRISES_PATH, data.enterprise.id, DEVICE_PINNERS_SUBRESOURCE),
97
- params = {
98
- qs: options
99
- };
100
-
101
- return this.client.wrapWithDefaultHandler(this.client.get)(apiPath, params);
102
- })
103
- .asCallback(callback);
104
- };
105
-
27
+ var DevicePins = /** @class */ (function () {
28
+ function DevicePins(client) {
29
+ this.client = client;
30
+ }
31
+ /**
32
+ * Get a specific device pinning record
33
+ *
34
+ * API Endpoint: '/device_pinners/:pinID'
35
+ * Method: GET
36
+ *
37
+ * @param {string} pinID - The ID of the pin to retrieve
38
+ * @param {Object} [options] - Optional paramters, can be left null in many cases
39
+ * @param {Function} [callback] - Passed the device pin if successful, error otherwise
40
+ * @returns {Promise<Object>} A promise resolving to the device pin object
41
+ */
42
+ DevicePins.prototype.get = function (pinID, options, callback) {
43
+ var apiPath = url_path_1.default(BASE_PATH, pinID), params = {
44
+ qs: options,
45
+ };
46
+ return this.client.wrapWithDefaultHandler(this.client.get)(apiPath, params, callback);
47
+ };
48
+ /**
49
+ * Delete a specific device pinning record
50
+ *
51
+ * API Endpoint: '/device_pinners/:pinID'
52
+ * Method: DELETE
53
+ *
54
+ * @param {string} pinID - The ID of the pin to delete
55
+ * @param {Object} [options] - Optional paramters, can be left null in many cases
56
+ * @param {Function} [callback] - Passed nothing if successful, error otherwise
57
+ * @returns {Promise<void>} A promise resolving to nothing
58
+ */
59
+ DevicePins.prototype.delete = function (pinID, options, callback) {
60
+ var apiPath = url_path_1.default(BASE_PATH, pinID), params = {
61
+ qs: options,
62
+ };
63
+ return this.client.wrapWithDefaultHandler(this.client.del)(apiPath, params, callback);
64
+ };
65
+ /**
66
+ * Get all device pin records for the current enterprise
67
+ *
68
+ * API Endpoint: '/enterprises/:enterpriseID/device_pinners'
69
+ * Method: GET
70
+ *
71
+ * @param {Object} [options] - Optional paramters, can be left null in many cases
72
+ * @param {Function} [callback] - Passed a list of device pins if successful, error otherwise
73
+ * @returns {Promise<Object>} A promise resolving to the collection of device pins
74
+ */
75
+ DevicePins.prototype.getAll = function (options, callback) {
76
+ var _this = this;
77
+ return this.client.users
78
+ .get(this.client.CURRENT_USER_ID, { fields: 'enterprise' })
79
+ .then(function (data /* FIXME */) {
80
+ if (!data.enterprise || !data.enterprise.id) {
81
+ throw new Error('User must be in an enterprise to view device pins');
82
+ }
83
+ var apiPath = url_path_1.default(ENTERPRISES_PATH, data.enterprise.id, DEVICE_PINNERS_SUBRESOURCE), params = {
84
+ qs: options,
85
+ };
86
+ return _this.client.wrapWithDefaultHandler(_this.client.get)(apiPath, params);
87
+ })
88
+ .asCallback(callback);
89
+ };
90
+ return DevicePins;
91
+ }());
106
92
  module.exports = DevicePins;
93
+ //# sourceMappingURL=device-pins.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"device-pins.js","sourceRoot":"","sources":["../../src/managers/device-pins.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;;AAOH,8DAAuC;AAEvC,gFAAgF;AAChF,WAAW;AACX,gFAAgF;AAEhF,iFAAiF;AACjF,UAAU;AACV,iFAAiF;AAEjF,IAAM,SAAS,GAAG,iBAAiB,EAClC,gBAAgB,GAAG,cAAc,EACjC,0BAA0B,GAAG,gBAAgB,CAAC;AAE/C,iFAAiF;AACjF,SAAS;AACT,iFAAiF;AAEjF;;;;;;GAMG;AACH;IAGC,oBAAY,MAAiB;QAC5B,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC;IACtB,CAAC;IAED;;;;;;;;;;OAUG;IACH,wBAAG,GAAH,UAAI,KAAa,EAAE,OAA6B,EAAE,QAAmB;QACpE,IAAI,OAAO,GAAG,kBAAO,CAAC,SAAS,EAAE,KAAK,CAAC,EACtC,MAAM,GAAG;YACR,EAAE,EAAE,OAAO;SACX,CAAC;QAEH,OAAO,IAAI,CAAC,MAAM,CAAC,sBAAsB,CAAC,IAAI,CAAC,MAAM,CAAC,GAAG,CAAC,CACzD,OAAO,EACP,MAAM,EACN,QAAQ,CACR,CAAC;IACH,CAAC;IAED;;;;;;;;;;OAUG;IACH,2BAAM,GAAN,UAAO,KAAa,EAAE,OAA6B,EAAE,QAAmB;QACvE,IAAI,OAAO,GAAG,kBAAO,CAAC,SAAS,EAAE,KAAK,CAAC,EACtC,MAAM,GAAG;YACR,EAAE,EAAE,OAAO;SACX,CAAC;QAEH,OAAO,IAAI,CAAC,MAAM,CAAC,sBAAsB,CAAC,IAAI,CAAC,MAAM,CAAC,GAAG,CAAC,CACzD,OAAO,EACP,MAAM,EACN,QAAQ,CACR,CAAC;IACH,CAAC;IAED;;;;;;;;;OASG;IACH,2BAAM,GAAN,UAAO,OAA6B,EAAE,QAAmB;QAAzD,iBAuBC;QAtBA,OAAO,IAAI,CAAC,MAAM,CAAC,KAAK;aACtB,GAAG,CAAC,IAAI,CAAC,MAAM,CAAC,eAAe,EAAE,EAAE,MAAM,EAAE,YAAY,EAAE,CAAC;aAC1D,IAAI,CAAC,UAAC,IAAS,CAAC,WAAW;YAC3B,IAAI,CAAC,IAAI,CAAC,UAAU,IAAI,CAAC,IAAI,CAAC,UAAU,CAAC,EAAE,EAAE;gBAC5C,MAAM,IAAI,KAAK,CAAC,mDAAmD,CAAC,CAAC;aACrE;YAED,IAAI,OAAO,GAAG,kBAAO,CACnB,gBAAgB,EAChB,IAAI,CAAC,UAAU,CAAC,EAAE,EAClB,0BAA0B,CAC1B,EACD,MAAM,GAAG;gBACR,EAAE,EAAE,OAAO;aACX,CAAC;YAEH,OAAO,KAAI,CAAC,MAAM,CAAC,sBAAsB,CAAC,KAAI,CAAC,MAAM,CAAC,GAAG,CAAC,CACzD,OAAO,EACP,MAAM,CACN,CAAC;QACH,CAAC,CAAC;aACD,UAAU,CAAC,QAAQ,CAAC,CAAC;IACxB,CAAC;IACF,iBAAC;AAAD,CAAC,AAzFD,IAyFC;AAED,iBAAS,UAAU,CAAC"}
@@ -0,0 +1,162 @@
1
+ /**
2
+ * @fileoverview Manager for Enterprise resources
3
+ */
4
+ import BoxClient from '../box-client';
5
+ /**
6
+ * List of valid user types
7
+ * @readonly
8
+ * @enum {EnterpriseUserType}
9
+ */
10
+ declare enum EnterpriseUserType {
11
+ ALL = "all",
12
+ MANAGED = "managed",
13
+ EXTERNAL = "external"
14
+ }
15
+ /**
16
+ * List of valid user statuses
17
+ * @readonly
18
+ * @enum {EnterpriseUserStatus}
19
+ */
20
+ declare enum EnterpriseUserStatus {
21
+ ACTIVE = "active",
22
+ INACTIVE = "inactive",
23
+ CANNOT_DELETE_OR_EDIT = "cannot_delete_edit",
24
+ CANNOT_DELETE_EDIT_OR_UPLOAD = "cannot_delete_edit_upload"
25
+ }
26
+ /**
27
+ * List of valid roles
28
+ * @readonly
29
+ * @enum {EnterpriseRole}
30
+ */
31
+ declare enum EnterpriseRole {
32
+ USER = "user",
33
+ COADMIN = "coadmin"
34
+ }
35
+ /**
36
+ * Simple manager for interacting with all Enterprise endpoints and actions.
37
+ *
38
+ * @constructor
39
+ * @param {BoxClient} client - The Box API Client that is responsible for making calls to the API
40
+ * @returns {void}
41
+ */
42
+ declare class Enterprise {
43
+ client: BoxClient;
44
+ userTypes: typeof EnterpriseUserType;
45
+ userStatuses: typeof EnterpriseUserStatus;
46
+ userRoles: typeof EnterpriseRole;
47
+ constructor(client: BoxClient);
48
+ /**
49
+ * Get a list of users in the current enterprise
50
+ *
51
+ * API Endpoint: '/users'
52
+ * Method: GET
53
+ *
54
+ * @param {Object} [options] - Optional parameters, can be left null in most cases
55
+ * @param {string} [options.filter_term] - Filter the results to only users starting with the filter_term in either the name or the login
56
+ * @param {int} [options.limit=100] - The number of records to return
57
+ * @param {boolean} [options.usemarker=false] - Whether or not to use marker-based pagination
58
+ * @param {string} [options.marker=''] - The marker for the page at which to start. Default is the first page
59
+ * @param {int} [options.offset=0] - The record at which to start
60
+ * @param {EnterpriseUserType} [options.user_type=managed] - The type of user to search for
61
+ * @param {Function} [callback] - Passed the list of users if successful, error otherwise
62
+ * @returns {Promise<Object>} A promise resolving to the collection of users
63
+ */
64
+ getUsers(options?: {
65
+ filter_term?: string;
66
+ limit?: number;
67
+ usemarker?: boolean;
68
+ marker?: string;
69
+ offset?: number;
70
+ user_type?: EnterpriseUserType;
71
+ }, callback?: Function): any;
72
+ /**
73
+ * Invites a user to join the enterprise
74
+ *
75
+ * API Endpoint: '/invites'
76
+ * Method: POST
77
+ *
78
+ * @param {string} enterpriseID - The ID of the enterprise to invite the user to
79
+ * @param {string} email - The email address of the user to invite
80
+ * @param {Function} [callback] - Passed the invite object if successful, error otherwise
81
+ * @returns {Promise<Object>} A promise resolving to the invite object
82
+ */
83
+ inviteUser(enterpriseID: string, email: string, callback?: Function): any;
84
+ /**
85
+ * Create a new user in the current enterprise
86
+ *
87
+ * API Endpoint: '/users'
88
+ * Method: POST
89
+ *
90
+ * @param {string} login - The email address this user uses to login
91
+ * @param {string} name - The name of this user
92
+ * @param {Object} [options] - Optional parameters, can be left null in most cases
93
+ * @param {EnterpriseRole} [options.role] - This user’s enterprise role
94
+ * @param {string} [options.language] - The user's language
95
+ * @param {boolean} [options.is_sync_enabled] - Whether or not this user can use Box Sync
96
+ * @param {string} [options.job_title] - The user’s job title
97
+ * @param {string} [options.phone] - The user’s phone number
98
+ * @param {string} [options.address] - The user’s address
99
+ * @param {int} [options.space_amount] - The user’s total available storage space in bytes
100
+ * @param {Array} [options.tracking_codes] - An array of key/value pairs set by the user’s admin
101
+ * @param {EnterpriseUserStatus} [options.status] - The user's status
102
+ * @param {boolean} [options.can_see_managed_users] - Whether the user should be able to see other managed users
103
+ * @param {string} [options.timezone] - The user's timezone
104
+ * @param {boolean} [options.is_exempt_from_device_limits] - Whether to exempt this user from Enterprise device limits
105
+ * @param {boolean} [options.is_exempt_from_login_verification] - Whether or not this user must use two-factor authentication
106
+ * @param {Function} [callback] - Passed the created user if successful, error otherwise
107
+ * @returns {Promise<Object>} A promise resolving to the created user
108
+ */
109
+ addUser(login: string, name: string, options?: {
110
+ role?: EnterpriseRole;
111
+ language?: string;
112
+ is_sync_enabled?: boolean;
113
+ job_title?: string;
114
+ phone?: string;
115
+ address?: string;
116
+ space_amount?: number;
117
+ tracking_codes?: [string, any][];
118
+ status?: EnterpriseUserStatus;
119
+ can_see_managed_users?: boolean;
120
+ timezone?: string;
121
+ is_exempt_from_device_limits?: boolean;
122
+ is_exempt_from_login_verification?: boolean;
123
+ }, callback?: Function): any;
124
+ /**
125
+ * Create a new app user in the current enterprise
126
+ *
127
+ * API Endpoint: '/users'
128
+ * Method: POST
129
+ *
130
+ * @param {string} name - The name of this user
131
+ * @param {Object} [options] - Optional parameters, can be left null in most cases
132
+ * @param {string} [options.language] - The user's language
133
+ * @param {string} [options.job_title] - The user’s job title
134
+ * @param {string} [options.phone] - The user’s phone number
135
+ * @param {string} [options.address] - The user’s address
136
+ * @param {int} [options.space_amount] - The user’s total available storage space in bytes
137
+ * @param {string} [options.timezone] - The user's timezone
138
+ * @param {Function} [callback] - Passed the created user if successful, error otherwise
139
+ * @returns {Promise<Object>} A promise resolving to the created user
140
+ */
141
+ addAppUser(name: string, options?: {
142
+ language?: string;
143
+ job_title?: string;
144
+ phone?: string;
145
+ address?: string;
146
+ space_amount?: number;
147
+ timezone?: string;
148
+ }, callback?: Function): any;
149
+ /**
150
+ * Transfers all of a user's files into another user's account.
151
+ *
152
+ * API Endpoint: '/users/:sourceUserID/folders/0'
153
+ * Method: PUT
154
+ *
155
+ * @param {string} sourceUserID - The ID of the user whose files will be transferred
156
+ * @param {string} destUserID - The ID of the user to transfer the files to
157
+ * @param {Function} [callback] - Passed the new folder which contains all the files if successful, error otherwise
158
+ * @returns {Promise<Object>} A promise resolving to the folder containing the transferred content
159
+ */
160
+ transferUserContent(sourceUserID: string, destUserID: string, callback?: Function): any;
161
+ }
162
+ export = Enterprise;