50 Commits

Author SHA1 Message Date
Linus Flood
5fc93472f4 Merged in feat/rework-contentstack (pull request #3493)
Feat(SW-3708): refactor contentstack fetching (removing all refs) and cache invalidation

* Remove all REFS

* Revalidate correct language

* PR fixes

* PR fixes

* Throw when errors from contentstack api


Approved-by: Joakim Jäderberg
2026-01-27 12:38:36 +00:00
Joakim Jäderberg
99537b13e8 Merged in chore/add-error-details-for-sentry (pull request #3378)
Include more details when throwing errors for debugging in Sentry

* WIP throw errors with more details for debugging in Sentry

* Fix throwing response-data

* Clearer message when a response fails

* Add message to errors

* better typings

* .

* Try to send profileID and membershipNumber to Sentry when we fail to parse the apiResponse

* rename notFound -> notFoundError

* Merge branch 'master' of bitbucket.org:scandic-swap/web into chore/add-error-details-for-sentry


Approved-by: Linus Flood
2026-01-12 09:01:44 +00:00
Bianca Widstam
2c8b920dd8 Merged in fix/BOOK-673-unpublish-page (pull request #3370)
fix(BOOK-673): clear language when unpublishing a page

* fix(BOOK-673): clear language when unpublishing a page


Approved-by: Linus Flood
2025-12-18 08:54:06 +00:00
Anton Gunnarsson
e5149846e5 Merged in chore/upgrade-to-next16 (pull request #3305)
chore(SW-3665): Upgrade to Next 16

* Upgrade partner-sas

* Upgrade scandic-web to next 16

* Update peerDep versions

* Fix revalidateTag

* Remove comment

* Merge branch 'master' into chore/upgrade-to-next16

* Update netlify adapter

* Build with webpack instead of turbopack

* Revert from proxy to middleware

* Merge branch 'master' into chore/upgrade-to-next16

* Revert proxy type

* Fix react types versions

* 16.0.9

* Bump to 16.0.10


Approved-by: Linus Flood
2025-12-12 09:17:15 +00:00
Joakim Jäderberg
8b94540d19 Merged in chore/redirect-counter (pull request #3302)
Counter name is now searchable and add counter for redirects

* refactor: createCounter() only takes one argument, the name of the counter. Makes it easier to search for

* feat: add counter when we do a redirect from redirect-service


Approved-by: Linus Flood
2025-12-08 10:24:05 +00:00
Matilda Landström
5986828580 Merged in feat/LOY-430-reward-nights (pull request #3295)
Feat/LOY-430 reward nights

* chore(LOY-430): add reward nights request and dynamic content

* chore(LOY-430): fix Reward Night component

* Refactor: use existing endpoint and add rewardNight data to that response instead


Approved-by: Linus Flood
2025-12-08 07:44:58 +00:00
Linus Flood
b1ccabb0b6 Merged in fix/redis-delete (pull request #3271)
feat(redis): include git hash when deleting without fuzzy

* feat(redis): include git hash when deleting without fuzzy

* Refactor


Approved-by: Joakim Jäderberg
2025-12-02 07:02:52 +00:00
Joakim Jäderberg
f6a807758e Merged in chore/remove-enrichHotel-call (pull request #3244)
Chore/remove enrichHotel call

* chore: remove enrichHotel api call

* include cityId when errors happen

* remove unused funciton and cleanup code

* tests no longer expect us to have called a function that is not used

* remove commented code


Approved-by: Linus Flood
2025-12-01 07:49:59 +00:00
Joakim Jäderberg
4174d43e16 Merged in fix/logging-warmup-background (pull request #3232)
Fix/logging warmup background

* fix: logging in background functions

* fix logging

* fix logging

* fix logging


Approved-by: Linus Flood
2025-11-26 12:21:42 +00:00
Joakim Jäderberg
8ed16a0119 Merged in feat/redis-fix (pull request #3207)
Feat/redis fix

* feat(redis): delete multiple keys in one partition scan

* fix(BOOK-603): make it possible to do multiple deletes in redis at once using one partition scan


Approved-by: Linus Flood
2025-11-24 10:17:35 +00:00
Joakim Jäderberg
0e66f1b6de Merged in fix/warmup-not-throwing (pull request #3179)
fix: warmup threw error

* fix: warmup threw error

* .


Approved-by: Linus Flood
2025-11-19 13:49:44 +00:00
Erik Tiekstra
b0f2276b0b fix(BOOK-559): Using same ContactInformation component on hotel pages and booking flow inside the hotel details sidepeek
Approved-by: Bianca Widstam
2025-11-13 14:32:17 +00:00
Joakim Jäderberg
dc53ab9245 Merged in chore/upgrade-next (pull request #3124)
Upgrade next@15.5.6

* chore: upgrade next@15.5.6

* chore: upgrade turborepo@2.6.1

* fix typings for scandic-web

* fix: set correct type for pages

* cleanup

* fix more route.ts typing issues

* Merge branch 'master' of bitbucket.org:scandic-swap/web into chore/upgrade-next

* explicitly import the types


Approved-by: Linus Flood
2025-11-13 07:33:56 +00:00
Joakim Jäderberg
b8d887f82d Merged in chore/move-destinations-api-endpoint (pull request #3058)
chore: move /api/destinations/[country]/[?city] -> /api/web/destinations/[country]/[?city]

* chore: move /api/destinations/[country]/[?city] -> /api/web/destinations/[country]/[?city]
2025-11-03 13:33:45 +00:00
Joakim Jäderberg
15a2da333d Merged in feature/SW-3572-hotel-data-endpoint (pull request #3051)
SW-3572 API route for listing hotels per city or country

* wip hotel data endpoint

* Correct route params type

* wip

* skip static paths call

* timeout when getting destinations take too long

* call noStore when we get a timeout

* add cache-control headers

* .

* .

* .

* wip

* wip

* wip

* wip

* add route for getting hotels per country

* include city when listing by country

* fix distance SI unit

* fix sorting

* Merge branch 'master' of bitbucket.org:scandic-swap/web into feature/SW-3572-hotel-data-endpoint

* packages/tracking passWithNoTests

* revalidate must be static value

* remove oxc reference

* cleanup

* cleanup hotel api route

* feat(SW-3572): cleanup error handling


Approved-by: Anton Gunnarsson
2025-11-03 12:10:22 +00:00
Joakim Jäderberg
0e0efa48a8 Merged in fix/include-service-token-in-debug-data (pull request #2903)
fix: include service token in the debug route

* fix: include service token in the debug route


Approved-by: Bianca Widstam
Approved-by: Hrishikesh Vaipurkar
2025-10-03 13:16:51 +00:00
Joakim Jäderberg
8498026189 Merged in chore/refactor-hotel-trpc-routes (pull request #2891)
Chore/refactor hotel trpc routes

* chore(SW-3519): refactor trpc hotel routers

* chore(SW-3519): refactor trpc hotel routers

* refactor

* merge

* Merge branch 'master' of bitbucket.org:scandic-swap/web into chore/refactor-hotel-trpc-routes


Approved-by: Linus Flood
2025-10-01 12:55:45 +00:00
Erik Tiekstra
0bcde9f74f feat(BOOK-58): Added destination filter pages to sitemap
Approved-by: Linus Flood
2025-09-30 13:17:14 +00:00
Joakim Jäderberg
8cd6f1d3a5 Merged in fix/revalidate-debug-logs (pull request #2840)
chore: change to using debug logs for revalidate call

* chore: change to using debug logs for revalidate call


Approved-by: Anton Gunnarsson
2025-09-23 12:06:20 +00:00
Chuma Mcphoy (We Ahead)
6a0675525d Merged in fix/dtmc-debugging (pull request #2683)
Chore: DTMC Logging

* chore: DTMC debugging

* fix: prune dtmc logging

* fix: Add id's from azure in error logging


Approved-by: Linus Flood
Approved-by: Matilda Landström
2025-08-21 13:12:56 +00:00
Chuma Mcphoy (We Ahead)
12381f26e7 Merged in fix/LOY-287-Telemetry-DTMC (pull request #2631)
fix(LOY-287): telemetry logging for DTMC flow

* fix(LOY-287): telemetry logging for DTMC flow


Approved-by: Erik Tiekstra
Approved-by: Matilda Landström
2025-08-14 13:05:32 +00:00
Joakim Jäderberg
daf765f3d5 Merged in feature/wrap-logging (pull request #2511)
Feature/wrap logging

* feat: change all logging to go through our own logger function so that we can control log levels

* move packages/trpc to using our own logger

* merge


Approved-by: Linus Flood
2025-07-03 12:37:04 +00:00
Linus Flood
03b8d8eac6 Merged in fix/destination-city-page-cache-revalidate (pull request #2492)
Fix: destination city page invalidate cache in webhook

* Fix: destination city page invalidate cache in webhook

* Use correct uid


Approved-by: Joakim Jäderberg
2025-07-01 12:49:23 +00:00
Anton Gunnarsson
6eeaa1cd40 Merged in feat/sw-2872-dependency-inject-app-context-in-trpc-package (pull request #2478)
feat(SW-2872) Dependency inject app context in trpc package

* Move appRouter to trpc package

* WIP Move serverClient to trpc package

Doesn't handle errors yet

* Don't use global

* Use trpc everywhere


Approved-by: Linus Flood
2025-07-01 08:49:33 +00:00
Chuma Mcphoy (We Ahead)
7eb8deb208 Merged in feat/LOY-232-DTMC-API-INTEGRATION (pull request #2454)
feat(LOY-232): DTMC API Integration

* feat(LOY-232): DTMC API Integration

* feat(LOY-232): use employment data in team member card

* refactor(LOY-232): remove static data, return employment details in parsed response & fix tests

* refactor(LOY-232): improve DTMC API Linking error control flow + make res type safe

* fix(LOY-232): remove unused utils

* fix(LOY-232): error vars


Approved-by: Christian Andolf
Approved-by: Erik Tiekstra
2025-07-01 07:03:59 +00:00
Anton Gunnarsson
00bcdaaa28 Merged in feat/sw-2865-move-navigation-router-to-trpc-package (pull request #2427)
feat(SW-2862): Move navigation router to trpc package

* Fix most errors in scandic-web

Just 100 left...

* Move Props type out of trpc

* Fix CategorizedFilters types

* Move more schemas in hotel router

* Fix deps

* fix getNonContentstackUrls

* Fix import error

* Fix entry error handling

* Fix generateMetadata metrics

* Fix alertType enum

* Fix duplicated types

* lint:fix

* Merge branch 'master' into feat/sw-2863-move-contentstack-router-to-trpc-package

* Fix broken imports

* Move booking router to trpc package

* Move partners router to trpc package

* Move autocomplete router to trpc package

* Move booking router to trpc package

* Remove translations from My Pages navigation trpc procedure

* Move navigation router to trpc package

* Merge branch 'master' into feat/sw-2862-move-booking-router-to-trpc-package

* Merge branch 'feat/sw-2862-move-booking-router-to-trpc-package' into feat/sw-2865-move-navigation-router-to-trpc-package

* Merge branch 'master' into feat/sw-2865-move-navigation-router-to-trpc-package

* Merge branch 'master' into feat/sw-2865-move-navigation-router-to-trpc-package

* Merge branch 'master' into feat/sw-2865-move-navigation-router-to-trpc-package


Approved-by: Linus Flood
2025-06-27 06:54:49 +00:00
Anton Gunnarsson
e572d9e7e9 Merged in feat/sw-2862-move-booking-router-to-trpc-package (pull request #2421)
feat(SW-2861): Move booking router to trpc package

* Use direct imports from trpc package

* Add lint-staged config to trpc

* Move lang enum to common

* Restructure trpc package folder structure

* WIP first step

* update internal imports in trpc

* Fix most errors in scandic-web

Just 100 left...

* Move Props type out of trpc

* Fix CategorizedFilters types

* Move more schemas in hotel router

* Fix deps

* fix getNonContentstackUrls

* Fix import error

* Fix entry error handling

* Fix generateMetadata metrics

* Fix alertType enum

* Fix duplicated types

* lint:fix

* Merge branch 'master' into feat/sw-2863-move-contentstack-router-to-trpc-package

* Fix broken imports

* Move booking router to trpc package

* Move partners router to trpc package

* Move autocomplete router to trpc package

* Move booking router to trpc package

* Merge branch 'master' into feat/sw-2862-move-booking-router-to-trpc-package


Approved-by: Linus Flood
2025-06-26 13:21:16 +00:00
Anton Gunnarsson
002d093af4 Merged in feat/sw-2863-move-contentstack-router-to-trpc-package (pull request #2389)
feat(SW-2863): Move contentstack router to trpc package

* Add exports to packages and lint rule to prevent relative imports

* Add env to trpc package

* Add eslint to trpc package

* Apply lint rules

* Use direct imports from trpc package

* Add lint-staged config to trpc

* Move lang enum to common

* Restructure trpc package folder structure

* WIP first step

* update internal imports in trpc

* Fix most errors in scandic-web

Just 100 left...

* Move Props type out of trpc

* Fix CategorizedFilters types

* Move more schemas in hotel router

* Fix deps

* fix getNonContentstackUrls

* Fix import error

* Fix entry error handling

* Fix generateMetadata metrics

* Fix alertType enum

* Fix duplicated types

* lint:fix

* Merge branch 'master' into feat/sw-2863-move-contentstack-router-to-trpc-package

* Fix broken imports

* Merge branch 'master' into feat/sw-2863-move-contentstack-router-to-trpc-package


Approved-by: Linus Flood
2025-06-26 07:53:01 +00:00
Joakim Jäderberg
9b491c5364 Merged in fix/resolve-entry-clearing-cache (pull request #2445)
fix: use shared cache key when revalidating urls

* fix: use shared cache key when revalidating urls


Approved-by: Linus Flood
2025-06-26 06:23:03 +00:00
Anton Gunnarsson
846fd904a6 Merged in feat/sw-2859-set-up-shared-trpc-package (pull request #2319)
feat(SW-2859): Create trpc package

* Add isEdge, safeTry and dataCache to new common package

* Add eslint and move prettier config

* Clean up tests

* Create trpc package and move initialization

* Move errors and a few procedures

* Move telemetry to common package

* Move tokenManager to common package

* Add Sentry to procedures

* Clean up procedures

* Fix self-referencing imports

* Add exports to packages and lint rule to prevent relative imports

* Add env to trpc package

* Add eslint to trpc package

* Apply lint rules

* Use direct imports from trpc package

* Add lint-staged config to trpc

* Move lang enum to common

* Restructure trpc package folder structure

* Fix lang imports


Approved-by: Linus Flood
2025-06-18 12:14:20 +00:00
Chuma Mcphoy (We Ahead)
2101b79db1 Merged in feat/LOY-230-Microsoft-Entra-ID-Auth (pull request #2113)
Feat(LOY-230): DTMC Routes with Entra ID Auth & Error Page Handling

* feat(LOY-230): Link Scandic Friends and Azure accounts

* fix(LOY-230): remove employee id param setting

* fix(LOY-230): return token in jwt callback for auth.dtmc.ts


Approved-by: Michael Zetterberg
Approved-by: Christian Andolf
2025-06-18 10:22:04 +00:00
Anton Gunnarsson
048a477e52 Merged in feat/common-package (pull request #2333)
feat: Add common package

* Add isEdge, safeTry and dataCache to new common package

* Add eslint and move prettier config

* Fix yarn lock

* Clean up tests

* Add lint-staged config to common

* Add missing dependencies


Approved-by: Joakim Jäderberg
2025-06-11 13:08:39 +00:00
Erik Tiekstra
52d266b357 fix(SW-2934): Added all sitemap entries as their own url entry, not just as alternates
Approved-by: Linus Flood
2025-06-04 06:57:30 +00:00
Linus Flood
68763ee1fd Merged in fix/sitemap-fixes (pull request #2280)
fix:sitemap - added null check and correct content-type

* fix:sitemap - added null check and correct content-type

* Revert test code


Approved-by: Erik Tiekstra
2025-06-03 14:48:24 +00:00
Anton Gunnarsson
cbf9e7b7c2 Merged in chore/next15 (pull request #1999)
chore (SW-834): Upgrade to Next 15

* wip: apply codemod and upgrade swc plugin

* wip: design-system to react 19, fix issues from async (search)params

* wip: fix remaining issues from codemod

serverClient is now async because context use headers()
getLang is now async because it uses headers()

* Minor cleanup

* Inline react-material-symbols package

Package is seemingly not maintained any more and doesn't support
React 19. This copies the package source into `design-system`,
makes the necessary changes for 19 and export it for others to use.

* Fix missing awaits

* Disable modal exit animations

Enabling modal exit animations via isExiting prop is causing
modals to be rendered in "hidden" state and never unmount.
Seems to be an issue with react-aria-components,
see https://github.com/adobe/react-spectrum/issues/7563.
Can probably be fixed by rewriting to a solution similar to
https://react-spectrum.adobe.com/react-aria/examples/framer-modal-sheet.html

* Remove unstable cache implementation and use in memory cache locally

* Fix ref type in SelectFilter

* Use cloneElement to add key prop to element


Approved-by: Linus Flood
2025-06-02 11:11:50 +00:00
Joakim Jäderberg
ef3b29b9f1 Merged in fix/SW-2945-cache-timings-for-resolve-entry (pull request #2264)
Fix/SW-2945 cache timings for resolve entry

* fix: cache resolveentry() harder and revalidate on publish instead

* logging: use debug logging for requests and add logging when tll is invalid


Approved-by: Linus Flood
2025-06-02 08:35:55 +00:00
Joakim Jäderberg
4f0c61f68f Merged in revert-version (pull request #2128)
revert including version in layouts and api responses

* revert including version in layouts and api responses


Approved-by: Linus Flood
2025-05-16 12:57:17 +00:00
Joakim Jäderberg
f40a666170 Merged in feat/add-version-to-responses (pull request #2118)
feature: add a version tag to responses SW-2792

* feature: add a version tag to responses


Approved-by: Linus Flood
2025-05-16 11:38:41 +00:00
Joakim Jäderberg
c1505ce50e Merged in feature/warmup (pull request #1887)
* unified warmup function

Approved-by: Linus Flood
2025-04-29 06:18:14 +00:00
Michael Zetterberg
5323a8e46e feat: harmonize log and metrics 2025-04-23 22:40:46 +00:00
Tobias Johansson
12cebd9c1c Merged in fix/add-route-for-app-callback (pull request #1810)
fix: add route for app payment callback

* fix: add route for app payment callback


Approved-by: Michael Zetterberg
2025-04-16 07:34:27 +00:00
Linus Flood
e956e148bc Merged in fix/sitemap-api-route (pull request #1813)
Fix/sitemap - moved sitemap api route to api/web

* fix:sitemap - moved api route to api/web

* Moved files


Approved-by: Joakim Jäderberg
2025-04-16 06:52:55 +00:00
Joakim Jäderberg
eb46f08ef1 Merged in fix/sitemap-use-dt-over-dayjs-directly (pull request #1773)
fix: use dt() over dayjs when creating sitemap

* fix: use dt() over dayjs when creating sitemap


Approved-by: Christian Andolf
Approved-by: Linus Flood
2025-04-10 07:42:16 +00:00
Linus Flood
fc0f0e30b1 Merged in fix/invalidate-uid (pull request #1755)
fix: revalidate with correct uid

* fix: revalidate with correct uid


Approved-by: Joakim Jäderberg
2025-04-08 11:07:02 +00:00
Linus Flood
d30cc7e2be Merged in fix/site-config-revalidate (pull request #1751)
fix: site-config - use correct cache keys and invalidate them

* fix: site-config - use correct cache keys and invalidate them


Approved-by: Joakim Jäderberg
2025-04-08 10:27:26 +00:00
Linus Flood
e4907d4b47 Merged in fix/destinations-speed-test (pull request #1704)
Feat(destination pages): Performance improvements

* fix/destinations: try cache full response

* Added more caching

* Removed unsed env car

* wip

* merge master

* wip

* wip

* wip

* Renaming


Approved-by: Michael Zetterberg
2025-04-02 11:37:22 +00:00
Linus Flood
310296b55f Merged in feat/warmup-cache-function (pull request #1581)
Feat/warmup cache function

* WIP

* Fix warmup for all languages

* Cleanup

* Added env flag so we can disable warmup

* Changed time to 04.00 UTC since backend updates their data at 03.00 UTC

* Add return statements

* Merge branch 'master' into feat/warmup-cache-function


Approved-by: Anton Gunnarsson
2025-03-21 09:35:36 +00:00
Erik Tiekstra
ca93046aad feat/SW-550 sitemap route
* feat(SW-550): Added rewrites to handle sitemap paths

* feat(SW-550): Added sitemap-index generation

* feat(SW-550): Added sitemap xml file generation

* feat(SW-550): Added feature flag 'HIDE_FOR_NEXT_RELEASE' to sitemap routes


Approved-by: Linus Flood
2025-03-17 07:17:08 +00:00
Joakim Jäderberg
fa63b20ed0 Merged in feature/redis (pull request #1478)
Distributed cache

* cache deleteKey now uses an options object instead of a lonely argument variable fuzzy

* merge

* remove debug logs and cleanup

* cleanup

* add fault handling

* add fault handling

* add pid when logging redis client creation

* add identifier when logging redis client creation

* cleanup

* feat: add redis-api as it's own app

* feature: use http wrapper for redis

* feat: add the possibility to fallback to unstable_cache

* Add error handling if redis cache is unresponsive

* add logging for unstable_cache

* merge

* don't cache errors

* fix: metadatabase on branchdeploys

* Handle when /en/destinations throws
add ErrorBoundary

* Add sentry-logging when ErrorBoundary catches exception

* Fix error handling for distributed cache

* cleanup code

* Added Application Insights back

* Update generateApiKeys script and remove duplicate

* Merge branch 'feature/redis' of bitbucket.org:scandic-swap/web into feature/redis

* merge


Approved-by: Linus Flood
2025-03-14 07:54:21 +00:00
Anton Gunnarsson
80100e7631 Merged in monorepo-step-1 (pull request #1080)
Migrate to a monorepo setup - step 1

* Move web to subfolder /apps/scandic-web

* Yarn + transitive deps

- Move to yarn
- design-system package removed for now since yarn doesn't
support the parameter for token (ie project currently broken)
- Add missing transitive dependencies as Yarn otherwise
prevents these imports
- VS Code doesn't pick up TS path aliases unless you open
/apps/scandic-web instead of root (will be fixed with monorepo)

* Pin framer-motion to temporarily fix typing issue

https://github.com/adobe/react-spectrum/issues/7494

* Pin zod to avoid typ error

There seems to have been a breaking change in the types
returned by zod where error is now returned as undefined
instead of missing in the type. We should just handle this
but to avoid merge conflicts just pin the dependency for
now.

* Pin react-intl version

Pin version of react-intl to avoid tiny type issue where formatMessage
does not accept a generic any more. This will be fixed in a future
commit, but to avoid merge conflicts just pin for now.

* Pin typescript version

Temporarily pin version as newer versions as stricter and results in
a type error. Will be fixed in future commit after merge.

* Setup workspaces

* Add design-system as a monorepo package

* Remove unused env var DESIGN_SYSTEM_ACCESS_TOKEN

* Fix husky for monorepo setup

* Update netlify.toml

* Add lint script to root package.json

* Add stub readme

* Fix react-intl formatMessage types

* Test netlify.toml in root

* Remove root toml

* Update netlify.toml publish path

* Remove package-lock.json

* Update build for branch/preview builds


Approved-by: Linus Flood
2025-02-26 10:36:17 +00:00