Skip to content

Update inapp module and add startVerificationFromUrl in frontend api … #4

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
May 19, 2025

Conversation

predatorx7
Copy link
Collaborator

@predatorx7 predatorx7 commented May 19, 2025

…(was always there in platform api)

Summary by CodeRabbit

  • New Features

    • Introduced a new method to start verification from a URL.
  • Documentation

    • Updated installation instructions and migration guides to reflect support for version 0.7.0.
    • Added a new migration section for version 0.7.0.
    • Updated changelog with details for version 0.7.0.
  • Chores

    • Upgraded SDK and dependency versions to 0.7.0 across project files.

Copy link

coderabbitai bot commented May 19, 2025

Walkthrough

The updates raise the SDK and related dependency versions from 0.6.0 to 0.7.0 across all relevant files, update installation and migration documentation accordingly, and introduce a new asynchronous method, startVerificationFromUrl, to the ReclaimVerification class for initiating verification from a URL.

Changes

File(s) Change Summary
CHANGELOG.md, package.json, android/build.gradle, InappRnSdk.podspec, samples/example_new_arch/package.json Updated SDK and dependency versions from 0.6.0 to 0.7.0.
README.md, documentation/migration.md Updated installation instructions, added migration notes for 0.7.0, and modified migration documentation for clarity.
src/index.ts, lib/commonjs/index.js, lib/module/index.js, lib/typescript/commonjs/src/index.d.ts, lib/typescript/module/src/index.d.ts Added startVerificationFromUrl async method to ReclaimVerification class and related platform classes/interfaces, enabling verification initiation via URL.

Sequence Diagram(s)

sequenceDiagram
    participant ClientApp
    participant ReclaimVerification
    participant PlatformModule

    ClientApp->>ReclaimVerification: startVerificationFromUrl(requestUrl)
    ReclaimVerification->>PlatformModule: startVerificationFromUrl(requestUrl)
    PlatformModule-->>ReclaimVerification: Promise<Response>
    ReclaimVerification-->>ClientApp: Promise<Response>
Loading

Poem

A hop, a skip, a version jump—
To seven from six, we thump-thump-thump!
New docs to guide, new methods to try,
Verification from URLs—give it a fly!
The rabbit is pleased, the SDK’s grown,
Onward we bound, to new code unknown! 🐇✨


📜 Recent review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
Cache: Disabled due to data retention organization setting
Knowledge Base: Disabled due to data retention organization setting

📥 Commits

Reviewing files that changed from the base of the PR and between 760d662 and edd3a62.

⛔ Files ignored due to path filters (4)
  • lib/commonjs/index.js.map is excluded by !**/*.map
  • lib/module/index.js.map is excluded by !**/*.map
  • lib/typescript/commonjs/src/index.d.ts.map is excluded by !**/*.map
  • lib/typescript/module/src/index.d.ts.map is excluded by !**/*.map
📒 Files selected for processing (4)
  • lib/commonjs/index.js (1 hunks)
  • lib/module/index.js (1 hunks)
  • lib/typescript/commonjs/src/index.d.ts (1 hunks)
  • lib/typescript/module/src/index.d.ts (1 hunks)
🧰 Additional context used
🧬 Code Graph Analysis (2)
lib/typescript/commonjs/src/index.d.ts (3)
lib/module/index.js (1)
  • ReclaimVerification (12-42)
src/index.ts (2)
  • ReclaimVerification (11-56)
  • Response (80-82)
lib/typescript/commonjs/src/specs/NativeInappRnSdk.d.ts (1)
  • Response (100-115)
lib/typescript/module/src/index.d.ts (3)
lib/module/index.js (1)
  • ReclaimVerification (12-42)
src/index.ts (2)
  • ReclaimVerification (11-56)
  • Response (80-82)
lib/typescript/module/src/specs/NativeInappRnSdk.d.ts (1)
  • Response (100-115)
🔇 Additional comments (4)
lib/commonjs/index.js (1)

32-34: LGTM: New startVerificationFromUrl method properly delegates to platform implementation

The implementation correctly delegates to the platform's implementation following the same pattern as other methods in this class. This addition aligns with the PR objective of exposing this function in the frontend API.

lib/module/index.js (1)

27-29: LGTM: New startVerificationFromUrl method properly delegates to platform implementation

This implementation correctly delegates to the platform implementation following the same pattern as other methods in this class.

lib/typescript/commonjs/src/index.d.ts (1)

15-15: LGTM: Proper type declaration for the new startVerificationFromUrl method

The method signature is correctly declared with the proper parameter and return type, matching the implementation in the CommonJS and Module builds.

lib/typescript/module/src/index.d.ts (1)

15-15: LGTM: Proper type declaration for the new startVerificationFromUrl method

The method signature is correctly declared with the proper parameter and return type, maintaining consistency with the implementation in other files.

✨ Finishing Touches
  • 📝 Generate Docstrings

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share
🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Explain this complex logic.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai explain this code block.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read src/utils.ts and explain its main purpose.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

Support

Need help? Create a ticket on our support page for assistance with any issues or questions.

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

CodeRabbit Commands (Invoked using PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai generate docstrings to generate docstrings for this PR.
  • @coderabbitai generate sequence diagram to generate a sequence diagram of the changes in this PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🧹 Nitpick comments (2)
documentation/migration.md (2)

3-9: Refine the 0.7.0 migration instructions.
The new section is on point, but we can improve readability and satisfy markdown lint rules by:

  • Fixing the missing article (“the latest version” vs. “latest versions”).
  • Converting bare URLs to named markdown links.
@@ -7,7 +7,8 @@
- Make sure if you are using the latest versions of `ReclaimInAppSdk` cocoapod if you have overriden this dependency in your `Podfile`. Latest version on [cocoapods.org is 0.7.0](https://cocoapods.org/pods/ReclaimInAppSdk).
+ Make sure you are using the latest version of the `ReclaimInAppSdk` CocoaPod if you have overridden this dependency in your `Podfile`. The latest version is [0.7.0 on CocoaPods](https://cocoapods.org/pods/ReclaimInAppSdk).

- Run a `pod install --repo-update`. If this fails for reasons related to the `ReclaimInAppSdk`, try running `pod update ReclaimInAppSdk`.
- Refer: https://github.com/reclaimprotocol/reclaim-inapp-reactnative-sdk/blob/main/README.md#ios-setup
+ - Run a `pod install --repo-update`. If that fails due to `ReclaimInAppSdk`, run `pod update ReclaimInAppSdk`.
+ - See the [iOS setup instructions](https://github.com/reclaimprotocol/reclaim-inapp-reactnative-sdk/blob/main/README.md#ios-setup).
🧰 Tools
🪛 LanguageTool

[uncategorized] ~7-~7: A determiner appears to be missing. Consider inserting it.
Context: ...iden this dependency in your Podfile. Latest version on [cocoapods.org is 0.7.0](htt...

(AI_EN_LECTOR_MISSING_DETERMINER)

🪛 markdownlint-cli2 (0.17.2)

9-9: Bare URL used
null

(MD034, no-bare-urls)


44-46: Apply same refinements to the 0.6.0 iOS migration.
The earlier version’s iOS section should also remove bare URLs, correct grammar (“overriden”→“overridden”), and use Markdown links.

@@ -44,3 +44,4 @@
- Make sure if you are using the latest versions of `ReclaimInAppSdk` cocoapod if you have overriden this dependency in your `Podfile`.
+ Make sure you are using the latest version of the `ReclaimInAppSdk` CocoaPod if you have overridden this dependency in your `Podfile`.

- Run a `pod install --repo-update`. If this fails for reasons related to the `ReclaimInAppSdk`, try running `pod update ReclaimInAppSdk`.
- Refer: https://github.com/reclaimprotocol/reclaim-inapp-reactnative-sdk/blob/main/README.md#ios-setup
+ - Refer to the [iOS setup instructions](https://github.com/reclaimprotocol/reclaim-inapp-reactnative-sdk/blob/main/README.md#ios-setup).
🧰 Tools
🪛 markdownlint-cli2 (0.17.2)

46-46: Bare URL used
null

(MD034, no-bare-urls)

📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
Cache: Disabled due to data retention organization setting
Knowledge Base: Disabled due to data retention organization setting

📥 Commits

Reviewing files that changed from the base of the PR and between 780fbbd and 760d662.

📒 Files selected for processing (8)
  • CHANGELOG.md (1 hunks)
  • InappRnSdk.podspec (1 hunks)
  • README.md (3 hunks)
  • android/build.gradle (1 hunks)
  • documentation/migration.md (2 hunks)
  • package.json (1 hunks)
  • samples/example_new_arch/package.json (1 hunks)
  • src/index.ts (1 hunks)
🧰 Additional context used
🧬 Code Graph Analysis (1)
src/index.ts (2)
lib/module/index.js (1)
  • ReclaimVerification (12-39)
src/specs/NativeInappRnSdk.ts (1)
  • Response (110-125)
🪛 LanguageTool
documentation/migration.md

[uncategorized] ~7-~7: A determiner appears to be missing. Consider inserting it.
Context: ...iden this dependency in your Podfile. Latest version on [cocoapods.org is 0.7.0](htt...

(AI_EN_LECTOR_MISSING_DETERMINER)

🪛 markdownlint-cli2 (0.17.2)
documentation/migration.md

9-9: Bare URL used
null

(MD034, no-bare-urls)

🔇 Additional comments (10)
android/build.gradle (1)

121-121: Version bump looks good.

The dependency version for org.reclaimprotocol:inapp_sdk has been correctly updated from 0.6.0 to 0.7.0, which aligns with the overall SDK version update.

samples/example_new_arch/package.json (1)

13-13: Version update is consistent.

The dependency version for @reclaimprotocol/inapp-rn-sdk has been updated from ^0.6.0 to ^0.7.0, maintaining consistency with the version updates across the project.

src/index.ts (2)

33-37: Implementation of startVerificationFromUrl method looks good.

The new method has been properly implemented to expose the existing platform functionality to the frontend API. The function signature accepts a URL string and correctly delegates to the platform implementation.


362-384: Platform implementation for startVerificationFromUrl is well-structured.

The implementation follows the same pattern as the existing startVerification method:

  1. Makes a call to the native module
  2. Transforms the response to include properly typed proofs
  3. Handles errors appropriately with detailed error information

Good error handling approach with comprehensive try/catch and proper error transformation.

package.json (1)

3-3: Version bump is consistent.

The package version has been correctly updated from 0.6.0 to 0.7.0, which aligns with all other version updates in this PR.

InappRnSdk.podspec (1)

20-20: Align CocoaPod dependency version to 0.7.0.
The bump from ~> 0.6.0 to ~> 0.7.0 here correctly matches the coordinated version updates across platforms.

README.md (4)

113-113: Update CocoaPods installation snippet for iOS.
This line correctly updates the ReclaimInAppSdk pod to ~> 0.7.0 in the “From cocoapods” example.


119-119: Update CocoaPods git-tag installation example.
The :tag => '0.7.0' update is correct and aligns with the new release.


156-156: Sync example Podfile in the example app.
The embedded pod 'ReclaimInAppSdk', '~> 0.7.0' is now consistent with the rest of the documentation.


295-295: Link to 0.7.0 migration instructions.
The new migration link for version 0.7.0 is valid and matches the docs.

Comment on lines +1 to +4
## 0.7.0

* Updates inapp module dependency to 0.7.0

Copy link

Choose a reason for hiding this comment

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

⚠️ Potential issue

Document new functionality in the changelog.
You’ve added the 0.7.0 header and noted the module dependency bump, but the newly introduced startVerificationFromUrl method (added to the frontend API) isn’t mentioned. Please include a bullet under ## 0.7.0 describing this feature so that consumers know what’s new.

🤖 Prompt for AI Agents
In CHANGELOG.md lines 1 to 4, the changelog entry for version 0.7.0 only
mentions the inapp module dependency update but omits the new
startVerificationFromUrl method added to the frontend API. Add a bullet point
under the 0.7.0 header describing the startVerificationFromUrl method to
document this new functionality for consumers.

@predatorx7 predatorx7 merged commit 4715d57 into main May 19, 2025
1 of 6 checks passed
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