@rh-support/troubleshoot 2.6.296 → 2.6.300

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 (106) hide show
  1. package/lib/esm/components/AccountInfo/AccountSelector.d.ts.map +1 -1
  2. package/lib/esm/components/AccountInfo/AccountSelector.js +40 -28
  3. package/lib/esm/components/CaseEditView/ActiveCustomerEscalation/RequestEscalationModal.d.ts.map +1 -1
  4. package/lib/esm/components/CaseEditView/ActiveCustomerEscalation/RequestEscalationModal.js +12 -42
  5. package/lib/esm/components/CaseEditView/Case.d.ts.map +1 -1
  6. package/lib/esm/components/CaseEditView/Case.js +5 -7
  7. package/lib/esm/components/CaseEditView/CaseDetailsAside.d.ts.map +1 -1
  8. package/lib/esm/components/CaseEditView/CaseDetailsAside.js +8 -25
  9. package/lib/esm/components/CaseEditView/CaseDetailsTabs.d.ts.map +1 -1
  10. package/lib/esm/components/CaseEditView/CaseDetailsTabs.js +10 -14
  11. package/lib/esm/components/CaseEditView/CaseOverview/index.d.ts.map +1 -1
  12. package/lib/esm/components/CaseEditView/CaseOverview/index.js +18 -24
  13. package/lib/esm/components/CaseEditView/RequestRemoteSession/NewEssTermsModal.d.ts.map +1 -1
  14. package/lib/esm/components/CaseEditView/RequestRemoteSession/NewEssTermsModal.js +6 -9
  15. package/lib/esm/components/CaseEditView/RequestRemoteSession/RemoteSessionAgreementModal.d.ts.map +1 -1
  16. package/lib/esm/components/CaseEditView/RequestRemoteSession/RemoteSessionAgreementModal.js +3 -7
  17. package/lib/esm/components/CaseEditView/Tabs/CaseDetails/CaseContactPhoneNumber.d.ts.map +1 -1
  18. package/lib/esm/components/CaseEditView/Tabs/CaseDetails/CaseContactPhoneNumber.js +34 -38
  19. package/lib/esm/components/CaseEditView/Tabs/CaseDetails/CaseDetailsManagement.d.ts.map +1 -1
  20. package/lib/esm/components/CaseEditView/Tabs/CaseDetails/CaseDetailsManagement.js +9 -9
  21. package/lib/esm/components/CaseEditView/Tabs/CaseDetails/ProductVersion.d.ts.map +1 -1
  22. package/lib/esm/components/CaseEditView/Tabs/CaseDetails/ProductVersion.js +59 -19
  23. package/lib/esm/components/CaseEditView/Tabs/CaseDetails/Summary.d.ts.map +1 -1
  24. package/lib/esm/components/CaseEditView/Tabs/CaseDetails/Summary.js +9 -16
  25. package/lib/esm/components/CaseEditView/Tabs/CaseDiscussion/VerifyCaseStatusModal/VerifyCaseStatusModal.d.ts.map +1 -1
  26. package/lib/esm/components/CaseEditView/Tabs/CaseDiscussion/VerifyCaseStatusModal/VerifyCaseStatusModal.js +3 -5
  27. package/lib/esm/components/CaseEditView/Tabs/RMEEscalations/RMEEscalationList.d.ts.map +1 -1
  28. package/lib/esm/components/CaseEditView/Tabs/RMEEscalations/RMEEscalationList.js +2 -3
  29. package/lib/esm/components/CaseInformation/CaseInformation.d.ts.map +1 -1
  30. package/lib/esm/components/CaseInformation/CaseInformation.js +5 -7
  31. package/lib/esm/components/CaseInformation/ContactPhoneNumber.d.ts.map +1 -1
  32. package/lib/esm/components/CaseInformation/ContactPhoneNumber.js +24 -37
  33. package/lib/esm/components/CaseInformation/SupportLevel.d.ts.map +1 -1
  34. package/lib/esm/components/CaseInformation/SupportLevel.js +55 -32
  35. package/lib/esm/components/CaseManagement/CaseLanguageSelector.js +2 -2
  36. package/lib/esm/components/CaseManagement/CaseManagement.d.ts.map +1 -1
  37. package/lib/esm/components/CaseManagement/CaseManagement.js +9 -4
  38. package/lib/esm/components/IdeaInformation/IdeaInformation.d.ts.map +1 -1
  39. package/lib/esm/components/IdeaInformation/IdeaInformation.js +12 -11
  40. package/lib/esm/components/OpenCase/SupportTypeSelectorPage.d.ts.map +1 -1
  41. package/lib/esm/components/OpenCase/SupportTypeSelectorPage.js +2 -4
  42. package/lib/esm/components/ProductSelector/AllProductsSelector.d.ts +1 -0
  43. package/lib/esm/components/ProductSelector/AllProductsSelector.d.ts.map +1 -1
  44. package/lib/esm/components/ProductSelector/AllProductsSelector.js +15 -3
  45. package/lib/esm/components/ProductSelector/NewProductDropdownSelector.d.ts.map +1 -1
  46. package/lib/esm/components/ProductSelector/NewProductDropdownSelector.js +37 -13
  47. package/lib/esm/components/ProductSelector/NewProductVersionSelector.d.ts.map +1 -1
  48. package/lib/esm/components/ProductSelector/NewProductVersionSelector.js +53 -19
  49. package/lib/esm/components/ProductSelector/ProductSelector.d.ts.map +1 -1
  50. package/lib/esm/components/ProductSelector/ProductSelector.js +3 -1
  51. package/lib/esm/components/Review/Review.d.ts.map +1 -1
  52. package/lib/esm/components/Review/Review.js +18 -16
  53. package/lib/esm/components/SessionRestore/SessionRestore.d.ts.map +1 -1
  54. package/lib/esm/components/SessionRestore/SessionRestore.js +1 -3
  55. package/lib/esm/components/UpdateSeverityModal/UpdateSeverityModal.js +1 -1
  56. package/lib/esm/components/shared/useIsSectionValid.d.ts.map +1 -1
  57. package/lib/esm/components/shared/useIsSectionValid.js +64 -50
  58. package/lib/esm/components/wizardLayout/GlobalTroubleshootEffects.d.ts.map +1 -1
  59. package/lib/esm/components/wizardLayout/GlobalTroubleshootEffects.js +23 -106
  60. package/lib/esm/components/wizardLayout/WizardLayout.d.ts.map +1 -1
  61. package/lib/esm/components/wizardLayout/WizardLayout.js +7 -6
  62. package/lib/esm/components/wizardLayout/WizardNavigation.d.ts.map +1 -1
  63. package/lib/esm/components/wizardLayout/WizardNavigation.js +10 -10
  64. package/lib/esm/context/CaseContext.d.ts.map +1 -1
  65. package/lib/esm/hooks/useResetCaseCreate.d.ts.map +1 -1
  66. package/lib/esm/hooks/useResetCaseCreate.js +11 -18
  67. package/lib/esm/reducers/CaseConstNTypes.d.ts +2 -86
  68. package/lib/esm/reducers/CaseConstNTypes.d.ts.map +1 -1
  69. package/lib/esm/reducers/CaseConstNTypes.js +0 -5
  70. package/lib/esm/reducers/CaseDetailsPageReducer.d.ts +1 -3
  71. package/lib/esm/reducers/CaseDetailsPageReducer.d.ts.map +1 -1
  72. package/lib/esm/reducers/CaseDetailsPageReducer.js +5 -22
  73. package/lib/esm/reducers/CaseHelpers.d.ts +1 -2
  74. package/lib/esm/reducers/CaseHelpers.d.ts.map +1 -1
  75. package/lib/esm/reducers/CaseHelpers.js +2 -34
  76. package/lib/esm/reducers/CaseOverviewReducer.d.ts +1 -3
  77. package/lib/esm/reducers/CaseOverviewReducer.d.ts.map +1 -1
  78. package/lib/esm/reducers/CaseOverviewReducer.js +5 -7
  79. package/lib/esm/reducers/CaseReducer.d.ts +8 -27
  80. package/lib/esm/reducers/CaseReducer.d.ts.map +1 -1
  81. package/lib/esm/reducers/CaseReducer.js +29 -113
  82. package/package.json +6 -6
  83. package/lib/esm/graphql/index.d.ts +0 -4
  84. package/lib/esm/graphql/index.d.ts.map +0 -1
  85. package/lib/esm/graphql/index.js +0 -3
  86. package/lib/esm/graphql/mutations/createRMECaseEscalation.d.ts +0 -2
  87. package/lib/esm/graphql/mutations/createRMECaseEscalation.d.ts.map +0 -1
  88. package/lib/esm/graphql/mutations/createRMECaseEscalation.js +0 -24
  89. package/lib/esm/graphql/mutations/index.d.ts +0 -2
  90. package/lib/esm/graphql/mutations/index.d.ts.map +0 -1
  91. package/lib/esm/graphql/mutations/index.js +0 -1
  92. package/lib/esm/graphql/queries/getEscalationDetails.d.ts +0 -2
  93. package/lib/esm/graphql/queries/getEscalationDetails.d.ts.map +0 -1
  94. package/lib/esm/graphql/queries/getEscalationDetails.js +0 -24
  95. package/lib/esm/graphql/queries/getParentId.d.ts +0 -2
  96. package/lib/esm/graphql/queries/getParentId.d.ts.map +0 -1
  97. package/lib/esm/graphql/queries/getParentId.js +0 -16
  98. package/lib/esm/graphql/queries/index.d.ts +0 -3
  99. package/lib/esm/graphql/queries/index.d.ts.map +0 -1
  100. package/lib/esm/graphql/queries/index.js +0 -2
  101. package/lib/esm/graphql/schemas/escalation.d.ts +0 -84
  102. package/lib/esm/graphql/schemas/escalation.d.ts.map +0 -1
  103. package/lib/esm/graphql/schemas/escalation.js +0 -1
  104. package/lib/esm/graphql/schemas/index.d.ts +0 -2
  105. package/lib/esm/graphql/schemas/index.d.ts.map +0 -1
  106. package/lib/esm/graphql/schemas/index.js +0 -1
@@ -9,8 +9,8 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
9
9
  };
10
10
  import { accounts, contacts, kase, pcm, publicApi } from '@cee-eng/hydrajs';
11
11
  import { formattedApiErrorMessage } from '@rh-support/components';
12
- import { CREATE_SUPPORT_CASE, dtmTrackEventCaseCreationStepEncountered, fetchCaseDetailsByCaseNumber, GET_ACCOUNT, GET_PRODUCTS, getAccountQueryVariables, getApiResourceObject, handleGraphQLAccountResponse, handleGraphQLVersionsResponse, mapGraphQLCaseDetailsToCasePayload, PreviousToNewCaseTypeMap, updateCaseDetailsGraphQLRequest, } from '@rh-support/utils';
13
- // import delay from 'lodash/delay';
12
+ import { dtmTrackEventCaseCreationStepEncountered, getApiResourceObject, PreviousToNewCaseTypeMap, } from '@rh-support/utils';
13
+ import delay from 'lodash/delay';
14
14
  import filter from 'lodash/filter';
15
15
  import find from 'lodash/find';
16
16
  import isEmpty from 'lodash/isEmpty';
@@ -20,7 +20,7 @@ import uniq from 'lodash/uniq';
20
20
  import uniqBy from 'lodash/uniqBy';
21
21
  import { trimAndReplacePlus } from '../components/shared/utils';
22
22
  import { CaseReducerConstants, DESCRIPTION_LENGTH_LIMIT, initialCaseState, SupportLevelDisplay, } from './CaseConstNTypes';
23
- import { createCasePayload, createCasePayloadGraphQL, getCaseFromSessionDetails, getCaseRecommendations, getCepCommentFromCepDetails, getHasInvalidEntitlements, getProcessedEntitlements, } from './CaseHelpers';
23
+ import { createCasePayload, getCaseFromSessionDetails, getCaseRecommendations, getCepCommentFromCepDetails, getHasInvalidEntitlements, getProcessedEntitlements, } from './CaseHelpers';
24
24
  import { updateSession } from './SessionRestoreReducer';
25
25
  export const caseReducer = (pState, action) => {
26
26
  var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l;
@@ -29,20 +29,17 @@ export const caseReducer = (pState, action) => {
29
29
  const hasLargeCaseDescription = action.payload.caseDetails.hasOwnProperty('description')
30
30
  ? (action.payload.caseDetails.description || '').length > DESCRIPTION_LENGTH_LIMIT
31
31
  : pState.hasLargeCaseDescription;
32
- let resetEntitlementId = false;
33
32
  if (((_b = (_a = action.payload) === null || _a === void 0 ? void 0 : _a.caseDetails) === null || _b === void 0 ? void 0 : _b.contactSSOName) &&
34
33
  pState.caseDetails.contactSSOName !== ((_d = (_c = action.payload) === null || _c === void 0 ? void 0 : _c.caseDetails) === null || _d === void 0 ? void 0 : _d.contactSSOName)) {
35
34
  // Need to reset casegroup and sla as they are dependent on selected owner
36
35
  action.payload.caseDetails.entitlementSla = undefined;
37
- resetEntitlementId = true;
38
36
  }
39
37
  if (((_f = (_e = action.payload) === null || _e === void 0 ? void 0 : _e.caseDetails) === null || _f === void 0 ? void 0 : _f.product) &&
40
38
  pState.caseDetails.product !== ((_h = (_g = action.payload) === null || _g === void 0 ? void 0 : _g.caseDetails) === null || _h === void 0 ? void 0 : _h.product)) {
41
39
  // need to reset sla on product change as individiual products can have independent sla
42
40
  action.payload.caseDetails.entitlementSla = undefined;
43
- resetEntitlementId = true;
44
41
  }
45
- return Object.assign(Object.assign(Object.assign({}, pState), { hasLargeCaseDescription, caseDetails: Object.assign(Object.assign({}, pState.caseDetails), action.payload.caseDetails), isCaseUpdating: false }), (resetEntitlementId ? { selectedEntitlementId: undefined } : {}));
42
+ return Object.assign(Object.assign({}, pState), { hasLargeCaseDescription, caseDetails: Object.assign(Object.assign({}, pState.caseDetails), action.payload.caseDetails), isCaseUpdating: false });
46
43
  }
47
44
  case CaseReducerConstants.caseStateChanged: {
48
45
  return Object.assign(Object.assign({}, pState), action.payload);
@@ -170,23 +167,15 @@ export const setNotifiedUser = (dispatch, selectedNotificationContacts) => {
170
167
  payload: { selectedNotificationContacts },
171
168
  });
172
169
  };
173
- export const submitCase = (dispatch_1, sessionRestoreDispatch_1, caseDetails_1, isCaseCreate_1, errorMessage500_1, loggedInUserSsoUsername_1, ...args_1) => __awaiter(void 0, [dispatch_1, sessionRestoreDispatch_1, caseDetails_1, isCaseCreate_1, errorMessage500_1, loggedInUserSsoUsername_1, ...args_1], void 0, function* (dispatch, sessionRestoreDispatch, caseDetails, isCaseCreate, errorMessage500, loggedInUserSsoUsername, isSecureSupport = false, isResubmit, isCreatingCaseFlow, sessionItem, apolloClient) {
174
- var _a, _b, _c, _d, _e, _f;
170
+ export const submitCase = (dispatch_1, sessionRestoreDispatch_1, caseDetails_1, isCaseCreate_1, errorMessage500_1, loggedInUserSsoUsername_1, ...args_1) => __awaiter(void 0, [dispatch_1, sessionRestoreDispatch_1, caseDetails_1, isCaseCreate_1, errorMessage500_1, loggedInUserSsoUsername_1, ...args_1], void 0, function* (dispatch, sessionRestoreDispatch, caseDetails, isCaseCreate, errorMessage500, loggedInUserSsoUsername, isSecureSupport = false, isResubmit, isCreatingCaseFlow, sessionItem) {
171
+ var _a, _b;
175
172
  dispatch({ type: CaseReducerConstants.isCreatingCase });
176
173
  try {
177
174
  const casePayload = createCasePayload(caseDetails, sessionItem, isCaseCreate);
178
- const graphQLPayload = createCasePayloadGraphQL(caseDetails, sessionItem, isCaseCreate);
179
175
  dispatch({ type: CaseReducerConstants.resetCaseNoOfCreatedCase, payload: { caseNoOfCreatedCase: '' } });
180
- const { data } = yield apolloClient.mutate({
181
- mutation: CREATE_SUPPORT_CASE,
182
- variables: {
183
- caseInput: graphQLPayload,
184
- },
185
- });
186
- const caseRecord = (_b = (_a = data === null || data === void 0 ? void 0 : data.salesforce_support_uiapi) === null || _a === void 0 ? void 0 : _a.CaseCreate) === null || _b === void 0 ? void 0 : _b.SalesforceSupportRecord;
187
- const caseNumber = (_c = caseRecord === null || caseRecord === void 0 ? void 0 : caseRecord.CaseNumber) === null || _c === void 0 ? void 0 : _c.value;
176
+ const caseNumber = yield publicApi.kase.createCase(casePayload, caseDetails.selectedAccountDetails.data.secureSupport);
188
177
  if (casePayload.contactSSOName === loggedInUserSsoUsername &&
189
- !isEmpty((_d = casePayload.phoneAreaCodePrefixLineNumber) === null || _d === void 0 ? void 0 : _d.trim()) &&
178
+ !isEmpty((_a = casePayload.phoneAreaCodePrefixLineNumber) === null || _a === void 0 ? void 0 : _a.trim()) &&
190
179
  !isEmpty(trimAndReplacePlus((casePayload === null || casePayload === void 0 ? void 0 : casePayload.phoneCountryCode) || ''))) {
191
180
  contacts.updateContactBySSO(casePayload.contactSSOName, {
192
181
  supportPhoneCountryCode: casePayload.phoneCountryCode,
@@ -195,7 +184,7 @@ export const submitCase = (dispatch_1, sessionRestoreDispatch_1, caseDetails_1,
195
184
  }
196
185
  // For updating the sessions and posting cep details after case creation
197
186
  postCaseCreationProcessing(isSecureSupport, dispatch, sessionRestoreDispatch, caseNumber, caseDetails, sessionItem);
198
- dtmTrackEventCaseCreationStepEncountered(isCreatingCaseFlow, 'Submit', false, caseNumber, PreviousToNewCaseTypeMap[(_e = caseDetails.caseDetails) === null || _e === void 0 ? void 0 : _e.caseType], (_f = caseDetails.caseDetails.summary) !== null && _f !== void 0 ? _f : undefined, caseDetails.caseDetails.product, caseDetails.caseDetails.version);
187
+ dtmTrackEventCaseCreationStepEncountered(isCreatingCaseFlow, 'Submit', false, caseNumber, PreviousToNewCaseTypeMap[(_b = caseDetails.caseDetails) === null || _b === void 0 ? void 0 : _b.caseType], caseDetails.caseDetails.summary, caseDetails.caseDetails.product, caseDetails.caseDetails.version);
199
188
  dispatch({ type: CaseReducerConstants.caseCreated, payload: { caseNoOfCreatedCase: caseNumber } });
200
189
  }
201
190
  catch (error) {
@@ -387,8 +376,8 @@ export const clearSelectedAccount = (dispatch) => {
387
376
  payload: { caseDetails: { accountNumberRef: '' } },
388
377
  });
389
378
  };
390
- export const setCaseAccountNumber = (dispatch_1, accountNumber_1, ...args_1) => __awaiter(void 0, [dispatch_1, accountNumber_1, ...args_1], void 0, function* (dispatch, accountNumber, isLoggedInUsersAccount = false, loggedInUserAccount = {}, apolloClient) {
391
- var _a, _b, _c, _d, _e;
379
+ export const setCaseAccountNumber = (dispatch_1, accountNumber_1, ...args_1) => __awaiter(void 0, [dispatch_1, accountNumber_1, ...args_1], void 0, function* (dispatch, accountNumber, isLoggedInUsersAccount = false, loggedInUserAccount = {}) {
380
+ var _a;
392
381
  if (isLoggedInUsersAccount && !isEmpty(loggedInUserAccount) && !isEmpty(accountNumber)) {
393
382
  dispatch({
394
383
  type: CaseReducerConstants.caseStateChanged,
@@ -421,12 +410,7 @@ export const setCaseAccountNumber = (dispatch_1, accountNumber_1, ...args_1) =>
421
410
  payload: { selectedAccountDetails: getApiResourceObject({}, true) },
422
411
  });
423
412
  try {
424
- const { data } = yield apolloClient.query({
425
- query: GET_ACCOUNT,
426
- variables: getAccountQueryVariables(accountNumber),
427
- });
428
- const edges = (_e = (_d = (_c = (_b = data === null || data === void 0 ? void 0 : data.salesforce_support_uiapi) === null || _b === void 0 ? void 0 : _b.query) === null || _c === void 0 ? void 0 : _c.SalesforceSupportAccount) === null || _d === void 0 ? void 0 : _d.edges) !== null && _e !== void 0 ? _e : [];
429
- const selectedAccountDetails = handleGraphQLAccountResponse(edges);
413
+ const selectedAccountDetails = yield accounts.getAccount(accountNumber);
430
414
  dispatch({
431
415
  type: CaseReducerConstants.caseStateChanged,
432
416
  payload: { selectedAccountDetails: getApiResourceObject(selectedAccountDetails) },
@@ -491,7 +475,7 @@ export const setCaseOwner = (dispatch_1, owner_1, product_1, abortSignalCaseGrou
491
475
  }
492
476
  dispatch({
493
477
  type: CaseReducerConstants.caseStateChanged,
494
- payload: { selectedOwner: getApiResourceObject(owner), hasInvalidEntitlements: false },
478
+ payload: { selectedOwner: getApiResourceObject(owner) },
495
479
  });
496
480
  dispatch({
497
481
  type: CaseReducerConstants.caseDetailChanged,
@@ -505,19 +489,9 @@ export const setCaseOwner = (dispatch_1, owner_1, product_1, abortSignalCaseGrou
505
489
  fetchCaseGroupsForSSO(dispatch, owner.ssoUsername, setCaseGroupToUngroupedOrDefault, abortSignalCaseGroup, caseGroupNumberToRestore);
506
490
  }
507
491
  }
508
- // delay(
509
- // async () =>
510
- // await fetchCaseEntitlements(
511
- // dispatch,
512
- // owner.ssoUsername!,
513
- // product,
514
- // abortSignalEntitlements,
515
- // isUserUpdate,
516
- // caseNumber
517
- // ),
518
- // 5000,
519
- // 'later'
520
- // );
492
+ delay(() => __awaiter(void 0, void 0, void 0, function* () {
493
+ return yield fetchCaseEntitlements(dispatch, owner.ssoUsername, product, abortSignalEntitlements, isUserUpdate, caseNumber);
494
+ }), 5000, 'later');
521
495
  });
522
496
  //changing the item values to uppercase to match the backend values
523
497
  const slaOrder = Object.values(SupportLevelDisplay).map((item) => {
@@ -598,12 +572,12 @@ export const fetchCaseGroupsForSSO = (dispatch_1, contactSsoUsername_1, ...args_
598
572
  const getSelectedNotificationContactsFromSession = (contacts, notifiedUsers) => {
599
573
  return filter(contacts, (c) => notifiedUsers.includes(c.ssoUsername));
600
574
  };
601
- export const updateCaseWithSession = (dispatch_1, sessionItem_1, loggedInUserAccountNumber_1, loggedInUserContact_1, ...args_1) => __awaiter(void 0, [dispatch_1, sessionItem_1, loggedInUserAccountNumber_1, loggedInUserContact_1, ...args_1], void 0, function* (dispatch, sessionItem, loggedInUserAccountNumber, loggedInUserContact, loggedInUserAccount = {}, apolloClient) {
575
+ export const updateCaseWithSession = (dispatch_1, sessionItem_1, loggedInUserAccountNumber_1, loggedInUserContact_1, ...args_1) => __awaiter(void 0, [dispatch_1, sessionItem_1, loggedInUserAccountNumber_1, loggedInUserContact_1, ...args_1], void 0, function* (dispatch, sessionItem, loggedInUserAccountNumber, loggedInUserContact, loggedInUserAccount = {}) {
602
576
  var _a, _b, _c, _d;
603
577
  const caseDetails = getCaseFromSessionDetails(sessionItem, loggedInUserAccountNumber, loggedInUserContact.ssoUsername);
604
578
  const { sessionDetails } = sessionItem;
605
579
  setCaseDetails(dispatch, caseDetails);
606
- setCaseAccountNumber(dispatch, caseDetails.accountNumberRef, caseDetails.accountNumberRef === loggedInUserAccountNumber, loggedInUserAccount, apolloClient);
580
+ setCaseAccountNumber(dispatch, caseDetails.accountNumberRef, caseDetails.accountNumberRef === loggedInUserAccountNumber, loggedInUserAccount);
607
581
  // entitlementSla gets undefined when case group, owner or product is changed
608
582
  // Please refer line 60
609
583
  if (isUndefined(caseDetails.entitlementSla)) {
@@ -663,7 +637,7 @@ const getAllRelevantContacts = (loggedInUserContact, caseAccountNumber, contactS
663
637
  return uniqBy(contactsToReturn, 'ssoUsername');
664
638
  }
665
639
  });
666
- export const fetchCaseDetailsHydra = (dispatch, caseNumber, loggedInUserRights, loggedInUser, apolloClient) => __awaiter(void 0, void 0, void 0, function* () {
640
+ export const fetchCaseDetails = (dispatch, caseNumber, loggedInUserRights, loggedInUser) => __awaiter(void 0, void 0, void 0, function* () {
667
641
  var _a, _b;
668
642
  dispatch({ type: CaseReducerConstants.requestCaseDetails, payload: { caseDetails: { caseNumber } } });
669
643
  try {
@@ -733,7 +707,7 @@ export const fetchCaseDetailsHydra = (dispatch, caseNumber, loggedInUserRights,
733
707
  caseNoOfCreatedCase: caseNumber,
734
708
  };
735
709
  dispatch({ type: CaseReducerConstants.receivedCaseDetails, payload: Object.assign(Object.assign({}, caseState), { caseDetails }) });
736
- setCaseAccountNumber(dispatch, data.accountNumberRef, false, {}, apolloClient);
710
+ setCaseAccountNumber(dispatch, data.accountNumberRef);
737
711
  const canChangeGroup = loggedInUserRights.isInternal() ||
738
712
  loggedInUser.isOrgAdmin ||
739
713
  loggedInUser.ssoUsername === caseDetails.contactSSOName ||
@@ -750,19 +724,12 @@ export const fetchCaseDetailsHydra = (dispatch, caseNumber, loggedInUserRights,
750
724
  if (data.groupNumber && data.groupNumber !== '-1') {
751
725
  setSelectedCaseGroupUsers(dispatch, data.accountNumberRef, data.groupNumber, loggedInUserRights);
752
726
  }
753
- // TODO: Re-enable send notifications calls once GraphQL support is available
754
- // if (loggedInUserRights.isInternal() && !loggedInUserRights.isSecureSupportTech()) {
755
- // getNotificationContacts4InternalUser(dispatch, notifiedListUsers, data.contactSSOName);
756
- // } else {
757
- // getNotificationContacts4ExternalUser(
758
- // dispatch,
759
- // notifiedListUsers,
760
- // loggedInUserRights,
761
- // data.accountNumberRef,
762
- // data.contactSSOName,
763
- // data.contactName
764
- // );
765
- // }
727
+ if (loggedInUserRights.isInternal() && !loggedInUserRights.isSecureSupportTech()) {
728
+ getNotificationContacts4InternalUser(dispatch, notifiedListUsers, data.contactSSOName);
729
+ }
730
+ else {
731
+ getNotificationContacts4ExternalUser(dispatch, notifiedListUsers, loggedInUserRights, data.accountNumberRef, data.contactSSOName, data.contactName);
732
+ }
766
733
  }
767
734
  catch (error) {
768
735
  dispatch({ type: CaseReducerConstants.receivedCaseDetailsError, payload: { caseDetailsError: error } });
@@ -786,46 +753,7 @@ export const updateCaseDetails = (dispatch, caseNumber, caseDetails, dontSetDeta
786
753
  }
787
754
  catch (error) {
788
755
  dispatch({ type: CaseReducerConstants.updateCaseDetailsError });
789
- throw error;
790
- }
791
- });
792
- export const updateCaseDetailsGraphQL = (dispatch, apolloClient, caseNumber, caseUpdate, dontSetDetails, options) => __awaiter(void 0, void 0, void 0, function* () {
793
- var _a, _b;
794
- try {
795
- dispatch({ type: CaseReducerConstants.updateCaseDetailUpdating });
796
- const salesforceCaseId = (_a = options === null || options === void 0 ? void 0 : options.salesforceCaseId) !== null && _a !== void 0 ? _a : (_b = options === null || options === void 0 ? void 0 : options.existingCaseDetails) === null || _b === void 0 ? void 0 : _b.id;
797
- const graphqlDetails = yield updateCaseDetailsGraphQLRequest(apolloClient, caseNumber, caseUpdate, {
798
- salesforceCaseId,
799
- existingCaseDetails: (options === null || options === void 0 ? void 0 : options.existingCaseDetails)
800
- ? {
801
- product: options.existingCaseDetails.product,
802
- version: options.existingCaseDetails.version,
803
- }
804
- : undefined,
805
- });
806
- if (dontSetDetails) {
807
- dispatch({ type: CaseReducerConstants.updateCaseDetailCompleted });
808
- return;
809
- }
810
- let updatedCaseDetails = Object.assign({}, caseUpdate);
811
- if (graphqlDetails) {
812
- const mappedGraphQLDetails = mapGraphQLCaseDetailsToCasePayload(graphqlDetails);
813
- updatedCaseDetails = Object.assign(Object.assign({}, updatedCaseDetails), Object.fromEntries(Object.entries(mappedGraphQLDetails).filter(([, value]) => value !== null && value !== undefined && value !== '')));
814
- }
815
- else {
816
- const refreshedDetails = yield fetchCaseDetailsByCaseNumber(apolloClient, caseNumber);
817
- if (refreshedDetails) {
818
- updatedCaseDetails = Object.assign(Object.assign({}, updatedCaseDetails), mapGraphQLCaseDetailsToCasePayload(refreshedDetails));
819
- }
820
- }
821
- dispatch({
822
- type: CaseReducerConstants.caseDetailChanged,
823
- payload: { caseDetails: updatedCaseDetails, isCaseUpdating: false },
824
- });
825
- }
826
- catch (error) {
827
- dispatch({ type: CaseReducerConstants.updateCaseDetailsError });
828
- throw error;
756
+ return Promise.reject(error);
829
757
  }
830
758
  });
831
759
  export const getNotificationContacts4InternalUser = (dispatch, users, caseOwnerSSO) => __awaiter(void 0, void 0, void 0, function* () {
@@ -1007,26 +935,14 @@ export function updateEmailListState(dispatch, email, customEmailsList, callback
1007
935
  payload: { customEmailsList: Object.assign(Object.assign({}, customEmailsList), { data: newEmail }) },
1008
936
  });
1009
937
  }
1010
- export function getVersionsDetails(dispatch, apolloClient, parentProductId, parentProductName) {
938
+ export function getVersionsDetails(dispatch, product) {
1011
939
  return __awaiter(this, void 0, void 0, function* () {
1012
- var _a, _b, _c, _d;
1013
940
  try {
1014
941
  dispatch({
1015
942
  type: CaseReducerConstants.getVersionDetails,
1016
943
  payload: { versionsDetails: getApiResourceObject([], true) },
1017
944
  });
1018
- const { data } = yield apolloClient.query({
1019
- query: GET_PRODUCTS,
1020
- variables: {
1021
- where: {
1022
- ParentProduct__c: { eq: parentProductId },
1023
- IsActive: { eq: true },
1024
- },
1025
- first: 200,
1026
- },
1027
- });
1028
- const edges = (_d = (_c = (_b = (_a = data === null || data === void 0 ? void 0 : data.salesforce_support_uiapi) === null || _a === void 0 ? void 0 : _a.query) === null || _b === void 0 ? void 0 : _b.SalesforceSupportProduct2) === null || _c === void 0 ? void 0 : _c.edges) !== null && _d !== void 0 ? _d : [];
1029
- const versionsDetails = handleGraphQLVersionsResponse(edges, parentProductName);
945
+ const versionsDetails = yield pcm.products.getDetailedVersions(product);
1030
946
  dispatch({
1031
947
  type: CaseReducerConstants.getVersionDetails,
1032
948
  payload: { versionsDetails: getApiResourceObject(versionsDetails) },
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rh-support/troubleshoot",
3
- "version": "2.6.296",
3
+ "version": "2.6.300",
4
4
  "publishConfig": {
5
5
  "access": "public",
6
6
  "registry": "https://registry.npmjs.org"
@@ -53,11 +53,11 @@
53
53
  "@progress/kendo-licensing": "1.3.5",
54
54
  "@progress/kendo-react-pdf": "^5.16.0",
55
55
  "@redux-devtools/extension": "^3.3.0",
56
- "@rh-support/components": "2.5.165",
57
- "@rh-support/react-context": "2.5.272",
56
+ "@rh-support/components": "2.5.182",
57
+ "@rh-support/react-context": "2.5.276",
58
58
  "@rh-support/types": "2.0.26",
59
- "@rh-support/user-permissions": "2.5.124",
60
- "@rh-support/utils": "2.5.107",
59
+ "@rh-support/user-permissions": "2.5.128",
60
+ "@rh-support/utils": "2.5.92",
61
61
  "@types/react-redux": "^7.1.33",
62
62
  "@types/redux": "^3.6.0",
63
63
  "date-fns": "3.6.0",
@@ -127,5 +127,5 @@
127
127
  "defaults and supports es6-module",
128
128
  "maintained node versions"
129
129
  ],
130
- "gitHead": "841d3531777ef141d920f72fa492c1e53d100e9f"
130
+ "gitHead": "5a3a62786c13896575f6db3805b3a0dc0bd1299f"
131
131
  }
@@ -1,4 +0,0 @@
1
- export * from './queries';
2
- export * from './mutations';
3
- export * from './schemas';
4
- //# sourceMappingURL=index.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/graphql/index.ts"],"names":[],"mappings":"AAAA,cAAc,WAAW,CAAC;AAC1B,cAAc,aAAa,CAAC;AAC5B,cAAc,WAAW,CAAC"}
@@ -1,3 +0,0 @@
1
- export * from './queries';
2
- export * from './mutations';
3
- export * from './schemas';
@@ -1,2 +0,0 @@
1
- export declare const CREATE_RME_CASE_ESCALATION: import("@apollo/client").DocumentNode;
2
- //# sourceMappingURL=createRMECaseEscalation.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"createRMECaseEscalation.d.ts","sourceRoot":"","sources":["../../../../src/graphql/mutations/createRMECaseEscalation.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,0BAA0B,uCAsBtC,CAAC"}
@@ -1,24 +0,0 @@
1
- import { gql } from '@apollo/client/core';
2
- export const CREATE_RME_CASE_ESCALATION = gql `
3
- mutation CreateRMECaseEscalation($caseInput: SalesforceSupportCaseCreateRepresentation!) {
4
- salesforce_support_uiapi {
5
- CaseCreate(input: { SalesforceSupportCase: $caseInput }) {
6
- SalesforceSupportRecord {
7
- Id
8
- CaseNumber {
9
- value
10
- }
11
- Status {
12
- value
13
- }
14
- Subject {
15
- value
16
- }
17
- ParentId {
18
- value
19
- }
20
- }
21
- }
22
- }
23
- }
24
- `;
@@ -1,2 +0,0 @@
1
- export { CREATE_RME_CASE_ESCALATION } from './createRMECaseEscalation';
2
- //# sourceMappingURL=index.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/graphql/mutations/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,0BAA0B,EAAE,MAAM,2BAA2B,CAAC"}
@@ -1 +0,0 @@
1
- export { CREATE_RME_CASE_ESCALATION } from './createRMECaseEscalation';
@@ -1,2 +0,0 @@
1
- export declare const GET_ESCALATION_DETAILS: import("@apollo/client").DocumentNode;
2
- //# sourceMappingURL=getEscalationDetails.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"getEscalationDetails.d.ts","sourceRoot":"","sources":["../../../../src/graphql/queries/getEscalationDetails.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,sBAAsB,uCAsBlC,CAAC"}
@@ -1,24 +0,0 @@
1
- import { gql } from '@apollo/client/core';
2
- export const GET_ESCALATION_DETAILS = gql `
3
- query getEscalationDetails($where: SalesforceSupportCase_Filter) {
4
- salesforce_support_uiapi {
5
- query {
6
- SalesforceSupportCase(where: $where) {
7
- edges {
8
- node {
9
- CaseNumber {
10
- value
11
- }
12
- Subject {
13
- value
14
- }
15
- Status {
16
- value
17
- }
18
- }
19
- }
20
- }
21
- }
22
- }
23
- }
24
- `;
@@ -1,2 +0,0 @@
1
- export declare const GET_PARENT_ID: import("@apollo/client").DocumentNode;
2
- //# sourceMappingURL=getParentId.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"getParentId.d.ts","sourceRoot":"","sources":["../../../../src/graphql/queries/getParentId.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,aAAa,uCAczB,CAAC"}
@@ -1,16 +0,0 @@
1
- import { gql } from '@apollo/client/core';
2
- export const GET_PARENT_ID = gql `
3
- query Query($where: SalesforceSupportCase_Filter) {
4
- salesforce_support_uiapi {
5
- query {
6
- SalesforceSupportCase(where: $where) {
7
- edges {
8
- node {
9
- Id
10
- }
11
- }
12
- }
13
- }
14
- }
15
- }
16
- `;
@@ -1,3 +0,0 @@
1
- export { GET_PARENT_ID } from './getParentId';
2
- export { GET_ESCALATION_DETAILS } from './getEscalationDetails';
3
- //# sourceMappingURL=index.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/graphql/queries/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,eAAe,CAAC;AAC9C,OAAO,EAAE,sBAAsB,EAAE,MAAM,wBAAwB,CAAC"}
@@ -1,2 +0,0 @@
1
- export { GET_PARENT_ID } from './getParentId';
2
- export { GET_ESCALATION_DETAILS } from './getEscalationDetails';
@@ -1,84 +0,0 @@
1
- export interface GetParentIdVariables {
2
- where: {
3
- CaseNumber: {
4
- eq: string;
5
- };
6
- };
7
- }
8
- export interface GetParentIdResponse {
9
- salesforce_support_uiapi: {
10
- query: {
11
- SalesforceSupportCase: {
12
- edges: Array<{
13
- node: {
14
- Id: string;
15
- };
16
- }>;
17
- };
18
- };
19
- };
20
- }
21
- export interface CreateRMECaseEscalationVariables {
22
- caseInput: {
23
- Subject: string;
24
- Description: string;
25
- Status: string;
26
- Origin: string;
27
- Priority: string;
28
- Type: string;
29
- RecordTypeId: string;
30
- ParentId: string;
31
- EscalationCategory__c: string;
32
- ImpactOnUserOrBusiness__c: string;
33
- };
34
- }
35
- export interface CreateRMECaseEscalationResponse {
36
- salesforce_support_uiapi: {
37
- CaseCreate: {
38
- SalesforceSupportRecord: {
39
- Id: string;
40
- CaseNumber: {
41
- value: string;
42
- };
43
- Status: {
44
- value: string;
45
- };
46
- Subject: {
47
- value: string;
48
- };
49
- ParentId: {
50
- value: string;
51
- };
52
- };
53
- };
54
- };
55
- }
56
- export interface GetEscalationDetailsVariables {
57
- where: {
58
- ParentId: {
59
- eq: string;
60
- };
61
- };
62
- }
63
- export interface GetEscalationDetailsResponse {
64
- salesforce_support_uiapi: {
65
- query: {
66
- SalesforceSupportCase: {
67
- edges: Array<{
68
- node: {
69
- CaseNumber: {
70
- value: string;
71
- };
72
- Subject: {
73
- value: string;
74
- };
75
- Status: {
76
- value: string;
77
- };
78
- };
79
- }>;
80
- };
81
- };
82
- };
83
- }
84
- //# sourceMappingURL=escalation.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"escalation.d.ts","sourceRoot":"","sources":["../../../../src/graphql/schemas/escalation.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,oBAAoB;IACjC,KAAK,EAAE;QACH,UAAU,EAAE;YAAE,EAAE,EAAE,MAAM,CAAA;SAAE,CAAC;KAC9B,CAAC;CACL;AAED,MAAM,WAAW,mBAAmB;IAChC,wBAAwB,EAAE;QACtB,KAAK,EAAE;YACH,qBAAqB,EAAE;gBACnB,KAAK,EAAE,KAAK,CAAC;oBACT,IAAI,EAAE;wBACF,EAAE,EAAE,MAAM,CAAC;qBACd,CAAC;iBACL,CAAC,CAAC;aACN,CAAC;SACL,CAAC;KACL,CAAC;CACL;AAED,MAAM,WAAW,gCAAgC;IAC7C,SAAS,EAAE;QACP,OAAO,EAAE,MAAM,CAAC;QAChB,WAAW,EAAE,MAAM,CAAC;QACpB,MAAM,EAAE,MAAM,CAAC;QACf,MAAM,EAAE,MAAM,CAAC;QACf,QAAQ,EAAE,MAAM,CAAC;QACjB,IAAI,EAAE,MAAM,CAAC;QACb,YAAY,EAAE,MAAM,CAAC;QACrB,QAAQ,EAAE,MAAM,CAAC;QACjB,qBAAqB,EAAE,MAAM,CAAC;QAC9B,yBAAyB,EAAE,MAAM,CAAC;KACrC,CAAC;CACL;AAED,MAAM,WAAW,+BAA+B;IAC5C,wBAAwB,EAAE;QACtB,UAAU,EAAE;YACR,uBAAuB,EAAE;gBACrB,EAAE,EAAE,MAAM,CAAC;gBACX,UAAU,EAAE;oBAAE,KAAK,EAAE,MAAM,CAAA;iBAAE,CAAC;gBAC9B,MAAM,EAAE;oBAAE,KAAK,EAAE,MAAM,CAAA;iBAAE,CAAC;gBAC1B,OAAO,EAAE;oBAAE,KAAK,EAAE,MAAM,CAAA;iBAAE,CAAC;gBAC3B,QAAQ,EAAE;oBAAE,KAAK,EAAE,MAAM,CAAA;iBAAE,CAAC;aAC/B,CAAC;SACL,CAAC;KACL,CAAC;CACL;AAED,MAAM,WAAW,6BAA6B;IAC1C,KAAK,EAAE;QACH,QAAQ,EAAE;YAAE,EAAE,EAAE,MAAM,CAAA;SAAE,CAAC;KAC5B,CAAC;CACL;AAED,MAAM,WAAW,4BAA4B;IACzC,wBAAwB,EAAE;QACtB,KAAK,EAAE;YACH,qBAAqB,EAAE;gBACnB,KAAK,EAAE,KAAK,CAAC;oBACT,IAAI,EAAE;wBACF,UAAU,EAAE;4BAAE,KAAK,EAAE,MAAM,CAAA;yBAAE,CAAC;wBAC9B,OAAO,EAAE;4BAAE,KAAK,EAAE,MAAM,CAAA;yBAAE,CAAC;wBAC3B,MAAM,EAAE;4BAAE,KAAK,EAAE,MAAM,CAAA;yBAAE,CAAC;qBAC7B,CAAC;iBACL,CAAC,CAAC;aACN,CAAC;SACL,CAAC;KACL,CAAC;CACL"}
@@ -1 +0,0 @@
1
- export {};
@@ -1,2 +0,0 @@
1
- export * from './escalation';
2
- //# sourceMappingURL=index.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/graphql/schemas/index.ts"],"names":[],"mappings":"AAAA,cAAc,cAAc,CAAC"}
@@ -1 +0,0 @@
1
- export * from './escalation';