@commercetools-frontend/application-shell-connectors 22.17.1 → 22.18.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.
@@ -81,7 +81,7 @@ var _Reflect$construct__default = /*#__PURE__*/_interopDefault(_Reflect$construc
81
81
  var _JSON$stringify__default = /*#__PURE__*/_interopDefault(_JSON$stringify);
82
82
 
83
83
  // NOTE: This string will be replaced on build time with the package version.
84
- var version = "22.17.1";
84
+ var version = "22.18.0";
85
85
 
86
86
  // From https://github.com/acdlite/recompose/blob/master/src/packages/recompose/getDisplayName.js
87
87
  const getDisplayName = Component => {
@@ -748,7 +748,7 @@ function ownKeys$2(e, r) { var t = _Object$keys__default["default"](e); if (_Obj
748
748
  function _objectSpread$2(e) { for (var r = 1; r < arguments.length; r++) { var _context3, _context4; var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? _forEachInstanceProperty__default["default"](_context3 = ownKeys$2(Object(t), !0)).call(_context3, function (r) { _defineProperty(e, r, t[r]); }) : _Object$getOwnPropertyDescriptors__default["default"] ? _Object$defineProperties__default["default"](e, _Object$getOwnPropertyDescriptors__default["default"](t)) : _forEachInstanceProperty__default["default"](_context4 = ownKeys$2(Object(t))).call(_context4, function (r) { _Object$defineProperty__default["default"](e, r, _Object$getOwnPropertyDescriptor__default["default"](t, r)); }); } return e; }
749
749
  const defaultUserAgent = createHttpUserAgent__default["default"]({
750
750
  name: 'unknown-http-client',
751
- libraryName: window.app.applicationName
751
+ libraryName: typeof window !== 'undefined' ? window.app.applicationName : 'unknown-application-name'
752
752
  });
753
753
  const defaultForwardToVersion = 'v2';
754
754
  const defaultForwardToAudiencePolicy = 'forward-url-full-path';
@@ -863,7 +863,7 @@ function _objectSpread$1(e) { for (var r = 1; r < arguments.length; r++) { var _
863
863
  const userAgent = createHttpUserAgent__default["default"]({
864
864
  name: 'apollo-client',
865
865
  // version: apolloVersion,
866
- libraryName: [window.app.applicationName, 'application-shell'].join('/'),
866
+ libraryName: [typeof window !== 'undefined' ? window.app.applicationName : 'unknown-application-name', 'application-shell'].join('/'),
867
867
  libraryVersion: version,
868
868
  contactUrl: 'https://git.io/fjuyC',
869
869
  // points to the appkit repo issues
@@ -952,31 +952,30 @@ const tokenRetryLink = new retry.RetryLink({
952
952
 
953
953
  function ownKeys(e, r) { var t = _Object$keys__default["default"](e); if (_Object$getOwnPropertySymbols__default["default"]) { var o = _Object$getOwnPropertySymbols__default["default"](e); r && (o = _filterInstanceProperty__default["default"](o).call(o, function (r) { return _Object$getOwnPropertyDescriptor__default["default"](e, r).enumerable; })), t.push.apply(t, o); } return t; }
954
954
  function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var _context, _context2; var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? _forEachInstanceProperty__default["default"](_context = ownKeys(Object(t), !0)).call(_context, function (r) { _defineProperty(e, r, t[r]); }) : _Object$getOwnPropertyDescriptors__default["default"] ? _Object$defineProperties__default["default"](e, _Object$getOwnPropertyDescriptors__default["default"](t)) : _forEachInstanceProperty__default["default"](_context2 = ownKeys(Object(t))).call(_context2, function (r) { _Object$defineProperty__default["default"](e, r, _Object$getOwnPropertyDescriptor__default["default"](t, r)); }); } return e; }
955
- const httpLink = client.createHttpLink({
956
- uri: "".concat(getMcApiUrl(), "/graphql"),
957
- fetch
958
- });
959
955
  const createApolloLink = function () {
960
956
  let options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
961
- return (
962
- // The order of links is IMPORTANT!
963
- // In the request-phase they are executed top to bottom.
964
- // In the response/phase they are executed bottom to top.
965
- // The `httpLink` is terminating so it must be last, while `tokenRetryLink` and `errorLink`
966
- // wrap the links the their right.
967
- client.from([headerLink,
968
- // See https://www.apollographql.com/docs/react/api/link/apollo-link-rest/#link-order
969
- // State & context links should happen before (to the left of) `restLink`.
970
- ...(options.restLink ? [options.restLink] : []),
971
- // Must be before `tokenRetryLink`.
972
- errorLink,
973
- // Avoid logging queries in test environment
974
- ...(isLoggerEnabled() ? [loggerLink__default["default"]] : []),
975
- // Must be after `errorLink`.
976
- tokenRetryLink,
977
- // Must be last.
978
- httpLink])
979
- );
957
+ const httpLink = client.createHttpLink({
958
+ uri: "".concat(getMcApiUrl(), "/graphql"),
959
+ fetch
960
+ });
961
+
962
+ // The order of links is IMPORTANT!
963
+ // In the request-phase they are executed top to bottom.
964
+ // In the response/phase they are executed bottom to top.
965
+ // The `httpLink` is terminating so it must be last, while `tokenRetryLink` and `errorLink`
966
+ // wrap the links the their right.
967
+ return client.from([headerLink,
968
+ // See https://www.apollographql.com/docs/react/api/link/apollo-link-rest/#link-order
969
+ // State & context links should happen before (to the left of) `restLink`.
970
+ ...(options.restLink ? [options.restLink] : []),
971
+ // Must be before `tokenRetryLink`.
972
+ errorLink,
973
+ // Avoid logging queries in test environment
974
+ ...(isLoggerEnabled() ? [loggerLink__default["default"]] : []),
975
+ // Must be after `errorLink`.
976
+ tokenRetryLink,
977
+ // Must be last.
978
+ httpLink]);
980
979
  };
981
980
 
982
981
  // This custom merge function allows to merge two arrays of objects.
@@ -79,7 +79,7 @@ var _Reflect$construct__default = /*#__PURE__*/_interopDefault(_Reflect$construc
79
79
  var _JSON$stringify__default = /*#__PURE__*/_interopDefault(_JSON$stringify);
80
80
 
81
81
  // NOTE: This string will be replaced on build time with the package version.
82
- var version = "22.17.1";
82
+ var version = "22.18.0";
83
83
 
84
84
  // From https://github.com/acdlite/recompose/blob/master/src/packages/recompose/getDisplayName.js
85
85
  const getDisplayName = Component => {
@@ -725,7 +725,7 @@ function ownKeys$2(e, r) { var t = _Object$keys__default["default"](e); if (_Obj
725
725
  function _objectSpread$2(e) { for (var r = 1; r < arguments.length; r++) { var _context3, _context4; var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? _forEachInstanceProperty__default["default"](_context3 = ownKeys$2(Object(t), !0)).call(_context3, function (r) { _defineProperty(e, r, t[r]); }) : _Object$getOwnPropertyDescriptors__default["default"] ? _Object$defineProperties__default["default"](e, _Object$getOwnPropertyDescriptors__default["default"](t)) : _forEachInstanceProperty__default["default"](_context4 = ownKeys$2(Object(t))).call(_context4, function (r) { _Object$defineProperty__default["default"](e, r, _Object$getOwnPropertyDescriptor__default["default"](t, r)); }); } return e; }
726
726
  const defaultUserAgent = createHttpUserAgent__default["default"]({
727
727
  name: 'unknown-http-client',
728
- libraryName: window.app.applicationName
728
+ libraryName: typeof window !== 'undefined' ? window.app.applicationName : 'unknown-application-name'
729
729
  });
730
730
  const defaultForwardToVersion = 'v2';
731
731
  const defaultForwardToAudiencePolicy = 'forward-url-full-path';
@@ -840,7 +840,7 @@ function _objectSpread$1(e) { for (var r = 1; r < arguments.length; r++) { var _
840
840
  const userAgent = createHttpUserAgent__default["default"]({
841
841
  name: 'apollo-client',
842
842
  // version: apolloVersion,
843
- libraryName: [window.app.applicationName, 'application-shell'].join('/'),
843
+ libraryName: [typeof window !== 'undefined' ? window.app.applicationName : 'unknown-application-name', 'application-shell'].join('/'),
844
844
  libraryVersion: version,
845
845
  contactUrl: 'https://git.io/fjuyC',
846
846
  // points to the appkit repo issues
@@ -929,31 +929,30 @@ const tokenRetryLink = new retry.RetryLink({
929
929
 
930
930
  function ownKeys(e, r) { var t = _Object$keys__default["default"](e); if (_Object$getOwnPropertySymbols__default["default"]) { var o = _Object$getOwnPropertySymbols__default["default"](e); r && (o = _filterInstanceProperty__default["default"](o).call(o, function (r) { return _Object$getOwnPropertyDescriptor__default["default"](e, r).enumerable; })), t.push.apply(t, o); } return t; }
931
931
  function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var _context, _context2; var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? _forEachInstanceProperty__default["default"](_context = ownKeys(Object(t), !0)).call(_context, function (r) { _defineProperty(e, r, t[r]); }) : _Object$getOwnPropertyDescriptors__default["default"] ? _Object$defineProperties__default["default"](e, _Object$getOwnPropertyDescriptors__default["default"](t)) : _forEachInstanceProperty__default["default"](_context2 = ownKeys(Object(t))).call(_context2, function (r) { _Object$defineProperty__default["default"](e, r, _Object$getOwnPropertyDescriptor__default["default"](t, r)); }); } return e; }
932
- const httpLink = client.createHttpLink({
933
- uri: "".concat(getMcApiUrl(), "/graphql"),
934
- fetch
935
- });
936
932
  const createApolloLink = function () {
937
933
  let options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
938
- return (
939
- // The order of links is IMPORTANT!
940
- // In the request-phase they are executed top to bottom.
941
- // In the response/phase they are executed bottom to top.
942
- // The `httpLink` is terminating so it must be last, while `tokenRetryLink` and `errorLink`
943
- // wrap the links the their right.
944
- client.from([headerLink,
945
- // See https://www.apollographql.com/docs/react/api/link/apollo-link-rest/#link-order
946
- // State & context links should happen before (to the left of) `restLink`.
947
- ...(options.restLink ? [options.restLink] : []),
948
- // Must be before `tokenRetryLink`.
949
- errorLink,
950
- // Avoid logging queries in test environment
951
- ...(isLoggerEnabled() ? [loggerLink__default["default"]] : []),
952
- // Must be after `errorLink`.
953
- tokenRetryLink,
954
- // Must be last.
955
- httpLink])
956
- );
934
+ const httpLink = client.createHttpLink({
935
+ uri: "".concat(getMcApiUrl(), "/graphql"),
936
+ fetch
937
+ });
938
+
939
+ // The order of links is IMPORTANT!
940
+ // In the request-phase they are executed top to bottom.
941
+ // In the response/phase they are executed bottom to top.
942
+ // The `httpLink` is terminating so it must be last, while `tokenRetryLink` and `errorLink`
943
+ // wrap the links the their right.
944
+ return client.from([headerLink,
945
+ // See https://www.apollographql.com/docs/react/api/link/apollo-link-rest/#link-order
946
+ // State & context links should happen before (to the left of) `restLink`.
947
+ ...(options.restLink ? [options.restLink] : []),
948
+ // Must be before `tokenRetryLink`.
949
+ errorLink,
950
+ // Avoid logging queries in test environment
951
+ ...(isLoggerEnabled() ? [loggerLink__default["default"]] : []),
952
+ // Must be after `errorLink`.
953
+ tokenRetryLink,
954
+ // Must be last.
955
+ httpLink]);
957
956
  };
958
957
 
959
958
  // This custom merge function allows to merge two arrays of objects.
@@ -22,7 +22,7 @@ import { useQuery, useLazyQuery, useMutation } from '@apollo/client/react';
22
22
  import warning from 'tiny-warning';
23
23
  import { GRAPHQL_TARGETS, SUPPORTED_HEADERS, STATUS_CODES, LOGOUT_REASONS, STORAGE_KEYS, LOGIN_STRATEGY_OIDC } from '@commercetools-frontend/constants';
24
24
  import _findInstanceProperty from '@babel/runtime-corejs3/core-js-stable/instance/find';
25
- import { ApolloLink, createHttpLink, ApolloClient, InMemoryCache, from } from '@apollo/client';
25
+ import { ApolloLink, ApolloClient, InMemoryCache, createHttpLink, from } from '@apollo/client';
26
26
  import loggerLink from 'apollo-link-logger';
27
27
  import { onError } from '@apollo/client/link/error';
28
28
  import history from '@commercetools-frontend/browser-history';
@@ -46,7 +46,7 @@ import _JSON$stringify from '@babel/runtime-corejs3/core-js-stable/json/stringif
46
46
  import { RetryLink } from '@apollo/client/link/retry';
47
47
 
48
48
  // NOTE: This string will be replaced on build time with the package version.
49
- var version = "22.17.1";
49
+ var version = "22.18.0";
50
50
 
51
51
  // From https://github.com/acdlite/recompose/blob/master/src/packages/recompose/getDisplayName.js
52
52
  const getDisplayName = Component => {
@@ -713,7 +713,7 @@ function ownKeys$2(e, r) { var t = _Object$keys(e); if (_Object$getOwnPropertySy
713
713
  function _objectSpread$2(e) { for (var r = 1; r < arguments.length; r++) { var _context3, _context4; var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? _forEachInstanceProperty(_context3 = ownKeys$2(Object(t), !0)).call(_context3, function (r) { _defineProperty(e, r, t[r]); }) : _Object$getOwnPropertyDescriptors ? _Object$defineProperties(e, _Object$getOwnPropertyDescriptors(t)) : _forEachInstanceProperty(_context4 = ownKeys$2(Object(t))).call(_context4, function (r) { _Object$defineProperty(e, r, _Object$getOwnPropertyDescriptor(t, r)); }); } return e; }
714
714
  const defaultUserAgent = createHttpUserAgent({
715
715
  name: 'unknown-http-client',
716
- libraryName: window.app.applicationName
716
+ libraryName: typeof window !== 'undefined' ? window.app.applicationName : 'unknown-application-name'
717
717
  });
718
718
  const defaultForwardToVersion = 'v2';
719
719
  const defaultForwardToAudiencePolicy = 'forward-url-full-path';
@@ -828,7 +828,7 @@ function _objectSpread$1(e) { for (var r = 1; r < arguments.length; r++) { var _
828
828
  const userAgent = createHttpUserAgent({
829
829
  name: 'apollo-client',
830
830
  // version: apolloVersion,
831
- libraryName: [window.app.applicationName, 'application-shell'].join('/'),
831
+ libraryName: [typeof window !== 'undefined' ? window.app.applicationName : 'unknown-application-name', 'application-shell'].join('/'),
832
832
  libraryVersion: version,
833
833
  contactUrl: 'https://git.io/fjuyC',
834
834
  // points to the appkit repo issues
@@ -917,31 +917,30 @@ const tokenRetryLink = new RetryLink({
917
917
 
918
918
  function ownKeys(e, r) { var t = _Object$keys(e); if (_Object$getOwnPropertySymbols) { var o = _Object$getOwnPropertySymbols(e); r && (o = _filterInstanceProperty(o).call(o, function (r) { return _Object$getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
919
919
  function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var _context, _context2; var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? _forEachInstanceProperty(_context = ownKeys(Object(t), !0)).call(_context, function (r) { _defineProperty(e, r, t[r]); }) : _Object$getOwnPropertyDescriptors ? _Object$defineProperties(e, _Object$getOwnPropertyDescriptors(t)) : _forEachInstanceProperty(_context2 = ownKeys(Object(t))).call(_context2, function (r) { _Object$defineProperty(e, r, _Object$getOwnPropertyDescriptor(t, r)); }); } return e; }
920
- const httpLink = createHttpLink({
921
- uri: "".concat(getMcApiUrl(), "/graphql"),
922
- fetch
923
- });
924
920
  const createApolloLink = function () {
925
921
  let options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
926
- return (
927
- // The order of links is IMPORTANT!
928
- // In the request-phase they are executed top to bottom.
929
- // In the response/phase they are executed bottom to top.
930
- // The `httpLink` is terminating so it must be last, while `tokenRetryLink` and `errorLink`
931
- // wrap the links the their right.
932
- from([headerLink,
933
- // See https://www.apollographql.com/docs/react/api/link/apollo-link-rest/#link-order
934
- // State & context links should happen before (to the left of) `restLink`.
935
- ...(options.restLink ? [options.restLink] : []),
936
- // Must be before `tokenRetryLink`.
937
- errorLink,
938
- // Avoid logging queries in test environment
939
- ...(isLoggerEnabled() ? [loggerLink] : []),
940
- // Must be after `errorLink`.
941
- tokenRetryLink,
942
- // Must be last.
943
- httpLink])
944
- );
922
+ const httpLink = createHttpLink({
923
+ uri: "".concat(getMcApiUrl(), "/graphql"),
924
+ fetch
925
+ });
926
+
927
+ // The order of links is IMPORTANT!
928
+ // In the request-phase they are executed top to bottom.
929
+ // In the response/phase they are executed bottom to top.
930
+ // The `httpLink` is terminating so it must be last, while `tokenRetryLink` and `errorLink`
931
+ // wrap the links the their right.
932
+ return from([headerLink,
933
+ // See https://www.apollographql.com/docs/react/api/link/apollo-link-rest/#link-order
934
+ // State & context links should happen before (to the left of) `restLink`.
935
+ ...(options.restLink ? [options.restLink] : []),
936
+ // Must be before `tokenRetryLink`.
937
+ errorLink,
938
+ // Avoid logging queries in test environment
939
+ ...(isLoggerEnabled() ? [loggerLink] : []),
940
+ // Must be after `errorLink`.
941
+ tokenRetryLink,
942
+ // Must be last.
943
+ httpLink]);
945
944
  };
946
945
 
947
946
  // This custom merge function allows to merge two arrays of objects.
@@ -357,6 +357,7 @@ export type TQuery = {
357
357
  release?: Maybe<Scalars['String']>;
358
358
  releases?: Maybe<TReleaseHistory>;
359
359
  storeOAuthScopes: Array<Scalars['String']>;
360
+ systemStatus: TSystemStatus;
360
361
  };
361
362
  export type TQuery_AllImpliedOAuthScopesArgs = {
362
363
  onlyConfiguredOnTrustedClient?: InputMaybe<Scalars['Boolean']>;
@@ -487,6 +488,15 @@ export type TSupportedStoreScope = {
487
488
  group: Scalars['String'];
488
489
  name: Scalars['String'];
489
490
  };
491
+ export declare enum TSystemOperabilityStatus {
492
+ Degraded = "DEGRADED",
493
+ Operational = "OPERATIONAL",
494
+ Outage = "OUTAGE"
495
+ }
496
+ export type TSystemStatus = {
497
+ __typename?: 'SystemStatus';
498
+ status: TSystemOperabilityStatus;
499
+ };
490
500
  export type TUser = TMetaData & {
491
501
  __typename?: 'User';
492
502
  businessRole?: Maybe<Scalars['String']>;
@@ -655,6 +665,7 @@ export type TFetchLoggedInUserQuery = {
655
665
  __typename?: 'Project';
656
666
  name: string;
657
667
  key: string;
668
+ isProductionProject: boolean;
658
669
  suspension: {
659
670
  __typename?: 'ProjectSuspension';
660
671
  isActive: boolean;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@commercetools-frontend/application-shell-connectors",
3
- "version": "22.17.1",
3
+ "version": "22.18.0",
4
4
  "description": "Contains complementary tools for @commercetools-frontend/application-shell",
5
5
  "bugs": "https://github.com/commercetools/merchant-center-application-kit/issues",
6
6
  "repository": {
@@ -37,10 +37,10 @@
37
37
  "dependencies": {
38
38
  "@babel/runtime": "^7.22.15",
39
39
  "@babel/runtime-corejs3": "^7.22.15",
40
- "@commercetools-frontend/application-config": "22.17.1",
41
- "@commercetools-frontend/browser-history": "22.17.1",
42
- "@commercetools-frontend/constants": "22.17.1",
43
- "@commercetools-frontend/sentry": "22.17.1",
40
+ "@commercetools-frontend/application-config": "22.18.0",
41
+ "@commercetools-frontend/browser-history": "22.18.0",
42
+ "@commercetools-frontend/constants": "22.18.0",
43
+ "@commercetools-frontend/sentry": "22.18.0",
44
44
  "@commercetools/http-user-agent": "3.0.0",
45
45
  "@emotion/react": "^11.11.1",
46
46
  "@types/lodash": "^4.14.198",