Skip to content

Commit fa92d25

Browse files
[Bot] push changes from Files.com
1 parent eadabf0 commit fa92d25

13 files changed

Lines changed: 331 additions & 467 deletions

_VERSION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
1.2.652
1+
1.2.653

docs/models/EventChannel.md

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
{
77
"id": 1,
88
"name": "example",
9+
"workspace_id": 1,
910
"description": "example",
1011
"enabled": true,
1112
"default_channel": true,
@@ -16,6 +17,7 @@
1617

1718
* `id` (int64): Event Channel ID
1819
* `name` (string): Event Channel name.
20+
* `workspace_id` (int64): Workspace ID. 0 means the default workspace.
1921
* `description` (string): Event Channel description.
2022
* `enabled` (boolean): Whether this Event Channel can dispatch events.
2123
* `default_channel` (boolean): Whether this Event Channel is the default destination for newly published events.
@@ -35,8 +37,8 @@ await EventChannel.list
3537

3638
* `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.
3739
* `per_page` (int64): Number of records to show per page. (Max: 10000, 1,000 or less is recommended).
38-
* `sort_by` (object): If set, sort records by the specified field in either `asc` or `desc` direction. Valid fields are `name`, `enabled` or `default_channel`.
39-
* `filter` (object): If set, return records where the specified field is equal to the supplied value. Valid fields are `enabled` and `default_channel`.
40+
* `sort_by` (object): If set, sort records by the specified field in either `asc` or `desc` direction. Valid fields are `name`, `enabled`, `default_channel` or `workspace_id`.
41+
* `filter` (object): If set, return records where the specified field is equal to the supplied value. Valid fields are `enabled`, `default_channel` or `workspace_id`. Valid field combinations are `[ workspace_id, enabled ]` and `[ workspace_id, default_channel ]`.
4042

4143
---
4244

@@ -58,6 +60,7 @@ await EventChannel.find(id)
5860
```
5961
await EventChannel.create({
6062
'name': "example",
63+
'workspace_id': 1,
6164
'description': "example",
6265
'enabled': true,
6366
'default_channel': true,
@@ -68,6 +71,7 @@ await EventChannel.create({
6871
### Parameters
6972

7073
* `name` (string): Required - Event Channel name.
74+
* `workspace_id` (int64): Workspace ID. 0 means the default workspace.
7175
* `description` (string): Event Channel description.
7276
* `enabled` (boolean): Whether this Event Channel can dispatch events.
7377
* `default_channel` (boolean): Whether this Event Channel is the default destination for newly published events.
@@ -81,6 +85,7 @@ const event_channel = await EventChannel.find(id)
8185
8286
await event_channel.update({
8387
'name': "example",
88+
'workspace_id': 1,
8489
'description': "example",
8590
'enabled': true,
8691
'default_channel': true,
@@ -91,6 +96,7 @@ await event_channel.update({
9196

9297
* `id` (int64): Required - Event Channel ID.
9398
* `name` (string): Event Channel name.
99+
* `workspace_id` (int64): Workspace ID. 0 means the default workspace.
94100
* `description` (string): Event Channel description.
95101
* `enabled` (boolean): Whether this Event Channel can dispatch events.
96102
* `default_channel` (boolean): Whether this Event Channel is the default destination for newly published events.
@@ -101,6 +107,7 @@ await event_channel.update({
101107
{
102108
"id": 1,
103109
"name": "example",
110+
"workspace_id": 1,
104111
"description": "example",
105112
"enabled": true,
106113
"default_channel": true,

docs/models/PartnerSite.md

Lines changed: 6 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -1,50 +1,16 @@
1-
# PartnerSite
2-
3-
## Example PartnerSite Object
4-
5-
```
6-
{
7-
"host_partner_id": 1,
8-
"host_partner_name": "Acme Corp",
9-
"guest_partner_id": 2,
10-
"guest_partner_name": "Example Corp",
11-
"host_site_id": 1,
12-
"host_site_name": "Acme Site",
13-
"guest_site_id": 2,
14-
"guest_site_name": "Example Site",
15-
"workspace_id": 1
16-
}
17-
```
18-
19-
* `host_partner_id` (int64): Host Partner ID
20-
* `host_partner_name` (string): Host Partner Name
21-
* `guest_partner_id` (int64): Guest Partner ID
22-
* `guest_partner_name` (string): Guest Partner Name
23-
* `host_site_id` (int64): Host Site ID
24-
* `host_site_name` (string): Host Site Name
25-
* `guest_site_id` (int64): Guest Site ID
26-
* `guest_site_name` (string): Guest Site Name
27-
* `workspace_id` (int64): Workspace ID for the Host Partner
281

292
---
303

31-
## Get Partner Sites linked to the current Site
4+
## Delete Partner Site
325

336
```
34-
await PartnerSite.linkeds
35-
```
36-
37-
38-
---
39-
40-
## List Partner Sites
7+
const partner_site = new PartnerSite()
8+
partner_site.path = myFilePath
419
10+
await partner_site.delete()
4211
```
43-
await PartnerSite.list
44-
```
45-
4612

4713
### Parameters
4814

49-
* `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.
50-
* `per_page` (int64): Number of records to show per page. (Max: 10000, 1,000 or less is recommended).
15+
* `id` (int64): Required - Partner Site ID.
16+

docs/models/PartnerSiteRequest.md

Lines changed: 16 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
{
77
"id": 1,
88
"host_partner_id": 1,
9-
"guest_site_id": 1,
9+
"guest_site_url": "https://example.files.com",
1010
"status": "pending",
1111
"host_site_name": "Acme Site",
1212
"pairing_key": "abc123xyz",
@@ -17,13 +17,12 @@
1717

1818
* `id` (int64): Partner Site Request ID
1919
* `host_partner_id` (int64): Host Partner ID
20-
* `guest_site_id` (int64): Guest Site ID
20+
* `guest_site_url` (string): Guest Site URL
2121
* `status` (string): Request status (pending, approved, rejected)
2222
* `host_site_name` (string): Host Site Name
2323
* `pairing_key` (string): Pairing key used to approve this request on the Guest Site
2424
* `created_at` (date-time): Request creation date/time
2525
* `updated_at` (date-time): Request last updated date/time
26-
* `site_url` (string): Site URL to link to
2726

2827
---
2928

@@ -38,6 +37,8 @@ await PartnerSiteRequest.list
3837

3938
* `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.
4039
* `per_page` (int64): Number of records to show per page. (Max: 10000, 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 `host_partner_id`.
41+
* `filter` (object): If set, return records where the specified field is equal to the supplied value. Valid fields are `host_partner_id`.
4142

4243
---
4344

@@ -61,45 +62,45 @@ await PartnerSiteRequest.findByPairingKey({
6162
```
6263
await PartnerSiteRequest.create({
6364
'host_partner_id': 1,
64-
'site_url': "site_url",
65+
'guest_site_url': "guest_site_url",
6566
})
6667
```
6768

6869

6970
### Parameters
7071

7172
* `host_partner_id` (int64): Required - Host Partner ID to link with
72-
* `site_url` (string): Required - Site URL to link to
73+
* `guest_site_url` (string): Required - Guest Site URL to link to
7374

7475
---
7576

7677
## Reject partner site request
7778

7879
```
79-
const [partner_site_request] = await PartnerSiteRequest.list()
80-
81-
await partner_site_request.reject()
80+
await PartnerSiteRequest.reject({
81+
'pairing_key': "pairing_key",
82+
})
8283
```
8384

84-
### Parameters
8585

86-
* `id` (int64): Required - Partner Site Request ID.
86+
### Parameters
8787

88+
* `pairing_key` (string): Required - Pairing key for the partner site request
8889

8990
---
9091

9192
## Approve partner site request
9293

9394
```
94-
const [partner_site_request] = await PartnerSiteRequest.list()
95-
96-
await partner_site_request.approve()
95+
await PartnerSiteRequest.approve({
96+
'pairing_key': "pairing_key",
97+
})
9798
```
9899

99-
### Parameters
100100

101-
* `id` (int64): Required - Partner Site Request ID.
101+
### Parameters
102102

103+
* `pairing_key` (string): Required - Pairing key for the partner site request
103104

104105
---
105106

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.652';
15+
var version = '1.2.653';
1616
var userAgent = "Files.com JavaScript SDK v".concat(version);
1717
var logLevel = _Logger.LogLevel.INFO;
1818
var debugRequest = false;

lib/models/EventChannel.js

Lines changed: 38 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,13 @@ var EventChannel = /*#__PURE__*/(0, _createClass2.default)(function EventChannel
4646
(0, _defineProperty2.default)(this, "setName", function (value) {
4747
_this.attributes.name = value;
4848
});
49+
// int64 # Workspace ID. 0 means the default workspace.
50+
(0, _defineProperty2.default)(this, "getWorkspaceId", function () {
51+
return _this.attributes.workspace_id;
52+
});
53+
(0, _defineProperty2.default)(this, "setWorkspaceId", function (value) {
54+
_this.attributes.workspace_id = value;
55+
});
4956
// string # Event Channel description.
5057
(0, _defineProperty2.default)(this, "getDescription", function () {
5158
return _this.attributes.description;
@@ -77,6 +84,7 @@ var EventChannel = /*#__PURE__*/(0, _createClass2.default)(function EventChannel
7784
});
7885
// Parameters:
7986
// name - string - Event Channel name.
87+
// workspace_id - int64 - Workspace ID. 0 means the default workspace.
8088
// description - string - Event Channel description.
8189
// enabled - boolean - Whether this Event Channel can dispatch events.
8290
// default_channel - boolean - Whether this Event Channel is the default destination for newly published events.
@@ -113,32 +121,38 @@ var EventChannel = /*#__PURE__*/(0, _createClass2.default)(function EventChannel
113121
}
114122
throw new errors.InvalidParameterError("Bad parameter: name must be of type String, received ".concat((0, _utils.getType)(params.name)));
115123
case 4:
116-
if (!(params.description && !(0, _utils.isString)(params.description))) {
124+
if (!(params.workspace_id && !(0, _utils.isInt)(params.workspace_id))) {
117125
_context.next = 5;
118126
break;
119127
}
120-
throw new errors.InvalidParameterError("Bad parameter: description must be of type String, received ".concat((0, _utils.getType)(params.description)));
128+
throw new errors.InvalidParameterError("Bad parameter: workspace_id must be of type Int, received ".concat((0, _utils.getType)(params.workspace_id)));
121129
case 5:
130+
if (!(params.description && !(0, _utils.isString)(params.description))) {
131+
_context.next = 6;
132+
break;
133+
}
134+
throw new errors.InvalidParameterError("Bad parameter: description must be of type String, received ".concat((0, _utils.getType)(params.description)));
135+
case 6:
122136
if (params.id) {
123-
_context.next = 7;
137+
_context.next = 8;
124138
break;
125139
}
126140
if (!_this.attributes.id) {
127-
_context.next = 6;
141+
_context.next = 7;
128142
break;
129143
}
130144
params.id = _this.id;
131-
_context.next = 7;
145+
_context.next = 8;
132146
break;
133-
case 6:
134-
throw new errors.MissingParameterError('Parameter missing: id');
135147
case 7:
136-
_context.next = 8;
137-
return _Api.default.sendRequest("/event_channels/".concat(encodeURIComponent(params.id)), 'PATCH', params, _this.options);
148+
throw new errors.MissingParameterError('Parameter missing: id');
138149
case 8:
150+
_context.next = 9;
151+
return _Api.default.sendRequest("/event_channels/".concat(encodeURIComponent(params.id)), 'PATCH', params, _this.options);
152+
case 9:
139153
response = _context.sent;
140154
return _context.abrupt("return", new EventChannel(response === null || response === void 0 ? void 0 : response.data, _this.options));
141-
case 9:
155+
case 10:
142156
case "end":
143157
return _context.stop();
144158
}
@@ -241,8 +255,8 @@ _EventChannel = EventChannel;
241255
// Parameters:
242256
// 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.
243257
// per_page - int64 - Number of records to show per page. (Max: 10000, 1,000 or less is recommended).
244-
// sort_by - object - If set, sort records by the specified field in either `asc` or `desc` direction. Valid fields are `name`, `enabled` or `default_channel`.
245-
// filter - object - If set, return records where the specified field is equal to the supplied value. Valid fields are `enabled` and `default_channel`.
258+
// sort_by - object - If set, sort records by the specified field in either `asc` or `desc` direction. Valid fields are `name`, `enabled`, `default_channel` or `workspace_id`.
259+
// filter - object - If set, return records where the specified field is equal to the supplied value. Valid fields are `enabled`, `default_channel` or `workspace_id`. Valid field combinations are `[ workspace_id, enabled ]` and `[ workspace_id, default_channel ]`.
246260
(0, _defineProperty2.default)(EventChannel, "list", /*#__PURE__*/(0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee4() {
247261
var _response$data;
248262
var params,
@@ -338,6 +352,7 @@ _EventChannel = EventChannel;
338352
});
339353
// Parameters:
340354
// name (required) - string - Event Channel name.
355+
// workspace_id - int64 - Workspace ID. 0 means the default workspace.
341356
// description - string - Event Channel description.
342357
// enabled - boolean - Whether this Event Channel can dispatch events.
343358
// default_channel - boolean - Whether this Event Channel is the default destination for newly published events.
@@ -363,18 +378,24 @@ _EventChannel = EventChannel;
363378
}
364379
throw new errors.InvalidParameterError("Bad parameter: name must be of type String, received ".concat((0, _utils.getType)(params.name)));
365380
case 2:
366-
if (!(params.description && !(0, _utils.isString)(params.description))) {
381+
if (!(params.workspace_id && !(0, _utils.isInt)(params.workspace_id))) {
367382
_context6.next = 3;
368383
break;
369384
}
370-
throw new errors.InvalidParameterError("Bad parameter: description must be of type String, received ".concat((0, _utils.getType)(params.description)));
385+
throw new errors.InvalidParameterError("Bad parameter: workspace_id must be of type Int, received ".concat((0, _utils.getType)(params.workspace_id)));
371386
case 3:
372-
_context6.next = 4;
373-
return _Api.default.sendRequest('/event_channels', 'POST', params, options);
387+
if (!(params.description && !(0, _utils.isString)(params.description))) {
388+
_context6.next = 4;
389+
break;
390+
}
391+
throw new errors.InvalidParameterError("Bad parameter: description must be of type String, received ".concat((0, _utils.getType)(params.description)));
374392
case 4:
393+
_context6.next = 5;
394+
return _Api.default.sendRequest('/event_channels', 'POST', params, options);
395+
case 5:
375396
response = _context6.sent;
376397
return _context6.abrupt("return", new _EventChannel(response === null || response === void 0 ? void 0 : response.data, options));
377-
case 5:
398+
case 6:
378399
case "end":
379400
return _context6.stop();
380401
}

0 commit comments

Comments
 (0)