files.com 1.2.555 → 1.2.557
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/_VERSION +1 -1
- package/docs/models/AutomationRun.md +1 -1
- package/docs/models/PartnerSite.md +16 -1
- package/docs/models/PartnerSiteRequest.md +2 -0
- package/lib/Files.js +1 -1
- package/lib/models/AutomationRun.js +1 -1
- package/lib/models/PartnerSite.js +48 -14
- package/lib/models/PartnerSiteRequest.js +7 -0
- package/package.json +1 -1
- package/src/Files.js +1 -1
- package/src/models/AutomationRun.js +1 -1
- package/src/models/PartnerSite.js +15 -0
- package/src/models/PartnerSiteRequest.js +7 -0
package/_VERSION
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
1.2.
|
|
1
|
+
1.2.557
|
|
@@ -54,7 +54,7 @@ await AutomationRun.list({
|
|
|
54
54
|
* `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.
|
|
55
55
|
* `per_page` (int64): Number of records to show per page. (Max: 10,000, 1,000 or less is recommended).
|
|
56
56
|
* `sort_by` (object): If set, sort records by the specified field in either `asc` or `desc` direction. Valid fields are `automation_id`, `created_at` or `status`.
|
|
57
|
-
* `filter` (object): If set, return records where the specified field is equal to the supplied value. Valid fields are `status`, `workspace_id` or `automation_id`. Valid field combinations are `[ automation_id, status ]`, `[ workspace_id, automation_id ]` or `[ workspace_id, automation_id, status ]`.
|
|
57
|
+
* `filter` (object): If set, return records where the specified field is equal to the supplied value. Valid fields are `status`, `workspace_id` or `automation_id`. Valid field combinations are `[ workspace_id, status ]`, `[ automation_id, status ]`, `[ workspace_id, automation_id ]` or `[ workspace_id, automation_id, status ]`.
|
|
58
58
|
* `automation_id` (int64): Required - ID of the associated Automation.
|
|
59
59
|
|
|
60
60
|
---
|
|
@@ -6,13 +6,28 @@
|
|
|
6
6
|
{
|
|
7
7
|
"partner_id": 1,
|
|
8
8
|
"partner_name": "Acme Corp",
|
|
9
|
-
"linked_site_id": 1
|
|
9
|
+
"linked_site_id": 1,
|
|
10
|
+
"linked_site_name": "Acme's Partner Site",
|
|
11
|
+
"main_site_id": 2,
|
|
12
|
+
"main_site_name": "Acme Site"
|
|
10
13
|
}
|
|
11
14
|
```
|
|
12
15
|
|
|
13
16
|
* `partner_id` (int64): Partner ID
|
|
14
17
|
* `partner_name` (string): Partner Name
|
|
15
18
|
* `linked_site_id` (int64): Linked Site ID
|
|
19
|
+
* `linked_site_name` (string): Linked Site Name
|
|
20
|
+
* `main_site_id` (int64): Main Site ID
|
|
21
|
+
* `main_site_name` (string): Main Site Name
|
|
22
|
+
|
|
23
|
+
---
|
|
24
|
+
|
|
25
|
+
## Get Partner Sites linked to the current Site
|
|
26
|
+
|
|
27
|
+
```
|
|
28
|
+
await PartnerSite.linkeds
|
|
29
|
+
```
|
|
30
|
+
|
|
16
31
|
|
|
17
32
|
---
|
|
18
33
|
|
|
@@ -8,6 +8,7 @@
|
|
|
8
8
|
"partner_id": 1,
|
|
9
9
|
"linked_site_id": 1,
|
|
10
10
|
"status": "pending",
|
|
11
|
+
"main_site_name": "Acme Site",
|
|
11
12
|
"pairing_key": "abc123xyz",
|
|
12
13
|
"created_at": "2000-01-01T01:00:00Z",
|
|
13
14
|
"updated_at": "2000-01-01T01:00:00Z"
|
|
@@ -18,6 +19,7 @@
|
|
|
18
19
|
* `partner_id` (int64): Partner ID
|
|
19
20
|
* `linked_site_id` (int64): Linked Site ID
|
|
20
21
|
* `status` (string): Request status (pending, approved, rejected)
|
|
22
|
+
* `main_site_name` (string): Main Site Name
|
|
21
23
|
* `pairing_key` (string): Pairing key used to approve this request on the target site
|
|
22
24
|
* `created_at` (date-time): Request creation date/time
|
|
23
25
|
* `updated_at` (date-time): Request last updated date/time
|
package/lib/Files.js
CHANGED
|
@@ -12,7 +12,7 @@ var apiKey;
|
|
|
12
12
|
var baseUrl = 'https://app.files.com';
|
|
13
13
|
var sessionId = null;
|
|
14
14
|
var language = null;
|
|
15
|
-
var version = '1.2.
|
|
15
|
+
var version = '1.2.557';
|
|
16
16
|
var userAgent = "Files.com JavaScript SDK v".concat(version);
|
|
17
17
|
var logLevel = _Logger.LogLevel.INFO;
|
|
18
18
|
var debugRequest = false;
|
|
@@ -107,7 +107,7 @@ _AutomationRun = AutomationRun;
|
|
|
107
107
|
// 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.
|
|
108
108
|
// per_page - int64 - Number of records to show per page. (Max: 10,000, 1,000 or less is recommended).
|
|
109
109
|
// sort_by - object - If set, sort records by the specified field in either `asc` or `desc` direction. Valid fields are `automation_id`, `created_at` or `status`.
|
|
110
|
-
// filter - object - If set, return records where the specified field is equal to the supplied value. Valid fields are `status`, `workspace_id` or `automation_id`. Valid field combinations are `[ automation_id, status ]`, `[ workspace_id, automation_id ]` or `[ workspace_id, automation_id, status ]`.
|
|
110
|
+
// filter - object - If set, return records where the specified field is equal to the supplied value. Valid fields are `status`, `workspace_id` or `automation_id`. Valid field combinations are `[ workspace_id, status ]`, `[ automation_id, status ]`, `[ workspace_id, automation_id ]` or `[ workspace_id, automation_id, status ]`.
|
|
111
111
|
// automation_id (required) - int64 - ID of the associated Automation.
|
|
112
112
|
(0, _defineProperty2.default)(AutomationRun, "list", /*#__PURE__*/(0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee() {
|
|
113
113
|
var _response$data;
|
|
@@ -44,6 +44,18 @@ var PartnerSite = /*#__PURE__*/(0, _createClass2.default)(function PartnerSite()
|
|
|
44
44
|
(0, _defineProperty2.default)(this, "getLinkedSiteId", function () {
|
|
45
45
|
return _this.attributes.linked_site_id;
|
|
46
46
|
});
|
|
47
|
+
// string # Linked Site Name
|
|
48
|
+
(0, _defineProperty2.default)(this, "getLinkedSiteName", function () {
|
|
49
|
+
return _this.attributes.linked_site_name;
|
|
50
|
+
});
|
|
51
|
+
// int64 # Main Site ID
|
|
52
|
+
(0, _defineProperty2.default)(this, "getMainSiteId", function () {
|
|
53
|
+
return _this.attributes.main_site_id;
|
|
54
|
+
});
|
|
55
|
+
// string # Main Site Name
|
|
56
|
+
(0, _defineProperty2.default)(this, "getMainSiteName", function () {
|
|
57
|
+
return _this.attributes.main_site_name;
|
|
58
|
+
});
|
|
47
59
|
Object.entries(attributes).forEach(function (_ref) {
|
|
48
60
|
var _ref2 = (0, _slicedToArray2.default)(_ref, 2),
|
|
49
61
|
key = _ref2[0],
|
|
@@ -58,44 +70,66 @@ var PartnerSite = /*#__PURE__*/(0, _createClass2.default)(function PartnerSite()
|
|
|
58
70
|
this.options = _objectSpread({}, options);
|
|
59
71
|
});
|
|
60
72
|
_PartnerSite = PartnerSite;
|
|
73
|
+
(0, _defineProperty2.default)(PartnerSite, "linkeds", /*#__PURE__*/(0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee() {
|
|
74
|
+
var _response$data;
|
|
75
|
+
var options,
|
|
76
|
+
response,
|
|
77
|
+
_args = arguments;
|
|
78
|
+
return _regenerator.default.wrap(function (_context) {
|
|
79
|
+
while (1) switch (_context.prev = _context.next) {
|
|
80
|
+
case 0:
|
|
81
|
+
options = _args.length > 0 && _args[0] !== undefined ? _args[0] : {};
|
|
82
|
+
_context.next = 1;
|
|
83
|
+
return _Api.default.sendRequest('/partner_sites/linked_partner_sites', 'GET', {}, options);
|
|
84
|
+
case 1:
|
|
85
|
+
response = _context.sent;
|
|
86
|
+
return _context.abrupt("return", (response === null || response === void 0 || (_response$data = response.data) === null || _response$data === void 0 ? void 0 : _response$data.map(function (obj) {
|
|
87
|
+
return new _PartnerSite(obj, options);
|
|
88
|
+
})) || []);
|
|
89
|
+
case 2:
|
|
90
|
+
case "end":
|
|
91
|
+
return _context.stop();
|
|
92
|
+
}
|
|
93
|
+
}, _callee);
|
|
94
|
+
})));
|
|
61
95
|
// Parameters:
|
|
62
96
|
// 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.
|
|
63
97
|
// per_page - int64 - Number of records to show per page. (Max: 10,000, 1,000 or less is recommended).
|
|
64
|
-
(0, _defineProperty2.default)(PartnerSite, "list", /*#__PURE__*/(0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function
|
|
65
|
-
var _response$
|
|
98
|
+
(0, _defineProperty2.default)(PartnerSite, "list", /*#__PURE__*/(0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee2() {
|
|
99
|
+
var _response$data2;
|
|
66
100
|
var params,
|
|
67
101
|
options,
|
|
68
102
|
response,
|
|
69
|
-
|
|
70
|
-
return _regenerator.default.wrap(function (
|
|
71
|
-
while (1) switch (
|
|
103
|
+
_args2 = arguments;
|
|
104
|
+
return _regenerator.default.wrap(function (_context2) {
|
|
105
|
+
while (1) switch (_context2.prev = _context2.next) {
|
|
72
106
|
case 0:
|
|
73
|
-
params =
|
|
74
|
-
options =
|
|
107
|
+
params = _args2.length > 0 && _args2[0] !== undefined ? _args2[0] : {};
|
|
108
|
+
options = _args2.length > 1 && _args2[1] !== undefined ? _args2[1] : {};
|
|
75
109
|
if (!(params.cursor && !(0, _utils.isString)(params.cursor))) {
|
|
76
|
-
|
|
110
|
+
_context2.next = 1;
|
|
77
111
|
break;
|
|
78
112
|
}
|
|
79
113
|
throw new errors.InvalidParameterError("Bad parameter: cursor must be of type String, received ".concat((0, _utils.getType)(params.cursor)));
|
|
80
114
|
case 1:
|
|
81
115
|
if (!(params.per_page && !(0, _utils.isInt)(params.per_page))) {
|
|
82
|
-
|
|
116
|
+
_context2.next = 2;
|
|
83
117
|
break;
|
|
84
118
|
}
|
|
85
119
|
throw new errors.InvalidParameterError("Bad parameter: per_page must be of type Int, received ".concat((0, _utils.getType)(params.per_page)));
|
|
86
120
|
case 2:
|
|
87
|
-
|
|
121
|
+
_context2.next = 3;
|
|
88
122
|
return _Api.default.sendRequest('/partner_sites', 'GET', params, options);
|
|
89
123
|
case 3:
|
|
90
|
-
response =
|
|
91
|
-
return
|
|
124
|
+
response = _context2.sent;
|
|
125
|
+
return _context2.abrupt("return", (response === null || response === void 0 || (_response$data2 = response.data) === null || _response$data2 === void 0 ? void 0 : _response$data2.map(function (obj) {
|
|
92
126
|
return new _PartnerSite(obj, options);
|
|
93
127
|
})) || []);
|
|
94
128
|
case 4:
|
|
95
129
|
case "end":
|
|
96
|
-
return
|
|
130
|
+
return _context2.stop();
|
|
97
131
|
}
|
|
98
|
-
},
|
|
132
|
+
}, _callee2);
|
|
99
133
|
})));
|
|
100
134
|
(0, _defineProperty2.default)(PartnerSite, "all", function () {
|
|
101
135
|
var params = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
|
@@ -60,6 +60,13 @@ var PartnerSiteRequest = /*#__PURE__*/(0, _createClass2.default)(function Partne
|
|
|
60
60
|
(0, _defineProperty2.default)(this, "setStatus", function (value) {
|
|
61
61
|
_this.attributes.status = value;
|
|
62
62
|
});
|
|
63
|
+
// string # Main Site Name
|
|
64
|
+
(0, _defineProperty2.default)(this, "getMainSiteName", function () {
|
|
65
|
+
return _this.attributes.main_site_name;
|
|
66
|
+
});
|
|
67
|
+
(0, _defineProperty2.default)(this, "setMainSiteName", function (value) {
|
|
68
|
+
_this.attributes.main_site_name = value;
|
|
69
|
+
});
|
|
63
70
|
// string # Pairing key used to approve this request on the target site
|
|
64
71
|
(0, _defineProperty2.default)(this, "getPairingKey", function () {
|
|
65
72
|
return _this.attributes.pairing_key;
|
package/package.json
CHANGED
package/src/Files.js
CHANGED
|
@@ -75,7 +75,7 @@ class AutomationRun {
|
|
|
75
75
|
// 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.
|
|
76
76
|
// per_page - int64 - Number of records to show per page. (Max: 10,000, 1,000 or less is recommended).
|
|
77
77
|
// sort_by - object - If set, sort records by the specified field in either `asc` or `desc` direction. Valid fields are `automation_id`, `created_at` or `status`.
|
|
78
|
-
// filter - object - If set, return records where the specified field is equal to the supplied value. Valid fields are `status`, `workspace_id` or `automation_id`. Valid field combinations are `[ automation_id, status ]`, `[ workspace_id, automation_id ]` or `[ workspace_id, automation_id, status ]`.
|
|
78
|
+
// filter - object - If set, return records where the specified field is equal to the supplied value. Valid fields are `status`, `workspace_id` or `automation_id`. Valid field combinations are `[ workspace_id, status ]`, `[ automation_id, status ]`, `[ workspace_id, automation_id ]` or `[ workspace_id, automation_id, status ]`.
|
|
79
79
|
// automation_id (required) - int64 - ID of the associated Automation.
|
|
80
80
|
static list = async (params = {}, options = {}) => {
|
|
81
81
|
if (!params.automation_id) {
|
|
@@ -37,6 +37,21 @@ class PartnerSite {
|
|
|
37
37
|
// int64 # Linked Site ID
|
|
38
38
|
getLinkedSiteId = () => this.attributes.linked_site_id
|
|
39
39
|
|
|
40
|
+
// string # Linked Site Name
|
|
41
|
+
getLinkedSiteName = () => this.attributes.linked_site_name
|
|
42
|
+
|
|
43
|
+
// int64 # Main Site ID
|
|
44
|
+
getMainSiteId = () => this.attributes.main_site_id
|
|
45
|
+
|
|
46
|
+
// string # Main Site Name
|
|
47
|
+
getMainSiteName = () => this.attributes.main_site_name
|
|
48
|
+
|
|
49
|
+
static linkeds = async (options = {}) => {
|
|
50
|
+
const response = await Api.sendRequest('/partner_sites/linked_partner_sites', 'GET', {}, options)
|
|
51
|
+
|
|
52
|
+
return response?.data?.map(obj => new PartnerSite(obj, options)) || []
|
|
53
|
+
}
|
|
54
|
+
|
|
40
55
|
// Parameters:
|
|
41
56
|
// 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
57
|
// per_page - int64 - Number of records to show per page. (Max: 10,000, 1,000 or less is recommended).
|
|
@@ -56,6 +56,13 @@ class PartnerSiteRequest {
|
|
|
56
56
|
this.attributes.status = value
|
|
57
57
|
}
|
|
58
58
|
|
|
59
|
+
// string # Main Site Name
|
|
60
|
+
getMainSiteName = () => this.attributes.main_site_name
|
|
61
|
+
|
|
62
|
+
setMainSiteName = value => {
|
|
63
|
+
this.attributes.main_site_name = value
|
|
64
|
+
}
|
|
65
|
+
|
|
59
66
|
// string # Pairing key used to approve this request on the target site
|
|
60
67
|
getPairingKey = () => this.attributes.pairing_key
|
|
61
68
|
|