@@ -53,22 +53,30 @@ var Style = /*#__PURE__*/(0, _createClass2.default)(function Style() {
5353 ( 0 , _defineProperty2 . default ) ( this , "setLogo" , function ( value ) {
5454 _this . attributes . logo = value ;
5555 } ) ;
56+ // string # URL to open when a public visitor clicks the logo
57+ ( 0 , _defineProperty2 . default ) ( this , "getLogoClickHref" , function ( ) {
58+ return _this . attributes . logo_click_href ;
59+ } ) ;
60+ ( 0 , _defineProperty2 . default ) ( this , "setLogoClickHref" , function ( value ) {
61+ _this . attributes . logo_click_href = value ;
62+ } ) ;
5663 // Image # Logo thumbnail
5764 ( 0 , _defineProperty2 . default ) ( this , "getThumbnail" , function ( ) {
5865 return _this . attributes . thumbnail ;
5966 } ) ;
6067 ( 0 , _defineProperty2 . default ) ( this , "setThumbnail" , function ( value ) {
6168 _this . attributes . thumbnail = value ;
6269 } ) ;
63- // file # Logo for custom branding.
70+ // file # Logo for custom branding. Required when creating a new style.
6471 ( 0 , _defineProperty2 . default ) ( this , "getFile" , function ( ) {
6572 return _this . attributes . file ;
6673 } ) ;
6774 ( 0 , _defineProperty2 . default ) ( this , "setFile" , function ( value ) {
6875 _this . attributes . file = value ;
6976 } ) ;
7077 // Parameters:
71- // file (required) - file - Logo for custom branding.
78+ // file - file - Logo for custom branding. Required when creating a new style.
79+ // logo_click_href - string - URL to open when a public visitor clicks the logo.
7280 ( 0 , _defineProperty2 . default ) ( this , "update" , /*#__PURE__*/ ( 0 , _asyncToGenerator2 . default ) ( /*#__PURE__*/ _regenerator . default . mark ( function _callee ( ) {
7381 var params ,
7482 response ,
@@ -96,40 +104,32 @@ var Style = /*#__PURE__*/(0, _createClass2.default)(function Style() {
96104 }
97105 throw new errors . InvalidParameterError ( "Bad parameter: path must be of type String, received " . concat ( ( 0 , _utils . getType ) ( params . path ) ) ) ;
98106 case 3 :
99- if ( params . path ) {
100- _context . next = 5 ;
101- break ;
102- }
103- if ( ! _this . attributes . path ) {
107+ if ( ! ( params . logo_click_href && ! ( 0 , _utils . isString ) ( params . logo_click_href ) ) ) {
104108 _context . next = 4 ;
105109 break ;
106110 }
107- params . path = _this . path ;
108- _context . next = 5 ;
109- break ;
111+ throw new errors . InvalidParameterError ( "Bad parameter: logo_click_href must be of type String, received " . concat ( ( 0 , _utils . getType ) ( params . logo_click_href ) ) ) ;
110112 case 4 :
111- throw new errors . MissingParameterError ( 'Parameter missing: path' ) ;
112- case 5 :
113- if ( params . file ) {
114- _context . next = 7 ;
113+ if ( params . path ) {
114+ _context . next = 6 ;
115115 break ;
116116 }
117- if ( ! _this . attributes . file ) {
118- _context . next = 6 ;
117+ if ( ! _this . attributes . path ) {
118+ _context . next = 5 ;
119119 break ;
120120 }
121- params . file = _this . file ;
122- _context . next = 7 ;
121+ params . path = _this . path ;
122+ _context . next = 6 ;
123123 break ;
124+ case 5 :
125+ throw new errors . MissingParameterError ( 'Parameter missing: path' ) ;
124126 case 6 :
125- throw new errors . MissingParameterError ( 'Parameter missing: file' ) ;
126- case 7 :
127- _context . next = 8 ;
127+ _context . next = 7 ;
128128 return _Api . default . sendRequest ( "/styles/" . concat ( encodeURIComponent ( params . path ) ) , 'PATCH' , params , _this . options ) ;
129- case 8 :
129+ case 7 :
130130 response = _context . sent ;
131131 return _context . abrupt ( "return" , new Style ( response === null || response === void 0 ? void 0 : response . data , _this . options ) ) ;
132- case 9 :
132+ case 8 :
133133 case "end" :
134134 return _context . stop ( ) ;
135135 }
0 commit comments