files.com 1.2.172 → 1.2.174
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 +19 -19
- package/_VERSION +1 -1
- package/docs/models/ActionNotificationExportResult.md +0 -17
- package/docs/models/ApiKey.md +0 -21
- package/docs/models/ApiRequestLog.md +0 -14
- package/docs/models/App.md +0 -15
- package/docs/models/As2IncomingMessage.md +0 -21
- package/docs/models/As2OutgoingMessage.md +0 -21
- package/docs/models/As2Partner.md +0 -9
- package/docs/models/As2Station.md +0 -9
- package/docs/models/Automation.md +0 -18
- package/docs/models/AutomationLog.md +0 -14
- package/docs/models/AutomationRun.md +0 -17
- package/docs/models/BandwidthSnapshot.md +0 -18
- package/docs/models/Behavior.md +0 -15
- package/docs/models/Bundle.md +0 -22
- package/docs/models/BundleAction.md +0 -18
- package/docs/models/BundleDownload.md +0 -23
- package/docs/models/BundleNotification.md +0 -14
- package/docs/models/BundleRecipient.md +0 -17
- package/docs/models/BundleRegistration.md +0 -15
- package/docs/models/Clickwrap.md +0 -9
- package/docs/models/DnsRecord.md +0 -9
- package/docs/models/EmailIncomingMessage.md +0 -19
- package/docs/models/EmailLog.md +0 -14
- package/docs/models/ExavaultApiRequestLog.md +0 -14
- package/docs/models/ExternalEvent.md +0 -19
- package/docs/models/FileMigrationLog.md +0 -14
- package/docs/models/FormFieldSet.md +0 -15
- package/docs/models/FtpActionLog.md +0 -14
- package/docs/models/GpgKey.md +0 -16
- package/docs/models/Group.md +0 -19
- package/docs/models/GroupUser.md +0 -17
- package/docs/models/History.md +0 -85
- package/docs/models/HistoryExportResult.md +0 -17
- package/docs/models/InboxRecipient.md +0 -17
- package/docs/models/InboxRegistration.md +0 -15
- package/docs/models/InboxUpload.md +0 -18
- package/docs/models/Invoice.md +0 -9
- package/docs/models/IpAddress.md +0 -36
- package/docs/models/Message.md +0 -17
- package/docs/models/MessageComment.md +0 -17
- package/docs/models/MessageCommentReaction.md +0 -17
- package/docs/models/MessageReaction.md +0 -17
- package/docs/models/Notification.md +0 -20
- package/docs/models/OutboundConnectionLog.md +0 -14
- package/docs/models/Payment.md +0 -9
- package/docs/models/Permission.md +0 -21
- package/docs/models/Priority.md +0 -13
- package/docs/models/Project.md +0 -9
- package/docs/models/PublicHostingRequestLog.md +0 -14
- package/docs/models/PublicKey.md +0 -15
- package/docs/models/RemoteBandwidthSnapshot.md +0 -18
- package/docs/models/RemoteServer.md +0 -15
- package/docs/models/Request.md +0 -17
- package/docs/models/SettingsChange.md +0 -14
- package/docs/models/SftpActionLog.md +0 -14
- package/docs/models/SftpHostKey.md +0 -9
- package/docs/models/ShareGroup.md +0 -15
- package/docs/models/SiemHttpDestination.md +0 -9
- package/docs/models/Snapshot.md +0 -9
- package/docs/models/SsoStrategy.md +0 -9
- package/docs/models/SyncLog.md +0 -14
- package/docs/models/UsageDailySnapshot.md +0 -18
- package/docs/models/UsageSnapshot.md +0 -9
- package/docs/models/User.md +0 -24
- package/docs/models/UserCipherUse.md +0 -15
- package/docs/models/UserRequest.md +0 -9
- package/docs/models/UserSftpClientUse.md +0 -15
- package/docs/models/WebDavActionLog.md +0 -14
- package/lib/Files.js +1 -1
- package/lib/models/ActionNotificationExportResult.js +0 -44
- package/lib/models/ApiKey.js +20 -57
- package/lib/models/ApiRequestLog.js +0 -26
- package/lib/models/App.js +0 -27
- package/lib/models/As2IncomingMessage.js +0 -37
- package/lib/models/As2OutgoingMessage.js +0 -37
- package/lib/models/As2Partner.js +0 -21
- package/lib/models/As2Station.js +0 -21
- package/lib/models/Automation.js +0 -30
- package/lib/models/AutomationLog.js +0 -26
- package/lib/models/AutomationRun.js +0 -39
- package/lib/models/BandwidthSnapshot.js +0 -30
- package/lib/models/Behavior.js +0 -27
- package/lib/models/Bundle.js +0 -38
- package/lib/models/BundleAction.js +0 -30
- package/lib/models/BundleDownload.js +0 -44
- package/lib/models/BundleNotification.js +0 -26
- package/lib/models/BundleRecipient.js +0 -39
- package/lib/models/BundleRegistration.js +0 -31
- package/lib/models/Clickwrap.js +0 -21
- package/lib/models/DnsRecord.js +0 -21
- package/lib/models/EmailIncomingMessage.js +0 -31
- package/lib/models/EmailLog.js +0 -26
- package/lib/models/ExavaultApiRequestLog.js +0 -26
- package/lib/models/ExternalEvent.js +0 -31
- package/lib/models/FileMigrationLog.js +0 -26
- package/lib/models/FormFieldSet.js +0 -31
- package/lib/models/FtpActionLog.js +0 -26
- package/lib/models/GpgKey.js +0 -32
- package/lib/models/Group.js +0 -35
- package/lib/models/GroupUser.js +0 -38
- package/lib/models/History.js +0 -307
- package/lib/models/HistoryExportResult.js +0 -44
- package/lib/models/InboxRecipient.js +0 -39
- package/lib/models/InboxRegistration.js +0 -31
- package/lib/models/InboxUpload.js +0 -30
- package/lib/models/Invoice.js +0 -21
- package/lib/models/IpAddress.js +0 -84
- package/lib/models/Message.js +0 -44
- package/lib/models/MessageComment.js +0 -44
- package/lib/models/MessageCommentReaction.js +0 -44
- package/lib/models/MessageReaction.js +0 -44
- package/lib/models/Notification.js +0 -42
- package/lib/models/OutboundConnectionLog.js +0 -26
- package/lib/models/Payment.js +0 -21
- package/lib/models/Permission.js +0 -49
- package/lib/models/Priority.js +0 -49
- package/lib/models/Project.js +0 -21
- package/lib/models/PublicHostingRequestLog.js +0 -26
- package/lib/models/PublicKey.js +0 -31
- package/lib/models/RemoteBandwidthSnapshot.js +0 -30
- package/lib/models/RemoteServer.js +0 -27
- package/lib/models/Request.js +0 -33
- package/lib/models/SettingsChange.js +0 -26
- package/lib/models/SftpActionLog.js +0 -26
- package/lib/models/SftpHostKey.js +0 -21
- package/lib/models/ShareGroup.js +0 -31
- package/lib/models/SiemHttpDestination.js +25 -46
- package/lib/models/Snapshot.js +0 -21
- package/lib/models/SsoStrategy.js +0 -21
- package/lib/models/SyncLog.js +0 -26
- package/lib/models/UsageDailySnapshot.js +0 -30
- package/lib/models/UsageSnapshot.js +0 -21
- package/lib/models/User.js +0 -46
- package/lib/models/UserCipherUse.js +0 -31
- package/lib/models/UserRequest.js +0 -21
- package/lib/models/UserSftpClientUse.js +0 -31
- package/lib/models/WebDavActionLog.js +0 -26
- package/package.json +1 -1
- package/src/Files.js +1 -1
- package/src/models/ActionNotificationExportResult.js +0 -22
- package/src/models/ApiKey.js +0 -19
- package/src/models/ApiRequestLog.js +0 -10
- package/src/models/App.js +0 -11
- package/src/models/As2IncomingMessage.js +0 -19
- package/src/models/As2OutgoingMessage.js +0 -19
- package/src/models/As2Partner.js +0 -7
- package/src/models/As2Station.js +0 -7
- package/src/models/Automation.js +0 -14
- package/src/models/AutomationLog.js +0 -10
- package/src/models/AutomationRun.js +0 -19
- package/src/models/BandwidthSnapshot.js +0 -14
- package/src/models/Behavior.js +0 -11
- package/src/models/Bundle.js +0 -20
- package/src/models/BundleAction.js +0 -14
- package/src/models/BundleDownload.js +0 -24
- package/src/models/BundleNotification.js +0 -10
- package/src/models/BundleRecipient.js +0 -19
- package/src/models/BundleRegistration.js +0 -13
- package/src/models/Clickwrap.js +0 -7
- package/src/models/DnsRecord.js +0 -7
- package/src/models/EmailIncomingMessage.js +0 -15
- package/src/models/EmailLog.js +0 -10
- package/src/models/ExavaultApiRequestLog.js +0 -10
- package/src/models/ExternalEvent.js +0 -15
- package/src/models/FileMigrationLog.js +0 -10
- package/src/models/FormFieldSet.js +0 -13
- package/src/models/FtpActionLog.js +0 -10
- package/src/models/GpgKey.js +0 -14
- package/src/models/Group.js +0 -17
- package/src/models/GroupUser.js +0 -18
- package/src/models/History.js +0 -167
- package/src/models/HistoryExportResult.js +0 -22
- package/src/models/InboxRecipient.js +0 -19
- package/src/models/InboxRegistration.js +0 -13
- package/src/models/InboxUpload.js +0 -14
- package/src/models/Invoice.js +0 -7
- package/src/models/IpAddress.js +0 -28
- package/src/models/Message.js +0 -22
- package/src/models/MessageComment.js +0 -22
- package/src/models/MessageCommentReaction.js +0 -22
- package/src/models/MessageReaction.js +0 -22
- package/src/models/Notification.js +0 -22
- package/src/models/OutboundConnectionLog.js +0 -10
- package/src/models/Payment.js +0 -7
- package/src/models/Permission.js +0 -27
- package/src/models/Priority.js +0 -23
- package/src/models/Project.js +0 -7
- package/src/models/PublicHostingRequestLog.js +0 -10
- package/src/models/PublicKey.js +0 -13
- package/src/models/RemoteBandwidthSnapshot.js +0 -14
- package/src/models/RemoteServer.js +0 -11
- package/src/models/Request.js +0 -15
- package/src/models/SettingsChange.js +0 -10
- package/src/models/SftpActionLog.js +0 -10
- package/src/models/SftpHostKey.js +0 -7
- package/src/models/ShareGroup.js +0 -13
- package/src/models/SiemHttpDestination.js +0 -7
- package/src/models/Snapshot.js +0 -7
- package/src/models/SsoStrategy.js +0 -7
- package/src/models/SyncLog.js +0 -10
- package/src/models/UsageDailySnapshot.js +0 -14
- package/src/models/UsageSnapshot.js +0 -7
- package/src/models/User.js +0 -26
- package/src/models/UserCipherUse.js +0 -13
- package/src/models/UserRequest.js +0 -7
- package/src/models/UserSftpClientUse.js +0 -13
- package/src/models/WebDavActionLog.js +0 -10
- package/docs/models/Export.md +0 -76
- package/lib/models/Export.js +0 -283
- package/src/models/Export.js +0 -183
package/docs/models/Export.md
DELETED
|
@@ -1,76 +0,0 @@
|
|
|
1
|
-
# Export
|
|
2
|
-
|
|
3
|
-
## Example Export Object
|
|
4
|
-
|
|
5
|
-
```
|
|
6
|
-
{
|
|
7
|
-
"id": 1,
|
|
8
|
-
"export_status": "example",
|
|
9
|
-
"export_type": "example",
|
|
10
|
-
"export_rows": 1,
|
|
11
|
-
"download_uri": "example",
|
|
12
|
-
"message": "example"
|
|
13
|
-
}
|
|
14
|
-
```
|
|
15
|
-
|
|
16
|
-
* `id` (int64): ID for this Export
|
|
17
|
-
* `export_status` (string): Status of the Export
|
|
18
|
-
* `export_type` (string): Type of data being exported
|
|
19
|
-
* `export_rows` (int64): Number of rows exported
|
|
20
|
-
* `download_uri` (string): Link to download Export file.
|
|
21
|
-
* `message` (string): Export message
|
|
22
|
-
* `user_id` (int64): User ID. Provide a value of `0` to operate the current session's user.
|
|
23
|
-
* `sort_by` (object): If set, sort records by the specified field in either `asc` or `desc` direction. Valid fields are `export_status` and `export_type`.
|
|
24
|
-
* `filter` (object): If set, return records where the specified field is equal to the supplied value. Valid fields are `export_status` and `export_type`.
|
|
25
|
-
* `filter_prefix` (object): If set, return records where the specified field is prefixed by the supplied value. Valid fields are `export_type`.
|
|
26
|
-
|
|
27
|
-
---
|
|
28
|
-
|
|
29
|
-
## List Exports
|
|
30
|
-
|
|
31
|
-
```
|
|
32
|
-
await Export.list({
|
|
33
|
-
'user_id': 1,
|
|
34
|
-
})
|
|
35
|
-
```
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
### Parameters
|
|
39
|
-
|
|
40
|
-
* `user_id` (int64): User ID. Provide a value of `0` to operate the current session's user.
|
|
41
|
-
* `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.
|
|
42
|
-
* `per_page` (int64): Number of records to show per page. (Max: 10,000, 1,000 or less is recommended).
|
|
43
|
-
* `sort_by` (object): If set, sort records by the specified field in either `asc` or `desc` direction. Valid fields are `export_status` and `export_type`.
|
|
44
|
-
* `filter` (object): If set, return records where the specified field is equal to the supplied value. Valid fields are `export_status` and `export_type`.
|
|
45
|
-
* `filter_prefix` (object): If set, return records where the specified field is prefixed by the supplied value. Valid fields are `export_type`.
|
|
46
|
-
|
|
47
|
-
---
|
|
48
|
-
|
|
49
|
-
## Show Export
|
|
50
|
-
|
|
51
|
-
```
|
|
52
|
-
await Export.find(id)
|
|
53
|
-
```
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
### Parameters
|
|
57
|
-
|
|
58
|
-
* `id` (int64): Required - Export ID.
|
|
59
|
-
|
|
60
|
-
---
|
|
61
|
-
|
|
62
|
-
## Create an export CSV of Export resources
|
|
63
|
-
|
|
64
|
-
```
|
|
65
|
-
await Export.create({
|
|
66
|
-
'user_id': 1,
|
|
67
|
-
})
|
|
68
|
-
```
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
### Parameters
|
|
72
|
-
|
|
73
|
-
* `user_id` (int64): User ID. Provide a value of `0` to operate the current session's user.
|
|
74
|
-
* `sort_by` (object): If set, sort records by the specified field in either `asc` or `desc` direction. Valid fields are `export_status` and `export_type`.
|
|
75
|
-
* `filter` (object): If set, return records where the specified field is equal to the supplied value. Valid fields are `export_status` and `export_type`.
|
|
76
|
-
* `filter_prefix` (object): If set, return records where the specified field is prefixed by the supplied value. Valid fields are `export_type`.
|
package/lib/models/Export.js
DELETED
|
@@ -1,283 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
-
var _typeof = require("@babel/runtime/helpers/typeof");
|
|
5
|
-
exports.__esModule = true;
|
|
6
|
-
exports.default = void 0;
|
|
7
|
-
var _regenerator = _interopRequireDefault(require("@babel/runtime/regenerator"));
|
|
8
|
-
var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime/helpers/slicedToArray"));
|
|
9
|
-
var _asyncToGenerator2 = _interopRequireDefault(require("@babel/runtime/helpers/asyncToGenerator"));
|
|
10
|
-
var _createClass2 = _interopRequireDefault(require("@babel/runtime/helpers/createClass"));
|
|
11
|
-
var _classCallCheck2 = _interopRequireDefault(require("@babel/runtime/helpers/classCallCheck"));
|
|
12
|
-
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
|
|
13
|
-
var _Api = _interopRequireDefault(require("../Api"));
|
|
14
|
-
var errors = _interopRequireWildcard(require("../Errors"));
|
|
15
|
-
var _utils = require("../utils");
|
|
16
|
-
var _Export;
|
|
17
|
-
/* eslint-disable no-unused-vars */
|
|
18
|
-
function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(e) { return e ? t : r; })(e); }
|
|
19
|
-
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != _typeof(e) && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
|
|
20
|
-
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
21
|
-
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { (0, _defineProperty2.default)(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
22
|
-
/* eslint-enable no-unused-vars */
|
|
23
|
-
/**
|
|
24
|
-
* Class Export
|
|
25
|
-
*/
|
|
26
|
-
var Export = /*#__PURE__*/(0, _createClass2.default)(function Export() {
|
|
27
|
-
var _this = this;
|
|
28
|
-
var attributes = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
|
29
|
-
var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
|
|
30
|
-
(0, _classCallCheck2.default)(this, Export);
|
|
31
|
-
(0, _defineProperty2.default)(this, "attributes", {});
|
|
32
|
-
(0, _defineProperty2.default)(this, "options", {});
|
|
33
|
-
(0, _defineProperty2.default)(this, "isLoaded", function () {
|
|
34
|
-
return !!_this.attributes.id;
|
|
35
|
-
});
|
|
36
|
-
// int64 # ID for this Export
|
|
37
|
-
(0, _defineProperty2.default)(this, "getId", function () {
|
|
38
|
-
return _this.attributes.id;
|
|
39
|
-
});
|
|
40
|
-
(0, _defineProperty2.default)(this, "setId", function (value) {
|
|
41
|
-
_this.attributes.id = value;
|
|
42
|
-
});
|
|
43
|
-
// string # Status of the Export
|
|
44
|
-
(0, _defineProperty2.default)(this, "getExportStatus", function () {
|
|
45
|
-
return _this.attributes.export_status;
|
|
46
|
-
});
|
|
47
|
-
(0, _defineProperty2.default)(this, "setExportStatus", function (value) {
|
|
48
|
-
_this.attributes.export_status = value;
|
|
49
|
-
});
|
|
50
|
-
// string # Type of data being exported
|
|
51
|
-
(0, _defineProperty2.default)(this, "getExportType", function () {
|
|
52
|
-
return _this.attributes.export_type;
|
|
53
|
-
});
|
|
54
|
-
(0, _defineProperty2.default)(this, "setExportType", function (value) {
|
|
55
|
-
_this.attributes.export_type = value;
|
|
56
|
-
});
|
|
57
|
-
// int64 # Number of rows exported
|
|
58
|
-
(0, _defineProperty2.default)(this, "getExportRows", function () {
|
|
59
|
-
return _this.attributes.export_rows;
|
|
60
|
-
});
|
|
61
|
-
(0, _defineProperty2.default)(this, "setExportRows", function (value) {
|
|
62
|
-
_this.attributes.export_rows = value;
|
|
63
|
-
});
|
|
64
|
-
// string # Link to download Export file.
|
|
65
|
-
(0, _defineProperty2.default)(this, "getDownloadUri", function () {
|
|
66
|
-
return _this.attributes.download_uri;
|
|
67
|
-
});
|
|
68
|
-
(0, _defineProperty2.default)(this, "setDownloadUri", function (value) {
|
|
69
|
-
_this.attributes.download_uri = value;
|
|
70
|
-
});
|
|
71
|
-
// string # Export message
|
|
72
|
-
(0, _defineProperty2.default)(this, "getMessage", function () {
|
|
73
|
-
return _this.attributes.message;
|
|
74
|
-
});
|
|
75
|
-
(0, _defineProperty2.default)(this, "setMessage", function (value) {
|
|
76
|
-
_this.attributes.message = value;
|
|
77
|
-
});
|
|
78
|
-
// int64 # User ID. Provide a value of `0` to operate the current session's user.
|
|
79
|
-
(0, _defineProperty2.default)(this, "getUserId", function () {
|
|
80
|
-
return _this.attributes.user_id;
|
|
81
|
-
});
|
|
82
|
-
(0, _defineProperty2.default)(this, "setUserId", function (value) {
|
|
83
|
-
_this.attributes.user_id = value;
|
|
84
|
-
});
|
|
85
|
-
// object # If set, sort records by the specified field in either `asc` or `desc` direction. Valid fields are `export_status` and `export_type`.
|
|
86
|
-
(0, _defineProperty2.default)(this, "getSortBy", function () {
|
|
87
|
-
return _this.attributes.sort_by;
|
|
88
|
-
});
|
|
89
|
-
(0, _defineProperty2.default)(this, "setSortBy", function (value) {
|
|
90
|
-
_this.attributes.sort_by = value;
|
|
91
|
-
});
|
|
92
|
-
// object # If set, return records where the specified field is equal to the supplied value. Valid fields are `export_status` and `export_type`.
|
|
93
|
-
(0, _defineProperty2.default)(this, "getFilter", function () {
|
|
94
|
-
return _this.attributes.filter;
|
|
95
|
-
});
|
|
96
|
-
(0, _defineProperty2.default)(this, "setFilter", function (value) {
|
|
97
|
-
_this.attributes.filter = value;
|
|
98
|
-
});
|
|
99
|
-
// object # If set, return records where the specified field is prefixed by the supplied value. Valid fields are `export_type`.
|
|
100
|
-
(0, _defineProperty2.default)(this, "getFilterPrefix", function () {
|
|
101
|
-
return _this.attributes.filter_prefix;
|
|
102
|
-
});
|
|
103
|
-
(0, _defineProperty2.default)(this, "setFilterPrefix", function (value) {
|
|
104
|
-
_this.attributes.filter_prefix = value;
|
|
105
|
-
});
|
|
106
|
-
(0, _defineProperty2.default)(this, "save", /*#__PURE__*/(0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee() {
|
|
107
|
-
var newObject;
|
|
108
|
-
return _regenerator.default.wrap(function _callee$(_context) {
|
|
109
|
-
while (1) switch (_context.prev = _context.next) {
|
|
110
|
-
case 0:
|
|
111
|
-
if (!_this.attributes.id) {
|
|
112
|
-
_context.next = 4;
|
|
113
|
-
break;
|
|
114
|
-
}
|
|
115
|
-
throw new errors.NotImplementedError('The Export object doesn\'t support updates.');
|
|
116
|
-
case 4:
|
|
117
|
-
_context.next = 6;
|
|
118
|
-
return Export.create(_this.attributes, _this.options);
|
|
119
|
-
case 6:
|
|
120
|
-
newObject = _context.sent;
|
|
121
|
-
_this.attributes = _objectSpread({}, newObject.attributes);
|
|
122
|
-
return _context.abrupt("return", true);
|
|
123
|
-
case 9:
|
|
124
|
-
case "end":
|
|
125
|
-
return _context.stop();
|
|
126
|
-
}
|
|
127
|
-
}, _callee);
|
|
128
|
-
})));
|
|
129
|
-
Object.entries(attributes).forEach(function (_ref2) {
|
|
130
|
-
var _ref3 = (0, _slicedToArray2.default)(_ref2, 2),
|
|
131
|
-
key = _ref3[0],
|
|
132
|
-
value = _ref3[1];
|
|
133
|
-
var normalizedKey = key.replace('?', '');
|
|
134
|
-
_this.attributes[normalizedKey] = value;
|
|
135
|
-
Object.defineProperty(_this, normalizedKey, {
|
|
136
|
-
value: value,
|
|
137
|
-
writable: false
|
|
138
|
-
});
|
|
139
|
-
});
|
|
140
|
-
this.options = _objectSpread({}, options);
|
|
141
|
-
});
|
|
142
|
-
_Export = Export;
|
|
143
|
-
// Parameters:
|
|
144
|
-
// user_id - int64 - User ID. Provide a value of `0` to operate the current session's user.
|
|
145
|
-
// 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.
|
|
146
|
-
// per_page - int64 - Number of records to show per page. (Max: 10,000, 1,000 or less is recommended).
|
|
147
|
-
// sort_by - object - If set, sort records by the specified field in either `asc` or `desc` direction. Valid fields are `export_status` and `export_type`.
|
|
148
|
-
// filter - object - If set, return records where the specified field is equal to the supplied value. Valid fields are `export_status` and `export_type`.
|
|
149
|
-
// filter_prefix - object - If set, return records where the specified field is prefixed by the supplied value. Valid fields are `export_type`.
|
|
150
|
-
(0, _defineProperty2.default)(Export, "list", /*#__PURE__*/(0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee2() {
|
|
151
|
-
var _response$data;
|
|
152
|
-
var params,
|
|
153
|
-
options,
|
|
154
|
-
response,
|
|
155
|
-
_args2 = arguments;
|
|
156
|
-
return _regenerator.default.wrap(function _callee2$(_context2) {
|
|
157
|
-
while (1) switch (_context2.prev = _context2.next) {
|
|
158
|
-
case 0:
|
|
159
|
-
params = _args2.length > 0 && _args2[0] !== undefined ? _args2[0] : {};
|
|
160
|
-
options = _args2.length > 1 && _args2[1] !== undefined ? _args2[1] : {};
|
|
161
|
-
if (!(params.user_id && !(0, _utils.isInt)(params.user_id))) {
|
|
162
|
-
_context2.next = 4;
|
|
163
|
-
break;
|
|
164
|
-
}
|
|
165
|
-
throw new errors.InvalidParameterError("Bad parameter: user_id must be of type Int, received ".concat((0, _utils.getType)(params.user_id)));
|
|
166
|
-
case 4:
|
|
167
|
-
if (!(params.cursor && !(0, _utils.isString)(params.cursor))) {
|
|
168
|
-
_context2.next = 6;
|
|
169
|
-
break;
|
|
170
|
-
}
|
|
171
|
-
throw new errors.InvalidParameterError("Bad parameter: cursor must be of type String, received ".concat((0, _utils.getType)(params.cursor)));
|
|
172
|
-
case 6:
|
|
173
|
-
if (!(params.per_page && !(0, _utils.isInt)(params.per_page))) {
|
|
174
|
-
_context2.next = 8;
|
|
175
|
-
break;
|
|
176
|
-
}
|
|
177
|
-
throw new errors.InvalidParameterError("Bad parameter: per_page must be of type Int, received ".concat((0, _utils.getType)(params.per_page)));
|
|
178
|
-
case 8:
|
|
179
|
-
_context2.next = 10;
|
|
180
|
-
return _Api.default.sendRequest('/exports', 'GET', params, options);
|
|
181
|
-
case 10:
|
|
182
|
-
response = _context2.sent;
|
|
183
|
-
return _context2.abrupt("return", (response === null || response === void 0 || (_response$data = response.data) === null || _response$data === void 0 ? void 0 : _response$data.map(function (obj) {
|
|
184
|
-
return new _Export(obj, options);
|
|
185
|
-
})) || []);
|
|
186
|
-
case 12:
|
|
187
|
-
case "end":
|
|
188
|
-
return _context2.stop();
|
|
189
|
-
}
|
|
190
|
-
}, _callee2);
|
|
191
|
-
})));
|
|
192
|
-
(0, _defineProperty2.default)(Export, "all", function () {
|
|
193
|
-
var params = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
|
194
|
-
var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
|
|
195
|
-
return _Export.list(params, options);
|
|
196
|
-
});
|
|
197
|
-
// Parameters:
|
|
198
|
-
// id (required) - int64 - Export ID.
|
|
199
|
-
(0, _defineProperty2.default)(Export, "find", /*#__PURE__*/function () {
|
|
200
|
-
var _ref5 = (0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee3(id) {
|
|
201
|
-
var params,
|
|
202
|
-
options,
|
|
203
|
-
response,
|
|
204
|
-
_args3 = arguments;
|
|
205
|
-
return _regenerator.default.wrap(function _callee3$(_context3) {
|
|
206
|
-
while (1) switch (_context3.prev = _context3.next) {
|
|
207
|
-
case 0:
|
|
208
|
-
params = _args3.length > 1 && _args3[1] !== undefined ? _args3[1] : {};
|
|
209
|
-
options = _args3.length > 2 && _args3[2] !== undefined ? _args3[2] : {};
|
|
210
|
-
if ((0, _utils.isObject)(params)) {
|
|
211
|
-
_context3.next = 4;
|
|
212
|
-
break;
|
|
213
|
-
}
|
|
214
|
-
throw new errors.InvalidParameterError("Bad parameter: params must be of type object, received ".concat((0, _utils.getType)(params)));
|
|
215
|
-
case 4:
|
|
216
|
-
params.id = id;
|
|
217
|
-
if (params.id) {
|
|
218
|
-
_context3.next = 7;
|
|
219
|
-
break;
|
|
220
|
-
}
|
|
221
|
-
throw new errors.MissingParameterError('Parameter missing: id');
|
|
222
|
-
case 7:
|
|
223
|
-
if (!(params.id && !(0, _utils.isInt)(params.id))) {
|
|
224
|
-
_context3.next = 9;
|
|
225
|
-
break;
|
|
226
|
-
}
|
|
227
|
-
throw new errors.InvalidParameterError("Bad parameter: id must be of type Int, received ".concat((0, _utils.getType)(params.id)));
|
|
228
|
-
case 9:
|
|
229
|
-
_context3.next = 11;
|
|
230
|
-
return _Api.default.sendRequest("/exports/".concat(encodeURIComponent(params.id)), 'GET', params, options);
|
|
231
|
-
case 11:
|
|
232
|
-
response = _context3.sent;
|
|
233
|
-
return _context3.abrupt("return", new _Export(response === null || response === void 0 ? void 0 : response.data, options));
|
|
234
|
-
case 13:
|
|
235
|
-
case "end":
|
|
236
|
-
return _context3.stop();
|
|
237
|
-
}
|
|
238
|
-
}, _callee3);
|
|
239
|
-
}));
|
|
240
|
-
return function (_x) {
|
|
241
|
-
return _ref5.apply(this, arguments);
|
|
242
|
-
};
|
|
243
|
-
}());
|
|
244
|
-
(0, _defineProperty2.default)(Export, "get", function (id) {
|
|
245
|
-
var params = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
|
|
246
|
-
var options = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
|
|
247
|
-
return _Export.find(id, params, options);
|
|
248
|
-
});
|
|
249
|
-
// Parameters:
|
|
250
|
-
// user_id - int64 - User ID. Provide a value of `0` to operate the current session's user.
|
|
251
|
-
// sort_by - object - If set, sort records by the specified field in either `asc` or `desc` direction. Valid fields are `export_status` and `export_type`.
|
|
252
|
-
// filter - object - If set, return records where the specified field is equal to the supplied value. Valid fields are `export_status` and `export_type`.
|
|
253
|
-
// filter_prefix - object - If set, return records where the specified field is prefixed by the supplied value. Valid fields are `export_type`.
|
|
254
|
-
(0, _defineProperty2.default)(Export, "create", /*#__PURE__*/(0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee4() {
|
|
255
|
-
var params,
|
|
256
|
-
options,
|
|
257
|
-
response,
|
|
258
|
-
_args4 = arguments;
|
|
259
|
-
return _regenerator.default.wrap(function _callee4$(_context4) {
|
|
260
|
-
while (1) switch (_context4.prev = _context4.next) {
|
|
261
|
-
case 0:
|
|
262
|
-
params = _args4.length > 0 && _args4[0] !== undefined ? _args4[0] : {};
|
|
263
|
-
options = _args4.length > 1 && _args4[1] !== undefined ? _args4[1] : {};
|
|
264
|
-
if (!(params.user_id && !(0, _utils.isInt)(params.user_id))) {
|
|
265
|
-
_context4.next = 4;
|
|
266
|
-
break;
|
|
267
|
-
}
|
|
268
|
-
throw new errors.InvalidParameterError("Bad parameter: user_id must be of type Int, received ".concat((0, _utils.getType)(params.user_id)));
|
|
269
|
-
case 4:
|
|
270
|
-
_context4.next = 6;
|
|
271
|
-
return _Api.default.sendRequest('/exports/create_export', 'POST', params, options);
|
|
272
|
-
case 6:
|
|
273
|
-
response = _context4.sent;
|
|
274
|
-
return _context4.abrupt("return", new _Export(response === null || response === void 0 ? void 0 : response.data, options));
|
|
275
|
-
case 8:
|
|
276
|
-
case "end":
|
|
277
|
-
return _context4.stop();
|
|
278
|
-
}
|
|
279
|
-
}, _callee4);
|
|
280
|
-
})));
|
|
281
|
-
var _default = exports.default = Export;
|
|
282
|
-
module.exports = Export;
|
|
283
|
-
module.exports.default = Export;
|
package/src/models/Export.js
DELETED
|
@@ -1,183 +0,0 @@
|
|
|
1
|
-
/* eslint-disable no-unused-vars */
|
|
2
|
-
import Api from '../Api'
|
|
3
|
-
import * as errors from '../Errors'
|
|
4
|
-
import {
|
|
5
|
-
getType, isArray, isInt, isObject, isString,
|
|
6
|
-
} from '../utils'
|
|
7
|
-
/* eslint-enable no-unused-vars */
|
|
8
|
-
|
|
9
|
-
/**
|
|
10
|
-
* Class Export
|
|
11
|
-
*/
|
|
12
|
-
class Export {
|
|
13
|
-
attributes = {}
|
|
14
|
-
|
|
15
|
-
options = {}
|
|
16
|
-
|
|
17
|
-
constructor(attributes = {}, options = {}) {
|
|
18
|
-
Object.entries(attributes).forEach(([key, value]) => {
|
|
19
|
-
const normalizedKey = key.replace('?', '')
|
|
20
|
-
|
|
21
|
-
this.attributes[normalizedKey] = value
|
|
22
|
-
|
|
23
|
-
Object.defineProperty(this, normalizedKey, { value, writable: false })
|
|
24
|
-
})
|
|
25
|
-
|
|
26
|
-
this.options = { ...options }
|
|
27
|
-
}
|
|
28
|
-
|
|
29
|
-
isLoaded = () => !!this.attributes.id
|
|
30
|
-
|
|
31
|
-
// int64 # ID for this Export
|
|
32
|
-
getId = () => this.attributes.id
|
|
33
|
-
|
|
34
|
-
setId = value => {
|
|
35
|
-
this.attributes.id = value
|
|
36
|
-
}
|
|
37
|
-
|
|
38
|
-
// string # Status of the Export
|
|
39
|
-
getExportStatus = () => this.attributes.export_status
|
|
40
|
-
|
|
41
|
-
setExportStatus = value => {
|
|
42
|
-
this.attributes.export_status = value
|
|
43
|
-
}
|
|
44
|
-
|
|
45
|
-
// string # Type of data being exported
|
|
46
|
-
getExportType = () => this.attributes.export_type
|
|
47
|
-
|
|
48
|
-
setExportType = value => {
|
|
49
|
-
this.attributes.export_type = value
|
|
50
|
-
}
|
|
51
|
-
|
|
52
|
-
// int64 # Number of rows exported
|
|
53
|
-
getExportRows = () => this.attributes.export_rows
|
|
54
|
-
|
|
55
|
-
setExportRows = value => {
|
|
56
|
-
this.attributes.export_rows = value
|
|
57
|
-
}
|
|
58
|
-
|
|
59
|
-
// string # Link to download Export file.
|
|
60
|
-
getDownloadUri = () => this.attributes.download_uri
|
|
61
|
-
|
|
62
|
-
setDownloadUri = value => {
|
|
63
|
-
this.attributes.download_uri = value
|
|
64
|
-
}
|
|
65
|
-
|
|
66
|
-
// string # Export message
|
|
67
|
-
getMessage = () => this.attributes.message
|
|
68
|
-
|
|
69
|
-
setMessage = value => {
|
|
70
|
-
this.attributes.message = value
|
|
71
|
-
}
|
|
72
|
-
|
|
73
|
-
// int64 # User ID. Provide a value of `0` to operate the current session's user.
|
|
74
|
-
getUserId = () => this.attributes.user_id
|
|
75
|
-
|
|
76
|
-
setUserId = value => {
|
|
77
|
-
this.attributes.user_id = value
|
|
78
|
-
}
|
|
79
|
-
|
|
80
|
-
// object # If set, sort records by the specified field in either `asc` or `desc` direction. Valid fields are `export_status` and `export_type`.
|
|
81
|
-
getSortBy = () => this.attributes.sort_by
|
|
82
|
-
|
|
83
|
-
setSortBy = value => {
|
|
84
|
-
this.attributes.sort_by = value
|
|
85
|
-
}
|
|
86
|
-
|
|
87
|
-
// object # If set, return records where the specified field is equal to the supplied value. Valid fields are `export_status` and `export_type`.
|
|
88
|
-
getFilter = () => this.attributes.filter
|
|
89
|
-
|
|
90
|
-
setFilter = value => {
|
|
91
|
-
this.attributes.filter = value
|
|
92
|
-
}
|
|
93
|
-
|
|
94
|
-
// object # If set, return records where the specified field is prefixed by the supplied value. Valid fields are `export_type`.
|
|
95
|
-
getFilterPrefix = () => this.attributes.filter_prefix
|
|
96
|
-
|
|
97
|
-
setFilterPrefix = value => {
|
|
98
|
-
this.attributes.filter_prefix = value
|
|
99
|
-
}
|
|
100
|
-
|
|
101
|
-
save = async () => {
|
|
102
|
-
if (this.attributes.id) {
|
|
103
|
-
throw new errors.NotImplementedError('The Export object doesn\'t support updates.')
|
|
104
|
-
} else {
|
|
105
|
-
const newObject = await Export.create(this.attributes, this.options)
|
|
106
|
-
this.attributes = { ...newObject.attributes }
|
|
107
|
-
return true
|
|
108
|
-
}
|
|
109
|
-
}
|
|
110
|
-
|
|
111
|
-
// Parameters:
|
|
112
|
-
// user_id - int64 - User ID. Provide a value of `0` to operate the current session's user.
|
|
113
|
-
// 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.
|
|
114
|
-
// per_page - int64 - Number of records to show per page. (Max: 10,000, 1,000 or less is recommended).
|
|
115
|
-
// sort_by - object - If set, sort records by the specified field in either `asc` or `desc` direction. Valid fields are `export_status` and `export_type`.
|
|
116
|
-
// filter - object - If set, return records where the specified field is equal to the supplied value. Valid fields are `export_status` and `export_type`.
|
|
117
|
-
// filter_prefix - object - If set, return records where the specified field is prefixed by the supplied value. Valid fields are `export_type`.
|
|
118
|
-
static list = async (params = {}, options = {}) => {
|
|
119
|
-
if (params.user_id && !isInt(params.user_id)) {
|
|
120
|
-
throw new errors.InvalidParameterError(`Bad parameter: user_id must be of type Int, received ${getType(params.user_id)}`)
|
|
121
|
-
}
|
|
122
|
-
|
|
123
|
-
if (params.cursor && !isString(params.cursor)) {
|
|
124
|
-
throw new errors.InvalidParameterError(`Bad parameter: cursor must be of type String, received ${getType(params.cursor)}`)
|
|
125
|
-
}
|
|
126
|
-
|
|
127
|
-
if (params.per_page && !isInt(params.per_page)) {
|
|
128
|
-
throw new errors.InvalidParameterError(`Bad parameter: per_page must be of type Int, received ${getType(params.per_page)}`)
|
|
129
|
-
}
|
|
130
|
-
|
|
131
|
-
const response = await Api.sendRequest('/exports', 'GET', params, options)
|
|
132
|
-
|
|
133
|
-
return response?.data?.map(obj => new Export(obj, options)) || []
|
|
134
|
-
}
|
|
135
|
-
|
|
136
|
-
static all = (params = {}, options = {}) =>
|
|
137
|
-
Export.list(params, options)
|
|
138
|
-
|
|
139
|
-
// Parameters:
|
|
140
|
-
// id (required) - int64 - Export ID.
|
|
141
|
-
static find = async (id, params = {}, options = {}) => {
|
|
142
|
-
if (!isObject(params)) {
|
|
143
|
-
throw new errors.InvalidParameterError(`Bad parameter: params must be of type object, received ${getType(params)}`)
|
|
144
|
-
}
|
|
145
|
-
|
|
146
|
-
params.id = id
|
|
147
|
-
|
|
148
|
-
if (!params.id) {
|
|
149
|
-
throw new errors.MissingParameterError('Parameter missing: id')
|
|
150
|
-
}
|
|
151
|
-
|
|
152
|
-
if (params.id && !isInt(params.id)) {
|
|
153
|
-
throw new errors.InvalidParameterError(`Bad parameter: id must be of type Int, received ${getType(params.id)}`)
|
|
154
|
-
}
|
|
155
|
-
|
|
156
|
-
const response = await Api.sendRequest(`/exports/${encodeURIComponent(params.id)}`, 'GET', params, options)
|
|
157
|
-
|
|
158
|
-
return new Export(response?.data, options)
|
|
159
|
-
}
|
|
160
|
-
|
|
161
|
-
static get = (id, params = {}, options = {}) =>
|
|
162
|
-
Export.find(id, params, options)
|
|
163
|
-
|
|
164
|
-
// Parameters:
|
|
165
|
-
// user_id - int64 - User ID. Provide a value of `0` to operate the current session's user.
|
|
166
|
-
// sort_by - object - If set, sort records by the specified field in either `asc` or `desc` direction. Valid fields are `export_status` and `export_type`.
|
|
167
|
-
// filter - object - If set, return records where the specified field is equal to the supplied value. Valid fields are `export_status` and `export_type`.
|
|
168
|
-
// filter_prefix - object - If set, return records where the specified field is prefixed by the supplied value. Valid fields are `export_type`.
|
|
169
|
-
static create = async (params = {}, options = {}) => {
|
|
170
|
-
if (params.user_id && !isInt(params.user_id)) {
|
|
171
|
-
throw new errors.InvalidParameterError(`Bad parameter: user_id must be of type Int, received ${getType(params.user_id)}`)
|
|
172
|
-
}
|
|
173
|
-
|
|
174
|
-
const response = await Api.sendRequest('/exports/create_export', 'POST', params, options)
|
|
175
|
-
|
|
176
|
-
return new Export(response?.data, options)
|
|
177
|
-
}
|
|
178
|
-
}
|
|
179
|
-
|
|
180
|
-
export default Export
|
|
181
|
-
|
|
182
|
-
module.exports = Export
|
|
183
|
-
module.exports.default = Export
|