Skip to content

fix(turbosign): return actual backend response from void method - #9

Merged
nicolasiscoding merged 5 commits into
mainfrom
fix/turbosign-void-response
Jan 28, 2026
Merged

nicolasiscoding merged 5 commits into
mainfrom
fix/turbosign-void-response

Conversation

@nicolasiscoding

@nicolasiscoding nicolasiscoding commented Jan 26, 2026 •

Copy link
Copy Markdown
Member

Summary

Fixes void method returning empty/hardcoded response in all SDKs:

SDK Files Changed
JS sign.ts, types/sign.ts
PHP TurboSign.php, VoidDocumentResponse.php
Python sign.py
Go turbosign.go
Java TurboSign.java, VoidDocumentResponse.java

The Bug

All SDKs were ignoring the backend response and returning hardcoded objects:

{ success: true, message: "Document has been voided successfully" }

The Fix

Now all SDKs return the actual backend response:

{
  "id": "document-uuid",
  "name": "Document Name",
  "status": "voided",
  "voidReason": "Reason provided",
  "voidedAt": "2026-01-26T19:49:02.000Z"
}

Dependencies

⚠️ Requires backend fix to be deployed first:

Test plan

  • Deploy backend fix to staging
  • Test JS SDK: TurboSign.void(documentId, reason)
  • Test PHP SDK: TurboSign::void($documentId, $reason)
  • Test Python SDK: await TurboSign.void_document(document_id, reason)
  • Test Go SDK: client.VoidDocument(ctx, documentID, reason)
  • Test Java SDK: turboSign.voidDocument(documentId, reason)
  • Verify all return { id, name, status, voidReason, voidedAt }

🤖 Generated with Claude Code

nicolasiscoding and others added 4 commits January 26, 2026 14:55
The void method was ignoring the backend response and returning a
hardcoded { success: true, message: '...' } object. This didn't match
what the backend actually returns.

Changes:
- Updated VoidDocumentResponse type to match backend schema:
  { id, name, status, voidReason, voidedAt }
- Return actual backend response instead of hardcoded object
- Updated JSDoc examples

Note: Requires backend fix (RapidDocxBackend PR #1139) to be deployed
first, as the backend currently returns empty {} due to a separate bug.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Same bug as JS SDK - all SDKs were ignoring the backend response and
returning hardcoded { success: true, message: '...' } objects.

Changes:
- PHP: Return actual response, update VoidDocumentResponse type
- Python: Return actual response, update docstring
- Go: Return actual response, update VoidDocumentResponse struct
- Java: Return actual response, update VoidDocumentResponse class

All SDKs now return: { id, name, status, voidReason, voidedAt }

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Update all SDK test files to expect the new response format:
{ id, name, status, voidReason, voidedAt }

instead of the old hardcoded:
{ success: true, message: '...' }

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
@AmitSharma512
AmitSharma512 marked this pull request as ready for review January 27, 2026 13:22
@nicolasiscoding

Copy link
Copy Markdown
Member Author

Code review

No issues found. Checked for bugs and CLAUDE.md compliance.

🤖 Generated with Claude Code

@nicolasiscoding

Copy link
Copy Markdown
Member Author

@AmitSharma512 -- todo for me, bump all versions of SDK for publishing

- JS SDK: 0.1.1 → 0.1.2
- Python SDK: 0.1.0 → 0.1.2
- Java SDK: 1.0.0 → 0.1.2
- Go SDK: uses tags only (no version file)
- PHP SDK: uses tags only (no version file in composer.json)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
@nicolasiscoding
nicolasiscoding merged commit 6154cf3 into main Jan 28, 2026
5 checks passed
@nicolasiscoding
nicolasiscoding deleted the fix/turbosign-void-response branch January 28, 2026 14:05
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