Skip to content

Commit a4fd5b2

Browse files
[Bot] push changes from Files.com
1 parent 093bfbc commit a4fd5b2

File tree

7 files changed

+62
-19
lines changed

7 files changed

+62
-19
lines changed

_VERSION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
1.2.586
1+
1.2.587

docs/models/FormFieldSet.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,7 @@
4444
* `skip_company` (boolean): Any associated InboxRegistrations or BundleRegistrations can be saved without providing company
4545
* `in_use` (boolean): Form Field Set is in use by an active Inbox / Bundle / Inbox Registration / Bundle Registration
4646
* `user_id` (int64): User ID. Provide a value of `0` to operate the current session's user.
47+
* `workspace_id` (int64): Workspace ID
4748

4849
---
4950

@@ -83,6 +84,7 @@ await FormFieldSet.find(id)
8384
await FormFieldSet.create({
8485
'user_id': 1,
8586
'title': "Sample Form Title",
87+
'workspace_id': 1,
8688
'skip_email': false,
8789
'skip_name': false,
8890
'skip_company': false,
@@ -95,6 +97,7 @@ await FormFieldSet.create({
9597

9698
* `user_id` (int64): User ID. Provide a value of `0` to operate the current session's user.
9799
* `title` (string): Title to be displayed
100+
* `workspace_id` (int64): Workspace ID
98101
* `skip_email` (boolean): Skip validating form email
99102
* `skip_name` (boolean): Skip validating form name
100103
* `skip_company` (boolean): Skip validating company
@@ -109,6 +112,7 @@ const form_field_set = await FormFieldSet.find(id)
109112
110113
await form_field_set.update({
111114
'title': "Sample Form Title",
115+
'workspace_id': 1,
112116
'skip_email': false,
113117
'skip_name': false,
114118
'skip_company': false,
@@ -120,6 +124,7 @@ await form_field_set.update({
120124

121125
* `id` (int64): Required - Form Field Set ID.
122126
* `title` (string): Title to be displayed
127+
* `workspace_id` (int64): Workspace ID
123128
* `skip_email` (boolean): Skip validating form email
124129
* `skip_name` (boolean): Skip validating form name
125130
* `skip_company` (boolean): Skip validating company

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

lib/models/FormFieldSet.js

Lines changed: 36 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -95,8 +95,16 @@ var FormFieldSet = /*#__PURE__*/(0, _createClass2.default)(function FormFieldSet
9595
(0, _defineProperty2.default)(this, "setUserId", function (value) {
9696
_this.attributes.user_id = value;
9797
});
98+
// int64 # Workspace ID
99+
(0, _defineProperty2.default)(this, "getWorkspaceId", function () {
100+
return _this.attributes.workspace_id;
101+
});
102+
(0, _defineProperty2.default)(this, "setWorkspaceId", function (value) {
103+
_this.attributes.workspace_id = value;
104+
});
98105
// Parameters:
99106
// title - string - Title to be displayed
107+
// workspace_id - int64 - Workspace ID
100108
// skip_email - boolean - Skip validating form email
101109
// skip_name - boolean - Skip validating form name
102110
// skip_company - boolean - Skip validating company
@@ -134,32 +142,38 @@ var FormFieldSet = /*#__PURE__*/(0, _createClass2.default)(function FormFieldSet
134142
}
135143
throw new errors.InvalidParameterError("Bad parameter: title must be of type String, received ".concat((0, _utils.getType)(params.title)));
136144
case 4:
137-
if (!(params.form_fields && !(0, _utils.isArray)(params.form_fields))) {
145+
if (!(params.workspace_id && !(0, _utils.isInt)(params.workspace_id))) {
138146
_context.next = 5;
139147
break;
140148
}
141-
throw new errors.InvalidParameterError("Bad parameter: form_fields must be of type Array, received ".concat((0, _utils.getType)(params.form_fields)));
149+
throw new errors.InvalidParameterError("Bad parameter: workspace_id must be of type Int, received ".concat((0, _utils.getType)(params.workspace_id)));
142150
case 5:
151+
if (!(params.form_fields && !(0, _utils.isArray)(params.form_fields))) {
152+
_context.next = 6;
153+
break;
154+
}
155+
throw new errors.InvalidParameterError("Bad parameter: form_fields must be of type Array, received ".concat((0, _utils.getType)(params.form_fields)));
156+
case 6:
143157
if (params.id) {
144-
_context.next = 7;
158+
_context.next = 8;
145159
break;
146160
}
147161
if (!_this.attributes.id) {
148-
_context.next = 6;
162+
_context.next = 7;
149163
break;
150164
}
151165
params.id = _this.id;
152-
_context.next = 7;
166+
_context.next = 8;
153167
break;
154-
case 6:
155-
throw new errors.MissingParameterError('Parameter missing: id');
156168
case 7:
157-
_context.next = 8;
158-
return _Api.default.sendRequest("/form_field_sets/".concat(encodeURIComponent(params.id)), 'PATCH', params, _this.options);
169+
throw new errors.MissingParameterError('Parameter missing: id');
159170
case 8:
171+
_context.next = 9;
172+
return _Api.default.sendRequest("/form_field_sets/".concat(encodeURIComponent(params.id)), 'PATCH', params, _this.options);
173+
case 9:
160174
response = _context.sent;
161175
return _context.abrupt("return", new FormFieldSet(response === null || response === void 0 ? void 0 : response.data, _this.options));
162-
case 9:
176+
case 10:
163177
case "end":
164178
return _context.stop();
165179
}
@@ -365,6 +379,7 @@ _FormFieldSet = FormFieldSet;
365379
// Parameters:
366380
// user_id - int64 - User ID. Provide a value of `0` to operate the current session's user.
367381
// title - string - Title to be displayed
382+
// workspace_id - int64 - Workspace ID
368383
// skip_email - boolean - Skip validating form email
369384
// skip_name - boolean - Skip validating form name
370385
// skip_company - boolean - Skip validating company
@@ -391,18 +406,24 @@ _FormFieldSet = FormFieldSet;
391406
}
392407
throw new errors.InvalidParameterError("Bad parameter: title must be of type String, received ".concat((0, _utils.getType)(params.title)));
393408
case 2:
394-
if (!(params.form_fields && !(0, _utils.isArray)(params.form_fields))) {
409+
if (!(params.workspace_id && !(0, _utils.isInt)(params.workspace_id))) {
395410
_context6.next = 3;
396411
break;
397412
}
398-
throw new errors.InvalidParameterError("Bad parameter: form_fields must be of type Array, received ".concat((0, _utils.getType)(params.form_fields)));
413+
throw new errors.InvalidParameterError("Bad parameter: workspace_id must be of type Int, received ".concat((0, _utils.getType)(params.workspace_id)));
399414
case 3:
400-
_context6.next = 4;
401-
return _Api.default.sendRequest('/form_field_sets', 'POST', params, options);
415+
if (!(params.form_fields && !(0, _utils.isArray)(params.form_fields))) {
416+
_context6.next = 4;
417+
break;
418+
}
419+
throw new errors.InvalidParameterError("Bad parameter: form_fields must be of type Array, received ".concat((0, _utils.getType)(params.form_fields)));
402420
case 4:
421+
_context6.next = 5;
422+
return _Api.default.sendRequest('/form_field_sets', 'POST', params, options);
423+
case 5:
403424
response = _context6.sent;
404425
return _context6.abrupt("return", new _FormFieldSet(response === null || response === void 0 ? void 0 : response.data, options));
405-
case 5:
426+
case 6:
406427
case "end":
407428
return _context6.stop();
408429
}

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.586",
3+
"version": "1.2.587",
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.586'
9+
const version = '1.2.587'
1010
let userAgent = `Files.com JavaScript SDK v${version}`
1111

1212
let logLevel = LogLevel.INFO

src/models/FormFieldSet.js

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -91,8 +91,16 @@ class FormFieldSet {
9191
this.attributes.user_id = value
9292
}
9393

94+
// int64 # Workspace ID
95+
getWorkspaceId = () => this.attributes.workspace_id
96+
97+
setWorkspaceId = value => {
98+
this.attributes.workspace_id = value
99+
}
100+
94101
// Parameters:
95102
// title - string - Title to be displayed
103+
// workspace_id - int64 - Workspace ID
96104
// skip_email - boolean - Skip validating form email
97105
// skip_name - boolean - Skip validating form name
98106
// skip_company - boolean - Skip validating company
@@ -115,6 +123,10 @@ class FormFieldSet {
115123
throw new errors.InvalidParameterError(`Bad parameter: title must be of type String, received ${getType(params.title)}`)
116124
}
117125

126+
if (params.workspace_id && !isInt(params.workspace_id)) {
127+
throw new errors.InvalidParameterError(`Bad parameter: workspace_id must be of type Int, received ${getType(params.workspace_id)}`)
128+
}
129+
118130
if (params.form_fields && !isArray(params.form_fields)) {
119131
throw new errors.InvalidParameterError(`Bad parameter: form_fields must be of type Array, received ${getType(params.form_fields)}`)
120132
}
@@ -225,6 +237,7 @@ class FormFieldSet {
225237
// Parameters:
226238
// user_id - int64 - User ID. Provide a value of `0` to operate the current session's user.
227239
// title - string - Title to be displayed
240+
// workspace_id - int64 - Workspace ID
228241
// skip_email - boolean - Skip validating form email
229242
// skip_name - boolean - Skip validating form name
230243
// skip_company - boolean - Skip validating company
@@ -238,6 +251,10 @@ class FormFieldSet {
238251
throw new errors.InvalidParameterError(`Bad parameter: title must be of type String, received ${getType(params.title)}`)
239252
}
240253

254+
if (params.workspace_id && !isInt(params.workspace_id)) {
255+
throw new errors.InvalidParameterError(`Bad parameter: workspace_id must be of type Int, received ${getType(params.workspace_id)}`)
256+
}
257+
241258
if (params.form_fields && !isArray(params.form_fields)) {
242259
throw new errors.InvalidParameterError(`Bad parameter: form_fields must be of type Array, received ${getType(params.form_fields)}`)
243260
}

0 commit comments

Comments
 (0)