@commercetools-frontend/mc-scripts 22.3.4 → 22.5.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 (47) hide show
  1. package/cli/dist/commercetools-frontend-mc-scripts-cli.cjs.dev.js +5 -5
  2. package/cli/dist/commercetools-frontend-mc-scripts-cli.cjs.prod.js +5 -5
  3. package/cli/dist/commercetools-frontend-mc-scripts-cli.esm.js +5 -5
  4. package/dist/{build-5d4c0845.cjs.prod.js → build-6f3a7149.cjs.prod.js} +3 -3
  5. package/dist/{build-496ad05a.esm.js → build-d37ecde4.esm.js} +3 -3
  6. package/dist/{build-32eb6224.cjs.dev.js → build-ee6252ed.cjs.dev.js} +3 -3
  7. package/dist/commercetools-frontend-mc-scripts.cjs.dev.js +1 -1
  8. package/dist/commercetools-frontend-mc-scripts.cjs.prod.js +1 -1
  9. package/dist/commercetools-frontend-mc-scripts.esm.js +1 -1
  10. package/dist/{config-sync-43b9665b.esm.js → config-sync-2474895f.esm.js} +42 -31
  11. package/dist/{config-sync-b2e35538.cjs.dev.js → config-sync-53812761.cjs.dev.js} +42 -31
  12. package/dist/{config-sync-cfc1b0d0.cjs.prod.js → config-sync-b3cf13d6.cjs.prod.js} +42 -31
  13. package/dist/{create-postcss-config-d5043f50.cjs.dev.js → create-postcss-config-38955806.cjs.dev.js} +1 -1
  14. package/dist/{create-postcss-config-40b4dc70.esm.js → create-postcss-config-7d5a084a.esm.js} +1 -1
  15. package/dist/{create-postcss-config-98740b9b.cjs.prod.js → create-postcss-config-987f981f.cjs.prod.js} +1 -1
  16. package/dist/{create-webpack-config-for-development-e2322997.cjs.prod.js → create-webpack-config-for-development-1dc75155.cjs.prod.js} +1 -1
  17. package/dist/{create-webpack-config-for-development-5a16dd8a.esm.js → create-webpack-config-for-development-20d11b2f.esm.js} +1 -1
  18. package/dist/{create-webpack-config-for-development-f64a9f66.cjs.dev.js → create-webpack-config-for-development-adec942a.cjs.dev.js} +1 -1
  19. package/dist/{create-webpack-config-for-production-5d8a6d47.esm.js → create-webpack-config-for-production-2714501d.esm.js} +1 -1
  20. package/dist/{create-webpack-config-for-production-9cb61f64.cjs.dev.js → create-webpack-config-for-production-5d05e2a4.cjs.dev.js} +1 -1
  21. package/dist/{create-webpack-config-for-production-0491dc08.cjs.prod.js → create-webpack-config-for-production-7fa7f889.cjs.prod.js} +1 -1
  22. package/dist/{credentials-storage-35e8439c.cjs.dev.js → credentials-storage-0e2adbdc.cjs.dev.js} +1 -1
  23. package/dist/{credentials-storage-0868f7c3.cjs.prod.js → credentials-storage-40a6085d.cjs.prod.js} +1 -1
  24. package/dist/{credentials-storage-9ff52496.esm.js → credentials-storage-c29c0759.esm.js} +1 -1
  25. package/dist/declarations/src/generated/core.d.ts +46 -35
  26. package/dist/declarations/src/generated/settings.d.ts +27 -0
  27. package/dist/declarations/src/utils/auth.d.ts +1 -1
  28. package/dist/declarations/src/utils/graphql-requests.d.ts +8 -4
  29. package/dist/login-6afc68fd.esm.js +91 -0
  30. package/dist/login-8d95b69d.cjs.dev.js +109 -0
  31. package/dist/login-af6845ba.cjs.prod.js +109 -0
  32. package/dist/{package-52888a3e.cjs.prod.js → package-2abcd320.cjs.prod.js} +12 -12
  33. package/dist/{package-1e5c9617.cjs.dev.js → package-b7315dcf.cjs.dev.js} +12 -12
  34. package/dist/{package-04e494f3.esm.js → package-f07b5369.esm.js} +12 -12
  35. package/dist/{start-eccce61c.cjs.prod.js → start-141e54b8.cjs.prod.js} +3 -3
  36. package/dist/{start-afbd2188.esm.js → start-1786dd0e.esm.js} +3 -3
  37. package/dist/{start-574c0bed.cjs.dev.js → start-718872ee.cjs.dev.js} +3 -3
  38. package/package.json +12 -12
  39. package/postcss/dist/commercetools-frontend-mc-scripts-postcss.cjs.dev.js +2 -2
  40. package/postcss/dist/commercetools-frontend-mc-scripts-postcss.cjs.prod.js +2 -2
  41. package/postcss/dist/commercetools-frontend-mc-scripts-postcss.esm.js +2 -2
  42. package/webpack/dist/commercetools-frontend-mc-scripts-webpack.cjs.dev.js +4 -4
  43. package/webpack/dist/commercetools-frontend-mc-scripts-webpack.cjs.prod.js +4 -4
  44. package/webpack/dist/commercetools-frontend-mc-scripts-webpack.esm.js +4 -4
  45. package/dist/login-a4a4d1a6.esm.js +0 -73
  46. package/dist/login-be351d01.cjs.prod.js +0 -82
  47. package/dist/login-df4f1f50.cjs.dev.js +0 -82
@@ -10,7 +10,7 @@ var chalk = require('chalk');
10
10
  var omit = require('lodash/omit');
11
11
  var prompts = require('prompts');
12
12
  var applicationConfig = require('@commercetools-frontend/application-config');
13
- var credentialsStorage$2 = require('./credentials-storage-0868f7c3.cjs.prod.js');
13
+ var credentialsStorage$2 = require('./credentials-storage-40a6085d.cjs.prod.js');
14
14
  var _Object$getOwnPropertySymbols = require('@babel/runtime-corejs3/core-js-stable/object/get-own-property-symbols');
15
15
  var _Object$getOwnPropertyDescriptor = require('@babel/runtime-corejs3/core-js-stable/object/get-own-property-descriptor');
16
16
  var _Object$getOwnPropertyDescriptors = require('@babel/runtime-corejs3/core-js-stable/object/get-own-property-descriptors');
@@ -27,7 +27,7 @@ var graphql = require('graphql');
27
27
  var graphqlRequest = require('graphql-request');
28
28
  var constants = require('@commercetools-frontend/constants');
29
29
  require('@commercetools/http-user-agent');
30
- require('./package-52888a3e.cjs.prod.js');
30
+ require('./package-2abcd320.cjs.prod.js');
31
31
  require('@babel/runtime-corejs3/helpers/classCallCheck');
32
32
  require('@babel/runtime-corejs3/helpers/createClass');
33
33
  require('@babel/runtime-corejs3/core-js-stable/date/now');
@@ -414,23 +414,18 @@ var FetchCustomApplicationFromCli = { kind: "Document", definitions: [{ kind: "O
414
414
  var FetchMyOrganizationsFromCli = { kind: "Document", definitions: [{ kind: "OperationDefinition", operation: "query", name: { kind: "Name", value: "FetchMyOrganizationsFromCli" }, variableDefinitions: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "myOrganizations" }, arguments: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "total" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "results" }, arguments: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "id" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "name" }, arguments: [], directives: [] }] } }] } }] } }], loc: { start: 0, end: 112, source: { body: "query FetchMyOrganizationsFromCli {\n myOrganizations {\n total\n results {\n id\n name\n }\n }\n}\n", name: "GraphQL request", locationOffset: { line: 1, column: 1 } } } };
415
415
  var UpdateCustomApplicationFromCli = { kind: "Document", definitions: [{ kind: "OperationDefinition", operation: "mutation", name: { kind: "Name", value: "UpdateCustomApplicationFromCli" }, variableDefinitions: [{ kind: "VariableDefinition", variable: { kind: "Variable", name: { kind: "Name", value: "organizationId" } }, type: { kind: "NonNullType", type: { kind: "NamedType", name: { kind: "Name", value: "String" } } }, directives: [] }, { kind: "VariableDefinition", variable: { kind: "Variable", name: { kind: "Name", value: "data" } }, type: { kind: "NonNullType", type: { kind: "NamedType", name: { kind: "Name", value: "CustomApplicationDraftDataInput" } } }, directives: [] }, { kind: "VariableDefinition", variable: { kind: "Variable", name: { kind: "Name", value: "applicationId" } }, type: { kind: "NonNullType", type: { kind: "NamedType", name: { kind: "Name", value: "ID" } } }, directives: [] }], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "updateCustomApplication" }, arguments: [{ kind: "Argument", name: { kind: "Name", value: "organizationId" }, value: { kind: "Variable", name: { kind: "Name", value: "organizationId" } } }, { kind: "Argument", name: { kind: "Name", value: "data" }, value: { kind: "Variable", name: { kind: "Name", value: "data" } } }, { kind: "Argument", name: { kind: "Name", value: "applicationId" }, value: { kind: "Variable", name: { kind: "Name", value: "applicationId" } } }], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "id" }, arguments: [], directives: [] }] } }] } }], loc: { start: 0, end: 268, source: { body: "mutation UpdateCustomApplicationFromCli(\n $organizationId: String!\n $data: CustomApplicationDraftDataInput!\n $applicationId: ID!\n) {\n updateCustomApplication(\n organizationId: $organizationId\n data: $data\n applicationId: $applicationId\n ) {\n id\n }\n}\n", name: "GraphQL request", locationOffset: { line: 1, column: 1 } } } };
416
416
  const credentialsStorage$1 = new credentialsStorage$2.CredentialsStorage();
417
- const client = new graphqlRequest.GraphQLClient('',
418
- // <-- Set on demand
419
- {
420
- headers: {
421
- Accept: 'application/json',
422
- 'Content-Type': 'application/json',
423
- 'x-user-agent': credentialsStorage$2.userAgent
424
- }
425
- });
426
417
  async function requestWithTokenRetry(document, requestOptions) {
427
418
  let retryCount = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 0;
428
419
  const token = credentialsStorage$1.getToken(requestOptions.mcApiUrl);
429
- client.setEndpoint("".concat(requestOptions.mcApiUrl, "/graphql"));
430
- client.setHeaders(requestOptions.headers);
431
- if (token) {
432
- client.setHeader('x-mc-cli-access-token', token);
433
- }
420
+ const client = new graphqlRequest.GraphQLClient("".concat(requestOptions.mcApiUrl, "/graphql"), {
421
+ headers: _objectSpread(_objectSpread({
422
+ Accept: 'application/json',
423
+ 'Content-Type': 'application/json',
424
+ 'x-user-agent': credentialsStorage$2.userAgent
425
+ }, token ? {
426
+ 'x-mc-cli-access-token': token
427
+ } : {}), requestOptions.headers)
428
+ });
434
429
  try {
435
430
  const result = await client.rawRequest(graphql.print(document), requestOptions.variables);
436
431
 
@@ -471,13 +466,15 @@ async function requestWithTokenRetry(document, requestOptions) {
471
466
  }
472
467
  const fetchCustomApplication = async _ref => {
473
468
  let mcApiUrl = _ref.mcApiUrl,
474
- entryPointUriPath = _ref.entryPointUriPath;
469
+ entryPointUriPath = _ref.entryPointUriPath,
470
+ applicationIdentifier = _ref.applicationIdentifier;
475
471
  const customAppData = await requestWithTokenRetry(FetchCustomApplicationFromCli, {
476
472
  variables: {
477
473
  entryPointUriPath
478
474
  },
479
475
  mcApiUrl,
480
476
  headers: {
477
+ 'x-application-id': applicationIdentifier,
481
478
  'x-graphql-target': constants.GRAPHQL_TARGETS.SETTINGS_SERVICE
482
479
  }
483
480
  });
@@ -487,7 +484,8 @@ const updateCustomApplication = async _ref2 => {
487
484
  let mcApiUrl = _ref2.mcApiUrl,
488
485
  applicationId = _ref2.applicationId,
489
486
  organizationId = _ref2.organizationId,
490
- data = _ref2.data;
487
+ data = _ref2.data,
488
+ applicationIdentifier = _ref2.applicationIdentifier;
491
489
  const updatedCustomAppsData = await requestWithTokenRetry(UpdateCustomApplicationFromCli, {
492
490
  variables: {
493
491
  organizationId,
@@ -496,6 +494,7 @@ const updateCustomApplication = async _ref2 => {
496
494
  },
497
495
  mcApiUrl,
498
496
  headers: {
497
+ 'x-application-id': applicationIdentifier,
499
498
  'x-graphql-target': constants.GRAPHQL_TARGETS.SETTINGS_SERVICE
500
499
  }
501
500
  });
@@ -504,7 +503,8 @@ const updateCustomApplication = async _ref2 => {
504
503
  const createCustomApplication = async _ref3 => {
505
504
  let mcApiUrl = _ref3.mcApiUrl,
506
505
  organizationId = _ref3.organizationId,
507
- data = _ref3.data;
506
+ data = _ref3.data,
507
+ applicationIdentifier = _ref3.applicationIdentifier;
508
508
  const createdCustomAppData = await requestWithTokenRetry(CreateCustomApplicationFromCli, {
509
509
  variables: {
510
510
  organizationId,
@@ -512,16 +512,19 @@ const createCustomApplication = async _ref3 => {
512
512
  },
513
513
  mcApiUrl,
514
514
  headers: {
515
+ 'x-application-id': applicationIdentifier,
515
516
  'x-graphql-target': constants.GRAPHQL_TARGETS.SETTINGS_SERVICE
516
517
  }
517
518
  });
518
519
  return createdCustomAppData.createCustomApplication;
519
520
  };
520
521
  const fetchUserOrganizations = async _ref4 => {
521
- let mcApiUrl = _ref4.mcApiUrl;
522
+ let mcApiUrl = _ref4.mcApiUrl,
523
+ applicationIdentifier = _ref4.applicationIdentifier;
522
524
  const userOrganizations = await requestWithTokenRetry(FetchMyOrganizationsFromCli, {
523
525
  mcApiUrl,
524
526
  headers: {
527
+ 'x-application-id': applicationIdentifier,
525
528
  'x-graphql-target': constants.GRAPHQL_TARGETS.ADMINISTRATION_SERVICE
526
529
  }
527
530
  });
@@ -536,10 +539,14 @@ const getMcUrlLink = (mcApiUrl, organizationId, applicationId) => {
536
539
  return customAppLink;
537
540
  };
538
541
  async function run(options) {
539
- var _context5;
542
+ var _context3, _context6;
540
543
  const applicationConfig$1 = applicationConfig.processConfig();
541
544
  const localCustomAppData = applicationConfig$1.data;
542
- const mcApiUrl = applicationConfig$1.env.mcApiUrl;
545
+ const _applicationConfig$en = applicationConfig$1.env,
546
+ mcApiUrl = _applicationConfig$en.mcApiUrl,
547
+ applicationId = _applicationConfig$en.applicationId,
548
+ entryPointUriPath = _applicationConfig$en.entryPointUriPath;
549
+ const applicationIdentifier = _concatInstanceProperty__default["default"](_context3 = "".concat(applicationId, ":")).call(_context3, entryPointUriPath);
543
550
  console.log("Using Merchant Center environment \"".concat(chalk__default["default"].green(mcApiUrl), "\"."));
544
551
  console.log();
545
552
  const isSessionValid = credentialsStorage.isSessionValid(mcApiUrl);
@@ -548,12 +555,14 @@ async function run(options) {
548
555
  }
549
556
  const fetchedCustomApplication = await fetchCustomApplication({
550
557
  mcApiUrl,
551
- entryPointUriPath: localCustomAppData.entryPointUriPath
558
+ entryPointUriPath: localCustomAppData.entryPointUriPath,
559
+ applicationIdentifier
552
560
  });
553
561
  if (!fetchedCustomApplication) {
554
- var _context4;
562
+ var _context5;
555
563
  const userOrganizations = await fetchUserOrganizations({
556
- mcApiUrl
564
+ mcApiUrl,
565
+ applicationIdentifier
557
566
  });
558
567
  let organizationId, organizationName;
559
568
  if (userOrganizations.total === 0) {
@@ -565,8 +574,8 @@ async function run(options) {
565
574
  organizationId = organization.id;
566
575
  organizationName = organization.name;
567
576
  } else {
568
- var _context3;
569
- const organizationChoices = _mapInstanceProperty__default["default"](_context3 = userOrganizations.results).call(_context3, organization => ({
577
+ var _context4;
578
+ const organizationChoices = _mapInstanceProperty__default["default"](_context4 = userOrganizations.results).call(_context4, organization => ({
570
579
  title: organization.name,
571
580
  value: organization.id
572
581
  }));
@@ -590,7 +599,7 @@ async function run(options) {
590
599
  const _await$prompts2 = await prompts__default["default"]({
591
600
  type: 'text',
592
601
  name: 'confirmation',
593
- message: _filterInstanceProperty__default["default"](_context4 = ["You are about to create a new Custom Application in the \"".concat(chalk__default["default"].green(organizationName), "\" organization. Are you sure you want to proceed?"), options.dryRun && chalk__default["default"].gray('Using "--dry-run", no data will be created.')]).call(_context4, Boolean).join('\n'),
602
+ message: _filterInstanceProperty__default["default"](_context5 = ["You are about to create a new Custom Application in the \"".concat(chalk__default["default"].green(organizationName), "\" organization. Are you sure you want to proceed?"), options.dryRun && chalk__default["default"].gray('Using "--dry-run", no data will be created.')]).call(_context5, Boolean).join('\n'),
594
603
  initial: 'yes'
595
604
  }),
596
605
  confirmation = _await$prompts2.confirmation;
@@ -609,7 +618,8 @@ async function run(options) {
609
618
  const createdCustomApplication = await createCustomApplication({
610
619
  mcApiUrl,
611
620
  organizationId,
612
- data
621
+ data,
622
+ applicationIdentifier
613
623
  });
614
624
 
615
625
  // This check is technically not necessary, as the `graphql-request` client
@@ -637,7 +647,7 @@ async function run(options) {
637
647
  const _await$prompts3 = await prompts__default["default"]({
638
648
  type: 'text',
639
649
  name: 'confirmation',
640
- message: _filterInstanceProperty__default["default"](_context5 = ["You are about to update the Custom Application \"".concat(chalk__default["default"].green(localCustomAppData.entryPointUriPath), "\" with the changes above. Are you sure you want to proceed?"), options.dryRun && chalk__default["default"].gray('Using "--dry-run", no data will be updated.')]).call(_context5, Boolean).join('\n'),
650
+ message: _filterInstanceProperty__default["default"](_context6 = ["You are about to update the Custom Application \"".concat(chalk__default["default"].green(localCustomAppData.entryPointUriPath), "\" with the changes above. Are you sure you want to proceed?"), options.dryRun && chalk__default["default"].gray('Using "--dry-run", no data will be updated.')]).call(_context6, Boolean).join('\n'),
641
651
  initial: 'yes'
642
652
  }),
643
653
  confirmation = _await$prompts3.confirmation;
@@ -657,7 +667,8 @@ async function run(options) {
657
667
  mcApiUrl,
658
668
  organizationId: fetchedCustomApplication.organizationId,
659
669
  data: omit__default["default"](localCustomAppData, ['id']),
660
- applicationId: fetchedCustomApplication.application.id
670
+ applicationId: fetchedCustomApplication.application.id,
671
+ applicationIdentifier
661
672
  });
662
673
  console.log(chalk__default["default"].green("Custom Application updated."));
663
674
  console.log("You can inspect the Custom Application data in the Merchant Center at \"".concat(chalk__default["default"].gray(customAppLink), "\"."));
@@ -2,7 +2,7 @@
2
2
 
3
3
  var _slicedToArray = require('@babel/runtime-corejs3/helpers/slicedToArray');
4
4
  var path = require('path');
5
- var _package = require('./package-1e5c9617.cjs.dev.js');
5
+ var _package = require('./package-b7315dcf.cjs.dev.js');
6
6
 
7
7
  function _interopDefault (e) { return e && e.__esModule ? e : { 'default': e }; }
8
8
 
@@ -1,6 +1,6 @@
1
1
  import _slicedToArray from '@babel/runtime-corejs3/helpers/esm/slicedToArray';
2
2
  import path from 'path';
3
- import { p as pkgJson } from './package-04e494f3.esm.js';
3
+ import { p as pkgJson } from './package-f07b5369.esm.js';
4
4
 
5
5
  // This function aims to return the same result as `require.resolve`.
6
6
  // However, resolving a path to a `.css` file does not return the real
@@ -2,7 +2,7 @@
2
2
 
3
3
  var _slicedToArray = require('@babel/runtime-corejs3/helpers/slicedToArray');
4
4
  var path = require('path');
5
- var _package = require('./package-52888a3e.cjs.prod.js');
5
+ var _package = require('./package-2abcd320.cjs.prod.js');
6
6
 
7
7
  function _interopDefault (e) { return e && e.__esModule ? e : { 'default': e }; }
8
8
 
@@ -24,7 +24,7 @@ var _createClass = require('@babel/runtime-corejs3/helpers/createClass');
24
24
  var _Object$assign = require('@babel/runtime-corejs3/core-js-stable/object/assign');
25
25
  var applicationConfig = require('@commercetools-frontend/application-config');
26
26
  var mcHtmlTemplate = require('@commercetools-frontend/mc-html-template');
27
- var createPostcssConfig = require('./create-postcss-config-98740b9b.cjs.prod.js');
27
+ var createPostcssConfig = require('./create-postcss-config-987f981f.cjs.prod.js');
28
28
  var hasJsxRuntime = require('./has-jsx-runtime-c3202df5.cjs.prod.js');
29
29
  var paths = require('./paths-854af5ef.cjs.prod.js');
30
30
  var vendorsToTranspile = require('./vendors-to-transpile-04a49d40.cjs.prod.js');
@@ -22,7 +22,7 @@ import _createClass from '@babel/runtime-corejs3/helpers/esm/createClass';
22
22
  import _Object$assign from '@babel/runtime-corejs3/core-js-stable/object/assign';
23
23
  import { processConfig } from '@commercetools-frontend/application-config';
24
24
  import { replaceHtmlPlaceholders } from '@commercetools-frontend/mc-html-template';
25
- import { c as createPostcssConfig } from './create-postcss-config-40b4dc70.esm.js';
25
+ import { c as createPostcssConfig } from './create-postcss-config-7d5a084a.esm.js';
26
26
  import { h as hasJsxRuntime } from './has-jsx-runtime-e3ecb09b.esm.js';
27
27
  import { p as paths } from './paths-ded20ae1.esm.js';
28
28
  import { v as vendorsToTranspile } from './vendors-to-transpile-7dc84a72.esm.js';
@@ -24,7 +24,7 @@ var _createClass = require('@babel/runtime-corejs3/helpers/createClass');
24
24
  var _Object$assign = require('@babel/runtime-corejs3/core-js-stable/object/assign');
25
25
  var applicationConfig = require('@commercetools-frontend/application-config');
26
26
  var mcHtmlTemplate = require('@commercetools-frontend/mc-html-template');
27
- var createPostcssConfig = require('./create-postcss-config-d5043f50.cjs.dev.js');
27
+ var createPostcssConfig = require('./create-postcss-config-38955806.cjs.dev.js');
28
28
  var hasJsxRuntime = require('./has-jsx-runtime-aa5d21ee.cjs.dev.js');
29
29
  var paths = require('./paths-d1febc82.cjs.dev.js');
30
30
  var vendorsToTranspile = require('./vendors-to-transpile-6ab4ea06.cjs.dev.js');
@@ -26,7 +26,7 @@ import _reduceInstanceProperty from '@babel/runtime-corejs3/core-js-stable/insta
26
26
  import _Object$assign from '@babel/runtime-corejs3/core-js-stable/object/assign';
27
27
  import fs from 'fs';
28
28
  import path from 'path';
29
- import { c as createPostcssConfig } from './create-postcss-config-40b4dc70.esm.js';
29
+ import { c as createPostcssConfig } from './create-postcss-config-7d5a084a.esm.js';
30
30
  import { h as hasJsxRuntime } from './has-jsx-runtime-e3ecb09b.esm.js';
31
31
  import { p as paths } from './paths-ded20ae1.esm.js';
32
32
  import { v as vendorsToTranspile } from './vendors-to-transpile-7dc84a72.esm.js';
@@ -28,7 +28,7 @@ var _reduceInstanceProperty = require('@babel/runtime-corejs3/core-js-stable/ins
28
28
  var _Object$assign = require('@babel/runtime-corejs3/core-js-stable/object/assign');
29
29
  var fs = require('fs');
30
30
  var path = require('path');
31
- var createPostcssConfig = require('./create-postcss-config-d5043f50.cjs.dev.js');
31
+ var createPostcssConfig = require('./create-postcss-config-38955806.cjs.dev.js');
32
32
  var hasJsxRuntime = require('./has-jsx-runtime-aa5d21ee.cjs.dev.js');
33
33
  var paths = require('./paths-d1febc82.cjs.dev.js');
34
34
  var vendorsToTranspile = require('./vendors-to-transpile-6ab4ea06.cjs.dev.js');
@@ -28,7 +28,7 @@ var _reduceInstanceProperty = require('@babel/runtime-corejs3/core-js-stable/ins
28
28
  var _Object$assign = require('@babel/runtime-corejs3/core-js-stable/object/assign');
29
29
  var fs = require('fs');
30
30
  var path = require('path');
31
- var createPostcssConfig = require('./create-postcss-config-98740b9b.cjs.prod.js');
31
+ var createPostcssConfig = require('./create-postcss-config-987f981f.cjs.prod.js');
32
32
  var hasJsxRuntime = require('./has-jsx-runtime-c3202df5.cjs.prod.js');
33
33
  var paths = require('./paths-854af5ef.cjs.prod.js');
34
34
  var vendorsToTranspile = require('./vendors-to-transpile-04a49d40.cjs.prod.js');
@@ -1,7 +1,7 @@
1
1
  'use strict';
2
2
 
3
3
  var createHttpUserAgent = require('@commercetools/http-user-agent');
4
- var _package = require('./package-1e5c9617.cjs.dev.js');
4
+ var _package = require('./package-b7315dcf.cjs.dev.js');
5
5
  var _classCallCheck = require('@babel/runtime-corejs3/helpers/classCallCheck');
6
6
  var _createClass = require('@babel/runtime-corejs3/helpers/createClass');
7
7
  var _JSON$stringify = require('@babel/runtime-corejs3/core-js-stable/json/stringify');
@@ -1,7 +1,7 @@
1
1
  'use strict';
2
2
 
3
3
  var createHttpUserAgent = require('@commercetools/http-user-agent');
4
- var _package = require('./package-52888a3e.cjs.prod.js');
4
+ var _package = require('./package-2abcd320.cjs.prod.js');
5
5
  var _classCallCheck = require('@babel/runtime-corejs3/helpers/classCallCheck');
6
6
  var _createClass = require('@babel/runtime-corejs3/helpers/createClass');
7
7
  var _JSON$stringify = require('@babel/runtime-corejs3/core-js-stable/json/stringify');
@@ -1,5 +1,5 @@
1
1
  import createHttpUserAgent from '@commercetools/http-user-agent';
2
- import { p as pkgJson } from './package-04e494f3.esm.js';
2
+ import { p as pkgJson } from './package-f07b5369.esm.js';
3
3
  import _classCallCheck from '@babel/runtime-corejs3/helpers/esm/classCallCheck';
4
4
  import _createClass from '@babel/runtime-corejs3/helpers/esm/createClass';
5
5
  import _JSON$stringify from '@babel/runtime-corejs3/core-js-stable/json/stringify';
@@ -18,17 +18,11 @@ export type Scalars = {
18
18
  Boolean: boolean;
19
19
  Int: number;
20
20
  Float: number;
21
- /** [ISO 3166-1](http://en.wikipedia.org/wiki/ISO_3166-1) country code. */
22
21
  Country: any;
23
- /** Represents a currency. Currencies are identified by their [ISO 4217](http://www.iso.org/iso/home/standards/currency_codes.htm) currency codes. */
24
22
  Currency: any;
25
- /** DateTime is a scalar value that represents an ISO8601 formatted date and time. */
26
23
  DateTime: any;
27
- /** DateTimeZone is a scalar value that represents a time zone. */
28
24
  DateTimeZone: any;
29
- /** Locale is a scalar value represented as a string language tag. */
30
25
  Locale: any;
31
- /** The `Long` scalar type represents non-fractional signed whole numeric values. Long can represent values between -(2^63) and 2^63 - 1. */
32
26
  Long: any;
33
27
  };
34
28
  export type TAddTeam = {
@@ -40,43 +34,35 @@ export type TAddTeamMembership = {
40
34
  teamId: Scalars['String'];
41
35
  user: TReferenceInput;
42
36
  };
37
+ export type TAttributeGroupLimits = {
38
+ __typename?: 'AttributeGroupLimits';
39
+ maxTotalAttributeGroups?: Maybe<Scalars['Int']>;
40
+ };
41
+ /** AWS S3 container config */
42
+ export type TAwsContainer = {
43
+ __typename?: 'AwsContainer';
44
+ /** Public bucket url, without the project part */
45
+ bucketUrl: Scalars['String'];
46
+ /** Project part of the object path on s3 */
47
+ projectPrefix: Scalars['String'];
48
+ };
43
49
  export declare enum TBusinessRole {
44
- /** Business Dev, Sales & Account Management role. */
45
- BusinessDevSalesAndAccountManagement = "BusinessDevSalesAndAccountManagement",
46
- /** Business Intelligence role. */
47
- BusinessIntelligence = "BusinessIntelligence",
48
- /** Buying, Planning & Inventory Management role. */
49
- BuyingPlanningAndInventoryManagement = "BuyingPlanningAndInventoryManagement",
50
+ /** Architect role. */
51
+ Architect = "Architect",
50
52
  /** Customer Service role. */
51
53
  CustomerService = "CustomerService",
52
- /** Data Quality & Content Management role. */
53
- DataQualityAndContentManagement = "DataQualityAndContentManagement",
54
+ /** Engineer role. */
55
+ Engineer = "Engineer",
54
56
  /** Executive Management role. */
55
57
  ExecutiveManagement = "ExecutiveManagement",
56
- /** Finance & Accounting role. */
57
- FinanceAndAccounting = "FinanceAndAccounting",
58
- /** Fulfillment & Operations Management role. */
59
- FulfillmentAndOperationsManagement = "FulfillmentAndOperationsManagement",
60
- /** Legal & People role. */
61
- LegalAndPeople = "LegalAndPeople",
62
- /** Logistics & Supply Chain role. */
63
- LogisticsAndSupplyChain = "LogisticsAndSupplyChain",
64
58
  /** Marketing role. */
65
59
  Marketing = "Marketing",
66
- /** Offline Retail Store role. */
67
- OfflineRetailStore = "OfflineRetailStore",
68
- /** Operations, IT & Support Engineering role. */
69
- OperationsItAndSupportEngineering = "OperationsITAndSupportEngineering",
70
60
  /** Other role. */
71
61
  Other = "Other",
72
- /** Software Development & Solutions Architect role. */
73
- SoftwareDevelopmentAndSolutionsArchitect = "SoftwareDevelopmentAndSolutionsArchitect",
74
- /** Product Management (Tech) role. */
75
- TechProductManagement = "TechProductManagement",
76
- /** Project & Program Management (Tech) role. */
77
- TechProjectAndProgramManagement = "TechProjectAndProgramManagement",
78
- /** UX/UI Design role. */
79
- UxuiDesign = "UXUIDesign"
62
+ /** ProductProjectManagerOrOwner role. */
63
+ ProductProjectManagerOrOwner = "ProductProjectManagerOrOwner",
64
+ /** SalesAndECommerceManager role. */
65
+ SalesAndECommerceManager = "SalesAndECommerceManager"
80
66
  }
81
67
  export type TCartClassificationType = TShippingRateInputType & {
82
68
  __typename?: 'CartClassificationType';
@@ -239,6 +225,7 @@ export type TExternalOAuthInput = {
239
225
  export type TInitiator = {
240
226
  __typename?: 'Initiator';
241
227
  anonymousId?: Maybe<Scalars['String']>;
228
+ associateRef?: Maybe<TReference>;
242
229
  clientId?: Maybe<Scalars['String']>;
243
230
  customerRef?: Maybe<TReference>;
244
231
  externalUserId?: Maybe<Scalars['String']>;
@@ -250,6 +237,7 @@ export type TLocalizedString = {
250
237
  locale: Scalars['Locale'];
251
238
  value: Scalars['String'];
252
239
  };
240
+ export type TMediaContainer = TAwsContainer | TPublicContainer;
253
241
  export type TMessagesConfiguration = {
254
242
  __typename?: 'MessagesConfiguration';
255
243
  deleteDaysAfterCreation?: Maybe<Scalars['Int']>;
@@ -265,6 +253,8 @@ export type TMutation = {
265
253
  deleteMyPermission?: Maybe<TPermission>;
266
254
  deleteMyProject?: Maybe<TProject>;
267
255
  deletePermission?: Maybe<TPermission>;
256
+ revokeAccessTokensByGroup?: Maybe<TRevokedTokens>;
257
+ revokeAccessTokensByTeam?: Maybe<TRevokedTokens>;
268
258
  updateMyOrganization?: Maybe<TOrganization>;
269
259
  updateMyPermission?: Maybe<TPermission>;
270
260
  updatePermission?: Maybe<TPermission>;
@@ -297,6 +287,14 @@ export type TMutation_DeletePermissionArgs = {
297
287
  id: Scalars['String'];
298
288
  version: Scalars['Long'];
299
289
  };
290
+ export type TMutation_RevokeAccessTokensByGroupArgs = {
291
+ owner: TReferenceInput;
292
+ permissionGroup: Scalars['String'];
293
+ };
294
+ export type TMutation_RevokeAccessTokensByTeamArgs = {
295
+ owner: TReferenceInput;
296
+ teamId: Scalars['String'];
297
+ };
300
298
  export type TMutation_UpdateMyOrganizationArgs = {
301
299
  actions: Array<TOrganizationUpdateAction>;
302
300
  id: Scalars['String'];
@@ -392,7 +390,7 @@ export type TProductTypeLimits = {
392
390
  export type TProject = TVersioned & {
393
391
  __typename?: 'Project';
394
392
  billingInfo?: Maybe<TProjectBillingInfo>;
395
- cdnContainer?: Maybe<TPublicContainer>;
393
+ cdnContainer?: Maybe<TMediaContainer>;
396
394
  cdnContainerConfiguration: TCdnContainerConfiguration;
397
395
  countries: Array<Scalars['Country']>;
398
396
  createdAt: Scalars['DateTime'];
@@ -428,6 +426,7 @@ export type TProjectBillingInfo = {
428
426
  };
429
427
  export type TProjectCustomLimits = {
430
428
  __typename?: 'ProjectCustomLimits';
429
+ attributeGroupLimits?: Maybe<TAttributeGroupLimits>;
431
430
  cartDiscounts?: Maybe<TCartDiscountLimits>;
432
431
  carts?: Maybe<TCartLimits>;
433
432
  categoryLimits?: Maybe<TCategoryLimits>;
@@ -445,6 +444,7 @@ export type TProjectCustomLimits = {
445
444
  shippingMethods?: Maybe<TShippingMethodLimit>;
446
445
  shoppingLists?: Maybe<TShoppingListLimits>;
447
446
  stores?: Maybe<TStoreLimits>;
447
+ subscriptions?: Maybe<TSubscriptionsLimits>;
448
448
  taxCategories?: Maybe<TTaxCategoryLimit>;
449
449
  termFacetSize?: Maybe<Scalars['Int']>;
450
450
  zones?: Maybe<TZoneLimits>;
@@ -493,6 +493,7 @@ export declare enum TProjectSuspensionReason {
493
493
  /** The usage of the project is not paid. */
494
494
  Payment = "Payment"
495
495
  }
496
+ /** Rackspace Cloud Files container config */
496
497
  export type TPublicContainer = {
497
498
  __typename?: 'PublicContainer';
498
499
  httpUri: Scalars['String'];
@@ -594,6 +595,12 @@ export type TRemoveTeamMembership = {
594
595
  teamId: Scalars['String'];
595
596
  user: TReferenceInput;
596
597
  };
598
+ export type TRevokedTokens = {
599
+ __typename?: 'RevokedTokens';
600
+ owner: TReference;
601
+ revoked: Scalars['Long'];
602
+ teams: Array<Scalars['String']>;
603
+ };
597
604
  export type TSearchIndexingConfigurationInput = {
598
605
  products?: InputMaybe<TSearchIndexingConfigurationValuesInput>;
599
606
  };
@@ -651,6 +658,10 @@ export type TStoreLimits = {
651
658
  maxProductSelectionsPerStore?: Maybe<Scalars['Long']>;
652
659
  maxStores?: Maybe<Scalars['Long']>;
653
660
  };
661
+ export type TSubscriptionsLimits = {
662
+ __typename?: 'SubscriptionsLimits';
663
+ maxSubscriptions?: Maybe<Scalars['Int']>;
664
+ };
654
665
  export type TTaxCategoryLimit = {
655
666
  __typename?: 'TaxCategoryLimit';
656
667
  maxTaxCategories?: Maybe<Scalars['Long']>;
@@ -23,6 +23,9 @@ export type Scalars = {
23
23
  [key: string]: unknown;
24
24
  };
25
25
  };
26
+ export type TAllPublicCustomApplicationsDevelopedByCommercetoolsQueryInput = {
27
+ organizationId?: InputMaybe<Scalars['String']>;
28
+ };
26
29
  export type TApplicationExtension = {
27
30
  __typename?: 'ApplicationExtension';
28
31
  createdAt: Scalars['DateTime'];
@@ -509,7 +512,9 @@ export type TMutation = {
509
512
  setOrganizationExtensionOidcSsoConfig?: Maybe<TOrganizationExtension>;
510
513
  setProjectExtensionCategoryRecommendation?: Maybe<TProjectExtension>;
511
514
  setProjectExtensionImageRegex?: Maybe<TProjectExtension>;
515
+ setProjectExtensionImportSampleDataset?: Maybe<TProjectExtension>;
512
516
  setProjectExtensionOrderStatesVisibility?: Maybe<TProjectExtension>;
517
+ setProjectExtensionRichTextEditorSettings?: Maybe<TProjectExtension>;
513
518
  uninstallCustomApplication?: Maybe<TRestrictedCustomApplicationInstallationForOrganization>;
514
519
  updateCartDiscountsCustomView?: Maybe<TDiscountsCustomView>;
515
520
  updateCustomApplication?: Maybe<TRestrictedCustomApplicationForOrganization>;
@@ -680,9 +685,15 @@ export type TMutation_SetProjectExtensionCategoryRecommendationArgs = {
680
685
  export type TMutation_SetProjectExtensionImageRegexArgs = {
681
686
  data?: InputMaybe<TImageRegexDataInput>;
682
687
  };
688
+ export type TMutation_SetProjectExtensionImportSampleDatasetArgs = {
689
+ data?: InputMaybe<TSampleDatasets>;
690
+ };
683
691
  export type TMutation_SetProjectExtensionOrderStatesVisibilityArgs = {
684
692
  data?: InputMaybe<Array<InputMaybe<TOrderStatesVisibility>>>;
685
693
  };
694
+ export type TMutation_SetProjectExtensionRichTextEditorSettingsArgs = {
695
+ data?: InputMaybe<TRichTextEditorSettingsInput>;
696
+ };
686
697
  export type TMutation_UninstallCustomApplicationArgs = {
687
698
  installedApplicationId: Scalars['ID'];
688
699
  organizationId: Scalars['String'];
@@ -968,8 +979,10 @@ export type TProjectExtension = {
968
979
  id: Scalars['ID'];
969
980
  imageRegex?: Maybe<TImageRegex>;
970
981
  installedApplications?: Maybe<Array<TRestrictedCustomApplicationInstallationForProject>>;
982
+ isRichTextEditorEnabled: Scalars['Boolean'];
971
983
  orderStatesVisibility: Array<TOrderStatesVisibility>;
972
984
  projectKey: Scalars['String'];
985
+ sampleDataImport?: Maybe<TSampleDataImportMetadata>;
973
986
  updatedAt: Scalars['DateTime'];
974
987
  };
975
988
  export type TProjectExtension_ApplicationsArgs = {
@@ -1057,6 +1070,9 @@ export type TQuery_AllFeaturesArgs = {
1057
1070
  export type TQuery_AllOrganizationExtensionsArgs = {
1058
1071
  organizationIds?: InputMaybe<Array<InputMaybe<Scalars['String']>>>;
1059
1072
  };
1073
+ export type TQuery_AllPublicCustomApplicationsDevelopedByCommercetoolsArgs = {
1074
+ params?: InputMaybe<TAllPublicCustomApplicationsDevelopedByCommercetoolsQueryInput>;
1075
+ };
1060
1076
  export type TQuery_CartDiscountsCustomViewArgs = {
1061
1077
  id: Scalars['ID'];
1062
1078
  };
@@ -1186,6 +1202,9 @@ export type TRestrictedCustomApplicationInstallationForProject = {
1186
1202
  export type TRestrictedCustomApplicationInstallationForProjectWhereInput = {
1187
1203
  entryPointUriPath?: InputMaybe<Scalars['String']>;
1188
1204
  };
1205
+ export type TRichTextEditorSettingsInput = {
1206
+ isRichTextEditorEnabled: Scalars['Boolean'];
1207
+ };
1189
1208
  export type TRuleBuilderQuickSelectCreatefunctionsInput = {
1190
1209
  set?: InputMaybe<Array<Scalars['String']>>;
1191
1210
  };
@@ -1229,6 +1248,14 @@ export type TSalesPerformanceConfigurationInput = {
1229
1248
  dateTo?: InputMaybe<Scalars['DateTime']>;
1230
1249
  showPreviousTimeframe: Scalars['Boolean'];
1231
1250
  };
1251
+ export type TSampleDataImportMetadata = {
1252
+ __typename?: 'SampleDataImportMetadata';
1253
+ completed: Scalars['Boolean'];
1254
+ dataset?: Maybe<TSampleDatasets>;
1255
+ };
1256
+ export declare enum TSampleDatasets {
1257
+ Fashion = "FASHION"
1258
+ }
1232
1259
  export type TSort = {
1233
1260
  __typename?: 'Sort';
1234
1261
  key: Scalars['String'];
@@ -2,5 +2,5 @@ type TAuthPayload = {
2
2
  email: string;
3
3
  password: string;
4
4
  };
5
- declare const getAuthToken: (mcApiUrl: string, payload: TAuthPayload) => Promise<any>;
5
+ declare const getAuthToken: (mcApiUrl: string, payload: TAuthPayload, headers?: Record<string, string>) => Promise<any>;
6
6
  export { getAuthToken };
@@ -2,22 +2,26 @@ import type { TCustomApplicationDraftDataInput } from '../generated/settings';
2
2
  type TFetchCustomApplicationOptions = {
3
3
  mcApiUrl: string;
4
4
  entryPointUriPath: string;
5
+ applicationIdentifier: string;
5
6
  };
6
7
  type TUpdateCustomApplicationOptions = {
7
8
  mcApiUrl: string;
8
9
  applicationId: string;
9
10
  organizationId: string;
10
11
  data: TCustomApplicationDraftDataInput;
12
+ applicationIdentifier: string;
11
13
  };
12
14
  type TCreateCustomApplicationOptions = {
13
15
  mcApiUrl: string;
14
16
  organizationId: string;
15
17
  data: TCustomApplicationDraftDataInput;
18
+ applicationIdentifier: string;
16
19
  };
17
20
  type TFetchUserOrganizationsOptions = {
18
21
  mcApiUrl: string;
22
+ applicationIdentifier: string;
19
23
  };
20
- declare const fetchCustomApplication: ({ mcApiUrl, entryPointUriPath, }: TFetchCustomApplicationOptions) => Promise<{
24
+ declare const fetchCustomApplication: ({ mcApiUrl, entryPointUriPath, applicationIdentifier, }: TFetchCustomApplicationOptions) => Promise<{
21
25
  __typename?: "OrganizationExtensionForCustomApplication" | undefined;
22
26
  organizationId: string;
23
27
  application: {
@@ -56,15 +60,15 @@ declare const fetchCustomApplication: ({ mcApiUrl, entryPointUriPath, }: TFetchC
56
60
  }[];
57
61
  };
58
62
  } | null | undefined>;
59
- declare const updateCustomApplication: ({ mcApiUrl, applicationId, organizationId, data, }: TUpdateCustomApplicationOptions) => Promise<{
63
+ declare const updateCustomApplication: ({ mcApiUrl, applicationId, organizationId, data, applicationIdentifier, }: TUpdateCustomApplicationOptions) => Promise<{
60
64
  __typename?: "RestrictedCustomApplicationForOrganization" | undefined;
61
65
  id: string;
62
66
  } | null | undefined>;
63
- declare const createCustomApplication: ({ mcApiUrl, organizationId, data, }: TCreateCustomApplicationOptions) => Promise<{
67
+ declare const createCustomApplication: ({ mcApiUrl, organizationId, data, applicationIdentifier, }: TCreateCustomApplicationOptions) => Promise<{
64
68
  __typename?: "RestrictedCustomApplicationForOrganization" | undefined;
65
69
  id: string;
66
70
  } | null | undefined>;
67
- declare const fetchUserOrganizations: ({ mcApiUrl, }: TFetchUserOrganizationsOptions) => Promise<{
71
+ declare const fetchUserOrganizations: ({ mcApiUrl, applicationIdentifier, }: TFetchUserOrganizationsOptions) => Promise<{
68
72
  __typename?: "OrganizationQueryResult" | undefined;
69
73
  total: any;
70
74
  results: {