@mapcreator/api 3.3.6 → 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:d008c51159ebfb574825, chunkhash:5de2e35be743ae43c223, name:bundle.browser, version:v3.3.6
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.6) ── 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);
@@ -4341,20 +4186,7 @@ class Mapcreator extends (0,reflection.mix)((events_default()), Injectable["defa
4341
4186
  }
4342
4187
 
4343
4188
  const hooks = {
4344
- beforeRequest: [async request => {
4345
- var _document$cookie$spli;
4346
-
4347
- // Get CSRF token before making the request
4348
- await fetch(`${this.host}/sanctum/csrf-cookie`, {
4349
- credentials: 'include'
4350
- }); // Get the XSRF token from cookies
4351
-
4352
- const xsrfToken = (_document$cookie$spli = document.cookie.split('; ').find(row => row.startsWith('XSRF-TOKEN='))) === null || _document$cookie$spli === void 0 ? void 0 : _document$cookie$spli.split('=')[1];
4353
-
4354
- if (xsrfToken) {
4355
- request.headers.set('X-XSRF-TOKEN', decodeURIComponent(xsrfToken));
4356
- }
4357
-
4189
+ beforeRequest: [request => {
4358
4190
  if (this.authenticated) {
4359
4191
  request.headers.set('Authorization', this.auth.token.toString());
4360
4192
  }
@@ -4407,8 +4239,6 @@ class Mapcreator extends (0,reflection.mix)((events_default()), Injectable["defa
4407
4239
  // throwHttpErrors: false, // This is done through a custom hook
4408
4240
  // redirect: 'error',
4409
4241
  retry: 0,
4410
- credentials: 'include',
4411
- // Include cookies in requests
4412
4242
  headers: {
4413
4243
  'Accept': 'application/json',
4414
4244
  'X-No-CDN-Redirect': 'true'
@@ -4556,6 +4386,16 @@ class Mapcreator extends (0,reflection.mix)((events_default()), Injectable["defa
4556
4386
  get dimensionSets() {
4557
4387
  return this.static(resources.DimensionSet);
4558
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
+ }
4559
4399
  /**
4560
4400
  * Faq accessor
4561
4401
  * @see {@link Faq}
@@ -4863,15 +4703,103 @@ class Mapcreator extends (0,reflection.mix)((events_default()), Injectable["defa
4863
4703
  });
4864
4704
  }
4865
4705
  /**
4866
- * Forget the current session
4867
- * This will clean up any stored OAuth states stored using {@link StateContainer} and any OAuth tokens stored
4868
- * @returns {CancelablePromise}
4869
- * @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
4870
4788
  */
4871
4789
 
4872
4790
 
4873
- logout() {
4874
- 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;
4875
4803
  }
4876
4804
 
4877
4805
  }
@@ -4883,10 +4811,16 @@ class Mapcreator extends (0,reflection.mix)((events_default()), Injectable["defa
4883
4811
  "use strict";
4884
4812
  __webpack_require__.r(__webpack_exports__);
4885
4813
  /* harmony export */ __webpack_require__.d(__webpack_exports__, {
4886
- /* harmony export */ "default": () => (/* binding */ OAuthError)
4814
+ /* harmony export */ "default": () => (/* binding */ OAuth)
4887
4815
  /* harmony export */ });
4888
- /* 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);
4889
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);
4890
4824
 
4891
4825
 
4892
4826
  /*
@@ -4921,45 +4855,106 @@ __webpack_require__.r(__webpack_exports__);
4921
4855
  * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
4922
4856
  */
4923
4857
 
4858
+
4859
+
4860
+
4861
+
4862
+
4924
4863
  /**
4925
- * OAuth error
4864
+ * OAuth base class
4865
+ * @abstract
4926
4866
  */
4927
- class OAuthError extends Error {
4867
+
4868
+ class OAuth {
4928
4869
  /**
4929
- * OAuth error code
4930
- * @type {String}
4870
+ * @param {String} clientId - OAuth client id
4871
+ * @param {Array<String>} scopes - A list of required scopes
4931
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;
4932
4886
 
4887
+ if (this.clientId) {
4888
+ this.token = _OAuthToken__WEBPACK_IMPORTED_MODULE_4__["default"].recover();
4889
+ }
4890
+ }
4933
4891
  /**
4934
- * OAuth error response
4935
- * @param {String} error - OAuth error key
4936
- * @param {String} message - OAuth error message
4892
+ * If the current instance has a valid token
4893
+ * @returns {Boolean} - If a valid token is available
4937
4894
  */
4938
- constructor(error, message = '') {
4939
- super(message);
4940
4895
 
4941
- _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_0___default()(this, "error", void 0);
4942
4896
 
4943
- this.error = String(error);
4897
+ get authenticated() {
4898
+ return this.token !== null && !this.token.expired;
4944
4899
  }
4945
4900
  /**
4946
- * Displayable error string
4947
- * @returns {String} - error
4901
+ * Authenticate
4902
+ * @returns {Promise<OAuthToken>} - Authentication token
4903
+ * @throws {OAuthError}
4904
+ * @abstract
4948
4905
  */
4949
4906
 
4950
4907
 
4951
- toString() {
4952
- 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
+ */
4953
4915
 
4954
- if (error.includes('_')) {
4955
- error = error.replace('_', ' ').replace(/^./, x => x.toUpperCase());
4956
- }
4957
4916
 
4958
- if (this.message) {
4959
- 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)(() => {});
4960
4933
  }
4961
4934
 
4962
- 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);
4963
4958
  }
4964
4959
 
4965
4960
  }
@@ -4980,7 +4975,7 @@ __webpack_require__.d(__webpack_exports__, {
4980
4975
  // EXTERNAL MODULE: ./src/utils/StaticClass.js
4981
4976
  var StaticClass = __webpack_require__(34);
4982
4977
  // EXTERNAL MODULE: ./src/utils/node.js
4983
- var node = __webpack_require__(8);
4978
+ var node = __webpack_require__(9);
4984
4979
  // EXTERNAL MODULE: ./src/storage/DataStoreContract.js
4985
4980
  var DataStoreContract = __webpack_require__(23);
4986
4981
  ;// CONCATENATED MODULE: ./src/storage/CookiesDriver.js
@@ -5120,7 +5115,7 @@ class CookiesDriver extends DataStoreContract["default"] {
5120
5115
 
5121
5116
  }
5122
5117
  // EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/defineProperty.js
5123
- var defineProperty = __webpack_require__(13);
5118
+ var defineProperty = __webpack_require__(12);
5124
5119
  var defineProperty_default = /*#__PURE__*/__webpack_require__.n(defineProperty);
5125
5120
  ;// CONCATENATED MODULE: ./src/storage/DummyDriver.js
5126
5121
 
@@ -5455,7 +5450,7 @@ __webpack_require__.r(__webpack_exports__);
5455
5450
  /* harmony export */ __webpack_require__.d(__webpack_exports__, {
5456
5451
  /* harmony export */ "default": () => (/* binding */ OwnedResourceProxy)
5457
5452
  /* harmony export */ });
5458
- /* harmony import */ var _SimpleResourceProxy__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(16);
5453
+ /* harmony import */ var _SimpleResourceProxy__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(15);
5459
5454
  /* harmony import */ var _utils_helpers__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(1);
5460
5455
  /*
5461
5456
  * BSD 3-Clause License
@@ -6437,7 +6432,7 @@ function base64Encode(buffer) {
6437
6432
  return base64;
6438
6433
  }
6439
6434
  // EXTERNAL MODULE: ./src/utils/node.js
6440
- var node = __webpack_require__(8);
6435
+ var node = __webpack_require__(9);
6441
6436
  ;// CONCATENATED MODULE: ./src/resources/base/DownloadedResource.js
6442
6437
  /*
6443
6438
  * BSD 3-Clause License
@@ -6769,13 +6764,13 @@ var OwnableResource = __webpack_require__(4);
6769
6764
  // EXTERNAL MODULE: ./src/utils/reflection.js
6770
6765
  var reflection = __webpack_require__(0);
6771
6766
  // EXTERNAL MODULE: ./src/resources/base/CrudSetBase.js
6772
- var CrudSetBase = __webpack_require__(17);
6767
+ var CrudSetBase = __webpack_require__(16);
6773
6768
  // EXTERNAL MODULE: ./src/resources/Mapstyle.js
6774
6769
  var Mapstyle = __webpack_require__(70);
6775
6770
  // EXTERNAL MODULE: ./src/proxy/ResourceProxy.js
6776
- var ResourceProxy = __webpack_require__(15);
6771
+ var ResourceProxy = __webpack_require__(14);
6777
6772
  // EXTERNAL MODULE: ./src/resources/base/CrudSetItemBase.js
6778
- var CrudSetItemBase = __webpack_require__(11);
6773
+ var CrudSetItemBase = __webpack_require__(10);
6779
6774
  ;// CONCATENATED MODULE: ./src/resources/MapstyleSetColor.js
6780
6775
  /*
6781
6776
  * BSD 3-Clause License
@@ -6905,7 +6900,7 @@ __webpack_require__.r(__webpack_exports__);
6905
6900
  /* harmony export */ });
6906
6901
  /* harmony import */ var _traits_OwnableResource__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(4);
6907
6902
  /* harmony import */ var _utils_reflection__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(0);
6908
- /* 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);
6909
6904
  /*
6910
6905
  * BSD 3-Clause License
6911
6906
  *
@@ -6973,6 +6968,7 @@ __webpack_require__.d(__webpack_exports__, {
6973
6968
  "Dimension": () => (/* reexport */ Dimension["default"]),
6974
6969
  "DimensionSet": () => (/* reexport */ DimensionSet["default"]),
6975
6970
  "Domain": () => (/* reexport */ Domain["default"]),
6971
+ "DomainLoginMethod": () => (/* reexport */ DomainLoginMethod),
6976
6972
  "Faq": () => (/* reexport */ Faq),
6977
6973
  "Feature": () => (/* reexport */ Feature["default"]),
6978
6974
  "Font": () => (/* reexport */ Font["default"]),
@@ -7098,6 +7094,49 @@ var DimensionSet = __webpack_require__(47);
7098
7094
  var Domain = __webpack_require__(68);
7099
7095
  // EXTERNAL MODULE: ./src/resources/base/CrudBase.js
7100
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
+ }
7101
7140
  ;// CONCATENATED MODULE: ./src/resources/Faq.js
7102
7141
  /*
7103
7142
  * BSD 3-Clause License
@@ -7253,7 +7292,7 @@ var Language = __webpack_require__(71);
7253
7292
  // EXTERNAL MODULE: ./src/resources/Layer.js
7254
7293
  var Layer = __webpack_require__(27);
7255
7294
  // EXTERNAL MODULE: ./src/resources/base/CrudSetItemBase.js
7256
- var CrudSetItemBase = __webpack_require__(11);
7295
+ var CrudSetItemBase = __webpack_require__(10);
7257
7296
  ;// CONCATENATED MODULE: ./src/resources/LayerFaq.js
7258
7297
  /*
7259
7298
  * BSD 3-Clause License
@@ -7379,7 +7418,7 @@ class OrganisationNote extends (0,reflection.mix)(CrudBase["default"], OwnableRe
7379
7418
  // EXTERNAL MODULE: ./src/resources/Permission.js
7380
7419
  var Permission = __webpack_require__(59);
7381
7420
  // EXTERNAL MODULE: ./src/resources/base/CrudSetBase.js
7382
- var CrudSetBase = __webpack_require__(17);
7421
+ var CrudSetBase = __webpack_require__(16);
7383
7422
  ;// CONCATENATED MODULE: ./src/resources/ProductTourStep.js
7384
7423
  /*
7385
7424
  * BSD 3-Clause License
@@ -7699,6 +7738,7 @@ class VectorChoropleth extends ResourceBase["default"] {
7699
7738
 
7700
7739
 
7701
7740
 
7741
+
7702
7742
 
7703
7743
 
7704
7744
  /**
@@ -8429,7 +8469,7 @@ __webpack_require__.r(__webpack_exports__);
8429
8469
  /* harmony export */ "default": () => (/* binding */ OrganisationProxy)
8430
8470
  /* harmony export */ });
8431
8471
  /* harmony import */ var _utils_reflection__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(0);
8432
- /* harmony import */ var _SimpleResourceProxy__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(16);
8472
+ /* harmony import */ var _SimpleResourceProxy__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(15);
8433
8473
  /* harmony import */ var _utils_helpers__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(1);
8434
8474
  /*
8435
8475
  * BSD 3-Clause License
@@ -8661,7 +8701,7 @@ var ValidationError = __webpack_require__(78);
8661
8701
  */
8662
8702
  class NodeError extends Error {}
8663
8703
  // EXTERNAL MODULE: ./src/errors/OAuthError.js
8664
- var OAuthError = __webpack_require__(19);
8704
+ var OAuthError = __webpack_require__(18);
8665
8705
  // EXTERNAL MODULE: ./src/errors/StaticClassError.js
8666
8706
  var StaticClassError = __webpack_require__(62);
8667
8707
  // EXTERNAL MODULE: ./src/errors/GeoError.js
@@ -9596,9 +9636,9 @@ __webpack_require__.r(__webpack_exports__);
9596
9636
  /* harmony export */ "default": () => (/* binding */ GeoResourceProxy)
9597
9637
  /* harmony export */ });
9598
9638
  /* harmony import */ var _errors_GeoError__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(44);
9599
- /* harmony import */ var _RequestParameters__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(9);
9639
+ /* harmony import */ var _RequestParameters__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(8);
9600
9640
  /* harmony import */ var _utils_geo__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(64);
9601
- /* harmony import */ var _ResourceProxy__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(15);
9641
+ /* harmony import */ var _ResourceProxy__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(14);
9602
9642
  /* harmony import */ var _utils_helpers__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(1);
9603
9643
  /*
9604
9644
  * BSD 3-Clause License
@@ -9836,7 +9876,7 @@ __webpack_require__.r(__webpack_exports__);
9836
9876
  /* harmony import */ var _utils_requests__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(6);
9837
9877
  /* harmony import */ var _LayerGroup__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(74);
9838
9878
  /* harmony import */ var _index__WEBPACK_IMPORTED_MODULE_19__ = __webpack_require__(30);
9839
- /* 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);
9840
9880
  /*
9841
9881
  * BSD 3-Clause License
9842
9882
  *
@@ -10149,7 +10189,7 @@ __webpack_require__.r(__webpack_exports__);
10149
10189
  /* harmony export */ __webpack_require__.d(__webpack_exports__, {
10150
10190
  /* harmony export */ "default": () => (/* binding */ DimensionSet)
10151
10191
  /* harmony export */ });
10152
- /* 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);
10153
10193
  /* harmony import */ var _Dimension__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(48);
10154
10194
  /* harmony import */ var _traits_OwnableResource__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(4);
10155
10195
  /* harmony import */ var _utils_reflection__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(0);
@@ -10218,7 +10258,7 @@ __webpack_require__.r(__webpack_exports__);
10218
10258
  /* harmony export */ __webpack_require__.d(__webpack_exports__, {
10219
10259
  /* harmony export */ "default": () => (/* binding */ Dimension)
10220
10260
  /* harmony export */ });
10221
- /* 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);
10222
10262
  /*
10223
10263
  * BSD 3-Clause License
10224
10264
  *
@@ -10332,7 +10372,7 @@ __webpack_require__.r(__webpack_exports__);
10332
10372
  /* harmony export */ });
10333
10373
  /* harmony import */ var _traits_OwnableResource__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(4);
10334
10374
  /* harmony import */ var _utils_reflection__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(0);
10335
- /* 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);
10336
10376
  /* harmony import */ var _Font__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(51);
10337
10377
  /*
10338
10378
  * BSD 3-Clause License
@@ -10399,7 +10439,7 @@ __webpack_require__.r(__webpack_exports__);
10399
10439
  /* harmony export */ __webpack_require__.d(__webpack_exports__, {
10400
10440
  /* harmony export */ "default": () => (/* binding */ Font)
10401
10441
  /* harmony export */ });
10402
- /* 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);
10403
10443
  /*
10404
10444
  * BSD 3-Clause License
10405
10445
  *
@@ -10452,12 +10492,12 @@ __webpack_require__.r(__webpack_exports__);
10452
10492
  /* harmony export */ __webpack_require__.d(__webpack_exports__, {
10453
10493
  /* harmony export */ "default": () => (/* binding */ Job)
10454
10494
  /* harmony export */ });
10455
- /* 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);
10456
10496
  /* harmony import */ var _base_DownloadedResource__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(25);
10457
10497
  /* harmony import */ var _base_CrudBase__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(2);
10458
10498
  /* harmony import */ var _JobResult__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(53);
10459
10499
  /* harmony import */ var _JobRevision__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(69);
10460
- /* harmony import */ var _RequestParameters__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(9);
10500
+ /* harmony import */ var _RequestParameters__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(8);
10461
10501
  /* harmony import */ var _utils_requests__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(6);
10462
10502
  /* harmony import */ var _enums__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(7);
10463
10503
  /* harmony import */ var _utils_helpers__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(1);
@@ -10655,7 +10695,7 @@ __webpack_require__.r(__webpack_exports__);
10655
10695
  /* harmony export */ });
10656
10696
  /* harmony import */ var _base_DownloadedResource__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(25);
10657
10697
  /* harmony import */ var _base_ResourceBase__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(3);
10658
- /* harmony import */ var _RequestParameters__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(9);
10698
+ /* harmony import */ var _RequestParameters__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(8);
10659
10699
  /* harmony import */ var _utils_requests__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(6);
10660
10700
  /* harmony import */ var _enums__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(7);
10661
10701
  /* harmony import */ var _utils_helpers__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(1);
@@ -10882,7 +10922,7 @@ __webpack_require__.d(__webpack_exports__, {
10882
10922
  // EXTERNAL MODULE: ./src/traits/Trait.js
10883
10923
  var Trait = __webpack_require__(32);
10884
10924
  // EXTERNAL MODULE: ./src/Mapcreator.js + 1 modules
10885
- var Mapcreator = __webpack_require__(18);
10925
+ var Mapcreator = __webpack_require__(17);
10886
10926
  // EXTERNAL MODULE: ./src/resources/base/DownloadedResource.js + 1 modules
10887
10927
  var DownloadedResource = __webpack_require__(25);
10888
10928
  // EXTERNAL MODULE: ./src/resources/base/ResourceBase.js
@@ -11162,7 +11202,7 @@ __webpack_require__.r(__webpack_exports__);
11162
11202
  /* harmony export */ "default": () => (/* binding */ SvgSet)
11163
11203
  /* harmony export */ });
11164
11204
  /* harmony import */ var _traits_OwnableResource__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(4);
11165
- /* 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);
11166
11206
  /* harmony import */ var _Svg__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(57);
11167
11207
  /* harmony import */ var _utils_reflection__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(0);
11168
11208
  /*
@@ -11230,7 +11270,7 @@ __webpack_require__.r(__webpack_exports__);
11230
11270
  /* harmony export */ __webpack_require__.d(__webpack_exports__, {
11231
11271
  /* harmony export */ "default": () => (/* binding */ Svg)
11232
11272
  /* harmony export */ });
11233
- /* 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);
11234
11274
  /*
11235
11275
  * BSD 3-Clause License
11236
11276
  *
@@ -11280,7 +11320,7 @@ __webpack_require__.r(__webpack_exports__);
11280
11320
  /* harmony export */ "default": () => (/* binding */ User)
11281
11321
  /* harmony export */ });
11282
11322
  /* harmony import */ var _proxy_OwnedResourceProxy__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(21);
11283
- /* 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);
11284
11324
  /* harmony import */ var _base_CrudBase__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(2);
11285
11325
  /* harmony import */ var _Color__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(46);
11286
11326
  /* harmony import */ var _Dimension__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(48);
@@ -11692,7 +11732,7 @@ __webpack_require__.r(__webpack_exports__);
11692
11732
  /* harmony export */ __webpack_require__.d(__webpack_exports__, {
11693
11733
  /* harmony export */ "default": () => (/* binding */ FileDriver)
11694
11734
  /* harmony export */ });
11695
- /* 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);
11696
11736
  /* harmony import */ var _DataStoreContract__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(23);
11697
11737
  /*
11698
11738
  * BSD 3-Clause License
@@ -11892,7 +11932,7 @@ __webpack_require__.r(__webpack_exports__);
11892
11932
  /* harmony export */ "GeoPoint": () => (/* binding */ GeoPoint),
11893
11933
  /* harmony export */ "GeoBoundary": () => (/* binding */ GeoBoundary)
11894
11934
  /* harmony export */ });
11895
- /* 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);
11896
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__);
11897
11937
  /* harmony import */ var _errors_GeoError__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(44);
11898
11938
 
@@ -12267,7 +12307,7 @@ class Injectable extends _Trait__WEBPACK_IMPORTED_MODULE_2__["default"] {
12267
12307
  return this._proxyResourceList(value);
12268
12308
  });
12269
12309
  } else {
12270
- const ResourceProxy = (__webpack_require__(15)["default"]);
12310
+ const ResourceProxy = (__webpack_require__(14)["default"]);
12271
12311
 
12272
12312
  this._inject(name, function () {
12273
12313
  return new ResourceProxy(this, value);
@@ -12303,7 +12343,7 @@ __webpack_require__.r(__webpack_exports__);
12303
12343
  /* harmony export */ __webpack_require__.d(__webpack_exports__, {
12304
12344
  /* harmony export */ "default": () => (/* binding */ ApiError)
12305
12345
  /* harmony export */ });
12306
- /* 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);
12307
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__);
12308
12348
 
12309
12349
 
@@ -12579,7 +12619,7 @@ __webpack_require__.r(__webpack_exports__);
12579
12619
  /* harmony import */ var _JobResult__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(53);
12580
12620
  /* harmony import */ var _JobShare__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(26);
12581
12621
  /* harmony import */ var _Layer__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(27);
12582
- /* harmony import */ var _RequestParameters__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(9);
12622
+ /* harmony import */ var _RequestParameters__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(8);
12583
12623
  /* harmony import */ var _utils_requests__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(6);
12584
12624
  /* harmony import */ var _enums__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(7);
12585
12625
  /* harmony import */ var _utils_helpers__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(1);
@@ -12831,7 +12871,7 @@ __webpack_require__.r(__webpack_exports__);
12831
12871
  /* harmony export */ });
12832
12872
  /* harmony import */ var _traits_HandlesImages__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(54);
12833
12873
  /* harmony import */ var _utils_reflection__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(0);
12834
- /* 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);
12835
12875
  /*
12836
12876
  * BSD 3-Clause License
12837
12877
  *
@@ -13072,7 +13112,7 @@ __webpack_require__.r(__webpack_exports__);
13072
13112
  /* harmony import */ var _traits_OwnableResource__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(4);
13073
13113
  /* harmony import */ var _utils_reflection__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(0);
13074
13114
  /* harmony import */ var _Layer__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(27);
13075
- /* 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);
13076
13116
  /* harmony import */ var _proxy__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(75);
13077
13117
  /*
13078
13118
  * BSD 3-Clause License
@@ -13148,8 +13188,8 @@ __webpack_require__.r(__webpack_exports__);
13148
13188
  /* harmony import */ var _GeoResourceProxy__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(43);
13149
13189
  /* harmony import */ var _OrganisationProxy__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(35);
13150
13190
  /* harmony import */ var _OwnedResourceProxy__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(21);
13151
- /* harmony import */ var _ResourceProxy__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(15);
13152
- /* 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);
13153
13193
  /*
13154
13194
  * BSD 3-Clause License
13155
13195
  *
@@ -13196,8 +13236,8 @@ __webpack_require__.r(__webpack_exports__);
13196
13236
  /* harmony export */ __webpack_require__.d(__webpack_exports__, {
13197
13237
  /* harmony export */ "default": () => (/* binding */ DummyFlow)
13198
13238
  /* harmony export */ });
13199
- /* harmony import */ var _errors_OAuthError__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(19);
13200
- /* 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);
13201
13241
  /*
13202
13242
  * BSD 3-Clause License
13203
13243
  *
@@ -13276,8 +13316,8 @@ __webpack_require__.r(__webpack_exports__);
13276
13316
  /* harmony import */ var case__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(case__WEBPACK_IMPORTED_MODULE_0__);
13277
13317
  /* harmony import */ var events__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(24);
13278
13318
  /* harmony import */ var events__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(events__WEBPACK_IMPORTED_MODULE_1__);
13279
- /* harmony import */ var _Mapcreator__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(18);
13280
- /* 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);
13281
13321
  /* harmony import */ var _resources_base_ResourceBase__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(3);
13282
13322
  /* harmony import */ var _utils_reflection__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(0);
13283
13323
  /* harmony import */ var _utils_helpers__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(1);
@@ -13675,7 +13715,7 @@ __webpack_require__.r(__webpack_exports__);
13675
13715
  /* harmony export */ __webpack_require__.d(__webpack_exports__, {
13676
13716
  /* harmony export */ "default": () => (/* binding */ ValidationError)
13677
13717
  /* harmony export */ });
13678
- /* 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);
13679
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__);
13680
13720
  /* harmony import */ var _ApiError__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(66);
13681
13721
 
@@ -13940,7 +13980,6 @@ __webpack_require__.d(__webpack_exports__, {
13940
13980
  "AbstractError": () => (/* reexport */ AbstractError.AbstractError),
13941
13981
  "AbstractMethodError": () => (/* reexport */ AbstractError.AbstractMethodError),
13942
13982
  "ApiError": () => (/* reexport */ ApiError["default"]),
13943
- "CookieFlow": () => (/* reexport */ CookieFlow),
13944
13983
  "DeletedState": () => (/* reexport */ enums.DeletedState),
13945
13984
  "DummyFlow": () => (/* reexport */ DummyFlow["default"]),
13946
13985
  "Enum": () => (/* reexport */ Enum["default"]),
@@ -13965,27 +14004,27 @@ __webpack_require__.d(__webpack_exports__, {
13965
14004
  });
13966
14005
 
13967
14006
  // EXTERNAL MODULE: ./src/Mapcreator.js + 1 modules
13968
- var Mapcreator = __webpack_require__(18);
14007
+ var Mapcreator = __webpack_require__(17);
13969
14008
  // EXTERNAL MODULE: ./src/RequestParameters.js
13970
- var RequestParameters = __webpack_require__(9);
14009
+ var RequestParameters = __webpack_require__(8);
13971
14010
  // EXTERNAL MODULE: ./src/storage/StorageManager.js + 3 modules
13972
14011
  var StorageManager = __webpack_require__(20);
13973
14012
  // EXTERNAL MODULE: ./src/enums/Enum.js + 1 modules
13974
- var Enum = __webpack_require__(12);
14013
+ var Enum = __webpack_require__(11);
13975
14014
  // EXTERNAL MODULE: ./src/enums/index.js + 3 modules
13976
14015
  var enums = __webpack_require__(7);
13977
14016
  // EXTERNAL MODULE: ./src/oauth/OAuth.js
13978
- var OAuth = __webpack_require__(14);
14017
+ var OAuth = __webpack_require__(19);
13979
14018
  // EXTERNAL MODULE: ./src/oauth/OAuthToken.js
13980
- var OAuthToken = __webpack_require__(10);
14019
+ var OAuthToken = __webpack_require__(13);
13981
14020
  // EXTERNAL MODULE: ./src/oauth/StateContainer.js + 1 modules
13982
14021
  var StateContainer = __webpack_require__(42);
13983
14022
  // EXTERNAL MODULE: ./src/utils/requests.js
13984
14023
  var requests = __webpack_require__(6);
13985
14024
  // EXTERNAL MODULE: ./src/errors/OAuthError.js
13986
- var OAuthError = __webpack_require__(19);
14025
+ var OAuthError = __webpack_require__(18);
13987
14026
  // EXTERNAL MODULE: ./src/utils/node.js
13988
- var node = __webpack_require__(8);
14027
+ var node = __webpack_require__(9);
13989
14028
  // EXTERNAL MODULE: ./node_modules/case/dist/Case.js
13990
14029
  var Case = __webpack_require__(5);
13991
14030
  ;// CONCATENATED MODULE: ./src/oauth/ImplicitFlow.js
@@ -14507,110 +14546,6 @@ class PasswordFlow extends OAuth["default"] {
14507
14546
  }
14508
14547
  // EXTERNAL MODULE: ./src/oauth/DummyFlow.js
14509
14548
  var DummyFlow = __webpack_require__(76);
14510
- ;// CONCATENATED MODULE: ./src/oauth/CookieFlow.js
14511
- /*
14512
- * BSD 3-Clause License
14513
- *
14514
- * Copyright (c) 2020, Mapcreator
14515
- * All rights reserved.
14516
- *
14517
- * Redistribution and use in source and binary forms, with or without
14518
- * modification, are permitted provided that the following conditions are met:
14519
- *
14520
- * Redistributions of source code must retain the above copyright notice, this
14521
- * list of conditions and the following disclaimer.
14522
- *
14523
- * Redistributions in binary form must reproduce the above copyright notice,
14524
- * this list of conditions and the following disclaimer in the documentation
14525
- * and/or other materials provided with the distribution.
14526
- *
14527
- * Neither the name of the copyright holder nor the names of its
14528
- * contributors may be used to endorse or promote products derived from
14529
- * this software without specific prior written permission.
14530
- *
14531
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
14532
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
14533
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
14534
- * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
14535
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
14536
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
14537
- * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
14538
- * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
14539
- * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
14540
- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
14541
- */
14542
-
14543
-
14544
-
14545
-
14546
- /**
14547
- * Cookie-based authentication flow using redirection
14548
- */
14549
-
14550
- class CookieFlow extends OAuth["default"] {
14551
- /**
14552
- * Cookie-based authentication flow
14553
- * @param {String} clientId - OAuth client id
14554
- * @param {String} callbackUrl - callbackUrl to redirect to after successful login
14555
- * @param {Array<String>} scopes - A list of required scopes
14556
- */
14557
- constructor(clientId, callbackUrl = '', scopes = ['*']) {
14558
- super(clientId, scopes);
14559
-
14560
- if ((0,node.isNode)()) {
14561
- throw new Error(`${this.constructor.name} can't be used under nodejs`);
14562
- }
14563
-
14564
- this.path = '/login';
14565
- this.callbackUrl = callbackUrl;
14566
-
14567
- if (!this.callbackUrl) {
14568
- // Drop the anchor (if any)
14569
- this.callbackUrl = window.location.toString().split('#')[0];
14570
- }
14571
- }
14572
- /**
14573
- * @inheritDoc
14574
- */
14575
-
14576
-
14577
- authenticate() {
14578
- return new Promise((resolve, reject) => {
14579
- // Check authentication status by making a request to the user resources endpoint
14580
- fetch(`${this.host}/v1/users/me/resources`, {
14581
- method: 'GET',
14582
- credentials: 'include' // Important: include cookies in the request
14583
-
14584
- }).then(response => {
14585
- if (response.ok) {
14586
- // We're authenticated, create a token object to maintain compatibility
14587
- this.token = new OAuthToken["default"]('cookie_auth', 'cookie', 86400);
14588
- resolve(this.token);
14589
- } else {
14590
- // Not authenticated, redirect to login
14591
- window.location = this._buildRedirectUrl();
14592
- }
14593
- }).catch(error => {
14594
- // Network error or other issues, redirect to login
14595
- window.location = this._buildRedirectUrl();
14596
- });
14597
- });
14598
- }
14599
- /**
14600
- * Builds the url for redirection
14601
- * @returns {String} - Redirect url
14602
- * @protected
14603
- */
14604
-
14605
-
14606
- _buildRedirectUrl() {
14607
- const queryParams = {
14608
- 'redirect_uri': this.callbackUrl
14609
- };
14610
- return `${this.host + this.path}?${(0,requests.encodeQueryString)(queryParams)}`;
14611
- }
14612
-
14613
- }
14614
14549
  // EXTERNAL MODULE: ./src/errors/ApiError.js
14615
14550
  var ApiError = __webpack_require__(66);
14616
14551
  // EXTERNAL MODULE: ./src/errors/AbstractError.js
@@ -14619,7 +14554,7 @@ var AbstractError = __webpack_require__(22);
14619
14554
  var ValidationError = __webpack_require__(78);
14620
14555
  // EXTERNAL MODULE: ./src/errors/StaticClassError.js
14621
14556
  var StaticClassError = __webpack_require__(62);
14622
- // EXTERNAL MODULE: ./src/resources/index.js + 11 modules
14557
+ // EXTERNAL MODULE: ./src/resources/index.js + 12 modules
14623
14558
  var resources = __webpack_require__(30);
14624
14559
  // EXTERNAL MODULE: ./src/ResourceLister.js
14625
14560
  var ResourceLister = __webpack_require__(77);
@@ -14674,7 +14609,6 @@ var proxy = __webpack_require__(75);
14674
14609
 
14675
14610
 
14676
14611
 
14677
-
14678
14612
  // Exceptions
14679
14613
 
14680
14614
 
@@ -14701,7 +14635,7 @@ var proxy = __webpack_require__(75);
14701
14635
  * @private
14702
14636
  */
14703
14637
 
14704
- const version = "v3.3.6";
14638
+ const version = "b8d270c";
14705
14639
  })();
14706
14640
 
14707
14641
  /******/ return __webpack_exports__;