Skip to content

feat: update LineService.create to use JSON endpoint with version headers#837

Merged
2ndalpha merged 4 commits intomasterfrom
feat/line-creation-endpoint-update
Mar 31, 2026
Merged

feat: update LineService.create to use JSON endpoint with version headers#837
2ndalpha merged 4 commits intomasterfrom
feat/line-creation-endpoint-update

Conversation

@2ndalpha
Copy link
Copy Markdown
Member

@2ndalpha 2ndalpha commented Mar 30, 2026

Summary

  • Migrate LineService.create() from legacy form-urlencoded endpoint to JSON endpoint with X-Qminder-API-Version header
  • Add model types: LineCreationRequest, LineCreatedResponse, LineColor, LineTranslation, LineAppointmentSettings
  • New endpoint supports additional fields: color (named colors), disabled, translations, appointmentSettings

Breaking changes

  • create() accepts LineCreationRequest instead of Partial<Line> & { name } — color is required, uses named values (TEAL, VIOLET, etc.)
  • create() returns LineCreatedResponse ({ id: string }) instead of Line

Test plan

  • Line service tests pass (3 new create tests)
  • Full test suite passes
  • Build compiles
  • Prettier passes
  • Verify against staging

…ders

Migrate LineService.create() from the legacy form-urlencoded endpoint to the
JSON endpoint with X-Qminder-API-Version header. The new endpoint supports
additional fields: color, disabled, translations, and appointmentSettings.

BREAKING CHANGE: create() now accepts LineCreationRequest (with named colors)
instead of partial Line, and returns LineCreatedResponse ({ id: string })
instead of Line.
@2ndalpha 2ndalpha requested a review from KonradPaluch March 30, 2026 13:27
Copy link
Copy Markdown

@KonradPaluch KonradPaluch left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

works well
I also created a script to test it against live; I'll add it later today to GH

@2ndalpha 2ndalpha added this pull request to the merge queue Mar 31, 2026
Merged via the queue into master with commit b6423e2 Mar 31, 2026
10 checks passed
@2ndalpha 2ndalpha deleted the feat/line-creation-endpoint-update branch March 31, 2026 10:32
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