Skip to content

docs: update attribution data structure in React Native SDK documentation - #50

Open
Shofiya2003 wants to merge 1 commit into
mainfrom
fix/rn-linkrunner-get-attribution-response
Open

docs: update attribution data structure in React Native SDK documentation#50
Shofiya2003 wants to merge 1 commit into
mainfrom
fix/rn-linkrunner-get-attribution-response

Conversation

@Shofiya2003

@Shofiya2003 Shofiya2003 commented Mar 5, 2026

Copy link
Copy Markdown
Collaborator

Refactor the campaign_data object to use camelCase naming conventions for properties, enhancing consistency and readability. Update the documentation to reflect these changes.

Summary by CodeRabbit

  • Documentation
    • Updated React Native SDK getAttributionData return type with camelCase field naming conventions. Field campaign_data is now campaignData with nested fields also converted to camelCase (e.g., ad_networkadNetwork). Removed attribution_source field from the return structure.

…tion

Refactor the `campaign_data` object to use camelCase naming conventions for properties, enhancing consistency and readability. Update the documentation to reflect these changes.
@coderabbitai

coderabbitai Bot commented Mar 5, 2026

Copy link
Copy Markdown
📝 Walkthrough

Walkthrough

The getAttributionData return type in the react-native SDK documentation is updated to use camelCase naming convention. The top-level campaign_data field becomes campaignData, with nested fields also converted to camelCase. The attribution_source field is removed.

Changes

Cohort / File(s) Summary
API Documentation Update
sdk/react-native.mdx
Updated getAttributionData return type: converted campaign_data and nested fields to camelCase (campaignData, adNetwork, installedAt, storeClickAt, groupName, assetName, assetGroupName); removed attribution_source field.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Poem

🐰 Snake cases slither, camel cases prance,
campaign_data joins the naming dance,
From underscore paths to camelCase way,
Field names transform, old source fades away! ✨
The SDK hops forward, lean and clean,
Most elegant transformation I've ever seen! 🚀


Comment @coderabbitai help to get the list of available commands and usage tips.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🧹 Nitpick comments (1)
sdk/react-native.mdx (1)

157-166: Add a short migration note for renamed attribution keys.

Line 157 and Lines 161-166 introduce a public response-shape rename (campaign_datacampaignData, nested snake_case → camelCase), and attribution_source is removed. Please add an explicit “breaking change” mapping note (ideally with SDK version) right below this block to prevent consumer-side parsing regressions.

📝 Suggested doc patch
 The `getAttributionData` function returns:
 
 ```typescript
 {
     deeplink: string | null;
     campaignData: {
         id: string;
         name: string;
         type: string; // "ORGANIC" | "INORGANIC"
         adNetwork: string | null; // "META" | "GOOGLE" | null
         installedAt: string;
         storeClickAt: string | null;
         groupName: string;
         assetName: string;
         assetGroupName: string;
     }
 }

+> Breaking change: From rn-linkrunner vX.Y.Z, attribution response keys are camelCased.
+> - campaign_datacampaignData
+> - ad_networkadNetwork
+> - installed_atinstalledAt
+> - store_click_atstoreClickAt
+> - group_namegroupName
+> - asset_nameassetName
+> - asset_group_nameassetGroupName
+> - attribution_source removed

</details>

<details>
<summary>🤖 Prompt for AI Agents</summary>

Verify each finding against the current code and only fix it if needed.

In @sdk/react-native.mdx around lines 157 - 166, Add a short “Breaking change”
migration note directly below the campaignData type block to warn consumers that
response keys were renamed and one key removed starting in the new RN SDK
version; reference the SDK version placeholder (e.g., rn-linkrunner vX.Y.Z) and
list the exact key mappings to camelCase and the removed key: campaign_data →
campaignData, ad_network → adNetwork, installed_at → installedAt, store_click_at
→ storeClickAt, group_name → groupName, asset_name → assetName, asset_group_name
→ assetGroupName, and note that attribution_source is removed so consumers must
stop relying on that field.


</details>

</blockquote></details>

</blockquote></details>

<details>
<summary>🤖 Prompt for all review comments with AI agents</summary>

Verify each finding against the current code and only fix it if needed.

Nitpick comments:
In @sdk/react-native.mdx:

  • Around line 157-166: Add a short “Breaking change” migration note directly
    below the campaignData type block to warn consumers that response keys were
    renamed and one key removed starting in the new RN SDK version; reference the
    SDK version placeholder (e.g., rn-linkrunner vX.Y.Z) and list the exact key
    mappings to camelCase and the removed key: campaign_data → campaignData,
    ad_network → adNetwork, installed_at → installedAt, store_click_at →
    storeClickAt, group_name → groupName, asset_name → assetName, asset_group_name →
    assetGroupName, and note that attribution_source is removed so consumers must
    stop relying on that field.

</details>

---

<details>
<summary>ℹ️ Review info</summary>

<details>
<summary>⚙️ Run configuration</summary>

**Configuration used**: defaults

**Review profile**: CHILL

**Plan**: Lite

**Run ID**: `7ee5dd32-7954-4c3a-b152-bd9cdb34b048`

</details>

<details>
<summary>📥 Commits</summary>

Reviewing files that changed from the base of the PR and between 96e2f25a9775554e3bcbe3b30862bd8a3061e321 and 8e69c0fbdf3ed12dbd4622b77df09dfd9014b4f4.

</details>

<details>
<summary>📒 Files selected for processing (1)</summary>

* `sdk/react-native.mdx`

</details>

</details>

<!-- This is an auto-generated comment by CodeRabbit for review status -->

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.

1 participant