Skip to content

Commit ef51139

Browse files
[Bot] push changes from Files.com
1 parent 8060993 commit ef51139

13 files changed

Lines changed: 102 additions & 22 deletions

_VERSION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
1.2.556
1+
1.2.557

docs/models/Bundle.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -154,7 +154,7 @@ await Bundle.list({
154154
* `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.
155155
* `per_page` (int64): Number of records to show per page. (Max: 10,000, 1,000 or less is recommended).
156156
* `sort_by` (object): If set, sort records by the specified field in either `asc` or `desc` direction. Valid fields are `expires_at`.
157-
* `filter` (object): If set, return records where the specified field is equal to the supplied value. Valid fields are `created_at`, `expires_at`, `code` or `user_id`. Valid field combinations are `[ user_id, expires_at ]`.
157+
* `filter` (object): If set, return records where the specified field is equal to the supplied value. Valid fields are `created_at`, `expires_at`, `code` or `user_id`. Valid field combinations are `[ user_id, created_at ]` and `[ user_id, expires_at ]`.
158158
* `filter_gt` (object): If set, return records where the specified field is greater than the supplied value. Valid fields are `created_at` and `expires_at`.
159159
* `filter_gteq` (object): If set, return records where the specified field is greater than or equal the supplied value. Valid fields are `created_at` and `expires_at`.
160160
* `filter_prefix` (object): If set, return records where the specified field is prefixed by the supplied value. Valid fields are `code`.

docs/models/PartnerSite.md

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,13 +6,28 @@
66
{
77
"partner_id": 1,
88
"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"
1013
}
1114
```
1215

1316
* `partner_id` (int64): Partner ID
1417
* `partner_name` (string): Partner Name
1518
* `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+
1631

1732
---
1833

docs/models/PartnerSiteRequest.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
"partner_id": 1,
99
"linked_site_id": 1,
1010
"status": "pending",
11+
"main_site_name": "Acme Site",
1112
"pairing_key": "abc123xyz",
1213
"created_at": "2000-01-01T01:00:00Z",
1314
"updated_at": "2000-01-01T01:00:00Z"
@@ -18,6 +19,7 @@
1819
* `partner_id` (int64): Partner ID
1920
* `linked_site_id` (int64): Linked Site ID
2021
* `status` (string): Request status (pending, approved, rejected)
22+
* `main_site_name` (string): Main Site Name
2123
* `pairing_key` (string): Pairing key used to approve this request on the target site
2224
* `created_at` (date-time): Request creation date/time
2325
* `updated_at` (date-time): Request last updated date/time

lib/Files.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ var apiKey;
1212
var baseUrl = 'https://app.files.com';
1313
var sessionId = null;
1414
var language = null;
15-
var version = '1.2.556';
15+
var version = '1.2.557';
1616
var userAgent = "Files.com JavaScript SDK v".concat(version);
1717
var logLevel = _Logger.LogLevel.INFO;
1818
var debugRequest = false;

lib/models/Bundle.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -699,7 +699,7 @@ _Bundle = Bundle;
699699
// 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.
700700
// per_page - int64 - Number of records to show per page. (Max: 10,000, 1,000 or less is recommended).
701701
// sort_by - object - If set, sort records by the specified field in either `asc` or `desc` direction. Valid fields are `expires_at`.
702-
// filter - object - If set, return records where the specified field is equal to the supplied value. Valid fields are `created_at`, `expires_at`, `code` or `user_id`. Valid field combinations are `[ user_id, expires_at ]`.
702+
// filter - object - If set, return records where the specified field is equal to the supplied value. Valid fields are `created_at`, `expires_at`, `code` or `user_id`. Valid field combinations are `[ user_id, created_at ]` and `[ user_id, expires_at ]`.
703703
// filter_gt - object - If set, return records where the specified field is greater than the supplied value. Valid fields are `created_at` and `expires_at`.
704704
// filter_gteq - object - If set, return records where the specified field is greater than or equal the supplied value. Valid fields are `created_at` and `expires_at`.
705705
// filter_prefix - object - If set, return records where the specified field is prefixed by the supplied value. Valid fields are `code`.

lib/models/PartnerSite.js

Lines changed: 48 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,18 @@ var PartnerSite = /*#__PURE__*/(0, _createClass2.default)(function PartnerSite()
4444
(0, _defineProperty2.default)(this, "getLinkedSiteId", function () {
4545
return _this.attributes.linked_site_id;
4646
});
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+
});
4759
Object.entries(attributes).forEach(function (_ref) {
4860
var _ref2 = (0, _slicedToArray2.default)(_ref, 2),
4961
key = _ref2[0],
@@ -58,44 +70,66 @@ var PartnerSite = /*#__PURE__*/(0, _createClass2.default)(function PartnerSite()
5870
this.options = _objectSpread({}, options);
5971
});
6072
_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+
})));
6195
// Parameters:
6296
// 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.
6397
// 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 _callee() {
65-
var _response$data;
98+
(0, _defineProperty2.default)(PartnerSite, "list", /*#__PURE__*/(0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee2() {
99+
var _response$data2;
66100
var params,
67101
options,
68102
response,
69-
_args = arguments;
70-
return _regenerator.default.wrap(function (_context) {
71-
while (1) switch (_context.prev = _context.next) {
103+
_args2 = arguments;
104+
return _regenerator.default.wrap(function (_context2) {
105+
while (1) switch (_context2.prev = _context2.next) {
72106
case 0:
73-
params = _args.length > 0 && _args[0] !== undefined ? _args[0] : {};
74-
options = _args.length > 1 && _args[1] !== undefined ? _args[1] : {};
107+
params = _args2.length > 0 && _args2[0] !== undefined ? _args2[0] : {};
108+
options = _args2.length > 1 && _args2[1] !== undefined ? _args2[1] : {};
75109
if (!(params.cursor && !(0, _utils.isString)(params.cursor))) {
76-
_context.next = 1;
110+
_context2.next = 1;
77111
break;
78112
}
79113
throw new errors.InvalidParameterError("Bad parameter: cursor must be of type String, received ".concat((0, _utils.getType)(params.cursor)));
80114
case 1:
81115
if (!(params.per_page && !(0, _utils.isInt)(params.per_page))) {
82-
_context.next = 2;
116+
_context2.next = 2;
83117
break;
84118
}
85119
throw new errors.InvalidParameterError("Bad parameter: per_page must be of type Int, received ".concat((0, _utils.getType)(params.per_page)));
86120
case 2:
87-
_context.next = 3;
121+
_context2.next = 3;
88122
return _Api.default.sendRequest('/partner_sites', 'GET', params, options);
89123
case 3:
90-
response = _context.sent;
91-
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) {
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) {
92126
return new _PartnerSite(obj, options);
93127
})) || []);
94128
case 4:
95129
case "end":
96-
return _context.stop();
130+
return _context2.stop();
97131
}
98-
}, _callee);
132+
}, _callee2);
99133
})));
100134
(0, _defineProperty2.default)(PartnerSite, "all", function () {
101135
var params = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};

lib/models/PartnerSiteRequest.js

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,13 @@ var PartnerSiteRequest = /*#__PURE__*/(0, _createClass2.default)(function Partne
6060
(0, _defineProperty2.default)(this, "setStatus", function (value) {
6161
_this.attributes.status = value;
6262
});
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+
});
6370
// string # Pairing key used to approve this request on the target site
6471
(0, _defineProperty2.default)(this, "getPairingKey", function () {
6572
return _this.attributes.pairing_key;

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "files.com",
3-
"version": "1.2.556",
3+
"version": "1.2.557",
44
"description": "Files.com SDK for JavaScript",
55
"keywords": [
66
"files.com",

src/Files.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ let apiKey
66
let baseUrl = 'https://app.files.com'
77
let sessionId = null
88
let language = null
9-
const version = '1.2.556'
9+
const version = '1.2.557'
1010
let userAgent = `Files.com JavaScript SDK v${version}`
1111

1212
let logLevel = LogLevel.INFO

0 commit comments

Comments
 (0)