@@ -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 }
0 commit comments