Repository navigation
Conversation
Adds typed support for POST /v3/messages/{id}/resend: the public
messages->resend() method, the raw service method, a request params
model, contracts, and a test matching the existing SDK style.
Resend reruns the original send on the same message id, typically to
retry one blocked for insufficient balance. It bills again and reruns
every send policy, so it can land on blocked or filtered again. Only a
terminal message (delivered, failed, read, blocked) or one stuck at sent
for over 15 minutes can be resent; filtered never can. The channel stays
the one the message originally used.
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
Author
|
@codex review |
|
Codex Review: Something went wrong. Try again later by commenting “@codex review”. ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |
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's missing
POST /v3/messages/{id}/resendis live in production and documented in the current spec(https://api.sent.dm/swagger/v3/swagger.json, path
/v3/messages/{id}/resend), with aResendMessageV3Requestbody (optionalsandbox) and a response reusing the same shapeas
POST /v3/messages.MessagesService/MessagesRawServicedon't expose aresend()method yet.
Worked example:
What changed
Adds typed support for this endpoint, matching the pattern every other message method
already uses:
MessagesService::resend(string $id, ?bool $sandbox = null, ?string $idempotencyKey = null, ?string $xProfileID = null, ...): MessageSendResponseMessagesRawService::resend(string $id, array|MessageResendParams $params, ...): BaseResponseSentDm\Messages\MessageResendParams, with propertiessandbox,idempotencyKey,xProfileID, same shape as the other mutation request params in this serviceMessagesContractandMessagesRawContractPurely additive. No existing generated line is changed.
Checked the other Sent SDKs too
Before writing this, checked whether the other SDKs already cover this endpoint. None of
them do: TypeScript, Python, Ruby, and Go each have only a docblock mention of
POST /v3/messages/{id}/resendin their overview comments, no generatedresend()method.Java and C# don't mention it at all. So this looks like a cross-family generator lag on this
one endpoint, not something PHP is uniquely behind on.
Note for review
This repo's commit history shows the spec gets re-synced from production every 1-3 days
(
feat(api): sync OpenAPI spec from production→feat(api): sync generated SDKs from the committed spec), and this endpoint is already in that live spec. There's a realchance the next sync generates this same method before this PR lands. Flagging that up
front rather than leaving it for review to discover, in case it's simpler to just let the
pipeline pick it up instead of merging this by hand.
How I verified it
Request/response shapes checked directly against the live OpenAPI document, not guessed
from the endpoint name.
./scripts/lintpasses../scripts/testpasses for the partsthat don't depend on the mock server (which is disabled in this environment); the new
test matches the existing SDK test style for other message methods.