1 | (function webpackUniversalModuleDefinition(root, factory) {
|
2 | if(typeof exports === 'object' && typeof module === 'object')
|
3 | module.exports = factory();
|
4 | else if(typeof define === 'function' && define.amd)
|
5 | define([], factory);
|
6 | else if(typeof exports === 'object')
|
7 | exports["contentfulManagement"] = factory();
|
8 | else
|
9 | root["contentfulManagement"] = factory();
|
10 | })(window, function() {
|
11 | return (function(modules) {
|
12 |
|
13 | var installedModules = {};
|
14 |
|
15 |
|
16 | function __webpack_require__(moduleId) {
|
17 |
|
18 |
|
19 | if(installedModules[moduleId]) {
|
20 | return installedModules[moduleId].exports;
|
21 | }
|
22 |
|
23 | var module = installedModules[moduleId] = {
|
24 | i: moduleId,
|
25 | l: false,
|
26 | exports: {}
|
27 | };
|
28 |
|
29 |
|
30 | modules[moduleId].call(module.exports, module, module.exports, __webpack_require__);
|
31 |
|
32 |
|
33 | module.l = true;
|
34 |
|
35 |
|
36 | return module.exports;
|
37 | }
|
38 |
|
39 |
|
40 |
|
41 | __webpack_require__.m = modules;
|
42 |
|
43 |
|
44 | __webpack_require__.c = installedModules;
|
45 |
|
46 |
|
47 | __webpack_require__.d = function(exports, name, getter) {
|
48 | if(!__webpack_require__.o(exports, name)) {
|
49 | Object.defineProperty(exports, name, { enumerable: true, get: getter });
|
50 | }
|
51 | };
|
52 |
|
53 |
|
54 | __webpack_require__.r = function(exports) {
|
55 | if(typeof Symbol !== 'undefined' && Symbol.toStringTag) {
|
56 | Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
57 | }
|
58 | Object.defineProperty(exports, '__esModule', { value: true });
|
59 | };
|
60 |
|
61 |
|
62 |
|
63 |
|
64 |
|
65 |
|
66 | __webpack_require__.t = function(value, mode) {
|
67 | if(mode & 1) value = __webpack_require__(value);
|
68 | if(mode & 8) return value;
|
69 | if((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;
|
70 | var ns = Object.create(null);
|
71 | __webpack_require__.r(ns);
|
72 | Object.defineProperty(ns, 'default', { enumerable: true, value: value });
|
73 | if(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));
|
74 | return ns;
|
75 | };
|
76 |
|
77 |
|
78 | __webpack_require__.n = function(module) {
|
79 | var getter = module && module.__esModule ?
|
80 | function getDefault() { return module['default']; } :
|
81 | function getModuleExports() { return module; };
|
82 | __webpack_require__.d(getter, 'a', getter);
|
83 | return getter;
|
84 | };
|
85 |
|
86 |
|
87 | __webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };
|
88 |
|
89 |
|
90 | __webpack_require__.p = "";
|
91 |
|
92 |
|
93 |
|
94 | return __webpack_require__(__webpack_require__.s = 0);
|
95 | })
|
96 |
|
97 | ({
|
98 |
|
99 | "../node_modules/axios/index.js":
|
100 |
|
101 |
|
102 |
|
103 |
|
104 | (function(module, exports, __webpack_require__) {
|
105 |
|
106 | module.exports = __webpack_require__( "../node_modules/axios/lib/axios.js");
|
107 |
|
108 | }),
|
109 |
|
110 | "../node_modules/axios/lib/adapters/xhr.js":
|
111 |
|
112 |
|
113 |
|
114 |
|
115 | (function(module, exports, __webpack_require__) {
|
116 |
|
117 | "use strict";
|
118 |
|
119 |
|
120 | var utils = __webpack_require__( "../node_modules/axios/lib/utils.js");
|
121 | var settle = __webpack_require__( "../node_modules/axios/lib/core/settle.js");
|
122 | var buildURL = __webpack_require__( "../node_modules/axios/lib/helpers/buildURL.js");
|
123 | var buildFullPath = __webpack_require__( "../node_modules/axios/lib/core/buildFullPath.js");
|
124 | var parseHeaders = __webpack_require__( "../node_modules/axios/lib/helpers/parseHeaders.js");
|
125 | var isURLSameOrigin = __webpack_require__( "../node_modules/axios/lib/helpers/isURLSameOrigin.js");
|
126 | var createError = __webpack_require__( "../node_modules/axios/lib/core/createError.js");
|
127 |
|
128 | module.exports = function xhrAdapter(config) {
|
129 | return new Promise(function dispatchXhrRequest(resolve, reject) {
|
130 | var requestData = config.data;
|
131 | var requestHeaders = config.headers;
|
132 |
|
133 | if (utils.isFormData(requestData)) {
|
134 | delete requestHeaders['Content-Type'];
|
135 | }
|
136 |
|
137 | var request = new XMLHttpRequest();
|
138 |
|
139 |
|
140 | if (config.auth) {
|
141 | var username = config.auth.username || '';
|
142 | var password = config.auth.password || '';
|
143 | requestHeaders.Authorization = 'Basic ' + btoa(username + ':' + password);
|
144 | }
|
145 |
|
146 | var fullPath = buildFullPath(config.baseURL, config.url);
|
147 | request.open(config.method.toUpperCase(), buildURL(fullPath, config.params, config.paramsSerializer), true);
|
148 |
|
149 |
|
150 | request.timeout = config.timeout;
|
151 |
|
152 |
|
153 | request.onreadystatechange = function handleLoad() {
|
154 | if (!request || request.readyState !== 4) {
|
155 | return;
|
156 | }
|
157 |
|
158 |
|
159 |
|
160 |
|
161 |
|
162 | if (request.status === 0 && !(request.responseURL && request.responseURL.indexOf('file:') === 0)) {
|
163 | return;
|
164 | }
|
165 |
|
166 |
|
167 | var responseHeaders = 'getAllResponseHeaders' in request ? parseHeaders(request.getAllResponseHeaders()) : null;
|
168 | var responseData = !config.responseType || config.responseType === 'text' ? request.responseText : request.response;
|
169 | var response = {
|
170 | data: responseData,
|
171 | status: request.status,
|
172 | statusText: request.statusText,
|
173 | headers: responseHeaders,
|
174 | config: config,
|
175 | request: request
|
176 | };
|
177 |
|
178 | settle(resolve, reject, response);
|
179 |
|
180 |
|
181 | request = null;
|
182 | };
|
183 |
|
184 |
|
185 | request.onabort = function handleAbort() {
|
186 | if (!request) {
|
187 | return;
|
188 | }
|
189 |
|
190 | reject(createError('Request aborted', config, 'ECONNABORTED', request));
|
191 |
|
192 |
|
193 | request = null;
|
194 | };
|
195 |
|
196 |
|
197 | request.onerror = function handleError() {
|
198 |
|
199 |
|
200 | reject(createError('Network Error', config, null, request));
|
201 |
|
202 |
|
203 | request = null;
|
204 | };
|
205 |
|
206 |
|
207 | request.ontimeout = function handleTimeout() {
|
208 | var timeoutErrorMessage = 'timeout of ' + config.timeout + 'ms exceeded';
|
209 | if (config.timeoutErrorMessage) {
|
210 | timeoutErrorMessage = config.timeoutErrorMessage;
|
211 | }
|
212 | reject(createError(timeoutErrorMessage, config, 'ECONNABORTED',
|
213 | request));
|
214 |
|
215 |
|
216 | request = null;
|
217 | };
|
218 |
|
219 |
|
220 |
|
221 |
|
222 | if (utils.isStandardBrowserEnv()) {
|
223 | var cookies = __webpack_require__( "../node_modules/axios/lib/helpers/cookies.js");
|
224 |
|
225 |
|
226 | var xsrfValue = (config.withCredentials || isURLSameOrigin(fullPath)) && config.xsrfCookieName ?
|
227 | cookies.read(config.xsrfCookieName) :
|
228 | undefined;
|
229 |
|
230 | if (xsrfValue) {
|
231 | requestHeaders[config.xsrfHeaderName] = xsrfValue;
|
232 | }
|
233 | }
|
234 |
|
235 |
|
236 | if ('setRequestHeader' in request) {
|
237 | utils.forEach(requestHeaders, function setRequestHeader(val, key) {
|
238 | if (typeof requestData === 'undefined' && key.toLowerCase() === 'content-type') {
|
239 |
|
240 | delete requestHeaders[key];
|
241 | } else {
|
242 |
|
243 | request.setRequestHeader(key, val);
|
244 | }
|
245 | });
|
246 | }
|
247 |
|
248 |
|
249 | if (!utils.isUndefined(config.withCredentials)) {
|
250 | request.withCredentials = !!config.withCredentials;
|
251 | }
|
252 |
|
253 |
|
254 | if (config.responseType) {
|
255 | try {
|
256 | request.responseType = config.responseType;
|
257 | } catch (e) {
|
258 |
|
259 |
|
260 | if (config.responseType !== 'json') {
|
261 | throw e;
|
262 | }
|
263 | }
|
264 | }
|
265 |
|
266 |
|
267 | if (typeof config.onDownloadProgress === 'function') {
|
268 | request.addEventListener('progress', config.onDownloadProgress);
|
269 | }
|
270 |
|
271 |
|
272 | if (typeof config.onUploadProgress === 'function' && request.upload) {
|
273 | request.upload.addEventListener('progress', config.onUploadProgress);
|
274 | }
|
275 |
|
276 | if (config.cancelToken) {
|
277 |
|
278 | config.cancelToken.promise.then(function onCanceled(cancel) {
|
279 | if (!request) {
|
280 | return;
|
281 | }
|
282 |
|
283 | request.abort();
|
284 | reject(cancel);
|
285 |
|
286 | request = null;
|
287 | });
|
288 | }
|
289 |
|
290 | if (requestData === undefined) {
|
291 | requestData = null;
|
292 | }
|
293 |
|
294 |
|
295 | request.send(requestData);
|
296 | });
|
297 | };
|
298 |
|
299 |
|
300 | }),
|
301 |
|
302 | "../node_modules/axios/lib/axios.js":
|
303 |
|
304 |
|
305 |
|
306 |
|
307 | (function(module, exports, __webpack_require__) {
|
308 |
|
309 | "use strict";
|
310 |
|
311 |
|
312 | var utils = __webpack_require__( "../node_modules/axios/lib/utils.js");
|
313 | var bind = __webpack_require__( "../node_modules/axios/lib/helpers/bind.js");
|
314 | var Axios = __webpack_require__( "../node_modules/axios/lib/core/Axios.js");
|
315 | var mergeConfig = __webpack_require__( "../node_modules/axios/lib/core/mergeConfig.js");
|
316 | var defaults = __webpack_require__( "../node_modules/axios/lib/defaults.js");
|
317 |
|
318 |
|
319 |
|
320 |
|
321 |
|
322 |
|
323 |
|
324 | function createInstance(defaultConfig) {
|
325 | var context = new Axios(defaultConfig);
|
326 | var instance = bind(Axios.prototype.request, context);
|
327 |
|
328 |
|
329 | utils.extend(instance, Axios.prototype, context);
|
330 |
|
331 |
|
332 | utils.extend(instance, context);
|
333 |
|
334 | return instance;
|
335 | }
|
336 |
|
337 |
|
338 | var axios = createInstance(defaults);
|
339 |
|
340 |
|
341 | axios.Axios = Axios;
|
342 |
|
343 |
|
344 | axios.create = function create(instanceConfig) {
|
345 | return createInstance(mergeConfig(axios.defaults, instanceConfig));
|
346 | };
|
347 |
|
348 |
|
349 | axios.Cancel = __webpack_require__( "../node_modules/axios/lib/cancel/Cancel.js");
|
350 | axios.CancelToken = __webpack_require__( "../node_modules/axios/lib/cancel/CancelToken.js");
|
351 | axios.isCancel = __webpack_require__( "../node_modules/axios/lib/cancel/isCancel.js");
|
352 |
|
353 |
|
354 | axios.all = function all(promises) {
|
355 | return Promise.all(promises);
|
356 | };
|
357 | axios.spread = __webpack_require__( "../node_modules/axios/lib/helpers/spread.js");
|
358 |
|
359 | module.exports = axios;
|
360 |
|
361 |
|
362 | module.exports.default = axios;
|
363 |
|
364 |
|
365 | }),
|
366 |
|
367 | "../node_modules/axios/lib/cancel/Cancel.js":
|
368 |
|
369 |
|
370 |
|
371 |
|
372 | (function(module, exports, __webpack_require__) {
|
373 |
|
374 | "use strict";
|
375 |
|
376 |
|
377 |
|
378 |
|
379 |
|
380 |
|
381 |
|
382 |
|
383 | function Cancel(message) {
|
384 | this.message = message;
|
385 | }
|
386 |
|
387 | Cancel.prototype.toString = function toString() {
|
388 | return 'Cancel' + (this.message ? ': ' + this.message : '');
|
389 | };
|
390 |
|
391 | Cancel.prototype.__CANCEL__ = true;
|
392 |
|
393 | module.exports = Cancel;
|
394 |
|
395 |
|
396 | }),
|
397 |
|
398 | "../node_modules/axios/lib/cancel/CancelToken.js":
|
399 |
|
400 |
|
401 |
|
402 |
|
403 | (function(module, exports, __webpack_require__) {
|
404 |
|
405 | "use strict";
|
406 |
|
407 |
|
408 | var Cancel = __webpack_require__( "../node_modules/axios/lib/cancel/Cancel.js");
|
409 |
|
410 |
|
411 |
|
412 |
|
413 |
|
414 |
|
415 |
|
416 | function CancelToken(executor) {
|
417 | if (typeof executor !== 'function') {
|
418 | throw new TypeError('executor must be a function.');
|
419 | }
|
420 |
|
421 | var resolvePromise;
|
422 | this.promise = new Promise(function promiseExecutor(resolve) {
|
423 | resolvePromise = resolve;
|
424 | });
|
425 |
|
426 | var token = this;
|
427 | executor(function cancel(message) {
|
428 | if (token.reason) {
|
429 |
|
430 | return;
|
431 | }
|
432 |
|
433 | token.reason = new Cancel(message);
|
434 | resolvePromise(token.reason);
|
435 | });
|
436 | }
|
437 |
|
438 |
|
439 |
|
440 |
|
441 | CancelToken.prototype.throwIfRequested = function throwIfRequested() {
|
442 | if (this.reason) {
|
443 | throw this.reason;
|
444 | }
|
445 | };
|
446 |
|
447 |
|
448 |
|
449 |
|
450 |
|
451 | CancelToken.source = function source() {
|
452 | var cancel;
|
453 | var token = new CancelToken(function executor(c) {
|
454 | cancel = c;
|
455 | });
|
456 | return {
|
457 | token: token,
|
458 | cancel: cancel
|
459 | };
|
460 | };
|
461 |
|
462 | module.exports = CancelToken;
|
463 |
|
464 |
|
465 | }),
|
466 |
|
467 | "../node_modules/axios/lib/cancel/isCancel.js":
|
468 |
|
469 |
|
470 |
|
471 |
|
472 | (function(module, exports, __webpack_require__) {
|
473 |
|
474 | "use strict";
|
475 |
|
476 |
|
477 | module.exports = function isCancel(value) {
|
478 | return !!(value && value.__CANCEL__);
|
479 | };
|
480 |
|
481 |
|
482 | }),
|
483 |
|
484 | "../node_modules/axios/lib/core/Axios.js":
|
485 |
|
486 |
|
487 |
|
488 |
|
489 | (function(module, exports, __webpack_require__) {
|
490 |
|
491 | "use strict";
|
492 |
|
493 |
|
494 | var utils = __webpack_require__( "../node_modules/axios/lib/utils.js");
|
495 | var buildURL = __webpack_require__( "../node_modules/axios/lib/helpers/buildURL.js");
|
496 | var InterceptorManager = __webpack_require__( "../node_modules/axios/lib/core/InterceptorManager.js");
|
497 | var dispatchRequest = __webpack_require__( "../node_modules/axios/lib/core/dispatchRequest.js");
|
498 | var mergeConfig = __webpack_require__( "../node_modules/axios/lib/core/mergeConfig.js");
|
499 |
|
500 |
|
501 |
|
502 |
|
503 |
|
504 |
|
505 | function Axios(instanceConfig) {
|
506 | this.defaults = instanceConfig;
|
507 | this.interceptors = {
|
508 | request: new InterceptorManager(),
|
509 | response: new InterceptorManager()
|
510 | };
|
511 | }
|
512 |
|
513 |
|
514 |
|
515 |
|
516 |
|
517 |
|
518 | Axios.prototype.request = function request(config) {
|
519 |
|
520 |
|
521 | if (typeof config === 'string') {
|
522 | config = arguments[1] || {};
|
523 | config.url = arguments[0];
|
524 | } else {
|
525 | config = config || {};
|
526 | }
|
527 |
|
528 | config = mergeConfig(this.defaults, config);
|
529 |
|
530 |
|
531 | if (config.method) {
|
532 | config.method = config.method.toLowerCase();
|
533 | } else if (this.defaults.method) {
|
534 | config.method = this.defaults.method.toLowerCase();
|
535 | } else {
|
536 | config.method = 'get';
|
537 | }
|
538 |
|
539 |
|
540 | var chain = [dispatchRequest, undefined];
|
541 | var promise = Promise.resolve(config);
|
542 |
|
543 | this.interceptors.request.forEach(function unshiftRequestInterceptors(interceptor) {
|
544 | chain.unshift(interceptor.fulfilled, interceptor.rejected);
|
545 | });
|
546 |
|
547 | this.interceptors.response.forEach(function pushResponseInterceptors(interceptor) {
|
548 | chain.push(interceptor.fulfilled, interceptor.rejected);
|
549 | });
|
550 |
|
551 | while (chain.length) {
|
552 | promise = promise.then(chain.shift(), chain.shift());
|
553 | }
|
554 |
|
555 | return promise;
|
556 | };
|
557 |
|
558 | Axios.prototype.getUri = function getUri(config) {
|
559 | config = mergeConfig(this.defaults, config);
|
560 | return buildURL(config.url, config.params, config.paramsSerializer).replace(/^\?/, '');
|
561 | };
|
562 |
|
563 |
|
564 | utils.forEach(['delete', 'get', 'head', 'options'], function forEachMethodNoData(method) {
|
565 |
|
566 | Axios.prototype[method] = function(url, config) {
|
567 | return this.request(utils.merge(config || {}, {
|
568 | method: method,
|
569 | url: url
|
570 | }));
|
571 | };
|
572 | });
|
573 |
|
574 | utils.forEach(['post', 'put', 'patch'], function forEachMethodWithData(method) {
|
575 |
|
576 | Axios.prototype[method] = function(url, data, config) {
|
577 | return this.request(utils.merge(config || {}, {
|
578 | method: method,
|
579 | url: url,
|
580 | data: data
|
581 | }));
|
582 | };
|
583 | });
|
584 |
|
585 | module.exports = Axios;
|
586 |
|
587 |
|
588 | }),
|
589 |
|
590 | "../node_modules/axios/lib/core/InterceptorManager.js":
|
591 |
|
592 |
|
593 |
|
594 |
|
595 | (function(module, exports, __webpack_require__) {
|
596 |
|
597 | "use strict";
|
598 |
|
599 |
|
600 | var utils = __webpack_require__( "../node_modules/axios/lib/utils.js");
|
601 |
|
602 | function InterceptorManager() {
|
603 | this.handlers = [];
|
604 | }
|
605 |
|
606 |
|
607 |
|
608 |
|
609 |
|
610 |
|
611 |
|
612 |
|
613 |
|
614 | InterceptorManager.prototype.use = function use(fulfilled, rejected) {
|
615 | this.handlers.push({
|
616 | fulfilled: fulfilled,
|
617 | rejected: rejected
|
618 | });
|
619 | return this.handlers.length - 1;
|
620 | };
|
621 |
|
622 |
|
623 |
|
624 |
|
625 |
|
626 |
|
627 | InterceptorManager.prototype.eject = function eject(id) {
|
628 | if (this.handlers[id]) {
|
629 | this.handlers[id] = null;
|
630 | }
|
631 | };
|
632 |
|
633 |
|
634 |
|
635 |
|
636 |
|
637 |
|
638 |
|
639 |
|
640 |
|
641 | InterceptorManager.prototype.forEach = function forEach(fn) {
|
642 | utils.forEach(this.handlers, function forEachHandler(h) {
|
643 | if (h !== null) {
|
644 | fn(h);
|
645 | }
|
646 | });
|
647 | };
|
648 |
|
649 | module.exports = InterceptorManager;
|
650 |
|
651 |
|
652 | }),
|
653 |
|
654 | "../node_modules/axios/lib/core/buildFullPath.js":
|
655 |
|
656 |
|
657 |
|
658 |
|
659 | (function(module, exports, __webpack_require__) {
|
660 |
|
661 | "use strict";
|
662 |
|
663 |
|
664 | var isAbsoluteURL = __webpack_require__( "../node_modules/axios/lib/helpers/isAbsoluteURL.js");
|
665 | var combineURLs = __webpack_require__( "../node_modules/axios/lib/helpers/combineURLs.js");
|
666 |
|
667 |
|
668 |
|
669 |
|
670 |
|
671 |
|
672 |
|
673 |
|
674 |
|
675 |
|
676 | module.exports = function buildFullPath(baseURL, requestedURL) {
|
677 | if (baseURL && !isAbsoluteURL(requestedURL)) {
|
678 | return combineURLs(baseURL, requestedURL);
|
679 | }
|
680 | return requestedURL;
|
681 | };
|
682 |
|
683 |
|
684 | }),
|
685 |
|
686 | "../node_modules/axios/lib/core/createError.js":
|
687 |
|
688 |
|
689 |
|
690 |
|
691 | (function(module, exports, __webpack_require__) {
|
692 |
|
693 | "use strict";
|
694 |
|
695 |
|
696 | var enhanceError = __webpack_require__( "../node_modules/axios/lib/core/enhanceError.js");
|
697 |
|
698 |
|
699 |
|
700 |
|
701 |
|
702 |
|
703 |
|
704 |
|
705 |
|
706 |
|
707 |
|
708 | module.exports = function createError(message, config, code, request, response) {
|
709 | var error = new Error(message);
|
710 | return enhanceError(error, config, code, request, response);
|
711 | };
|
712 |
|
713 |
|
714 | }),
|
715 |
|
716 | "../node_modules/axios/lib/core/dispatchRequest.js":
|
717 |
|
718 |
|
719 |
|
720 |
|
721 | (function(module, exports, __webpack_require__) {
|
722 |
|
723 | "use strict";
|
724 |
|
725 |
|
726 | var utils = __webpack_require__( "../node_modules/axios/lib/utils.js");
|
727 | var transformData = __webpack_require__( "../node_modules/axios/lib/core/transformData.js");
|
728 | var isCancel = __webpack_require__( "../node_modules/axios/lib/cancel/isCancel.js");
|
729 | var defaults = __webpack_require__( "../node_modules/axios/lib/defaults.js");
|
730 |
|
731 |
|
732 |
|
733 |
|
734 | function throwIfCancellationRequested(config) {
|
735 | if (config.cancelToken) {
|
736 | config.cancelToken.throwIfRequested();
|
737 | }
|
738 | }
|
739 |
|
740 |
|
741 |
|
742 |
|
743 |
|
744 |
|
745 |
|
746 | module.exports = function dispatchRequest(config) {
|
747 | throwIfCancellationRequested(config);
|
748 |
|
749 |
|
750 | config.headers = config.headers || {};
|
751 |
|
752 |
|
753 | config.data = transformData(
|
754 | config.data,
|
755 | config.headers,
|
756 | config.transformRequest
|
757 | );
|
758 |
|
759 |
|
760 | config.headers = utils.merge(
|
761 | config.headers.common || {},
|
762 | config.headers[config.method] || {},
|
763 | config.headers
|
764 | );
|
765 |
|
766 | utils.forEach(
|
767 | ['delete', 'get', 'head', 'post', 'put', 'patch', 'common'],
|
768 | function cleanHeaderConfig(method) {
|
769 | delete config.headers[method];
|
770 | }
|
771 | );
|
772 |
|
773 | var adapter = config.adapter || defaults.adapter;
|
774 |
|
775 | return adapter(config).then(function onAdapterResolution(response) {
|
776 | throwIfCancellationRequested(config);
|
777 |
|
778 |
|
779 | response.data = transformData(
|
780 | response.data,
|
781 | response.headers,
|
782 | config.transformResponse
|
783 | );
|
784 |
|
785 | return response;
|
786 | }, function onAdapterRejection(reason) {
|
787 | if (!isCancel(reason)) {
|
788 | throwIfCancellationRequested(config);
|
789 |
|
790 |
|
791 | if (reason && reason.response) {
|
792 | reason.response.data = transformData(
|
793 | reason.response.data,
|
794 | reason.response.headers,
|
795 | config.transformResponse
|
796 | );
|
797 | }
|
798 | }
|
799 |
|
800 | return Promise.reject(reason);
|
801 | });
|
802 | };
|
803 |
|
804 |
|
805 | }),
|
806 |
|
807 | "../node_modules/axios/lib/core/enhanceError.js":
|
808 |
|
809 |
|
810 |
|
811 |
|
812 | (function(module, exports, __webpack_require__) {
|
813 |
|
814 | "use strict";
|
815 |
|
816 |
|
817 |
|
818 |
|
819 |
|
820 |
|
821 |
|
822 |
|
823 |
|
824 |
|
825 |
|
826 |
|
827 | module.exports = function enhanceError(error, config, code, request, response) {
|
828 | error.config = config;
|
829 | if (code) {
|
830 | error.code = code;
|
831 | }
|
832 |
|
833 | error.request = request;
|
834 | error.response = response;
|
835 | error.isAxiosError = true;
|
836 |
|
837 | error.toJSON = function() {
|
838 | return {
|
839 |
|
840 | message: this.message,
|
841 | name: this.name,
|
842 |
|
843 | description: this.description,
|
844 | number: this.number,
|
845 |
|
846 | fileName: this.fileName,
|
847 | lineNumber: this.lineNumber,
|
848 | columnNumber: this.columnNumber,
|
849 | stack: this.stack,
|
850 |
|
851 | config: this.config,
|
852 | code: this.code
|
853 | };
|
854 | };
|
855 | return error;
|
856 | };
|
857 |
|
858 |
|
859 | }),
|
860 |
|
861 | "../node_modules/axios/lib/core/mergeConfig.js":
|
862 |
|
863 |
|
864 |
|
865 |
|
866 | (function(module, exports, __webpack_require__) {
|
867 |
|
868 | "use strict";
|
869 |
|
870 |
|
871 | var utils = __webpack_require__( "../node_modules/axios/lib/utils.js");
|
872 |
|
873 |
|
874 |
|
875 |
|
876 |
|
877 |
|
878 |
|
879 |
|
880 |
|
881 | module.exports = function mergeConfig(config1, config2) {
|
882 |
|
883 | config2 = config2 || {};
|
884 | var config = {};
|
885 |
|
886 | var valueFromConfig2Keys = ['url', 'method', 'params', 'data'];
|
887 | var mergeDeepPropertiesKeys = ['headers', 'auth', 'proxy'];
|
888 | var defaultToConfig2Keys = [
|
889 | 'baseURL', 'url', 'transformRequest', 'transformResponse', 'paramsSerializer',
|
890 | 'timeout', 'withCredentials', 'adapter', 'responseType', 'xsrfCookieName',
|
891 | 'xsrfHeaderName', 'onUploadProgress', 'onDownloadProgress',
|
892 | 'maxContentLength', 'validateStatus', 'maxRedirects', 'httpAgent',
|
893 | 'httpsAgent', 'cancelToken', 'socketPath'
|
894 | ];
|
895 |
|
896 | utils.forEach(valueFromConfig2Keys, function valueFromConfig2(prop) {
|
897 | if (typeof config2[prop] !== 'undefined') {
|
898 | config[prop] = config2[prop];
|
899 | }
|
900 | });
|
901 |
|
902 | utils.forEach(mergeDeepPropertiesKeys, function mergeDeepProperties(prop) {
|
903 | if (utils.isObject(config2[prop])) {
|
904 | config[prop] = utils.deepMerge(config1[prop], config2[prop]);
|
905 | } else if (typeof config2[prop] !== 'undefined') {
|
906 | config[prop] = config2[prop];
|
907 | } else if (utils.isObject(config1[prop])) {
|
908 | config[prop] = utils.deepMerge(config1[prop]);
|
909 | } else if (typeof config1[prop] !== 'undefined') {
|
910 | config[prop] = config1[prop];
|
911 | }
|
912 | });
|
913 |
|
914 | utils.forEach(defaultToConfig2Keys, function defaultToConfig2(prop) {
|
915 | if (typeof config2[prop] !== 'undefined') {
|
916 | config[prop] = config2[prop];
|
917 | } else if (typeof config1[prop] !== 'undefined') {
|
918 | config[prop] = config1[prop];
|
919 | }
|
920 | });
|
921 |
|
922 | var axiosKeys = valueFromConfig2Keys
|
923 | .concat(mergeDeepPropertiesKeys)
|
924 | .concat(defaultToConfig2Keys);
|
925 |
|
926 | var otherKeys = Object
|
927 | .keys(config2)
|
928 | .filter(function filterAxiosKeys(key) {
|
929 | return axiosKeys.indexOf(key) === -1;
|
930 | });
|
931 |
|
932 | utils.forEach(otherKeys, function otherKeysDefaultToConfig2(prop) {
|
933 | if (typeof config2[prop] !== 'undefined') {
|
934 | config[prop] = config2[prop];
|
935 | } else if (typeof config1[prop] !== 'undefined') {
|
936 | config[prop] = config1[prop];
|
937 | }
|
938 | });
|
939 |
|
940 | return config;
|
941 | };
|
942 |
|
943 |
|
944 | }),
|
945 |
|
946 | "../node_modules/axios/lib/core/settle.js":
|
947 |
|
948 |
|
949 |
|
950 |
|
951 | (function(module, exports, __webpack_require__) {
|
952 |
|
953 | "use strict";
|
954 |
|
955 |
|
956 | var createError = __webpack_require__( "../node_modules/axios/lib/core/createError.js");
|
957 |
|
958 |
|
959 |
|
960 |
|
961 |
|
962 |
|
963 |
|
964 |
|
965 | module.exports = function settle(resolve, reject, response) {
|
966 | var validateStatus = response.config.validateStatus;
|
967 | if (!validateStatus || validateStatus(response.status)) {
|
968 | resolve(response);
|
969 | } else {
|
970 | reject(createError(
|
971 | 'Request failed with status code ' + response.status,
|
972 | response.config,
|
973 | null,
|
974 | response.request,
|
975 | response
|
976 | ));
|
977 | }
|
978 | };
|
979 |
|
980 |
|
981 | }),
|
982 |
|
983 | "../node_modules/axios/lib/core/transformData.js":
|
984 |
|
985 |
|
986 |
|
987 |
|
988 | (function(module, exports, __webpack_require__) {
|
989 |
|
990 | "use strict";
|
991 |
|
992 |
|
993 | var utils = __webpack_require__( "../node_modules/axios/lib/utils.js");
|
994 |
|
995 |
|
996 |
|
997 |
|
998 |
|
999 |
|
1000 |
|
1001 |
|
1002 |
|
1003 | module.exports = function transformData(data, headers, fns) {
|
1004 |
|
1005 | utils.forEach(fns, function transform(fn) {
|
1006 | data = fn(data, headers);
|
1007 | });
|
1008 |
|
1009 | return data;
|
1010 | };
|
1011 |
|
1012 |
|
1013 | }),
|
1014 |
|
1015 | "../node_modules/axios/lib/defaults.js":
|
1016 |
|
1017 |
|
1018 |
|
1019 |
|
1020 | (function(module, exports, __webpack_require__) {
|
1021 |
|
1022 | "use strict";
|
1023 | (function(process) {
|
1024 |
|
1025 | var utils = __webpack_require__( "../node_modules/axios/lib/utils.js");
|
1026 | var normalizeHeaderName = __webpack_require__( "../node_modules/axios/lib/helpers/normalizeHeaderName.js");
|
1027 |
|
1028 | var DEFAULT_CONTENT_TYPE = {
|
1029 | 'Content-Type': 'application/x-www-form-urlencoded'
|
1030 | };
|
1031 |
|
1032 | function setContentTypeIfUnset(headers, value) {
|
1033 | if (!utils.isUndefined(headers) && utils.isUndefined(headers['Content-Type'])) {
|
1034 | headers['Content-Type'] = value;
|
1035 | }
|
1036 | }
|
1037 |
|
1038 | function getDefaultAdapter() {
|
1039 | var adapter;
|
1040 | if (typeof XMLHttpRequest !== 'undefined') {
|
1041 |
|
1042 | adapter = __webpack_require__( "../node_modules/axios/lib/adapters/xhr.js");
|
1043 | } else if (typeof process !== 'undefined' && Object.prototype.toString.call(process) === '[object process]') {
|
1044 |
|
1045 | adapter = __webpack_require__( "../node_modules/axios/lib/adapters/xhr.js");
|
1046 | }
|
1047 | return adapter;
|
1048 | }
|
1049 |
|
1050 | var defaults = {
|
1051 | adapter: getDefaultAdapter(),
|
1052 |
|
1053 | transformRequest: [function transformRequest(data, headers) {
|
1054 | normalizeHeaderName(headers, 'Accept');
|
1055 | normalizeHeaderName(headers, 'Content-Type');
|
1056 | if (utils.isFormData(data) ||
|
1057 | utils.isArrayBuffer(data) ||
|
1058 | utils.isBuffer(data) ||
|
1059 | utils.isStream(data) ||
|
1060 | utils.isFile(data) ||
|
1061 | utils.isBlob(data)
|
1062 | ) {
|
1063 | return data;
|
1064 | }
|
1065 | if (utils.isArrayBufferView(data)) {
|
1066 | return data.buffer;
|
1067 | }
|
1068 | if (utils.isURLSearchParams(data)) {
|
1069 | setContentTypeIfUnset(headers, 'application/x-www-form-urlencoded;charset=utf-8');
|
1070 | return data.toString();
|
1071 | }
|
1072 | if (utils.isObject(data)) {
|
1073 | setContentTypeIfUnset(headers, 'application/json;charset=utf-8');
|
1074 | return JSON.stringify(data);
|
1075 | }
|
1076 | return data;
|
1077 | }],
|
1078 |
|
1079 | transformResponse: [function transformResponse(data) {
|
1080 |
|
1081 | if (typeof data === 'string') {
|
1082 | try {
|
1083 | data = JSON.parse(data);
|
1084 | } catch (e) { }
|
1085 | }
|
1086 | return data;
|
1087 | }],
|
1088 |
|
1089 | |
1090 |
|
1091 |
|
1092 |
|
1093 | timeout: 0,
|
1094 |
|
1095 | xsrfCookieName: 'XSRF-TOKEN',
|
1096 | xsrfHeaderName: 'X-XSRF-TOKEN',
|
1097 |
|
1098 | maxContentLength: -1,
|
1099 |
|
1100 | validateStatus: function validateStatus(status) {
|
1101 | return status >= 200 && status < 300;
|
1102 | }
|
1103 | };
|
1104 |
|
1105 | defaults.headers = {
|
1106 | common: {
|
1107 | 'Accept': 'application/json, text/plain, */*'
|
1108 | }
|
1109 | };
|
1110 |
|
1111 | utils.forEach(['delete', 'get', 'head'], function forEachMethodNoData(method) {
|
1112 | defaults.headers[method] = {};
|
1113 | });
|
1114 |
|
1115 | utils.forEach(['post', 'put', 'patch'], function forEachMethodWithData(method) {
|
1116 | defaults.headers[method] = utils.merge(DEFAULT_CONTENT_TYPE);
|
1117 | });
|
1118 |
|
1119 | module.exports = defaults;
|
1120 |
|
1121 | }.call(this, __webpack_require__( "../node_modules/process/browser.js")))
|
1122 |
|
1123 | }),
|
1124 |
|
1125 | "../node_modules/axios/lib/helpers/bind.js":
|
1126 |
|
1127 |
|
1128 |
|
1129 |
|
1130 | (function(module, exports, __webpack_require__) {
|
1131 |
|
1132 | "use strict";
|
1133 |
|
1134 |
|
1135 | module.exports = function bind(fn, thisArg) {
|
1136 | return function wrap() {
|
1137 | var args = new Array(arguments.length);
|
1138 | for (var i = 0; i < args.length; i++) {
|
1139 | args[i] = arguments[i];
|
1140 | }
|
1141 | return fn.apply(thisArg, args);
|
1142 | };
|
1143 | };
|
1144 |
|
1145 |
|
1146 | }),
|
1147 |
|
1148 | "../node_modules/axios/lib/helpers/buildURL.js":
|
1149 |
|
1150 |
|
1151 |
|
1152 |
|
1153 | (function(module, exports, __webpack_require__) {
|
1154 |
|
1155 | "use strict";
|
1156 |
|
1157 |
|
1158 | var utils = __webpack_require__( "../node_modules/axios/lib/utils.js");
|
1159 |
|
1160 | function encode(val) {
|
1161 | return encodeURIComponent(val).
|
1162 | replace(/%40/gi, '@').
|
1163 | replace(/%3A/gi, ':').
|
1164 | replace(/%24/g, '$').
|
1165 | replace(/%2C/gi, ',').
|
1166 | replace(/%20/g, '+').
|
1167 | replace(/%5B/gi, '[').
|
1168 | replace(/%5D/gi, ']');
|
1169 | }
|
1170 |
|
1171 |
|
1172 |
|
1173 |
|
1174 |
|
1175 |
|
1176 |
|
1177 |
|
1178 | module.exports = function buildURL(url, params, paramsSerializer) {
|
1179 |
|
1180 | if (!params) {
|
1181 | return url;
|
1182 | }
|
1183 |
|
1184 | var serializedParams;
|
1185 | if (paramsSerializer) {
|
1186 | serializedParams = paramsSerializer(params);
|
1187 | } else if (utils.isURLSearchParams(params)) {
|
1188 | serializedParams = params.toString();
|
1189 | } else {
|
1190 | var parts = [];
|
1191 |
|
1192 | utils.forEach(params, function serialize(val, key) {
|
1193 | if (val === null || typeof val === 'undefined') {
|
1194 | return;
|
1195 | }
|
1196 |
|
1197 | if (utils.isArray(val)) {
|
1198 | key = key + '[]';
|
1199 | } else {
|
1200 | val = [val];
|
1201 | }
|
1202 |
|
1203 | utils.forEach(val, function parseValue(v) {
|
1204 | if (utils.isDate(v)) {
|
1205 | v = v.toISOString();
|
1206 | } else if (utils.isObject(v)) {
|
1207 | v = JSON.stringify(v);
|
1208 | }
|
1209 | parts.push(encode(key) + '=' + encode(v));
|
1210 | });
|
1211 | });
|
1212 |
|
1213 | serializedParams = parts.join('&');
|
1214 | }
|
1215 |
|
1216 | if (serializedParams) {
|
1217 | var hashmarkIndex = url.indexOf('#');
|
1218 | if (hashmarkIndex !== -1) {
|
1219 | url = url.slice(0, hashmarkIndex);
|
1220 | }
|
1221 |
|
1222 | url += (url.indexOf('?') === -1 ? '?' : '&') + serializedParams;
|
1223 | }
|
1224 |
|
1225 | return url;
|
1226 | };
|
1227 |
|
1228 |
|
1229 | }),
|
1230 |
|
1231 | "../node_modules/axios/lib/helpers/combineURLs.js":
|
1232 |
|
1233 |
|
1234 |
|
1235 |
|
1236 | (function(module, exports, __webpack_require__) {
|
1237 |
|
1238 | "use strict";
|
1239 |
|
1240 |
|
1241 |
|
1242 |
|
1243 |
|
1244 |
|
1245 |
|
1246 |
|
1247 |
|
1248 | module.exports = function combineURLs(baseURL, relativeURL) {
|
1249 | return relativeURL
|
1250 | ? baseURL.replace(/\/+$/, '') + '/' + relativeURL.replace(/^\/+/, '')
|
1251 | : baseURL;
|
1252 | };
|
1253 |
|
1254 |
|
1255 | }),
|
1256 |
|
1257 | "../node_modules/axios/lib/helpers/cookies.js":
|
1258 |
|
1259 |
|
1260 |
|
1261 |
|
1262 | (function(module, exports, __webpack_require__) {
|
1263 |
|
1264 | "use strict";
|
1265 |
|
1266 |
|
1267 | var utils = __webpack_require__( "../node_modules/axios/lib/utils.js");
|
1268 |
|
1269 | module.exports = (
|
1270 | utils.isStandardBrowserEnv() ?
|
1271 |
|
1272 |
|
1273 | (function standardBrowserEnv() {
|
1274 | return {
|
1275 | write: function write(name, value, expires, path, domain, secure) {
|
1276 | var cookie = [];
|
1277 | cookie.push(name + '=' + encodeURIComponent(value));
|
1278 |
|
1279 | if (utils.isNumber(expires)) {
|
1280 | cookie.push('expires=' + new Date(expires).toGMTString());
|
1281 | }
|
1282 |
|
1283 | if (utils.isString(path)) {
|
1284 | cookie.push('path=' + path);
|
1285 | }
|
1286 |
|
1287 | if (utils.isString(domain)) {
|
1288 | cookie.push('domain=' + domain);
|
1289 | }
|
1290 |
|
1291 | if (secure === true) {
|
1292 | cookie.push('secure');
|
1293 | }
|
1294 |
|
1295 | document.cookie = cookie.join('; ');
|
1296 | },
|
1297 |
|
1298 | read: function read(name) {
|
1299 | var match = document.cookie.match(new RegExp('(^|;\\s*)(' + name + ')=([^;]*)'));
|
1300 | return (match ? decodeURIComponent(match[3]) : null);
|
1301 | },
|
1302 |
|
1303 | remove: function remove(name) {
|
1304 | this.write(name, '', Date.now() - 86400000);
|
1305 | }
|
1306 | };
|
1307 | })() :
|
1308 |
|
1309 |
|
1310 | (function nonStandardBrowserEnv() {
|
1311 | return {
|
1312 | write: function write() {},
|
1313 | read: function read() { return null; },
|
1314 | remove: function remove() {}
|
1315 | };
|
1316 | })()
|
1317 | );
|
1318 |
|
1319 |
|
1320 | }),
|
1321 |
|
1322 | "../node_modules/axios/lib/helpers/isAbsoluteURL.js":
|
1323 |
|
1324 |
|
1325 |
|
1326 |
|
1327 | (function(module, exports, __webpack_require__) {
|
1328 |
|
1329 | "use strict";
|
1330 |
|
1331 |
|
1332 |
|
1333 |
|
1334 |
|
1335 |
|
1336 |
|
1337 |
|
1338 | module.exports = function isAbsoluteURL(url) {
|
1339 |
|
1340 |
|
1341 |
|
1342 | return /^([a-z][a-z\d\+\-\.]*:)?\/\//i.test(url);
|
1343 | };
|
1344 |
|
1345 |
|
1346 | }),
|
1347 |
|
1348 | "../node_modules/axios/lib/helpers/isURLSameOrigin.js":
|
1349 |
|
1350 |
|
1351 |
|
1352 |
|
1353 | (function(module, exports, __webpack_require__) {
|
1354 |
|
1355 | "use strict";
|
1356 |
|
1357 |
|
1358 | var utils = __webpack_require__( "../node_modules/axios/lib/utils.js");
|
1359 |
|
1360 | module.exports = (
|
1361 | utils.isStandardBrowserEnv() ?
|
1362 |
|
1363 |
|
1364 |
|
1365 | (function standardBrowserEnv() {
|
1366 | var msie = /(msie|trident)/i.test(navigator.userAgent);
|
1367 | var urlParsingNode = document.createElement('a');
|
1368 | var originURL;
|
1369 |
|
1370 | |
1371 |
|
1372 |
|
1373 |
|
1374 |
|
1375 |
|
1376 | function resolveURL(url) {
|
1377 | var href = url;
|
1378 |
|
1379 | if (msie) {
|
1380 |
|
1381 | urlParsingNode.setAttribute('href', href);
|
1382 | href = urlParsingNode.href;
|
1383 | }
|
1384 |
|
1385 | urlParsingNode.setAttribute('href', href);
|
1386 |
|
1387 |
|
1388 | return {
|
1389 | href: urlParsingNode.href,
|
1390 | protocol: urlParsingNode.protocol ? urlParsingNode.protocol.replace(/:$/, '') : '',
|
1391 | host: urlParsingNode.host,
|
1392 | search: urlParsingNode.search ? urlParsingNode.search.replace(/^\?/, '') : '',
|
1393 | hash: urlParsingNode.hash ? urlParsingNode.hash.replace(/^#/, '') : '',
|
1394 | hostname: urlParsingNode.hostname,
|
1395 | port: urlParsingNode.port,
|
1396 | pathname: (urlParsingNode.pathname.charAt(0) === '/') ?
|
1397 | urlParsingNode.pathname :
|
1398 | '/' + urlParsingNode.pathname
|
1399 | };
|
1400 | }
|
1401 |
|
1402 | originURL = resolveURL(window.location.href);
|
1403 |
|
1404 | |
1405 |
|
1406 |
|
1407 |
|
1408 |
|
1409 |
|
1410 | return function isURLSameOrigin(requestURL) {
|
1411 | var parsed = (utils.isString(requestURL)) ? resolveURL(requestURL) : requestURL;
|
1412 | return (parsed.protocol === originURL.protocol &&
|
1413 | parsed.host === originURL.host);
|
1414 | };
|
1415 | })() :
|
1416 |
|
1417 |
|
1418 | (function nonStandardBrowserEnv() {
|
1419 | return function isURLSameOrigin() {
|
1420 | return true;
|
1421 | };
|
1422 | })()
|
1423 | );
|
1424 |
|
1425 |
|
1426 | }),
|
1427 |
|
1428 | "../node_modules/axios/lib/helpers/normalizeHeaderName.js":
|
1429 |
|
1430 |
|
1431 |
|
1432 |
|
1433 | (function(module, exports, __webpack_require__) {
|
1434 |
|
1435 | "use strict";
|
1436 |
|
1437 |
|
1438 | var utils = __webpack_require__( "../node_modules/axios/lib/utils.js");
|
1439 |
|
1440 | module.exports = function normalizeHeaderName(headers, normalizedName) {
|
1441 | utils.forEach(headers, function processHeader(value, name) {
|
1442 | if (name !== normalizedName && name.toUpperCase() === normalizedName.toUpperCase()) {
|
1443 | headers[normalizedName] = value;
|
1444 | delete headers[name];
|
1445 | }
|
1446 | });
|
1447 | };
|
1448 |
|
1449 |
|
1450 | }),
|
1451 |
|
1452 | "../node_modules/axios/lib/helpers/parseHeaders.js":
|
1453 |
|
1454 |
|
1455 |
|
1456 |
|
1457 | (function(module, exports, __webpack_require__) {
|
1458 |
|
1459 | "use strict";
|
1460 |
|
1461 |
|
1462 | var utils = __webpack_require__( "../node_modules/axios/lib/utils.js");
|
1463 |
|
1464 |
|
1465 |
|
1466 | var ignoreDuplicateOf = [
|
1467 | 'age', 'authorization', 'content-length', 'content-type', 'etag',
|
1468 | 'expires', 'from', 'host', 'if-modified-since', 'if-unmodified-since',
|
1469 | 'last-modified', 'location', 'max-forwards', 'proxy-authorization',
|
1470 | 'referer', 'retry-after', 'user-agent'
|
1471 | ];
|
1472 |
|
1473 |
|
1474 |
|
1475 |
|
1476 |
|
1477 |
|
1478 |
|
1479 |
|
1480 |
|
1481 |
|
1482 |
|
1483 |
|
1484 |
|
1485 |
|
1486 | module.exports = function parseHeaders(headers) {
|
1487 | var parsed = {};
|
1488 | var key;
|
1489 | var val;
|
1490 | var i;
|
1491 |
|
1492 | if (!headers) { return parsed; }
|
1493 |
|
1494 | utils.forEach(headers.split('\n'), function parser(line) {
|
1495 | i = line.indexOf(':');
|
1496 | key = utils.trim(line.substr(0, i)).toLowerCase();
|
1497 | val = utils.trim(line.substr(i + 1));
|
1498 |
|
1499 | if (key) {
|
1500 | if (parsed[key] && ignoreDuplicateOf.indexOf(key) >= 0) {
|
1501 | return;
|
1502 | }
|
1503 | if (key === 'set-cookie') {
|
1504 | parsed[key] = (parsed[key] ? parsed[key] : []).concat([val]);
|
1505 | } else {
|
1506 | parsed[key] = parsed[key] ? parsed[key] + ', ' + val : val;
|
1507 | }
|
1508 | }
|
1509 | });
|
1510 |
|
1511 | return parsed;
|
1512 | };
|
1513 |
|
1514 |
|
1515 | }),
|
1516 |
|
1517 | "../node_modules/axios/lib/helpers/spread.js":
|
1518 |
|
1519 |
|
1520 |
|
1521 |
|
1522 | (function(module, exports, __webpack_require__) {
|
1523 |
|
1524 | "use strict";
|
1525 |
|
1526 |
|
1527 |
|
1528 |
|
1529 |
|
1530 |
|
1531 |
|
1532 |
|
1533 |
|
1534 |
|
1535 |
|
1536 |
|
1537 |
|
1538 |
|
1539 |
|
1540 |
|
1541 |
|
1542 |
|
1543 |
|
1544 |
|
1545 |
|
1546 |
|
1547 | module.exports = function spread(callback) {
|
1548 | return function wrap(arr) {
|
1549 | return callback.apply(null, arr);
|
1550 | };
|
1551 | };
|
1552 |
|
1553 |
|
1554 | }),
|
1555 |
|
1556 | "../node_modules/axios/lib/utils.js":
|
1557 |
|
1558 |
|
1559 |
|
1560 |
|
1561 | (function(module, exports, __webpack_require__) {
|
1562 |
|
1563 | "use strict";
|
1564 |
|
1565 |
|
1566 | var bind = __webpack_require__( "../node_modules/axios/lib/helpers/bind.js");
|
1567 |
|
1568 |
|
1569 |
|
1570 |
|
1571 |
|
1572 | var toString = Object.prototype.toString;
|
1573 |
|
1574 |
|
1575 |
|
1576 |
|
1577 |
|
1578 |
|
1579 |
|
1580 | function isArray(val) {
|
1581 | return toString.call(val) === '[object Array]';
|
1582 | }
|
1583 |
|
1584 |
|
1585 |
|
1586 |
|
1587 |
|
1588 |
|
1589 |
|
1590 | function isUndefined(val) {
|
1591 | return typeof val === 'undefined';
|
1592 | }
|
1593 |
|
1594 |
|
1595 |
|
1596 |
|
1597 |
|
1598 |
|
1599 |
|
1600 | function isBuffer(val) {
|
1601 | return val !== null && !isUndefined(val) && val.constructor !== null && !isUndefined(val.constructor)
|
1602 | && typeof val.constructor.isBuffer === 'function' && val.constructor.isBuffer(val);
|
1603 | }
|
1604 |
|
1605 |
|
1606 |
|
1607 |
|
1608 |
|
1609 |
|
1610 |
|
1611 | function isArrayBuffer(val) {
|
1612 | return toString.call(val) === '[object ArrayBuffer]';
|
1613 | }
|
1614 |
|
1615 |
|
1616 |
|
1617 |
|
1618 |
|
1619 |
|
1620 |
|
1621 | function isFormData(val) {
|
1622 | return (typeof FormData !== 'undefined') && (val instanceof FormData);
|
1623 | }
|
1624 |
|
1625 |
|
1626 |
|
1627 |
|
1628 |
|
1629 |
|
1630 |
|
1631 | function isArrayBufferView(val) {
|
1632 | var result;
|
1633 | if ((typeof ArrayBuffer !== 'undefined') && (ArrayBuffer.isView)) {
|
1634 | result = ArrayBuffer.isView(val);
|
1635 | } else {
|
1636 | result = (val) && (val.buffer) && (val.buffer instanceof ArrayBuffer);
|
1637 | }
|
1638 | return result;
|
1639 | }
|
1640 |
|
1641 |
|
1642 |
|
1643 |
|
1644 |
|
1645 |
|
1646 |
|
1647 | function isString(val) {
|
1648 | return typeof val === 'string';
|
1649 | }
|
1650 |
|
1651 |
|
1652 |
|
1653 |
|
1654 |
|
1655 |
|
1656 |
|
1657 | function isNumber(val) {
|
1658 | return typeof val === 'number';
|
1659 | }
|
1660 |
|
1661 |
|
1662 |
|
1663 |
|
1664 |
|
1665 |
|
1666 |
|
1667 | function isObject(val) {
|
1668 | return val !== null && typeof val === 'object';
|
1669 | }
|
1670 |
|
1671 |
|
1672 |
|
1673 |
|
1674 |
|
1675 |
|
1676 |
|
1677 | function isDate(val) {
|
1678 | return toString.call(val) === '[object Date]';
|
1679 | }
|
1680 |
|
1681 |
|
1682 |
|
1683 |
|
1684 |
|
1685 |
|
1686 |
|
1687 | function isFile(val) {
|
1688 | return toString.call(val) === '[object File]';
|
1689 | }
|
1690 |
|
1691 |
|
1692 |
|
1693 |
|
1694 |
|
1695 |
|
1696 |
|
1697 | function isBlob(val) {
|
1698 | return toString.call(val) === '[object Blob]';
|
1699 | }
|
1700 |
|
1701 |
|
1702 |
|
1703 |
|
1704 |
|
1705 |
|
1706 |
|
1707 | function isFunction(val) {
|
1708 | return toString.call(val) === '[object Function]';
|
1709 | }
|
1710 |
|
1711 |
|
1712 |
|
1713 |
|
1714 |
|
1715 |
|
1716 |
|
1717 | function isStream(val) {
|
1718 | return isObject(val) && isFunction(val.pipe);
|
1719 | }
|
1720 |
|
1721 |
|
1722 |
|
1723 |
|
1724 |
|
1725 |
|
1726 |
|
1727 | function isURLSearchParams(val) {
|
1728 | return typeof URLSearchParams !== 'undefined' && val instanceof URLSearchParams;
|
1729 | }
|
1730 |
|
1731 |
|
1732 |
|
1733 |
|
1734 |
|
1735 |
|
1736 |
|
1737 | function trim(str) {
|
1738 | return str.replace(/^\s*/, '').replace(/\s*$/, '');
|
1739 | }
|
1740 |
|
1741 |
|
1742 |
|
1743 |
|
1744 |
|
1745 |
|
1746 |
|
1747 |
|
1748 |
|
1749 |
|
1750 |
|
1751 |
|
1752 |
|
1753 |
|
1754 |
|
1755 |
|
1756 | function isStandardBrowserEnv() {
|
1757 | if (typeof navigator !== 'undefined' && (navigator.product === 'ReactNative' ||
|
1758 | navigator.product === 'NativeScript' ||
|
1759 | navigator.product === 'NS')) {
|
1760 | return false;
|
1761 | }
|
1762 | return (
|
1763 | typeof window !== 'undefined' &&
|
1764 | typeof document !== 'undefined'
|
1765 | );
|
1766 | }
|
1767 |
|
1768 |
|
1769 |
|
1770 |
|
1771 |
|
1772 |
|
1773 |
|
1774 |
|
1775 |
|
1776 |
|
1777 |
|
1778 |
|
1779 |
|
1780 | function forEach(obj, fn) {
|
1781 |
|
1782 | if (obj === null || typeof obj === 'undefined') {
|
1783 | return;
|
1784 | }
|
1785 |
|
1786 |
|
1787 | if (typeof obj !== 'object') {
|
1788 |
|
1789 | obj = [obj];
|
1790 | }
|
1791 |
|
1792 | if (isArray(obj)) {
|
1793 |
|
1794 | for (var i = 0, l = obj.length; i < l; i++) {
|
1795 | fn.call(null, obj[i], i, obj);
|
1796 | }
|
1797 | } else {
|
1798 |
|
1799 | for (var key in obj) {
|
1800 | if (Object.prototype.hasOwnProperty.call(obj, key)) {
|
1801 | fn.call(null, obj[key], key, obj);
|
1802 | }
|
1803 | }
|
1804 | }
|
1805 | }
|
1806 |
|
1807 |
|
1808 |
|
1809 |
|
1810 |
|
1811 |
|
1812 |
|
1813 |
|
1814 |
|
1815 |
|
1816 |
|
1817 |
|
1818 |
|
1819 |
|
1820 |
|
1821 |
|
1822 |
|
1823 |
|
1824 | function merge(/* obj1, obj2, obj3, ... */) {
|
1825 | var result = {};
|
1826 | function assignValue(val, key) {
|
1827 | if (typeof result[key] === 'object' && typeof val === 'object') {
|
1828 | result[key] = merge(result[key], val);
|
1829 | } else {
|
1830 | result[key] = val;
|
1831 | }
|
1832 | }
|
1833 |
|
1834 | for (var i = 0, l = arguments.length; i < l; i++) {
|
1835 | forEach(arguments[i], assignValue);
|
1836 | }
|
1837 | return result;
|
1838 | }
|
1839 |
|
1840 |
|
1841 |
|
1842 |
|
1843 |
|
1844 |
|
1845 |
|
1846 |
|
1847 |
|
1848 | function deepMerge(/* obj1, obj2, obj3, ... */) {
|
1849 | var result = {};
|
1850 | function assignValue(val, key) {
|
1851 | if (typeof result[key] === 'object' && typeof val === 'object') {
|
1852 | result[key] = deepMerge(result[key], val);
|
1853 | } else if (typeof val === 'object') {
|
1854 | result[key] = deepMerge({}, val);
|
1855 | } else {
|
1856 | result[key] = val;
|
1857 | }
|
1858 | }
|
1859 |
|
1860 | for (var i = 0, l = arguments.length; i < l; i++) {
|
1861 | forEach(arguments[i], assignValue);
|
1862 | }
|
1863 | return result;
|
1864 | }
|
1865 |
|
1866 |
|
1867 |
|
1868 |
|
1869 |
|
1870 |
|
1871 |
|
1872 |
|
1873 |
|
1874 | function extend(a, b, thisArg) {
|
1875 | forEach(b, function assignValue(val, key) {
|
1876 | if (thisArg && typeof val === 'function') {
|
1877 | a[key] = bind(val, thisArg);
|
1878 | } else {
|
1879 | a[key] = val;
|
1880 | }
|
1881 | });
|
1882 | return a;
|
1883 | }
|
1884 |
|
1885 | module.exports = {
|
1886 | isArray: isArray,
|
1887 | isArrayBuffer: isArrayBuffer,
|
1888 | isBuffer: isBuffer,
|
1889 | isFormData: isFormData,
|
1890 | isArrayBufferView: isArrayBufferView,
|
1891 | isString: isString,
|
1892 | isNumber: isNumber,
|
1893 | isObject: isObject,
|
1894 | isUndefined: isUndefined,
|
1895 | isDate: isDate,
|
1896 | isFile: isFile,
|
1897 | isBlob: isBlob,
|
1898 | isFunction: isFunction,
|
1899 | isStream: isStream,
|
1900 | isURLSearchParams: isURLSearchParams,
|
1901 | isStandardBrowserEnv: isStandardBrowserEnv,
|
1902 | forEach: forEach,
|
1903 | merge: merge,
|
1904 | deepMerge: deepMerge,
|
1905 | extend: extend,
|
1906 | trim: trim
|
1907 | };
|
1908 |
|
1909 |
|
1910 | }),
|
1911 |
|
1912 | "../node_modules/contentful-sdk-core/dist/index.es-modules.js":
|
1913 |
|
1914 |
|
1915 |
|
1916 |
|
1917 | (function(module, __webpack_exports__, __webpack_require__) {
|
1918 |
|
1919 | "use strict";
|
1920 | __webpack_require__.r(__webpack_exports__);
|
1921 | (function(process) { __webpack_require__.d(__webpack_exports__, "createHttpClient", function() { return createHttpClient; });
|
1922 | __webpack_require__.d(__webpack_exports__, "createRequestConfig", function() { return createRequestConfig; });
|
1923 | __webpack_require__.d(__webpack_exports__, "enforceObjPath", function() { return enforceObjPath; });
|
1924 | __webpack_require__.d(__webpack_exports__, "freezeSys", function() { return freezeSys; });
|
1925 | __webpack_require__.d(__webpack_exports__, "getUserAgentHeader", function() { return getUserAgentHeader; });
|
1926 | __webpack_require__.d(__webpack_exports__, "toPlainObject", function() { return toPlainObject; });
|
1927 | var lodash_cloneDeep__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__( "../node_modules/lodash/cloneDeep.js");
|
1928 | var lodash_cloneDeep__WEBPACK_IMPORTED_MODULE_0___default = __webpack_require__.n(lodash_cloneDeep__WEBPACK_IMPORTED_MODULE_0__);
|
1929 | var qs__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__( "../node_modules/qs/lib/index.js");
|
1930 | var qs__WEBPACK_IMPORTED_MODULE_1___default = __webpack_require__.n(qs__WEBPACK_IMPORTED_MODULE_1__);
|
1931 | var lodash_isPlainObject__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__( "../node_modules/lodash/isPlainObject.js");
|
1932 | var lodash_isPlainObject__WEBPACK_IMPORTED_MODULE_2___default = __webpack_require__.n(lodash_isPlainObject__WEBPACK_IMPORTED_MODULE_2__);
|
1933 | var os__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__( 1);
|
1934 | var os__WEBPACK_IMPORTED_MODULE_3___default = __webpack_require__.n(os__WEBPACK_IMPORTED_MODULE_3__);
|
1935 |
|
1936 |
|
1937 |
|
1938 |
|
1939 |
|
1940 | function _defineProperty(obj, key, value) {
|
1941 | if (key in obj) {
|
1942 | Object.defineProperty(obj, key, {
|
1943 | value: value,
|
1944 | enumerable: true,
|
1945 | configurable: true,
|
1946 | writable: true
|
1947 | });
|
1948 | } else {
|
1949 | obj[key] = value;
|
1950 | }
|
1951 |
|
1952 | return obj;
|
1953 | }
|
1954 |
|
1955 | function ownKeys(object, enumerableOnly) {
|
1956 | var keys = Object.keys(object);
|
1957 |
|
1958 | if (Object.getOwnPropertySymbols) {
|
1959 | var symbols = Object.getOwnPropertySymbols(object);
|
1960 | if (enumerableOnly) symbols = symbols.filter(function (sym) {
|
1961 | return Object.getOwnPropertyDescriptor(object, sym).enumerable;
|
1962 | });
|
1963 | keys.push.apply(keys, symbols);
|
1964 | }
|
1965 |
|
1966 | return keys;
|
1967 | }
|
1968 |
|
1969 | function _objectSpread2(target) {
|
1970 | for (var i = 1; i < arguments.length; i++) {
|
1971 | var source = arguments[i] != null ? arguments[i] : {};
|
1972 |
|
1973 | if (i % 2) {
|
1974 | ownKeys(Object(source), true).forEach(function (key) {
|
1975 | _defineProperty(target, key, source[key]);
|
1976 | });
|
1977 | } else if (Object.getOwnPropertyDescriptors) {
|
1978 | Object.defineProperties(target, Object.getOwnPropertyDescriptors(source));
|
1979 | } else {
|
1980 | ownKeys(Object(source)).forEach(function (key) {
|
1981 | Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));
|
1982 | });
|
1983 | }
|
1984 | }
|
1985 |
|
1986 | return target;
|
1987 | }
|
1988 |
|
1989 | function _slicedToArray(arr, i) {
|
1990 | return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest();
|
1991 | }
|
1992 |
|
1993 | function _arrayWithHoles(arr) {
|
1994 | if (Array.isArray(arr)) return arr;
|
1995 | }
|
1996 |
|
1997 | function _iterableToArrayLimit(arr, i) {
|
1998 | if (typeof Symbol === "undefined" || !(Symbol.iterator in Object(arr))) return;
|
1999 | var _arr = [];
|
2000 | var _n = true;
|
2001 | var _d = false;
|
2002 | var _e = undefined;
|
2003 |
|
2004 | try {
|
2005 | for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) {
|
2006 | _arr.push(_s.value);
|
2007 |
|
2008 | if (i && _arr.length === i) break;
|
2009 | }
|
2010 | } catch (err) {
|
2011 | _d = true;
|
2012 | _e = err;
|
2013 | } finally {
|
2014 | try {
|
2015 | if (!_n && _i["return"] != null) _i["return"]();
|
2016 | } finally {
|
2017 | if (_d) throw _e;
|
2018 | }
|
2019 | }
|
2020 |
|
2021 | return _arr;
|
2022 | }
|
2023 |
|
2024 | function _unsupportedIterableToArray(o, minLen) {
|
2025 | if (!o) return;
|
2026 | if (typeof o === "string") return _arrayLikeToArray(o, minLen);
|
2027 | var n = Object.prototype.toString.call(o).slice(8, -1);
|
2028 | if (n === "Object" && o.constructor) n = o.constructor.name;
|
2029 | if (n === "Map" || n === "Set") return Array.from(n);
|
2030 | if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen);
|
2031 | }
|
2032 |
|
2033 | function _arrayLikeToArray(arr, len) {
|
2034 | if (len == null || len > arr.length) len = arr.length;
|
2035 |
|
2036 | for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i];
|
2037 |
|
2038 | return arr2;
|
2039 | }
|
2040 |
|
2041 | function _nonIterableRest() {
|
2042 | throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
|
2043 | }
|
2044 |
|
2045 | var attempts = {};
|
2046 | var networkErrorAttempts = 0;
|
2047 | function rateLimit(instance) {
|
2048 | var maxRetry = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 5;
|
2049 | var _instance$defaults = instance.defaults,
|
2050 | _instance$defaults$re = _instance$defaults.responseLogger,
|
2051 | responseLogger = _instance$defaults$re === void 0 ? function () {
|
2052 | return undefined;
|
2053 | } : _instance$defaults$re,
|
2054 | _instance$defaults$re2 = _instance$defaults.requestLogger,
|
2055 | requestLogger = _instance$defaults$re2 === void 0 ? function () {
|
2056 | return undefined;
|
2057 | } : _instance$defaults$re2;
|
2058 | instance.interceptors.request.use(function (config) {
|
2059 | requestLogger(config);
|
2060 | return config;
|
2061 | }, function (error) {
|
2062 | return Promise.reject(error);
|
2063 | });
|
2064 | instance.interceptors.response.use(function (response) {
|
2065 |
|
2066 | responseLogger(response);
|
2067 | return response;
|
2068 | }, function (error) {
|
2069 | var response = error.response,
|
2070 | config = error.config;
|
2071 |
|
2072 | if (!config || !instance.defaults.retryOnError) {
|
2073 | return Promise.reject(error);
|
2074 | }
|
2075 |
|
2076 | var retryErrorType = null;
|
2077 | var wait = 0;
|
2078 |
|
2079 | if (!response) {
|
2080 | retryErrorType = 'Connection';
|
2081 | networkErrorAttempts++;
|
2082 |
|
2083 | if (networkErrorAttempts > maxRetry) {
|
2084 | error.attempts = networkErrorAttempts;
|
2085 | return Promise.reject(error);
|
2086 | }
|
2087 |
|
2088 | wait = Math.pow(Math.SQRT2, networkErrorAttempts);
|
2089 | response = {};
|
2090 | } else {
|
2091 | networkErrorAttempts = 0;
|
2092 | }
|
2093 |
|
2094 | if (response.status >= 500 && response.status < 600) {
|
2095 |
|
2096 | retryErrorType = "Server ".concat(response.status);
|
2097 | var headers = response.headers || {};
|
2098 | var requestId = headers['x-contentful-request-id'] || null;
|
2099 | attempts[requestId] = attempts[requestId] || 0;
|
2100 | attempts[requestId]++;
|
2101 |
|
2102 | if (attempts[requestId] > maxRetry || !requestId) {
|
2103 | error.attempts = attempts[requestId];
|
2104 | return Promise.reject(error);
|
2105 | }
|
2106 |
|
2107 | wait = Math.pow(Math.SQRT2, attempts[requestId]);
|
2108 | } else if (response.status === 429) {
|
2109 |
|
2110 | retryErrorType = 'Rate limit';
|
2111 |
|
2112 | if (response.headers && error.response.headers['x-contentful-ratelimit-reset']) {
|
2113 | wait = response.headers['x-contentful-ratelimit-reset'];
|
2114 | }
|
2115 | }
|
2116 |
|
2117 | var delay = function delay(ms) {
|
2118 | return new Promise(function (resolve) {
|
2119 | setTimeout(resolve, ms);
|
2120 | });
|
2121 | };
|
2122 |
|
2123 | if (retryErrorType) {
|
2124 |
|
2125 | wait = Math.floor(wait * 1000 + Math.random() * 200 + 500);
|
2126 | instance.defaults.logHandler('warning', "".concat(retryErrorType, " error occurred. Waiting for ").concat(wait, " ms before retrying..."));
|
2127 | |
2128 |
|
2129 |
|
2130 |
|
2131 | delete config.httpAgent;
|
2132 | delete config.httpsAgent;
|
2133 | return delay(wait).then(function () {
|
2134 | return instance(config);
|
2135 | });
|
2136 | }
|
2137 |
|
2138 | return Promise.reject(error);
|
2139 | });
|
2140 | }
|
2141 |
|
2142 | function isNode() {
|
2143 | |
2144 |
|
2145 |
|
2146 |
|
2147 |
|
2148 |
|
2149 |
|
2150 | return typeof process !== 'undefined' && !process.browser;
|
2151 | }
|
2152 | function getNodeVersion() {
|
2153 | return process.versions && process.versions.node ? "v".concat(process.versions.node) : process.version;
|
2154 | }
|
2155 |
|
2156 |
|
2157 |
|
2158 | var HOST_REGEX = /^(?!\w+:\/\/)([^\s:]+\.?[^\s:]+)(?::(\d+))?(?!:)$/;
|
2159 |
|
2160 |
|
2161 |
|
2162 |
|
2163 |
|
2164 |
|
2165 |
|
2166 |
|
2167 |
|
2168 |
|
2169 |
|
2170 |
|
2171 |
|
2172 |
|
2173 |
|
2174 |
|
2175 |
|
2176 |
|
2177 |
|
2178 |
|
2179 | function createHttpClient(axios, options) {
|
2180 | var defaultConfig = {
|
2181 | insecure: false,
|
2182 | retryOnError: true,
|
2183 | logHandler: function logHandler(level, data) {
|
2184 | if (level === 'error' && data) {
|
2185 | var title = [data.name, data.message].filter(function (a) {
|
2186 | return a;
|
2187 | }).join(' - ');
|
2188 | console.error("[error] ".concat(title));
|
2189 | console.error(data);
|
2190 | return;
|
2191 | }
|
2192 |
|
2193 | console.log("[".concat(level, "] ").concat(data));
|
2194 | },
|
2195 |
|
2196 | headers: {},
|
2197 | httpAgent: false,
|
2198 | httpsAgent: false,
|
2199 | timeout: 30000,
|
2200 | proxy: false,
|
2201 | basePath: '',
|
2202 | adapter: false,
|
2203 | maxContentLength: 1073741824
|
2204 |
|
2205 | };
|
2206 |
|
2207 | var config = _objectSpread2({}, defaultConfig, {}, options);
|
2208 |
|
2209 | if (!config.accessToken) {
|
2210 | var missingAccessTokenError = new TypeError('Expected parameter accessToken');
|
2211 | config.logHandler('error', missingAccessTokenError);
|
2212 | throw missingAccessTokenError;
|
2213 | }
|
2214 |
|
2215 |
|
2216 | var protocol = config.insecure ? 'http' : 'https';
|
2217 | var space = config.space ? "".concat(config.space, "/") : '';
|
2218 | var hostname = config.defaultHostname;
|
2219 | var port = config.insecure ? 80 : 443;
|
2220 |
|
2221 | if (config.host && HOST_REGEX.test(config.host)) {
|
2222 | var parsed = config.host.split(':');
|
2223 |
|
2224 | if (parsed.length === 2) {
|
2225 | var _parsed = _slicedToArray(parsed, 2);
|
2226 |
|
2227 | hostname = _parsed[0];
|
2228 | port = _parsed[1];
|
2229 | } else {
|
2230 | hostname = parsed[0];
|
2231 | }
|
2232 | }
|
2233 |
|
2234 |
|
2235 | if (config.basePath) {
|
2236 | config.basePath = "/".concat(config.basePath.split('/').filter(Boolean).join('/'));
|
2237 | }
|
2238 |
|
2239 | var baseURL = options.baseURL || "".concat(protocol, "://").concat(hostname, ":").concat(port).concat(config.basePath, "/spaces/").concat(space);
|
2240 |
|
2241 | if (!config.headers['Authorization']) {
|
2242 | config.headers['Authorization'] = 'Bearer ' + config.accessToken;
|
2243 | }
|
2244 |
|
2245 |
|
2246 |
|
2247 |
|
2248 | if (isNode()) {
|
2249 | config.headers['user-agent'] = 'node.js/' + getNodeVersion();
|
2250 | config.headers['Accept-Encoding'] = 'gzip';
|
2251 | }
|
2252 |
|
2253 | var axiosOptions = {
|
2254 |
|
2255 | baseURL: baseURL,
|
2256 | headers: config.headers,
|
2257 | httpAgent: config.httpAgent,
|
2258 | httpsAgent: config.httpsAgent,
|
2259 | paramsSerializer: qs__WEBPACK_IMPORTED_MODULE_1___default.a.stringify,
|
2260 | proxy: config.proxy,
|
2261 | timeout: config.timeout,
|
2262 | adapter: config.adapter,
|
2263 | maxContentLength: config.maxContentLength,
|
2264 |
|
2265 | logHandler: config.logHandler,
|
2266 | responseLogger: config.responseLogger,
|
2267 | requestLogger: config.requestLogger,
|
2268 | retryOnError: config.retryOnError
|
2269 | };
|
2270 | var instance = axios.create(axiosOptions);
|
2271 | instance.httpClientParams = options;
|
2272 | |
2273 |
|
2274 |
|
2275 |
|
2276 |
|
2277 |
|
2278 |
|
2279 |
|
2280 |
|
2281 |
|
2282 |
|
2283 | instance.cloneWithNewParams = function (newParams) {
|
2284 | return createHttpClient(axios, _objectSpread2({}, lodash_cloneDeep__WEBPACK_IMPORTED_MODULE_0___default()(options), {}, newParams));
|
2285 | };
|
2286 |
|
2287 | rateLimit(instance, config.retryLimit);
|
2288 | return instance;
|
2289 | }
|
2290 |
|
2291 |
|
2292 |
|
2293 |
|
2294 |
|
2295 |
|
2296 |
|
2297 |
|
2298 | function createRequestConfig(_ref) {
|
2299 | var query = _ref.query;
|
2300 | var config = {};
|
2301 | delete query.resolveLinks;
|
2302 | config.params = lodash_cloneDeep__WEBPACK_IMPORTED_MODULE_0___default()(query);
|
2303 | return config;
|
2304 | }
|
2305 |
|
2306 | function enforceObjPath(obj, path) {
|
2307 | if (!(path in obj)) {
|
2308 | var err = new Error();
|
2309 | err.name = 'PropertyMissing';
|
2310 | err.message = "Required property ".concat(path, " missing from:\n\n").concat(JSON.stringify(obj), "\n\n");
|
2311 | throw err;
|
2312 | }
|
2313 |
|
2314 | return true;
|
2315 | }
|
2316 |
|
2317 | function freezeObjectDeep(obj) {
|
2318 | Object.keys(obj).forEach(function (key) {
|
2319 | var value = obj[key];
|
2320 |
|
2321 | if (lodash_isPlainObject__WEBPACK_IMPORTED_MODULE_2___default()(value)) {
|
2322 | freezeObjectDeep(value);
|
2323 | }
|
2324 | });
|
2325 | return Object.freeze(obj);
|
2326 | }
|
2327 |
|
2328 | function freezeSys(obj) {
|
2329 | freezeObjectDeep(obj.sys || {});
|
2330 | return obj;
|
2331 | }
|
2332 |
|
2333 | function isReactNative() {
|
2334 | return typeof window !== 'undefined' && 'navigator' in window && 'product' in window.navigator && window.navigator.product === 'ReactNative';
|
2335 | }
|
2336 |
|
2337 | function getBrowserOS() {
|
2338 | if (!window) {
|
2339 | return null;
|
2340 | }
|
2341 |
|
2342 | var userAgent = window.navigator.userAgent;
|
2343 | var platform = window.navigator.platform;
|
2344 | var macosPlatforms = ['Macintosh', 'MacIntel', 'MacPPC', 'Mac68K'];
|
2345 | var windowsPlatforms = ['Win32', 'Win64', 'Windows', 'WinCE'];
|
2346 | var iosPlatforms = ['iPhone', 'iPad', 'iPod'];
|
2347 | var os = null;
|
2348 |
|
2349 | if (macosPlatforms.indexOf(platform) !== -1) {
|
2350 | os = 'macOS';
|
2351 | } else if (iosPlatforms.indexOf(platform) !== -1) {
|
2352 | os = 'iOS';
|
2353 | } else if (windowsPlatforms.indexOf(platform) !== -1) {
|
2354 | os = 'Windows';
|
2355 | } else if (/Android/.test(userAgent)) {
|
2356 | os = 'Android';
|
2357 | } else if (/Linux/.test(platform)) {
|
2358 | os = 'Linux';
|
2359 | }
|
2360 |
|
2361 | return os;
|
2362 | }
|
2363 |
|
2364 | function getNodeOS() {
|
2365 | var os = Object(os__WEBPACK_IMPORTED_MODULE_3__["platform"])() || 'linux';
|
2366 | var version = Object(os__WEBPACK_IMPORTED_MODULE_3__["release"])() || '0.0.0';
|
2367 | var osMap = {
|
2368 | android: 'Android',
|
2369 | aix: 'Linux',
|
2370 | darwin: 'macOS',
|
2371 | freebsd: 'Linux',
|
2372 | linux: 'Linux',
|
2373 | openbsd: 'Linux',
|
2374 | sunos: 'Linux',
|
2375 | win32: 'Windows'
|
2376 | };
|
2377 |
|
2378 | if (os in osMap) {
|
2379 | return "".concat(osMap[os] || 'Linux', "/").concat(version);
|
2380 | }
|
2381 |
|
2382 | return null;
|
2383 | }
|
2384 |
|
2385 | function getUserAgentHeader(sdk, application, integration, feature) {
|
2386 | var headerParts = [];
|
2387 |
|
2388 | if (application) {
|
2389 | headerParts.push("app ".concat(application));
|
2390 | }
|
2391 |
|
2392 | if (integration) {
|
2393 | headerParts.push("integration ".concat(integration));
|
2394 | }
|
2395 |
|
2396 | if (feature) {
|
2397 | headerParts.push('feature ' + feature);
|
2398 | }
|
2399 |
|
2400 | headerParts.push("sdk ".concat(sdk));
|
2401 | var os = null;
|
2402 |
|
2403 | try {
|
2404 | if (isReactNative()) {
|
2405 | os = getBrowserOS();
|
2406 | headerParts.push('platform ReactNative');
|
2407 | } else if (isNode()) {
|
2408 | os = getNodeOS();
|
2409 | headerParts.push("platform node.js/".concat(getNodeVersion()));
|
2410 | } else {
|
2411 | os = getBrowserOS();
|
2412 | headerParts.push("platform browser");
|
2413 | }
|
2414 | } catch (e) {
|
2415 | os = null;
|
2416 | }
|
2417 |
|
2418 | if (os) {
|
2419 | headerParts.push("os ".concat(os));
|
2420 | }
|
2421 |
|
2422 | return "".concat(headerParts.filter(function (item) {
|
2423 | return item !== '';
|
2424 | }).join('; '), ";");
|
2425 | }
|
2426 |
|
2427 |
|
2428 |
|
2429 |
|
2430 |
|
2431 |
|
2432 |
|
2433 |
|
2434 | function toPlainObject(data) {
|
2435 | return Object.defineProperty(data, 'toPlainObject', {
|
2436 | enumerable: false,
|
2437 | configurable: false,
|
2438 | writable: false,
|
2439 | value: function value() {
|
2440 | return lodash_cloneDeep__WEBPACK_IMPORTED_MODULE_0___default()(this);
|
2441 | }
|
2442 | });
|
2443 | }
|
2444 |
|
2445 |
|
2446 |
|
2447 | }.call(this, __webpack_require__( "../node_modules/process/browser.js")))
|
2448 |
|
2449 | }),
|
2450 |
|
2451 | "../node_modules/lodash/_Hash.js":
|
2452 |
|
2453 |
|
2454 |
|
2455 |
|
2456 | (function(module, exports, __webpack_require__) {
|
2457 |
|
2458 | var hashClear = __webpack_require__( "../node_modules/lodash/_hashClear.js"),
|
2459 | hashDelete = __webpack_require__( "../node_modules/lodash/_hashDelete.js"),
|
2460 | hashGet = __webpack_require__( "../node_modules/lodash/_hashGet.js"),
|
2461 | hashHas = __webpack_require__( "../node_modules/lodash/_hashHas.js"),
|
2462 | hashSet = __webpack_require__( "../node_modules/lodash/_hashSet.js");
|
2463 |
|
2464 |
|
2465 |
|
2466 |
|
2467 |
|
2468 |
|
2469 |
|
2470 |
|
2471 | function Hash(entries) {
|
2472 | var index = -1,
|
2473 | length = entries == null ? 0 : entries.length;
|
2474 |
|
2475 | this.clear();
|
2476 | while (++index < length) {
|
2477 | var entry = entries[index];
|
2478 | this.set(entry[0], entry[1]);
|
2479 | }
|
2480 | }
|
2481 |
|
2482 |
|
2483 | Hash.prototype.clear = hashClear;
|
2484 | Hash.prototype['delete'] = hashDelete;
|
2485 | Hash.prototype.get = hashGet;
|
2486 | Hash.prototype.has = hashHas;
|
2487 | Hash.prototype.set = hashSet;
|
2488 |
|
2489 | module.exports = Hash;
|
2490 |
|
2491 |
|
2492 | }),
|
2493 |
|
2494 | "../node_modules/lodash/_ListCache.js":
|
2495 |
|
2496 |
|
2497 |
|
2498 |
|
2499 | (function(module, exports, __webpack_require__) {
|
2500 |
|
2501 | var listCacheClear = __webpack_require__( "../node_modules/lodash/_listCacheClear.js"),
|
2502 | listCacheDelete = __webpack_require__( "../node_modules/lodash/_listCacheDelete.js"),
|
2503 | listCacheGet = __webpack_require__( "../node_modules/lodash/_listCacheGet.js"),
|
2504 | listCacheHas = __webpack_require__( "../node_modules/lodash/_listCacheHas.js"),
|
2505 | listCacheSet = __webpack_require__( "../node_modules/lodash/_listCacheSet.js");
|
2506 |
|
2507 |
|
2508 |
|
2509 |
|
2510 |
|
2511 |
|
2512 |
|
2513 |
|
2514 | function ListCache(entries) {
|
2515 | var index = -1,
|
2516 | length = entries == null ? 0 : entries.length;
|
2517 |
|
2518 | this.clear();
|
2519 | while (++index < length) {
|
2520 | var entry = entries[index];
|
2521 | this.set(entry[0], entry[1]);
|
2522 | }
|
2523 | }
|
2524 |
|
2525 |
|
2526 | ListCache.prototype.clear = listCacheClear;
|
2527 | ListCache.prototype['delete'] = listCacheDelete;
|
2528 | ListCache.prototype.get = listCacheGet;
|
2529 | ListCache.prototype.has = listCacheHas;
|
2530 | ListCache.prototype.set = listCacheSet;
|
2531 |
|
2532 | module.exports = ListCache;
|
2533 |
|
2534 |
|
2535 | }),
|
2536 |
|
2537 | "../node_modules/lodash/_Map.js":
|
2538 |
|
2539 |
|
2540 |
|
2541 |
|
2542 | (function(module, exports, __webpack_require__) {
|
2543 |
|
2544 | var getNative = __webpack_require__( "../node_modules/lodash/_getNative.js"),
|
2545 | root = __webpack_require__( "../node_modules/lodash/_root.js");
|
2546 |
|
2547 |
|
2548 | var Map = getNative(root, 'Map');
|
2549 |
|
2550 | module.exports = Map;
|
2551 |
|
2552 |
|
2553 | }),
|
2554 |
|
2555 | "../node_modules/lodash/_MapCache.js":
|
2556 |
|
2557 |
|
2558 |
|
2559 |
|
2560 | (function(module, exports, __webpack_require__) {
|
2561 |
|
2562 | var mapCacheClear = __webpack_require__( "../node_modules/lodash/_mapCacheClear.js"),
|
2563 | mapCacheDelete = __webpack_require__( "../node_modules/lodash/_mapCacheDelete.js"),
|
2564 | mapCacheGet = __webpack_require__( "../node_modules/lodash/_mapCacheGet.js"),
|
2565 | mapCacheHas = __webpack_require__( "../node_modules/lodash/_mapCacheHas.js"),
|
2566 | mapCacheSet = __webpack_require__( "../node_modules/lodash/_mapCacheSet.js");
|
2567 |
|
2568 |
|
2569 |
|
2570 |
|
2571 |
|
2572 |
|
2573 |
|
2574 |
|
2575 | function MapCache(entries) {
|
2576 | var index = -1,
|
2577 | length = entries == null ? 0 : entries.length;
|
2578 |
|
2579 | this.clear();
|
2580 | while (++index < length) {
|
2581 | var entry = entries[index];
|
2582 | this.set(entry[0], entry[1]);
|
2583 | }
|
2584 | }
|
2585 |
|
2586 |
|
2587 | MapCache.prototype.clear = mapCacheClear;
|
2588 | MapCache.prototype['delete'] = mapCacheDelete;
|
2589 | MapCache.prototype.get = mapCacheGet;
|
2590 | MapCache.prototype.has = mapCacheHas;
|
2591 | MapCache.prototype.set = mapCacheSet;
|
2592 |
|
2593 | module.exports = MapCache;
|
2594 |
|
2595 |
|
2596 | }),
|
2597 |
|
2598 | "../node_modules/lodash/_Stack.js":
|
2599 |
|
2600 |
|
2601 |
|
2602 |
|
2603 | (function(module, exports, __webpack_require__) {
|
2604 |
|
2605 | var ListCache = __webpack_require__( "../node_modules/lodash/_ListCache.js"),
|
2606 | stackClear = __webpack_require__( "../node_modules/lodash/_stackClear.js"),
|
2607 | stackDelete = __webpack_require__( "../node_modules/lodash/_stackDelete.js"),
|
2608 | stackGet = __webpack_require__( "../node_modules/lodash/_stackGet.js"),
|
2609 | stackHas = __webpack_require__( "../node_modules/lodash/_stackHas.js"),
|
2610 | stackSet = __webpack_require__( "../node_modules/lodash/_stackSet.js");
|
2611 |
|
2612 |
|
2613 |
|
2614 |
|
2615 |
|
2616 |
|
2617 |
|
2618 |
|
2619 | function Stack(entries) {
|
2620 | var data = this.__data__ = new ListCache(entries);
|
2621 | this.size = data.size;
|
2622 | }
|
2623 |
|
2624 |
|
2625 | Stack.prototype.clear = stackClear;
|
2626 | Stack.prototype['delete'] = stackDelete;
|
2627 | Stack.prototype.get = stackGet;
|
2628 | Stack.prototype.has = stackHas;
|
2629 | Stack.prototype.set = stackSet;
|
2630 |
|
2631 | module.exports = Stack;
|
2632 |
|
2633 |
|
2634 | }),
|
2635 |
|
2636 | "../node_modules/lodash/_arrayEach.js":
|
2637 |
|
2638 |
|
2639 |
|
2640 |
|
2641 | (function(module, exports) {
|
2642 |
|
2643 |
|
2644 |
|
2645 |
|
2646 |
|
2647 |
|
2648 |
|
2649 |
|
2650 |
|
2651 |
|
2652 | function arrayEach(array, iteratee) {
|
2653 | var index = -1,
|
2654 | length = array == null ? 0 : array.length;
|
2655 |
|
2656 | while (++index < length) {
|
2657 | if (iteratee(array[index], index, array) === false) {
|
2658 | break;
|
2659 | }
|
2660 | }
|
2661 | return array;
|
2662 | }
|
2663 |
|
2664 | module.exports = arrayEach;
|
2665 |
|
2666 |
|
2667 | }),
|
2668 |
|
2669 | "../node_modules/lodash/_assignValue.js":
|
2670 |
|
2671 |
|
2672 |
|
2673 |
|
2674 | (function(module, exports, __webpack_require__) {
|
2675 |
|
2676 | var baseAssignValue = __webpack_require__( "../node_modules/lodash/_baseAssignValue.js"),
|
2677 | eq = __webpack_require__( "../node_modules/lodash/eq.js");
|
2678 |
|
2679 |
|
2680 | var objectProto = Object.prototype;
|
2681 |
|
2682 |
|
2683 | var hasOwnProperty = objectProto.hasOwnProperty;
|
2684 |
|
2685 |
|
2686 |
|
2687 |
|
2688 |
|
2689 |
|
2690 |
|
2691 |
|
2692 |
|
2693 |
|
2694 |
|
2695 | function assignValue(object, key, value) {
|
2696 | var objValue = object[key];
|
2697 | if (!(hasOwnProperty.call(object, key) && eq(objValue, value)) ||
|
2698 | (value === undefined && !(key in object))) {
|
2699 | baseAssignValue(object, key, value);
|
2700 | }
|
2701 | }
|
2702 |
|
2703 | module.exports = assignValue;
|
2704 |
|
2705 |
|
2706 | }),
|
2707 |
|
2708 | "../node_modules/lodash/_assocIndexOf.js":
|
2709 |
|
2710 |
|
2711 |
|
2712 |
|
2713 | (function(module, exports, __webpack_require__) {
|
2714 |
|
2715 | var eq = __webpack_require__( "../node_modules/lodash/eq.js");
|
2716 |
|
2717 |
|
2718 |
|
2719 |
|
2720 |
|
2721 |
|
2722 |
|
2723 |
|
2724 |
|
2725 | function assocIndexOf(array, key) {
|
2726 | var length = array.length;
|
2727 | while (length--) {
|
2728 | if (eq(array[length][0], key)) {
|
2729 | return length;
|
2730 | }
|
2731 | }
|
2732 | return -1;
|
2733 | }
|
2734 |
|
2735 | module.exports = assocIndexOf;
|
2736 |
|
2737 |
|
2738 | }),
|
2739 |
|
2740 | "../node_modules/lodash/_baseAssign.js":
|
2741 |
|
2742 |
|
2743 |
|
2744 |
|
2745 | (function(module, exports, __webpack_require__) {
|
2746 |
|
2747 | var copyObject = __webpack_require__( "../node_modules/lodash/_copyObject.js"),
|
2748 | keys = __webpack_require__( "../node_modules/lodash/keys.js");
|
2749 |
|
2750 |
|
2751 |
|
2752 |
|
2753 |
|
2754 |
|
2755 |
|
2756 |
|
2757 |
|
2758 |
|
2759 | function baseAssign(object, source) {
|
2760 | return object && copyObject(source, keys(source), object);
|
2761 | }
|
2762 |
|
2763 | module.exports = baseAssign;
|
2764 |
|
2765 |
|
2766 | }),
|
2767 |
|
2768 | "../node_modules/lodash/_baseAssignIn.js":
|
2769 |
|
2770 |
|
2771 |
|
2772 |
|
2773 | (function(module, exports, __webpack_require__) {
|
2774 |
|
2775 | var copyObject = __webpack_require__( "../node_modules/lodash/_copyObject.js"),
|
2776 | keysIn = __webpack_require__( "../node_modules/lodash/keysIn.js");
|
2777 |
|
2778 |
|
2779 |
|
2780 |
|
2781 |
|
2782 |
|
2783 |
|
2784 |
|
2785 |
|
2786 |
|
2787 | function baseAssignIn(object, source) {
|
2788 | return object && copyObject(source, keysIn(source), object);
|
2789 | }
|
2790 |
|
2791 | module.exports = baseAssignIn;
|
2792 |
|
2793 |
|
2794 | }),
|
2795 |
|
2796 | "../node_modules/lodash/_baseAssignValue.js":
|
2797 |
|
2798 |
|
2799 |
|
2800 |
|
2801 | (function(module, exports, __webpack_require__) {
|
2802 |
|
2803 | var defineProperty = __webpack_require__( "../node_modules/lodash/_defineProperty.js");
|
2804 |
|
2805 |
|
2806 |
|
2807 |
|
2808 |
|
2809 |
|
2810 |
|
2811 |
|
2812 |
|
2813 |
|
2814 | function baseAssignValue(object, key, value) {
|
2815 | if (key == '__proto__' && defineProperty) {
|
2816 | defineProperty(object, key, {
|
2817 | 'configurable': true,
|
2818 | 'enumerable': true,
|
2819 | 'value': value,
|
2820 | 'writable': true
|
2821 | });
|
2822 | } else {
|
2823 | object[key] = value;
|
2824 | }
|
2825 | }
|
2826 |
|
2827 | module.exports = baseAssignValue;
|
2828 |
|
2829 |
|
2830 | }),
|
2831 |
|
2832 | "../node_modules/lodash/_baseClone.js":
|
2833 |
|
2834 |
|
2835 |
|
2836 |
|
2837 | (function(module, exports, __webpack_require__) {
|
2838 |
|
2839 | var Stack = __webpack_require__( "../node_modules/lodash/_Stack.js"),
|
2840 | arrayEach = __webpack_require__( "../node_modules/lodash/_arrayEach.js"),
|
2841 | assignValue = __webpack_require__( "../node_modules/lodash/_assignValue.js"),
|
2842 | baseAssign = __webpack_require__( "../node_modules/lodash/_baseAssign.js"),
|
2843 | baseAssignIn = __webpack_require__( "../node_modules/lodash/_baseAssignIn.js"),
|
2844 | cloneBuffer = __webpack_require__( "../node_modules/lodash/_cloneBuffer.js"),
|
2845 | copyArray = __webpack_require__( "../node_modules/lodash/_copyArray.js"),
|
2846 | copySymbols = __webpack_require__( "../node_modules/lodash/_copySymbols.js"),
|
2847 | copySymbolsIn = __webpack_require__( "../node_modules/lodash/_copySymbolsIn.js"),
|
2848 | getAllKeys = __webpack_require__( "../node_modules/lodash/_getAllKeys.js"),
|
2849 | getAllKeysIn = __webpack_require__( "../node_modules/lodash/_getAllKeysIn.js"),
|
2850 | getTag = __webpack_require__( "../node_modules/lodash/_getTag.js"),
|
2851 | initCloneArray = __webpack_require__( "../node_modules/lodash/_initCloneArray.js"),
|
2852 | initCloneByTag = __webpack_require__( "../node_modules/lodash/_initCloneByTag.js"),
|
2853 | initCloneObject = __webpack_require__( "../node_modules/lodash/_initCloneObject.js"),
|
2854 | isArray = __webpack_require__( "../node_modules/lodash/isArray.js"),
|
2855 | isBuffer = __webpack_require__( "../node_modules/lodash/isBuffer.js"),
|
2856 | isMap = __webpack_require__( "../node_modules/lodash/isMap.js"),
|
2857 | isObject = __webpack_require__( "../node_modules/lodash/isObject.js"),
|
2858 | isSet = __webpack_require__( "../node_modules/lodash/isSet.js"),
|
2859 | keys = __webpack_require__( "../node_modules/lodash/keys.js");
|
2860 |
|
2861 |
|
2862 | var CLONE_DEEP_FLAG = 1,
|
2863 | CLONE_FLAT_FLAG = 2,
|
2864 | CLONE_SYMBOLS_FLAG = 4;
|
2865 |
|
2866 |
|
2867 | var argsTag = '[object Arguments]',
|
2868 | arrayTag = '[object Array]',
|
2869 | boolTag = '[object Boolean]',
|
2870 | dateTag = '[object Date]',
|
2871 | errorTag = '[object Error]',
|
2872 | funcTag = '[object Function]',
|
2873 | genTag = '[object GeneratorFunction]',
|
2874 | mapTag = '[object Map]',
|
2875 | numberTag = '[object Number]',
|
2876 | objectTag = '[object Object]',
|
2877 | regexpTag = '[object RegExp]',
|
2878 | setTag = '[object Set]',
|
2879 | stringTag = '[object String]',
|
2880 | symbolTag = '[object Symbol]',
|
2881 | weakMapTag = '[object WeakMap]';
|
2882 |
|
2883 | var arrayBufferTag = '[object ArrayBuffer]',
|
2884 | dataViewTag = '[object DataView]',
|
2885 | float32Tag = '[object Float32Array]',
|
2886 | float64Tag = '[object Float64Array]',
|
2887 | int8Tag = '[object Int8Array]',
|
2888 | int16Tag = '[object Int16Array]',
|
2889 | int32Tag = '[object Int32Array]',
|
2890 | uint8Tag = '[object Uint8Array]',
|
2891 | uint8ClampedTag = '[object Uint8ClampedArray]',
|
2892 | uint16Tag = '[object Uint16Array]',
|
2893 | uint32Tag = '[object Uint32Array]';
|
2894 |
|
2895 |
|
2896 | var cloneableTags = {};
|
2897 | cloneableTags[argsTag] = cloneableTags[arrayTag] =
|
2898 | cloneableTags[arrayBufferTag] = cloneableTags[dataViewTag] =
|
2899 | cloneableTags[boolTag] = cloneableTags[dateTag] =
|
2900 | cloneableTags[float32Tag] = cloneableTags[float64Tag] =
|
2901 | cloneableTags[int8Tag] = cloneableTags[int16Tag] =
|
2902 | cloneableTags[int32Tag] = cloneableTags[mapTag] =
|
2903 | cloneableTags[numberTag] = cloneableTags[objectTag] =
|
2904 | cloneableTags[regexpTag] = cloneableTags[setTag] =
|
2905 | cloneableTags[stringTag] = cloneableTags[symbolTag] =
|
2906 | cloneableTags[uint8Tag] = cloneableTags[uint8ClampedTag] =
|
2907 | cloneableTags[uint16Tag] = cloneableTags[uint32Tag] = true;
|
2908 | cloneableTags[errorTag] = cloneableTags[funcTag] =
|
2909 | cloneableTags[weakMapTag] = false;
|
2910 |
|
2911 |
|
2912 |
|
2913 |
|
2914 |
|
2915 |
|
2916 |
|
2917 |
|
2918 |
|
2919 |
|
2920 |
|
2921 |
|
2922 |
|
2923 |
|
2924 |
|
2925 |
|
2926 |
|
2927 | function baseClone(value, bitmask, customizer, key, object, stack) {
|
2928 | var result,
|
2929 | isDeep = bitmask & CLONE_DEEP_FLAG,
|
2930 | isFlat = bitmask & CLONE_FLAT_FLAG,
|
2931 | isFull = bitmask & CLONE_SYMBOLS_FLAG;
|
2932 |
|
2933 | if (customizer) {
|
2934 | result = object ? customizer(value, key, object, stack) : customizer(value);
|
2935 | }
|
2936 | if (result !== undefined) {
|
2937 | return result;
|
2938 | }
|
2939 | if (!isObject(value)) {
|
2940 | return value;
|
2941 | }
|
2942 | var isArr = isArray(value);
|
2943 | if (isArr) {
|
2944 | result = initCloneArray(value);
|
2945 | if (!isDeep) {
|
2946 | return copyArray(value, result);
|
2947 | }
|
2948 | } else {
|
2949 | var tag = getTag(value),
|
2950 | isFunc = tag == funcTag || tag == genTag;
|
2951 |
|
2952 | if (isBuffer(value)) {
|
2953 | return cloneBuffer(value, isDeep);
|
2954 | }
|
2955 | if (tag == objectTag || tag == argsTag || (isFunc && !object)) {
|
2956 | result = (isFlat || isFunc) ? {} : initCloneObject(value);
|
2957 | if (!isDeep) {
|
2958 | return isFlat
|
2959 | ? copySymbolsIn(value, baseAssignIn(result, value))
|
2960 | : copySymbols(value, baseAssign(result, value));
|
2961 | }
|
2962 | } else {
|
2963 | if (!cloneableTags[tag]) {
|
2964 | return object ? value : {};
|
2965 | }
|
2966 | result = initCloneByTag(value, tag, isDeep);
|
2967 | }
|
2968 | }
|
2969 |
|
2970 | stack || (stack = new Stack);
|
2971 | var stacked = stack.get(value);
|
2972 | if (stacked) {
|
2973 | return stacked;
|
2974 | }
|
2975 | stack.set(value, result);
|
2976 |
|
2977 | if (isSet(value)) {
|
2978 | value.forEach(function(subValue) {
|
2979 | result.add(baseClone(subValue, bitmask, customizer, subValue, value, stack));
|
2980 | });
|
2981 | } else if (isMap(value)) {
|
2982 | value.forEach(function(subValue, key) {
|
2983 | result.set(key, baseClone(subValue, bitmask, customizer, key, value, stack));
|
2984 | });
|
2985 | }
|
2986 |
|
2987 | var keysFunc = isFull
|
2988 | ? (isFlat ? getAllKeysIn : getAllKeys)
|
2989 | : (isFlat ? keysIn : keys);
|
2990 |
|
2991 | var props = isArr ? undefined : keysFunc(value);
|
2992 | arrayEach(props || value, function(subValue, key) {
|
2993 | if (props) {
|
2994 | key = subValue;
|
2995 | subValue = value[key];
|
2996 | }
|
2997 |
|
2998 | assignValue(result, key, baseClone(subValue, bitmask, customizer, key, value, stack));
|
2999 | });
|
3000 | return result;
|
3001 | }
|
3002 |
|
3003 | module.exports = baseClone;
|
3004 |
|
3005 |
|
3006 | }),
|
3007 |
|
3008 | "../node_modules/lodash/_baseCreate.js":
|
3009 |
|
3010 |
|
3011 |
|
3012 |
|
3013 | (function(module, exports, __webpack_require__) {
|
3014 |
|
3015 | var isObject = __webpack_require__( "../node_modules/lodash/isObject.js");
|
3016 |
|
3017 |
|
3018 | var objectCreate = Object.create;
|
3019 |
|
3020 |
|
3021 |
|
3022 |
|
3023 |
|
3024 |
|
3025 |
|
3026 |
|
3027 |
|
3028 | var baseCreate = (function() {
|
3029 | function object() {}
|
3030 | return function(proto) {
|
3031 | if (!isObject(proto)) {
|
3032 | return {};
|
3033 | }
|
3034 | if (objectCreate) {
|
3035 | return objectCreate(proto);
|
3036 | }
|
3037 | object.prototype = proto;
|
3038 | var result = new object;
|
3039 | object.prototype = undefined;
|
3040 | return result;
|
3041 | };
|
3042 | }());
|
3043 |
|
3044 | module.exports = baseCreate;
|
3045 |
|
3046 |
|
3047 | }),
|
3048 |
|
3049 | "../node_modules/lodash/_baseGet.js":
|
3050 |
|
3051 |
|
3052 |
|
3053 |
|
3054 | (function(module, exports) {
|
3055 |
|
3056 |
|
3057 |
|
3058 |
|
3059 |
|
3060 |
|
3061 |
|
3062 |
|
3063 |
|
3064 | function getValue(object, key) {
|
3065 | return object == null ? undefined : object[key];
|
3066 | }
|
3067 |
|
3068 | module.exports = getValue;
|
3069 |
|
3070 |
|
3071 | }),
|
3072 |
|
3073 | "../node_modules/lodash/_baseGetTag.js":
|
3074 |
|
3075 |
|
3076 |
|
3077 |
|
3078 | (function(module, exports) {
|
3079 |
|
3080 |
|
3081 | var objectProto = Object.prototype;
|
3082 |
|
3083 |
|
3084 |
|
3085 |
|
3086 |
|
3087 |
|
3088 | var nativeObjectToString = objectProto.toString;
|
3089 |
|
3090 |
|
3091 |
|
3092 |
|
3093 |
|
3094 |
|
3095 |
|
3096 |
|
3097 | function objectToString(value) {
|
3098 | return nativeObjectToString.call(value);
|
3099 | }
|
3100 |
|
3101 | module.exports = objectToString;
|
3102 |
|
3103 |
|
3104 | }),
|
3105 |
|
3106 | "../node_modules/lodash/_cloneBuffer.js":
|
3107 |
|
3108 |
|
3109 |
|
3110 |
|
3111 | (function(module, exports, __webpack_require__) {
|
3112 |
|
3113 | (function(module) {var root = __webpack_require__( "../node_modules/lodash/_root.js");
|
3114 |
|
3115 |
|
3116 | var freeExports = true && exports && !exports.nodeType && exports;
|
3117 |
|
3118 |
|
3119 | var freeModule = freeExports && typeof module == 'object' && module && !module.nodeType && module;
|
3120 |
|
3121 |
|
3122 | var moduleExports = freeModule && freeModule.exports === freeExports;
|
3123 |
|
3124 |
|
3125 | var Buffer = moduleExports ? root.Buffer : undefined,
|
3126 | allocUnsafe = Buffer ? Buffer.allocUnsafe : undefined;
|
3127 |
|
3128 |
|
3129 |
|
3130 |
|
3131 |
|
3132 |
|
3133 |
|
3134 |
|
3135 |
|
3136 | function cloneBuffer(buffer, isDeep) {
|
3137 | if (isDeep) {
|
3138 | return buffer.slice();
|
3139 | }
|
3140 | var length = buffer.length,
|
3141 | result = allocUnsafe ? allocUnsafe(length) : new buffer.constructor(length);
|
3142 |
|
3143 | buffer.copy(result);
|
3144 | return result;
|
3145 | }
|
3146 |
|
3147 | module.exports = cloneBuffer;
|
3148 |
|
3149 | }.call(this, __webpack_require__( "../node_modules/webpack/buildin/module.js")(module)))
|
3150 |
|
3151 | }),
|
3152 |
|
3153 | "../node_modules/lodash/_copyArray.js":
|
3154 |
|
3155 |
|
3156 |
|
3157 |
|
3158 | (function(module, exports) {
|
3159 |
|
3160 |
|
3161 |
|
3162 |
|
3163 |
|
3164 |
|
3165 |
|
3166 |
|
3167 |
|
3168 | function copyArray(source, array) {
|
3169 | var index = -1,
|
3170 | length = source.length;
|
3171 |
|
3172 | array || (array = Array(length));
|
3173 | while (++index < length) {
|
3174 | array[index] = source[index];
|
3175 | }
|
3176 | return array;
|
3177 | }
|
3178 |
|
3179 | module.exports = copyArray;
|
3180 |
|
3181 |
|
3182 | }),
|
3183 |
|
3184 | "../node_modules/lodash/_copyObject.js":
|
3185 |
|
3186 |
|
3187 |
|
3188 |
|
3189 | (function(module, exports, __webpack_require__) {
|
3190 |
|
3191 | var assignValue = __webpack_require__( "../node_modules/lodash/_assignValue.js"),
|
3192 | baseAssignValue = __webpack_require__( "../node_modules/lodash/_baseAssignValue.js");
|
3193 |
|
3194 |
|
3195 |
|
3196 |
|
3197 |
|
3198 |
|
3199 |
|
3200 |
|
3201 |
|
3202 |
|
3203 |
|
3204 | function copyObject(source, props, object, customizer) {
|
3205 | var isNew = !object;
|
3206 | object || (object = {});
|
3207 |
|
3208 | var index = -1,
|
3209 | length = props.length;
|
3210 |
|
3211 | while (++index < length) {
|
3212 | var key = props[index];
|
3213 |
|
3214 | var newValue = customizer
|
3215 | ? customizer(object[key], source[key], key, object, source)
|
3216 | : undefined;
|
3217 |
|
3218 | if (newValue === undefined) {
|
3219 | newValue = source[key];
|
3220 | }
|
3221 | if (isNew) {
|
3222 | baseAssignValue(object, key, newValue);
|
3223 | } else {
|
3224 | assignValue(object, key, newValue);
|
3225 | }
|
3226 | }
|
3227 | return object;
|
3228 | }
|
3229 |
|
3230 | module.exports = copyObject;
|
3231 |
|
3232 |
|
3233 | }),
|
3234 |
|
3235 | "../node_modules/lodash/_copySymbols.js":
|
3236 |
|
3237 |
|
3238 |
|
3239 |
|
3240 | (function(module, exports, __webpack_require__) {
|
3241 |
|
3242 | var copyObject = __webpack_require__( "../node_modules/lodash/_copyObject.js"),
|
3243 | getSymbols = __webpack_require__( "../node_modules/lodash/_getSymbols.js");
|
3244 |
|
3245 |
|
3246 |
|
3247 |
|
3248 |
|
3249 |
|
3250 |
|
3251 |
|
3252 |
|
3253 | function copySymbols(source, object) {
|
3254 | return copyObject(source, getSymbols(source), object);
|
3255 | }
|
3256 |
|
3257 | module.exports = copySymbols;
|
3258 |
|
3259 |
|
3260 | }),
|
3261 |
|
3262 | "../node_modules/lodash/_copySymbolsIn.js":
|
3263 |
|
3264 |
|
3265 |
|
3266 |
|
3267 | (function(module, exports, __webpack_require__) {
|
3268 |
|
3269 | var copyObject = __webpack_require__( "../node_modules/lodash/_copyObject.js"),
|
3270 | getSymbolsIn = __webpack_require__( "../node_modules/lodash/_getSymbolsIn.js");
|
3271 |
|
3272 |
|
3273 |
|
3274 |
|
3275 |
|
3276 |
|
3277 |
|
3278 |
|
3279 |
|
3280 | function copySymbolsIn(source, object) {
|
3281 | return copyObject(source, getSymbolsIn(source), object);
|
3282 | }
|
3283 |
|
3284 | module.exports = copySymbolsIn;
|
3285 |
|
3286 |
|
3287 | }),
|
3288 |
|
3289 | "../node_modules/lodash/_defineProperty.js":
|
3290 |
|
3291 |
|
3292 |
|
3293 |
|
3294 | (function(module, exports, __webpack_require__) {
|
3295 |
|
3296 | var getNative = __webpack_require__( "../node_modules/lodash/_getNative.js");
|
3297 |
|
3298 | var defineProperty = (function() {
|
3299 | try {
|
3300 | var func = getNative(Object, 'defineProperty');
|
3301 | func({}, '', {});
|
3302 | return func;
|
3303 | } catch (e) {}
|
3304 | }());
|
3305 |
|
3306 | module.exports = defineProperty;
|
3307 |
|
3308 |
|
3309 | }),
|
3310 |
|
3311 | "../node_modules/lodash/_freeGlobal.js":
|
3312 |
|
3313 |
|
3314 |
|
3315 |
|
3316 | (function(module, exports, __webpack_require__) {
|
3317 |
|
3318 | (function(global) {
|
3319 | var freeGlobal = typeof global == 'object' && global && global.Object === Object && global;
|
3320 |
|
3321 | module.exports = freeGlobal;
|
3322 |
|
3323 | }.call(this, __webpack_require__( "../node_modules/webpack/buildin/global.js")))
|
3324 |
|
3325 | }),
|
3326 |
|
3327 | "../node_modules/lodash/_getAllKeys.js":
|
3328 |
|
3329 |
|
3330 |
|
3331 |
|
3332 | (function(module, exports, __webpack_require__) {
|
3333 |
|
3334 | var overArg = __webpack_require__( "../node_modules/lodash/_overArg.js");
|
3335 |
|
3336 |
|
3337 | var nativeKeys = overArg(Object.keys, Object);
|
3338 |
|
3339 | module.exports = nativeKeys;
|
3340 |
|
3341 |
|
3342 | }),
|
3343 |
|
3344 | "../node_modules/lodash/_getAllKeysIn.js":
|
3345 |
|
3346 |
|
3347 |
|
3348 |
|
3349 | (function(module, exports) {
|
3350 |
|
3351 |
|
3352 |
|
3353 |
|
3354 |
|
3355 |
|
3356 |
|
3357 |
|
3358 |
|
3359 |
|
3360 | function nativeKeysIn(object) {
|
3361 | var result = [];
|
3362 | if (object != null) {
|
3363 | for (var key in Object(object)) {
|
3364 | result.push(key);
|
3365 | }
|
3366 | }
|
3367 | return result;
|
3368 | }
|
3369 |
|
3370 | module.exports = nativeKeysIn;
|
3371 |
|
3372 |
|
3373 | }),
|
3374 |
|
3375 | "../node_modules/lodash/_getMapData.js":
|
3376 |
|
3377 |
|
3378 |
|
3379 |
|
3380 | (function(module, exports, __webpack_require__) {
|
3381 |
|
3382 | var isKeyable = __webpack_require__( "../node_modules/lodash/_isKeyable.js");
|
3383 |
|
3384 |
|
3385 |
|
3386 |
|
3387 |
|
3388 |
|
3389 |
|
3390 |
|
3391 |
|
3392 | function getMapData(map, key) {
|
3393 | var data = map.__data__;
|
3394 | return isKeyable(key)
|
3395 | ? data[typeof key == 'string' ? 'string' : 'hash']
|
3396 | : data.map;
|
3397 | }
|
3398 |
|
3399 | module.exports = getMapData;
|
3400 |
|
3401 |
|
3402 | }),
|
3403 |
|
3404 | "../node_modules/lodash/_getNative.js":
|
3405 |
|
3406 |
|
3407 |
|
3408 |
|
3409 | (function(module, exports) {
|
3410 |
|
3411 |
|
3412 |
|
3413 |
|
3414 |
|
3415 |
|
3416 |
|
3417 |
|
3418 |
|
3419 | function getValue(object, key) {
|
3420 | return object == null ? undefined : object[key];
|
3421 | }
|
3422 |
|
3423 | module.exports = getValue;
|
3424 |
|
3425 |
|
3426 | }),
|
3427 |
|
3428 | "../node_modules/lodash/_getPrototype.js":
|
3429 |
|
3430 |
|
3431 |
|
3432 |
|
3433 | (function(module, exports, __webpack_require__) {
|
3434 |
|
3435 | var overArg = __webpack_require__( "../node_modules/lodash/_overArg.js");
|
3436 |
|
3437 |
|
3438 | var getPrototype = overArg(Object.getPrototypeOf, Object);
|
3439 |
|
3440 | module.exports = getPrototype;
|
3441 |
|
3442 |
|
3443 | }),
|
3444 |
|
3445 | "../node_modules/lodash/_getSymbols.js":
|
3446 |
|
3447 |
|
3448 |
|
3449 |
|
3450 | (function(module, exports) {
|
3451 |
|
3452 |
|
3453 |
|
3454 |
|
3455 |
|
3456 |
|
3457 |
|
3458 |
|
3459 |
|
3460 |
|
3461 |
|
3462 |
|
3463 |
|
3464 |
|
3465 |
|
3466 |
|
3467 |
|
3468 |
|
3469 |
|
3470 | function stubArray() {
|
3471 | return [];
|
3472 | }
|
3473 |
|
3474 | module.exports = stubArray;
|
3475 |
|
3476 |
|
3477 | }),
|
3478 |
|
3479 | "../node_modules/lodash/_getSymbolsIn.js":
|
3480 |
|
3481 |
|
3482 |
|
3483 |
|
3484 | (function(module, exports) {
|
3485 |
|
3486 |
|
3487 |
|
3488 |
|
3489 |
|
3490 |
|
3491 |
|
3492 |
|
3493 |
|
3494 |
|
3495 |
|
3496 |
|
3497 |
|
3498 |
|
3499 |
|
3500 |
|
3501 |
|
3502 |
|
3503 |
|
3504 | function stubArray() {
|
3505 | return [];
|
3506 | }
|
3507 |
|
3508 | module.exports = stubArray;
|
3509 |
|
3510 |
|
3511 | }),
|
3512 |
|
3513 | "../node_modules/lodash/_getTag.js":
|
3514 |
|
3515 |
|
3516 |
|
3517 |
|
3518 | (function(module, exports) {
|
3519 |
|
3520 |
|
3521 | var objectProto = Object.prototype;
|
3522 |
|
3523 |
|
3524 |
|
3525 |
|
3526 |
|
3527 |
|
3528 | var nativeObjectToString = objectProto.toString;
|
3529 |
|
3530 |
|
3531 |
|
3532 |
|
3533 |
|
3534 |
|
3535 |
|
3536 |
|
3537 | function objectToString(value) {
|
3538 | return nativeObjectToString.call(value);
|
3539 | }
|
3540 |
|
3541 | module.exports = objectToString;
|
3542 |
|
3543 |
|
3544 | }),
|
3545 |
|
3546 | "../node_modules/lodash/_hashClear.js":
|
3547 |
|
3548 |
|
3549 |
|
3550 |
|
3551 | (function(module, exports, __webpack_require__) {
|
3552 |
|
3553 | var nativeCreate = __webpack_require__( "../node_modules/lodash/_nativeCreate.js");
|
3554 |
|
3555 |
|
3556 |
|
3557 |
|
3558 |
|
3559 |
|
3560 |
|
3561 |
|
3562 | function hashClear() {
|
3563 | this.__data__ = nativeCreate ? nativeCreate(null) : {};
|
3564 | this.size = 0;
|
3565 | }
|
3566 |
|
3567 | module.exports = hashClear;
|
3568 |
|
3569 |
|
3570 | }),
|
3571 |
|
3572 | "../node_modules/lodash/_hashDelete.js":
|
3573 |
|
3574 |
|
3575 |
|
3576 |
|
3577 | (function(module, exports) {
|
3578 |
|
3579 |
|
3580 |
|
3581 |
|
3582 |
|
3583 |
|
3584 |
|
3585 |
|
3586 |
|
3587 |
|
3588 |
|
3589 | function hashDelete(key) {
|
3590 | var result = this.has(key) && delete this.__data__[key];
|
3591 | this.size -= result ? 1 : 0;
|
3592 | return result;
|
3593 | }
|
3594 |
|
3595 | module.exports = hashDelete;
|
3596 |
|
3597 |
|
3598 | }),
|
3599 |
|
3600 | "../node_modules/lodash/_hashGet.js":
|
3601 |
|
3602 |
|
3603 |
|
3604 |
|
3605 | (function(module, exports, __webpack_require__) {
|
3606 |
|
3607 | var nativeCreate = __webpack_require__( "../node_modules/lodash/_nativeCreate.js");
|
3608 |
|
3609 |
|
3610 | var HASH_UNDEFINED = '__lodash_hash_undefined__';
|
3611 |
|
3612 |
|
3613 | var objectProto = Object.prototype;
|
3614 |
|
3615 |
|
3616 | var hasOwnProperty = objectProto.hasOwnProperty;
|
3617 |
|
3618 |
|
3619 |
|
3620 |
|
3621 |
|
3622 |
|
3623 |
|
3624 |
|
3625 |
|
3626 |
|
3627 | function hashGet(key) {
|
3628 | var data = this.__data__;
|
3629 | if (nativeCreate) {
|
3630 | var result = data[key];
|
3631 | return result === HASH_UNDEFINED ? undefined : result;
|
3632 | }
|
3633 | return hasOwnProperty.call(data, key) ? data[key] : undefined;
|
3634 | }
|
3635 |
|
3636 | module.exports = hashGet;
|
3637 |
|
3638 |
|
3639 | }),
|
3640 |
|
3641 | "../node_modules/lodash/_hashHas.js":
|
3642 |
|
3643 |
|
3644 |
|
3645 |
|
3646 | (function(module, exports, __webpack_require__) {
|
3647 |
|
3648 | var nativeCreate = __webpack_require__( "../node_modules/lodash/_nativeCreate.js");
|
3649 |
|
3650 |
|
3651 | var objectProto = Object.prototype;
|
3652 |
|
3653 |
|
3654 | var hasOwnProperty = objectProto.hasOwnProperty;
|
3655 |
|
3656 |
|
3657 |
|
3658 |
|
3659 |
|
3660 |
|
3661 |
|
3662 |
|
3663 |
|
3664 |
|
3665 | function hashHas(key) {
|
3666 | var data = this.__data__;
|
3667 | return nativeCreate ? (data[key] !== undefined) : hasOwnProperty.call(data, key);
|
3668 | }
|
3669 |
|
3670 | module.exports = hashHas;
|
3671 |
|
3672 |
|
3673 | }),
|
3674 |
|
3675 | "../node_modules/lodash/_hashSet.js":
|
3676 |
|
3677 |
|
3678 |
|
3679 |
|
3680 | (function(module, exports, __webpack_require__) {
|
3681 |
|
3682 | var nativeCreate = __webpack_require__( "../node_modules/lodash/_nativeCreate.js");
|
3683 |
|
3684 |
|
3685 | var HASH_UNDEFINED = '__lodash_hash_undefined__';
|
3686 |
|
3687 |
|
3688 |
|
3689 |
|
3690 |
|
3691 |
|
3692 |
|
3693 |
|
3694 |
|
3695 |
|
3696 |
|
3697 | function hashSet(key, value) {
|
3698 | var data = this.__data__;
|
3699 | this.size += this.has(key) ? 0 : 1;
|
3700 | data[key] = (nativeCreate && value === undefined) ? HASH_UNDEFINED : value;
|
3701 | return this;
|
3702 | }
|
3703 |
|
3704 | module.exports = hashSet;
|
3705 |
|
3706 |
|
3707 | }),
|
3708 |
|
3709 | "../node_modules/lodash/_initCloneArray.js":
|
3710 |
|
3711 |
|
3712 |
|
3713 |
|
3714 | (function(module, exports) {
|
3715 |
|
3716 |
|
3717 | var objectProto = Object.prototype;
|
3718 |
|
3719 |
|
3720 | var hasOwnProperty = objectProto.hasOwnProperty;
|
3721 |
|
3722 |
|
3723 |
|
3724 |
|
3725 |
|
3726 |
|
3727 |
|
3728 |
|
3729 | function initCloneArray(array) {
|
3730 | var length = array.length,
|
3731 | result = new array.constructor(length);
|
3732 |
|
3733 |
|
3734 | if (length && typeof array[0] == 'string' && hasOwnProperty.call(array, 'index')) {
|
3735 | result.index = array.index;
|
3736 | result.input = array.input;
|
3737 | }
|
3738 | return result;
|
3739 | }
|
3740 |
|
3741 | module.exports = initCloneArray;
|
3742 |
|
3743 |
|
3744 | }),
|
3745 |
|
3746 | "../node_modules/lodash/_initCloneByTag.js":
|
3747 |
|
3748 |
|
3749 |
|
3750 |
|
3751 | (function(module, exports) {
|
3752 |
|
3753 |
|
3754 |
|
3755 |
|
3756 |
|
3757 |
|
3758 |
|
3759 |
|
3760 |
|
3761 |
|
3762 |
|
3763 |
|
3764 |
|
3765 |
|
3766 |
|
3767 |
|
3768 |
|
3769 | function identity(value) {
|
3770 | return value;
|
3771 | }
|
3772 |
|
3773 | module.exports = identity;
|
3774 |
|
3775 |
|
3776 | }),
|
3777 |
|
3778 | "../node_modules/lodash/_initCloneObject.js":
|
3779 |
|
3780 |
|
3781 |
|
3782 |
|
3783 | (function(module, exports, __webpack_require__) {
|
3784 |
|
3785 | var baseCreate = __webpack_require__( "../node_modules/lodash/_baseCreate.js"),
|
3786 | getPrototype = __webpack_require__( "../node_modules/lodash/_getPrototype.js"),
|
3787 | isPrototype = __webpack_require__( "../node_modules/lodash/_isPrototype.js");
|
3788 |
|
3789 |
|
3790 |
|
3791 |
|
3792 |
|
3793 |
|
3794 |
|
3795 |
|
3796 | function initCloneObject(object) {
|
3797 | return (typeof object.constructor == 'function' && !isPrototype(object))
|
3798 | ? baseCreate(getPrototype(object))
|
3799 | : {};
|
3800 | }
|
3801 |
|
3802 | module.exports = initCloneObject;
|
3803 |
|
3804 |
|
3805 | }),
|
3806 |
|
3807 | "../node_modules/lodash/_isKeyable.js":
|
3808 |
|
3809 |
|
3810 |
|
3811 |
|
3812 | (function(module, exports) {
|
3813 |
|
3814 |
|
3815 |
|
3816 |
|
3817 |
|
3818 |
|
3819 |
|
3820 |
|
3821 | function isKeyable(value) {
|
3822 | var type = typeof value;
|
3823 | return (type == 'string' || type == 'number' || type == 'symbol' || type == 'boolean')
|
3824 | ? (value !== '__proto__')
|
3825 | : (value === null);
|
3826 | }
|
3827 |
|
3828 | module.exports = isKeyable;
|
3829 |
|
3830 |
|
3831 | }),
|
3832 |
|
3833 | "../node_modules/lodash/_isPrototype.js":
|
3834 |
|
3835 |
|
3836 |
|
3837 |
|
3838 | (function(module, exports) {
|
3839 |
|
3840 |
|
3841 |
|
3842 |
|
3843 |
|
3844 |
|
3845 |
|
3846 |
|
3847 |
|
3848 |
|
3849 |
|
3850 |
|
3851 |
|
3852 |
|
3853 | function stubFalse() {
|
3854 | return false;
|
3855 | }
|
3856 |
|
3857 | module.exports = stubFalse;
|
3858 |
|
3859 |
|
3860 | }),
|
3861 |
|
3862 | "../node_modules/lodash/_listCacheClear.js":
|
3863 |
|
3864 |
|
3865 |
|
3866 |
|
3867 | (function(module, exports) {
|
3868 |
|
3869 |
|
3870 |
|
3871 |
|
3872 |
|
3873 |
|
3874 |
|
3875 |
|
3876 | function listCacheClear() {
|
3877 | this.__data__ = [];
|
3878 | this.size = 0;
|
3879 | }
|
3880 |
|
3881 | module.exports = listCacheClear;
|
3882 |
|
3883 |
|
3884 | }),
|
3885 |
|
3886 | "../node_modules/lodash/_listCacheDelete.js":
|
3887 |
|
3888 |
|
3889 |
|
3890 |
|
3891 | (function(module, exports, __webpack_require__) {
|
3892 |
|
3893 | var assocIndexOf = __webpack_require__( "../node_modules/lodash/_assocIndexOf.js");
|
3894 |
|
3895 |
|
3896 | var arrayProto = Array.prototype;
|
3897 |
|
3898 |
|
3899 | var splice = arrayProto.splice;
|
3900 |
|
3901 |
|
3902 |
|
3903 |
|
3904 |
|
3905 |
|
3906 |
|
3907 |
|
3908 |
|
3909 |
|
3910 | function listCacheDelete(key) {
|
3911 | var data = this.__data__,
|
3912 | index = assocIndexOf(data, key);
|
3913 |
|
3914 | if (index < 0) {
|
3915 | return false;
|
3916 | }
|
3917 | var lastIndex = data.length - 1;
|
3918 | if (index == lastIndex) {
|
3919 | data.pop();
|
3920 | } else {
|
3921 | splice.call(data, index, 1);
|
3922 | }
|
3923 | --this.size;
|
3924 | return true;
|
3925 | }
|
3926 |
|
3927 | module.exports = listCacheDelete;
|
3928 |
|
3929 |
|
3930 | }),
|
3931 |
|
3932 | "../node_modules/lodash/_listCacheGet.js":
|
3933 |
|
3934 |
|
3935 |
|
3936 |
|
3937 | (function(module, exports, __webpack_require__) {
|
3938 |
|
3939 | var assocIndexOf = __webpack_require__( "../node_modules/lodash/_assocIndexOf.js");
|
3940 |
|
3941 |
|
3942 |
|
3943 |
|
3944 |
|
3945 |
|
3946 |
|
3947 |
|
3948 |
|
3949 |
|
3950 | function listCacheGet(key) {
|
3951 | var data = this.__data__,
|
3952 | index = assocIndexOf(data, key);
|
3953 |
|
3954 | return index < 0 ? undefined : data[index][1];
|
3955 | }
|
3956 |
|
3957 | module.exports = listCacheGet;
|
3958 |
|
3959 |
|
3960 | }),
|
3961 |
|
3962 | "../node_modules/lodash/_listCacheHas.js":
|
3963 |
|
3964 |
|
3965 |
|
3966 |
|
3967 | (function(module, exports, __webpack_require__) {
|
3968 |
|
3969 | var assocIndexOf = __webpack_require__( "../node_modules/lodash/_assocIndexOf.js");
|
3970 |
|
3971 |
|
3972 |
|
3973 |
|
3974 |
|
3975 |
|
3976 |
|
3977 |
|
3978 |
|
3979 |
|
3980 | function listCacheHas(key) {
|
3981 | return assocIndexOf(this.__data__, key) > -1;
|
3982 | }
|
3983 |
|
3984 | module.exports = listCacheHas;
|
3985 |
|
3986 |
|
3987 | }),
|
3988 |
|
3989 | "../node_modules/lodash/_listCacheSet.js":
|
3990 |
|
3991 |
|
3992 |
|
3993 |
|
3994 | (function(module, exports, __webpack_require__) {
|
3995 |
|
3996 | var assocIndexOf = __webpack_require__( "../node_modules/lodash/_assocIndexOf.js");
|
3997 |
|
3998 |
|
3999 |
|
4000 |
|
4001 |
|
4002 |
|
4003 |
|
4004 |
|
4005 |
|
4006 |
|
4007 |
|
4008 | function listCacheSet(key, value) {
|
4009 | var data = this.__data__,
|
4010 | index = assocIndexOf(data, key);
|
4011 |
|
4012 | if (index < 0) {
|
4013 | ++this.size;
|
4014 | data.push([key, value]);
|
4015 | } else {
|
4016 | data[index][1] = value;
|
4017 | }
|
4018 | return this;
|
4019 | }
|
4020 |
|
4021 | module.exports = listCacheSet;
|
4022 |
|
4023 |
|
4024 | }),
|
4025 |
|
4026 | "../node_modules/lodash/_mapCacheClear.js":
|
4027 |
|
4028 |
|
4029 |
|
4030 |
|
4031 | (function(module, exports, __webpack_require__) {
|
4032 |
|
4033 | var Hash = __webpack_require__( "../node_modules/lodash/_Hash.js"),
|
4034 | ListCache = __webpack_require__( "../node_modules/lodash/_ListCache.js"),
|
4035 | Map = __webpack_require__( "../node_modules/lodash/_Map.js");
|
4036 |
|
4037 |
|
4038 |
|
4039 |
|
4040 |
|
4041 |
|
4042 |
|
4043 |
|
4044 | function mapCacheClear() {
|
4045 | this.size = 0;
|
4046 | this.__data__ = {
|
4047 | 'hash': new Hash,
|
4048 | 'map': new (Map || ListCache),
|
4049 | 'string': new Hash
|
4050 | };
|
4051 | }
|
4052 |
|
4053 | module.exports = mapCacheClear;
|
4054 |
|
4055 |
|
4056 | }),
|
4057 |
|
4058 | "../node_modules/lodash/_mapCacheDelete.js":
|
4059 |
|
4060 |
|
4061 |
|
4062 |
|
4063 | (function(module, exports, __webpack_require__) {
|
4064 |
|
4065 | var getMapData = __webpack_require__( "../node_modules/lodash/_getMapData.js");
|
4066 |
|
4067 |
|
4068 |
|
4069 |
|
4070 |
|
4071 |
|
4072 |
|
4073 |
|
4074 |
|
4075 |
|
4076 | function mapCacheDelete(key) {
|
4077 | var result = getMapData(this, key)['delete'](key);
|
4078 | this.size -= result ? 1 : 0;
|
4079 | return result;
|
4080 | }
|
4081 |
|
4082 | module.exports = mapCacheDelete;
|
4083 |
|
4084 |
|
4085 | }),
|
4086 |
|
4087 | "../node_modules/lodash/_mapCacheGet.js":
|
4088 |
|
4089 |
|
4090 |
|
4091 |
|
4092 | (function(module, exports, __webpack_require__) {
|
4093 |
|
4094 | var getMapData = __webpack_require__( "../node_modules/lodash/_getMapData.js");
|
4095 |
|
4096 |
|
4097 |
|
4098 |
|
4099 |
|
4100 |
|
4101 |
|
4102 |
|
4103 |
|
4104 |
|
4105 | function mapCacheGet(key) {
|
4106 | return getMapData(this, key).get(key);
|
4107 | }
|
4108 |
|
4109 | module.exports = mapCacheGet;
|
4110 |
|
4111 |
|
4112 | }),
|
4113 |
|
4114 | "../node_modules/lodash/_mapCacheHas.js":
|
4115 |
|
4116 |
|
4117 |
|
4118 |
|
4119 | (function(module, exports, __webpack_require__) {
|
4120 |
|
4121 | var getMapData = __webpack_require__( "../node_modules/lodash/_getMapData.js");
|
4122 |
|
4123 |
|
4124 |
|
4125 |
|
4126 |
|
4127 |
|
4128 |
|
4129 |
|
4130 |
|
4131 |
|
4132 | function mapCacheHas(key) {
|
4133 | return getMapData(this, key).has(key);
|
4134 | }
|
4135 |
|
4136 | module.exports = mapCacheHas;
|
4137 |
|
4138 |
|
4139 | }),
|
4140 |
|
4141 | "../node_modules/lodash/_mapCacheSet.js":
|
4142 |
|
4143 |
|
4144 |
|
4145 |
|
4146 | (function(module, exports, __webpack_require__) {
|
4147 |
|
4148 | var getMapData = __webpack_require__( "../node_modules/lodash/_getMapData.js");
|
4149 |
|
4150 |
|
4151 |
|
4152 |
|
4153 |
|
4154 |
|
4155 |
|
4156 |
|
4157 |
|
4158 |
|
4159 |
|
4160 | function mapCacheSet(key, value) {
|
4161 | var data = getMapData(this, key),
|
4162 | size = data.size;
|
4163 |
|
4164 | data.set(key, value);
|
4165 | this.size += data.size == size ? 0 : 1;
|
4166 | return this;
|
4167 | }
|
4168 |
|
4169 | module.exports = mapCacheSet;
|
4170 |
|
4171 |
|
4172 | }),
|
4173 |
|
4174 | "../node_modules/lodash/_nativeCreate.js":
|
4175 |
|
4176 |
|
4177 |
|
4178 |
|
4179 | (function(module, exports, __webpack_require__) {
|
4180 |
|
4181 | var getNative = __webpack_require__( "../node_modules/lodash/_getNative.js");
|
4182 |
|
4183 |
|
4184 | var nativeCreate = getNative(Object, 'create');
|
4185 |
|
4186 | module.exports = nativeCreate;
|
4187 |
|
4188 |
|
4189 | }),
|
4190 |
|
4191 | "../node_modules/lodash/_overArg.js":
|
4192 |
|
4193 |
|
4194 |
|
4195 |
|
4196 | (function(module, exports) {
|
4197 |
|
4198 |
|
4199 |
|
4200 |
|
4201 |
|
4202 |
|
4203 |
|
4204 |
|
4205 |
|
4206 | function overArg(func, transform) {
|
4207 | return function(arg) {
|
4208 | return func(transform(arg));
|
4209 | };
|
4210 | }
|
4211 |
|
4212 | module.exports = overArg;
|
4213 |
|
4214 |
|
4215 | }),
|
4216 |
|
4217 | "../node_modules/lodash/_root.js":
|
4218 |
|
4219 |
|
4220 |
|
4221 |
|
4222 | (function(module, exports, __webpack_require__) {
|
4223 |
|
4224 | var freeGlobal = __webpack_require__( "../node_modules/lodash/_freeGlobal.js");
|
4225 |
|
4226 |
|
4227 | var freeSelf = typeof self == 'object' && self && self.Object === Object && self;
|
4228 |
|
4229 |
|
4230 | var root = freeGlobal || freeSelf || Function('return this')();
|
4231 |
|
4232 | module.exports = root;
|
4233 |
|
4234 |
|
4235 | }),
|
4236 |
|
4237 | "../node_modules/lodash/_stackClear.js":
|
4238 |
|
4239 |
|
4240 |
|
4241 |
|
4242 | (function(module, exports, __webpack_require__) {
|
4243 |
|
4244 | var ListCache = __webpack_require__( "../node_modules/lodash/_ListCache.js");
|
4245 |
|
4246 |
|
4247 |
|
4248 |
|
4249 |
|
4250 |
|
4251 |
|
4252 |
|
4253 | function stackClear() {
|
4254 | this.__data__ = new ListCache;
|
4255 | this.size = 0;
|
4256 | }
|
4257 |
|
4258 | module.exports = stackClear;
|
4259 |
|
4260 |
|
4261 | }),
|
4262 |
|
4263 | "../node_modules/lodash/_stackDelete.js":
|
4264 |
|
4265 |
|
4266 |
|
4267 |
|
4268 | (function(module, exports) {
|
4269 |
|
4270 |
|
4271 |
|
4272 |
|
4273 |
|
4274 |
|
4275 |
|
4276 |
|
4277 |
|
4278 |
|
4279 | function stackDelete(key) {
|
4280 | var data = this.__data__,
|
4281 | result = data['delete'](key);
|
4282 |
|
4283 | this.size = data.size;
|
4284 | return result;
|
4285 | }
|
4286 |
|
4287 | module.exports = stackDelete;
|
4288 |
|
4289 |
|
4290 | }),
|
4291 |
|
4292 | "../node_modules/lodash/_stackGet.js":
|
4293 |
|
4294 |
|
4295 |
|
4296 |
|
4297 | (function(module, exports) {
|
4298 |
|
4299 |
|
4300 |
|
4301 |
|
4302 |
|
4303 |
|
4304 |
|
4305 |
|
4306 |
|
4307 |
|
4308 | function stackGet(key) {
|
4309 | return this.__data__.get(key);
|
4310 | }
|
4311 |
|
4312 | module.exports = stackGet;
|
4313 |
|
4314 |
|
4315 | }),
|
4316 |
|
4317 | "../node_modules/lodash/_stackHas.js":
|
4318 |
|
4319 |
|
4320 |
|
4321 |
|
4322 | (function(module, exports) {
|
4323 |
|
4324 |
|
4325 |
|
4326 |
|
4327 |
|
4328 |
|
4329 |
|
4330 |
|
4331 |
|
4332 |
|
4333 | function stackHas(key) {
|
4334 | return this.__data__.has(key);
|
4335 | }
|
4336 |
|
4337 | module.exports = stackHas;
|
4338 |
|
4339 |
|
4340 | }),
|
4341 |
|
4342 | "../node_modules/lodash/_stackSet.js":
|
4343 |
|
4344 |
|
4345 |
|
4346 |
|
4347 | (function(module, exports, __webpack_require__) {
|
4348 |
|
4349 | var ListCache = __webpack_require__( "../node_modules/lodash/_ListCache.js"),
|
4350 | Map = __webpack_require__( "../node_modules/lodash/_Map.js"),
|
4351 | MapCache = __webpack_require__( "../node_modules/lodash/_MapCache.js");
|
4352 |
|
4353 |
|
4354 | var LARGE_ARRAY_SIZE = 200;
|
4355 |
|
4356 |
|
4357 |
|
4358 |
|
4359 |
|
4360 |
|
4361 |
|
4362 |
|
4363 |
|
4364 |
|
4365 |
|
4366 | function stackSet(key, value) {
|
4367 | var data = this.__data__;
|
4368 | if (data instanceof ListCache) {
|
4369 | var pairs = data.__data__;
|
4370 | if (!Map || (pairs.length < LARGE_ARRAY_SIZE - 1)) {
|
4371 | pairs.push([key, value]);
|
4372 | this.size = ++data.size;
|
4373 | return this;
|
4374 | }
|
4375 | data = this.__data__ = new MapCache(pairs);
|
4376 | }
|
4377 | data.set(key, value);
|
4378 | this.size = data.size;
|
4379 | return this;
|
4380 | }
|
4381 |
|
4382 | module.exports = stackSet;
|
4383 |
|
4384 |
|
4385 | }),
|
4386 |
|
4387 | "../node_modules/lodash/cloneDeep.js":
|
4388 |
|
4389 |
|
4390 |
|
4391 |
|
4392 | (function(module, exports, __webpack_require__) {
|
4393 |
|
4394 | var baseClone = __webpack_require__( "../node_modules/lodash/_baseClone.js");
|
4395 |
|
4396 |
|
4397 | var CLONE_DEEP_FLAG = 1,
|
4398 | CLONE_SYMBOLS_FLAG = 4;
|
4399 |
|
4400 |
|
4401 |
|
4402 |
|
4403 |
|
4404 |
|
4405 |
|
4406 |
|
4407 |
|
4408 |
|
4409 |
|
4410 |
|
4411 |
|
4412 |
|
4413 |
|
4414 |
|
4415 |
|
4416 |
|
4417 |
|
4418 | function cloneDeep(value) {
|
4419 | return baseClone(value, CLONE_DEEP_FLAG | CLONE_SYMBOLS_FLAG);
|
4420 | }
|
4421 |
|
4422 | module.exports = cloneDeep;
|
4423 |
|
4424 |
|
4425 | }),
|
4426 |
|
4427 | "../node_modules/lodash/eq.js":
|
4428 |
|
4429 |
|
4430 |
|
4431 |
|
4432 | (function(module, exports) {
|
4433 |
|
4434 |
|
4435 |
|
4436 |
|
4437 |
|
4438 |
|
4439 |
|
4440 |
|
4441 |
|
4442 |
|
4443 |
|
4444 |
|
4445 |
|
4446 |
|
4447 |
|
4448 |
|
4449 |
|
4450 |
|
4451 |
|
4452 |
|
4453 |
|
4454 |
|
4455 |
|
4456 |
|
4457 |
|
4458 |
|
4459 |
|
4460 |
|
4461 |
|
4462 |
|
4463 |
|
4464 |
|
4465 |
|
4466 | function eq(value, other) {
|
4467 | return value === other || (value !== value && other !== other);
|
4468 | }
|
4469 |
|
4470 | module.exports = eq;
|
4471 |
|
4472 |
|
4473 | }),
|
4474 |
|
4475 | "../node_modules/lodash/get.js":
|
4476 |
|
4477 |
|
4478 |
|
4479 |
|
4480 | (function(module, exports, __webpack_require__) {
|
4481 |
|
4482 | var baseGet = __webpack_require__( "../node_modules/lodash/_baseGet.js");
|
4483 |
|
4484 |
|
4485 |
|
4486 |
|
4487 |
|
4488 |
|
4489 |
|
4490 |
|
4491 |
|
4492 |
|
4493 |
|
4494 |
|
4495 |
|
4496 |
|
4497 |
|
4498 |
|
4499 |
|
4500 |
|
4501 |
|
4502 |
|
4503 |
|
4504 |
|
4505 |
|
4506 |
|
4507 |
|
4508 |
|
4509 | function get(object, path, defaultValue) {
|
4510 | var result = object == null ? undefined : baseGet(object, path);
|
4511 | return result === undefined ? defaultValue : result;
|
4512 | }
|
4513 |
|
4514 | module.exports = get;
|
4515 |
|
4516 |
|
4517 | /***/ }),
|
4518 |
|
4519 | /***/ "../node_modules/lodash/isArray.js":
|
4520 | /*!*****************************************!*\
|
4521 | !*** ../node_modules/lodash/isArray.js ***!
|
4522 | \*****************************************/
|
4523 | /*! no static exports found */
|
4524 | /***/ (function(module, exports) {
|
4525 |
|
4526 |
|
4527 |
|
4528 |
|
4529 |
|
4530 |
|
4531 |
|
4532 |
|
4533 |
|
4534 |
|
4535 |
|
4536 |
|
4537 |
|
4538 |
|
4539 |
|
4540 |
|
4541 |
|
4542 |
|
4543 |
|
4544 |
|
4545 |
|
4546 |
|
4547 |
|
4548 |
|
4549 | var isArray = Array.isArray;
|
4550 |
|
4551 | module.exports = isArray;
|
4552 |
|
4553 |
|
4554 | }),
|
4555 |
|
4556 | "../node_modules/lodash/isBuffer.js":
|
4557 |
|
4558 |
|
4559 |
|
4560 |
|
4561 | (function(module, exports) {
|
4562 |
|
4563 |
|
4564 |
|
4565 |
|
4566 |
|
4567 |
|
4568 |
|
4569 |
|
4570 |
|
4571 |
|
4572 |
|
4573 |
|
4574 |
|
4575 |
|
4576 | function stubFalse() {
|
4577 | return false;
|
4578 | }
|
4579 |
|
4580 | module.exports = stubFalse;
|
4581 |
|
4582 |
|
4583 | }),
|
4584 |
|
4585 | "../node_modules/lodash/isMap.js":
|
4586 |
|
4587 |
|
4588 |
|
4589 |
|
4590 | (function(module, exports) {
|
4591 |
|
4592 |
|
4593 |
|
4594 |
|
4595 |
|
4596 |
|
4597 |
|
4598 |
|
4599 |
|
4600 |
|
4601 |
|
4602 |
|
4603 |
|
4604 |
|
4605 | function stubFalse() {
|
4606 | return false;
|
4607 | }
|
4608 |
|
4609 | module.exports = stubFalse;
|
4610 |
|
4611 |
|
4612 | }),
|
4613 |
|
4614 | "../node_modules/lodash/isObject.js":
|
4615 |
|
4616 |
|
4617 |
|
4618 |
|
4619 | (function(module, exports) {
|
4620 |
|
4621 |
|
4622 |
|
4623 |
|
4624 |
|
4625 |
|
4626 |
|
4627 |
|
4628 |
|
4629 |
|
4630 |
|
4631 |
|
4632 |
|
4633 |
|
4634 |
|
4635 |
|
4636 |
|
4637 |
|
4638 |
|
4639 |
|
4640 |
|
4641 |
|
4642 |
|
4643 |
|
4644 |
|
4645 |
|
4646 | function isObject(value) {
|
4647 | var type = typeof value;
|
4648 | return value != null && (type == 'object' || type == 'function');
|
4649 | }
|
4650 |
|
4651 | module.exports = isObject;
|
4652 |
|
4653 |
|
4654 | }),
|
4655 |
|
4656 | "../node_modules/lodash/isObjectLike.js":
|
4657 |
|
4658 |
|
4659 |
|
4660 |
|
4661 | (function(module, exports) {
|
4662 |
|
4663 |
|
4664 |
|
4665 |
|
4666 |
|
4667 |
|
4668 |
|
4669 |
|
4670 |
|
4671 |
|
4672 |
|
4673 |
|
4674 |
|
4675 |
|
4676 |
|
4677 |
|
4678 |
|
4679 |
|
4680 |
|
4681 |
|
4682 |
|
4683 |
|
4684 |
|
4685 |
|
4686 |
|
4687 | function isObjectLike(value) {
|
4688 | return value != null && typeof value == 'object';
|
4689 | }
|
4690 |
|
4691 | module.exports = isObjectLike;
|
4692 |
|
4693 |
|
4694 | }),
|
4695 |
|
4696 | "../node_modules/lodash/isPlainObject.js":
|
4697 |
|
4698 |
|
4699 |
|
4700 |
|
4701 | (function(module, exports, __webpack_require__) {
|
4702 |
|
4703 | var baseGetTag = __webpack_require__( "../node_modules/lodash/_baseGetTag.js"),
|
4704 | getPrototype = __webpack_require__( "../node_modules/lodash/_getPrototype.js"),
|
4705 | isObjectLike = __webpack_require__( "../node_modules/lodash/isObjectLike.js");
|
4706 |
|
4707 |
|
4708 | var objectTag = '[object Object]';
|
4709 |
|
4710 |
|
4711 | var funcProto = Function.prototype,
|
4712 | objectProto = Object.prototype;
|
4713 |
|
4714 |
|
4715 | var funcToString = funcProto.toString;
|
4716 |
|
4717 |
|
4718 | var hasOwnProperty = objectProto.hasOwnProperty;
|
4719 |
|
4720 |
|
4721 | var objectCtorString = funcToString.call(Object);
|
4722 |
|
4723 |
|
4724 |
|
4725 |
|
4726 |
|
4727 |
|
4728 |
|
4729 |
|
4730 |
|
4731 |
|
4732 |
|
4733 |
|
4734 |
|
4735 |
|
4736 |
|
4737 |
|
4738 |
|
4739 |
|
4740 |
|
4741 |
|
4742 |
|
4743 |
|
4744 |
|
4745 |
|
4746 |
|
4747 |
|
4748 |
|
4749 |
|
4750 |
|
4751 | function isPlainObject(value) {
|
4752 | if (!isObjectLike(value) || baseGetTag(value) != objectTag) {
|
4753 | return false;
|
4754 | }
|
4755 | var proto = getPrototype(value);
|
4756 | if (proto === null) {
|
4757 | return true;
|
4758 | }
|
4759 | var Ctor = hasOwnProperty.call(proto, 'constructor') && proto.constructor;
|
4760 | return typeof Ctor == 'function' && Ctor instanceof Ctor &&
|
4761 | funcToString.call(Ctor) == objectCtorString;
|
4762 | }
|
4763 |
|
4764 | module.exports = isPlainObject;
|
4765 |
|
4766 |
|
4767 | }),
|
4768 |
|
4769 | "../node_modules/lodash/isSet.js":
|
4770 |
|
4771 |
|
4772 |
|
4773 |
|
4774 | (function(module, exports) {
|
4775 |
|
4776 |
|
4777 |
|
4778 |
|
4779 |
|
4780 |
|
4781 |
|
4782 |
|
4783 |
|
4784 |
|
4785 |
|
4786 |
|
4787 |
|
4788 |
|
4789 | function stubFalse() {
|
4790 | return false;
|
4791 | }
|
4792 |
|
4793 | module.exports = stubFalse;
|
4794 |
|
4795 |
|
4796 | }),
|
4797 |
|
4798 | "../node_modules/lodash/keys.js":
|
4799 |
|
4800 |
|
4801 |
|
4802 |
|
4803 | (function(module, exports, __webpack_require__) {
|
4804 |
|
4805 | var overArg = __webpack_require__( "../node_modules/lodash/_overArg.js");
|
4806 |
|
4807 |
|
4808 | var nativeKeys = overArg(Object.keys, Object);
|
4809 |
|
4810 | module.exports = nativeKeys;
|
4811 |
|
4812 |
|
4813 | }),
|
4814 |
|
4815 | "../node_modules/lodash/keysIn.js":
|
4816 |
|
4817 |
|
4818 |
|
4819 |
|
4820 | (function(module, exports) {
|
4821 |
|
4822 |
|
4823 |
|
4824 |
|
4825 |
|
4826 |
|
4827 |
|
4828 |
|
4829 |
|
4830 |
|
4831 | function nativeKeysIn(object) {
|
4832 | var result = [];
|
4833 | if (object != null) {
|
4834 | for (var key in Object(object)) {
|
4835 | result.push(key);
|
4836 | }
|
4837 | }
|
4838 | return result;
|
4839 | }
|
4840 |
|
4841 | module.exports = nativeKeysIn;
|
4842 |
|
4843 |
|
4844 | }),
|
4845 |
|
4846 | "../node_modules/process/browser.js":
|
4847 |
|
4848 |
|
4849 |
|
4850 |
|
4851 | (function(module, exports) {
|
4852 |
|
4853 |
|
4854 | var process = module.exports = {};
|
4855 |
|
4856 |
|
4857 |
|
4858 |
|
4859 |
|
4860 |
|
4861 | var cachedSetTimeout;
|
4862 | var cachedClearTimeout;
|
4863 |
|
4864 | function defaultSetTimout() {
|
4865 | throw new Error('setTimeout has not been defined');
|
4866 | }
|
4867 | function defaultClearTimeout () {
|
4868 | throw new Error('clearTimeout has not been defined');
|
4869 | }
|
4870 | (function () {
|
4871 | try {
|
4872 | if (typeof setTimeout === 'function') {
|
4873 | cachedSetTimeout = setTimeout;
|
4874 | } else {
|
4875 | cachedSetTimeout = defaultSetTimout;
|
4876 | }
|
4877 | } catch (e) {
|
4878 | cachedSetTimeout = defaultSetTimout;
|
4879 | }
|
4880 | try {
|
4881 | if (typeof clearTimeout === 'function') {
|
4882 | cachedClearTimeout = clearTimeout;
|
4883 | } else {
|
4884 | cachedClearTimeout = defaultClearTimeout;
|
4885 | }
|
4886 | } catch (e) {
|
4887 | cachedClearTimeout = defaultClearTimeout;
|
4888 | }
|
4889 | } ())
|
4890 | function runTimeout(fun) {
|
4891 | if (cachedSetTimeout === setTimeout) {
|
4892 |
|
4893 | return setTimeout(fun, 0);
|
4894 | }
|
4895 |
|
4896 | if ((cachedSetTimeout === defaultSetTimout || !cachedSetTimeout) && setTimeout) {
|
4897 | cachedSetTimeout = setTimeout;
|
4898 | return setTimeout(fun, 0);
|
4899 | }
|
4900 | try {
|
4901 |
|
4902 | return cachedSetTimeout(fun, 0);
|
4903 | } catch(e){
|
4904 | try {
|
4905 |
|
4906 | return cachedSetTimeout.call(null, fun, 0);
|
4907 | } catch(e){
|
4908 |
|
4909 | return cachedSetTimeout.call(this, fun, 0);
|
4910 | }
|
4911 | }
|
4912 |
|
4913 |
|
4914 | }
|
4915 | function runClearTimeout(marker) {
|
4916 | if (cachedClearTimeout === clearTimeout) {
|
4917 |
|
4918 | return clearTimeout(marker);
|
4919 | }
|
4920 |
|
4921 | if ((cachedClearTimeout === defaultClearTimeout || !cachedClearTimeout) && clearTimeout) {
|
4922 | cachedClearTimeout = clearTimeout;
|
4923 | return clearTimeout(marker);
|
4924 | }
|
4925 | try {
|
4926 |
|
4927 | return cachedClearTimeout(marker);
|
4928 | } catch (e){
|
4929 | try {
|
4930 |
|
4931 | return cachedClearTimeout.call(null, marker);
|
4932 | } catch (e){
|
4933 |
|
4934 |
|
4935 | return cachedClearTimeout.call(this, marker);
|
4936 | }
|
4937 | }
|
4938 |
|
4939 |
|
4940 |
|
4941 | }
|
4942 | var queue = [];
|
4943 | var draining = false;
|
4944 | var currentQueue;
|
4945 | var queueIndex = -1;
|
4946 |
|
4947 | function cleanUpNextTick() {
|
4948 | if (!draining || !currentQueue) {
|
4949 | return;
|
4950 | }
|
4951 | draining = false;
|
4952 | if (currentQueue.length) {
|
4953 | queue = currentQueue.concat(queue);
|
4954 | } else {
|
4955 | queueIndex = -1;
|
4956 | }
|
4957 | if (queue.length) {
|
4958 | drainQueue();
|
4959 | }
|
4960 | }
|
4961 |
|
4962 | function drainQueue() {
|
4963 | if (draining) {
|
4964 | return;
|
4965 | }
|
4966 | var timeout = runTimeout(cleanUpNextTick);
|
4967 | draining = true;
|
4968 |
|
4969 | var len = queue.length;
|
4970 | while(len) {
|
4971 | currentQueue = queue;
|
4972 | queue = [];
|
4973 | while (++queueIndex < len) {
|
4974 | if (currentQueue) {
|
4975 | currentQueue[queueIndex].run();
|
4976 | }
|
4977 | }
|
4978 | queueIndex = -1;
|
4979 | len = queue.length;
|
4980 | }
|
4981 | currentQueue = null;
|
4982 | draining = false;
|
4983 | runClearTimeout(timeout);
|
4984 | }
|
4985 |
|
4986 | process.nextTick = function (fun) {
|
4987 | var args = new Array(arguments.length - 1);
|
4988 | if (arguments.length > 1) {
|
4989 | for (var i = 1; i < arguments.length; i++) {
|
4990 | args[i - 1] = arguments[i];
|
4991 | }
|
4992 | }
|
4993 | queue.push(new Item(fun, args));
|
4994 | if (queue.length === 1 && !draining) {
|
4995 | runTimeout(drainQueue);
|
4996 | }
|
4997 | };
|
4998 |
|
4999 |
|
5000 | function Item(fun, array) {
|
5001 | this.fun = fun;
|
5002 | this.array = array;
|
5003 | }
|
5004 | Item.prototype.run = function () {
|
5005 | this.fun.apply(null, this.array);
|
5006 | };
|
5007 | process.title = 'browser';
|
5008 | process.browser = true;
|
5009 | process.env = {};
|
5010 | process.argv = [];
|
5011 | process.version = '';
|
5012 | process.versions = {};
|
5013 |
|
5014 | function noop() {}
|
5015 |
|
5016 | process.on = noop;
|
5017 | process.addListener = noop;
|
5018 | process.once = noop;
|
5019 | process.off = noop;
|
5020 | process.removeListener = noop;
|
5021 | process.removeAllListeners = noop;
|
5022 | process.emit = noop;
|
5023 | process.prependListener = noop;
|
5024 | process.prependOnceListener = noop;
|
5025 |
|
5026 | process.listeners = function (name) { return [] }
|
5027 |
|
5028 | process.binding = function (name) {
|
5029 | throw new Error('process.binding is not supported');
|
5030 | };
|
5031 |
|
5032 | process.cwd = function () { return '/' };
|
5033 | process.chdir = function (dir) {
|
5034 | throw new Error('process.chdir is not supported');
|
5035 | };
|
5036 | process.umask = function() { return 0; };
|
5037 |
|
5038 |
|
5039 | }),
|
5040 |
|
5041 | "../node_modules/qs/lib/formats.js":
|
5042 |
|
5043 |
|
5044 |
|
5045 |
|
5046 | (function(module, exports, __webpack_require__) {
|
5047 |
|
5048 | "use strict";
|
5049 |
|
5050 |
|
5051 | var replace = String.prototype.replace;
|
5052 | var percentTwenties = /%20/g;
|
5053 |
|
5054 | var util = __webpack_require__( "../node_modules/qs/lib/utils.js");
|
5055 |
|
5056 | var Format = {
|
5057 | RFC1738: 'RFC1738',
|
5058 | RFC3986: 'RFC3986'
|
5059 | };
|
5060 |
|
5061 | module.exports = util.assign(
|
5062 | {
|
5063 | 'default': Format.RFC3986,
|
5064 | formatters: {
|
5065 | RFC1738: function (value) {
|
5066 | return replace.call(value, percentTwenties, '+');
|
5067 | },
|
5068 | RFC3986: function (value) {
|
5069 | return String(value);
|
5070 | }
|
5071 | }
|
5072 | },
|
5073 | Format
|
5074 | );
|
5075 |
|
5076 |
|
5077 | }),
|
5078 |
|
5079 | "../node_modules/qs/lib/index.js":
|
5080 |
|
5081 |
|
5082 |
|
5083 |
|
5084 | (function(module, exports, __webpack_require__) {
|
5085 |
|
5086 | "use strict";
|
5087 |
|
5088 |
|
5089 | var stringify = __webpack_require__( "../node_modules/qs/lib/stringify.js");
|
5090 | var parse = __webpack_require__( "../node_modules/qs/lib/parse.js");
|
5091 | var formats = __webpack_require__( "../node_modules/qs/lib/formats.js");
|
5092 |
|
5093 | module.exports = {
|
5094 | formats: formats,
|
5095 | parse: parse,
|
5096 | stringify: stringify
|
5097 | };
|
5098 |
|
5099 |
|
5100 | }),
|
5101 |
|
5102 | "../node_modules/qs/lib/parse.js":
|
5103 |
|
5104 |
|
5105 |
|
5106 |
|
5107 | (function(module, exports, __webpack_require__) {
|
5108 |
|
5109 | "use strict";
|
5110 |
|
5111 |
|
5112 | var utils = __webpack_require__( "../node_modules/qs/lib/utils.js");
|
5113 |
|
5114 | var has = Object.prototype.hasOwnProperty;
|
5115 | var isArray = Array.isArray;
|
5116 |
|
5117 | var defaults = {
|
5118 | allowDots: false,
|
5119 | allowPrototypes: false,
|
5120 | arrayLimit: 20,
|
5121 | charset: 'utf-8',
|
5122 | charsetSentinel: false,
|
5123 | comma: false,
|
5124 | decoder: utils.decode,
|
5125 | delimiter: '&',
|
5126 | depth: 5,
|
5127 | ignoreQueryPrefix: false,
|
5128 | interpretNumericEntities: false,
|
5129 | parameterLimit: 1000,
|
5130 | parseArrays: true,
|
5131 | plainObjects: false,
|
5132 | strictNullHandling: false
|
5133 | };
|
5134 |
|
5135 | var interpretNumericEntities = function (str) {
|
5136 | return str.replace(/&#(\d+);/g, function ($0, numberStr) {
|
5137 | return String.fromCharCode(parseInt(numberStr, 10));
|
5138 | });
|
5139 | };
|
5140 |
|
5141 | var parseArrayValue = function (val, options) {
|
5142 | if (val && typeof val === 'string' && options.comma && val.indexOf(',') > -1) {
|
5143 | return val.split(',');
|
5144 | }
|
5145 |
|
5146 | return val;
|
5147 | };
|
5148 |
|
5149 |
|
5150 |
|
5151 |
|
5152 |
|
5153 |
|
5154 | var isoSentinel = 'utf8=%26%2310003%3B';
|
5155 |
|
5156 |
|
5157 | var charsetSentinel = 'utf8=%E2%9C%93';
|
5158 |
|
5159 | var parseValues = function parseQueryStringValues(str, options) {
|
5160 | var obj = {};
|
5161 | var cleanStr = options.ignoreQueryPrefix ? str.replace(/^\?/, '') : str;
|
5162 | var limit = options.parameterLimit === Infinity ? undefined : options.parameterLimit;
|
5163 | var parts = cleanStr.split(options.delimiter, limit);
|
5164 | var skipIndex = -1;
|
5165 | var i;
|
5166 |
|
5167 | var charset = options.charset;
|
5168 | if (options.charsetSentinel) {
|
5169 | for (i = 0; i < parts.length; ++i) {
|
5170 | if (parts[i].indexOf('utf8=') === 0) {
|
5171 | if (parts[i] === charsetSentinel) {
|
5172 | charset = 'utf-8';
|
5173 | } else if (parts[i] === isoSentinel) {
|
5174 | charset = 'iso-8859-1';
|
5175 | }
|
5176 | skipIndex = i;
|
5177 | i = parts.length;
|
5178 | }
|
5179 | }
|
5180 | }
|
5181 |
|
5182 | for (i = 0; i < parts.length; ++i) {
|
5183 | if (i === skipIndex) {
|
5184 | continue;
|
5185 | }
|
5186 | var part = parts[i];
|
5187 |
|
5188 | var bracketEqualsPos = part.indexOf(']=');
|
5189 | var pos = bracketEqualsPos === -1 ? part.indexOf('=') : bracketEqualsPos + 1;
|
5190 |
|
5191 | var key, val;
|
5192 | if (pos === -1) {
|
5193 | key = options.decoder(part, defaults.decoder, charset, 'key');
|
5194 | val = options.strictNullHandling ? null : '';
|
5195 | } else {
|
5196 | key = options.decoder(part.slice(0, pos), defaults.decoder, charset, 'key');
|
5197 | val = utils.maybeMap(
|
5198 | parseArrayValue(part.slice(pos + 1), options),
|
5199 | function (encodedVal) {
|
5200 | return options.decoder(encodedVal, defaults.decoder, charset, 'value');
|
5201 | }
|
5202 | );
|
5203 | }
|
5204 |
|
5205 | if (val && options.interpretNumericEntities && charset === 'iso-8859-1') {
|
5206 | val = interpretNumericEntities(val);
|
5207 | }
|
5208 |
|
5209 | if (part.indexOf('[]=') > -1) {
|
5210 | val = isArray(val) ? [val] : val;
|
5211 | }
|
5212 |
|
5213 | if (has.call(obj, key)) {
|
5214 | obj[key] = utils.combine(obj[key], val);
|
5215 | } else {
|
5216 | obj[key] = val;
|
5217 | }
|
5218 | }
|
5219 |
|
5220 | return obj;
|
5221 | };
|
5222 |
|
5223 | var parseObject = function (chain, val, options, valuesParsed) {
|
5224 | var leaf = valuesParsed ? val : parseArrayValue(val, options);
|
5225 |
|
5226 | for (var i = chain.length - 1; i >= 0; --i) {
|
5227 | var obj;
|
5228 | var root = chain[i];
|
5229 |
|
5230 | if (root === '[]' && options.parseArrays) {
|
5231 | obj = [].concat(leaf);
|
5232 | } else {
|
5233 | obj = options.plainObjects ? Object.create(null) : {};
|
5234 | var cleanRoot = root.charAt(0) === '[' && root.charAt(root.length - 1) === ']' ? root.slice(1, -1) : root;
|
5235 | var index = parseInt(cleanRoot, 10);
|
5236 | if (!options.parseArrays && cleanRoot === '') {
|
5237 | obj = { 0: leaf };
|
5238 | } else if (
|
5239 | !isNaN(index)
|
5240 | && root !== cleanRoot
|
5241 | && String(index) === cleanRoot
|
5242 | && index >= 0
|
5243 | && (options.parseArrays && index <= options.arrayLimit)
|
5244 | ) {
|
5245 | obj = [];
|
5246 | obj[index] = leaf;
|
5247 | } else {
|
5248 | obj[cleanRoot] = leaf;
|
5249 | }
|
5250 | }
|
5251 |
|
5252 | leaf = obj;
|
5253 | }
|
5254 |
|
5255 | return leaf;
|
5256 | };
|
5257 |
|
5258 | var parseKeys = function parseQueryStringKeys(givenKey, val, options, valuesParsed) {
|
5259 | if (!givenKey) {
|
5260 | return;
|
5261 | }
|
5262 |
|
5263 |
|
5264 | var key = options.allowDots ? givenKey.replace(/\.([^.[]+)/g, '[$1]') : givenKey;
|
5265 |
|
5266 |
|
5267 |
|
5268 | var brackets = /(\[[^[\]]*])/;
|
5269 | var child = /(\[[^[\]]*])/g;
|
5270 |
|
5271 |
|
5272 |
|
5273 | var segment = options.depth > 0 && brackets.exec(key);
|
5274 | var parent = segment ? key.slice(0, segment.index) : key;
|
5275 |
|
5276 |
|
5277 |
|
5278 | var keys = [];
|
5279 | if (parent) {
|
5280 |
|
5281 | if (!options.plainObjects && has.call(Object.prototype, parent)) {
|
5282 | if (!options.allowPrototypes) {
|
5283 | return;
|
5284 | }
|
5285 | }
|
5286 |
|
5287 | keys.push(parent);
|
5288 | }
|
5289 |
|
5290 |
|
5291 |
|
5292 | var i = 0;
|
5293 | while (options.depth > 0 && (segment = child.exec(key)) !== null && i < options.depth) {
|
5294 | i += 1;
|
5295 | if (!options.plainObjects && has.call(Object.prototype, segment[1].slice(1, -1))) {
|
5296 | if (!options.allowPrototypes) {
|
5297 | return;
|
5298 | }
|
5299 | }
|
5300 | keys.push(segment[1]);
|
5301 | }
|
5302 |
|
5303 |
|
5304 |
|
5305 | if (segment) {
|
5306 | keys.push('[' + key.slice(segment.index) + ']');
|
5307 | }
|
5308 |
|
5309 | return parseObject(keys, val, options, valuesParsed);
|
5310 | };
|
5311 |
|
5312 | var normalizeParseOptions = function normalizeParseOptions(opts) {
|
5313 | if (!opts) {
|
5314 | return defaults;
|
5315 | }
|
5316 |
|
5317 | if (opts.decoder !== null && opts.decoder !== undefined && typeof opts.decoder !== 'function') {
|
5318 | throw new TypeError('Decoder has to be a function.');
|
5319 | }
|
5320 |
|
5321 | if (typeof opts.charset !== 'undefined' && opts.charset !== 'utf-8' && opts.charset !== 'iso-8859-1') {
|
5322 | throw new TypeError('The charset option must be either utf-8, iso-8859-1, or undefined');
|
5323 | }
|
5324 | var charset = typeof opts.charset === 'undefined' ? defaults.charset : opts.charset;
|
5325 |
|
5326 | return {
|
5327 | allowDots: typeof opts.allowDots === 'undefined' ? defaults.allowDots : !!opts.allowDots,
|
5328 | allowPrototypes: typeof opts.allowPrototypes === 'boolean' ? opts.allowPrototypes : defaults.allowPrototypes,
|
5329 | arrayLimit: typeof opts.arrayLimit === 'number' ? opts.arrayLimit : defaults.arrayLimit,
|
5330 | charset: charset,
|
5331 | charsetSentinel: typeof opts.charsetSentinel === 'boolean' ? opts.charsetSentinel : defaults.charsetSentinel,
|
5332 | comma: typeof opts.comma === 'boolean' ? opts.comma : defaults.comma,
|
5333 | decoder: typeof opts.decoder === 'function' ? opts.decoder : defaults.decoder,
|
5334 | delimiter: typeof opts.delimiter === 'string' || utils.isRegExp(opts.delimiter) ? opts.delimiter : defaults.delimiter,
|
5335 |
|
5336 | depth: (typeof opts.depth === 'number' || opts.depth === false) ? +opts.depth : defaults.depth,
|
5337 | ignoreQueryPrefix: opts.ignoreQueryPrefix === true,
|
5338 | interpretNumericEntities: typeof opts.interpretNumericEntities === 'boolean' ? opts.interpretNumericEntities : defaults.interpretNumericEntities,
|
5339 | parameterLimit: typeof opts.parameterLimit === 'number' ? opts.parameterLimit : defaults.parameterLimit,
|
5340 | parseArrays: opts.parseArrays !== false,
|
5341 | plainObjects: typeof opts.plainObjects === 'boolean' ? opts.plainObjects : defaults.plainObjects,
|
5342 | strictNullHandling: typeof opts.strictNullHandling === 'boolean' ? opts.strictNullHandling : defaults.strictNullHandling
|
5343 | };
|
5344 | };
|
5345 |
|
5346 | module.exports = function (str, opts) {
|
5347 | var options = normalizeParseOptions(opts);
|
5348 |
|
5349 | if (str === '' || str === null || typeof str === 'undefined') {
|
5350 | return options.plainObjects ? Object.create(null) : {};
|
5351 | }
|
5352 |
|
5353 | var tempObj = typeof str === 'string' ? parseValues(str, options) : str;
|
5354 | var obj = options.plainObjects ? Object.create(null) : {};
|
5355 |
|
5356 |
|
5357 |
|
5358 | var keys = Object.keys(tempObj);
|
5359 | for (var i = 0; i < keys.length; ++i) {
|
5360 | var key = keys[i];
|
5361 | var newObj = parseKeys(key, tempObj[key], options, typeof str === 'string');
|
5362 | obj = utils.merge(obj, newObj, options);
|
5363 | }
|
5364 |
|
5365 | return utils.compact(obj);
|
5366 | };
|
5367 |
|
5368 |
|
5369 | }),
|
5370 |
|
5371 | "../node_modules/qs/lib/stringify.js":
|
5372 |
|
5373 |
|
5374 |
|
5375 |
|
5376 | (function(module, exports, __webpack_require__) {
|
5377 |
|
5378 | "use strict";
|
5379 |
|
5380 |
|
5381 | var utils = __webpack_require__( "../node_modules/qs/lib/utils.js");
|
5382 | var formats = __webpack_require__( "../node_modules/qs/lib/formats.js");
|
5383 | var has = Object.prototype.hasOwnProperty;
|
5384 |
|
5385 | var arrayPrefixGenerators = {
|
5386 | brackets: function brackets(prefix) {
|
5387 | return prefix + '[]';
|
5388 | },
|
5389 | comma: 'comma',
|
5390 | indices: function indices(prefix, key) {
|
5391 | return prefix + '[' + key + ']';
|
5392 | },
|
5393 | repeat: function repeat(prefix) {
|
5394 | return prefix;
|
5395 | }
|
5396 | };
|
5397 |
|
5398 | var isArray = Array.isArray;
|
5399 | var push = Array.prototype.push;
|
5400 | var pushToArray = function (arr, valueOrArray) {
|
5401 | push.apply(arr, isArray(valueOrArray) ? valueOrArray : [valueOrArray]);
|
5402 | };
|
5403 |
|
5404 | var toISO = Date.prototype.toISOString;
|
5405 |
|
5406 | var defaultFormat = formats['default'];
|
5407 | var defaults = {
|
5408 | addQueryPrefix: false,
|
5409 | allowDots: false,
|
5410 | charset: 'utf-8',
|
5411 | charsetSentinel: false,
|
5412 | delimiter: '&',
|
5413 | encode: true,
|
5414 | encoder: utils.encode,
|
5415 | encodeValuesOnly: false,
|
5416 | format: defaultFormat,
|
5417 | formatter: formats.formatters[defaultFormat],
|
5418 |
|
5419 | indices: false,
|
5420 | serializeDate: function serializeDate(date) {
|
5421 | return toISO.call(date);
|
5422 | },
|
5423 | skipNulls: false,
|
5424 | strictNullHandling: false
|
5425 | };
|
5426 |
|
5427 | var isNonNullishPrimitive = function isNonNullishPrimitive(v) {
|
5428 | return typeof v === 'string'
|
5429 | || typeof v === 'number'
|
5430 | || typeof v === 'boolean'
|
5431 | || typeof v === 'symbol'
|
5432 | || typeof v === 'bigint';
|
5433 | };
|
5434 |
|
5435 | var stringify = function stringify(
|
5436 | object,
|
5437 | prefix,
|
5438 | generateArrayPrefix,
|
5439 | strictNullHandling,
|
5440 | skipNulls,
|
5441 | encoder,
|
5442 | filter,
|
5443 | sort,
|
5444 | allowDots,
|
5445 | serializeDate,
|
5446 | formatter,
|
5447 | encodeValuesOnly,
|
5448 | charset
|
5449 | ) {
|
5450 | var obj = object;
|
5451 | if (typeof filter === 'function') {
|
5452 | obj = filter(prefix, obj);
|
5453 | } else if (obj instanceof Date) {
|
5454 | obj = serializeDate(obj);
|
5455 | } else if (generateArrayPrefix === 'comma' && isArray(obj)) {
|
5456 | obj = utils.maybeMap(obj, function (value) {
|
5457 | if (value instanceof Date) {
|
5458 | return serializeDate(value);
|
5459 | }
|
5460 | return value;
|
5461 | }).join(',');
|
5462 | }
|
5463 |
|
5464 | if (obj === null) {
|
5465 | if (strictNullHandling) {
|
5466 | return encoder && !encodeValuesOnly ? encoder(prefix, defaults.encoder, charset, 'key') : prefix;
|
5467 | }
|
5468 |
|
5469 | obj = '';
|
5470 | }
|
5471 |
|
5472 | if (isNonNullishPrimitive(obj) || utils.isBuffer(obj)) {
|
5473 | if (encoder) {
|
5474 | var keyValue = encodeValuesOnly ? prefix : encoder(prefix, defaults.encoder, charset, 'key');
|
5475 | return [formatter(keyValue) + '=' + formatter(encoder(obj, defaults.encoder, charset, 'value'))];
|
5476 | }
|
5477 | return [formatter(prefix) + '=' + formatter(String(obj))];
|
5478 | }
|
5479 |
|
5480 | var values = [];
|
5481 |
|
5482 | if (typeof obj === 'undefined') {
|
5483 | return values;
|
5484 | }
|
5485 |
|
5486 | var objKeys;
|
5487 | if (isArray(filter)) {
|
5488 | objKeys = filter;
|
5489 | } else {
|
5490 | var keys = Object.keys(obj);
|
5491 | objKeys = sort ? keys.sort(sort) : keys;
|
5492 | }
|
5493 |
|
5494 | for (var i = 0; i < objKeys.length; ++i) {
|
5495 | var key = objKeys[i];
|
5496 | var value = obj[key];
|
5497 |
|
5498 | if (skipNulls && value === null) {
|
5499 | continue;
|
5500 | }
|
5501 |
|
5502 | var keyPrefix = isArray(obj)
|
5503 | ? typeof generateArrayPrefix === 'function' ? generateArrayPrefix(prefix, key) : prefix
|
5504 | : prefix + (allowDots ? '.' + key : '[' + key + ']');
|
5505 |
|
5506 | pushToArray(values, stringify(
|
5507 | value,
|
5508 | keyPrefix,
|
5509 | generateArrayPrefix,
|
5510 | strictNullHandling,
|
5511 | skipNulls,
|
5512 | encoder,
|
5513 | filter,
|
5514 | sort,
|
5515 | allowDots,
|
5516 | serializeDate,
|
5517 | formatter,
|
5518 | encodeValuesOnly,
|
5519 | charset
|
5520 | ));
|
5521 | }
|
5522 |
|
5523 | return values;
|
5524 | };
|
5525 |
|
5526 | var normalizeStringifyOptions = function normalizeStringifyOptions(opts) {
|
5527 | if (!opts) {
|
5528 | return defaults;
|
5529 | }
|
5530 |
|
5531 | if (opts.encoder !== null && opts.encoder !== undefined && typeof opts.encoder !== 'function') {
|
5532 | throw new TypeError('Encoder has to be a function.');
|
5533 | }
|
5534 |
|
5535 | var charset = opts.charset || defaults.charset;
|
5536 | if (typeof opts.charset !== 'undefined' && opts.charset !== 'utf-8' && opts.charset !== 'iso-8859-1') {
|
5537 | throw new TypeError('The charset option must be either utf-8, iso-8859-1, or undefined');
|
5538 | }
|
5539 |
|
5540 | var format = formats['default'];
|
5541 | if (typeof opts.format !== 'undefined') {
|
5542 | if (!has.call(formats.formatters, opts.format)) {
|
5543 | throw new TypeError('Unknown format option provided.');
|
5544 | }
|
5545 | format = opts.format;
|
5546 | }
|
5547 | var formatter = formats.formatters[format];
|
5548 |
|
5549 | var filter = defaults.filter;
|
5550 | if (typeof opts.filter === 'function' || isArray(opts.filter)) {
|
5551 | filter = opts.filter;
|
5552 | }
|
5553 |
|
5554 | return {
|
5555 | addQueryPrefix: typeof opts.addQueryPrefix === 'boolean' ? opts.addQueryPrefix : defaults.addQueryPrefix,
|
5556 | allowDots: typeof opts.allowDots === 'undefined' ? defaults.allowDots : !!opts.allowDots,
|
5557 | charset: charset,
|
5558 | charsetSentinel: typeof opts.charsetSentinel === 'boolean' ? opts.charsetSentinel : defaults.charsetSentinel,
|
5559 | delimiter: typeof opts.delimiter === 'undefined' ? defaults.delimiter : opts.delimiter,
|
5560 | encode: typeof opts.encode === 'boolean' ? opts.encode : defaults.encode,
|
5561 | encoder: typeof opts.encoder === 'function' ? opts.encoder : defaults.encoder,
|
5562 | encodeValuesOnly: typeof opts.encodeValuesOnly === 'boolean' ? opts.encodeValuesOnly : defaults.encodeValuesOnly,
|
5563 | filter: filter,
|
5564 | formatter: formatter,
|
5565 | serializeDate: typeof opts.serializeDate === 'function' ? opts.serializeDate : defaults.serializeDate,
|
5566 | skipNulls: typeof opts.skipNulls === 'boolean' ? opts.skipNulls : defaults.skipNulls,
|
5567 | sort: typeof opts.sort === 'function' ? opts.sort : null,
|
5568 | strictNullHandling: typeof opts.strictNullHandling === 'boolean' ? opts.strictNullHandling : defaults.strictNullHandling
|
5569 | };
|
5570 | };
|
5571 |
|
5572 | module.exports = function (object, opts) {
|
5573 | var obj = object;
|
5574 | var options = normalizeStringifyOptions(opts);
|
5575 |
|
5576 | var objKeys;
|
5577 | var filter;
|
5578 |
|
5579 | if (typeof options.filter === 'function') {
|
5580 | filter = options.filter;
|
5581 | obj = filter('', obj);
|
5582 | } else if (isArray(options.filter)) {
|
5583 | filter = options.filter;
|
5584 | objKeys = filter;
|
5585 | }
|
5586 |
|
5587 | var keys = [];
|
5588 |
|
5589 | if (typeof obj !== 'object' || obj === null) {
|
5590 | return '';
|
5591 | }
|
5592 |
|
5593 | var arrayFormat;
|
5594 | if (opts && opts.arrayFormat in arrayPrefixGenerators) {
|
5595 | arrayFormat = opts.arrayFormat;
|
5596 | } else if (opts && 'indices' in opts) {
|
5597 | arrayFormat = opts.indices ? 'indices' : 'repeat';
|
5598 | } else {
|
5599 | arrayFormat = 'indices';
|
5600 | }
|
5601 |
|
5602 | var generateArrayPrefix = arrayPrefixGenerators[arrayFormat];
|
5603 |
|
5604 | if (!objKeys) {
|
5605 | objKeys = Object.keys(obj);
|
5606 | }
|
5607 |
|
5608 | if (options.sort) {
|
5609 | objKeys.sort(options.sort);
|
5610 | }
|
5611 |
|
5612 | for (var i = 0; i < objKeys.length; ++i) {
|
5613 | var key = objKeys[i];
|
5614 |
|
5615 | if (options.skipNulls && obj[key] === null) {
|
5616 | continue;
|
5617 | }
|
5618 | pushToArray(keys, stringify(
|
5619 | obj[key],
|
5620 | key,
|
5621 | generateArrayPrefix,
|
5622 | options.strictNullHandling,
|
5623 | options.skipNulls,
|
5624 | options.encode ? options.encoder : null,
|
5625 | options.filter,
|
5626 | options.sort,
|
5627 | options.allowDots,
|
5628 | options.serializeDate,
|
5629 | options.formatter,
|
5630 | options.encodeValuesOnly,
|
5631 | options.charset
|
5632 | ));
|
5633 | }
|
5634 |
|
5635 | var joined = keys.join(options.delimiter);
|
5636 | var prefix = options.addQueryPrefix === true ? '?' : '';
|
5637 |
|
5638 | if (options.charsetSentinel) {
|
5639 | if (options.charset === 'iso-8859-1') {
|
5640 |
|
5641 | prefix += 'utf8=%26%2310003%3B&';
|
5642 | } else {
|
5643 |
|
5644 | prefix += 'utf8=%E2%9C%93&';
|
5645 | }
|
5646 | }
|
5647 |
|
5648 | return joined.length > 0 ? prefix + joined : '';
|
5649 | };
|
5650 |
|
5651 |
|
5652 | }),
|
5653 |
|
5654 | "../node_modules/qs/lib/utils.js":
|
5655 |
|
5656 |
|
5657 |
|
5658 |
|
5659 | (function(module, exports, __webpack_require__) {
|
5660 |
|
5661 | "use strict";
|
5662 |
|
5663 |
|
5664 | var has = Object.prototype.hasOwnProperty;
|
5665 | var isArray = Array.isArray;
|
5666 |
|
5667 | var hexTable = (function () {
|
5668 | var array = [];
|
5669 | for (var i = 0; i < 256; ++i) {
|
5670 | array.push('%' + ((i < 16 ? '0' : '') + i.toString(16)).toUpperCase());
|
5671 | }
|
5672 |
|
5673 | return array;
|
5674 | }());
|
5675 |
|
5676 | var compactQueue = function compactQueue(queue) {
|
5677 | while (queue.length > 1) {
|
5678 | var item = queue.pop();
|
5679 | var obj = item.obj[item.prop];
|
5680 |
|
5681 | if (isArray(obj)) {
|
5682 | var compacted = [];
|
5683 |
|
5684 | for (var j = 0; j < obj.length; ++j) {
|
5685 | if (typeof obj[j] !== 'undefined') {
|
5686 | compacted.push(obj[j]);
|
5687 | }
|
5688 | }
|
5689 |
|
5690 | item.obj[item.prop] = compacted;
|
5691 | }
|
5692 | }
|
5693 | };
|
5694 |
|
5695 | var arrayToObject = function arrayToObject(source, options) {
|
5696 | var obj = options && options.plainObjects ? Object.create(null) : {};
|
5697 | for (var i = 0; i < source.length; ++i) {
|
5698 | if (typeof source[i] !== 'undefined') {
|
5699 | obj[i] = source[i];
|
5700 | }
|
5701 | }
|
5702 |
|
5703 | return obj;
|
5704 | };
|
5705 |
|
5706 | var merge = function merge(target, source, options) {
|
5707 |
|
5708 | if (!source) {
|
5709 | return target;
|
5710 | }
|
5711 |
|
5712 | if (typeof source !== 'object') {
|
5713 | if (isArray(target)) {
|
5714 | target.push(source);
|
5715 | } else if (target && typeof target === 'object') {
|
5716 | if ((options && (options.plainObjects || options.allowPrototypes)) || !has.call(Object.prototype, source)) {
|
5717 | target[source] = true;
|
5718 | }
|
5719 | } else {
|
5720 | return [target, source];
|
5721 | }
|
5722 |
|
5723 | return target;
|
5724 | }
|
5725 |
|
5726 | if (!target || typeof target !== 'object') {
|
5727 | return [target].concat(source);
|
5728 | }
|
5729 |
|
5730 | var mergeTarget = target;
|
5731 | if (isArray(target) && !isArray(source)) {
|
5732 | mergeTarget = arrayToObject(target, options);
|
5733 | }
|
5734 |
|
5735 | if (isArray(target) && isArray(source)) {
|
5736 | source.forEach(function (item, i) {
|
5737 | if (has.call(target, i)) {
|
5738 | var targetItem = target[i];
|
5739 | if (targetItem && typeof targetItem === 'object' && item && typeof item === 'object') {
|
5740 | target[i] = merge(targetItem, item, options);
|
5741 | } else {
|
5742 | target.push(item);
|
5743 | }
|
5744 | } else {
|
5745 | target[i] = item;
|
5746 | }
|
5747 | });
|
5748 | return target;
|
5749 | }
|
5750 |
|
5751 | return Object.keys(source).reduce(function (acc, key) {
|
5752 | var value = source[key];
|
5753 |
|
5754 | if (has.call(acc, key)) {
|
5755 | acc[key] = merge(acc[key], value, options);
|
5756 | } else {
|
5757 | acc[key] = value;
|
5758 | }
|
5759 | return acc;
|
5760 | }, mergeTarget);
|
5761 | };
|
5762 |
|
5763 | var assign = function assignSingleSource(target, source) {
|
5764 | return Object.keys(source).reduce(function (acc, key) {
|
5765 | acc[key] = source[key];
|
5766 | return acc;
|
5767 | }, target);
|
5768 | };
|
5769 |
|
5770 | var decode = function (str, decoder, charset) {
|
5771 | var strWithoutPlus = str.replace(/\+/g, ' ');
|
5772 | if (charset === 'iso-8859-1') {
|
5773 |
|
5774 | return strWithoutPlus.replace(/%[0-9a-f]{2}/gi, unescape);
|
5775 | }
|
5776 |
|
5777 | try {
|
5778 | return decodeURIComponent(strWithoutPlus);
|
5779 | } catch (e) {
|
5780 | return strWithoutPlus;
|
5781 | }
|
5782 | };
|
5783 |
|
5784 | var encode = function encode(str, defaultEncoder, charset) {
|
5785 |
|
5786 |
|
5787 | if (str.length === 0) {
|
5788 | return str;
|
5789 | }
|
5790 |
|
5791 | var string = str;
|
5792 | if (typeof str === 'symbol') {
|
5793 | string = Symbol.prototype.toString.call(str);
|
5794 | } else if (typeof str !== 'string') {
|
5795 | string = String(str);
|
5796 | }
|
5797 |
|
5798 | if (charset === 'iso-8859-1') {
|
5799 | return escape(string).replace(/%u[0-9a-f]{4}/gi, function ($0) {
|
5800 | return '%26%23' + parseInt($0.slice(2), 16) + '%3B';
|
5801 | });
|
5802 | }
|
5803 |
|
5804 | var out = '';
|
5805 | for (var i = 0; i < string.length; ++i) {
|
5806 | var c = string.charCodeAt(i);
|
5807 |
|
5808 | if (
|
5809 | c === 0x2D
|
5810 | || c === 0x2E
|
5811 | || c === 0x5F
|
5812 | || c === 0x7E
|
5813 | || (c >= 0x30 && c <= 0x39)
|
5814 | || (c >= 0x41 && c <= 0x5A)
|
5815 | || (c >= 0x61 && c <= 0x7A)
|
5816 | ) {
|
5817 | out += string.charAt(i);
|
5818 | continue;
|
5819 | }
|
5820 |
|
5821 | if (c < 0x80) {
|
5822 | out = out + hexTable[c];
|
5823 | continue;
|
5824 | }
|
5825 |
|
5826 | if (c < 0x800) {
|
5827 | out = out + (hexTable[0xC0 | (c >> 6)] + hexTable[0x80 | (c & 0x3F)]);
|
5828 | continue;
|
5829 | }
|
5830 |
|
5831 | if (c < 0xD800 || c >= 0xE000) {
|
5832 | out = out + (hexTable[0xE0 | (c >> 12)] + hexTable[0x80 | ((c >> 6) & 0x3F)] + hexTable[0x80 | (c & 0x3F)]);
|
5833 | continue;
|
5834 | }
|
5835 |
|
5836 | i += 1;
|
5837 | c = 0x10000 + (((c & 0x3FF) << 10) | (string.charCodeAt(i) & 0x3FF));
|
5838 | out += hexTable[0xF0 | (c >> 18)]
|
5839 | + hexTable[0x80 | ((c >> 12) & 0x3F)]
|
5840 | + hexTable[0x80 | ((c >> 6) & 0x3F)]
|
5841 | + hexTable[0x80 | (c & 0x3F)];
|
5842 | }
|
5843 |
|
5844 | return out;
|
5845 | };
|
5846 |
|
5847 | var compact = function compact(value) {
|
5848 | var queue = [{ obj: { o: value }, prop: 'o' }];
|
5849 | var refs = [];
|
5850 |
|
5851 | for (var i = 0; i < queue.length; ++i) {
|
5852 | var item = queue[i];
|
5853 | var obj = item.obj[item.prop];
|
5854 |
|
5855 | var keys = Object.keys(obj);
|
5856 | for (var j = 0; j < keys.length; ++j) {
|
5857 | var key = keys[j];
|
5858 | var val = obj[key];
|
5859 | if (typeof val === 'object' && val !== null && refs.indexOf(val) === -1) {
|
5860 | queue.push({ obj: obj, prop: key });
|
5861 | refs.push(val);
|
5862 | }
|
5863 | }
|
5864 | }
|
5865 |
|
5866 | compactQueue(queue);
|
5867 |
|
5868 | return value;
|
5869 | };
|
5870 |
|
5871 | var isRegExp = function isRegExp(obj) {
|
5872 | return Object.prototype.toString.call(obj) === '[object RegExp]';
|
5873 | };
|
5874 |
|
5875 | var isBuffer = function isBuffer(obj) {
|
5876 | if (!obj || typeof obj !== 'object') {
|
5877 | return false;
|
5878 | }
|
5879 |
|
5880 | return !!(obj.constructor && obj.constructor.isBuffer && obj.constructor.isBuffer(obj));
|
5881 | };
|
5882 |
|
5883 | var combine = function combine(a, b) {
|
5884 | return [].concat(a, b);
|
5885 | };
|
5886 |
|
5887 | var maybeMap = function maybeMap(val, fn) {
|
5888 | if (isArray(val)) {
|
5889 | var mapped = [];
|
5890 | for (var i = 0; i < val.length; i += 1) {
|
5891 | mapped.push(fn(val[i]));
|
5892 | }
|
5893 | return mapped;
|
5894 | }
|
5895 | return fn(val);
|
5896 | };
|
5897 |
|
5898 | module.exports = {
|
5899 | arrayToObject: arrayToObject,
|
5900 | assign: assign,
|
5901 | combine: combine,
|
5902 | compact: compact,
|
5903 | decode: decode,
|
5904 | encode: encode,
|
5905 | isBuffer: isBuffer,
|
5906 | isRegExp: isRegExp,
|
5907 | maybeMap: maybeMap,
|
5908 | merge: merge
|
5909 | };
|
5910 |
|
5911 |
|
5912 | }),
|
5913 |
|
5914 | "../node_modules/webpack/buildin/global.js":
|
5915 |
|
5916 |
|
5917 |
|
5918 |
|
5919 | (function(module, exports) {
|
5920 |
|
5921 | var g;
|
5922 |
|
5923 |
|
5924 | g = (function() {
|
5925 | return this;
|
5926 | })();
|
5927 |
|
5928 | try {
|
5929 |
|
5930 | g = g || new Function("return this")();
|
5931 | } catch (e) {
|
5932 |
|
5933 | if (typeof window === "object") g = window;
|
5934 | }
|
5935 |
|
5936 |
|
5937 |
|
5938 |
|
5939 |
|
5940 | module.exports = g;
|
5941 |
|
5942 |
|
5943 | }),
|
5944 |
|
5945 | "../node_modules/webpack/buildin/module.js":
|
5946 |
|
5947 |
|
5948 |
|
5949 |
|
5950 | (function(module, exports) {
|
5951 |
|
5952 | module.exports = function(module) {
|
5953 | if (!module.webpackPolyfill) {
|
5954 | module.deprecate = function() {};
|
5955 | module.paths = [];
|
5956 |
|
5957 | if (!module.children) module.children = [];
|
5958 | Object.defineProperty(module, "loaded", {
|
5959 | enumerable: true,
|
5960 | get: function() {
|
5961 | return module.l;
|
5962 | }
|
5963 | });
|
5964 | Object.defineProperty(module, "id", {
|
5965 | enumerable: true,
|
5966 | get: function() {
|
5967 | return module.i;
|
5968 | }
|
5969 | });
|
5970 | module.webpackPolyfill = 1;
|
5971 | }
|
5972 | return module;
|
5973 | };
|
5974 |
|
5975 |
|
5976 | }),
|
5977 |
|
5978 | "./common-utils.ts":
|
5979 |
|
5980 |
|
5981 |
|
5982 |
|
5983 | (function(module, __webpack_exports__, __webpack_require__) {
|
5984 |
|
5985 | "use strict";
|
5986 | __webpack_require__.r(__webpack_exports__);
|
5987 | __webpack_require__.d(__webpack_exports__, "wrapCollection", function() { return wrapCollection; });
|
5988 | var lodash_cloneDeep__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__( "../node_modules/lodash/cloneDeep.js");
|
5989 | var lodash_cloneDeep__WEBPACK_IMPORTED_MODULE_0___default = __webpack_require__.n(lodash_cloneDeep__WEBPACK_IMPORTED_MODULE_0__);
|
5990 | var contentful_sdk_core__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__( "../node_modules/contentful-sdk-core/dist/index.es-modules.js");
|
5991 |
|
5992 |
|
5993 |
|
5994 | var wrapCollection = function wrapCollection(fn) {
|
5995 | return function (http, data) {
|
5996 | var collectionData = Object(contentful_sdk_core__WEBPACK_IMPORTED_MODULE_1__["toPlainObject"])(lodash_cloneDeep__WEBPACK_IMPORTED_MODULE_0___default()(data));
|
5997 |
|
5998 | collectionData.items = collectionData.items.map(function (entity) {
|
5999 | return fn(http, entity);
|
6000 | });
|
6001 |
|
6002 | return collectionData;
|
6003 | };
|
6004 | };
|
6005 |
|
6006 | }),
|
6007 |
|
6008 | "./contentful-management.ts":
|
6009 |
|
6010 |
|
6011 |
|
6012 |
|
6013 | (function(module, __webpack_exports__, __webpack_require__) {
|
6014 |
|
6015 | "use strict";
|
6016 | __webpack_require__.r(__webpack_exports__);
|
6017 | __webpack_require__.d(__webpack_exports__, "createClient", function() { return createClient; });
|
6018 | var _create_contentful_api__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__( "./create-contentful-api.ts");
|
6019 | var _create_cma_http_client__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__( "./create-cma-http-client.ts");
|
6020 |
|
6021 |
|
6022 |
|
6023 |
|
6024 |
|
6025 |
|
6026 |
|
6027 |
|
6028 |
|
6029 |
|
6030 |
|
6031 |
|
6032 |
|
6033 |
|
6034 |
|
6035 |
|
6036 |
|
6037 |
|
6038 | function createClient(params) {
|
6039 | var http = Object(_create_cma_http_client__WEBPACK_IMPORTED_MODULE_1__["createCMAHttpClient"])(params);
|
6040 | var api = Object(_create_contentful_api__WEBPACK_IMPORTED_MODULE_0__["default"])({
|
6041 | http: http
|
6042 | });
|
6043 | return api;
|
6044 | }
|
6045 |
|
6046 | }),
|
6047 |
|
6048 | "./create-cma-http-client.ts":
|
6049 |
|
6050 |
|
6051 |
|
6052 |
|
6053 | (function(module, __webpack_exports__, __webpack_require__) {
|
6054 |
|
6055 | "use strict";
|
6056 | __webpack_require__.r(__webpack_exports__);
|
6057 | __webpack_require__.d(__webpack_exports__, "createCMAHttpClient", function() { return createCMAHttpClient; });
|
6058 | var axios__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__( "../node_modules/axios/index.js");
|
6059 | var axios__WEBPACK_IMPORTED_MODULE_0___default = __webpack_require__.n(axios__WEBPACK_IMPORTED_MODULE_0__);
|
6060 | var contentful_sdk_core__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__( "../node_modules/contentful-sdk-core/dist/index.es-modules.js");
|
6061 | var lodash_cloneDeep__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__( "../node_modules/lodash/cloneDeep.js");
|
6062 | var lodash_cloneDeep__WEBPACK_IMPORTED_MODULE_2___default = __webpack_require__.n(lodash_cloneDeep__WEBPACK_IMPORTED_MODULE_2__);
|
6063 | function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; }
|
6064 |
|
6065 | function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }
|
6066 |
|
6067 | function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
6068 |
|
6069 |
|
6070 |
|
6071 |
|
6072 |
|
6073 |
|
6074 |
|
6075 |
|
6076 |
|
6077 |
|
6078 |
|
6079 |
|
6080 | function createCMAHttpClient(params) {
|
6081 | var defaultParameters = {
|
6082 | defaultHostname: 'api.contentful.com',
|
6083 | defaultHostnameUpload: 'upload.contentful.com'
|
6084 | };
|
6085 | var userAgentHeader = Object(contentful_sdk_core__WEBPACK_IMPORTED_MODULE_1__["getUserAgentHeader"])(
|
6086 | "contentful-management.js/".concat("5.27.1"), params.application, params.integration, params.feature);
|
6087 | var requiredHeaders = {
|
6088 | 'Content-Type': 'application/vnd.contentful.management.v1+json',
|
6089 | 'X-Contentful-User-Agent': userAgentHeader
|
6090 | };
|
6091 | params = _objectSpread(_objectSpread({}, defaultParameters), lodash_cloneDeep__WEBPACK_IMPORTED_MODULE_2___default()(params));
|
6092 |
|
6093 | if (!params.accessToken) {
|
6094 | throw new TypeError('Expected parameter accessToken');
|
6095 | }
|
6096 |
|
6097 | params.headers = _objectSpread(_objectSpread({}, params.headers), requiredHeaders);
|
6098 | return Object(contentful_sdk_core__WEBPACK_IMPORTED_MODULE_1__["createHttpClient"])(axios__WEBPACK_IMPORTED_MODULE_0___default.a, params);
|
6099 | }
|
6100 |
|
6101 | }),
|
6102 |
|
6103 | "./create-contentful-api.ts":
|
6104 |
|
6105 |
|
6106 |
|
6107 |
|
6108 | (function(module, __webpack_exports__, __webpack_require__) {
|
6109 |
|
6110 | "use strict";
|
6111 | __webpack_require__.r(__webpack_exports__);
|
6112 | __webpack_require__.d(__webpack_exports__, "default", function() { return createClientApi; });
|
6113 | var contentful_sdk_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__( "../node_modules/contentful-sdk-core/dist/index.es-modules.js");
|
6114 | var _error_handler__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__( "./error-handler.ts");
|
6115 | var _entities__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__( "./entities/index.ts");
|
6116 |
|
6117 |
|
6118 |
|
6119 | function createClientApi(_ref) {
|
6120 | var http = _ref.http;
|
6121 | var _entities$space = _entities__WEBPACK_IMPORTED_MODULE_2__["default"].space,
|
6122 | wrapSpace = _entities$space.wrapSpace,
|
6123 | wrapSpaceCollection = _entities$space.wrapSpaceCollection;
|
6124 | var wrapUser = _entities__WEBPACK_IMPORTED_MODULE_2__["default"].user.wrapUser;
|
6125 | var _entities$personalAcc = _entities__WEBPACK_IMPORTED_MODULE_2__["default"].personalAccessToken,
|
6126 | wrapPersonalAccessToken = _entities$personalAcc.wrapPersonalAccessToken,
|
6127 | wrapPersonalAccessTokenCollection = _entities$personalAcc.wrapPersonalAccessTokenCollection;
|
6128 | var _entities$organizatio = _entities__WEBPACK_IMPORTED_MODULE_2__["default"].organization,
|
6129 | wrapOrganization = _entities$organizatio.wrapOrganization,
|
6130 | wrapOrganizationCollection = _entities$organizatio.wrapOrganizationCollection;
|
6131 | var wrapUsageCollection = _entities__WEBPACK_IMPORTED_MODULE_2__["default"].usage.wrapUsageCollection;
|
6132 | return {
|
6133 | |
6134 |
|
6135 |
|
6136 |
|
6137 |
|
6138 |
|
6139 |
|
6140 |
|
6141 |
|
6142 |
|
6143 |
|
6144 |
|
6145 |
|
6146 |
|
6147 |
|
6148 | getSpaces: function getSpaces() {
|
6149 | var query = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
6150 | return http.get('', Object(contentful_sdk_core__WEBPACK_IMPORTED_MODULE_0__["createRequestConfig"])({
|
6151 | query: query
|
6152 | })).then(function (response) {
|
6153 | return wrapSpaceCollection(http, response.data);
|
6154 | }, _error_handler__WEBPACK_IMPORTED_MODULE_1__["default"]);
|
6155 | },
|
6156 |
|
6157 | |
6158 |
|
6159 |
|
6160 |
|
6161 |
|
6162 |
|
6163 |
|
6164 |
|
6165 |
|
6166 |
|
6167 |
|
6168 |
|
6169 |
|
6170 |
|
6171 |
|
6172 |
|
6173 | getSpace: function getSpace(id) {
|
6174 | return http.get(id).then(function (response) {
|
6175 | return wrapSpace(http, response.data);
|
6176 | }, _error_handler__WEBPACK_IMPORTED_MODULE_1__["default"]);
|
6177 | },
|
6178 |
|
6179 | |
6180 |
|
6181 |
|
6182 |
|
6183 |
|
6184 |
|
6185 |
|
6186 |
|
6187 |
|
6188 |
|
6189 |
|
6190 |
|
6191 |
|
6192 |
|
6193 |
|
6194 |
|
6195 |
|
6196 |
|
6197 |
|
6198 | createSpace: function createSpace(data, organizationId) {
|
6199 | return http.post('', data, {
|
6200 | headers: organizationId ? {
|
6201 | 'X-Contentful-Organization': organizationId
|
6202 | } : {}
|
6203 | }).then(function (response) {
|
6204 | return wrapSpace(http, response.data);
|
6205 | }, _error_handler__WEBPACK_IMPORTED_MODULE_1__["default"]);
|
6206 | },
|
6207 |
|
6208 | |
6209 |
|
6210 |
|
6211 |
|
6212 |
|
6213 |
|
6214 |
|
6215 |
|
6216 |
|
6217 |
|
6218 |
|
6219 |
|
6220 |
|
6221 |
|
6222 |
|
6223 |
|
6224 | getOrganization: function getOrganization(id) {
|
6225 | var _http$defaults, _http$defaults$baseUR;
|
6226 |
|
6227 | var baseURL = (_http$defaults = http.defaults) === null || _http$defaults === void 0 ? void 0 : (_http$defaults$baseUR = _http$defaults.baseURL) === null || _http$defaults$baseUR === void 0 ? void 0 : _http$defaults$baseUR.replace('/spaces/', '/organizations/');
|
6228 | return http.get('', {
|
6229 | baseURL: baseURL
|
6230 | }).then(function (response) {
|
6231 | var org = response.data.items.find(function (org) {
|
6232 | return org.sys.id === id;
|
6233 | });
|
6234 |
|
6235 | if (!org) {
|
6236 | var error = new Error("No organization was found with the ID ".concat(id, " instead got ").concat(JSON.stringify(response)));
|
6237 |
|
6238 |
|
6239 | error.status = 404;
|
6240 |
|
6241 |
|
6242 | error.statusText = 'Not Found';
|
6243 | return Promise.reject(error);
|
6244 | }
|
6245 |
|
6246 | return wrapOrganization(http, org);
|
6247 | }, _error_handler__WEBPACK_IMPORTED_MODULE_1__["default"]);
|
6248 | },
|
6249 |
|
6250 | |
6251 |
|
6252 |
|
6253 |
|
6254 |
|
6255 |
|
6256 |
|
6257 |
|
6258 |
|
6259 |
|
6260 |
|
6261 |
|
6262 |
|
6263 |
|
6264 |
|
6265 | getOrganizations: function getOrganizations() {
|
6266 | var _http$defaults2, _http$defaults2$baseU;
|
6267 |
|
6268 | var baseURL = (_http$defaults2 = http.defaults) === null || _http$defaults2 === void 0 ? void 0 : (_http$defaults2$baseU = _http$defaults2.baseURL) === null || _http$defaults2$baseU === void 0 ? void 0 : _http$defaults2$baseU.replace('/spaces/', '/organizations/');
|
6269 | return http.get('', {
|
6270 | baseURL: baseURL
|
6271 | }).then(function (response) {
|
6272 | return wrapOrganizationCollection(http, response.data);
|
6273 | }, _error_handler__WEBPACK_IMPORTED_MODULE_1__["default"]);
|
6274 | },
|
6275 |
|
6276 | |
6277 |
|
6278 |
|
6279 |
|
6280 |
|
6281 |
|
6282 |
|
6283 |
|
6284 |
|
6285 |
|
6286 |
|
6287 |
|
6288 |
|
6289 |
|
6290 |
|
6291 | getCurrentUser: function getCurrentUser() {
|
6292 | var _http$defaults3, _http$defaults3$baseU;
|
6293 |
|
6294 | var baseURL = (_http$defaults3 = http.defaults) === null || _http$defaults3 === void 0 ? void 0 : (_http$defaults3$baseU = _http$defaults3.baseURL) === null || _http$defaults3$baseU === void 0 ? void 0 : _http$defaults3$baseU.replace('/spaces/', '/users/me/');
|
6295 | return http.get('', {
|
6296 | baseURL: baseURL
|
6297 | }).then(function (response) {
|
6298 | return wrapUser(http, response.data);
|
6299 | }, _error_handler__WEBPACK_IMPORTED_MODULE_1__["default"]);
|
6300 | },
|
6301 |
|
6302 | |
6303 |
|
6304 |
|
6305 |
|
6306 |
|
6307 |
|
6308 |
|
6309 |
|
6310 |
|
6311 |
|
6312 |
|
6313 |
|
6314 |
|
6315 |
|
6316 |
|
6317 |
|
6318 |
|
6319 |
|
6320 |
|
6321 |
|
6322 |
|
6323 |
|
6324 |
|
6325 | createPersonalAccessToken: function createPersonalAccessToken(data) {
|
6326 | var _http$defaults4, _http$defaults4$baseU;
|
6327 |
|
6328 | var baseURL = (_http$defaults4 = http.defaults) === null || _http$defaults4 === void 0 ? void 0 : (_http$defaults4$baseU = _http$defaults4.baseURL) === null || _http$defaults4$baseU === void 0 ? void 0 : _http$defaults4$baseU.replace('/spaces/', '/users/me/access_tokens');
|
6329 | return http.post('', data, {
|
6330 | baseURL: baseURL
|
6331 | }).then(function (response) {
|
6332 | return wrapPersonalAccessToken(http, response.data);
|
6333 | }, _error_handler__WEBPACK_IMPORTED_MODULE_1__["default"]);
|
6334 | },
|
6335 |
|
6336 | |
6337 |
|
6338 |
|
6339 |
|
6340 |
|
6341 |
|
6342 |
|
6343 |
|
6344 |
|
6345 |
|
6346 |
|
6347 |
|
6348 |
|
6349 |
|
6350 |
|
6351 |
|
6352 | getPersonalAccessToken: function getPersonalAccessToken(tokenId) {
|
6353 | var _http$defaults5, _http$defaults5$baseU;
|
6354 |
|
6355 | var baseURL = (_http$defaults5 = http.defaults) === null || _http$defaults5 === void 0 ? void 0 : (_http$defaults5$baseU = _http$defaults5.baseURL) === null || _http$defaults5$baseU === void 0 ? void 0 : _http$defaults5$baseU.replace('/spaces/', '/users/me/access_tokens');
|
6356 | return http.get(tokenId, {
|
6357 | baseURL: baseURL
|
6358 | }).then(function (response) {
|
6359 | return wrapPersonalAccessToken(http, response.data);
|
6360 | }, _error_handler__WEBPACK_IMPORTED_MODULE_1__["default"]);
|
6361 | },
|
6362 |
|
6363 | |
6364 |
|
6365 |
|
6366 |
|
6367 |
|
6368 |
|
6369 |
|
6370 |
|
6371 |
|
6372 |
|
6373 |
|
6374 |
|
6375 |
|
6376 |
|
6377 |
|
6378 | getPersonalAccessTokens: function getPersonalAccessTokens() {
|
6379 | var _http$defaults6, _http$defaults6$baseU;
|
6380 |
|
6381 | var baseURL = (_http$defaults6 = http.defaults) === null || _http$defaults6 === void 0 ? void 0 : (_http$defaults6$baseU = _http$defaults6.baseURL) === null || _http$defaults6$baseU === void 0 ? void 0 : _http$defaults6$baseU.replace('/spaces/', '/users/me/access_tokens');
|
6382 | return http.get('', {
|
6383 | baseURL: baseURL
|
6384 | }).then(function (response) {
|
6385 | return wrapPersonalAccessTokenCollection(http, response.data);
|
6386 | }, _error_handler__WEBPACK_IMPORTED_MODULE_1__["default"]);
|
6387 | },
|
6388 |
|
6389 | |
6390 |
|
6391 |
|
6392 |
|
6393 |
|
6394 |
|
6395 |
|
6396 |
|
6397 |
|
6398 |
|
6399 |
|
6400 |
|
6401 |
|
6402 |
|
6403 |
|
6404 |
|
6405 |
|
6406 |
|
6407 |
|
6408 |
|
6409 |
|
6410 |
|
6411 |
|
6412 |
|
6413 | getOrganizationUsage: function getOrganizationUsage(organizationId) {
|
6414 | var _http$defaults7, _http$defaults7$baseU;
|
6415 |
|
6416 | var query = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
|
6417 | var baseURL = (_http$defaults7 = http.defaults) === null || _http$defaults7 === void 0 ? void 0 : (_http$defaults7$baseU = _http$defaults7.baseURL) === null || _http$defaults7$baseU === void 0 ? void 0 : _http$defaults7$baseU.replace('/spaces/', "/organizations/".concat(organizationId, "/organization_periodic_usages"));
|
6418 | return http.get('', {
|
6419 | baseURL: baseURL,
|
6420 | params: query
|
6421 | }).then(function (response) {
|
6422 | return wrapUsageCollection(http, response.data);
|
6423 | }, _error_handler__WEBPACK_IMPORTED_MODULE_1__["default"]);
|
6424 | },
|
6425 |
|
6426 | |
6427 |
|
6428 |
|
6429 |
|
6430 |
|
6431 |
|
6432 |
|
6433 |
|
6434 |
|
6435 |
|
6436 |
|
6437 |
|
6438 |
|
6439 |
|
6440 |
|
6441 |
|
6442 |
|
6443 |
|
6444 |
|
6445 |
|
6446 |
|
6447 |
|
6448 |
|
6449 |
|
6450 |
|
6451 | getSpaceUsage: function getSpaceUsage(organizationId) {
|
6452 | var _http$defaults8, _http$defaults8$baseU;
|
6453 |
|
6454 | var query = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
|
6455 | var baseURL = (_http$defaults8 = http.defaults) === null || _http$defaults8 === void 0 ? void 0 : (_http$defaults8$baseU = _http$defaults8.baseURL) === null || _http$defaults8$baseU === void 0 ? void 0 : _http$defaults8$baseU.replace('/spaces/', "/organizations/".concat(organizationId, "/space_periodic_usages"));
|
6456 | return http.get('', {
|
6457 | baseURL: baseURL,
|
6458 | params: query
|
6459 | }).then(function (response) {
|
6460 | return wrapUsageCollection(http, response.data);
|
6461 | }, _error_handler__WEBPACK_IMPORTED_MODULE_1__["default"]);
|
6462 | },
|
6463 |
|
6464 | |
6465 |
|
6466 |
|
6467 |
|
6468 |
|
6469 |
|
6470 |
|
6471 |
|
6472 |
|
6473 |
|
6474 |
|
6475 |
|
6476 |
|
6477 |
|
6478 |
|
6479 |
|
6480 |
|
6481 |
|
6482 |
|
6483 | rawRequest: function rawRequest(opts) {
|
6484 | return http(opts).then(function (response) {
|
6485 | return response.data;
|
6486 | }, _error_handler__WEBPACK_IMPORTED_MODULE_1__["default"]);
|
6487 | }
|
6488 | };
|
6489 | }
|
6490 |
|
6491 | }),
|
6492 |
|
6493 | "./create-environment-api.ts":
|
6494 |
|
6495 |
|
6496 |
|
6497 |
|
6498 | (function(module, __webpack_exports__, __webpack_require__) {
|
6499 |
|
6500 | "use strict";
|
6501 | __webpack_require__.r(__webpack_exports__);
|
6502 | __webpack_require__.d(__webpack_exports__, "default", function() { return createEnvironmentApi; });
|
6503 | var lodash_cloneDeep__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__( "../node_modules/lodash/cloneDeep.js");
|
6504 | var lodash_cloneDeep__WEBPACK_IMPORTED_MODULE_0___default = __webpack_require__.n(lodash_cloneDeep__WEBPACK_IMPORTED_MODULE_0__);
|
6505 | var contentful_sdk_core__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__( "../node_modules/contentful-sdk-core/dist/index.es-modules.js");
|
6506 | var _error_handler__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__( "./error-handler.ts");
|
6507 | var _entities__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__( "./entities/index.ts");
|
6508 | function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; }
|
6509 |
|
6510 | function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }
|
6511 |
|
6512 | function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
6513 |
|
6514 |
|
6515 |
|
6516 |
|
6517 |
|
6518 |
|
6519 |
|
6520 |
|
6521 |
|
6522 | function createEnvironmentApi(_ref) {
|
6523 | var http = _ref.http,
|
6524 | httpUpload = _ref.httpUpload;
|
6525 | var wrapEnvironment = _entities__WEBPACK_IMPORTED_MODULE_3__["default"].environment.wrapEnvironment;
|
6526 | var _entities$contentType = _entities__WEBPACK_IMPORTED_MODULE_3__["default"].contentType,
|
6527 | wrapContentType = _entities$contentType.wrapContentType,
|
6528 | wrapContentTypeCollection = _entities$contentType.wrapContentTypeCollection;
|
6529 | var _entities$entry = _entities__WEBPACK_IMPORTED_MODULE_3__["default"].entry,
|
6530 | wrapEntry = _entities$entry.wrapEntry,
|
6531 | wrapEntryCollection = _entities$entry.wrapEntryCollection;
|
6532 | var _entities$asset = _entities__WEBPACK_IMPORTED_MODULE_3__["default"].asset,
|
6533 | wrapAsset = _entities$asset.wrapAsset,
|
6534 | wrapAssetCollection = _entities$asset.wrapAssetCollection;
|
6535 | var _entities$locale = _entities__WEBPACK_IMPORTED_MODULE_3__["default"].locale,
|
6536 | wrapLocale = _entities$locale.wrapLocale,
|
6537 | wrapLocaleCollection = _entities$locale.wrapLocaleCollection;
|
6538 | var wrapSnapshotCollection = _entities__WEBPACK_IMPORTED_MODULE_3__["default"].snapshot.wrapSnapshotCollection;
|
6539 | var wrapEditorInterface = _entities__WEBPACK_IMPORTED_MODULE_3__["default"].editorInterface.wrapEditorInterface;
|
6540 | var wrapUpload = _entities__WEBPACK_IMPORTED_MODULE_3__["default"].upload.wrapUpload;
|
6541 | var _entities$uiExtension = _entities__WEBPACK_IMPORTED_MODULE_3__["default"].uiExtension,
|
6542 | wrapUiExtension = _entities$uiExtension.wrapUiExtension,
|
6543 | wrapUiExtensionCollection = _entities$uiExtension.wrapUiExtensionCollection;
|
6544 | var _entities$appInstalla = _entities__WEBPACK_IMPORTED_MODULE_3__["default"].appInstallation,
|
6545 | wrapAppInstallation = _entities$appInstalla.wrapAppInstallation,
|
6546 | wrapAppInstallationCollection = _entities$appInstalla.wrapAppInstallationCollection;
|
6547 |
|
6548 | function createAsset(data) {
|
6549 | return http.post('assets', data).then(function (response) {
|
6550 | return wrapAsset(http, response.data);
|
6551 | }, _error_handler__WEBPACK_IMPORTED_MODULE_2__["default"]);
|
6552 | }
|
6553 |
|
6554 | function createUpload(data) {
|
6555 | var file = data.file;
|
6556 |
|
6557 | if (!file) {
|
6558 | return Promise.reject(new Error('Unable to locate a file to upload.'));
|
6559 | }
|
6560 |
|
6561 | return httpUpload.post('uploads', file, {
|
6562 | headers: {
|
6563 | 'Content-Type': 'application/octet-stream'
|
6564 | }
|
6565 | }).then(function (uploadResponse) {
|
6566 | return wrapUpload(httpUpload, uploadResponse.data);
|
6567 | }).catch(_error_handler__WEBPACK_IMPORTED_MODULE_2__["default"]);
|
6568 | }
|
6569 | |
6570 |
|
6571 |
|
6572 |
|
6573 |
|
6574 |
|
6575 |
|
6576 | function normalizeSelect(query) {
|
6577 | if (query.select && !/sys/i.test(query.select)) {
|
6578 | query.select += ',sys';
|
6579 | }
|
6580 | }
|
6581 |
|
6582 | return {
|
6583 | |
6584 |
|
6585 |
|
6586 |
|
6587 |
|
6588 |
|
6589 |
|
6590 |
|
6591 |
|
6592 |
|
6593 |
|
6594 |
|
6595 |
|
6596 |
|
6597 |
|
6598 |
|
6599 |
|
6600 | delete: function deleteEnvironment() {
|
6601 | return http.delete('').then(function () {
|
6602 | }, _error_handler__WEBPACK_IMPORTED_MODULE_2__["default"]);
|
6603 | },
|
6604 |
|
6605 | |
6606 |
|
6607 |
|
6608 |
|
6609 |
|
6610 |
|
6611 |
|
6612 |
|
6613 |
|
6614 |
|
6615 |
|
6616 |
|
6617 |
|
6618 |
|
6619 |
|
6620 |
|
6621 |
|
6622 |
|
6623 |
|
6624 |
|
6625 | update: function updateEnvironment() {
|
6626 | var raw = this.toPlainObject();
|
6627 | var data = lodash_cloneDeep__WEBPACK_IMPORTED_MODULE_0___default()(raw);
|
6628 | delete data.sys;
|
6629 | return http.put('', data, {
|
6630 | headers: {
|
6631 | 'X-Contentful-Version': raw.sys.version
|
6632 | }
|
6633 | }).then(function (response) {
|
6634 | return wrapEnvironment(http, response.data);
|
6635 | }, _error_handler__WEBPACK_IMPORTED_MODULE_2__["default"]);
|
6636 | },
|
6637 |
|
6638 | |
6639 |
|
6640 |
|
6641 |
|
6642 |
|
6643 |
|
6644 |
|
6645 |
|
6646 |
|
6647 |
|
6648 |
|
6649 |
|
6650 |
|
6651 |
|
6652 |
|
6653 |
|
6654 |
|
6655 |
|
6656 |
|
6657 |
|
6658 |
|
6659 |
|
6660 |
|
6661 |
|
6662 |
|
6663 |
|
6664 |
|
6665 |
|
6666 |
|
6667 |
|
6668 | getEntryFromData: function getEntryFromData(entryData) {
|
6669 | return wrapEntry(http, entryData);
|
6670 | },
|
6671 |
|
6672 | |
6673 |
|
6674 |
|
6675 |
|
6676 |
|
6677 |
|
6678 |
|
6679 |
|
6680 |
|
6681 |
|
6682 |
|
6683 |
|
6684 |
|
6685 |
|
6686 |
|
6687 |
|
6688 |
|
6689 |
|
6690 |
|
6691 |
|
6692 |
|
6693 |
|
6694 |
|
6695 |
|
6696 |
|
6697 |
|
6698 |
|
6699 |
|
6700 |
|
6701 |
|
6702 | getAssetFromData: function getAssetFromData(assetData) {
|
6703 | return wrapAsset(http, assetData);
|
6704 | },
|
6705 |
|
6706 | |
6707 |
|
6708 |
|
6709 |
|
6710 |
|
6711 |
|
6712 |
|
6713 |
|
6714 |
|
6715 |
|
6716 |
|
6717 |
|
6718 |
|
6719 |
|
6720 |
|
6721 |
|
6722 |
|
6723 |
|
6724 | getContentType: function getContentType(id) {
|
6725 | return http.get('content_types/' + id).then(function (response) {
|
6726 | return wrapContentType(http, response.data);
|
6727 | }, _error_handler__WEBPACK_IMPORTED_MODULE_2__["default"]);
|
6728 | },
|
6729 |
|
6730 | |
6731 |
|
6732 |
|
6733 |
|
6734 |
|
6735 |
|
6736 |
|
6737 |
|
6738 |
|
6739 |
|
6740 |
|
6741 |
|
6742 |
|
6743 |
|
6744 |
|
6745 |
|
6746 |
|
6747 |
|
6748 | getContentTypes: function getContentTypes() {
|
6749 | var query = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
6750 | return http.get('content_types', Object(contentful_sdk_core__WEBPACK_IMPORTED_MODULE_1__["createRequestConfig"])({
|
6751 | query: query
|
6752 | })).then(function (response) {
|
6753 | return wrapContentTypeCollection(http, response.data);
|
6754 | }, _error_handler__WEBPACK_IMPORTED_MODULE_2__["default"]);
|
6755 | },
|
6756 |
|
6757 | |
6758 |
|
6759 |
|
6760 |
|
6761 |
|
6762 |
|
6763 |
|
6764 |
|
6765 |
|
6766 |
|
6767 |
|
6768 |
|
6769 |
|
6770 |
|
6771 |
|
6772 |
|
6773 |
|
6774 |
|
6775 |
|
6776 |
|
6777 |
|
6778 |
|
6779 |
|
6780 |
|
6781 |
|
6782 |
|
6783 |
|
6784 |
|
6785 |
|
6786 | createContentType: function createContentType(data) {
|
6787 | return http.post('content_types', data).then(function (response) {
|
6788 | return wrapContentType(http, response.data);
|
6789 | }, _error_handler__WEBPACK_IMPORTED_MODULE_2__["default"]);
|
6790 | },
|
6791 |
|
6792 | |
6793 |
|
6794 |
|
6795 |
|
6796 |
|
6797 |
|
6798 |
|
6799 |
|
6800 |
|
6801 |
|
6802 |
|
6803 |
|
6804 |
|
6805 |
|
6806 |
|
6807 |
|
6808 |
|
6809 |
|
6810 |
|
6811 |
|
6812 |
|
6813 |
|
6814 |
|
6815 |
|
6816 |
|
6817 |
|
6818 |
|
6819 |
|
6820 |
|
6821 |
|
6822 | createContentTypeWithId: function createContentTypeWithId(id, data) {
|
6823 | return http.put('content_types/' + id, data).then(function (response) {
|
6824 | return wrapContentType(http, response.data);
|
6825 | }, _error_handler__WEBPACK_IMPORTED_MODULE_2__["default"]);
|
6826 | },
|
6827 |
|
6828 | |
6829 |
|
6830 |
|
6831 |
|
6832 |
|
6833 |
|
6834 |
|
6835 |
|
6836 |
|
6837 |
|
6838 |
|
6839 |
|
6840 |
|
6841 |
|
6842 |
|
6843 |
|
6844 |
|
6845 |
|
6846 | getEditorInterfaceForContentType: function getEditorInterfaceForContentType(contentTypeId) {
|
6847 | return http.get('content_types/' + contentTypeId + '/editor_interface').then(function (response) {
|
6848 | return wrapEditorInterface(http, response.data);
|
6849 | }, _error_handler__WEBPACK_IMPORTED_MODULE_2__["default"]);
|
6850 | },
|
6851 |
|
6852 | |
6853 |
|
6854 |
|
6855 |
|
6856 |
|
6857 |
|
6858 |
|
6859 |
|
6860 |
|
6861 |
|
6862 |
|
6863 |
|
6864 |
|
6865 |
|
6866 |
|
6867 |
|
6868 |
|
6869 |
|
6870 |
|
6871 |
|
6872 |
|
6873 | getEntry: function getEntry(id) {
|
6874 | var query = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
|
6875 | normalizeSelect(query);
|
6876 | return http.get('entries/' + id, Object(contentful_sdk_core__WEBPACK_IMPORTED_MODULE_1__["createRequestConfig"])({
|
6877 | query: query
|
6878 | })).then(function (response) {
|
6879 | return wrapEntry(http, response.data);
|
6880 | }, _error_handler__WEBPACK_IMPORTED_MODULE_2__["default"]);
|
6881 | },
|
6882 |
|
6883 | |
6884 |
|
6885 |
|
6886 |
|
6887 |
|
6888 |
|
6889 |
|
6890 |
|
6891 |
|
6892 |
|
6893 |
|
6894 |
|
6895 |
|
6896 |
|
6897 |
|
6898 |
|
6899 |
|
6900 |
|
6901 |
|
6902 |
|
6903 | getEntries: function getEntries() {
|
6904 | var query = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
6905 | normalizeSelect(query);
|
6906 | return http.get('entries', Object(contentful_sdk_core__WEBPACK_IMPORTED_MODULE_1__["createRequestConfig"])({
|
6907 | query: query
|
6908 | })).then(function (response) {
|
6909 | return wrapEntryCollection(http, response.data);
|
6910 | }, _error_handler__WEBPACK_IMPORTED_MODULE_2__["default"]);
|
6911 | },
|
6912 |
|
6913 | |
6914 |
|
6915 |
|
6916 |
|
6917 |
|
6918 |
|
6919 |
|
6920 |
|
6921 |
|
6922 |
|
6923 |
|
6924 |
|
6925 |
|
6926 |
|
6927 |
|
6928 |
|
6929 |
|
6930 |
|
6931 |
|
6932 |
|
6933 |
|
6934 |
|
6935 |
|
6936 |
|
6937 |
|
6938 | createEntry: function createEntry(contentTypeId, data) {
|
6939 | return http.post('entries', data, {
|
6940 | headers: {
|
6941 | 'X-Contentful-Content-Type': contentTypeId
|
6942 | }
|
6943 | }).then(function (response) {
|
6944 | return wrapEntry(http, response.data);
|
6945 | }, _error_handler__WEBPACK_IMPORTED_MODULE_2__["default"]);
|
6946 | },
|
6947 |
|
6948 | |
6949 |
|
6950 |
|
6951 |
|
6952 |
|
6953 |
|
6954 |
|
6955 |
|
6956 |
|
6957 |
|
6958 |
|
6959 |
|
6960 |
|
6961 |
|
6962 |
|
6963 |
|
6964 |
|
6965 |
|
6966 |
|
6967 |
|
6968 |
|
6969 |
|
6970 |
|
6971 |
|
6972 |
|
6973 |
|
6974 |
|
6975 | createEntryWithId: function createEntryWithId(contentTypeId, id, data) {
|
6976 | return http.put('entries/' + id, data, {
|
6977 | headers: {
|
6978 | 'X-Contentful-Content-Type': contentTypeId
|
6979 | }
|
6980 | }).then(function (response) {
|
6981 | return wrapEntry(http, response.data);
|
6982 | }, _error_handler__WEBPACK_IMPORTED_MODULE_2__["default"]);
|
6983 | },
|
6984 |
|
6985 | |
6986 |
|
6987 |
|
6988 |
|
6989 |
|
6990 |
|
6991 |
|
6992 |
|
6993 |
|
6994 |
|
6995 |
|
6996 |
|
6997 |
|
6998 |
|
6999 |
|
7000 |
|
7001 |
|
7002 |
|
7003 |
|
7004 |
|
7005 |
|
7006 | getAsset: function getAsset(id) {
|
7007 | var query = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
|
7008 | normalizeSelect(query);
|
7009 | return http.get('assets/' + id, Object(contentful_sdk_core__WEBPACK_IMPORTED_MODULE_1__["createRequestConfig"])({
|
7010 | query: query
|
7011 | })).then(function (response) {
|
7012 | return wrapAsset(http, response.data);
|
7013 | }, _error_handler__WEBPACK_IMPORTED_MODULE_2__["default"]);
|
7014 | },
|
7015 |
|
7016 | |
7017 |
|
7018 |
|
7019 |
|
7020 |
|
7021 |
|
7022 |
|
7023 |
|
7024 |
|
7025 |
|
7026 |
|
7027 |
|
7028 |
|
7029 |
|
7030 |
|
7031 |
|
7032 |
|
7033 |
|
7034 |
|
7035 |
|
7036 | getAssets: function getAssets() {
|
7037 | var query = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
7038 | normalizeSelect(query);
|
7039 | return http.get('assets', Object(contentful_sdk_core__WEBPACK_IMPORTED_MODULE_1__["createRequestConfig"])({
|
7040 | query: query
|
7041 | })).then(function (response) {
|
7042 | return wrapAssetCollection(http, response.data);
|
7043 | }, _error_handler__WEBPACK_IMPORTED_MODULE_2__["default"]);
|
7044 | },
|
7045 |
|
7046 | |
7047 |
|
7048 |
|
7049 |
|
7050 |
|
7051 |
|
7052 |
|
7053 |
|
7054 |
|
7055 |
|
7056 |
|
7057 |
|
7058 |
|
7059 |
|
7060 |
|
7061 |
|
7062 |
|
7063 |
|
7064 |
|
7065 |
|
7066 |
|
7067 |
|
7068 |
|
7069 |
|
7070 |
|
7071 |
|
7072 |
|
7073 |
|
7074 |
|
7075 |
|
7076 |
|
7077 | createAsset: createAsset,
|
7078 |
|
7079 | |
7080 |
|
7081 |
|
7082 |
|
7083 |
|
7084 |
|
7085 |
|
7086 |
|
7087 |
|
7088 |
|
7089 |
|
7090 |
|
7091 |
|
7092 |
|
7093 |
|
7094 |
|
7095 |
|
7096 |
|
7097 |
|
7098 |
|
7099 |
|
7100 |
|
7101 |
|
7102 |
|
7103 |
|
7104 |
|
7105 |
|
7106 |
|
7107 |
|
7108 |
|
7109 | createAssetWithId: function createAssetWithId(id, data) {
|
7110 | return http.put('assets/' + id, data).then(function (response) {
|
7111 | return wrapAsset(http, response.data);
|
7112 | }, _error_handler__WEBPACK_IMPORTED_MODULE_2__["default"]);
|
7113 | },
|
7114 |
|
7115 | |
7116 |
|
7117 |
|
7118 |
|
7119 |
|
7120 |
|
7121 |
|
7122 |
|
7123 |
|
7124 |
|
7125 |
|
7126 |
|
7127 |
|
7128 |
|
7129 |
|
7130 |
|
7131 |
|
7132 |
|
7133 |
|
7134 |
|
7135 |
|
7136 |
|
7137 |
|
7138 |
|
7139 |
|
7140 |
|
7141 |
|
7142 |
|
7143 |
|
7144 |
|
7145 |
|
7146 |
|
7147 | createAssetFromFiles: function createAssetFromFiles(data) {
|
7148 | var file = data.fields.file;
|
7149 | return Promise.all(Object.keys(file).map(function (locale) {
|
7150 | var _file$locale = file[locale],
|
7151 | contentType = _file$locale.contentType,
|
7152 | fileName = _file$locale.fileName;
|
7153 | return createUpload(file[locale]).then(function (upload) {
|
7154 | return _defineProperty({}, locale, {
|
7155 | contentType: contentType,
|
7156 | fileName: fileName,
|
7157 | uploadFrom: {
|
7158 | sys: {
|
7159 | type: 'Link',
|
7160 | linkType: 'Upload',
|
7161 | id: upload.sys.id
|
7162 | }
|
7163 | }
|
7164 | });
|
7165 | });
|
7166 | })).then(function (uploads) {
|
7167 | var file = uploads.reduce(function (fieldsData, upload) {
|
7168 | return _objectSpread(_objectSpread({}, fieldsData), upload);
|
7169 | }, {});
|
7170 |
|
7171 | var asset = _objectSpread(_objectSpread({}, data), {}, {
|
7172 | fields: _objectSpread(_objectSpread({}, data.fields), {}, {
|
7173 | file: file
|
7174 | })
|
7175 | });
|
7176 |
|
7177 | return createAsset(asset);
|
7178 | }).catch(_error_handler__WEBPACK_IMPORTED_MODULE_2__["default"]);
|
7179 | },
|
7180 |
|
7181 | |
7182 |
|
7183 |
|
7184 |
|
7185 |
|
7186 |
|
7187 |
|
7188 |
|
7189 |
|
7190 |
|
7191 |
|
7192 |
|
7193 |
|
7194 |
|
7195 |
|
7196 |
|
7197 | getUpload: function getUpload(id) {
|
7198 | return httpUpload.get('uploads/' + id).then(function (response) {
|
7199 | return wrapUpload(http, response.data);
|
7200 | }).catch(_error_handler__WEBPACK_IMPORTED_MODULE_2__["default"]);
|
7201 | },
|
7202 |
|
7203 | |
7204 |
|
7205 |
|
7206 |
|
7207 |
|
7208 |
|
7209 |
|
7210 |
|
7211 |
|
7212 |
|
7213 |
|
7214 |
|
7215 |
|
7216 |
|
7217 |
|
7218 |
|
7219 |
|
7220 |
|
7221 | createUpload: createUpload,
|
7222 |
|
7223 | |
7224 |
|
7225 |
|
7226 |
|
7227 |
|
7228 |
|
7229 |
|
7230 |
|
7231 |
|
7232 |
|
7233 |
|
7234 |
|
7235 |
|
7236 |
|
7237 |
|
7238 |
|
7239 |
|
7240 |
|
7241 | getLocale: function getLocale(id) {
|
7242 | return http.get('locales/' + id).then(function (response) {
|
7243 | return wrapLocale(http, response.data);
|
7244 | }, _error_handler__WEBPACK_IMPORTED_MODULE_2__["default"]);
|
7245 | },
|
7246 |
|
7247 | |
7248 |
|
7249 |
|
7250 |
|
7251 |
|
7252 |
|
7253 |
|
7254 |
|
7255 |
|
7256 |
|
7257 |
|
7258 |
|
7259 |
|
7260 |
|
7261 |
|
7262 |
|
7263 |
|
7264 | getLocales: function getLocales() {
|
7265 | return http.get('locales').then(function (response) {
|
7266 | return wrapLocaleCollection(http, response.data);
|
7267 | }, _error_handler__WEBPACK_IMPORTED_MODULE_2__["default"]);
|
7268 | },
|
7269 |
|
7270 | |
7271 |
|
7272 |
|
7273 |
|
7274 |
|
7275 |
|
7276 |
|
7277 |
|
7278 |
|
7279 |
|
7280 |
|
7281 |
|
7282 |
|
7283 |
|
7284 |
|
7285 |
|
7286 |
|
7287 |
|
7288 |
|
7289 |
|
7290 |
|
7291 |
|
7292 |
|
7293 |
|
7294 | createLocale: function createLocale(data) {
|
7295 | return http.post('locales', data).then(function (response) {
|
7296 | return wrapLocale(http, response.data);
|
7297 | }, _error_handler__WEBPACK_IMPORTED_MODULE_2__["default"]);
|
7298 | },
|
7299 |
|
7300 | |
7301 |
|
7302 |
|
7303 |
|
7304 |
|
7305 |
|
7306 |
|
7307 |
|
7308 |
|
7309 |
|
7310 |
|
7311 |
|
7312 |
|
7313 |
|
7314 |
|
7315 |
|
7316 |
|
7317 |
|
7318 | getUiExtension: function getUiExtension(id) {
|
7319 | return http.get('extensions/' + id).then(function (response) {
|
7320 | return wrapUiExtension(http, response.data);
|
7321 | }, _error_handler__WEBPACK_IMPORTED_MODULE_2__["default"]);
|
7322 | },
|
7323 |
|
7324 | |
7325 |
|
7326 |
|
7327 |
|
7328 |
|
7329 |
|
7330 |
|
7331 |
|
7332 |
|
7333 |
|
7334 |
|
7335 |
|
7336 |
|
7337 |
|
7338 |
|
7339 |
|
7340 |
|
7341 | getUiExtensions: function getUiExtensions() {
|
7342 | return http.get('extensions').then(function (response) {
|
7343 | return wrapUiExtensionCollection(http, response.data);
|
7344 | }, _error_handler__WEBPACK_IMPORTED_MODULE_2__["default"]);
|
7345 | },
|
7346 |
|
7347 | |
7348 |
|
7349 |
|
7350 |
|
7351 |
|
7352 |
|
7353 |
|
7354 |
|
7355 |
|
7356 |
|
7357 |
|
7358 |
|
7359 |
|
7360 |
|
7361 |
|
7362 |
|
7363 |
|
7364 |
|
7365 |
|
7366 |
|
7367 |
|
7368 |
|
7369 |
|
7370 |
|
7371 |
|
7372 |
|
7373 |
|
7374 |
|
7375 |
|
7376 |
|
7377 |
|
7378 |
|
7379 | createUiExtension: function createUiExtension(data) {
|
7380 | return http.post('extensions', data).then(function (response) {
|
7381 | return wrapUiExtension(http, response.data);
|
7382 | }, _error_handler__WEBPACK_IMPORTED_MODULE_2__["default"]);
|
7383 | },
|
7384 |
|
7385 | |
7386 |
|
7387 |
|
7388 |
|
7389 |
|
7390 |
|
7391 |
|
7392 |
|
7393 |
|
7394 |
|
7395 |
|
7396 |
|
7397 |
|
7398 |
|
7399 |
|
7400 |
|
7401 |
|
7402 |
|
7403 |
|
7404 |
|
7405 |
|
7406 |
|
7407 |
|
7408 |
|
7409 |
|
7410 |
|
7411 |
|
7412 |
|
7413 |
|
7414 |
|
7415 |
|
7416 |
|
7417 |
|
7418 | createUiExtensionWithId: function createUiExtensionWithId(id, data) {
|
7419 | return http.put('extensions/' + id, data).then(function (response) {
|
7420 | return wrapUiExtension(http, response.data);
|
7421 | }, _error_handler__WEBPACK_IMPORTED_MODULE_2__["default"]);
|
7422 | },
|
7423 |
|
7424 | |
7425 |
|
7426 |
|
7427 |
|
7428 |
|
7429 |
|
7430 |
|
7431 |
|
7432 |
|
7433 |
|
7434 |
|
7435 |
|
7436 |
|
7437 |
|
7438 |
|
7439 |
|
7440 |
|
7441 |
|
7442 |
|
7443 |
|
7444 |
|
7445 |
|
7446 |
|
7447 | createAppInstallation: function createAppInstallation(appDefinitionId, data) {
|
7448 | return http.put('app_installations/' + appDefinitionId, data).then(function (response) {
|
7449 | return wrapAppInstallation(http, response.data);
|
7450 | }, _error_handler__WEBPACK_IMPORTED_MODULE_2__["default"]);
|
7451 | },
|
7452 |
|
7453 | |
7454 |
|
7455 |
|
7456 |
|
7457 |
|
7458 |
|
7459 |
|
7460 |
|
7461 |
|
7462 |
|
7463 |
|
7464 |
|
7465 |
|
7466 |
|
7467 |
|
7468 |
|
7469 |
|
7470 |
|
7471 | getAppInstallation: function getAppInstallation(id) {
|
7472 | return http.get('app_installations/' + id).then(function (response) {
|
7473 | return wrapAppInstallation(http, response.data);
|
7474 | }, _error_handler__WEBPACK_IMPORTED_MODULE_2__["default"]);
|
7475 | },
|
7476 |
|
7477 | |
7478 |
|
7479 |
|
7480 |
|
7481 |
|
7482 |
|
7483 |
|
7484 |
|
7485 |
|
7486 |
|
7487 |
|
7488 |
|
7489 |
|
7490 |
|
7491 |
|
7492 |
|
7493 |
|
7494 | getAppInstallations: function getAppInstallations() {
|
7495 | return http.get('app_installations').then(function (response) {
|
7496 | return wrapAppInstallationCollection(http, response.data);
|
7497 | }, _error_handler__WEBPACK_IMPORTED_MODULE_2__["default"]);
|
7498 | },
|
7499 |
|
7500 | |
7501 |
|
7502 |
|
7503 |
|
7504 |
|
7505 |
|
7506 |
|
7507 |
|
7508 |
|
7509 |
|
7510 |
|
7511 |
|
7512 |
|
7513 |
|
7514 |
|
7515 |
|
7516 |
|
7517 |
|
7518 |
|
7519 |
|
7520 | getEntrySnapshots: function getEntrySnapshots(entryId) {
|
7521 | var query = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
|
7522 | return http.get("entries/".concat(entryId, "/snapshots"), Object(contentful_sdk_core__WEBPACK_IMPORTED_MODULE_1__["createRequestConfig"])({
|
7523 | query: query
|
7524 | })).then(function (response) {
|
7525 | return wrapSnapshotCollection(http, response.data);
|
7526 | }, _error_handler__WEBPACK_IMPORTED_MODULE_2__["default"]);
|
7527 | },
|
7528 |
|
7529 | |
7530 |
|
7531 |
|
7532 |
|
7533 |
|
7534 |
|
7535 |
|
7536 |
|
7537 |
|
7538 |
|
7539 |
|
7540 |
|
7541 |
|
7542 |
|
7543 |
|
7544 |
|
7545 |
|
7546 |
|
7547 |
|
7548 |
|
7549 | getContentTypeSnapshots: function getContentTypeSnapshots(contentTypeId) {
|
7550 | var query = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
|
7551 | return http.get("content_types/".concat(contentTypeId, "/snapshots"), Object(contentful_sdk_core__WEBPACK_IMPORTED_MODULE_1__["createRequestConfig"])({
|
7552 | query: query
|
7553 | })).then(function (response) {
|
7554 | return wrapSnapshotCollection(http, response.data);
|
7555 | }, _error_handler__WEBPACK_IMPORTED_MODULE_2__["default"]);
|
7556 | }
|
7557 | };
|
7558 | }
|
7559 |
|
7560 | }),
|
7561 |
|
7562 | "./create-organization-api.ts":
|
7563 |
|
7564 |
|
7565 |
|
7566 |
|
7567 | (function(module, __webpack_exports__, __webpack_require__) {
|
7568 |
|
7569 | "use strict";
|
7570 | __webpack_require__.r(__webpack_exports__);
|
7571 | __webpack_require__.d(__webpack_exports__, "default", function() { return createOrganizationApi; });
|
7572 | var lodash_get__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__( "../node_modules/lodash/get.js");
|
7573 | var lodash_get__WEBPACK_IMPORTED_MODULE_0___default = __webpack_require__.n(lodash_get__WEBPACK_IMPORTED_MODULE_0__);
|
7574 | var contentful_sdk_core__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__( "../node_modules/contentful-sdk-core/dist/index.es-modules.js");
|
7575 | var _error_handler__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__( "./error-handler.ts");
|
7576 | var _entities__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__( "./entities/index.ts");
|
7577 |
|
7578 |
|
7579 |
|
7580 |
|
7581 |
|
7582 |
|
7583 |
|
7584 |
|
7585 | function createOrganizationApi(_ref) {
|
7586 | var http = _ref.http;
|
7587 | var _entities$appDefiniti = _entities__WEBPACK_IMPORTED_MODULE_3__["default"].appDefinition,
|
7588 | wrapAppDefinition = _entities$appDefiniti.wrapAppDefinition,
|
7589 | wrapAppDefinitionCollection = _entities$appDefiniti.wrapAppDefinitionCollection;
|
7590 | var _entities$user = _entities__WEBPACK_IMPORTED_MODULE_3__["default"].user,
|
7591 | wrapUser = _entities$user.wrapUser,
|
7592 | wrapUserCollection = _entities$user.wrapUserCollection;
|
7593 | var _entities$organizatio = _entities__WEBPACK_IMPORTED_MODULE_3__["default"].organizationMembership,
|
7594 | wrapOrganizationMembership = _entities$organizatio.wrapOrganizationMembership,
|
7595 | wrapOrganizationMembershipCollection = _entities$organizatio.wrapOrganizationMembershipCollection;
|
7596 | var _entities$teamMembers = _entities__WEBPACK_IMPORTED_MODULE_3__["default"].teamMembership,
|
7597 | wrapTeamMembership = _entities$teamMembers.wrapTeamMembership,
|
7598 | wrapTeamMembershipCollection = _entities$teamMembers.wrapTeamMembershipCollection;
|
7599 | var _entities$teamSpaceMe = _entities__WEBPACK_IMPORTED_MODULE_3__["default"].teamSpaceMembership,
|
7600 | wrapTeamSpaceMembership = _entities$teamSpaceMe.wrapTeamSpaceMembership,
|
7601 | wrapTeamSpaceMembershipCollection = _entities$teamSpaceMe.wrapTeamSpaceMembershipCollection;
|
7602 | var _entities$team = _entities__WEBPACK_IMPORTED_MODULE_3__["default"].team,
|
7603 | wrapTeam = _entities$team.wrapTeam,
|
7604 | wrapTeamCollection = _entities$team.wrapTeamCollection;
|
7605 | var _entities$spaceMember = _entities__WEBPACK_IMPORTED_MODULE_3__["default"].spaceMembership,
|
7606 | wrapSpaceMembership = _entities$spaceMember.wrapSpaceMembership,
|
7607 | wrapSpaceMembershipCollection = _entities$spaceMember.wrapSpaceMembershipCollection;
|
7608 | var wrapOrganizationInvitation = _entities__WEBPACK_IMPORTED_MODULE_3__["default"].organizationInvitation.wrapOrganizationInvitation;
|
7609 | var headers = {
|
7610 | 'x-contentful-enable-alpha-feature': 'organization-user-management-api'
|
7611 | };
|
7612 | return {
|
7613 | |
7614 |
|
7615 |
|
7616 |
|
7617 |
|
7618 |
|
7619 |
|
7620 |
|
7621 |
|
7622 |
|
7623 |
|
7624 |
|
7625 |
|
7626 |
|
7627 |
|
7628 | getUser: function getUser(id) {
|
7629 | return http.get('users/' + id).then(function (response) {
|
7630 | return wrapUser(http, response.data);
|
7631 | }, _error_handler__WEBPACK_IMPORTED_MODULE_2__["default"]);
|
7632 | },
|
7633 |
|
7634 | |
7635 |
|
7636 |
|
7637 |
|
7638 |
|
7639 |
|
7640 |
|
7641 |
|
7642 |
|
7643 |
|
7644 |
|
7645 |
|
7646 |
|
7647 |
|
7648 |
|
7649 |
|
7650 | getUsers: function getUsers() {
|
7651 | var query = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
7652 | return http.get('users', Object(contentful_sdk_core__WEBPACK_IMPORTED_MODULE_1__["createRequestConfig"])({
|
7653 | query: query
|
7654 | })).then(function (response) {
|
7655 | return wrapUserCollection(http, response.data);
|
7656 | }, _error_handler__WEBPACK_IMPORTED_MODULE_2__["default"]);
|
7657 | },
|
7658 |
|
7659 | |
7660 |
|
7661 |
|
7662 |
|
7663 |
|
7664 |
|
7665 |
|
7666 |
|
7667 |
|
7668 |
|
7669 |
|
7670 |
|
7671 |
|
7672 |
|
7673 |
|
7674 |
|
7675 | getOrganizationMembership: function getOrganizationMembership(id) {
|
7676 | return http.get('organization_memberships/' + id).then(function (response) {
|
7677 | return wrapOrganizationMembership(http, response.data);
|
7678 | }, _error_handler__WEBPACK_IMPORTED_MODULE_2__["default"]);
|
7679 | },
|
7680 |
|
7681 | |
7682 |
|
7683 |
|
7684 |
|
7685 |
|
7686 |
|
7687 |
|
7688 |
|
7689 |
|
7690 |
|
7691 |
|
7692 |
|
7693 |
|
7694 |
|
7695 |
|
7696 |
|
7697 | getOrganizationMemberships: function getOrganizationMemberships() {
|
7698 | var query = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
7699 | return http.get('organization_memberships', Object(contentful_sdk_core__WEBPACK_IMPORTED_MODULE_1__["createRequestConfig"])({
|
7700 | query: query
|
7701 | })).then(function (response) {
|
7702 | return wrapOrganizationMembershipCollection(http, response.data);
|
7703 | }, _error_handler__WEBPACK_IMPORTED_MODULE_2__["default"]);
|
7704 | },
|
7705 |
|
7706 | |
7707 |
|
7708 |
|
7709 |
|
7710 |
|
7711 |
|
7712 |
|
7713 |
|
7714 |
|
7715 |
|
7716 |
|
7717 |
|
7718 |
|
7719 |
|
7720 |
|
7721 |
|
7722 |
|
7723 |
|
7724 | createTeam: function createTeam(data) {
|
7725 | return http.post('teams', data).then(function (response) {
|
7726 | return wrapTeam(http, response.data);
|
7727 | }, _error_handler__WEBPACK_IMPORTED_MODULE_2__["default"]);
|
7728 | },
|
7729 |
|
7730 | |
7731 |
|
7732 |
|
7733 |
|
7734 |
|
7735 |
|
7736 |
|
7737 |
|
7738 |
|
7739 |
|
7740 |
|
7741 |
|
7742 |
|
7743 |
|
7744 | getTeam: function getTeam(teamId) {
|
7745 | return http.get('teams/' + teamId).then(function (response) {
|
7746 | return wrapTeam(http, response.data);
|
7747 | }, _error_handler__WEBPACK_IMPORTED_MODULE_2__["default"]);
|
7748 | },
|
7749 |
|
7750 | |
7751 |
|
7752 |
|
7753 |
|
7754 |
|
7755 |
|
7756 |
|
7757 |
|
7758 |
|
7759 |
|
7760 |
|
7761 |
|
7762 |
|
7763 |
|
7764 | getTeams: function getTeams() {
|
7765 | var query = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
7766 | return http.get('teams', Object(contentful_sdk_core__WEBPACK_IMPORTED_MODULE_1__["createRequestConfig"])({
|
7767 | query: query
|
7768 | })).then(function (response) {
|
7769 | return wrapTeamCollection(http, response.data);
|
7770 | }, _error_handler__WEBPACK_IMPORTED_MODULE_2__["default"]);
|
7771 | },
|
7772 |
|
7773 | |
7774 |
|
7775 |
|
7776 |
|
7777 |
|
7778 |
|
7779 |
|
7780 |
|
7781 |
|
7782 |
|
7783 |
|
7784 |
|
7785 |
|
7786 |
|
7787 |
|
7788 |
|
7789 |
|
7790 |
|
7791 |
|
7792 | createTeamMembership: function createTeamMembership(teamId, data) {
|
7793 | return http.post('teams/' + teamId + '/team_memberships', data).then(function (response) {
|
7794 | return wrapTeamMembership(http, response.data);
|
7795 | }, _error_handler__WEBPACK_IMPORTED_MODULE_2__["default"]);
|
7796 | },
|
7797 |
|
7798 | |
7799 |
|
7800 |
|
7801 |
|
7802 |
|
7803 |
|
7804 |
|
7805 |
|
7806 |
|
7807 |
|
7808 |
|
7809 |
|
7810 |
|
7811 |
|
7812 |
|
7813 | getTeamMembership: function getTeamMembership(teamId, teamMembershipId) {
|
7814 | return http.get('teams/' + teamId + '/team_memberships/' + teamMembershipId).then(function (response) {
|
7815 | return wrapTeamMembership(http, response.data);
|
7816 | }, _error_handler__WEBPACK_IMPORTED_MODULE_2__["default"]);
|
7817 | },
|
7818 |
|
7819 | |
7820 |
|
7821 |
|
7822 |
|
7823 |
|
7824 |
|
7825 |
|
7826 |
|
7827 |
|
7828 |
|
7829 |
|
7830 |
|
7831 |
|
7832 |
|
7833 |
|
7834 | getTeamMemberships: function getTeamMemberships() {
|
7835 | var opts = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
7836 |
|
7837 | var query = lodash_get__WEBPACK_IMPORTED_MODULE_0___default()(opts, 'query', {});
|
7838 |
|
7839 | if (opts.teamId) {
|
7840 | return http.get('teams/' + opts.teamId + '/team_memberships', Object(contentful_sdk_core__WEBPACK_IMPORTED_MODULE_1__["createRequestConfig"])({
|
7841 | query: query
|
7842 | })).then(function (response) {
|
7843 | return wrapTeamMembershipCollection(http, response.data);
|
7844 | }, _error_handler__WEBPACK_IMPORTED_MODULE_2__["default"]);
|
7845 | }
|
7846 |
|
7847 | return http.get('team_memberships', Object(contentful_sdk_core__WEBPACK_IMPORTED_MODULE_1__["createRequestConfig"])({
|
7848 | query: query
|
7849 | })).then(function (response) {
|
7850 | return wrapTeamMembershipCollection(http, response.data);
|
7851 | }, _error_handler__WEBPACK_IMPORTED_MODULE_2__["default"]);
|
7852 | },
|
7853 |
|
7854 | |
7855 |
|
7856 |
|
7857 |
|
7858 |
|
7859 |
|
7860 |
|
7861 |
|
7862 |
|
7863 |
|
7864 |
|
7865 |
|
7866 |
|
7867 |
|
7868 |
|
7869 | getTeamSpaceMemberships: function getTeamSpaceMemberships() {
|
7870 | var opts = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
7871 |
|
7872 | var query = lodash_get__WEBPACK_IMPORTED_MODULE_0___default()(opts, 'query', {});
|
7873 |
|
7874 | if (opts.teamId) {
|
7875 |
|
7876 |
|
7877 | query['sys.team.sys.id'] = opts.teamId;
|
7878 | }
|
7879 |
|
7880 | return http.get('team_space_memberships', Object(contentful_sdk_core__WEBPACK_IMPORTED_MODULE_1__["createRequestConfig"])({
|
7881 | query: query
|
7882 | })).then(function (response) {
|
7883 | return wrapTeamSpaceMembershipCollection(http, response.data);
|
7884 | }, _error_handler__WEBPACK_IMPORTED_MODULE_2__["default"]);
|
7885 | },
|
7886 |
|
7887 | |
7888 |
|
7889 |
|
7890 |
|
7891 |
|
7892 |
|
7893 |
|
7894 |
|
7895 |
|
7896 |
|
7897 |
|
7898 |
|
7899 |
|
7900 |
|
7901 |
|
7902 | getTeamSpaceMembership: function getTeamSpaceMembership(teamSpaceMembershipId) {
|
7903 | return http.get('team_space_memberships/' + teamSpaceMembershipId).then(function (response) {
|
7904 | return wrapTeamSpaceMembership(http, response.data);
|
7905 | }, _error_handler__WEBPACK_IMPORTED_MODULE_2__["default"]);
|
7906 | },
|
7907 |
|
7908 | |
7909 |
|
7910 |
|
7911 |
|
7912 |
|
7913 |
|
7914 |
|
7915 |
|
7916 |
|
7917 |
|
7918 |
|
7919 |
|
7920 |
|
7921 |
|
7922 |
|
7923 |
|
7924 | getOrganizationSpaceMembership: function getOrganizationSpaceMembership(id) {
|
7925 | return http.get('space_memberships/' + id).then(function (response) {
|
7926 | return wrapSpaceMembership(http, response.data);
|
7927 | }, _error_handler__WEBPACK_IMPORTED_MODULE_2__["default"]);
|
7928 | },
|
7929 |
|
7930 | |
7931 |
|
7932 |
|
7933 |
|
7934 |
|
7935 |
|
7936 |
|
7937 |
|
7938 |
|
7939 |
|
7940 |
|
7941 |
|
7942 |
|
7943 |
|
7944 |
|
7945 |
|
7946 | getOrganizationSpaceMemberships: function getOrganizationSpaceMemberships() {
|
7947 | var query = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
7948 | return http.get('space_memberships', Object(contentful_sdk_core__WEBPACK_IMPORTED_MODULE_1__["createRequestConfig"])({
|
7949 | query: query
|
7950 | })).then(function (response) {
|
7951 | return wrapSpaceMembershipCollection(http, response.data);
|
7952 | }, _error_handler__WEBPACK_IMPORTED_MODULE_2__["default"]);
|
7953 | },
|
7954 |
|
7955 | |
7956 |
|
7957 |
|
7958 |
|
7959 |
|
7960 |
|
7961 |
|
7962 |
|
7963 |
|
7964 |
|
7965 |
|
7966 |
|
7967 |
|
7968 |
|
7969 |
|
7970 | getOrganizationInvitation: function getOrganizationInvitation(invitationId) {
|
7971 | return http.get('invitations/' + invitationId, {
|
7972 | headers: headers
|
7973 | }).then(function (response) {
|
7974 | return wrapOrganizationInvitation(http, response.data);
|
7975 | }, _error_handler__WEBPACK_IMPORTED_MODULE_2__["default"]);
|
7976 | },
|
7977 |
|
7978 | |
7979 |
|
7980 |
|
7981 |
|
7982 |
|
7983 |
|
7984 |
|
7985 |
|
7986 |
|
7987 |
|
7988 |
|
7989 |
|
7990 |
|
7991 |
|
7992 |
|
7993 |
|
7994 |
|
7995 |
|
7996 |
|
7997 | createOrganizationInvitation: function createOrganizationInvitation(data) {
|
7998 | var invitationAlphaHeaders = {
|
7999 | 'x-contentful-enable-alpha-feature': 'pending-org-membership'
|
8000 | };
|
8001 | return http.post('invitations', data, {
|
8002 | headers: invitationAlphaHeaders
|
8003 | }).then(function (response) {
|
8004 | return wrapOrganizationInvitation(http, response.data);
|
8005 | }, _error_handler__WEBPACK_IMPORTED_MODULE_2__["default"]);
|
8006 | },
|
8007 |
|
8008 | |
8009 |
|
8010 |
|
8011 |
|
8012 |
|
8013 |
|
8014 |
|
8015 |
|
8016 |
|
8017 |
|
8018 |
|
8019 |
|
8020 |
|
8021 |
|
8022 |
|
8023 |
|
8024 |
|
8025 |
|
8026 |
|
8027 |
|
8028 | createAppDefinition: function createAppDefinition(data) {
|
8029 | return http.post('app_definitions', data).then(function (response) {
|
8030 | return wrapAppDefinition(http, response.data);
|
8031 | }, _error_handler__WEBPACK_IMPORTED_MODULE_2__["default"]);
|
8032 | },
|
8033 |
|
8034 | |
8035 |
|
8036 |
|
8037 |
|
8038 |
|
8039 |
|
8040 |
|
8041 |
|
8042 |
|
8043 |
|
8044 |
|
8045 |
|
8046 |
|
8047 |
|
8048 |
|
8049 | getAppDefinitions: function getAppDefinitions() {
|
8050 | var query = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
8051 | return http.get('app_definitions', Object(contentful_sdk_core__WEBPACK_IMPORTED_MODULE_1__["createRequestConfig"])({
|
8052 | query: query
|
8053 | })).then(function (response) {
|
8054 | return wrapAppDefinitionCollection(http, response.data);
|
8055 | }, _error_handler__WEBPACK_IMPORTED_MODULE_2__["default"]);
|
8056 | },
|
8057 |
|
8058 | |
8059 |
|
8060 |
|
8061 |
|
8062 |
|
8063 |
|
8064 |
|
8065 |
|
8066 |
|
8067 |
|
8068 |
|
8069 |
|
8070 |
|
8071 |
|
8072 |
|
8073 | getAppDefinition: function getAppDefinition(id) {
|
8074 | return http.get('app_definitions/' + id).then(function (response) {
|
8075 | return wrapAppDefinition(http, response.data);
|
8076 | }, _error_handler__WEBPACK_IMPORTED_MODULE_2__["default"]);
|
8077 | }
|
8078 | };
|
8079 | }
|
8080 |
|
8081 | }),
|
8082 |
|
8083 | "./create-space-api.ts":
|
8084 |
|
8085 |
|
8086 |
|
8087 |
|
8088 | (function(module, __webpack_exports__, __webpack_require__) {
|
8089 |
|
8090 | "use strict";
|
8091 | __webpack_require__.r(__webpack_exports__);
|
8092 | __webpack_require__.d(__webpack_exports__, "default", function() { return createSpaceApi; });
|
8093 | var lodash_cloneDeep__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__( "../node_modules/lodash/cloneDeep.js");
|
8094 | var lodash_cloneDeep__WEBPACK_IMPORTED_MODULE_0___default = __webpack_require__.n(lodash_cloneDeep__WEBPACK_IMPORTED_MODULE_0__);
|
8095 | var contentful_sdk_core__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__( "../node_modules/contentful-sdk-core/dist/index.es-modules.js");
|
8096 | var _error_handler__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__( "./error-handler.ts");
|
8097 | var _entities__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__( "./entities/index.ts");
|
8098 | function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; }
|
8099 |
|
8100 | function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }
|
8101 |
|
8102 | function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
8103 |
|
8104 |
|
8105 |
|
8106 |
|
8107 |
|
8108 |
|
8109 |
|
8110 |
|
8111 |
|
8112 |
|
8113 | function raiseDeprecationWarning(method) {
|
8114 | console.warn(["Deprecated: Space.".concat(method, "() will be removed in future major versions."), null, "Please migrate your code to use Environment.".concat(method, "():"), "https://contentful.github.io/contentful-management.js/contentful-management/latest/ContentfulEnvironmentAPI.html#.".concat(method), null].join('\n'));
|
8115 | }
|
8116 |
|
8117 | function spaceMembershipDeprecationWarning() {
|
8118 | console.warn('The user attribute in the space membership root is deprecated. The attribute has been moved inside the sys object (i.e. sys.user)');
|
8119 | }
|
8120 |
|
8121 |
|
8122 |
|
8123 |
|
8124 |
|
8125 |
|
8126 |
|
8127 |
|
8128 | function createSpaceApi(_ref) {
|
8129 | var http = _ref.http,
|
8130 | httpUpload = _ref.httpUpload;
|
8131 | var wrapSpace = _entities__WEBPACK_IMPORTED_MODULE_3__["default"].space.wrapSpace;
|
8132 | var _entities$environment = _entities__WEBPACK_IMPORTED_MODULE_3__["default"].environment,
|
8133 | wrapEnvironment = _entities$environment.wrapEnvironment,
|
8134 | wrapEnvironmentCollection = _entities$environment.wrapEnvironmentCollection;
|
8135 | var _entities$contentType = _entities__WEBPACK_IMPORTED_MODULE_3__["default"].contentType,
|
8136 | wrapContentType = _entities$contentType.wrapContentType,
|
8137 | wrapContentTypeCollection = _entities$contentType.wrapContentTypeCollection;
|
8138 | var _entities$entry = _entities__WEBPACK_IMPORTED_MODULE_3__["default"].entry,
|
8139 | wrapEntry = _entities$entry.wrapEntry,
|
8140 | wrapEntryCollection = _entities$entry.wrapEntryCollection;
|
8141 | var _entities$asset = _entities__WEBPACK_IMPORTED_MODULE_3__["default"].asset,
|
8142 | wrapAsset = _entities$asset.wrapAsset,
|
8143 | wrapAssetCollection = _entities$asset.wrapAssetCollection;
|
8144 | var _entities$locale = _entities__WEBPACK_IMPORTED_MODULE_3__["default"].locale,
|
8145 | wrapLocale = _entities$locale.wrapLocale,
|
8146 | wrapLocaleCollection = _entities$locale.wrapLocaleCollection;
|
8147 | var _entities$webhook = _entities__WEBPACK_IMPORTED_MODULE_3__["default"].webhook,
|
8148 | wrapWebhook = _entities$webhook.wrapWebhook,
|
8149 | wrapWebhookCollection = _entities$webhook.wrapWebhookCollection;
|
8150 | var _entities$role = _entities__WEBPACK_IMPORTED_MODULE_3__["default"].role,
|
8151 | wrapRole = _entities$role.wrapRole,
|
8152 | wrapRoleCollection = _entities$role.wrapRoleCollection;
|
8153 | var _entities$user = _entities__WEBPACK_IMPORTED_MODULE_3__["default"].user,
|
8154 | wrapUser = _entities$user.wrapUser,
|
8155 | wrapUserCollection = _entities$user.wrapUserCollection;
|
8156 | var _entities$spaceMember = _entities__WEBPACK_IMPORTED_MODULE_3__["default"].spaceMember,
|
8157 | wrapSpaceMember = _entities$spaceMember.wrapSpaceMember,
|
8158 | wrapSpaceMemberCollection = _entities$spaceMember.wrapSpaceMemberCollection;
|
8159 | var _entities$spaceMember2 = _entities__WEBPACK_IMPORTED_MODULE_3__["default"].spaceMembership,
|
8160 | wrapSpaceMembership = _entities$spaceMember2.wrapSpaceMembership,
|
8161 | wrapSpaceMembershipCollection = _entities$spaceMember2.wrapSpaceMembershipCollection;
|
8162 | var _entities$teamSpaceMe = _entities__WEBPACK_IMPORTED_MODULE_3__["default"].teamSpaceMembership,
|
8163 | wrapTeamSpaceMembership = _entities$teamSpaceMe.wrapTeamSpaceMembership,
|
8164 | wrapTeamSpaceMembershipCollection = _entities$teamSpaceMe.wrapTeamSpaceMembershipCollection;
|
8165 | var _entities$apiKey = _entities__WEBPACK_IMPORTED_MODULE_3__["default"].apiKey,
|
8166 | wrapApiKey = _entities$apiKey.wrapApiKey,
|
8167 | wrapApiKeyCollection = _entities$apiKey.wrapApiKeyCollection;
|
8168 | var _entities$previewApiK = _entities__WEBPACK_IMPORTED_MODULE_3__["default"].previewApiKey,
|
8169 | wrapPreviewApiKey = _entities$previewApiK.wrapPreviewApiKey,
|
8170 | wrapPreviewApiKeyCollection = _entities$previewApiK.wrapPreviewApiKeyCollection;
|
8171 | var wrapSnapshotCollection = _entities__WEBPACK_IMPORTED_MODULE_3__["default"].snapshot.wrapSnapshotCollection;
|
8172 | var wrapEditorInterface = _entities__WEBPACK_IMPORTED_MODULE_3__["default"].editorInterface.wrapEditorInterface;
|
8173 | var wrapUpload = _entities__WEBPACK_IMPORTED_MODULE_3__["default"].upload.wrapUpload;
|
8174 | var _entities$uiExtension = _entities__WEBPACK_IMPORTED_MODULE_3__["default"].uiExtension,
|
8175 | wrapUiExtension = _entities$uiExtension.wrapUiExtension,
|
8176 | wrapUiExtensionCollection = _entities$uiExtension.wrapUiExtensionCollection;
|
8177 | var _entities$environment2 = _entities__WEBPACK_IMPORTED_MODULE_3__["default"].environmentAlias,
|
8178 | wrapEnvironmentAlias = _entities$environment2.wrapEnvironmentAlias,
|
8179 | wrapEnvironmentAliasCollection = _entities$environment2.wrapEnvironmentAliasCollection;
|
8180 |
|
8181 | function createAsset(data) {
|
8182 | return http.post('assets', data).then(function (response) {
|
8183 | return wrapAsset(http, response.data);
|
8184 | }, _error_handler__WEBPACK_IMPORTED_MODULE_2__["default"]);
|
8185 | }
|
8186 |
|
8187 | function createUpload(data) {
|
8188 | raiseDeprecationWarning('createUpload');
|
8189 | var file = data.file;
|
8190 |
|
8191 | if (!file) {
|
8192 | return Promise.reject(new Error('Unable to locate a file to upload.'));
|
8193 | }
|
8194 |
|
8195 | return httpUpload.post('uploads', file, {
|
8196 | headers: {
|
8197 | 'Content-Type': 'application/octet-stream'
|
8198 | }
|
8199 | }).then(function (uploadResponse) {
|
8200 | return wrapUpload(httpUpload, uploadResponse.data);
|
8201 | }).catch(_error_handler__WEBPACK_IMPORTED_MODULE_2__["default"]);
|
8202 | }
|
8203 | |
8204 |
|
8205 |
|
8206 |
|
8207 |
|
8208 |
|
8209 |
|
8210 |
|
8211 | function normalizeSelect(query) {
|
8212 | if (query.select && !/sys/i.test(query.select)) {
|
8213 | query.select += ',sys';
|
8214 | }
|
8215 | }
|
8216 |
|
8217 | return {
|
8218 | |
8219 |
|
8220 |
|
8221 |
|
8222 |
|
8223 |
|
8224 |
|
8225 |
|
8226 |
|
8227 |
|
8228 |
|
8229 |
|
8230 |
|
8231 |
|
8232 |
|
8233 |
|
8234 | delete: function deleteSpace() {
|
8235 | return http.delete('').then(function () {
|
8236 | }, _error_handler__WEBPACK_IMPORTED_MODULE_2__["default"]);
|
8237 | },
|
8238 |
|
8239 | |
8240 |
|
8241 |
|
8242 |
|
8243 |
|
8244 |
|
8245 |
|
8246 |
|
8247 |
|
8248 |
|
8249 |
|
8250 |
|
8251 |
|
8252 |
|
8253 |
|
8254 |
|
8255 |
|
8256 |
|
8257 |
|
8258 | update: function updateSpace() {
|
8259 | var raw = this.toPlainObject();
|
8260 | var data = lodash_cloneDeep__WEBPACK_IMPORTED_MODULE_0___default()(raw);
|
8261 | delete data.sys;
|
8262 | return http.put('', data, {
|
8263 | headers: {
|
8264 | 'X-Contentful-Version': raw.sys.version
|
8265 | }
|
8266 | }).then(function (response) {
|
8267 | return wrapSpace(http, response.data);
|
8268 | }, _error_handler__WEBPACK_IMPORTED_MODULE_2__["default"]);
|
8269 | },
|
8270 |
|
8271 | |
8272 |
|
8273 |
|
8274 |
|
8275 |
|
8276 |
|
8277 |
|
8278 |
|
8279 |
|
8280 |
|
8281 |
|
8282 |
|
8283 |
|
8284 |
|
8285 |
|
8286 |
|
8287 |
|
8288 | getEnvironment: function getEnvironment(id) {
|
8289 | return http.get('environments/' + id).then(function (response) {
|
8290 | return wrapEnvironment(http, response.data);
|
8291 | }, _error_handler__WEBPACK_IMPORTED_MODULE_2__["default"]);
|
8292 | },
|
8293 |
|
8294 | |
8295 |
|
8296 |
|
8297 |
|
8298 |
|
8299 |
|
8300 |
|
8301 |
|
8302 |
|
8303 |
|
8304 |
|
8305 |
|
8306 |
|
8307 |
|
8308 |
|
8309 |
|
8310 | getEnvironments: function getEnvironments() {
|
8311 | return http.get('environments').then(function (response) {
|
8312 | return wrapEnvironmentCollection(http, response.data);
|
8313 | }, _error_handler__WEBPACK_IMPORTED_MODULE_2__["default"]);
|
8314 | },
|
8315 |
|
8316 | |
8317 |
|
8318 |
|
8319 |
|
8320 |
|
8321 |
|
8322 |
|
8323 |
|
8324 |
|
8325 |
|
8326 |
|
8327 |
|
8328 |
|
8329 |
|
8330 |
|
8331 |
|
8332 |
|
8333 | createEnvironment: function createEnvironment() {
|
8334 | var data = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
8335 | return http.post('environments', data).then(function (response) {
|
8336 | return wrapEnvironment(http, response.data);
|
8337 | }, _error_handler__WEBPACK_IMPORTED_MODULE_2__["default"]);
|
8338 | },
|
8339 |
|
8340 | |
8341 |
|
8342 |
|
8343 |
|
8344 |
|
8345 |
|
8346 |
|
8347 |
|
8348 |
|
8349 |
|
8350 |
|
8351 |
|
8352 |
|
8353 |
|
8354 |
|
8355 |
|
8356 |
|
8357 |
|
8358 |
|
8359 | createEnvironmentWithId: function createEnvironmentWithId(id, data, sourceEnvironmentId) {
|
8360 | return http.put('environments/' + id, data, {
|
8361 | headers: sourceEnvironmentId ? {
|
8362 | 'X-Contentful-Source-Environment': sourceEnvironmentId
|
8363 | } : {}
|
8364 | }).then(function (response) {
|
8365 | return wrapEnvironment(http, response.data);
|
8366 | }, _error_handler__WEBPACK_IMPORTED_MODULE_2__["default"]);
|
8367 | },
|
8368 |
|
8369 | |
8370 |
|
8371 |
|
8372 |
|
8373 |
|
8374 |
|
8375 |
|
8376 |
|
8377 |
|
8378 |
|
8379 |
|
8380 |
|
8381 |
|
8382 |
|
8383 |
|
8384 |
|
8385 |
|
8386 |
|
8387 | getContentType: function getContentType(id) {
|
8388 | raiseDeprecationWarning('getContentType');
|
8389 | return http.get('content_types/' + id).then(function (response) {
|
8390 | return wrapContentType(http, response.data);
|
8391 | }, _error_handler__WEBPACK_IMPORTED_MODULE_2__["default"]);
|
8392 | },
|
8393 |
|
8394 | |
8395 |
|
8396 |
|
8397 |
|
8398 |
|
8399 |
|
8400 |
|
8401 |
|
8402 |
|
8403 |
|
8404 |
|
8405 |
|
8406 |
|
8407 |
|
8408 |
|
8409 |
|
8410 |
|
8411 |
|
8412 | getContentTypes: function getContentTypes() {
|
8413 | var query = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
8414 | raiseDeprecationWarning('getContentTypes');
|
8415 | return http.get('content_types', Object(contentful_sdk_core__WEBPACK_IMPORTED_MODULE_1__["createRequestConfig"])({
|
8416 | query: query
|
8417 | })).then(function (response) {
|
8418 | return wrapContentTypeCollection(http, response.data);
|
8419 | }, _error_handler__WEBPACK_IMPORTED_MODULE_2__["default"]);
|
8420 | },
|
8421 |
|
8422 | |
8423 |
|
8424 |
|
8425 |
|
8426 |
|
8427 |
|
8428 |
|
8429 |
|
8430 |
|
8431 |
|
8432 |
|
8433 |
|
8434 |
|
8435 |
|
8436 |
|
8437 |
|
8438 |
|
8439 |
|
8440 |
|
8441 |
|
8442 |
|
8443 |
|
8444 |
|
8445 |
|
8446 |
|
8447 |
|
8448 |
|
8449 |
|
8450 |
|
8451 | createContentType: function createContentType(data) {
|
8452 | raiseDeprecationWarning('createContentType');
|
8453 | return http.post('content_types', data).then(function (response) {
|
8454 | return wrapContentType(http, response.data);
|
8455 | }, _error_handler__WEBPACK_IMPORTED_MODULE_2__["default"]);
|
8456 | },
|
8457 |
|
8458 | |
8459 |
|
8460 |
|
8461 |
|
8462 |
|
8463 |
|
8464 |
|
8465 |
|
8466 |
|
8467 |
|
8468 |
|
8469 |
|
8470 |
|
8471 |
|
8472 |
|
8473 |
|
8474 |
|
8475 |
|
8476 |
|
8477 |
|
8478 |
|
8479 |
|
8480 |
|
8481 |
|
8482 |
|
8483 |
|
8484 |
|
8485 |
|
8486 |
|
8487 |
|
8488 | createContentTypeWithId: function createContentTypeWithId(id, data) {
|
8489 | raiseDeprecationWarning('createContentTypeWithId');
|
8490 | return http.put('content_types/' + id, data).then(function (response) {
|
8491 | return wrapContentType(http, response.data);
|
8492 | }, _error_handler__WEBPACK_IMPORTED_MODULE_2__["default"]);
|
8493 | },
|
8494 |
|
8495 | |
8496 |
|
8497 |
|
8498 |
|
8499 |
|
8500 |
|
8501 |
|
8502 |
|
8503 |
|
8504 |
|
8505 |
|
8506 |
|
8507 |
|
8508 |
|
8509 |
|
8510 |
|
8511 |
|
8512 |
|
8513 | getEditorInterfaceForContentType: function getEditorInterfaceForContentType(contentTypeId) {
|
8514 | raiseDeprecationWarning('getEditorInterfaceForContentType');
|
8515 | return http.get('content_types/' + contentTypeId + '/editor_interface').then(function (response) {
|
8516 | return wrapEditorInterface(http, response.data);
|
8517 | }, _error_handler__WEBPACK_IMPORTED_MODULE_2__["default"]);
|
8518 | },
|
8519 |
|
8520 | |
8521 |
|
8522 |
|
8523 |
|
8524 |
|
8525 |
|
8526 |
|
8527 |
|
8528 |
|
8529 |
|
8530 |
|
8531 |
|
8532 |
|
8533 |
|
8534 |
|
8535 |
|
8536 |
|
8537 |
|
8538 |
|
8539 |
|
8540 |
|
8541 | getEntry: function getEntry(id) {
|
8542 | var query = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
|
8543 | raiseDeprecationWarning('getEntry');
|
8544 | normalizeSelect(query);
|
8545 | return http.get('entries/' + id, Object(contentful_sdk_core__WEBPACK_IMPORTED_MODULE_1__["createRequestConfig"])({
|
8546 | query: query
|
8547 | })).then(function (response) {
|
8548 | return wrapEntry(http, response.data);
|
8549 | }, _error_handler__WEBPACK_IMPORTED_MODULE_2__["default"]);
|
8550 | },
|
8551 |
|
8552 | |
8553 |
|
8554 |
|
8555 |
|
8556 |
|
8557 |
|
8558 |
|
8559 |
|
8560 |
|
8561 |
|
8562 |
|
8563 |
|
8564 |
|
8565 |
|
8566 |
|
8567 |
|
8568 |
|
8569 |
|
8570 |
|
8571 |
|
8572 | getEntries: function getEntries() {
|
8573 | var query = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
8574 | raiseDeprecationWarning('getEntries');
|
8575 | normalizeSelect(query);
|
8576 | return http.get('entries', Object(contentful_sdk_core__WEBPACK_IMPORTED_MODULE_1__["createRequestConfig"])({
|
8577 | query: query
|
8578 | })).then(function (response) {
|
8579 | return wrapEntryCollection(http, response.data);
|
8580 | }, _error_handler__WEBPACK_IMPORTED_MODULE_2__["default"]);
|
8581 | },
|
8582 |
|
8583 | |
8584 |
|
8585 |
|
8586 |
|
8587 |
|
8588 |
|
8589 |
|
8590 |
|
8591 |
|
8592 |
|
8593 |
|
8594 |
|
8595 |
|
8596 |
|
8597 |
|
8598 |
|
8599 |
|
8600 |
|
8601 |
|
8602 |
|
8603 |
|
8604 |
|
8605 |
|
8606 |
|
8607 |
|
8608 | createEntry: function createEntry(contentTypeId, data) {
|
8609 | raiseDeprecationWarning('createEntry');
|
8610 | return http.post('entries', data, {
|
8611 | headers: {
|
8612 | 'X-Contentful-Content-Type': contentTypeId
|
8613 | }
|
8614 | }).then(function (response) {
|
8615 | return wrapEntry(http, response.data);
|
8616 | }, _error_handler__WEBPACK_IMPORTED_MODULE_2__["default"]);
|
8617 | },
|
8618 |
|
8619 | |
8620 |
|
8621 |
|
8622 |
|
8623 |
|
8624 |
|
8625 |
|
8626 |
|
8627 |
|
8628 |
|
8629 |
|
8630 |
|
8631 |
|
8632 |
|
8633 |
|
8634 |
|
8635 |
|
8636 |
|
8637 |
|
8638 |
|
8639 |
|
8640 |
|
8641 |
|
8642 |
|
8643 |
|
8644 |
|
8645 |
|
8646 | createEntryWithId: function createEntryWithId(contentTypeId, id, data) {
|
8647 | raiseDeprecationWarning('createEntryWithId');
|
8648 | return http.put('entries/' + id, data, {
|
8649 | headers: {
|
8650 | 'X-Contentful-Content-Type': contentTypeId
|
8651 | }
|
8652 | }).then(function (response) {
|
8653 | return wrapEntry(http, response.data);
|
8654 | }, _error_handler__WEBPACK_IMPORTED_MODULE_2__["default"]);
|
8655 | },
|
8656 |
|
8657 | |
8658 |
|
8659 |
|
8660 |
|
8661 |
|
8662 |
|
8663 |
|
8664 |
|
8665 |
|
8666 |
|
8667 |
|
8668 |
|
8669 |
|
8670 |
|
8671 |
|
8672 |
|
8673 |
|
8674 | createUpload: createUpload,
|
8675 |
|
8676 | |
8677 |
|
8678 |
|
8679 |
|
8680 |
|
8681 |
|
8682 |
|
8683 |
|
8684 |
|
8685 |
|
8686 |
|
8687 |
|
8688 |
|
8689 |
|
8690 |
|
8691 |
|
8692 |
|
8693 |
|
8694 |
|
8695 |
|
8696 |
|
8697 |
|
8698 |
|
8699 |
|
8700 |
|
8701 |
|
8702 |
|
8703 |
|
8704 |
|
8705 |
|
8706 |
|
8707 | createAsset: createAsset,
|
8708 |
|
8709 | |
8710 |
|
8711 |
|
8712 |
|
8713 |
|
8714 |
|
8715 |
|
8716 |
|
8717 |
|
8718 |
|
8719 |
|
8720 |
|
8721 |
|
8722 |
|
8723 |
|
8724 |
|
8725 |
|
8726 |
|
8727 |
|
8728 |
|
8729 |
|
8730 | getAsset: function getAsset(id) {
|
8731 | var query = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
|
8732 | raiseDeprecationWarning('getAsset');
|
8733 | normalizeSelect(query);
|
8734 | return http.get('assets/' + id, Object(contentful_sdk_core__WEBPACK_IMPORTED_MODULE_1__["createRequestConfig"])({
|
8735 | query: query
|
8736 | })).then(function (response) {
|
8737 | return wrapAsset(http, response.data);
|
8738 | }, _error_handler__WEBPACK_IMPORTED_MODULE_2__["default"]);
|
8739 | },
|
8740 |
|
8741 | |
8742 |
|
8743 |
|
8744 |
|
8745 |
|
8746 |
|
8747 |
|
8748 |
|
8749 |
|
8750 |
|
8751 |
|
8752 |
|
8753 |
|
8754 |
|
8755 |
|
8756 |
|
8757 |
|
8758 |
|
8759 |
|
8760 |
|
8761 | getAssets: function getAssets() {
|
8762 | var query = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
8763 | raiseDeprecationWarning('getAssets');
|
8764 | normalizeSelect(query);
|
8765 | return http.get('assets', Object(contentful_sdk_core__WEBPACK_IMPORTED_MODULE_1__["createRequestConfig"])({
|
8766 | query: query
|
8767 | })).then(function (response) {
|
8768 | return wrapAssetCollection(http, response.data);
|
8769 | }, _error_handler__WEBPACK_IMPORTED_MODULE_2__["default"]);
|
8770 | },
|
8771 |
|
8772 | |
8773 |
|
8774 |
|
8775 |
|
8776 |
|
8777 |
|
8778 |
|
8779 |
|
8780 |
|
8781 |
|
8782 |
|
8783 |
|
8784 |
|
8785 |
|
8786 |
|
8787 |
|
8788 |
|
8789 |
|
8790 |
|
8791 |
|
8792 |
|
8793 |
|
8794 |
|
8795 |
|
8796 |
|
8797 |
|
8798 |
|
8799 |
|
8800 |
|
8801 |
|
8802 | createAssetWithId: function createAssetWithId(id, data) {
|
8803 | raiseDeprecationWarning('createAssetWithId');
|
8804 | return http.put('assets/' + id, data).then(function (response) {
|
8805 | return wrapAsset(http, response.data);
|
8806 | }, _error_handler__WEBPACK_IMPORTED_MODULE_2__["default"]);
|
8807 | },
|
8808 |
|
8809 | |
8810 |
|
8811 |
|
8812 |
|
8813 |
|
8814 |
|
8815 |
|
8816 |
|
8817 |
|
8818 |
|
8819 |
|
8820 |
|
8821 |
|
8822 |
|
8823 |
|
8824 |
|
8825 |
|
8826 |
|
8827 |
|
8828 |
|
8829 |
|
8830 |
|
8831 |
|
8832 |
|
8833 |
|
8834 |
|
8835 |
|
8836 |
|
8837 |
|
8838 |
|
8839 |
|
8840 | createAssetFromFiles: function createAssetFromFiles(data) {
|
8841 | raiseDeprecationWarning('createAssetFromFiles');
|
8842 | var file = data.fields.file;
|
8843 | return Promise.all(Object.keys(file).map(function (locale) {
|
8844 | var _file$locale = file[locale],
|
8845 | contentType = _file$locale.contentType,
|
8846 | fileName = _file$locale.fileName;
|
8847 | return createUpload(file[locale]).then(function (upload) {
|
8848 | return _defineProperty({}, locale, {
|
8849 | contentType: contentType,
|
8850 | fileName: fileName,
|
8851 | uploadFrom: {
|
8852 | sys: {
|
8853 | type: 'Link',
|
8854 | linkType: 'Upload',
|
8855 | id: upload.sys.id
|
8856 | }
|
8857 | }
|
8858 | });
|
8859 | });
|
8860 | })).then(function (uploads) {
|
8861 |
|
8862 | data.fields.file = uploads.reduce(function (fieldsData, upload) {
|
8863 | return _objectSpread(_objectSpread({}, fieldsData), upload);
|
8864 | }, {});
|
8865 | return createAsset(data);
|
8866 | }).catch(_error_handler__WEBPACK_IMPORTED_MODULE_2__["default"]);
|
8867 | },
|
8868 |
|
8869 | |
8870 |
|
8871 |
|
8872 |
|
8873 |
|
8874 |
|
8875 |
|
8876 |
|
8877 |
|
8878 |
|
8879 |
|
8880 |
|
8881 |
|
8882 |
|
8883 |
|
8884 |
|
8885 | getUpload: function getUpload(id) {
|
8886 | raiseDeprecationWarning('getUpload');
|
8887 | return httpUpload.get('uploads/' + id).then(function (response) {
|
8888 | return wrapUpload(http, response.data);
|
8889 | }).catch(_error_handler__WEBPACK_IMPORTED_MODULE_2__["default"]);
|
8890 | },
|
8891 |
|
8892 | |
8893 |
|
8894 |
|
8895 |
|
8896 |
|
8897 |
|
8898 |
|
8899 |
|
8900 |
|
8901 |
|
8902 |
|
8903 |
|
8904 |
|
8905 |
|
8906 |
|
8907 |
|
8908 |
|
8909 |
|
8910 | getLocale: function getLocale(id) {
|
8911 | raiseDeprecationWarning('getLocale');
|
8912 | return http.get('locales/' + id).then(function (response) {
|
8913 | return wrapLocale(http, response.data);
|
8914 | }, _error_handler__WEBPACK_IMPORTED_MODULE_2__["default"]);
|
8915 | },
|
8916 |
|
8917 | |
8918 |
|
8919 |
|
8920 |
|
8921 |
|
8922 |
|
8923 |
|
8924 |
|
8925 |
|
8926 |
|
8927 |
|
8928 |
|
8929 |
|
8930 |
|
8931 |
|
8932 |
|
8933 |
|
8934 | getLocales: function getLocales() {
|
8935 | raiseDeprecationWarning('getLocales');
|
8936 | return http.get('locales').then(function (response) {
|
8937 | return wrapLocaleCollection(http, response.data);
|
8938 | }, _error_handler__WEBPACK_IMPORTED_MODULE_2__["default"]);
|
8939 | },
|
8940 |
|
8941 | |
8942 |
|
8943 |
|
8944 |
|
8945 |
|
8946 |
|
8947 |
|
8948 |
|
8949 |
|
8950 |
|
8951 |
|
8952 |
|
8953 |
|
8954 |
|
8955 |
|
8956 |
|
8957 |
|
8958 |
|
8959 |
|
8960 |
|
8961 |
|
8962 |
|
8963 |
|
8964 |
|
8965 | createLocale: function createLocale(data) {
|
8966 | raiseDeprecationWarning('createLocale');
|
8967 | return http.post('locales', data).then(function (response) {
|
8968 | return wrapLocale(http, response.data);
|
8969 | }, _error_handler__WEBPACK_IMPORTED_MODULE_2__["default"]);
|
8970 | },
|
8971 |
|
8972 | |
8973 |
|
8974 |
|
8975 |
|
8976 |
|
8977 |
|
8978 |
|
8979 |
|
8980 |
|
8981 |
|
8982 |
|
8983 |
|
8984 |
|
8985 |
|
8986 |
|
8987 |
|
8988 |
|
8989 | getWebhook: function getWebhook(id) {
|
8990 | return http.get('webhook_definitions/' + id).then(function (response) {
|
8991 | return wrapWebhook(http, response.data);
|
8992 | }, _error_handler__WEBPACK_IMPORTED_MODULE_2__["default"]);
|
8993 | },
|
8994 |
|
8995 | |
8996 |
|
8997 |
|
8998 |
|
8999 |
|
9000 |
|
9001 |
|
9002 |
|
9003 |
|
9004 |
|
9005 |
|
9006 |
|
9007 |
|
9008 |
|
9009 |
|
9010 |
|
9011 | getWebhooks: function getWebhooks() {
|
9012 | return http.get('webhook_definitions').then(function (response) {
|
9013 | return wrapWebhookCollection(http, response.data);
|
9014 | }, _error_handler__WEBPACK_IMPORTED_MODULE_2__["default"]);
|
9015 | },
|
9016 |
|
9017 | |
9018 |
|
9019 |
|
9020 |
|
9021 |
|
9022 |
|
9023 |
|
9024 |
|
9025 |
|
9026 |
|
9027 |
|
9028 |
|
9029 |
|
9030 |
|
9031 |
|
9032 |
|
9033 |
|
9034 |
|
9035 |
|
9036 |
|
9037 |
|
9038 |
|
9039 | createWebhook: function createWebhook(data) {
|
9040 | return http.post('webhook_definitions', data).then(function (response) {
|
9041 | return wrapWebhook(http, response.data);
|
9042 | }, _error_handler__WEBPACK_IMPORTED_MODULE_2__["default"]);
|
9043 | },
|
9044 |
|
9045 | |
9046 |
|
9047 |
|
9048 |
|
9049 |
|
9050 |
|
9051 |
|
9052 |
|
9053 |
|
9054 |
|
9055 |
|
9056 |
|
9057 |
|
9058 |
|
9059 |
|
9060 |
|
9061 |
|
9062 |
|
9063 |
|
9064 |
|
9065 |
|
9066 |
|
9067 |
|
9068 | createWebhookWithId: function createWebhookWithId(id, data) {
|
9069 | return http.put('webhook_definitions/' + id, data).then(function (response) {
|
9070 | return wrapWebhook(http, response.data);
|
9071 | }, _error_handler__WEBPACK_IMPORTED_MODULE_2__["default"]);
|
9072 | },
|
9073 |
|
9074 | |
9075 |
|
9076 |
|
9077 |
|
9078 |
|
9079 |
|
9080 |
|
9081 |
|
9082 |
|
9083 |
|
9084 |
|
9085 |
|
9086 |
|
9087 |
|
9088 |
|
9089 |
|
9090 |
|
9091 |
|
9092 |
|
9093 |
|
9094 |
|
9095 |
|
9096 |
|
9097 | getRole: function getRole(id) {
|
9098 | return http.get('roles/' + id).then(function (response) {
|
9099 | return wrapRole(http, response.data);
|
9100 | }, _error_handler__WEBPACK_IMPORTED_MODULE_2__["default"]);
|
9101 | },
|
9102 |
|
9103 | |
9104 |
|
9105 |
|
9106 |
|
9107 |
|
9108 |
|
9109 |
|
9110 |
|
9111 |
|
9112 |
|
9113 |
|
9114 |
|
9115 |
|
9116 |
|
9117 |
|
9118 |
|
9119 | getRoles: function getRoles() {
|
9120 | return http.get('roles').then(function (response) {
|
9121 | return wrapRoleCollection(http, response.data);
|
9122 | }, _error_handler__WEBPACK_IMPORTED_MODULE_2__["default"]);
|
9123 | },
|
9124 |
|
9125 | |
9126 |
|
9127 |
|
9128 |
|
9129 |
|
9130 |
|
9131 |
|
9132 |
|
9133 |
|
9134 |
|
9135 |
|
9136 |
|
9137 |
|
9138 |
|
9139 |
|
9140 |
|
9141 |
|
9142 |
|
9143 |
|
9144 |
|
9145 |
|
9146 |
|
9147 |
|
9148 |
|
9149 |
|
9150 |
|
9151 |
|
9152 |
|
9153 |
|
9154 |
|
9155 |
|
9156 |
|
9157 |
|
9158 |
|
9159 |
|
9160 |
|
9161 |
|
9162 |
|
9163 |
|
9164 |
|
9165 |
|
9166 |
|
9167 |
|
9168 |
|
9169 |
|
9170 |
|
9171 | createRole: function createRole(data) {
|
9172 | return http.post('roles', data).then(function (response) {
|
9173 | return wrapRole(http, response.data);
|
9174 | }, _error_handler__WEBPACK_IMPORTED_MODULE_2__["default"]);
|
9175 | },
|
9176 |
|
9177 | |
9178 |
|
9179 |
|
9180 |
|
9181 |
|
9182 |
|
9183 |
|
9184 |
|
9185 |
|
9186 |
|
9187 |
|
9188 |
|
9189 |
|
9190 |
|
9191 |
|
9192 |
|
9193 |
|
9194 |
|
9195 |
|
9196 |
|
9197 |
|
9198 |
|
9199 |
|
9200 |
|
9201 |
|
9202 |
|
9203 |
|
9204 |
|
9205 |
|
9206 |
|
9207 |
|
9208 |
|
9209 |
|
9210 |
|
9211 |
|
9212 |
|
9213 |
|
9214 |
|
9215 |
|
9216 |
|
9217 |
|
9218 |
|
9219 |
|
9220 |
|
9221 |
|
9222 |
|
9223 |
|
9224 | createRoleWithId: function createRoleWithId(id, data) {
|
9225 | return http.put('roles/' + id, data).then(function (response) {
|
9226 | return wrapRole(http, response.data);
|
9227 | }, _error_handler__WEBPACK_IMPORTED_MODULE_2__["default"]);
|
9228 | },
|
9229 |
|
9230 | |
9231 |
|
9232 |
|
9233 |
|
9234 |
|
9235 |
|
9236 |
|
9237 |
|
9238 |
|
9239 |
|
9240 |
|
9241 |
|
9242 |
|
9243 | getSpaceUser: function getSpaceUser(id) {
|
9244 | return http.get('users/' + id).then(function (response) {
|
9245 | return wrapUser(http, response.data);
|
9246 | }, _error_handler__WEBPACK_IMPORTED_MODULE_2__["default"]);
|
9247 | },
|
9248 |
|
9249 | |
9250 |
|
9251 |
|
9252 |
|
9253 |
|
9254 |
|
9255 |
|
9256 |
|
9257 |
|
9258 |
|
9259 |
|
9260 |
|
9261 |
|
9262 | getSpaceUsers: function getSpaceUsers() {
|
9263 | var query = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
9264 | return http.get('users/', Object(contentful_sdk_core__WEBPACK_IMPORTED_MODULE_1__["createRequestConfig"])({
|
9265 | query: query
|
9266 | })).then(function (response) {
|
9267 | return wrapUserCollection(http, response.data);
|
9268 | }, _error_handler__WEBPACK_IMPORTED_MODULE_2__["default"]);
|
9269 | },
|
9270 |
|
9271 | |
9272 |
|
9273 |
|
9274 |
|
9275 |
|
9276 |
|
9277 |
|
9278 |
|
9279 |
|
9280 |
|
9281 |
|
9282 |
|
9283 |
|
9284 | getSpaceMember: function getSpaceMember(id) {
|
9285 | return http.get('space_members/' + id).then(function (response) {
|
9286 | return wrapSpaceMember(http, response.data);
|
9287 | }, _error_handler__WEBPACK_IMPORTED_MODULE_2__["default"]);
|
9288 | },
|
9289 |
|
9290 | |
9291 |
|
9292 |
|
9293 |
|
9294 |
|
9295 |
|
9296 |
|
9297 |
|
9298 |
|
9299 |
|
9300 |
|
9301 |
|
9302 |
|
9303 | getSpaceMembers: function getSpaceMembers() {
|
9304 | var query = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
9305 | return http.get('space_members', Object(contentful_sdk_core__WEBPACK_IMPORTED_MODULE_1__["createRequestConfig"])({
|
9306 | query: query
|
9307 | })).then(function (response) {
|
9308 | return wrapSpaceMemberCollection(http, response.data);
|
9309 | }, _error_handler__WEBPACK_IMPORTED_MODULE_2__["default"]);
|
9310 | },
|
9311 |
|
9312 | |
9313 |
|
9314 |
|
9315 |
|
9316 |
|
9317 |
|
9318 |
|
9319 |
|
9320 |
|
9321 |
|
9322 |
|
9323 |
|
9324 |
|
9325 |
|
9326 | getSpaceMembership: function getSpaceMembership(id) {
|
9327 | spaceMembershipDeprecationWarning();
|
9328 | return http.get('space_memberships/' + id).then(function (response) {
|
9329 | return wrapSpaceMembership(http, response.data);
|
9330 | }, _error_handler__WEBPACK_IMPORTED_MODULE_2__["default"]);
|
9331 | },
|
9332 |
|
9333 | |
9334 |
|
9335 |
|
9336 |
|
9337 |
|
9338 |
|
9339 |
|
9340 |
|
9341 |
|
9342 |
|
9343 |
|
9344 |
|
9345 |
|
9346 |
|
9347 | getSpaceMemberships: function getSpaceMemberships() {
|
9348 | var query = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
9349 | spaceMembershipDeprecationWarning();
|
9350 | return http.get('space_memberships', Object(contentful_sdk_core__WEBPACK_IMPORTED_MODULE_1__["createRequestConfig"])({
|
9351 | query: query
|
9352 | })).then(function (response) {
|
9353 | return wrapSpaceMembershipCollection(http, response.data);
|
9354 | }, _error_handler__WEBPACK_IMPORTED_MODULE_2__["default"]);
|
9355 | },
|
9356 |
|
9357 | |
9358 |
|
9359 |
|
9360 |
|
9361 |
|
9362 |
|
9363 |
|
9364 |
|
9365 |
|
9366 |
|
9367 |
|
9368 |
|
9369 |
|
9370 |
|
9371 |
|
9372 |
|
9373 |
|
9374 |
|
9375 |
|
9376 |
|
9377 |
|
9378 |
|
9379 |
|
9380 |
|
9381 |
|
9382 |
|
9383 |
|
9384 |
|
9385 | createSpaceMembership: function createSpaceMembership(data) {
|
9386 | spaceMembershipDeprecationWarning();
|
9387 | return http.post('space_memberships', data).then(function (response) {
|
9388 | return wrapSpaceMembership(http, response.data);
|
9389 | }, _error_handler__WEBPACK_IMPORTED_MODULE_2__["default"]);
|
9390 | },
|
9391 |
|
9392 | |
9393 |
|
9394 |
|
9395 |
|
9396 |
|
9397 |
|
9398 |
|
9399 |
|
9400 |
|
9401 |
|
9402 |
|
9403 |
|
9404 |
|
9405 |
|
9406 |
|
9407 |
|
9408 |
|
9409 |
|
9410 |
|
9411 |
|
9412 |
|
9413 |
|
9414 |
|
9415 |
|
9416 |
|
9417 |
|
9418 |
|
9419 |
|
9420 |
|
9421 | createSpaceMembershipWithId: function createSpaceMembershipWithId(id, data) {
|
9422 | spaceMembershipDeprecationWarning();
|
9423 | return http.put('space_memberships/' + id, data).then(function (response) {
|
9424 | return wrapSpaceMembership(http, response.data);
|
9425 | }, _error_handler__WEBPACK_IMPORTED_MODULE_2__["default"]);
|
9426 | },
|
9427 |
|
9428 | |
9429 |
|
9430 |
|
9431 |
|
9432 |
|
9433 |
|
9434 |
|
9435 |
|
9436 |
|
9437 |
|
9438 |
|
9439 |
|
9440 |
|
9441 | getTeamSpaceMembership: function getTeamSpaceMembership(teamSpaceMembershipId) {
|
9442 | return http.get('team_space_memberships/' + teamSpaceMembershipId).then(function (response) {
|
9443 | return wrapTeamSpaceMembership(http, response.data);
|
9444 | }, _error_handler__WEBPACK_IMPORTED_MODULE_2__["default"]);
|
9445 | },
|
9446 |
|
9447 | |
9448 |
|
9449 |
|
9450 |
|
9451 |
|
9452 |
|
9453 |
|
9454 |
|
9455 |
|
9456 |
|
9457 |
|
9458 |
|
9459 |
|
9460 | getTeamSpaceMemberships: function getTeamSpaceMemberships() {
|
9461 | var query = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
9462 | return http.get('team_space_memberships', Object(contentful_sdk_core__WEBPACK_IMPORTED_MODULE_1__["createRequestConfig"])({
|
9463 | query: query
|
9464 | })).then(function (response) {
|
9465 | return wrapTeamSpaceMembershipCollection(http, response.data);
|
9466 | }, _error_handler__WEBPACK_IMPORTED_MODULE_2__["default"]);
|
9467 | },
|
9468 |
|
9469 | |
9470 |
|
9471 |
|
9472 |
|
9473 |
|
9474 |
|
9475 |
|
9476 |
|
9477 |
|
9478 |
|
9479 |
|
9480 |
|
9481 |
|
9482 |
|
9483 |
|
9484 |
|
9485 |
|
9486 |
|
9487 |
|
9488 |
|
9489 |
|
9490 |
|
9491 |
|
9492 |
|
9493 |
|
9494 |
|
9495 |
|
9496 |
|
9497 |
|
9498 | createTeamSpaceMembership: function createTeamSpaceMembership(teamId, data) {
|
9499 | return http.post('team_space_memberships', data, {
|
9500 | headers: {
|
9501 | 'x-contentful-team': teamId
|
9502 | }
|
9503 | }).then(function (response) {
|
9504 | return wrapTeamSpaceMembership(http, response.data);
|
9505 | }, _error_handler__WEBPACK_IMPORTED_MODULE_2__["default"]);
|
9506 | },
|
9507 |
|
9508 | |
9509 |
|
9510 |
|
9511 |
|
9512 |
|
9513 |
|
9514 |
|
9515 |
|
9516 |
|
9517 |
|
9518 |
|
9519 |
|
9520 |
|
9521 |
|
9522 |
|
9523 |
|
9524 |
|
9525 | getApiKey: function getApiKey(id) {
|
9526 | return http.get('api_keys/' + id).then(function (response) {
|
9527 | return wrapApiKey(http, response.data);
|
9528 | }, _error_handler__WEBPACK_IMPORTED_MODULE_2__["default"]);
|
9529 | },
|
9530 |
|
9531 | |
9532 |
|
9533 |
|
9534 |
|
9535 |
|
9536 |
|
9537 |
|
9538 |
|
9539 |
|
9540 |
|
9541 |
|
9542 |
|
9543 |
|
9544 |
|
9545 |
|
9546 |
|
9547 | getApiKeys: function getApiKeys() {
|
9548 | return http.get('api_keys').then(function (response) {
|
9549 | return wrapApiKeyCollection(http, response.data);
|
9550 | }, _error_handler__WEBPACK_IMPORTED_MODULE_2__["default"]);
|
9551 | },
|
9552 |
|
9553 | |
9554 |
|
9555 |
|
9556 |
|
9557 |
|
9558 |
|
9559 |
|
9560 |
|
9561 |
|
9562 |
|
9563 |
|
9564 |
|
9565 |
|
9566 |
|
9567 |
|
9568 |
|
9569 | getPreviewApiKeys: function getPreviewApiKeys() {
|
9570 | return http.get('preview_api_keys').then(function (response) {
|
9571 | return wrapPreviewApiKeyCollection(http, response.data);
|
9572 | }, _error_handler__WEBPACK_IMPORTED_MODULE_2__["default"]);
|
9573 | },
|
9574 |
|
9575 | |
9576 |
|
9577 |
|
9578 |
|
9579 |
|
9580 |
|
9581 |
|
9582 |
|
9583 |
|
9584 |
|
9585 |
|
9586 |
|
9587 |
|
9588 |
|
9589 |
|
9590 |
|
9591 |
|
9592 | getPreviewApiKey: function getPreviewApiKey(id) {
|
9593 | return http.get('preview_api_keys/' + id).then(function (response) {
|
9594 | return wrapPreviewApiKey(http, response.data);
|
9595 | }, _error_handler__WEBPACK_IMPORTED_MODULE_2__["default"]);
|
9596 | },
|
9597 |
|
9598 | |
9599 |
|
9600 |
|
9601 |
|
9602 |
|
9603 |
|
9604 |
|
9605 |
|
9606 |
|
9607 |
|
9608 |
|
9609 |
|
9610 |
|
9611 |
|
9612 |
|
9613 |
|
9614 |
|
9615 |
|
9616 |
|
9617 |
|
9618 |
|
9619 |
|
9620 |
|
9621 |
|
9622 |
|
9623 |
|
9624 |
|
9625 |
|
9626 |
|
9627 | createApiKey: function createApiKey(data) {
|
9628 | return http.post('api_keys', data).then(function (response) {
|
9629 | return wrapApiKey(http, response.data);
|
9630 | }, _error_handler__WEBPACK_IMPORTED_MODULE_2__["default"]);
|
9631 | },
|
9632 |
|
9633 | |
9634 |
|
9635 |
|
9636 |
|
9637 |
|
9638 |
|
9639 |
|
9640 |
|
9641 |
|
9642 |
|
9643 |
|
9644 |
|
9645 |
|
9646 |
|
9647 |
|
9648 |
|
9649 |
|
9650 |
|
9651 |
|
9652 |
|
9653 |
|
9654 |
|
9655 |
|
9656 |
|
9657 |
|
9658 |
|
9659 |
|
9660 |
|
9661 |
|
9662 |
|
9663 | createApiKeyWithId: function createApiKeyWithId(id, data) {
|
9664 | return http.put('api_keys/' + id, data).then(function (response) {
|
9665 | return wrapApiKey(http, response.data);
|
9666 | }, _error_handler__WEBPACK_IMPORTED_MODULE_2__["default"]);
|
9667 | },
|
9668 |
|
9669 | |
9670 |
|
9671 |
|
9672 |
|
9673 |
|
9674 |
|
9675 |
|
9676 |
|
9677 |
|
9678 |
|
9679 |
|
9680 |
|
9681 |
|
9682 |
|
9683 |
|
9684 |
|
9685 |
|
9686 |
|
9687 | getUiExtension: function getUiExtension(id) {
|
9688 | raiseDeprecationWarning('getUiExtension');
|
9689 | return http.get('extensions/' + id).then(function (response) {
|
9690 | return wrapUiExtension(http, response.data);
|
9691 | }, _error_handler__WEBPACK_IMPORTED_MODULE_2__["default"]);
|
9692 | },
|
9693 |
|
9694 | |
9695 |
|
9696 |
|
9697 |
|
9698 |
|
9699 |
|
9700 |
|
9701 |
|
9702 |
|
9703 |
|
9704 |
|
9705 |
|
9706 |
|
9707 |
|
9708 |
|
9709 |
|
9710 |
|
9711 | getUiExtensions: function getUiExtensions() {
|
9712 | raiseDeprecationWarning('getUiExtensions');
|
9713 | return http.get('extensions').then(function (response) {
|
9714 | return wrapUiExtensionCollection(http, response.data);
|
9715 | }, _error_handler__WEBPACK_IMPORTED_MODULE_2__["default"]);
|
9716 | },
|
9717 |
|
9718 | |
9719 |
|
9720 |
|
9721 |
|
9722 |
|
9723 |
|
9724 |
|
9725 |
|
9726 |
|
9727 |
|
9728 |
|
9729 |
|
9730 |
|
9731 |
|
9732 |
|
9733 |
|
9734 |
|
9735 |
|
9736 |
|
9737 |
|
9738 |
|
9739 |
|
9740 |
|
9741 |
|
9742 |
|
9743 |
|
9744 |
|
9745 |
|
9746 |
|
9747 |
|
9748 |
|
9749 |
|
9750 | createUiExtension: function createUiExtension(data) {
|
9751 | raiseDeprecationWarning('createUiExtension');
|
9752 | return http.post('extensions', data).then(function (response) {
|
9753 | return wrapUiExtension(http, response.data);
|
9754 | }, _error_handler__WEBPACK_IMPORTED_MODULE_2__["default"]);
|
9755 | },
|
9756 |
|
9757 | |
9758 |
|
9759 |
|
9760 |
|
9761 |
|
9762 |
|
9763 |
|
9764 |
|
9765 |
|
9766 |
|
9767 |
|
9768 |
|
9769 |
|
9770 |
|
9771 |
|
9772 |
|
9773 |
|
9774 |
|
9775 |
|
9776 |
|
9777 |
|
9778 |
|
9779 |
|
9780 |
|
9781 |
|
9782 |
|
9783 |
|
9784 |
|
9785 |
|
9786 |
|
9787 |
|
9788 |
|
9789 |
|
9790 | createUiExtensionWithId: function createUiExtensionWithId(id, data) {
|
9791 | raiseDeprecationWarning('createUiExtensionWithId');
|
9792 | return http.put('extensions/' + id, data).then(function (response) {
|
9793 | return wrapUiExtension(http, response.data);
|
9794 | }, _error_handler__WEBPACK_IMPORTED_MODULE_2__["default"]);
|
9795 | },
|
9796 |
|
9797 | |
9798 |
|
9799 |
|
9800 |
|
9801 |
|
9802 |
|
9803 |
|
9804 |
|
9805 |
|
9806 |
|
9807 |
|
9808 |
|
9809 |
|
9810 |
|
9811 |
|
9812 |
|
9813 |
|
9814 |
|
9815 |
|
9816 | getEntrySnapshots: function getEntrySnapshots(entryId) {
|
9817 | var query = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
|
9818 | raiseDeprecationWarning('getEntrySnapshots');
|
9819 | return http.get("entries/".concat(entryId, "/snapshots"), Object(contentful_sdk_core__WEBPACK_IMPORTED_MODULE_1__["createRequestConfig"])({
|
9820 | query: query
|
9821 | })).then(function (response) {
|
9822 | return wrapSnapshotCollection(http, response.data);
|
9823 | }, _error_handler__WEBPACK_IMPORTED_MODULE_2__["default"]);
|
9824 | },
|
9825 |
|
9826 | |
9827 |
|
9828 |
|
9829 |
|
9830 |
|
9831 |
|
9832 |
|
9833 |
|
9834 |
|
9835 |
|
9836 |
|
9837 |
|
9838 |
|
9839 |
|
9840 |
|
9841 |
|
9842 |
|
9843 |
|
9844 |
|
9845 | getContentTypeSnapshots: function getContentTypeSnapshots(contentTypeId) {
|
9846 | var query = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
|
9847 | raiseDeprecationWarning('getContentTypeSnapshots');
|
9848 | return http.get("content_types/".concat(contentTypeId, "/snapshots"), Object(contentful_sdk_core__WEBPACK_IMPORTED_MODULE_1__["createRequestConfig"])({
|
9849 | query: query
|
9850 | })).then(function (response) {
|
9851 | return wrapSnapshotCollection(http, response.data);
|
9852 | }, _error_handler__WEBPACK_IMPORTED_MODULE_2__["default"]);
|
9853 | },
|
9854 |
|
9855 | |
9856 |
|
9857 |
|
9858 |
|
9859 |
|
9860 |
|
9861 |
|
9862 |
|
9863 |
|
9864 |
|
9865 |
|
9866 |
|
9867 |
|
9868 |
|
9869 |
|
9870 |
|
9871 |
|
9872 | getEnvironmentAlias: function getEnvironmentAlias(id) {
|
9873 | return http.get('environment_aliases/' + id).then(function (response) {
|
9874 | return wrapEnvironmentAlias(http, response.data);
|
9875 | }, _error_handler__WEBPACK_IMPORTED_MODULE_2__["default"]);
|
9876 | },
|
9877 |
|
9878 | |
9879 |
|
9880 |
|
9881 |
|
9882 |
|
9883 |
|
9884 |
|
9885 |
|
9886 |
|
9887 |
|
9888 |
|
9889 |
|
9890 |
|
9891 |
|
9892 |
|
9893 |
|
9894 | getEnvironmentAliases: function getEnvironmentAliases() {
|
9895 | return http.get('environment_aliases').then(function (response) {
|
9896 | return wrapEnvironmentAliasCollection(http, response.data);
|
9897 | }, _error_handler__WEBPACK_IMPORTED_MODULE_2__["default"]);
|
9898 | }
|
9899 | };
|
9900 | }
|
9901 |
|
9902 | }),
|
9903 |
|
9904 | "./enhance-with-methods.ts":
|
9905 |
|
9906 |
|
9907 |
|
9908 |
|
9909 | (function(module, __webpack_exports__, __webpack_require__) {
|
9910 |
|
9911 | "use strict";
|
9912 | __webpack_require__.r(__webpack_exports__);
|
9913 | __webpack_require__.d(__webpack_exports__, "default", function() { return enhanceWithMethods; });
|
9914 |
|
9915 |
|
9916 |
|
9917 |
|
9918 |
|
9919 |
|
9920 |
|
9921 |
|
9922 |
|
9923 |
|
9924 |
|
9925 | function enhanceWithMethods(baseObject, methodsObject) {
|
9926 |
|
9927 | return Object.keys(methodsObject).reduce(function (enhancedObject, methodName) {
|
9928 | Object.defineProperty(enhancedObject, methodName, {
|
9929 | enumerable: false,
|
9930 | configurable: true,
|
9931 | writable: false,
|
9932 | value: methodsObject[methodName]
|
9933 | });
|
9934 | return enhancedObject;
|
9935 | }, baseObject);
|
9936 | }
|
9937 |
|
9938 | }),
|
9939 |
|
9940 | "./entities/api-key.ts":
|
9941 |
|
9942 |
|
9943 |
|
9944 |
|
9945 | (function(module, __webpack_exports__, __webpack_require__) {
|
9946 |
|
9947 | "use strict";
|
9948 | __webpack_require__.r(__webpack_exports__);
|
9949 | __webpack_require__.d(__webpack_exports__, "wrapApiKey", function() { return wrapApiKey; });
|
9950 | __webpack_require__.d(__webpack_exports__, "wrapApiKeyCollection", function() { return wrapApiKeyCollection; });
|
9951 | var lodash_cloneDeep__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__( "../node_modules/lodash/cloneDeep.js");
|
9952 | var lodash_cloneDeep__WEBPACK_IMPORTED_MODULE_0___default = __webpack_require__.n(lodash_cloneDeep__WEBPACK_IMPORTED_MODULE_0__);
|
9953 | var contentful_sdk_core__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__( "../node_modules/contentful-sdk-core/dist/index.es-modules.js");
|
9954 | var _enhance_with_methods__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__( "./enhance-with-methods.ts");
|
9955 | var _instance_actions__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__( "./instance-actions.ts");
|
9956 | var _common_utils__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__( "./common-utils.ts");
|
9957 |
|
9958 |
|
9959 |
|
9960 |
|
9961 |
|
9962 |
|
9963 | function createApiKeyApi(http) {
|
9964 | return {
|
9965 | update: function update() {
|
9966 | var self = this;
|
9967 |
|
9968 | if ('accessToken' in self) {
|
9969 | delete self.accessToken;
|
9970 | }
|
9971 |
|
9972 | if ('preview_api_key' in self) {
|
9973 | delete self.preview_api_key;
|
9974 | }
|
9975 |
|
9976 | if ('policies' in self) {
|
9977 | delete self.policies;
|
9978 | }
|
9979 |
|
9980 | var update = Object(_instance_actions__WEBPACK_IMPORTED_MODULE_3__["createUpdateEntity"])({
|
9981 | http: http,
|
9982 | entityPath: 'api_keys',
|
9983 | wrapperMethod: wrapApiKey
|
9984 | });
|
9985 | return update.call(self);
|
9986 | },
|
9987 | delete: Object(_instance_actions__WEBPACK_IMPORTED_MODULE_3__["createDeleteEntity"])({
|
9988 | http: http,
|
9989 | entityPath: 'api_keys'
|
9990 | })
|
9991 | };
|
9992 | }
|
9993 |
|
9994 |
|
9995 |
|
9996 |
|
9997 |
|
9998 |
|
9999 |
|
10000 | function wrapApiKey(http, data) {
|
10001 | var apiKey = Object(contentful_sdk_core__WEBPACK_IMPORTED_MODULE_1__["toPlainObject"])(lodash_cloneDeep__WEBPACK_IMPORTED_MODULE_0___default()(data));
|
10002 | var apiKeyWithMethods = Object(_enhance_with_methods__WEBPACK_IMPORTED_MODULE_2__["default"])(apiKey, createApiKeyApi(http));
|
10003 | return Object(contentful_sdk_core__WEBPACK_IMPORTED_MODULE_1__["freezeSys"])(apiKeyWithMethods);
|
10004 | }
|
10005 |
|
10006 |
|
10007 |
|
10008 |
|
10009 |
|
10010 |
|
10011 |
|
10012 | var wrapApiKeyCollection = Object(_common_utils__WEBPACK_IMPORTED_MODULE_4__["wrapCollection"])(wrapApiKey);
|
10013 |
|
10014 | }),
|
10015 |
|
10016 | "./entities/app-definition.ts":
|
10017 |
|
10018 |
|
10019 |
|
10020 |
|
10021 | (function(module, __webpack_exports__, __webpack_require__) {
|
10022 |
|
10023 | "use strict";
|
10024 | __webpack_require__.r(__webpack_exports__);
|
10025 | __webpack_require__.d(__webpack_exports__, "wrapAppDefinition", function() { return wrapAppDefinition; });
|
10026 | __webpack_require__.d(__webpack_exports__, "wrapAppDefinitionCollection", function() { return wrapAppDefinitionCollection; });
|
10027 | var lodash_cloneDeep__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__( "../node_modules/lodash/cloneDeep.js");
|
10028 | var lodash_cloneDeep__WEBPACK_IMPORTED_MODULE_0___default = __webpack_require__.n(lodash_cloneDeep__WEBPACK_IMPORTED_MODULE_0__);
|
10029 | var contentful_sdk_core__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__( "../node_modules/contentful-sdk-core/dist/index.es-modules.js");
|
10030 | var _enhance_with_methods__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__( "./enhance-with-methods.ts");
|
10031 | var _instance_actions__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__( "./instance-actions.ts");
|
10032 | var _common_utils__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__( "./common-utils.ts");
|
10033 |
|
10034 |
|
10035 |
|
10036 |
|
10037 |
|
10038 | var entityPath = 'app_definitions';
|
10039 |
|
10040 | function createAppDefinitionApi(http) {
|
10041 | return {
|
10042 | update: Object(_instance_actions__WEBPACK_IMPORTED_MODULE_3__["createUpdateEntity"])({
|
10043 | http: http,
|
10044 | entityPath: entityPath,
|
10045 | wrapperMethod: wrapAppDefinition
|
10046 | }),
|
10047 | delete: Object(_instance_actions__WEBPACK_IMPORTED_MODULE_3__["createDeleteEntity"])({
|
10048 | http: http,
|
10049 | entityPath: entityPath
|
10050 | })
|
10051 | };
|
10052 | }
|
10053 |
|
10054 |
|
10055 |
|
10056 |
|
10057 |
|
10058 |
|
10059 |
|
10060 |
|
10061 | function wrapAppDefinition(http, data) {
|
10062 | var appDefinition = Object(contentful_sdk_core__WEBPACK_IMPORTED_MODULE_1__["toPlainObject"])(lodash_cloneDeep__WEBPACK_IMPORTED_MODULE_0___default()(data));
|
10063 | var appDefinitionWithMethods = Object(_enhance_with_methods__WEBPACK_IMPORTED_MODULE_2__["default"])(appDefinition, createAppDefinitionApi(http));
|
10064 | return Object(contentful_sdk_core__WEBPACK_IMPORTED_MODULE_1__["freezeSys"])(appDefinitionWithMethods);
|
10065 | }
|
10066 |
|
10067 |
|
10068 |
|
10069 |
|
10070 |
|
10071 |
|
10072 |
|
10073 | var wrapAppDefinitionCollection = Object(_common_utils__WEBPACK_IMPORTED_MODULE_4__["wrapCollection"])(wrapAppDefinition);
|
10074 |
|
10075 | }),
|
10076 |
|
10077 | "./entities/app-installation.ts":
|
10078 |
|
10079 |
|
10080 |
|
10081 |
|
10082 | (function(module, __webpack_exports__, __webpack_require__) {
|
10083 |
|
10084 | "use strict";
|
10085 | __webpack_require__.r(__webpack_exports__);
|
10086 | __webpack_require__.d(__webpack_exports__, "wrapAppInstallation", function() { return wrapAppInstallation; });
|
10087 | __webpack_require__.d(__webpack_exports__, "wrapAppInstallationCollection", function() { return wrapAppInstallationCollection; });
|
10088 | var contentful_sdk_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__( "../node_modules/contentful-sdk-core/dist/index.es-modules.js");
|
10089 | var lodash_cloneDeep__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__( "../node_modules/lodash/cloneDeep.js");
|
10090 | var lodash_cloneDeep__WEBPACK_IMPORTED_MODULE_1___default = __webpack_require__.n(lodash_cloneDeep__WEBPACK_IMPORTED_MODULE_1__);
|
10091 | var _error_handler__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__( "./error-handler.ts");
|
10092 | var _enhance_with_methods__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__( "./enhance-with-methods.ts");
|
10093 | var _instance_actions__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__( "./instance-actions.ts");
|
10094 | var _common_utils__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__( "./common-utils.ts");
|
10095 |
|
10096 |
|
10097 |
|
10098 |
|
10099 |
|
10100 |
|
10101 |
|
10102 | function createAppInstallationApi(http) {
|
10103 | return {
|
10104 | update: function update() {
|
10105 | var self = this;
|
10106 | var raw = self.toPlainObject();
|
10107 | var data = lodash_cloneDeep__WEBPACK_IMPORTED_MODULE_1___default()(raw);
|
10108 | delete data.sys;
|
10109 | return http.put("app_installations/".concat(self.sys.appDefinition.sys.id), data).then(function (response) {
|
10110 | return wrapAppInstallation(http, response.data);
|
10111 | }, _error_handler__WEBPACK_IMPORTED_MODULE_2__["default"]);
|
10112 | },
|
10113 | delete: Object(_instance_actions__WEBPACK_IMPORTED_MODULE_4__["createDeleteEntity"])({
|
10114 | http: http,
|
10115 | entityPath: 'app_installations'
|
10116 | })
|
10117 | };
|
10118 | }
|
10119 |
|
10120 |
|
10121 |
|
10122 |
|
10123 |
|
10124 |
|
10125 |
|
10126 |
|
10127 | function wrapAppInstallation(http, data) {
|
10128 | var appInstallation = Object(contentful_sdk_core__WEBPACK_IMPORTED_MODULE_0__["toPlainObject"])(lodash_cloneDeep__WEBPACK_IMPORTED_MODULE_1___default()(data));
|
10129 | var appInstallationWithMethods = Object(_enhance_with_methods__WEBPACK_IMPORTED_MODULE_3__["default"])(appInstallation, createAppInstallationApi(http));
|
10130 | return Object(contentful_sdk_core__WEBPACK_IMPORTED_MODULE_0__["freezeSys"])(appInstallationWithMethods);
|
10131 | }
|
10132 |
|
10133 |
|
10134 |
|
10135 |
|
10136 | var wrapAppInstallationCollection = Object(_common_utils__WEBPACK_IMPORTED_MODULE_5__["wrapCollection"])(wrapAppInstallation);
|
10137 |
|
10138 | }),
|
10139 |
|
10140 | "./entities/asset.ts":
|
10141 |
|
10142 |
|
10143 |
|
10144 |
|
10145 | (function(module, __webpack_exports__, __webpack_require__) {
|
10146 |
|
10147 | "use strict";
|
10148 | __webpack_require__.r(__webpack_exports__);
|
10149 | __webpack_require__.d(__webpack_exports__, "wrapAsset", function() { return wrapAsset; });
|
10150 | __webpack_require__.d(__webpack_exports__, "wrapAssetCollection", function() { return wrapAssetCollection; });
|
10151 | var lodash_cloneDeep__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__( "../node_modules/lodash/cloneDeep.js");
|
10152 | var lodash_cloneDeep__WEBPACK_IMPORTED_MODULE_0___default = __webpack_require__.n(lodash_cloneDeep__WEBPACK_IMPORTED_MODULE_0__);
|
10153 | var contentful_sdk_core__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__( "../node_modules/contentful-sdk-core/dist/index.es-modules.js");
|
10154 | var _enhance_with_methods__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__( "./enhance-with-methods.ts");
|
10155 | var _error_handler__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__( "./error-handler.ts");
|
10156 | var _common_utils__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__( "./common-utils.ts");
|
10157 | var _instance_actions__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__( "./instance-actions.ts");
|
10158 |
|
10159 |
|
10160 |
|
10161 |
|
10162 |
|
10163 |
|
10164 | var ASSET_PROCESSING_CHECK_WAIT = 3000;
|
10165 | var ASSET_PROCESSING_CHECK_RETRIES = 10;
|
10166 |
|
10167 | function createAssetApi(http) {
|
10168 | function checkIfAssetHasUrl(_ref) {
|
10169 | var resolve = _ref.resolve,
|
10170 | reject = _ref.reject,
|
10171 | id = _ref.id,
|
10172 | locale = _ref.locale,
|
10173 | _ref$processingCheckW = _ref.processingCheckWait,
|
10174 | processingCheckWait = _ref$processingCheckW === void 0 ? ASSET_PROCESSING_CHECK_WAIT : _ref$processingCheckW,
|
10175 | _ref$processingCheckR = _ref.processingCheckRetries,
|
10176 | processingCheckRetries = _ref$processingCheckR === void 0 ? ASSET_PROCESSING_CHECK_RETRIES : _ref$processingCheckR,
|
10177 | _ref$checkCount = _ref.checkCount,
|
10178 | checkCount = _ref$checkCount === void 0 ? 0 : _ref$checkCount;
|
10179 | http.get('assets/' + id).then(function (response) {
|
10180 | return wrapAsset(http, response.data);
|
10181 | }, _error_handler__WEBPACK_IMPORTED_MODULE_3__["default"]).then(function (asset) {
|
10182 | if (asset.fields.file[locale].url) {
|
10183 | resolve(asset);
|
10184 | } else if (checkCount === processingCheckRetries) {
|
10185 | var error = new Error();
|
10186 | error.name = 'AssetProcessingTimeout';
|
10187 | error.message = 'Asset is taking longer then expected to process.';
|
10188 | reject(error);
|
10189 | } else {
|
10190 | checkCount++;
|
10191 | setTimeout(function () {
|
10192 | return checkIfAssetHasUrl({
|
10193 | resolve: resolve,
|
10194 | reject: reject,
|
10195 | id: id,
|
10196 | locale: locale,
|
10197 | checkCount: checkCount,
|
10198 | processingCheckWait: processingCheckWait,
|
10199 | processingCheckRetries: processingCheckRetries
|
10200 | });
|
10201 | }, processingCheckWait);
|
10202 | }
|
10203 | });
|
10204 | }
|
10205 |
|
10206 | function processForLocale(locale) {
|
10207 | var _ref2 = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {},
|
10208 | processingCheckWait = _ref2.processingCheckWait,
|
10209 | processingCheckRetries = _ref2.processingCheckRetries;
|
10210 |
|
10211 | var assetId = this.sys.id;
|
10212 | return http.put('assets/' + this.sys.id + '/files/' + locale + '/process', null, {
|
10213 | headers: {
|
10214 | 'X-Contentful-Version': this.sys.version
|
10215 | }
|
10216 | }).then(function () {
|
10217 | return new Promise(function (resolve, reject) {
|
10218 | return checkIfAssetHasUrl({
|
10219 | resolve: resolve,
|
10220 | reject: reject,
|
10221 | id: assetId,
|
10222 | locale: locale,
|
10223 | processingCheckWait: processingCheckWait,
|
10224 | processingCheckRetries: processingCheckRetries
|
10225 | });
|
10226 | });
|
10227 | }, _error_handler__WEBPACK_IMPORTED_MODULE_3__["default"]);
|
10228 | }
|
10229 |
|
10230 | function processForAllLocales() {
|
10231 | var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
10232 | var self = this;
|
10233 | var locales = Object.keys(this.fields.file || {});
|
10234 | var mostUpToDateAssetVersion = undefined;
|
10235 |
|
10236 |
|
10237 |
|
10238 |
|
10239 | var allProcessingLocales = locales.map(function (locale) {
|
10240 | return processForLocale.call(self, locale, options).then(function (result) {
|
10241 |
|
10242 |
|
10243 |
|
10244 | mostUpToDateAssetVersion = result;
|
10245 | });
|
10246 | });
|
10247 | return Promise.all(allProcessingLocales).then(function () {
|
10248 | return mostUpToDateAssetVersion;
|
10249 | });
|
10250 | }
|
10251 |
|
10252 | return {
|
10253 | update: Object(_instance_actions__WEBPACK_IMPORTED_MODULE_5__["createUpdateEntity"])({
|
10254 | http: http,
|
10255 | entityPath: 'assets',
|
10256 | wrapperMethod: wrapAsset
|
10257 | }),
|
10258 | delete: Object(_instance_actions__WEBPACK_IMPORTED_MODULE_5__["createDeleteEntity"])({
|
10259 | http: http,
|
10260 | entityPath: 'assets'
|
10261 | }),
|
10262 | publish: Object(_instance_actions__WEBPACK_IMPORTED_MODULE_5__["createPublishEntity"])({
|
10263 | http: http,
|
10264 | entityPath: 'assets',
|
10265 | wrapperMethod: wrapAsset
|
10266 | }),
|
10267 | unpublish: Object(_instance_actions__WEBPACK_IMPORTED_MODULE_5__["createUnpublishEntity"])({
|
10268 | http: http,
|
10269 | entityPath: 'assets',
|
10270 | wrapperMethod: wrapAsset
|
10271 | }),
|
10272 | archive: Object(_instance_actions__WEBPACK_IMPORTED_MODULE_5__["createArchiveEntity"])({
|
10273 | http: http,
|
10274 | entityPath: 'assets',
|
10275 | wrapperMethod: wrapAsset
|
10276 | }),
|
10277 | unarchive: Object(_instance_actions__WEBPACK_IMPORTED_MODULE_5__["createUnarchiveEntity"])({
|
10278 | http: http,
|
10279 | entityPath: 'assets',
|
10280 | wrapperMethod: wrapAsset
|
10281 | }),
|
10282 | processForLocale: processForLocale,
|
10283 | processForAllLocales: processForAllLocales,
|
10284 | isPublished: Object(_instance_actions__WEBPACK_IMPORTED_MODULE_5__["createPublishedChecker"])(),
|
10285 | isUpdated: Object(_instance_actions__WEBPACK_IMPORTED_MODULE_5__["createUpdatedChecker"])(),
|
10286 | isDraft: Object(_instance_actions__WEBPACK_IMPORTED_MODULE_5__["createDraftChecker"])(),
|
10287 | isArchived: Object(_instance_actions__WEBPACK_IMPORTED_MODULE_5__["createArchivedChecker"])()
|
10288 | };
|
10289 | }
|
10290 |
|
10291 |
|
10292 |
|
10293 |
|
10294 |
|
10295 |
|
10296 |
|
10297 |
|
10298 | function wrapAsset(http, data) {
|
10299 | var asset = Object(contentful_sdk_core__WEBPACK_IMPORTED_MODULE_1__["toPlainObject"])(lodash_cloneDeep__WEBPACK_IMPORTED_MODULE_0___default()(data));
|
10300 | var assetWithMethods = Object(_enhance_with_methods__WEBPACK_IMPORTED_MODULE_2__["default"])(asset, createAssetApi(http));
|
10301 | return Object(contentful_sdk_core__WEBPACK_IMPORTED_MODULE_1__["freezeSys"])(assetWithMethods);
|
10302 | }
|
10303 |
|
10304 |
|
10305 |
|
10306 |
|
10307 | var wrapAssetCollection = Object(_common_utils__WEBPACK_IMPORTED_MODULE_4__["wrapCollection"])(wrapAsset);
|
10308 |
|
10309 | }),
|
10310 |
|
10311 | "./entities/content-type.ts":
|
10312 |
|
10313 |
|
10314 |
|
10315 |
|
10316 | (function(module, __webpack_exports__, __webpack_require__) {
|
10317 |
|
10318 | "use strict";
|
10319 | __webpack_require__.r(__webpack_exports__);
|
10320 | __webpack_require__.d(__webpack_exports__, "wrapContentType", function() { return wrapContentType; });
|
10321 | __webpack_require__.d(__webpack_exports__, "wrapContentTypeCollection", function() { return wrapContentTypeCollection; });
|
10322 | var lodash_cloneDeep__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__( "../node_modules/lodash/cloneDeep.js");
|
10323 | var lodash_cloneDeep__WEBPACK_IMPORTED_MODULE_0___default = __webpack_require__.n(lodash_cloneDeep__WEBPACK_IMPORTED_MODULE_0__);
|
10324 | var contentful_sdk_core__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__( "../node_modules/contentful-sdk-core/dist/index.es-modules.js");
|
10325 | var _enhance_with_methods__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__( "./enhance-with-methods.ts");
|
10326 | var _common_utils__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__( "./common-utils.ts");
|
10327 | var _instance_actions__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__( "./instance-actions.ts");
|
10328 | var _editor_interface__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__( "./entities/editor-interface.ts");
|
10329 | var _error_handler__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__( "./error-handler.ts");
|
10330 | var _snapshot__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__( "./entities/snapshot.ts");
|
10331 |
|
10332 |
|
10333 |
|
10334 |
|
10335 |
|
10336 |
|
10337 |
|
10338 |
|
10339 |
|
10340 | function createContentTypeApi(http) {
|
10341 | return {
|
10342 | update: Object(_instance_actions__WEBPACK_IMPORTED_MODULE_4__["createUpdateEntity"])({
|
10343 | http: http,
|
10344 | entityPath: 'content_types',
|
10345 | wrapperMethod: wrapContentType
|
10346 | }),
|
10347 | delete: Object(_instance_actions__WEBPACK_IMPORTED_MODULE_4__["createDeleteEntity"])({
|
10348 | http: http,
|
10349 | entityPath: 'content_types'
|
10350 | }),
|
10351 | publish: Object(_instance_actions__WEBPACK_IMPORTED_MODULE_4__["createPublishEntity"])({
|
10352 | http: http,
|
10353 | entityPath: 'content_types',
|
10354 | wrapperMethod: wrapContentType
|
10355 | }),
|
10356 | unpublish: Object(_instance_actions__WEBPACK_IMPORTED_MODULE_4__["createUnpublishEntity"])({
|
10357 | http: http,
|
10358 | entityPath: 'content_types',
|
10359 | wrapperMethod: wrapContentType
|
10360 | }),
|
10361 | getEditorInterface: function getEditorInterface() {
|
10362 | return http.get('content_types/' + this.sys.id + '/editor_interface').then(function (response) {
|
10363 | return Object(_editor_interface__WEBPACK_IMPORTED_MODULE_5__["wrapEditorInterface"])(http, response.data);
|
10364 | }, _error_handler__WEBPACK_IMPORTED_MODULE_6__["default"]);
|
10365 | },
|
10366 | getSnapshots: function getSnapshots() {
|
10367 | var query = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
10368 | return http.get("content_types/".concat(this.sys.id, "/snapshots"), Object(contentful_sdk_core__WEBPACK_IMPORTED_MODULE_1__["createRequestConfig"])({
|
10369 | query: query
|
10370 | })).then(function (response) {
|
10371 | return Object(_snapshot__WEBPACK_IMPORTED_MODULE_7__["wrapSnapshotCollection"])(http, response.data);
|
10372 | }, _error_handler__WEBPACK_IMPORTED_MODULE_6__["default"]);
|
10373 | },
|
10374 | getSnapshot: function getSnapshot(snapshotId) {
|
10375 | return http.get("content_types/".concat(this.sys.id, "/snapshots/").concat(snapshotId)).then(function (response) {
|
10376 | return Object(_snapshot__WEBPACK_IMPORTED_MODULE_7__["wrapSnapshot"])(http, response.data);
|
10377 | }, _error_handler__WEBPACK_IMPORTED_MODULE_6__["default"]);
|
10378 | },
|
10379 | isPublished: Object(_instance_actions__WEBPACK_IMPORTED_MODULE_4__["createPublishedChecker"])(),
|
10380 | isUpdated: Object(_instance_actions__WEBPACK_IMPORTED_MODULE_4__["createUpdatedChecker"])(),
|
10381 | isDraft: Object(_instance_actions__WEBPACK_IMPORTED_MODULE_4__["createDraftChecker"])(),
|
10382 | omitAndDeleteField: function omitAndDeleteField(id) {
|
10383 | return findAndUpdateField(this, id, 'omitted', true).then(function (newContentType) {
|
10384 | return findAndUpdateField(newContentType, id, 'deleted', true);
|
10385 | }).catch(_error_handler__WEBPACK_IMPORTED_MODULE_6__["default"]);
|
10386 | }
|
10387 | };
|
10388 | }
|
10389 |
|
10390 |
|
10391 |
|
10392 |
|
10393 |
|
10394 |
|
10395 |
|
10396 |
|
10397 | var findAndUpdateField = function findAndUpdateField(contentType, id, key, value) {
|
10398 | var field = contentType.fields.find(function (field) {
|
10399 | return field.id === id;
|
10400 | });
|
10401 |
|
10402 | if (!field) {
|
10403 | return Promise.reject(new Error("Tried to omitAndDeleteField on a nonexistent field, ".concat(id, ", on the content type ").concat(contentType.name, ".")));
|
10404 | }
|
10405 |
|
10406 |
|
10407 | field[key] = value;
|
10408 | return contentType.update();
|
10409 | };
|
10410 |
|
10411 |
|
10412 |
|
10413 |
|
10414 |
|
10415 |
|
10416 |
|
10417 |
|
10418 | function wrapContentType(http, data) {
|
10419 | var contentType = Object(contentful_sdk_core__WEBPACK_IMPORTED_MODULE_1__["toPlainObject"])(lodash_cloneDeep__WEBPACK_IMPORTED_MODULE_0___default()(data));
|
10420 | var contentTypeWithMethods = Object(_enhance_with_methods__WEBPACK_IMPORTED_MODULE_2__["default"])(contentType, createContentTypeApi(http));
|
10421 | return Object(contentful_sdk_core__WEBPACK_IMPORTED_MODULE_1__["freezeSys"])(contentTypeWithMethods);
|
10422 | }
|
10423 |
|
10424 |
|
10425 |
|
10426 |
|
10427 | var wrapContentTypeCollection = Object(_common_utils__WEBPACK_IMPORTED_MODULE_3__["wrapCollection"])(wrapContentType);
|
10428 |
|
10429 | }),
|
10430 |
|
10431 | "./entities/editor-interface.ts":
|
10432 |
|
10433 |
|
10434 |
|
10435 |
|
10436 | (function(module, __webpack_exports__, __webpack_require__) {
|
10437 |
|
10438 | "use strict";
|
10439 | __webpack_require__.r(__webpack_exports__);
|
10440 | __webpack_require__.d(__webpack_exports__, "wrapEditorInterface", function() { return wrapEditorInterface; });
|
10441 | var lodash_cloneDeep__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__( "../node_modules/lodash/cloneDeep.js");
|
10442 | var lodash_cloneDeep__WEBPACK_IMPORTED_MODULE_0___default = __webpack_require__.n(lodash_cloneDeep__WEBPACK_IMPORTED_MODULE_0__);
|
10443 | var contentful_sdk_core__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__( "../node_modules/contentful-sdk-core/dist/index.es-modules.js");
|
10444 | var _enhance_with_methods__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__( "./enhance-with-methods.ts");
|
10445 | var _error_handler__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__( "./error-handler.ts");
|
10446 |
|
10447 |
|
10448 |
|
10449 |
|
10450 |
|
10451 | function createEditorInterfaceApi(http) {
|
10452 | return {
|
10453 | update: function update() {
|
10454 | var self = this;
|
10455 | var raw = self.toPlainObject();
|
10456 | var data = lodash_cloneDeep__WEBPACK_IMPORTED_MODULE_0___default()(raw);
|
10457 | delete data.sys;
|
10458 | return http.put("content_types/".concat(self.sys.contentType.sys.id, "/editor_interface"), data, {
|
10459 | headers: {
|
10460 | 'X-Contentful-Version': self.sys.version
|
10461 | }
|
10462 | }).then(function (response) {
|
10463 | return wrapEditorInterface(http, response.data);
|
10464 | }, _error_handler__WEBPACK_IMPORTED_MODULE_3__["default"]);
|
10465 | },
|
10466 | getControlForField: function getControlForField(fieldId) {
|
10467 | var self = this;
|
10468 | var result = self.controls.filter(function (control) {
|
10469 | return control.fieldId === fieldId;
|
10470 | });
|
10471 | return result && result.length > 0 ? result[0] : null;
|
10472 | }
|
10473 | };
|
10474 | }
|
10475 |
|
10476 |
|
10477 |
|
10478 |
|
10479 |
|
10480 | function wrapEditorInterface(http, data) {
|
10481 | var editorInterface = Object(contentful_sdk_core__WEBPACK_IMPORTED_MODULE_1__["toPlainObject"])(lodash_cloneDeep__WEBPACK_IMPORTED_MODULE_0___default()(data));
|
10482 | var editorInterfaceWithMethods = Object(_enhance_with_methods__WEBPACK_IMPORTED_MODULE_2__["default"])(editorInterface, createEditorInterfaceApi(http));
|
10483 | return Object(contentful_sdk_core__WEBPACK_IMPORTED_MODULE_1__["freezeSys"])(editorInterfaceWithMethods);
|
10484 | }
|
10485 |
|
10486 | }),
|
10487 |
|
10488 | "./entities/entry.ts":
|
10489 |
|
10490 |
|
10491 |
|
10492 |
|
10493 | (function(module, __webpack_exports__, __webpack_require__) {
|
10494 |
|
10495 | "use strict";
|
10496 | __webpack_require__.r(__webpack_exports__);
|
10497 | __webpack_require__.d(__webpack_exports__, "wrapEntry", function() { return wrapEntry; });
|
10498 | __webpack_require__.d(__webpack_exports__, "wrapEntryCollection", function() { return wrapEntryCollection; });
|
10499 | var lodash_cloneDeep__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__( "../node_modules/lodash/cloneDeep.js");
|
10500 | var lodash_cloneDeep__WEBPACK_IMPORTED_MODULE_0___default = __webpack_require__.n(lodash_cloneDeep__WEBPACK_IMPORTED_MODULE_0__);
|
10501 | var contentful_sdk_core__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__( "../node_modules/contentful-sdk-core/dist/index.es-modules.js");
|
10502 | var _enhance_with_methods__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__( "./enhance-with-methods.ts");
|
10503 | var _common_utils__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__( "./common-utils.ts");
|
10504 | var _instance_actions__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__( "./instance-actions.ts");
|
10505 | var _error_handler__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__( "./error-handler.ts");
|
10506 | var _snapshot__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__( "./entities/snapshot.ts");
|
10507 |
|
10508 |
|
10509 |
|
10510 |
|
10511 |
|
10512 |
|
10513 |
|
10514 |
|
10515 | function createEntryApi(http) {
|
10516 | return {
|
10517 | update: Object(_instance_actions__WEBPACK_IMPORTED_MODULE_4__["createUpdateEntity"])({
|
10518 | http: http,
|
10519 | entityPath: 'entries',
|
10520 | wrapperMethod: wrapEntry
|
10521 | }),
|
10522 | delete: Object(_instance_actions__WEBPACK_IMPORTED_MODULE_4__["createDeleteEntity"])({
|
10523 | http: http,
|
10524 | entityPath: 'entries'
|
10525 | }),
|
10526 | publish: Object(_instance_actions__WEBPACK_IMPORTED_MODULE_4__["createPublishEntity"])({
|
10527 | http: http,
|
10528 | entityPath: 'entries',
|
10529 | wrapperMethod: wrapEntry
|
10530 | }),
|
10531 | unpublish: Object(_instance_actions__WEBPACK_IMPORTED_MODULE_4__["createUnpublishEntity"])({
|
10532 | http: http,
|
10533 | entityPath: 'entries',
|
10534 | wrapperMethod: wrapEntry
|
10535 | }),
|
10536 | archive: Object(_instance_actions__WEBPACK_IMPORTED_MODULE_4__["createArchiveEntity"])({
|
10537 | http: http,
|
10538 | entityPath: 'entries',
|
10539 | wrapperMethod: wrapEntry
|
10540 | }),
|
10541 | unarchive: Object(_instance_actions__WEBPACK_IMPORTED_MODULE_4__["createUnarchiveEntity"])({
|
10542 | http: http,
|
10543 | entityPath: 'entries',
|
10544 | wrapperMethod: wrapEntry
|
10545 | }),
|
10546 | getSnapshots: function getSnapshots() {
|
10547 | var query = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
10548 | return http.get("entries/".concat(this.sys.id, "/snapshots"), Object(contentful_sdk_core__WEBPACK_IMPORTED_MODULE_1__["createRequestConfig"])({
|
10549 | query: query
|
10550 | })).then(function (response) {
|
10551 | return Object(_snapshot__WEBPACK_IMPORTED_MODULE_6__["wrapSnapshotCollection"])(http, response.data);
|
10552 | }, _error_handler__WEBPACK_IMPORTED_MODULE_5__["default"]);
|
10553 | },
|
10554 | getSnapshot: function getSnapshot(snapshotId) {
|
10555 | return http.get("entries/".concat(this.sys.id, "/snapshots/").concat(snapshotId)).then(function (response) {
|
10556 | return Object(_snapshot__WEBPACK_IMPORTED_MODULE_6__["wrapSnapshot"])(http, response.data);
|
10557 | }, _error_handler__WEBPACK_IMPORTED_MODULE_5__["default"]);
|
10558 | },
|
10559 | isPublished: Object(_instance_actions__WEBPACK_IMPORTED_MODULE_4__["createPublishedChecker"])(),
|
10560 | isUpdated: Object(_instance_actions__WEBPACK_IMPORTED_MODULE_4__["createUpdatedChecker"])(),
|
10561 | isDraft: Object(_instance_actions__WEBPACK_IMPORTED_MODULE_4__["createDraftChecker"])(),
|
10562 | isArchived: Object(_instance_actions__WEBPACK_IMPORTED_MODULE_4__["createArchivedChecker"])()
|
10563 | };
|
10564 | }
|
10565 |
|
10566 |
|
10567 |
|
10568 |
|
10569 |
|
10570 |
|
10571 |
|
10572 |
|
10573 | function wrapEntry(http, data) {
|
10574 | var entry = Object(contentful_sdk_core__WEBPACK_IMPORTED_MODULE_1__["toPlainObject"])(lodash_cloneDeep__WEBPACK_IMPORTED_MODULE_0___default()(data));
|
10575 | var entryWithMethods = Object(_enhance_with_methods__WEBPACK_IMPORTED_MODULE_2__["default"])(entry, createEntryApi(http));
|
10576 | return Object(contentful_sdk_core__WEBPACK_IMPORTED_MODULE_1__["freezeSys"])(entryWithMethods);
|
10577 | }
|
10578 |
|
10579 |
|
10580 |
|
10581 |
|
10582 |
|
10583 | var wrapEntryCollection = Object(_common_utils__WEBPACK_IMPORTED_MODULE_3__["wrapCollection"])(wrapEntry);
|
10584 |
|
10585 | }),
|
10586 |
|
10587 | "./entities/environment-alias.ts":
|
10588 |
|
10589 |
|
10590 |
|
10591 |
|
10592 | (function(module, __webpack_exports__, __webpack_require__) {
|
10593 |
|
10594 | "use strict";
|
10595 | __webpack_require__.r(__webpack_exports__);
|
10596 | __webpack_require__.d(__webpack_exports__, "wrapEnvironmentAlias", function() { return wrapEnvironmentAlias; });
|
10597 | __webpack_require__.d(__webpack_exports__, "wrapEnvironmentAliasCollection", function() { return wrapEnvironmentAliasCollection; });
|
10598 | var lodash_cloneDeep__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__( "../node_modules/lodash/cloneDeep.js");
|
10599 | var lodash_cloneDeep__WEBPACK_IMPORTED_MODULE_0___default = __webpack_require__.n(lodash_cloneDeep__WEBPACK_IMPORTED_MODULE_0__);
|
10600 | var contentful_sdk_core__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__( "../node_modules/contentful-sdk-core/dist/index.es-modules.js");
|
10601 | var _enhance_with_methods__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__( "./enhance-with-methods.ts");
|
10602 | var _instance_actions__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__( "./instance-actions.ts");
|
10603 | var _common_utils__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__( "./common-utils.ts");
|
10604 |
|
10605 |
|
10606 |
|
10607 |
|
10608 |
|
10609 |
|
10610 | function createEnvironmentAliasApi(http) {
|
10611 | return {
|
10612 | update: Object(_instance_actions__WEBPACK_IMPORTED_MODULE_3__["createUpdateEntity"])({
|
10613 | http: http,
|
10614 | entityPath: 'environment_aliases',
|
10615 | wrapperMethod: wrapEnvironmentAlias
|
10616 | })
|
10617 | };
|
10618 | }
|
10619 |
|
10620 |
|
10621 |
|
10622 |
|
10623 |
|
10624 |
|
10625 |
|
10626 |
|
10627 | function wrapEnvironmentAlias(http, data) {
|
10628 | var alias = Object(contentful_sdk_core__WEBPACK_IMPORTED_MODULE_1__["toPlainObject"])(lodash_cloneDeep__WEBPACK_IMPORTED_MODULE_0___default()(data));
|
10629 | var enhancedAlias = Object(_enhance_with_methods__WEBPACK_IMPORTED_MODULE_2__["default"])(alias, createEnvironmentAliasApi(http));
|
10630 | return Object(contentful_sdk_core__WEBPACK_IMPORTED_MODULE_1__["freezeSys"])(enhancedAlias);
|
10631 | }
|
10632 |
|
10633 |
|
10634 |
|
10635 |
|
10636 |
|
10637 |
|
10638 |
|
10639 | var wrapEnvironmentAliasCollection = Object(_common_utils__WEBPACK_IMPORTED_MODULE_4__["wrapCollection"])(wrapEnvironmentAlias);
|
10640 |
|
10641 | }),
|
10642 |
|
10643 | "./entities/environment.ts":
|
10644 |
|
10645 |
|
10646 |
|
10647 |
|
10648 | (function(module, __webpack_exports__, __webpack_require__) {
|
10649 |
|
10650 | "use strict";
|
10651 | __webpack_require__.r(__webpack_exports__);
|
10652 | __webpack_require__.d(__webpack_exports__, "wrapEnvironment", function() { return wrapEnvironment; });
|
10653 | __webpack_require__.d(__webpack_exports__, "wrapEnvironmentCollection", function() { return wrapEnvironmentCollection; });
|
10654 | var lodash_cloneDeep__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__( "../node_modules/lodash/cloneDeep.js");
|
10655 | var lodash_cloneDeep__WEBPACK_IMPORTED_MODULE_0___default = __webpack_require__.n(lodash_cloneDeep__WEBPACK_IMPORTED_MODULE_0__);
|
10656 | var contentful_sdk_core__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__( "../node_modules/contentful-sdk-core/dist/index.es-modules.js");
|
10657 | var _enhance_with_methods__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__( "./enhance-with-methods.ts");
|
10658 | var _create_environment_api__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__( "./create-environment-api.ts");
|
10659 | var _common_utils__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__( "./common-utils.ts");
|
10660 |
|
10661 |
|
10662 |
|
10663 |
|
10664 |
|
10665 |
|
10666 |
|
10667 |
|
10668 |
|
10669 |
|
10670 |
|
10671 |
|
10672 |
|
10673 |
|
10674 |
|
10675 |
|
10676 | function wrapEnvironment(http, data) {
|
10677 |
|
10678 | var sdkHttp = http;
|
10679 | var environment = Object(contentful_sdk_core__WEBPACK_IMPORTED_MODULE_1__["toPlainObject"])(lodash_cloneDeep__WEBPACK_IMPORTED_MODULE_0___default()(data));
|
10680 | var _sdkHttp$httpClientPa = sdkHttp.httpClientParams,
|
10681 | hostUpload = _sdkHttp$httpClientPa.hostUpload,
|
10682 | defaultHostnameUpload = _sdkHttp$httpClientPa.defaultHostnameUpload;
|
10683 | var environmentScopedHttpClient = sdkHttp.cloneWithNewParams({
|
10684 | baseURL: http.defaults.baseURL + 'environments/' + environment.sys.id
|
10685 | });
|
10686 | var environmentScopedUploadClient = sdkHttp.cloneWithNewParams({
|
10687 | space: environment.sys.space.sys.id,
|
10688 | host: hostUpload || defaultHostnameUpload
|
10689 | });
|
10690 | var environmentApi = Object(_create_environment_api__WEBPACK_IMPORTED_MODULE_3__["default"])({
|
10691 | http: environmentScopedHttpClient,
|
10692 | httpUpload: environmentScopedUploadClient
|
10693 | });
|
10694 | var enhancedEnvironment = Object(_enhance_with_methods__WEBPACK_IMPORTED_MODULE_2__["default"])(environment, environmentApi);
|
10695 | return Object(contentful_sdk_core__WEBPACK_IMPORTED_MODULE_1__["freezeSys"])(enhancedEnvironment);
|
10696 | }
|
10697 |
|
10698 |
|
10699 |
|
10700 |
|
10701 |
|
10702 |
|
10703 | var wrapEnvironmentCollection = Object(_common_utils__WEBPACK_IMPORTED_MODULE_4__["wrapCollection"])(wrapEnvironment);
|
10704 |
|
10705 | }),
|
10706 |
|
10707 | "./entities/index.ts":
|
10708 |
|
10709 |
|
10710 |
|
10711 |
|
10712 | (function(module, __webpack_exports__, __webpack_require__) {
|
10713 |
|
10714 | "use strict";
|
10715 | __webpack_require__.r(__webpack_exports__);
|
10716 | var _app_definition__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__( "./entities/app-definition.ts");
|
10717 | var _space__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__( "./entities/space.ts");
|
10718 | var _environment__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__( "./entities/environment.ts");
|
10719 | var _entry__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__( "./entities/entry.ts");
|
10720 | var _asset__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__( "./entities/asset.ts");
|
10721 | var _content_type__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__( "./entities/content-type.ts");
|
10722 | var _editor_interface__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__( "./entities/editor-interface.ts");
|
10723 | var _locale__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__( "./entities/locale.ts");
|
10724 | var _webhook__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__( "./entities/webhook.ts");
|
10725 | var _space_member__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__( "./entities/space-member.ts");
|
10726 | var _space_membership__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__( "./entities/space-membership.ts");
|
10727 | var _team_space_membership__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__( "./entities/team-space-membership.ts");
|
10728 | var _organization_membership__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__( "./entities/organization-membership.ts");
|
10729 | var _organization_invitation__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__( "./entities/organization-invitation.ts");
|
10730 | var _role__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__( "./entities/role.ts");
|
10731 | var _api_key__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__( "./entities/api-key.ts");
|
10732 | var _preview_api_key__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__( "./entities/preview-api-key.ts");
|
10733 | var _upload__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__( "./entities/upload.ts");
|
10734 | var _organization__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__( "./entities/organization.ts");
|
10735 | var _ui_extension__WEBPACK_IMPORTED_MODULE_19__ = __webpack_require__( "./entities/ui-extension.ts");
|
10736 | var _app_installation__WEBPACK_IMPORTED_MODULE_20__ = __webpack_require__( "./entities/app-installation.ts");
|
10737 | var _snapshot__WEBPACK_IMPORTED_MODULE_21__ = __webpack_require__( "./entities/snapshot.ts");
|
10738 | var _user__WEBPACK_IMPORTED_MODULE_22__ = __webpack_require__( "./entities/user.ts");
|
10739 | var _personal_access_token__WEBPACK_IMPORTED_MODULE_23__ = __webpack_require__( "./entities/personal-access-token.ts");
|
10740 | var _usage__WEBPACK_IMPORTED_MODULE_24__ = __webpack_require__( "./entities/usage.ts");
|
10741 | var _environment_alias__WEBPACK_IMPORTED_MODULE_25__ = __webpack_require__( "./entities/environment-alias.ts");
|
10742 | var _team__WEBPACK_IMPORTED_MODULE_26__ = __webpack_require__( "./entities/team.ts");
|
10743 | var _team_membership__WEBPACK_IMPORTED_MODULE_27__ = __webpack_require__( "./entities/team-membership.ts");
|
10744 |
|
10745 |
|
10746 |
|
10747 |
|
10748 |
|
10749 |
|
10750 |
|
10751 |
|
10752 |
|
10753 |
|
10754 |
|
10755 |
|
10756 |
|
10757 |
|
10758 |
|
10759 |
|
10760 |
|
10761 |
|
10762 |
|
10763 |
|
10764 |
|
10765 |
|
10766 |
|
10767 |
|
10768 |
|
10769 |
|
10770 |
|
10771 |
|
10772 | __webpack_exports__["default"] = ({
|
10773 | appDefinition: _app_definition__WEBPACK_IMPORTED_MODULE_0__,
|
10774 | space: _space__WEBPACK_IMPORTED_MODULE_1__,
|
10775 | environment: _environment__WEBPACK_IMPORTED_MODULE_2__,
|
10776 | entry: _entry__WEBPACK_IMPORTED_MODULE_3__,
|
10777 | asset: _asset__WEBPACK_IMPORTED_MODULE_4__,
|
10778 | contentType: _content_type__WEBPACK_IMPORTED_MODULE_5__,
|
10779 | editorInterface: _editor_interface__WEBPACK_IMPORTED_MODULE_6__,
|
10780 | locale: _locale__WEBPACK_IMPORTED_MODULE_7__,
|
10781 | webhook: _webhook__WEBPACK_IMPORTED_MODULE_8__,
|
10782 | spaceMember: _space_member__WEBPACK_IMPORTED_MODULE_9__,
|
10783 | spaceMembership: _space_membership__WEBPACK_IMPORTED_MODULE_10__,
|
10784 | teamSpaceMembership: _team_space_membership__WEBPACK_IMPORTED_MODULE_11__,
|
10785 | organizationMembership: _organization_membership__WEBPACK_IMPORTED_MODULE_12__,
|
10786 | organizationInvitation: _organization_invitation__WEBPACK_IMPORTED_MODULE_13__,
|
10787 | role: _role__WEBPACK_IMPORTED_MODULE_14__,
|
10788 | apiKey: _api_key__WEBPACK_IMPORTED_MODULE_15__,
|
10789 | previewApiKey: _preview_api_key__WEBPACK_IMPORTED_MODULE_16__,
|
10790 | upload: _upload__WEBPACK_IMPORTED_MODULE_17__,
|
10791 | organization: _organization__WEBPACK_IMPORTED_MODULE_18__,
|
10792 | uiExtension: _ui_extension__WEBPACK_IMPORTED_MODULE_19__,
|
10793 | appInstallation: _app_installation__WEBPACK_IMPORTED_MODULE_20__,
|
10794 | snapshot: _snapshot__WEBPACK_IMPORTED_MODULE_21__,
|
10795 | user: _user__WEBPACK_IMPORTED_MODULE_22__,
|
10796 | personalAccessToken: _personal_access_token__WEBPACK_IMPORTED_MODULE_23__,
|
10797 | usage: _usage__WEBPACK_IMPORTED_MODULE_24__,
|
10798 | environmentAlias: _environment_alias__WEBPACK_IMPORTED_MODULE_25__,
|
10799 | team: _team__WEBPACK_IMPORTED_MODULE_26__,
|
10800 | teamMembership: _team_membership__WEBPACK_IMPORTED_MODULE_27__
|
10801 | });
|
10802 |
|
10803 | }),
|
10804 |
|
10805 | "./entities/locale.ts":
|
10806 |
|
10807 |
|
10808 |
|
10809 |
|
10810 | (function(module, __webpack_exports__, __webpack_require__) {
|
10811 |
|
10812 | "use strict";
|
10813 | __webpack_require__.r(__webpack_exports__);
|
10814 | __webpack_require__.d(__webpack_exports__, "wrapLocale", function() { return wrapLocale; });
|
10815 | __webpack_require__.d(__webpack_exports__, "wrapLocaleCollection", function() { return wrapLocaleCollection; });
|
10816 | var lodash_cloneDeep__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__( "../node_modules/lodash/cloneDeep.js");
|
10817 | var lodash_cloneDeep__WEBPACK_IMPORTED_MODULE_0___default = __webpack_require__.n(lodash_cloneDeep__WEBPACK_IMPORTED_MODULE_0__);
|
10818 | var contentful_sdk_core__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__( "../node_modules/contentful-sdk-core/dist/index.es-modules.js");
|
10819 | var _enhance_with_methods__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__( "./enhance-with-methods.ts");
|
10820 | var _common_utils__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__( "./common-utils.ts");
|
10821 | var _instance_actions__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__( "./instance-actions.ts");
|
10822 |
|
10823 |
|
10824 |
|
10825 |
|
10826 |
|
10827 |
|
10828 | function createLocaleApi(http) {
|
10829 | return {
|
10830 | update: function update() {
|
10831 | var self = this;
|
10832 | delete self.default;
|
10833 |
|
10834 | return Object(_instance_actions__WEBPACK_IMPORTED_MODULE_4__["createUpdateEntity"])({
|
10835 | http: http,
|
10836 | entityPath: 'locales',
|
10837 | wrapperMethod: wrapLocale
|
10838 | }).call(self);
|
10839 | },
|
10840 | delete: Object(_instance_actions__WEBPACK_IMPORTED_MODULE_4__["createDeleteEntity"])({
|
10841 | http: http,
|
10842 | entityPath: 'locales'
|
10843 | })
|
10844 | };
|
10845 | }
|
10846 |
|
10847 |
|
10848 |
|
10849 |
|
10850 |
|
10851 |
|
10852 |
|
10853 |
|
10854 | function wrapLocale(http, data) {
|
10855 |
|
10856 |
|
10857 | delete data.internal_code;
|
10858 | var locale = Object(contentful_sdk_core__WEBPACK_IMPORTED_MODULE_1__["toPlainObject"])(lodash_cloneDeep__WEBPACK_IMPORTED_MODULE_0___default()(data));
|
10859 | var localeWithMethods = Object(_enhance_with_methods__WEBPACK_IMPORTED_MODULE_2__["default"])(locale, createLocaleApi(http));
|
10860 | return Object(contentful_sdk_core__WEBPACK_IMPORTED_MODULE_1__["freezeSys"])(localeWithMethods);
|
10861 | }
|
10862 |
|
10863 |
|
10864 |
|
10865 |
|
10866 | var wrapLocaleCollection = Object(_common_utils__WEBPACK_IMPORTED_MODULE_3__["wrapCollection"])(wrapLocale);
|
10867 |
|
10868 | }),
|
10869 |
|
10870 | "./entities/organization-invitation.ts":
|
10871 |
|
10872 |
|
10873 |
|
10874 |
|
10875 | (function(module, __webpack_exports__, __webpack_require__) {
|
10876 |
|
10877 | "use strict";
|
10878 | __webpack_require__.r(__webpack_exports__);
|
10879 | __webpack_require__.d(__webpack_exports__, "wrapOrganizationInvitation", function() { return wrapOrganizationInvitation; });
|
10880 | var lodash_cloneDeep__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__( "../node_modules/lodash/cloneDeep.js");
|
10881 | var lodash_cloneDeep__WEBPACK_IMPORTED_MODULE_0___default = __webpack_require__.n(lodash_cloneDeep__WEBPACK_IMPORTED_MODULE_0__);
|
10882 | var contentful_sdk_core__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__( "../node_modules/contentful-sdk-core/dist/index.es-modules.js");
|
10883 |
|
10884 |
|
10885 |
|
10886 |
|
10887 |
|
10888 |
|
10889 |
|
10890 |
|
10891 |
|
10892 | function wrapOrganizationInvitation(http, data) {
|
10893 | var invitation = Object(contentful_sdk_core__WEBPACK_IMPORTED_MODULE_1__["toPlainObject"])(lodash_cloneDeep__WEBPACK_IMPORTED_MODULE_0___default()(data));
|
10894 | return Object(contentful_sdk_core__WEBPACK_IMPORTED_MODULE_1__["freezeSys"])(invitation);
|
10895 | }
|
10896 |
|
10897 | }),
|
10898 |
|
10899 | "./entities/organization-membership.ts":
|
10900 |
|
10901 |
|
10902 |
|
10903 |
|
10904 | (function(module, __webpack_exports__, __webpack_require__) {
|
10905 |
|
10906 | "use strict";
|
10907 | __webpack_require__.r(__webpack_exports__);
|
10908 | __webpack_require__.d(__webpack_exports__, "wrapOrganizationMembership", function() { return wrapOrganizationMembership; });
|
10909 | __webpack_require__.d(__webpack_exports__, "wrapOrganizationMembershipCollection", function() { return wrapOrganizationMembershipCollection; });
|
10910 | var lodash_cloneDeep__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__( "../node_modules/lodash/cloneDeep.js");
|
10911 | var lodash_cloneDeep__WEBPACK_IMPORTED_MODULE_0___default = __webpack_require__.n(lodash_cloneDeep__WEBPACK_IMPORTED_MODULE_0__);
|
10912 | var contentful_sdk_core__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__( "../node_modules/contentful-sdk-core/dist/index.es-modules.js");
|
10913 | var _enhance_with_methods__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__( "./enhance-with-methods.ts");
|
10914 | var _error_handler__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__( "./error-handler.ts");
|
10915 | var _instance_actions__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__( "./instance-actions.ts");
|
10916 | var _common_utils__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__( "./common-utils.ts");
|
10917 |
|
10918 |
|
10919 |
|
10920 |
|
10921 |
|
10922 |
|
10923 |
|
10924 | function createOrganizationMembershipApi(http) {
|
10925 | return {
|
10926 | update: function update() {
|
10927 | var self = this;
|
10928 | var raw = self.toPlainObject();
|
10929 | var role = raw.role;
|
10930 | return http.put('organization_memberships' + '/' + self.sys.id, {
|
10931 | role: role
|
10932 | }, {
|
10933 | headers: {
|
10934 | 'X-Contentful-Version': self.sys.version || 0
|
10935 | }
|
10936 | }).then(function (response) {
|
10937 | return wrapOrganizationMembership(http, response.data);
|
10938 | }, _error_handler__WEBPACK_IMPORTED_MODULE_3__["default"]);
|
10939 | },
|
10940 | delete: Object(_instance_actions__WEBPACK_IMPORTED_MODULE_4__["createDeleteEntity"])({
|
10941 | http: http,
|
10942 | entityPath: 'organization_memberships'
|
10943 | })
|
10944 | };
|
10945 | }
|
10946 |
|
10947 |
|
10948 |
|
10949 |
|
10950 |
|
10951 |
|
10952 |
|
10953 |
|
10954 | function wrapOrganizationMembership(http, data) {
|
10955 | var organizationMembership = Object(contentful_sdk_core__WEBPACK_IMPORTED_MODULE_1__["toPlainObject"])(lodash_cloneDeep__WEBPACK_IMPORTED_MODULE_0___default()(data));
|
10956 | var organizationMembershipWithMethods = Object(_enhance_with_methods__WEBPACK_IMPORTED_MODULE_2__["default"])(organizationMembership, createOrganizationMembershipApi(http));
|
10957 | return Object(contentful_sdk_core__WEBPACK_IMPORTED_MODULE_1__["freezeSys"])(organizationMembershipWithMethods);
|
10958 | }
|
10959 |
|
10960 |
|
10961 |
|
10962 |
|
10963 | var wrapOrganizationMembershipCollection = Object(_common_utils__WEBPACK_IMPORTED_MODULE_5__["wrapCollection"])(wrapOrganizationMembership);
|
10964 |
|
10965 | }),
|
10966 |
|
10967 | "./entities/organization.ts":
|
10968 |
|
10969 |
|
10970 |
|
10971 |
|
10972 | (function(module, __webpack_exports__, __webpack_require__) {
|
10973 |
|
10974 | "use strict";
|
10975 | __webpack_require__.r(__webpack_exports__);
|
10976 | __webpack_require__.d(__webpack_exports__, "wrapOrganization", function() { return wrapOrganization; });
|
10977 | __webpack_require__.d(__webpack_exports__, "wrapOrganizationCollection", function() { return wrapOrganizationCollection; });
|
10978 | var lodash_cloneDeep__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__( "../node_modules/lodash/cloneDeep.js");
|
10979 | var lodash_cloneDeep__WEBPACK_IMPORTED_MODULE_0___default = __webpack_require__.n(lodash_cloneDeep__WEBPACK_IMPORTED_MODULE_0__);
|
10980 | var contentful_sdk_core__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__( "../node_modules/contentful-sdk-core/dist/index.es-modules.js");
|
10981 | var _enhance_with_methods__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__( "./enhance-with-methods.ts");
|
10982 | var _create_organization_api__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__( "./create-organization-api.ts");
|
10983 | var _common_utils__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__( "./common-utils.ts");
|
10984 |
|
10985 |
|
10986 |
|
10987 |
|
10988 |
|
10989 |
|
10990 |
|
10991 |
|
10992 |
|
10993 |
|
10994 |
|
10995 |
|
10996 |
|
10997 |
|
10998 |
|
10999 |
|
11000 | function wrapOrganization(http, data) {
|
11001 | var org = Object(contentful_sdk_core__WEBPACK_IMPORTED_MODULE_1__["toPlainObject"])(lodash_cloneDeep__WEBPACK_IMPORTED_MODULE_0___default()(data));
|
11002 | var baseURL = (http.defaults.baseURL || '').replace('/spaces/', '/organizations/') + org.sys.id + '/';
|
11003 |
|
11004 | var orgScopedHttpClient = http.cloneWithNewParams({
|
11005 | baseURL: baseURL
|
11006 | });
|
11007 | var orgApi = Object(_create_organization_api__WEBPACK_IMPORTED_MODULE_3__["default"])({
|
11008 | http: orgScopedHttpClient
|
11009 | });
|
11010 | var enhancedOrganization = Object(_enhance_with_methods__WEBPACK_IMPORTED_MODULE_2__["default"])(org, orgApi);
|
11011 | return Object(contentful_sdk_core__WEBPACK_IMPORTED_MODULE_1__["freezeSys"])(enhancedOrganization);
|
11012 | }
|
11013 |
|
11014 |
|
11015 |
|
11016 |
|
11017 |
|
11018 | var wrapOrganizationCollection = Object(_common_utils__WEBPACK_IMPORTED_MODULE_4__["wrapCollection"])(wrapOrganization);
|
11019 |
|
11020 | }),
|
11021 |
|
11022 | "./entities/personal-access-token.ts":
|
11023 |
|
11024 |
|
11025 |
|
11026 |
|
11027 | (function(module, __webpack_exports__, __webpack_require__) {
|
11028 |
|
11029 | "use strict";
|
11030 | __webpack_require__.r(__webpack_exports__);
|
11031 | __webpack_require__.d(__webpack_exports__, "wrapPersonalAccessToken", function() { return wrapPersonalAccessToken; });
|
11032 | __webpack_require__.d(__webpack_exports__, "wrapPersonalAccessTokenCollection", function() { return wrapPersonalAccessTokenCollection; });
|
11033 | var lodash_cloneDeep__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__( "../node_modules/lodash/cloneDeep.js");
|
11034 | var lodash_cloneDeep__WEBPACK_IMPORTED_MODULE_0___default = __webpack_require__.n(lodash_cloneDeep__WEBPACK_IMPORTED_MODULE_0__);
|
11035 | var contentful_sdk_core__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__( "../node_modules/contentful-sdk-core/dist/index.es-modules.js");
|
11036 | var _enhance_with_methods__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__( "./enhance-with-methods.ts");
|
11037 | var _error_handler__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__( "./error-handler.ts");
|
11038 | var _common_utils__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__( "./common-utils.ts");
|
11039 |
|
11040 |
|
11041 |
|
11042 |
|
11043 |
|
11044 |
|
11045 | function createPersonalAccessToken(http) {
|
11046 | return {
|
11047 | revoke: function revoke() {
|
11048 | var baseURL = (http.defaults.baseURL || '').replace('/spaces/', '/users/me/access_tokens');
|
11049 | return http.put("".concat(this.sys.id, "/revoked"), null, {
|
11050 | baseURL: baseURL
|
11051 | }).then(function (response) {
|
11052 | return response.data;
|
11053 | }, _error_handler__WEBPACK_IMPORTED_MODULE_3__["default"]);
|
11054 | }
|
11055 | };
|
11056 | }
|
11057 |
|
11058 |
|
11059 |
|
11060 |
|
11061 |
|
11062 |
|
11063 |
|
11064 |
|
11065 | function wrapPersonalAccessToken(http, data) {
|
11066 | var personalAccessToken = Object(contentful_sdk_core__WEBPACK_IMPORTED_MODULE_1__["toPlainObject"])(lodash_cloneDeep__WEBPACK_IMPORTED_MODULE_0___default()(data));
|
11067 | var personalAccessTokenWithMethods = Object(_enhance_with_methods__WEBPACK_IMPORTED_MODULE_2__["default"])(personalAccessToken, createPersonalAccessToken(http));
|
11068 | return Object(contentful_sdk_core__WEBPACK_IMPORTED_MODULE_1__["freezeSys"])(personalAccessTokenWithMethods);
|
11069 | }
|
11070 |
|
11071 |
|
11072 |
|
11073 |
|
11074 |
|
11075 |
|
11076 |
|
11077 | var wrapPersonalAccessTokenCollection = Object(_common_utils__WEBPACK_IMPORTED_MODULE_4__["wrapCollection"])(wrapPersonalAccessToken);
|
11078 |
|
11079 | }),
|
11080 |
|
11081 | "./entities/preview-api-key.ts":
|
11082 |
|
11083 |
|
11084 |
|
11085 |
|
11086 | (function(module, __webpack_exports__, __webpack_require__) {
|
11087 |
|
11088 | "use strict";
|
11089 | __webpack_require__.r(__webpack_exports__);
|
11090 | __webpack_require__.d(__webpack_exports__, "wrapPreviewApiKey", function() { return wrapPreviewApiKey; });
|
11091 | __webpack_require__.d(__webpack_exports__, "wrapPreviewApiKeyCollection", function() { return wrapPreviewApiKeyCollection; });
|
11092 | var lodash_cloneDeep__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__( "../node_modules/lodash/cloneDeep.js");
|
11093 | var lodash_cloneDeep__WEBPACK_IMPORTED_MODULE_0___default = __webpack_require__.n(lodash_cloneDeep__WEBPACK_IMPORTED_MODULE_0__);
|
11094 | var contentful_sdk_core__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__( "../node_modules/contentful-sdk-core/dist/index.es-modules.js");
|
11095 | var _enhance_with_methods__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__( "./enhance-with-methods.ts");
|
11096 | var _common_utils__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__( "./common-utils.ts");
|
11097 |
|
11098 |
|
11099 |
|
11100 |
|
11101 |
|
11102 | function createPreviewApiKeyApi() {
|
11103 | return {};
|
11104 | }
|
11105 |
|
11106 |
|
11107 |
|
11108 |
|
11109 |
|
11110 |
|
11111 |
|
11112 |
|
11113 | function wrapPreviewApiKey(_http, data) {
|
11114 | var previewApiKey = Object(contentful_sdk_core__WEBPACK_IMPORTED_MODULE_1__["toPlainObject"])(lodash_cloneDeep__WEBPACK_IMPORTED_MODULE_0___default()(data));
|
11115 | var previewApiKeyWithMethods = Object(_enhance_with_methods__WEBPACK_IMPORTED_MODULE_2__["default"])(previewApiKey, createPreviewApiKeyApi());
|
11116 | return Object(contentful_sdk_core__WEBPACK_IMPORTED_MODULE_1__["freezeSys"])(previewApiKeyWithMethods);
|
11117 | }
|
11118 |
|
11119 |
|
11120 |
|
11121 |
|
11122 | var wrapPreviewApiKeyCollection = Object(_common_utils__WEBPACK_IMPORTED_MODULE_3__["wrapCollection"])(wrapPreviewApiKey);
|
11123 |
|
11124 | }),
|
11125 |
|
11126 | "./entities/role.ts":
|
11127 |
|
11128 |
|
11129 |
|
11130 |
|
11131 | (function(module, __webpack_exports__, __webpack_require__) {
|
11132 |
|
11133 | "use strict";
|
11134 | __webpack_require__.r(__webpack_exports__);
|
11135 | __webpack_require__.d(__webpack_exports__, "wrapRole", function() { return wrapRole; });
|
11136 | __webpack_require__.d(__webpack_exports__, "wrapRoleCollection", function() { return wrapRoleCollection; });
|
11137 | var lodash_cloneDeep__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__( "../node_modules/lodash/cloneDeep.js");
|
11138 | var lodash_cloneDeep__WEBPACK_IMPORTED_MODULE_0___default = __webpack_require__.n(lodash_cloneDeep__WEBPACK_IMPORTED_MODULE_0__);
|
11139 | var contentful_sdk_core__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__( "../node_modules/contentful-sdk-core/dist/index.es-modules.js");
|
11140 | var _enhance_with_methods__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__( "./enhance-with-methods.ts");
|
11141 | var _common_utils__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__( "./common-utils.ts");
|
11142 | var _instance_actions__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__( "./instance-actions.ts");
|
11143 |
|
11144 |
|
11145 |
|
11146 |
|
11147 |
|
11148 |
|
11149 | function createRoleApi(http) {
|
11150 | return {
|
11151 | update: Object(_instance_actions__WEBPACK_IMPORTED_MODULE_4__["createUpdateEntity"])({
|
11152 | http: http,
|
11153 | entityPath: 'roles',
|
11154 | wrapperMethod: wrapRole
|
11155 | }),
|
11156 | delete: Object(_instance_actions__WEBPACK_IMPORTED_MODULE_4__["createDeleteEntity"])({
|
11157 | http: http,
|
11158 | entityPath: 'roles'
|
11159 | })
|
11160 | };
|
11161 | }
|
11162 |
|
11163 |
|
11164 |
|
11165 |
|
11166 |
|
11167 |
|
11168 |
|
11169 |
|
11170 | function wrapRole(http, data) {
|
11171 | var role = Object(contentful_sdk_core__WEBPACK_IMPORTED_MODULE_1__["toPlainObject"])(lodash_cloneDeep__WEBPACK_IMPORTED_MODULE_0___default()(data));
|
11172 | var roleWithMethods = Object(_enhance_with_methods__WEBPACK_IMPORTED_MODULE_2__["default"])(role, createRoleApi(http));
|
11173 | return Object(contentful_sdk_core__WEBPACK_IMPORTED_MODULE_1__["freezeSys"])(roleWithMethods);
|
11174 | }
|
11175 |
|
11176 |
|
11177 |
|
11178 |
|
11179 | var wrapRoleCollection = Object(_common_utils__WEBPACK_IMPORTED_MODULE_3__["wrapCollection"])(wrapRole);
|
11180 |
|
11181 | }),
|
11182 |
|
11183 | "./entities/snapshot.ts":
|
11184 |
|
11185 |
|
11186 |
|
11187 |
|
11188 | (function(module, __webpack_exports__, __webpack_require__) {
|
11189 |
|
11190 | "use strict";
|
11191 | __webpack_require__.r(__webpack_exports__);
|
11192 | __webpack_require__.d(__webpack_exports__, "wrapSnapshot", function() { return wrapSnapshot; });
|
11193 | __webpack_require__.d(__webpack_exports__, "wrapSnapshotCollection", function() { return wrapSnapshotCollection; });
|
11194 | var lodash_cloneDeep__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__( "../node_modules/lodash/cloneDeep.js");
|
11195 | var lodash_cloneDeep__WEBPACK_IMPORTED_MODULE_0___default = __webpack_require__.n(lodash_cloneDeep__WEBPACK_IMPORTED_MODULE_0__);
|
11196 | var contentful_sdk_core__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__( "../node_modules/contentful-sdk-core/dist/index.es-modules.js");
|
11197 | var _enhance_with_methods__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__( "./enhance-with-methods.ts");
|
11198 | var _common_utils__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__( "./common-utils.ts");
|
11199 |
|
11200 |
|
11201 |
|
11202 |
|
11203 |
|
11204 | function createSnapshotApi() {
|
11205 | return {
|
11206 |
|
11207 | };
|
11208 | }
|
11209 |
|
11210 |
|
11211 |
|
11212 |
|
11213 |
|
11214 |
|
11215 |
|
11216 |
|
11217 | function wrapSnapshot(_http, data) {
|
11218 | var snapshot = Object(contentful_sdk_core__WEBPACK_IMPORTED_MODULE_1__["toPlainObject"])(lodash_cloneDeep__WEBPACK_IMPORTED_MODULE_0___default()(data));
|
11219 | var snapshotWithMethods = Object(_enhance_with_methods__WEBPACK_IMPORTED_MODULE_2__["default"])(snapshot, createSnapshotApi());
|
11220 | return Object(contentful_sdk_core__WEBPACK_IMPORTED_MODULE_1__["freezeSys"])(snapshotWithMethods);
|
11221 | }
|
11222 |
|
11223 |
|
11224 |
|
11225 |
|
11226 |
|
11227 |
|
11228 |
|
11229 | var wrapSnapshotCollection = Object(_common_utils__WEBPACK_IMPORTED_MODULE_3__["wrapCollection"])(wrapSnapshot);
|
11230 |
|
11231 | }),
|
11232 |
|
11233 | "./entities/space-member.ts":
|
11234 |
|
11235 |
|
11236 |
|
11237 |
|
11238 | (function(module, __webpack_exports__, __webpack_require__) {
|
11239 |
|
11240 | "use strict";
|
11241 | __webpack_require__.r(__webpack_exports__);
|
11242 | __webpack_require__.d(__webpack_exports__, "wrapSpaceMember", function() { return wrapSpaceMember; });
|
11243 | __webpack_require__.d(__webpack_exports__, "wrapSpaceMemberCollection", function() { return wrapSpaceMemberCollection; });
|
11244 | var lodash_cloneDeep__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__( "../node_modules/lodash/cloneDeep.js");
|
11245 | var lodash_cloneDeep__WEBPACK_IMPORTED_MODULE_0___default = __webpack_require__.n(lodash_cloneDeep__WEBPACK_IMPORTED_MODULE_0__);
|
11246 | var contentful_sdk_core__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__( "../node_modules/contentful-sdk-core/dist/index.es-modules.js");
|
11247 | var _common_utils__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__( "./common-utils.ts");
|
11248 |
|
11249 |
|
11250 |
|
11251 |
|
11252 |
|
11253 |
|
11254 |
|
11255 |
|
11256 |
|
11257 |
|
11258 | function wrapSpaceMember(http, data) {
|
11259 | var spaceMember = Object(contentful_sdk_core__WEBPACK_IMPORTED_MODULE_1__["toPlainObject"])(lodash_cloneDeep__WEBPACK_IMPORTED_MODULE_0___default()(data));
|
11260 | return Object(contentful_sdk_core__WEBPACK_IMPORTED_MODULE_1__["freezeSys"])(spaceMember);
|
11261 | }
|
11262 |
|
11263 |
|
11264 |
|
11265 |
|
11266 | var wrapSpaceMemberCollection = Object(_common_utils__WEBPACK_IMPORTED_MODULE_2__["wrapCollection"])(wrapSpaceMember);
|
11267 |
|
11268 | }),
|
11269 |
|
11270 | "./entities/space-membership.ts":
|
11271 |
|
11272 |
|
11273 |
|
11274 |
|
11275 | (function(module, __webpack_exports__, __webpack_require__) {
|
11276 |
|
11277 | "use strict";
|
11278 | __webpack_require__.r(__webpack_exports__);
|
11279 | __webpack_require__.d(__webpack_exports__, "wrapSpaceMembership", function() { return wrapSpaceMembership; });
|
11280 | __webpack_require__.d(__webpack_exports__, "wrapSpaceMembershipCollection", function() { return wrapSpaceMembershipCollection; });
|
11281 | var lodash_cloneDeep__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__( "../node_modules/lodash/cloneDeep.js");
|
11282 | var lodash_cloneDeep__WEBPACK_IMPORTED_MODULE_0___default = __webpack_require__.n(lodash_cloneDeep__WEBPACK_IMPORTED_MODULE_0__);
|
11283 | var contentful_sdk_core__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__( "../node_modules/contentful-sdk-core/dist/index.es-modules.js");
|
11284 | var _enhance_with_methods__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__( "./enhance-with-methods.ts");
|
11285 | var _common_utils__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__( "./common-utils.ts");
|
11286 | var _instance_actions__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__( "./instance-actions.ts");
|
11287 |
|
11288 |
|
11289 |
|
11290 |
|
11291 |
|
11292 |
|
11293 | function createSpaceMembershipApi(http) {
|
11294 | return {
|
11295 | update: Object(_instance_actions__WEBPACK_IMPORTED_MODULE_4__["createUpdateEntity"])({
|
11296 | http: http,
|
11297 | entityPath: 'space_memberships',
|
11298 | wrapperMethod: wrapSpaceMembership
|
11299 | }),
|
11300 | delete: Object(_instance_actions__WEBPACK_IMPORTED_MODULE_4__["createDeleteEntity"])({
|
11301 | http: http,
|
11302 | entityPath: 'space_memberships'
|
11303 | })
|
11304 | };
|
11305 | }
|
11306 |
|
11307 |
|
11308 |
|
11309 |
|
11310 |
|
11311 |
|
11312 |
|
11313 |
|
11314 | function wrapSpaceMembership(http, data) {
|
11315 | var spaceMembership = Object(contentful_sdk_core__WEBPACK_IMPORTED_MODULE_1__["toPlainObject"])(lodash_cloneDeep__WEBPACK_IMPORTED_MODULE_0___default()(data));
|
11316 | var spaceMembershipWithMethods = Object(_enhance_with_methods__WEBPACK_IMPORTED_MODULE_2__["default"])(spaceMembership, createSpaceMembershipApi(http));
|
11317 | return Object(contentful_sdk_core__WEBPACK_IMPORTED_MODULE_1__["freezeSys"])(spaceMembershipWithMethods);
|
11318 | }
|
11319 |
|
11320 |
|
11321 |
|
11322 |
|
11323 | var wrapSpaceMembershipCollection = Object(_common_utils__WEBPACK_IMPORTED_MODULE_3__["wrapCollection"])(wrapSpaceMembership);
|
11324 |
|
11325 | }),
|
11326 |
|
11327 | "./entities/space.ts":
|
11328 |
|
11329 |
|
11330 |
|
11331 |
|
11332 | (function(module, __webpack_exports__, __webpack_require__) {
|
11333 |
|
11334 | "use strict";
|
11335 | __webpack_require__.r(__webpack_exports__);
|
11336 | __webpack_require__.d(__webpack_exports__, "wrapSpace", function() { return wrapSpace; });
|
11337 | __webpack_require__.d(__webpack_exports__, "wrapSpaceCollection", function() { return wrapSpaceCollection; });
|
11338 | var lodash_cloneDeep__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__( "../node_modules/lodash/cloneDeep.js");
|
11339 | var lodash_cloneDeep__WEBPACK_IMPORTED_MODULE_0___default = __webpack_require__.n(lodash_cloneDeep__WEBPACK_IMPORTED_MODULE_0__);
|
11340 | var contentful_sdk_core__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__( "../node_modules/contentful-sdk-core/dist/index.es-modules.js");
|
11341 | var _enhance_with_methods__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__( "./enhance-with-methods.ts");
|
11342 | var _common_utils__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__( "./common-utils.ts");
|
11343 | var _create_space_api__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__( "./create-space-api.ts");
|
11344 |
|
11345 |
|
11346 |
|
11347 |
|
11348 |
|
11349 |
|
11350 |
|
11351 |
|
11352 |
|
11353 |
|
11354 |
|
11355 |
|
11356 |
|
11357 |
|
11358 |
|
11359 |
|
11360 | function wrapSpace(http, data) {
|
11361 | var sdkHttp = http;
|
11362 | var space = Object(contentful_sdk_core__WEBPACK_IMPORTED_MODULE_1__["toPlainObject"])(lodash_cloneDeep__WEBPACK_IMPORTED_MODULE_0___default()(data));
|
11363 | var _sdkHttp$httpClientPa = sdkHttp.httpClientParams,
|
11364 | hostUpload = _sdkHttp$httpClientPa.hostUpload,
|
11365 | defaultHostnameUpload = _sdkHttp$httpClientPa.defaultHostnameUpload;
|
11366 | var spaceScopedHttpClient = sdkHttp.cloneWithNewParams({
|
11367 | space: space.sys.id
|
11368 | });
|
11369 | var spaceScopedUploadClient = sdkHttp.cloneWithNewParams({
|
11370 | space: space.sys.id,
|
11371 | host: hostUpload || defaultHostnameUpload
|
11372 | });
|
11373 | var spaceApi = Object(_create_space_api__WEBPACK_IMPORTED_MODULE_4__["default"])({
|
11374 | http: spaceScopedHttpClient,
|
11375 | httpUpload: spaceScopedUploadClient
|
11376 | });
|
11377 | var enhancedSpace = Object(_enhance_with_methods__WEBPACK_IMPORTED_MODULE_2__["default"])(space, spaceApi);
|
11378 | return Object(contentful_sdk_core__WEBPACK_IMPORTED_MODULE_1__["freezeSys"])(enhancedSpace);
|
11379 | }
|
11380 |
|
11381 |
|
11382 |
|
11383 |
|
11384 |
|
11385 |
|
11386 | var wrapSpaceCollection = Object(_common_utils__WEBPACK_IMPORTED_MODULE_3__["wrapCollection"])(wrapSpace);
|
11387 |
|
11388 | }),
|
11389 |
|
11390 | "./entities/team-membership.ts":
|
11391 |
|
11392 |
|
11393 |
|
11394 |
|
11395 | (function(module, __webpack_exports__, __webpack_require__) {
|
11396 |
|
11397 | "use strict";
|
11398 | __webpack_require__.r(__webpack_exports__);
|
11399 | __webpack_require__.d(__webpack_exports__, "wrapTeamMembership", function() { return wrapTeamMembership; });
|
11400 | __webpack_require__.d(__webpack_exports__, "wrapTeamMembershipCollection", function() { return wrapTeamMembershipCollection; });
|
11401 | var lodash_cloneDeep__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__( "../node_modules/lodash/cloneDeep.js");
|
11402 | var lodash_cloneDeep__WEBPACK_IMPORTED_MODULE_0___default = __webpack_require__.n(lodash_cloneDeep__WEBPACK_IMPORTED_MODULE_0__);
|
11403 | var contentful_sdk_core__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__( "../node_modules/contentful-sdk-core/dist/index.es-modules.js");
|
11404 | var _enhance_with_methods__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__( "./enhance-with-methods.ts");
|
11405 | var _error_handler__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__( "./error-handler.ts");
|
11406 | var _common_utils__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__( "./common-utils.ts");
|
11407 |
|
11408 |
|
11409 |
|
11410 |
|
11411 |
|
11412 |
|
11413 | function createTeamMembershipApi(http) {
|
11414 | return {
|
11415 | update: function update() {
|
11416 | var raw = this.toPlainObject();
|
11417 | var teamId = raw.sys.team.sys.id;
|
11418 | return http.put('teams/' + teamId + '/team_memberships/' + this.sys.id, raw, {
|
11419 | headers: {
|
11420 | 'X-Contentful-Version': this.sys.version || 0
|
11421 | }
|
11422 | }).then(function (response) {
|
11423 | return wrapTeamMembership(http, response.data);
|
11424 | }, _error_handler__WEBPACK_IMPORTED_MODULE_3__["default"]);
|
11425 | },
|
11426 | delete: function _delete() {
|
11427 | var raw = this.toPlainObject();
|
11428 | var teamId = raw.sys.team.sys.id;
|
11429 | return http.delete('teams/' + teamId + '/team_memberships/' + this.sys.id).then(function () {
|
11430 | }, _error_handler__WEBPACK_IMPORTED_MODULE_3__["default"]);
|
11431 | }
|
11432 | };
|
11433 | }
|
11434 |
|
11435 |
|
11436 |
|
11437 |
|
11438 |
|
11439 |
|
11440 |
|
11441 |
|
11442 | function wrapTeamMembership(http, data) {
|
11443 | var teamMembership = Object(contentful_sdk_core__WEBPACK_IMPORTED_MODULE_1__["toPlainObject"])(lodash_cloneDeep__WEBPACK_IMPORTED_MODULE_0___default()(data));
|
11444 | var teamMembershipWithMethods = Object(_enhance_with_methods__WEBPACK_IMPORTED_MODULE_2__["default"])(teamMembership, createTeamMembershipApi(http));
|
11445 | return Object(contentful_sdk_core__WEBPACK_IMPORTED_MODULE_1__["freezeSys"])(teamMembershipWithMethods);
|
11446 | }
|
11447 |
|
11448 |
|
11449 |
|
11450 |
|
11451 | var wrapTeamMembershipCollection = Object(_common_utils__WEBPACK_IMPORTED_MODULE_4__["wrapCollection"])(wrapTeamMembership);
|
11452 |
|
11453 | }),
|
11454 |
|
11455 | "./entities/team-space-membership.ts":
|
11456 |
|
11457 |
|
11458 |
|
11459 |
|
11460 | (function(module, __webpack_exports__, __webpack_require__) {
|
11461 |
|
11462 | "use strict";
|
11463 | __webpack_require__.r(__webpack_exports__);
|
11464 | __webpack_require__.d(__webpack_exports__, "wrapTeamSpaceMembership", function() { return wrapTeamSpaceMembership; });
|
11465 | __webpack_require__.d(__webpack_exports__, "wrapTeamSpaceMembershipCollection", function() { return wrapTeamSpaceMembershipCollection; });
|
11466 | var lodash_cloneDeep__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__( "../node_modules/lodash/cloneDeep.js");
|
11467 | var lodash_cloneDeep__WEBPACK_IMPORTED_MODULE_0___default = __webpack_require__.n(lodash_cloneDeep__WEBPACK_IMPORTED_MODULE_0__);
|
11468 | var contentful_sdk_core__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__( "../node_modules/contentful-sdk-core/dist/index.es-modules.js");
|
11469 | var _enhance_with_methods__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__( "./enhance-with-methods.ts");
|
11470 | var _instance_actions__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__( "./instance-actions.ts");
|
11471 | var _error_handler__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__( "./error-handler.ts");
|
11472 | var _common_utils__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__( "./common-utils.ts");
|
11473 |
|
11474 |
|
11475 |
|
11476 |
|
11477 |
|
11478 |
|
11479 |
|
11480 | function createTeamSpaceMembershipApi(http) {
|
11481 | return {
|
11482 | update: function update() {
|
11483 | var raw = this.toPlainObject();
|
11484 | var data = lodash_cloneDeep__WEBPACK_IMPORTED_MODULE_0___default()(raw);
|
11485 | delete data.sys;
|
11486 | return http.put('team_space_memberships/' + this.sys.id, data, {
|
11487 | headers: {
|
11488 | 'X-Contentful-Version': this.sys.version || 0,
|
11489 | 'x-contentful-team': this.sys.team.sys.id
|
11490 | }
|
11491 | }).then(function (response) {
|
11492 | return wrapTeamSpaceMembership(http, response.data);
|
11493 | }, _error_handler__WEBPACK_IMPORTED_MODULE_4__["default"]);
|
11494 | },
|
11495 | delete: Object(_instance_actions__WEBPACK_IMPORTED_MODULE_3__["createDeleteEntity"])({
|
11496 | http: http,
|
11497 | entityPath: 'team_space_memberships'
|
11498 | })
|
11499 | };
|
11500 | }
|
11501 |
|
11502 |
|
11503 |
|
11504 |
|
11505 |
|
11506 |
|
11507 |
|
11508 |
|
11509 | function wrapTeamSpaceMembership(http, data) {
|
11510 | var teamSpaceMembership = Object(contentful_sdk_core__WEBPACK_IMPORTED_MODULE_1__["toPlainObject"])(lodash_cloneDeep__WEBPACK_IMPORTED_MODULE_0___default()(data));
|
11511 | var teamSpaceMembershipWithMethods = Object(_enhance_with_methods__WEBPACK_IMPORTED_MODULE_2__["default"])(teamSpaceMembership, createTeamSpaceMembershipApi(http));
|
11512 | return Object(contentful_sdk_core__WEBPACK_IMPORTED_MODULE_1__["freezeSys"])(teamSpaceMembershipWithMethods);
|
11513 | }
|
11514 |
|
11515 |
|
11516 |
|
11517 |
|
11518 | var wrapTeamSpaceMembershipCollection = Object(_common_utils__WEBPACK_IMPORTED_MODULE_5__["wrapCollection"])(wrapTeamSpaceMembership);
|
11519 |
|
11520 | }),
|
11521 |
|
11522 | "./entities/team.ts":
|
11523 |
|
11524 |
|
11525 |
|
11526 |
|
11527 | (function(module, __webpack_exports__, __webpack_require__) {
|
11528 |
|
11529 | "use strict";
|
11530 | __webpack_require__.r(__webpack_exports__);
|
11531 | __webpack_require__.d(__webpack_exports__, "wrapTeam", function() { return wrapTeam; });
|
11532 | __webpack_require__.d(__webpack_exports__, "wrapTeamCollection", function() { return wrapTeamCollection; });
|
11533 | var lodash_cloneDeep__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__( "../node_modules/lodash/cloneDeep.js");
|
11534 | var lodash_cloneDeep__WEBPACK_IMPORTED_MODULE_0___default = __webpack_require__.n(lodash_cloneDeep__WEBPACK_IMPORTED_MODULE_0__);
|
11535 | var contentful_sdk_core__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__( "../node_modules/contentful-sdk-core/dist/index.es-modules.js");
|
11536 | var _enhance_with_methods__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__( "./enhance-with-methods.ts");
|
11537 | var _common_utils__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__( "./common-utils.ts");
|
11538 | var _instance_actions__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__( "./instance-actions.ts");
|
11539 |
|
11540 |
|
11541 |
|
11542 |
|
11543 |
|
11544 | var entityPath = 'teams';
|
11545 |
|
11546 |
|
11547 |
|
11548 |
|
11549 | function createTeamApi(http) {
|
11550 | return {
|
11551 | update: Object(_instance_actions__WEBPACK_IMPORTED_MODULE_4__["createUpdateEntity"])({
|
11552 | http: http,
|
11553 | entityPath: entityPath,
|
11554 | wrapperMethod: wrapTeam
|
11555 | }),
|
11556 | delete: Object(_instance_actions__WEBPACK_IMPORTED_MODULE_4__["createDeleteEntity"])({
|
11557 | http: http,
|
11558 | entityPath: entityPath
|
11559 | })
|
11560 | };
|
11561 | }
|
11562 |
|
11563 |
|
11564 |
|
11565 |
|
11566 |
|
11567 |
|
11568 |
|
11569 |
|
11570 | function wrapTeam(http, data) {
|
11571 | var team = Object(contentful_sdk_core__WEBPACK_IMPORTED_MODULE_1__["toPlainObject"])(lodash_cloneDeep__WEBPACK_IMPORTED_MODULE_0___default()(data));
|
11572 | var teamWithMethods = Object(_enhance_with_methods__WEBPACK_IMPORTED_MODULE_2__["default"])(team, createTeamApi(http));
|
11573 | return Object(contentful_sdk_core__WEBPACK_IMPORTED_MODULE_1__["freezeSys"])(teamWithMethods);
|
11574 | }
|
11575 |
|
11576 |
|
11577 |
|
11578 |
|
11579 | var wrapTeamCollection = Object(_common_utils__WEBPACK_IMPORTED_MODULE_3__["wrapCollection"])(wrapTeam);
|
11580 |
|
11581 | }),
|
11582 |
|
11583 | "./entities/ui-extension.ts":
|
11584 |
|
11585 |
|
11586 |
|
11587 |
|
11588 | (function(module, __webpack_exports__, __webpack_require__) {
|
11589 |
|
11590 | "use strict";
|
11591 | __webpack_require__.r(__webpack_exports__);
|
11592 | __webpack_require__.d(__webpack_exports__, "wrapUiExtension", function() { return wrapUiExtension; });
|
11593 | __webpack_require__.d(__webpack_exports__, "wrapUiExtensionCollection", function() { return wrapUiExtensionCollection; });
|
11594 | var lodash_cloneDeep__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__( "../node_modules/lodash/cloneDeep.js");
|
11595 | var lodash_cloneDeep__WEBPACK_IMPORTED_MODULE_0___default = __webpack_require__.n(lodash_cloneDeep__WEBPACK_IMPORTED_MODULE_0__);
|
11596 | var contentful_sdk_core__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__( "../node_modules/contentful-sdk-core/dist/index.es-modules.js");
|
11597 | var _enhance_with_methods__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__( "./enhance-with-methods.ts");
|
11598 | var _instance_actions__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__( "./instance-actions.ts");
|
11599 | var _common_utils__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__( "./common-utils.ts");
|
11600 |
|
11601 |
|
11602 |
|
11603 |
|
11604 |
|
11605 |
|
11606 | function createUiExtensionApi(http) {
|
11607 | return {
|
11608 | update: Object(_instance_actions__WEBPACK_IMPORTED_MODULE_3__["createUpdateEntity"])({
|
11609 | http: http,
|
11610 | entityPath: 'extensions',
|
11611 | wrapperMethod: wrapUiExtension
|
11612 | }),
|
11613 | delete: Object(_instance_actions__WEBPACK_IMPORTED_MODULE_3__["createDeleteEntity"])({
|
11614 | http: http,
|
11615 | entityPath: 'extensions'
|
11616 | })
|
11617 | };
|
11618 | }
|
11619 |
|
11620 |
|
11621 |
|
11622 |
|
11623 |
|
11624 |
|
11625 |
|
11626 |
|
11627 | function wrapUiExtension(http, data) {
|
11628 | var uiExtension = Object(contentful_sdk_core__WEBPACK_IMPORTED_MODULE_1__["toPlainObject"])(lodash_cloneDeep__WEBPACK_IMPORTED_MODULE_0___default()(data));
|
11629 | var uiExtensionWithMethods = Object(_enhance_with_methods__WEBPACK_IMPORTED_MODULE_2__["default"])(uiExtension, createUiExtensionApi(http));
|
11630 | return Object(contentful_sdk_core__WEBPACK_IMPORTED_MODULE_1__["freezeSys"])(uiExtensionWithMethods);
|
11631 | }
|
11632 |
|
11633 |
|
11634 |
|
11635 |
|
11636 | var wrapUiExtensionCollection = Object(_common_utils__WEBPACK_IMPORTED_MODULE_4__["wrapCollection"])(wrapUiExtension);
|
11637 |
|
11638 | }),
|
11639 |
|
11640 | "./entities/upload.ts":
|
11641 |
|
11642 |
|
11643 |
|
11644 |
|
11645 | (function(module, __webpack_exports__, __webpack_require__) {
|
11646 |
|
11647 | "use strict";
|
11648 | __webpack_require__.r(__webpack_exports__);
|
11649 | __webpack_require__.d(__webpack_exports__, "wrapUpload", function() { return wrapUpload; });
|
11650 | var lodash_cloneDeep__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__( "../node_modules/lodash/cloneDeep.js");
|
11651 | var lodash_cloneDeep__WEBPACK_IMPORTED_MODULE_0___default = __webpack_require__.n(lodash_cloneDeep__WEBPACK_IMPORTED_MODULE_0__);
|
11652 | var contentful_sdk_core__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__( "../node_modules/contentful-sdk-core/dist/index.es-modules.js");
|
11653 | var _enhance_with_methods__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__( "./enhance-with-methods.ts");
|
11654 | var _instance_actions__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__( "./instance-actions.ts");
|
11655 |
|
11656 |
|
11657 |
|
11658 |
|
11659 |
|
11660 | function createUploadApi(http) {
|
11661 | return {
|
11662 | delete: Object(_instance_actions__WEBPACK_IMPORTED_MODULE_3__["createDeleteEntity"])({
|
11663 | http: http,
|
11664 | entityPath: 'uploads'
|
11665 | })
|
11666 | };
|
11667 | }
|
11668 |
|
11669 |
|
11670 |
|
11671 |
|
11672 |
|
11673 |
|
11674 |
|
11675 |
|
11676 | function wrapUpload(http, data) {
|
11677 | var upload = Object(contentful_sdk_core__WEBPACK_IMPORTED_MODULE_1__["toPlainObject"])(lodash_cloneDeep__WEBPACK_IMPORTED_MODULE_0___default()(data));
|
11678 | var uploadWithMethods = Object(_enhance_with_methods__WEBPACK_IMPORTED_MODULE_2__["default"])(upload, createUploadApi(http));
|
11679 | return Object(contentful_sdk_core__WEBPACK_IMPORTED_MODULE_1__["freezeSys"])(uploadWithMethods);
|
11680 | }
|
11681 |
|
11682 | }),
|
11683 |
|
11684 | "./entities/usage.ts":
|
11685 |
|
11686 |
|
11687 |
|
11688 |
|
11689 | (function(module, __webpack_exports__, __webpack_require__) {
|
11690 |
|
11691 | "use strict";
|
11692 | __webpack_require__.r(__webpack_exports__);
|
11693 | __webpack_require__.d(__webpack_exports__, "wrapUsage", function() { return wrapUsage; });
|
11694 | __webpack_require__.d(__webpack_exports__, "wrapUsageCollection", function() { return wrapUsageCollection; });
|
11695 | var lodash_cloneDeep__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__( "../node_modules/lodash/cloneDeep.js");
|
11696 | var lodash_cloneDeep__WEBPACK_IMPORTED_MODULE_0___default = __webpack_require__.n(lodash_cloneDeep__WEBPACK_IMPORTED_MODULE_0__);
|
11697 | var contentful_sdk_core__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__( "../node_modules/contentful-sdk-core/dist/index.es-modules.js");
|
11698 | var _enhance_with_methods__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__( "./enhance-with-methods.ts");
|
11699 | var _common_utils__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__( "./common-utils.ts");
|
11700 |
|
11701 |
|
11702 |
|
11703 |
|
11704 |
|
11705 |
|
11706 |
|
11707 |
|
11708 |
|
11709 |
|
11710 |
|
11711 | function wrapUsage(http, data) {
|
11712 | var usage = Object(contentful_sdk_core__WEBPACK_IMPORTED_MODULE_1__["toPlainObject"])(lodash_cloneDeep__WEBPACK_IMPORTED_MODULE_0___default()(data));
|
11713 | var usageWithMethods = Object(_enhance_with_methods__WEBPACK_IMPORTED_MODULE_2__["default"])(usage, {});
|
11714 | return Object(contentful_sdk_core__WEBPACK_IMPORTED_MODULE_1__["freezeSys"])(usageWithMethods);
|
11715 | }
|
11716 |
|
11717 |
|
11718 |
|
11719 |
|
11720 | var wrapUsageCollection = Object(_common_utils__WEBPACK_IMPORTED_MODULE_3__["wrapCollection"])(wrapUsage);
|
11721 |
|
11722 | }),
|
11723 |
|
11724 | "./entities/user.ts":
|
11725 |
|
11726 |
|
11727 |
|
11728 |
|
11729 | (function(module, __webpack_exports__, __webpack_require__) {
|
11730 |
|
11731 | "use strict";
|
11732 | __webpack_require__.r(__webpack_exports__);
|
11733 | __webpack_require__.d(__webpack_exports__, "wrapUser", function() { return wrapUser; });
|
11734 | __webpack_require__.d(__webpack_exports__, "wrapUserCollection", function() { return wrapUserCollection; });
|
11735 | var contentful_sdk_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__( "../node_modules/contentful-sdk-core/dist/index.es-modules.js");
|
11736 | var lodash_cloneDeep__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__( "../node_modules/lodash/cloneDeep.js");
|
11737 | var lodash_cloneDeep__WEBPACK_IMPORTED_MODULE_1___default = __webpack_require__.n(lodash_cloneDeep__WEBPACK_IMPORTED_MODULE_1__);
|
11738 | var _enhance_with_methods__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__( "./enhance-with-methods.ts");
|
11739 | var _common_utils__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__( "./common-utils.ts");
|
11740 |
|
11741 |
|
11742 |
|
11743 |
|
11744 |
|
11745 |
|
11746 |
|
11747 |
|
11748 |
|
11749 |
|
11750 |
|
11751 | function wrapUser(http, data) {
|
11752 | var user = Object(contentful_sdk_core__WEBPACK_IMPORTED_MODULE_0__["toPlainObject"])(lodash_cloneDeep__WEBPACK_IMPORTED_MODULE_1___default()(data));
|
11753 | var userWithMethods = Object(_enhance_with_methods__WEBPACK_IMPORTED_MODULE_2__["default"])(user, {});
|
11754 | return Object(contentful_sdk_core__WEBPACK_IMPORTED_MODULE_0__["freezeSys"])(userWithMethods);
|
11755 | }
|
11756 |
|
11757 |
|
11758 |
|
11759 |
|
11760 |
|
11761 |
|
11762 |
|
11763 | var wrapUserCollection = Object(_common_utils__WEBPACK_IMPORTED_MODULE_3__["wrapCollection"])(wrapUser);
|
11764 |
|
11765 | }),
|
11766 |
|
11767 | "./entities/webhook.ts":
|
11768 |
|
11769 |
|
11770 |
|
11771 |
|
11772 | (function(module, __webpack_exports__, __webpack_require__) {
|
11773 |
|
11774 | "use strict";
|
11775 | __webpack_require__.r(__webpack_exports__);
|
11776 | __webpack_require__.d(__webpack_exports__, "wrapWebhook", function() { return wrapWebhook; });
|
11777 | __webpack_require__.d(__webpack_exports__, "wrapWebhookCollection", function() { return wrapWebhookCollection; });
|
11778 | var lodash_cloneDeep__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__( "../node_modules/lodash/cloneDeep.js");
|
11779 | var lodash_cloneDeep__WEBPACK_IMPORTED_MODULE_0___default = __webpack_require__.n(lodash_cloneDeep__WEBPACK_IMPORTED_MODULE_0__);
|
11780 | var contentful_sdk_core__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__( "../node_modules/contentful-sdk-core/dist/index.es-modules.js");
|
11781 | var _enhance_with_methods__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__( "./enhance-with-methods.ts");
|
11782 | var _error_handler__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__( "./error-handler.ts");
|
11783 | var _instance_actions__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__( "./instance-actions.ts");
|
11784 | var _common_utils__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__( "./common-utils.ts");
|
11785 |
|
11786 |
|
11787 |
|
11788 |
|
11789 |
|
11790 |
|
11791 | var entityPath = 'webhook_definitions';
|
11792 |
|
11793 | function createWebhookApi(http) {
|
11794 | return {
|
11795 | update: Object(_instance_actions__WEBPACK_IMPORTED_MODULE_4__["createUpdateEntity"])({
|
11796 | http: http,
|
11797 | entityPath: entityPath,
|
11798 | wrapperMethod: wrapWebhook
|
11799 | }),
|
11800 | delete: Object(_instance_actions__WEBPACK_IMPORTED_MODULE_4__["createDeleteEntity"])({
|
11801 | http: http,
|
11802 | entityPath: entityPath
|
11803 | }),
|
11804 | getCalls: function getCalls() {
|
11805 | return http.get('webhooks/' + this.sys.id + '/calls').then(function (response) {
|
11806 | return response.data;
|
11807 | }, _error_handler__WEBPACK_IMPORTED_MODULE_3__["default"]);
|
11808 | },
|
11809 | getCall: function getCall(id) {
|
11810 | return http.get('webhooks/' + this.sys.id + '/calls/' + id).then(function (response) {
|
11811 | return response.data;
|
11812 | }, _error_handler__WEBPACK_IMPORTED_MODULE_3__["default"]);
|
11813 | },
|
11814 | getHealth: function getHealth() {
|
11815 | return http.get('webhooks/' + this.sys.id + '/health').then(function (response) {
|
11816 | return response.data;
|
11817 | }, _error_handler__WEBPACK_IMPORTED_MODULE_3__["default"]);
|
11818 | }
|
11819 | };
|
11820 | }
|
11821 |
|
11822 |
|
11823 |
|
11824 |
|
11825 |
|
11826 |
|
11827 |
|
11828 |
|
11829 | function wrapWebhook(http, data) {
|
11830 | var webhook = Object(contentful_sdk_core__WEBPACK_IMPORTED_MODULE_1__["toPlainObject"])(lodash_cloneDeep__WEBPACK_IMPORTED_MODULE_0___default()(data));
|
11831 | var webhookWithMethods = Object(_enhance_with_methods__WEBPACK_IMPORTED_MODULE_2__["default"])(webhook, createWebhookApi(http));
|
11832 | return Object(contentful_sdk_core__WEBPACK_IMPORTED_MODULE_1__["freezeSys"])(webhookWithMethods);
|
11833 | }
|
11834 |
|
11835 |
|
11836 |
|
11837 |
|
11838 | var wrapWebhookCollection = Object(_common_utils__WEBPACK_IMPORTED_MODULE_5__["wrapCollection"])(wrapWebhook);
|
11839 |
|
11840 | }),
|
11841 |
|
11842 | "./error-handler.ts":
|
11843 |
|
11844 |
|
11845 |
|
11846 |
|
11847 | (function(module, __webpack_exports__, __webpack_require__) {
|
11848 |
|
11849 | "use strict";
|
11850 | __webpack_require__.r(__webpack_exports__);
|
11851 | __webpack_require__.d(__webpack_exports__, "default", function() { return errorHandler; });
|
11852 | var lodash_isPlainObject__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__( "../node_modules/lodash/isPlainObject.js");
|
11853 | var lodash_isPlainObject__WEBPACK_IMPORTED_MODULE_0___default = __webpack_require__.n(lodash_isPlainObject__WEBPACK_IMPORTED_MODULE_0__);
|
11854 |
|
11855 |
|
11856 |
|
11857 |
|
11858 |
|
11859 |
|
11860 |
|
11861 |
|
11862 |
|
11863 |
|
11864 | function errorHandler(errorResponse) {
|
11865 | var config = errorResponse.config,
|
11866 | response = errorResponse.response;
|
11867 | var errorName;
|
11868 |
|
11869 | if (config.headers && config.headers['Authorization']) {
|
11870 | var token = "...".concat(config.headers['Authorization'].substr(-5));
|
11871 | config.headers['Authorization'] = "Bearer ".concat(token);
|
11872 | }
|
11873 |
|
11874 | if (!lodash_isPlainObject__WEBPACK_IMPORTED_MODULE_0___default()(response) || !lodash_isPlainObject__WEBPACK_IMPORTED_MODULE_0___default()(config)) {
|
11875 | throw errorResponse;
|
11876 | }
|
11877 |
|
11878 | var data = response === null || response === void 0 ? void 0 : response.data;
|
11879 | var errorData = {
|
11880 | status: response === null || response === void 0 ? void 0 : response.status,
|
11881 | statusText: response === null || response === void 0 ? void 0 : response.statusText,
|
11882 | message: '',
|
11883 | details: {}
|
11884 | };
|
11885 |
|
11886 | if (lodash_isPlainObject__WEBPACK_IMPORTED_MODULE_0___default()(config)) {
|
11887 | errorData.request = {
|
11888 | url: config.url,
|
11889 | headers: config.headers,
|
11890 | method: config.method,
|
11891 | payloadData: config.data
|
11892 | };
|
11893 | }
|
11894 |
|
11895 | if (data && lodash_isPlainObject__WEBPACK_IMPORTED_MODULE_0___default()(data)) {
|
11896 | if ('requestId' in data) {
|
11897 | errorData.requestId = data.requestId || 'UNKNOWN';
|
11898 | }
|
11899 |
|
11900 | if ('message' in data) {
|
11901 | errorData.message = data.message || '';
|
11902 | }
|
11903 |
|
11904 | if ('details' in data) {
|
11905 | errorData.details = data.details || {};
|
11906 | }
|
11907 |
|
11908 | if ('sys' in data) {
|
11909 | if ('id' in data.sys) {
|
11910 | errorName = data.sys.id;
|
11911 | }
|
11912 | }
|
11913 | }
|
11914 |
|
11915 | var error = new Error();
|
11916 | error.name = errorName && errorName !== 'Unknown' ? errorName : "".concat(response === null || response === void 0 ? void 0 : response.status, " ").concat(response === null || response === void 0 ? void 0 : response.statusText);
|
11917 | error.message = JSON.stringify(errorData, null, ' ');
|
11918 | throw error;
|
11919 | }
|
11920 |
|
11921 | }),
|
11922 |
|
11923 | "./instance-actions.ts":
|
11924 |
|
11925 |
|
11926 |
|
11927 |
|
11928 | (function(module, __webpack_exports__, __webpack_require__) {
|
11929 |
|
11930 | "use strict";
|
11931 | __webpack_require__.r(__webpack_exports__);
|
11932 | __webpack_require__.d(__webpack_exports__, "createUpdateEntity", function() { return createUpdateEntity; });
|
11933 | __webpack_require__.d(__webpack_exports__, "createDeleteEntity", function() { return createDeleteEntity; });
|
11934 | __webpack_require__.d(__webpack_exports__, "createPublishEntity", function() { return createPublishEntity; });
|
11935 | __webpack_require__.d(__webpack_exports__, "createUnpublishEntity", function() { return createUnpublishEntity; });
|
11936 | __webpack_require__.d(__webpack_exports__, "createArchiveEntity", function() { return createArchiveEntity; });
|
11937 | __webpack_require__.d(__webpack_exports__, "createUnarchiveEntity", function() { return createUnarchiveEntity; });
|
11938 | __webpack_require__.d(__webpack_exports__, "createPublishedChecker", function() { return createPublishedChecker; });
|
11939 | __webpack_require__.d(__webpack_exports__, "createUpdatedChecker", function() { return createUpdatedChecker; });
|
11940 | __webpack_require__.d(__webpack_exports__, "createDraftChecker", function() { return createDraftChecker; });
|
11941 | __webpack_require__.d(__webpack_exports__, "createArchivedChecker", function() { return createArchivedChecker; });
|
11942 | var lodash_cloneDeep__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__( "../node_modules/lodash/cloneDeep.js");
|
11943 | var lodash_cloneDeep__WEBPACK_IMPORTED_MODULE_0___default = __webpack_require__.n(lodash_cloneDeep__WEBPACK_IMPORTED_MODULE_0__);
|
11944 | var _error_handler__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__( "./error-handler.ts");
|
11945 | function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; }
|
11946 |
|
11947 | function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }
|
11948 |
|
11949 | function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
11950 |
|
11951 |
|
11952 |
|
11953 |
|
11954 |
|
11955 |
|
11956 |
|
11957 | function createUpdateEntity(_ref) {
|
11958 | var http = _ref.http,
|
11959 | entityPath = _ref.entityPath,
|
11960 | wrapperMethod = _ref.wrapperMethod,
|
11961 | headers = _ref.headers;
|
11962 | return function () {
|
11963 | var self = this;
|
11964 | var raw = self.toPlainObject();
|
11965 | var data = lodash_cloneDeep__WEBPACK_IMPORTED_MODULE_0___default()(raw);
|
11966 | delete data.sys;
|
11967 | return http.put(entityPath + '/' + self.sys.id, data, {
|
11968 | headers: _objectSpread({
|
11969 | 'X-Contentful-Version': self.sys.version || 0
|
11970 | }, headers)
|
11971 | }).then(function (response) {
|
11972 | return wrapperMethod(http, response.data);
|
11973 | }, _error_handler__WEBPACK_IMPORTED_MODULE_1__["default"]);
|
11974 | };
|
11975 | }
|
11976 |
|
11977 |
|
11978 |
|
11979 |
|
11980 | function createDeleteEntity(_ref2) {
|
11981 | var http = _ref2.http,
|
11982 | entityPath = _ref2.entityPath;
|
11983 | return function () {
|
11984 | var self = this;
|
11985 | return http.delete(entityPath + '/' + self.sys.id).then(function () {
|
11986 | }, _error_handler__WEBPACK_IMPORTED_MODULE_1__["default"]);
|
11987 | };
|
11988 | }
|
11989 |
|
11990 |
|
11991 |
|
11992 |
|
11993 | function createPublishEntity(_ref3) {
|
11994 | var http = _ref3.http,
|
11995 | entityPath = _ref3.entityPath,
|
11996 | wrapperMethod = _ref3.wrapperMethod;
|
11997 | return function () {
|
11998 | var self = this;
|
11999 | return http.put(entityPath + '/' + self.sys.id + '/published', null, {
|
12000 | headers: {
|
12001 | 'X-Contentful-Version': self.sys.version
|
12002 | }
|
12003 | }).then(function (response) {
|
12004 | return wrapperMethod(http, response.data);
|
12005 | }, _error_handler__WEBPACK_IMPORTED_MODULE_1__["default"]);
|
12006 | };
|
12007 | }
|
12008 |
|
12009 |
|
12010 |
|
12011 |
|
12012 | function createUnpublishEntity(_ref4) {
|
12013 | var http = _ref4.http,
|
12014 | entityPath = _ref4.entityPath,
|
12015 | wrapperMethod = _ref4.wrapperMethod;
|
12016 | return function () {
|
12017 | var self = this;
|
12018 | return http.delete(entityPath + '/' + self.sys.id + '/published').then(function (response) {
|
12019 | return wrapperMethod(http, response.data);
|
12020 | }, _error_handler__WEBPACK_IMPORTED_MODULE_1__["default"]);
|
12021 | };
|
12022 | }
|
12023 |
|
12024 |
|
12025 |
|
12026 |
|
12027 | function createArchiveEntity(_ref5) {
|
12028 | var http = _ref5.http,
|
12029 | entityPath = _ref5.entityPath,
|
12030 | wrapperMethod = _ref5.wrapperMethod;
|
12031 | return function () {
|
12032 | var self = this;
|
12033 | return http.put(entityPath + '/' + self.sys.id + '/archived').then(function (response) {
|
12034 | return wrapperMethod(http, response.data);
|
12035 | }, _error_handler__WEBPACK_IMPORTED_MODULE_1__["default"]);
|
12036 | };
|
12037 | }
|
12038 |
|
12039 |
|
12040 |
|
12041 |
|
12042 | function createUnarchiveEntity(_ref6) {
|
12043 | var http = _ref6.http,
|
12044 | entityPath = _ref6.entityPath,
|
12045 | wrapperMethod = _ref6.wrapperMethod;
|
12046 | return function () {
|
12047 | var self = this;
|
12048 | return http.delete(entityPath + '/' + self.sys.id + '/archived').then(function (response) {
|
12049 | return wrapperMethod(http, response.data);
|
12050 | }, _error_handler__WEBPACK_IMPORTED_MODULE_1__["default"]);
|
12051 | };
|
12052 | }
|
12053 |
|
12054 |
|
12055 |
|
12056 |
|
12057 | function createPublishedChecker() {
|
12058 | return function () {
|
12059 | var self = this;
|
12060 | return !!self.sys.publishedVersion;
|
12061 | };
|
12062 | }
|
12063 |
|
12064 |
|
12065 |
|
12066 |
|
12067 | function createUpdatedChecker() {
|
12068 | return function () {
|
12069 | var self = this;
|
12070 |
|
12071 |
|
12072 | return !!(self.sys.publishedVersion && self.sys.version > self.sys.publishedVersion + 1);
|
12073 | };
|
12074 | }
|
12075 |
|
12076 |
|
12077 |
|
12078 |
|
12079 | function createDraftChecker() {
|
12080 | return function () {
|
12081 | var self = this;
|
12082 | return !self.sys.publishedVersion;
|
12083 | };
|
12084 | }
|
12085 |
|
12086 |
|
12087 |
|
12088 |
|
12089 | function createArchivedChecker() {
|
12090 | return function () {
|
12091 | var self = this;
|
12092 | return !!self.sys.archivedVersion;
|
12093 | };
|
12094 | }
|
12095 |
|
12096 | }),
|
12097 |
|
12098 | 0:
|
12099 |
|
12100 |
|
12101 |
|
12102 |
|
12103 | (function(module, exports, __webpack_require__) {
|
12104 |
|
12105 | module.exports = __webpack_require__("./contentful-management.ts");
|
12106 |
|
12107 |
|
12108 | }),
|
12109 |
|
12110 | 1:
|
12111 |
|
12112 |
|
12113 |
|
12114 |
|
12115 | (function(module, exports) {
|
12116 |
|
12117 |
|
12118 |
|
12119 | })
|
12120 |
|
12121 | });
|
12122 | });
|
12123 |
|
\ | No newline at end of file |