export const RCIXMLErrorMap: Record<
  string,
  { errorMessage: string; description: string; customMessage: string }
> = {
  // Reservation cancellation errors
  "1001": {
    errorMessage: "Cancel Call Failed.",
    description: "Cancel of a Reservation Failed due to some system error",
    customMessage: "",
  },
  "1002": {
    errorMessage:
      "Cannot Perform Cancel, Invalid reservation Id or Confirm not done.",
    description:
      "Canceling a reservation where reservation id is invalid or reservation is not yet confirmed.",
    customMessage: "",
  },
  "1003": {
    errorMessage: "Reservation cannot be Cancelled for past Date",
    description: "Reservation cannot be cancelled for past dates.",
    customMessage: "",
  },
  "1004": {
    errorMessage:
      "Confirmation cannot be cancelled. User may not have done Confirm for this Reservation.",
    description: "Canceling a wrong reservation which is not done by the user.",
    customMessage: "",
  },
  // EVS session errors
  "1161": {
    errorMessage: "Error Releasing Session",
    description: "Error in EVS1 System",
    customMessage: "",
  },
  // Search Related errors
  "1404": {
    errorMessage:
      "Error while retrieving the resort list based on the distance.",
    description: "Searching for resorts based on Distance.",
    customMessage: "",
  },
  "1405": {
    errorMessage: "Error while retrieving Resort ID for given Resort Name.",
    description: "Searching for resorts based on Resort Name.",
    customMessage: "",
  },
  "1406": {
    errorMessage: "Error while retrieving Resort ID for given Location.",
    description: "Searching for resorts based on Location.",
    customMessage: "",
  },
  "1407": {
    errorMessage: "Error while retrieving Resort Details for given Resort ID.",
    description: "Searching for resorts based on a given Resort Id.",
    customMessage: "",
  },
  "1408": {
    errorMessage: "Error while searching for Resort Name.",
    description: "Searching for resorts based on Resort Name.",
    customMessage: "",
  },
  "1409": {
    errorMessage: "Error during resort id search",
    description: "Searching for resort id failed.",
    customMessage: "",
  },
  "1410": {
    errorMessage: "Location Search For Resort Failed",
    description: "Searching for resorts based on Location.",
    customMessage: "",
  },
  "1411": {
    errorMessage: "Distance search failed.",
    description: "Searching for resorts based on Distance.",
    customMessage: "",
  },
  "1412": {
    errorMessage: "Region Search failed.",
    description: "Searching for resorts based on Region.",
    customMessage: "",
  },
  "1413": {
    errorMessage: "Search for resort details failed.",
    description: "Searching for resorts details.",
    customMessage: "",
  },
  "1414": {
    errorMessage: "No of. Resort Ids exceed 40 in resort ID Search.",
    description:
      "Searching for resorts based on resort id specified in request.",
    customMessage: "",
  },
  "1415": {
    errorMessage: "Invalid value for Distance in Distance Search.",
    description:
      "Invalid distance data is passed in request for Distance Search.",
    customMessage: "",
  },
  "1416": {
    errorMessage: "Invalid Min. Price/Max. Price in price Search.",
    description:
      "Invalid min/max price is passed in request for resort search.",
    customMessage: "",
  },
  "1417": {
    errorMessage: "Max. Price should not less than Min. Price.",
    description:
      "Max price specified in request should not be less than the min price.",
    customMessage: "",
  },
  "1418": {
    errorMessage: "No currency information found.",
    description: "Currency information is not passed in request.",
    customMessage: "",
  },
  "1419": {
    errorMessage: "Invalid currency, only USD is supported currently.",
    description: "Currency passed in request is Invalid. Only USD can be used.",
    customMessage: "",
  },
  "1420": {
    errorMessage: "Error in start Date / end Date / length Of Stay.",
    description:
      "Start Date/End Date and length of stay specified in request is wrong.",
    customMessage: "",
  },
  "1421": {
    errorMessage: "Zip Code can not be empty in distance Search.",
    description:
      "Zip code is not specified in the request while searching for resorts.",
    customMessage: "",
  },
  "1422": {
    errorMessage: "Region Code can not be empty in price Search.",
    description:
      "Region code is not specified in the request while searching for resorts.",
    customMessage: "",
  },
  "1423": {
    errorMessage: "Resort Ids can not be empty in resort Id Search.",
    description:
      "Resort ID is not specified in the request while searching for resorts.",
    customMessage: "",
  },
  // Email related errors
  "1451": {
    errorMessage: "Sending HoldConfirmCCFailureEmail failed.",
    description:
      "Email is sent if error occurred during Holding a confirmation.",
    customMessage: "",
  },
  "1452": {
    errorMessage: "Sending CancellationCCFailureEmail failed.",
    description: "",
    customMessage: "",
  },
  "1453": {
    errorMessage: "Sending HoldConfirmFailureEmail failed.",
    description: "",
    customMessage: "",
  },
  "1454": {
    errorMessage: "Sending sendTravelerMFFailureEmail failed.",
    description: "",
    customMessage: "",
  },
  "1455": {
    errorMessage: "Error during sending emails.",
    description: "",
    customMessage: "",
  },
  // Reservation confirmation errors
  "2001": {
    errorMessage: "Confirm Call Failed.",
    description: "System error while confirming a reservation.",
    customMessage: "",
  },
  "2002": {
    errorMessage: "Reservation Already Confirmed.Try with another Id.",
    description: "Error while confirming a Hold.",
    customMessage: "",
  },
  "2003": {
    errorMessage: "Confirm With Credit Card Failed.",
    description: "",
    customMessage: "",
  },
  "2004": {
    errorMessage:
      "Cannot Perform Confirm, Invalid reservation Id or Hold not done.",
    description:
      "Confirm can not be done as reservation id specified is wrong or hold is not done on the reservation.",
    customMessage: "",
  },
  "2005": {
    errorMessage:
      "Cannot Perform Confirm With Credit Card, Temp Hold did not succeed.",
    description:
      "Confirm can not be done with credit card as temp. hold didn’t succeed.",
    customMessage: "",
  },
  "2006": {
    errorMessage:
      "Confirmation cannot be done. User may not have done Hold for this Reservation.",
    description:
      "Confirmation is failed as the hold is not done on the reservation by the user.",
    customMessage: "",
  },
  "2007": {
    errorMessage: "Confirm With CC after Hold failed.",
    description: "Error while confirming with credit card after hold is done.",
    customMessage: "",
  },
  "2008": {
    errorMessage: "CC verification failed with Status.",
    description: "Credit Card verification failed during resort confirmation.",
    customMessage: "",
  },
  "2009": {
    errorMessage: "System Id Not Found.",
    description: "System id is not passed in request.",
    customMessage: "",
  },
  "2010": {
    errorMessage: "Inventory Id List Not Found.",
    description: "Inventory id is not specified in request.",
    customMessage: "",
  },
  "2012": {
    errorMessage: "Charge value is not specified in the request.",
    description: "Charge value is not specified in the request.",
    customMessage: "",
  },
  "2013": {
    errorMessage: "Currency is not specified in the request.",
    description: "Currency is not specified in the request.",
    customMessage: "",
  },
  "2014": {
    errorMessage: "Invalid currency, only USD is supported currently.",
    description:
      "The currency specified in request is Invalid only USD can be used.",
    customMessage: "",
  },
  "2015": {
    errorMessage: "Check in Date is not specified in the request.",
    description: "Check in Date is not specified in the request.",
    customMessage: "",
  },
  "2016": {
    errorMessage: "Check out Date is not specified in the request.",
    description: "Check out Date is not specified in the request.",
    customMessage: "",
  },
  "2017": {
    errorMessage: "Accommodation Item Not Found in the request.",
    description: "Accommodation Item Not Found in the request.",
    customMessage: "",
  },
  "2018": {
    errorMessage: "Resort Id not specified in the request.",
    description: "Resort Id not specified in the request.",
    customMessage: "",
  },
  "2019": {
    errorMessage: "Resort Name not specified in the request.",
    description: "Resort Name not specified in the request.",
    customMessage: "",
  },
  "2020": {
    errorMessage: "Number of bedrooms not specified in the request.",
    description: "Number of bedrooms not specified in the request.",
    customMessage: "",
  },
  "2021": {
    errorMessage: "Booking info not specified in the request.",
    description: "Booking info not specified in the request.",
    customMessage: "",
  },
  "2022": {
    errorMessage:
      "The entered Check In Date shall be at least 2 days greater than current day.",
    description:
      "The entered Check In Date in request shall be at least 2 days greater than current day.",
    customMessage: "",
  },
  "2023": {
    errorMessage:
      "The entered check-out Date should be greater than entered check-in date.",
    description:
      "The entered check-out Date in request should be greater than entered check-in date.",
    customMessage: "",
  },
  "9022": {
    errorMessage: "Confirm after Hold Call Failed",
    description: "Error while confirming a Hold.",
    customMessage: "",
  },
  // General errors
  "2100": {
    errorMessage: "Inventory Unavailable.",
    description: "",
    customMessage: "",
  },
  "2101": {
    errorMessage: "Inquire Call Failed.",
    description: "Inquiring for an Inventory is failed",
    customMessage: "",
  },
  "2102": {
    errorMessage: "No Inventory Found for given Inventory Id.",
    description: "No Inventory Found for Id given.",
    customMessage: "",
  },
  "2103": {
    errorMessage:
      "One of the inventory sources failed. There may be more search results.",
    description: "Error while searching for inventories.",
    customMessage: "",
  },
  "2104": {
    errorMessage:
      "One of the inventory sources failed. There may be more search results.",
    description: "Error while searching for inventories.",
    customMessage: "",
  },
  "2105": {
    errorMessage:
      "One of the inventory sources failed. There may be more search results.",
    description: "Error while searching for inventories.",
    customMessage: "",
  },
  "2108": {
    errorMessage: "Invalid reference number.",
    description: "Reference number provided is wrong",
    customMessage: "",
  },
  "2109": {
    errorMessage: "Invalid System id.",
    description: "System id specified is invalid.",
    customMessage: "",
  },
  "2110": {
    errorMessage: "User is not allowed to perform this activity.",
    description: "",
    customMessage: "",
  },
  "2124": {
    errorMessage: "Error while adding a customer to DBL System.",
    description: "Error while adding a customer to DBL System.",
    customMessage: "",
  },
  "2125": {
    errorMessage: "Error while Canceling an Inventory.",
    description: "Error while Canceling an Inventory.",
    customMessage: "",
  },
  "2126": {
    errorMessage: "Error while getting lock on Inventory.",
    description: "Error while getting lock on Inventory.",
    customMessage: "",
  },
  "2127": {
    errorMessage: "Error while confirming an Inventory.",
    description: "Error while confirming an Inventory.",
    customMessage: "",
  },
  "2128": {
    errorMessage: "Error while Getting Cancellation Amount.",
    description: "Error while Getting Cancellation Amount.",
    customMessage: "",
  },
  "2129": {
    errorMessage:
      "Error while merging the search results from RCIWorks, EVS1, DBL.",
    description:
      "Error while merging the search results from RCIWorks, EVS1, DBL.",
    customMessage: "",
  },
  "2130": {
    errorMessage: "System Failed.",
    description: "",
    customMessage: "",
  },
  "2131": {
    errorMessage: "Error occurred during Securing Funds.",
    description: "Error occurred during Securing Funds.",
    customMessage: "",
  },
  "2132": {
    errorMessage: "Error while generating Activity Id used for Securing funds.",
    description: "Error while generating Activity Id used for Securing funds.",
    customMessage: "",
  },
  "2134": {
    errorMessage: "Error processing request.",
    description: "Error processing request.",
    customMessage: "",
  },
  "2135": {
    errorMessage: "Error processing response.",
    description: "",
    customMessage: "",
  },
  "2136": {
    errorMessage:
      "Confirm Failed: Requested unit configuration no longer available.",
    description: "",
    customMessage: "",
  },
  "3001": {
    errorMessage: "Release Call Failed",
    description: "",
    customMessage: "",
  },
  "4001": {
    errorMessage: "Hold Call Failed.",
    description: "",
    customMessage: "",
  },
  "4002": {
    errorMessage: "Temp Hold Call Failed.",
    description: "",
    customMessage: "",
  },
  "4003": {
    errorMessage: "Cannot Perform Hold With Credit Card, Inventory not Locked.",
    description: "",
    customMessage: "",
  },
  "5001": {
    errorMessage: "Error while adding Traveler.",
    description: "",
    customMessage: "",
  },
  "5002": {
    errorMessage: "Error while getting Traveler information.",
    description: "",
    customMessage: "",
  },
  "5003": {
    errorMessage: "Error while inquiring about Traveler.",
    description: "",
    customMessage: "",
  },
  "5004": {
    errorMessage: "No Traveler found for given reservation id.",
    description: "",
    customMessage: "",
  },
  "5005": {
    errorMessage:
      "Travel Date is past Date. Guest certificate can not be canceled for past Date.",
    description: "",
    customMessage: "",
  },
  "5006": {
    errorMessage:
      "Guest Certificate action cannot be done. User may not have performed this Reservation.",
    description: "",
    customMessage: "",
  },
  "5007": {
    errorMessage: "Error while updating or creating traveler information.",
    description: "",
    customMessage: "",
  },
  "5008": {
    errorMessage: "Error while deleting traveler information.",
    description: "",
    customMessage: "",
  },
  "5009": {
    errorMessage: "Error while creating guest certificate.",
    description: "",
    customMessage: "",
  },
  "5010": {
    errorMessage: "Error while canceling guest certificate.",
    description: "",
    customMessage: "",
  },
  "5011": {
    errorMessage: "Email is not specified.",
    description: "",
    customMessage: "",
  },
  "5012": {
    errorMessage: "ReferenceNumber is not specified.",
    description: "",
    customMessage: "",
  },
  "5013": {
    errorMessage: "travelerInfo Not Found.",
    description: "",
    customMessage: "",
  },
  "5014": {
    errorMessage: "First name is not specified.",
    description: "",
    customMessage: "",
  },
  "5015": {
    errorMessage: "Last name is not specified.",
    description: "",
    customMessage: "",
  },
  "5016": {
    errorMessage: "Address line1 is not specified.",
    description: "",
    customMessage: "",
  },
  "5017": {
    errorMessage: "City is not specified.",
    description: "",
    customMessage: "",
  },
  "5018": {
    errorMessage: "State is not specified.",
    description: "",
    customMessage: "",
  },
  "5019": {
    errorMessage: "Country is not specified.",
    description: "",
    customMessage: "",
  },
  "5020": {
    errorMessage: "Zip code is not specified.",
    description: "",
    customMessage: "",
  },
  "5021": {
    errorMessage: "Home phone is not specified.",
    description: "",
    customMessage: "",
  },
  "5022": {
    errorMessage: "Reservation Token is not specified.",
    description: "",
    customMessage: "",
  },
  "5023": {
    errorMessage: "CancelTraveler function is not supported.",
    description: "",
    customMessage: "",
  },
  "6001": {
    errorMessage: "Reservation does not exist for the given id.",
    description: "",
    customMessage: "",
  },
  "6002": {
    errorMessage: "No Record found for given reservation id.",
    description: "",
    customMessage: "",
  },
  "6003": {
    errorMessage: "There is no reservation for the given ReservationId.",
    description: "",
    customMessage: "",
  },
  "6004": {
    errorMessage: "Reservation not found or Invalid Status.",
    description: "",
    customMessage: "",
  },
  "7001": {
    errorMessage: "Credit Card Processing Error.",
    description: "",
    customMessage: "",
  },
  "7002": {
    errorMessage: "Invalid credit card expiration Year.",
    description: "",
    customMessage: "",
  },
  "7003": {
    errorMessage: "Credit Card Verification Failed.",
    description: "",
    customMessage: "",
  },
  "7004": {
    errorMessage: "Error occurred during making Payment.",
    description: "",
    customMessage: "",
  },
  "7005": {
    errorMessage: "Refund failed.",
    description: "",
    customMessage: "",
  },
  "7006": {
    errorMessage: "Confirm with Credit Card Failed.",
    description: "",
    customMessage: "",
  },
  "7007": {
    errorMessage: "Credit Card Info Not Found.",
    description: "",
    customMessage: "",
  },
  "7008": {
    errorMessage: "Payor Code is not specified.",
    description: "",
    customMessage: "",
  },
  "7009": {
    errorMessage: "Credit Card Type is not specified.",
    description: "",
    customMessage: "",
  },
  "7010": {
    errorMessage:
      "Invalid Credit Card Type (should be either V(Visa) or M(Master)or D(Discover) or A(Amex)",
    description: "",
    customMessage: "",
  },
  "7011": {
    errorMessage: "Invalid/Empty Credit Card Number specified.",
    description: "",
    customMessage: "",
  },
  "7012": {
    errorMessage: "Invalid Credit Card Number specified.",
    description: "",
    customMessage: "",
  },
  "7013": {
    errorMessage: "Credit Card Expiration Month is not specified.",
    description: "",
    customMessage: "",
  },
  "7014": {
    errorMessage:
      "Invalid Credit Card Expiration Month (Should be between 1 to 12)",
    description: "",
    customMessage: "",
  },
  "7015": {
    errorMessage: "Credit Card Expiration Year is not specified.",
    description: "",
    customMessage: "",
  },
  "7016": {
    errorMessage: "Invalid Credit Card Expiration Year.",
    description: "",
    customMessage: "",
  },
  "7017": {
    errorMessage: "Credit Card Holder Name is not specified.",
    description: "",
    customMessage: "",
  },
  "7018": {
    errorMessage: "Credit Card Holder Address Line1 is not specified.",
    description: "",
    customMessage: "",
  },
  "7019": {
    errorMessage: "Credit Card Holder City is not specified.",
    description: "",
    customMessage: "",
  },
  "7020": {
    errorMessage: "Credit Card Holder State is not specified.",
    description: "",
    customMessage: "",
  },
  "7021": {
    errorMessage: "Credit Card Holder Postal Code is not specified.",
    description: "",
    customMessage: "",
  },
  "7022": {
    errorMessage: "Credit Card Holder Country is not specified.",
    description: "",
    customMessage: "",
  },
  "7023": {
    errorMessage: "Credit Card Holder Email Address is not specified.",
    description: "",
    customMessage: "",
  },
  "8050": {
    errorMessage: "INVALID REQUEST.",
    description: "",
    customMessage: "",
  },
  "8051": {
    errorMessage: "UserID is required.",
    description: "",
    customMessage: "",
  },
  "8052": {
    errorMessage: "Password is required.",
    description: "",
    customMessage: "",
  },
  "8053": {
    errorMessage: "ClientName is required.",
    description: "",
    customMessage: "",
  },
  "8054": {
    errorMessage: "BusinessParty is null.",
    description: "",
    customMessage: "",
  },
  "8055": {
    errorMessage: "User Authentication Failed",
    description: "",
    customMessage: "",
  },
  "8056": {
    errorMessage: "Account has already expired.",
    description: "",
    customMessage: "",
  },
  "9020": {
    errorMessage: "DBL User Blocked",
    description: "",
    customMessage: "",
  },
  "9021": {
    errorMessage:
      "We are having technical difficulties with XML DBL service. Please try later.",
    description: "",
    customMessage: "",
  },
  "9001": {
    errorMessage: "Reservation identifier is not specified in the request.",
    description: "Reservation identifier is not specified in the request.",
    customMessage: "",
  },
  "9002": {
    errorMessage: "Expecting Session Token in request.",
    description: "Session Token is not specified in request.",
    customMessage: "",
  },
  "9003": {
    errorMessage: "Start Date is not specified.",
    description: "Start Date is not specified in request.",
    customMessage: "",
  },
  "9004": {
    errorMessage:
      "The entered startDate shall be at least 2 days greater than current day.",
    description:
      "The entered startDate shall be at least 2 days greater than current day.",
    customMessage: "",
  },
  "9005": {
    errorMessage: "Invalid date Format in Start Date.",
    description: "Invalid date Format in Start Date.",
    customMessage: "",
  },
  "9006": {
    errorMessage: "End Date is not specified.",
    description: "End Date is not specified.",
    customMessage: "",
  },
  "9007": {
    errorMessage: "Invalid date Format in End Date.",
    description: "Invalid date Format in End Date.",
    customMessage: "",
  },
  "9008": {
    errorMessage:
      "The entered End Date should be greater than entered Start Date.",
    description:
      "The entered End Date should be greater than entered Start Date.",
    customMessage: "",
  },
  "9009": {
    errorMessage:
      "The search can be done only for maximum of 10 weeks duration.",
    description:
      "The search can be done only for maximum of 10 weeks duration.",
    customMessage: "",
  },
  "9010": {
    errorMessage: "Length of Stay is not specified or that is invalid.",
    description: "Length of Stay is not specified or that is invalid.",
    customMessage: "",
  },
  "9011": {
    errorMessage: "Invalid Min. Unit Size (Either H or S or between 1 to 9).",
    description: "Invalid Min. Unit Size (Either H or S or between 1 to 9).",
    customMessage: "",
  },
  "9012": {
    errorMessage:
      "One or more resort choices is not in an available status, and one of the inventory systems is not currently available.",
    description:
      "One or more resort choices is not in an available status, and one of the inventory systems is not currently available",
    customMessage: "",
  },
  "9013": {
    errorMessage: "Inventory type not specified in the request.",
    description: "Inventory type not specified in the request.",
    customMessage: "",
  },
  "9014": {
    errorMessage: "Error Building Activity Response.",
    description: "Error Building Activity Response.",
    customMessage: "",
  },
  "9015": {
    errorMessage: "Invalid Inventory Type.",
    description: "Invalid Inventory Type.",
    customMessage: "",
  },
  "9016": {
    errorMessage: "Inventory Id not specified in the request.",
    description: "Inventory Id not specified in the request.",
    customMessage: "",
  },
  "9017": {
    errorMessage: "Inventory Id may be tampered.",
    description: "Inventory Id may be tampered.",
    customMessage: "",
  },
  "9018": {
    errorMessage: "Payor Code is not in the system yet.",
    description: "Payor Code is not in the system yet.",
    customMessage: "",
  },
  "9019": {
    errorMessage: "Request could not be completed successfully.",
    description: "Request could not be completed successfully.",
    customMessage: "",
  },
  "3002": {
    errorMessage:
      "Cannot Perform Release, Invalid reservation Id or Hold not done.",
    description:
      "Release can not be done as the reservation id is wrong or hold is not done.",
    customMessage: "",
  },
  "3003": {
    errorMessage:
      "Held Inventory cannot be released. User may not have done Hold for this reservation.",
    description:
      "Held Inventory cannot be released. User may not have done Hold for this reservation.",
    customMessage: "",
  },
};
