1- /*! 4.29.6 / Consumer */
1+ /*! 4.29.7 / Consumer */
22exports [ "PubNub" ] =
33/******/ ( function ( modules ) { // webpackBootstrap
44/******/ // The module cache
@@ -566,7 +566,7 @@ var _default = function () {
566566 } , {
567567 key : "getVersion" ,
568568 value : function getVersion ( ) {
569- return '4.29.6 ' ;
569+ return '4.29.7 ' ;
570570 }
571571 } , {
572572 key : "_addPnsdkSuffix" ,
@@ -622,19 +622,6 @@ module.exports = _slicedToArray;
622622
623623/***/ } ) ,
624624/* 10 */
625- /***/ ( function ( module , exports ) {
626-
627- function _getPrototypeOf ( o ) {
628- module . exports = _getPrototypeOf = Object . setPrototypeOf ? Object . getPrototypeOf : function _getPrototypeOf ( o ) {
629- return o . __proto__ || Object . getPrototypeOf ( o ) ;
630- } ;
631- return _getPrototypeOf ( o ) ;
632- }
633-
634- module . exports = _getPrototypeOf ;
635-
636- /***/ } ) ,
637- /* 11 */
638625/***/ ( function ( module , exports , __webpack_require__ ) {
639626
640627"use strict" ;
@@ -659,6 +646,19 @@ var _default = {
659646exports [ "default" ] = _default ;
660647module . exports = exports . default ;
661648
649+ /***/ } ) ,
650+ /* 11 */
651+ /***/ ( function ( module , exports ) {
652+
653+ function _getPrototypeOf ( o ) {
654+ module . exports = _getPrototypeOf = Object . setPrototypeOf ? Object . getPrototypeOf : function _getPrototypeOf ( o ) {
655+ return o . __proto__ || Object . getPrototypeOf ( o ) ;
656+ } ;
657+ return _getPrototypeOf ( o ) ;
658+ }
659+
660+ module . exports = _getPrototypeOf ;
661+
662662/***/ } ) ,
663663/* 12 */
664664/***/ ( function ( module , exports , __webpack_require__ ) {
@@ -767,7 +767,7 @@ var _inherits2 = _interopRequireDefault(__webpack_require__(12));
767767
768768var _possibleConstructorReturn2 = _interopRequireDefault ( __webpack_require__ ( 14 ) ) ;
769769
770- var _getPrototypeOf2 = _interopRequireDefault ( __webpack_require__ ( 10 ) ) ;
770+ var _getPrototypeOf2 = _interopRequireDefault ( __webpack_require__ ( 11 ) ) ;
771771
772772var _wrapNativeSuper2 = _interopRequireDefault ( __webpack_require__ ( 37 ) ) ;
773773
@@ -781,6 +781,8 @@ var _config = _interopRequireDefault(__webpack_require__(8));
781781
782782var _operations = _interopRequireDefault ( __webpack_require__ ( 1 ) ) ;
783783
784+ var _categories = _interopRequireDefault ( __webpack_require__ ( 10 ) ) ;
785+
784786function ownKeys ( object , enumerableOnly ) { var keys = Object . keys ( object ) ; if ( Object . getOwnPropertySymbols ) { var symbols = Object . getOwnPropertySymbols ( object ) ; if ( enumerableOnly ) symbols = symbols . filter ( function ( sym ) { return Object . getOwnPropertyDescriptor ( object , sym ) . enumerable ; } ) ; keys . push . apply ( keys , symbols ) ; } return keys ; }
785787
786788function _objectSpread ( target ) { for ( var i = 1 ; i < arguments . length ; i ++ ) { var source = arguments [ i ] != null ? arguments [ i ] : { } ; if ( i % 2 ) { ownKeys ( Object ( source ) , true ) . forEach ( function ( key ) { ( 0 , _defineProperty2 [ "default" ] ) ( target , key , source [ key ] ) ; } ) ; } else if ( Object . getOwnPropertyDescriptors ) { Object . defineProperties ( target , Object . getOwnPropertyDescriptors ( source ) ) ; } else { ownKeys ( Object ( source ) ) . forEach ( function ( key ) { Object . defineProperty ( target , key , Object . getOwnPropertyDescriptor ( source , key ) ) ; } ) ; } } return target ; }
@@ -1020,7 +1022,19 @@ function _default(modules, endpoint) {
10201022 }
10211023 } ) [ "catch" ] ( function ( e ) {
10221024 if ( callback ) {
1023- callback ( e , null ) ;
1025+ var errorData = e ;
1026+
1027+ if ( endpoint . getOperation ( ) === _operations [ "default" ] . PNSubscribeOperation ) {
1028+ errorData = {
1029+ statusCode : 400 ,
1030+ error : true ,
1031+ operation : endpoint . getOperation ( ) ,
1032+ errorData : e ,
1033+ category : _categories [ "default" ] . PNUnknownCategory
1034+ } ;
1035+ }
1036+
1037+ callback ( errorData , null ) ;
10241038 } else if ( promiseComponent ) {
10251039 promiseComponent . reject ( new PubNubError ( 'PubNub call failed, check status for details' , e ) ) ;
10261040 }
@@ -1328,7 +1342,7 @@ var _defineProperty2 = _interopRequireDefault(__webpack_require__(4));
13281342
13291343var _flow_interfaces = __webpack_require__ ( 2 ) ;
13301344
1331- var _categories = _interopRequireDefault ( __webpack_require__ ( 11 ) ) ;
1345+ var _categories = _interopRequireDefault ( __webpack_require__ ( 10 ) ) ;
13321346
13331347var _default = function ( ) {
13341348 function _default ( ) {
@@ -1571,7 +1585,7 @@ var _inherits2 = _interopRequireDefault(__webpack_require__(12));
15711585
15721586var _possibleConstructorReturn2 = _interopRequireDefault ( __webpack_require__ ( 14 ) ) ;
15731587
1574- var _getPrototypeOf2 = _interopRequireDefault ( __webpack_require__ ( 10 ) ) ;
1588+ var _getPrototypeOf2 = _interopRequireDefault ( __webpack_require__ ( 11 ) ) ;
15751589
15761590var _cborSync = _interopRequireDefault ( __webpack_require__ ( 24 ) ) ;
15771591
@@ -2430,7 +2444,7 @@ var subscribeEndpointConfig = _interopRequireWildcard(__webpack_require__(113));
24302444
24312445var _operations = _interopRequireDefault ( __webpack_require__ ( 1 ) ) ;
24322446
2433- var _categories = _interopRequireDefault ( __webpack_require__ ( 11 ) ) ;
2447+ var _categories = _interopRequireDefault ( __webpack_require__ ( 10 ) ) ;
24342448
24352449var _flow_interfaces = __webpack_require__ ( 2 ) ;
24362450
@@ -3844,7 +3858,7 @@ var _utils = _interopRequireDefault(__webpack_require__(3));
38443858
38453859var _flow_interfaces = __webpack_require__ ( 2 ) ;
38463860
3847- var _categories = _interopRequireDefault ( __webpack_require__ ( 11 ) ) ;
3861+ var _categories = _interopRequireDefault ( __webpack_require__ ( 10 ) ) ;
38483862
38493863var _default = function ( ) {
38503864 function _default ( _ref ) {
@@ -4906,7 +4920,7 @@ var _inherits2 = _interopRequireDefault(__webpack_require__(12));
49064920
49074921var _possibleConstructorReturn2 = _interopRequireDefault ( __webpack_require__ ( 14 ) ) ;
49084922
4909- var _getPrototypeOf2 = _interopRequireDefault ( __webpack_require__ ( 10 ) ) ;
4923+ var _getPrototypeOf2 = _interopRequireDefault ( __webpack_require__ ( 11 ) ) ;
49104924
49114925var _classCallCheck2 = _interopRequireDefault ( __webpack_require__ ( 5 ) ) ;
49124926
@@ -5869,7 +5883,7 @@ module.exports = exports.default;
58695883/* 37 */
58705884/***/ ( function ( module , exports , __webpack_require__ ) {
58715885
5872- var getPrototypeOf = __webpack_require__ ( 10 ) ;
5886+ var getPrototypeOf = __webpack_require__ ( 11 ) ;
58735887
58745888var setPrototypeOf = __webpack_require__ ( 13 ) ;
58755889
@@ -12383,11 +12397,19 @@ function getOperation() {
1238312397 return _operations [ "default" ] . PNAccessManagerGrant ;
1238412398}
1238512399
12386- function validateParams ( modules ) {
12400+ function validateParams ( modules , incomingParams ) {
1238712401 var config = modules . config ;
1238812402 if ( ! config . subscribeKey ) return 'Missing Subscribe Key' ;
1238912403 if ( ! config . publishKey ) return 'Missing Publish Key' ;
1239012404 if ( ! config . secretKey ) return 'Missing Secret Key' ;
12405+
12406+ if ( incomingParams . uuids != null && ! incomingParams . authKeys ) {
12407+ return 'authKeys are required for grant request on uuids' ;
12408+ }
12409+
12410+ if ( incomingParams . uuids != null && ( incomingParams . channels != null || incomingParams . channelGroups != null ) ) {
12411+ return 'Both channel/channelgroup and uuid cannot be used in the same request' ;
12412+ }
1239112413}
1239212414
1239312415function getURL ( modules ) {
@@ -12409,13 +12431,21 @@ function prepareParams(modules, incomingParams) {
1240912431 channels = _incomingParams$chann === void 0 ? [ ] : _incomingParams$chann ,
1241012432 _incomingParams$chann2 = incomingParams . channelGroups ,
1241112433 channelGroups = _incomingParams$chann2 === void 0 ? [ ] : _incomingParams$chann2 ,
12434+ _incomingParams$uuids = incomingParams . uuids ,
12435+ uuids = _incomingParams$uuids === void 0 ? [ ] : _incomingParams$uuids ,
1241212436 ttl = incomingParams . ttl ,
1241312437 _incomingParams$read = incomingParams . read ,
1241412438 read = _incomingParams$read === void 0 ? false : _incomingParams$read ,
1241512439 _incomingParams$write = incomingParams . write ,
1241612440 write = _incomingParams$write === void 0 ? false : _incomingParams$write ,
1241712441 _incomingParams$manag = incomingParams . manage ,
1241812442 manage = _incomingParams$manag === void 0 ? false : _incomingParams$manag ,
12443+ _incomingParams$get = incomingParams . get ,
12444+ get = _incomingParams$get === void 0 ? false : _incomingParams$get ,
12445+ _incomingParams$join = incomingParams . join ,
12446+ join = _incomingParams$join === void 0 ? false : _incomingParams$join ,
12447+ _incomingParams$updat = incomingParams . update ,
12448+ update = _incomingParams$updat === void 0 ? false : _incomingParams$updat ,
1241912449 _incomingParams$authK = incomingParams . authKeys ,
1242012450 authKeys = _incomingParams$authK === void 0 ? [ ] : _incomingParams$authK ;
1242112451 var deleteParam = incomingParams [ "delete" ] ;
@@ -12424,6 +12454,9 @@ function prepareParams(modules, incomingParams) {
1242412454 params . w = write ? '1' : '0' ;
1242512455 params . m = manage ? '1' : '0' ;
1242612456 params . d = deleteParam ? '1' : '0' ;
12457+ params . g = get ? '1' : '0' ;
12458+ params . j = join ? '1' : '0' ;
12459+ params . u = update ? '1' : '0' ;
1242712460
1242812461 if ( channels . length > 0 ) {
1242912462 params . channel = channels . join ( ',' ) ;
@@ -12437,6 +12470,10 @@ function prepareParams(modules, incomingParams) {
1243712470 params . auth = authKeys . join ( ',' ) ;
1243812471 }
1243912472
12473+ if ( uuids . length > 0 ) {
12474+ params [ 'target-uuid' ] = uuids . join ( ',' ) ;
12475+ }
12476+
1244012477 if ( ttl || ttl === 0 ) {
1244112478 params . ttl = ttl ;
1244212479 }
@@ -13349,7 +13386,7 @@ var _defineProperty2 = _interopRequireDefault(__webpack_require__(4));
1334913386
1335013387var _config = _interopRequireDefault ( __webpack_require__ ( 8 ) ) ;
1335113388
13352- var _categories = _interopRequireDefault ( __webpack_require__ ( 11 ) ) ;
13389+ var _categories = _interopRequireDefault ( __webpack_require__ ( 10 ) ) ;
1335313390
1335413391var _flow_interfaces = __webpack_require__ ( 2 ) ;
1335513392
0 commit comments