docs: update attribution data structure in React Native SDK documentation - #50
docs: update attribution data structure in React Native SDK documentation#50Shofiya2003 wants to merge 1 commit into
Conversation
…tion Refactor the `campaign_data` object to use camelCase naming conventions for properties, enhancing consistency and readability. Update the documentation to reflect these changes.
📝 WalkthroughWalkthroughThe 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
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes Poem
Comment |
There was a problem hiding this comment.
🧹 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_data→campaignData, nested snake_case → camelCase), andattribution_sourceis 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_data→campaignData
+> -ad_network→adNetwork
+> -installed_at→installedAt
+> -store_click_at→storeClickAt
+> -group_name→groupName
+> -asset_name→assetName
+> -asset_group_name→assetGroupName
+> -attribution_sourceremoved</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.mdxaround 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 -->
Refactor the
campaign_dataobject to use camelCase naming conventions for properties, enhancing consistency and readability. Update the documentation to reflect these changes.Summary by CodeRabbit
getAttributionDatareturn type with camelCase field naming conventions. Fieldcampaign_datais nowcampaignDatawith nested fields also converted to camelCase (e.g.,ad_network→adNetwork). Removedattribution_sourcefield from the return structure.