@plentymarkets/shop-api 0.148.0 → 0.149.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (45) hide show
  1. package/lib/api/__tests__/__fixtures__/ApiCustomAssetsFixture.d.ts +17 -0
  2. package/lib/api/__tests__/__fixtures__/ApiCustomAssetsFixture.d.ts.map +1 -0
  3. package/lib/api/__tests__/__fixtures__/ApiDeleteCustomAssetFixture.d.ts +5 -0
  4. package/lib/api/__tests__/__fixtures__/ApiDeleteCustomAssetFixture.d.ts.map +1 -0
  5. package/lib/api/deleteCustomAsset/index.d.ts +23 -0
  6. package/lib/api/deleteCustomAsset/index.d.ts.map +1 -0
  7. package/lib/api/getInit/index.d.ts +2 -2
  8. package/lib/api/getInit/index.d.ts.map +1 -1
  9. package/lib/api/index.d.ts +2 -0
  10. package/lib/api/index.d.ts.map +1 -1
  11. package/lib/api/setCustomAssets/index.d.ts +32 -0
  12. package/lib/api/setCustomAssets/index.d.ts.map +1 -0
  13. package/lib/helpers/email.helper.d.ts.map +1 -1
  14. package/lib/index.cjs.js +399 -26
  15. package/lib/index.cjs.js.map +1 -1
  16. package/lib/index.es.js +398 -7
  17. package/lib/index.es.js.map +1 -1
  18. package/lib/types/api/asset.d.ts +24 -0
  19. package/lib/types/api/asset.d.ts.map +1 -0
  20. package/lib/types/api/index.d.ts +1 -0
  21. package/lib/types/api/index.d.ts.map +1 -1
  22. package/lib/types/api/init.d.ts +2 -0
  23. package/lib/types/api/init.d.ts.map +1 -1
  24. package/package.json +2 -2
  25. package/server/api/__tests__/__fixtures__/ApiCustomAssetsFixture.d.ts +17 -0
  26. package/server/api/__tests__/__fixtures__/ApiCustomAssetsFixture.d.ts.map +1 -0
  27. package/server/api/__tests__/__fixtures__/ApiDeleteCustomAssetFixture.d.ts +5 -0
  28. package/server/api/__tests__/__fixtures__/ApiDeleteCustomAssetFixture.d.ts.map +1 -0
  29. package/server/api/deleteCustomAsset/index.d.ts +23 -0
  30. package/server/api/deleteCustomAsset/index.d.ts.map +1 -0
  31. package/server/api/getInit/index.d.ts +2 -2
  32. package/server/api/getInit/index.d.ts.map +1 -1
  33. package/server/api/index.d.ts +2 -0
  34. package/server/api/index.d.ts.map +1 -1
  35. package/server/api/setCustomAssets/index.d.ts +32 -0
  36. package/server/api/setCustomAssets/index.d.ts.map +1 -0
  37. package/server/helpers/email.helper.d.ts.map +1 -1
  38. package/server/index.js +67 -4
  39. package/server/index.js.map +1 -1
  40. package/server/types/api/asset.d.ts +24 -0
  41. package/server/types/api/asset.d.ts.map +1 -0
  42. package/server/types/api/index.d.ts +1 -0
  43. package/server/types/api/index.d.ts.map +1 -1
  44. package/server/types/api/init.d.ts +2 -0
  45. package/server/types/api/init.d.ts.map +1 -1
@@ -1 +1 @@
1
- {"version":3,"file":"index.cjs.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
1
+ {"version":3,"file":"index.cjs.js","sources":["../../../node_modules/validator/es/lib/util/assertString.js","../../../node_modules/validator/es/lib/util/checkHost.js","../../../node_modules/validator/es/lib/isByteLength.js","../../../node_modules/validator/es/lib/util/merge.js","../../../node_modules/validator/es/lib/isFQDN.js","../../../node_modules/validator/es/lib/isIP.js","../../../node_modules/validator/es/lib/isEmail.js"],"sourcesContent":["export default function assertString(input) {\n if (input === undefined || input === null) throw new TypeError(\"Expected a string but received a \".concat(input));\n if (input.constructor.name !== 'String') throw new TypeError(\"Expected a string but received a \".concat(input.constructor.name));\n}","function isRegExp(obj) {\n return Object.prototype.toString.call(obj) === '[object RegExp]';\n}\nexport default function checkHost(host, matches) {\n for (var i = 0; i < matches.length; i++) {\n var match = matches[i];\n if (host === match || isRegExp(match) && match.test(host)) {\n return true;\n }\n }\n return false;\n}","function _typeof(o) { \"@babel/helpers - typeof\"; return _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && \"function\" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? \"symbol\" : typeof o; }, _typeof(o); }\nimport assertString from './util/assertString';\n\n/* eslint-disable prefer-rest-params */\nexport default function isByteLength(str, options) {\n assertString(str);\n var min;\n var max;\n if (_typeof(options) === 'object') {\n min = options.min || 0;\n max = options.max;\n } else {\n // backwards compatibility: isByteLength(str, min [, max])\n min = arguments[1];\n max = arguments[2];\n }\n var len = encodeURI(str).split(/%..|./).length - 1;\n return len >= min && (typeof max === 'undefined' || len <= max);\n}","export default function merge() {\n var obj = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};\n var defaults = arguments.length > 1 ? arguments[1] : undefined;\n for (var key in defaults) {\n if (typeof obj[key] === 'undefined') {\n obj[key] = defaults[key];\n }\n }\n return obj;\n}","import assertString from './util/assertString';\nimport merge from './util/merge';\nvar default_fqdn_options = {\n require_tld: true,\n allow_underscores: false,\n allow_trailing_dot: false,\n allow_numeric_tld: false,\n allow_wildcard: false,\n ignore_max_length: false\n};\nexport default function isFQDN(str, options) {\n assertString(str);\n options = merge(options, default_fqdn_options);\n\n /* Remove the optional trailing dot before checking validity */\n if (options.allow_trailing_dot && str[str.length - 1] === '.') {\n str = str.substring(0, str.length - 1);\n }\n\n /* Remove the optional wildcard before checking validity */\n if (options.allow_wildcard === true && str.indexOf('*.') === 0) {\n str = str.substring(2);\n }\n var parts = str.split('.');\n var tld = parts[parts.length - 1];\n if (options.require_tld) {\n // disallow fqdns without tld\n if (parts.length < 2) {\n return false;\n }\n if (!options.allow_numeric_tld && !/^([a-z\\u00A1-\\u00A8\\u00AA-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF]{2,}|xn[a-z0-9-]{2,})$/i.test(tld)) {\n return false;\n }\n\n // disallow spaces\n if (/\\s/.test(tld)) {\n return false;\n }\n }\n\n // reject numeric TLDs\n if (!options.allow_numeric_tld && /^\\d+$/.test(tld)) {\n return false;\n }\n return parts.every(function (part) {\n if (part.length > 63 && !options.ignore_max_length) {\n return false;\n }\n if (!/^[a-z_\\u00a1-\\uffff0-9-]+$/i.test(part)) {\n return false;\n }\n\n // disallow full-width chars\n if (/[\\uff01-\\uff5e]/.test(part)) {\n return false;\n }\n\n // disallow parts starting or ending with hyphen\n if (/^-|-$/.test(part)) {\n return false;\n }\n if (!options.allow_underscores && /_/.test(part)) {\n return false;\n }\n return true;\n });\n}","function _typeof(o) { \"@babel/helpers - typeof\"; return _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && \"function\" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? \"symbol\" : typeof o; }, _typeof(o); }\nimport assertString from './util/assertString';\n/**\n11.3. Examples\n\n The following addresses\n\n fe80::1234 (on the 1st link of the node)\n ff02::5678 (on the 5th link of the node)\n ff08::9abc (on the 10th organization of the node)\n\n would be represented as follows:\n\n fe80::1234%1\n ff02::5678%5\n ff08::9abc%10\n\n (Here we assume a natural translation from a zone index to the\n <zone_id> part, where the Nth zone of any scope is translated into\n \"N\".)\n\n If we use interface names as <zone_id>, those addresses could also be\n represented as follows:\n\n fe80::1234%ne0\n ff02::5678%pvc1.3\n ff08::9abc%interface10\n\n where the interface \"ne0\" belongs to the 1st link, \"pvc1.3\" belongs\n to the 5th link, and \"interface10\" belongs to the 10th organization.\n * * */\nvar IPv4SegmentFormat = '(?:[0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])';\nvar IPv4AddressFormat = \"(\".concat(IPv4SegmentFormat, \"[.]){3}\").concat(IPv4SegmentFormat);\nvar IPv4AddressRegExp = new RegExp(\"^\".concat(IPv4AddressFormat, \"$\"));\nvar IPv6SegmentFormat = '(?:[0-9a-fA-F]{1,4})';\nvar IPv6AddressRegExp = new RegExp('^(' + \"(?:\".concat(IPv6SegmentFormat, \":){7}(?:\").concat(IPv6SegmentFormat, \"|:)|\") + \"(?:\".concat(IPv6SegmentFormat, \":){6}(?:\").concat(IPv4AddressFormat, \"|:\").concat(IPv6SegmentFormat, \"|:)|\") + \"(?:\".concat(IPv6SegmentFormat, \":){5}(?::\").concat(IPv4AddressFormat, \"|(:\").concat(IPv6SegmentFormat, \"){1,2}|:)|\") + \"(?:\".concat(IPv6SegmentFormat, \":){4}(?:(:\").concat(IPv6SegmentFormat, \"){0,1}:\").concat(IPv4AddressFormat, \"|(:\").concat(IPv6SegmentFormat, \"){1,3}|:)|\") + \"(?:\".concat(IPv6SegmentFormat, \":){3}(?:(:\").concat(IPv6SegmentFormat, \"){0,2}:\").concat(IPv4AddressFormat, \"|(:\").concat(IPv6SegmentFormat, \"){1,4}|:)|\") + \"(?:\".concat(IPv6SegmentFormat, \":){2}(?:(:\").concat(IPv6SegmentFormat, \"){0,3}:\").concat(IPv4AddressFormat, \"|(:\").concat(IPv6SegmentFormat, \"){1,5}|:)|\") + \"(?:\".concat(IPv6SegmentFormat, \":){1}(?:(:\").concat(IPv6SegmentFormat, \"){0,4}:\").concat(IPv4AddressFormat, \"|(:\").concat(IPv6SegmentFormat, \"){1,6}|:)|\") + \"(?::((?::\".concat(IPv6SegmentFormat, \"){0,5}:\").concat(IPv4AddressFormat, \"|(?::\").concat(IPv6SegmentFormat, \"){1,7}|:))\") + ')(%[0-9a-zA-Z.]{1,})?$');\nexport default function isIP(ipAddress) {\n var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n assertString(ipAddress);\n\n // accessing 'arguments' for backwards compatibility: isIP(ipAddress [, version])\n // eslint-disable-next-line prefer-rest-params\n var version = (_typeof(options) === 'object' ? options.version : arguments[1]) || '';\n if (!version) {\n return isIP(ipAddress, {\n version: 4\n }) || isIP(ipAddress, {\n version: 6\n });\n }\n if (version.toString() === '4') {\n return IPv4AddressRegExp.test(ipAddress);\n }\n if (version.toString() === '6') {\n return IPv6AddressRegExp.test(ipAddress);\n }\n return false;\n}","import assertString from './util/assertString';\nimport checkHost from './util/checkHost';\nimport isByteLength from './isByteLength';\nimport isFQDN from './isFQDN';\nimport isIP from './isIP';\nimport merge from './util/merge';\nvar default_email_options = {\n allow_display_name: false,\n allow_underscores: false,\n require_display_name: false,\n allow_utf8_local_part: true,\n require_tld: true,\n blacklisted_chars: '',\n ignore_max_length: false,\n host_blacklist: [],\n host_whitelist: []\n};\n\n/* eslint-disable max-len */\n/* eslint-disable no-control-regex */\nvar splitNameAddress = /^([^\\x00-\\x1F\\x7F-\\x9F\\cX]+)</i;\nvar emailUserPart = /^[a-z\\d!#\\$%&'\\*\\+\\-\\/=\\?\\^_`{\\|}~]+$/i;\nvar gmailUserPart = /^[a-z\\d]+$/;\nvar quotedEmailUser = /^([\\s\\x01-\\x08\\x0b\\x0c\\x0e-\\x1f\\x7f\\x21\\x23-\\x5b\\x5d-\\x7e]|(\\\\[\\x01-\\x09\\x0b\\x0c\\x0d-\\x7f]))*$/i;\nvar emailUserUtf8Part = /^[a-z\\d!#\\$%&'\\*\\+\\-\\/=\\?\\^_`{\\|}~\\u00A1-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF]+$/i;\nvar quotedEmailUserUtf8 = /^([\\s\\x01-\\x08\\x0b\\x0c\\x0e-\\x1f\\x7f\\x21\\x23-\\x5b\\x5d-\\x7e\\u00A0-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF]|(\\\\[\\x01-\\x09\\x0b\\x0c\\x0d-\\x7f\\u00A0-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF]))*$/i;\nvar defaultMaxEmailLength = 254;\n/* eslint-enable max-len */\n/* eslint-enable no-control-regex */\n\n/**\n * Validate display name according to the RFC2822: https://tools.ietf.org/html/rfc2822#appendix-A.1.2\n * @param {String} display_name\n */\nfunction validateDisplayName(display_name) {\n var display_name_without_quotes = display_name.replace(/^\"(.+)\"$/, '$1');\n // display name with only spaces is not valid\n if (!display_name_without_quotes.trim()) {\n return false;\n }\n\n // check whether display name contains illegal character\n var contains_illegal = /[\\.\";<>]/.test(display_name_without_quotes);\n if (contains_illegal) {\n // if contains illegal characters,\n // must to be enclosed in double-quotes, otherwise it's not a valid display name\n if (display_name_without_quotes === display_name) {\n return false;\n }\n\n // the quotes in display name must start with character symbol \\\n var all_start_with_back_slash = display_name_without_quotes.split('\"').length === display_name_without_quotes.split('\\\\\"').length;\n if (!all_start_with_back_slash) {\n return false;\n }\n }\n return true;\n}\nexport default function isEmail(str, options) {\n assertString(str);\n options = merge(options, default_email_options);\n if (options.require_display_name || options.allow_display_name) {\n var display_email = str.match(splitNameAddress);\n if (display_email) {\n var display_name = display_email[1];\n\n // Remove display name and angle brackets to get email address\n // Can be done in the regex but will introduce a ReDOS (See #1597 for more info)\n str = str.replace(display_name, '').replace(/(^<|>$)/g, '');\n\n // sometimes need to trim the last space to get the display name\n // because there may be a space between display name and email address\n // eg. myname <address@gmail.com>\n // the display name is `myname` instead of `myname `, so need to trim the last space\n if (display_name.endsWith(' ')) {\n display_name = display_name.slice(0, -1);\n }\n if (!validateDisplayName(display_name)) {\n return false;\n }\n } else if (options.require_display_name) {\n return false;\n }\n }\n if (!options.ignore_max_length && str.length > defaultMaxEmailLength) {\n return false;\n }\n var parts = str.split('@');\n var domain = parts.pop();\n var lower_domain = domain.toLowerCase();\n if (options.host_blacklist.length > 0 && checkHost(lower_domain, options.host_blacklist)) {\n return false;\n }\n if (options.host_whitelist.length > 0 && !checkHost(lower_domain, options.host_whitelist)) {\n return false;\n }\n var user = parts.join('@');\n if (options.domain_specific_validation && (lower_domain === 'gmail.com' || lower_domain === 'googlemail.com')) {\n /*\n Previously we removed dots for gmail addresses before validating.\n This was removed because it allows `multiple..dots@gmail.com`\n to be reported as valid, but it is not.\n Gmail only normalizes single dots, removing them from here is pointless,\n should be done in normalizeEmail\n */\n user = user.toLowerCase();\n\n // Removing sub-address from username before gmail validation\n var username = user.split('+')[0];\n\n // Dots are not included in gmail length restriction\n if (!isByteLength(username.replace(/\\./g, ''), {\n min: 6,\n max: 30\n })) {\n return false;\n }\n var _user_parts = username.split('.');\n for (var i = 0; i < _user_parts.length; i++) {\n if (!gmailUserPart.test(_user_parts[i])) {\n return false;\n }\n }\n }\n if (options.ignore_max_length === false && (!isByteLength(user, {\n max: 64\n }) || !isByteLength(domain, {\n max: 254\n }))) {\n return false;\n }\n if (!isFQDN(domain, {\n require_tld: options.require_tld,\n ignore_max_length: options.ignore_max_length,\n allow_underscores: options.allow_underscores\n })) {\n if (!options.allow_ip_domain) {\n return false;\n }\n if (!isIP(domain)) {\n if (!domain.startsWith('[') || !domain.endsWith(']')) {\n return false;\n }\n var noBracketdomain = domain.slice(1, -1);\n if (noBracketdomain.length === 0 || !isIP(noBracketdomain)) {\n return false;\n }\n }\n }\n if (options.blacklisted_chars) {\n if (user.search(new RegExp(\"[\".concat(options.blacklisted_chars, \"]+\"), 'g')) !== -1) return false;\n }\n if (user[0] === '\"' && user[user.length - 1] === '\"') {\n user = user.slice(1, user.length - 1);\n return options.allow_utf8_local_part ? quotedEmailUserUtf8.test(user) : quotedEmailUser.test(user);\n }\n var pattern = options.allow_utf8_local_part ? emailUserUtf8Part : emailUserPart;\n var user_parts = user.split('.');\n for (var _i = 0; _i < user_parts.length; _i++) {\n if (!pattern.test(user_parts[_i])) {\n return false;\n }\n }\n return true;\n}"],"names":["_typeof"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
package/lib/index.es.js CHANGED
@@ -1,5 +1,4 @@
1
1
  import 'consola';
2
- import * as validator from 'validator';
3
2
 
4
3
  var AddressType;
5
4
  (function (AddressType) {
@@ -160,8 +159,8 @@ const getProductsByIds = async (context, params) => {
160
159
  const url = new URL('/rest/storefront/items', context.config.api.url);
161
160
  if (params.variationIds) {
162
161
  url.searchParams.set('type', 'variation-list');
163
- for (const itemId of params.variationIds) {
164
- url.searchParams.append('variationIds[]', itemId.toString());
162
+ for (const variationId of params.variationIds) {
163
+ url.searchParams.append('variationIds[]', variationId.toString());
165
164
  }
166
165
  }
167
166
  else {
@@ -2054,10 +2053,10 @@ const deleteCoupon = async (context, params) => {
2054
2053
  };
2055
2054
 
2056
2055
  /**
2057
- * Method getInit - get current session and the category tree
2056
+ * Method getInit - get current session, category tree, robots, settings, and custom assets
2058
2057
  *
2059
2058
  * @remarks
2060
- * * calls /rest/storefront/init and returns user session and the category tree
2059
+ * * calls /rest/storefront/init and returns user session, category tree, robots, settings, and custom assets
2061
2060
  *
2062
2061
  * @returns
2063
2062
  * Promise<{data: InitResult}>
@@ -2074,6 +2073,7 @@ const getInit = async (context) => {
2074
2073
  const categories = response.data.categories;
2075
2074
  const robots = response.data.robots;
2076
2075
  const settings = response.data.settings;
2076
+ const customAssets = response.data.customAssets;
2077
2077
  const cartItems = session.cartItems;
2078
2078
  const cart = { ...session.cart, items: getMappedCartItems(cartItems) };
2079
2079
  return {
@@ -2088,6 +2088,7 @@ const getInit = async (context) => {
2088
2088
  categories,
2089
2089
  robots,
2090
2090
  settings,
2091
+ customAssets,
2091
2092
  },
2092
2093
  };
2093
2094
  };
@@ -3669,6 +3670,65 @@ const deleteBlocks = async (context, params) => {
3669
3670
  }
3670
3671
  };
3671
3672
 
3673
+ /**
3674
+ * Method deleteAsset - Delete asset.
3675
+ *
3676
+ * @remarks
3677
+ * * Calls /rest/storefront/custom-assets/${id}
3678
+ * * This method is used to delete assets.
3679
+ *
3680
+ * @param context
3681
+ * @param { DeleteAssetParams } params
3682
+ *
3683
+ * @returns
3684
+ *
3685
+ * @example
3686
+ * ``` ts
3687
+ * const { data } = await useSdk().plentysystems.deleteCustomAsset({
3688
+ * id: 2564
3689
+ * });
3690
+ * ```
3691
+ */
3692
+ const deleteCustomAsset = async (context, params) => {
3693
+ const url = new URL(`rest/storefront/custom-assets/${params.id}`, context.config.api.url);
3694
+ const { data } = await context.client.delete(url.href);
3695
+ return { data: data };
3696
+ };
3697
+
3698
+ /**
3699
+ * Method setCustomAssets - Used to bulk upsert custom assets.
3700
+ *
3701
+ * @remarks
3702
+ * * Calls '/rest/storefront/custom-assets/bulkUpsert'
3703
+ * * Method inserts new custom assets or updates existing ones based on id
3704
+ *
3705
+ *
3706
+ * @returns Promise with upserted custom assets data
3707
+ *
3708
+ * @example
3709
+ * ``` ts
3710
+ * const { data } = await useSdk().plentysystems.setCustomAssets([
3711
+ * {
3712
+ * language: 'en',
3713
+ * type: 'script',
3714
+ * name: 'Analytics',
3715
+ * assetKey: 'google-analytics',
3716
+ * content: '<script>...</script>',
3717
+ * isActive: true,
3718
+ * placement: 'head',
3719
+ * order: 1
3720
+ * }
3721
+ * ```
3722
+ * ]);
3723
+ * @param context
3724
+ * @param assets
3725
+ */
3726
+ const setCustomAssets = async (context, assets) => {
3727
+ const url = new URL('/rest/storefront/custom-assets/bulkUpsert', context.config.api.url);
3728
+ const { data } = await context.client.put(url.href, assets);
3729
+ return { data };
3730
+ };
3731
+
3672
3732
  const getAdditionalInformation = (params) => {
3673
3733
  return {
3674
3734
  orderContactWish: params?.orderContactWish ?? null,
@@ -6062,8 +6122,339 @@ const reviewGetters = {
6062
6122
  getReviewCounts,
6063
6123
  };
6064
6124
 
6125
+ function assertString(input) {
6126
+ if (input === undefined || input === null) throw new TypeError("Expected a string but received a ".concat(input));
6127
+ if (input.constructor.name !== 'String') throw new TypeError("Expected a string but received a ".concat(input.constructor.name));
6128
+ }
6129
+
6130
+ function isRegExp(obj) {
6131
+ return Object.prototype.toString.call(obj) === '[object RegExp]';
6132
+ }
6133
+ function checkHost(host, matches) {
6134
+ for (var i = 0; i < matches.length; i++) {
6135
+ var match = matches[i];
6136
+ if (host === match || isRegExp(match) && match.test(host)) {
6137
+ return true;
6138
+ }
6139
+ }
6140
+ return false;
6141
+ }
6142
+
6143
+ function _typeof$1(o) { "@babel/helpers - typeof"; return _typeof$1 = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof$1(o); }
6144
+
6145
+ /* eslint-disable prefer-rest-params */
6146
+ function isByteLength(str, options) {
6147
+ assertString(str);
6148
+ var min;
6149
+ var max;
6150
+ if (_typeof$1(options) === 'object') {
6151
+ min = options.min || 0;
6152
+ max = options.max;
6153
+ } else {
6154
+ // backwards compatibility: isByteLength(str, min [, max])
6155
+ min = arguments[1];
6156
+ max = arguments[2];
6157
+ }
6158
+ var len = encodeURI(str).split(/%..|./).length - 1;
6159
+ return len >= min && (typeof max === 'undefined' || len <= max);
6160
+ }
6161
+
6162
+ function merge() {
6163
+ var obj = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
6164
+ var defaults = arguments.length > 1 ? arguments[1] : undefined;
6165
+ for (var key in defaults) {
6166
+ if (typeof obj[key] === 'undefined') {
6167
+ obj[key] = defaults[key];
6168
+ }
6169
+ }
6170
+ return obj;
6171
+ }
6172
+
6173
+ var default_fqdn_options = {
6174
+ require_tld: true,
6175
+ allow_underscores: false,
6176
+ allow_trailing_dot: false,
6177
+ allow_numeric_tld: false,
6178
+ allow_wildcard: false,
6179
+ ignore_max_length: false
6180
+ };
6181
+ function isFQDN(str, options) {
6182
+ assertString(str);
6183
+ options = merge(options, default_fqdn_options);
6184
+
6185
+ /* Remove the optional trailing dot before checking validity */
6186
+ if (options.allow_trailing_dot && str[str.length - 1] === '.') {
6187
+ str = str.substring(0, str.length - 1);
6188
+ }
6189
+
6190
+ /* Remove the optional wildcard before checking validity */
6191
+ if (options.allow_wildcard === true && str.indexOf('*.') === 0) {
6192
+ str = str.substring(2);
6193
+ }
6194
+ var parts = str.split('.');
6195
+ var tld = parts[parts.length - 1];
6196
+ if (options.require_tld) {
6197
+ // disallow fqdns without tld
6198
+ if (parts.length < 2) {
6199
+ return false;
6200
+ }
6201
+ if (!options.allow_numeric_tld && !/^([a-z\u00A1-\u00A8\u00AA-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]{2,}|xn[a-z0-9-]{2,})$/i.test(tld)) {
6202
+ return false;
6203
+ }
6204
+
6205
+ // disallow spaces
6206
+ if (/\s/.test(tld)) {
6207
+ return false;
6208
+ }
6209
+ }
6210
+
6211
+ // reject numeric TLDs
6212
+ if (!options.allow_numeric_tld && /^\d+$/.test(tld)) {
6213
+ return false;
6214
+ }
6215
+ return parts.every(function (part) {
6216
+ if (part.length > 63 && !options.ignore_max_length) {
6217
+ return false;
6218
+ }
6219
+ if (!/^[a-z_\u00a1-\uffff0-9-]+$/i.test(part)) {
6220
+ return false;
6221
+ }
6222
+
6223
+ // disallow full-width chars
6224
+ if (/[\uff01-\uff5e]/.test(part)) {
6225
+ return false;
6226
+ }
6227
+
6228
+ // disallow parts starting or ending with hyphen
6229
+ if (/^-|-$/.test(part)) {
6230
+ return false;
6231
+ }
6232
+ if (!options.allow_underscores && /_/.test(part)) {
6233
+ return false;
6234
+ }
6235
+ return true;
6236
+ });
6237
+ }
6238
+
6239
+ function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
6240
+ /**
6241
+ 11.3. Examples
6242
+
6243
+ The following addresses
6244
+
6245
+ fe80::1234 (on the 1st link of the node)
6246
+ ff02::5678 (on the 5th link of the node)
6247
+ ff08::9abc (on the 10th organization of the node)
6248
+
6249
+ would be represented as follows:
6250
+
6251
+ fe80::1234%1
6252
+ ff02::5678%5
6253
+ ff08::9abc%10
6254
+
6255
+ (Here we assume a natural translation from a zone index to the
6256
+ <zone_id> part, where the Nth zone of any scope is translated into
6257
+ "N".)
6258
+
6259
+ If we use interface names as <zone_id>, those addresses could also be
6260
+ represented as follows:
6261
+
6262
+ fe80::1234%ne0
6263
+ ff02::5678%pvc1.3
6264
+ ff08::9abc%interface10
6265
+
6266
+ where the interface "ne0" belongs to the 1st link, "pvc1.3" belongs
6267
+ to the 5th link, and "interface10" belongs to the 10th organization.
6268
+ * * */
6269
+ var IPv4SegmentFormat = '(?:[0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])';
6270
+ var IPv4AddressFormat = "(".concat(IPv4SegmentFormat, "[.]){3}").concat(IPv4SegmentFormat);
6271
+ var IPv4AddressRegExp = new RegExp("^".concat(IPv4AddressFormat, "$"));
6272
+ var IPv6SegmentFormat = '(?:[0-9a-fA-F]{1,4})';
6273
+ var IPv6AddressRegExp = new RegExp('^(' + "(?:".concat(IPv6SegmentFormat, ":){7}(?:").concat(IPv6SegmentFormat, "|:)|") + "(?:".concat(IPv6SegmentFormat, ":){6}(?:").concat(IPv4AddressFormat, "|:").concat(IPv6SegmentFormat, "|:)|") + "(?:".concat(IPv6SegmentFormat, ":){5}(?::").concat(IPv4AddressFormat, "|(:").concat(IPv6SegmentFormat, "){1,2}|:)|") + "(?:".concat(IPv6SegmentFormat, ":){4}(?:(:").concat(IPv6SegmentFormat, "){0,1}:").concat(IPv4AddressFormat, "|(:").concat(IPv6SegmentFormat, "){1,3}|:)|") + "(?:".concat(IPv6SegmentFormat, ":){3}(?:(:").concat(IPv6SegmentFormat, "){0,2}:").concat(IPv4AddressFormat, "|(:").concat(IPv6SegmentFormat, "){1,4}|:)|") + "(?:".concat(IPv6SegmentFormat, ":){2}(?:(:").concat(IPv6SegmentFormat, "){0,3}:").concat(IPv4AddressFormat, "|(:").concat(IPv6SegmentFormat, "){1,5}|:)|") + "(?:".concat(IPv6SegmentFormat, ":){1}(?:(:").concat(IPv6SegmentFormat, "){0,4}:").concat(IPv4AddressFormat, "|(:").concat(IPv6SegmentFormat, "){1,6}|:)|") + "(?::((?::".concat(IPv6SegmentFormat, "){0,5}:").concat(IPv4AddressFormat, "|(?::").concat(IPv6SegmentFormat, "){1,7}|:))") + ')(%[0-9a-zA-Z.]{1,})?$');
6274
+ function isIP(ipAddress) {
6275
+ var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
6276
+ assertString(ipAddress);
6277
+
6278
+ // accessing 'arguments' for backwards compatibility: isIP(ipAddress [, version])
6279
+ // eslint-disable-next-line prefer-rest-params
6280
+ var version = (_typeof(options) === 'object' ? options.version : arguments[1]) || '';
6281
+ if (!version) {
6282
+ return isIP(ipAddress, {
6283
+ version: 4
6284
+ }) || isIP(ipAddress, {
6285
+ version: 6
6286
+ });
6287
+ }
6288
+ if (version.toString() === '4') {
6289
+ return IPv4AddressRegExp.test(ipAddress);
6290
+ }
6291
+ if (version.toString() === '6') {
6292
+ return IPv6AddressRegExp.test(ipAddress);
6293
+ }
6294
+ return false;
6295
+ }
6296
+
6297
+ var default_email_options = {
6298
+ allow_display_name: false,
6299
+ allow_underscores: false,
6300
+ require_display_name: false,
6301
+ allow_utf8_local_part: true,
6302
+ require_tld: true,
6303
+ blacklisted_chars: '',
6304
+ ignore_max_length: false,
6305
+ host_blacklist: [],
6306
+ host_whitelist: []
6307
+ };
6308
+
6309
+ /* eslint-disable max-len */
6310
+ /* eslint-disable no-control-regex */
6311
+ var splitNameAddress = /^([^\x00-\x1F\x7F-\x9F\cX]+)</i;
6312
+ var emailUserPart = /^[a-z\d!#\$%&'\*\+\-\/=\?\^_`{\|}~]+$/i;
6313
+ var gmailUserPart = /^[a-z\d]+$/;
6314
+ var quotedEmailUser = /^([\s\x01-\x08\x0b\x0c\x0e-\x1f\x7f\x21\x23-\x5b\x5d-\x7e]|(\\[\x01-\x09\x0b\x0c\x0d-\x7f]))*$/i;
6315
+ var emailUserUtf8Part = /^[a-z\d!#\$%&'\*\+\-\/=\?\^_`{\|}~\u00A1-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]+$/i;
6316
+ var quotedEmailUserUtf8 = /^([\s\x01-\x08\x0b\x0c\x0e-\x1f\x7f\x21\x23-\x5b\x5d-\x7e\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]|(\\[\x01-\x09\x0b\x0c\x0d-\x7f\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]))*$/i;
6317
+ var defaultMaxEmailLength = 254;
6318
+ /* eslint-enable max-len */
6319
+ /* eslint-enable no-control-regex */
6320
+
6321
+ /**
6322
+ * Validate display name according to the RFC2822: https://tools.ietf.org/html/rfc2822#appendix-A.1.2
6323
+ * @param {String} display_name
6324
+ */
6325
+ function validateDisplayName(display_name) {
6326
+ var display_name_without_quotes = display_name.replace(/^"(.+)"$/, '$1');
6327
+ // display name with only spaces is not valid
6328
+ if (!display_name_without_quotes.trim()) {
6329
+ return false;
6330
+ }
6331
+
6332
+ // check whether display name contains illegal character
6333
+ var contains_illegal = /[\.";<>]/.test(display_name_without_quotes);
6334
+ if (contains_illegal) {
6335
+ // if contains illegal characters,
6336
+ // must to be enclosed in double-quotes, otherwise it's not a valid display name
6337
+ if (display_name_without_quotes === display_name) {
6338
+ return false;
6339
+ }
6340
+
6341
+ // the quotes in display name must start with character symbol \
6342
+ var all_start_with_back_slash = display_name_without_quotes.split('"').length === display_name_without_quotes.split('\\"').length;
6343
+ if (!all_start_with_back_slash) {
6344
+ return false;
6345
+ }
6346
+ }
6347
+ return true;
6348
+ }
6349
+ function isEmail(str, options) {
6350
+ assertString(str);
6351
+ options = merge(options, default_email_options);
6352
+ if (options.require_display_name || options.allow_display_name) {
6353
+ var display_email = str.match(splitNameAddress);
6354
+ if (display_email) {
6355
+ var display_name = display_email[1];
6356
+
6357
+ // Remove display name and angle brackets to get email address
6358
+ // Can be done in the regex but will introduce a ReDOS (See #1597 for more info)
6359
+ str = str.replace(display_name, '').replace(/(^<|>$)/g, '');
6360
+
6361
+ // sometimes need to trim the last space to get the display name
6362
+ // because there may be a space between display name and email address
6363
+ // eg. myname <address@gmail.com>
6364
+ // the display name is `myname` instead of `myname `, so need to trim the last space
6365
+ if (display_name.endsWith(' ')) {
6366
+ display_name = display_name.slice(0, -1);
6367
+ }
6368
+ if (!validateDisplayName(display_name)) {
6369
+ return false;
6370
+ }
6371
+ } else if (options.require_display_name) {
6372
+ return false;
6373
+ }
6374
+ }
6375
+ if (!options.ignore_max_length && str.length > defaultMaxEmailLength) {
6376
+ return false;
6377
+ }
6378
+ var parts = str.split('@');
6379
+ var domain = parts.pop();
6380
+ var lower_domain = domain.toLowerCase();
6381
+ if (options.host_blacklist.length > 0 && checkHost(lower_domain, options.host_blacklist)) {
6382
+ return false;
6383
+ }
6384
+ if (options.host_whitelist.length > 0 && !checkHost(lower_domain, options.host_whitelist)) {
6385
+ return false;
6386
+ }
6387
+ var user = parts.join('@');
6388
+ if (options.domain_specific_validation && (lower_domain === 'gmail.com' || lower_domain === 'googlemail.com')) {
6389
+ /*
6390
+ Previously we removed dots for gmail addresses before validating.
6391
+ This was removed because it allows `multiple..dots@gmail.com`
6392
+ to be reported as valid, but it is not.
6393
+ Gmail only normalizes single dots, removing them from here is pointless,
6394
+ should be done in normalizeEmail
6395
+ */
6396
+ user = user.toLowerCase();
6397
+
6398
+ // Removing sub-address from username before gmail validation
6399
+ var username = user.split('+')[0];
6400
+
6401
+ // Dots are not included in gmail length restriction
6402
+ if (!isByteLength(username.replace(/\./g, ''), {
6403
+ min: 6,
6404
+ max: 30
6405
+ })) {
6406
+ return false;
6407
+ }
6408
+ var _user_parts = username.split('.');
6409
+ for (var i = 0; i < _user_parts.length; i++) {
6410
+ if (!gmailUserPart.test(_user_parts[i])) {
6411
+ return false;
6412
+ }
6413
+ }
6414
+ }
6415
+ if (options.ignore_max_length === false && (!isByteLength(user, {
6416
+ max: 64
6417
+ }) || !isByteLength(domain, {
6418
+ max: 254
6419
+ }))) {
6420
+ return false;
6421
+ }
6422
+ if (!isFQDN(domain, {
6423
+ require_tld: options.require_tld,
6424
+ ignore_max_length: options.ignore_max_length,
6425
+ allow_underscores: options.allow_underscores
6426
+ })) {
6427
+ if (!options.allow_ip_domain) {
6428
+ return false;
6429
+ }
6430
+ if (!isIP(domain)) {
6431
+ if (!domain.startsWith('[') || !domain.endsWith(']')) {
6432
+ return false;
6433
+ }
6434
+ var noBracketdomain = domain.slice(1, -1);
6435
+ if (noBracketdomain.length === 0 || !isIP(noBracketdomain)) {
6436
+ return false;
6437
+ }
6438
+ }
6439
+ }
6440
+ if (options.blacklisted_chars) {
6441
+ if (user.search(new RegExp("[".concat(options.blacklisted_chars, "]+"), 'g')) !== -1) return false;
6442
+ }
6443
+ if (user[0] === '"' && user[user.length - 1] === '"') {
6444
+ user = user.slice(1, user.length - 1);
6445
+ return options.allow_utf8_local_part ? quotedEmailUserUtf8.test(user) : quotedEmailUser.test(user);
6446
+ }
6447
+ var pattern = options.allow_utf8_local_part ? emailUserUtf8Part : emailUserPart;
6448
+ var user_parts = user.split('.');
6449
+ for (var _i = 0; _i < user_parts.length; _i++) {
6450
+ if (!pattern.test(user_parts[_i])) {
6451
+ return false;
6452
+ }
6453
+ }
6454
+ return true;
6455
+ }
6456
+
6065
6457
  /* eslint-disable camelcase */
6066
- const isEmail = validator.isEmail;
6067
6458
  const blacklistedChars = [
6068
6459
  '!',
6069
6460
  '@',
@@ -7070,5 +7461,5 @@ const barcodeGetters = {
7070
7461
  getReferrers,
7071
7462
  };
7072
7463
 
7073
- export { AddressOptionType, AddressType, ApiError, additionalInformationGetters, bannerGetters, barcodeGetters, cartGetters, categoryEntryGetters, categoryGetters, categoryTreeGetters, companyGetters, cookieBarGetters, countryGetters, deleteAddress, deleteAllCartItems, deleteBasketReservations, deleteBlocks, deleteCart, deleteCartItem, deleteCategory, deleteCoupon, deleteNewsletterSubscription, deleteReview, deleteTranslationByLanguage, deleteWishlistItem, doAcceptOffer, doAddCartItem, doAddCartItems, doAddCategory, doAddCoupon, doAddWishlistItem, doAdditionalInformation, doApplyConfiguration, doApprovePayPalTransaction, doAttachMolliePaymentToOrder, doAttachPaymentToOrder, doCaptureMolliePayment, doCapturePayPalOrder, doCapturePayPalOrderV2, doChangeUserPassword, doCreateMolliePaymentFromBasket, doCreateMolliePaymentFromOrder, doCreatePayPalCreditCardTransaction, doCreatePayPalOrder, doCreatePayPalTransaction, doCreatePlentyPaymentFromMolliePayment, doCreatePlentyPaymentFromPayPalOrder, doCreateTranslations, doCustomerContactMail, doEmailConfirmation, doExecutePayment, doHandleAllowPaymentApplePay, doHandleAllowPaymentGooglePay, doHandlePayPalAddress, doHandlePayPalFundingSources, doHandlePayPalPaymentFundingSources, doLogin, doLoginAsGuest, doLogoutUser, doMakeOrderReturn, doMigrateGuestOrderToCustomer, doOrderAgainInformation, doPatchMolliePayment, doPlaceOrder, doPreparePayment, doRegisterUser, doRejectOffer, doRequestResetPasswordLink, doResetPassword, doReview, doSaveAddress, doSaveBlocks, doSavePreferredDeliveryServices, doSubscribeNewsletter, doUploadOrderPropertyFile, doUploadStorageItem, facetGetters, forgotPasswordGetters, getActiveShippingCountries, getAddresses$1 as getAddresses, getAddressesData, getAggregatedCountries, getAllTranslationLanguages, getAllTranslations, getAllTranslationsByLanguage, getAuthenticatedReview, getBlocks, getCart, getCategoriesSearch, getCategoryById, getCategoryTemplate, getCategoryTree, getCustomerClasses, getExecutePayPalOrder, getFacet, getInit, getLegalTexts, getMolliePayment, getMolliePaymentAndUpdateStatus, getMollieSettings, getOffer, getOrder, getOrderDocument, getOrderPropertyFile, getOrders$1 as getOrders, getPackstations, getPayPalApplePayTransactionInfo, getPayPalDataClientToken, getPayPalFraudId, getPayPalGooglePayTransactionInfo, getPayPalMerchantAndClientIds, getPayPalOrder, getPayPalOrderDetails, getPayPalSettings, getPaymentProviders, getPreferredDeliveryLocationShippingProfiles, getPreferredDeliveryServices$1 as getPreferredDeliveryServices, getPreferredDeliveryShippingProfiles, getProduct, getProductsByIds, getReturnReasons$1 as getReturnReasons, getReturns, getReview, getReviewAverage, getRobots$2 as getRobots, getSearch, getSession, getShippingProvider$1 as getShippingProvider, getStorageItems, getStorageMetadata, getTranslations, getWishlist, heroesGetters, legalGetters, localesGetters, manufacturerGetters, offerGetters, orderConfirmationGetters, orderDocumentGetters, orderGetters, paginationGetters, patchMergeTranslations, paymentProviderGetters, paypalGetters, productAttributeGetters, productBundleGetters, productGetters, productImageGetters, productPriceGetters, productPropertyGetters, productSeoSettingsGetters, returnGetters, reviewGetters, robotGetters, setCartItemQuantity, setCategorySettings, setCategoryTemplate, setCheckoutAddress, setConfiguration, setMobilePaymentProviderList, setPaymentProvider, setReview, setShippingProvider, shippingProviderGetters, tagGetters, userAddressGetters, userGetters, wishlistGetters };
7464
+ export { AddressOptionType, AddressType, ApiError, additionalInformationGetters, bannerGetters, barcodeGetters, cartGetters, categoryEntryGetters, categoryGetters, categoryTreeGetters, companyGetters, cookieBarGetters, countryGetters, deleteAddress, deleteAllCartItems, deleteBasketReservations, deleteBlocks, deleteCart, deleteCartItem, deleteCategory, deleteCoupon, deleteCustomAsset, deleteNewsletterSubscription, deleteReview, deleteTranslationByLanguage, deleteWishlistItem, doAcceptOffer, doAddCartItem, doAddCartItems, doAddCategory, doAddCoupon, doAddWishlistItem, doAdditionalInformation, doApplyConfiguration, doApprovePayPalTransaction, doAttachMolliePaymentToOrder, doAttachPaymentToOrder, doCaptureMolliePayment, doCapturePayPalOrder, doCapturePayPalOrderV2, doChangeUserPassword, doCreateMolliePaymentFromBasket, doCreateMolliePaymentFromOrder, doCreatePayPalCreditCardTransaction, doCreatePayPalOrder, doCreatePayPalTransaction, doCreatePlentyPaymentFromMolliePayment, doCreatePlentyPaymentFromPayPalOrder, doCreateTranslations, doCustomerContactMail, doEmailConfirmation, doExecutePayment, doHandleAllowPaymentApplePay, doHandleAllowPaymentGooglePay, doHandlePayPalAddress, doHandlePayPalFundingSources, doHandlePayPalPaymentFundingSources, doLogin, doLoginAsGuest, doLogoutUser, doMakeOrderReturn, doMigrateGuestOrderToCustomer, doOrderAgainInformation, doPatchMolliePayment, doPlaceOrder, doPreparePayment, doRegisterUser, doRejectOffer, doRequestResetPasswordLink, doResetPassword, doReview, doSaveAddress, doSaveBlocks, doSavePreferredDeliveryServices, doSubscribeNewsletter, doUploadOrderPropertyFile, doUploadStorageItem, facetGetters, forgotPasswordGetters, getActiveShippingCountries, getAddresses$1 as getAddresses, getAddressesData, getAggregatedCountries, getAllTranslationLanguages, getAllTranslations, getAllTranslationsByLanguage, getAuthenticatedReview, getBlocks, getCart, getCategoriesSearch, getCategoryById, getCategoryTemplate, getCategoryTree, getCustomerClasses, getExecutePayPalOrder, getFacet, getInit, getLegalTexts, getMolliePayment, getMolliePaymentAndUpdateStatus, getMollieSettings, getOffer, getOrder, getOrderDocument, getOrderPropertyFile, getOrders$1 as getOrders, getPackstations, getPayPalApplePayTransactionInfo, getPayPalDataClientToken, getPayPalFraudId, getPayPalGooglePayTransactionInfo, getPayPalMerchantAndClientIds, getPayPalOrder, getPayPalOrderDetails, getPayPalSettings, getPaymentProviders, getPreferredDeliveryLocationShippingProfiles, getPreferredDeliveryServices$1 as getPreferredDeliveryServices, getPreferredDeliveryShippingProfiles, getProduct, getProductsByIds, getReturnReasons$1 as getReturnReasons, getReturns, getReview, getReviewAverage, getRobots$2 as getRobots, getSearch, getSession, getShippingProvider$1 as getShippingProvider, getStorageItems, getStorageMetadata, getTranslations, getWishlist, heroesGetters, legalGetters, localesGetters, manufacturerGetters, offerGetters, orderConfirmationGetters, orderDocumentGetters, orderGetters, paginationGetters, patchMergeTranslations, paymentProviderGetters, paypalGetters, productAttributeGetters, productBundleGetters, productGetters, productImageGetters, productPriceGetters, productPropertyGetters, productSeoSettingsGetters, returnGetters, reviewGetters, robotGetters, setCartItemQuantity, setCategorySettings, setCategoryTemplate, setCheckoutAddress, setConfiguration, setCustomAssets, setMobilePaymentProviderList, setPaymentProvider, setReview, setShippingProvider, shippingProviderGetters, tagGetters, userAddressGetters, userGetters, wishlistGetters };
7074
7465
  //# sourceMappingURL=index.es.js.map