Skip to content

feat: add LocationService methods for setting opening hours#830

Merged
2ndalpha merged 7 commits intomasterfrom
feat/location-opening-hours
Mar 26, 2026
Merged

feat: add LocationService methods for setting opening hours#830
2ndalpha merged 7 commits intomasterfrom
feat/location-opening-hours

Conversation

@2ndalpha
Copy link
Copy Markdown
Member

Summary

  • Add setOpeningHours(location, openingHours) method to configure weekly opening hours (mon-sun) for a location
  • Add setOpeningHoursExceptions(location, exceptions) method to set date-specific exceptions (e.g., holidays)
  • Add TypeScript model types: OpeningHours, DayOpeningHours, OpeningHoursRange, OpeningHoursTime, OpeningHoursException
  • Both methods use the V2 API (PUT with X-Qminder-API-Version: 2020-09-01 header)

Test plan

  • Unit tests for setOpeningHours with numeric ID and object input
  • Unit tests for setOpeningHoursExceptions with numeric ID and object input
  • All 12 location service tests passing
  • TypeScript compilation clean

Add setOpeningHours and setOpeningHoursExceptions to LocationService,
enabling configuration of weekly opening hours and date-specific
exceptions via the V2 API.
Follow the existing one-interface-per-file convention used throughout
the model directory.
Use discriminated union types for DayOpeningHours and
OpeningHoursException so the compiler rejects invalid combinations
of closed and businessHours. Extract shared V2_HEADERS constant
and tighten test stubs with withArgs.
@2ndalpha 2ndalpha requested a review from KonradPaluch March 25, 2026 14:45
@2ndalpha 2ndalpha added this pull request to the merge queue Mar 26, 2026
Merged via the queue into master with commit b38a464 Mar 26, 2026
10 checks passed
@2ndalpha 2ndalpha deleted the feat/location-opening-hours branch March 26, 2026 11:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants