Repository navigation
Add requeue and repin endpoints - #4
Merged
Merged
Conversation
Add POST /api/v1/notifications/{id}/requeue and /repin, following
openapi.yaml from vintasend-ts-api v1.0.0-alpha10, which is copied here
byte-identical. Bodies are validated strictly (templateVersion must be a JSON
integer >= 0, sendAfter an ISO-8601 string or null), a refusal maps to 404 or
409, and any other failure is the generic 500.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What changed
Adds the requeue and repin endpoints. They follow
openapi.yamlfromvintasend-ts-apiat tagv1.0.0-alpha10, which is copied here and is byte-identical.POST /api/v1/notifications/{id}/requeuecallsrequeue_notificationfrom vintasend 3.7.0 (Add requeue and repin to the notification service vintasend#41).{ "sendAfter"?: string | null }.sendAfteris left out, the notification keeps its schedule.nullmeans send now. A date without a time zone is read as UTC.nullis a 400.POST /api/v1/notifications/{id}/repincallsrepin_notification.{ "templateVersion"?: integer }. It must be a JSON integer>= 0.-1,1.5,"3",trueandnullare 400s, with no coercion.3.0is accepted as3, because the TS API can't tell those two apart either.200 { "data": Notification }, serialized like a list row.details.issues.NOT_FOUNDreturns a 404, and the other refusal reasons return a 409, with the core library's message.Breaking?
No. The API change is additive, and wire names stay camelCase.
This calls service methods added in vintasend 3.7.0. vintasend 3.7.0 is now on PyPI. The last commit moves the
vintasendpin to3.7.0and regeneratespoetry.lock. This package's own version bump happens in the family release.Checks
These ran against vintasend 3.7.0 from PyPI:
ruff check,ruff format --checkandmypyare clean.pytest: 236 passed. That includes the contract test, which checks every route againstopenapi.yaml.tests/test_requeue_and_repin.pyhas a passing test for each declared status on both operations: 200, 400, 401, 403, 404, 409 and 500.🤖 Generated with Claude Code