@commercetools-frontend/application-shell-connectors 21.17.0 → 21.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.
@@ -47,7 +47,7 @@ var _valuesInstanceProperty__default = /*#__PURE__*/_interopDefault(_valuesInsta
47
47
  var warning__default = /*#__PURE__*/_interopDefault(warning);
48
48
 
49
49
  // NOTE: This string will be replaced on build time with the package version.
50
- var version = "21.17.0";
50
+ var version = "21.18.0";
51
51
 
52
52
  var mcHostnameRegex = /^mc(-(\d){4,})?\.(.*)$/;
53
53
  var mcPreviewHostnameRegex = /^.*\.mc-preview\.(.*)$/;
@@ -262,14 +262,15 @@ var mapUserToApplicationContextUser = function mapUserToApplicationContextUser(u
262
262
  // a locale (language + country).
263
263
  locale: user.language,
264
264
  timeZone: user.timeZone || defaultTimeZone,
265
- projects: user.projects
265
+ projects: user.projects,
266
+ verificationStatus: user.verificationStatus
266
267
  }; // This property will only be populated when user has logged in using SSO
267
268
 
268
269
  if (user.idTokenUserInfo) {
269
270
  var additionalClaims = {};
270
271
 
271
272
  try {
272
- additionalClaims = JSON.parse(user.idTokenUserInfo.additionalClaims || '');
273
+ additionalClaims = JSON.parse(user.idTokenUserInfo.additionalClaims || '{}');
273
274
  } catch (error) {
274
275
  sentry.reportErrorToSentry(new Error('@commercetools-frontend/application-shell-connectors: Could not parse received user sso token additional claims from server.'), {
275
276
  extra: {
@@ -45,7 +45,7 @@ var _Object$entries__default = /*#__PURE__*/_interopDefault(_Object$entries);
45
45
  var _valuesInstanceProperty__default = /*#__PURE__*/_interopDefault(_valuesInstanceProperty);
46
46
 
47
47
  // NOTE: This string will be replaced on build time with the package version.
48
- var version = "21.17.0";
48
+ var version = "21.18.0";
49
49
 
50
50
  var mcHostnameRegex = /^mc(-(\d){4,})?\.(.*)$/;
51
51
  var mcPreviewHostnameRegex = /^.*\.mc-preview\.(.*)$/;
@@ -260,14 +260,15 @@ var mapUserToApplicationContextUser = function mapUserToApplicationContextUser(u
260
260
  // a locale (language + country).
261
261
  locale: user.language,
262
262
  timeZone: user.timeZone || defaultTimeZone,
263
- projects: user.projects
263
+ projects: user.projects,
264
+ verificationStatus: user.verificationStatus
264
265
  }; // This property will only be populated when user has logged in using SSO
265
266
 
266
267
  if (user.idTokenUserInfo) {
267
268
  var additionalClaims = {};
268
269
 
269
270
  try {
270
- additionalClaims = JSON.parse(user.idTokenUserInfo.additionalClaims || '');
271
+ additionalClaims = JSON.parse(user.idTokenUserInfo.additionalClaims || '{}');
271
272
  } catch (error) {
272
273
  sentry.reportErrorToSentry(new Error('@commercetools-frontend/application-shell-connectors: Could not parse received user sso token additional claims from server.'), {
273
274
  extra: {
@@ -24,7 +24,7 @@ import { useQuery } from '@apollo/client/react';
24
24
  import { GRAPHQL_TARGETS } from '@commercetools-frontend/constants';
25
25
 
26
26
  // NOTE: This string will be replaced on build time with the package version.
27
- var version = "21.17.0";
27
+ var version = "21.18.0";
28
28
 
29
29
  var mcHostnameRegex = /^mc(-(\d){4,})?\.(.*)$/;
30
30
  var mcPreviewHostnameRegex = /^.*\.mc-preview\.(.*)$/;
@@ -239,14 +239,15 @@ var mapUserToApplicationContextUser = function mapUserToApplicationContextUser(u
239
239
  // a locale (language + country).
240
240
  locale: user.language,
241
241
  timeZone: user.timeZone || defaultTimeZone,
242
- projects: user.projects
242
+ projects: user.projects,
243
+ verificationStatus: user.verificationStatus
243
244
  }; // This property will only be populated when user has logged in using SSO
244
245
 
245
246
  if (user.idTokenUserInfo) {
246
247
  var additionalClaims = {};
247
248
 
248
249
  try {
249
- additionalClaims = JSON.parse(user.idTokenUserInfo.additionalClaims || '');
250
+ additionalClaims = JSON.parse(user.idTokenUserInfo.additionalClaims || '{}');
250
251
  } catch (error) {
251
252
  reportErrorToSentry(new Error('@commercetools-frontend/application-shell-connectors: Could not parse received user sso token additional claims from server.'), {
252
253
  extra: {
@@ -23,7 +23,7 @@ declare type TApplicationContextGroupedByResourceType = {
23
23
  declare type TApplicationContextDataFenceType = 'store';
24
24
  declare type TApplicationContextDataFences = Partial<Record<TApplicationContextDataFenceType, TApplicationContextGroupedByResourceType>>;
25
25
  declare type TApplicationContextEnvironment = ApplicationWindow['app'];
26
- declare type TApplicationContextUser = Pick<NonNullable<TFetchedUser>, 'id' | 'email' | 'firstName' | 'lastName' | 'businessRole' | 'projects'> & {
26
+ declare type TApplicationContextUser = Pick<NonNullable<TFetchedUser>, 'id' | 'email' | 'firstName' | 'lastName' | 'businessRole' | 'projects' | 'verificationStatus'> & {
27
27
  locale: string;
28
28
  timeZone: string;
29
29
  idTokenUserInfo?: Omit<TIdTokenUserInfo, 'additionalClaims'> & {
@@ -574,6 +574,7 @@ export declare type TUser = TMetaData & {
574
574
  numberFormat: Scalars['String'];
575
575
  projects: TProjectQueryResult;
576
576
  timeZone?: Maybe<Scalars['String']>;
577
+ verificationStatus: TVerificationStatus;
577
578
  version?: Maybe<Scalars['Int']>;
578
579
  };
579
580
  export declare type TUserDraft = {
@@ -590,6 +591,10 @@ export declare type TUserUpdateAction = {
590
591
  changePassword?: InputMaybe<TChangeUserPassword>;
591
592
  setTimeZone?: InputMaybe<TSetUserTimeZone>;
592
593
  };
594
+ export declare enum TVerificationStatus {
595
+ Unverified = "Unverified",
596
+ Verified = "Verified"
597
+ }
593
598
  export declare type TAmILoggedInQueryVariables = Exact<{
594
599
  [key: string]: never;
595
600
  }>;
@@ -694,6 +699,7 @@ export declare type TFetchLoggedInUserQuery = {
694
699
  launchdarklyTrackingTenant: string;
695
700
  defaultProjectKey?: string | null;
696
701
  businessRole?: string | null;
702
+ verificationStatus: TVerificationStatus;
697
703
  projects: {
698
704
  __typename?: 'ProjectQueryResult';
699
705
  total: number;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@commercetools-frontend/application-shell-connectors",
3
- "version": "21.17.0",
3
+ "version": "21.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": {
@@ -23,8 +23,8 @@
23
23
  "dependencies": {
24
24
  "@babel/runtime": "^7.19.0",
25
25
  "@babel/runtime-corejs3": "^7.19.0",
26
- "@commercetools-frontend/constants": "21.17.0",
27
- "@commercetools-frontend/sentry": "21.17.0",
26
+ "@commercetools-frontend/constants": "21.18.0",
27
+ "@commercetools-frontend/sentry": "21.18.0",
28
28
  "@emotion/react": "11.10.4",
29
29
  "@types/lodash": "^4.14.185",
30
30
  "@types/prop-types": "^15.7.5",
@@ -36,7 +36,7 @@
36
36
  "tiny-warning": "1.0.3"
37
37
  },
38
38
  "devDependencies": {
39
- "@apollo/client": "3.6.9",
39
+ "@apollo/client": "3.7.0",
40
40
  "@testing-library/react": "12.1.5",
41
41
  "react": "17.0.2"
42
42
  },