files.com 1.2.190 → 1.2.192

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.
package/README.md CHANGED
@@ -63,12 +63,14 @@ To initiate a support conversation, you can send an [Authenticated Support Reque
63
63
 
64
64
  ## Authentication
65
65
 
66
+ There are two ways to authenticate: API Key authentication and Session-based authentication.
67
+
66
68
  ### Authenticate with an API Key
67
69
 
68
70
  Authenticating with an API key is the recommended authentication method for most scenarios, and is
69
71
  the method used in the examples on this site.
70
72
 
71
- To use the API or SDKs with an API Key, first generate an API key from the [web
73
+ To use an API Key, first generate an API key from the [web
72
74
  interface](https://www.files.com/docs/sdk-and-apis/api-keys) or [via the API or an
73
75
  SDK](/javascript/resources/developers/api-keys).
74
76
 
@@ -90,14 +92,14 @@ Don't forget to replace the placeholder, `YOUR_API_KEY`, with your actual API ke
90
92
 
91
93
  ### Authenticate with a Session
92
94
 
93
- You can also authenticate to the REST API or SDKs by creating a user session using the username and
95
+ You can also authenticate by creating a user session using the username and
94
96
  password of an active user. If the user is an administrator, the session will have full access to
95
- the entire API. Sessions created from regular user accounts will only be able to access files that
97
+ all capabilities of Files.com. Sessions created from regular user accounts will only be able to access files that
96
98
  user can access, and no access will be granted to site administration functions.
97
99
 
98
- API sessions use the exact same session timeout settings as web interface sessions. When an API
100
+ Sessions use the exact same session timeout settings as web interface sessions. When a
99
101
  session times out, simply create a new session and resume where you left off. This process is not
100
- automatically handled by SDKs because we do not want to store password information in memory without
102
+ automatically handled by our SDKs because we do not want to store password information in memory without
101
103
  your explicit consent.
102
104
 
103
105
  #### Logging In
@@ -136,6 +138,8 @@ await Session.destroy();
136
138
 
137
139
  ## Configuration
138
140
 
141
+ Global configuration is performed by calling methods on the `Files` object.
142
+
139
143
  ### Configuration Options
140
144
 
141
145
  #### Base URL
package/_VERSION CHANGED
@@ -1 +1 @@
1
- 1.2.190
1
+ 1.2.192
@@ -50,6 +50,7 @@ await As2Station.list
50
50
 
51
51
  * `cursor` (string): Used for pagination. When a list request has more records available, cursors are provided in the response headers `X-Files-Cursor-Next` and `X-Files-Cursor-Prev`. Send one of those cursor value here to resume an existing list from the next available record. Note: many of our SDKs have iterator methods that will automatically handle cursor-based pagination.
52
52
  * `per_page` (int64): Number of records to show per page. (Max: 10,000, 1,000 or less is recommended).
53
+ * `sort_by` (object): If set, sort records by the specified field in either `asc` or `desc` direction. Valid fields are `name`.
53
54
 
54
55
  ---
55
56
 
@@ -150,7 +150,7 @@ await Bundle.list({
150
150
  * `user_id` (int64): User ID. Provide a value of `0` to operate the current session's user.
151
151
  * `cursor` (string): Used for pagination. When a list request has more records available, cursors are provided in the response headers `X-Files-Cursor-Next` and `X-Files-Cursor-Prev`. Send one of those cursor value here to resume an existing list from the next available record. Note: many of our SDKs have iterator methods that will automatically handle cursor-based pagination.
152
152
  * `per_page` (int64): Number of records to show per page. (Max: 10,000, 1,000 or less is recommended).
153
- * `sort_by` (object): If set, sort records by the specified field in either `asc` or `desc` direction. Valid fields are .
153
+ * `sort_by` (object): If set, sort records by the specified field in either `asc` or `desc` direction. Valid fields are `expires_at`.
154
154
 
155
155
  ---
156
156
 
@@ -51,4 +51,5 @@ await BundleRegistration.list({
51
51
 
52
52
  * `cursor` (string): Used for pagination. When a list request has more records available, cursors are provided in the response headers `X-Files-Cursor-Next` and `X-Files-Cursor-Prev`. Send one of those cursor value here to resume an existing list from the next available record. Note: many of our SDKs have iterator methods that will automatically handle cursor-based pagination.
53
53
  * `per_page` (int64): Number of records to show per page. (Max: 10,000, 1,000 or less is recommended).
54
+ * `sort_by` (object): If set, sort records by the specified field in either `asc` or `desc` direction. Valid fields are `bundle_id`.
54
55
  * `bundle_id` (int64): ID of the associated Bundle
@@ -33,6 +33,7 @@ await Clickwrap.list
33
33
 
34
34
  * `cursor` (string): Used for pagination. When a list request has more records available, cursors are provided in the response headers `X-Files-Cursor-Next` and `X-Files-Cursor-Prev`. Send one of those cursor value here to resume an existing list from the next available record. Note: many of our SDKs have iterator methods that will automatically handle cursor-based pagination.
35
35
  * `per_page` (int64): Number of records to show per page. (Max: 10,000, 1,000 or less is recommended).
36
+ * `sort_by` (object): If set, sort records by the specified field in either `asc` or `desc` direction. Valid fields are .
36
37
 
37
38
  ---
38
39
 
@@ -37,6 +37,7 @@ await MessageComment.list({
37
37
  * `user_id` (int64): User ID. Provide a value of `0` to operate the current session's user.
38
38
  * `cursor` (string): Used for pagination. When a list request has more records available, cursors are provided in the response headers `X-Files-Cursor-Next` and `X-Files-Cursor-Prev`. Send one of those cursor value here to resume an existing list from the next available record. Note: many of our SDKs have iterator methods that will automatically handle cursor-based pagination.
39
39
  * `per_page` (int64): Number of records to show per page. (Max: 10,000, 1,000 or less is recommended).
40
+ * `sort_by` (object): If set, sort records by the specified field in either `asc` or `desc` direction. Valid fields are .
40
41
  * `message_id` (int64): Required - Message comment to return comments for.
41
42
 
42
43
  ---
@@ -30,6 +30,7 @@ await MessageCommentReaction.list({
30
30
  * `user_id` (int64): User ID. Provide a value of `0` to operate the current session's user.
31
31
  * `cursor` (string): Used for pagination. When a list request has more records available, cursors are provided in the response headers `X-Files-Cursor-Next` and `X-Files-Cursor-Prev`. Send one of those cursor value here to resume an existing list from the next available record. Note: many of our SDKs have iterator methods that will automatically handle cursor-based pagination.
32
32
  * `per_page` (int64): Number of records to show per page. (Max: 10,000, 1,000 or less is recommended).
33
+ * `sort_by` (object): If set, sort records by the specified field in either `asc` or `desc` direction. Valid fields are .
33
34
  * `message_comment_id` (int64): Required - Message comment to return reactions for.
34
35
 
35
36
  ---
@@ -113,6 +113,7 @@ await SsoStrategy.list
113
113
 
114
114
  * `cursor` (string): Used for pagination. When a list request has more records available, cursors are provided in the response headers `X-Files-Cursor-Next` and `X-Files-Cursor-Prev`. Send one of those cursor value here to resume an existing list from the next available record. Note: many of our SDKs have iterator methods that will automatically handle cursor-based pagination.
115
115
  * `per_page` (int64): Number of records to show per page. (Max: 10,000, 1,000 or less is recommended).
116
+ * `sort_by` (object): If set, sort records by the specified field in either `asc` or `desc` direction. Valid fields are .
116
117
 
117
118
  ---
118
119
 
package/lib/Files.js CHANGED
@@ -11,7 +11,7 @@ var endpointPrefix = '/api/rest/v1';
11
11
  var apiKey;
12
12
  var baseUrl = 'https://app.files.com';
13
13
  var sessionId = null;
14
- var version = '1.2.190';
14
+ var version = '1.2.192';
15
15
  var userAgent = "Files.com JavaScript SDK v".concat(version);
16
16
  var logLevel = _Logger.LogLevel.INFO;
17
17
  var debugRequest = false;
@@ -323,6 +323,7 @@ _As2Station = As2Station;
323
323
  // Parameters:
324
324
  // cursor - string - Used for pagination. When a list request has more records available, cursors are provided in the response headers `X-Files-Cursor-Next` and `X-Files-Cursor-Prev`. Send one of those cursor value here to resume an existing list from the next available record. Note: many of our SDKs have iterator methods that will automatically handle cursor-based pagination.
325
325
  // per_page - int64 - Number of records to show per page. (Max: 10,000, 1,000 or less is recommended).
326
+ // sort_by - object - If set, sort records by the specified field in either `asc` or `desc` direction. Valid fields are `name`.
326
327
  (0, _defineProperty2.default)(As2Station, "list", /*#__PURE__*/(0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee4() {
327
328
  var _response$data;
328
329
  var params,
@@ -684,7 +684,7 @@ _Bundle = Bundle;
684
684
  // user_id - int64 - User ID. Provide a value of `0` to operate the current session's user.
685
685
  // cursor - string - Used for pagination. When a list request has more records available, cursors are provided in the response headers `X-Files-Cursor-Next` and `X-Files-Cursor-Prev`. Send one of those cursor value here to resume an existing list from the next available record. Note: many of our SDKs have iterator methods that will automatically handle cursor-based pagination.
686
686
  // per_page - int64 - Number of records to show per page. (Max: 10,000, 1,000 or less is recommended).
687
- // sort_by - object - If set, sort records by the specified field in either `asc` or `desc` direction. Valid fields are .
687
+ // sort_by - object - If set, sort records by the specified field in either `asc` or `desc` direction. Valid fields are `expires_at`.
688
688
  (0, _defineProperty2.default)(Bundle, "list", /*#__PURE__*/(0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee5() {
689
689
  var _response$data;
690
690
  var params,
@@ -102,6 +102,7 @@ _BundleRegistration = BundleRegistration;
102
102
  // Parameters:
103
103
  // cursor - string - Used for pagination. When a list request has more records available, cursors are provided in the response headers `X-Files-Cursor-Next` and `X-Files-Cursor-Prev`. Send one of those cursor value here to resume an existing list from the next available record. Note: many of our SDKs have iterator methods that will automatically handle cursor-based pagination.
104
104
  // per_page - int64 - Number of records to show per page. (Max: 10,000, 1,000 or less is recommended).
105
+ // sort_by - object - If set, sort records by the specified field in either `asc` or `desc` direction. Valid fields are `bundle_id`.
105
106
  // bundle_id - int64 - ID of the associated Bundle
106
107
  (0, _defineProperty2.default)(BundleRegistration, "list", /*#__PURE__*/(0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee() {
107
108
  var _response$data;
@@ -260,6 +260,7 @@ _Clickwrap = Clickwrap;
260
260
  // Parameters:
261
261
  // cursor - string - Used for pagination. When a list request has more records available, cursors are provided in the response headers `X-Files-Cursor-Next` and `X-Files-Cursor-Prev`. Send one of those cursor value here to resume an existing list from the next available record. Note: many of our SDKs have iterator methods that will automatically handle cursor-based pagination.
262
262
  // per_page - int64 - Number of records to show per page. (Max: 10,000, 1,000 or less is recommended).
263
+ // sort_by - object - If set, sort records by the specified field in either `asc` or `desc` direction. Valid fields are .
263
264
  (0, _defineProperty2.default)(Clickwrap, "list", /*#__PURE__*/(0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee4() {
264
265
  var _response$data;
265
266
  var params,
@@ -233,6 +233,7 @@ _MessageComment = MessageComment;
233
233
  // user_id - int64 - User ID. Provide a value of `0` to operate the current session's user.
234
234
  // cursor - string - Used for pagination. When a list request has more records available, cursors are provided in the response headers `X-Files-Cursor-Next` and `X-Files-Cursor-Prev`. Send one of those cursor value here to resume an existing list from the next available record. Note: many of our SDKs have iterator methods that will automatically handle cursor-based pagination.
235
235
  // per_page - int64 - Number of records to show per page. (Max: 10,000, 1,000 or less is recommended).
236
+ // sort_by - object - If set, sort records by the specified field in either `asc` or `desc` direction. Valid fields are .
236
237
  // message_id (required) - int64 - Message comment to return comments for.
237
238
  (0, _defineProperty2.default)(MessageComment, "list", /*#__PURE__*/(0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee4() {
238
239
  var _response$data;
@@ -147,6 +147,7 @@ _MessageCommentReaction = MessageCommentReaction;
147
147
  // user_id - int64 - User ID. Provide a value of `0` to operate the current session's user.
148
148
  // cursor - string - Used for pagination. When a list request has more records available, cursors are provided in the response headers `X-Files-Cursor-Next` and `X-Files-Cursor-Prev`. Send one of those cursor value here to resume an existing list from the next available record. Note: many of our SDKs have iterator methods that will automatically handle cursor-based pagination.
149
149
  // per_page - int64 - Number of records to show per page. (Max: 10,000, 1,000 or less is recommended).
150
+ // sort_by - object - If set, sort records by the specified field in either `asc` or `desc` direction. Valid fields are .
150
151
  // message_comment_id (required) - int64 - Message comment to return reactions for.
151
152
  (0, _defineProperty2.default)(MessageCommentReaction, "list", /*#__PURE__*/(0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee3() {
152
153
  var _response$data;
@@ -283,6 +283,7 @@ _SsoStrategy = SsoStrategy;
283
283
  // Parameters:
284
284
  // cursor - string - Used for pagination. When a list request has more records available, cursors are provided in the response headers `X-Files-Cursor-Next` and `X-Files-Cursor-Prev`. Send one of those cursor value here to resume an existing list from the next available record. Note: many of our SDKs have iterator methods that will automatically handle cursor-based pagination.
285
285
  // per_page - int64 - Number of records to show per page. (Max: 10,000, 1,000 or less is recommended).
286
+ // sort_by - object - If set, sort records by the specified field in either `asc` or `desc` direction. Valid fields are .
286
287
  (0, _defineProperty2.default)(SsoStrategy, "list", /*#__PURE__*/(0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee2() {
287
288
  var _response$data;
288
289
  var params,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "files.com",
3
- "version": "1.2.190",
3
+ "version": "1.2.192",
4
4
  "description": "Files.com SDK for JavaScript",
5
5
  "keywords": [
6
6
  "files.com",
package/src/Files.js CHANGED
@@ -5,7 +5,7 @@ const endpointPrefix = '/api/rest/v1'
5
5
  let apiKey
6
6
  let baseUrl = 'https://app.files.com'
7
7
  let sessionId = null
8
- const version = '1.2.190'
8
+ const version = '1.2.192'
9
9
  let userAgent = `Files.com JavaScript SDK v${version}`
10
10
 
11
11
  let logLevel = LogLevel.INFO
@@ -231,6 +231,7 @@ class As2Station {
231
231
  // Parameters:
232
232
  // cursor - string - Used for pagination. When a list request has more records available, cursors are provided in the response headers `X-Files-Cursor-Next` and `X-Files-Cursor-Prev`. Send one of those cursor value here to resume an existing list from the next available record. Note: many of our SDKs have iterator methods that will automatically handle cursor-based pagination.
233
233
  // per_page - int64 - Number of records to show per page. (Max: 10,000, 1,000 or less is recommended).
234
+ // sort_by - object - If set, sort records by the specified field in either `asc` or `desc` direction. Valid fields are `name`.
234
235
  static list = async (params = {}, options = {}) => {
235
236
  if (params.cursor && !isString(params.cursor)) {
236
237
  throw new errors.InvalidParameterError(`Bad parameter: cursor must be of type String, received ${getType(params.cursor)}`)
@@ -542,7 +542,7 @@ class Bundle {
542
542
  // user_id - int64 - User ID. Provide a value of `0` to operate the current session's user.
543
543
  // cursor - string - Used for pagination. When a list request has more records available, cursors are provided in the response headers `X-Files-Cursor-Next` and `X-Files-Cursor-Prev`. Send one of those cursor value here to resume an existing list from the next available record. Note: many of our SDKs have iterator methods that will automatically handle cursor-based pagination.
544
544
  // per_page - int64 - Number of records to show per page. (Max: 10,000, 1,000 or less is recommended).
545
- // sort_by - object - If set, sort records by the specified field in either `asc` or `desc` direction. Valid fields are .
545
+ // sort_by - object - If set, sort records by the specified field in either `asc` or `desc` direction. Valid fields are `expires_at`.
546
546
  static list = async (params = {}, options = {}) => {
547
547
  if (params.user_id && !isInt(params.user_id)) {
548
548
  throw new errors.InvalidParameterError(`Bad parameter: user_id must be of type Int, received ${getType(params.user_id)}`)
@@ -70,6 +70,7 @@ class BundleRegistration {
70
70
  // Parameters:
71
71
  // cursor - string - Used for pagination. When a list request has more records available, cursors are provided in the response headers `X-Files-Cursor-Next` and `X-Files-Cursor-Prev`. Send one of those cursor value here to resume an existing list from the next available record. Note: many of our SDKs have iterator methods that will automatically handle cursor-based pagination.
72
72
  // per_page - int64 - Number of records to show per page. (Max: 10,000, 1,000 or less is recommended).
73
+ // sort_by - object - If set, sort records by the specified field in either `asc` or `desc` direction. Valid fields are `bundle_id`.
73
74
  // bundle_id - int64 - ID of the associated Bundle
74
75
  static list = async (params = {}, options = {}) => {
75
76
  if (params.cursor && !isString(params.cursor)) {
@@ -166,6 +166,7 @@ class Clickwrap {
166
166
  // Parameters:
167
167
  // cursor - string - Used for pagination. When a list request has more records available, cursors are provided in the response headers `X-Files-Cursor-Next` and `X-Files-Cursor-Prev`. Send one of those cursor value here to resume an existing list from the next available record. Note: many of our SDKs have iterator methods that will automatically handle cursor-based pagination.
168
168
  // per_page - int64 - Number of records to show per page. (Max: 10,000, 1,000 or less is recommended).
169
+ // sort_by - object - If set, sort records by the specified field in either `asc` or `desc` direction. Valid fields are .
169
170
  static list = async (params = {}, options = {}) => {
170
171
  if (params.cursor && !isString(params.cursor)) {
171
172
  throw new errors.InvalidParameterError(`Bad parameter: cursor must be of type String, received ${getType(params.cursor)}`)
@@ -141,6 +141,7 @@ class MessageComment {
141
141
  // user_id - int64 - User ID. Provide a value of `0` to operate the current session's user.
142
142
  // cursor - string - Used for pagination. When a list request has more records available, cursors are provided in the response headers `X-Files-Cursor-Next` and `X-Files-Cursor-Prev`. Send one of those cursor value here to resume an existing list from the next available record. Note: many of our SDKs have iterator methods that will automatically handle cursor-based pagination.
143
143
  // per_page - int64 - Number of records to show per page. (Max: 10,000, 1,000 or less is recommended).
144
+ // sort_by - object - If set, sort records by the specified field in either `asc` or `desc` direction. Valid fields are .
144
145
  // message_id (required) - int64 - Message comment to return comments for.
145
146
  static list = async (params = {}, options = {}) => {
146
147
  if (!params.message_id) {
@@ -91,6 +91,7 @@ class MessageCommentReaction {
91
91
  // user_id - int64 - User ID. Provide a value of `0` to operate the current session's user.
92
92
  // cursor - string - Used for pagination. When a list request has more records available, cursors are provided in the response headers `X-Files-Cursor-Next` and `X-Files-Cursor-Prev`. Send one of those cursor value here to resume an existing list from the next available record. Note: many of our SDKs have iterator methods that will automatically handle cursor-based pagination.
93
93
  // per_page - int64 - Number of records to show per page. (Max: 10,000, 1,000 or less is recommended).
94
+ // sort_by - object - If set, sort records by the specified field in either `asc` or `desc` direction. Valid fields are .
94
95
  // message_comment_id (required) - int64 - Message comment to return reactions for.
95
96
  static list = async (params = {}, options = {}) => {
96
97
  if (!params.message_comment_id) {
@@ -195,6 +195,7 @@ class SsoStrategy {
195
195
  // Parameters:
196
196
  // cursor - string - Used for pagination. When a list request has more records available, cursors are provided in the response headers `X-Files-Cursor-Next` and `X-Files-Cursor-Prev`. Send one of those cursor value here to resume an existing list from the next available record. Note: many of our SDKs have iterator methods that will automatically handle cursor-based pagination.
197
197
  // per_page - int64 - Number of records to show per page. (Max: 10,000, 1,000 or less is recommended).
198
+ // sort_by - object - If set, sort records by the specified field in either `asc` or `desc` direction. Valid fields are .
198
199
  static list = async (params = {}, options = {}) => {
199
200
  if (params.cursor && !isString(params.cursor)) {
200
201
  throw new errors.InvalidParameterError(`Bad parameter: cursor must be of type String, received ${getType(params.cursor)}`)