Skip to content

feat: changed update intent callback return signature#13

Merged
ArushKapoorJuspay merged 1 commit into
mainfrom
feat/update-intent-callback-signature
Apr 23, 2026
Merged

feat: changed update intent callback return signature#13
ArushKapoorJuspay merged 1 commit into
mainfrom
feat/update-intent-callback-signature

Conversation

@sakksham7

Copy link
Copy Markdown
Contributor

Type of Change

  • Bugfix
  • New feature
  • Enhancement
  • Refactoring
  • Dependency updates
  • Documentation
  • CI/CD

Description

Updated the updateIntent function signature across Context.res and OrcaJs.res to accept a callback typed as unit => promise<JSON.t> instead of unit => promise<string>, aligning the API contract with the expected behavior.
Changed in:

  • Context.res: elementsType.updateIntent and paymentSessionContextType.updateIntent
  • OrcaJs.res: element.updateIntent and initPaymentSession.updateIntent

How did you test it?

  • Ran npm run re:build — no build artifact changes, confirming this is a compile-time only change with no runtime impact.
  • Verified updated signature is consistent across all four updateIntent usages.

Usage Notes

  • No impact on JavaScript consumers — types are erased at compile time and the JS output is identical.
  • ReScript consumers must update updateIntent callbacks from unit => promise<string> to unit => promise<JSON.t> to comply with the updated contract.
  • No backward compatibility guaranteed for ReScript consumers.

Version Update

  • I have bumped the package version in package.json following semantic versioning:
    • x.x.x for major changes (breaking).
    • 2.3.0 for minor changes (new feature, no breaking changes).
    • x.x.x for patch changes (bug fixes, minor improvements).

Checklist

  • I ran npm run re:build and verified the build artifacts.
  • I reviewed the code for style, readability, and consistency.
  • I verified the changes are backward compatible (if applicable).
  • I tested this change in a real or simulated consuming project.
  • I updated documentation, README, or usage examples if necessary.

Screenshots or Logs

No runtime changes — build output is identical before and after. API contract update is compile-time only.

@ArushKapoorJuspay ArushKapoorJuspay merged commit 241b4ee into main Apr 23, 2026
8 checks passed
@ArushKapoorJuspay ArushKapoorJuspay deleted the feat/update-intent-callback-signature branch April 23, 2026 09:31
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