Skip to content

Commit 2e733b8

Browse files
authored
Update response and types for api server update (#1340)
# Enhance Profile API with Social Account Usernames and Farcaster Support ## Description This PR enhances the profile API by adding username fields to social accounts and adding Farcaster support. It also improves documentation clarity and adds sorting options for profile balances. Key changes: - Added `username` field to Instagram, TikTok, and Twitter social accounts - Added Farcaster social account support with username and display name - Added sorting options and exclude hidden parameter to profile balances - Fixed a comment in the profile documentation (from "social links" to "linked wallets") - Simplified navigation in docs by removing "Metadata Builder" link and renaming "Profile Queries" to "Profile" ## Motivation and Context These enhancements provide more complete social account data for profiles, allowing applications to link directly to users' social media accounts. The addition of Farcaster support reflects the growing importance of this platform in the web3 space. ## Does this change the ABI/API? - [x] This changes the ABI/API This adds new fields to existing API responses but maintains backward compatibility. ## What tests did you add/modify to account for these changes Manually verified that the new fields appear correctly in API responses and that documentation accurately reflects the available data. ## Types of changes - [ ] Bug fix (non-breaking change which fixes an issue) - [x] New module / feature (non-breaking change which adds functionality) - [ ] Breaking change (fix or feature that would cause existing functionality to not work as expected) ## Checklist: - [x] My code follows the code style of this project. - [x] My change requires a change to the documentation. - [x] I have updated the documentation accordingly. - [ ] I added a changeset to account for this change ## Reviewer Checklist: - [ ] My review includes a symposis of the changes and potential issues - [ ] The code style is enforced - [ ] There are no risky / concerning changes / additions to the PR
1 parent 09fb252 commit 2e733b8

File tree

3 files changed

+11
-15
lines changed

3 files changed

+11
-15
lines changed

docs/pages/coins/sdk/queries/profile.mdx

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ async function fetchUserProfile() {
4747
console.log("- Profile Image:", profile.avatar.medium);
4848
}
4949

50-
// Access social links if available
50+
// Access linked wallets if available
5151
if (profile?.linkedWallets && profile?.linkedWallets?.edges?.length || 0 > 0) {
5252
console.log("Linked Wallets:");
5353
profile?.linkedWallets?.edges?.forEach((link: any) => {
@@ -93,20 +93,20 @@ type ProfileData = {
9393
};
9494
socialAccounts?: { // Connected social accounts
9595
instagram?: {
96-
username?: string;
97-
displayName?: string;
96+
username?: string; // Instagram username
97+
displayName?: string; // Instagram display name
9898
};
9999
tiktok?: {
100-
username?: string;
101-
displayName?: string;
100+
username?: string; // TikTok username
101+
displayName?: string; // TikTok display name
102102
};
103103
twitter?: {
104-
username?: string;
105-
displayName?: string;
104+
username?: string; // Twitter/X username
105+
displayName?: string; // Twitter/X display name
106106
};
107-
"farcaster": {
108-
"username": "string";
109-
"displayName": "string";
107+
farcaster?: {
108+
username?: string; // Farcaster username
109+
displayName?: string; // Farcaster display name
110110
};
111111
};
112112
linkedWallets?: { // Connected wallets

docs/vocs.config.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -140,7 +140,7 @@ export default defineConfig({
140140
link: "/coins/sdk/queries/coin",
141141
},
142142
{
143-
text: "Profile Queries",
143+
text: "Profile",
144144
link: "/coins/sdk/queries/profile",
145145
},
146146
{

packages/coins-sdk/src/client/types.gen.ts

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1552,10 +1552,6 @@ export type GetProfileResponses = {
15521552
* The `String` scalar type represents textual data, represented as UTF-8 character sequences. The String type is most often used by GraphQL to represent free-form human-readable text.
15531553
*/
15541554
displayName?: string;
1555-
/**
1556-
* The `String` scalar type represents textual data, represented as UTF-8 character sequences. The String type is most often used by GraphQL to represent free-form human-readable text.
1557-
*/
1558-
id?: string;
15591555
};
15601556
farcaster?: {
15611557
/**

0 commit comments

Comments
 (0)