Skip to content

Commit

Permalink
send correct sdk version
Browse files Browse the repository at this point in the history
  • Loading branch information
Shreyaschorge committed Nov 22, 2024
1 parent fea704c commit 3af107e
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 4 deletions.
2 changes: 1 addition & 1 deletion oas
Submodule oas updated 1 files
+110 −0 contribution.md
4 changes: 3 additions & 1 deletion scripts/generate-wrapper.ts
Original file line number Diff line number Diff line change
Expand Up @@ -787,7 +787,7 @@ const client = new ${clientClassName}(config);\\n\`);
const axiosInstance = customAxiosInstance || axios.create({
headers: {
"x-sdk-version": process.env.npm_package_version,
"x-sdk-version": sdkVersion,
"x-sdk": "node"
},
});
Expand Down Expand Up @@ -1106,6 +1106,8 @@ ${apiFiles
.join("\n")}
${importStatements}
const { version: sdkVersion } = require("../../package.json");
${utilityFunctions}
${wrapperCode}`;
Expand Down
4 changes: 3 additions & 1 deletion src/clients/NeynarAPIClient.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,8 @@ import { UserApi } from '../api/apis/user-api';
import { WebhookApi } from '../api/apis/webhook-api';
import type { AddVerificationReqBody, AuthorizationUrlResponse, AuthorizationUrlResponseType, BalanceResponse, BanListResponse, BanReqBody, BanResponse, BlockListResponse, BlockReqBody, BulkCastsResponse, BulkFollowResponse, BulkUserAddressType, BulkUsersByAddressResponse, BulkUsersResponse, BuyStorageReqBody, CastComposerActionsListResponse, CastComposerType, CastConversationSortType, CastParamType, CastResponse, CastsResponse, CastsSearchResponse, ChannelFollowReqBody, ChannelListResponse, ChannelMemberInviteListResponse, ChannelMemberListResponse, ChannelMemberRole, ChannelResponse, ChannelResponseBulk, ChannelSearchResponse, ChannelType, Conversation, DeleteCastReqBody, DeleteFrameReqBody, DeleteFrameResponse, DeveloperManagedSigner, EmbedType, ErrorRes, FarcasterActionReqBody, FarcasterActionReqBodyAction, FeedResponse, FeedTrendingProvider, FeedType, FetchBulkCastsSortTypeEnum, FetchFrameMetaTagsFromUrl200Response, FetchRepliesAndRecastsForUserFilterEnum, FetchTrendingChannelsTimeWindowEnum, FetchTrendingFeedTimeWindowEnum, FilterType, FnameAvailabilityResponse, FollowReqBody, FollowSortType, FollowersResponse, ForYouProvider, Frame, FrameAction, FrameActionReqBody, FrameDeveloperManagedActionReqBody, FrameSignaturePacket, FrameType, FrameValidateAnalyticsResponse, FrameValidateListResponse, InviteChannelMemberReqBody, LookupCastConversationFoldEnum, MarkNotificationsAsSeenReqBody, MuteListResponse, MuteReqBody, MuteResponse, Networks, NeynarFrame, NeynarFrameCreationReqBody, NeynarFramePage, NeynarFrameUpdateReqBody, NotificationType, NotificationsResponse, OperationResponse, PostCastReqBody, PostCastReqBodyEmbeds, PostCastResponse, ReactionReqBody, ReactionType, ReactionsCastResponse, ReactionsResponse, ReactionsType, RegisterDeveloperManagedSignedKeyReqBody, RegisterSignerKeyReqBody, RegisterUserReqBody, RegisterUserResponse, RelevantFollowersResponse, RemoveChannelMemberReqBody, RemoveVerificationReqBody, RespondChannelInviteReqBody, SignedKeyRequestSponsor, Signer, StorageAllocationsResponse, StorageUsageResponse, SubscribedToResponse, SubscribersResponse, SubscriptionCheckResponse, SubscriptionProvider, SubscriptionProviders, SubscriptionsResponse, TrendingChannelResponse, UpdateUserReqBody, UpdateUserReqBodyLocation, UserFIDResponse, UserPowerLiteResponse, UserResponse, UserSearchResponse, UsersActiveChannelsResponse, UsersResponse, ValidateFrameActionReqBody, ValidateFrameActionResponse, ValidateFrameAggregateWindow, ValidateFrameAnalyticsType, VerificationChainId, VerificationType, WebhookDeleteReqBody, WebhookListResponse, WebhookPatchReqBody, WebhookPatchReqBodyActiveEnum, WebhookPostReqBody, WebhookPutReqBody, WebhookResponse, WebhookSubscriptionFilters } from '../api';

const { version: sdkVersion } = require("../../package.json");


/**
* Converts a camelCase string to snake_case.
Expand Down Expand Up @@ -138,7 +140,7 @@ const client = new NeynarAPIClient(config);\n`);

const axiosInstance = customAxiosInstance || axios.create({
headers: {
"x-sdk-version": process.env.npm_package_version,
"x-sdk-version": sdkVersion,
"x-sdk": "node"
},
});
Expand Down
4 changes: 3 additions & 1 deletion src/clients/NeynarHubClient.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,8 @@ import { UsernamesApi } from '../hub-api/apis/usernames-api';
import { VerificationsApi } from '../hub-api/apis/verifications-api';
import type { CastAdd, FetchCastReactions200Response, FetchEvents200Response, FetchUserData200Response, FetchUserFollowing200Response, FetchUserOnChainEvents200Response, FetchUserOnChainSignersEvents200Response, FetchUsersCasts200Response, FetchVerificationsByFid200Response, FidsResponse, HubEvent, HubInfoResponse, LinkAdd, LinkType, Message, OnChainEventIdRegister, OnChainEventType, Reaction, ReactionType, StorageLimitsResponse, UserDataType, UserNameProof, UsernameProofsResponse, ValidateMessageResponse } from '../hub-api';

const { version: sdkVersion } = require("../../package.json");


/**
* Converts a camelCase string to snake_case.
Expand Down Expand Up @@ -126,7 +128,7 @@ const client = new NeynarHubClient(config);\n`);

const axiosInstance = customAxiosInstance || axios.create({
headers: {
"x-sdk-version": process.env.npm_package_version,
"x-sdk-version": sdkVersion,
"x-sdk": "node"
},
});
Expand Down

0 comments on commit 3af107e

Please sign in to comment.