Merge branch 'develop' of https://github.com/Safelite/DigitalConsumer.ISS into feature/digital/SSR-1135.4
This commit is contained in:
Michaela Brydon 2024-03-04 13:29:05 -05:00
commit 7782b1e27e

View file

@ -1,190 +1,203 @@
const CONTENT_BASE_URL = '/content/api/v1/content';
const LOCATION_BASE_URL = '/location/api/v1/location';
const SCHEDULE_BASE_URL = '/schedule/api/v1/schedule';
const PARTS_BASE_URL = '/parts/api/v1/parts';
const VEHICLE_BASE_URL = '/vehicle/api/v1/vehicle';
const PRICE_BASE_URL = '/price/api/v1/price';
const ACCOUNT_BASE_URL = '/account/api/v1/account';
const EXPERIMENTS_BASE_URL = '/experiments/api/v1/experiments';
const ANALYTICS_BASE_URL = '/analytics/api/v1/analytics';
const CLIENT_AUTH_BASE_URL = '/clientauth/api/v1/clientauth';
const COVERAGE_BASE_URL = '/coverage/api/v1/coverage';
const ORDER_BASE_URL = '/order/api/v1/order';
const endpoints = Object.freeze({ const endpoints = Object.freeze({
GetRouteInfo: { GetRouteInfo: {
url: (applicationAbbreviation) => `/content/api/v1/content/${applicationAbbreviation}/RouteInfo`, url: (applicationAbbreviation) => `${CONTENT_BASE_URL}/${applicationAbbreviation}/RouteInfo`,
method: 'POST' method: 'POST'
}, },
GetHomepageInfo: { GetHomepageInfo: {
url: (applicationAbbreviation) => `/content/api/v1/content/${applicationAbbreviation}/HomepageInfo`, url: (applicationAbbreviation) => `${CONTENT_BASE_URL}/${applicationAbbreviation}/HomepageInfo`,
method: 'GET' method: 'GET'
}, },
GetPageData: { GetPageData: {
url: (applicationAbbreviation, pageName) => `/content/api/v1/content/${applicationAbbreviation}/${pageName}`, url: (applicationAbbreviation, pageName) => `${CONTENT_BASE_URL}/${applicationAbbreviation}/${pageName}`,
method: 'GET' method: 'GET'
}, },
GetAlertReasons: { GetAlertReasons: {
url: '/location/api/v1/location/alert-reasons', url: `${LOCATION_BASE_URL}/alert-reasons`,
method: 'GET' method: 'GET'
}, },
GetShopTimeSlots: { GetShopTimeSlots: {
url: '/schedule/api/v1/schedule/shop-time-slots', url: `${SCHEDULE_BASE_URL}/shop-time-slots`,
method: 'POST' method: 'POST'
}, },
GetMobileTimeSlots: { GetMobileTimeSlots: {
url: '/schedule/api/v1/schedule/mobile-time-slots', url: `${SCHEDULE_BASE_URL}/mobile-time-slots`,
method: 'POST' method: 'POST'
}, },
GetMobilePremiumFee: { GetMobilePremiumFee: {
url: '/parts/api/v1/parts/mobile-premium-fee', url: `${PARTS_BASE_URL}/mobile-premium-fee`,
method: 'GET' method: 'GET'
}, },
GetVehicleYears: { GetVehicleYears: {
url: '/vehicle/api/v1/vehicle/years', url: `${VEHICLE_BASE_URL}/years`,
method: 'GET' method: 'GET'
}, },
GetVehicleMakes: { GetVehicleMakes: {
url: '/vehicle/api/v1/vehicle/makes/', url: `${VEHICLE_BASE_URL}/makes/`,
method: 'GET' method: 'GET'
}, },
GetVehicleModels: { GetVehicleModels: {
url: '/vehicle/api/v1/vehicle/models', url: `${VEHICLE_BASE_URL}/models`,
method: 'GET' method: 'GET'
}, },
GetVehicleStyles: { GetVehicleStyles: {
url: '/vehicle/api/v1/vehicle/styles', url: `${VEHICLE_BASE_URL}/styles`,
method: 'GET' method: 'GET'
}, },
GetDamageOptions: { GetDamageOptions: {
url: '/parts/api/v1/parts/damage-options', url: `${PARTS_BASE_URL}/damage-options`,
method: 'GET' method: 'GET'
}, },
GetPartsOrQuestions: { GetPartsOrQuestions: {
url: '/parts/api/v1/parts/parts-or-questions', url: `${PARTS_BASE_URL}/parts-or-questions`,
method: 'POST' method: 'POST'
}, },
GetParts: { GetParts: {
url: '/parts/api/v1/parts/parts', url: `${PARTS_BASE_URL}/parts`,
method: 'POST' method: 'POST'
}, },
GetInsurancePriceOrderItems: { GetInsurancePriceOrderItems: {
url: '/price/api/v1/price/order-items-with-insurance-pricing', url: `${PRICE_BASE_URL}/order-items-with-insurance-pricing`,
method: 'GET' method: 'GET'
}, },
GetPriceOrderItems: { GetPriceOrderItems: {
url: '/price/api/v1/price/order-items', url: `${PRICE_BASE_URL}/order-items`,
method: 'GET' method: 'GET'
}, },
GetProviders: { GetProviders: {
url: '/location/api/v1/location/providers', url: `${LOCATION_BASE_URL}/providers`,
method: 'GET' method: 'GET'
}, },
GetCapabilityQuestions: { GetCapabilityQuestions: {
url: '/parts/api/v1/parts/capability-questions', url: `${PARTS_BASE_URL}/capability-questions`,
method: 'GET' method: 'GET'
}, },
GetPartFromCapabilityAnswer: { GetPartFromCapabilityAnswer: {
url: '/parts/api/v1/parts/part-from-capability-answer', url: `${PARTS_BASE_URL}/part-from-capability-answer`,
method: 'POST' method: 'POST'
}, },
GetWipers: { GetWipers: {
url: '/parts/api/v1/parts/wipers', url: `${PARTS_BASE_URL}/wipers`,
method: 'GET' method: 'GET'
}, },
GetRainDefense: { GetRainDefense: {
url: '/parts/api/v1/parts/rain-defense', url: `${PARTS_BASE_URL}/rain-defense`,
method: 'GET' method: 'GET'
}, },
GetSupportingItems: { GetSupportingItems: {
url: '/parts/api/v1/parts/supporting-items', url: `${PARTS_BASE_URL}/supporting-items`,
method: 'POST' method: 'POST'
}, },
GetMobileFeePart: { GetMobileFeePart: {
url: '/parts/api/v1/parts/mobile-fee', url: `${PARTS_BASE_URL}/mobile-fee`,
method: 'GET' method: 'GET'
}, },
GetServiceabilityDetails: { GetServiceabilityDetails: {
url: '/location/api/v1/location/serviceability-details', url: `${LOCATION_BASE_URL}/serviceability-details`,
method: 'GET' method: 'GET'
}, },
GetVehicle: { GetVehicle: {
url: '/vehicle/api/v1/vehicle/lookup', url: `${VEHICLE_BASE_URL}/lookup`,
method: 'GET' method: 'GET'
}, },
GetAccountInfo: { GetAccountInfo: {
url: '/account/api/v1/account/', url: `${ACCOUNT_BASE_URL}/`,
method: 'GET' method: 'GET'
}, },
LogExperimentExposureIfAssigned: { LogExperimentExposureIfAssigned: {
url: '/experiments/api/v1/experiments/log-exposure', url: `${EXPERIMENTS_BASE_URL}/log-exposure`,
method: 'POST' method: 'POST'
}, },
LogPageView: { LogPageView: {
url: '/analytics/api/v1/analytics/log-page-view', url: `${ANALYTICS_BASE_URL}/log-page-view`,
method: 'POST' method: 'POST'
}, },
LogCustomEvent: { LogCustomEvent: {
url: '/analytics/api/v1/analytics/log-custom-event', url: `${ANALYTICS_BASE_URL}/log-custom-event`,
method: 'POST' method: 'POST'
}, },
LookupVehicleByVin: { LookupVehicleByVin: {
url: '/vehicle/api/v1/vehicle/lookup', url: `${VEHICLE_BASE_URL}/lookup`,
method: 'POST' method: 'POST'
}, },
LookupVinByAddress: { LookupVinByAddress: {
url: '/vehicle/api/v1/vehicle/lookup-vin-by-address', url: `${VEHICLE_BASE_URL}/lookup-vin-by-address`,
method: 'POST' method: 'POST'
}, },
LookupVinByPlate: { LookupVinByPlate: {
url: '/vehicle/api/v1/vehicle/lookup-vin-by-plate', url: `${VEHICLE_BASE_URL}/lookup-vin-by-plate`,
method: 'POST' method: 'POST'
}, },
InitializeSession: { InitializeSession: {
url: '/analytics/api/v1/analytics/initialize', url: `${ANALYTICS_BASE_URL}/initialize`,
method: 'POST' method: 'POST'
}, },
GetExperimentsByUser: { GetExperimentsByUser: {
url: '/analytics/api/v1/analytics/get-experiments', url: `${ANALYTICS_BASE_URL}/get-experiments`,
method: 'GET' method: 'GET'
}, },
RunExperimentsForTrigger: { RunExperimentsForTrigger: {
url: '/experiments/api/v1/experiments/run', url: `${EXPERIMENTS_BASE_URL}/run`,
method: 'POST' method: 'POST'
}, },
ValidateZip: { ValidateZip: {
url: '/location/api/v1/location/zip', url: `${LOCATION_BASE_URL}/zip`,
method: 'GET' method: 'GET'
}, },
GooglePlaces: { GooglePlaces: {
url: (apiKey) => `https://maps.googleapis.com/maps/api/js?key=${apiKey}&libraries=places` url: (apiKey) => `https://maps.googleapis.com/maps/api/js?key=${apiKey}&libraries=places`
}, },
ValidateClientTag: { ValidateClientTag: {
url: '/clientauth/api/v1/clientauth/validate-client-tag', url: `${CLIENT_AUTH_BASE_URL}/validate-client-tag`,
method: 'GET' method: 'GET'
}, },
ValidateClientSignature: { ValidateClientSignature: {
url: '/clientauth/api/v1/clientauth/validate-client-signature', url: `${CLIENT_AUTH_BASE_URL}/validate-client-signature`,
method: 'POST' method: 'POST'
}, },
IsVinbyAddressPermissible: { IsVinbyAddressPermissible: {
url: '/vehicle/api/v1/vehicle/is-vin-by-address-permissible', url: `${VEHICLE_BASE_URL}/is-vin-by-address-permissible`,
method: 'Get' method: 'Get'
}, },
CoveragePolicyInfo: { CoveragePolicyInfo: {
url: '/coverage/api/v1/coverage/policy-information', url: `${COVERAGE_BASE_URL}/policy-information`,
method: 'POST' method: 'POST'
}, },
RegisterClaim: { RegisterClaim: {
url: '/coverage/api/v1/coverage/register-claim', url: `${COVERAGE_BASE_URL}/register-claim`,
method: 'POST' method: 'POST'
}, },
SaveSession: { SaveSession: {
url: '/order/api/v1/order/save-session/iss', url: `${ORDER_BASE_URL}/save-session/iss`,
method: 'POST' method: 'POST'
}, },
LoadSession: { LoadSession: {
url: '/order/api/v1/order/load-session/iss', url: `${ORDER_BASE_URL}/load-session/iss`,
method: 'POST' method: 'POST'
}, },
DuplicateSearch: { DuplicateSearch: {
// eslint-disable-next-line max-len // eslint-disable-next-line max-len
url: (accountNumber, policyNumber, dateOfLoss) => `/order/api/v1/order/duplicate-check/${accountNumber}/${policyNumber}/${dateOfLoss}`, url: (accountNumber, policyNumber, dateOfLoss) => `${ORDER_BASE_URL}/duplicate-check/${accountNumber}/${policyNumber}/${dateOfLoss}`,
method: 'GET' method: 'GET'
}, },
FinalDeductible: { FinalDeductible: {
url: '/coverage/api/v1/coverage/final-deductible', url: `${COVERAGE_BASE_URL}/final-deductible`,
method: 'POST' method: 'POST'
}, },
GetPaymentSignature: { GetPaymentSignature: {
url: '/order/api/v1/order/sign', url: `${ORDER_BASE_URL}/sign`,
method: 'POST' method: 'POST'
} }
}); });