@mapcreator/api 3.3.5 → 3.3.7

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -29,11 +29,11 @@
29
29
  * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
30
30
  * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
31
31
  *
32
- * hash:8b22b71ca40fe449370a, chunkhash:e848be995b687a9adf32, name:bundle.browser, version:v3.3.4
32
+ * hash:8536d7e133b0c6475ae9, chunkhash:4a5169ec682b62cafeb3, name:bundle.browser, version:b8d270c
33
33
  */
34
34
  /*!
35
35
  * This bundle contains the following packages:
36
- * └─ @mapcreator/api (3.3.4) ── BSD 3-clause "New" or "Revised" License (http://www.opensource.org/licenses/BSD-3-Clause) ── package.json
36
+ * └─ @mapcreator/api (3.3.3) ── BSD 3-clause "New" or "Revised" License (http://www.opensource.org/licenses/BSD-3-Clause) ── package.json
37
37
  * ├─ @babel/runtime (7.10.2) ── MIT License (http://www.opensource.org/licenses/MIT) ── node_modules/@babel/runtime/package.json
38
38
  * │ └─ regenerator-runtime (0.13.5) ── MIT License (http://www.opensource.org/licenses/MIT) ── node_modules/@babel/runtime ~ regenerator-runtime/package.json
39
39
  * ├─ case (1.6.3) ── mit or gpl 3.0 or later ── node_modules/case/package.json
@@ -666,8 +666,8 @@ __webpack_require__.r(__webpack_exports__);
666
666
  /* harmony import */ var case__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(5);
667
667
  /* harmony import */ var case__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(case__WEBPACK_IMPORTED_MODULE_0__);
668
668
  /* harmony import */ var _errors_AbstractError__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(22);
669
- /* harmony import */ var _Mapcreator__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(18);
670
- /* harmony import */ var _proxy_SimpleResourceProxy__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(16);
669
+ /* harmony import */ var _Mapcreator__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(17);
670
+ /* harmony import */ var _proxy_SimpleResourceProxy__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(15);
671
671
  /* harmony import */ var _traits_Injectable__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(65);
672
672
  /* harmony import */ var _utils_hash__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(33);
673
673
  /* harmony import */ var _utils_reflection__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(0);
@@ -1421,7 +1421,7 @@ __webpack_require__.r(__webpack_exports__);
1421
1421
  /* harmony export */ "encodeQueryString": () => (/* binding */ encodeQueryString),
1422
1422
  /* harmony export */ "wrapKyPrefixUrl": () => (/* binding */ wrapKyPrefixUrl)
1423
1423
  /* harmony export */ });
1424
- /* harmony import */ var _node__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(8);
1424
+ /* harmony import */ var _node__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(9);
1425
1425
  /*
1426
1426
  * BSD 3-Clause License
1427
1427
  *
@@ -1556,7 +1556,7 @@ __webpack_require__.d(__webpack_exports__, {
1556
1556
  });
1557
1557
 
1558
1558
  // EXTERNAL MODULE: ./src/enums/Enum.js + 1 modules
1559
- var Enum = __webpack_require__(12);
1559
+ var Enum = __webpack_require__(11);
1560
1560
  ;// CONCATENATED MODULE: ./src/enums/DeletedState.js
1561
1561
  /*
1562
1562
  * BSD 3-Clause License
@@ -1735,72 +1735,6 @@ const JobShareVisibility = new Enum["default"](['private', 'organisation', 'publ
1735
1735
  /* 8 */
1736
1736
  /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
1737
1737
 
1738
- "use strict";
1739
- __webpack_require__.r(__webpack_exports__);
1740
- /* harmony export */ __webpack_require__.d(__webpack_exports__, {
1741
- /* harmony export */ "isNode": () => (/* binding */ isNode),
1742
- /* harmony export */ "windowTest": () => (/* binding */ windowTest)
1743
- /* harmony export */ });
1744
- /*
1745
- * BSD 3-Clause License
1746
- *
1747
- * Copyright (c) 2020, Mapcreator
1748
- * All rights reserved.
1749
- *
1750
- * Redistribution and use in source and binary forms, with or without
1751
- * modification, are permitted provided that the following conditions are met:
1752
- *
1753
- * Redistributions of source code must retain the above copyright notice, this
1754
- * list of conditions and the following disclaimer.
1755
- *
1756
- * Redistributions in binary form must reproduce the above copyright notice,
1757
- * this list of conditions and the following disclaimer in the documentation
1758
- * and/or other materials provided with the distribution.
1759
- *
1760
- * Neither the name of the copyright holder nor the names of its
1761
- * contributors may be used to endorse or promote products derived from
1762
- * this software without specific prior written permission.
1763
- *
1764
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
1765
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
1766
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
1767
- * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
1768
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
1769
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
1770
- * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
1771
- * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
1772
- * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
1773
- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
1774
- */
1775
-
1776
- /**
1777
- * Test if the application is running under nodejs
1778
- * @returns {boolean} - Is the application running under node?
1779
- * @see https://nodejs.org
1780
- * @private
1781
- */
1782
- function isNode() {
1783
- try {
1784
- return Object.prototype.toString.call(typeof process === 'undefined' ? 0 : process) === '[object process]';
1785
- } catch (_) {
1786
- return false;
1787
- }
1788
- }
1789
- /**
1790
- * Quickly check if the window contains a variable
1791
- * @param {string} str - target variable
1792
- * @returns {boolean} - If the window contains the variable
1793
- * @private
1794
- */
1795
-
1796
- function windowTest(str) {
1797
- return typeof window !== 'undefined' && typeof window[str] !== 'undefined';
1798
- }
1799
-
1800
- /***/ }),
1801
- /* 9 */
1802
- /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
1803
-
1804
1738
  "use strict";
1805
1739
  __webpack_require__.r(__webpack_exports__);
1806
1740
  /* harmony export */ __webpack_require__.d(__webpack_exports__, {
@@ -2537,16 +2471,15 @@ class RequestParameters extends events__WEBPACK_IMPORTED_MODULE_1__.EventEmitter
2537
2471
  }
2538
2472
 
2539
2473
  /***/ }),
2540
- /* 10 */
2474
+ /* 9 */
2541
2475
  /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
2542
2476
 
2543
2477
  "use strict";
2544
2478
  __webpack_require__.r(__webpack_exports__);
2545
2479
  /* harmony export */ __webpack_require__.d(__webpack_exports__, {
2546
- /* harmony export */ "default": () => (/* binding */ OAuthToken)
2480
+ /* harmony export */ "isNode": () => (/* binding */ isNode),
2481
+ /* harmony export */ "windowTest": () => (/* binding */ windowTest)
2547
2482
  /* harmony export */ });
2548
- /* harmony import */ var _storage_StorageManager__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(20);
2549
- /* harmony import */ var _utils_requests__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(6);
2550
2483
  /*
2551
2484
  * BSD 3-Clause License
2552
2485
  *
@@ -2579,153 +2512,32 @@ __webpack_require__.r(__webpack_exports__);
2579
2512
  * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
2580
2513
  */
2581
2514
 
2582
-
2583
2515
  /**
2584
- * Oauth token container
2516
+ * Test if the application is running under nodejs
2517
+ * @returns {boolean} - Is the application running under node?
2518
+ * @see https://nodejs.org
2519
+ * @private
2585
2520
  */
2586
-
2587
- class OAuthToken {
2588
- /**
2589
- * @param {String} token - OAuth token
2590
- * @param {String} [type=Bearer] - token type
2591
- * @param {Date|Number} [expires=5 days] - expire time in seconds or Date
2592
- * @param {Array<string>} [scopes=[]] - Any scopes
2593
- */
2594
- constructor(token, type = 'Bearer', expires = 432000, scopes = []) {
2595
- this.scopes = scopes;
2596
- this.token = token;
2597
- this.type = type.toLowerCase().replace(/(\s|^)\w/g, x => x.toUpperCase());
2598
-
2599
- if (typeof expires === 'number') {
2600
- const ms = expires * 1000; // Expires is in seconds
2601
-
2602
- this.expires = new Date(Date.now() + ms);
2603
- } else if (expires instanceof Date) {
2604
- this.expires = expires;
2605
- } else {
2606
- throw new TypeError('Expires not of type Date or Number');
2607
- }
2608
- }
2609
- /**
2610
- * String representation of the token, usable in the Authorization header
2611
- * @returns {string} - String representation
2612
- */
2613
-
2614
-
2615
- toString() {
2616
- return `${this.type} ${this.token}`;
2617
- }
2618
- /**
2619
- * Get equivalent OAuth response object
2620
- * @returns {{access_token: (String|*), token_type: String, expires_in: Number, scope: (Array.<String>|Array|*)}} - Raw response object
2621
- */
2622
-
2623
-
2624
- toResponseObject() {
2625
- return {
2626
- 'access_token': this.token,
2627
- 'token_type': this.type.toLowerCase(),
2628
- 'expires_in': this.expires - Date.now(),
2629
- 'scope': this.scopes
2630
- };
2631
- }
2632
- /**
2633
- * Export oauth response query string
2634
- * @returns {string} - OAuth response query
2635
- */
2636
-
2637
-
2638
- toQueryString() {
2639
- return (0,_utils_requests__WEBPACK_IMPORTED_MODULE_1__.encodeQueryString)(this.toResponseObject());
2640
- }
2641
- /**
2642
- * If the token has expired
2643
- * @returns {Boolean} - expired
2644
- */
2645
-
2646
-
2647
- get expired() {
2648
- return new Date() > this.expires;
2649
- }
2650
- /**
2651
- * Internal storage key name
2652
- * @returns {String} - storage name
2653
- * @constant
2654
- */
2655
-
2656
-
2657
- static get storageName() {
2658
- return 'api_token';
2659
- }
2660
- /**
2661
- * Build instance from response object
2662
- * @param {String|Object} data - object or JSON string
2663
- * @returns {OAuthToken} - New OAuthToken instance
2664
- */
2665
-
2666
-
2667
- static fromResponseObject(data) {
2668
- if (typeof data === 'string') {
2669
- data = JSON.parse(data);
2670
- } // Default expires = 5 days
2671
-
2672
-
2673
- let expires = 432000;
2674
-
2675
- if (typeof data['exipires_in'] !== 'undefined') {
2676
- expires = Number(data['expires_in']);
2677
- } else if (typeof data.expires === 'string') {
2678
- expires = new Date(data.expires);
2679
- }
2680
-
2681
- return new OAuthToken(data['access_token'], data['token_type'], expires, data.scope || []);
2682
- }
2683
- /**
2684
- * Store the token for later recovery. Token will be stored in HTTPS cookie if possible.
2685
- * @param {String} name - db key name
2686
- * @throws {OAuthToken#recover}
2687
- */
2688
-
2689
-
2690
- save(name = OAuthToken.storageName) {
2691
- const data = {
2692
- token: this.token,
2693
- type: this.type,
2694
- expires: this.expires.toUTCString(),
2695
- scopes: this.scopes
2696
- }; // Third parameter is only used when we're using cookies
2697
-
2698
- _storage_StorageManager__WEBPACK_IMPORTED_MODULE_0__["default"].secure.set(name, JSON.stringify(data), this.expires);
2699
- }
2700
- /**
2701
- * Recover a token by looking through the HTTPS cookies and localStorage
2702
- * @param {String} name - Storage key name
2703
- * @returns {OAuthToken|null} - null if none could be recovered
2704
- * @throws {OAuthToken#save}
2705
- */
2706
-
2707
-
2708
- static recover(name = OAuthToken.storageName) {
2709
- const data = _storage_StorageManager__WEBPACK_IMPORTED_MODULE_0__["default"].secure.get(name);
2710
-
2711
- if (!data) {
2712
- return null;
2713
- }
2714
-
2715
- const obj = JSON.parse(data);
2716
- const instance = new OAuthToken(obj.token, obj.type, new Date(obj.expires), obj.scopes || []);
2717
-
2718
- if (instance.expired) {
2719
- return null;
2720
- }
2721
-
2722
- return instance;
2521
+ function isNode() {
2522
+ try {
2523
+ return Object.prototype.toString.call(typeof process === 'undefined' ? 0 : process) === '[object process]';
2524
+ } catch (_) {
2525
+ return false;
2723
2526
  }
2527
+ }
2528
+ /**
2529
+ * Quickly check if the window contains a variable
2530
+ * @param {string} str - target variable
2531
+ * @returns {boolean} - If the window contains the variable
2532
+ * @private
2533
+ */
2724
2534
 
2535
+ function windowTest(str) {
2536
+ return typeof window !== 'undefined' && typeof window[str] !== 'undefined';
2725
2537
  }
2726
2538
 
2727
2539
  /***/ }),
2728
- /* 11 */
2540
+ /* 10 */
2729
2541
  /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
2730
2542
 
2731
2543
  "use strict";
@@ -2821,7 +2633,7 @@ class CrudSetItemBase extends _CrudBase__WEBPACK_IMPORTED_MODULE_1__["default"]
2821
2633
  }
2822
2634
 
2823
2635
  /***/ }),
2824
- /* 12 */
2636
+ /* 11 */
2825
2637
  /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
2826
2638
 
2827
2639
  "use strict";
@@ -3018,7 +2830,7 @@ class Enum extends Unobservable {
3018
2830
  }
3019
2831
 
3020
2832
  /***/ }),
3021
- /* 13 */
2833
+ /* 12 */
3022
2834
  /***/ ((module) => {
3023
2835
 
3024
2836
  function _defineProperty(obj, key, value) {
@@ -3039,24 +2851,16 @@ function _defineProperty(obj, key, value) {
3039
2851
  module.exports = _defineProperty;
3040
2852
 
3041
2853
  /***/ }),
3042
- /* 14 */
2854
+ /* 13 */
3043
2855
  /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
3044
2856
 
3045
2857
  "use strict";
3046
2858
  __webpack_require__.r(__webpack_exports__);
3047
2859
  /* harmony export */ __webpack_require__.d(__webpack_exports__, {
3048
- /* harmony export */ "default": () => (/* binding */ OAuth)
2860
+ /* harmony export */ "default": () => (/* binding */ OAuthToken)
3049
2861
  /* harmony export */ });
3050
- /* harmony import */ var _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(13);
3051
- /* harmony import */ var _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_0__);
3052
- /* harmony import */ var ky_universal__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(31);
3053
- /* harmony import */ var _errors_AbstractError__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(22);
3054
- /* harmony import */ var _storage_StorageManager__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(20);
3055
- /* harmony import */ var _OAuthToken__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(10);
3056
- /* harmony import */ var _StateContainer__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(42);
3057
- /* harmony import */ var _utils_helpers__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(1);
3058
-
3059
-
2862
+ /* harmony import */ var _storage_StorageManager__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(20);
2863
+ /* harmony import */ var _utils_requests__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(6);
3060
2864
  /*
3061
2865
  * BSD 3-Clause License
3062
2866
  *
@@ -3090,111 +2894,152 @@ __webpack_require__.r(__webpack_exports__);
3090
2894
  */
3091
2895
 
3092
2896
 
3093
-
3094
-
3095
-
3096
-
3097
2897
  /**
3098
- * OAuth base class
3099
- * @abstract
2898
+ * Oauth token container
3100
2899
  */
3101
2900
 
3102
- class OAuth {
2901
+ class OAuthToken {
3103
2902
  /**
3104
- * @param {String} clientId - OAuth client id
3105
- * @param {Array<String>} scopes - A list of required scopes
2903
+ * @param {String} token - OAuth token
2904
+ * @param {String} [type=Bearer] - token type
2905
+ * @param {Date|Number} [expires=5 days] - expire time in seconds or Date
2906
+ * @param {Array<string>} [scopes=[]] - Any scopes
3106
2907
  */
3107
- constructor(clientId, scopes = ['*']) {
3108
- _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_0___default()(this, "token", null);
3109
-
3110
- _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_0___default()(this, "path", '/');
2908
+ constructor(token, type = 'Bearer', expires = 432000, scopes = []) {
2909
+ this.scopes = scopes;
2910
+ this.token = token;
2911
+ this.type = type.toLowerCase().replace(/(\s|^)\w/g, x => x.toUpperCase());
3111
2912
 
3112
- _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_0___default()(this, "host", "https://api.beta.mapcreator.io");
2913
+ if (typeof expires === 'number') {
2914
+ const ms = expires * 1000; // Expires is in seconds
3113
2915
 
3114
- if (this.constructor === OAuth) {
3115
- throw new _errors_AbstractError__WEBPACK_IMPORTED_MODULE_2__.AbstractClassError();
2916
+ this.expires = new Date(Date.now() + ms);
2917
+ } else if (expires instanceof Date) {
2918
+ this.expires = expires;
2919
+ } else {
2920
+ throw new TypeError('Expires not of type Date or Number');
3116
2921
  }
2922
+ }
2923
+ /**
2924
+ * String representation of the token, usable in the Authorization header
2925
+ * @returns {string} - String representation
2926
+ */
3117
2927
 
3118
- this.clientId = String(clientId);
3119
- this.scopes = scopes;
3120
2928
 
3121
- if (this.clientId) {
3122
- this.token = _OAuthToken__WEBPACK_IMPORTED_MODULE_4__["default"].recover();
3123
- }
2929
+ toString() {
2930
+ return `${this.type} ${this.token}`;
3124
2931
  }
3125
2932
  /**
3126
- * If the current instance has a valid token
3127
- * @returns {Boolean} - If a valid token is available
2933
+ * Get equivalent OAuth response object
2934
+ * @returns {{access_token: (String|*), token_type: String, expires_in: Number, scope: (Array.<String>|Array|*)}} - Raw response object
3128
2935
  */
3129
2936
 
3130
2937
 
3131
- get authenticated() {
3132
- return this.token !== null && !this.token.expired;
2938
+ toResponseObject() {
2939
+ return {
2940
+ 'access_token': this.token,
2941
+ 'token_type': this.type.toLowerCase(),
2942
+ 'expires_in': this.expires - Date.now(),
2943
+ 'scope': this.scopes
2944
+ };
3133
2945
  }
3134
2946
  /**
3135
- * Authenticate
3136
- * @returns {Promise<OAuthToken>} - Authentication token
3137
- * @throws {OAuthError}
3138
- * @abstract
2947
+ * Export oauth response query string
2948
+ * @returns {string} - OAuth response query
3139
2949
  */
3140
2950
 
3141
2951
 
3142
- authenticate() {
3143
- throw new _errors_AbstractError__WEBPACK_IMPORTED_MODULE_2__.AbstractMethodError();
2952
+ toQueryString() {
2953
+ return (0,_utils_requests__WEBPACK_IMPORTED_MODULE_1__.encodeQueryString)(this.toResponseObject());
3144
2954
  }
3145
2955
  /**
3146
- * Forget the current session
3147
- * Empty the session token store and forget the api token
2956
+ * If the token has expired
2957
+ * @returns {Boolean} - expired
3148
2958
  */
3149
2959
 
3150
2960
 
3151
- forget() {
3152
- _StateContainer__WEBPACK_IMPORTED_MODULE_5__["default"].clean();
3153
- _storage_StorageManager__WEBPACK_IMPORTED_MODULE_3__["default"].secure.remove(_OAuthToken__WEBPACK_IMPORTED_MODULE_4__["default"].storageName);
3154
- this.token = null;
2961
+ get expired() {
2962
+ return new Date() > this.expires;
3155
2963
  }
3156
2964
  /**
3157
- * Invalidates the session token
3158
- * @throws {OAuthError} - If de-authentication fails
3159
- * @throws {ApiError} - If the api returns errors
3160
- * @returns {CancelablePromise}
2965
+ * Internal storage key name
2966
+ * @returns {String} - storage name
2967
+ * @constant
3161
2968
  */
3162
2969
 
3163
2970
 
3164
- logout() {
3165
- if (!this.token) {
3166
- return (0,_utils_helpers__WEBPACK_IMPORTED_MODULE_6__.makeCancelable)(() => {});
2971
+ static get storageName() {
2972
+ return 'api_token';
2973
+ }
2974
+ /**
2975
+ * Build instance from response object
2976
+ * @param {String|Object} data - object or JSON string
2977
+ * @returns {OAuthToken} - New OAuthToken instance
2978
+ */
2979
+
2980
+
2981
+ static fromResponseObject(data) {
2982
+ if (typeof data === 'string') {
2983
+ data = JSON.parse(data);
2984
+ } // Default expires = 5 days
2985
+
2986
+
2987
+ let expires = 432000;
2988
+
2989
+ if (typeof data['exipires_in'] !== 'undefined') {
2990
+ expires = Number(data['expires_in']);
2991
+ } else if (typeof data.expires === 'string') {
2992
+ expires = new Date(data.expires);
3167
2993
  }
3168
2994
 
3169
- const url = `${this.host}/oauth/logout`;
3170
- return (0,_utils_helpers__WEBPACK_IMPORTED_MODULE_6__.makeCancelable)(async signal => {
3171
- await ky_universal__WEBPACK_IMPORTED_MODULE_1__["default"].post(url, {
3172
- headers: {
3173
- Accept: 'application/json',
3174
- Authorization: this.token.toString()
3175
- },
3176
- signal
3177
- });
3178
- this.forget();
3179
- });
2995
+ return new OAuthToken(data['access_token'], data['token_type'], expires, data.scope || []);
3180
2996
  }
3181
2997
  /**
3182
- * Manually import OAuthToken, usefull for debugging
3183
- * @param {String} token - OAuth token
3184
- * @param {String} [type=Bearer] - token type
3185
- * @param {Date|Number} [expires=5 days] - expire time in seconds or Date
3186
- * @param {Array<string>} [scopes=[]] - Any scopes
2998
+ * Store the token for later recovery. Token will be stored in HTTPS cookie if possible.
2999
+ * @param {String} name - db key name
3000
+ * @throws {OAuthToken#recover}
3187
3001
  */
3188
3002
 
3189
3003
 
3190
- importToken(token, type = 'Bearer', expires = 432000, scopes = []) {
3191
- this.token = new _OAuthToken__WEBPACK_IMPORTED_MODULE_4__["default"](token, type, expires, scopes);
3004
+ save(name = OAuthToken.storageName) {
3005
+ const data = {
3006
+ token: this.token,
3007
+ type: this.type,
3008
+ expires: this.expires.toUTCString(),
3009
+ scopes: this.scopes
3010
+ }; // Third parameter is only used when we're using cookies
3011
+
3012
+ _storage_StorageManager__WEBPACK_IMPORTED_MODULE_0__["default"].secure.set(name, JSON.stringify(data), this.expires);
3013
+ }
3014
+ /**
3015
+ * Recover a token by looking through the HTTPS cookies and localStorage
3016
+ * @param {String} name - Storage key name
3017
+ * @returns {OAuthToken|null} - null if none could be recovered
3018
+ * @throws {OAuthToken#save}
3019
+ */
3020
+
3021
+
3022
+ static recover(name = OAuthToken.storageName) {
3023
+ const data = _storage_StorageManager__WEBPACK_IMPORTED_MODULE_0__["default"].secure.get(name);
3024
+
3025
+ if (!data) {
3026
+ return null;
3027
+ }
3028
+
3029
+ const obj = JSON.parse(data);
3030
+ const instance = new OAuthToken(obj.token, obj.type, new Date(obj.expires), obj.scopes || []);
3031
+
3032
+ if (instance.expired) {
3033
+ return null;
3034
+ }
3035
+
3036
+ return instance;
3192
3037
  }
3193
3038
 
3194
3039
  }
3195
3040
 
3196
3041
  /***/ }),
3197
- /* 15 */
3042
+ /* 14 */
3198
3043
  /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
3199
3044
 
3200
3045
  "use strict";
@@ -3203,7 +3048,7 @@ __webpack_require__.r(__webpack_exports__);
3203
3048
  /* harmony export */ "default": () => (/* binding */ ResourceProxy)
3204
3049
  /* harmony export */ });
3205
3050
  /* harmony import */ var _utils_requests__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(6);
3206
- /* harmony import */ var _SimpleResourceProxy__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(16);
3051
+ /* harmony import */ var _SimpleResourceProxy__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(15);
3207
3052
  /* harmony import */ var _utils_helpers__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(1);
3208
3053
  /*
3209
3054
  * BSD 3-Clause License
@@ -3321,7 +3166,7 @@ class ResourceProxy extends _SimpleResourceProxy__WEBPACK_IMPORTED_MODULE_1__["d
3321
3166
  }
3322
3167
 
3323
3168
  /***/ }),
3324
- /* 16 */
3169
+ /* 15 */
3325
3170
  /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
3326
3171
 
3327
3172
  "use strict";
@@ -3334,9 +3179,9 @@ __webpack_require__.d(__webpack_exports__, {
3334
3179
  });
3335
3180
 
3336
3181
  // EXTERNAL MODULE: ./src/Mapcreator.js + 1 modules
3337
- var Mapcreator = __webpack_require__(18);
3182
+ var Mapcreator = __webpack_require__(17);
3338
3183
  // EXTERNAL MODULE: ./src/RequestParameters.js
3339
- var RequestParameters = __webpack_require__(9);
3184
+ var RequestParameters = __webpack_require__(8);
3340
3185
  // EXTERNAL MODULE: ./src/utils/reflection.js
3341
3186
  var reflection = __webpack_require__(0);
3342
3187
  // EXTERNAL MODULE: ./src/utils/helpers.js
@@ -3861,7 +3706,7 @@ class SimpleResourceProxy {
3861
3706
  }
3862
3707
 
3863
3708
  /***/ }),
3864
- /* 17 */
3709
+ /* 16 */
3865
3710
  /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
3866
3711
 
3867
3712
  "use strict";
@@ -3957,7 +3802,7 @@ class CrudSetBase extends _CrudBase__WEBPACK_IMPORTED_MODULE_1__["default"] {
3957
3802
  }
3958
3803
 
3959
3804
  /***/ }),
3960
- /* 18 */
3805
+ /* 17 */
3961
3806
  /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
3962
3807
 
3963
3808
  "use strict";
@@ -3976,16 +3821,16 @@ var enums = __webpack_require__(7);
3976
3821
  // EXTERNAL MODULE: ./src/oauth/DummyFlow.js
3977
3822
  var DummyFlow = __webpack_require__(76);
3978
3823
  // EXTERNAL MODULE: ./src/oauth/OAuth.js
3979
- var OAuth = __webpack_require__(14);
3824
+ var OAuth = __webpack_require__(19);
3980
3825
  // EXTERNAL MODULE: ./src/oauth/OAuthToken.js
3981
- var OAuthToken = __webpack_require__(10);
3826
+ var OAuthToken = __webpack_require__(13);
3982
3827
  // EXTERNAL MODULE: ./src/proxy/GeoResourceProxy.js
3983
3828
  var GeoResourceProxy = __webpack_require__(43);
3984
3829
  // EXTERNAL MODULE: ./src/proxy/ResourceProxy.js
3985
- var ResourceProxy = __webpack_require__(15);
3830
+ var ResourceProxy = __webpack_require__(14);
3986
3831
  // EXTERNAL MODULE: ./src/proxy/SimpleResourceProxy.js + 1 modules
3987
- var SimpleResourceProxy = __webpack_require__(16);
3988
- // EXTERNAL MODULE: ./src/resources/index.js + 11 modules
3832
+ var SimpleResourceProxy = __webpack_require__(15);
3833
+ // EXTERNAL MODULE: ./src/resources/index.js + 12 modules
3989
3834
  var resources = __webpack_require__(30);
3990
3835
  // EXTERNAL MODULE: ./src/resources/base/ResourceBase.js
3991
3836
  var ResourceBase = __webpack_require__(3);
@@ -4394,8 +4239,6 @@ class Mapcreator extends (0,reflection.mix)((events_default()), Injectable["defa
4394
4239
  // throwHttpErrors: false, // This is done through a custom hook
4395
4240
  // redirect: 'error',
4396
4241
  retry: 0,
4397
- credentials: 'include',
4398
- // Include cookies in requests
4399
4242
  headers: {
4400
4243
  'Accept': 'application/json',
4401
4244
  'X-No-CDN-Redirect': 'true'
@@ -4543,6 +4386,16 @@ class Mapcreator extends (0,reflection.mix)((events_default()), Injectable["defa
4543
4386
  get dimensionSets() {
4544
4387
  return this.static(resources.DimensionSet);
4545
4388
  }
4389
+ /**
4390
+ * Domain login method accessor
4391
+ * @see {@link DomainLoginMethod}
4392
+ * @returns {ResourceProxy<DomainLoginMethod>} - A proxy for accessing the resource
4393
+ */
4394
+
4395
+
4396
+ get domainLoginMethods() {
4397
+ return this.static(resources.DomainLoginMethod);
4398
+ }
4546
4399
  /**
4547
4400
  * Faq accessor
4548
4401
  * @see {@link Faq}
@@ -4850,15 +4703,103 @@ class Mapcreator extends (0,reflection.mix)((events_default()), Injectable["defa
4850
4703
  });
4851
4704
  }
4852
4705
  /**
4853
- * Forget the current session
4854
- * This will clean up any stored OAuth states stored using {@link StateContainer} and any OAuth tokens stored
4855
- * @returns {CancelablePromise}
4856
- * @throws {ApiError} - If the api returns errors
4706
+ * Forget the current session
4707
+ * This will clean up any stored OAuth states stored using {@link StateContainer} and any OAuth tokens stored
4708
+ * @returns {CancelablePromise}
4709
+ * @throws {ApiError} - If the api returns errors
4710
+ */
4711
+
4712
+
4713
+ logout() {
4714
+ return this.auth.logout();
4715
+ }
4716
+
4717
+ }
4718
+
4719
+ /***/ }),
4720
+ /* 18 */
4721
+ /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
4722
+
4723
+ "use strict";
4724
+ __webpack_require__.r(__webpack_exports__);
4725
+ /* harmony export */ __webpack_require__.d(__webpack_exports__, {
4726
+ /* harmony export */ "default": () => (/* binding */ OAuthError)
4727
+ /* harmony export */ });
4728
+ /* harmony import */ var _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(12);
4729
+ /* harmony import */ var _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_0__);
4730
+
4731
+
4732
+ /*
4733
+ * BSD 3-Clause License
4734
+ *
4735
+ * Copyright (c) 2020, Mapcreator
4736
+ * All rights reserved.
4737
+ *
4738
+ * Redistribution and use in source and binary forms, with or without
4739
+ * modification, are permitted provided that the following conditions are met:
4740
+ *
4741
+ * Redistributions of source code must retain the above copyright notice, this
4742
+ * list of conditions and the following disclaimer.
4743
+ *
4744
+ * Redistributions in binary form must reproduce the above copyright notice,
4745
+ * this list of conditions and the following disclaimer in the documentation
4746
+ * and/or other materials provided with the distribution.
4747
+ *
4748
+ * Neither the name of the copyright holder nor the names of its
4749
+ * contributors may be used to endorse or promote products derived from
4750
+ * this software without specific prior written permission.
4751
+ *
4752
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
4753
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
4754
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
4755
+ * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
4756
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
4757
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
4758
+ * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
4759
+ * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
4760
+ * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
4761
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
4762
+ */
4763
+
4764
+ /**
4765
+ * OAuth error
4766
+ */
4767
+ class OAuthError extends Error {
4768
+ /**
4769
+ * OAuth error code
4770
+ * @type {String}
4771
+ */
4772
+
4773
+ /**
4774
+ * OAuth error response
4775
+ * @param {String} error - OAuth error key
4776
+ * @param {String} message - OAuth error message
4777
+ */
4778
+ constructor(error, message = '') {
4779
+ super(message);
4780
+
4781
+ _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_0___default()(this, "error", void 0);
4782
+
4783
+ this.error = String(error);
4784
+ }
4785
+ /**
4786
+ * Displayable error string
4787
+ * @returns {String} - error
4857
4788
  */
4858
4789
 
4859
4790
 
4860
- logout() {
4861
- return this.auth.logout();
4791
+ toString() {
4792
+ let error = this.error;
4793
+
4794
+ if (error.includes('_')) {
4795
+ error = error.replace('_', ' ').replace(/^./, x => x.toUpperCase());
4796
+ }
4797
+
4798
+ if (this.message) {
4799
+ return `${error}: ${this.message}`;
4800
+ }
4801
+
4802
+ return error;
4862
4803
  }
4863
4804
 
4864
4805
  }
@@ -4870,10 +4811,16 @@ class Mapcreator extends (0,reflection.mix)((events_default()), Injectable["defa
4870
4811
  "use strict";
4871
4812
  __webpack_require__.r(__webpack_exports__);
4872
4813
  /* harmony export */ __webpack_require__.d(__webpack_exports__, {
4873
- /* harmony export */ "default": () => (/* binding */ OAuthError)
4814
+ /* harmony export */ "default": () => (/* binding */ OAuth)
4874
4815
  /* harmony export */ });
4875
- /* harmony import */ var _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(13);
4816
+ /* harmony import */ var _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(12);
4876
4817
  /* harmony import */ var _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_0__);
4818
+ /* harmony import */ var ky_universal__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(31);
4819
+ /* harmony import */ var _errors_AbstractError__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(22);
4820
+ /* harmony import */ var _storage_StorageManager__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(20);
4821
+ /* harmony import */ var _OAuthToken__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(13);
4822
+ /* harmony import */ var _StateContainer__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(42);
4823
+ /* harmony import */ var _utils_helpers__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(1);
4877
4824
 
4878
4825
 
4879
4826
  /*
@@ -4908,45 +4855,106 @@ __webpack_require__.r(__webpack_exports__);
4908
4855
  * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
4909
4856
  */
4910
4857
 
4858
+
4859
+
4860
+
4861
+
4862
+
4911
4863
  /**
4912
- * OAuth error
4864
+ * OAuth base class
4865
+ * @abstract
4913
4866
  */
4914
- class OAuthError extends Error {
4867
+
4868
+ class OAuth {
4915
4869
  /**
4916
- * OAuth error code
4917
- * @type {String}
4870
+ * @param {String} clientId - OAuth client id
4871
+ * @param {Array<String>} scopes - A list of required scopes
4918
4872
  */
4873
+ constructor(clientId, scopes = ['*']) {
4874
+ _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_0___default()(this, "token", null);
4875
+
4876
+ _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_0___default()(this, "path", '/');
4877
+
4878
+ _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_0___default()(this, "host", "https://api.beta.mapcreator.io");
4879
+
4880
+ if (this.constructor === OAuth) {
4881
+ throw new _errors_AbstractError__WEBPACK_IMPORTED_MODULE_2__.AbstractClassError();
4882
+ }
4883
+
4884
+ this.clientId = String(clientId);
4885
+ this.scopes = scopes;
4919
4886
 
4887
+ if (this.clientId) {
4888
+ this.token = _OAuthToken__WEBPACK_IMPORTED_MODULE_4__["default"].recover();
4889
+ }
4890
+ }
4920
4891
  /**
4921
- * OAuth error response
4922
- * @param {String} error - OAuth error key
4923
- * @param {String} message - OAuth error message
4892
+ * If the current instance has a valid token
4893
+ * @returns {Boolean} - If a valid token is available
4924
4894
  */
4925
- constructor(error, message = '') {
4926
- super(message);
4927
4895
 
4928
- _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_0___default()(this, "error", void 0);
4929
4896
 
4930
- this.error = String(error);
4897
+ get authenticated() {
4898
+ return this.token !== null && !this.token.expired;
4931
4899
  }
4932
4900
  /**
4933
- * Displayable error string
4934
- * @returns {String} - error
4901
+ * Authenticate
4902
+ * @returns {Promise<OAuthToken>} - Authentication token
4903
+ * @throws {OAuthError}
4904
+ * @abstract
4935
4905
  */
4936
4906
 
4937
4907
 
4938
- toString() {
4939
- let error = this.error;
4908
+ authenticate() {
4909
+ throw new _errors_AbstractError__WEBPACK_IMPORTED_MODULE_2__.AbstractMethodError();
4910
+ }
4911
+ /**
4912
+ * Forget the current session
4913
+ * Empty the session token store and forget the api token
4914
+ */
4940
4915
 
4941
- if (error.includes('_')) {
4942
- error = error.replace('_', ' ').replace(/^./, x => x.toUpperCase());
4943
- }
4944
4916
 
4945
- if (this.message) {
4946
- return `${error}: ${this.message}`;
4917
+ forget() {
4918
+ _StateContainer__WEBPACK_IMPORTED_MODULE_5__["default"].clean();
4919
+ _storage_StorageManager__WEBPACK_IMPORTED_MODULE_3__["default"].secure.remove(_OAuthToken__WEBPACK_IMPORTED_MODULE_4__["default"].storageName);
4920
+ this.token = null;
4921
+ }
4922
+ /**
4923
+ * Invalidates the session token
4924
+ * @throws {OAuthError} - If de-authentication fails
4925
+ * @throws {ApiError} - If the api returns errors
4926
+ * @returns {CancelablePromise}
4927
+ */
4928
+
4929
+
4930
+ logout() {
4931
+ if (!this.token) {
4932
+ return (0,_utils_helpers__WEBPACK_IMPORTED_MODULE_6__.makeCancelable)(() => {});
4947
4933
  }
4948
4934
 
4949
- return error;
4935
+ const url = `${this.host}/oauth/logout`;
4936
+ return (0,_utils_helpers__WEBPACK_IMPORTED_MODULE_6__.makeCancelable)(async signal => {
4937
+ await ky_universal__WEBPACK_IMPORTED_MODULE_1__["default"].post(url, {
4938
+ headers: {
4939
+ Accept: 'application/json',
4940
+ Authorization: this.token.toString()
4941
+ },
4942
+ signal
4943
+ });
4944
+ this.forget();
4945
+ });
4946
+ }
4947
+ /**
4948
+ * Manually import OAuthToken, usefull for debugging
4949
+ * @param {String} token - OAuth token
4950
+ * @param {String} [type=Bearer] - token type
4951
+ * @param {Date|Number} [expires=5 days] - expire time in seconds or Date
4952
+ * @param {Array<string>} [scopes=[]] - Any scopes
4953
+ */
4954
+
4955
+
4956
+ importToken(token, type = 'Bearer', expires = 432000, scopes = []) {
4957
+ this.token = new _OAuthToken__WEBPACK_IMPORTED_MODULE_4__["default"](token, type, expires, scopes);
4950
4958
  }
4951
4959
 
4952
4960
  }
@@ -4967,7 +4975,7 @@ __webpack_require__.d(__webpack_exports__, {
4967
4975
  // EXTERNAL MODULE: ./src/utils/StaticClass.js
4968
4976
  var StaticClass = __webpack_require__(34);
4969
4977
  // EXTERNAL MODULE: ./src/utils/node.js
4970
- var node = __webpack_require__(8);
4978
+ var node = __webpack_require__(9);
4971
4979
  // EXTERNAL MODULE: ./src/storage/DataStoreContract.js
4972
4980
  var DataStoreContract = __webpack_require__(23);
4973
4981
  ;// CONCATENATED MODULE: ./src/storage/CookiesDriver.js
@@ -5107,7 +5115,7 @@ class CookiesDriver extends DataStoreContract["default"] {
5107
5115
 
5108
5116
  }
5109
5117
  // EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/defineProperty.js
5110
- var defineProperty = __webpack_require__(13);
5118
+ var defineProperty = __webpack_require__(12);
5111
5119
  var defineProperty_default = /*#__PURE__*/__webpack_require__.n(defineProperty);
5112
5120
  ;// CONCATENATED MODULE: ./src/storage/DummyDriver.js
5113
5121
 
@@ -5442,7 +5450,7 @@ __webpack_require__.r(__webpack_exports__);
5442
5450
  /* harmony export */ __webpack_require__.d(__webpack_exports__, {
5443
5451
  /* harmony export */ "default": () => (/* binding */ OwnedResourceProxy)
5444
5452
  /* harmony export */ });
5445
- /* harmony import */ var _SimpleResourceProxy__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(16);
5453
+ /* harmony import */ var _SimpleResourceProxy__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(15);
5446
5454
  /* harmony import */ var _utils_helpers__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(1);
5447
5455
  /*
5448
5456
  * BSD 3-Clause License
@@ -6424,7 +6432,7 @@ function base64Encode(buffer) {
6424
6432
  return base64;
6425
6433
  }
6426
6434
  // EXTERNAL MODULE: ./src/utils/node.js
6427
- var node = __webpack_require__(8);
6435
+ var node = __webpack_require__(9);
6428
6436
  ;// CONCATENATED MODULE: ./src/resources/base/DownloadedResource.js
6429
6437
  /*
6430
6438
  * BSD 3-Clause License
@@ -6756,13 +6764,13 @@ var OwnableResource = __webpack_require__(4);
6756
6764
  // EXTERNAL MODULE: ./src/utils/reflection.js
6757
6765
  var reflection = __webpack_require__(0);
6758
6766
  // EXTERNAL MODULE: ./src/resources/base/CrudSetBase.js
6759
- var CrudSetBase = __webpack_require__(17);
6767
+ var CrudSetBase = __webpack_require__(16);
6760
6768
  // EXTERNAL MODULE: ./src/resources/Mapstyle.js
6761
6769
  var Mapstyle = __webpack_require__(70);
6762
6770
  // EXTERNAL MODULE: ./src/proxy/ResourceProxy.js
6763
- var ResourceProxy = __webpack_require__(15);
6771
+ var ResourceProxy = __webpack_require__(14);
6764
6772
  // EXTERNAL MODULE: ./src/resources/base/CrudSetItemBase.js
6765
- var CrudSetItemBase = __webpack_require__(11);
6773
+ var CrudSetItemBase = __webpack_require__(10);
6766
6774
  ;// CONCATENATED MODULE: ./src/resources/MapstyleSetColor.js
6767
6775
  /*
6768
6776
  * BSD 3-Clause License
@@ -6892,7 +6900,7 @@ __webpack_require__.r(__webpack_exports__);
6892
6900
  /* harmony export */ });
6893
6901
  /* harmony import */ var _traits_OwnableResource__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(4);
6894
6902
  /* harmony import */ var _utils_reflection__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(0);
6895
- /* harmony import */ var _base_CrudSetItemBase__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(11);
6903
+ /* harmony import */ var _base_CrudSetItemBase__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(10);
6896
6904
  /*
6897
6905
  * BSD 3-Clause License
6898
6906
  *
@@ -6960,6 +6968,7 @@ __webpack_require__.d(__webpack_exports__, {
6960
6968
  "Dimension": () => (/* reexport */ Dimension["default"]),
6961
6969
  "DimensionSet": () => (/* reexport */ DimensionSet["default"]),
6962
6970
  "Domain": () => (/* reexport */ Domain["default"]),
6971
+ "DomainLoginMethod": () => (/* reexport */ DomainLoginMethod),
6963
6972
  "Faq": () => (/* reexport */ Faq),
6964
6973
  "Feature": () => (/* reexport */ Feature["default"]),
6965
6974
  "Font": () => (/* reexport */ Font["default"]),
@@ -7085,6 +7094,49 @@ var DimensionSet = __webpack_require__(47);
7085
7094
  var Domain = __webpack_require__(68);
7086
7095
  // EXTERNAL MODULE: ./src/resources/base/CrudBase.js
7087
7096
  var CrudBase = __webpack_require__(2);
7097
+ ;// CONCATENATED MODULE: ./src/resources/DomainLoginMethod.js
7098
+ /*
7099
+ * BSD 3-Clause License
7100
+ *
7101
+ * Copyright (c) 2020, Mapcreator
7102
+ * All rights reserved.
7103
+ *
7104
+ * Redistribution and use in source and binary forms, with or without
7105
+ * modification, are permitted provided that the following conditions are met:
7106
+ *
7107
+ * Redistributions of source code must retain the above copyright notice, this
7108
+ * list of conditions and the following disclaimer.
7109
+ *
7110
+ * Redistributions in binary form must reproduce the above copyright notice,
7111
+ * this list of conditions and the following disclaimer in the documentation
7112
+ * and/or other materials provided with the distribution.
7113
+ *
7114
+ * Neither the name of the copyright holder nor the names of its
7115
+ * contributors may be used to endorse or promote products derived from
7116
+ * this software without specific prior written permission.
7117
+ *
7118
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
7119
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
7120
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
7121
+ * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
7122
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
7123
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
7124
+ * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
7125
+ * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
7126
+ * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
7127
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
7128
+ */
7129
+
7130
+ /**
7131
+ * Domain login method resource
7132
+ */
7133
+
7134
+ class DomainLoginMethod extends CrudBase["default"] {
7135
+ static get resourceName() {
7136
+ return 'domain-login-methods';
7137
+ }
7138
+
7139
+ }
7088
7140
  ;// CONCATENATED MODULE: ./src/resources/Faq.js
7089
7141
  /*
7090
7142
  * BSD 3-Clause License
@@ -7240,7 +7292,7 @@ var Language = __webpack_require__(71);
7240
7292
  // EXTERNAL MODULE: ./src/resources/Layer.js
7241
7293
  var Layer = __webpack_require__(27);
7242
7294
  // EXTERNAL MODULE: ./src/resources/base/CrudSetItemBase.js
7243
- var CrudSetItemBase = __webpack_require__(11);
7295
+ var CrudSetItemBase = __webpack_require__(10);
7244
7296
  ;// CONCATENATED MODULE: ./src/resources/LayerFaq.js
7245
7297
  /*
7246
7298
  * BSD 3-Clause License
@@ -7366,7 +7418,7 @@ class OrganisationNote extends (0,reflection.mix)(CrudBase["default"], OwnableRe
7366
7418
  // EXTERNAL MODULE: ./src/resources/Permission.js
7367
7419
  var Permission = __webpack_require__(59);
7368
7420
  // EXTERNAL MODULE: ./src/resources/base/CrudSetBase.js
7369
- var CrudSetBase = __webpack_require__(17);
7421
+ var CrudSetBase = __webpack_require__(16);
7370
7422
  ;// CONCATENATED MODULE: ./src/resources/ProductTourStep.js
7371
7423
  /*
7372
7424
  * BSD 3-Clause License
@@ -7686,6 +7738,7 @@ class VectorChoropleth extends ResourceBase["default"] {
7686
7738
 
7687
7739
 
7688
7740
 
7741
+
7689
7742
 
7690
7743
 
7691
7744
  /**
@@ -8416,7 +8469,7 @@ __webpack_require__.r(__webpack_exports__);
8416
8469
  /* harmony export */ "default": () => (/* binding */ OrganisationProxy)
8417
8470
  /* harmony export */ });
8418
8471
  /* harmony import */ var _utils_reflection__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(0);
8419
- /* harmony import */ var _SimpleResourceProxy__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(16);
8472
+ /* harmony import */ var _SimpleResourceProxy__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(15);
8420
8473
  /* harmony import */ var _utils_helpers__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(1);
8421
8474
  /*
8422
8475
  * BSD 3-Clause License
@@ -8648,7 +8701,7 @@ var ValidationError = __webpack_require__(78);
8648
8701
  */
8649
8702
  class NodeError extends Error {}
8650
8703
  // EXTERNAL MODULE: ./src/errors/OAuthError.js
8651
- var OAuthError = __webpack_require__(19);
8704
+ var OAuthError = __webpack_require__(18);
8652
8705
  // EXTERNAL MODULE: ./src/errors/StaticClassError.js
8653
8706
  var StaticClassError = __webpack_require__(62);
8654
8707
  // EXTERNAL MODULE: ./src/errors/GeoError.js
@@ -9583,9 +9636,9 @@ __webpack_require__.r(__webpack_exports__);
9583
9636
  /* harmony export */ "default": () => (/* binding */ GeoResourceProxy)
9584
9637
  /* harmony export */ });
9585
9638
  /* harmony import */ var _errors_GeoError__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(44);
9586
- /* harmony import */ var _RequestParameters__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(9);
9639
+ /* harmony import */ var _RequestParameters__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(8);
9587
9640
  /* harmony import */ var _utils_geo__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(64);
9588
- /* harmony import */ var _ResourceProxy__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(15);
9641
+ /* harmony import */ var _ResourceProxy__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(14);
9589
9642
  /* harmony import */ var _utils_helpers__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(1);
9590
9643
  /*
9591
9644
  * BSD 3-Clause License
@@ -9823,7 +9876,7 @@ __webpack_require__.r(__webpack_exports__);
9823
9876
  /* harmony import */ var _utils_requests__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(6);
9824
9877
  /* harmony import */ var _LayerGroup__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(74);
9825
9878
  /* harmony import */ var _index__WEBPACK_IMPORTED_MODULE_19__ = __webpack_require__(30);
9826
- /* harmony import */ var _proxy_ResourceProxy__WEBPACK_IMPORTED_MODULE_20__ = __webpack_require__(15);
9879
+ /* harmony import */ var _proxy_ResourceProxy__WEBPACK_IMPORTED_MODULE_20__ = __webpack_require__(14);
9827
9880
  /*
9828
9881
  * BSD 3-Clause License
9829
9882
  *
@@ -10136,7 +10189,7 @@ __webpack_require__.r(__webpack_exports__);
10136
10189
  /* harmony export */ __webpack_require__.d(__webpack_exports__, {
10137
10190
  /* harmony export */ "default": () => (/* binding */ DimensionSet)
10138
10191
  /* harmony export */ });
10139
- /* harmony import */ var _base_CrudSetBase__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(17);
10192
+ /* harmony import */ var _base_CrudSetBase__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(16);
10140
10193
  /* harmony import */ var _Dimension__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(48);
10141
10194
  /* harmony import */ var _traits_OwnableResource__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(4);
10142
10195
  /* harmony import */ var _utils_reflection__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(0);
@@ -10205,7 +10258,7 @@ __webpack_require__.r(__webpack_exports__);
10205
10258
  /* harmony export */ __webpack_require__.d(__webpack_exports__, {
10206
10259
  /* harmony export */ "default": () => (/* binding */ Dimension)
10207
10260
  /* harmony export */ });
10208
- /* harmony import */ var _base_CrudSetItemBase__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(11);
10261
+ /* harmony import */ var _base_CrudSetItemBase__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(10);
10209
10262
  /*
10210
10263
  * BSD 3-Clause License
10211
10264
  *
@@ -10319,7 +10372,7 @@ __webpack_require__.r(__webpack_exports__);
10319
10372
  /* harmony export */ });
10320
10373
  /* harmony import */ var _traits_OwnableResource__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(4);
10321
10374
  /* harmony import */ var _utils_reflection__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(0);
10322
- /* harmony import */ var _base_CrudSetBase__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(17);
10375
+ /* harmony import */ var _base_CrudSetBase__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(16);
10323
10376
  /* harmony import */ var _Font__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(51);
10324
10377
  /*
10325
10378
  * BSD 3-Clause License
@@ -10386,7 +10439,7 @@ __webpack_require__.r(__webpack_exports__);
10386
10439
  /* harmony export */ __webpack_require__.d(__webpack_exports__, {
10387
10440
  /* harmony export */ "default": () => (/* binding */ Font)
10388
10441
  /* harmony export */ });
10389
- /* harmony import */ var _base_CrudSetItemBase__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(11);
10442
+ /* harmony import */ var _base_CrudSetItemBase__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(10);
10390
10443
  /*
10391
10444
  * BSD 3-Clause License
10392
10445
  *
@@ -10439,12 +10492,12 @@ __webpack_require__.r(__webpack_exports__);
10439
10492
  /* harmony export */ __webpack_require__.d(__webpack_exports__, {
10440
10493
  /* harmony export */ "default": () => (/* binding */ Job)
10441
10494
  /* harmony export */ });
10442
- /* harmony import */ var _proxy_ResourceProxy__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(15);
10495
+ /* harmony import */ var _proxy_ResourceProxy__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(14);
10443
10496
  /* harmony import */ var _base_DownloadedResource__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(25);
10444
10497
  /* harmony import */ var _base_CrudBase__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(2);
10445
10498
  /* harmony import */ var _JobResult__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(53);
10446
10499
  /* harmony import */ var _JobRevision__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(69);
10447
- /* harmony import */ var _RequestParameters__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(9);
10500
+ /* harmony import */ var _RequestParameters__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(8);
10448
10501
  /* harmony import */ var _utils_requests__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(6);
10449
10502
  /* harmony import */ var _enums__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(7);
10450
10503
  /* harmony import */ var _utils_helpers__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(1);
@@ -10642,7 +10695,7 @@ __webpack_require__.r(__webpack_exports__);
10642
10695
  /* harmony export */ });
10643
10696
  /* harmony import */ var _base_DownloadedResource__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(25);
10644
10697
  /* harmony import */ var _base_ResourceBase__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(3);
10645
- /* harmony import */ var _RequestParameters__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(9);
10698
+ /* harmony import */ var _RequestParameters__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(8);
10646
10699
  /* harmony import */ var _utils_requests__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(6);
10647
10700
  /* harmony import */ var _enums__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(7);
10648
10701
  /* harmony import */ var _utils_helpers__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(1);
@@ -10869,7 +10922,7 @@ __webpack_require__.d(__webpack_exports__, {
10869
10922
  // EXTERNAL MODULE: ./src/traits/Trait.js
10870
10923
  var Trait = __webpack_require__(32);
10871
10924
  // EXTERNAL MODULE: ./src/Mapcreator.js + 1 modules
10872
- var Mapcreator = __webpack_require__(18);
10925
+ var Mapcreator = __webpack_require__(17);
10873
10926
  // EXTERNAL MODULE: ./src/resources/base/DownloadedResource.js + 1 modules
10874
10927
  var DownloadedResource = __webpack_require__(25);
10875
10928
  // EXTERNAL MODULE: ./src/resources/base/ResourceBase.js
@@ -11149,7 +11202,7 @@ __webpack_require__.r(__webpack_exports__);
11149
11202
  /* harmony export */ "default": () => (/* binding */ SvgSet)
11150
11203
  /* harmony export */ });
11151
11204
  /* harmony import */ var _traits_OwnableResource__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(4);
11152
- /* harmony import */ var _base_CrudSetBase__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(17);
11205
+ /* harmony import */ var _base_CrudSetBase__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(16);
11153
11206
  /* harmony import */ var _Svg__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(57);
11154
11207
  /* harmony import */ var _utils_reflection__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(0);
11155
11208
  /*
@@ -11217,7 +11270,7 @@ __webpack_require__.r(__webpack_exports__);
11217
11270
  /* harmony export */ __webpack_require__.d(__webpack_exports__, {
11218
11271
  /* harmony export */ "default": () => (/* binding */ Svg)
11219
11272
  /* harmony export */ });
11220
- /* harmony import */ var _base_CrudSetItemBase__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(11);
11273
+ /* harmony import */ var _base_CrudSetItemBase__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(10);
11221
11274
  /*
11222
11275
  * BSD 3-Clause License
11223
11276
  *
@@ -11267,7 +11320,7 @@ __webpack_require__.r(__webpack_exports__);
11267
11320
  /* harmony export */ "default": () => (/* binding */ User)
11268
11321
  /* harmony export */ });
11269
11322
  /* harmony import */ var _proxy_OwnedResourceProxy__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(21);
11270
- /* harmony import */ var _proxy_ResourceProxy__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(15);
11323
+ /* harmony import */ var _proxy_ResourceProxy__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(14);
11271
11324
  /* harmony import */ var _base_CrudBase__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(2);
11272
11325
  /* harmony import */ var _Color__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(46);
11273
11326
  /* harmony import */ var _Dimension__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(48);
@@ -11679,7 +11732,7 @@ __webpack_require__.r(__webpack_exports__);
11679
11732
  /* harmony export */ __webpack_require__.d(__webpack_exports__, {
11680
11733
  /* harmony export */ "default": () => (/* binding */ FileDriver)
11681
11734
  /* harmony export */ });
11682
- /* harmony import */ var _utils_node__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(8);
11735
+ /* harmony import */ var _utils_node__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(9);
11683
11736
  /* harmony import */ var _DataStoreContract__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(23);
11684
11737
  /*
11685
11738
  * BSD 3-Clause License
@@ -11879,7 +11932,7 @@ __webpack_require__.r(__webpack_exports__);
11879
11932
  /* harmony export */ "GeoPoint": () => (/* binding */ GeoPoint),
11880
11933
  /* harmony export */ "GeoBoundary": () => (/* binding */ GeoBoundary)
11881
11934
  /* harmony export */ });
11882
- /* harmony import */ var _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(13);
11935
+ /* harmony import */ var _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(12);
11883
11936
  /* harmony import */ var _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_0__);
11884
11937
  /* harmony import */ var _errors_GeoError__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(44);
11885
11938
 
@@ -12254,7 +12307,7 @@ class Injectable extends _Trait__WEBPACK_IMPORTED_MODULE_2__["default"] {
12254
12307
  return this._proxyResourceList(value);
12255
12308
  });
12256
12309
  } else {
12257
- const ResourceProxy = (__webpack_require__(15)["default"]);
12310
+ const ResourceProxy = (__webpack_require__(14)["default"]);
12258
12311
 
12259
12312
  this._inject(name, function () {
12260
12313
  return new ResourceProxy(this, value);
@@ -12290,7 +12343,7 @@ __webpack_require__.r(__webpack_exports__);
12290
12343
  /* harmony export */ __webpack_require__.d(__webpack_exports__, {
12291
12344
  /* harmony export */ "default": () => (/* binding */ ApiError)
12292
12345
  /* harmony export */ });
12293
- /* harmony import */ var _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(13);
12346
+ /* harmony import */ var _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(12);
12294
12347
  /* harmony import */ var _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_0__);
12295
12348
 
12296
12349
 
@@ -12566,7 +12619,7 @@ __webpack_require__.r(__webpack_exports__);
12566
12619
  /* harmony import */ var _JobResult__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(53);
12567
12620
  /* harmony import */ var _JobShare__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(26);
12568
12621
  /* harmony import */ var _Layer__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(27);
12569
- /* harmony import */ var _RequestParameters__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(9);
12622
+ /* harmony import */ var _RequestParameters__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(8);
12570
12623
  /* harmony import */ var _utils_requests__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(6);
12571
12624
  /* harmony import */ var _enums__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(7);
12572
12625
  /* harmony import */ var _utils_helpers__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(1);
@@ -12818,7 +12871,7 @@ __webpack_require__.r(__webpack_exports__);
12818
12871
  /* harmony export */ });
12819
12872
  /* harmony import */ var _traits_HandlesImages__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(54);
12820
12873
  /* harmony import */ var _utils_reflection__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(0);
12821
- /* harmony import */ var _base_CrudSetItemBase__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(11);
12874
+ /* harmony import */ var _base_CrudSetItemBase__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(10);
12822
12875
  /*
12823
12876
  * BSD 3-Clause License
12824
12877
  *
@@ -13059,7 +13112,7 @@ __webpack_require__.r(__webpack_exports__);
13059
13112
  /* harmony import */ var _traits_OwnableResource__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(4);
13060
13113
  /* harmony import */ var _utils_reflection__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(0);
13061
13114
  /* harmony import */ var _Layer__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(27);
13062
- /* harmony import */ var _base_CrudSetBase__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(17);
13115
+ /* harmony import */ var _base_CrudSetBase__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(16);
13063
13116
  /* harmony import */ var _proxy__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(75);
13064
13117
  /*
13065
13118
  * BSD 3-Clause License
@@ -13135,8 +13188,8 @@ __webpack_require__.r(__webpack_exports__);
13135
13188
  /* harmony import */ var _GeoResourceProxy__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(43);
13136
13189
  /* harmony import */ var _OrganisationProxy__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(35);
13137
13190
  /* harmony import */ var _OwnedResourceProxy__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(21);
13138
- /* harmony import */ var _ResourceProxy__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(15);
13139
- /* harmony import */ var _SimpleResourceProxy__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(16);
13191
+ /* harmony import */ var _ResourceProxy__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(14);
13192
+ /* harmony import */ var _SimpleResourceProxy__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(15);
13140
13193
  /*
13141
13194
  * BSD 3-Clause License
13142
13195
  *
@@ -13183,8 +13236,8 @@ __webpack_require__.r(__webpack_exports__);
13183
13236
  /* harmony export */ __webpack_require__.d(__webpack_exports__, {
13184
13237
  /* harmony export */ "default": () => (/* binding */ DummyFlow)
13185
13238
  /* harmony export */ });
13186
- /* harmony import */ var _errors_OAuthError__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(19);
13187
- /* harmony import */ var _OAuth__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(14);
13239
+ /* harmony import */ var _errors_OAuthError__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(18);
13240
+ /* harmony import */ var _OAuth__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(19);
13188
13241
  /*
13189
13242
  * BSD 3-Clause License
13190
13243
  *
@@ -13263,8 +13316,8 @@ __webpack_require__.r(__webpack_exports__);
13263
13316
  /* harmony import */ var case__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(case__WEBPACK_IMPORTED_MODULE_0__);
13264
13317
  /* harmony import */ var events__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(24);
13265
13318
  /* harmony import */ var events__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(events__WEBPACK_IMPORTED_MODULE_1__);
13266
- /* harmony import */ var _Mapcreator__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(18);
13267
- /* harmony import */ var _RequestParameters__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(9);
13319
+ /* harmony import */ var _Mapcreator__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(17);
13320
+ /* harmony import */ var _RequestParameters__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(8);
13268
13321
  /* harmony import */ var _resources_base_ResourceBase__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(3);
13269
13322
  /* harmony import */ var _utils_reflection__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(0);
13270
13323
  /* harmony import */ var _utils_helpers__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(1);
@@ -13662,7 +13715,7 @@ __webpack_require__.r(__webpack_exports__);
13662
13715
  /* harmony export */ __webpack_require__.d(__webpack_exports__, {
13663
13716
  /* harmony export */ "default": () => (/* binding */ ValidationError)
13664
13717
  /* harmony export */ });
13665
- /* harmony import */ var _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(13);
13718
+ /* harmony import */ var _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(12);
13666
13719
  /* harmony import */ var _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_0__);
13667
13720
  /* harmony import */ var _ApiError__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(66);
13668
13721
 
@@ -13927,7 +13980,6 @@ __webpack_require__.d(__webpack_exports__, {
13927
13980
  "AbstractError": () => (/* reexport */ AbstractError.AbstractError),
13928
13981
  "AbstractMethodError": () => (/* reexport */ AbstractError.AbstractMethodError),
13929
13982
  "ApiError": () => (/* reexport */ ApiError["default"]),
13930
- "CookieFlow": () => (/* reexport */ CookieFlow),
13931
13983
  "DeletedState": () => (/* reexport */ enums.DeletedState),
13932
13984
  "DummyFlow": () => (/* reexport */ DummyFlow["default"]),
13933
13985
  "Enum": () => (/* reexport */ Enum["default"]),
@@ -13952,27 +14004,27 @@ __webpack_require__.d(__webpack_exports__, {
13952
14004
  });
13953
14005
 
13954
14006
  // EXTERNAL MODULE: ./src/Mapcreator.js + 1 modules
13955
- var Mapcreator = __webpack_require__(18);
14007
+ var Mapcreator = __webpack_require__(17);
13956
14008
  // EXTERNAL MODULE: ./src/RequestParameters.js
13957
- var RequestParameters = __webpack_require__(9);
14009
+ var RequestParameters = __webpack_require__(8);
13958
14010
  // EXTERNAL MODULE: ./src/storage/StorageManager.js + 3 modules
13959
14011
  var StorageManager = __webpack_require__(20);
13960
14012
  // EXTERNAL MODULE: ./src/enums/Enum.js + 1 modules
13961
- var Enum = __webpack_require__(12);
14013
+ var Enum = __webpack_require__(11);
13962
14014
  // EXTERNAL MODULE: ./src/enums/index.js + 3 modules
13963
14015
  var enums = __webpack_require__(7);
13964
14016
  // EXTERNAL MODULE: ./src/oauth/OAuth.js
13965
- var OAuth = __webpack_require__(14);
14017
+ var OAuth = __webpack_require__(19);
13966
14018
  // EXTERNAL MODULE: ./src/oauth/OAuthToken.js
13967
- var OAuthToken = __webpack_require__(10);
14019
+ var OAuthToken = __webpack_require__(13);
13968
14020
  // EXTERNAL MODULE: ./src/oauth/StateContainer.js + 1 modules
13969
14021
  var StateContainer = __webpack_require__(42);
13970
14022
  // EXTERNAL MODULE: ./src/utils/requests.js
13971
14023
  var requests = __webpack_require__(6);
13972
14024
  // EXTERNAL MODULE: ./src/errors/OAuthError.js
13973
- var OAuthError = __webpack_require__(19);
14025
+ var OAuthError = __webpack_require__(18);
13974
14026
  // EXTERNAL MODULE: ./src/utils/node.js
13975
- var node = __webpack_require__(8);
14027
+ var node = __webpack_require__(9);
13976
14028
  // EXTERNAL MODULE: ./node_modules/case/dist/Case.js
13977
14029
  var Case = __webpack_require__(5);
13978
14030
  ;// CONCATENATED MODULE: ./src/oauth/ImplicitFlow.js
@@ -14494,110 +14546,6 @@ class PasswordFlow extends OAuth["default"] {
14494
14546
  }
14495
14547
  // EXTERNAL MODULE: ./src/oauth/DummyFlow.js
14496
14548
  var DummyFlow = __webpack_require__(76);
14497
- ;// CONCATENATED MODULE: ./src/oauth/CookieFlow.js
14498
- /*
14499
- * BSD 3-Clause License
14500
- *
14501
- * Copyright (c) 2020, Mapcreator
14502
- * All rights reserved.
14503
- *
14504
- * Redistribution and use in source and binary forms, with or without
14505
- * modification, are permitted provided that the following conditions are met:
14506
- *
14507
- * Redistributions of source code must retain the above copyright notice, this
14508
- * list of conditions and the following disclaimer.
14509
- *
14510
- * Redistributions in binary form must reproduce the above copyright notice,
14511
- * this list of conditions and the following disclaimer in the documentation
14512
- * and/or other materials provided with the distribution.
14513
- *
14514
- * Neither the name of the copyright holder nor the names of its
14515
- * contributors may be used to endorse or promote products derived from
14516
- * this software without specific prior written permission.
14517
- *
14518
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
14519
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
14520
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
14521
- * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
14522
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
14523
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
14524
- * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
14525
- * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
14526
- * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
14527
- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
14528
- */
14529
-
14530
-
14531
-
14532
-
14533
- /**
14534
- * Cookie-based authentication flow using redirection
14535
- */
14536
-
14537
- class CookieFlow extends OAuth["default"] {
14538
- /**
14539
- * Cookie-based authentication flow
14540
- * @param {String} clientId - OAuth client id
14541
- * @param {String} callbackUrl - callbackUrl to redirect to after successful login
14542
- * @param {Array<String>} scopes - A list of required scopes
14543
- */
14544
- constructor(clientId, callbackUrl = '', scopes = ['*']) {
14545
- super(clientId, scopes);
14546
-
14547
- if ((0,node.isNode)()) {
14548
- throw new Error(`${this.constructor.name} can't be used under nodejs`);
14549
- }
14550
-
14551
- this.path = '/login';
14552
- this.callbackUrl = callbackUrl;
14553
-
14554
- if (!this.callbackUrl) {
14555
- // Drop the anchor (if any)
14556
- this.callbackUrl = window.location.toString().split('#')[0];
14557
- }
14558
- }
14559
- /**
14560
- * @inheritDoc
14561
- */
14562
-
14563
-
14564
- authenticate() {
14565
- return new Promise((resolve, reject) => {
14566
- // Check authentication status by making a request to the user resources endpoint
14567
- fetch(`${this.host}/v1/users/me/resources`, {
14568
- method: 'GET',
14569
- credentials: 'include' // Important: include cookies in the request
14570
-
14571
- }).then(response => {
14572
- if (response.ok) {
14573
- // We're authenticated, create a token object to maintain compatibility
14574
- this.token = new OAuthToken["default"]('cookie_auth', 'cookie', 86400);
14575
- resolve(this.token);
14576
- } else {
14577
- // Not authenticated, redirect to login
14578
- window.location = this._buildRedirectUrl();
14579
- }
14580
- }).catch(error => {
14581
- // Network error or other issues, redirect to login
14582
- window.location = this._buildRedirectUrl();
14583
- });
14584
- });
14585
- }
14586
- /**
14587
- * Builds the url for redirection
14588
- * @returns {String} - Redirect url
14589
- * @protected
14590
- */
14591
-
14592
-
14593
- _buildRedirectUrl() {
14594
- const queryParams = {
14595
- 'redirect_uri': this.callbackUrl
14596
- };
14597
- return `${this.host + this.path}?${(0,requests.encodeQueryString)(queryParams)}`;
14598
- }
14599
-
14600
- }
14601
14549
  // EXTERNAL MODULE: ./src/errors/ApiError.js
14602
14550
  var ApiError = __webpack_require__(66);
14603
14551
  // EXTERNAL MODULE: ./src/errors/AbstractError.js
@@ -14606,7 +14554,7 @@ var AbstractError = __webpack_require__(22);
14606
14554
  var ValidationError = __webpack_require__(78);
14607
14555
  // EXTERNAL MODULE: ./src/errors/StaticClassError.js
14608
14556
  var StaticClassError = __webpack_require__(62);
14609
- // EXTERNAL MODULE: ./src/resources/index.js + 11 modules
14557
+ // EXTERNAL MODULE: ./src/resources/index.js + 12 modules
14610
14558
  var resources = __webpack_require__(30);
14611
14559
  // EXTERNAL MODULE: ./src/ResourceLister.js
14612
14560
  var ResourceLister = __webpack_require__(77);
@@ -14661,7 +14609,6 @@ var proxy = __webpack_require__(75);
14661
14609
 
14662
14610
 
14663
14611
 
14664
-
14665
14612
  // Exceptions
14666
14613
 
14667
14614
 
@@ -14688,7 +14635,7 @@ var proxy = __webpack_require__(75);
14688
14635
  * @private
14689
14636
  */
14690
14637
 
14691
- const version = "v3.3.4";
14638
+ const version = "b8d270c";
14692
14639
  })();
14693
14640
 
14694
14641
  /******/ return __webpack_exports__;