From fb2f2057cacf71ba97ee22d8d1130c99776c969d Mon Sep 17 00:00:00 2001 From: Ty Book Date: Tue, 29 Oct 2024 22:13:23 -0400 Subject: [PATCH 1/3] Workaround bug that prevented us from splitting generated Typescript into multiple files when generating from OpenAPI v3.1 spec --- package.json | 8 ++++---- src/oas | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/package.json b/package.json index 4a2dbce9..fb69f921 100644 --- a/package.json +++ b/package.json @@ -10,9 +10,9 @@ "scripts": { "clean": "del-cli ./build/*", "build": "yarn run clean && tsc", - "generate:neynar-oas-v1-farcaster": "del-cli src/neynar-api/v1/openapi; openapi-generator-cli generate -i src/oas/src/v1/spec.yaml -g typescript-axios -o src/neynar-api/v1/openapi --config src/oas/openapi-generator-config.json --openapi-normalizer 'REFACTOR_ALLOF_WITH_PROPERTIES_ONLY=true'", - "generate:neynar-oas-v2-farcaster": "del-cli src/neynar-api/v2/openapi-farcaster; openapi-generator-cli generate -i src/oas/src/v2/spec.yaml -g typescript-axios -o src/neynar-api/v2/openapi-farcaster --config src/oas/openapi-generator-config.json --openapi-normalizer 'REFACTOR_ALLOF_WITH_PROPERTIES_ONLY=true,REF_AS_PARENT_IN_ALLOF=true'", - "generate:neynar-oas-v2-stp": "del-cli src/neynar-api/v2/openapi-stp; openapi-generator-cli generate -i src/oas/src/v2/stp/spec.yaml -g typescript-axios -o src/neynar-api/v2/openapi-stp --config src/oas/openapi-generator-config.json --openapi-normalizer 'REFACTOR_ALLOF_WITH_PROPERTIES_ONLY=true,REF_AS_PARENT_IN_ALLOF=true'" + "generate:neynar-oas-v1-farcaster": "del-cli src/neynar-api/v1/openapi; openapi-generator-cli generate -i src/oas/src/v1/spec.yaml -g typescript-axios -o src/neynar-api/v1/openapi --config src/oas/openapi-generator-config.json --inline-schema-options 'REFACTOR_ALLOF_INLINE_SCHEMAS=true'", + "generate:neynar-oas-v2-farcaster": "del-cli src/neynar-api/v2/openapi-farcaster; openapi-generator-cli generate -i src/oas/src/v2/spec.yaml -g typescript-axios -o src/neynar-api/v2/openapi-farcaster --config src/oas/openapi-generator-config.json --inline-schema-options 'REFACTOR_ALLOF_INLINE_SCHEMAS=true'", + "generate:neynar-oas-v2-stp": "del-cli src/neynar-api/v2/openapi-stp; openapi-generator-cli generate -i src/oas/src/v2/stp/spec.yaml -g typescript-axios -o src/neynar-api/v2/openapi-stp --config src/oas/openapi-generator-config.json --inline-schema-options 'REFACTOR_ALLOF_INLINE_SCHEMAS=true'" }, "author": "Neynar", "license": "MIT", @@ -38,4 +38,4 @@ "neynar", "nodejs" ] -} \ No newline at end of file +} diff --git a/src/oas b/src/oas index 66188546..a1b7f019 160000 --- a/src/oas +++ b/src/oas @@ -1 +1 @@ -Subproject commit 66188546dd4df945f015e391b0d63b682b207fbe +Subproject commit a1b7f0192792d85add65e3b464f75c5544965cbe From 1346597fda7e68523efff5fe3b2eb652ce884cb9 Mon Sep 17 00:00:00 2001 From: Ty Book Date: Tue, 29 Oct 2024 22:13:56 -0400 Subject: [PATCH 2/3] Regenerate everything in individual files --- .../v1/openapi/.openapi-generator/FILES | 71 + src/neynar-api/v1/openapi/api.ts | 3032 +-- src/neynar-api/v1/openapi/apis/cast-api.ts | 444 + src/neynar-api/v1/openapi/apis/follows-api.ts | 262 + .../v1/openapi/apis/notifications-api.ts | 256 + src/neynar-api/v1/openapi/apis/user-api.ts | 515 + .../v1/openapi/apis/verification-api.ts | 224 + src/neynar-api/v1/openapi/index.ts | 2 +- .../all-casts-in-thread-response-result.ts | 33 + .../models/all-casts-in-thread-response.ts | 33 + .../v1/openapi/models/cast-author-one-of.ts | 30 + .../v1/openapi/models/cast-author.ts | 38 + .../models/cast-likes-response-result.ts | 42 + .../v1/openapi/models/cast-likes-response.ts | 33 + .../models/cast-parent-author-all-of.ts | 30 + .../v1/openapi/models/cast-parent-author.ts | 26 + .../models/cast-reactions-response-result.ts | 42 + .../openapi/models/cast-reactions-response.ts | 33 + .../models/cast-recaster-response-result.ts | 42 + .../openapi/models/cast-recaster-response.ts | 33 + .../v1/openapi/models/cast-response-result.ts | 33 + .../v1/openapi/models/cast-response.ts | 33 + src/neynar-api/v1/openapi/models/cast-type.ts | 31 + .../models/cast-with-interactions-all-of.ts | 66 + .../cast-with-interactions-reactions.ts | 42 + .../models/cast-with-interactions-recasts.ts | 36 + .../models/cast-with-interactions-replies.ts | 30 + .../openapi/models/cast-with-interactions.ts | 56 + src/neynar-api/v1/openapi/models/cast.ts | 107 + .../openapi/models/casts-response-result.ts | 42 + .../v1/openapi/models/casts-response.ts | 33 + .../models/custody-address-response-result.ts | 36 + .../models/custody-address-response.ts | 33 + src/neynar-api/v1/openapi/models/embed-url.ts | 30 + src/neynar-api/v1/openapi/models/error-res.ts | 42 + .../openapi/models/follow-response-result.ts | 42 + .../models/follow-response-user-all-of.ts | 30 + .../v1/openapi/models/follow-response-user.ts | 38 + .../v1/openapi/models/follow-response.ts | 33 + src/neynar-api/v1/openapi/models/index.ts | 65 + .../mentions-and-replies-response-result.ts | 42 + .../models/mentions-and-replies-response.ts | 33 + .../v1/openapi/models/next-cursor.ts | 30 + .../v1/openapi/models/reaction-type.ts | 31 + .../models/reaction-with-cast-meta-cast.ts | 57 + .../reaction-with-cast-meta-reaction.ts | 59 + .../openapi/models/reaction-with-cast-meta.ts | 51 + src/neynar-api/v1/openapi/models/reaction.ts | 62 + ...actions-and-recasts-notification-all-of.ts | 44 + .../reactions-and-recasts-notification.ts | 47 + .../reactions-and-recasts-response-result.ts | 42 + .../models/reactions-and-recasts-response.ts | 33 + .../v1/openapi/models/reactor-pfp.ts | 30 + .../openapi/models/reactor-viewer-context.ts | 36 + src/neynar-api/v1/openapi/models/reactor.ts | 72 + .../v1/openapi/models/recaster-pfp.ts | 30 + .../v1/openapi/models/recaster-profile-bio.ts | 36 + .../v1/openapi/models/recaster-profile.ts | 33 + .../openapi/models/recaster-viewer-context.ts | 36 + src/neynar-api/v1/openapi/models/recaster.ts | 87 + .../openapi/models/recent-casts-response.ts | 33 + .../models/recent-users-response-result.ts | 42 + .../openapi/models/recent-users-response.ts | 33 + .../models/user-cast-like-response-result.ts | 51 + .../openapi/models/user-cast-like-response.ts | 33 + src/neynar-api/v1/openapi/models/user-pfp.ts | 30 + .../v1/openapi/models/user-profile-bio.ts | 36 + .../v1/openapi/models/user-profile.ts | 33 + .../v1/openapi/models/user-response-result.ts | 33 + .../v1/openapi/models/user-response.ts | 33 + src/neynar-api/v1/openapi/models/user.ts | 93 + .../models/verification-response-result.ts | 48 + .../openapi/models/verification-response.ts | 33 + .../v1/openapi/models/viewer-context.ts | 48 + .../.openapi-generator/FILES | 266 + src/neynar-api/v2/openapi-farcaster/api.ts | 16016 +--------------- .../v2/openapi-farcaster/apis/action-api.ts | 136 + .../v2/openapi-farcaster/apis/ban-api.ts | 297 + .../v2/openapi-farcaster/apis/block-api.ts | 161 + .../v2/openapi-farcaster/apis/cast-api.ts | 800 + .../v2/openapi-farcaster/apis/channel-api.ts | 1692 ++ .../v2/openapi-farcaster/apis/feed-api.ts | 1260 ++ .../v2/openapi-farcaster/apis/fname-api.ts | 139 + .../v2/openapi-farcaster/apis/follows-api.ts | 460 + .../v2/openapi-farcaster/apis/frame-api.ts | 966 + .../v2/openapi-farcaster/apis/mute-api.ts | 307 + .../apis/notifications-api.ts | 445 + .../v2/openapi-farcaster/apis/reaction-api.ts | 438 + .../v2/openapi-farcaster/apis/signer-api.ts | 596 + .../v2/openapi-farcaster/apis/storage-api.ts | 296 + .../openapi-farcaster/apis/subscribers-api.ts | 343 + .../v2/openapi-farcaster/apis/user-api.ts | 1273 ++ .../v2/openapi-farcaster/apis/webhook-api.ts | 510 + src/neynar-api/v2/openapi-farcaster/index.ts | 2 +- .../models/add-verification-req-body.ts | 68 + .../models/authorization-url-response-type.ts | 30 + .../models/authorization-url-response.ts | 30 + .../models/ban-list-response.ts | 42 + .../v2/openapi-farcaster/models/ban-record.ts | 52 + .../openapi-farcaster/models/ban-req-body.ts | 30 + .../openapi-farcaster/models/ban-response.ts | 36 + .../models/block-list-response.ts | 42 + .../openapi-farcaster/models/block-record.ts | 58 + .../models/bulk-casts-response.ts | 33 + .../models/bulk-follow-response.ts | 39 + .../models/bulk-users-response.ts | 33 + .../models/buy-storage-req-body.ts | 42 + ...ions-list-response-actions-inner-action.ts | 36 + ...ser-actions-list-response-actions-inner.ts | 105 + .../cast-composer-actions-list-response.ts | 42 + .../models/cast-composer-type.ts | 31 + .../models/cast-conversation-sort-type.ts | 32 + .../models/cast-dehydrated.ts | 52 + .../models/cast-embedded-parent-author.ts | 30 + .../openapi-farcaster/models/cast-embedded.ts | 107 + .../v2/openapi-farcaster/models/cast-id.ts | 36 + .../models/cast-notification-type.ts | 31 + .../models/cast-param-type.ts | 31 + .../openapi-farcaster/models/cast-response.ts | 33 + .../models/cast-viewer-context.ts | 36 + .../models/cast-with-interactions-all-of.ts | 93 + ...h-interactions-and-conversations-all-of.ts | 33 + ...teractions-and-conversations-ref-all-of.ts | 30 + ...with-interactions-and-conversations-ref.ts | 60 + ...ast-with-interactions-and-conversations.ts | 62 + .../cast-with-interactions-reactions.ts | 54 + .../models/cast-with-interactions-replies.ts | 30 + .../models/cast-with-interactions.ts | 59 + .../v2/openapi-farcaster/models/cast.ts | 98 + .../models/casts-response-result.ts | 33 + .../models/casts-response.ts | 33 + .../models/casts-search-response-result.ts | 42 + .../models/casts-search-response.ts | 33 + .../models/channel-activity.ts | 64 + .../models/channel-external-link.ts | 36 + .../models/channel-follow-req-body.ts | 36 + .../models/channel-list-response.ts | 42 + .../models/channel-member-channel.ts | 38 + .../channel-member-invite-list-response.ts | 42 + .../models/channel-member-invite.ts | 56 + .../models/channel-member-list-response.ts | 42 + .../models/channel-member-role.ts | 31 + .../models/channel-member-user.ts | 41 + .../models/channel-member.ts | 64 + .../models/channel-or-dehydrated-channel.ts | 38 + .../models/channel-response-bulk.ts | 33 + .../models/channel-response.ts | 33 + .../models/channel-search-response.ts | 42 + .../openapi-farcaster/models/channel-type.ts | 31 + .../models/channel-user-context.ts | 41 + .../models/channel-viewer-context.ts | 30 + .../v2/openapi-farcaster/models/channel.ts | 143 + .../models/conflict-error-res.ts | 48 + .../models/conversation-conversation.ts | 42 + .../openapi-farcaster/models/conversation.ts | 42 + .../models/dehydrated-channel.ts | 64 + .../models/dehydrated-follower.ts | 46 + .../models/delete-cast-req-body.ts | 36 + .../models/delete-frame-response.ts | 36 + .../models/delete-neynar-frame-request.ts | 30 + .../models/developer-managed-signer.ts | 57 + .../models/embed-cast-deep.ts | 43 + .../v2/openapi-farcaster/models/embed-cast.ts | 43 + .../v2/openapi-farcaster/models/embed-deep.ts | 38 + .../v2/openapi-farcaster/models/embed-type.ts | 47 + .../embed-url-metadata-html-all-of-oembed.ts | 35 + .../models/embed-url-metadata-html-all-of.ts | 33 + .../models/embed-url-metadata-html.ts | 38 + .../models/embed-url-metadata-image.ts | 36 + .../embed-url-metadata-video-stream-inner.ts | 42 + .../models/embed-url-metadata-video.ts | 39 + .../models/embed-url-metadata.ts | 69 + .../v2/openapi-farcaster/models/embed-url.ts | 39 + .../v2/openapi-farcaster/models/embed.ts | 38 + .../v2/openapi-farcaster/models/error-res.ts | 48 + .../farcaster-action-req-body-action.ts | 36 + .../models/farcaster-action-req-body.ts | 45 + .../models/feed-for-you400-response.ts | 32 + .../openapi-farcaster/models/feed-response.ts | 42 + .../models/feed-trending-provider.ts | 32 + .../v2/openapi-farcaster/models/feed-type.ts | 31 + .../openapi-farcaster/models/filter-type.ts | 35 + .../models/fname-availability-response.ts | 30 + .../models/follow-req-body.ts | 36 + .../models/follow-response.ts | 42 + .../models/follow-sort-type.ts | 31 + .../v2/openapi-farcaster/models/follow.ts | 46 + .../models/followers-response.ts | 42 + .../models/for-you-provider.ts | 32 + .../models/frame-action-button.ts | 59 + .../models/frame-action-req-body.ts | 45 + .../openapi-farcaster/models/frame-action.ts | 96 + .../models/frame-button-action-type.ts | 32 + ...frame-developer-managed-action-req-body.ts | 48 + .../models/frame-from-url200-response.ts | 33 + .../openapi-farcaster/models/frame-input.ts | 30 + .../frame-signature-packet-trusted-data.ts | 30 + .../frame-signature-packet-untrusted-data.ts | 93 + .../models/frame-signature-packet.ts | 42 + .../openapi-farcaster/models/frame-state.ts | 30 + .../models/frame-transaction.ts | 30 + .../v2/openapi-farcaster/models/frame-type.ts | 31 + ...-analytics-input-text-input-texts-inner.ts | 42 + .../frame-validate-analytics-input-text.ts | 33 + ...ns-per-cast-interactions-per-cast-inner.ts | 54 + ...alidate-analytics-interactions-per-cast.ts | 33 + ...analytics-interactors-interactors-inner.ts | 42 + .../frame-validate-analytics-interactors.ts | 33 + .../frame-validate-analytics-response.ts | 44 + ...me-validate-analytics-total-interactors.ts | 30 + .../models/frame-validate-list-response.ts | 30 + .../v2/openapi-farcaster/models/frame.ts | 87 + .../models/hydrated-follower.ts | 46 + .../openapi-farcaster/models/image-object.ts | 54 + .../v2/openapi-farcaster/models/index.ts | 248 + .../models/individual-hash-obj.ts | 30 + .../models/location-address.ts | 54 + .../v2/openapi-farcaster/models/location.ts | 45 + .../mark-notifications-as-seen-req-body.ts | 41 + .../models/mute-list-response.ts | 42 + .../openapi-farcaster/models/mute-record.ts | 52 + .../openapi-farcaster/models/mute-req-body.ts | 36 + .../openapi-farcaster/models/mute-response.ts | 36 + .../openapi-farcaster/models/next-cursor.ts | 30 + .../models/neynar-frame-creation-request.ts | 39 + .../models/neynar-frame-page.ts | 69 + .../models/neynar-frame-update-request.ts | 45 + .../openapi-farcaster/models/neynar-frame.ts | 57 + .../models/neynar-next-frame-page-mint-url.ts | 30 + .../models/neynar-next-frame-page-redirect.ts | 30 + .../models/neynar-next-frame-page.ts | 30 + .../models/neynar-page-button-next-page.ts | 32 + .../models/neynar-page-button.ts | 61 + .../models/neynar-page-image.ts | 44 + .../models/neynar-page-input-text.ts | 36 + .../models/neynar-page-input.ts | 33 + .../models/notification-type.ts | 34 + .../openapi-farcaster/models/notification.ts | 92 + .../models/notifications-response.ts | 48 + .../openapi-farcaster/models/oembed-data.ts | 90 + .../models/oembed-link-data-all-of.ts | 37 + .../models/oembed-link-data.ts | 29 + .../models/oembed-photo-data-all-of.ts | 55 + .../models/oembed-photo-data.ts | 29 + .../models/oembed-rich-data-all-of.ts | 55 + .../models/oembed-rich-data.ts | 29 + .../models/oembed-video-data-all-of.ts | 55 + .../models/oembed-video-data.ts | 29 + .../v2/openapi-farcaster/models/og-object.ts | 324 + .../models/operation-response.ts | 36 + ...cast-req-body-embeds-cast-id-properties.ts | 36 + .../models/post-cast-req-body-embeds.ts | 45 + .../models/post-cast-req-body.ts | 69 + .../models/post-cast-response-cast.ts | 45 + .../models/post-cast-response.ts | 39 + .../models/profile-url-pfp.ts | 30 + .../openapi-farcaster/models/profile-url.ts | 33 + .../models/reaction-for-cast.ts | 65 + .../openapi-farcaster/models/reaction-like.ts | 30 + .../models/reaction-recast.ts | 36 + .../models/reaction-req-body.ts | 59 + .../openapi-farcaster/models/reaction-type.ts | 31 + .../models/reaction-with-cast-info.ts | 74 + .../models/reaction-with-user-info.ts | 56 + .../models/reactions-cast-response.ts | 42 + .../models/reactions-response.ts | 42 + .../models/reactions-type.ts | 32 + ...r-developer-managed-signed-key-req-body.ts | 63 + .../models/register-signer-key-req-body.ts | 63 + .../models/register-user-req-body.ts | 54 + .../models/register-user-response.ts | 52 + .../models/relevant-followers-response.ts | 42 + .../models/remove-channel-member-request.ts | 53 + .../models/remove-verification-req-body.ts | 36 + .../models/respond-channel-invite-request.ts | 53 + .../openapi-farcaster/models/searched-user.ts | 142 + .../models/signed-key-request-sponsor.ts | 42 + .../v2/openapi-farcaster/models/signer.ts | 64 + .../models/storage-allocation.ts | 57 + .../models/storage-allocations-response.ts | 39 + .../models/storage-object.ts | 42 + .../models/storage-usage-response.ts | 84 + .../models/subscribed-to-all-of.ts | 54 + .../models/subscribed-to-object.ts | 72 + .../models/subscribed-to-response.ts | 33 + .../openapi-farcaster/models/subscribed-to.ts | 44 + .../v2/openapi-farcaster/models/subscriber.ts | 48 + .../models/subscribers-response.ts | 33 + .../models/subscription-metadata.ts | 42 + .../models/subscription-price.ts | 42 + .../models/subscription-provider.ts | 30 + .../models/subscription-providers.ts | 31 + .../models/subscription-status.ts | 64 + .../models/subscription-tier-price.ts | 42 + .../models/subscription-tier.ts | 39 + .../models/subscription-token.ts | 48 + .../openapi-farcaster/models/subscription.ts | 96 + .../models/subscriptions-response.ts | 33 + .../openapi-farcaster/models/subscriptions.ts | 39 + .../models/trending-channel-response.ts | 42 + .../models/update-user-req-body-location.ts | 36 + .../models/update-user-req-body.ts | 69 + .../models/user-dehydrated.ts | 61 + .../models/user-fidresponse.ts | 30 + .../models/user-power-lite-response-result.ts | 30 + .../models/user-power-lite-response.ts | 33 + .../models/user-profile-bio.ts | 36 + .../openapi-farcaster/models/user-profile.ts | 42 + .../openapi-farcaster/models/user-response.ts | 33 + .../models/user-search-response-result.ts | 42 + .../models/user-search-response.ts | 33 + .../models/user-verified-accounts-inner.ts | 43 + .../models/user-verified-addresses.ts | 36 + .../models/user-viewer-context.ts | 48 + .../v2/openapi-farcaster/models/user.ts | 127 + .../models/users-active-channels-response.ts | 42 + .../models/users-response.ts | 42 + .../models/validate-frame-action-response.ts | 39 + .../models/validate-frame-analytics-type.ts | 33 + .../models/validate-frame-request.ts | 54 + .../models/validated-frame-action-signer.ts | 33 + .../validated-frame-action-tapped-button.ts | 30 + .../models/validated-frame-action.ts | 118 + .../models/verification-chain-id.ts | 32 + .../models/verification-type.ts | 31 + .../openapi-farcaster/models/video-object.ts | 48 + .../models/webhook-delete-req-body.ts | 30 + .../models/webhook-list-response.ts | 33 + .../models/webhook-patch-req-body.ts | 44 + .../models/webhook-post-req-body.ts | 45 + .../models/webhook-put-req-body-all-of.ts | 30 + .../models/webhook-put-req-body.ts | 32 + .../models/webhook-response.ts | 45 + .../models/webhook-secret.ts | 60 + .../webhook-subscription-filters-cast.ts | 78 + .../webhook-subscription-filters-follow.ts | 36 + .../webhook-subscription-filters-reaction.ts | 36 + ...bhook-subscription-filters-user-updated.ts | 30 + .../models/webhook-subscription-filters.ts | 84 + .../models/webhook-subscription.ts | 64 + .../v2/openapi-farcaster/models/webhook.ts | 127 + .../models/zod-error-errors-inner.ts | 54 + .../v2/openapi-farcaster/models/zod-error.ts | 45 + .../v2/openapi-stp/.openapi-generator/FILES | 7 + src/neynar-api/v2/openapi-stp/api.ts | 294 +- src/neynar-api/v2/openapi-stp/apis/stpapi.ts | 159 + src/neynar-api/v2/openapi-stp/index.ts | 2 +- .../openapi-stp/models/conflict-error-res.ts | 48 + .../v2/openapi-stp/models/error-res.ts | 48 + src/neynar-api/v2/openapi-stp/models/index.ts | 5 + .../openapi-stp/models/subscription-status.ts | 64 + .../models/subscription-tier-price.ts | 42 + .../openapi-stp/models/subscription-tier.ts | 39 + 353 files changed, 27264 insertions(+), 19322 deletions(-) create mode 100644 src/neynar-api/v1/openapi/apis/cast-api.ts create mode 100644 src/neynar-api/v1/openapi/apis/follows-api.ts create mode 100644 src/neynar-api/v1/openapi/apis/notifications-api.ts create mode 100644 src/neynar-api/v1/openapi/apis/user-api.ts create mode 100644 src/neynar-api/v1/openapi/apis/verification-api.ts create mode 100644 src/neynar-api/v1/openapi/models/all-casts-in-thread-response-result.ts create mode 100644 src/neynar-api/v1/openapi/models/all-casts-in-thread-response.ts create mode 100644 src/neynar-api/v1/openapi/models/cast-author-one-of.ts create mode 100644 src/neynar-api/v1/openapi/models/cast-author.ts create mode 100644 src/neynar-api/v1/openapi/models/cast-likes-response-result.ts create mode 100644 src/neynar-api/v1/openapi/models/cast-likes-response.ts create mode 100644 src/neynar-api/v1/openapi/models/cast-parent-author-all-of.ts create mode 100644 src/neynar-api/v1/openapi/models/cast-parent-author.ts create mode 100644 src/neynar-api/v1/openapi/models/cast-reactions-response-result.ts create mode 100644 src/neynar-api/v1/openapi/models/cast-reactions-response.ts create mode 100644 src/neynar-api/v1/openapi/models/cast-recaster-response-result.ts create mode 100644 src/neynar-api/v1/openapi/models/cast-recaster-response.ts create mode 100644 src/neynar-api/v1/openapi/models/cast-response-result.ts create mode 100644 src/neynar-api/v1/openapi/models/cast-response.ts create mode 100644 src/neynar-api/v1/openapi/models/cast-type.ts create mode 100644 src/neynar-api/v1/openapi/models/cast-with-interactions-all-of.ts create mode 100644 src/neynar-api/v1/openapi/models/cast-with-interactions-reactions.ts create mode 100644 src/neynar-api/v1/openapi/models/cast-with-interactions-recasts.ts create mode 100644 src/neynar-api/v1/openapi/models/cast-with-interactions-replies.ts create mode 100644 src/neynar-api/v1/openapi/models/cast-with-interactions.ts create mode 100644 src/neynar-api/v1/openapi/models/cast.ts create mode 100644 src/neynar-api/v1/openapi/models/casts-response-result.ts create mode 100644 src/neynar-api/v1/openapi/models/casts-response.ts create mode 100644 src/neynar-api/v1/openapi/models/custody-address-response-result.ts create mode 100644 src/neynar-api/v1/openapi/models/custody-address-response.ts create mode 100644 src/neynar-api/v1/openapi/models/embed-url.ts create mode 100644 src/neynar-api/v1/openapi/models/error-res.ts create mode 100644 src/neynar-api/v1/openapi/models/follow-response-result.ts create mode 100644 src/neynar-api/v1/openapi/models/follow-response-user-all-of.ts create mode 100644 src/neynar-api/v1/openapi/models/follow-response-user.ts create mode 100644 src/neynar-api/v1/openapi/models/follow-response.ts create mode 100644 src/neynar-api/v1/openapi/models/index.ts create mode 100644 src/neynar-api/v1/openapi/models/mentions-and-replies-response-result.ts create mode 100644 src/neynar-api/v1/openapi/models/mentions-and-replies-response.ts create mode 100644 src/neynar-api/v1/openapi/models/next-cursor.ts create mode 100644 src/neynar-api/v1/openapi/models/reaction-type.ts create mode 100644 src/neynar-api/v1/openapi/models/reaction-with-cast-meta-cast.ts create mode 100644 src/neynar-api/v1/openapi/models/reaction-with-cast-meta-reaction.ts create mode 100644 src/neynar-api/v1/openapi/models/reaction-with-cast-meta.ts create mode 100644 src/neynar-api/v1/openapi/models/reaction.ts create mode 100644 src/neynar-api/v1/openapi/models/reactions-and-recasts-notification-all-of.ts create mode 100644 src/neynar-api/v1/openapi/models/reactions-and-recasts-notification.ts create mode 100644 src/neynar-api/v1/openapi/models/reactions-and-recasts-response-result.ts create mode 100644 src/neynar-api/v1/openapi/models/reactions-and-recasts-response.ts create mode 100644 src/neynar-api/v1/openapi/models/reactor-pfp.ts create mode 100644 src/neynar-api/v1/openapi/models/reactor-viewer-context.ts create mode 100644 src/neynar-api/v1/openapi/models/reactor.ts create mode 100644 src/neynar-api/v1/openapi/models/recaster-pfp.ts create mode 100644 src/neynar-api/v1/openapi/models/recaster-profile-bio.ts create mode 100644 src/neynar-api/v1/openapi/models/recaster-profile.ts create mode 100644 src/neynar-api/v1/openapi/models/recaster-viewer-context.ts create mode 100644 src/neynar-api/v1/openapi/models/recaster.ts create mode 100644 src/neynar-api/v1/openapi/models/recent-casts-response.ts create mode 100644 src/neynar-api/v1/openapi/models/recent-users-response-result.ts create mode 100644 src/neynar-api/v1/openapi/models/recent-users-response.ts create mode 100644 src/neynar-api/v1/openapi/models/user-cast-like-response-result.ts create mode 100644 src/neynar-api/v1/openapi/models/user-cast-like-response.ts create mode 100644 src/neynar-api/v1/openapi/models/user-pfp.ts create mode 100644 src/neynar-api/v1/openapi/models/user-profile-bio.ts create mode 100644 src/neynar-api/v1/openapi/models/user-profile.ts create mode 100644 src/neynar-api/v1/openapi/models/user-response-result.ts create mode 100644 src/neynar-api/v1/openapi/models/user-response.ts create mode 100644 src/neynar-api/v1/openapi/models/user.ts create mode 100644 src/neynar-api/v1/openapi/models/verification-response-result.ts create mode 100644 src/neynar-api/v1/openapi/models/verification-response.ts create mode 100644 src/neynar-api/v1/openapi/models/viewer-context.ts create mode 100644 src/neynar-api/v2/openapi-farcaster/apis/action-api.ts create mode 100644 src/neynar-api/v2/openapi-farcaster/apis/ban-api.ts create mode 100644 src/neynar-api/v2/openapi-farcaster/apis/block-api.ts create mode 100644 src/neynar-api/v2/openapi-farcaster/apis/cast-api.ts create mode 100644 src/neynar-api/v2/openapi-farcaster/apis/channel-api.ts create mode 100644 src/neynar-api/v2/openapi-farcaster/apis/feed-api.ts create mode 100644 src/neynar-api/v2/openapi-farcaster/apis/fname-api.ts create mode 100644 src/neynar-api/v2/openapi-farcaster/apis/follows-api.ts create mode 100644 src/neynar-api/v2/openapi-farcaster/apis/frame-api.ts create mode 100644 src/neynar-api/v2/openapi-farcaster/apis/mute-api.ts create mode 100644 src/neynar-api/v2/openapi-farcaster/apis/notifications-api.ts create mode 100644 src/neynar-api/v2/openapi-farcaster/apis/reaction-api.ts create mode 100644 src/neynar-api/v2/openapi-farcaster/apis/signer-api.ts create mode 100644 src/neynar-api/v2/openapi-farcaster/apis/storage-api.ts create mode 100644 src/neynar-api/v2/openapi-farcaster/apis/subscribers-api.ts create mode 100644 src/neynar-api/v2/openapi-farcaster/apis/user-api.ts create mode 100644 src/neynar-api/v2/openapi-farcaster/apis/webhook-api.ts create mode 100644 src/neynar-api/v2/openapi-farcaster/models/add-verification-req-body.ts create mode 100644 src/neynar-api/v2/openapi-farcaster/models/authorization-url-response-type.ts create mode 100644 src/neynar-api/v2/openapi-farcaster/models/authorization-url-response.ts create mode 100644 src/neynar-api/v2/openapi-farcaster/models/ban-list-response.ts create mode 100644 src/neynar-api/v2/openapi-farcaster/models/ban-record.ts create mode 100644 src/neynar-api/v2/openapi-farcaster/models/ban-req-body.ts create mode 100644 src/neynar-api/v2/openapi-farcaster/models/ban-response.ts create mode 100644 src/neynar-api/v2/openapi-farcaster/models/block-list-response.ts create mode 100644 src/neynar-api/v2/openapi-farcaster/models/block-record.ts create mode 100644 src/neynar-api/v2/openapi-farcaster/models/bulk-casts-response.ts create mode 100644 src/neynar-api/v2/openapi-farcaster/models/bulk-follow-response.ts create mode 100644 src/neynar-api/v2/openapi-farcaster/models/bulk-users-response.ts create mode 100644 src/neynar-api/v2/openapi-farcaster/models/buy-storage-req-body.ts create mode 100644 src/neynar-api/v2/openapi-farcaster/models/cast-composer-actions-list-response-actions-inner-action.ts create mode 100644 src/neynar-api/v2/openapi-farcaster/models/cast-composer-actions-list-response-actions-inner.ts create mode 100644 src/neynar-api/v2/openapi-farcaster/models/cast-composer-actions-list-response.ts create mode 100644 src/neynar-api/v2/openapi-farcaster/models/cast-composer-type.ts create mode 100644 src/neynar-api/v2/openapi-farcaster/models/cast-conversation-sort-type.ts create mode 100644 src/neynar-api/v2/openapi-farcaster/models/cast-dehydrated.ts create mode 100644 src/neynar-api/v2/openapi-farcaster/models/cast-embedded-parent-author.ts create mode 100644 src/neynar-api/v2/openapi-farcaster/models/cast-embedded.ts create mode 100644 src/neynar-api/v2/openapi-farcaster/models/cast-id.ts create mode 100644 src/neynar-api/v2/openapi-farcaster/models/cast-notification-type.ts create mode 100644 src/neynar-api/v2/openapi-farcaster/models/cast-param-type.ts create mode 100644 src/neynar-api/v2/openapi-farcaster/models/cast-response.ts create mode 100644 src/neynar-api/v2/openapi-farcaster/models/cast-viewer-context.ts create mode 100644 src/neynar-api/v2/openapi-farcaster/models/cast-with-interactions-all-of.ts create mode 100644 src/neynar-api/v2/openapi-farcaster/models/cast-with-interactions-and-conversations-all-of.ts create mode 100644 src/neynar-api/v2/openapi-farcaster/models/cast-with-interactions-and-conversations-ref-all-of.ts create mode 100644 src/neynar-api/v2/openapi-farcaster/models/cast-with-interactions-and-conversations-ref.ts create mode 100644 src/neynar-api/v2/openapi-farcaster/models/cast-with-interactions-and-conversations.ts create mode 100644 src/neynar-api/v2/openapi-farcaster/models/cast-with-interactions-reactions.ts create mode 100644 src/neynar-api/v2/openapi-farcaster/models/cast-with-interactions-replies.ts create mode 100644 src/neynar-api/v2/openapi-farcaster/models/cast-with-interactions.ts create mode 100644 src/neynar-api/v2/openapi-farcaster/models/cast.ts create mode 100644 src/neynar-api/v2/openapi-farcaster/models/casts-response-result.ts create mode 100644 src/neynar-api/v2/openapi-farcaster/models/casts-response.ts create mode 100644 src/neynar-api/v2/openapi-farcaster/models/casts-search-response-result.ts create mode 100644 src/neynar-api/v2/openapi-farcaster/models/casts-search-response.ts create mode 100644 src/neynar-api/v2/openapi-farcaster/models/channel-activity.ts create mode 100644 src/neynar-api/v2/openapi-farcaster/models/channel-external-link.ts create mode 100644 src/neynar-api/v2/openapi-farcaster/models/channel-follow-req-body.ts create mode 100644 src/neynar-api/v2/openapi-farcaster/models/channel-list-response.ts create mode 100644 src/neynar-api/v2/openapi-farcaster/models/channel-member-channel.ts create mode 100644 src/neynar-api/v2/openapi-farcaster/models/channel-member-invite-list-response.ts create mode 100644 src/neynar-api/v2/openapi-farcaster/models/channel-member-invite.ts create mode 100644 src/neynar-api/v2/openapi-farcaster/models/channel-member-list-response.ts create mode 100644 src/neynar-api/v2/openapi-farcaster/models/channel-member-role.ts create mode 100644 src/neynar-api/v2/openapi-farcaster/models/channel-member-user.ts create mode 100644 src/neynar-api/v2/openapi-farcaster/models/channel-member.ts create mode 100644 src/neynar-api/v2/openapi-farcaster/models/channel-or-dehydrated-channel.ts create mode 100644 src/neynar-api/v2/openapi-farcaster/models/channel-response-bulk.ts create mode 100644 src/neynar-api/v2/openapi-farcaster/models/channel-response.ts create mode 100644 src/neynar-api/v2/openapi-farcaster/models/channel-search-response.ts create mode 100644 src/neynar-api/v2/openapi-farcaster/models/channel-type.ts create mode 100644 src/neynar-api/v2/openapi-farcaster/models/channel-user-context.ts create mode 100644 src/neynar-api/v2/openapi-farcaster/models/channel-viewer-context.ts create mode 100644 src/neynar-api/v2/openapi-farcaster/models/channel.ts create mode 100644 src/neynar-api/v2/openapi-farcaster/models/conflict-error-res.ts create mode 100644 src/neynar-api/v2/openapi-farcaster/models/conversation-conversation.ts create mode 100644 src/neynar-api/v2/openapi-farcaster/models/conversation.ts create mode 100644 src/neynar-api/v2/openapi-farcaster/models/dehydrated-channel.ts create mode 100644 src/neynar-api/v2/openapi-farcaster/models/dehydrated-follower.ts create mode 100644 src/neynar-api/v2/openapi-farcaster/models/delete-cast-req-body.ts create mode 100644 src/neynar-api/v2/openapi-farcaster/models/delete-frame-response.ts create mode 100644 src/neynar-api/v2/openapi-farcaster/models/delete-neynar-frame-request.ts create mode 100644 src/neynar-api/v2/openapi-farcaster/models/developer-managed-signer.ts create mode 100644 src/neynar-api/v2/openapi-farcaster/models/embed-cast-deep.ts create mode 100644 src/neynar-api/v2/openapi-farcaster/models/embed-cast.ts create mode 100644 src/neynar-api/v2/openapi-farcaster/models/embed-deep.ts create mode 100644 src/neynar-api/v2/openapi-farcaster/models/embed-type.ts create mode 100644 src/neynar-api/v2/openapi-farcaster/models/embed-url-metadata-html-all-of-oembed.ts create mode 100644 src/neynar-api/v2/openapi-farcaster/models/embed-url-metadata-html-all-of.ts create mode 100644 src/neynar-api/v2/openapi-farcaster/models/embed-url-metadata-html.ts create mode 100644 src/neynar-api/v2/openapi-farcaster/models/embed-url-metadata-image.ts create mode 100644 src/neynar-api/v2/openapi-farcaster/models/embed-url-metadata-video-stream-inner.ts create mode 100644 src/neynar-api/v2/openapi-farcaster/models/embed-url-metadata-video.ts create mode 100644 src/neynar-api/v2/openapi-farcaster/models/embed-url-metadata.ts create mode 100644 src/neynar-api/v2/openapi-farcaster/models/embed-url.ts create mode 100644 src/neynar-api/v2/openapi-farcaster/models/embed.ts create mode 100644 src/neynar-api/v2/openapi-farcaster/models/error-res.ts create mode 100644 src/neynar-api/v2/openapi-farcaster/models/farcaster-action-req-body-action.ts create mode 100644 src/neynar-api/v2/openapi-farcaster/models/farcaster-action-req-body.ts create mode 100644 src/neynar-api/v2/openapi-farcaster/models/feed-for-you400-response.ts create mode 100644 src/neynar-api/v2/openapi-farcaster/models/feed-response.ts create mode 100644 src/neynar-api/v2/openapi-farcaster/models/feed-trending-provider.ts create mode 100644 src/neynar-api/v2/openapi-farcaster/models/feed-type.ts create mode 100644 src/neynar-api/v2/openapi-farcaster/models/filter-type.ts create mode 100644 src/neynar-api/v2/openapi-farcaster/models/fname-availability-response.ts create mode 100644 src/neynar-api/v2/openapi-farcaster/models/follow-req-body.ts create mode 100644 src/neynar-api/v2/openapi-farcaster/models/follow-response.ts create mode 100644 src/neynar-api/v2/openapi-farcaster/models/follow-sort-type.ts create mode 100644 src/neynar-api/v2/openapi-farcaster/models/follow.ts create mode 100644 src/neynar-api/v2/openapi-farcaster/models/followers-response.ts create mode 100644 src/neynar-api/v2/openapi-farcaster/models/for-you-provider.ts create mode 100644 src/neynar-api/v2/openapi-farcaster/models/frame-action-button.ts create mode 100644 src/neynar-api/v2/openapi-farcaster/models/frame-action-req-body.ts create mode 100644 src/neynar-api/v2/openapi-farcaster/models/frame-action.ts create mode 100644 src/neynar-api/v2/openapi-farcaster/models/frame-button-action-type.ts create mode 100644 src/neynar-api/v2/openapi-farcaster/models/frame-developer-managed-action-req-body.ts create mode 100644 src/neynar-api/v2/openapi-farcaster/models/frame-from-url200-response.ts create mode 100644 src/neynar-api/v2/openapi-farcaster/models/frame-input.ts create mode 100644 src/neynar-api/v2/openapi-farcaster/models/frame-signature-packet-trusted-data.ts create mode 100644 src/neynar-api/v2/openapi-farcaster/models/frame-signature-packet-untrusted-data.ts create mode 100644 src/neynar-api/v2/openapi-farcaster/models/frame-signature-packet.ts create mode 100644 src/neynar-api/v2/openapi-farcaster/models/frame-state.ts create mode 100644 src/neynar-api/v2/openapi-farcaster/models/frame-transaction.ts create mode 100644 src/neynar-api/v2/openapi-farcaster/models/frame-type.ts create mode 100644 src/neynar-api/v2/openapi-farcaster/models/frame-validate-analytics-input-text-input-texts-inner.ts create mode 100644 src/neynar-api/v2/openapi-farcaster/models/frame-validate-analytics-input-text.ts create mode 100644 src/neynar-api/v2/openapi-farcaster/models/frame-validate-analytics-interactions-per-cast-interactions-per-cast-inner.ts create mode 100644 src/neynar-api/v2/openapi-farcaster/models/frame-validate-analytics-interactions-per-cast.ts create mode 100644 src/neynar-api/v2/openapi-farcaster/models/frame-validate-analytics-interactors-interactors-inner.ts create mode 100644 src/neynar-api/v2/openapi-farcaster/models/frame-validate-analytics-interactors.ts create mode 100644 src/neynar-api/v2/openapi-farcaster/models/frame-validate-analytics-response.ts create mode 100644 src/neynar-api/v2/openapi-farcaster/models/frame-validate-analytics-total-interactors.ts create mode 100644 src/neynar-api/v2/openapi-farcaster/models/frame-validate-list-response.ts create mode 100644 src/neynar-api/v2/openapi-farcaster/models/frame.ts create mode 100644 src/neynar-api/v2/openapi-farcaster/models/hydrated-follower.ts create mode 100644 src/neynar-api/v2/openapi-farcaster/models/image-object.ts create mode 100644 src/neynar-api/v2/openapi-farcaster/models/index.ts create mode 100644 src/neynar-api/v2/openapi-farcaster/models/individual-hash-obj.ts create mode 100644 src/neynar-api/v2/openapi-farcaster/models/location-address.ts create mode 100644 src/neynar-api/v2/openapi-farcaster/models/location.ts create mode 100644 src/neynar-api/v2/openapi-farcaster/models/mark-notifications-as-seen-req-body.ts create mode 100644 src/neynar-api/v2/openapi-farcaster/models/mute-list-response.ts create mode 100644 src/neynar-api/v2/openapi-farcaster/models/mute-record.ts create mode 100644 src/neynar-api/v2/openapi-farcaster/models/mute-req-body.ts create mode 100644 src/neynar-api/v2/openapi-farcaster/models/mute-response.ts create mode 100644 src/neynar-api/v2/openapi-farcaster/models/next-cursor.ts create mode 100644 src/neynar-api/v2/openapi-farcaster/models/neynar-frame-creation-request.ts create mode 100644 src/neynar-api/v2/openapi-farcaster/models/neynar-frame-page.ts create mode 100644 src/neynar-api/v2/openapi-farcaster/models/neynar-frame-update-request.ts create mode 100644 src/neynar-api/v2/openapi-farcaster/models/neynar-frame.ts create mode 100644 src/neynar-api/v2/openapi-farcaster/models/neynar-next-frame-page-mint-url.ts create mode 100644 src/neynar-api/v2/openapi-farcaster/models/neynar-next-frame-page-redirect.ts create mode 100644 src/neynar-api/v2/openapi-farcaster/models/neynar-next-frame-page.ts create mode 100644 src/neynar-api/v2/openapi-farcaster/models/neynar-page-button-next-page.ts create mode 100644 src/neynar-api/v2/openapi-farcaster/models/neynar-page-button.ts create mode 100644 src/neynar-api/v2/openapi-farcaster/models/neynar-page-image.ts create mode 100644 src/neynar-api/v2/openapi-farcaster/models/neynar-page-input-text.ts create mode 100644 src/neynar-api/v2/openapi-farcaster/models/neynar-page-input.ts create mode 100644 src/neynar-api/v2/openapi-farcaster/models/notification-type.ts create mode 100644 src/neynar-api/v2/openapi-farcaster/models/notification.ts create mode 100644 src/neynar-api/v2/openapi-farcaster/models/notifications-response.ts create mode 100644 src/neynar-api/v2/openapi-farcaster/models/oembed-data.ts create mode 100644 src/neynar-api/v2/openapi-farcaster/models/oembed-link-data-all-of.ts create mode 100644 src/neynar-api/v2/openapi-farcaster/models/oembed-link-data.ts create mode 100644 src/neynar-api/v2/openapi-farcaster/models/oembed-photo-data-all-of.ts create mode 100644 src/neynar-api/v2/openapi-farcaster/models/oembed-photo-data.ts create mode 100644 src/neynar-api/v2/openapi-farcaster/models/oembed-rich-data-all-of.ts create mode 100644 src/neynar-api/v2/openapi-farcaster/models/oembed-rich-data.ts create mode 100644 src/neynar-api/v2/openapi-farcaster/models/oembed-video-data-all-of.ts create mode 100644 src/neynar-api/v2/openapi-farcaster/models/oembed-video-data.ts create mode 100644 src/neynar-api/v2/openapi-farcaster/models/og-object.ts create mode 100644 src/neynar-api/v2/openapi-farcaster/models/operation-response.ts create mode 100644 src/neynar-api/v2/openapi-farcaster/models/post-cast-req-body-embeds-cast-id-properties.ts create mode 100644 src/neynar-api/v2/openapi-farcaster/models/post-cast-req-body-embeds.ts create mode 100644 src/neynar-api/v2/openapi-farcaster/models/post-cast-req-body.ts create mode 100644 src/neynar-api/v2/openapi-farcaster/models/post-cast-response-cast.ts create mode 100644 src/neynar-api/v2/openapi-farcaster/models/post-cast-response.ts create mode 100644 src/neynar-api/v2/openapi-farcaster/models/profile-url-pfp.ts create mode 100644 src/neynar-api/v2/openapi-farcaster/models/profile-url.ts create mode 100644 src/neynar-api/v2/openapi-farcaster/models/reaction-for-cast.ts create mode 100644 src/neynar-api/v2/openapi-farcaster/models/reaction-like.ts create mode 100644 src/neynar-api/v2/openapi-farcaster/models/reaction-recast.ts create mode 100644 src/neynar-api/v2/openapi-farcaster/models/reaction-req-body.ts create mode 100644 src/neynar-api/v2/openapi-farcaster/models/reaction-type.ts create mode 100644 src/neynar-api/v2/openapi-farcaster/models/reaction-with-cast-info.ts create mode 100644 src/neynar-api/v2/openapi-farcaster/models/reaction-with-user-info.ts create mode 100644 src/neynar-api/v2/openapi-farcaster/models/reactions-cast-response.ts create mode 100644 src/neynar-api/v2/openapi-farcaster/models/reactions-response.ts create mode 100644 src/neynar-api/v2/openapi-farcaster/models/reactions-type.ts create mode 100644 src/neynar-api/v2/openapi-farcaster/models/register-developer-managed-signed-key-req-body.ts create mode 100644 src/neynar-api/v2/openapi-farcaster/models/register-signer-key-req-body.ts create mode 100644 src/neynar-api/v2/openapi-farcaster/models/register-user-req-body.ts create mode 100644 src/neynar-api/v2/openapi-farcaster/models/register-user-response.ts create mode 100644 src/neynar-api/v2/openapi-farcaster/models/relevant-followers-response.ts create mode 100644 src/neynar-api/v2/openapi-farcaster/models/remove-channel-member-request.ts create mode 100644 src/neynar-api/v2/openapi-farcaster/models/remove-verification-req-body.ts create mode 100644 src/neynar-api/v2/openapi-farcaster/models/respond-channel-invite-request.ts create mode 100644 src/neynar-api/v2/openapi-farcaster/models/searched-user.ts create mode 100644 src/neynar-api/v2/openapi-farcaster/models/signed-key-request-sponsor.ts create mode 100644 src/neynar-api/v2/openapi-farcaster/models/signer.ts create mode 100644 src/neynar-api/v2/openapi-farcaster/models/storage-allocation.ts create mode 100644 src/neynar-api/v2/openapi-farcaster/models/storage-allocations-response.ts create mode 100644 src/neynar-api/v2/openapi-farcaster/models/storage-object.ts create mode 100644 src/neynar-api/v2/openapi-farcaster/models/storage-usage-response.ts create mode 100644 src/neynar-api/v2/openapi-farcaster/models/subscribed-to-all-of.ts create mode 100644 src/neynar-api/v2/openapi-farcaster/models/subscribed-to-object.ts create mode 100644 src/neynar-api/v2/openapi-farcaster/models/subscribed-to-response.ts create mode 100644 src/neynar-api/v2/openapi-farcaster/models/subscribed-to.ts create mode 100644 src/neynar-api/v2/openapi-farcaster/models/subscriber.ts create mode 100644 src/neynar-api/v2/openapi-farcaster/models/subscribers-response.ts create mode 100644 src/neynar-api/v2/openapi-farcaster/models/subscription-metadata.ts create mode 100644 src/neynar-api/v2/openapi-farcaster/models/subscription-price.ts create mode 100644 src/neynar-api/v2/openapi-farcaster/models/subscription-provider.ts create mode 100644 src/neynar-api/v2/openapi-farcaster/models/subscription-providers.ts create mode 100644 src/neynar-api/v2/openapi-farcaster/models/subscription-status.ts create mode 100644 src/neynar-api/v2/openapi-farcaster/models/subscription-tier-price.ts create mode 100644 src/neynar-api/v2/openapi-farcaster/models/subscription-tier.ts create mode 100644 src/neynar-api/v2/openapi-farcaster/models/subscription-token.ts create mode 100644 src/neynar-api/v2/openapi-farcaster/models/subscription.ts create mode 100644 src/neynar-api/v2/openapi-farcaster/models/subscriptions-response.ts create mode 100644 src/neynar-api/v2/openapi-farcaster/models/subscriptions.ts create mode 100644 src/neynar-api/v2/openapi-farcaster/models/trending-channel-response.ts create mode 100644 src/neynar-api/v2/openapi-farcaster/models/update-user-req-body-location.ts create mode 100644 src/neynar-api/v2/openapi-farcaster/models/update-user-req-body.ts create mode 100644 src/neynar-api/v2/openapi-farcaster/models/user-dehydrated.ts create mode 100644 src/neynar-api/v2/openapi-farcaster/models/user-fidresponse.ts create mode 100644 src/neynar-api/v2/openapi-farcaster/models/user-power-lite-response-result.ts create mode 100644 src/neynar-api/v2/openapi-farcaster/models/user-power-lite-response.ts create mode 100644 src/neynar-api/v2/openapi-farcaster/models/user-profile-bio.ts create mode 100644 src/neynar-api/v2/openapi-farcaster/models/user-profile.ts create mode 100644 src/neynar-api/v2/openapi-farcaster/models/user-response.ts create mode 100644 src/neynar-api/v2/openapi-farcaster/models/user-search-response-result.ts create mode 100644 src/neynar-api/v2/openapi-farcaster/models/user-search-response.ts create mode 100644 src/neynar-api/v2/openapi-farcaster/models/user-verified-accounts-inner.ts create mode 100644 src/neynar-api/v2/openapi-farcaster/models/user-verified-addresses.ts create mode 100644 src/neynar-api/v2/openapi-farcaster/models/user-viewer-context.ts create mode 100644 src/neynar-api/v2/openapi-farcaster/models/user.ts create mode 100644 src/neynar-api/v2/openapi-farcaster/models/users-active-channels-response.ts create mode 100644 src/neynar-api/v2/openapi-farcaster/models/users-response.ts create mode 100644 src/neynar-api/v2/openapi-farcaster/models/validate-frame-action-response.ts create mode 100644 src/neynar-api/v2/openapi-farcaster/models/validate-frame-analytics-type.ts create mode 100644 src/neynar-api/v2/openapi-farcaster/models/validate-frame-request.ts create mode 100644 src/neynar-api/v2/openapi-farcaster/models/validated-frame-action-signer.ts create mode 100644 src/neynar-api/v2/openapi-farcaster/models/validated-frame-action-tapped-button.ts create mode 100644 src/neynar-api/v2/openapi-farcaster/models/validated-frame-action.ts create mode 100644 src/neynar-api/v2/openapi-farcaster/models/verification-chain-id.ts create mode 100644 src/neynar-api/v2/openapi-farcaster/models/verification-type.ts create mode 100644 src/neynar-api/v2/openapi-farcaster/models/video-object.ts create mode 100644 src/neynar-api/v2/openapi-farcaster/models/webhook-delete-req-body.ts create mode 100644 src/neynar-api/v2/openapi-farcaster/models/webhook-list-response.ts create mode 100644 src/neynar-api/v2/openapi-farcaster/models/webhook-patch-req-body.ts create mode 100644 src/neynar-api/v2/openapi-farcaster/models/webhook-post-req-body.ts create mode 100644 src/neynar-api/v2/openapi-farcaster/models/webhook-put-req-body-all-of.ts create mode 100644 src/neynar-api/v2/openapi-farcaster/models/webhook-put-req-body.ts create mode 100644 src/neynar-api/v2/openapi-farcaster/models/webhook-response.ts create mode 100644 src/neynar-api/v2/openapi-farcaster/models/webhook-secret.ts create mode 100644 src/neynar-api/v2/openapi-farcaster/models/webhook-subscription-filters-cast.ts create mode 100644 src/neynar-api/v2/openapi-farcaster/models/webhook-subscription-filters-follow.ts create mode 100644 src/neynar-api/v2/openapi-farcaster/models/webhook-subscription-filters-reaction.ts create mode 100644 src/neynar-api/v2/openapi-farcaster/models/webhook-subscription-filters-user-updated.ts create mode 100644 src/neynar-api/v2/openapi-farcaster/models/webhook-subscription-filters.ts create mode 100644 src/neynar-api/v2/openapi-farcaster/models/webhook-subscription.ts create mode 100644 src/neynar-api/v2/openapi-farcaster/models/webhook.ts create mode 100644 src/neynar-api/v2/openapi-farcaster/models/zod-error-errors-inner.ts create mode 100644 src/neynar-api/v2/openapi-farcaster/models/zod-error.ts create mode 100644 src/neynar-api/v2/openapi-stp/apis/stpapi.ts create mode 100644 src/neynar-api/v2/openapi-stp/models/conflict-error-res.ts create mode 100644 src/neynar-api/v2/openapi-stp/models/error-res.ts create mode 100644 src/neynar-api/v2/openapi-stp/models/index.ts create mode 100644 src/neynar-api/v2/openapi-stp/models/subscription-status.ts create mode 100644 src/neynar-api/v2/openapi-stp/models/subscription-tier-price.ts create mode 100644 src/neynar-api/v2/openapi-stp/models/subscription-tier.ts diff --git a/src/neynar-api/v1/openapi/.openapi-generator/FILES b/src/neynar-api/v1/openapi/.openapi-generator/FILES index 16b445ee..a921261e 100644 --- a/src/neynar-api/v1/openapi/.openapi-generator/FILES +++ b/src/neynar-api/v1/openapi/.openapi-generator/FILES @@ -2,8 +2,79 @@ .npmignore .openapi-generator-ignore api.ts +apis/cast-api.ts +apis/follows-api.ts +apis/notifications-api.ts +apis/user-api.ts +apis/verification-api.ts base.ts common.ts configuration.ts git_push.sh index.ts +models/all-casts-in-thread-response-result.ts +models/all-casts-in-thread-response.ts +models/cast-author-one-of.ts +models/cast-author.ts +models/cast-likes-response-result.ts +models/cast-likes-response.ts +models/cast-parent-author-all-of.ts +models/cast-parent-author.ts +models/cast-reactions-response-result.ts +models/cast-reactions-response.ts +models/cast-recaster-response-result.ts +models/cast-recaster-response.ts +models/cast-response-result.ts +models/cast-response.ts +models/cast-type.ts +models/cast-with-interactions-all-of.ts +models/cast-with-interactions-reactions.ts +models/cast-with-interactions-recasts.ts +models/cast-with-interactions-replies.ts +models/cast-with-interactions.ts +models/cast.ts +models/casts-response-result.ts +models/casts-response.ts +models/custody-address-response-result.ts +models/custody-address-response.ts +models/embed-url.ts +models/error-res.ts +models/follow-response-result.ts +models/follow-response-user-all-of.ts +models/follow-response-user.ts +models/follow-response.ts +models/index.ts +models/mentions-and-replies-response-result.ts +models/mentions-and-replies-response.ts +models/next-cursor.ts +models/reaction-type.ts +models/reaction-with-cast-meta-cast.ts +models/reaction-with-cast-meta-reaction.ts +models/reaction-with-cast-meta.ts +models/reaction.ts +models/reactions-and-recasts-notification-all-of.ts +models/reactions-and-recasts-notification.ts +models/reactions-and-recasts-response-result.ts +models/reactions-and-recasts-response.ts +models/reactor-pfp.ts +models/reactor-viewer-context.ts +models/reactor.ts +models/recaster-pfp.ts +models/recaster-profile-bio.ts +models/recaster-profile.ts +models/recaster-viewer-context.ts +models/recaster.ts +models/recent-casts-response.ts +models/recent-users-response-result.ts +models/recent-users-response.ts +models/user-cast-like-response-result.ts +models/user-cast-like-response.ts +models/user-pfp.ts +models/user-profile-bio.ts +models/user-profile.ts +models/user-response-result.ts +models/user-response.ts +models/user.ts +models/verification-response-result.ts +models/verification-response.ts +models/viewer-context.ts diff --git a/src/neynar-api/v1/openapi/api.ts b/src/neynar-api/v1/openapi/api.ts index 8d520f3f..d81365c7 100644 --- a/src/neynar-api/v1/openapi/api.ts +++ b/src/neynar-api/v1/openapi/api.ts @@ -13,3032 +13,10 @@ */ -import type { Configuration } from './configuration'; -import type { AxiosPromise, AxiosInstance, RawAxiosRequestConfig } from 'axios'; -import globalAxios from 'axios'; -// Some imports not used depending on template conditions -// @ts-ignore -import { DUMMY_BASE_URL, assertParamExists, setApiKeyToObject, setBasicAuthToObject, setBearerAuthToObject, setOAuthToObject, setSearchParams, serializeDataIfNeeded, toPathString, createRequestFunction } from './common'; -import type { RequestArgs } from './base'; -// @ts-ignore -import { BASE_PATH, COLLECTION_FORMATS, BaseAPI, RequiredError, operationServerMap } from './base'; - -/** - * - * @export - * @interface AllCastsInThreadResponse - */ -export interface AllCastsInThreadResponse { - /** - * - * @type {AllCastsInThreadResponseResult} - * @memberof AllCastsInThreadResponse - */ - 'result': AllCastsInThreadResponseResult; -} -/** - * - * @export - * @interface AllCastsInThreadResponseResult - */ -export interface AllCastsInThreadResponseResult { - /** - * - * @type {Array} - * @memberof AllCastsInThreadResponseResult - */ - 'casts': Array; -} -/** - * - * @export - * @interface Cast - */ -export interface Cast { - /** - * - * @type {string} - * @memberof Cast - */ - 'hash': string; - /** - * - * @type {string} - * @memberof Cast - */ - 'parentHash': string | null; - /** - * - * @type {string} - * @memberof Cast - */ - 'parentUrl': string | null; - /** - * - * @type {string} - * @memberof Cast - */ - 'threadHash': string; - /** - * - * @type {CastParentAuthor} - * @memberof Cast - */ - 'parentAuthor': CastParentAuthor; - /** - * - * @type {Array} - * @memberof Cast - */ - 'mentionedProfiles': Array; - /** - * - * @type {CastAuthor} - * @memberof Cast - */ - 'author': CastAuthor; - /** - * - * @type {string} - * @memberof Cast - */ - 'text': string; - /** - * - * @type {string} - * @memberof Cast - */ - 'timestamp': string; - /** - * - * @type {Array} - * @memberof Cast - */ - 'embeds': Array; - /** - * - * @type {CastType} - * @memberof Cast - */ - 'type'?: CastType; -} - - -/** - * @type CastAuthor - * @export - */ -export type CastAuthor = CastAuthorOneOf | User; - -/** - * - * @export - * @interface CastAuthorOneOf - */ -export interface CastAuthorOneOf { - /** - * - * @type {string} - * @memberof CastAuthorOneOf - */ - 'fid': string; -} -/** - * - * @export - * @interface CastLikesResponse - */ -export interface CastLikesResponse { - /** - * - * @type {CastLikesResponseResult} - * @memberof CastLikesResponse - */ - 'result': CastLikesResponseResult; -} -/** - * - * @export - * @interface CastLikesResponseResult - */ -export interface CastLikesResponseResult { - /** - * - * @type {Array} - * @memberof CastLikesResponseResult - */ - 'likes': Array; - /** - * - * @type {NextCursor} - * @memberof CastLikesResponseResult - */ - 'next': NextCursor; -} -/** - * - * @export - * @interface CastParentAuthor - */ -export interface CastParentAuthor { - /** - * - * @type {string} - * @memberof CastParentAuthor - */ - 'fid': string | null; -} -/** - * - * @export - * @interface CastReactionsResponse - */ -export interface CastReactionsResponse { - /** - * - * @type {CastReactionsResponseResult} - * @memberof CastReactionsResponse - */ - 'result': CastReactionsResponseResult; -} -/** - * - * @export - * @interface CastReactionsResponseResult - */ -export interface CastReactionsResponseResult { - /** - * - * @type {Array} - * @memberof CastReactionsResponseResult - */ - 'casts': Array; - /** - * - * @type {NextCursor} - * @memberof CastReactionsResponseResult - */ - 'next': NextCursor; -} -/** - * - * @export - * @interface CastRecasterResponse - */ -export interface CastRecasterResponse { - /** - * - * @type {CastRecasterResponseResult} - * @memberof CastRecasterResponse - */ - 'result': CastRecasterResponseResult; -} -/** - * - * @export - * @interface CastRecasterResponseResult - */ -export interface CastRecasterResponseResult { - /** - * - * @type {Array} - * @memberof CastRecasterResponseResult - */ - 'users': Array; - /** - * - * @type {NextCursor} - * @memberof CastRecasterResponseResult - */ - 'next': NextCursor; -} -/** - * - * @export - * @interface CastResponse - */ -export interface CastResponse { - /** - * - * @type {CastResponseResult} - * @memberof CastResponse - */ - 'result': CastResponseResult; -} -/** - * - * @export - * @interface CastResponseResult - */ -export interface CastResponseResult { - /** - * - * @type {CastWithInteractions} - * @memberof CastResponseResult - */ - 'cast': CastWithInteractions; -} -/** - * The notification type of a cast. - * @export - * @enum {string} - */ - -export const CastType = { - Mention: 'cast-mention', - Reply: 'cast-reply' -} as const; - -export type CastType = typeof CastType[keyof typeof CastType]; - - -/** - * - * @export - * @interface CastWithInteractions - */ -export interface CastWithInteractions { - /** - * - * @type {string} - * @memberof CastWithInteractions - */ - 'hash': string; - /** - * - * @type {string} - * @memberof CastWithInteractions - */ - 'parentHash': string | null; - /** - * - * @type {string} - * @memberof CastWithInteractions - */ - 'parentUrl': string | null; - /** - * - * @type {string} - * @memberof CastWithInteractions - */ - 'threadHash': string; - /** - * - * @type {CastParentAuthor} - * @memberof CastWithInteractions - */ - 'parentAuthor': CastParentAuthor; - /** - * - * @type {Array} - * @memberof CastWithInteractions - */ - 'mentionedProfiles': Array; - /** - * - * @type {CastAuthor} - * @memberof CastWithInteractions - */ - 'author': CastAuthor; - /** - * - * @type {string} - * @memberof CastWithInteractions - */ - 'text': string; - /** - * - * @type {string} - * @memberof CastWithInteractions - */ - 'timestamp': string; - /** - * - * @type {Array} - * @memberof CastWithInteractions - */ - 'embeds': Array; - /** - * - * @type {CastType} - * @memberof CastWithInteractions - */ - 'type'?: CastType; - /** - * - * @type {CastWithInteractionsReactions} - * @memberof CastWithInteractions - */ - 'reactions': CastWithInteractionsReactions; - /** - * - * @type {CastWithInteractionsRecasts} - * @memberof CastWithInteractions - */ - 'recasts': CastWithInteractionsRecasts; - /** - * - * @type {Array} - * @memberof CastWithInteractions - */ - 'recasters': Array; - /** - * - * @type {ViewerContext} - * @memberof CastWithInteractions - */ - 'viewerContext'?: ViewerContext; - /** - * - * @type {CastWithInteractionsReplies} - * @memberof CastWithInteractions - */ - 'replies': CastWithInteractionsReplies; -} - - -/** - * - * @export - * @interface CastWithInteractionsReactions - */ -export interface CastWithInteractionsReactions { - /** - * - * @type {number} - * @memberof CastWithInteractionsReactions - */ - 'count': number; - /** - * - * @type {Array} - * @memberof CastWithInteractionsReactions - */ - 'fids': Array; - /** - * - * @type {Array} - * @memberof CastWithInteractionsReactions - */ - 'fnames': Array; -} -/** - * - * @export - * @interface CastWithInteractionsRecasts - */ -export interface CastWithInteractionsRecasts { - /** - * - * @type {number} - * @memberof CastWithInteractionsRecasts - */ - 'count': number; - /** - * - * @type {Array} - * @memberof CastWithInteractionsRecasts - */ - 'fids': Array; -} -/** - * - * @export - * @interface CastWithInteractionsReplies - */ -export interface CastWithInteractionsReplies { - /** - * - * @type {number} - * @memberof CastWithInteractionsReplies - */ - 'count': number; -} -/** - * - * @export - * @interface CastsResponse - */ -export interface CastsResponse { - /** - * - * @type {CastsResponseResult} - * @memberof CastsResponse - */ - 'result': CastsResponseResult; -} -/** - * - * @export - * @interface CastsResponseResult - */ -export interface CastsResponseResult { - /** - * - * @type {Array} - * @memberof CastsResponseResult - */ - 'casts': Array; - /** - * - * @type {NextCursor} - * @memberof CastsResponseResult - */ - 'next': NextCursor; -} -/** - * - * @export - * @interface CustodyAddressResponse - */ -export interface CustodyAddressResponse { - /** - * - * @type {CustodyAddressResponseResult} - * @memberof CustodyAddressResponse - */ - 'result': CustodyAddressResponseResult; -} -/** - * - * @export - * @interface CustodyAddressResponseResult - */ -export interface CustodyAddressResponseResult { - /** - * User identifier (unsigned integer) - * @type {number} - * @memberof CustodyAddressResponseResult - */ - 'fid': number; - /** - * - * @type {string} - * @memberof CustodyAddressResponseResult - */ - 'custodyAddress': string | null; -} -/** - * - * @export - * @interface EmbedUrl - */ -export interface EmbedUrl { - /** - * - * @type {string} - * @memberof EmbedUrl - */ - 'url': string; -} -/** - * Returns ErrorRes metadata - * @export - * @interface ErrorRes - */ -export interface ErrorRes { - /** - * - * @type {string} - * @memberof ErrorRes - */ - 'code'?: string; - /** - * - * @type {string} - * @memberof ErrorRes - */ - 'message': string; - /** - * - * @type {string} - * @memberof ErrorRes - */ - 'property'?: string; -} -/** - * - * @export - * @interface FollowResponse - */ -export interface FollowResponse { - /** - * - * @type {FollowResponseResult} - * @memberof FollowResponse - */ - 'result': FollowResponseResult; -} -/** - * - * @export - * @interface FollowResponseResult - */ -export interface FollowResponseResult { - /** - * - * @type {Array} - * @memberof FollowResponseResult - */ - 'users': Array; - /** - * - * @type {NextCursor} - * @memberof FollowResponseResult - */ - 'next': NextCursor; -} -/** - * - * @export - * @interface FollowResponseUser - */ -export interface FollowResponseUser { - /** - * User identifier (unsigned integer) - * @type {number} - * @memberof FollowResponseUser - */ - 'fid': number; - /** - * The username of the user. - * @type {string} - * @memberof FollowResponseUser - */ - 'username': string; - /** - * Custody Address of the user. - * @type {string} - * @memberof FollowResponseUser - */ - 'custodyAddress': string; - /** - * The display of the reactor. - * @type {string} - * @memberof FollowResponseUser - */ - 'displayName': string; - /** - * - * @type {UserPfp} - * @memberof FollowResponseUser - */ - 'pfp': UserPfp; - /** - * - * @type {UserProfile} - * @memberof FollowResponseUser - */ - 'profile': UserProfile; - /** - * The number of followers the user has. - * @type {number} - * @memberof FollowResponseUser - */ - 'followerCount': number; - /** - * The number of users the user is following. - * @type {number} - * @memberof FollowResponseUser - */ - 'followingCount': number; - /** - * - * @type {Array} - * @memberof FollowResponseUser - */ - 'verifications': Array; - /** - * - * @type {ViewerContext} - * @memberof FollowResponseUser - */ - 'viewerContext'?: ViewerContext; - /** - * - * @type {string} - * @memberof FollowResponseUser - */ - 'timestamp': string; -} -/** - * - * @export - * @interface MentionsAndRepliesResponse - */ -export interface MentionsAndRepliesResponse { - /** - * - * @type {MentionsAndRepliesResponseResult} - * @memberof MentionsAndRepliesResponse - */ - 'result': MentionsAndRepliesResponseResult; -} -/** - * - * @export - * @interface MentionsAndRepliesResponseResult - */ -export interface MentionsAndRepliesResponseResult { - /** - * - * @type {Array} - * @memberof MentionsAndRepliesResponseResult - */ - 'notifications': Array; - /** - * - * @type {NextCursor} - * @memberof MentionsAndRepliesResponseResult - */ - 'next': NextCursor; -} -/** - * Returns next cursor - * @export - * @interface NextCursor - */ -export interface NextCursor { - /** - * - * @type {string} - * @memberof NextCursor - */ - 'cursor': string | null; -} -/** - * - * @export - * @interface Reaction - */ -export interface Reaction { - /** - * - * @type {ReactionType} - * @memberof Reaction - */ - 'type': ReactionType; - /** - * Ethereum address - * @type {string} - * @memberof Reaction - */ - 'hash': string; - /** - * - * @type {Reactor} - * @memberof Reaction - */ - 'reactor': Reactor; - /** - * - * @type {string} - * @memberof Reaction - */ - 'timestamp': string; - /** - * Cast Hash - * @type {string} - * @memberof Reaction - */ - 'castHash': string; -} - - -/** - * The reaction type of a cast. - like: Cast is being liked by a user. - recast: Cast is being recasted by a user. - * @export - * @enum {string} - */ - -export const ReactionType = { - Like: 'like', - Recast: 'recast' -} as const; - -export type ReactionType = typeof ReactionType[keyof typeof ReactionType]; - - -/** - * Reaction of a user (either like or recast), along with its associated cast - * @export - * @interface ReactionWithCastMeta - */ -export interface ReactionWithCastMeta { - /** - * - * @type {ReactionWithCastMetaReaction} - * @memberof ReactionWithCastMeta - */ - 'reaction': ReactionWithCastMetaReaction; - /** - * - * @type {ReactionWithCastMetaCast} - * @memberof ReactionWithCastMeta - */ - 'cast'?: ReactionWithCastMetaCast; - /** - * - * @type {User} - * @memberof ReactionWithCastMeta - */ - 'cast_author'?: User; -} -/** - * - * @export - * @interface ReactionWithCastMetaCast - */ -export interface ReactionWithCastMetaCast { - /** - * User identifier (unsigned integer) - * @type {number} - * @memberof ReactionWithCastMetaCast - */ - 'cast_fid': number; - /** - * - * @type {string} - * @memberof ReactionWithCastMetaCast - */ - 'cast_hash': string; - /** - * - * @type {string} - * @memberof ReactionWithCastMetaCast - */ - 'cast_text': string; - /** - * - * @type {Array} - * @memberof ReactionWithCastMetaCast - */ - 'cast_embeds': Array; - /** - * - * @type {string} - * @memberof ReactionWithCastMetaCast - */ - 'cast_timestamp': string; -} -/** - * - * @export - * @interface ReactionWithCastMetaReaction - */ -export interface ReactionWithCastMetaReaction { - /** - * User identifier (unsigned integer) - * @type {number} - * @memberof ReactionWithCastMetaReaction - */ - 'reactor_fid': number; - /** - * - * @type {ReactionType} - * @memberof ReactionWithCastMetaReaction - */ - 'reaction_type': ReactionType; - /** - * - * @type {string} - * @memberof ReactionWithCastMetaReaction - */ - 'reaction_hash': string; - /** - * - * @type {string} - * @memberof ReactionWithCastMetaReaction - */ - 'reaction_target_hash': string; - /** - * - * @type {string} - * @memberof ReactionWithCastMetaReaction - */ - 'reaction_timestamp': string; -} - - -/** - * - * @export - * @interface ReactionsAndRecastsNotification - */ -export interface ReactionsAndRecastsNotification { - /** - * - * @type {string} - * @memberof ReactionsAndRecastsNotification - */ - 'hash': string; - /** - * - * @type {string} - * @memberof ReactionsAndRecastsNotification - */ - 'parentHash': string | null; - /** - * - * @type {string} - * @memberof ReactionsAndRecastsNotification - */ - 'parentUrl': string | null; - /** - * - * @type {string} - * @memberof ReactionsAndRecastsNotification - */ - 'threadHash': string; - /** - * - * @type {CastParentAuthor} - * @memberof ReactionsAndRecastsNotification - */ - 'parentAuthor': CastParentAuthor; - /** - * - * @type {Array} - * @memberof ReactionsAndRecastsNotification - */ - 'mentionedProfiles': Array; - /** - * - * @type {CastAuthor} - * @memberof ReactionsAndRecastsNotification - */ - 'author': CastAuthor; - /** - * - * @type {string} - * @memberof ReactionsAndRecastsNotification - */ - 'text': string; - /** - * - * @type {string} - * @memberof ReactionsAndRecastsNotification - */ - 'timestamp': string; - /** - * - * @type {Array} - * @memberof ReactionsAndRecastsNotification - */ - 'embeds': Array; - /** - * - * @type {CastType} - * @memberof ReactionsAndRecastsNotification - */ - 'type'?: CastType; - /** - * - * @type {Array} - * @memberof ReactionsAndRecastsNotification - */ - 'reactors'?: Array; - /** - * - * @type {ReactionType} - * @memberof ReactionsAndRecastsNotification - */ - 'reactionType'?: ReactionType; -} - - -/** - * - * @export - * @interface ReactionsAndRecastsResponse - */ -export interface ReactionsAndRecastsResponse { - /** - * - * @type {ReactionsAndRecastsResponseResult} - * @memberof ReactionsAndRecastsResponse - */ - 'result': ReactionsAndRecastsResponseResult; -} -/** - * - * @export - * @interface ReactionsAndRecastsResponseResult - */ -export interface ReactionsAndRecastsResponseResult { - /** - * - * @type {Array} - * @memberof ReactionsAndRecastsResponseResult - */ - 'notifications': Array; - /** - * - * @type {NextCursor} - * @memberof ReactionsAndRecastsResponseResult - */ - 'next': NextCursor; -} -/** - * - * @export - * @interface Reactor - */ -export interface Reactor { - /** - * The unique identifier of the reactor. - * @type {number} - * @memberof Reactor - */ - 'fid': number; - /** - * The username of the reactor. - * @type {string} - * @memberof Reactor - */ - 'username': string; - /** - * The display name of the reactor. - * @type {string} - * @memberof Reactor - */ - 'displayName': string; - /** - * - * @type {ReactorPfp} - * @memberof Reactor - */ - 'pfp': ReactorPfp; - /** - * The number of followers the reactor has. - * @type {number} - * @memberof Reactor - */ - 'followerCount': number; - /** - * The number of users the reactor is following. - * @type {number} - * @memberof Reactor - */ - 'followingCount': number; - /** - * - * @type {ReactorViewerContext} - * @memberof Reactor - */ - 'viewerContext'?: ReactorViewerContext; -} -/** - * - * @export - * @interface ReactorPfp - */ -export interface ReactorPfp { - /** - * The URL of the reactor\'s profile picture. - * @type {string} - * @memberof ReactorPfp - */ - 'url': string; -} -/** - * - * @export - * @interface ReactorViewerContext - */ -export interface ReactorViewerContext { - /** - * Indicates if the viewer is following the reactor. - * @type {boolean} - * @memberof ReactorViewerContext - */ - 'following': boolean; - /** - * Indicates if the reactor is followed by the viewer. - * @type {boolean} - * @memberof ReactorViewerContext - */ - 'followedBy': boolean; -} -/** - * - * @export - * @interface Recaster - */ -export interface Recaster { - /** - * The unique identifier of the recaster. - * @type {number} - * @memberof Recaster - */ - 'fid': number; - /** - * The username of the recaster. - * @type {string} - * @memberof Recaster - */ - 'username': string; - /** - * The display name of the recaster. - * @type {string} - * @memberof Recaster - */ - 'displayName': string; - /** - * - * @type {RecasterPfp} - * @memberof Recaster - */ - 'pfp': RecasterPfp; - /** - * - * @type {RecasterProfile} - * @memberof Recaster - */ - 'profile': RecasterProfile; - /** - * The number of followers the recaster has. - * @type {number} - * @memberof Recaster - */ - 'followerCount': number; - /** - * The number of users the recaster is following. - * @type {number} - * @memberof Recaster - */ - 'followingCount': number; - /** - * - * @type {string} - * @memberof Recaster - */ - 'timestamp': string; - /** - * - * @type {RecasterViewerContext} - * @memberof Recaster - */ - 'viewerContext'?: RecasterViewerContext; -} -/** - * - * @export - * @interface RecasterPfp - */ -export interface RecasterPfp { - /** - * The URL of the recaster\'s profile picture. - * @type {string} - * @memberof RecasterPfp - */ - 'url': string; -} -/** - * - * @export - * @interface RecasterProfile - */ -export interface RecasterProfile { - /** - * - * @type {RecasterProfileBio} - * @memberof RecasterProfile - */ - 'bio': RecasterProfileBio; -} -/** - * - * @export - * @interface RecasterProfileBio - */ -export interface RecasterProfileBio { - /** - * - * @type {string} - * @memberof RecasterProfileBio - */ - 'text': string; - /** - * - * @type {Array} - * @memberof RecasterProfileBio - */ - 'mentions': Array; -} -/** - * - * @export - * @interface RecasterViewerContext - */ -export interface RecasterViewerContext { - /** - * Indicates if the viewer is following the recaster. - * @type {boolean} - * @memberof RecasterViewerContext - */ - 'following': boolean; - /** - * Indicates if the recaster is followed by the viewer. - * @type {boolean} - * @memberof RecasterViewerContext - */ - 'followedBy': boolean; -} -/** - * - * @export - * @interface RecentCastsResponse - */ -export interface RecentCastsResponse { - /** - * - * @type {CastsResponseResult} - * @memberof RecentCastsResponse - */ - 'result': CastsResponseResult; -} -/** - * - * @export - * @interface RecentUsersResponse - */ -export interface RecentUsersResponse { - /** - * - * @type {RecentUsersResponseResult} - * @memberof RecentUsersResponse - */ - 'result': RecentUsersResponseResult; -} -/** - * - * @export - * @interface RecentUsersResponseResult - */ -export interface RecentUsersResponseResult { - /** - * - * @type {Array} - * @memberof RecentUsersResponseResult - */ - 'users': Array; - /** - * - * @type {NextCursor} - * @memberof RecentUsersResponseResult - */ - 'next': NextCursor; -} -/** - * - * @export - * @interface User - */ -export interface User { - /** - * User identifier (unsigned integer) - * @type {number} - * @memberof User - */ - 'fid': number; - /** - * The username of the user. - * @type {string} - * @memberof User - */ - 'username': string; - /** - * Custody Address of the user. - * @type {string} - * @memberof User - */ - 'custodyAddress': string; - /** - * The display of the reactor. - * @type {string} - * @memberof User - */ - 'displayName': string; - /** - * - * @type {UserPfp} - * @memberof User - */ - 'pfp': UserPfp; - /** - * - * @type {UserProfile} - * @memberof User - */ - 'profile': UserProfile; - /** - * The number of followers the user has. - * @type {number} - * @memberof User - */ - 'followerCount': number; - /** - * The number of users the user is following. - * @type {number} - * @memberof User - */ - 'followingCount': number; - /** - * - * @type {Array} - * @memberof User - */ - 'verifications': Array; - /** - * - * @type {ViewerContext} - * @memberof User - */ - 'viewerContext'?: ViewerContext; -} -/** - * - * @export - * @interface UserCastLikeResponse - */ -export interface UserCastLikeResponse { - /** - * - * @type {UserCastLikeResponseResult} - * @memberof UserCastLikeResponse - */ - 'result': UserCastLikeResponseResult; -} -/** - * - * @export - * @interface UserCastLikeResponseResult - */ -export interface UserCastLikeResponseResult { - /** - * - * @type {User} - * @memberof UserCastLikeResponseResult - */ - 'reactor': User; - /** - * - * @type {Array} - * @memberof UserCastLikeResponseResult - */ - 'likes': Array; - /** - * - * @type {NextCursor} - * @memberof UserCastLikeResponseResult - */ - 'next': NextCursor; -} -/** - * - * @export - * @interface UserPfp - */ -export interface UserPfp { - /** - * The URL of the user\'s profile picture. - * @type {string} - * @memberof UserPfp - */ - 'url': string; -} -/** - * - * @export - * @interface UserProfile - */ -export interface UserProfile { - /** - * - * @type {UserProfileBio} - * @memberof UserProfile - */ - 'bio': UserProfileBio; -} -/** - * - * @export - * @interface UserProfileBio - */ -export interface UserProfileBio { - /** - * - * @type {string} - * @memberof UserProfileBio - */ - 'text': string; - /** - * - * @type {Array} - * @memberof UserProfileBio - */ - 'mentionedProfiles': Array; -} -/** - * - * @export - * @interface UserResponse - */ -export interface UserResponse { - /** - * - * @type {UserResponseResult} - * @memberof UserResponse - */ - 'result': UserResponseResult; -} -/** - * - * @export - * @interface UserResponseResult - */ -export interface UserResponseResult { - /** - * - * @type {User} - * @memberof UserResponseResult - */ - 'user': User; -} -/** - * - * @export - * @interface VerificationResponse - */ -export interface VerificationResponse { - /** - * - * @type {VerificationResponseResult} - * @memberof VerificationResponse - */ - 'result': VerificationResponseResult; -} -/** - * - * @export - * @interface VerificationResponseResult - */ -export interface VerificationResponseResult { - /** - * - * @type {string} - * @memberof VerificationResponseResult - */ - 'fid': string; - /** - * - * @type {string} - * @memberof VerificationResponseResult - */ - 'username': string; - /** - * - * @type {string} - * @memberof VerificationResponseResult - */ - 'display_name': string; - /** - * - * @type {Array} - * @memberof VerificationResponseResult - */ - 'verifications': Array; -} -/** - * - * @export - * @interface ViewerContext - */ -export interface ViewerContext { - /** - * - * @type {boolean} - * @memberof ViewerContext - */ - 'following': boolean; - /** - * - * @type {boolean} - * @memberof ViewerContext - */ - 'followedBy': boolean; - /** - * - * @type {boolean} - * @memberof ViewerContext - */ - 'liked'?: boolean; - /** - * - * @type {boolean} - * @memberof ViewerContext - */ - 'recasted'?: boolean; -} - -/** - * CastApi - axios parameter creator - * @export - */ -export const CastApiAxiosParamCreator = function (configuration?: Configuration) { - return { - /** - * Now deprecated, use [v2/cast/conversation](https://docs.neynar.com/reference/cast-conversation). Gets all casts, including root cast and all replies for a given thread hash. No limit the depth of replies. - * @summary DEPRECATED - Fetch all casts in a given thread hash - * @param {string} threadHash The hash of the thread to fetch casts from. - * @param {number} [viewerFid] FID of the user viewing this information, needed for contextual information. - * @param {*} [options] Override http request option. - * @deprecated - * @throws {RequiredError} - */ - allCastsInThread: async (threadHash: string, viewerFid?: number, options: RawAxiosRequestConfig = {}): Promise => { - // verify required parameter 'threadHash' is not null or undefined - assertParamExists('allCastsInThread', 'threadHash', threadHash) - const localVarPath = `/farcaster/all-casts-in-thread`; - // use dummy base URL string because the URL constructor only accepts absolute URLs. - const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); - let baseOptions; - if (configuration) { - baseOptions = configuration.baseOptions; - } - - const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; - const localVarHeaderParameter = {} as any; - const localVarQueryParameter = {} as any; - - // authentication ApiKeyAuth required - await setApiKeyToObject(localVarHeaderParameter, "x-api-key", configuration) - - if (threadHash !== undefined) { - localVarQueryParameter['threadHash'] = threadHash; - } - - if (viewerFid !== undefined) { - localVarQueryParameter['viewerFid'] = viewerFid; - } - - - - setSearchParams(localVarUrlObj, localVarQueryParameter); - let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; - localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; - - return { - url: toPathString(localVarUrlObj), - options: localVarRequestOptions, - }; - }, - /** - * Now deprecated, use [v2/cast](https://docs.neynar.com/reference/cast). Gets information about an individual cast - * @summary DEPRECATED - Fetch cast for a given hash - * @param {string} hash Cast hash - * @param {number} [viewerFid] FID of the user viewing this information, needed for contextual information. - * @param {*} [options] Override http request option. - * @deprecated - * @throws {RequiredError} - */ - cast: async (hash: string, viewerFid?: number, options: RawAxiosRequestConfig = {}): Promise => { - // verify required parameter 'hash' is not null or undefined - assertParamExists('cast', 'hash', hash) - const localVarPath = `/farcaster/cast`; - // use dummy base URL string because the URL constructor only accepts absolute URLs. - const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); - let baseOptions; - if (configuration) { - baseOptions = configuration.baseOptions; - } - - const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; - const localVarHeaderParameter = {} as any; - const localVarQueryParameter = {} as any; - - // authentication ApiKeyAuth required - await setApiKeyToObject(localVarHeaderParameter, "x-api-key", configuration) - - if (hash !== undefined) { - localVarQueryParameter['hash'] = hash; - } - - if (viewerFid !== undefined) { - localVarQueryParameter['viewerFid'] = viewerFid; - } - - - - setSearchParams(localVarUrlObj, localVarQueryParameter); - let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; - localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; - - return { - url: toPathString(localVarUrlObj), - options: localVarRequestOptions, - }; - }, - /** - * Now deprecated, use [/v2/farcaster/feed/user/casts](https://docs.neynar.com/reference/feed-user-casts) instead - * @summary DEPRECATED - Casts by user - * @param {number} fid FID of a user - * @param {string} [parentUrl] A cast can be part of a certain channel. The channel is identified by `parent_url`. All casts in the channel ladder up to the same parent_url. - * @param {number} [viewerFid] FID of the user viewing this information, needed for contextual information. - * @param {number} [limit] Number of results to fetch (default 25, max 150) - * @param {string} [cursor] Pagination cursor. - * @param {*} [options] Override http request option. - * @deprecated - * @throws {RequiredError} - */ - casts: async (fid: number, parentUrl?: string, viewerFid?: number, limit?: number, cursor?: string, options: RawAxiosRequestConfig = {}): Promise => { - // verify required parameter 'fid' is not null or undefined - assertParamExists('casts', 'fid', fid) - const localVarPath = `/farcaster/casts`; - // use dummy base URL string because the URL constructor only accepts absolute URLs. - const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); - let baseOptions; - if (configuration) { - baseOptions = configuration.baseOptions; - } - - const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; - const localVarHeaderParameter = {} as any; - const localVarQueryParameter = {} as any; - - // authentication ApiKeyAuth required - await setApiKeyToObject(localVarHeaderParameter, "x-api-key", configuration) - - if (fid !== undefined) { - localVarQueryParameter['fid'] = fid; - } - - if (parentUrl !== undefined) { - localVarQueryParameter['parent_url'] = parentUrl; - } - - if (viewerFid !== undefined) { - localVarQueryParameter['viewerFid'] = viewerFid; - } - - if (limit !== undefined) { - localVarQueryParameter['limit'] = limit; - } - - if (cursor !== undefined) { - localVarQueryParameter['cursor'] = cursor; - } - - - - setSearchParams(localVarUrlObj, localVarQueryParameter); - let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; - localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; - - return { - url: toPathString(localVarUrlObj), - options: localVarRequestOptions, - }; - }, - /** - * Fetch a list of casts from the protocol in reverse chronological order based on timestamp - * @summary Fetch Recent Casts - * @param {number} [viewerFid] FID of the user viewing this information, needed for contextual information. - * @param {number} [limit] Number of results to fetch (default 25, max 100) - * @param {string} [cursor] Pagination cursor. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - recentCasts: async (viewerFid?: number, limit?: number, cursor?: string, options: RawAxiosRequestConfig = {}): Promise => { - const localVarPath = `/farcaster/recent-casts`; - // use dummy base URL string because the URL constructor only accepts absolute URLs. - const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); - let baseOptions; - if (configuration) { - baseOptions = configuration.baseOptions; - } - - const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; - const localVarHeaderParameter = {} as any; - const localVarQueryParameter = {} as any; - - // authentication ApiKeyAuth required - await setApiKeyToObject(localVarHeaderParameter, "x-api-key", configuration) - - if (viewerFid !== undefined) { - localVarQueryParameter['viewerFid'] = viewerFid; - } - - if (limit !== undefined) { - localVarQueryParameter['limit'] = limit; - } - - if (cursor !== undefined) { - localVarQueryParameter['cursor'] = cursor; - } - - - - setSearchParams(localVarUrlObj, localVarQueryParameter); - let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; - localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; - - return { - url: toPathString(localVarUrlObj), - options: localVarRequestOptions, - }; - }, - } -}; - -/** - * CastApi - functional programming interface - * @export - */ -export const CastApiFp = function(configuration?: Configuration) { - const localVarAxiosParamCreator = CastApiAxiosParamCreator(configuration) - return { - /** - * Now deprecated, use [v2/cast/conversation](https://docs.neynar.com/reference/cast-conversation). Gets all casts, including root cast and all replies for a given thread hash. No limit the depth of replies. - * @summary DEPRECATED - Fetch all casts in a given thread hash - * @param {string} threadHash The hash of the thread to fetch casts from. - * @param {number} [viewerFid] FID of the user viewing this information, needed for contextual information. - * @param {*} [options] Override http request option. - * @deprecated - * @throws {RequiredError} - */ - async allCastsInThread(threadHash: string, viewerFid?: number, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.allCastsInThread(threadHash, viewerFid, options); - const localVarOperationServerIndex = configuration?.serverIndex ?? 0; - const localVarOperationServerBasePath = operationServerMap['CastApi.allCastsInThread']?.[localVarOperationServerIndex]?.url; - return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); - }, - /** - * Now deprecated, use [v2/cast](https://docs.neynar.com/reference/cast). Gets information about an individual cast - * @summary DEPRECATED - Fetch cast for a given hash - * @param {string} hash Cast hash - * @param {number} [viewerFid] FID of the user viewing this information, needed for contextual information. - * @param {*} [options] Override http request option. - * @deprecated - * @throws {RequiredError} - */ - async cast(hash: string, viewerFid?: number, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.cast(hash, viewerFid, options); - const localVarOperationServerIndex = configuration?.serverIndex ?? 0; - const localVarOperationServerBasePath = operationServerMap['CastApi.cast']?.[localVarOperationServerIndex]?.url; - return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); - }, - /** - * Now deprecated, use [/v2/farcaster/feed/user/casts](https://docs.neynar.com/reference/feed-user-casts) instead - * @summary DEPRECATED - Casts by user - * @param {number} fid FID of a user - * @param {string} [parentUrl] A cast can be part of a certain channel. The channel is identified by `parent_url`. All casts in the channel ladder up to the same parent_url. - * @param {number} [viewerFid] FID of the user viewing this information, needed for contextual information. - * @param {number} [limit] Number of results to fetch (default 25, max 150) - * @param {string} [cursor] Pagination cursor. - * @param {*} [options] Override http request option. - * @deprecated - * @throws {RequiredError} - */ - async casts(fid: number, parentUrl?: string, viewerFid?: number, limit?: number, cursor?: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.casts(fid, parentUrl, viewerFid, limit, cursor, options); - const localVarOperationServerIndex = configuration?.serverIndex ?? 0; - const localVarOperationServerBasePath = operationServerMap['CastApi.casts']?.[localVarOperationServerIndex]?.url; - return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); - }, - /** - * Fetch a list of casts from the protocol in reverse chronological order based on timestamp - * @summary Fetch Recent Casts - * @param {number} [viewerFid] FID of the user viewing this information, needed for contextual information. - * @param {number} [limit] Number of results to fetch (default 25, max 100) - * @param {string} [cursor] Pagination cursor. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - async recentCasts(viewerFid?: number, limit?: number, cursor?: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.recentCasts(viewerFid, limit, cursor, options); - const localVarOperationServerIndex = configuration?.serverIndex ?? 0; - const localVarOperationServerBasePath = operationServerMap['CastApi.recentCasts']?.[localVarOperationServerIndex]?.url; - return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); - }, - } -}; - -/** - * CastApi - factory interface - * @export - */ -export const CastApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) { - const localVarFp = CastApiFp(configuration) - return { - /** - * Now deprecated, use [v2/cast/conversation](https://docs.neynar.com/reference/cast-conversation). Gets all casts, including root cast and all replies for a given thread hash. No limit the depth of replies. - * @summary DEPRECATED - Fetch all casts in a given thread hash - * @param {string} threadHash The hash of the thread to fetch casts from. - * @param {number} [viewerFid] FID of the user viewing this information, needed for contextual information. - * @param {*} [options] Override http request option. - * @deprecated - * @throws {RequiredError} - */ - allCastsInThread(threadHash: string, viewerFid?: number, options?: RawAxiosRequestConfig): AxiosPromise { - return localVarFp.allCastsInThread(threadHash, viewerFid, options).then((request) => request(axios, basePath)); - }, - /** - * Now deprecated, use [v2/cast](https://docs.neynar.com/reference/cast). Gets information about an individual cast - * @summary DEPRECATED - Fetch cast for a given hash - * @param {string} hash Cast hash - * @param {number} [viewerFid] FID of the user viewing this information, needed for contextual information. - * @param {*} [options] Override http request option. - * @deprecated - * @throws {RequiredError} - */ - cast(hash: string, viewerFid?: number, options?: RawAxiosRequestConfig): AxiosPromise { - return localVarFp.cast(hash, viewerFid, options).then((request) => request(axios, basePath)); - }, - /** - * Now deprecated, use [/v2/farcaster/feed/user/casts](https://docs.neynar.com/reference/feed-user-casts) instead - * @summary DEPRECATED - Casts by user - * @param {number} fid FID of a user - * @param {string} [parentUrl] A cast can be part of a certain channel. The channel is identified by `parent_url`. All casts in the channel ladder up to the same parent_url. - * @param {number} [viewerFid] FID of the user viewing this information, needed for contextual information. - * @param {number} [limit] Number of results to fetch (default 25, max 150) - * @param {string} [cursor] Pagination cursor. - * @param {*} [options] Override http request option. - * @deprecated - * @throws {RequiredError} - */ - casts(fid: number, parentUrl?: string, viewerFid?: number, limit?: number, cursor?: string, options?: RawAxiosRequestConfig): AxiosPromise { - return localVarFp.casts(fid, parentUrl, viewerFid, limit, cursor, options).then((request) => request(axios, basePath)); - }, - /** - * Fetch a list of casts from the protocol in reverse chronological order based on timestamp - * @summary Fetch Recent Casts - * @param {number} [viewerFid] FID of the user viewing this information, needed for contextual information. - * @param {number} [limit] Number of results to fetch (default 25, max 100) - * @param {string} [cursor] Pagination cursor. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - recentCasts(viewerFid?: number, limit?: number, cursor?: string, options?: RawAxiosRequestConfig): AxiosPromise { - return localVarFp.recentCasts(viewerFid, limit, cursor, options).then((request) => request(axios, basePath)); - }, - }; -}; - -/** - * CastApi - object-oriented interface - * @export - * @class CastApi - * @extends {BaseAPI} - */ -export class CastApi extends BaseAPI { - /** - * Now deprecated, use [v2/cast/conversation](https://docs.neynar.com/reference/cast-conversation). Gets all casts, including root cast and all replies for a given thread hash. No limit the depth of replies. - * @summary DEPRECATED - Fetch all casts in a given thread hash - * @param {string} threadHash The hash of the thread to fetch casts from. - * @param {number} [viewerFid] FID of the user viewing this information, needed for contextual information. - * @param {*} [options] Override http request option. - * @deprecated - * @throws {RequiredError} - * @memberof CastApi - */ - public allCastsInThread(threadHash: string, viewerFid?: number, options?: RawAxiosRequestConfig) { - return CastApiFp(this.configuration).allCastsInThread(threadHash, viewerFid, options).then((request) => request(this.axios, this.basePath)); - } - - /** - * Now deprecated, use [v2/cast](https://docs.neynar.com/reference/cast). Gets information about an individual cast - * @summary DEPRECATED - Fetch cast for a given hash - * @param {string} hash Cast hash - * @param {number} [viewerFid] FID of the user viewing this information, needed for contextual information. - * @param {*} [options] Override http request option. - * @deprecated - * @throws {RequiredError} - * @memberof CastApi - */ - public cast(hash: string, viewerFid?: number, options?: RawAxiosRequestConfig) { - return CastApiFp(this.configuration).cast(hash, viewerFid, options).then((request) => request(this.axios, this.basePath)); - } - - /** - * Now deprecated, use [/v2/farcaster/feed/user/casts](https://docs.neynar.com/reference/feed-user-casts) instead - * @summary DEPRECATED - Casts by user - * @param {number} fid FID of a user - * @param {string} [parentUrl] A cast can be part of a certain channel. The channel is identified by `parent_url`. All casts in the channel ladder up to the same parent_url. - * @param {number} [viewerFid] FID of the user viewing this information, needed for contextual information. - * @param {number} [limit] Number of results to fetch (default 25, max 150) - * @param {string} [cursor] Pagination cursor. - * @param {*} [options] Override http request option. - * @deprecated - * @throws {RequiredError} - * @memberof CastApi - */ - public casts(fid: number, parentUrl?: string, viewerFid?: number, limit?: number, cursor?: string, options?: RawAxiosRequestConfig) { - return CastApiFp(this.configuration).casts(fid, parentUrl, viewerFid, limit, cursor, options).then((request) => request(this.axios, this.basePath)); - } - - /** - * Fetch a list of casts from the protocol in reverse chronological order based on timestamp - * @summary Fetch Recent Casts - * @param {number} [viewerFid] FID of the user viewing this information, needed for contextual information. - * @param {number} [limit] Number of results to fetch (default 25, max 100) - * @param {string} [cursor] Pagination cursor. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof CastApi - */ - public recentCasts(viewerFid?: number, limit?: number, cursor?: string, options?: RawAxiosRequestConfig) { - return CastApiFp(this.configuration).recentCasts(viewerFid, limit, cursor, options).then((request) => request(this.axios, this.basePath)); - } -} - - - -/** - * FollowsApi - axios parameter creator - * @export - */ -export const FollowsApiAxiosParamCreator = function (configuration?: Configuration) { - return { - /** - * Gets a list of users who follow a user in reverse chronological order. - * @summary Gets all followers for a given FID - * @param {number} fid FID of the user - * @param {number} [viewerFid] FID of the user viewing this information, needed for contextual information. - * @param {number} [limit] Number of results to fetch (default 25, max 150) - * @param {string} [cursor] Pagination cursor. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - followers: async (fid: number, viewerFid?: number, limit?: number, cursor?: string, options: RawAxiosRequestConfig = {}): Promise => { - // verify required parameter 'fid' is not null or undefined - assertParamExists('followers', 'fid', fid) - const localVarPath = `/farcaster/followers`; - // use dummy base URL string because the URL constructor only accepts absolute URLs. - const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); - let baseOptions; - if (configuration) { - baseOptions = configuration.baseOptions; - } - - const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; - const localVarHeaderParameter = {} as any; - const localVarQueryParameter = {} as any; - - // authentication ApiKeyAuth required - await setApiKeyToObject(localVarHeaderParameter, "x-api-key", configuration) - - if (fid !== undefined) { - localVarQueryParameter['fid'] = fid; - } - - if (viewerFid !== undefined) { - localVarQueryParameter['viewerFid'] = viewerFid; - } - - if (limit !== undefined) { - localVarQueryParameter['limit'] = limit; - } - - if (cursor !== undefined) { - localVarQueryParameter['cursor'] = cursor; - } - - - - setSearchParams(localVarUrlObj, localVarQueryParameter); - let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; - localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; - - return { - url: toPathString(localVarUrlObj), - options: localVarRequestOptions, - }; - }, - /** - * Gets a list of users who is following a user in reverse chronological order. - * @summary Gets all following users of a FID - * @param {number} fid FID of the user - * @param {number} [viewerFid] FID of the user viewing this information, needed for contextual information. - * @param {number} [limit] Number of results to fetch (default 25, max 150) - * @param {string} [cursor] Pagination cursor. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - following: async (fid: number, viewerFid?: number, limit?: number, cursor?: string, options: RawAxiosRequestConfig = {}): Promise => { - // verify required parameter 'fid' is not null or undefined - assertParamExists('following', 'fid', fid) - const localVarPath = `/farcaster/following`; - // use dummy base URL string because the URL constructor only accepts absolute URLs. - const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); - let baseOptions; - if (configuration) { - baseOptions = configuration.baseOptions; - } - - const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; - const localVarHeaderParameter = {} as any; - const localVarQueryParameter = {} as any; - - // authentication ApiKeyAuth required - await setApiKeyToObject(localVarHeaderParameter, "x-api-key", configuration) - - if (fid !== undefined) { - localVarQueryParameter['fid'] = fid; - } - - if (viewerFid !== undefined) { - localVarQueryParameter['viewerFid'] = viewerFid; - } - - if (limit !== undefined) { - localVarQueryParameter['limit'] = limit; - } - - if (cursor !== undefined) { - localVarQueryParameter['cursor'] = cursor; - } - - - - setSearchParams(localVarUrlObj, localVarQueryParameter); - let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; - localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; - - return { - url: toPathString(localVarUrlObj), - options: localVarRequestOptions, - }; - }, - } -}; - -/** - * FollowsApi - functional programming interface - * @export - */ -export const FollowsApiFp = function(configuration?: Configuration) { - const localVarAxiosParamCreator = FollowsApiAxiosParamCreator(configuration) - return { - /** - * Gets a list of users who follow a user in reverse chronological order. - * @summary Gets all followers for a given FID - * @param {number} fid FID of the user - * @param {number} [viewerFid] FID of the user viewing this information, needed for contextual information. - * @param {number} [limit] Number of results to fetch (default 25, max 150) - * @param {string} [cursor] Pagination cursor. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - async followers(fid: number, viewerFid?: number, limit?: number, cursor?: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.followers(fid, viewerFid, limit, cursor, options); - const localVarOperationServerIndex = configuration?.serverIndex ?? 0; - const localVarOperationServerBasePath = operationServerMap['FollowsApi.followers']?.[localVarOperationServerIndex]?.url; - return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); - }, - /** - * Gets a list of users who is following a user in reverse chronological order. - * @summary Gets all following users of a FID - * @param {number} fid FID of the user - * @param {number} [viewerFid] FID of the user viewing this information, needed for contextual information. - * @param {number} [limit] Number of results to fetch (default 25, max 150) - * @param {string} [cursor] Pagination cursor. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - async following(fid: number, viewerFid?: number, limit?: number, cursor?: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.following(fid, viewerFid, limit, cursor, options); - const localVarOperationServerIndex = configuration?.serverIndex ?? 0; - const localVarOperationServerBasePath = operationServerMap['FollowsApi.following']?.[localVarOperationServerIndex]?.url; - return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); - }, - } -}; - -/** - * FollowsApi - factory interface - * @export - */ -export const FollowsApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) { - const localVarFp = FollowsApiFp(configuration) - return { - /** - * Gets a list of users who follow a user in reverse chronological order. - * @summary Gets all followers for a given FID - * @param {number} fid FID of the user - * @param {number} [viewerFid] FID of the user viewing this information, needed for contextual information. - * @param {number} [limit] Number of results to fetch (default 25, max 150) - * @param {string} [cursor] Pagination cursor. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - followers(fid: number, viewerFid?: number, limit?: number, cursor?: string, options?: RawAxiosRequestConfig): AxiosPromise { - return localVarFp.followers(fid, viewerFid, limit, cursor, options).then((request) => request(axios, basePath)); - }, - /** - * Gets a list of users who is following a user in reverse chronological order. - * @summary Gets all following users of a FID - * @param {number} fid FID of the user - * @param {number} [viewerFid] FID of the user viewing this information, needed for contextual information. - * @param {number} [limit] Number of results to fetch (default 25, max 150) - * @param {string} [cursor] Pagination cursor. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - following(fid: number, viewerFid?: number, limit?: number, cursor?: string, options?: RawAxiosRequestConfig): AxiosPromise { - return localVarFp.following(fid, viewerFid, limit, cursor, options).then((request) => request(axios, basePath)); - }, - }; -}; - -/** - * FollowsApi - object-oriented interface - * @export - * @class FollowsApi - * @extends {BaseAPI} - */ -export class FollowsApi extends BaseAPI { - /** - * Gets a list of users who follow a user in reverse chronological order. - * @summary Gets all followers for a given FID - * @param {number} fid FID of the user - * @param {number} [viewerFid] FID of the user viewing this information, needed for contextual information. - * @param {number} [limit] Number of results to fetch (default 25, max 150) - * @param {string} [cursor] Pagination cursor. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof FollowsApi - */ - public followers(fid: number, viewerFid?: number, limit?: number, cursor?: string, options?: RawAxiosRequestConfig) { - return FollowsApiFp(this.configuration).followers(fid, viewerFid, limit, cursor, options).then((request) => request(this.axios, this.basePath)); - } - - /** - * Gets a list of users who is following a user in reverse chronological order. - * @summary Gets all following users of a FID - * @param {number} fid FID of the user - * @param {number} [viewerFid] FID of the user viewing this information, needed for contextual information. - * @param {number} [limit] Number of results to fetch (default 25, max 150) - * @param {string} [cursor] Pagination cursor. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof FollowsApi - */ - public following(fid: number, viewerFid?: number, limit?: number, cursor?: string, options?: RawAxiosRequestConfig) { - return FollowsApiFp(this.configuration).following(fid, viewerFid, limit, cursor, options).then((request) => request(this.axios, this.basePath)); - } -} - - - -/** - * NotificationsApi - axios parameter creator - * @export - */ -export const NotificationsApiAxiosParamCreator = function (configuration?: Configuration) { - return { - /** - * Gets a list of 15 mentions and replies to the user’s casts in reverse chronological order - * @summary Fetch mentions and replies - * @param {number} fid FID of a user - * @param {number} [viewerFid] FID of the user viewing this information, needed for contextual information. - * @param {string} [cursor] Pagination cursor. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - mentionsAndReplies: async (fid: number, viewerFid?: number, cursor?: string, options: RawAxiosRequestConfig = {}): Promise => { - // verify required parameter 'fid' is not null or undefined - assertParamExists('mentionsAndReplies', 'fid', fid) - const localVarPath = `/farcaster/mentions-and-replies`; - // use dummy base URL string because the URL constructor only accepts absolute URLs. - const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); - let baseOptions; - if (configuration) { - baseOptions = configuration.baseOptions; - } - - const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; - const localVarHeaderParameter = {} as any; - const localVarQueryParameter = {} as any; - - // authentication ApiKeyAuth required - await setApiKeyToObject(localVarHeaderParameter, "x-api-key", configuration) - - if (fid !== undefined) { - localVarQueryParameter['fid'] = fid; - } - - if (viewerFid !== undefined) { - localVarQueryParameter['viewerFid'] = viewerFid; - } - - if (cursor !== undefined) { - localVarQueryParameter['cursor'] = cursor; - } - - - - setSearchParams(localVarUrlObj, localVarQueryParameter); - let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; - localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; - - return { - url: toPathString(localVarUrlObj), - options: localVarRequestOptions, - }; - }, - /** - * Fetch a list of reactions and recasts to the users’s casts in reverse chronological order - * @summary Fetch reactions and recasts - * @param {number} fid FID of a user - * @param {number} [viewerFid] FID of the user viewing this information, needed for contextual information. - * @param {number} [limit] Number of results to fetch (default 25, max 150) - * @param {string} [cursor] Pagination cursor. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - reactionsAndRecasts: async (fid: number, viewerFid?: number, limit?: number, cursor?: string, options: RawAxiosRequestConfig = {}): Promise => { - // verify required parameter 'fid' is not null or undefined - assertParamExists('reactionsAndRecasts', 'fid', fid) - const localVarPath = `/farcaster/reactions-and-recasts`; - // use dummy base URL string because the URL constructor only accepts absolute URLs. - const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); - let baseOptions; - if (configuration) { - baseOptions = configuration.baseOptions; - } - - const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; - const localVarHeaderParameter = {} as any; - const localVarQueryParameter = {} as any; - - // authentication ApiKeyAuth required - await setApiKeyToObject(localVarHeaderParameter, "x-api-key", configuration) - - if (fid !== undefined) { - localVarQueryParameter['fid'] = fid; - } - - if (viewerFid !== undefined) { - localVarQueryParameter['viewerFid'] = viewerFid; - } - - if (limit !== undefined) { - localVarQueryParameter['limit'] = limit; - } - - if (cursor !== undefined) { - localVarQueryParameter['cursor'] = cursor; - } - - - - setSearchParams(localVarUrlObj, localVarQueryParameter); - let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; - localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; - - return { - url: toPathString(localVarUrlObj), - options: localVarRequestOptions, - }; - }, - } -}; - -/** - * NotificationsApi - functional programming interface - * @export - */ -export const NotificationsApiFp = function(configuration?: Configuration) { - const localVarAxiosParamCreator = NotificationsApiAxiosParamCreator(configuration) - return { - /** - * Gets a list of 15 mentions and replies to the user’s casts in reverse chronological order - * @summary Fetch mentions and replies - * @param {number} fid FID of a user - * @param {number} [viewerFid] FID of the user viewing this information, needed for contextual information. - * @param {string} [cursor] Pagination cursor. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - async mentionsAndReplies(fid: number, viewerFid?: number, cursor?: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.mentionsAndReplies(fid, viewerFid, cursor, options); - const localVarOperationServerIndex = configuration?.serverIndex ?? 0; - const localVarOperationServerBasePath = operationServerMap['NotificationsApi.mentionsAndReplies']?.[localVarOperationServerIndex]?.url; - return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); - }, - /** - * Fetch a list of reactions and recasts to the users’s casts in reverse chronological order - * @summary Fetch reactions and recasts - * @param {number} fid FID of a user - * @param {number} [viewerFid] FID of the user viewing this information, needed for contextual information. - * @param {number} [limit] Number of results to fetch (default 25, max 150) - * @param {string} [cursor] Pagination cursor. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - async reactionsAndRecasts(fid: number, viewerFid?: number, limit?: number, cursor?: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.reactionsAndRecasts(fid, viewerFid, limit, cursor, options); - const localVarOperationServerIndex = configuration?.serverIndex ?? 0; - const localVarOperationServerBasePath = operationServerMap['NotificationsApi.reactionsAndRecasts']?.[localVarOperationServerIndex]?.url; - return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); - }, - } -}; - -/** - * NotificationsApi - factory interface - * @export - */ -export const NotificationsApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) { - const localVarFp = NotificationsApiFp(configuration) - return { - /** - * Gets a list of 15 mentions and replies to the user’s casts in reverse chronological order - * @summary Fetch mentions and replies - * @param {number} fid FID of a user - * @param {number} [viewerFid] FID of the user viewing this information, needed for contextual information. - * @param {string} [cursor] Pagination cursor. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - mentionsAndReplies(fid: number, viewerFid?: number, cursor?: string, options?: RawAxiosRequestConfig): AxiosPromise { - return localVarFp.mentionsAndReplies(fid, viewerFid, cursor, options).then((request) => request(axios, basePath)); - }, - /** - * Fetch a list of reactions and recasts to the users’s casts in reverse chronological order - * @summary Fetch reactions and recasts - * @param {number} fid FID of a user - * @param {number} [viewerFid] FID of the user viewing this information, needed for contextual information. - * @param {number} [limit] Number of results to fetch (default 25, max 150) - * @param {string} [cursor] Pagination cursor. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - reactionsAndRecasts(fid: number, viewerFid?: number, limit?: number, cursor?: string, options?: RawAxiosRequestConfig): AxiosPromise { - return localVarFp.reactionsAndRecasts(fid, viewerFid, limit, cursor, options).then((request) => request(axios, basePath)); - }, - }; -}; - -/** - * NotificationsApi - object-oriented interface - * @export - * @class NotificationsApi - * @extends {BaseAPI} - */ -export class NotificationsApi extends BaseAPI { - /** - * Gets a list of 15 mentions and replies to the user’s casts in reverse chronological order - * @summary Fetch mentions and replies - * @param {number} fid FID of a user - * @param {number} [viewerFid] FID of the user viewing this information, needed for contextual information. - * @param {string} [cursor] Pagination cursor. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof NotificationsApi - */ - public mentionsAndReplies(fid: number, viewerFid?: number, cursor?: string, options?: RawAxiosRequestConfig) { - return NotificationsApiFp(this.configuration).mentionsAndReplies(fid, viewerFid, cursor, options).then((request) => request(this.axios, this.basePath)); - } - - /** - * Fetch a list of reactions and recasts to the users’s casts in reverse chronological order - * @summary Fetch reactions and recasts - * @param {number} fid FID of a user - * @param {number} [viewerFid] FID of the user viewing this information, needed for contextual information. - * @param {number} [limit] Number of results to fetch (default 25, max 150) - * @param {string} [cursor] Pagination cursor. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof NotificationsApi - */ - public reactionsAndRecasts(fid: number, viewerFid?: number, limit?: number, cursor?: string, options?: RawAxiosRequestConfig) { - return NotificationsApiFp(this.configuration).reactionsAndRecasts(fid, viewerFid, limit, cursor, options).then((request) => request(this.axios, this.basePath)); - } -} - - - -/** - * UserApi - axios parameter creator - * @export - */ -export const UserApiAxiosParamCreator = function (configuration?: Configuration) { - return { - /** - * Now deprecated, use [v2/user/bulk](https://docs.neynar.com/reference/user-bulk), find custody address in user obj. Returns the custody address for a given FID - * @summary DEPRECATED - Fetch the custody address for a given FID - * @param {number} fid FID of a user - * @param {*} [options] Override http request option. - * @deprecated - * @throws {RequiredError} - */ - custodyAddress: async (fid: number, options: RawAxiosRequestConfig = {}): Promise => { - // verify required parameter 'fid' is not null or undefined - assertParamExists('custodyAddress', 'fid', fid) - const localVarPath = `/farcaster/custody-address`; - // use dummy base URL string because the URL constructor only accepts absolute URLs. - const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); - let baseOptions; - if (configuration) { - baseOptions = configuration.baseOptions; - } - - const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; - const localVarHeaderParameter = {} as any; - const localVarQueryParameter = {} as any; - - // authentication ApiKeyAuth required - await setApiKeyToObject(localVarHeaderParameter, "x-api-key", configuration) - - if (fid !== undefined) { - localVarQueryParameter['fid'] = fid; - } - - - - setSearchParams(localVarUrlObj, localVarQueryParameter); - let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; - localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; - - return { - url: toPathString(localVarUrlObj), - options: localVarRequestOptions, - }; - }, - /** - * Fetch a list of casts from the protocol in reverse chronological order based on timestamp - * @summary Fetch Recent Users - * @param {number} [viewerFid] FID of the user viewing this information, needed for contextual information. - * @param {number} [limit] Number of results to fetch (default 100, max 1000) - * @param {string} [cursor] Pagination cursor. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - recentUsers: async (viewerFid?: number, limit?: number, cursor?: string, options: RawAxiosRequestConfig = {}): Promise => { - const localVarPath = `/farcaster/recent-users`; - // use dummy base URL string because the URL constructor only accepts absolute URLs. - const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); - let baseOptions; - if (configuration) { - baseOptions = configuration.baseOptions; - } - - const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; - const localVarHeaderParameter = {} as any; - const localVarQueryParameter = {} as any; - - // authentication ApiKeyAuth required - await setApiKeyToObject(localVarHeaderParameter, "x-api-key", configuration) - - if (viewerFid !== undefined) { - localVarQueryParameter['viewerFid'] = viewerFid; - } - - if (limit !== undefined) { - localVarQueryParameter['limit'] = limit; - } - - if (cursor !== undefined) { - localVarQueryParameter['cursor'] = cursor; - } - - - - setSearchParams(localVarUrlObj, localVarQueryParameter); - let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; - localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; - - return { - url: toPathString(localVarUrlObj), - options: localVarRequestOptions, - }; - }, - /** - * Now deprecated, use [v2/user/bulk](https://docs.neynar.com/reference/user-bulk). Returns metadata about a specific user - * @summary DEPRECATED - Fetch User Information by FID - * @param {number} fid FID of a user - * @param {number} [viewerFid] FID of the user viewing this information, needed for contextual information. - * @param {*} [options] Override http request option. - * @deprecated - * @throws {RequiredError} - */ - user: async (fid: number, viewerFid?: number, options: RawAxiosRequestConfig = {}): Promise => { - // verify required parameter 'fid' is not null or undefined - assertParamExists('user', 'fid', fid) - const localVarPath = `/farcaster/user`; - // use dummy base URL string because the URL constructor only accepts absolute URLs. - const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); - let baseOptions; - if (configuration) { - baseOptions = configuration.baseOptions; - } - - const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; - const localVarHeaderParameter = {} as any; - const localVarQueryParameter = {} as any; - - // authentication ApiKeyAuth required - await setApiKeyToObject(localVarHeaderParameter, "x-api-key", configuration) - - if (fid !== undefined) { - localVarQueryParameter['fid'] = fid; - } - - if (viewerFid !== undefined) { - localVarQueryParameter['viewerFid'] = viewerFid; - } - - - - setSearchParams(localVarUrlObj, localVarQueryParameter); - let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; - localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; - - return { - url: toPathString(localVarUrlObj), - options: localVarRequestOptions, - }; - }, - /** - * Now deprecated, use [v2/user/by_username](https://docs.neynar.com/reference/user-by-username-v2) instead. Returns metadata about a specific user - * @summary DEPRECATED - Fetch User Information by username - * @param {string} username Username of the user - * @param {number} [viewerFid] FID of the user viewing this information, needed for contextual information. - * @param {*} [options] Override http request option. - * @deprecated - * @throws {RequiredError} - */ - userByUsernameV1: async (username: string, viewerFid?: number, options: RawAxiosRequestConfig = {}): Promise => { - // verify required parameter 'username' is not null or undefined - assertParamExists('userByUsernameV1', 'username', username) - const localVarPath = `/farcaster/user-by-username`; - // use dummy base URL string because the URL constructor only accepts absolute URLs. - const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); - let baseOptions; - if (configuration) { - baseOptions = configuration.baseOptions; - } - - const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; - const localVarHeaderParameter = {} as any; - const localVarQueryParameter = {} as any; - - // authentication ApiKeyAuth required - await setApiKeyToObject(localVarHeaderParameter, "x-api-key", configuration) - - if (username !== undefined) { - localVarQueryParameter['username'] = username; - } - - if (viewerFid !== undefined) { - localVarQueryParameter['viewerFid'] = viewerFid; - } - - - - setSearchParams(localVarUrlObj, localVarQueryParameter); - let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; - localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; - - return { - url: toPathString(localVarUrlObj), - options: localVarRequestOptions, - }; - }, - /** - * Now deprecated. use [/v2/reactions/user](https://docs.neynar.com/reference/reactions-user). Fetch all the liked cast of a User - * @summary DEPRECATED -- Fetch User Cast Likes - * @param {number} fid FID of the user - * @param {number} [viewerFid] FID of the user viewing this information, needed for contextual information. - * @param {number} [limit] Number of results to fetch (default 25, max 150) - * @param {string} [cursor] Pagination cursor - * @param {*} [options] Override http request option. - * @deprecated - * @throws {RequiredError} - */ - userCastLikes: async (fid: number, viewerFid?: number, limit?: number, cursor?: string, options: RawAxiosRequestConfig = {}): Promise => { - // verify required parameter 'fid' is not null or undefined - assertParamExists('userCastLikes', 'fid', fid) - const localVarPath = `/farcaster/user-cast-likes`; - // use dummy base URL string because the URL constructor only accepts absolute URLs. - const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); - let baseOptions; - if (configuration) { - baseOptions = configuration.baseOptions; - } - - const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; - const localVarHeaderParameter = {} as any; - const localVarQueryParameter = {} as any; - - // authentication ApiKeyAuth required - await setApiKeyToObject(localVarHeaderParameter, "x-api-key", configuration) - - if (fid !== undefined) { - localVarQueryParameter['fid'] = fid; - } - - if (viewerFid !== undefined) { - localVarQueryParameter['viewerFid'] = viewerFid; - } - - if (limit !== undefined) { - localVarQueryParameter['limit'] = limit; - } - - if (cursor !== undefined) { - localVarQueryParameter['cursor'] = cursor; - } - - - - setSearchParams(localVarUrlObj, localVarQueryParameter); - let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; - localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; - - return { - url: toPathString(localVarUrlObj), - options: localVarRequestOptions, - }; - }, - } -}; - -/** - * UserApi - functional programming interface - * @export - */ -export const UserApiFp = function(configuration?: Configuration) { - const localVarAxiosParamCreator = UserApiAxiosParamCreator(configuration) - return { - /** - * Now deprecated, use [v2/user/bulk](https://docs.neynar.com/reference/user-bulk), find custody address in user obj. Returns the custody address for a given FID - * @summary DEPRECATED - Fetch the custody address for a given FID - * @param {number} fid FID of a user - * @param {*} [options] Override http request option. - * @deprecated - * @throws {RequiredError} - */ - async custodyAddress(fid: number, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.custodyAddress(fid, options); - const localVarOperationServerIndex = configuration?.serverIndex ?? 0; - const localVarOperationServerBasePath = operationServerMap['UserApi.custodyAddress']?.[localVarOperationServerIndex]?.url; - return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); - }, - /** - * Fetch a list of casts from the protocol in reverse chronological order based on timestamp - * @summary Fetch Recent Users - * @param {number} [viewerFid] FID of the user viewing this information, needed for contextual information. - * @param {number} [limit] Number of results to fetch (default 100, max 1000) - * @param {string} [cursor] Pagination cursor. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - async recentUsers(viewerFid?: number, limit?: number, cursor?: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.recentUsers(viewerFid, limit, cursor, options); - const localVarOperationServerIndex = configuration?.serverIndex ?? 0; - const localVarOperationServerBasePath = operationServerMap['UserApi.recentUsers']?.[localVarOperationServerIndex]?.url; - return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); - }, - /** - * Now deprecated, use [v2/user/bulk](https://docs.neynar.com/reference/user-bulk). Returns metadata about a specific user - * @summary DEPRECATED - Fetch User Information by FID - * @param {number} fid FID of a user - * @param {number} [viewerFid] FID of the user viewing this information, needed for contextual information. - * @param {*} [options] Override http request option. - * @deprecated - * @throws {RequiredError} - */ - async user(fid: number, viewerFid?: number, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.user(fid, viewerFid, options); - const localVarOperationServerIndex = configuration?.serverIndex ?? 0; - const localVarOperationServerBasePath = operationServerMap['UserApi.user']?.[localVarOperationServerIndex]?.url; - return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); - }, - /** - * Now deprecated, use [v2/user/by_username](https://docs.neynar.com/reference/user-by-username-v2) instead. Returns metadata about a specific user - * @summary DEPRECATED - Fetch User Information by username - * @param {string} username Username of the user - * @param {number} [viewerFid] FID of the user viewing this information, needed for contextual information. - * @param {*} [options] Override http request option. - * @deprecated - * @throws {RequiredError} - */ - async userByUsernameV1(username: string, viewerFid?: number, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.userByUsernameV1(username, viewerFid, options); - const localVarOperationServerIndex = configuration?.serverIndex ?? 0; - const localVarOperationServerBasePath = operationServerMap['UserApi.userByUsernameV1']?.[localVarOperationServerIndex]?.url; - return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); - }, - /** - * Now deprecated. use [/v2/reactions/user](https://docs.neynar.com/reference/reactions-user). Fetch all the liked cast of a User - * @summary DEPRECATED -- Fetch User Cast Likes - * @param {number} fid FID of the user - * @param {number} [viewerFid] FID of the user viewing this information, needed for contextual information. - * @param {number} [limit] Number of results to fetch (default 25, max 150) - * @param {string} [cursor] Pagination cursor - * @param {*} [options] Override http request option. - * @deprecated - * @throws {RequiredError} - */ - async userCastLikes(fid: number, viewerFid?: number, limit?: number, cursor?: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.userCastLikes(fid, viewerFid, limit, cursor, options); - const localVarOperationServerIndex = configuration?.serverIndex ?? 0; - const localVarOperationServerBasePath = operationServerMap['UserApi.userCastLikes']?.[localVarOperationServerIndex]?.url; - return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); - }, - } -}; - -/** - * UserApi - factory interface - * @export - */ -export const UserApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) { - const localVarFp = UserApiFp(configuration) - return { - /** - * Now deprecated, use [v2/user/bulk](https://docs.neynar.com/reference/user-bulk), find custody address in user obj. Returns the custody address for a given FID - * @summary DEPRECATED - Fetch the custody address for a given FID - * @param {number} fid FID of a user - * @param {*} [options] Override http request option. - * @deprecated - * @throws {RequiredError} - */ - custodyAddress(fid: number, options?: RawAxiosRequestConfig): AxiosPromise { - return localVarFp.custodyAddress(fid, options).then((request) => request(axios, basePath)); - }, - /** - * Fetch a list of casts from the protocol in reverse chronological order based on timestamp - * @summary Fetch Recent Users - * @param {number} [viewerFid] FID of the user viewing this information, needed for contextual information. - * @param {number} [limit] Number of results to fetch (default 100, max 1000) - * @param {string} [cursor] Pagination cursor. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - recentUsers(viewerFid?: number, limit?: number, cursor?: string, options?: RawAxiosRequestConfig): AxiosPromise { - return localVarFp.recentUsers(viewerFid, limit, cursor, options).then((request) => request(axios, basePath)); - }, - /** - * Now deprecated, use [v2/user/bulk](https://docs.neynar.com/reference/user-bulk). Returns metadata about a specific user - * @summary DEPRECATED - Fetch User Information by FID - * @param {number} fid FID of a user - * @param {number} [viewerFid] FID of the user viewing this information, needed for contextual information. - * @param {*} [options] Override http request option. - * @deprecated - * @throws {RequiredError} - */ - user(fid: number, viewerFid?: number, options?: RawAxiosRequestConfig): AxiosPromise { - return localVarFp.user(fid, viewerFid, options).then((request) => request(axios, basePath)); - }, - /** - * Now deprecated, use [v2/user/by_username](https://docs.neynar.com/reference/user-by-username-v2) instead. Returns metadata about a specific user - * @summary DEPRECATED - Fetch User Information by username - * @param {string} username Username of the user - * @param {number} [viewerFid] FID of the user viewing this information, needed for contextual information. - * @param {*} [options] Override http request option. - * @deprecated - * @throws {RequiredError} - */ - userByUsernameV1(username: string, viewerFid?: number, options?: RawAxiosRequestConfig): AxiosPromise { - return localVarFp.userByUsernameV1(username, viewerFid, options).then((request) => request(axios, basePath)); - }, - /** - * Now deprecated. use [/v2/reactions/user](https://docs.neynar.com/reference/reactions-user). Fetch all the liked cast of a User - * @summary DEPRECATED -- Fetch User Cast Likes - * @param {number} fid FID of the user - * @param {number} [viewerFid] FID of the user viewing this information, needed for contextual information. - * @param {number} [limit] Number of results to fetch (default 25, max 150) - * @param {string} [cursor] Pagination cursor - * @param {*} [options] Override http request option. - * @deprecated - * @throws {RequiredError} - */ - userCastLikes(fid: number, viewerFid?: number, limit?: number, cursor?: string, options?: RawAxiosRequestConfig): AxiosPromise { - return localVarFp.userCastLikes(fid, viewerFid, limit, cursor, options).then((request) => request(axios, basePath)); - }, - }; -}; - -/** - * UserApi - object-oriented interface - * @export - * @class UserApi - * @extends {BaseAPI} - */ -export class UserApi extends BaseAPI { - /** - * Now deprecated, use [v2/user/bulk](https://docs.neynar.com/reference/user-bulk), find custody address in user obj. Returns the custody address for a given FID - * @summary DEPRECATED - Fetch the custody address for a given FID - * @param {number} fid FID of a user - * @param {*} [options] Override http request option. - * @deprecated - * @throws {RequiredError} - * @memberof UserApi - */ - public custodyAddress(fid: number, options?: RawAxiosRequestConfig) { - return UserApiFp(this.configuration).custodyAddress(fid, options).then((request) => request(this.axios, this.basePath)); - } - - /** - * Fetch a list of casts from the protocol in reverse chronological order based on timestamp - * @summary Fetch Recent Users - * @param {number} [viewerFid] FID of the user viewing this information, needed for contextual information. - * @param {number} [limit] Number of results to fetch (default 100, max 1000) - * @param {string} [cursor] Pagination cursor. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof UserApi - */ - public recentUsers(viewerFid?: number, limit?: number, cursor?: string, options?: RawAxiosRequestConfig) { - return UserApiFp(this.configuration).recentUsers(viewerFid, limit, cursor, options).then((request) => request(this.axios, this.basePath)); - } - - /** - * Now deprecated, use [v2/user/bulk](https://docs.neynar.com/reference/user-bulk). Returns metadata about a specific user - * @summary DEPRECATED - Fetch User Information by FID - * @param {number} fid FID of a user - * @param {number} [viewerFid] FID of the user viewing this information, needed for contextual information. - * @param {*} [options] Override http request option. - * @deprecated - * @throws {RequiredError} - * @memberof UserApi - */ - public user(fid: number, viewerFid?: number, options?: RawAxiosRequestConfig) { - return UserApiFp(this.configuration).user(fid, viewerFid, options).then((request) => request(this.axios, this.basePath)); - } - - /** - * Now deprecated, use [v2/user/by_username](https://docs.neynar.com/reference/user-by-username-v2) instead. Returns metadata about a specific user - * @summary DEPRECATED - Fetch User Information by username - * @param {string} username Username of the user - * @param {number} [viewerFid] FID of the user viewing this information, needed for contextual information. - * @param {*} [options] Override http request option. - * @deprecated - * @throws {RequiredError} - * @memberof UserApi - */ - public userByUsernameV1(username: string, viewerFid?: number, options?: RawAxiosRequestConfig) { - return UserApiFp(this.configuration).userByUsernameV1(username, viewerFid, options).then((request) => request(this.axios, this.basePath)); - } - - /** - * Now deprecated. use [/v2/reactions/user](https://docs.neynar.com/reference/reactions-user). Fetch all the liked cast of a User - * @summary DEPRECATED -- Fetch User Cast Likes - * @param {number} fid FID of the user - * @param {number} [viewerFid] FID of the user viewing this information, needed for contextual information. - * @param {number} [limit] Number of results to fetch (default 25, max 150) - * @param {string} [cursor] Pagination cursor - * @param {*} [options] Override http request option. - * @deprecated - * @throws {RequiredError} - * @memberof UserApi - */ - public userCastLikes(fid: number, viewerFid?: number, limit?: number, cursor?: string, options?: RawAxiosRequestConfig) { - return UserApiFp(this.configuration).userCastLikes(fid, viewerFid, limit, cursor, options).then((request) => request(this.axios, this.basePath)); - } -} - - - -/** - * VerificationApi - axios parameter creator - * @export - */ -export const VerificationApiAxiosParamCreator = function (configuration?: Configuration) { - return { - /** - * Now deprecated. Use [v2/user/bulk-by-address](https://docs.neynar.com/reference/user-bulk-by-address). Checks if a given Ethereum address has a Farcaster user associated with it. Note: if an address is associated with multiple users, the API will return the user who most recently published a verification with the address (based on when Warpcast received the proof, not a self-reported timestamp). - * @summary DEPRECATED - Fetch user for a given ethereum address - * @param {string} address - * @param {*} [options] Override http request option. - * @deprecated - * @throws {RequiredError} - */ - userByVerification: async (address: string, options: RawAxiosRequestConfig = {}): Promise => { - // verify required parameter 'address' is not null or undefined - assertParamExists('userByVerification', 'address', address) - const localVarPath = `/farcaster/user-by-verification`; - // use dummy base URL string because the URL constructor only accepts absolute URLs. - const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); - let baseOptions; - if (configuration) { - baseOptions = configuration.baseOptions; - } - - const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; - const localVarHeaderParameter = {} as any; - const localVarQueryParameter = {} as any; - - // authentication ApiKeyAuth required - await setApiKeyToObject(localVarHeaderParameter, "x-api-key", configuration) - - if (address !== undefined) { - localVarQueryParameter['address'] = address; - } - - - - setSearchParams(localVarUrlObj, localVarQueryParameter); - let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; - localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; - - return { - url: toPathString(localVarUrlObj), - options: localVarRequestOptions, - }; - }, - /** - * Now deprecated, use [v2/user/bulk](https://docs.neynar.com/reference/user-bulk), verifications are in the user object. Fetch all known verifications of a user. - * @summary DEPRECATED - Fetch verifications for a given FID - * @param {number} fid FID of the user - * @param {*} [options] Override http request option. - * @deprecated - * @throws {RequiredError} - */ - verifications: async (fid: number, options: RawAxiosRequestConfig = {}): Promise => { - // verify required parameter 'fid' is not null or undefined - assertParamExists('verifications', 'fid', fid) - const localVarPath = `/farcaster/verifications`; - // use dummy base URL string because the URL constructor only accepts absolute URLs. - const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); - let baseOptions; - if (configuration) { - baseOptions = configuration.baseOptions; - } - - const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; - const localVarHeaderParameter = {} as any; - const localVarQueryParameter = {} as any; - - // authentication ApiKeyAuth required - await setApiKeyToObject(localVarHeaderParameter, "x-api-key", configuration) - - if (fid !== undefined) { - localVarQueryParameter['fid'] = fid; - } - - - - setSearchParams(localVarUrlObj, localVarQueryParameter); - let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; - localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; - - return { - url: toPathString(localVarUrlObj), - options: localVarRequestOptions, - }; - }, - } -}; - -/** - * VerificationApi - functional programming interface - * @export - */ -export const VerificationApiFp = function(configuration?: Configuration) { - const localVarAxiosParamCreator = VerificationApiAxiosParamCreator(configuration) - return { - /** - * Now deprecated. Use [v2/user/bulk-by-address](https://docs.neynar.com/reference/user-bulk-by-address). Checks if a given Ethereum address has a Farcaster user associated with it. Note: if an address is associated with multiple users, the API will return the user who most recently published a verification with the address (based on when Warpcast received the proof, not a self-reported timestamp). - * @summary DEPRECATED - Fetch user for a given ethereum address - * @param {string} address - * @param {*} [options] Override http request option. - * @deprecated - * @throws {RequiredError} - */ - async userByVerification(address: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.userByVerification(address, options); - const localVarOperationServerIndex = configuration?.serverIndex ?? 0; - const localVarOperationServerBasePath = operationServerMap['VerificationApi.userByVerification']?.[localVarOperationServerIndex]?.url; - return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); - }, - /** - * Now deprecated, use [v2/user/bulk](https://docs.neynar.com/reference/user-bulk), verifications are in the user object. Fetch all known verifications of a user. - * @summary DEPRECATED - Fetch verifications for a given FID - * @param {number} fid FID of the user - * @param {*} [options] Override http request option. - * @deprecated - * @throws {RequiredError} - */ - async verifications(fid: number, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.verifications(fid, options); - const localVarOperationServerIndex = configuration?.serverIndex ?? 0; - const localVarOperationServerBasePath = operationServerMap['VerificationApi.verifications']?.[localVarOperationServerIndex]?.url; - return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); - }, - } -}; - -/** - * VerificationApi - factory interface - * @export - */ -export const VerificationApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) { - const localVarFp = VerificationApiFp(configuration) - return { - /** - * Now deprecated. Use [v2/user/bulk-by-address](https://docs.neynar.com/reference/user-bulk-by-address). Checks if a given Ethereum address has a Farcaster user associated with it. Note: if an address is associated with multiple users, the API will return the user who most recently published a verification with the address (based on when Warpcast received the proof, not a self-reported timestamp). - * @summary DEPRECATED - Fetch user for a given ethereum address - * @param {string} address - * @param {*} [options] Override http request option. - * @deprecated - * @throws {RequiredError} - */ - userByVerification(address: string, options?: RawAxiosRequestConfig): AxiosPromise { - return localVarFp.userByVerification(address, options).then((request) => request(axios, basePath)); - }, - /** - * Now deprecated, use [v2/user/bulk](https://docs.neynar.com/reference/user-bulk), verifications are in the user object. Fetch all known verifications of a user. - * @summary DEPRECATED - Fetch verifications for a given FID - * @param {number} fid FID of the user - * @param {*} [options] Override http request option. - * @deprecated - * @throws {RequiredError} - */ - verifications(fid: number, options?: RawAxiosRequestConfig): AxiosPromise { - return localVarFp.verifications(fid, options).then((request) => request(axios, basePath)); - }, - }; -}; - -/** - * VerificationApi - object-oriented interface - * @export - * @class VerificationApi - * @extends {BaseAPI} - */ -export class VerificationApi extends BaseAPI { - /** - * Now deprecated. Use [v2/user/bulk-by-address](https://docs.neynar.com/reference/user-bulk-by-address). Checks if a given Ethereum address has a Farcaster user associated with it. Note: if an address is associated with multiple users, the API will return the user who most recently published a verification with the address (based on when Warpcast received the proof, not a self-reported timestamp). - * @summary DEPRECATED - Fetch user for a given ethereum address - * @param {string} address - * @param {*} [options] Override http request option. - * @deprecated - * @throws {RequiredError} - * @memberof VerificationApi - */ - public userByVerification(address: string, options?: RawAxiosRequestConfig) { - return VerificationApiFp(this.configuration).userByVerification(address, options).then((request) => request(this.axios, this.basePath)); - } - - /** - * Now deprecated, use [v2/user/bulk](https://docs.neynar.com/reference/user-bulk), verifications are in the user object. Fetch all known verifications of a user. - * @summary DEPRECATED - Fetch verifications for a given FID - * @param {number} fid FID of the user - * @param {*} [options] Override http request option. - * @deprecated - * @throws {RequiredError} - * @memberof VerificationApi - */ - public verifications(fid: number, options?: RawAxiosRequestConfig) { - return VerificationApiFp(this.configuration).verifications(fid, options).then((request) => request(this.axios, this.basePath)); - } -} - +export * from './apis/cast-api'; +export * from './apis/follows-api'; +export * from './apis/notifications-api'; +export * from './apis/user-api'; +export * from './apis/verification-api'; diff --git a/src/neynar-api/v1/openapi/apis/cast-api.ts b/src/neynar-api/v1/openapi/apis/cast-api.ts new file mode 100644 index 00000000..09fa7a64 --- /dev/null +++ b/src/neynar-api/v1/openapi/apis/cast-api.ts @@ -0,0 +1,444 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Farcaster API V1 + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +import type { Configuration } from '../configuration'; +import type { AxiosPromise, AxiosInstance, RawAxiosRequestConfig } from 'axios'; +import globalAxios from 'axios'; +// Some imports not used depending on template conditions +// @ts-ignore +import { DUMMY_BASE_URL, assertParamExists, setApiKeyToObject, setBasicAuthToObject, setBearerAuthToObject, setOAuthToObject, setSearchParams, serializeDataIfNeeded, toPathString, createRequestFunction } from '../common'; +// @ts-ignore +import { BASE_PATH, COLLECTION_FORMATS, type RequestArgs, BaseAPI, RequiredError, operationServerMap } from '../base'; +// @ts-ignore +import type { AllCastsInThreadResponse } from '../models'; +// @ts-ignore +import type { CastResponse } from '../models'; +// @ts-ignore +import type { CastsResponse } from '../models'; +// @ts-ignore +import type { ErrorRes } from '../models'; +// @ts-ignore +import type { RecentCastsResponse } from '../models'; +/** + * CastApi - axios parameter creator + * @export + */ +export const CastApiAxiosParamCreator = function (configuration?: Configuration) { + return { + /** + * Now deprecated, use [v2/cast/conversation](https://docs.neynar.com/reference/cast-conversation). Gets all casts, including root cast and all replies for a given thread hash. No limit the depth of replies. + * @summary DEPRECATED - Fetch all casts in a given thread hash + * @param {string} threadHash The hash of the thread to fetch casts from. + * @param {number} [viewerFid] FID of the user viewing this information, needed for contextual information. + * @param {*} [options] Override http request option. + * @deprecated + * @throws {RequiredError} + */ + allCastsInThread: async (threadHash: string, viewerFid?: number, options: RawAxiosRequestConfig = {}): Promise => { + // verify required parameter 'threadHash' is not null or undefined + assertParamExists('allCastsInThread', 'threadHash', threadHash) + const localVarPath = `/farcaster/all-casts-in-thread`; + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication ApiKeyAuth required + await setApiKeyToObject(localVarHeaderParameter, "x-api-key", configuration) + + if (threadHash !== undefined) { + localVarQueryParameter['threadHash'] = threadHash; + } + + if (viewerFid !== undefined) { + localVarQueryParameter['viewerFid'] = viewerFid; + } + + + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * Now deprecated, use [v2/cast](https://docs.neynar.com/reference/cast). Gets information about an individual cast + * @summary DEPRECATED - Fetch cast for a given hash + * @param {string} hash Cast hash + * @param {number} [viewerFid] FID of the user viewing this information, needed for contextual information. + * @param {*} [options] Override http request option. + * @deprecated + * @throws {RequiredError} + */ + cast: async (hash: string, viewerFid?: number, options: RawAxiosRequestConfig = {}): Promise => { + // verify required parameter 'hash' is not null or undefined + assertParamExists('cast', 'hash', hash) + const localVarPath = `/farcaster/cast`; + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication ApiKeyAuth required + await setApiKeyToObject(localVarHeaderParameter, "x-api-key", configuration) + + if (hash !== undefined) { + localVarQueryParameter['hash'] = hash; + } + + if (viewerFid !== undefined) { + localVarQueryParameter['viewerFid'] = viewerFid; + } + + + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * Now deprecated, use [/v2/farcaster/feed/user/casts](https://docs.neynar.com/reference/feed-user-casts) instead + * @summary DEPRECATED - Casts by user + * @param {number} fid FID of a user + * @param {string} [parentUrl] A cast can be part of a certain channel. The channel is identified by `parent_url`. All casts in the channel ladder up to the same parent_url. + * @param {number} [viewerFid] FID of the user viewing this information, needed for contextual information. + * @param {number} [limit] Number of results to fetch (default 25, max 150) + * @param {string} [cursor] Pagination cursor. + * @param {*} [options] Override http request option. + * @deprecated + * @throws {RequiredError} + */ + casts: async (fid: number, parentUrl?: string, viewerFid?: number, limit?: number, cursor?: string, options: RawAxiosRequestConfig = {}): Promise => { + // verify required parameter 'fid' is not null or undefined + assertParamExists('casts', 'fid', fid) + const localVarPath = `/farcaster/casts`; + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication ApiKeyAuth required + await setApiKeyToObject(localVarHeaderParameter, "x-api-key", configuration) + + if (fid !== undefined) { + localVarQueryParameter['fid'] = fid; + } + + if (parentUrl !== undefined) { + localVarQueryParameter['parent_url'] = parentUrl; + } + + if (viewerFid !== undefined) { + localVarQueryParameter['viewerFid'] = viewerFid; + } + + if (limit !== undefined) { + localVarQueryParameter['limit'] = limit; + } + + if (cursor !== undefined) { + localVarQueryParameter['cursor'] = cursor; + } + + + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * Fetch a list of casts from the protocol in reverse chronological order based on timestamp + * @summary Fetch Recent Casts + * @param {number} [viewerFid] FID of the user viewing this information, needed for contextual information. + * @param {number} [limit] Number of results to fetch (default 25, max 100) + * @param {string} [cursor] Pagination cursor. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + recentCasts: async (viewerFid?: number, limit?: number, cursor?: string, options: RawAxiosRequestConfig = {}): Promise => { + const localVarPath = `/farcaster/recent-casts`; + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication ApiKeyAuth required + await setApiKeyToObject(localVarHeaderParameter, "x-api-key", configuration) + + if (viewerFid !== undefined) { + localVarQueryParameter['viewerFid'] = viewerFid; + } + + if (limit !== undefined) { + localVarQueryParameter['limit'] = limit; + } + + if (cursor !== undefined) { + localVarQueryParameter['cursor'] = cursor; + } + + + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + } +}; + +/** + * CastApi - functional programming interface + * @export + */ +export const CastApiFp = function(configuration?: Configuration) { + const localVarAxiosParamCreator = CastApiAxiosParamCreator(configuration) + return { + /** + * Now deprecated, use [v2/cast/conversation](https://docs.neynar.com/reference/cast-conversation). Gets all casts, including root cast and all replies for a given thread hash. No limit the depth of replies. + * @summary DEPRECATED - Fetch all casts in a given thread hash + * @param {string} threadHash The hash of the thread to fetch casts from. + * @param {number} [viewerFid] FID of the user viewing this information, needed for contextual information. + * @param {*} [options] Override http request option. + * @deprecated + * @throws {RequiredError} + */ + async allCastsInThread(threadHash: string, viewerFid?: number, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.allCastsInThread(threadHash, viewerFid, options); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = operationServerMap['CastApi.allCastsInThread']?.[localVarOperationServerIndex]?.url; + return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); + }, + /** + * Now deprecated, use [v2/cast](https://docs.neynar.com/reference/cast). Gets information about an individual cast + * @summary DEPRECATED - Fetch cast for a given hash + * @param {string} hash Cast hash + * @param {number} [viewerFid] FID of the user viewing this information, needed for contextual information. + * @param {*} [options] Override http request option. + * @deprecated + * @throws {RequiredError} + */ + async cast(hash: string, viewerFid?: number, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.cast(hash, viewerFid, options); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = operationServerMap['CastApi.cast']?.[localVarOperationServerIndex]?.url; + return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); + }, + /** + * Now deprecated, use [/v2/farcaster/feed/user/casts](https://docs.neynar.com/reference/feed-user-casts) instead + * @summary DEPRECATED - Casts by user + * @param {number} fid FID of a user + * @param {string} [parentUrl] A cast can be part of a certain channel. The channel is identified by `parent_url`. All casts in the channel ladder up to the same parent_url. + * @param {number} [viewerFid] FID of the user viewing this information, needed for contextual information. + * @param {number} [limit] Number of results to fetch (default 25, max 150) + * @param {string} [cursor] Pagination cursor. + * @param {*} [options] Override http request option. + * @deprecated + * @throws {RequiredError} + */ + async casts(fid: number, parentUrl?: string, viewerFid?: number, limit?: number, cursor?: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.casts(fid, parentUrl, viewerFid, limit, cursor, options); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = operationServerMap['CastApi.casts']?.[localVarOperationServerIndex]?.url; + return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); + }, + /** + * Fetch a list of casts from the protocol in reverse chronological order based on timestamp + * @summary Fetch Recent Casts + * @param {number} [viewerFid] FID of the user viewing this information, needed for contextual information. + * @param {number} [limit] Number of results to fetch (default 25, max 100) + * @param {string} [cursor] Pagination cursor. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async recentCasts(viewerFid?: number, limit?: number, cursor?: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.recentCasts(viewerFid, limit, cursor, options); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = operationServerMap['CastApi.recentCasts']?.[localVarOperationServerIndex]?.url; + return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); + }, + } +}; + +/** + * CastApi - factory interface + * @export + */ +export const CastApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) { + const localVarFp = CastApiFp(configuration) + return { + /** + * Now deprecated, use [v2/cast/conversation](https://docs.neynar.com/reference/cast-conversation). Gets all casts, including root cast and all replies for a given thread hash. No limit the depth of replies. + * @summary DEPRECATED - Fetch all casts in a given thread hash + * @param {string} threadHash The hash of the thread to fetch casts from. + * @param {number} [viewerFid] FID of the user viewing this information, needed for contextual information. + * @param {*} [options] Override http request option. + * @deprecated + * @throws {RequiredError} + */ + allCastsInThread(threadHash: string, viewerFid?: number, options?: RawAxiosRequestConfig): AxiosPromise { + return localVarFp.allCastsInThread(threadHash, viewerFid, options).then((request) => request(axios, basePath)); + }, + /** + * Now deprecated, use [v2/cast](https://docs.neynar.com/reference/cast). Gets information about an individual cast + * @summary DEPRECATED - Fetch cast for a given hash + * @param {string} hash Cast hash + * @param {number} [viewerFid] FID of the user viewing this information, needed for contextual information. + * @param {*} [options] Override http request option. + * @deprecated + * @throws {RequiredError} + */ + cast(hash: string, viewerFid?: number, options?: RawAxiosRequestConfig): AxiosPromise { + return localVarFp.cast(hash, viewerFid, options).then((request) => request(axios, basePath)); + }, + /** + * Now deprecated, use [/v2/farcaster/feed/user/casts](https://docs.neynar.com/reference/feed-user-casts) instead + * @summary DEPRECATED - Casts by user + * @param {number} fid FID of a user + * @param {string} [parentUrl] A cast can be part of a certain channel. The channel is identified by `parent_url`. All casts in the channel ladder up to the same parent_url. + * @param {number} [viewerFid] FID of the user viewing this information, needed for contextual information. + * @param {number} [limit] Number of results to fetch (default 25, max 150) + * @param {string} [cursor] Pagination cursor. + * @param {*} [options] Override http request option. + * @deprecated + * @throws {RequiredError} + */ + casts(fid: number, parentUrl?: string, viewerFid?: number, limit?: number, cursor?: string, options?: RawAxiosRequestConfig): AxiosPromise { + return localVarFp.casts(fid, parentUrl, viewerFid, limit, cursor, options).then((request) => request(axios, basePath)); + }, + /** + * Fetch a list of casts from the protocol in reverse chronological order based on timestamp + * @summary Fetch Recent Casts + * @param {number} [viewerFid] FID of the user viewing this information, needed for contextual information. + * @param {number} [limit] Number of results to fetch (default 25, max 100) + * @param {string} [cursor] Pagination cursor. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + recentCasts(viewerFid?: number, limit?: number, cursor?: string, options?: RawAxiosRequestConfig): AxiosPromise { + return localVarFp.recentCasts(viewerFid, limit, cursor, options).then((request) => request(axios, basePath)); + }, + }; +}; + +/** + * CastApi - object-oriented interface + * @export + * @class CastApi + * @extends {BaseAPI} + */ +export class CastApi extends BaseAPI { + /** + * Now deprecated, use [v2/cast/conversation](https://docs.neynar.com/reference/cast-conversation). Gets all casts, including root cast and all replies for a given thread hash. No limit the depth of replies. + * @summary DEPRECATED - Fetch all casts in a given thread hash + * @param {string} threadHash The hash of the thread to fetch casts from. + * @param {number} [viewerFid] FID of the user viewing this information, needed for contextual information. + * @param {*} [options] Override http request option. + * @deprecated + * @throws {RequiredError} + * @memberof CastApi + */ + public allCastsInThread(threadHash: string, viewerFid?: number, options?: RawAxiosRequestConfig) { + return CastApiFp(this.configuration).allCastsInThread(threadHash, viewerFid, options).then((request) => request(this.axios, this.basePath)); + } + + /** + * Now deprecated, use [v2/cast](https://docs.neynar.com/reference/cast). Gets information about an individual cast + * @summary DEPRECATED - Fetch cast for a given hash + * @param {string} hash Cast hash + * @param {number} [viewerFid] FID of the user viewing this information, needed for contextual information. + * @param {*} [options] Override http request option. + * @deprecated + * @throws {RequiredError} + * @memberof CastApi + */ + public cast(hash: string, viewerFid?: number, options?: RawAxiosRequestConfig) { + return CastApiFp(this.configuration).cast(hash, viewerFid, options).then((request) => request(this.axios, this.basePath)); + } + + /** + * Now deprecated, use [/v2/farcaster/feed/user/casts](https://docs.neynar.com/reference/feed-user-casts) instead + * @summary DEPRECATED - Casts by user + * @param {number} fid FID of a user + * @param {string} [parentUrl] A cast can be part of a certain channel. The channel is identified by `parent_url`. All casts in the channel ladder up to the same parent_url. + * @param {number} [viewerFid] FID of the user viewing this information, needed for contextual information. + * @param {number} [limit] Number of results to fetch (default 25, max 150) + * @param {string} [cursor] Pagination cursor. + * @param {*} [options] Override http request option. + * @deprecated + * @throws {RequiredError} + * @memberof CastApi + */ + public casts(fid: number, parentUrl?: string, viewerFid?: number, limit?: number, cursor?: string, options?: RawAxiosRequestConfig) { + return CastApiFp(this.configuration).casts(fid, parentUrl, viewerFid, limit, cursor, options).then((request) => request(this.axios, this.basePath)); + } + + /** + * Fetch a list of casts from the protocol in reverse chronological order based on timestamp + * @summary Fetch Recent Casts + * @param {number} [viewerFid] FID of the user viewing this information, needed for contextual information. + * @param {number} [limit] Number of results to fetch (default 25, max 100) + * @param {string} [cursor] Pagination cursor. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof CastApi + */ + public recentCasts(viewerFid?: number, limit?: number, cursor?: string, options?: RawAxiosRequestConfig) { + return CastApiFp(this.configuration).recentCasts(viewerFid, limit, cursor, options).then((request) => request(this.axios, this.basePath)); + } +} + diff --git a/src/neynar-api/v1/openapi/apis/follows-api.ts b/src/neynar-api/v1/openapi/apis/follows-api.ts new file mode 100644 index 00000000..bef9ce88 --- /dev/null +++ b/src/neynar-api/v1/openapi/apis/follows-api.ts @@ -0,0 +1,262 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Farcaster API V1 + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +import type { Configuration } from '../configuration'; +import type { AxiosPromise, AxiosInstance, RawAxiosRequestConfig } from 'axios'; +import globalAxios from 'axios'; +// Some imports not used depending on template conditions +// @ts-ignore +import { DUMMY_BASE_URL, assertParamExists, setApiKeyToObject, setBasicAuthToObject, setBearerAuthToObject, setOAuthToObject, setSearchParams, serializeDataIfNeeded, toPathString, createRequestFunction } from '../common'; +// @ts-ignore +import { BASE_PATH, COLLECTION_FORMATS, type RequestArgs, BaseAPI, RequiredError, operationServerMap } from '../base'; +// @ts-ignore +import type { ErrorRes } from '../models'; +// @ts-ignore +import type { FollowResponse } from '../models'; +/** + * FollowsApi - axios parameter creator + * @export + */ +export const FollowsApiAxiosParamCreator = function (configuration?: Configuration) { + return { + /** + * Gets a list of users who follow a user in reverse chronological order. + * @summary Gets all followers for a given FID + * @param {number} fid FID of the user + * @param {number} [viewerFid] FID of the user viewing this information, needed for contextual information. + * @param {number} [limit] Number of results to fetch (default 25, max 150) + * @param {string} [cursor] Pagination cursor. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + followers: async (fid: number, viewerFid?: number, limit?: number, cursor?: string, options: RawAxiosRequestConfig = {}): Promise => { + // verify required parameter 'fid' is not null or undefined + assertParamExists('followers', 'fid', fid) + const localVarPath = `/farcaster/followers`; + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication ApiKeyAuth required + await setApiKeyToObject(localVarHeaderParameter, "x-api-key", configuration) + + if (fid !== undefined) { + localVarQueryParameter['fid'] = fid; + } + + if (viewerFid !== undefined) { + localVarQueryParameter['viewerFid'] = viewerFid; + } + + if (limit !== undefined) { + localVarQueryParameter['limit'] = limit; + } + + if (cursor !== undefined) { + localVarQueryParameter['cursor'] = cursor; + } + + + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * Gets a list of users who is following a user in reverse chronological order. + * @summary Gets all following users of a FID + * @param {number} fid FID of the user + * @param {number} [viewerFid] FID of the user viewing this information, needed for contextual information. + * @param {number} [limit] Number of results to fetch (default 25, max 150) + * @param {string} [cursor] Pagination cursor. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + following: async (fid: number, viewerFid?: number, limit?: number, cursor?: string, options: RawAxiosRequestConfig = {}): Promise => { + // verify required parameter 'fid' is not null or undefined + assertParamExists('following', 'fid', fid) + const localVarPath = `/farcaster/following`; + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication ApiKeyAuth required + await setApiKeyToObject(localVarHeaderParameter, "x-api-key", configuration) + + if (fid !== undefined) { + localVarQueryParameter['fid'] = fid; + } + + if (viewerFid !== undefined) { + localVarQueryParameter['viewerFid'] = viewerFid; + } + + if (limit !== undefined) { + localVarQueryParameter['limit'] = limit; + } + + if (cursor !== undefined) { + localVarQueryParameter['cursor'] = cursor; + } + + + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + } +}; + +/** + * FollowsApi - functional programming interface + * @export + */ +export const FollowsApiFp = function(configuration?: Configuration) { + const localVarAxiosParamCreator = FollowsApiAxiosParamCreator(configuration) + return { + /** + * Gets a list of users who follow a user in reverse chronological order. + * @summary Gets all followers for a given FID + * @param {number} fid FID of the user + * @param {number} [viewerFid] FID of the user viewing this information, needed for contextual information. + * @param {number} [limit] Number of results to fetch (default 25, max 150) + * @param {string} [cursor] Pagination cursor. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async followers(fid: number, viewerFid?: number, limit?: number, cursor?: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.followers(fid, viewerFid, limit, cursor, options); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = operationServerMap['FollowsApi.followers']?.[localVarOperationServerIndex]?.url; + return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); + }, + /** + * Gets a list of users who is following a user in reverse chronological order. + * @summary Gets all following users of a FID + * @param {number} fid FID of the user + * @param {number} [viewerFid] FID of the user viewing this information, needed for contextual information. + * @param {number} [limit] Number of results to fetch (default 25, max 150) + * @param {string} [cursor] Pagination cursor. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async following(fid: number, viewerFid?: number, limit?: number, cursor?: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.following(fid, viewerFid, limit, cursor, options); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = operationServerMap['FollowsApi.following']?.[localVarOperationServerIndex]?.url; + return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); + }, + } +}; + +/** + * FollowsApi - factory interface + * @export + */ +export const FollowsApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) { + const localVarFp = FollowsApiFp(configuration) + return { + /** + * Gets a list of users who follow a user in reverse chronological order. + * @summary Gets all followers for a given FID + * @param {number} fid FID of the user + * @param {number} [viewerFid] FID of the user viewing this information, needed for contextual information. + * @param {number} [limit] Number of results to fetch (default 25, max 150) + * @param {string} [cursor] Pagination cursor. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + followers(fid: number, viewerFid?: number, limit?: number, cursor?: string, options?: RawAxiosRequestConfig): AxiosPromise { + return localVarFp.followers(fid, viewerFid, limit, cursor, options).then((request) => request(axios, basePath)); + }, + /** + * Gets a list of users who is following a user in reverse chronological order. + * @summary Gets all following users of a FID + * @param {number} fid FID of the user + * @param {number} [viewerFid] FID of the user viewing this information, needed for contextual information. + * @param {number} [limit] Number of results to fetch (default 25, max 150) + * @param {string} [cursor] Pagination cursor. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + following(fid: number, viewerFid?: number, limit?: number, cursor?: string, options?: RawAxiosRequestConfig): AxiosPromise { + return localVarFp.following(fid, viewerFid, limit, cursor, options).then((request) => request(axios, basePath)); + }, + }; +}; + +/** + * FollowsApi - object-oriented interface + * @export + * @class FollowsApi + * @extends {BaseAPI} + */ +export class FollowsApi extends BaseAPI { + /** + * Gets a list of users who follow a user in reverse chronological order. + * @summary Gets all followers for a given FID + * @param {number} fid FID of the user + * @param {number} [viewerFid] FID of the user viewing this information, needed for contextual information. + * @param {number} [limit] Number of results to fetch (default 25, max 150) + * @param {string} [cursor] Pagination cursor. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof FollowsApi + */ + public followers(fid: number, viewerFid?: number, limit?: number, cursor?: string, options?: RawAxiosRequestConfig) { + return FollowsApiFp(this.configuration).followers(fid, viewerFid, limit, cursor, options).then((request) => request(this.axios, this.basePath)); + } + + /** + * Gets a list of users who is following a user in reverse chronological order. + * @summary Gets all following users of a FID + * @param {number} fid FID of the user + * @param {number} [viewerFid] FID of the user viewing this information, needed for contextual information. + * @param {number} [limit] Number of results to fetch (default 25, max 150) + * @param {string} [cursor] Pagination cursor. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof FollowsApi + */ + public following(fid: number, viewerFid?: number, limit?: number, cursor?: string, options?: RawAxiosRequestConfig) { + return FollowsApiFp(this.configuration).following(fid, viewerFid, limit, cursor, options).then((request) => request(this.axios, this.basePath)); + } +} + diff --git a/src/neynar-api/v1/openapi/apis/notifications-api.ts b/src/neynar-api/v1/openapi/apis/notifications-api.ts new file mode 100644 index 00000000..e4522599 --- /dev/null +++ b/src/neynar-api/v1/openapi/apis/notifications-api.ts @@ -0,0 +1,256 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Farcaster API V1 + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +import type { Configuration } from '../configuration'; +import type { AxiosPromise, AxiosInstance, RawAxiosRequestConfig } from 'axios'; +import globalAxios from 'axios'; +// Some imports not used depending on template conditions +// @ts-ignore +import { DUMMY_BASE_URL, assertParamExists, setApiKeyToObject, setBasicAuthToObject, setBearerAuthToObject, setOAuthToObject, setSearchParams, serializeDataIfNeeded, toPathString, createRequestFunction } from '../common'; +// @ts-ignore +import { BASE_PATH, COLLECTION_FORMATS, type RequestArgs, BaseAPI, RequiredError, operationServerMap } from '../base'; +// @ts-ignore +import type { ErrorRes } from '../models'; +// @ts-ignore +import type { MentionsAndRepliesResponse } from '../models'; +// @ts-ignore +import type { ReactionsAndRecastsResponse } from '../models'; +/** + * NotificationsApi - axios parameter creator + * @export + */ +export const NotificationsApiAxiosParamCreator = function (configuration?: Configuration) { + return { + /** + * Gets a list of 15 mentions and replies to the user’s casts in reverse chronological order + * @summary Fetch mentions and replies + * @param {number} fid FID of a user + * @param {number} [viewerFid] FID of the user viewing this information, needed for contextual information. + * @param {string} [cursor] Pagination cursor. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + mentionsAndReplies: async (fid: number, viewerFid?: number, cursor?: string, options: RawAxiosRequestConfig = {}): Promise => { + // verify required parameter 'fid' is not null or undefined + assertParamExists('mentionsAndReplies', 'fid', fid) + const localVarPath = `/farcaster/mentions-and-replies`; + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication ApiKeyAuth required + await setApiKeyToObject(localVarHeaderParameter, "x-api-key", configuration) + + if (fid !== undefined) { + localVarQueryParameter['fid'] = fid; + } + + if (viewerFid !== undefined) { + localVarQueryParameter['viewerFid'] = viewerFid; + } + + if (cursor !== undefined) { + localVarQueryParameter['cursor'] = cursor; + } + + + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * Fetch a list of reactions and recasts to the users’s casts in reverse chronological order + * @summary Fetch reactions and recasts + * @param {number} fid FID of a user + * @param {number} [viewerFid] FID of the user viewing this information, needed for contextual information. + * @param {number} [limit] Number of results to fetch (default 25, max 150) + * @param {string} [cursor] Pagination cursor. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + reactionsAndRecasts: async (fid: number, viewerFid?: number, limit?: number, cursor?: string, options: RawAxiosRequestConfig = {}): Promise => { + // verify required parameter 'fid' is not null or undefined + assertParamExists('reactionsAndRecasts', 'fid', fid) + const localVarPath = `/farcaster/reactions-and-recasts`; + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication ApiKeyAuth required + await setApiKeyToObject(localVarHeaderParameter, "x-api-key", configuration) + + if (fid !== undefined) { + localVarQueryParameter['fid'] = fid; + } + + if (viewerFid !== undefined) { + localVarQueryParameter['viewerFid'] = viewerFid; + } + + if (limit !== undefined) { + localVarQueryParameter['limit'] = limit; + } + + if (cursor !== undefined) { + localVarQueryParameter['cursor'] = cursor; + } + + + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + } +}; + +/** + * NotificationsApi - functional programming interface + * @export + */ +export const NotificationsApiFp = function(configuration?: Configuration) { + const localVarAxiosParamCreator = NotificationsApiAxiosParamCreator(configuration) + return { + /** + * Gets a list of 15 mentions and replies to the user’s casts in reverse chronological order + * @summary Fetch mentions and replies + * @param {number} fid FID of a user + * @param {number} [viewerFid] FID of the user viewing this information, needed for contextual information. + * @param {string} [cursor] Pagination cursor. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async mentionsAndReplies(fid: number, viewerFid?: number, cursor?: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.mentionsAndReplies(fid, viewerFid, cursor, options); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = operationServerMap['NotificationsApi.mentionsAndReplies']?.[localVarOperationServerIndex]?.url; + return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); + }, + /** + * Fetch a list of reactions and recasts to the users’s casts in reverse chronological order + * @summary Fetch reactions and recasts + * @param {number} fid FID of a user + * @param {number} [viewerFid] FID of the user viewing this information, needed for contextual information. + * @param {number} [limit] Number of results to fetch (default 25, max 150) + * @param {string} [cursor] Pagination cursor. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async reactionsAndRecasts(fid: number, viewerFid?: number, limit?: number, cursor?: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.reactionsAndRecasts(fid, viewerFid, limit, cursor, options); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = operationServerMap['NotificationsApi.reactionsAndRecasts']?.[localVarOperationServerIndex]?.url; + return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); + }, + } +}; + +/** + * NotificationsApi - factory interface + * @export + */ +export const NotificationsApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) { + const localVarFp = NotificationsApiFp(configuration) + return { + /** + * Gets a list of 15 mentions and replies to the user’s casts in reverse chronological order + * @summary Fetch mentions and replies + * @param {number} fid FID of a user + * @param {number} [viewerFid] FID of the user viewing this information, needed for contextual information. + * @param {string} [cursor] Pagination cursor. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + mentionsAndReplies(fid: number, viewerFid?: number, cursor?: string, options?: RawAxiosRequestConfig): AxiosPromise { + return localVarFp.mentionsAndReplies(fid, viewerFid, cursor, options).then((request) => request(axios, basePath)); + }, + /** + * Fetch a list of reactions and recasts to the users’s casts in reverse chronological order + * @summary Fetch reactions and recasts + * @param {number} fid FID of a user + * @param {number} [viewerFid] FID of the user viewing this information, needed for contextual information. + * @param {number} [limit] Number of results to fetch (default 25, max 150) + * @param {string} [cursor] Pagination cursor. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + reactionsAndRecasts(fid: number, viewerFid?: number, limit?: number, cursor?: string, options?: RawAxiosRequestConfig): AxiosPromise { + return localVarFp.reactionsAndRecasts(fid, viewerFid, limit, cursor, options).then((request) => request(axios, basePath)); + }, + }; +}; + +/** + * NotificationsApi - object-oriented interface + * @export + * @class NotificationsApi + * @extends {BaseAPI} + */ +export class NotificationsApi extends BaseAPI { + /** + * Gets a list of 15 mentions and replies to the user’s casts in reverse chronological order + * @summary Fetch mentions and replies + * @param {number} fid FID of a user + * @param {number} [viewerFid] FID of the user viewing this information, needed for contextual information. + * @param {string} [cursor] Pagination cursor. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof NotificationsApi + */ + public mentionsAndReplies(fid: number, viewerFid?: number, cursor?: string, options?: RawAxiosRequestConfig) { + return NotificationsApiFp(this.configuration).mentionsAndReplies(fid, viewerFid, cursor, options).then((request) => request(this.axios, this.basePath)); + } + + /** + * Fetch a list of reactions and recasts to the users’s casts in reverse chronological order + * @summary Fetch reactions and recasts + * @param {number} fid FID of a user + * @param {number} [viewerFid] FID of the user viewing this information, needed for contextual information. + * @param {number} [limit] Number of results to fetch (default 25, max 150) + * @param {string} [cursor] Pagination cursor. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof NotificationsApi + */ + public reactionsAndRecasts(fid: number, viewerFid?: number, limit?: number, cursor?: string, options?: RawAxiosRequestConfig) { + return NotificationsApiFp(this.configuration).reactionsAndRecasts(fid, viewerFid, limit, cursor, options).then((request) => request(this.axios, this.basePath)); + } +} + diff --git a/src/neynar-api/v1/openapi/apis/user-api.ts b/src/neynar-api/v1/openapi/apis/user-api.ts new file mode 100644 index 00000000..f2e99121 --- /dev/null +++ b/src/neynar-api/v1/openapi/apis/user-api.ts @@ -0,0 +1,515 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Farcaster API V1 + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +import type { Configuration } from '../configuration'; +import type { AxiosPromise, AxiosInstance, RawAxiosRequestConfig } from 'axios'; +import globalAxios from 'axios'; +// Some imports not used depending on template conditions +// @ts-ignore +import { DUMMY_BASE_URL, assertParamExists, setApiKeyToObject, setBasicAuthToObject, setBearerAuthToObject, setOAuthToObject, setSearchParams, serializeDataIfNeeded, toPathString, createRequestFunction } from '../common'; +// @ts-ignore +import { BASE_PATH, COLLECTION_FORMATS, type RequestArgs, BaseAPI, RequiredError, operationServerMap } from '../base'; +// @ts-ignore +import type { CustodyAddressResponse } from '../models'; +// @ts-ignore +import type { ErrorRes } from '../models'; +// @ts-ignore +import type { RecentUsersResponse } from '../models'; +// @ts-ignore +import type { UserCastLikeResponse } from '../models'; +// @ts-ignore +import type { UserResponse } from '../models'; +/** + * UserApi - axios parameter creator + * @export + */ +export const UserApiAxiosParamCreator = function (configuration?: Configuration) { + return { + /** + * Now deprecated, use [v2/user/bulk](https://docs.neynar.com/reference/user-bulk), find custody address in user obj. Returns the custody address for a given FID + * @summary DEPRECATED - Fetch the custody address for a given FID + * @param {number} fid FID of a user + * @param {*} [options] Override http request option. + * @deprecated + * @throws {RequiredError} + */ + custodyAddress: async (fid: number, options: RawAxiosRequestConfig = {}): Promise => { + // verify required parameter 'fid' is not null or undefined + assertParamExists('custodyAddress', 'fid', fid) + const localVarPath = `/farcaster/custody-address`; + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication ApiKeyAuth required + await setApiKeyToObject(localVarHeaderParameter, "x-api-key", configuration) + + if (fid !== undefined) { + localVarQueryParameter['fid'] = fid; + } + + + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * Fetch a list of casts from the protocol in reverse chronological order based on timestamp + * @summary Fetch Recent Users + * @param {number} [viewerFid] FID of the user viewing this information, needed for contextual information. + * @param {number} [limit] Number of results to fetch (default 100, max 1000) + * @param {string} [cursor] Pagination cursor. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + recentUsers: async (viewerFid?: number, limit?: number, cursor?: string, options: RawAxiosRequestConfig = {}): Promise => { + const localVarPath = `/farcaster/recent-users`; + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication ApiKeyAuth required + await setApiKeyToObject(localVarHeaderParameter, "x-api-key", configuration) + + if (viewerFid !== undefined) { + localVarQueryParameter['viewerFid'] = viewerFid; + } + + if (limit !== undefined) { + localVarQueryParameter['limit'] = limit; + } + + if (cursor !== undefined) { + localVarQueryParameter['cursor'] = cursor; + } + + + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * Now deprecated, use [v2/user/bulk](https://docs.neynar.com/reference/user-bulk). Returns metadata about a specific user + * @summary DEPRECATED - Fetch User Information by FID + * @param {number} fid FID of a user + * @param {number} [viewerFid] FID of the user viewing this information, needed for contextual information. + * @param {*} [options] Override http request option. + * @deprecated + * @throws {RequiredError} + */ + user: async (fid: number, viewerFid?: number, options: RawAxiosRequestConfig = {}): Promise => { + // verify required parameter 'fid' is not null or undefined + assertParamExists('user', 'fid', fid) + const localVarPath = `/farcaster/user`; + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication ApiKeyAuth required + await setApiKeyToObject(localVarHeaderParameter, "x-api-key", configuration) + + if (fid !== undefined) { + localVarQueryParameter['fid'] = fid; + } + + if (viewerFid !== undefined) { + localVarQueryParameter['viewerFid'] = viewerFid; + } + + + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * Now deprecated, use [v2/user/by_username](https://docs.neynar.com/reference/user-by-username-v2) instead. Returns metadata about a specific user + * @summary DEPRECATED - Fetch User Information by username + * @param {string} username Username of the user + * @param {number} [viewerFid] FID of the user viewing this information, needed for contextual information. + * @param {*} [options] Override http request option. + * @deprecated + * @throws {RequiredError} + */ + userByUsernameV1: async (username: string, viewerFid?: number, options: RawAxiosRequestConfig = {}): Promise => { + // verify required parameter 'username' is not null or undefined + assertParamExists('userByUsernameV1', 'username', username) + const localVarPath = `/farcaster/user-by-username`; + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication ApiKeyAuth required + await setApiKeyToObject(localVarHeaderParameter, "x-api-key", configuration) + + if (username !== undefined) { + localVarQueryParameter['username'] = username; + } + + if (viewerFid !== undefined) { + localVarQueryParameter['viewerFid'] = viewerFid; + } + + + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * Now deprecated. use [/v2/reactions/user](https://docs.neynar.com/reference/reactions-user). Fetch all the liked cast of a User + * @summary DEPRECATED -- Fetch User Cast Likes + * @param {number} fid FID of the user + * @param {number} [viewerFid] FID of the user viewing this information, needed for contextual information. + * @param {number} [limit] Number of results to fetch (default 25, max 150) + * @param {string} [cursor] Pagination cursor + * @param {*} [options] Override http request option. + * @deprecated + * @throws {RequiredError} + */ + userCastLikes: async (fid: number, viewerFid?: number, limit?: number, cursor?: string, options: RawAxiosRequestConfig = {}): Promise => { + // verify required parameter 'fid' is not null or undefined + assertParamExists('userCastLikes', 'fid', fid) + const localVarPath = `/farcaster/user-cast-likes`; + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication ApiKeyAuth required + await setApiKeyToObject(localVarHeaderParameter, "x-api-key", configuration) + + if (fid !== undefined) { + localVarQueryParameter['fid'] = fid; + } + + if (viewerFid !== undefined) { + localVarQueryParameter['viewerFid'] = viewerFid; + } + + if (limit !== undefined) { + localVarQueryParameter['limit'] = limit; + } + + if (cursor !== undefined) { + localVarQueryParameter['cursor'] = cursor; + } + + + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + } +}; + +/** + * UserApi - functional programming interface + * @export + */ +export const UserApiFp = function(configuration?: Configuration) { + const localVarAxiosParamCreator = UserApiAxiosParamCreator(configuration) + return { + /** + * Now deprecated, use [v2/user/bulk](https://docs.neynar.com/reference/user-bulk), find custody address in user obj. Returns the custody address for a given FID + * @summary DEPRECATED - Fetch the custody address for a given FID + * @param {number} fid FID of a user + * @param {*} [options] Override http request option. + * @deprecated + * @throws {RequiredError} + */ + async custodyAddress(fid: number, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.custodyAddress(fid, options); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = operationServerMap['UserApi.custodyAddress']?.[localVarOperationServerIndex]?.url; + return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); + }, + /** + * Fetch a list of casts from the protocol in reverse chronological order based on timestamp + * @summary Fetch Recent Users + * @param {number} [viewerFid] FID of the user viewing this information, needed for contextual information. + * @param {number} [limit] Number of results to fetch (default 100, max 1000) + * @param {string} [cursor] Pagination cursor. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async recentUsers(viewerFid?: number, limit?: number, cursor?: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.recentUsers(viewerFid, limit, cursor, options); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = operationServerMap['UserApi.recentUsers']?.[localVarOperationServerIndex]?.url; + return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); + }, + /** + * Now deprecated, use [v2/user/bulk](https://docs.neynar.com/reference/user-bulk). Returns metadata about a specific user + * @summary DEPRECATED - Fetch User Information by FID + * @param {number} fid FID of a user + * @param {number} [viewerFid] FID of the user viewing this information, needed for contextual information. + * @param {*} [options] Override http request option. + * @deprecated + * @throws {RequiredError} + */ + async user(fid: number, viewerFid?: number, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.user(fid, viewerFid, options); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = operationServerMap['UserApi.user']?.[localVarOperationServerIndex]?.url; + return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); + }, + /** + * Now deprecated, use [v2/user/by_username](https://docs.neynar.com/reference/user-by-username-v2) instead. Returns metadata about a specific user + * @summary DEPRECATED - Fetch User Information by username + * @param {string} username Username of the user + * @param {number} [viewerFid] FID of the user viewing this information, needed for contextual information. + * @param {*} [options] Override http request option. + * @deprecated + * @throws {RequiredError} + */ + async userByUsernameV1(username: string, viewerFid?: number, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.userByUsernameV1(username, viewerFid, options); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = operationServerMap['UserApi.userByUsernameV1']?.[localVarOperationServerIndex]?.url; + return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); + }, + /** + * Now deprecated. use [/v2/reactions/user](https://docs.neynar.com/reference/reactions-user). Fetch all the liked cast of a User + * @summary DEPRECATED -- Fetch User Cast Likes + * @param {number} fid FID of the user + * @param {number} [viewerFid] FID of the user viewing this information, needed for contextual information. + * @param {number} [limit] Number of results to fetch (default 25, max 150) + * @param {string} [cursor] Pagination cursor + * @param {*} [options] Override http request option. + * @deprecated + * @throws {RequiredError} + */ + async userCastLikes(fid: number, viewerFid?: number, limit?: number, cursor?: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.userCastLikes(fid, viewerFid, limit, cursor, options); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = operationServerMap['UserApi.userCastLikes']?.[localVarOperationServerIndex]?.url; + return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); + }, + } +}; + +/** + * UserApi - factory interface + * @export + */ +export const UserApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) { + const localVarFp = UserApiFp(configuration) + return { + /** + * Now deprecated, use [v2/user/bulk](https://docs.neynar.com/reference/user-bulk), find custody address in user obj. Returns the custody address for a given FID + * @summary DEPRECATED - Fetch the custody address for a given FID + * @param {number} fid FID of a user + * @param {*} [options] Override http request option. + * @deprecated + * @throws {RequiredError} + */ + custodyAddress(fid: number, options?: RawAxiosRequestConfig): AxiosPromise { + return localVarFp.custodyAddress(fid, options).then((request) => request(axios, basePath)); + }, + /** + * Fetch a list of casts from the protocol in reverse chronological order based on timestamp + * @summary Fetch Recent Users + * @param {number} [viewerFid] FID of the user viewing this information, needed for contextual information. + * @param {number} [limit] Number of results to fetch (default 100, max 1000) + * @param {string} [cursor] Pagination cursor. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + recentUsers(viewerFid?: number, limit?: number, cursor?: string, options?: RawAxiosRequestConfig): AxiosPromise { + return localVarFp.recentUsers(viewerFid, limit, cursor, options).then((request) => request(axios, basePath)); + }, + /** + * Now deprecated, use [v2/user/bulk](https://docs.neynar.com/reference/user-bulk). Returns metadata about a specific user + * @summary DEPRECATED - Fetch User Information by FID + * @param {number} fid FID of a user + * @param {number} [viewerFid] FID of the user viewing this information, needed for contextual information. + * @param {*} [options] Override http request option. + * @deprecated + * @throws {RequiredError} + */ + user(fid: number, viewerFid?: number, options?: RawAxiosRequestConfig): AxiosPromise { + return localVarFp.user(fid, viewerFid, options).then((request) => request(axios, basePath)); + }, + /** + * Now deprecated, use [v2/user/by_username](https://docs.neynar.com/reference/user-by-username-v2) instead. Returns metadata about a specific user + * @summary DEPRECATED - Fetch User Information by username + * @param {string} username Username of the user + * @param {number} [viewerFid] FID of the user viewing this information, needed for contextual information. + * @param {*} [options] Override http request option. + * @deprecated + * @throws {RequiredError} + */ + userByUsernameV1(username: string, viewerFid?: number, options?: RawAxiosRequestConfig): AxiosPromise { + return localVarFp.userByUsernameV1(username, viewerFid, options).then((request) => request(axios, basePath)); + }, + /** + * Now deprecated. use [/v2/reactions/user](https://docs.neynar.com/reference/reactions-user). Fetch all the liked cast of a User + * @summary DEPRECATED -- Fetch User Cast Likes + * @param {number} fid FID of the user + * @param {number} [viewerFid] FID of the user viewing this information, needed for contextual information. + * @param {number} [limit] Number of results to fetch (default 25, max 150) + * @param {string} [cursor] Pagination cursor + * @param {*} [options] Override http request option. + * @deprecated + * @throws {RequiredError} + */ + userCastLikes(fid: number, viewerFid?: number, limit?: number, cursor?: string, options?: RawAxiosRequestConfig): AxiosPromise { + return localVarFp.userCastLikes(fid, viewerFid, limit, cursor, options).then((request) => request(axios, basePath)); + }, + }; +}; + +/** + * UserApi - object-oriented interface + * @export + * @class UserApi + * @extends {BaseAPI} + */ +export class UserApi extends BaseAPI { + /** + * Now deprecated, use [v2/user/bulk](https://docs.neynar.com/reference/user-bulk), find custody address in user obj. Returns the custody address for a given FID + * @summary DEPRECATED - Fetch the custody address for a given FID + * @param {number} fid FID of a user + * @param {*} [options] Override http request option. + * @deprecated + * @throws {RequiredError} + * @memberof UserApi + */ + public custodyAddress(fid: number, options?: RawAxiosRequestConfig) { + return UserApiFp(this.configuration).custodyAddress(fid, options).then((request) => request(this.axios, this.basePath)); + } + + /** + * Fetch a list of casts from the protocol in reverse chronological order based on timestamp + * @summary Fetch Recent Users + * @param {number} [viewerFid] FID of the user viewing this information, needed for contextual information. + * @param {number} [limit] Number of results to fetch (default 100, max 1000) + * @param {string} [cursor] Pagination cursor. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof UserApi + */ + public recentUsers(viewerFid?: number, limit?: number, cursor?: string, options?: RawAxiosRequestConfig) { + return UserApiFp(this.configuration).recentUsers(viewerFid, limit, cursor, options).then((request) => request(this.axios, this.basePath)); + } + + /** + * Now deprecated, use [v2/user/bulk](https://docs.neynar.com/reference/user-bulk). Returns metadata about a specific user + * @summary DEPRECATED - Fetch User Information by FID + * @param {number} fid FID of a user + * @param {number} [viewerFid] FID of the user viewing this information, needed for contextual information. + * @param {*} [options] Override http request option. + * @deprecated + * @throws {RequiredError} + * @memberof UserApi + */ + public user(fid: number, viewerFid?: number, options?: RawAxiosRequestConfig) { + return UserApiFp(this.configuration).user(fid, viewerFid, options).then((request) => request(this.axios, this.basePath)); + } + + /** + * Now deprecated, use [v2/user/by_username](https://docs.neynar.com/reference/user-by-username-v2) instead. Returns metadata about a specific user + * @summary DEPRECATED - Fetch User Information by username + * @param {string} username Username of the user + * @param {number} [viewerFid] FID of the user viewing this information, needed for contextual information. + * @param {*} [options] Override http request option. + * @deprecated + * @throws {RequiredError} + * @memberof UserApi + */ + public userByUsernameV1(username: string, viewerFid?: number, options?: RawAxiosRequestConfig) { + return UserApiFp(this.configuration).userByUsernameV1(username, viewerFid, options).then((request) => request(this.axios, this.basePath)); + } + + /** + * Now deprecated. use [/v2/reactions/user](https://docs.neynar.com/reference/reactions-user). Fetch all the liked cast of a User + * @summary DEPRECATED -- Fetch User Cast Likes + * @param {number} fid FID of the user + * @param {number} [viewerFid] FID of the user viewing this information, needed for contextual information. + * @param {number} [limit] Number of results to fetch (default 25, max 150) + * @param {string} [cursor] Pagination cursor + * @param {*} [options] Override http request option. + * @deprecated + * @throws {RequiredError} + * @memberof UserApi + */ + public userCastLikes(fid: number, viewerFid?: number, limit?: number, cursor?: string, options?: RawAxiosRequestConfig) { + return UserApiFp(this.configuration).userCastLikes(fid, viewerFid, limit, cursor, options).then((request) => request(this.axios, this.basePath)); + } +} + diff --git a/src/neynar-api/v1/openapi/apis/verification-api.ts b/src/neynar-api/v1/openapi/apis/verification-api.ts new file mode 100644 index 00000000..eba4c454 --- /dev/null +++ b/src/neynar-api/v1/openapi/apis/verification-api.ts @@ -0,0 +1,224 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Farcaster API V1 + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +import type { Configuration } from '../configuration'; +import type { AxiosPromise, AxiosInstance, RawAxiosRequestConfig } from 'axios'; +import globalAxios from 'axios'; +// Some imports not used depending on template conditions +// @ts-ignore +import { DUMMY_BASE_URL, assertParamExists, setApiKeyToObject, setBasicAuthToObject, setBearerAuthToObject, setOAuthToObject, setSearchParams, serializeDataIfNeeded, toPathString, createRequestFunction } from '../common'; +// @ts-ignore +import { BASE_PATH, COLLECTION_FORMATS, type RequestArgs, BaseAPI, RequiredError, operationServerMap } from '../base'; +// @ts-ignore +import type { ErrorRes } from '../models'; +// @ts-ignore +import type { UserResponse } from '../models'; +// @ts-ignore +import type { VerificationResponse } from '../models'; +/** + * VerificationApi - axios parameter creator + * @export + */ +export const VerificationApiAxiosParamCreator = function (configuration?: Configuration) { + return { + /** + * Now deprecated. Use [v2/user/bulk-by-address](https://docs.neynar.com/reference/user-bulk-by-address). Checks if a given Ethereum address has a Farcaster user associated with it. Note: if an address is associated with multiple users, the API will return the user who most recently published a verification with the address (based on when Warpcast received the proof, not a self-reported timestamp). + * @summary DEPRECATED - Fetch user for a given ethereum address + * @param {string} address + * @param {*} [options] Override http request option. + * @deprecated + * @throws {RequiredError} + */ + userByVerification: async (address: string, options: RawAxiosRequestConfig = {}): Promise => { + // verify required parameter 'address' is not null or undefined + assertParamExists('userByVerification', 'address', address) + const localVarPath = `/farcaster/user-by-verification`; + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication ApiKeyAuth required + await setApiKeyToObject(localVarHeaderParameter, "x-api-key", configuration) + + if (address !== undefined) { + localVarQueryParameter['address'] = address; + } + + + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * Now deprecated, use [v2/user/bulk](https://docs.neynar.com/reference/user-bulk), verifications are in the user object. Fetch all known verifications of a user. + * @summary DEPRECATED - Fetch verifications for a given FID + * @param {number} fid FID of the user + * @param {*} [options] Override http request option. + * @deprecated + * @throws {RequiredError} + */ + verifications: async (fid: number, options: RawAxiosRequestConfig = {}): Promise => { + // verify required parameter 'fid' is not null or undefined + assertParamExists('verifications', 'fid', fid) + const localVarPath = `/farcaster/verifications`; + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication ApiKeyAuth required + await setApiKeyToObject(localVarHeaderParameter, "x-api-key", configuration) + + if (fid !== undefined) { + localVarQueryParameter['fid'] = fid; + } + + + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + } +}; + +/** + * VerificationApi - functional programming interface + * @export + */ +export const VerificationApiFp = function(configuration?: Configuration) { + const localVarAxiosParamCreator = VerificationApiAxiosParamCreator(configuration) + return { + /** + * Now deprecated. Use [v2/user/bulk-by-address](https://docs.neynar.com/reference/user-bulk-by-address). Checks if a given Ethereum address has a Farcaster user associated with it. Note: if an address is associated with multiple users, the API will return the user who most recently published a verification with the address (based on when Warpcast received the proof, not a self-reported timestamp). + * @summary DEPRECATED - Fetch user for a given ethereum address + * @param {string} address + * @param {*} [options] Override http request option. + * @deprecated + * @throws {RequiredError} + */ + async userByVerification(address: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.userByVerification(address, options); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = operationServerMap['VerificationApi.userByVerification']?.[localVarOperationServerIndex]?.url; + return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); + }, + /** + * Now deprecated, use [v2/user/bulk](https://docs.neynar.com/reference/user-bulk), verifications are in the user object. Fetch all known verifications of a user. + * @summary DEPRECATED - Fetch verifications for a given FID + * @param {number} fid FID of the user + * @param {*} [options] Override http request option. + * @deprecated + * @throws {RequiredError} + */ + async verifications(fid: number, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.verifications(fid, options); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = operationServerMap['VerificationApi.verifications']?.[localVarOperationServerIndex]?.url; + return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); + }, + } +}; + +/** + * VerificationApi - factory interface + * @export + */ +export const VerificationApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) { + const localVarFp = VerificationApiFp(configuration) + return { + /** + * Now deprecated. Use [v2/user/bulk-by-address](https://docs.neynar.com/reference/user-bulk-by-address). Checks if a given Ethereum address has a Farcaster user associated with it. Note: if an address is associated with multiple users, the API will return the user who most recently published a verification with the address (based on when Warpcast received the proof, not a self-reported timestamp). + * @summary DEPRECATED - Fetch user for a given ethereum address + * @param {string} address + * @param {*} [options] Override http request option. + * @deprecated + * @throws {RequiredError} + */ + userByVerification(address: string, options?: RawAxiosRequestConfig): AxiosPromise { + return localVarFp.userByVerification(address, options).then((request) => request(axios, basePath)); + }, + /** + * Now deprecated, use [v2/user/bulk](https://docs.neynar.com/reference/user-bulk), verifications are in the user object. Fetch all known verifications of a user. + * @summary DEPRECATED - Fetch verifications for a given FID + * @param {number} fid FID of the user + * @param {*} [options] Override http request option. + * @deprecated + * @throws {RequiredError} + */ + verifications(fid: number, options?: RawAxiosRequestConfig): AxiosPromise { + return localVarFp.verifications(fid, options).then((request) => request(axios, basePath)); + }, + }; +}; + +/** + * VerificationApi - object-oriented interface + * @export + * @class VerificationApi + * @extends {BaseAPI} + */ +export class VerificationApi extends BaseAPI { + /** + * Now deprecated. Use [v2/user/bulk-by-address](https://docs.neynar.com/reference/user-bulk-by-address). Checks if a given Ethereum address has a Farcaster user associated with it. Note: if an address is associated with multiple users, the API will return the user who most recently published a verification with the address (based on when Warpcast received the proof, not a self-reported timestamp). + * @summary DEPRECATED - Fetch user for a given ethereum address + * @param {string} address + * @param {*} [options] Override http request option. + * @deprecated + * @throws {RequiredError} + * @memberof VerificationApi + */ + public userByVerification(address: string, options?: RawAxiosRequestConfig) { + return VerificationApiFp(this.configuration).userByVerification(address, options).then((request) => request(this.axios, this.basePath)); + } + + /** + * Now deprecated, use [v2/user/bulk](https://docs.neynar.com/reference/user-bulk), verifications are in the user object. Fetch all known verifications of a user. + * @summary DEPRECATED - Fetch verifications for a given FID + * @param {number} fid FID of the user + * @param {*} [options] Override http request option. + * @deprecated + * @throws {RequiredError} + * @memberof VerificationApi + */ + public verifications(fid: number, options?: RawAxiosRequestConfig) { + return VerificationApiFp(this.configuration).verifications(fid, options).then((request) => request(this.axios, this.basePath)); + } +} + diff --git a/src/neynar-api/v1/openapi/index.ts b/src/neynar-api/v1/openapi/index.ts index 61c583a5..b363bba4 100644 --- a/src/neynar-api/v1/openapi/index.ts +++ b/src/neynar-api/v1/openapi/index.ts @@ -15,4 +15,4 @@ export * from "./api"; export * from "./configuration"; - +export * from "./models"; diff --git a/src/neynar-api/v1/openapi/models/all-casts-in-thread-response-result.ts b/src/neynar-api/v1/openapi/models/all-casts-in-thread-response-result.ts new file mode 100644 index 00000000..90703aa0 --- /dev/null +++ b/src/neynar-api/v1/openapi/models/all-casts-in-thread-response-result.ts @@ -0,0 +1,33 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Farcaster API V1 + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +// May contain unused imports in some cases +// @ts-ignore +import type { CastWithInteractions } from './cast-with-interactions'; + +/** + * + * @export + * @interface AllCastsInThreadResponseResult + */ +export interface AllCastsInThreadResponseResult { + /** + * + * @type {Array} + * @memberof AllCastsInThreadResponseResult + */ + 'casts': Array; +} + diff --git a/src/neynar-api/v1/openapi/models/all-casts-in-thread-response.ts b/src/neynar-api/v1/openapi/models/all-casts-in-thread-response.ts new file mode 100644 index 00000000..09974746 --- /dev/null +++ b/src/neynar-api/v1/openapi/models/all-casts-in-thread-response.ts @@ -0,0 +1,33 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Farcaster API V1 + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +// May contain unused imports in some cases +// @ts-ignore +import type { AllCastsInThreadResponseResult } from './all-casts-in-thread-response-result'; + +/** + * + * @export + * @interface AllCastsInThreadResponse + */ +export interface AllCastsInThreadResponse { + /** + * + * @type {AllCastsInThreadResponseResult} + * @memberof AllCastsInThreadResponse + */ + 'result': AllCastsInThreadResponseResult; +} + diff --git a/src/neynar-api/v1/openapi/models/cast-author-one-of.ts b/src/neynar-api/v1/openapi/models/cast-author-one-of.ts new file mode 100644 index 00000000..3ed1c689 --- /dev/null +++ b/src/neynar-api/v1/openapi/models/cast-author-one-of.ts @@ -0,0 +1,30 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Farcaster API V1 + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + + +/** + * + * @export + * @interface CastAuthorOneOf + */ +export interface CastAuthorOneOf { + /** + * + * @type {string} + * @memberof CastAuthorOneOf + */ + 'fid': string; +} + diff --git a/src/neynar-api/v1/openapi/models/cast-author.ts b/src/neynar-api/v1/openapi/models/cast-author.ts new file mode 100644 index 00000000..1fcdd3dc --- /dev/null +++ b/src/neynar-api/v1/openapi/models/cast-author.ts @@ -0,0 +1,38 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Farcaster API V1 + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +// May contain unused imports in some cases +// @ts-ignore +import type { CastAuthorOneOf } from './cast-author-one-of'; +// May contain unused imports in some cases +// @ts-ignore +import type { User } from './user'; +// May contain unused imports in some cases +// @ts-ignore +import type { UserPfp } from './user-pfp'; +// May contain unused imports in some cases +// @ts-ignore +import type { UserProfile } from './user-profile'; +// May contain unused imports in some cases +// @ts-ignore +import type { ViewerContext } from './viewer-context'; + +/** + * @type CastAuthor + * @export + */ +export type CastAuthor = CastAuthorOneOf | User; + + diff --git a/src/neynar-api/v1/openapi/models/cast-likes-response-result.ts b/src/neynar-api/v1/openapi/models/cast-likes-response-result.ts new file mode 100644 index 00000000..ca759207 --- /dev/null +++ b/src/neynar-api/v1/openapi/models/cast-likes-response-result.ts @@ -0,0 +1,42 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Farcaster API V1 + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +// May contain unused imports in some cases +// @ts-ignore +import type { NextCursor } from './next-cursor'; +// May contain unused imports in some cases +// @ts-ignore +import type { Reaction } from './reaction'; + +/** + * + * @export + * @interface CastLikesResponseResult + */ +export interface CastLikesResponseResult { + /** + * + * @type {Array} + * @memberof CastLikesResponseResult + */ + 'likes': Array; + /** + * + * @type {NextCursor} + * @memberof CastLikesResponseResult + */ + 'next': NextCursor; +} + diff --git a/src/neynar-api/v1/openapi/models/cast-likes-response.ts b/src/neynar-api/v1/openapi/models/cast-likes-response.ts new file mode 100644 index 00000000..d5276564 --- /dev/null +++ b/src/neynar-api/v1/openapi/models/cast-likes-response.ts @@ -0,0 +1,33 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Farcaster API V1 + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +// May contain unused imports in some cases +// @ts-ignore +import type { CastLikesResponseResult } from './cast-likes-response-result'; + +/** + * + * @export + * @interface CastLikesResponse + */ +export interface CastLikesResponse { + /** + * + * @type {CastLikesResponseResult} + * @memberof CastLikesResponse + */ + 'result': CastLikesResponseResult; +} + diff --git a/src/neynar-api/v1/openapi/models/cast-parent-author-all-of.ts b/src/neynar-api/v1/openapi/models/cast-parent-author-all-of.ts new file mode 100644 index 00000000..9b0b1260 --- /dev/null +++ b/src/neynar-api/v1/openapi/models/cast-parent-author-all-of.ts @@ -0,0 +1,30 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Farcaster API V1 + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + + +/** + * + * @export + * @interface CastParentAuthorAllOf + */ +export interface CastParentAuthorAllOf { + /** + * + * @type {string} + * @memberof CastParentAuthorAllOf + */ + 'fid': string | null; +} + diff --git a/src/neynar-api/v1/openapi/models/cast-parent-author.ts b/src/neynar-api/v1/openapi/models/cast-parent-author.ts new file mode 100644 index 00000000..ef41946d --- /dev/null +++ b/src/neynar-api/v1/openapi/models/cast-parent-author.ts @@ -0,0 +1,26 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Farcaster API V1 + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +// May contain unused imports in some cases +// @ts-ignore +import type { CastParentAuthorAllOf } from './cast-parent-author-all-of'; + +/** + * @type CastParentAuthor + * @export + */ +export type CastParentAuthor = CastParentAuthorAllOf; + + diff --git a/src/neynar-api/v1/openapi/models/cast-reactions-response-result.ts b/src/neynar-api/v1/openapi/models/cast-reactions-response-result.ts new file mode 100644 index 00000000..506eecab --- /dev/null +++ b/src/neynar-api/v1/openapi/models/cast-reactions-response-result.ts @@ -0,0 +1,42 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Farcaster API V1 + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +// May contain unused imports in some cases +// @ts-ignore +import type { NextCursor } from './next-cursor'; +// May contain unused imports in some cases +// @ts-ignore +import type { Reaction } from './reaction'; + +/** + * + * @export + * @interface CastReactionsResponseResult + */ +export interface CastReactionsResponseResult { + /** + * + * @type {Array} + * @memberof CastReactionsResponseResult + */ + 'casts': Array; + /** + * + * @type {NextCursor} + * @memberof CastReactionsResponseResult + */ + 'next': NextCursor; +} + diff --git a/src/neynar-api/v1/openapi/models/cast-reactions-response.ts b/src/neynar-api/v1/openapi/models/cast-reactions-response.ts new file mode 100644 index 00000000..867e90ad --- /dev/null +++ b/src/neynar-api/v1/openapi/models/cast-reactions-response.ts @@ -0,0 +1,33 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Farcaster API V1 + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +// May contain unused imports in some cases +// @ts-ignore +import type { CastReactionsResponseResult } from './cast-reactions-response-result'; + +/** + * + * @export + * @interface CastReactionsResponse + */ +export interface CastReactionsResponse { + /** + * + * @type {CastReactionsResponseResult} + * @memberof CastReactionsResponse + */ + 'result': CastReactionsResponseResult; +} + diff --git a/src/neynar-api/v1/openapi/models/cast-recaster-response-result.ts b/src/neynar-api/v1/openapi/models/cast-recaster-response-result.ts new file mode 100644 index 00000000..54455789 --- /dev/null +++ b/src/neynar-api/v1/openapi/models/cast-recaster-response-result.ts @@ -0,0 +1,42 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Farcaster API V1 + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +// May contain unused imports in some cases +// @ts-ignore +import type { NextCursor } from './next-cursor'; +// May contain unused imports in some cases +// @ts-ignore +import type { Recaster } from './recaster'; + +/** + * + * @export + * @interface CastRecasterResponseResult + */ +export interface CastRecasterResponseResult { + /** + * + * @type {Array} + * @memberof CastRecasterResponseResult + */ + 'users': Array; + /** + * + * @type {NextCursor} + * @memberof CastRecasterResponseResult + */ + 'next': NextCursor; +} + diff --git a/src/neynar-api/v1/openapi/models/cast-recaster-response.ts b/src/neynar-api/v1/openapi/models/cast-recaster-response.ts new file mode 100644 index 00000000..623725fb --- /dev/null +++ b/src/neynar-api/v1/openapi/models/cast-recaster-response.ts @@ -0,0 +1,33 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Farcaster API V1 + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +// May contain unused imports in some cases +// @ts-ignore +import type { CastRecasterResponseResult } from './cast-recaster-response-result'; + +/** + * + * @export + * @interface CastRecasterResponse + */ +export interface CastRecasterResponse { + /** + * + * @type {CastRecasterResponseResult} + * @memberof CastRecasterResponse + */ + 'result': CastRecasterResponseResult; +} + diff --git a/src/neynar-api/v1/openapi/models/cast-response-result.ts b/src/neynar-api/v1/openapi/models/cast-response-result.ts new file mode 100644 index 00000000..aa7b3b29 --- /dev/null +++ b/src/neynar-api/v1/openapi/models/cast-response-result.ts @@ -0,0 +1,33 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Farcaster API V1 + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +// May contain unused imports in some cases +// @ts-ignore +import type { CastWithInteractions } from './cast-with-interactions'; + +/** + * + * @export + * @interface CastResponseResult + */ +export interface CastResponseResult { + /** + * + * @type {CastWithInteractions} + * @memberof CastResponseResult + */ + 'cast': CastWithInteractions; +} + diff --git a/src/neynar-api/v1/openapi/models/cast-response.ts b/src/neynar-api/v1/openapi/models/cast-response.ts new file mode 100644 index 00000000..bd0c1627 --- /dev/null +++ b/src/neynar-api/v1/openapi/models/cast-response.ts @@ -0,0 +1,33 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Farcaster API V1 + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +// May contain unused imports in some cases +// @ts-ignore +import type { CastResponseResult } from './cast-response-result'; + +/** + * + * @export + * @interface CastResponse + */ +export interface CastResponse { + /** + * + * @type {CastResponseResult} + * @memberof CastResponse + */ + 'result': CastResponseResult; +} + diff --git a/src/neynar-api/v1/openapi/models/cast-type.ts b/src/neynar-api/v1/openapi/models/cast-type.ts new file mode 100644 index 00000000..666ee34e --- /dev/null +++ b/src/neynar-api/v1/openapi/models/cast-type.ts @@ -0,0 +1,31 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Farcaster API V1 + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + + +/** + * The notification type of a cast. + * @export + * @enum {string} + */ + +export const CastType = { + Mention: 'cast-mention', + Reply: 'cast-reply' +} as const; + +export type CastType = typeof CastType[keyof typeof CastType]; + + + diff --git a/src/neynar-api/v1/openapi/models/cast-with-interactions-all-of.ts b/src/neynar-api/v1/openapi/models/cast-with-interactions-all-of.ts new file mode 100644 index 00000000..710cec47 --- /dev/null +++ b/src/neynar-api/v1/openapi/models/cast-with-interactions-all-of.ts @@ -0,0 +1,66 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Farcaster API V1 + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +// May contain unused imports in some cases +// @ts-ignore +import type { CastWithInteractionsReactions } from './cast-with-interactions-reactions'; +// May contain unused imports in some cases +// @ts-ignore +import type { CastWithInteractionsRecasts } from './cast-with-interactions-recasts'; +// May contain unused imports in some cases +// @ts-ignore +import type { CastWithInteractionsReplies } from './cast-with-interactions-replies'; +// May contain unused imports in some cases +// @ts-ignore +import type { ViewerContext } from './viewer-context'; + +/** + * + * @export + * @interface CastWithInteractionsAllOf + */ +export interface CastWithInteractionsAllOf { + /** + * + * @type {CastWithInteractionsReactions} + * @memberof CastWithInteractionsAllOf + */ + 'reactions': CastWithInteractionsReactions; + /** + * + * @type {CastWithInteractionsRecasts} + * @memberof CastWithInteractionsAllOf + */ + 'recasts': CastWithInteractionsRecasts; + /** + * + * @type {Array} + * @memberof CastWithInteractionsAllOf + */ + 'recasters': Array; + /** + * + * @type {ViewerContext} + * @memberof CastWithInteractionsAllOf + */ + 'viewerContext'?: ViewerContext; + /** + * + * @type {CastWithInteractionsReplies} + * @memberof CastWithInteractionsAllOf + */ + 'replies': CastWithInteractionsReplies; +} + diff --git a/src/neynar-api/v1/openapi/models/cast-with-interactions-reactions.ts b/src/neynar-api/v1/openapi/models/cast-with-interactions-reactions.ts new file mode 100644 index 00000000..b3c3d430 --- /dev/null +++ b/src/neynar-api/v1/openapi/models/cast-with-interactions-reactions.ts @@ -0,0 +1,42 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Farcaster API V1 + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + + +/** + * + * @export + * @interface CastWithInteractionsReactions + */ +export interface CastWithInteractionsReactions { + /** + * + * @type {number} + * @memberof CastWithInteractionsReactions + */ + 'count': number; + /** + * + * @type {Array} + * @memberof CastWithInteractionsReactions + */ + 'fids': Array; + /** + * + * @type {Array} + * @memberof CastWithInteractionsReactions + */ + 'fnames': Array; +} + diff --git a/src/neynar-api/v1/openapi/models/cast-with-interactions-recasts.ts b/src/neynar-api/v1/openapi/models/cast-with-interactions-recasts.ts new file mode 100644 index 00000000..58ceb191 --- /dev/null +++ b/src/neynar-api/v1/openapi/models/cast-with-interactions-recasts.ts @@ -0,0 +1,36 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Farcaster API V1 + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + + +/** + * + * @export + * @interface CastWithInteractionsRecasts + */ +export interface CastWithInteractionsRecasts { + /** + * + * @type {number} + * @memberof CastWithInteractionsRecasts + */ + 'count': number; + /** + * + * @type {Array} + * @memberof CastWithInteractionsRecasts + */ + 'fids': Array; +} + diff --git a/src/neynar-api/v1/openapi/models/cast-with-interactions-replies.ts b/src/neynar-api/v1/openapi/models/cast-with-interactions-replies.ts new file mode 100644 index 00000000..dca5a15d --- /dev/null +++ b/src/neynar-api/v1/openapi/models/cast-with-interactions-replies.ts @@ -0,0 +1,30 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Farcaster API V1 + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + + +/** + * + * @export + * @interface CastWithInteractionsReplies + */ +export interface CastWithInteractionsReplies { + /** + * + * @type {number} + * @memberof CastWithInteractionsReplies + */ + 'count': number; +} + diff --git a/src/neynar-api/v1/openapi/models/cast-with-interactions.ts b/src/neynar-api/v1/openapi/models/cast-with-interactions.ts new file mode 100644 index 00000000..51405df2 --- /dev/null +++ b/src/neynar-api/v1/openapi/models/cast-with-interactions.ts @@ -0,0 +1,56 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Farcaster API V1 + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +// May contain unused imports in some cases +// @ts-ignore +import type { Cast } from './cast'; +// May contain unused imports in some cases +// @ts-ignore +import type { CastAuthor } from './cast-author'; +// May contain unused imports in some cases +// @ts-ignore +import type { CastParentAuthor } from './cast-parent-author'; +// May contain unused imports in some cases +// @ts-ignore +import type { CastType } from './cast-type'; +// May contain unused imports in some cases +// @ts-ignore +import type { CastWithInteractionsAllOf } from './cast-with-interactions-all-of'; +// May contain unused imports in some cases +// @ts-ignore +import type { CastWithInteractionsReactions } from './cast-with-interactions-reactions'; +// May contain unused imports in some cases +// @ts-ignore +import type { CastWithInteractionsRecasts } from './cast-with-interactions-recasts'; +// May contain unused imports in some cases +// @ts-ignore +import type { CastWithInteractionsReplies } from './cast-with-interactions-replies'; +// May contain unused imports in some cases +// @ts-ignore +import type { EmbedUrl } from './embed-url'; +// May contain unused imports in some cases +// @ts-ignore +import type { User } from './user'; +// May contain unused imports in some cases +// @ts-ignore +import type { ViewerContext } from './viewer-context'; + +/** + * @type CastWithInteractions + * @export + */ +export type CastWithInteractions = Cast & CastWithInteractionsAllOf; + + diff --git a/src/neynar-api/v1/openapi/models/cast.ts b/src/neynar-api/v1/openapi/models/cast.ts new file mode 100644 index 00000000..d6c1ebf0 --- /dev/null +++ b/src/neynar-api/v1/openapi/models/cast.ts @@ -0,0 +1,107 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Farcaster API V1 + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +// May contain unused imports in some cases +// @ts-ignore +import type { CastAuthor } from './cast-author'; +// May contain unused imports in some cases +// @ts-ignore +import type { CastParentAuthor } from './cast-parent-author'; +// May contain unused imports in some cases +// @ts-ignore +import type { CastType } from './cast-type'; +// May contain unused imports in some cases +// @ts-ignore +import type { EmbedUrl } from './embed-url'; +// May contain unused imports in some cases +// @ts-ignore +import type { User } from './user'; + +/** + * + * @export + * @interface Cast + */ +export interface Cast { + /** + * + * @type {string} + * @memberof Cast + */ + 'hash': string; + /** + * + * @type {string} + * @memberof Cast + */ + 'parentHash': string | null; + /** + * + * @type {string} + * @memberof Cast + */ + 'parentUrl': string | null; + /** + * + * @type {string} + * @memberof Cast + */ + 'threadHash': string; + /** + * + * @type {CastParentAuthor} + * @memberof Cast + */ + 'parentAuthor': CastParentAuthor; + /** + * + * @type {Array} + * @memberof Cast + */ + 'mentionedProfiles': Array; + /** + * + * @type {CastAuthor} + * @memberof Cast + */ + 'author': CastAuthor; + /** + * + * @type {string} + * @memberof Cast + */ + 'text': string; + /** + * + * @type {string} + * @memberof Cast + */ + 'timestamp': string; + /** + * + * @type {Array} + * @memberof Cast + */ + 'embeds': Array; + /** + * + * @type {CastType} + * @memberof Cast + */ + 'type'?: CastType; +} + + + diff --git a/src/neynar-api/v1/openapi/models/casts-response-result.ts b/src/neynar-api/v1/openapi/models/casts-response-result.ts new file mode 100644 index 00000000..344d1453 --- /dev/null +++ b/src/neynar-api/v1/openapi/models/casts-response-result.ts @@ -0,0 +1,42 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Farcaster API V1 + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +// May contain unused imports in some cases +// @ts-ignore +import type { CastWithInteractions } from './cast-with-interactions'; +// May contain unused imports in some cases +// @ts-ignore +import type { NextCursor } from './next-cursor'; + +/** + * + * @export + * @interface CastsResponseResult + */ +export interface CastsResponseResult { + /** + * + * @type {Array} + * @memberof CastsResponseResult + */ + 'casts': Array; + /** + * + * @type {NextCursor} + * @memberof CastsResponseResult + */ + 'next': NextCursor; +} + diff --git a/src/neynar-api/v1/openapi/models/casts-response.ts b/src/neynar-api/v1/openapi/models/casts-response.ts new file mode 100644 index 00000000..ecf8c317 --- /dev/null +++ b/src/neynar-api/v1/openapi/models/casts-response.ts @@ -0,0 +1,33 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Farcaster API V1 + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +// May contain unused imports in some cases +// @ts-ignore +import type { CastsResponseResult } from './casts-response-result'; + +/** + * + * @export + * @interface CastsResponse + */ +export interface CastsResponse { + /** + * + * @type {CastsResponseResult} + * @memberof CastsResponse + */ + 'result': CastsResponseResult; +} + diff --git a/src/neynar-api/v1/openapi/models/custody-address-response-result.ts b/src/neynar-api/v1/openapi/models/custody-address-response-result.ts new file mode 100644 index 00000000..166cc00a --- /dev/null +++ b/src/neynar-api/v1/openapi/models/custody-address-response-result.ts @@ -0,0 +1,36 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Farcaster API V1 + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + + +/** + * + * @export + * @interface CustodyAddressResponseResult + */ +export interface CustodyAddressResponseResult { + /** + * User identifier (unsigned integer) + * @type {number} + * @memberof CustodyAddressResponseResult + */ + 'fid': number; + /** + * + * @type {string} + * @memberof CustodyAddressResponseResult + */ + 'custodyAddress': string | null; +} + diff --git a/src/neynar-api/v1/openapi/models/custody-address-response.ts b/src/neynar-api/v1/openapi/models/custody-address-response.ts new file mode 100644 index 00000000..67fac775 --- /dev/null +++ b/src/neynar-api/v1/openapi/models/custody-address-response.ts @@ -0,0 +1,33 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Farcaster API V1 + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +// May contain unused imports in some cases +// @ts-ignore +import type { CustodyAddressResponseResult } from './custody-address-response-result'; + +/** + * + * @export + * @interface CustodyAddressResponse + */ +export interface CustodyAddressResponse { + /** + * + * @type {CustodyAddressResponseResult} + * @memberof CustodyAddressResponse + */ + 'result': CustodyAddressResponseResult; +} + diff --git a/src/neynar-api/v1/openapi/models/embed-url.ts b/src/neynar-api/v1/openapi/models/embed-url.ts new file mode 100644 index 00000000..d415d982 --- /dev/null +++ b/src/neynar-api/v1/openapi/models/embed-url.ts @@ -0,0 +1,30 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Farcaster API V1 + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + + +/** + * + * @export + * @interface EmbedUrl + */ +export interface EmbedUrl { + /** + * + * @type {string} + * @memberof EmbedUrl + */ + 'url': string; +} + diff --git a/src/neynar-api/v1/openapi/models/error-res.ts b/src/neynar-api/v1/openapi/models/error-res.ts new file mode 100644 index 00000000..17501baf --- /dev/null +++ b/src/neynar-api/v1/openapi/models/error-res.ts @@ -0,0 +1,42 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Farcaster API V1 + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + + +/** + * Returns ErrorRes metadata + * @export + * @interface ErrorRes + */ +export interface ErrorRes { + /** + * + * @type {string} + * @memberof ErrorRes + */ + 'code'?: string; + /** + * + * @type {string} + * @memberof ErrorRes + */ + 'message': string; + /** + * + * @type {string} + * @memberof ErrorRes + */ + 'property'?: string; +} + diff --git a/src/neynar-api/v1/openapi/models/follow-response-result.ts b/src/neynar-api/v1/openapi/models/follow-response-result.ts new file mode 100644 index 00000000..25d2fab4 --- /dev/null +++ b/src/neynar-api/v1/openapi/models/follow-response-result.ts @@ -0,0 +1,42 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Farcaster API V1 + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +// May contain unused imports in some cases +// @ts-ignore +import type { FollowResponseUser } from './follow-response-user'; +// May contain unused imports in some cases +// @ts-ignore +import type { NextCursor } from './next-cursor'; + +/** + * + * @export + * @interface FollowResponseResult + */ +export interface FollowResponseResult { + /** + * + * @type {Array} + * @memberof FollowResponseResult + */ + 'users': Array; + /** + * + * @type {NextCursor} + * @memberof FollowResponseResult + */ + 'next': NextCursor; +} + diff --git a/src/neynar-api/v1/openapi/models/follow-response-user-all-of.ts b/src/neynar-api/v1/openapi/models/follow-response-user-all-of.ts new file mode 100644 index 00000000..4463d719 --- /dev/null +++ b/src/neynar-api/v1/openapi/models/follow-response-user-all-of.ts @@ -0,0 +1,30 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Farcaster API V1 + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + + +/** + * + * @export + * @interface FollowResponseUserAllOf + */ +export interface FollowResponseUserAllOf { + /** + * + * @type {string} + * @memberof FollowResponseUserAllOf + */ + 'timestamp': string; +} + diff --git a/src/neynar-api/v1/openapi/models/follow-response-user.ts b/src/neynar-api/v1/openapi/models/follow-response-user.ts new file mode 100644 index 00000000..03842ede --- /dev/null +++ b/src/neynar-api/v1/openapi/models/follow-response-user.ts @@ -0,0 +1,38 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Farcaster API V1 + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +// May contain unused imports in some cases +// @ts-ignore +import type { FollowResponseUserAllOf } from './follow-response-user-all-of'; +// May contain unused imports in some cases +// @ts-ignore +import type { User } from './user'; +// May contain unused imports in some cases +// @ts-ignore +import type { UserPfp } from './user-pfp'; +// May contain unused imports in some cases +// @ts-ignore +import type { UserProfile } from './user-profile'; +// May contain unused imports in some cases +// @ts-ignore +import type { ViewerContext } from './viewer-context'; + +/** + * @type FollowResponseUser + * @export + */ +export type FollowResponseUser = FollowResponseUserAllOf & User; + + diff --git a/src/neynar-api/v1/openapi/models/follow-response.ts b/src/neynar-api/v1/openapi/models/follow-response.ts new file mode 100644 index 00000000..48868271 --- /dev/null +++ b/src/neynar-api/v1/openapi/models/follow-response.ts @@ -0,0 +1,33 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Farcaster API V1 + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +// May contain unused imports in some cases +// @ts-ignore +import type { FollowResponseResult } from './follow-response-result'; + +/** + * + * @export + * @interface FollowResponse + */ +export interface FollowResponse { + /** + * + * @type {FollowResponseResult} + * @memberof FollowResponse + */ + 'result': FollowResponseResult; +} + diff --git a/src/neynar-api/v1/openapi/models/index.ts b/src/neynar-api/v1/openapi/models/index.ts new file mode 100644 index 00000000..da248c75 --- /dev/null +++ b/src/neynar-api/v1/openapi/models/index.ts @@ -0,0 +1,65 @@ +export * from './all-casts-in-thread-response'; +export * from './all-casts-in-thread-response-result'; +export * from './cast'; +export * from './cast-author'; +export * from './cast-author-one-of'; +export * from './cast-likes-response'; +export * from './cast-likes-response-result'; +export * from './cast-parent-author'; +export * from './cast-parent-author-all-of'; +export * from './cast-reactions-response'; +export * from './cast-reactions-response-result'; +export * from './cast-recaster-response'; +export * from './cast-recaster-response-result'; +export * from './cast-response'; +export * from './cast-response-result'; +export * from './cast-type'; +export * from './cast-with-interactions'; +export * from './cast-with-interactions-all-of'; +export * from './cast-with-interactions-reactions'; +export * from './cast-with-interactions-recasts'; +export * from './cast-with-interactions-replies'; +export * from './casts-response'; +export * from './casts-response-result'; +export * from './custody-address-response'; +export * from './custody-address-response-result'; +export * from './embed-url'; +export * from './error-res'; +export * from './follow-response'; +export * from './follow-response-result'; +export * from './follow-response-user'; +export * from './follow-response-user-all-of'; +export * from './mentions-and-replies-response'; +export * from './mentions-and-replies-response-result'; +export * from './next-cursor'; +export * from './reaction'; +export * from './reaction-type'; +export * from './reaction-with-cast-meta'; +export * from './reaction-with-cast-meta-cast'; +export * from './reaction-with-cast-meta-reaction'; +export * from './reactions-and-recasts-notification'; +export * from './reactions-and-recasts-notification-all-of'; +export * from './reactions-and-recasts-response'; +export * from './reactions-and-recasts-response-result'; +export * from './reactor'; +export * from './reactor-pfp'; +export * from './reactor-viewer-context'; +export * from './recaster'; +export * from './recaster-pfp'; +export * from './recaster-profile'; +export * from './recaster-profile-bio'; +export * from './recaster-viewer-context'; +export * from './recent-casts-response'; +export * from './recent-users-response'; +export * from './recent-users-response-result'; +export * from './user'; +export * from './user-cast-like-response'; +export * from './user-cast-like-response-result'; +export * from './user-pfp'; +export * from './user-profile'; +export * from './user-profile-bio'; +export * from './user-response'; +export * from './user-response-result'; +export * from './verification-response'; +export * from './verification-response-result'; +export * from './viewer-context'; diff --git a/src/neynar-api/v1/openapi/models/mentions-and-replies-response-result.ts b/src/neynar-api/v1/openapi/models/mentions-and-replies-response-result.ts new file mode 100644 index 00000000..19f6fcaf --- /dev/null +++ b/src/neynar-api/v1/openapi/models/mentions-and-replies-response-result.ts @@ -0,0 +1,42 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Farcaster API V1 + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +// May contain unused imports in some cases +// @ts-ignore +import type { CastWithInteractions } from './cast-with-interactions'; +// May contain unused imports in some cases +// @ts-ignore +import type { NextCursor } from './next-cursor'; + +/** + * + * @export + * @interface MentionsAndRepliesResponseResult + */ +export interface MentionsAndRepliesResponseResult { + /** + * + * @type {Array} + * @memberof MentionsAndRepliesResponseResult + */ + 'notifications': Array; + /** + * + * @type {NextCursor} + * @memberof MentionsAndRepliesResponseResult + */ + 'next': NextCursor; +} + diff --git a/src/neynar-api/v1/openapi/models/mentions-and-replies-response.ts b/src/neynar-api/v1/openapi/models/mentions-and-replies-response.ts new file mode 100644 index 00000000..c008e17b --- /dev/null +++ b/src/neynar-api/v1/openapi/models/mentions-and-replies-response.ts @@ -0,0 +1,33 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Farcaster API V1 + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +// May contain unused imports in some cases +// @ts-ignore +import type { MentionsAndRepliesResponseResult } from './mentions-and-replies-response-result'; + +/** + * + * @export + * @interface MentionsAndRepliesResponse + */ +export interface MentionsAndRepliesResponse { + /** + * + * @type {MentionsAndRepliesResponseResult} + * @memberof MentionsAndRepliesResponse + */ + 'result': MentionsAndRepliesResponseResult; +} + diff --git a/src/neynar-api/v1/openapi/models/next-cursor.ts b/src/neynar-api/v1/openapi/models/next-cursor.ts new file mode 100644 index 00000000..22764474 --- /dev/null +++ b/src/neynar-api/v1/openapi/models/next-cursor.ts @@ -0,0 +1,30 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Farcaster API V1 + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + + +/** + * Returns next cursor + * @export + * @interface NextCursor + */ +export interface NextCursor { + /** + * + * @type {string} + * @memberof NextCursor + */ + 'cursor': string | null; +} + diff --git a/src/neynar-api/v1/openapi/models/reaction-type.ts b/src/neynar-api/v1/openapi/models/reaction-type.ts new file mode 100644 index 00000000..c0ff57ba --- /dev/null +++ b/src/neynar-api/v1/openapi/models/reaction-type.ts @@ -0,0 +1,31 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Farcaster API V1 + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + + +/** + * The reaction type of a cast. - like: Cast is being liked by a user. - recast: Cast is being recasted by a user. + * @export + * @enum {string} + */ + +export const ReactionType = { + Like: 'like', + Recast: 'recast' +} as const; + +export type ReactionType = typeof ReactionType[keyof typeof ReactionType]; + + + diff --git a/src/neynar-api/v1/openapi/models/reaction-with-cast-meta-cast.ts b/src/neynar-api/v1/openapi/models/reaction-with-cast-meta-cast.ts new file mode 100644 index 00000000..a6e552df --- /dev/null +++ b/src/neynar-api/v1/openapi/models/reaction-with-cast-meta-cast.ts @@ -0,0 +1,57 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Farcaster API V1 + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +// May contain unused imports in some cases +// @ts-ignore +import type { EmbedUrl } from './embed-url'; + +/** + * + * @export + * @interface ReactionWithCastMetaCast + */ +export interface ReactionWithCastMetaCast { + /** + * User identifier (unsigned integer) + * @type {number} + * @memberof ReactionWithCastMetaCast + */ + 'cast_fid': number; + /** + * + * @type {string} + * @memberof ReactionWithCastMetaCast + */ + 'cast_hash': string; + /** + * + * @type {string} + * @memberof ReactionWithCastMetaCast + */ + 'cast_text': string; + /** + * + * @type {Array} + * @memberof ReactionWithCastMetaCast + */ + 'cast_embeds': Array; + /** + * + * @type {string} + * @memberof ReactionWithCastMetaCast + */ + 'cast_timestamp': string; +} + diff --git a/src/neynar-api/v1/openapi/models/reaction-with-cast-meta-reaction.ts b/src/neynar-api/v1/openapi/models/reaction-with-cast-meta-reaction.ts new file mode 100644 index 00000000..2717cd1b --- /dev/null +++ b/src/neynar-api/v1/openapi/models/reaction-with-cast-meta-reaction.ts @@ -0,0 +1,59 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Farcaster API V1 + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +// May contain unused imports in some cases +// @ts-ignore +import type { ReactionType } from './reaction-type'; + +/** + * + * @export + * @interface ReactionWithCastMetaReaction + */ +export interface ReactionWithCastMetaReaction { + /** + * User identifier (unsigned integer) + * @type {number} + * @memberof ReactionWithCastMetaReaction + */ + 'reactor_fid': number; + /** + * + * @type {ReactionType} + * @memberof ReactionWithCastMetaReaction + */ + 'reaction_type': ReactionType; + /** + * + * @type {string} + * @memberof ReactionWithCastMetaReaction + */ + 'reaction_hash': string; + /** + * + * @type {string} + * @memberof ReactionWithCastMetaReaction + */ + 'reaction_target_hash': string; + /** + * + * @type {string} + * @memberof ReactionWithCastMetaReaction + */ + 'reaction_timestamp': string; +} + + + diff --git a/src/neynar-api/v1/openapi/models/reaction-with-cast-meta.ts b/src/neynar-api/v1/openapi/models/reaction-with-cast-meta.ts new file mode 100644 index 00000000..e2c628e1 --- /dev/null +++ b/src/neynar-api/v1/openapi/models/reaction-with-cast-meta.ts @@ -0,0 +1,51 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Farcaster API V1 + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +// May contain unused imports in some cases +// @ts-ignore +import type { ReactionWithCastMetaCast } from './reaction-with-cast-meta-cast'; +// May contain unused imports in some cases +// @ts-ignore +import type { ReactionWithCastMetaReaction } from './reaction-with-cast-meta-reaction'; +// May contain unused imports in some cases +// @ts-ignore +import type { User } from './user'; + +/** + * Reaction of a user (either like or recast), along with its associated cast + * @export + * @interface ReactionWithCastMeta + */ +export interface ReactionWithCastMeta { + /** + * + * @type {ReactionWithCastMetaReaction} + * @memberof ReactionWithCastMeta + */ + 'reaction': ReactionWithCastMetaReaction; + /** + * + * @type {ReactionWithCastMetaCast} + * @memberof ReactionWithCastMeta + */ + 'cast'?: ReactionWithCastMetaCast; + /** + * + * @type {User} + * @memberof ReactionWithCastMeta + */ + 'cast_author'?: User; +} + diff --git a/src/neynar-api/v1/openapi/models/reaction.ts b/src/neynar-api/v1/openapi/models/reaction.ts new file mode 100644 index 00000000..cc8196b6 --- /dev/null +++ b/src/neynar-api/v1/openapi/models/reaction.ts @@ -0,0 +1,62 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Farcaster API V1 + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +// May contain unused imports in some cases +// @ts-ignore +import type { ReactionType } from './reaction-type'; +// May contain unused imports in some cases +// @ts-ignore +import type { Reactor } from './reactor'; + +/** + * + * @export + * @interface Reaction + */ +export interface Reaction { + /** + * + * @type {ReactionType} + * @memberof Reaction + */ + 'type': ReactionType; + /** + * Ethereum address + * @type {string} + * @memberof Reaction + */ + 'hash': string; + /** + * + * @type {Reactor} + * @memberof Reaction + */ + 'reactor': Reactor; + /** + * + * @type {string} + * @memberof Reaction + */ + 'timestamp': string; + /** + * Cast Hash + * @type {string} + * @memberof Reaction + */ + 'castHash': string; +} + + + diff --git a/src/neynar-api/v1/openapi/models/reactions-and-recasts-notification-all-of.ts b/src/neynar-api/v1/openapi/models/reactions-and-recasts-notification-all-of.ts new file mode 100644 index 00000000..672dcf90 --- /dev/null +++ b/src/neynar-api/v1/openapi/models/reactions-and-recasts-notification-all-of.ts @@ -0,0 +1,44 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Farcaster API V1 + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +// May contain unused imports in some cases +// @ts-ignore +import type { ReactionType } from './reaction-type'; +// May contain unused imports in some cases +// @ts-ignore +import type { User } from './user'; + +/** + * + * @export + * @interface ReactionsAndRecastsNotificationAllOf + */ +export interface ReactionsAndRecastsNotificationAllOf { + /** + * + * @type {Array} + * @memberof ReactionsAndRecastsNotificationAllOf + */ + 'reactors'?: Array; + /** + * + * @type {ReactionType} + * @memberof ReactionsAndRecastsNotificationAllOf + */ + 'reactionType'?: ReactionType; +} + + + diff --git a/src/neynar-api/v1/openapi/models/reactions-and-recasts-notification.ts b/src/neynar-api/v1/openapi/models/reactions-and-recasts-notification.ts new file mode 100644 index 00000000..160aac63 --- /dev/null +++ b/src/neynar-api/v1/openapi/models/reactions-and-recasts-notification.ts @@ -0,0 +1,47 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Farcaster API V1 + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +// May contain unused imports in some cases +// @ts-ignore +import type { Cast } from './cast'; +// May contain unused imports in some cases +// @ts-ignore +import type { CastAuthor } from './cast-author'; +// May contain unused imports in some cases +// @ts-ignore +import type { CastParentAuthor } from './cast-parent-author'; +// May contain unused imports in some cases +// @ts-ignore +import type { CastType } from './cast-type'; +// May contain unused imports in some cases +// @ts-ignore +import type { EmbedUrl } from './embed-url'; +// May contain unused imports in some cases +// @ts-ignore +import type { ReactionType } from './reaction-type'; +// May contain unused imports in some cases +// @ts-ignore +import type { ReactionsAndRecastsNotificationAllOf } from './reactions-and-recasts-notification-all-of'; +// May contain unused imports in some cases +// @ts-ignore +import type { User } from './user'; + +/** + * @type ReactionsAndRecastsNotification + * @export + */ +export type ReactionsAndRecastsNotification = Cast & ReactionsAndRecastsNotificationAllOf; + + diff --git a/src/neynar-api/v1/openapi/models/reactions-and-recasts-response-result.ts b/src/neynar-api/v1/openapi/models/reactions-and-recasts-response-result.ts new file mode 100644 index 00000000..52e06b01 --- /dev/null +++ b/src/neynar-api/v1/openapi/models/reactions-and-recasts-response-result.ts @@ -0,0 +1,42 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Farcaster API V1 + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +// May contain unused imports in some cases +// @ts-ignore +import type { NextCursor } from './next-cursor'; +// May contain unused imports in some cases +// @ts-ignore +import type { ReactionsAndRecastsNotification } from './reactions-and-recasts-notification'; + +/** + * + * @export + * @interface ReactionsAndRecastsResponseResult + */ +export interface ReactionsAndRecastsResponseResult { + /** + * + * @type {Array} + * @memberof ReactionsAndRecastsResponseResult + */ + 'notifications': Array; + /** + * + * @type {NextCursor} + * @memberof ReactionsAndRecastsResponseResult + */ + 'next': NextCursor; +} + diff --git a/src/neynar-api/v1/openapi/models/reactions-and-recasts-response.ts b/src/neynar-api/v1/openapi/models/reactions-and-recasts-response.ts new file mode 100644 index 00000000..e6411cbd --- /dev/null +++ b/src/neynar-api/v1/openapi/models/reactions-and-recasts-response.ts @@ -0,0 +1,33 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Farcaster API V1 + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +// May contain unused imports in some cases +// @ts-ignore +import type { ReactionsAndRecastsResponseResult } from './reactions-and-recasts-response-result'; + +/** + * + * @export + * @interface ReactionsAndRecastsResponse + */ +export interface ReactionsAndRecastsResponse { + /** + * + * @type {ReactionsAndRecastsResponseResult} + * @memberof ReactionsAndRecastsResponse + */ + 'result': ReactionsAndRecastsResponseResult; +} + diff --git a/src/neynar-api/v1/openapi/models/reactor-pfp.ts b/src/neynar-api/v1/openapi/models/reactor-pfp.ts new file mode 100644 index 00000000..b3b036f6 --- /dev/null +++ b/src/neynar-api/v1/openapi/models/reactor-pfp.ts @@ -0,0 +1,30 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Farcaster API V1 + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + + +/** + * + * @export + * @interface ReactorPfp + */ +export interface ReactorPfp { + /** + * The URL of the reactor\'s profile picture. + * @type {string} + * @memberof ReactorPfp + */ + 'url': string; +} + diff --git a/src/neynar-api/v1/openapi/models/reactor-viewer-context.ts b/src/neynar-api/v1/openapi/models/reactor-viewer-context.ts new file mode 100644 index 00000000..857f06de --- /dev/null +++ b/src/neynar-api/v1/openapi/models/reactor-viewer-context.ts @@ -0,0 +1,36 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Farcaster API V1 + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + + +/** + * + * @export + * @interface ReactorViewerContext + */ +export interface ReactorViewerContext { + /** + * Indicates if the viewer is following the reactor. + * @type {boolean} + * @memberof ReactorViewerContext + */ + 'following': boolean; + /** + * Indicates if the reactor is followed by the viewer. + * @type {boolean} + * @memberof ReactorViewerContext + */ + 'followedBy': boolean; +} + diff --git a/src/neynar-api/v1/openapi/models/reactor.ts b/src/neynar-api/v1/openapi/models/reactor.ts new file mode 100644 index 00000000..9e3a916d --- /dev/null +++ b/src/neynar-api/v1/openapi/models/reactor.ts @@ -0,0 +1,72 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Farcaster API V1 + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +// May contain unused imports in some cases +// @ts-ignore +import type { ReactorPfp } from './reactor-pfp'; +// May contain unused imports in some cases +// @ts-ignore +import type { ReactorViewerContext } from './reactor-viewer-context'; + +/** + * + * @export + * @interface Reactor + */ +export interface Reactor { + /** + * The unique identifier of the reactor. + * @type {number} + * @memberof Reactor + */ + 'fid': number; + /** + * The username of the reactor. + * @type {string} + * @memberof Reactor + */ + 'username': string; + /** + * The display name of the reactor. + * @type {string} + * @memberof Reactor + */ + 'displayName': string; + /** + * + * @type {ReactorPfp} + * @memberof Reactor + */ + 'pfp': ReactorPfp; + /** + * The number of followers the reactor has. + * @type {number} + * @memberof Reactor + */ + 'followerCount': number; + /** + * The number of users the reactor is following. + * @type {number} + * @memberof Reactor + */ + 'followingCount': number; + /** + * + * @type {ReactorViewerContext} + * @memberof Reactor + */ + 'viewerContext'?: ReactorViewerContext; +} + diff --git a/src/neynar-api/v1/openapi/models/recaster-pfp.ts b/src/neynar-api/v1/openapi/models/recaster-pfp.ts new file mode 100644 index 00000000..a8875297 --- /dev/null +++ b/src/neynar-api/v1/openapi/models/recaster-pfp.ts @@ -0,0 +1,30 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Farcaster API V1 + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + + +/** + * + * @export + * @interface RecasterPfp + */ +export interface RecasterPfp { + /** + * The URL of the recaster\'s profile picture. + * @type {string} + * @memberof RecasterPfp + */ + 'url': string; +} + diff --git a/src/neynar-api/v1/openapi/models/recaster-profile-bio.ts b/src/neynar-api/v1/openapi/models/recaster-profile-bio.ts new file mode 100644 index 00000000..9edea940 --- /dev/null +++ b/src/neynar-api/v1/openapi/models/recaster-profile-bio.ts @@ -0,0 +1,36 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Farcaster API V1 + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + + +/** + * + * @export + * @interface RecasterProfileBio + */ +export interface RecasterProfileBio { + /** + * + * @type {string} + * @memberof RecasterProfileBio + */ + 'text': string; + /** + * + * @type {Array} + * @memberof RecasterProfileBio + */ + 'mentions': Array; +} + diff --git a/src/neynar-api/v1/openapi/models/recaster-profile.ts b/src/neynar-api/v1/openapi/models/recaster-profile.ts new file mode 100644 index 00000000..082e265c --- /dev/null +++ b/src/neynar-api/v1/openapi/models/recaster-profile.ts @@ -0,0 +1,33 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Farcaster API V1 + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +// May contain unused imports in some cases +// @ts-ignore +import type { RecasterProfileBio } from './recaster-profile-bio'; + +/** + * + * @export + * @interface RecasterProfile + */ +export interface RecasterProfile { + /** + * + * @type {RecasterProfileBio} + * @memberof RecasterProfile + */ + 'bio': RecasterProfileBio; +} + diff --git a/src/neynar-api/v1/openapi/models/recaster-viewer-context.ts b/src/neynar-api/v1/openapi/models/recaster-viewer-context.ts new file mode 100644 index 00000000..105aa440 --- /dev/null +++ b/src/neynar-api/v1/openapi/models/recaster-viewer-context.ts @@ -0,0 +1,36 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Farcaster API V1 + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + + +/** + * + * @export + * @interface RecasterViewerContext + */ +export interface RecasterViewerContext { + /** + * Indicates if the viewer is following the recaster. + * @type {boolean} + * @memberof RecasterViewerContext + */ + 'following': boolean; + /** + * Indicates if the recaster is followed by the viewer. + * @type {boolean} + * @memberof RecasterViewerContext + */ + 'followedBy': boolean; +} + diff --git a/src/neynar-api/v1/openapi/models/recaster.ts b/src/neynar-api/v1/openapi/models/recaster.ts new file mode 100644 index 00000000..6118ec00 --- /dev/null +++ b/src/neynar-api/v1/openapi/models/recaster.ts @@ -0,0 +1,87 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Farcaster API V1 + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +// May contain unused imports in some cases +// @ts-ignore +import type { RecasterPfp } from './recaster-pfp'; +// May contain unused imports in some cases +// @ts-ignore +import type { RecasterProfile } from './recaster-profile'; +// May contain unused imports in some cases +// @ts-ignore +import type { RecasterViewerContext } from './recaster-viewer-context'; + +/** + * + * @export + * @interface Recaster + */ +export interface Recaster { + /** + * The unique identifier of the recaster. + * @type {number} + * @memberof Recaster + */ + 'fid': number; + /** + * The username of the recaster. + * @type {string} + * @memberof Recaster + */ + 'username': string; + /** + * The display name of the recaster. + * @type {string} + * @memberof Recaster + */ + 'displayName': string; + /** + * + * @type {RecasterPfp} + * @memberof Recaster + */ + 'pfp': RecasterPfp; + /** + * + * @type {RecasterProfile} + * @memberof Recaster + */ + 'profile': RecasterProfile; + /** + * The number of followers the recaster has. + * @type {number} + * @memberof Recaster + */ + 'followerCount': number; + /** + * The number of users the recaster is following. + * @type {number} + * @memberof Recaster + */ + 'followingCount': number; + /** + * + * @type {string} + * @memberof Recaster + */ + 'timestamp': string; + /** + * + * @type {RecasterViewerContext} + * @memberof Recaster + */ + 'viewerContext'?: RecasterViewerContext; +} + diff --git a/src/neynar-api/v1/openapi/models/recent-casts-response.ts b/src/neynar-api/v1/openapi/models/recent-casts-response.ts new file mode 100644 index 00000000..f5bf6ebf --- /dev/null +++ b/src/neynar-api/v1/openapi/models/recent-casts-response.ts @@ -0,0 +1,33 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Farcaster API V1 + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +// May contain unused imports in some cases +// @ts-ignore +import type { CastsResponseResult } from './casts-response-result'; + +/** + * + * @export + * @interface RecentCastsResponse + */ +export interface RecentCastsResponse { + /** + * + * @type {CastsResponseResult} + * @memberof RecentCastsResponse + */ + 'result': CastsResponseResult; +} + diff --git a/src/neynar-api/v1/openapi/models/recent-users-response-result.ts b/src/neynar-api/v1/openapi/models/recent-users-response-result.ts new file mode 100644 index 00000000..fd082b0b --- /dev/null +++ b/src/neynar-api/v1/openapi/models/recent-users-response-result.ts @@ -0,0 +1,42 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Farcaster API V1 + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +// May contain unused imports in some cases +// @ts-ignore +import type { NextCursor } from './next-cursor'; +// May contain unused imports in some cases +// @ts-ignore +import type { User } from './user'; + +/** + * + * @export + * @interface RecentUsersResponseResult + */ +export interface RecentUsersResponseResult { + /** + * + * @type {Array} + * @memberof RecentUsersResponseResult + */ + 'users': Array; + /** + * + * @type {NextCursor} + * @memberof RecentUsersResponseResult + */ + 'next': NextCursor; +} + diff --git a/src/neynar-api/v1/openapi/models/recent-users-response.ts b/src/neynar-api/v1/openapi/models/recent-users-response.ts new file mode 100644 index 00000000..03aa6b97 --- /dev/null +++ b/src/neynar-api/v1/openapi/models/recent-users-response.ts @@ -0,0 +1,33 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Farcaster API V1 + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +// May contain unused imports in some cases +// @ts-ignore +import type { RecentUsersResponseResult } from './recent-users-response-result'; + +/** + * + * @export + * @interface RecentUsersResponse + */ +export interface RecentUsersResponse { + /** + * + * @type {RecentUsersResponseResult} + * @memberof RecentUsersResponse + */ + 'result': RecentUsersResponseResult; +} + diff --git a/src/neynar-api/v1/openapi/models/user-cast-like-response-result.ts b/src/neynar-api/v1/openapi/models/user-cast-like-response-result.ts new file mode 100644 index 00000000..3cf837ca --- /dev/null +++ b/src/neynar-api/v1/openapi/models/user-cast-like-response-result.ts @@ -0,0 +1,51 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Farcaster API V1 + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +// May contain unused imports in some cases +// @ts-ignore +import type { NextCursor } from './next-cursor'; +// May contain unused imports in some cases +// @ts-ignore +import type { ReactionWithCastMeta } from './reaction-with-cast-meta'; +// May contain unused imports in some cases +// @ts-ignore +import type { User } from './user'; + +/** + * + * @export + * @interface UserCastLikeResponseResult + */ +export interface UserCastLikeResponseResult { + /** + * + * @type {User} + * @memberof UserCastLikeResponseResult + */ + 'reactor': User; + /** + * + * @type {Array} + * @memberof UserCastLikeResponseResult + */ + 'likes': Array; + /** + * + * @type {NextCursor} + * @memberof UserCastLikeResponseResult + */ + 'next': NextCursor; +} + diff --git a/src/neynar-api/v1/openapi/models/user-cast-like-response.ts b/src/neynar-api/v1/openapi/models/user-cast-like-response.ts new file mode 100644 index 00000000..fd9d1344 --- /dev/null +++ b/src/neynar-api/v1/openapi/models/user-cast-like-response.ts @@ -0,0 +1,33 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Farcaster API V1 + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +// May contain unused imports in some cases +// @ts-ignore +import type { UserCastLikeResponseResult } from './user-cast-like-response-result'; + +/** + * + * @export + * @interface UserCastLikeResponse + */ +export interface UserCastLikeResponse { + /** + * + * @type {UserCastLikeResponseResult} + * @memberof UserCastLikeResponse + */ + 'result': UserCastLikeResponseResult; +} + diff --git a/src/neynar-api/v1/openapi/models/user-pfp.ts b/src/neynar-api/v1/openapi/models/user-pfp.ts new file mode 100644 index 00000000..33d9ec17 --- /dev/null +++ b/src/neynar-api/v1/openapi/models/user-pfp.ts @@ -0,0 +1,30 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Farcaster API V1 + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + + +/** + * + * @export + * @interface UserPfp + */ +export interface UserPfp { + /** + * The URL of the user\'s profile picture. + * @type {string} + * @memberof UserPfp + */ + 'url': string; +} + diff --git a/src/neynar-api/v1/openapi/models/user-profile-bio.ts b/src/neynar-api/v1/openapi/models/user-profile-bio.ts new file mode 100644 index 00000000..fa66cca7 --- /dev/null +++ b/src/neynar-api/v1/openapi/models/user-profile-bio.ts @@ -0,0 +1,36 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Farcaster API V1 + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + + +/** + * + * @export + * @interface UserProfileBio + */ +export interface UserProfileBio { + /** + * + * @type {string} + * @memberof UserProfileBio + */ + 'text': string; + /** + * + * @type {Array} + * @memberof UserProfileBio + */ + 'mentionedProfiles': Array; +} + diff --git a/src/neynar-api/v1/openapi/models/user-profile.ts b/src/neynar-api/v1/openapi/models/user-profile.ts new file mode 100644 index 00000000..0b4de68f --- /dev/null +++ b/src/neynar-api/v1/openapi/models/user-profile.ts @@ -0,0 +1,33 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Farcaster API V1 + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +// May contain unused imports in some cases +// @ts-ignore +import type { UserProfileBio } from './user-profile-bio'; + +/** + * + * @export + * @interface UserProfile + */ +export interface UserProfile { + /** + * + * @type {UserProfileBio} + * @memberof UserProfile + */ + 'bio': UserProfileBio; +} + diff --git a/src/neynar-api/v1/openapi/models/user-response-result.ts b/src/neynar-api/v1/openapi/models/user-response-result.ts new file mode 100644 index 00000000..1065839c --- /dev/null +++ b/src/neynar-api/v1/openapi/models/user-response-result.ts @@ -0,0 +1,33 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Farcaster API V1 + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +// May contain unused imports in some cases +// @ts-ignore +import type { User } from './user'; + +/** + * + * @export + * @interface UserResponseResult + */ +export interface UserResponseResult { + /** + * + * @type {User} + * @memberof UserResponseResult + */ + 'user': User; +} + diff --git a/src/neynar-api/v1/openapi/models/user-response.ts b/src/neynar-api/v1/openapi/models/user-response.ts new file mode 100644 index 00000000..8af3f883 --- /dev/null +++ b/src/neynar-api/v1/openapi/models/user-response.ts @@ -0,0 +1,33 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Farcaster API V1 + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +// May contain unused imports in some cases +// @ts-ignore +import type { UserResponseResult } from './user-response-result'; + +/** + * + * @export + * @interface UserResponse + */ +export interface UserResponse { + /** + * + * @type {UserResponseResult} + * @memberof UserResponse + */ + 'result': UserResponseResult; +} + diff --git a/src/neynar-api/v1/openapi/models/user.ts b/src/neynar-api/v1/openapi/models/user.ts new file mode 100644 index 00000000..0a7c465e --- /dev/null +++ b/src/neynar-api/v1/openapi/models/user.ts @@ -0,0 +1,93 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Farcaster API V1 + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +// May contain unused imports in some cases +// @ts-ignore +import type { UserPfp } from './user-pfp'; +// May contain unused imports in some cases +// @ts-ignore +import type { UserProfile } from './user-profile'; +// May contain unused imports in some cases +// @ts-ignore +import type { ViewerContext } from './viewer-context'; + +/** + * + * @export + * @interface User + */ +export interface User { + /** + * User identifier (unsigned integer) + * @type {number} + * @memberof User + */ + 'fid': number; + /** + * The username of the user. + * @type {string} + * @memberof User + */ + 'username': string; + /** + * Custody Address of the user. + * @type {string} + * @memberof User + */ + 'custodyAddress': string; + /** + * The display of the reactor. + * @type {string} + * @memberof User + */ + 'displayName': string; + /** + * + * @type {UserPfp} + * @memberof User + */ + 'pfp': UserPfp; + /** + * + * @type {UserProfile} + * @memberof User + */ + 'profile': UserProfile; + /** + * The number of followers the user has. + * @type {number} + * @memberof User + */ + 'followerCount': number; + /** + * The number of users the user is following. + * @type {number} + * @memberof User + */ + 'followingCount': number; + /** + * + * @type {Array} + * @memberof User + */ + 'verifications': Array; + /** + * + * @type {ViewerContext} + * @memberof User + */ + 'viewerContext'?: ViewerContext; +} + diff --git a/src/neynar-api/v1/openapi/models/verification-response-result.ts b/src/neynar-api/v1/openapi/models/verification-response-result.ts new file mode 100644 index 00000000..e438d9b4 --- /dev/null +++ b/src/neynar-api/v1/openapi/models/verification-response-result.ts @@ -0,0 +1,48 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Farcaster API V1 + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + + +/** + * + * @export + * @interface VerificationResponseResult + */ +export interface VerificationResponseResult { + /** + * + * @type {string} + * @memberof VerificationResponseResult + */ + 'fid': string; + /** + * + * @type {string} + * @memberof VerificationResponseResult + */ + 'username': string; + /** + * + * @type {string} + * @memberof VerificationResponseResult + */ + 'display_name': string; + /** + * + * @type {Array} + * @memberof VerificationResponseResult + */ + 'verifications': Array; +} + diff --git a/src/neynar-api/v1/openapi/models/verification-response.ts b/src/neynar-api/v1/openapi/models/verification-response.ts new file mode 100644 index 00000000..c0e9b9d5 --- /dev/null +++ b/src/neynar-api/v1/openapi/models/verification-response.ts @@ -0,0 +1,33 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Farcaster API V1 + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +// May contain unused imports in some cases +// @ts-ignore +import type { VerificationResponseResult } from './verification-response-result'; + +/** + * + * @export + * @interface VerificationResponse + */ +export interface VerificationResponse { + /** + * + * @type {VerificationResponseResult} + * @memberof VerificationResponse + */ + 'result': VerificationResponseResult; +} + diff --git a/src/neynar-api/v1/openapi/models/viewer-context.ts b/src/neynar-api/v1/openapi/models/viewer-context.ts new file mode 100644 index 00000000..26adb0b6 --- /dev/null +++ b/src/neynar-api/v1/openapi/models/viewer-context.ts @@ -0,0 +1,48 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Farcaster API V1 + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + + +/** + * + * @export + * @interface ViewerContext + */ +export interface ViewerContext { + /** + * + * @type {boolean} + * @memberof ViewerContext + */ + 'following': boolean; + /** + * + * @type {boolean} + * @memberof ViewerContext + */ + 'followedBy': boolean; + /** + * + * @type {boolean} + * @memberof ViewerContext + */ + 'liked'?: boolean; + /** + * + * @type {boolean} + * @memberof ViewerContext + */ + 'recasted'?: boolean; +} + diff --git a/src/neynar-api/v2/openapi-farcaster/.openapi-generator/FILES b/src/neynar-api/v2/openapi-farcaster/.openapi-generator/FILES index 16b445ee..e9115b73 100644 --- a/src/neynar-api/v2/openapi-farcaster/.openapi-generator/FILES +++ b/src/neynar-api/v2/openapi-farcaster/.openapi-generator/FILES @@ -2,8 +2,274 @@ .npmignore .openapi-generator-ignore api.ts +apis/action-api.ts +apis/ban-api.ts +apis/block-api.ts +apis/cast-api.ts +apis/channel-api.ts +apis/feed-api.ts +apis/fname-api.ts +apis/follows-api.ts +apis/frame-api.ts +apis/mute-api.ts +apis/notifications-api.ts +apis/reaction-api.ts +apis/signer-api.ts +apis/storage-api.ts +apis/subscribers-api.ts +apis/user-api.ts +apis/webhook-api.ts base.ts common.ts configuration.ts git_push.sh index.ts +models/add-verification-req-body.ts +models/authorization-url-response-type.ts +models/authorization-url-response.ts +models/ban-list-response.ts +models/ban-record.ts +models/ban-req-body.ts +models/ban-response.ts +models/block-list-response.ts +models/block-record.ts +models/bulk-casts-response.ts +models/bulk-follow-response.ts +models/bulk-users-response.ts +models/buy-storage-req-body.ts +models/cast-composer-actions-list-response-actions-inner-action.ts +models/cast-composer-actions-list-response-actions-inner.ts +models/cast-composer-actions-list-response.ts +models/cast-composer-type.ts +models/cast-conversation-sort-type.ts +models/cast-dehydrated.ts +models/cast-embedded-parent-author.ts +models/cast-embedded.ts +models/cast-id.ts +models/cast-notification-type.ts +models/cast-param-type.ts +models/cast-response.ts +models/cast-viewer-context.ts +models/cast-with-interactions-all-of.ts +models/cast-with-interactions-and-conversations-all-of.ts +models/cast-with-interactions-and-conversations-ref-all-of.ts +models/cast-with-interactions-and-conversations-ref.ts +models/cast-with-interactions-and-conversations.ts +models/cast-with-interactions-reactions.ts +models/cast-with-interactions-replies.ts +models/cast-with-interactions.ts +models/cast.ts +models/casts-response-result.ts +models/casts-response.ts +models/casts-search-response-result.ts +models/casts-search-response.ts +models/channel-activity.ts +models/channel-external-link.ts +models/channel-follow-req-body.ts +models/channel-list-response.ts +models/channel-member-channel.ts +models/channel-member-invite-list-response.ts +models/channel-member-invite.ts +models/channel-member-list-response.ts +models/channel-member-role.ts +models/channel-member-user.ts +models/channel-member.ts +models/channel-or-dehydrated-channel.ts +models/channel-response-bulk.ts +models/channel-response.ts +models/channel-search-response.ts +models/channel-type.ts +models/channel-user-context.ts +models/channel-viewer-context.ts +models/channel.ts +models/conflict-error-res.ts +models/conversation-conversation.ts +models/conversation.ts +models/dehydrated-channel.ts +models/dehydrated-follower.ts +models/delete-cast-req-body.ts +models/delete-frame-response.ts +models/delete-neynar-frame-request.ts +models/developer-managed-signer.ts +models/embed-cast-deep.ts +models/embed-cast.ts +models/embed-deep.ts +models/embed-type.ts +models/embed-url-metadata-html-all-of-oembed.ts +models/embed-url-metadata-html-all-of.ts +models/embed-url-metadata-html.ts +models/embed-url-metadata-image.ts +models/embed-url-metadata-video-stream-inner.ts +models/embed-url-metadata-video.ts +models/embed-url-metadata.ts +models/embed-url.ts +models/embed.ts +models/error-res.ts +models/farcaster-action-req-body-action.ts +models/farcaster-action-req-body.ts +models/feed-for-you400-response.ts +models/feed-response.ts +models/feed-trending-provider.ts +models/feed-type.ts +models/filter-type.ts +models/fname-availability-response.ts +models/follow-req-body.ts +models/follow-response.ts +models/follow-sort-type.ts +models/follow.ts +models/followers-response.ts +models/for-you-provider.ts +models/frame-action-button.ts +models/frame-action-req-body.ts +models/frame-action.ts +models/frame-button-action-type.ts +models/frame-developer-managed-action-req-body.ts +models/frame-from-url200-response.ts +models/frame-input.ts +models/frame-signature-packet-trusted-data.ts +models/frame-signature-packet-untrusted-data.ts +models/frame-signature-packet.ts +models/frame-state.ts +models/frame-transaction.ts +models/frame-type.ts +models/frame-validate-analytics-input-text-input-texts-inner.ts +models/frame-validate-analytics-input-text.ts +models/frame-validate-analytics-interactions-per-cast-interactions-per-cast-inner.ts +models/frame-validate-analytics-interactions-per-cast.ts +models/frame-validate-analytics-interactors-interactors-inner.ts +models/frame-validate-analytics-interactors.ts +models/frame-validate-analytics-response.ts +models/frame-validate-analytics-total-interactors.ts +models/frame-validate-list-response.ts +models/frame.ts +models/hydrated-follower.ts +models/image-object.ts +models/index.ts +models/individual-hash-obj.ts +models/location-address.ts +models/location.ts +models/mark-notifications-as-seen-req-body.ts +models/mute-list-response.ts +models/mute-record.ts +models/mute-req-body.ts +models/mute-response.ts +models/next-cursor.ts +models/neynar-frame-creation-request.ts +models/neynar-frame-page.ts +models/neynar-frame-update-request.ts +models/neynar-frame.ts +models/neynar-next-frame-page-mint-url.ts +models/neynar-next-frame-page-redirect.ts +models/neynar-next-frame-page.ts +models/neynar-page-button-next-page.ts +models/neynar-page-button.ts +models/neynar-page-image.ts +models/neynar-page-input-text.ts +models/neynar-page-input.ts +models/notification-type.ts +models/notification.ts +models/notifications-response.ts +models/oembed-data.ts +models/oembed-link-data-all-of.ts +models/oembed-link-data.ts +models/oembed-photo-data-all-of.ts +models/oembed-photo-data.ts +models/oembed-rich-data-all-of.ts +models/oembed-rich-data.ts +models/oembed-video-data-all-of.ts +models/oembed-video-data.ts +models/og-object.ts +models/operation-response.ts +models/post-cast-req-body-embeds-cast-id-properties.ts +models/post-cast-req-body-embeds.ts +models/post-cast-req-body.ts +models/post-cast-response-cast.ts +models/post-cast-response.ts +models/profile-url-pfp.ts +models/profile-url.ts +models/reaction-for-cast.ts +models/reaction-like.ts +models/reaction-recast.ts +models/reaction-req-body.ts +models/reaction-type.ts +models/reaction-with-cast-info.ts +models/reaction-with-user-info.ts +models/reactions-cast-response.ts +models/reactions-response.ts +models/reactions-type.ts +models/register-developer-managed-signed-key-req-body.ts +models/register-signer-key-req-body.ts +models/register-user-req-body.ts +models/register-user-response.ts +models/relevant-followers-response.ts +models/remove-channel-member-request.ts +models/remove-verification-req-body.ts +models/respond-channel-invite-request.ts +models/searched-user.ts +models/signed-key-request-sponsor.ts +models/signer.ts +models/storage-allocation.ts +models/storage-allocations-response.ts +models/storage-object.ts +models/storage-usage-response.ts +models/subscribed-to-all-of.ts +models/subscribed-to-object.ts +models/subscribed-to-response.ts +models/subscribed-to.ts +models/subscriber.ts +models/subscribers-response.ts +models/subscription-metadata.ts +models/subscription-price.ts +models/subscription-provider.ts +models/subscription-providers.ts +models/subscription-status.ts +models/subscription-tier-price.ts +models/subscription-tier.ts +models/subscription-token.ts +models/subscription.ts +models/subscriptions-response.ts +models/subscriptions.ts +models/trending-channel-response.ts +models/update-user-req-body-location.ts +models/update-user-req-body.ts +models/user-dehydrated.ts +models/user-fidresponse.ts +models/user-power-lite-response-result.ts +models/user-power-lite-response.ts +models/user-profile-bio.ts +models/user-profile.ts +models/user-response.ts +models/user-search-response-result.ts +models/user-search-response.ts +models/user-verified-accounts-inner.ts +models/user-verified-addresses.ts +models/user-viewer-context.ts +models/user.ts +models/users-active-channels-response.ts +models/users-response.ts +models/validate-frame-action-response.ts +models/validate-frame-analytics-type.ts +models/validate-frame-request.ts +models/validated-frame-action-signer.ts +models/validated-frame-action-tapped-button.ts +models/validated-frame-action.ts +models/verification-chain-id.ts +models/verification-type.ts +models/video-object.ts +models/webhook-delete-req-body.ts +models/webhook-list-response.ts +models/webhook-patch-req-body.ts +models/webhook-post-req-body.ts +models/webhook-put-req-body-all-of.ts +models/webhook-put-req-body.ts +models/webhook-response.ts +models/webhook-secret.ts +models/webhook-subscription-filters-cast.ts +models/webhook-subscription-filters-follow.ts +models/webhook-subscription-filters-reaction.ts +models/webhook-subscription-filters-user-updated.ts +models/webhook-subscription-filters.ts +models/webhook-subscription.ts +models/webhook.ts +models/zod-error-errors-inner.ts +models/zod-error.ts diff --git a/src/neynar-api/v2/openapi-farcaster/api.ts b/src/neynar-api/v2/openapi-farcaster/api.ts index c806a2f6..f273b258 100644 --- a/src/neynar-api/v2/openapi-farcaster/api.ts +++ b/src/neynar-api/v2/openapi-farcaster/api.ts @@ -13,16004 +13,22 @@ */ -import type { Configuration } from './configuration'; -import type { AxiosPromise, AxiosInstance, RawAxiosRequestConfig } from 'axios'; -import globalAxios from 'axios'; -// Some imports not used depending on template conditions -// @ts-ignore -import { DUMMY_BASE_URL, assertParamExists, setApiKeyToObject, setBasicAuthToObject, setBearerAuthToObject, setOAuthToObject, setSearchParams, serializeDataIfNeeded, toPathString, createRequestFunction } from './common'; -import type { RequestArgs } from './base'; -// @ts-ignore -import { BASE_PATH, COLLECTION_FORMATS, BaseAPI, RequiredError, operationServerMap } from './base'; - -/** - * - * @export - * @interface AddVerificationReqBody - */ -export interface AddVerificationReqBody { - /** - * UUID of the signer - * @type {string} - * @memberof AddVerificationReqBody - */ - 'signer_uuid': string; - /** - * Ethereum address - * @type {string} - * @memberof AddVerificationReqBody - */ - 'address': string; - /** - * - * @type {string} - * @memberof AddVerificationReqBody - */ - 'block_hash': string; - /** - * - * @type {string} - * @memberof AddVerificationReqBody - */ - 'eth_signature': string; - /** - * - * @type {VerificationType} - * @memberof AddVerificationReqBody - */ - 'verification_type'?: VerificationType; - /** - * - * @type {VerificationChainId} - * @memberof AddVerificationReqBody - */ - 'chain_id'?: VerificationChainId; -} - - -/** - * - * @export - * @interface AuthorizationUrlResponse - */ -export interface AuthorizationUrlResponse { - /** - * - * @type {string} - * @memberof AuthorizationUrlResponse - */ - 'authorization_url': string; -} -/** - * - * @export - * @enum {string} - */ - -export const AuthorizationUrlResponseType = { - Code: 'code' -} as const; - -export type AuthorizationUrlResponseType = typeof AuthorizationUrlResponseType[keyof typeof AuthorizationUrlResponseType]; - - -/** - * - * @export - * @interface BanListResponse - */ -export interface BanListResponse { - /** - * - * @type {Array} - * @memberof BanListResponse - */ - 'bans': Array; - /** - * - * @type {NextCursor} - * @memberof BanListResponse - */ - 'next': NextCursor; -} -/** - * - * @export - * @interface BanRecord - */ -export interface BanRecord { - /** - * - * @type {string} - * @memberof BanRecord - */ - 'object': BanRecordObjectEnum; - /** - * - * @type {User} - * @memberof BanRecord - */ - 'banned'?: User; - /** - * - * @type {string} - * @memberof BanRecord - */ - 'banned_at': string; -} - -export const BanRecordObjectEnum = { - Ban: 'ban' -} as const; - -export type BanRecordObjectEnum = typeof BanRecordObjectEnum[keyof typeof BanRecordObjectEnum]; - -/** - * - * @export - * @interface BanReqBody - */ -export interface BanReqBody { - /** - * - * @type {Array} - * @memberof BanReqBody - */ - 'fids': Array; -} -/** - * - * @export - * @interface BanResponse - */ -export interface BanResponse { - /** - * - * @type {boolean} - * @memberof BanResponse - */ - 'success': boolean; - /** - * - * @type {string} - * @memberof BanResponse - */ - 'message'?: string | null; -} -/** - * - * @export - * @interface BlockListResponse - */ -export interface BlockListResponse { - /** - * - * @type {Array} - * @memberof BlockListResponse - */ - 'blocks': Array; - /** - * - * @type {NextCursor} - * @memberof BlockListResponse - */ - 'next': NextCursor; -} -/** - * - * @export - * @interface BlockRecord - */ -export interface BlockRecord { - /** - * - * @type {string} - * @memberof BlockRecord - */ - 'object': BlockRecordObjectEnum; - /** - * - * @type {User} - * @memberof BlockRecord - */ - 'blocked'?: User; - /** - * - * @type {User} - * @memberof BlockRecord - */ - 'blocker'?: User; - /** - * - * @type {string} - * @memberof BlockRecord - */ - 'blocked_at': string; -} - -export const BlockRecordObjectEnum = { - Block: 'block' -} as const; - -export type BlockRecordObjectEnum = typeof BlockRecordObjectEnum[keyof typeof BlockRecordObjectEnum]; - -/** - * - * @export - * @interface BulkCastsResponse - */ -export interface BulkCastsResponse { - /** - * - * @type {Array} - * @memberof BulkCastsResponse - */ - 'casts': Array; -} -/** - * - * @export - * @interface BulkFollowResponse - */ -export interface BulkFollowResponse { - /** - * - * @type {boolean} - * @memberof BulkFollowResponse - */ - 'success': boolean; - /** - * - * @type {Array} - * @memberof BulkFollowResponse - */ - 'details': Array; -} -/** - * - * @export - * @interface BulkUsersResponse - */ -export interface BulkUsersResponse { - /** - * - * @type {Array} - * @memberof BulkUsersResponse - */ - 'users': Array; -} -/** - * - * @export - * @interface BuyStorageReqBody - */ -export interface BuyStorageReqBody { - /** - * - * @type {number} - * @memberof BuyStorageReqBody - */ - 'fid': number; - /** - * Number of storage units to buy. A storage unit lets you store 5000 casts, 2500 reactions and 2500 links. - * @type {number} - * @memberof BuyStorageReqBody - */ - 'units'?: number; - /** - * An Idempotency key is a unique identifier for the request. **Note:** 1) This is used to prevent duplicate requests. Use the same idem key on retry attempts. 2) This should be a unique identifier for each request. 3) Recommended format is a 16-character string generated by the developer at the time of making this request. - * @type {string} - * @memberof BuyStorageReqBody - */ - 'idem'?: string; -} -/** - * - * @export - * @interface Cast - */ -export interface Cast { - /** - * - * @type {string} - * @memberof Cast - */ - 'hash': string; - /** - * - * @type {string} - * @memberof Cast - */ - 'parent_hash': string | null; - /** - * - * @type {string} - * @memberof Cast - */ - 'parent_url': string | null; - /** - * - * @type {string} - * @memberof Cast - */ - 'root_parent_url': string | null; - /** - * - * @type {CastEmbeddedParentAuthor} - * @memberof Cast - */ - 'parent_author': CastEmbeddedParentAuthor; - /** - * - * @type {User} - * @memberof Cast - */ - 'author': User; - /** - * - * @type {string} - * @memberof Cast - */ - 'text': string; - /** - * - * @type {string} - * @memberof Cast - */ - 'timestamp': string; - /** - * - * @type {Array} - * @memberof Cast - */ - 'embeds': Array; - /** - * - * @type {CastNotificationType} - * @memberof Cast - */ - 'type'?: CastNotificationType; -} - - -/** - * - * @export - * @interface CastComposerActionsListResponse - */ -export interface CastComposerActionsListResponse { - /** - * - * @type {Array} - * @memberof CastComposerActionsListResponse - */ - 'actions'?: Array; - /** - * - * @type {NextCursor} - * @memberof CastComposerActionsListResponse - */ - 'next'?: NextCursor; -} -/** - * - * @export - * @interface CastComposerActionsListResponseActionsInner - */ -export interface CastComposerActionsListResponseActionsInner { - /** - * The name of the action. - * @type {string} - * @memberof CastComposerActionsListResponseActionsInner - */ - 'name'?: string; - /** - * The icon representing the action. - * @type {string} - * @memberof CastComposerActionsListResponseActionsInner - */ - 'icon'?: string; - /** - * A brief description of the action. - * @type {string} - * @memberof CastComposerActionsListResponseActionsInner - */ - 'description'?: string; - /** - * URL to learn more about the action. - * @type {string} - * @memberof CastComposerActionsListResponseActionsInner - */ - 'about_url'?: string; - /** - * URL of the action\'s image. - * @type {string} - * @memberof CastComposerActionsListResponseActionsInner - */ - 'image_url'?: string; - /** - * URL to perform the action. - * @type {string} - * @memberof CastComposerActionsListResponseActionsInner - */ - 'action_url'?: string; - /** - * - * @type {CastComposerActionsListResponseActionsInnerAction} - * @memberof CastComposerActionsListResponseActionsInner - */ - 'action'?: CastComposerActionsListResponseActionsInnerAction; - /** - * Icon name for the action. - * @type {string} - * @memberof CastComposerActionsListResponseActionsInner - */ - 'octicon'?: string; - /** - * Number of times the action has been added. - * @type {number} - * @memberof CastComposerActionsListResponseActionsInner - */ - 'added_count'?: number; - /** - * Name of the application providing the action. - * @type {string} - * @memberof CastComposerActionsListResponseActionsInner - */ - 'app_name'?: string; - /** - * Author\'s Farcaster ID. - * @type {number} - * @memberof CastComposerActionsListResponseActionsInner - */ - 'author_fid'?: number; - /** - * Category of the action. - * @type {string} - * @memberof CastComposerActionsListResponseActionsInner - */ - 'category'?: string; - /** - * Object type, which is \"composer_action\". - * @type {string} - * @memberof CastComposerActionsListResponseActionsInner - */ - 'object'?: string; -} -/** - * - * @export - * @interface CastComposerActionsListResponseActionsInnerAction - */ -export interface CastComposerActionsListResponseActionsInnerAction { - /** - * Type of the action (e.g., post). - * @type {string} - * @memberof CastComposerActionsListResponseActionsInnerAction - */ - 'action_type'?: string; - /** - * URL to post the action. - * @type {string} - * @memberof CastComposerActionsListResponseActionsInnerAction - */ - 'post_url'?: string; -} -/** - * - * @export - * @enum {string} - */ - -export const CastComposerType = { - Top: 'top', - Featured: 'featured' -} as const; - -export type CastComposerType = typeof CastComposerType[keyof typeof CastComposerType]; - - -/** - * - * @export - * @enum {string} - */ - -export const CastConversationSortType = { - Chron: 'chron', - DescChron: 'desc_chron', - Algorithmic: 'algorithmic' -} as const; - -export type CastConversationSortType = typeof CastConversationSortType[keyof typeof CastConversationSortType]; - - -/** - * - * @export - * @interface CastDehydrated - */ -export interface CastDehydrated { - /** - * - * @type {string} - * @memberof CastDehydrated - */ - 'object': CastDehydratedObjectEnum; - /** - * - * @type {string} - * @memberof CastDehydrated - */ - 'hash': string; - /** - * - * @type {UserDehydrated} - * @memberof CastDehydrated - */ - 'author'?: UserDehydrated; -} - -export const CastDehydratedObjectEnum = { - CastDehydrated: 'cast_dehydrated' -} as const; - -export type CastDehydratedObjectEnum = typeof CastDehydratedObjectEnum[keyof typeof CastDehydratedObjectEnum]; - -/** - * - * @export - * @interface CastEmbedded - */ -export interface CastEmbedded { - /** - * - * @type {string} - * @memberof CastEmbedded - */ - 'hash': string; - /** - * - * @type {string} - * @memberof CastEmbedded - */ - 'parent_hash': string | null; - /** - * - * @type {string} - * @memberof CastEmbedded - */ - 'parent_url': string | null; - /** - * - * @type {string} - * @memberof CastEmbedded - */ - 'root_parent_url': string | null; - /** - * - * @type {CastEmbeddedParentAuthor} - * @memberof CastEmbedded - */ - 'parent_author': CastEmbeddedParentAuthor; - /** - * - * @type {UserDehydrated} - * @memberof CastEmbedded - */ - 'author': UserDehydrated; - /** - * - * @type {string} - * @memberof CastEmbedded - */ - 'text': string; - /** - * - * @type {string} - * @memberof CastEmbedded - */ - 'timestamp': string; - /** - * - * @type {CastNotificationType} - * @memberof CastEmbedded - */ - 'type': CastNotificationType; - /** - * - * @type {Array} - * @memberof CastEmbedded - */ - 'embeds': Array; - /** - * - * @type {DehydratedChannel} - * @memberof CastEmbedded - */ - 'channel': DehydratedChannel | null; -} - - -/** - * - * @export - * @interface CastEmbeddedParentAuthor - */ -export interface CastEmbeddedParentAuthor { - /** - * The unique identifier of a farcaster user (unsigned integer) - * @type {number} - * @memberof CastEmbeddedParentAuthor - */ - 'fid': number; -} -/** - * - * @export - * @interface CastId - */ -export interface CastId { - /** - * The unique identifier of a farcaster user (unsigned integer) - * @type {number} - * @memberof CastId - */ - 'fid': number; - /** - * - * @type {string} - * @memberof CastId - */ - 'hash': string; -} -/** - * The notification type of a cast. - * @export - * @enum {string} - */ - -export const CastNotificationType = { - Mention: 'cast-mention', - Reply: 'cast-reply' -} as const; - -export type CastNotificationType = typeof CastNotificationType[keyof typeof CastNotificationType]; - - -/** - * The query param accepted by the API. Sent along with identifier param. url - Cast identifier is a url hash - Cast identifier is a hash - * @export - * @enum {string} - */ - -export const CastParamType = { - Url: 'url', - Hash: 'hash' -} as const; - -export type CastParamType = typeof CastParamType[keyof typeof CastParamType]; - - -/** - * - * @export - * @interface CastResponse - */ -export interface CastResponse { - /** - * - * @type {CastWithInteractions} - * @memberof CastResponse - */ - 'cast': CastWithInteractions; -} -/** - * Adds context on interactions the viewer has made with the cast. - * @export - * @interface CastViewerContext - */ -export interface CastViewerContext { - /** - * Indicates if the viewer liked the cast. - * @type {boolean} - * @memberof CastViewerContext - */ - 'liked': boolean; - /** - * Indicates if the viewer recasted the cast. - * @type {boolean} - * @memberof CastViewerContext - */ - 'recasted': boolean; -} -/** - * - * @export - * @interface CastWithInteractions - */ -export interface CastWithInteractions extends Cast { - /** - * - * @type {Array} - * @memberof CastWithInteractions - */ - 'frames'?: Array; - /** - * - * @type {CastWithInteractionsReactions} - * @memberof CastWithInteractions - */ - 'reactions': CastWithInteractionsReactions; - /** - * - * @type {CastWithInteractionsReplies} - * @memberof CastWithInteractions - */ - 'replies': CastWithInteractionsReplies; - /** - * - * @type {string} - * @memberof CastWithInteractions - */ - 'thread_hash': string | null; - /** - * - * @type {Array} - * @memberof CastWithInteractions - */ - 'mentioned_profiles': Array; - /** - * - * @type {ChannelOrDehydratedChannel} - * @memberof CastWithInteractions - */ - 'channel': ChannelOrDehydratedChannel | null; - /** - * - * @type {CastViewerContext} - * @memberof CastWithInteractions - */ - 'viewer_context'?: CastViewerContext; - /** - * - * @type {ChannelUserContext} - * @memberof CastWithInteractions - */ - 'author_channel_context'?: ChannelUserContext; -} - - -/** - * - * @export - * @interface CastWithInteractionsAndConversations - */ -export interface CastWithInteractionsAndConversations extends CastWithInteractions { - /** - * note: This is recursive. It contains the direct replies to the cast and their direct replies up to n reply_depth. - * @type {Array} - * @memberof CastWithInteractionsAndConversations - */ - 'direct_replies': Array; -} - - -/** - * Reference to CastWithInteractionsAndConversations to avoid circular reference - * @export - * @interface CastWithInteractionsAndConversationsRef - */ -export interface CastWithInteractionsAndConversationsRef extends CastWithInteractions { - /** - * note: This is recursive. It contains the direct replies to the cast and their direct replies up to n reply_depth. - * @type {Array} - * @memberof CastWithInteractionsAndConversationsRef - */ - 'direct_replies': Array; -} - - -/** - * - * @export - * @interface CastWithInteractionsReactions - */ -export interface CastWithInteractionsReactions { - /** - * - * @type {Array} - * @memberof CastWithInteractionsReactions - */ - 'likes': Array; - /** - * - * @type {Array} - * @memberof CastWithInteractionsReactions - */ - 'recasts': Array; - /** - * - * @type {number} - * @memberof CastWithInteractionsReactions - */ - 'likes_count': number; - /** - * - * @type {number} - * @memberof CastWithInteractionsReactions - */ - 'recasts_count': number; -} -/** - * - * @export - * @interface CastWithInteractionsReplies - */ -export interface CastWithInteractionsReplies { - /** - * - * @type {number} - * @memberof CastWithInteractionsReplies - */ - 'count': number; -} -/** - * - * @export - * @interface CastsResponse - */ -export interface CastsResponse { - /** - * - * @type {CastsResponseResult} - * @memberof CastsResponse - */ - 'result': CastsResponseResult; -} -/** - * - * @export - * @interface CastsResponseResult - */ -export interface CastsResponseResult { - /** - * - * @type {Array} - * @memberof CastsResponseResult - */ - 'casts': Array; -} -/** - * - * @export - * @interface CastsSearchResponse - */ -export interface CastsSearchResponse { - /** - * - * @type {CastsSearchResponseResult} - * @memberof CastsSearchResponse - */ - 'result': CastsSearchResponseResult; -} -/** - * - * @export - * @interface CastsSearchResponseResult - */ -export interface CastsSearchResponseResult { - /** - * - * @type {Array} - * @memberof CastsSearchResponseResult - */ - 'casts': Array; - /** - * - * @type {NextCursor} - * @memberof CastsSearchResponseResult - */ - 'next': NextCursor; -} -/** - * - * @export - * @interface Channel - */ -export interface Channel { - /** - * - * @type {string} - * @memberof Channel - */ - 'id': string; - /** - * - * @type {string} - * @memberof Channel - */ - 'url': string; - /** - * - * @type {string} - * @memberof Channel - */ - 'name'?: string; - /** - * - * @type {string} - * @memberof Channel - */ - 'description'?: string; - /** - * - * @type {string} - * @memberof Channel - */ - 'object': ChannelObjectEnum; - /** - * Epoch timestamp in seconds. - * @type {number} - * @memberof Channel - */ - 'created_at'?: number; - /** - * Number of followers the channel has. - * @type {number} - * @memberof Channel - */ - 'follower_count'?: number; - /** - * - * @type {ChannelExternalLink} - * @memberof Channel - */ - 'external_link'?: ChannelExternalLink; - /** - * - * @type {string} - * @memberof Channel - */ - 'image_url'?: string; - /** - * - * @type {string} - * @memberof Channel - */ - 'parent_url'?: string; - /** - * - * @type {User} - * @memberof Channel - */ - 'lead'?: User; - /** - * - * @type {Array} - * @memberof Channel - */ - 'moderator_fids'?: Array; - /** - * - * @type {number} - * @memberof Channel - */ - 'member_count'?: number; - /** - * Use `lead` instead. - * @type {User} - * @memberof Channel - * @deprecated - */ - 'moderator'?: User; - /** - * Cast Hash - * @type {string} - * @memberof Channel - */ - 'pinned_cast_hash'?: string; - /** - * - * @type {Array} - * @memberof Channel - */ - 'hosts'?: Array; - /** - * - * @type {ChannelUserContext} - * @memberof Channel - */ - 'viewer_context'?: ChannelUserContext; -} - -export const ChannelObjectEnum = { - Channel: 'channel' -} as const; - -export type ChannelObjectEnum = typeof ChannelObjectEnum[keyof typeof ChannelObjectEnum]; - -/** - * - * @export - * @interface ChannelActivity - */ -export interface ChannelActivity { - /** - * - * @type {string} - * @memberof ChannelActivity - */ - 'object': ChannelActivityObjectEnum; - /** - * - * @type {string} - * @memberof ChannelActivity - */ - 'cast_count_1d': string; - /** - * - * @type {string} - * @memberof ChannelActivity - */ - 'cast_count_7d': string; - /** - * - * @type {string} - * @memberof ChannelActivity - */ - 'cast_count_30d': string; - /** - * - * @type {Channel} - * @memberof ChannelActivity - */ - 'channel': Channel; -} - -export const ChannelActivityObjectEnum = { - ChannelActivity: 'channel_activity' -} as const; - -export type ChannelActivityObjectEnum = typeof ChannelActivityObjectEnum[keyof typeof ChannelActivityObjectEnum]; - -/** - * Channel\'s external link. - * @export - * @interface ChannelExternalLink - */ -export interface ChannelExternalLink { - /** - * - * @type {string} - * @memberof ChannelExternalLink - */ - 'title'?: string; - /** - * - * @type {string} - * @memberof ChannelExternalLink - */ - 'url'?: string; -} -/** - * - * @export - * @interface ChannelFollowReqBody - */ -export interface ChannelFollowReqBody { - /** - * UUID of the signer - * @type {string} - * @memberof ChannelFollowReqBody - */ - 'signer_uuid': string; - /** - * The unique identifier of a farcaster channel - * @type {string} - * @memberof ChannelFollowReqBody - */ - 'channel_id': string; -} -/** - * - * @export - * @interface ChannelListResponse - */ -export interface ChannelListResponse { - /** - * - * @type {Array} - * @memberof ChannelListResponse - */ - 'channels': Array; - /** - * - * @type {NextCursor} - * @memberof ChannelListResponse - */ - 'next'?: NextCursor; -} -/** - * - * @export - * @interface ChannelMember - */ -export interface ChannelMember { - /** - * - * @type {string} - * @memberof ChannelMember - */ - 'object': ChannelMemberObjectEnum; - /** - * - * @type {ChannelMemberRole} - * @memberof ChannelMember - */ - 'role': ChannelMemberRole; - /** - * - * @type {ChannelMemberUser} - * @memberof ChannelMember - */ - 'user': ChannelMemberUser; - /** - * - * @type {ChannelMemberChannel} - * @memberof ChannelMember - */ - 'channel': ChannelMemberChannel; -} - -export const ChannelMemberObjectEnum = { - Member: 'member' -} as const; - -export type ChannelMemberObjectEnum = typeof ChannelMemberObjectEnum[keyof typeof ChannelMemberObjectEnum]; - -/** - * @type ChannelMemberChannel - * @export - */ -export type ChannelMemberChannel = Channel | DehydratedChannel; - -/** - * - * @export - * @interface ChannelMemberInvite - */ -export interface ChannelMemberInvite { - /** - * The unique identifier of a farcaster channel - * @type {string} - * @memberof ChannelMemberInvite - */ - 'channel_id': string; - /** - * - * @type {ChannelMemberRole} - * @memberof ChannelMemberInvite - */ - 'role': ChannelMemberRole; - /** - * - * @type {User} - * @memberof ChannelMemberInvite - */ - 'inviter': User; - /** - * - * @type {User} - * @memberof ChannelMemberInvite - */ - 'invited': User; -} - - -/** - * - * @export - * @interface ChannelMemberInviteListResponse - */ -export interface ChannelMemberInviteListResponse { - /** - * - * @type {Array} - * @memberof ChannelMemberInviteListResponse - */ - 'invites': Array; - /** - * - * @type {NextCursor} - * @memberof ChannelMemberInviteListResponse - */ - 'next'?: NextCursor; -} -/** - * - * @export - * @interface ChannelMemberListResponse - */ -export interface ChannelMemberListResponse { - /** - * - * @type {Array} - * @memberof ChannelMemberListResponse - */ - 'members': Array; - /** - * - * @type {NextCursor} - * @memberof ChannelMemberListResponse - */ - 'next': NextCursor; -} -/** - * The role of a channel member - * @export - * @enum {string} - */ - -export const ChannelMemberRole = { - Member: 'member', - Moderator: 'moderator' -} as const; - -export type ChannelMemberRole = typeof ChannelMemberRole[keyof typeof ChannelMemberRole]; - - -/** - * @type ChannelMemberUser - * @export - */ -export type ChannelMemberUser = User | UserDehydrated; - -/** - * @type ChannelOrDehydratedChannel - * @export - */ -export type ChannelOrDehydratedChannel = { object: 'channel' } & Channel | { object: 'dehydrated_channel' } & DehydratedChannel; - -/** - * - * @export - * @interface ChannelResponse - */ -export interface ChannelResponse { - /** - * - * @type {Channel} - * @memberof ChannelResponse - */ - 'channel': Channel; -} -/** - * - * @export - * @interface ChannelResponseBulk - */ -export interface ChannelResponseBulk { - /** - * - * @type {Array} - * @memberof ChannelResponseBulk - */ - 'channels': Array; -} -/** - * - * @export - * @interface ChannelSearchResponse - */ -export interface ChannelSearchResponse { - /** - * - * @type {Array} - * @memberof ChannelSearchResponse - */ - 'channels': Array; - /** - * - * @type {NextCursor} - * @memberof ChannelSearchResponse - */ - 'next': NextCursor; -} -/** - * - * @export - * @enum {string} - */ - -export const ChannelType = { - Id: 'id', - ParentUrl: 'parent_url' -} as const; - -export type ChannelType = typeof ChannelType[keyof typeof ChannelType]; - - -/** - * Adds context on the viewer\'s or author\'s role in the channel. - * @export - * @interface ChannelUserContext - */ -export interface ChannelUserContext { - /** - * Indicates if the user is following the channel. - * @type {boolean} - * @memberof ChannelUserContext - */ - 'following': boolean; - /** - * - * @type {ChannelMemberRole} - * @memberof ChannelUserContext - */ - 'role'?: ChannelMemberRole; -} - - -/** - * - * @export - * @interface ChannelViewerContext - */ -export interface ChannelViewerContext { - /** - * Indicates if the viewer is following the channel. - * @type {boolean} - * @memberof ChannelViewerContext - */ - 'following': boolean; -} -/** - * Details for the conflict error response - * @export - * @interface ConflictErrorRes - */ -export interface ConflictErrorRes { - /** - * - * @type {string} - * @memberof ConflictErrorRes - */ - 'code'?: string; - /** - * - * @type {string} - * @memberof ConflictErrorRes - */ - 'message': string; - /** - * - * @type {string} - * @memberof ConflictErrorRes - */ - 'property'?: string; - /** - * - * @type {string} - * @memberof ConflictErrorRes - */ - 'key'?: string; -} -/** - * - * @export - * @interface Conversation - */ -export interface Conversation { - /** - * - * @type {ConversationConversation} - * @memberof Conversation - */ - 'conversation': ConversationConversation; - /** - * - * @type {NextCursor} - * @memberof Conversation - */ - 'next'?: NextCursor; -} -/** - * - * @export - * @interface ConversationConversation - */ -export interface ConversationConversation { - /** - * - * @type {CastWithInteractionsAndConversations} - * @memberof ConversationConversation - */ - 'cast': CastWithInteractionsAndConversations; - /** - * - * @type {Array} - * @memberof ConversationConversation - */ - 'chronological_parent_casts'?: Array; -} -/** - * - * @export - * @interface DehydratedChannel - */ -export interface DehydratedChannel { - /** - * - * @type {string} - * @memberof DehydratedChannel - */ - 'id': string; - /** - * - * @type {string} - * @memberof DehydratedChannel - */ - 'name': string; - /** - * - * @type {string} - * @memberof DehydratedChannel - */ - 'object': DehydratedChannelObjectEnum; - /** - * - * @type {string} - * @memberof DehydratedChannel - */ - 'image_url'?: string; - /** - * - * @type {ChannelUserContext} - * @memberof DehydratedChannel - */ - 'viewer_context'?: ChannelUserContext; -} - -export const DehydratedChannelObjectEnum = { - ChannelDehydrated: 'channel_dehydrated' -} as const; - -export type DehydratedChannelObjectEnum = typeof DehydratedChannelObjectEnum[keyof typeof DehydratedChannelObjectEnum]; - -/** - * - * @export - * @interface DehydratedFollower - */ -export interface DehydratedFollower { - /** - * - * @type {string} - * @memberof DehydratedFollower - */ - 'object'?: DehydratedFollowerObjectEnum; - /** - * - * @type {UserDehydrated} - * @memberof DehydratedFollower - */ - 'user'?: UserDehydrated; -} - -export const DehydratedFollowerObjectEnum = { - Follow: 'follow' -} as const; - -export type DehydratedFollowerObjectEnum = typeof DehydratedFollowerObjectEnum[keyof typeof DehydratedFollowerObjectEnum]; - -/** - * - * @export - * @interface DeleteCastReqBody - */ -export interface DeleteCastReqBody { - /** - * UUID of the signer - * @type {string} - * @memberof DeleteCastReqBody - */ - 'signer_uuid': string; - /** - * Cast Hash - * @type {string} - * @memberof DeleteCastReqBody - */ - 'target_hash': string; -} -/** - * - * @export - * @interface DeleteFrameResponse - */ -export interface DeleteFrameResponse { - /** - * - * @type {boolean} - * @memberof DeleteFrameResponse - */ - 'success'?: boolean; - /** - * - * @type {string} - * @memberof DeleteFrameResponse - */ - 'uuid'?: string; -} -/** - * - * @export - * @interface DeleteNeynarFrameRequest - */ -export interface DeleteNeynarFrameRequest { - /** - * - * @type {string} - * @memberof DeleteNeynarFrameRequest - */ - 'uuid'?: string; -} -/** - * - * @export - * @interface DeveloperManagedSigner - */ -export interface DeveloperManagedSigner { - /** - * Ed25519 public key - * @type {string} - * @memberof DeveloperManagedSigner - */ - 'public_key': string; - /** - * - * @type {string} - * @memberof DeveloperManagedSigner - */ - 'status': DeveloperManagedSignerStatusEnum; - /** - * - * @type {string} - * @memberof DeveloperManagedSigner - */ - 'signer_approval_url'?: string; - /** - * The unique identifier of a farcaster user (unsigned integer) - * @type {number} - * @memberof DeveloperManagedSigner - */ - 'fid'?: number; -} - -export const DeveloperManagedSignerStatusEnum = { - PendingApproval: 'pending_approval', - Approved: 'approved', - Revoked: 'revoked' -} as const; - -export type DeveloperManagedSignerStatusEnum = typeof DeveloperManagedSignerStatusEnum[keyof typeof DeveloperManagedSignerStatusEnum]; - -/** - * @type Embed - * @export - */ -export type Embed = EmbedCast | EmbedUrl; - -/** - * - * @export - * @interface EmbedCast - */ -export interface EmbedCast { - /** - * [DEPRECATED: Use \"cast\" key instead] - * @type {CastId} - * @memberof EmbedCast - * @deprecated - */ - 'cast_id'?: CastId; - /** - * - * @type {CastEmbedded} - * @memberof EmbedCast - */ - 'cast': CastEmbedded; -} -/** - * - * @export - * @interface EmbedCastDeep - */ -export interface EmbedCastDeep { - /** - * [DEPRECATED: Use \"cast\" key instead] - * @type {CastId} - * @memberof EmbedCastDeep - * @deprecated - */ - 'cast_id'?: CastId; - /** - * - * @type {CastDehydrated} - * @memberof EmbedCastDeep - */ - 'cast': CastDehydrated; -} -/** - * @type EmbedDeep - * @export - */ -export type EmbedDeep = EmbedCastDeep | EmbedUrl; - -/** - * The content type of the embedded file - * @export - * @enum {string} - */ - -export const EmbedType = { - Text: 'text', - Image: 'image', - Video: 'video', - Audio: 'audio', - TextHtml: 'text/html', - TextPlain: 'text/plain', - ImageJpeg: 'image/jpeg', - ImagePng: 'image/png', - ImageGif: 'image/gif', - ImageWebp: 'image/webp', - ImageSvgxml: 'image/svg+xml', - ImageHeif: 'image/heif', - VideoMp4: 'video/mp4', - VideoQuicktime: 'video/quicktime', - AudioMpeg: 'audio/mpeg', - ApplicationPdf: 'application/pdf', - ApplicationJson: 'application/json', - ApplicationXMpegurl: 'application/x-mpegurl' -} as const; - -export type EmbedType = typeof EmbedType[keyof typeof EmbedType]; - - -/** - * - * @export - * @interface EmbedUrl - */ -export interface EmbedUrl { - /** - * - * @type {string} - * @memberof EmbedUrl - */ - 'url': string; - /** - * - * @type {EmbedUrlMetadata} - * @memberof EmbedUrl - */ - 'metadata'?: EmbedUrlMetadata; -} -/** - * - * @export - * @interface EmbedUrlMetadata - */ -export interface EmbedUrlMetadata { - /** - * - * @type {string} - * @memberof EmbedUrlMetadata - */ - '_status': string; - /** - * - * @type {string} - * @memberof EmbedUrlMetadata - */ - 'content_type'?: string | null; - /** - * - * @type {number} - * @memberof EmbedUrlMetadata - */ - 'content_length'?: number | null; - /** - * - * @type {EmbedUrlMetadataImage} - * @memberof EmbedUrlMetadata - */ - 'image'?: EmbedUrlMetadataImage; - /** - * - * @type {EmbedUrlMetadataVideo} - * @memberof EmbedUrlMetadata - */ - 'video'?: EmbedUrlMetadataVideo; - /** - * - * @type {EmbedUrlMetadataHtml} - * @memberof EmbedUrlMetadata - */ - 'html'?: EmbedUrlMetadataHtml; -} -/** - * - * @export - * @interface EmbedUrlMetadataHtml - */ -export interface EmbedUrlMetadataHtml extends OgObject { - /** - * - * @type {EmbedUrlMetadataHtmlAllOfOembed} - * @memberof EmbedUrlMetadataHtml - */ - 'oembed'?: EmbedUrlMetadataHtmlAllOfOembed; -} -/** - * @type EmbedUrlMetadataHtmlAllOfOembed - * @export - */ -export type EmbedUrlMetadataHtmlAllOfOembed = { type: 'link' } & OembedLinkData | { type: 'photo' } & OembedPhotoData | { type: 'rich' } & OembedRichData | { type: 'video' } & OembedVideoData; - -/** - * - * @export - * @interface EmbedUrlMetadataImage - */ -export interface EmbedUrlMetadataImage { - /** - * - * @type {number} - * @memberof EmbedUrlMetadataImage - */ - 'height_px'?: number; - /** - * - * @type {number} - * @memberof EmbedUrlMetadataImage - */ - 'width_px'?: number; -} -/** - * - * @export - * @interface EmbedUrlMetadataVideo - */ -export interface EmbedUrlMetadataVideo { - /** - * - * @type {number} - * @memberof EmbedUrlMetadataVideo - */ - 'duration_s'?: number; - /** - * - * @type {Array} - * @memberof EmbedUrlMetadataVideo - */ - 'stream'?: Array; -} -/** - * - * @export - * @interface EmbedUrlMetadataVideoStreamInner - */ -export interface EmbedUrlMetadataVideoStreamInner { - /** - * - * @type {string} - * @memberof EmbedUrlMetadataVideoStreamInner - */ - 'codec_name'?: string; - /** - * - * @type {number} - * @memberof EmbedUrlMetadataVideoStreamInner - */ - 'height_px'?: number; - /** - * - * @type {number} - * @memberof EmbedUrlMetadataVideoStreamInner - */ - 'width_px'?: number; -} -/** - * Details for the error response - * @export - * @interface ErrorRes - */ -export interface ErrorRes { - /** - * - * @type {string} - * @memberof ErrorRes - */ - 'code'?: string; - /** - * - * @type {string} - * @memberof ErrorRes - */ - 'message': string; - /** - * - * @type {string} - * @memberof ErrorRes - */ - 'property'?: string; - /** - * - * @type {number} - * @memberof ErrorRes - */ - 'status'?: number; -} -/** - * - * @export - * @interface FarcasterActionReqBody - */ -export interface FarcasterActionReqBody { - /** - * The signer_uuid of the user on behalf of whom the action is being performed. - * @type {string} - * @memberof FarcasterActionReqBody - */ - 'signer_uuid': string; - /** - * The base URL of the app on which the action is being performed. - * @type {string} - * @memberof FarcasterActionReqBody - */ - 'base_url': string; - /** - * - * @type {FarcasterActionReqBodyAction} - * @memberof FarcasterActionReqBody - */ - 'action': FarcasterActionReqBodyAction; -} -/** - * - * @export - * @interface FarcasterActionReqBodyAction - */ -export interface FarcasterActionReqBodyAction { - /** - * The type of action being performed. - * @type {string} - * @memberof FarcasterActionReqBodyAction - */ - 'type': string; - /** - * The payload of the action being performed. - * @type {object} - * @memberof FarcasterActionReqBodyAction - */ - 'payload'?: object; -} -/** - * @type FeedForYou400Response - * @export - */ -export type FeedForYou400Response = ErrorRes | ZodError; - -/** - * - * @export - * @interface FeedResponse - */ -export interface FeedResponse { - /** - * - * @type {Array} - * @memberof FeedResponse - */ - 'casts': Array; - /** - * - * @type {NextCursor} - * @memberof FeedResponse - */ - 'next': NextCursor; -} -/** - * The provider of the trending casts feed. - * @export - * @enum {string} - */ - -export const FeedTrendingProvider = { - Neynar: 'neynar', - Openrank: 'openrank', - Mbd: 'mbd' -} as const; - -export type FeedTrendingProvider = typeof FeedTrendingProvider[keyof typeof FeedTrendingProvider]; - - -/** - * - * @export - * @enum {string} - */ - -export const FeedType = { - Following: 'following', - Filter: 'filter' -} as const; - -export type FeedType = typeof FeedType[keyof typeof FeedType]; - - -/** - * The type of filter to apply to the feed. - * @export - * @enum {string} - */ - -export const FilterType = { - Fids: 'fids', - ParentUrl: 'parent_url', - ChannelId: 'channel_id', - EmbedUrl: 'embed_url', - EmbedTypes: 'embed_types', - GlobalTrending: 'global_trending' -} as const; - -export type FilterType = typeof FilterType[keyof typeof FilterType]; - - -/** - * - * @export - * @interface FnameAvailabilityResponse - */ -export interface FnameAvailabilityResponse { - /** - * - * @type {boolean} - * @memberof FnameAvailabilityResponse - */ - 'available': boolean; -} -/** - * - * @export - * @interface Follow - */ -export interface Follow { - /** - * - * @type {string} - * @memberof Follow - */ - 'object': FollowObjectEnum; - /** - * - * @type {User} - * @memberof Follow - */ - 'user': User; -} - -export const FollowObjectEnum = { - Follow: 'follow' -} as const; - -export type FollowObjectEnum = typeof FollowObjectEnum[keyof typeof FollowObjectEnum]; - -/** - * - * @export - * @interface FollowReqBody - */ -export interface FollowReqBody { - /** - * UUID of the signer - * @type {string} - * @memberof FollowReqBody - */ - 'signer_uuid': string; - /** - * - * @type {Array} - * @memberof FollowReqBody - */ - 'target_fids': Array; -} -/** - * - * @export - * @interface FollowResponse - */ -export interface FollowResponse { - /** - * - * @type {boolean} - * @memberof FollowResponse - */ - 'success': boolean; - /** - * The unique identifier of a farcaster user (unsigned integer) - * @type {number} - * @memberof FollowResponse - */ - 'target_fid': number; - /** - * - * @type {string} - * @memberof FollowResponse - */ - 'hash': string; -} -/** - * - * @export - * @enum {string} - */ - -export const FollowSortType = { - DescChron: 'desc_chron', - Algorithmic: 'algorithmic' -} as const; - -export type FollowSortType = typeof FollowSortType[keyof typeof FollowSortType]; - - -/** - * - * @export - * @interface FollowersResponse - */ -export interface FollowersResponse { - /** - * - * @type {Array} - * @memberof FollowersResponse - */ - 'users': Array; - /** - * - * @type {NextCursor} - * @memberof FollowersResponse - */ - 'next': NextCursor; -} -/** - * The provider of the For You feed. - * @export - * @enum {string} - */ - -export const ForYouProvider = { - Openrank: 'openrank', - Karma3: 'karma3', - Mbd: 'mbd' -} as const; - -export type ForYouProvider = typeof ForYouProvider[keyof typeof ForYouProvider]; - - -/** - * - * @export - * @interface Frame - */ -export interface Frame { - /** - * Version of the frame - * @type {string} - * @memberof Frame - */ - 'version': string; - /** - * URL of the image - * @type {string} - * @memberof Frame - */ - 'image': string; - /** - * - * @type {Array} - * @memberof Frame - */ - 'buttons'?: Array; - /** - * Post URL to take an action on this frame - * @type {string} - * @memberof Frame - */ - 'post_url'?: string; - /** - * URL of the frames - * @type {string} - * @memberof Frame - */ - 'frames_url': string; - /** - * - * @type {string} - * @memberof Frame - */ - 'title'?: string; - /** - * - * @type {string} - * @memberof Frame - */ - 'image_aspect_ratio'?: string; - /** - * - * @type {FrameInput} - * @memberof Frame - */ - 'input'?: FrameInput; - /** - * - * @type {FrameState} - * @memberof Frame - */ - 'state'?: FrameState; -} -/** - * - * @export - * @interface FrameAction - */ -export interface FrameAction { - /** - * - * @type {string} - * @memberof FrameAction - */ - 'version'?: string; - /** - * - * @type {string} - * @memberof FrameAction - */ - 'title'?: string; - /** - * - * @type {string} - * @memberof FrameAction - */ - 'image'?: string; - /** - * - * @type {FrameActionButton} - * @memberof FrameAction - */ - 'button': FrameActionButton; - /** - * - * @type {FrameInput} - * @memberof FrameAction - */ - 'input'?: FrameInput; - /** - * - * @type {FrameState} - * @memberof FrameAction - */ - 'state'?: FrameState; - /** - * - * @type {FrameTransaction} - * @memberof FrameAction - */ - 'transaction'?: FrameTransaction; - /** - * The connected wallet address of the interacting user. - * @type {string} - * @memberof FrameAction - */ - 'address'?: string; - /** - * URL of the frames - * @type {string} - * @memberof FrameAction - */ - 'frames_url': string; - /** - * URL of the post to get the next frame - * @type {string} - * @memberof FrameAction - */ - 'post_url': string; -} -/** - * - * @export - * @interface FrameActionButton - */ -export interface FrameActionButton { - /** - * Title of the button - * @type {string} - * @memberof FrameActionButton - */ - 'title'?: string; - /** - * Index of the button - * @type {number} - * @memberof FrameActionButton - */ - 'index': number; - /** - * - * @type {FrameButtonActionType} - * @memberof FrameActionButton - */ - 'action_type': FrameButtonActionType; - /** - * Target of the button - * @type {string} - * @memberof FrameActionButton - */ - 'target'?: string; - /** - * Used specifically for the tx action type to post a successful transaction hash - * @type {string} - * @memberof FrameActionButton - */ - 'post_url'?: string; -} - - -/** - * - * @export - * @interface FrameActionReqBody - */ -export interface FrameActionReqBody { - /** - * UUID of the signer - * @type {string} - * @memberof FrameActionReqBody - */ - 'signer_uuid': string; - /** - * Cast Hash - * @type {string} - * @memberof FrameActionReqBody - */ - 'cast_hash'?: string; - /** - * - * @type {FrameAction} - * @memberof FrameActionReqBody - */ - 'action': FrameAction; -} -/** - * - * @export - * @enum {string} - */ - -export const FrameButtonActionType = { - Post: 'post', - PostRedirect: 'post_redirect', - Tx: 'tx' -} as const; - -export type FrameButtonActionType = typeof FrameButtonActionType[keyof typeof FrameButtonActionType]; - - -/** - * - * @export - * @interface FrameDeveloperManagedActionReqBody - */ -export interface FrameDeveloperManagedActionReqBody { - /** - * Cast Hash - * @type {string} - * @memberof FrameDeveloperManagedActionReqBody - */ - 'cast_hash'?: string; - /** - * - * @type {FrameAction} - * @memberof FrameDeveloperManagedActionReqBody - */ - 'action': FrameAction; - /** - * - * @type {FrameSignaturePacket} - * @memberof FrameDeveloperManagedActionReqBody - */ - 'signature_packet': FrameSignaturePacket; -} -/** - * The frame object containing the meta tags - * @export - * @interface FrameFromUrl200Response - */ -export interface FrameFromUrl200Response { - /** - * - * @type {Frame} - * @memberof FrameFromUrl200Response - */ - 'frame': Frame; -} -/** - * - * @export - * @interface FrameInput - */ -export interface FrameInput { - /** - * Input text for the frame - * @type {string} - * @memberof FrameInput - */ - 'text'?: string; -} -/** - * The Frame Signature Packet (https://docs.farcaster.xyz/developers/frames/spec#frame-signature-packet) - * @export - * @interface FrameSignaturePacket - */ -export interface FrameSignaturePacket { - /** - * - * @type {FrameSignaturePacketUntrustedData} - * @memberof FrameSignaturePacket - */ - 'untrustedData': FrameSignaturePacketUntrustedData; - /** - * - * @type {FrameSignaturePacketTrustedData} - * @memberof FrameSignaturePacket - */ - 'trustedData': FrameSignaturePacketTrustedData; -} -/** - * Trusted data from the user - * @export - * @interface FrameSignaturePacketTrustedData - */ -export interface FrameSignaturePacketTrustedData { - /** - * Message bytes - * @type {string} - * @memberof FrameSignaturePacketTrustedData - */ - 'messageBytes'?: string; -} -/** - * Untrusted data from the user - * @export - * @interface FrameSignaturePacketUntrustedData - */ -export interface FrameSignaturePacketUntrustedData { - /** - * The unique identifier of a farcaster user (unsigned integer) - * @type {number} - * @memberof FrameSignaturePacketUntrustedData - */ - 'fid'?: number; - /** - * URL of the frame - * @type {string} - * @memberof FrameSignaturePacketUntrustedData - */ - 'url'?: string; - /** - * Message hash - * @type {string} - * @memberof FrameSignaturePacketUntrustedData - */ - 'messageHash'?: string; - /** - * Timestamp - * @type {string} - * @memberof FrameSignaturePacketUntrustedData - */ - 'timestamp'?: string; - /** - * Network - * @type {number} - * @memberof FrameSignaturePacketUntrustedData - */ - 'network'?: number; - /** - * Index of the button - * @type {number} - * @memberof FrameSignaturePacketUntrustedData - */ - 'buttonIndex'?: number; - /** - * Input text - * @type {string} - * @memberof FrameSignaturePacketUntrustedData - */ - 'inputText'?: string; - /** - * State - * @type {string} - * @memberof FrameSignaturePacketUntrustedData - */ - 'state'?: string; - /** - * Transaction ID - * @type {string} - * @memberof FrameSignaturePacketUntrustedData - */ - 'transactionId'?: string; - /** - * Ethereum address - * @type {string} - * @memberof FrameSignaturePacketUntrustedData - */ - 'address'?: string; - /** - * - * @type {CastId} - * @memberof FrameSignaturePacketUntrustedData - */ - 'castId'?: CastId; -} -/** - * - * @export - * @interface FrameState - */ -export interface FrameState { - /** - * State for the frame in a serialized format - * @type {string} - * @memberof FrameState - */ - 'serialized'?: string; -} -/** - * - * @export - * @interface FrameTransaction - */ -export interface FrameTransaction { - /** - * Transaction hash - * @type {string} - * @memberof FrameTransaction - */ - 'hash': string; -} -/** - * Type of identifier (either \'uuid\' or \'url\') - * @export - * @enum {string} - */ - -export const FrameType = { - Uuid: 'uuid', - Url: 'url' -} as const; - -export type FrameType = typeof FrameType[keyof typeof FrameType]; - - -/** - * - * @export - * @interface FrameValidateAnalyticsInputText - */ -export interface FrameValidateAnalyticsInputText { - /** - * - * @type {Array} - * @memberof FrameValidateAnalyticsInputText - */ - 'input_texts': Array; -} -/** - * - * @export - * @interface FrameValidateAnalyticsInputTextInputTextsInner - */ -export interface FrameValidateAnalyticsInputTextInputTextsInner { - /** - * The unique identifier of a farcaster user (unsigned integer) - * @type {number} - * @memberof FrameValidateAnalyticsInputTextInputTextsInner - */ - 'fid': number; - /** - * - * @type {string} - * @memberof FrameValidateAnalyticsInputTextInputTextsInner - */ - 'username': string; - /** - * - * @type {string} - * @memberof FrameValidateAnalyticsInputTextInputTextsInner - */ - 'input_text': string; -} -/** - * - * @export - * @interface FrameValidateAnalyticsInteractionsPerCast - */ -export interface FrameValidateAnalyticsInteractionsPerCast { - /** - * - * @type {Array} - * @memberof FrameValidateAnalyticsInteractionsPerCast - */ - 'interactions_per_cast': Array; -} -/** - * - * @export - * @interface FrameValidateAnalyticsInteractionsPerCastInteractionsPerCastInner - */ -export interface FrameValidateAnalyticsInteractionsPerCastInteractionsPerCastInner { - /** - * - * @type {string} - * @memberof FrameValidateAnalyticsInteractionsPerCastInteractionsPerCastInner - */ - 'start': string; - /** - * - * @type {string} - * @memberof FrameValidateAnalyticsInteractionsPerCastInteractionsPerCastInner - */ - 'stop': string; - /** - * - * @type {string} - * @memberof FrameValidateAnalyticsInteractionsPerCastInteractionsPerCastInner - */ - 'time': string; - /** - * - * @type {number} - * @memberof FrameValidateAnalyticsInteractionsPerCastInteractionsPerCastInner - */ - 'interaction_count': number; - /** - * - * @type {string} - * @memberof FrameValidateAnalyticsInteractionsPerCastInteractionsPerCastInner - */ - 'cast_url': string; -} -/** - * - * @export - * @interface FrameValidateAnalyticsInteractors - */ -export interface FrameValidateAnalyticsInteractors { - /** - * - * @type {Array} - * @memberof FrameValidateAnalyticsInteractors - */ - 'interactors': Array; -} -/** - * - * @export - * @interface FrameValidateAnalyticsInteractorsInteractorsInner - */ -export interface FrameValidateAnalyticsInteractorsInteractorsInner { - /** - * The unique identifier of a farcaster user (unsigned integer) - * @type {number} - * @memberof FrameValidateAnalyticsInteractorsInteractorsInner - */ - 'fid': number; - /** - * - * @type {string} - * @memberof FrameValidateAnalyticsInteractorsInteractorsInner - */ - 'username': string; - /** - * - * @type {number} - * @memberof FrameValidateAnalyticsInteractorsInteractorsInner - */ - 'interaction_count': number; -} -/** - * @type FrameValidateAnalyticsResponse - * @export - */ -export type FrameValidateAnalyticsResponse = FrameValidateAnalyticsInputText | FrameValidateAnalyticsInteractionsPerCast | FrameValidateAnalyticsInteractors | FrameValidateAnalyticsTotalInteractors; - -/** - * - * @export - * @interface FrameValidateAnalyticsTotalInteractors - */ -export interface FrameValidateAnalyticsTotalInteractors { - /** - * - * @type {number} - * @memberof FrameValidateAnalyticsTotalInteractors - */ - 'total_interactors': number; -} -/** - * - * @export - * @interface FrameValidateListResponse - */ -export interface FrameValidateListResponse { - /** - * - * @type {Array} - * @memberof FrameValidateListResponse - */ - 'frames': Array; -} -/** - * - * @export - * @interface HydratedFollower - */ -export interface HydratedFollower { - /** - * - * @type {string} - * @memberof HydratedFollower - */ - 'object'?: HydratedFollowerObjectEnum; - /** - * - * @type {User} - * @memberof HydratedFollower - */ - 'user'?: User; -} - -export const HydratedFollowerObjectEnum = { - Follow: 'follow' -} as const; - -export type HydratedFollowerObjectEnum = typeof HydratedFollowerObjectEnum[keyof typeof HydratedFollowerObjectEnum]; - -/** - * - * @export - * @interface ImageObject - */ -export interface ImageObject { - /** - * - * @type {string} - * @memberof ImageObject - */ - 'height'?: string; - /** - * - * @type {string} - * @memberof ImageObject - */ - 'type'?: string; - /** - * - * @type {string} - * @memberof ImageObject - */ - 'url': string; - /** - * - * @type {string} - * @memberof ImageObject - */ - 'width'?: string; - /** - * - * @type {string} - * @memberof ImageObject - */ - 'alt'?: string; -} -/** - * - * @export - * @interface IndividualHashObj - */ -export interface IndividualHashObj { - /** - * - * @type {string} - * @memberof IndividualHashObj - */ - 'hash': string; -} -/** - * Coordinates and place names for a location - * @export - * @interface Location - */ -export interface Location { - /** - * - * @type {number} - * @memberof Location - */ - 'latitude': number; - /** - * - * @type {number} - * @memberof Location - */ - 'longitude': number; - /** - * - * @type {LocationAddress} - * @memberof Location - */ - 'address'?: LocationAddress; -} -/** - * - * @export - * @interface LocationAddress - */ -export interface LocationAddress { - /** - * - * @type {string} - * @memberof LocationAddress - */ - 'city': string; - /** - * - * @type {string} - * @memberof LocationAddress - */ - 'state'?: string; - /** - * - * @type {string} - * @memberof LocationAddress - */ - 'state_code'?: string; - /** - * - * @type {string} - * @memberof LocationAddress - */ - 'country': string; - /** - * - * @type {string} - * @memberof LocationAddress - */ - 'country_code'?: string; -} -/** - * - * @export - * @interface MarkNotificationsAsSeenReqBody - */ -export interface MarkNotificationsAsSeenReqBody { - /** - * The UUID of the signer. Signer should have atleast one write permission - * @type {string} - * @memberof MarkNotificationsAsSeenReqBody - */ - 'signer_uuid': string; - /** - * - * @type {NotificationType} - * @memberof MarkNotificationsAsSeenReqBody - */ - 'type'?: NotificationType; -} - - -/** - * - * @export - * @interface MuteListResponse - */ -export interface MuteListResponse { - /** - * - * @type {Array} - * @memberof MuteListResponse - */ - 'mutes': Array; - /** - * - * @type {NextCursor} - * @memberof MuteListResponse - */ - 'next': NextCursor; -} -/** - * - * @export - * @interface MuteRecord - */ -export interface MuteRecord { - /** - * - * @type {string} - * @memberof MuteRecord - */ - 'object': MuteRecordObjectEnum; - /** - * - * @type {User} - * @memberof MuteRecord - */ - 'muted': User; - /** - * - * @type {string} - * @memberof MuteRecord - */ - 'muted_at': string; -} - -export const MuteRecordObjectEnum = { - Mute: 'mute' -} as const; - -export type MuteRecordObjectEnum = typeof MuteRecordObjectEnum[keyof typeof MuteRecordObjectEnum]; - -/** - * - * @export - * @interface MuteReqBody - */ -export interface MuteReqBody { - /** - * The unique identifier of a farcaster user (unsigned integer) - * @type {number} - * @memberof MuteReqBody - */ - 'fid': number; - /** - * The unique identifier of a farcaster user (unsigned integer) - * @type {number} - * @memberof MuteReqBody - */ - 'muted_fid': number; -} -/** - * - * @export - * @interface MuteResponse - */ -export interface MuteResponse { - /** - * - * @type {boolean} - * @memberof MuteResponse - */ - 'success': boolean; - /** - * - * @type {string} - * @memberof MuteResponse - */ - 'message'?: string; -} -/** - * Returns next cursor - * @export - * @interface NextCursor - */ -export interface NextCursor { - /** - * - * @type {string} - * @memberof NextCursor - */ - 'cursor': string | null; -} -/** - * - * @export - * @interface NeynarFrame - */ -export interface NeynarFrame { - /** - * Unique identifier for the frame. - * @type {string} - * @memberof NeynarFrame - */ - 'uuid': string; - /** - * Name of the frame. - * @type {string} - * @memberof NeynarFrame - */ - 'name': string; - /** - * Generated link for the frame\'s first page. - * @type {string} - * @memberof NeynarFrame - */ - 'link': string; - /** - * - * @type {Array} - * @memberof NeynarFrame - */ - 'pages': Array; - /** - * Indicates if the frame is valid. - * @type {boolean} - * @memberof NeynarFrame - */ - 'valid'?: boolean; -} -/** - * - * @export - * @interface NeynarFrameCreationRequest - */ -export interface NeynarFrameCreationRequest { - /** - * The name of the frame. - * @type {string} - * @memberof NeynarFrameCreationRequest - */ - 'name': string; - /** - * - * @type {Array} - * @memberof NeynarFrameCreationRequest - */ - 'pages': Array; -} -/** - * - * @export - * @interface NeynarFramePage - */ -export interface NeynarFramePage { - /** - * Unique identifier for the page. - * @type {string} - * @memberof NeynarFramePage - */ - 'uuid': string; - /** - * The version of the page schema. - * @type {string} - * @memberof NeynarFramePage - */ - 'version': string; - /** - * The title of the page. - * @type {string} - * @memberof NeynarFramePage - */ - 'title': string; - /** - * - * @type {NeynarPageImage} - * @memberof NeynarFramePage - */ - 'image': NeynarPageImage; - /** - * - * @type {Array} - * @memberof NeynarFramePage - */ - 'buttons'?: Array; - /** - * - * @type {NeynarPageInput} - * @memberof NeynarFramePage - */ - 'input'?: NeynarPageInput; -} -/** - * - * @export - * @interface NeynarFrameUpdateRequest - */ -export interface NeynarFrameUpdateRequest { - /** - * The UUID of the frame to update. - * @type {string} - * @memberof NeynarFrameUpdateRequest - */ - 'uuid': string; - /** - * The name of the frame. - * @type {string} - * @memberof NeynarFrameUpdateRequest - */ - 'name'?: string; - /** - * - * @type {Array} - * @memberof NeynarFrameUpdateRequest - */ - 'pages': Array; -} -/** - * - * @export - * @interface NeynarNextFramePage - */ -export interface NeynarNextFramePage { - /** - * The UUID of the next page. - * @type {string} - * @memberof NeynarNextFramePage - */ - 'uuid': string; -} -/** - * - * @export - * @interface NeynarNextFramePageMintUrl - */ -export interface NeynarNextFramePageMintUrl { - /** - * The URL for minting, specific to the mint action. - * @type {string} - * @memberof NeynarNextFramePageMintUrl - */ - 'mint_url': string; -} -/** - * - * @export - * @interface NeynarNextFramePageRedirect - */ -export interface NeynarNextFramePageRedirect { - /** - * The URL to redirect to. - * @type {string} - * @memberof NeynarNextFramePageRedirect - */ - 'redirect_url': string; -} -/** - * - * @export - * @interface NeynarPageButton - */ -export interface NeynarPageButton { - /** - * The title of the button. - * @type {string} - * @memberof NeynarPageButton - */ - 'title': string; - /** - * The index of the button, first button should have index 1 and so on. - * @type {number} - * @memberof NeynarPageButton - */ - 'index': number; - /** - * The type of action that the button performs. - * @type {string} - * @memberof NeynarPageButton - */ - 'action_type': NeynarPageButtonActionTypeEnum; - /** - * - * @type {NeynarPageButtonNextPage} - * @memberof NeynarPageButton - */ - 'next_page'?: NeynarPageButtonNextPage; -} - -export const NeynarPageButtonActionTypeEnum = { - Post: 'post', - PostRedirect: 'post_redirect', - Mint: 'mint', - Link: 'link' -} as const; - -export type NeynarPageButtonActionTypeEnum = typeof NeynarPageButtonActionTypeEnum[keyof typeof NeynarPageButtonActionTypeEnum]; - -/** - * @type NeynarPageButtonNextPage - * @export - */ -export type NeynarPageButtonNextPage = NeynarNextFramePage | NeynarNextFramePageMintUrl | NeynarNextFramePageRedirect; - -/** - * - * @export - * @interface NeynarPageImage - */ -export interface NeynarPageImage { - /** - * The URL of the page\'s image. - * @type {string} - * @memberof NeynarPageImage - */ - 'url': string; - /** - * The aspect ratio of the image. - * @type {string} - * @memberof NeynarPageImage - */ - 'aspect_ratio': NeynarPageImageAspectRatioEnum; -} - -export const NeynarPageImageAspectRatioEnum = { - _1911: '1.91:1', - _11: '1:1' -} as const; - -export type NeynarPageImageAspectRatioEnum = typeof NeynarPageImageAspectRatioEnum[keyof typeof NeynarPageImageAspectRatioEnum]; - -/** - * - * @export - * @interface NeynarPageInput - */ -export interface NeynarPageInput { - /** - * - * @type {NeynarPageInputText} - * @memberof NeynarPageInput - */ - 'text'?: NeynarPageInputText; -} -/** - * - * @export - * @interface NeynarPageInputText - */ -export interface NeynarPageInputText { - /** - * Indicates if text input is enabled. - * @type {boolean} - * @memberof NeynarPageInputText - */ - 'enabled': boolean; - /** - * The placeholder text for the input. - * @type {string} - * @memberof NeynarPageInputText - */ - 'placeholder'?: string; -} -/** - * - * @export - * @interface Notification - */ -export interface Notification { - /** - * - * @type {string} - * @memberof Notification - */ - 'object': string; - /** - * - * @type {string} - * @memberof Notification - */ - 'most_recent_timestamp': string; - /** - * - * @type {string} - * @memberof Notification - */ - 'type': NotificationTypeEnum; - /** - * - * @type {boolean} - * @memberof Notification - */ - 'seen': boolean; - /** - * - * @type {Array} - * @memberof Notification - */ - 'follows'?: Array; - /** - * - * @type {CastWithInteractions} - * @memberof Notification - */ - 'cast'?: CastWithInteractions; - /** - * - * @type {Array} - * @memberof Notification - */ - 'reactions'?: Array; - /** - * The number of notifications of this(follows, likes, recast) type bundled in a single notification. - * @type {number} - * @memberof Notification - */ - 'count'?: number; -} - -export const NotificationTypeEnum = { - Follows: 'follows', - Recasts: 'recasts', - Likes: 'likes', - Mention: 'mention', - Reply: 'reply' -} as const; - -export type NotificationTypeEnum = typeof NotificationTypeEnum[keyof typeof NotificationTypeEnum]; - -/** - * - * @export - * @enum {string} - */ - -export const NotificationType = { - Follows: 'follows', - Recasts: 'recasts', - Likes: 'likes', - Mentions: 'mentions', - Replies: 'replies' -} as const; - -export type NotificationType = typeof NotificationType[keyof typeof NotificationType]; - - -/** - * - * @export - * @interface NotificationsResponse - */ -export interface NotificationsResponse { - /** - * - * @type {number} - * @memberof NotificationsResponse - */ - 'unseen_notifications_count': number; - /** - * - * @type {Array} - * @memberof NotificationsResponse - */ - 'notifications': Array; - /** - * - * @type {NextCursor} - * @memberof NotificationsResponse - */ - 'next': NextCursor; -} -/** - * Basic data structure of every oembed response see https://oembed.com/ - * @export - * @interface OembedData - */ -export interface OembedData { - /** - * - * @type {string} - * @memberof OembedData - */ - 'type': string; - /** - * - * @type {string} - * @memberof OembedData - */ - 'version': string | null; - /** - * A text title, describing the resource. - * @type {string} - * @memberof OembedData - */ - 'title'?: string | null; - /** - * The name of the author/owner of the resource. - * @type {string} - * @memberof OembedData - */ - 'author_name'?: string | null; - /** - * A URL for the author/owner of the resource. - * @type {string} - * @memberof OembedData - */ - 'author_url'?: string | null; - /** - * The name of the resource provider. - * @type {string} - * @memberof OembedData - */ - 'provider_name'?: string | null; - /** - * The url of the resource provider. - * @type {string} - * @memberof OembedData - */ - 'provider_url'?: string | null; - /** - * The suggested cache lifetime for this resource, in seconds. Consumers may choose to use this value or not. - * @type {string} - * @memberof OembedData - */ - 'cache_age'?: string | null; - /** - * A URL to a thumbnail image representing the resource. The thumbnail must respect any maxwidth and maxheight parameters. If this parameter is present, thumbnail_width and thumbnail_height must also be present. - * @type {string} - * @memberof OembedData - */ - 'thumbnail_url'?: string | null; - /** - * The width of the optional thumbnail. If this parameter is present, thumbnail_url and thumbnail_height must also be present. - * @type {number} - * @memberof OembedData - */ - 'thumbnail_width'?: number | null; - /** - * The height of the optional thumbnail. If this parameter is present, thumbnail_url and thumbnail_width must also be present. - * @type {number} - * @memberof OembedData - */ - 'thumbnail_height'?: number | null; -} -/** - * - * @export - * @interface OembedLinkData - */ -export interface OembedLinkData extends OembedData { - /** - * - * @type {string} - * @memberof OembedLinkData - */ - 'type': OembedLinkDataTypeEnum; -} - -export const OembedLinkDataTypeEnum = { - Link: 'link' -} as const; - -export type OembedLinkDataTypeEnum = typeof OembedLinkDataTypeEnum[keyof typeof OembedLinkDataTypeEnum]; - -/** - * - * @export - * @interface OembedPhotoData - */ -export interface OembedPhotoData extends OembedData { - /** - * - * @type {string} - * @memberof OembedPhotoData - */ - 'type': OembedPhotoDataTypeEnum; - /** - * The source URL of the image. Consumers should be able to insert this URL into an element. Only HTTP and HTTPS URLs are valid. - * @type {string} - * @memberof OembedPhotoData - */ - 'url': string | null; - /** - * The width in pixels of the image specified in the url parameter. - * @type {number} - * @memberof OembedPhotoData - */ - 'width': number | null; - /** - * The height in pixels of the image specified in the url parameter. - * @type {number} - * @memberof OembedPhotoData - */ - 'height': number | null; -} - -export const OembedPhotoDataTypeEnum = { - Photo: 'photo' -} as const; - -export type OembedPhotoDataTypeEnum = typeof OembedPhotoDataTypeEnum[keyof typeof OembedPhotoDataTypeEnum]; - -/** - * - * @export - * @interface OembedRichData - */ -export interface OembedRichData extends OembedData { - /** - * - * @type {string} - * @memberof OembedRichData - */ - 'type': OembedRichDataTypeEnum; - /** - * The HTML required to display the resource. The HTML should have no padding or margins. Consumers may wish to load the HTML in an off-domain iframe to avoid XSS vulnerabilities. The markup should be valid XHTML 1.0 Basic. - * @type {string} - * @memberof OembedRichData - */ - 'html': string | null; - /** - * The width in pixels required to display the HTML. - * @type {number} - * @memberof OembedRichData - */ - 'width': number | null; - /** - * The height in pixels required to display the HTML. - * @type {number} - * @memberof OembedRichData - */ - 'height': number | null; -} - -export const OembedRichDataTypeEnum = { - Rich: 'rich' -} as const; - -export type OembedRichDataTypeEnum = typeof OembedRichDataTypeEnum[keyof typeof OembedRichDataTypeEnum]; - -/** - * - * @export - * @interface OembedVideoData - */ -export interface OembedVideoData extends OembedData { - /** - * - * @type {string} - * @memberof OembedVideoData - */ - 'type': OembedVideoDataTypeEnum; - /** - * The HTML required to embed a video player. The HTML should have no padding or margins. Consumers may wish to load the HTML in an off-domain iframe to avoid XSS vulnerabilities. - * @type {string} - * @memberof OembedVideoData - */ - 'html': string | null; - /** - * The width in pixels required to display the HTML. - * @type {number} - * @memberof OembedVideoData - */ - 'width': number | null; - /** - * The height in pixels required to display the HTML. - * @type {number} - * @memberof OembedVideoData - */ - 'height': number | null; -} - -export const OembedVideoDataTypeEnum = { - Video: 'video' -} as const; - -export type OembedVideoDataTypeEnum = typeof OembedVideoDataTypeEnum[keyof typeof OembedVideoDataTypeEnum]; - -/** - * - * @export - * @interface OgObject - */ -export interface OgObject { - /** - * - * @type {string} - * @memberof OgObject - */ - 'favicon'?: string; - /** - * - * @type {string} - * @memberof OgObject - */ - 'modifiedTime'?: string; - /** - * - * @type {string} - * @memberof OgObject - */ - 'ogArticleAuthor'?: string; - /** - * - * @type {string} - * @memberof OgObject - */ - 'ogArticleExpirationTime'?: string; - /** - * - * @type {string} - * @memberof OgObject - */ - 'ogArticleModifiedTime'?: string; - /** - * - * @type {string} - * @memberof OgObject - */ - 'ogArticlePublishedTime'?: string; - /** - * - * @type {string} - * @memberof OgObject - */ - 'ogArticlePublisher'?: string; - /** - * - * @type {string} - * @memberof OgObject - */ - 'ogArticleSection'?: string; - /** - * - * @type {string} - * @memberof OgObject - */ - 'ogArticleTag'?: string; - /** - * - * @type {string} - * @memberof OgObject - */ - 'ogAudio'?: string; - /** - * - * @type {string} - * @memberof OgObject - */ - 'ogAudioSecureURL'?: string; - /** - * - * @type {string} - * @memberof OgObject - */ - 'ogAudioType'?: string; - /** - * - * @type {string} - * @memberof OgObject - */ - 'ogAudioURL'?: string; - /** - * - * @type {string} - * @memberof OgObject - */ - 'ogAvailability'?: string; - /** - * - * @type {string} - * @memberof OgObject - */ - 'ogDate'?: string; - /** - * - * @type {string} - * @memberof OgObject - */ - 'ogDescription'?: string; - /** - * - * @type {string} - * @memberof OgObject - */ - 'ogDeterminer'?: string; - /** - * - * @type {string} - * @memberof OgObject - */ - 'ogEpisode'?: string; - /** - * - * @type {Array} - * @memberof OgObject - */ - 'ogImage'?: Array; - /** - * - * @type {string} - * @memberof OgObject - */ - 'ogLocale'?: string; - /** - * - * @type {string} - * @memberof OgObject - */ - 'ogLocaleAlternate'?: string; - /** - * - * @type {string} - * @memberof OgObject - */ - 'ogLogo'?: string; - /** - * - * @type {string} - * @memberof OgObject - */ - 'ogMovie'?: string; - /** - * - * @type {string} - * @memberof OgObject - */ - 'ogPriceAmount'?: string; - /** - * - * @type {string} - * @memberof OgObject - */ - 'ogPriceCurrency'?: string; - /** - * - * @type {string} - * @memberof OgObject - */ - 'ogProductAvailability'?: string; - /** - * - * @type {string} - * @memberof OgObject - */ - 'ogProductCondition'?: string; - /** - * - * @type {string} - * @memberof OgObject - */ - 'ogProductPriceAmount'?: string; - /** - * - * @type {string} - * @memberof OgObject - */ - 'ogProductPriceCurrency'?: string; - /** - * - * @type {string} - * @memberof OgObject - */ - 'ogProductRetailerItemId'?: string; - /** - * - * @type {string} - * @memberof OgObject - */ - 'ogSiteName'?: string; - /** - * - * @type {string} - * @memberof OgObject - */ - 'ogTitle'?: string; - /** - * - * @type {string} - * @memberof OgObject - */ - 'ogType'?: string; - /** - * - * @type {string} - * @memberof OgObject - */ - 'ogUrl'?: string; - /** - * - * @type {Array} - * @memberof OgObject - */ - 'ogVideo'?: Array; - /** - * - * @type {string} - * @memberof OgObject - */ - 'ogVideoActor'?: string; - /** - * - * @type {string} - * @memberof OgObject - */ - 'ogVideoActorId'?: string; - /** - * - * @type {string} - * @memberof OgObject - */ - 'ogVideoActorRole'?: string; - /** - * - * @type {string} - * @memberof OgObject - */ - 'ogVideoDirector'?: string; - /** - * - * @type {string} - * @memberof OgObject - */ - 'ogVideoDuration'?: string; - /** - * - * @type {string} - * @memberof OgObject - */ - 'ogVideoOther'?: string; - /** - * - * @type {string} - * @memberof OgObject - */ - 'ogVideoReleaseDate'?: string; - /** - * - * @type {string} - * @memberof OgObject - */ - 'ogVideoSecureURL'?: string; - /** - * - * @type {string} - * @memberof OgObject - */ - 'ogVideoSeries'?: string; - /** - * - * @type {string} - * @memberof OgObject - */ - 'ogVideoTag'?: string; - /** - * - * @type {string} - * @memberof OgObject - */ - 'ogVideoTvShow'?: string; - /** - * - * @type {string} - * @memberof OgObject - */ - 'ogVideoWriter'?: string; - /** - * - * @type {string} - * @memberof OgObject - */ - 'ogWebsite'?: string; - /** - * - * @type {string} - * @memberof OgObject - */ - 'updatedTime'?: string; -} -/** - * - * @export - * @interface OperationResponse - */ -export interface OperationResponse { - /** - * - * @type {boolean} - * @memberof OperationResponse - */ - 'success'?: boolean; - /** - * - * @type {string} - * @memberof OperationResponse - */ - 'message'?: string; -} -/** - * - * @export - * @interface PostCastReqBody - */ -export interface PostCastReqBody { - /** - * UUID of the signer - * @type {string} - * @memberof PostCastReqBody - */ - 'signer_uuid': string; - /** - * - * @type {string} - * @memberof PostCastReqBody - */ - 'text'?: string; - /** - * - * @type {Array} - * @memberof PostCastReqBody - */ - 'embeds'?: Array; - /** - * parent_url of the channel the cast is in, or hash of the cast - * @type {string} - * @memberof PostCastReqBody - */ - 'parent'?: string; - /** - * Channel ID of the channel where the cast is to be posted. e.g. neynar, farcaster, warpcast - * @type {string} - * @memberof PostCastReqBody - */ - 'channel_id'?: string; - /** - * An Idempotency key is a unique identifier for the request. **Note:** 1) This is used to prevent duplicate requests. Use the same idem key on retry attempts. 2) This should be a unique identifier for each request. 3) Recommended format is a 16-character string generated by the developer at the time of making this request. - * @type {string} - * @memberof PostCastReqBody - */ - 'idem'?: string; - /** - * The unique identifier of a farcaster user (unsigned integer) - * @type {number} - * @memberof PostCastReqBody - */ - 'parent_author_fid'?: number; -} -/** - * - * @export - * @interface PostCastReqBodyEmbeds - */ -export interface PostCastReqBodyEmbeds { - /** - * - * @type {PostCastReqBodyEmbedsCastIdProperties} - * @memberof PostCastReqBodyEmbeds - */ - 'cast_id'?: PostCastReqBodyEmbedsCastIdProperties; - /** - * - * @type {PostCastReqBodyEmbedsCastIdProperties} - * @memberof PostCastReqBodyEmbeds - */ - 'castId'?: PostCastReqBodyEmbedsCastIdProperties; - /** - * - * @type {string} - * @memberof PostCastReqBodyEmbeds - */ - 'url'?: string; -} -/** - * - * @export - * @interface PostCastReqBodyEmbedsCastIdProperties - */ -export interface PostCastReqBodyEmbedsCastIdProperties { - /** - * The unique identifier of a farcaster user (unsigned integer) - * @type {number} - * @memberof PostCastReqBodyEmbedsCastIdProperties - */ - 'fid': number; - /** - * - * @type {string} - * @memberof PostCastReqBodyEmbedsCastIdProperties - */ - 'hash': string; -} -/** - * - * @export - * @interface PostCastResponse - */ -export interface PostCastResponse { - /** - * - * @type {boolean} - * @memberof PostCastResponse - */ - 'success': boolean; - /** - * - * @type {PostCastResponseCast} - * @memberof PostCastResponse - */ - 'cast': PostCastResponseCast; -} -/** - * - * @export - * @interface PostCastResponseCast - */ -export interface PostCastResponseCast { - /** - * Cast Hash - * @type {string} - * @memberof PostCastResponseCast - */ - 'hash': string; - /** - * - * @type {CastEmbeddedParentAuthor} - * @memberof PostCastResponseCast - */ - 'author': CastEmbeddedParentAuthor; - /** - * - * @type {string} - * @memberof PostCastResponseCast - */ - 'text': string; -} -/** - * - * @export - * @interface ProfileUrl - */ -export interface ProfileUrl { - /** - * - * @type {ProfileUrlPfp} - * @memberof ProfileUrl - */ - 'pfp': ProfileUrlPfp; -} -/** - * - * @export - * @interface ProfileUrlPfp - */ -export interface ProfileUrlPfp { - /** - * - * @type {string} - * @memberof ProfileUrlPfp - */ - 'url': string; -} -/** - * - * @export - * @interface ReactionForCast - */ -export interface ReactionForCast { - /** - * - * @type {string} - * @memberof ReactionForCast - */ - 'reaction_type': ReactionForCastReactionTypeEnum; - /** - * - * @type {string} - * @memberof ReactionForCast - */ - 'reaction_timestamp': string; - /** - * - * @type {string} - * @memberof ReactionForCast - */ - 'object': ReactionForCastObjectEnum; - /** - * - * @type {User} - * @memberof ReactionForCast - */ - 'user': User; -} - -export const ReactionForCastReactionTypeEnum = { - Like: 'like', - Recast: 'recast' -} as const; - -export type ReactionForCastReactionTypeEnum = typeof ReactionForCastReactionTypeEnum[keyof typeof ReactionForCastReactionTypeEnum]; -export const ReactionForCastObjectEnum = { - Likes: 'likes', - Recasts: 'recasts' -} as const; - -export type ReactionForCastObjectEnum = typeof ReactionForCastObjectEnum[keyof typeof ReactionForCastObjectEnum]; - -/** - * - * @export - * @interface ReactionLike - */ -export interface ReactionLike { - /** - * The unique identifier of a farcaster user (unsigned integer) - * @type {number} - * @memberof ReactionLike - */ - 'fid': number; -} -/** - * - * @export - * @interface ReactionRecast - */ -export interface ReactionRecast { - /** - * The unique identifier of a farcaster user (unsigned integer) - * @type {number} - * @memberof ReactionRecast - */ - 'fid': number; - /** - * - * @type {string} - * @memberof ReactionRecast - */ - 'fname': string; -} -/** - * - * @export - * @interface ReactionReqBody - */ -export interface ReactionReqBody { - /** - * UUID of the signer - * @type {string} - * @memberof ReactionReqBody - */ - 'signer_uuid': string; - /** - * - * @type {ReactionType} - * @memberof ReactionReqBody - */ - 'reaction_type': ReactionType; - /** - * - * @type {string} - * @memberof ReactionReqBody - */ - 'target': string; - /** - * The unique identifier of a farcaster user (unsigned integer) - * @type {number} - * @memberof ReactionReqBody - */ - 'target_author_fid'?: number; - /** - * An Idempotency key is a unique identifier for the request. **Note:** 1) This is used to prevent duplicate requests. Use the same idem key on retry attempts. 2) This should be a unique identifier for each request. 3) Recommended format is a 16-character string generated by the developer at the time of making this request. - * @type {string} - * @memberof ReactionReqBody - */ - 'idem'?: string; -} - - -/** - * - * @export - * @enum {string} - */ - -export const ReactionType = { - Like: 'like', - Recast: 'recast' -} as const; - -export type ReactionType = typeof ReactionType[keyof typeof ReactionType]; - - -/** - * - * @export - * @interface ReactionWithCastInfo - */ -export interface ReactionWithCastInfo { - /** - * - * @type {string} - * @memberof ReactionWithCastInfo - */ - 'reaction_type': ReactionWithCastInfoReactionTypeEnum; - /** - * - * @type {CastWithInteractions} - * @memberof ReactionWithCastInfo - */ - 'cast': CastWithInteractions; - /** - * - * @type {string} - * @memberof ReactionWithCastInfo - */ - 'reaction_timestamp': string; - /** - * - * @type {string} - * @memberof ReactionWithCastInfo - */ - 'object': ReactionWithCastInfoObjectEnum; - /** - * - * @type {UserDehydrated} - * @memberof ReactionWithCastInfo - */ - 'user': UserDehydrated; -} - -export const ReactionWithCastInfoReactionTypeEnum = { - Like: 'like', - Recast: 'recast' -} as const; - -export type ReactionWithCastInfoReactionTypeEnum = typeof ReactionWithCastInfoReactionTypeEnum[keyof typeof ReactionWithCastInfoReactionTypeEnum]; -export const ReactionWithCastInfoObjectEnum = { - Likes: 'likes', - Recasts: 'recasts' -} as const; - -export type ReactionWithCastInfoObjectEnum = typeof ReactionWithCastInfoObjectEnum[keyof typeof ReactionWithCastInfoObjectEnum]; - -/** - * - * @export - * @interface ReactionWithUserInfo - */ -export interface ReactionWithUserInfo { - /** - * - * @type {string} - * @memberof ReactionWithUserInfo - */ - 'object': ReactionWithUserInfoObjectEnum; - /** - * - * @type {CastDehydrated} - * @memberof ReactionWithUserInfo - */ - 'cast': CastDehydrated; - /** - * - * @type {User} - * @memberof ReactionWithUserInfo - */ - 'user': User; -} - -export const ReactionWithUserInfoObjectEnum = { - Likes: 'likes', - Recasts: 'recasts' -} as const; - -export type ReactionWithUserInfoObjectEnum = typeof ReactionWithUserInfoObjectEnum[keyof typeof ReactionWithUserInfoObjectEnum]; - -/** - * - * @export - * @interface ReactionsCastResponse - */ -export interface ReactionsCastResponse { - /** - * - * @type {Array} - * @memberof ReactionsCastResponse - */ - 'reactions': Array; - /** - * - * @type {NextCursor} - * @memberof ReactionsCastResponse - */ - 'next': NextCursor; -} -/** - * - * @export - * @interface ReactionsResponse - */ -export interface ReactionsResponse { - /** - * - * @type {Array} - * @memberof ReactionsResponse - */ - 'reactions': Array; - /** - * - * @type {NextCursor} - * @memberof ReactionsResponse - */ - 'next': NextCursor; -} -/** - * - * @export - * @enum {string} - */ - -export const ReactionsType = { - All: 'all', - Likes: 'likes', - Recasts: 'recasts' -} as const; - -export type ReactionsType = typeof ReactionsType[keyof typeof ReactionsType]; - - -/** - * - * @export - * @interface RegisterDeveloperManagedSignedKeyReqBody - */ -export interface RegisterDeveloperManagedSignedKeyReqBody { - /** - * Ed25519 public key - * @type {string} - * @memberof RegisterDeveloperManagedSignedKeyReqBody - */ - 'public_key': string; - /** - * Signature generated by the custody address of the app. Signed data includes app_fid, deadline, signer’s public key - * @type {string} - * @memberof RegisterDeveloperManagedSignedKeyReqBody - */ - 'signature': string; - /** - * The unique identifier of a farcaster user (unsigned integer) - * @type {number} - * @memberof RegisterDeveloperManagedSignedKeyReqBody - */ - 'app_fid': number; - /** - * unix timestamp in seconds that controls how long the signed key request is valid for. (24 hours from now is recommended) - * @type {number} - * @memberof RegisterDeveloperManagedSignedKeyReqBody - */ - 'deadline': number; - /** - * Url to redirect to after the signer is approved. **Note** : This should only be used when requesting a signer from a native mobile application. - * @type {string} - * @memberof RegisterDeveloperManagedSignedKeyReqBody - */ - 'redirect_url'?: string; - /** - * - * @type {SignedKeyRequestSponsor} - * @memberof RegisterDeveloperManagedSignedKeyReqBody - */ - 'sponsor'?: SignedKeyRequestSponsor; -} -/** - * - * @export - * @interface RegisterSignerKeyReqBody - */ -export interface RegisterSignerKeyReqBody { - /** - * UUID of the signer - * @type {string} - * @memberof RegisterSignerKeyReqBody - */ - 'signer_uuid': string; - /** - * Signature generated by the custody address of the app. Signed data includes app_fid, deadline, signer’s public key - * @type {string} - * @memberof RegisterSignerKeyReqBody - */ - 'signature': string; - /** - * The unique identifier of a farcaster user (unsigned integer) - * @type {number} - * @memberof RegisterSignerKeyReqBody - */ - 'app_fid': number; - /** - * unix timestamp in seconds that controls how long the signed key request is valid for. (24 hours from now is recommended) - * @type {number} - * @memberof RegisterSignerKeyReqBody - */ - 'deadline': number; - /** - * Url to redirect to after the signer is approved. **Note** : This should only be used when requesting a signer from a native mobile application. - * @type {string} - * @memberof RegisterSignerKeyReqBody - */ - 'redirect_url'?: string; - /** - * - * @type {SignedKeyRequestSponsor} - * @memberof RegisterSignerKeyReqBody - */ - 'sponsor'?: SignedKeyRequestSponsor; -} -/** - * - * @export - * @interface RegisterUserReqBody - */ -export interface RegisterUserReqBody { - /** - * - * @type {string} - * @memberof RegisterUserReqBody - */ - 'signature': string; - /** - * - * @type {number} - * @memberof RegisterUserReqBody - */ - 'fid': number; - /** - * - * @type {string} - * @memberof RegisterUserReqBody - */ - 'requested_user_custody_address': string; - /** - * - * @type {number} - * @memberof RegisterUserReqBody - */ - 'deadline': number; - /** - * - * @type {string} - * @memberof RegisterUserReqBody - */ - 'fname'?: string; -} -/** - * - * @export - * @interface RegisterUserResponse - */ -export interface RegisterUserResponse { - /** - * - * @type {boolean} - * @memberof RegisterUserResponse - */ - 'success': RegisterUserResponseSuccessEnum; - /** - * - * @type {string} - * @memberof RegisterUserResponse - */ - 'message': string; - /** - * - * @type {Signer} - * @memberof RegisterUserResponse - */ - 'signer': Signer; -} - -export const RegisterUserResponseSuccessEnum = { - True: true -} as const; - -export type RegisterUserResponseSuccessEnum = typeof RegisterUserResponseSuccessEnum[keyof typeof RegisterUserResponseSuccessEnum]; - -/** - * - * @export - * @interface RelevantFollowersResponse - */ -export interface RelevantFollowersResponse { - /** - * - * @type {Array} - * @memberof RelevantFollowersResponse - */ - 'top_relevant_followers_hydrated': Array; - /** - * - * @type {Array} - * @memberof RelevantFollowersResponse - */ - 'all_relevant_followers_dehydrated': Array; -} -/** - * - * @export - * @interface RemoveChannelMemberRequest - */ -export interface RemoveChannelMemberRequest { - /** - * UUID of the signer - * @type {string} - * @memberof RemoveChannelMemberRequest - */ - 'signer_uuid': string; - /** - * The unique identifier of a farcaster channel - * @type {string} - * @memberof RemoveChannelMemberRequest - */ - 'channel_id': string; - /** - * The unique identifier of a farcaster user (unsigned integer) - * @type {number} - * @memberof RemoveChannelMemberRequest - */ - 'fid': number; - /** - * - * @type {ChannelMemberRole} - * @memberof RemoveChannelMemberRequest - */ - 'role': ChannelMemberRole; -} - - -/** - * - * @export - * @interface RemoveVerificationReqBody - */ -export interface RemoveVerificationReqBody { - /** - * UUID of the signer - * @type {string} - * @memberof RemoveVerificationReqBody - */ - 'signer_uuid': string; - /** - * Ethereum address - * @type {string} - * @memberof RemoveVerificationReqBody - */ - 'address': string; -} -/** - * - * @export - * @interface RespondChannelInviteRequest - */ -export interface RespondChannelInviteRequest { - /** - * UUID of the signer - * @type {string} - * @memberof RespondChannelInviteRequest - */ - 'signer_uuid': string; - /** - * The unique identifier of a farcaster channel - * @type {string} - * @memberof RespondChannelInviteRequest - */ - 'channel_id': string; - /** - * - * @type {ChannelMemberRole} - * @memberof RespondChannelInviteRequest - */ - 'role': ChannelMemberRole; - /** - * Accept or reject the invite - * @type {boolean} - * @memberof RespondChannelInviteRequest - */ - 'accept': boolean; -} - - -/** - * - * @export - * @interface SearchedUser - */ -export interface SearchedUser { - /** - * - * @type {string} - * @memberof SearchedUser - */ - 'object': SearchedUserObjectEnum; - /** - * The unique identifier of a farcaster user (unsigned integer) - * @type {number} - * @memberof SearchedUser - */ - 'fid': number; - /** - * - * @type {string} - * @memberof SearchedUser - */ - 'username': string; - /** - * - * @type {string} - * @memberof SearchedUser - */ - 'display_name'?: string; - /** - * Ethereum address - * @type {string} - * @memberof SearchedUser - */ - 'custody_address': string; - /** - * The URL of the user\'s profile picture - * @type {string} - * @memberof SearchedUser - */ - 'pfp_url'?: string; - /** - * - * @type {UserProfile} - * @memberof SearchedUser - */ - 'profile': UserProfile; - /** - * The number of followers the user has. - * @type {number} - * @memberof SearchedUser - */ - 'follower_count': number; - /** - * The number of users the user is following. - * @type {number} - * @memberof SearchedUser - */ - 'following_count': number; - /** - * - * @type {Array} - * @memberof SearchedUser - */ - 'verifications': Array; - /** - * - * @type {UserVerifiedAddresses} - * @memberof SearchedUser - */ - 'verified_addresses': UserVerifiedAddresses; - /** - * Verified accounts of the user on other platforms, currently only X is supported. - * @type {Array} - * @memberof SearchedUser - */ - 'verified_accounts': Array; - /** - * - * @type {boolean} - * @memberof SearchedUser - */ - 'power_badge': boolean; - /** - * - * @type {UserViewerContext} - * @memberof SearchedUser - */ - 'viewer_context'?: UserViewerContext; - /** - * - * @type {ProfileUrlPfp} - * @memberof SearchedUser - */ - 'pfp': ProfileUrlPfp; -} - -export const SearchedUserObjectEnum = { - User: 'user' -} as const; - -export type SearchedUserObjectEnum = typeof SearchedUserObjectEnum[keyof typeof SearchedUserObjectEnum]; - -/** - * - * @export - * @interface SignedKeyRequestSponsor - */ -export interface SignedKeyRequestSponsor { - /** - * The unique identifier of a farcaster user (unsigned integer) - * @type {number} - * @memberof SignedKeyRequestSponsor - */ - 'fid'?: number; - /** - * Signature generated by the fid of the sponsor and the signature generated from signKeyRequest for the app. - * @type {string} - * @memberof SignedKeyRequestSponsor - */ - 'signature'?: string; - /** - * Neynar will sponsor the signer if set to true. **Note: ** If sponsor.fid and sponsor.signature are provided along with sponsored_by_neynar set to true, the sponsor.fid and sponsor.signature will be ignored. Neynar will sponsor the signer on behalf of the user. The developer will get charged in compute units. - * @type {boolean} - * @memberof SignedKeyRequestSponsor - */ - 'sponsored_by_neynar'?: boolean; -} -/** - * - * @export - * @interface Signer - */ -export interface Signer { - /** - * UUID of the signer - * @type {string} - * @memberof Signer - */ - 'signer_uuid': string; - /** - * Ed25519 public key - * @type {string} - * @memberof Signer - */ - 'public_key': string; - /** - * - * @type {string} - * @memberof Signer - */ - 'status': SignerStatusEnum; - /** - * - * @type {string} - * @memberof Signer - */ - 'signer_approval_url'?: string; - /** - * The unique identifier of a farcaster user (unsigned integer) - * @type {number} - * @memberof Signer - */ - 'fid'?: number; -} - -export const SignerStatusEnum = { - Generated: 'generated', - PendingApproval: 'pending_approval', - Approved: 'approved', - Revoked: 'revoked' -} as const; - -export type SignerStatusEnum = typeof SignerStatusEnum[keyof typeof SignerStatusEnum]; - -/** - * - * @export - * @interface StorageAllocation - */ -export interface StorageAllocation { - /** - * - * @type {string} - * @memberof StorageAllocation - */ - 'object'?: string; - /** - * - * @type {UserDehydrated} - * @memberof StorageAllocation - */ - 'user'?: UserDehydrated; - /** - * - * @type {number} - * @memberof StorageAllocation - */ - 'units'?: number; - /** - * - * @type {string} - * @memberof StorageAllocation - */ - 'expiry'?: string; - /** - * - * @type {string} - * @memberof StorageAllocation - */ - 'timestamp'?: string; -} -/** - * - * @export - * @interface StorageAllocationsResponse - */ -export interface StorageAllocationsResponse { - /** - * - * @type {number} - * @memberof StorageAllocationsResponse - */ - 'total_active_units'?: number; - /** - * - * @type {Array} - * @memberof StorageAllocationsResponse - */ - 'allocations'?: Array; -} -/** - * - * @export - * @interface StorageObject - */ -export interface StorageObject { - /** - * - * @type {string} - * @memberof StorageObject - */ - 'object'?: string; - /** - * - * @type {number} - * @memberof StorageObject - */ - 'used'?: number; - /** - * - * @type {number} - * @memberof StorageObject - */ - 'capacity'?: number; -} -/** - * - * @export - * @interface StorageUsageResponse - */ -export interface StorageUsageResponse { - /** - * - * @type {string} - * @memberof StorageUsageResponse - */ - 'object'?: string; - /** - * - * @type {UserDehydrated} - * @memberof StorageUsageResponse - */ - 'user'?: UserDehydrated; - /** - * - * @type {StorageObject} - * @memberof StorageUsageResponse - */ - 'casts'?: StorageObject; - /** - * - * @type {StorageObject} - * @memberof StorageUsageResponse - */ - 'reactions'?: StorageObject; - /** - * - * @type {StorageObject} - * @memberof StorageUsageResponse - */ - 'links'?: StorageObject; - /** - * - * @type {StorageObject} - * @memberof StorageUsageResponse - */ - 'verified_addresses'?: StorageObject; - /** - * - * @type {StorageObject} - * @memberof StorageUsageResponse - */ - 'username_proofs'?: StorageObject; - /** - * - * @type {StorageObject} - * @memberof StorageUsageResponse - */ - 'signers'?: StorageObject; - /** - * - * @type {number} - * @memberof StorageUsageResponse - */ - 'total_active_units'?: number; -} -/** - * - * @export - * @interface SubscribedTo - */ -export interface SubscribedTo extends Subscription { - /** - * - * @type {string} - * @memberof SubscribedTo - */ - 'expires_at': string; - /** - * - * @type {string} - * @memberof SubscribedTo - */ - 'subscribed_at': string; - /** - * - * @type {SubscriptionTier} - * @memberof SubscribedTo - */ - 'tier': SubscriptionTier; - /** - * - * @type {User} - * @memberof SubscribedTo - */ - 'creator': User; -} -/** - * - * @export - * @interface SubscribedToObject - */ -export interface SubscribedToObject { - /** - * - * @type {string} - * @memberof SubscribedToObject - */ - 'object': string; - /** - * - * @type {string} - * @memberof SubscribedToObject - */ - 'provider_name': string; - /** - * - * @type {string} - * @memberof SubscribedToObject - */ - 'contract_address'?: string; - /** - * - * @type {number} - * @memberof SubscribedToObject - */ - 'protocol_version'?: number; - /** - * - * @type {number} - * @memberof SubscribedToObject - */ - 'chain'?: number; - /** - * - * @type {string} - * @memberof SubscribedToObject - */ - 'expires_at'?: string; - /** - * - * @type {string} - * @memberof SubscribedToObject - */ - 'subscribed_at'?: string; - /** - * - * @type {string} - * @memberof SubscribedToObject - */ - 'tier_id'?: string; -} -/** - * - * @export - * @interface SubscribedToResponse - */ -export interface SubscribedToResponse { - /** - * - * @type {Array} - * @memberof SubscribedToResponse - */ - 'subscribed_to'?: Array; -} -/** - * - * @export - * @interface Subscriber - */ -export interface Subscriber { - /** - * - * @type {string} - * @memberof Subscriber - */ - 'object': string; - /** - * - * @type {User} - * @memberof Subscriber - */ - 'user': User; - /** - * - * @type {SubscribedToObject} - * @memberof Subscriber - */ - 'subscribed_to': SubscribedToObject; -} -/** - * - * @export - * @interface SubscribersResponse - */ -export interface SubscribersResponse { - /** - * - * @type {Array} - * @memberof SubscribersResponse - */ - 'subscribers'?: Array; -} -/** - * - * @export - * @interface Subscription - */ -export interface Subscription { - /** - * - * @type {string} - * @memberof Subscription - */ - 'object': string; - /** - * - * @type {string} - * @memberof Subscription - */ - 'provider_name'?: string; - /** - * - * @type {string} - * @memberof Subscription - */ - 'contract_address': string; - /** - * - * @type {number} - * @memberof Subscription - */ - 'chain': number; - /** - * - * @type {SubscriptionMetadata} - * @memberof Subscription - */ - 'metadata': SubscriptionMetadata; - /** - * - * @type {string} - * @memberof Subscription - */ - 'owner_address': string; - /** - * - * @type {SubscriptionPrice} - * @memberof Subscription - */ - 'price': SubscriptionPrice; - /** - * - * @type {Array} - * @memberof Subscription - */ - 'tiers'?: Array; - /** - * - * @type {number} - * @memberof Subscription - */ - 'protocol_version': number; - /** - * - * @type {SubscriptionToken} - * @memberof Subscription - */ - 'token': SubscriptionToken; -} -/** - * - * @export - * @interface SubscriptionMetadata - */ -export interface SubscriptionMetadata { - /** - * - * @type {string} - * @memberof SubscriptionMetadata - */ - 'title': string; - /** - * - * @type {string} - * @memberof SubscriptionMetadata - */ - 'symbol': string; - /** - * - * @type {string} - * @memberof SubscriptionMetadata - */ - 'art_url': string; -} -/** - * - * @export - * @interface SubscriptionPrice - */ -export interface SubscriptionPrice { - /** - * - * @type {number} - * @memberof SubscriptionPrice - */ - 'period_duration_seconds': number; - /** - * - * @type {string} - * @memberof SubscriptionPrice - */ - 'tokens_per_period': string; - /** - * - * @type {string} - * @memberof SubscriptionPrice - */ - 'initial_mint_price': string; -} -/** - * The provider of the subscription. - * @export - * @enum {string} - */ - -export const SubscriptionProvider = { - FabricStp: 'fabric_stp' -} as const; - -export type SubscriptionProvider = typeof SubscriptionProvider[keyof typeof SubscriptionProvider]; - - -/** - * The provider of the subscription. - * @export - * @enum {string} - */ - -export const SubscriptionProviders = { - FabricStp: 'fabric_stp', - Paragraph: 'paragraph' -} as const; - -export type SubscriptionProviders = typeof SubscriptionProviders[keyof typeof SubscriptionProviders]; - - -/** - * - * @export - * @interface SubscriptionStatus - */ -export interface SubscriptionStatus { - /** - * - * @type {string} - * @memberof SubscriptionStatus - */ - 'object': SubscriptionStatusObjectEnum; - /** - * - * @type {boolean} - * @memberof SubscriptionStatus - */ - 'status': boolean; - /** - * - * @type {number} - * @memberof SubscriptionStatus - */ - 'expires_at': number | null; - /** - * - * @type {number} - * @memberof SubscriptionStatus - */ - 'subscribed_at': number | null; - /** - * - * @type {SubscriptionTier} - * @memberof SubscriptionStatus - */ - 'tier': SubscriptionTier | null; -} - -export const SubscriptionStatusObjectEnum = { - SubscribedToDehydrated: 'subscribed_to_dehydrated' -} as const; - -export type SubscriptionStatusObjectEnum = typeof SubscriptionStatusObjectEnum[keyof typeof SubscriptionStatusObjectEnum]; - -/** - * - * @export - * @interface SubscriptionTier - */ -export interface SubscriptionTier { - /** - * - * @type {number} - * @memberof SubscriptionTier - */ - 'id'?: number; - /** - * - * @type {SubscriptionTierPrice} - * @memberof SubscriptionTier - */ - 'price'?: SubscriptionTierPrice; -} -/** - * - * @export - * @interface SubscriptionTierPrice - */ -export interface SubscriptionTierPrice { - /** - * - * @type {number} - * @memberof SubscriptionTierPrice - */ - 'period_duration_seconds'?: number; - /** - * - * @type {string} - * @memberof SubscriptionTierPrice - */ - 'tokens_per_period'?: string; - /** - * - * @type {string} - * @memberof SubscriptionTierPrice - */ - 'initial_mint_price'?: string; -} -/** - * - * @export - * @interface SubscriptionToken - */ -export interface SubscriptionToken { - /** - * - * @type {string} - * @memberof SubscriptionToken - */ - 'symbol': string; - /** - * - * @type {string} - * @memberof SubscriptionToken - */ - 'address': string | null; - /** - * - * @type {number} - * @memberof SubscriptionToken - */ - 'decimals': number; - /** - * - * @type {boolean} - * @memberof SubscriptionToken - */ - 'erc20': boolean; -} -/** - * - * @export - * @interface Subscriptions - */ -export interface Subscriptions { - /** - * - * @type {string} - * @memberof Subscriptions - */ - 'object': string; - /** - * - * @type {Array} - * @memberof Subscriptions - */ - 'subscriptions_created': Array; -} -/** - * - * @export - * @interface SubscriptionsResponse - */ -export interface SubscriptionsResponse { - /** - * - * @type {Array} - * @memberof SubscriptionsResponse - */ - 'subscriptions_created'?: Array; -} -/** - * - * @export - * @interface TrendingChannelResponse - */ -export interface TrendingChannelResponse { - /** - * - * @type {Array} - * @memberof TrendingChannelResponse - */ - 'channels': Array; - /** - * - * @type {NextCursor} - * @memberof TrendingChannelResponse - */ - 'next': NextCursor; -} -/** - * - * @export - * @interface UpdateUserReqBody - */ -export interface UpdateUserReqBody { - /** - * UUID of the signer - * @type {string} - * @memberof UpdateUserReqBody - */ - 'signer_uuid': string; - /** - * - * @type {string} - * @memberof UpdateUserReqBody - */ - 'bio'?: string; - /** - * - * @type {string} - * @memberof UpdateUserReqBody - */ - 'pfp_url'?: string; - /** - * - * @type {string} - * @memberof UpdateUserReqBody - */ - 'url'?: string; - /** - * - * @type {string} - * @memberof UpdateUserReqBody - */ - 'username'?: string; - /** - * - * @type {string} - * @memberof UpdateUserReqBody - */ - 'display_name'?: string; - /** - * - * @type {UpdateUserReqBodyLocation} - * @memberof UpdateUserReqBody - */ - 'location'?: UpdateUserReqBodyLocation; -} -/** - * - * @export - * @interface UpdateUserReqBodyLocation - */ -export interface UpdateUserReqBodyLocation { - /** - * - * @type {number} - * @memberof UpdateUserReqBodyLocation - */ - 'latitude': number; - /** - * - * @type {number} - * @memberof UpdateUserReqBodyLocation - */ - 'longitude': number; -} -/** - * - * @export - * @interface User - */ -export interface User { - /** - * - * @type {string} - * @memberof User - */ - 'object': UserObjectEnum; - /** - * The unique identifier of a farcaster user (unsigned integer) - * @type {number} - * @memberof User - */ - 'fid': number; - /** - * - * @type {string} - * @memberof User - */ - 'username': string; - /** - * - * @type {string} - * @memberof User - */ - 'display_name'?: string; - /** - * Ethereum address - * @type {string} - * @memberof User - */ - 'custody_address': string; - /** - * The URL of the user\'s profile picture - * @type {string} - * @memberof User - */ - 'pfp_url'?: string; - /** - * - * @type {UserProfile} - * @memberof User - */ - 'profile': UserProfile; - /** - * The number of followers the user has. - * @type {number} - * @memberof User - */ - 'follower_count': number; - /** - * The number of users the user is following. - * @type {number} - * @memberof User - */ - 'following_count': number; - /** - * - * @type {Array} - * @memberof User - */ - 'verifications': Array; - /** - * - * @type {UserVerifiedAddresses} - * @memberof User - */ - 'verified_addresses': UserVerifiedAddresses; - /** - * Verified accounts of the user on other platforms, currently only X is supported. - * @type {Array} - * @memberof User - */ - 'verified_accounts': Array; - /** - * - * @type {boolean} - * @memberof User - */ - 'power_badge': boolean; - /** - * - * @type {UserViewerContext} - * @memberof User - */ - 'viewer_context'?: UserViewerContext; -} - -export const UserObjectEnum = { - User: 'user' -} as const; - -export type UserObjectEnum = typeof UserObjectEnum[keyof typeof UserObjectEnum]; - -/** - * - * @export - * @interface UserDehydrated - */ -export interface UserDehydrated { - /** - * - * @type {string} - * @memberof UserDehydrated - */ - 'object': UserDehydratedObjectEnum; - /** - * The unique identifier of a farcaster user (unsigned integer) - * @type {number} - * @memberof UserDehydrated - */ - 'fid': number; - /** - * - * @type {string} - * @memberof UserDehydrated - */ - 'username'?: string; - /** - * - * @type {string} - * @memberof UserDehydrated - */ - 'display_name'?: string; - /** - * - * @type {string} - * @memberof UserDehydrated - */ - 'pfp_url'?: string; -} - -export const UserDehydratedObjectEnum = { - UserDehydrated: 'user_dehydrated' -} as const; - -export type UserDehydratedObjectEnum = typeof UserDehydratedObjectEnum[keyof typeof UserDehydratedObjectEnum]; - -/** - * - * @export - * @interface UserFIDResponse - */ -export interface UserFIDResponse { - /** - * - * @type {number} - * @memberof UserFIDResponse - */ - 'fid': number; -} -/** - * - * @export - * @interface UserPowerLiteResponse - */ -export interface UserPowerLiteResponse { - /** - * - * @type {UserPowerLiteResponseResult} - * @memberof UserPowerLiteResponse - */ - 'result': UserPowerLiteResponseResult; -} -/** - * - * @export - * @interface UserPowerLiteResponseResult - */ -export interface UserPowerLiteResponseResult { - /** - * List of FIDs - * @type {Array} - * @memberof UserPowerLiteResponseResult - */ - 'fids': Array; -} -/** - * - * @export - * @interface UserProfile - */ -export interface UserProfile { - /** - * - * @type {UserProfileBio} - * @memberof UserProfile - */ - 'bio': UserProfileBio; - /** - * - * @type {Location} - * @memberof UserProfile - */ - 'location'?: Location; -} -/** - * - * @export - * @interface UserProfileBio - */ -export interface UserProfileBio { - /** - * - * @type {string} - * @memberof UserProfileBio - */ - 'text': string; - /** - * - * @type {Array} - * @memberof UserProfileBio - */ - 'mentioned_profiles': Array; -} -/** - * - * @export - * @interface UserResponse - */ -export interface UserResponse { - /** - * - * @type {User} - * @memberof UserResponse - */ - 'user': User; -} -/** - * - * @export - * @interface UserSearchResponse - */ -export interface UserSearchResponse { - /** - * - * @type {UserSearchResponseResult} - * @memberof UserSearchResponse - */ - 'result': UserSearchResponseResult; -} -/** - * - * @export - * @interface UserSearchResponseResult - */ -export interface UserSearchResponseResult { - /** - * - * @type {Array} - * @memberof UserSearchResponseResult - */ - 'users': Array; - /** - * - * @type {NextCursor} - * @memberof UserSearchResponseResult - */ - 'next'?: NextCursor; -} -/** - * - * @export - * @interface UserVerifiedAccountsInner - */ -export interface UserVerifiedAccountsInner { - /** - * - * @type {string} - * @memberof UserVerifiedAccountsInner - */ - 'platform'?: UserVerifiedAccountsInnerPlatformEnum; - /** - * - * @type {string} - * @memberof UserVerifiedAccountsInner - */ - 'username'?: string; -} - -export const UserVerifiedAccountsInnerPlatformEnum = { - X: 'x' -} as const; - -export type UserVerifiedAccountsInnerPlatformEnum = typeof UserVerifiedAccountsInnerPlatformEnum[keyof typeof UserVerifiedAccountsInnerPlatformEnum]; - -/** - * - * @export - * @interface UserVerifiedAddresses - */ -export interface UserVerifiedAddresses { - /** - * - * @type {Array} - * @memberof UserVerifiedAddresses - */ - 'eth_addresses': Array; - /** - * - * @type {Array} - * @memberof UserVerifiedAddresses - */ - 'sol_addresses': Array; -} -/** - * Adds context on the viewer\'s follow relationship with the user. - * @export - * @interface UserViewerContext - */ -export interface UserViewerContext { - /** - * Indicates if the viewer is following the user. - * @type {boolean} - * @memberof UserViewerContext - */ - 'following': boolean; - /** - * Indicates if the viewer is followed by the user. - * @type {boolean} - * @memberof UserViewerContext - */ - 'followed_by': boolean; - /** - * Indicates if the viewer is blocking the user. - * @type {boolean} - * @memberof UserViewerContext - */ - 'blocking': boolean; - /** - * Indicates if the viewer is blocked by the user. - * @type {boolean} - * @memberof UserViewerContext - */ - 'blocked_by': boolean; -} -/** - * - * @export - * @interface UsersActiveChannelsResponse - */ -export interface UsersActiveChannelsResponse { - /** - * - * @type {Array} - * @memberof UsersActiveChannelsResponse - */ - 'channels'?: Array; - /** - * - * @type {NextCursor} - * @memberof UsersActiveChannelsResponse - */ - 'next'?: NextCursor; -} -/** - * - * @export - * @interface UsersResponse - */ -export interface UsersResponse { - /** - * - * @type {Array} - * @memberof UsersResponse - */ - 'users': Array; - /** - * - * @type {NextCursor} - * @memberof UsersResponse - */ - 'next': NextCursor; -} -/** - * - * @export - * @interface ValidateFrameActionResponse - */ -export interface ValidateFrameActionResponse { - /** - * - * @type {boolean} - * @memberof ValidateFrameActionResponse - */ - 'valid': boolean; - /** - * - * @type {ValidatedFrameAction} - * @memberof ValidateFrameActionResponse - */ - 'action': ValidatedFrameAction; -} -/** - * - * @export - * @enum {string} - */ - -export const ValidateFrameAnalyticsType = { - TotalInteractors: 'total-interactors', - Interactors: 'interactors', - InteractionsPerCast: 'interactions-per-cast', - InputText: 'input-text' -} as const; - -export type ValidateFrameAnalyticsType = typeof ValidateFrameAnalyticsType[keyof typeof ValidateFrameAnalyticsType]; - - -/** - * - * @export - * @interface ValidateFrameRequest - */ -export interface ValidateFrameRequest { - /** - * Hexadecimal string of message bytes. - * @type {string} - * @memberof ValidateFrameRequest - */ - 'message_bytes_in_hex': string; - /** - * Adds viewer_context inside the cast object to indicate whether the interactor reacted to the cast housing the frame. - * @type {boolean} - * @memberof ValidateFrameRequest - */ - 'cast_reaction_context'?: boolean; - /** - * Adds viewer_context inside the user (interactor) object to indicate whether the interactor follows or is followed by the cast author. - * @type {boolean} - * @memberof ValidateFrameRequest - */ - 'follow_context'?: boolean; - /** - * Adds context about the app used by the user inside `frame.action`. - * @type {boolean} - * @memberof ValidateFrameRequest - */ - 'signer_context'?: boolean; - /** - * Adds context about the channel that the cast belongs to inside of the cast object. - * @type {boolean} - * @memberof ValidateFrameRequest - */ - 'channel_follow_context'?: boolean; -} -/** - * - * @export - * @interface ValidatedFrameAction - */ -export interface ValidatedFrameAction { - /** - * - * @type {string} - * @memberof ValidatedFrameAction - */ - 'object': ValidatedFrameActionObjectEnum; - /** - * - * @type {string} - * @memberof ValidatedFrameAction - */ - 'url': string; - /** - * - * @type {User} - * @memberof ValidatedFrameAction - */ - 'interactor': User; - /** - * - * @type {ValidatedFrameActionTappedButton} - * @memberof ValidatedFrameAction - */ - 'tapped_button': ValidatedFrameActionTappedButton; - /** - * - * @type {FrameInput} - * @memberof ValidatedFrameAction - */ - 'input'?: FrameInput; - /** - * - * @type {FrameState} - * @memberof ValidatedFrameAction - */ - 'state': FrameState; - /** - * - * @type {CastWithInteractions} - * @memberof ValidatedFrameAction - */ - 'cast': CastWithInteractions; - /** - * - * @type {string} - * @memberof ValidatedFrameAction - */ - 'timestamp': string; - /** - * - * @type {ValidatedFrameActionSigner} - * @memberof ValidatedFrameAction - */ - 'signer'?: ValidatedFrameActionSigner; - /** - * - * @type {FrameTransaction} - * @memberof ValidatedFrameAction - */ - 'transaction'?: FrameTransaction; - /** - * The connected wallet address of the interacting user. - * @type {string} - * @memberof ValidatedFrameAction - */ - 'address'?: string; -} - -export const ValidatedFrameActionObjectEnum = { - ValidatedFrameAction: 'validated_frame_action' -} as const; - -export type ValidatedFrameActionObjectEnum = typeof ValidatedFrameActionObjectEnum[keyof typeof ValidatedFrameActionObjectEnum]; - -/** - * - * @export - * @interface ValidatedFrameActionSigner - */ -export interface ValidatedFrameActionSigner { - /** - * - * @type {User} - * @memberof ValidatedFrameActionSigner - */ - 'client'?: User; -} -/** - * - * @export - * @interface ValidatedFrameActionTappedButton - */ -export interface ValidatedFrameActionTappedButton { - /** - * - * @type {number} - * @memberof ValidatedFrameActionTappedButton - */ - 'index': number; -} -/** - * Chain ID for farcaster verifications. 0 for EOA verifications, 1 or 10 for contract verifications - * @export - * @enum {number} - */ - -export const VerificationChainId = { - NUMBER_0: 0, - NUMBER_1: 1, - NUMBER_10: 10 -} as const; - -export type VerificationChainId = typeof VerificationChainId[keyof typeof VerificationChainId]; - - -/** - * Type of verification. 0 = EOA, 1 = contract - * @export - * @enum {number} - */ - -export const VerificationType = { - NUMBER_0: 0, - NUMBER_1: 1 -} as const; - -export type VerificationType = typeof VerificationType[keyof typeof VerificationType]; - - -/** - * - * @export - * @interface VideoObject - */ -export interface VideoObject { - /** - * - * @type {string} - * @memberof VideoObject - */ - 'height'?: string; - /** - * - * @type {string} - * @memberof VideoObject - */ - 'type'?: string; - /** - * - * @type {string} - * @memberof VideoObject - */ - 'url': string; - /** - * - * @type {string} - * @memberof VideoObject - */ - 'width'?: string; -} -/** - * - * @export - * @interface Webhook - */ -export interface Webhook { - /** - * - * @type {string} - * @memberof Webhook - */ - 'object': WebhookObjectEnum; - /** - * - * @type {string} - * @memberof Webhook - */ - 'webhook_id': string; - /** - * - * @type {string} - * @memberof Webhook - */ - 'developer_uuid': string; - /** - * - * @type {string} - * @memberof Webhook - */ - 'target_url': string; - /** - * - * @type {string} - * @memberof Webhook - */ - 'title': string; - /** - * - * @type {Array} - * @memberof Webhook - */ - 'secrets': Array; - /** - * - * @type {string} - * @memberof Webhook - */ - 'description': string; - /** - * - * @type {string} - * @memberof Webhook - */ - 'http_timeout': string; - /** - * - * @type {number} - * @memberof Webhook - */ - 'rate_limit': number; - /** - * - * @type {boolean} - * @memberof Webhook - */ - 'active': boolean; - /** - * - * @type {string} - * @memberof Webhook - */ - 'rate_limit_duration': string; - /** - * - * @type {string} - * @memberof Webhook - */ - 'created_at': string; - /** - * - * @type {string} - * @memberof Webhook - */ - 'updated_at': string; - /** - * - * @type {string} - * @memberof Webhook - */ - 'deleted_at': string; - /** - * - * @type {WebhookSubscription} - * @memberof Webhook - */ - 'subscription'?: WebhookSubscription; -} - -export const WebhookObjectEnum = { - Webhook: 'webhook' -} as const; - -export type WebhookObjectEnum = typeof WebhookObjectEnum[keyof typeof WebhookObjectEnum]; - -/** - * - * @export - * @interface WebhookDeleteReqBody - */ -export interface WebhookDeleteReqBody { - /** - * - * @type {string} - * @memberof WebhookDeleteReqBody - */ - 'webhook_id': string; -} -/** - * - * @export - * @interface WebhookListResponse - */ -export interface WebhookListResponse { - /** - * - * @type {Array} - * @memberof WebhookListResponse - */ - 'webhooks': Array; -} -/** - * - * @export - * @interface WebhookPatchReqBody - */ -export interface WebhookPatchReqBody { - /** - * - * @type {string} - * @memberof WebhookPatchReqBody - */ - 'webhook_id': string; - /** - * - * @type {string} - * @memberof WebhookPatchReqBody - */ - 'active': WebhookPatchReqBodyActiveEnum; -} - -export const WebhookPatchReqBodyActiveEnum = { - True: 'true', - False: 'false' -} as const; - -export type WebhookPatchReqBodyActiveEnum = typeof WebhookPatchReqBodyActiveEnum[keyof typeof WebhookPatchReqBodyActiveEnum]; - -/** - * - * @export - * @interface WebhookPostReqBody - */ -export interface WebhookPostReqBody { - /** - * - * @type {string} - * @memberof WebhookPostReqBody - */ - 'name': string; - /** - * - * @type {string} - * @memberof WebhookPostReqBody - */ - 'url': string; - /** - * - * @type {WebhookSubscriptionFilters} - * @memberof WebhookPostReqBody - */ - 'subscription'?: WebhookSubscriptionFilters; -} -/** - * - * @export - * @interface WebhookPutReqBody - */ -export interface WebhookPutReqBody extends WebhookPostReqBody { - /** - * - * @type {string} - * @memberof WebhookPutReqBody - */ - 'webhook_id': string; -} -/** - * - * @export - * @interface WebhookResponse - */ -export interface WebhookResponse { - /** - * - * @type {string} - * @memberof WebhookResponse - */ - 'message'?: string; - /** - * - * @type {boolean} - * @memberof WebhookResponse - */ - 'success'?: boolean; - /** - * - * @type {Webhook} - * @memberof WebhookResponse - */ - 'webhook'?: Webhook; -} -/** - * - * @export - * @interface WebhookSecret - */ -export interface WebhookSecret { - /** - * - * @type {string} - * @memberof WebhookSecret - */ - 'uid': string; - /** - * - * @type {string} - * @memberof WebhookSecret - */ - 'value': string; - /** - * - * @type {string} - * @memberof WebhookSecret - */ - 'expires_at': string; - /** - * - * @type {string} - * @memberof WebhookSecret - */ - 'created_at': string; - /** - * - * @type {string} - * @memberof WebhookSecret - */ - 'updated_at': string; - /** - * - * @type {string} - * @memberof WebhookSecret - */ - 'deleted_at': string; -} -/** - * - * @export - * @interface WebhookSubscription - */ -export interface WebhookSubscription { - /** - * - * @type {string} - * @memberof WebhookSubscription - */ - 'object': WebhookSubscriptionObjectEnum; - /** - * - * @type {string} - * @memberof WebhookSubscription - */ - 'subscription_id': string; - /** - * - * @type {WebhookSubscriptionFilters} - * @memberof WebhookSubscription - */ - 'filters': WebhookSubscriptionFilters; - /** - * - * @type {string} - * @memberof WebhookSubscription - */ - 'created_at': string; - /** - * - * @type {string} - * @memberof WebhookSubscription - */ - 'updated_at': string; -} - -export const WebhookSubscriptionObjectEnum = { - WebhookSubscription: 'webhook_subscription' -} as const; - -export type WebhookSubscriptionObjectEnum = typeof WebhookSubscriptionObjectEnum[keyof typeof WebhookSubscriptionObjectEnum]; - -/** - * - * @export - * @interface WebhookSubscriptionFilters - */ -export interface WebhookSubscriptionFilters { - /** - * - * @type {WebhookSubscriptionFiltersCast} - * @memberof WebhookSubscriptionFilters - */ - 'cast.created'?: WebhookSubscriptionFiltersCast; - /** - * - * @type {WebhookSubscriptionFiltersCast} - * @memberof WebhookSubscriptionFilters - */ - 'cast.deleted'?: WebhookSubscriptionFiltersCast; - /** - * - * @type {object} - * @memberof WebhookSubscriptionFilters - */ - 'user.created'?: object; - /** - * - * @type {WebhookSubscriptionFiltersUserUpdated} - * @memberof WebhookSubscriptionFilters - */ - 'user.updated'?: WebhookSubscriptionFiltersUserUpdated; - /** - * - * @type {WebhookSubscriptionFiltersFollow} - * @memberof WebhookSubscriptionFilters - */ - 'follow.created'?: WebhookSubscriptionFiltersFollow; - /** - * - * @type {WebhookSubscriptionFiltersFollow} - * @memberof WebhookSubscriptionFilters - */ - 'follow.deleted'?: WebhookSubscriptionFiltersFollow; - /** - * - * @type {WebhookSubscriptionFiltersReaction} - * @memberof WebhookSubscriptionFilters - */ - 'reaction.created'?: WebhookSubscriptionFiltersReaction; - /** - * - * @type {WebhookSubscriptionFiltersReaction} - * @memberof WebhookSubscriptionFilters - */ - 'reaction.deleted'?: WebhookSubscriptionFiltersReaction; -} -/** - * - * @export - * @interface WebhookSubscriptionFiltersCast - */ -export interface WebhookSubscriptionFiltersCast { - /** - * Exclude casts that matches these authors. **Note:** This is applied as an AND operation against rest of the filters. Rest of the filters are bundled as an OR operation. - * @type {Array} - * @memberof WebhookSubscriptionFiltersCast - */ - 'exclude_author_fids'?: Array; - /** - * - * @type {Array} - * @memberof WebhookSubscriptionFiltersCast - */ - 'author_fids'?: Array; - /** - * - * @type {Array} - * @memberof WebhookSubscriptionFiltersCast - */ - 'mentioned_fids'?: Array; - /** - * - * @type {Array} - * @memberof WebhookSubscriptionFiltersCast - */ - 'parent_urls'?: Array; - /** - * - * @type {Array} - * @memberof WebhookSubscriptionFiltersCast - */ - 'root_parent_urls'?: Array; - /** - * - * @type {Array} - * @memberof WebhookSubscriptionFiltersCast - */ - 'parent_hashes'?: Array; - /** - * - * @type {Array} - * @memberof WebhookSubscriptionFiltersCast - */ - 'parent_author_fids'?: Array; - /** - * Regex pattern to match the text key of the cast. **Note:** 1) Regex must be parsed by Go\'s RE2 engine (Test your expression here: https://www.lddgo.net/en/string/golangregex) 2) Use backslashes to escape special characters. For example: (?i)\\\\$degen should be written as (?i)\\\\\\\\$degen - * @type {string} - * @memberof WebhookSubscriptionFiltersCast - */ - 'text'?: string; - /** - * Regex pattern to match the embeded_url (key embeds) of the cast. **Note:** 1) Regex must be parsed by Go\'s RE2 engine (Test your expression here: https://www.lddgo.net/en/string/golangregex) 2) Use backslashes to escape special characters. For example: \\\\b(farcaster|neynar)\\\\b should be written as \\\\\\\\b(farcaster|neynar)\\\\\\\\b - * @type {string} - * @memberof WebhookSubscriptionFiltersCast - */ - 'embeds'?: string; -} -/** - * - * @export - * @interface WebhookSubscriptionFiltersFollow - */ -export interface WebhookSubscriptionFiltersFollow { - /** - * - * @type {Array} - * @memberof WebhookSubscriptionFiltersFollow - */ - 'fids'?: Array; - /** - * - * @type {Array} - * @memberof WebhookSubscriptionFiltersFollow - */ - 'target_fids'?: Array; -} -/** - * - * @export - * @interface WebhookSubscriptionFiltersReaction - */ -export interface WebhookSubscriptionFiltersReaction { - /** - * - * @type {Array} - * @memberof WebhookSubscriptionFiltersReaction - */ - 'fids'?: Array; - /** - * - * @type {Array} - * @memberof WebhookSubscriptionFiltersReaction - */ - 'target_fids'?: Array; -} -/** - * - * @export - * @interface WebhookSubscriptionFiltersUserUpdated - */ -export interface WebhookSubscriptionFiltersUserUpdated { - /** - * - * @type {Array} - * @memberof WebhookSubscriptionFiltersUserUpdated - */ - 'fids'?: Array; -} -/** - * - * @export - * @interface ZodError - */ -export interface ZodError { - /** - * - * @type {string} - * @memberof ZodError - */ - 'message': string; - /** - * - * @type {string} - * @memberof ZodError - */ - 'code': string; - /** - * - * @type {Array} - * @memberof ZodError - */ - 'errors': Array; -} -/** - * - * @export - * @interface ZodErrorErrorsInner - */ -export interface ZodErrorErrorsInner { - /** - * - * @type {string} - * @memberof ZodErrorErrorsInner - */ - 'code': string; - /** - * - * @type {string} - * @memberof ZodErrorErrorsInner - */ - 'expected': string; - /** - * - * @type {string} - * @memberof ZodErrorErrorsInner - */ - 'received': string; - /** - * - * @type {Array} - * @memberof ZodErrorErrorsInner - */ - 'path': Array; - /** - * - * @type {string} - * @memberof ZodErrorErrorsInner - */ - 'message': string; -} - -/** - * ActionApi - axios parameter creator - * @export - */ -export const ActionApiAxiosParamCreator = function (configuration?: Configuration) { - return { - /** - * Securely communicate and perform actions on behalf of users across different apps. It enables an app to send data or trigger actions in another app on behalf of a mutual user by signing messages using the user\'s Farcaster signer. - * @summary User actions across apps - * @param {FarcasterActionReqBody} farcasterActionReqBody - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - publishFarcasterAction: async (farcasterActionReqBody: FarcasterActionReqBody, options: RawAxiosRequestConfig = {}): Promise => { - // verify required parameter 'farcasterActionReqBody' is not null or undefined - assertParamExists('publishFarcasterAction', 'farcasterActionReqBody', farcasterActionReqBody) - const localVarPath = `/farcaster/action`; - // use dummy base URL string because the URL constructor only accepts absolute URLs. - const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); - let baseOptions; - if (configuration) { - baseOptions = configuration.baseOptions; - } - - const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options}; - const localVarHeaderParameter = {} as any; - const localVarQueryParameter = {} as any; - - // authentication ApiKeyAuth required - await setApiKeyToObject(localVarHeaderParameter, "x-api-key", configuration) - - - - localVarHeaderParameter['Content-Type'] = 'application/json'; - - setSearchParams(localVarUrlObj, localVarQueryParameter); - let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; - localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; - localVarRequestOptions.data = serializeDataIfNeeded(farcasterActionReqBody, localVarRequestOptions, configuration) - - return { - url: toPathString(localVarUrlObj), - options: localVarRequestOptions, - }; - }, - } -}; - -/** - * ActionApi - functional programming interface - * @export - */ -export const ActionApiFp = function(configuration?: Configuration) { - const localVarAxiosParamCreator = ActionApiAxiosParamCreator(configuration) - return { - /** - * Securely communicate and perform actions on behalf of users across different apps. It enables an app to send data or trigger actions in another app on behalf of a mutual user by signing messages using the user\'s Farcaster signer. - * @summary User actions across apps - * @param {FarcasterActionReqBody} farcasterActionReqBody - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - async publishFarcasterAction(farcasterActionReqBody: FarcasterActionReqBody, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<{ [key: string]: any; }>> { - const localVarAxiosArgs = await localVarAxiosParamCreator.publishFarcasterAction(farcasterActionReqBody, options); - const localVarOperationServerIndex = configuration?.serverIndex ?? 0; - const localVarOperationServerBasePath = operationServerMap['ActionApi.publishFarcasterAction']?.[localVarOperationServerIndex]?.url; - return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); - }, - } -}; - -/** - * ActionApi - factory interface - * @export - */ -export const ActionApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) { - const localVarFp = ActionApiFp(configuration) - return { - /** - * Securely communicate and perform actions on behalf of users across different apps. It enables an app to send data or trigger actions in another app on behalf of a mutual user by signing messages using the user\'s Farcaster signer. - * @summary User actions across apps - * @param {FarcasterActionReqBody} farcasterActionReqBody - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - publishFarcasterAction(farcasterActionReqBody: FarcasterActionReqBody, options?: RawAxiosRequestConfig): AxiosPromise<{ [key: string]: any; }> { - return localVarFp.publishFarcasterAction(farcasterActionReqBody, options).then((request) => request(axios, basePath)); - }, - }; -}; - -/** - * ActionApi - object-oriented interface - * @export - * @class ActionApi - * @extends {BaseAPI} - */ -export class ActionApi extends BaseAPI { - /** - * Securely communicate and perform actions on behalf of users across different apps. It enables an app to send data or trigger actions in another app on behalf of a mutual user by signing messages using the user\'s Farcaster signer. - * @summary User actions across apps - * @param {FarcasterActionReqBody} farcasterActionReqBody - * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof ActionApi - */ - public publishFarcasterAction(farcasterActionReqBody: FarcasterActionReqBody, options?: RawAxiosRequestConfig) { - return ActionApiFp(this.configuration).publishFarcasterAction(farcasterActionReqBody, options).then((request) => request(this.axios, this.basePath)); - } -} - - - -/** - * BanApi - axios parameter creator - * @export - */ -export const BanApiAxiosParamCreator = function (configuration?: Configuration) { - return { - /** - * Bans a list of FIDs from the app associated with your API key. Banned users, their casts and reactions will not appear in feeds. - * @summary Ban FIDs from app - * @param {BanReqBody} banReqBody - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - addBan: async (banReqBody: BanReqBody, options: RawAxiosRequestConfig = {}): Promise => { - // verify required parameter 'banReqBody' is not null or undefined - assertParamExists('addBan', 'banReqBody', banReqBody) - const localVarPath = `/farcaster/ban`; - // use dummy base URL string because the URL constructor only accepts absolute URLs. - const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); - let baseOptions; - if (configuration) { - baseOptions = configuration.baseOptions; - } - - const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options}; - const localVarHeaderParameter = {} as any; - const localVarQueryParameter = {} as any; - - // authentication ApiKeyAuth required - await setApiKeyToObject(localVarHeaderParameter, "x-api-key", configuration) - - - - localVarHeaderParameter['Content-Type'] = 'application/json'; - - setSearchParams(localVarUrlObj, localVarQueryParameter); - let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; - localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; - localVarRequestOptions.data = serializeDataIfNeeded(banReqBody, localVarRequestOptions, configuration) - - return { - url: toPathString(localVarUrlObj), - options: localVarRequestOptions, - }; - }, - /** - * Fetches all FIDs that your app has banned. - * @summary Banned FIDs of app - * @param {number} [limit] Number of results to fetch (default 20, max 100). - * @param {string} [cursor] Pagination cursor. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - banList: async (limit?: number, cursor?: string, options: RawAxiosRequestConfig = {}): Promise => { - const localVarPath = `/farcaster/ban/list`; - // use dummy base URL string because the URL constructor only accepts absolute URLs. - const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); - let baseOptions; - if (configuration) { - baseOptions = configuration.baseOptions; - } - - const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; - const localVarHeaderParameter = {} as any; - const localVarQueryParameter = {} as any; - - // authentication ApiKeyAuth required - await setApiKeyToObject(localVarHeaderParameter, "x-api-key", configuration) - - if (limit !== undefined) { - localVarQueryParameter['limit'] = limit; - } - - if (cursor !== undefined) { - localVarQueryParameter['cursor'] = cursor; - } - - - - setSearchParams(localVarUrlObj, localVarQueryParameter); - let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; - localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; - - return { - url: toPathString(localVarUrlObj), - options: localVarRequestOptions, - }; - }, - /** - * Deletes a list of FIDs from the app associated with your API key. - * @summary Unban FIDs from app - * @param {BanReqBody} banReqBody - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - deleteBan: async (banReqBody: BanReqBody, options: RawAxiosRequestConfig = {}): Promise => { - // verify required parameter 'banReqBody' is not null or undefined - assertParamExists('deleteBan', 'banReqBody', banReqBody) - const localVarPath = `/farcaster/ban`; - // use dummy base URL string because the URL constructor only accepts absolute URLs. - const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); - let baseOptions; - if (configuration) { - baseOptions = configuration.baseOptions; - } - - const localVarRequestOptions = { method: 'DELETE', ...baseOptions, ...options}; - const localVarHeaderParameter = {} as any; - const localVarQueryParameter = {} as any; - - // authentication ApiKeyAuth required - await setApiKeyToObject(localVarHeaderParameter, "x-api-key", configuration) - - - - localVarHeaderParameter['Content-Type'] = 'application/json'; - - setSearchParams(localVarUrlObj, localVarQueryParameter); - let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; - localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; - localVarRequestOptions.data = serializeDataIfNeeded(banReqBody, localVarRequestOptions, configuration) - - return { - url: toPathString(localVarUrlObj), - options: localVarRequestOptions, - }; - }, - } -}; - -/** - * BanApi - functional programming interface - * @export - */ -export const BanApiFp = function(configuration?: Configuration) { - const localVarAxiosParamCreator = BanApiAxiosParamCreator(configuration) - return { - /** - * Bans a list of FIDs from the app associated with your API key. Banned users, their casts and reactions will not appear in feeds. - * @summary Ban FIDs from app - * @param {BanReqBody} banReqBody - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - async addBan(banReqBody: BanReqBody, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.addBan(banReqBody, options); - const localVarOperationServerIndex = configuration?.serverIndex ?? 0; - const localVarOperationServerBasePath = operationServerMap['BanApi.addBan']?.[localVarOperationServerIndex]?.url; - return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); - }, - /** - * Fetches all FIDs that your app has banned. - * @summary Banned FIDs of app - * @param {number} [limit] Number of results to fetch (default 20, max 100). - * @param {string} [cursor] Pagination cursor. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - async banList(limit?: number, cursor?: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.banList(limit, cursor, options); - const localVarOperationServerIndex = configuration?.serverIndex ?? 0; - const localVarOperationServerBasePath = operationServerMap['BanApi.banList']?.[localVarOperationServerIndex]?.url; - return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); - }, - /** - * Deletes a list of FIDs from the app associated with your API key. - * @summary Unban FIDs from app - * @param {BanReqBody} banReqBody - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - async deleteBan(banReqBody: BanReqBody, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.deleteBan(banReqBody, options); - const localVarOperationServerIndex = configuration?.serverIndex ?? 0; - const localVarOperationServerBasePath = operationServerMap['BanApi.deleteBan']?.[localVarOperationServerIndex]?.url; - return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); - }, - } -}; - -/** - * BanApi - factory interface - * @export - */ -export const BanApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) { - const localVarFp = BanApiFp(configuration) - return { - /** - * Bans a list of FIDs from the app associated with your API key. Banned users, their casts and reactions will not appear in feeds. - * @summary Ban FIDs from app - * @param {BanReqBody} banReqBody - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - addBan(banReqBody: BanReqBody, options?: RawAxiosRequestConfig): AxiosPromise { - return localVarFp.addBan(banReqBody, options).then((request) => request(axios, basePath)); - }, - /** - * Fetches all FIDs that your app has banned. - * @summary Banned FIDs of app - * @param {number} [limit] Number of results to fetch (default 20, max 100). - * @param {string} [cursor] Pagination cursor. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - banList(limit?: number, cursor?: string, options?: RawAxiosRequestConfig): AxiosPromise { - return localVarFp.banList(limit, cursor, options).then((request) => request(axios, basePath)); - }, - /** - * Deletes a list of FIDs from the app associated with your API key. - * @summary Unban FIDs from app - * @param {BanReqBody} banReqBody - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - deleteBan(banReqBody: BanReqBody, options?: RawAxiosRequestConfig): AxiosPromise { - return localVarFp.deleteBan(banReqBody, options).then((request) => request(axios, basePath)); - }, - }; -}; - -/** - * BanApi - object-oriented interface - * @export - * @class BanApi - * @extends {BaseAPI} - */ -export class BanApi extends BaseAPI { - /** - * Bans a list of FIDs from the app associated with your API key. Banned users, their casts and reactions will not appear in feeds. - * @summary Ban FIDs from app - * @param {BanReqBody} banReqBody - * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof BanApi - */ - public addBan(banReqBody: BanReqBody, options?: RawAxiosRequestConfig) { - return BanApiFp(this.configuration).addBan(banReqBody, options).then((request) => request(this.axios, this.basePath)); - } - - /** - * Fetches all FIDs that your app has banned. - * @summary Banned FIDs of app - * @param {number} [limit] Number of results to fetch (default 20, max 100). - * @param {string} [cursor] Pagination cursor. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof BanApi - */ - public banList(limit?: number, cursor?: string, options?: RawAxiosRequestConfig) { - return BanApiFp(this.configuration).banList(limit, cursor, options).then((request) => request(this.axios, this.basePath)); - } - - /** - * Deletes a list of FIDs from the app associated with your API key. - * @summary Unban FIDs from app - * @param {BanReqBody} banReqBody - * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof BanApi - */ - public deleteBan(banReqBody: BanReqBody, options?: RawAxiosRequestConfig) { - return BanApiFp(this.configuration).deleteBan(banReqBody, options).then((request) => request(this.axios, this.basePath)); - } -} - - - -/** - * BlockApi - axios parameter creator - * @export - */ -export const BlockApiAxiosParamCreator = function (configuration?: Configuration) { - return { - /** - * Fetches all FIDs that a user has blocked or has been blocked by - * @summary Blocked / Blocked by FIDs - * @param {number} [blockerFid] Providing this will return the users that this user has blocked - * @param {number} [blockedFid] Providing this will return the users that have blocked this user - * @param {number} [limit] Number of results to fetch (default 20, max 100). - * @param {string} [cursor] Pagination cursor. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - blockList: async (blockerFid?: number, blockedFid?: number, limit?: number, cursor?: string, options: RawAxiosRequestConfig = {}): Promise => { - const localVarPath = `/farcaster/block/list`; - // use dummy base URL string because the URL constructor only accepts absolute URLs. - const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); - let baseOptions; - if (configuration) { - baseOptions = configuration.baseOptions; - } - - const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; - const localVarHeaderParameter = {} as any; - const localVarQueryParameter = {} as any; - - // authentication ApiKeyAuth required - await setApiKeyToObject(localVarHeaderParameter, "x-api-key", configuration) - - if (blockerFid !== undefined) { - localVarQueryParameter['blocker_fid'] = blockerFid; - } - - if (blockedFid !== undefined) { - localVarQueryParameter['blocked_fid'] = blockedFid; - } - - if (limit !== undefined) { - localVarQueryParameter['limit'] = limit; - } - - if (cursor !== undefined) { - localVarQueryParameter['cursor'] = cursor; - } - - - - setSearchParams(localVarUrlObj, localVarQueryParameter); - let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; - localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; - - return { - url: toPathString(localVarUrlObj), - options: localVarRequestOptions, - }; - }, - } -}; - -/** - * BlockApi - functional programming interface - * @export - */ -export const BlockApiFp = function(configuration?: Configuration) { - const localVarAxiosParamCreator = BlockApiAxiosParamCreator(configuration) - return { - /** - * Fetches all FIDs that a user has blocked or has been blocked by - * @summary Blocked / Blocked by FIDs - * @param {number} [blockerFid] Providing this will return the users that this user has blocked - * @param {number} [blockedFid] Providing this will return the users that have blocked this user - * @param {number} [limit] Number of results to fetch (default 20, max 100). - * @param {string} [cursor] Pagination cursor. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - async blockList(blockerFid?: number, blockedFid?: number, limit?: number, cursor?: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.blockList(blockerFid, blockedFid, limit, cursor, options); - const localVarOperationServerIndex = configuration?.serverIndex ?? 0; - const localVarOperationServerBasePath = operationServerMap['BlockApi.blockList']?.[localVarOperationServerIndex]?.url; - return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); - }, - } -}; - -/** - * BlockApi - factory interface - * @export - */ -export const BlockApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) { - const localVarFp = BlockApiFp(configuration) - return { - /** - * Fetches all FIDs that a user has blocked or has been blocked by - * @summary Blocked / Blocked by FIDs - * @param {number} [blockerFid] Providing this will return the users that this user has blocked - * @param {number} [blockedFid] Providing this will return the users that have blocked this user - * @param {number} [limit] Number of results to fetch (default 20, max 100). - * @param {string} [cursor] Pagination cursor. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - blockList(blockerFid?: number, blockedFid?: number, limit?: number, cursor?: string, options?: RawAxiosRequestConfig): AxiosPromise { - return localVarFp.blockList(blockerFid, blockedFid, limit, cursor, options).then((request) => request(axios, basePath)); - }, - }; -}; - -/** - * BlockApi - object-oriented interface - * @export - * @class BlockApi - * @extends {BaseAPI} - */ -export class BlockApi extends BaseAPI { - /** - * Fetches all FIDs that a user has blocked or has been blocked by - * @summary Blocked / Blocked by FIDs - * @param {number} [blockerFid] Providing this will return the users that this user has blocked - * @param {number} [blockedFid] Providing this will return the users that have blocked this user - * @param {number} [limit] Number of results to fetch (default 20, max 100). - * @param {string} [cursor] Pagination cursor. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof BlockApi - */ - public blockList(blockerFid?: number, blockedFid?: number, limit?: number, cursor?: string, options?: RawAxiosRequestConfig) { - return BlockApiFp(this.configuration).blockList(blockerFid, blockedFid, limit, cursor, options).then((request) => request(this.axios, this.basePath)); - } -} - - - -/** - * CastApi - axios parameter creator - * @export - */ -export const CastApiAxiosParamCreator = function (configuration?: Configuration) { - return { - /** - * Gets information about an individual cast by passing in a Warpcast web URL or cast hash - * @summary By hash or URL - * @param {string} identifier Cast identifier (Its either a url or a hash) - * @param {CastParamType} type - * @param {number} [viewerFid] adds viewer_context to cast object to show whether viewer has liked or recasted the cast. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - cast: async (identifier: string, type: CastParamType, viewerFid?: number, options: RawAxiosRequestConfig = {}): Promise => { - // verify required parameter 'identifier' is not null or undefined - assertParamExists('cast', 'identifier', identifier) - // verify required parameter 'type' is not null or undefined - assertParamExists('cast', 'type', type) - const localVarPath = `/farcaster/cast`; - // use dummy base URL string because the URL constructor only accepts absolute URLs. - const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); - let baseOptions; - if (configuration) { - baseOptions = configuration.baseOptions; - } - - const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; - const localVarHeaderParameter = {} as any; - const localVarQueryParameter = {} as any; - - // authentication ApiKeyAuth required - await setApiKeyToObject(localVarHeaderParameter, "x-api-key", configuration) - - if (identifier !== undefined) { - localVarQueryParameter['identifier'] = identifier; - } - - if (type !== undefined) { - localVarQueryParameter['type'] = type; - } - - if (viewerFid !== undefined) { - localVarQueryParameter['viewer_fid'] = viewerFid; - } - - - - setSearchParams(localVarUrlObj, localVarQueryParameter); - let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; - localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; - - return { - url: toPathString(localVarUrlObj), - options: localVarRequestOptions, - }; - }, - /** - * Gets all casts related to a conversation surrounding a cast by passing in a cast hash or Warpcast URL. Includes all the ancestors of a cast up to the root parent in a chronological order. Includes all direct_replies to the cast up to the reply_depth specified in the query parameter. - * @summary Conversation for a cast - * @param {string} identifier Cast identifier (Its either a url or a hash) - * @param {CastParamType} type - * @param {number} [replyDepth] The depth of replies in the conversation that will be returned (default 2) - * @param {boolean} [includeChronologicalParentCasts] Include all parent casts in chronological order - * @param {number} [viewerFid] Providing this will return a conversation that respects this user\'s mutes and blocks and includes `viewer_context`. - * @param {CastConversationSortType} [sortType] Sort type for the ordering of descendants. Default is `chron` - * @param {CastConversationFoldEnum} [fold] Show conversation above or below the fold. Lower quality responses are hidden below the fold. Not passing in a value shows the full conversation without any folding. - * @param {number} [limit] Number of results to fetch (default 20, max 50) - * @param {string} [cursor] Pagination cursor. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - castConversation: async (identifier: string, type: CastParamType, replyDepth?: number, includeChronologicalParentCasts?: boolean, viewerFid?: number, sortType?: CastConversationSortType, fold?: CastConversationFoldEnum, limit?: number, cursor?: string, options: RawAxiosRequestConfig = {}): Promise => { - // verify required parameter 'identifier' is not null or undefined - assertParamExists('castConversation', 'identifier', identifier) - // verify required parameter 'type' is not null or undefined - assertParamExists('castConversation', 'type', type) - const localVarPath = `/farcaster/cast/conversation`; - // use dummy base URL string because the URL constructor only accepts absolute URLs. - const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); - let baseOptions; - if (configuration) { - baseOptions = configuration.baseOptions; - } - - const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; - const localVarHeaderParameter = {} as any; - const localVarQueryParameter = {} as any; - - // authentication ApiKeyAuth required - await setApiKeyToObject(localVarHeaderParameter, "x-api-key", configuration) - - if (identifier !== undefined) { - localVarQueryParameter['identifier'] = identifier; - } - - if (type !== undefined) { - localVarQueryParameter['type'] = type; - } - - if (replyDepth !== undefined) { - localVarQueryParameter['reply_depth'] = replyDepth; - } - - if (includeChronologicalParentCasts !== undefined) { - localVarQueryParameter['include_chronological_parent_casts'] = includeChronologicalParentCasts; - } - - if (viewerFid !== undefined) { - localVarQueryParameter['viewer_fid'] = viewerFid; - } - - if (sortType !== undefined) { - localVarQueryParameter['sort_type'] = sortType; - } - - if (fold !== undefined) { - localVarQueryParameter['fold'] = fold; - } - - if (limit !== undefined) { - localVarQueryParameter['limit'] = limit; - } - - if (cursor !== undefined) { - localVarQueryParameter['cursor'] = cursor; - } - - - - setSearchParams(localVarUrlObj, localVarQueryParameter); - let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; - localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; - - return { - url: toPathString(localVarUrlObj), - options: localVarRequestOptions, - }; - }, - /** - * Search for casts based on a query string, with optional AND filters - * @summary Search for casts - * @param {string} q Query string to search for casts - * @param {number} [authorFid] Fid of the user whose casts you want to search - * @param {number} [viewerFid] Providing this will return search results that respects this user\'s mutes and blocks and includes `viewer_context`. - * @param {string} [parentUrl] Parent URL of the casts you want to search - * @param {string} [channelId] Channel ID of the casts you want to search - * @param {boolean} [priorityMode] When true, only returns search results from power badge users and users that the viewer follows (if viewer_fid is provided). - * @param {number} [limit] - * @param {string} [cursor] Pagination cursor - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - castSearch: async (q: string, authorFid?: number, viewerFid?: number, parentUrl?: string, channelId?: string, priorityMode?: boolean, limit?: number, cursor?: string, options: RawAxiosRequestConfig = {}): Promise => { - // verify required parameter 'q' is not null or undefined - assertParamExists('castSearch', 'q', q) - const localVarPath = `/farcaster/cast/search`; - // use dummy base URL string because the URL constructor only accepts absolute URLs. - const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); - let baseOptions; - if (configuration) { - baseOptions = configuration.baseOptions; - } - - const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; - const localVarHeaderParameter = {} as any; - const localVarQueryParameter = {} as any; - - // authentication ApiKeyAuth required - await setApiKeyToObject(localVarHeaderParameter, "x-api-key", configuration) - - if (q !== undefined) { - localVarQueryParameter['q'] = q; - } - - if (authorFid !== undefined) { - localVarQueryParameter['author_fid'] = authorFid; - } - - if (viewerFid !== undefined) { - localVarQueryParameter['viewer_fid'] = viewerFid; - } - - if (parentUrl !== undefined) { - localVarQueryParameter['parent_url'] = parentUrl; - } - - if (channelId !== undefined) { - localVarQueryParameter['channel_id'] = channelId; - } - - if (priorityMode !== undefined) { - localVarQueryParameter['priority_mode'] = priorityMode; - } - - if (limit !== undefined) { - localVarQueryParameter['limit'] = limit; - } - - if (cursor !== undefined) { - localVarQueryParameter['cursor'] = cursor; - } - - - - setSearchParams(localVarUrlObj, localVarQueryParameter); - let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; - localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; - - return { - url: toPathString(localVarUrlObj), - options: localVarRequestOptions, - }; - }, - /** - * Fetch multiple casts using their respective hashes. - * @summary Bulk fetch casts - * @param {string} casts Hashes of the cast to be retrived (Comma separated, no spaces) - * @param {number} [viewerFid] adds viewer_context to cast object to show whether viewer has liked or recasted the cast. - * @param {CastsSortTypeEnum} [sortType] Optional parameter to sort the casts based on different criteria - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - casts: async (casts: string, viewerFid?: number, sortType?: CastsSortTypeEnum, options: RawAxiosRequestConfig = {}): Promise => { - // verify required parameter 'casts' is not null or undefined - assertParamExists('casts', 'casts', casts) - const localVarPath = `/farcaster/casts`; - // use dummy base URL string because the URL constructor only accepts absolute URLs. - const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); - let baseOptions; - if (configuration) { - baseOptions = configuration.baseOptions; - } - - const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; - const localVarHeaderParameter = {} as any; - const localVarQueryParameter = {} as any; - - // authentication ApiKeyAuth required - await setApiKeyToObject(localVarHeaderParameter, "x-api-key", configuration) - - if (casts !== undefined) { - localVarQueryParameter['casts'] = casts; - } - - if (viewerFid !== undefined) { - localVarQueryParameter['viewer_fid'] = viewerFid; - } - - if (sortType !== undefined) { - localVarQueryParameter['sort_type'] = sortType; - } - - - - setSearchParams(localVarUrlObj, localVarQueryParameter); - let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; - localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; - - return { - url: toPathString(localVarUrlObj), - options: localVarRequestOptions, - }; - }, - /** - * Fetches all composer actions on Warpcast. You can filter by top or featured. - * @summary Fetch composer actions - * @param {CastComposerType} list Type of list to fetch. - * @param {number} [limit] Number of results to fetch (default 25, max 25). - * @param {string} [cursor] Pagination cursor. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - composerList: async (list: CastComposerType, limit?: number, cursor?: string, options: RawAxiosRequestConfig = {}): Promise => { - // verify required parameter 'list' is not null or undefined - assertParamExists('composerList', 'list', list) - const localVarPath = `/farcaster/cast/composer_actions/list`; - // use dummy base URL string because the URL constructor only accepts absolute URLs. - const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); - let baseOptions; - if (configuration) { - baseOptions = configuration.baseOptions; - } - - const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; - const localVarHeaderParameter = {} as any; - const localVarQueryParameter = {} as any; - - // authentication ApiKeyAuth required - await setApiKeyToObject(localVarHeaderParameter, "x-api-key", configuration) - - if (list !== undefined) { - localVarQueryParameter['list'] = list; - } - - if (limit !== undefined) { - localVarQueryParameter['limit'] = limit; - } - - if (cursor !== undefined) { - localVarQueryParameter['cursor'] = cursor; - } - - - - setSearchParams(localVarUrlObj, localVarQueryParameter); - let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; - localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; - - return { - url: toPathString(localVarUrlObj), - options: localVarRequestOptions, - }; - }, - /** - * Delete an existing cast. \\ (In order to delete a cast `signer_uuid` must be approved) - * @summary Delete a cast - * @param {DeleteCastReqBody} deleteCastReqBody - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - deleteCast: async (deleteCastReqBody: DeleteCastReqBody, options: RawAxiosRequestConfig = {}): Promise => { - // verify required parameter 'deleteCastReqBody' is not null or undefined - assertParamExists('deleteCast', 'deleteCastReqBody', deleteCastReqBody) - const localVarPath = `/farcaster/cast`; - // use dummy base URL string because the URL constructor only accepts absolute URLs. - const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); - let baseOptions; - if (configuration) { - baseOptions = configuration.baseOptions; - } - - const localVarRequestOptions = { method: 'DELETE', ...baseOptions, ...options}; - const localVarHeaderParameter = {} as any; - const localVarQueryParameter = {} as any; - - // authentication ApiKeyAuth required - await setApiKeyToObject(localVarHeaderParameter, "x-api-key", configuration) - - - - localVarHeaderParameter['Content-Type'] = 'application/json'; - - setSearchParams(localVarUrlObj, localVarQueryParameter); - let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; - localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; - localVarRequestOptions.data = serializeDataIfNeeded(deleteCastReqBody, localVarRequestOptions, configuration) - - return { - url: toPathString(localVarUrlObj), - options: localVarRequestOptions, - }; - }, - /** - * Posts a cast or cast reply. Works with mentions and embeds. (In order to post a cast `signer_uuid` must be approved) - * @summary Post a cast - * @param {PostCastReqBody} postCastReqBody - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - postCast: async (postCastReqBody: PostCastReqBody, options: RawAxiosRequestConfig = {}): Promise => { - // verify required parameter 'postCastReqBody' is not null or undefined - assertParamExists('postCast', 'postCastReqBody', postCastReqBody) - const localVarPath = `/farcaster/cast`; - // use dummy base URL string because the URL constructor only accepts absolute URLs. - const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); - let baseOptions; - if (configuration) { - baseOptions = configuration.baseOptions; - } - - const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options}; - const localVarHeaderParameter = {} as any; - const localVarQueryParameter = {} as any; - - // authentication ApiKeyAuth required - await setApiKeyToObject(localVarHeaderParameter, "x-api-key", configuration) - - - - localVarHeaderParameter['Content-Type'] = 'application/json'; - - setSearchParams(localVarUrlObj, localVarQueryParameter); - let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; - localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; - localVarRequestOptions.data = serializeDataIfNeeded(postCastReqBody, localVarRequestOptions, configuration) - - return { - url: toPathString(localVarUrlObj), - options: localVarRequestOptions, - }; - }, - } -}; - -/** - * CastApi - functional programming interface - * @export - */ -export const CastApiFp = function(configuration?: Configuration) { - const localVarAxiosParamCreator = CastApiAxiosParamCreator(configuration) - return { - /** - * Gets information about an individual cast by passing in a Warpcast web URL or cast hash - * @summary By hash or URL - * @param {string} identifier Cast identifier (Its either a url or a hash) - * @param {CastParamType} type - * @param {number} [viewerFid] adds viewer_context to cast object to show whether viewer has liked or recasted the cast. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - async cast(identifier: string, type: CastParamType, viewerFid?: number, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.cast(identifier, type, viewerFid, options); - const localVarOperationServerIndex = configuration?.serverIndex ?? 0; - const localVarOperationServerBasePath = operationServerMap['CastApi.cast']?.[localVarOperationServerIndex]?.url; - return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); - }, - /** - * Gets all casts related to a conversation surrounding a cast by passing in a cast hash or Warpcast URL. Includes all the ancestors of a cast up to the root parent in a chronological order. Includes all direct_replies to the cast up to the reply_depth specified in the query parameter. - * @summary Conversation for a cast - * @param {string} identifier Cast identifier (Its either a url or a hash) - * @param {CastParamType} type - * @param {number} [replyDepth] The depth of replies in the conversation that will be returned (default 2) - * @param {boolean} [includeChronologicalParentCasts] Include all parent casts in chronological order - * @param {number} [viewerFid] Providing this will return a conversation that respects this user\'s mutes and blocks and includes `viewer_context`. - * @param {CastConversationSortType} [sortType] Sort type for the ordering of descendants. Default is `chron` - * @param {CastConversationFoldEnum} [fold] Show conversation above or below the fold. Lower quality responses are hidden below the fold. Not passing in a value shows the full conversation without any folding. - * @param {number} [limit] Number of results to fetch (default 20, max 50) - * @param {string} [cursor] Pagination cursor. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - async castConversation(identifier: string, type: CastParamType, replyDepth?: number, includeChronologicalParentCasts?: boolean, viewerFid?: number, sortType?: CastConversationSortType, fold?: CastConversationFoldEnum, limit?: number, cursor?: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.castConversation(identifier, type, replyDepth, includeChronologicalParentCasts, viewerFid, sortType, fold, limit, cursor, options); - const localVarOperationServerIndex = configuration?.serverIndex ?? 0; - const localVarOperationServerBasePath = operationServerMap['CastApi.castConversation']?.[localVarOperationServerIndex]?.url; - return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); - }, - /** - * Search for casts based on a query string, with optional AND filters - * @summary Search for casts - * @param {string} q Query string to search for casts - * @param {number} [authorFid] Fid of the user whose casts you want to search - * @param {number} [viewerFid] Providing this will return search results that respects this user\'s mutes and blocks and includes `viewer_context`. - * @param {string} [parentUrl] Parent URL of the casts you want to search - * @param {string} [channelId] Channel ID of the casts you want to search - * @param {boolean} [priorityMode] When true, only returns search results from power badge users and users that the viewer follows (if viewer_fid is provided). - * @param {number} [limit] - * @param {string} [cursor] Pagination cursor - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - async castSearch(q: string, authorFid?: number, viewerFid?: number, parentUrl?: string, channelId?: string, priorityMode?: boolean, limit?: number, cursor?: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.castSearch(q, authorFid, viewerFid, parentUrl, channelId, priorityMode, limit, cursor, options); - const localVarOperationServerIndex = configuration?.serverIndex ?? 0; - const localVarOperationServerBasePath = operationServerMap['CastApi.castSearch']?.[localVarOperationServerIndex]?.url; - return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); - }, - /** - * Fetch multiple casts using their respective hashes. - * @summary Bulk fetch casts - * @param {string} casts Hashes of the cast to be retrived (Comma separated, no spaces) - * @param {number} [viewerFid] adds viewer_context to cast object to show whether viewer has liked or recasted the cast. - * @param {CastsSortTypeEnum} [sortType] Optional parameter to sort the casts based on different criteria - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - async casts(casts: string, viewerFid?: number, sortType?: CastsSortTypeEnum, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.casts(casts, viewerFid, sortType, options); - const localVarOperationServerIndex = configuration?.serverIndex ?? 0; - const localVarOperationServerBasePath = operationServerMap['CastApi.casts']?.[localVarOperationServerIndex]?.url; - return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); - }, - /** - * Fetches all composer actions on Warpcast. You can filter by top or featured. - * @summary Fetch composer actions - * @param {CastComposerType} list Type of list to fetch. - * @param {number} [limit] Number of results to fetch (default 25, max 25). - * @param {string} [cursor] Pagination cursor. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - async composerList(list: CastComposerType, limit?: number, cursor?: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.composerList(list, limit, cursor, options); - const localVarOperationServerIndex = configuration?.serverIndex ?? 0; - const localVarOperationServerBasePath = operationServerMap['CastApi.composerList']?.[localVarOperationServerIndex]?.url; - return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); - }, - /** - * Delete an existing cast. \\ (In order to delete a cast `signer_uuid` must be approved) - * @summary Delete a cast - * @param {DeleteCastReqBody} deleteCastReqBody - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - async deleteCast(deleteCastReqBody: DeleteCastReqBody, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.deleteCast(deleteCastReqBody, options); - const localVarOperationServerIndex = configuration?.serverIndex ?? 0; - const localVarOperationServerBasePath = operationServerMap['CastApi.deleteCast']?.[localVarOperationServerIndex]?.url; - return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); - }, - /** - * Posts a cast or cast reply. Works with mentions and embeds. (In order to post a cast `signer_uuid` must be approved) - * @summary Post a cast - * @param {PostCastReqBody} postCastReqBody - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - async postCast(postCastReqBody: PostCastReqBody, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.postCast(postCastReqBody, options); - const localVarOperationServerIndex = configuration?.serverIndex ?? 0; - const localVarOperationServerBasePath = operationServerMap['CastApi.postCast']?.[localVarOperationServerIndex]?.url; - return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); - }, - } -}; - -/** - * CastApi - factory interface - * @export - */ -export const CastApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) { - const localVarFp = CastApiFp(configuration) - return { - /** - * Gets information about an individual cast by passing in a Warpcast web URL or cast hash - * @summary By hash or URL - * @param {string} identifier Cast identifier (Its either a url or a hash) - * @param {CastParamType} type - * @param {number} [viewerFid] adds viewer_context to cast object to show whether viewer has liked or recasted the cast. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - cast(identifier: string, type: CastParamType, viewerFid?: number, options?: RawAxiosRequestConfig): AxiosPromise { - return localVarFp.cast(identifier, type, viewerFid, options).then((request) => request(axios, basePath)); - }, - /** - * Gets all casts related to a conversation surrounding a cast by passing in a cast hash or Warpcast URL. Includes all the ancestors of a cast up to the root parent in a chronological order. Includes all direct_replies to the cast up to the reply_depth specified in the query parameter. - * @summary Conversation for a cast - * @param {string} identifier Cast identifier (Its either a url or a hash) - * @param {CastParamType} type - * @param {number} [replyDepth] The depth of replies in the conversation that will be returned (default 2) - * @param {boolean} [includeChronologicalParentCasts] Include all parent casts in chronological order - * @param {number} [viewerFid] Providing this will return a conversation that respects this user\'s mutes and blocks and includes `viewer_context`. - * @param {CastConversationSortType} [sortType] Sort type for the ordering of descendants. Default is `chron` - * @param {CastConversationFoldEnum} [fold] Show conversation above or below the fold. Lower quality responses are hidden below the fold. Not passing in a value shows the full conversation without any folding. - * @param {number} [limit] Number of results to fetch (default 20, max 50) - * @param {string} [cursor] Pagination cursor. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - castConversation(identifier: string, type: CastParamType, replyDepth?: number, includeChronologicalParentCasts?: boolean, viewerFid?: number, sortType?: CastConversationSortType, fold?: CastConversationFoldEnum, limit?: number, cursor?: string, options?: RawAxiosRequestConfig): AxiosPromise { - return localVarFp.castConversation(identifier, type, replyDepth, includeChronologicalParentCasts, viewerFid, sortType, fold, limit, cursor, options).then((request) => request(axios, basePath)); - }, - /** - * Search for casts based on a query string, with optional AND filters - * @summary Search for casts - * @param {string} q Query string to search for casts - * @param {number} [authorFid] Fid of the user whose casts you want to search - * @param {number} [viewerFid] Providing this will return search results that respects this user\'s mutes and blocks and includes `viewer_context`. - * @param {string} [parentUrl] Parent URL of the casts you want to search - * @param {string} [channelId] Channel ID of the casts you want to search - * @param {boolean} [priorityMode] When true, only returns search results from power badge users and users that the viewer follows (if viewer_fid is provided). - * @param {number} [limit] - * @param {string} [cursor] Pagination cursor - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - castSearch(q: string, authorFid?: number, viewerFid?: number, parentUrl?: string, channelId?: string, priorityMode?: boolean, limit?: number, cursor?: string, options?: RawAxiosRequestConfig): AxiosPromise { - return localVarFp.castSearch(q, authorFid, viewerFid, parentUrl, channelId, priorityMode, limit, cursor, options).then((request) => request(axios, basePath)); - }, - /** - * Fetch multiple casts using their respective hashes. - * @summary Bulk fetch casts - * @param {string} casts Hashes of the cast to be retrived (Comma separated, no spaces) - * @param {number} [viewerFid] adds viewer_context to cast object to show whether viewer has liked or recasted the cast. - * @param {CastsSortTypeEnum} [sortType] Optional parameter to sort the casts based on different criteria - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - casts(casts: string, viewerFid?: number, sortType?: CastsSortTypeEnum, options?: RawAxiosRequestConfig): AxiosPromise { - return localVarFp.casts(casts, viewerFid, sortType, options).then((request) => request(axios, basePath)); - }, - /** - * Fetches all composer actions on Warpcast. You can filter by top or featured. - * @summary Fetch composer actions - * @param {CastComposerType} list Type of list to fetch. - * @param {number} [limit] Number of results to fetch (default 25, max 25). - * @param {string} [cursor] Pagination cursor. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - composerList(list: CastComposerType, limit?: number, cursor?: string, options?: RawAxiosRequestConfig): AxiosPromise { - return localVarFp.composerList(list, limit, cursor, options).then((request) => request(axios, basePath)); - }, - /** - * Delete an existing cast. \\ (In order to delete a cast `signer_uuid` must be approved) - * @summary Delete a cast - * @param {DeleteCastReqBody} deleteCastReqBody - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - deleteCast(deleteCastReqBody: DeleteCastReqBody, options?: RawAxiosRequestConfig): AxiosPromise { - return localVarFp.deleteCast(deleteCastReqBody, options).then((request) => request(axios, basePath)); - }, - /** - * Posts a cast or cast reply. Works with mentions and embeds. (In order to post a cast `signer_uuid` must be approved) - * @summary Post a cast - * @param {PostCastReqBody} postCastReqBody - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - postCast(postCastReqBody: PostCastReqBody, options?: RawAxiosRequestConfig): AxiosPromise { - return localVarFp.postCast(postCastReqBody, options).then((request) => request(axios, basePath)); - }, - }; -}; - -/** - * CastApi - object-oriented interface - * @export - * @class CastApi - * @extends {BaseAPI} - */ -export class CastApi extends BaseAPI { - /** - * Gets information about an individual cast by passing in a Warpcast web URL or cast hash - * @summary By hash or URL - * @param {string} identifier Cast identifier (Its either a url or a hash) - * @param {CastParamType} type - * @param {number} [viewerFid] adds viewer_context to cast object to show whether viewer has liked or recasted the cast. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof CastApi - */ - public cast(identifier: string, type: CastParamType, viewerFid?: number, options?: RawAxiosRequestConfig) { - return CastApiFp(this.configuration).cast(identifier, type, viewerFid, options).then((request) => request(this.axios, this.basePath)); - } - - /** - * Gets all casts related to a conversation surrounding a cast by passing in a cast hash or Warpcast URL. Includes all the ancestors of a cast up to the root parent in a chronological order. Includes all direct_replies to the cast up to the reply_depth specified in the query parameter. - * @summary Conversation for a cast - * @param {string} identifier Cast identifier (Its either a url or a hash) - * @param {CastParamType} type - * @param {number} [replyDepth] The depth of replies in the conversation that will be returned (default 2) - * @param {boolean} [includeChronologicalParentCasts] Include all parent casts in chronological order - * @param {number} [viewerFid] Providing this will return a conversation that respects this user\'s mutes and blocks and includes `viewer_context`. - * @param {CastConversationSortType} [sortType] Sort type for the ordering of descendants. Default is `chron` - * @param {CastConversationFoldEnum} [fold] Show conversation above or below the fold. Lower quality responses are hidden below the fold. Not passing in a value shows the full conversation without any folding. - * @param {number} [limit] Number of results to fetch (default 20, max 50) - * @param {string} [cursor] Pagination cursor. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof CastApi - */ - public castConversation(identifier: string, type: CastParamType, replyDepth?: number, includeChronologicalParentCasts?: boolean, viewerFid?: number, sortType?: CastConversationSortType, fold?: CastConversationFoldEnum, limit?: number, cursor?: string, options?: RawAxiosRequestConfig) { - return CastApiFp(this.configuration).castConversation(identifier, type, replyDepth, includeChronologicalParentCasts, viewerFid, sortType, fold, limit, cursor, options).then((request) => request(this.axios, this.basePath)); - } - - /** - * Search for casts based on a query string, with optional AND filters - * @summary Search for casts - * @param {string} q Query string to search for casts - * @param {number} [authorFid] Fid of the user whose casts you want to search - * @param {number} [viewerFid] Providing this will return search results that respects this user\'s mutes and blocks and includes `viewer_context`. - * @param {string} [parentUrl] Parent URL of the casts you want to search - * @param {string} [channelId] Channel ID of the casts you want to search - * @param {boolean} [priorityMode] When true, only returns search results from power badge users and users that the viewer follows (if viewer_fid is provided). - * @param {number} [limit] - * @param {string} [cursor] Pagination cursor - * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof CastApi - */ - public castSearch(q: string, authorFid?: number, viewerFid?: number, parentUrl?: string, channelId?: string, priorityMode?: boolean, limit?: number, cursor?: string, options?: RawAxiosRequestConfig) { - return CastApiFp(this.configuration).castSearch(q, authorFid, viewerFid, parentUrl, channelId, priorityMode, limit, cursor, options).then((request) => request(this.axios, this.basePath)); - } - - /** - * Fetch multiple casts using their respective hashes. - * @summary Bulk fetch casts - * @param {string} casts Hashes of the cast to be retrived (Comma separated, no spaces) - * @param {number} [viewerFid] adds viewer_context to cast object to show whether viewer has liked or recasted the cast. - * @param {CastsSortTypeEnum} [sortType] Optional parameter to sort the casts based on different criteria - * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof CastApi - */ - public casts(casts: string, viewerFid?: number, sortType?: CastsSortTypeEnum, options?: RawAxiosRequestConfig) { - return CastApiFp(this.configuration).casts(casts, viewerFid, sortType, options).then((request) => request(this.axios, this.basePath)); - } - - /** - * Fetches all composer actions on Warpcast. You can filter by top or featured. - * @summary Fetch composer actions - * @param {CastComposerType} list Type of list to fetch. - * @param {number} [limit] Number of results to fetch (default 25, max 25). - * @param {string} [cursor] Pagination cursor. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof CastApi - */ - public composerList(list: CastComposerType, limit?: number, cursor?: string, options?: RawAxiosRequestConfig) { - return CastApiFp(this.configuration).composerList(list, limit, cursor, options).then((request) => request(this.axios, this.basePath)); - } - - /** - * Delete an existing cast. \\ (In order to delete a cast `signer_uuid` must be approved) - * @summary Delete a cast - * @param {DeleteCastReqBody} deleteCastReqBody - * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof CastApi - */ - public deleteCast(deleteCastReqBody: DeleteCastReqBody, options?: RawAxiosRequestConfig) { - return CastApiFp(this.configuration).deleteCast(deleteCastReqBody, options).then((request) => request(this.axios, this.basePath)); - } - - /** - * Posts a cast or cast reply. Works with mentions and embeds. (In order to post a cast `signer_uuid` must be approved) - * @summary Post a cast - * @param {PostCastReqBody} postCastReqBody - * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof CastApi - */ - public postCast(postCastReqBody: PostCastReqBody, options?: RawAxiosRequestConfig) { - return CastApiFp(this.configuration).postCast(postCastReqBody, options).then((request) => request(this.axios, this.basePath)); - } -} - -/** - * @export - */ -export const CastConversationFoldEnum = { - Above: 'above', - Below: 'below' -} as const; -export type CastConversationFoldEnum = typeof CastConversationFoldEnum[keyof typeof CastConversationFoldEnum]; -/** - * @export - */ -export const CastsSortTypeEnum = { - Trending: 'trending', - Likes: 'likes', - Recasts: 'recasts', - Replies: 'replies', - Recent: 'recent' -} as const; -export type CastsSortTypeEnum = typeof CastsSortTypeEnum[keyof typeof CastsSortTypeEnum]; - - -/** - * ChannelApi - axios parameter creator - * @export - */ -export const ChannelApiAxiosParamCreator = function (configuration?: Configuration) { - return { - /** - * Fetches all channels that a user has casted in, in reverse chronological order. - * @summary Fetch channels that user is active in - * @param {number} fid The user\'s FID (identifier) - * @param {number} [limit] Number of results to fetch (default 20, max 100). - * @param {string} [cursor] Pagination cursor. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - activeChannels: async (fid: number, limit?: number, cursor?: string, options: RawAxiosRequestConfig = {}): Promise => { - // verify required parameter 'fid' is not null or undefined - assertParamExists('activeChannels', 'fid', fid) - const localVarPath = `/farcaster/channel/user`; - // use dummy base URL string because the URL constructor only accepts absolute URLs. - const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); - let baseOptions; - if (configuration) { - baseOptions = configuration.baseOptions; - } - - const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; - const localVarHeaderParameter = {} as any; - const localVarQueryParameter = {} as any; - - // authentication ApiKeyAuth required - await setApiKeyToObject(localVarHeaderParameter, "x-api-key", configuration) - - if (fid !== undefined) { - localVarQueryParameter['fid'] = fid; - } - - if (limit !== undefined) { - localVarQueryParameter['limit'] = limit; - } - - if (cursor !== undefined) { - localVarQueryParameter['cursor'] = cursor; - } - - - - setSearchParams(localVarUrlObj, localVarQueryParameter); - let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; - localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; - - return { - url: toPathString(localVarUrlObj), - options: localVarRequestOptions, - }; - }, - /** - * Returns details of a channel - * @summary By ID or parent_url - * @param {string} id Channel ID for the channel being queried - * @param {ChannelType} [type] Type of identifier being used to query the channel. Defaults to ID. - * @param {number} [viewerFid] FID of the user viewing the channel. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - channelDetails: async (id: string, type?: ChannelType, viewerFid?: number, options: RawAxiosRequestConfig = {}): Promise => { - // verify required parameter 'id' is not null or undefined - assertParamExists('channelDetails', 'id', id) - const localVarPath = `/farcaster/channel`; - // use dummy base URL string because the URL constructor only accepts absolute URLs. - const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); - let baseOptions; - if (configuration) { - baseOptions = configuration.baseOptions; - } - - const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; - const localVarHeaderParameter = {} as any; - const localVarQueryParameter = {} as any; - - // authentication ApiKeyAuth required - await setApiKeyToObject(localVarHeaderParameter, "x-api-key", configuration) - - if (id !== undefined) { - localVarQueryParameter['id'] = id; - } - - if (type !== undefined) { - localVarQueryParameter['type'] = type; - } - - if (viewerFid !== undefined) { - localVarQueryParameter['viewer_fid'] = viewerFid; - } - - - - setSearchParams(localVarUrlObj, localVarQueryParameter); - let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; - localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; - - return { - url: toPathString(localVarUrlObj), - options: localVarRequestOptions, - }; - }, - /** - * Returns details of multiple channels - * @summary Bulk fetch - * @param {string} ids Comma separated list of channel IDs or parent_urls, up to 100 at a time - * @param {ChannelType} [type] Type of identifier being used to query the channels. Defaults to ID. - * @param {number} [viewerFid] FID of the user viewing the channels. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - channelDetailsBulk: async (ids: string, type?: ChannelType, viewerFid?: number, options: RawAxiosRequestConfig = {}): Promise => { - // verify required parameter 'ids' is not null or undefined - assertParamExists('channelDetailsBulk', 'ids', ids) - const localVarPath = `/farcaster/channel/bulk`; - // use dummy base URL string because the URL constructor only accepts absolute URLs. - const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); - let baseOptions; - if (configuration) { - baseOptions = configuration.baseOptions; - } - - const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; - const localVarHeaderParameter = {} as any; - const localVarQueryParameter = {} as any; - - // authentication ApiKeyAuth required - await setApiKeyToObject(localVarHeaderParameter, "x-api-key", configuration) - - if (ids !== undefined) { - localVarQueryParameter['ids'] = ids; - } - - if (type !== undefined) { - localVarQueryParameter['type'] = type; - } - - if (viewerFid !== undefined) { - localVarQueryParameter['viewer_fid'] = viewerFid; - } - - - - setSearchParams(localVarUrlObj, localVarQueryParameter); - let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; - localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; - - return { - url: toPathString(localVarUrlObj), - options: localVarRequestOptions, - }; - }, - /** - * Returns a list of followers for a specific channel. Max limit is 1000. Use cursor for pagination. - * @summary For channel - * @param {string} id Channel ID for the channel being queried - * @param {number} [viewerFid] Providing this will return a list of followers that respects this user\'s mutes and blocks and includes `viewer_context`. - * @param {string} [cursor] Pagination cursor. - * @param {number} [limit] Number of followers to fetch (default 25, max 1000) - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - channelFollowers: async (id: string, viewerFid?: number, cursor?: string, limit?: number, options: RawAxiosRequestConfig = {}): Promise => { - // verify required parameter 'id' is not null or undefined - assertParamExists('channelFollowers', 'id', id) - const localVarPath = `/farcaster/channel/followers`; - // use dummy base URL string because the URL constructor only accepts absolute URLs. - const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); - let baseOptions; - if (configuration) { - baseOptions = configuration.baseOptions; - } - - const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; - const localVarHeaderParameter = {} as any; - const localVarQueryParameter = {} as any; - - // authentication ApiKeyAuth required - await setApiKeyToObject(localVarHeaderParameter, "x-api-key", configuration) - - if (id !== undefined) { - localVarQueryParameter['id'] = id; - } - - if (viewerFid !== undefined) { - localVarQueryParameter['viewer_fid'] = viewerFid; - } - - if (cursor !== undefined) { - localVarQueryParameter['cursor'] = cursor; - } - - if (limit !== undefined) { - localVarQueryParameter['limit'] = limit; - } - - - - setSearchParams(localVarUrlObj, localVarQueryParameter); - let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; - localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; - - return { - url: toPathString(localVarUrlObj), - options: localVarRequestOptions, - }; - }, - /** - * Returns a list of users who are active in a given channel, ordered by ascending FIDs - * @summary Fetch users who are active in a channel - * @param {string} id Channel ID for the channel being queried - * @param {boolean} hasRootCastAuthors Include users who posted the root cast in the channel - * @param {boolean} [hasCastLikers] Include users who liked a cast in the channel - * @param {boolean} [hasCastRecasters] Include users who recasted a cast in the channel - * @param {boolean} [hasReplyAuthors] Include users who replied to a cast in the channel - * @param {string} [cursor] Pagination cursor. - * @param {number} [limit] Number of results to fetch (default 25, max 100) - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - channelUsers: async (id: string, hasRootCastAuthors: boolean, hasCastLikers?: boolean, hasCastRecasters?: boolean, hasReplyAuthors?: boolean, cursor?: string, limit?: number, options: RawAxiosRequestConfig = {}): Promise => { - // verify required parameter 'id' is not null or undefined - assertParamExists('channelUsers', 'id', id) - // verify required parameter 'hasRootCastAuthors' is not null or undefined - assertParamExists('channelUsers', 'hasRootCastAuthors', hasRootCastAuthors) - const localVarPath = `/farcaster/channel/users`; - // use dummy base URL string because the URL constructor only accepts absolute URLs. - const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); - let baseOptions; - if (configuration) { - baseOptions = configuration.baseOptions; - } - - const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; - const localVarHeaderParameter = {} as any; - const localVarQueryParameter = {} as any; - - // authentication ApiKeyAuth required - await setApiKeyToObject(localVarHeaderParameter, "x-api-key", configuration) - - if (id !== undefined) { - localVarQueryParameter['id'] = id; - } - - if (hasRootCastAuthors !== undefined) { - localVarQueryParameter['has_root_cast_authors'] = hasRootCastAuthors; - } - - if (hasCastLikers !== undefined) { - localVarQueryParameter['has_cast_likers'] = hasCastLikers; - } - - if (hasCastRecasters !== undefined) { - localVarQueryParameter['has_cast_recasters'] = hasCastRecasters; - } - - if (hasReplyAuthors !== undefined) { - localVarQueryParameter['has_reply_authors'] = hasReplyAuthors; - } - - if (cursor !== undefined) { - localVarQueryParameter['cursor'] = cursor; - } - - if (limit !== undefined) { - localVarQueryParameter['limit'] = limit; - } - - - - setSearchParams(localVarUrlObj, localVarQueryParameter); - let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; - localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; - - return { - url: toPathString(localVarUrlObj), - options: localVarRequestOptions, - }; - }, - /** - * Follow a channel - * @summary Follow a channel - * @param {ChannelFollowReqBody} channelFollowReqBody - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - followChannel: async (channelFollowReqBody: ChannelFollowReqBody, options: RawAxiosRequestConfig = {}): Promise => { - // verify required parameter 'channelFollowReqBody' is not null or undefined - assertParamExists('followChannel', 'channelFollowReqBody', channelFollowReqBody) - const localVarPath = `/farcaster/channel/follow`; - // use dummy base URL string because the URL constructor only accepts absolute URLs. - const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); - let baseOptions; - if (configuration) { - baseOptions = configuration.baseOptions; - } - - const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options}; - const localVarHeaderParameter = {} as any; - const localVarQueryParameter = {} as any; - - // authentication ApiKeyAuth required - await setApiKeyToObject(localVarHeaderParameter, "x-api-key", configuration) - - - - localVarHeaderParameter['Content-Type'] = 'application/json'; - - setSearchParams(localVarUrlObj, localVarQueryParameter); - let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; - localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; - localVarRequestOptions.data = serializeDataIfNeeded(channelFollowReqBody, localVarRequestOptions, configuration) - - return { - url: toPathString(localVarUrlObj), - options: localVarRequestOptions, - }; - }, - /** - * Invite a user to a channel - * @summary Invite - * @param {RemoveChannelMemberRequest} removeChannelMemberRequest - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - inviteChannelMember: async (removeChannelMemberRequest: RemoveChannelMemberRequest, options: RawAxiosRequestConfig = {}): Promise => { - // verify required parameter 'removeChannelMemberRequest' is not null or undefined - assertParamExists('inviteChannelMember', 'removeChannelMemberRequest', removeChannelMemberRequest) - const localVarPath = `/farcaster/channel/member/invite`; - // use dummy base URL string because the URL constructor only accepts absolute URLs. - const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); - let baseOptions; - if (configuration) { - baseOptions = configuration.baseOptions; - } - - const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options}; - const localVarHeaderParameter = {} as any; - const localVarQueryParameter = {} as any; - - // authentication ApiKeyAuth required - await setApiKeyToObject(localVarHeaderParameter, "x-api-key", configuration) - - - - localVarHeaderParameter['Content-Type'] = 'application/json'; - - setSearchParams(localVarUrlObj, localVarQueryParameter); - let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; - localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; - localVarRequestOptions.data = serializeDataIfNeeded(removeChannelMemberRequest, localVarRequestOptions, configuration) - - return { - url: toPathString(localVarUrlObj), - options: localVarRequestOptions, - }; - }, - /** - * Returns a list of all channels with their details - * @summary Fetch all channels with their details - * @param {number} [limit] Number of results to fetch - * @param {string} [cursor] Pagination cursor. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - listAllChannels: async (limit?: number, cursor?: string, options: RawAxiosRequestConfig = {}): Promise => { - const localVarPath = `/farcaster/channel/list`; - // use dummy base URL string because the URL constructor only accepts absolute URLs. - const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); - let baseOptions; - if (configuration) { - baseOptions = configuration.baseOptions; - } - - const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; - const localVarHeaderParameter = {} as any; - const localVarQueryParameter = {} as any; - - // authentication ApiKeyAuth required - await setApiKeyToObject(localVarHeaderParameter, "x-api-key", configuration) - - if (limit !== undefined) { - localVarQueryParameter['limit'] = limit; - } - - if (cursor !== undefined) { - localVarQueryParameter['cursor'] = cursor; - } - - - - setSearchParams(localVarUrlObj, localVarQueryParameter); - let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; - localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; - - return { - url: toPathString(localVarUrlObj), - options: localVarRequestOptions, - }; - }, - /** - * Fetch a list of invites, either in a channel or for a user. If both are provided, open channel invite for that user is returned. - * @summary Open invites - * @param {string} [channelId] Channel ID for the channel being queried - * @param {number} [invitedFid] FID of the user being invited - * @param {number} [limit] Number of results to fetch - * @param {string} [cursor] Pagination cursor. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - listChannelInvites: async (channelId?: string, invitedFid?: number, limit?: number, cursor?: string, options: RawAxiosRequestConfig = {}): Promise => { - const localVarPath = `/farcaster/channel/member/invite/list`; - // use dummy base URL string because the URL constructor only accepts absolute URLs. - const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); - let baseOptions; - if (configuration) { - baseOptions = configuration.baseOptions; - } - - const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; - const localVarHeaderParameter = {} as any; - const localVarQueryParameter = {} as any; - - // authentication ApiKeyAuth required - await setApiKeyToObject(localVarHeaderParameter, "x-api-key", configuration) - - if (channelId !== undefined) { - localVarQueryParameter['channel_id'] = channelId; - } - - if (invitedFid !== undefined) { - localVarQueryParameter['invited_fid'] = invitedFid; - } - - if (limit !== undefined) { - localVarQueryParameter['limit'] = limit; - } - - if (cursor !== undefined) { - localVarQueryParameter['cursor'] = cursor; - } - - - - setSearchParams(localVarUrlObj, localVarQueryParameter); - let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; - localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; - - return { - url: toPathString(localVarUrlObj), - options: localVarRequestOptions, - }; - }, - /** - * Fetch a list of members in a channel - * @summary Fetch members - * @param {string} channelId Channel ID for the channel being queried - * @param {number} [fid] FID of the user being queried. Specify this to check if a user is a member of the channel without paginating through all members. - * @param {number} [limit] Number of results to fetch - * @param {string} [cursor] Pagination cursor. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - listChannelMembers: async (channelId: string, fid?: number, limit?: number, cursor?: string, options: RawAxiosRequestConfig = {}): Promise => { - // verify required parameter 'channelId' is not null or undefined - assertParamExists('listChannelMembers', 'channelId', channelId) - const localVarPath = `/farcaster/channel/member/list`; - // use dummy base URL string because the URL constructor only accepts absolute URLs. - const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); - let baseOptions; - if (configuration) { - baseOptions = configuration.baseOptions; - } - - const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; - const localVarHeaderParameter = {} as any; - const localVarQueryParameter = {} as any; - - // authentication ApiKeyAuth required - await setApiKeyToObject(localVarHeaderParameter, "x-api-key", configuration) - - if (channelId !== undefined) { - localVarQueryParameter['channel_id'] = channelId; - } - - if (fid !== undefined) { - localVarQueryParameter['fid'] = fid; - } - - if (limit !== undefined) { - localVarQueryParameter['limit'] = limit; - } - - if (cursor !== undefined) { - localVarQueryParameter['cursor'] = cursor; - } - - - - setSearchParams(localVarUrlObj, localVarQueryParameter); - let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; - localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; - - return { - url: toPathString(localVarUrlObj), - options: localVarRequestOptions, - }; - }, - /** - * Returns a list of relevant channel followers for a specific FID. This usually shows on a channel as \"X, Y, Z follow this channel\". - * @summary Relevant followers - * @param {string} id Channel ID being queried - * @param {number} viewerFid The FID of the user to customize this response for. Providing this will also return a list of followers that respects this user\'s mutes and blocks and includes `viewer_context`. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - relevantChannelFollowers: async (id: string, viewerFid: number, options: RawAxiosRequestConfig = {}): Promise => { - // verify required parameter 'id' is not null or undefined - assertParamExists('relevantChannelFollowers', 'id', id) - // verify required parameter 'viewerFid' is not null or undefined - assertParamExists('relevantChannelFollowers', 'viewerFid', viewerFid) - const localVarPath = `/farcaster/channel/followers/relevant`; - // use dummy base URL string because the URL constructor only accepts absolute URLs. - const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); - let baseOptions; - if (configuration) { - baseOptions = configuration.baseOptions; - } - - const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; - const localVarHeaderParameter = {} as any; - const localVarQueryParameter = {} as any; - - // authentication ApiKeyAuth required - await setApiKeyToObject(localVarHeaderParameter, "x-api-key", configuration) - - if (id !== undefined) { - localVarQueryParameter['id'] = id; - } - - if (viewerFid !== undefined) { - localVarQueryParameter['viewer_fid'] = viewerFid; - } - - - - setSearchParams(localVarUrlObj, localVarQueryParameter); - let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; - localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; - - return { - url: toPathString(localVarUrlObj), - options: localVarRequestOptions, - }; - }, - /** - * Remove a user from a channel or a user\'s invite to a channel role - * @summary Remove user - * @param {RemoveChannelMemberRequest} removeChannelMemberRequest - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - removeChannelMember: async (removeChannelMemberRequest: RemoveChannelMemberRequest, options: RawAxiosRequestConfig = {}): Promise => { - // verify required parameter 'removeChannelMemberRequest' is not null or undefined - assertParamExists('removeChannelMember', 'removeChannelMemberRequest', removeChannelMemberRequest) - const localVarPath = `/farcaster/channel/member`; - // use dummy base URL string because the URL constructor only accepts absolute URLs. - const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); - let baseOptions; - if (configuration) { - baseOptions = configuration.baseOptions; - } - - const localVarRequestOptions = { method: 'DELETE', ...baseOptions, ...options}; - const localVarHeaderParameter = {} as any; - const localVarQueryParameter = {} as any; - - // authentication ApiKeyAuth required - await setApiKeyToObject(localVarHeaderParameter, "x-api-key", configuration) - - - - localVarHeaderParameter['Content-Type'] = 'application/json'; - - setSearchParams(localVarUrlObj, localVarQueryParameter); - let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; - localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; - localVarRequestOptions.data = serializeDataIfNeeded(removeChannelMemberRequest, localVarRequestOptions, configuration) - - return { - url: toPathString(localVarUrlObj), - options: localVarRequestOptions, - }; - }, - /** - * Accept or reject a channel invite - * @summary Accept or reject an invite - * @param {RespondChannelInviteRequest} respondChannelInviteRequest - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - respondChannelInvite: async (respondChannelInviteRequest: RespondChannelInviteRequest, options: RawAxiosRequestConfig = {}): Promise => { - // verify required parameter 'respondChannelInviteRequest' is not null or undefined - assertParamExists('respondChannelInvite', 'respondChannelInviteRequest', respondChannelInviteRequest) - const localVarPath = `/farcaster/channel/member/invite`; - // use dummy base URL string because the URL constructor only accepts absolute URLs. - const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); - let baseOptions; - if (configuration) { - baseOptions = configuration.baseOptions; - } - - const localVarRequestOptions = { method: 'PUT', ...baseOptions, ...options}; - const localVarHeaderParameter = {} as any; - const localVarQueryParameter = {} as any; - - // authentication ApiKeyAuth required - await setApiKeyToObject(localVarHeaderParameter, "x-api-key", configuration) - - - - localVarHeaderParameter['Content-Type'] = 'application/json'; - - setSearchParams(localVarUrlObj, localVarQueryParameter); - let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; - localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; - localVarRequestOptions.data = serializeDataIfNeeded(respondChannelInviteRequest, localVarRequestOptions, configuration) - - return { - url: toPathString(localVarUrlObj), - options: localVarRequestOptions, - }; - }, - /** - * Returns a list of channels based on ID or name - * @summary Search by ID or name - * @param {string} q Channel ID or name for the channel being queried - * @param {number} [limit] Number of results to fetch - * @param {string} [cursor] Pagination cursor. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - searchChannels: async (q: string, limit?: number, cursor?: string, options: RawAxiosRequestConfig = {}): Promise => { - // verify required parameter 'q' is not null or undefined - assertParamExists('searchChannels', 'q', q) - const localVarPath = `/farcaster/channel/search`; - // use dummy base URL string because the URL constructor only accepts absolute URLs. - const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); - let baseOptions; - if (configuration) { - baseOptions = configuration.baseOptions; - } - - const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; - const localVarHeaderParameter = {} as any; - const localVarQueryParameter = {} as any; - - // authentication ApiKeyAuth required - await setApiKeyToObject(localVarHeaderParameter, "x-api-key", configuration) - - if (q !== undefined) { - localVarQueryParameter['q'] = q; - } - - if (limit !== undefined) { - localVarQueryParameter['limit'] = limit; - } - - if (cursor !== undefined) { - localVarQueryParameter['cursor'] = cursor; - } - - - - setSearchParams(localVarUrlObj, localVarQueryParameter); - let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; - localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; - - return { - url: toPathString(localVarUrlObj), - options: localVarRequestOptions, - }; - }, - /** - * Returns a list of trending channels based on activity - * @summary Channels by activity - * @param {TrendingChannelsTimeWindowEnum} [timeWindow] - * @param {number} [limit] Number of results to fetch (default 10, max 25) - * @param {string} [cursor] Pagination cursor. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - trendingChannels: async (timeWindow?: TrendingChannelsTimeWindowEnum, limit?: number, cursor?: string, options: RawAxiosRequestConfig = {}): Promise => { - const localVarPath = `/farcaster/channel/trending`; - // use dummy base URL string because the URL constructor only accepts absolute URLs. - const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); - let baseOptions; - if (configuration) { - baseOptions = configuration.baseOptions; - } - - const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; - const localVarHeaderParameter = {} as any; - const localVarQueryParameter = {} as any; - - // authentication ApiKeyAuth required - await setApiKeyToObject(localVarHeaderParameter, "x-api-key", configuration) - - if (timeWindow !== undefined) { - localVarQueryParameter['time_window'] = timeWindow; - } - - if (limit !== undefined) { - localVarQueryParameter['limit'] = limit; - } - - if (cursor !== undefined) { - localVarQueryParameter['cursor'] = cursor; - } - - - - setSearchParams(localVarUrlObj, localVarQueryParameter); - let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; - localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; - - return { - url: toPathString(localVarUrlObj), - options: localVarRequestOptions, - }; - }, - /** - * Unfollow a channel - * @summary Unfollow a channel - * @param {ChannelFollowReqBody} channelFollowReqBody - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - unfollowChannel: async (channelFollowReqBody: ChannelFollowReqBody, options: RawAxiosRequestConfig = {}): Promise => { - // verify required parameter 'channelFollowReqBody' is not null or undefined - assertParamExists('unfollowChannel', 'channelFollowReqBody', channelFollowReqBody) - const localVarPath = `/farcaster/channel/follow`; - // use dummy base URL string because the URL constructor only accepts absolute URLs. - const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); - let baseOptions; - if (configuration) { - baseOptions = configuration.baseOptions; - } - - const localVarRequestOptions = { method: 'DELETE', ...baseOptions, ...options}; - const localVarHeaderParameter = {} as any; - const localVarQueryParameter = {} as any; - - // authentication ApiKeyAuth required - await setApiKeyToObject(localVarHeaderParameter, "x-api-key", configuration) - - - - localVarHeaderParameter['Content-Type'] = 'application/json'; - - setSearchParams(localVarUrlObj, localVarQueryParameter); - let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; - localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; - localVarRequestOptions.data = serializeDataIfNeeded(channelFollowReqBody, localVarRequestOptions, configuration) - - return { - url: toPathString(localVarUrlObj), - options: localVarRequestOptions, - }; - }, - /** - * Returns a list of all channels with their details that an FID is a member of. Data may have a delay of up to 1 hour. - * @summary Member of - * @param {number} fid The FID of the user. - * @param {number} [limit] Number of results to fetch (default 20, max 100) - * @param {string} [cursor] Pagination cursor. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - userChannelMemberships: async (fid: number, limit?: number, cursor?: string, options: RawAxiosRequestConfig = {}): Promise => { - // verify required parameter 'fid' is not null or undefined - assertParamExists('userChannelMemberships', 'fid', fid) - const localVarPath = `/farcaster/user/memberships/list`; - // use dummy base URL string because the URL constructor only accepts absolute URLs. - const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); - let baseOptions; - if (configuration) { - baseOptions = configuration.baseOptions; - } - - const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; - const localVarHeaderParameter = {} as any; - const localVarQueryParameter = {} as any; - - // authentication ApiKeyAuth required - await setApiKeyToObject(localVarHeaderParameter, "x-api-key", configuration) - - if (fid !== undefined) { - localVarQueryParameter['fid'] = fid; - } - - if (limit !== undefined) { - localVarQueryParameter['limit'] = limit; - } - - if (cursor !== undefined) { - localVarQueryParameter['cursor'] = cursor; - } - - - - setSearchParams(localVarUrlObj, localVarQueryParameter); - let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; - localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; - - return { - url: toPathString(localVarUrlObj), - options: localVarRequestOptions, - }; - }, - /** - * Returns a list of all channels with their details that a FID follows. - * @summary Following - * @param {number} fid The FID of the user. - * @param {number} [limit] Number of results to fetch (default 25, max 100) - * @param {string} [cursor] Pagination cursor. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - userChannels: async (fid: number, limit?: number, cursor?: string, options: RawAxiosRequestConfig = {}): Promise => { - // verify required parameter 'fid' is not null or undefined - assertParamExists('userChannels', 'fid', fid) - const localVarPath = `/farcaster/user/channels`; - // use dummy base URL string because the URL constructor only accepts absolute URLs. - const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); - let baseOptions; - if (configuration) { - baseOptions = configuration.baseOptions; - } - - const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; - const localVarHeaderParameter = {} as any; - const localVarQueryParameter = {} as any; - - // authentication ApiKeyAuth required - await setApiKeyToObject(localVarHeaderParameter, "x-api-key", configuration) - - if (fid !== undefined) { - localVarQueryParameter['fid'] = fid; - } - - if (limit !== undefined) { - localVarQueryParameter['limit'] = limit; - } - - if (cursor !== undefined) { - localVarQueryParameter['cursor'] = cursor; - } - - - - setSearchParams(localVarUrlObj, localVarQueryParameter); - let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; - localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; - - return { - url: toPathString(localVarUrlObj), - options: localVarRequestOptions, - }; - }, - } -}; - -/** - * ChannelApi - functional programming interface - * @export - */ -export const ChannelApiFp = function(configuration?: Configuration) { - const localVarAxiosParamCreator = ChannelApiAxiosParamCreator(configuration) - return { - /** - * Fetches all channels that a user has casted in, in reverse chronological order. - * @summary Fetch channels that user is active in - * @param {number} fid The user\'s FID (identifier) - * @param {number} [limit] Number of results to fetch (default 20, max 100). - * @param {string} [cursor] Pagination cursor. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - async activeChannels(fid: number, limit?: number, cursor?: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.activeChannels(fid, limit, cursor, options); - const localVarOperationServerIndex = configuration?.serverIndex ?? 0; - const localVarOperationServerBasePath = operationServerMap['ChannelApi.activeChannels']?.[localVarOperationServerIndex]?.url; - return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); - }, - /** - * Returns details of a channel - * @summary By ID or parent_url - * @param {string} id Channel ID for the channel being queried - * @param {ChannelType} [type] Type of identifier being used to query the channel. Defaults to ID. - * @param {number} [viewerFid] FID of the user viewing the channel. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - async channelDetails(id: string, type?: ChannelType, viewerFid?: number, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.channelDetails(id, type, viewerFid, options); - const localVarOperationServerIndex = configuration?.serverIndex ?? 0; - const localVarOperationServerBasePath = operationServerMap['ChannelApi.channelDetails']?.[localVarOperationServerIndex]?.url; - return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); - }, - /** - * Returns details of multiple channels - * @summary Bulk fetch - * @param {string} ids Comma separated list of channel IDs or parent_urls, up to 100 at a time - * @param {ChannelType} [type] Type of identifier being used to query the channels. Defaults to ID. - * @param {number} [viewerFid] FID of the user viewing the channels. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - async channelDetailsBulk(ids: string, type?: ChannelType, viewerFid?: number, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.channelDetailsBulk(ids, type, viewerFid, options); - const localVarOperationServerIndex = configuration?.serverIndex ?? 0; - const localVarOperationServerBasePath = operationServerMap['ChannelApi.channelDetailsBulk']?.[localVarOperationServerIndex]?.url; - return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); - }, - /** - * Returns a list of followers for a specific channel. Max limit is 1000. Use cursor for pagination. - * @summary For channel - * @param {string} id Channel ID for the channel being queried - * @param {number} [viewerFid] Providing this will return a list of followers that respects this user\'s mutes and blocks and includes `viewer_context`. - * @param {string} [cursor] Pagination cursor. - * @param {number} [limit] Number of followers to fetch (default 25, max 1000) - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - async channelFollowers(id: string, viewerFid?: number, cursor?: string, limit?: number, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.channelFollowers(id, viewerFid, cursor, limit, options); - const localVarOperationServerIndex = configuration?.serverIndex ?? 0; - const localVarOperationServerBasePath = operationServerMap['ChannelApi.channelFollowers']?.[localVarOperationServerIndex]?.url; - return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); - }, - /** - * Returns a list of users who are active in a given channel, ordered by ascending FIDs - * @summary Fetch users who are active in a channel - * @param {string} id Channel ID for the channel being queried - * @param {boolean} hasRootCastAuthors Include users who posted the root cast in the channel - * @param {boolean} [hasCastLikers] Include users who liked a cast in the channel - * @param {boolean} [hasCastRecasters] Include users who recasted a cast in the channel - * @param {boolean} [hasReplyAuthors] Include users who replied to a cast in the channel - * @param {string} [cursor] Pagination cursor. - * @param {number} [limit] Number of results to fetch (default 25, max 100) - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - async channelUsers(id: string, hasRootCastAuthors: boolean, hasCastLikers?: boolean, hasCastRecasters?: boolean, hasReplyAuthors?: boolean, cursor?: string, limit?: number, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.channelUsers(id, hasRootCastAuthors, hasCastLikers, hasCastRecasters, hasReplyAuthors, cursor, limit, options); - const localVarOperationServerIndex = configuration?.serverIndex ?? 0; - const localVarOperationServerBasePath = operationServerMap['ChannelApi.channelUsers']?.[localVarOperationServerIndex]?.url; - return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); - }, - /** - * Follow a channel - * @summary Follow a channel - * @param {ChannelFollowReqBody} channelFollowReqBody - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - async followChannel(channelFollowReqBody: ChannelFollowReqBody, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.followChannel(channelFollowReqBody, options); - const localVarOperationServerIndex = configuration?.serverIndex ?? 0; - const localVarOperationServerBasePath = operationServerMap['ChannelApi.followChannel']?.[localVarOperationServerIndex]?.url; - return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); - }, - /** - * Invite a user to a channel - * @summary Invite - * @param {RemoveChannelMemberRequest} removeChannelMemberRequest - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - async inviteChannelMember(removeChannelMemberRequest: RemoveChannelMemberRequest, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.inviteChannelMember(removeChannelMemberRequest, options); - const localVarOperationServerIndex = configuration?.serverIndex ?? 0; - const localVarOperationServerBasePath = operationServerMap['ChannelApi.inviteChannelMember']?.[localVarOperationServerIndex]?.url; - return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); - }, - /** - * Returns a list of all channels with their details - * @summary Fetch all channels with their details - * @param {number} [limit] Number of results to fetch - * @param {string} [cursor] Pagination cursor. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - async listAllChannels(limit?: number, cursor?: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.listAllChannels(limit, cursor, options); - const localVarOperationServerIndex = configuration?.serverIndex ?? 0; - const localVarOperationServerBasePath = operationServerMap['ChannelApi.listAllChannels']?.[localVarOperationServerIndex]?.url; - return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); - }, - /** - * Fetch a list of invites, either in a channel or for a user. If both are provided, open channel invite for that user is returned. - * @summary Open invites - * @param {string} [channelId] Channel ID for the channel being queried - * @param {number} [invitedFid] FID of the user being invited - * @param {number} [limit] Number of results to fetch - * @param {string} [cursor] Pagination cursor. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - async listChannelInvites(channelId?: string, invitedFid?: number, limit?: number, cursor?: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.listChannelInvites(channelId, invitedFid, limit, cursor, options); - const localVarOperationServerIndex = configuration?.serverIndex ?? 0; - const localVarOperationServerBasePath = operationServerMap['ChannelApi.listChannelInvites']?.[localVarOperationServerIndex]?.url; - return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); - }, - /** - * Fetch a list of members in a channel - * @summary Fetch members - * @param {string} channelId Channel ID for the channel being queried - * @param {number} [fid] FID of the user being queried. Specify this to check if a user is a member of the channel without paginating through all members. - * @param {number} [limit] Number of results to fetch - * @param {string} [cursor] Pagination cursor. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - async listChannelMembers(channelId: string, fid?: number, limit?: number, cursor?: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.listChannelMembers(channelId, fid, limit, cursor, options); - const localVarOperationServerIndex = configuration?.serverIndex ?? 0; - const localVarOperationServerBasePath = operationServerMap['ChannelApi.listChannelMembers']?.[localVarOperationServerIndex]?.url; - return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); - }, - /** - * Returns a list of relevant channel followers for a specific FID. This usually shows on a channel as \"X, Y, Z follow this channel\". - * @summary Relevant followers - * @param {string} id Channel ID being queried - * @param {number} viewerFid The FID of the user to customize this response for. Providing this will also return a list of followers that respects this user\'s mutes and blocks and includes `viewer_context`. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - async relevantChannelFollowers(id: string, viewerFid: number, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.relevantChannelFollowers(id, viewerFid, options); - const localVarOperationServerIndex = configuration?.serverIndex ?? 0; - const localVarOperationServerBasePath = operationServerMap['ChannelApi.relevantChannelFollowers']?.[localVarOperationServerIndex]?.url; - return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); - }, - /** - * Remove a user from a channel or a user\'s invite to a channel role - * @summary Remove user - * @param {RemoveChannelMemberRequest} removeChannelMemberRequest - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - async removeChannelMember(removeChannelMemberRequest: RemoveChannelMemberRequest, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.removeChannelMember(removeChannelMemberRequest, options); - const localVarOperationServerIndex = configuration?.serverIndex ?? 0; - const localVarOperationServerBasePath = operationServerMap['ChannelApi.removeChannelMember']?.[localVarOperationServerIndex]?.url; - return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); - }, - /** - * Accept or reject a channel invite - * @summary Accept or reject an invite - * @param {RespondChannelInviteRequest} respondChannelInviteRequest - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - async respondChannelInvite(respondChannelInviteRequest: RespondChannelInviteRequest, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.respondChannelInvite(respondChannelInviteRequest, options); - const localVarOperationServerIndex = configuration?.serverIndex ?? 0; - const localVarOperationServerBasePath = operationServerMap['ChannelApi.respondChannelInvite']?.[localVarOperationServerIndex]?.url; - return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); - }, - /** - * Returns a list of channels based on ID or name - * @summary Search by ID or name - * @param {string} q Channel ID or name for the channel being queried - * @param {number} [limit] Number of results to fetch - * @param {string} [cursor] Pagination cursor. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - async searchChannels(q: string, limit?: number, cursor?: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.searchChannels(q, limit, cursor, options); - const localVarOperationServerIndex = configuration?.serverIndex ?? 0; - const localVarOperationServerBasePath = operationServerMap['ChannelApi.searchChannels']?.[localVarOperationServerIndex]?.url; - return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); - }, - /** - * Returns a list of trending channels based on activity - * @summary Channels by activity - * @param {TrendingChannelsTimeWindowEnum} [timeWindow] - * @param {number} [limit] Number of results to fetch (default 10, max 25) - * @param {string} [cursor] Pagination cursor. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - async trendingChannels(timeWindow?: TrendingChannelsTimeWindowEnum, limit?: number, cursor?: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.trendingChannels(timeWindow, limit, cursor, options); - const localVarOperationServerIndex = configuration?.serverIndex ?? 0; - const localVarOperationServerBasePath = operationServerMap['ChannelApi.trendingChannels']?.[localVarOperationServerIndex]?.url; - return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); - }, - /** - * Unfollow a channel - * @summary Unfollow a channel - * @param {ChannelFollowReqBody} channelFollowReqBody - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - async unfollowChannel(channelFollowReqBody: ChannelFollowReqBody, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.unfollowChannel(channelFollowReqBody, options); - const localVarOperationServerIndex = configuration?.serverIndex ?? 0; - const localVarOperationServerBasePath = operationServerMap['ChannelApi.unfollowChannel']?.[localVarOperationServerIndex]?.url; - return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); - }, - /** - * Returns a list of all channels with their details that an FID is a member of. Data may have a delay of up to 1 hour. - * @summary Member of - * @param {number} fid The FID of the user. - * @param {number} [limit] Number of results to fetch (default 20, max 100) - * @param {string} [cursor] Pagination cursor. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - async userChannelMemberships(fid: number, limit?: number, cursor?: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.userChannelMemberships(fid, limit, cursor, options); - const localVarOperationServerIndex = configuration?.serverIndex ?? 0; - const localVarOperationServerBasePath = operationServerMap['ChannelApi.userChannelMemberships']?.[localVarOperationServerIndex]?.url; - return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); - }, - /** - * Returns a list of all channels with their details that a FID follows. - * @summary Following - * @param {number} fid The FID of the user. - * @param {number} [limit] Number of results to fetch (default 25, max 100) - * @param {string} [cursor] Pagination cursor. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - async userChannels(fid: number, limit?: number, cursor?: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.userChannels(fid, limit, cursor, options); - const localVarOperationServerIndex = configuration?.serverIndex ?? 0; - const localVarOperationServerBasePath = operationServerMap['ChannelApi.userChannels']?.[localVarOperationServerIndex]?.url; - return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); - }, - } -}; - -/** - * ChannelApi - factory interface - * @export - */ -export const ChannelApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) { - const localVarFp = ChannelApiFp(configuration) - return { - /** - * Fetches all channels that a user has casted in, in reverse chronological order. - * @summary Fetch channels that user is active in - * @param {number} fid The user\'s FID (identifier) - * @param {number} [limit] Number of results to fetch (default 20, max 100). - * @param {string} [cursor] Pagination cursor. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - activeChannels(fid: number, limit?: number, cursor?: string, options?: RawAxiosRequestConfig): AxiosPromise { - return localVarFp.activeChannels(fid, limit, cursor, options).then((request) => request(axios, basePath)); - }, - /** - * Returns details of a channel - * @summary By ID or parent_url - * @param {string} id Channel ID for the channel being queried - * @param {ChannelType} [type] Type of identifier being used to query the channel. Defaults to ID. - * @param {number} [viewerFid] FID of the user viewing the channel. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - channelDetails(id: string, type?: ChannelType, viewerFid?: number, options?: RawAxiosRequestConfig): AxiosPromise { - return localVarFp.channelDetails(id, type, viewerFid, options).then((request) => request(axios, basePath)); - }, - /** - * Returns details of multiple channels - * @summary Bulk fetch - * @param {string} ids Comma separated list of channel IDs or parent_urls, up to 100 at a time - * @param {ChannelType} [type] Type of identifier being used to query the channels. Defaults to ID. - * @param {number} [viewerFid] FID of the user viewing the channels. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - channelDetailsBulk(ids: string, type?: ChannelType, viewerFid?: number, options?: RawAxiosRequestConfig): AxiosPromise { - return localVarFp.channelDetailsBulk(ids, type, viewerFid, options).then((request) => request(axios, basePath)); - }, - /** - * Returns a list of followers for a specific channel. Max limit is 1000. Use cursor for pagination. - * @summary For channel - * @param {string} id Channel ID for the channel being queried - * @param {number} [viewerFid] Providing this will return a list of followers that respects this user\'s mutes and blocks and includes `viewer_context`. - * @param {string} [cursor] Pagination cursor. - * @param {number} [limit] Number of followers to fetch (default 25, max 1000) - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - channelFollowers(id: string, viewerFid?: number, cursor?: string, limit?: number, options?: RawAxiosRequestConfig): AxiosPromise { - return localVarFp.channelFollowers(id, viewerFid, cursor, limit, options).then((request) => request(axios, basePath)); - }, - /** - * Returns a list of users who are active in a given channel, ordered by ascending FIDs - * @summary Fetch users who are active in a channel - * @param {string} id Channel ID for the channel being queried - * @param {boolean} hasRootCastAuthors Include users who posted the root cast in the channel - * @param {boolean} [hasCastLikers] Include users who liked a cast in the channel - * @param {boolean} [hasCastRecasters] Include users who recasted a cast in the channel - * @param {boolean} [hasReplyAuthors] Include users who replied to a cast in the channel - * @param {string} [cursor] Pagination cursor. - * @param {number} [limit] Number of results to fetch (default 25, max 100) - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - channelUsers(id: string, hasRootCastAuthors: boolean, hasCastLikers?: boolean, hasCastRecasters?: boolean, hasReplyAuthors?: boolean, cursor?: string, limit?: number, options?: RawAxiosRequestConfig): AxiosPromise { - return localVarFp.channelUsers(id, hasRootCastAuthors, hasCastLikers, hasCastRecasters, hasReplyAuthors, cursor, limit, options).then((request) => request(axios, basePath)); - }, - /** - * Follow a channel - * @summary Follow a channel - * @param {ChannelFollowReqBody} channelFollowReqBody - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - followChannel(channelFollowReqBody: ChannelFollowReqBody, options?: RawAxiosRequestConfig): AxiosPromise { - return localVarFp.followChannel(channelFollowReqBody, options).then((request) => request(axios, basePath)); - }, - /** - * Invite a user to a channel - * @summary Invite - * @param {RemoveChannelMemberRequest} removeChannelMemberRequest - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - inviteChannelMember(removeChannelMemberRequest: RemoveChannelMemberRequest, options?: RawAxiosRequestConfig): AxiosPromise { - return localVarFp.inviteChannelMember(removeChannelMemberRequest, options).then((request) => request(axios, basePath)); - }, - /** - * Returns a list of all channels with their details - * @summary Fetch all channels with their details - * @param {number} [limit] Number of results to fetch - * @param {string} [cursor] Pagination cursor. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - listAllChannels(limit?: number, cursor?: string, options?: RawAxiosRequestConfig): AxiosPromise { - return localVarFp.listAllChannels(limit, cursor, options).then((request) => request(axios, basePath)); - }, - /** - * Fetch a list of invites, either in a channel or for a user. If both are provided, open channel invite for that user is returned. - * @summary Open invites - * @param {string} [channelId] Channel ID for the channel being queried - * @param {number} [invitedFid] FID of the user being invited - * @param {number} [limit] Number of results to fetch - * @param {string} [cursor] Pagination cursor. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - listChannelInvites(channelId?: string, invitedFid?: number, limit?: number, cursor?: string, options?: RawAxiosRequestConfig): AxiosPromise { - return localVarFp.listChannelInvites(channelId, invitedFid, limit, cursor, options).then((request) => request(axios, basePath)); - }, - /** - * Fetch a list of members in a channel - * @summary Fetch members - * @param {string} channelId Channel ID for the channel being queried - * @param {number} [fid] FID of the user being queried. Specify this to check if a user is a member of the channel without paginating through all members. - * @param {number} [limit] Number of results to fetch - * @param {string} [cursor] Pagination cursor. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - listChannelMembers(channelId: string, fid?: number, limit?: number, cursor?: string, options?: RawAxiosRequestConfig): AxiosPromise { - return localVarFp.listChannelMembers(channelId, fid, limit, cursor, options).then((request) => request(axios, basePath)); - }, - /** - * Returns a list of relevant channel followers for a specific FID. This usually shows on a channel as \"X, Y, Z follow this channel\". - * @summary Relevant followers - * @param {string} id Channel ID being queried - * @param {number} viewerFid The FID of the user to customize this response for. Providing this will also return a list of followers that respects this user\'s mutes and blocks and includes `viewer_context`. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - relevantChannelFollowers(id: string, viewerFid: number, options?: RawAxiosRequestConfig): AxiosPromise { - return localVarFp.relevantChannelFollowers(id, viewerFid, options).then((request) => request(axios, basePath)); - }, - /** - * Remove a user from a channel or a user\'s invite to a channel role - * @summary Remove user - * @param {RemoveChannelMemberRequest} removeChannelMemberRequest - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - removeChannelMember(removeChannelMemberRequest: RemoveChannelMemberRequest, options?: RawAxiosRequestConfig): AxiosPromise { - return localVarFp.removeChannelMember(removeChannelMemberRequest, options).then((request) => request(axios, basePath)); - }, - /** - * Accept or reject a channel invite - * @summary Accept or reject an invite - * @param {RespondChannelInviteRequest} respondChannelInviteRequest - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - respondChannelInvite(respondChannelInviteRequest: RespondChannelInviteRequest, options?: RawAxiosRequestConfig): AxiosPromise { - return localVarFp.respondChannelInvite(respondChannelInviteRequest, options).then((request) => request(axios, basePath)); - }, - /** - * Returns a list of channels based on ID or name - * @summary Search by ID or name - * @param {string} q Channel ID or name for the channel being queried - * @param {number} [limit] Number of results to fetch - * @param {string} [cursor] Pagination cursor. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - searchChannels(q: string, limit?: number, cursor?: string, options?: RawAxiosRequestConfig): AxiosPromise { - return localVarFp.searchChannels(q, limit, cursor, options).then((request) => request(axios, basePath)); - }, - /** - * Returns a list of trending channels based on activity - * @summary Channels by activity - * @param {TrendingChannelsTimeWindowEnum} [timeWindow] - * @param {number} [limit] Number of results to fetch (default 10, max 25) - * @param {string} [cursor] Pagination cursor. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - trendingChannels(timeWindow?: TrendingChannelsTimeWindowEnum, limit?: number, cursor?: string, options?: RawAxiosRequestConfig): AxiosPromise { - return localVarFp.trendingChannels(timeWindow, limit, cursor, options).then((request) => request(axios, basePath)); - }, - /** - * Unfollow a channel - * @summary Unfollow a channel - * @param {ChannelFollowReqBody} channelFollowReqBody - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - unfollowChannel(channelFollowReqBody: ChannelFollowReqBody, options?: RawAxiosRequestConfig): AxiosPromise { - return localVarFp.unfollowChannel(channelFollowReqBody, options).then((request) => request(axios, basePath)); - }, - /** - * Returns a list of all channels with their details that an FID is a member of. Data may have a delay of up to 1 hour. - * @summary Member of - * @param {number} fid The FID of the user. - * @param {number} [limit] Number of results to fetch (default 20, max 100) - * @param {string} [cursor] Pagination cursor. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - userChannelMemberships(fid: number, limit?: number, cursor?: string, options?: RawAxiosRequestConfig): AxiosPromise { - return localVarFp.userChannelMemberships(fid, limit, cursor, options).then((request) => request(axios, basePath)); - }, - /** - * Returns a list of all channels with their details that a FID follows. - * @summary Following - * @param {number} fid The FID of the user. - * @param {number} [limit] Number of results to fetch (default 25, max 100) - * @param {string} [cursor] Pagination cursor. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - userChannels(fid: number, limit?: number, cursor?: string, options?: RawAxiosRequestConfig): AxiosPromise { - return localVarFp.userChannels(fid, limit, cursor, options).then((request) => request(axios, basePath)); - }, - }; -}; - -/** - * ChannelApi - object-oriented interface - * @export - * @class ChannelApi - * @extends {BaseAPI} - */ -export class ChannelApi extends BaseAPI { - /** - * Fetches all channels that a user has casted in, in reverse chronological order. - * @summary Fetch channels that user is active in - * @param {number} fid The user\'s FID (identifier) - * @param {number} [limit] Number of results to fetch (default 20, max 100). - * @param {string} [cursor] Pagination cursor. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof ChannelApi - */ - public activeChannels(fid: number, limit?: number, cursor?: string, options?: RawAxiosRequestConfig) { - return ChannelApiFp(this.configuration).activeChannels(fid, limit, cursor, options).then((request) => request(this.axios, this.basePath)); - } - - /** - * Returns details of a channel - * @summary By ID or parent_url - * @param {string} id Channel ID for the channel being queried - * @param {ChannelType} [type] Type of identifier being used to query the channel. Defaults to ID. - * @param {number} [viewerFid] FID of the user viewing the channel. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof ChannelApi - */ - public channelDetails(id: string, type?: ChannelType, viewerFid?: number, options?: RawAxiosRequestConfig) { - return ChannelApiFp(this.configuration).channelDetails(id, type, viewerFid, options).then((request) => request(this.axios, this.basePath)); - } - - /** - * Returns details of multiple channels - * @summary Bulk fetch - * @param {string} ids Comma separated list of channel IDs or parent_urls, up to 100 at a time - * @param {ChannelType} [type] Type of identifier being used to query the channels. Defaults to ID. - * @param {number} [viewerFid] FID of the user viewing the channels. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof ChannelApi - */ - public channelDetailsBulk(ids: string, type?: ChannelType, viewerFid?: number, options?: RawAxiosRequestConfig) { - return ChannelApiFp(this.configuration).channelDetailsBulk(ids, type, viewerFid, options).then((request) => request(this.axios, this.basePath)); - } - - /** - * Returns a list of followers for a specific channel. Max limit is 1000. Use cursor for pagination. - * @summary For channel - * @param {string} id Channel ID for the channel being queried - * @param {number} [viewerFid] Providing this will return a list of followers that respects this user\'s mutes and blocks and includes `viewer_context`. - * @param {string} [cursor] Pagination cursor. - * @param {number} [limit] Number of followers to fetch (default 25, max 1000) - * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof ChannelApi - */ - public channelFollowers(id: string, viewerFid?: number, cursor?: string, limit?: number, options?: RawAxiosRequestConfig) { - return ChannelApiFp(this.configuration).channelFollowers(id, viewerFid, cursor, limit, options).then((request) => request(this.axios, this.basePath)); - } - - /** - * Returns a list of users who are active in a given channel, ordered by ascending FIDs - * @summary Fetch users who are active in a channel - * @param {string} id Channel ID for the channel being queried - * @param {boolean} hasRootCastAuthors Include users who posted the root cast in the channel - * @param {boolean} [hasCastLikers] Include users who liked a cast in the channel - * @param {boolean} [hasCastRecasters] Include users who recasted a cast in the channel - * @param {boolean} [hasReplyAuthors] Include users who replied to a cast in the channel - * @param {string} [cursor] Pagination cursor. - * @param {number} [limit] Number of results to fetch (default 25, max 100) - * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof ChannelApi - */ - public channelUsers(id: string, hasRootCastAuthors: boolean, hasCastLikers?: boolean, hasCastRecasters?: boolean, hasReplyAuthors?: boolean, cursor?: string, limit?: number, options?: RawAxiosRequestConfig) { - return ChannelApiFp(this.configuration).channelUsers(id, hasRootCastAuthors, hasCastLikers, hasCastRecasters, hasReplyAuthors, cursor, limit, options).then((request) => request(this.axios, this.basePath)); - } - - /** - * Follow a channel - * @summary Follow a channel - * @param {ChannelFollowReqBody} channelFollowReqBody - * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof ChannelApi - */ - public followChannel(channelFollowReqBody: ChannelFollowReqBody, options?: RawAxiosRequestConfig) { - return ChannelApiFp(this.configuration).followChannel(channelFollowReqBody, options).then((request) => request(this.axios, this.basePath)); - } - - /** - * Invite a user to a channel - * @summary Invite - * @param {RemoveChannelMemberRequest} removeChannelMemberRequest - * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof ChannelApi - */ - public inviteChannelMember(removeChannelMemberRequest: RemoveChannelMemberRequest, options?: RawAxiosRequestConfig) { - return ChannelApiFp(this.configuration).inviteChannelMember(removeChannelMemberRequest, options).then((request) => request(this.axios, this.basePath)); - } - - /** - * Returns a list of all channels with their details - * @summary Fetch all channels with their details - * @param {number} [limit] Number of results to fetch - * @param {string} [cursor] Pagination cursor. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof ChannelApi - */ - public listAllChannels(limit?: number, cursor?: string, options?: RawAxiosRequestConfig) { - return ChannelApiFp(this.configuration).listAllChannels(limit, cursor, options).then((request) => request(this.axios, this.basePath)); - } - - /** - * Fetch a list of invites, either in a channel or for a user. If both are provided, open channel invite for that user is returned. - * @summary Open invites - * @param {string} [channelId] Channel ID for the channel being queried - * @param {number} [invitedFid] FID of the user being invited - * @param {number} [limit] Number of results to fetch - * @param {string} [cursor] Pagination cursor. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof ChannelApi - */ - public listChannelInvites(channelId?: string, invitedFid?: number, limit?: number, cursor?: string, options?: RawAxiosRequestConfig) { - return ChannelApiFp(this.configuration).listChannelInvites(channelId, invitedFid, limit, cursor, options).then((request) => request(this.axios, this.basePath)); - } - - /** - * Fetch a list of members in a channel - * @summary Fetch members - * @param {string} channelId Channel ID for the channel being queried - * @param {number} [fid] FID of the user being queried. Specify this to check if a user is a member of the channel without paginating through all members. - * @param {number} [limit] Number of results to fetch - * @param {string} [cursor] Pagination cursor. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof ChannelApi - */ - public listChannelMembers(channelId: string, fid?: number, limit?: number, cursor?: string, options?: RawAxiosRequestConfig) { - return ChannelApiFp(this.configuration).listChannelMembers(channelId, fid, limit, cursor, options).then((request) => request(this.axios, this.basePath)); - } - - /** - * Returns a list of relevant channel followers for a specific FID. This usually shows on a channel as \"X, Y, Z follow this channel\". - * @summary Relevant followers - * @param {string} id Channel ID being queried - * @param {number} viewerFid The FID of the user to customize this response for. Providing this will also return a list of followers that respects this user\'s mutes and blocks and includes `viewer_context`. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof ChannelApi - */ - public relevantChannelFollowers(id: string, viewerFid: number, options?: RawAxiosRequestConfig) { - return ChannelApiFp(this.configuration).relevantChannelFollowers(id, viewerFid, options).then((request) => request(this.axios, this.basePath)); - } - - /** - * Remove a user from a channel or a user\'s invite to a channel role - * @summary Remove user - * @param {RemoveChannelMemberRequest} removeChannelMemberRequest - * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof ChannelApi - */ - public removeChannelMember(removeChannelMemberRequest: RemoveChannelMemberRequest, options?: RawAxiosRequestConfig) { - return ChannelApiFp(this.configuration).removeChannelMember(removeChannelMemberRequest, options).then((request) => request(this.axios, this.basePath)); - } - - /** - * Accept or reject a channel invite - * @summary Accept or reject an invite - * @param {RespondChannelInviteRequest} respondChannelInviteRequest - * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof ChannelApi - */ - public respondChannelInvite(respondChannelInviteRequest: RespondChannelInviteRequest, options?: RawAxiosRequestConfig) { - return ChannelApiFp(this.configuration).respondChannelInvite(respondChannelInviteRequest, options).then((request) => request(this.axios, this.basePath)); - } - - /** - * Returns a list of channels based on ID or name - * @summary Search by ID or name - * @param {string} q Channel ID or name for the channel being queried - * @param {number} [limit] Number of results to fetch - * @param {string} [cursor] Pagination cursor. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof ChannelApi - */ - public searchChannels(q: string, limit?: number, cursor?: string, options?: RawAxiosRequestConfig) { - return ChannelApiFp(this.configuration).searchChannels(q, limit, cursor, options).then((request) => request(this.axios, this.basePath)); - } - - /** - * Returns a list of trending channels based on activity - * @summary Channels by activity - * @param {TrendingChannelsTimeWindowEnum} [timeWindow] - * @param {number} [limit] Number of results to fetch (default 10, max 25) - * @param {string} [cursor] Pagination cursor. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof ChannelApi - */ - public trendingChannels(timeWindow?: TrendingChannelsTimeWindowEnum, limit?: number, cursor?: string, options?: RawAxiosRequestConfig) { - return ChannelApiFp(this.configuration).trendingChannels(timeWindow, limit, cursor, options).then((request) => request(this.axios, this.basePath)); - } - - /** - * Unfollow a channel - * @summary Unfollow a channel - * @param {ChannelFollowReqBody} channelFollowReqBody - * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof ChannelApi - */ - public unfollowChannel(channelFollowReqBody: ChannelFollowReqBody, options?: RawAxiosRequestConfig) { - return ChannelApiFp(this.configuration).unfollowChannel(channelFollowReqBody, options).then((request) => request(this.axios, this.basePath)); - } - - /** - * Returns a list of all channels with their details that an FID is a member of. Data may have a delay of up to 1 hour. - * @summary Member of - * @param {number} fid The FID of the user. - * @param {number} [limit] Number of results to fetch (default 20, max 100) - * @param {string} [cursor] Pagination cursor. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof ChannelApi - */ - public userChannelMemberships(fid: number, limit?: number, cursor?: string, options?: RawAxiosRequestConfig) { - return ChannelApiFp(this.configuration).userChannelMemberships(fid, limit, cursor, options).then((request) => request(this.axios, this.basePath)); - } - - /** - * Returns a list of all channels with their details that a FID follows. - * @summary Following - * @param {number} fid The FID of the user. - * @param {number} [limit] Number of results to fetch (default 25, max 100) - * @param {string} [cursor] Pagination cursor. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof ChannelApi - */ - public userChannels(fid: number, limit?: number, cursor?: string, options?: RawAxiosRequestConfig) { - return ChannelApiFp(this.configuration).userChannels(fid, limit, cursor, options).then((request) => request(this.axios, this.basePath)); - } -} - -/** - * @export - */ -export const TrendingChannelsTimeWindowEnum = { - _1d: '1d', - _7d: '7d', - _30d: '30d' -} as const; -export type TrendingChannelsTimeWindowEnum = typeof TrendingChannelsTimeWindowEnum[keyof typeof TrendingChannelsTimeWindowEnum]; - - -/** - * FeedApi - axios parameter creator - * @export - */ -export const FeedApiAxiosParamCreator = function (configuration?: Configuration) { - return { - /** - * Fetch casts based on filters. Ensure setting the correct parameters based on the feed_type and filter_type. - * @summary By filters - * @param {FeedType} feedType Defaults to following (requires FID or address). If set to filter (requires filter_type) - * @param {FilterType} [filterType] Used when feed_type=filter. Can be set to FIDs (requires FIDs) or parent_url (requires parent_url) or channel_id (requires channel_id) - * @param {number} [fid] (Optional) FID of user whose feed you want to create. By default, the API expects this field, except if you pass a filter_type - * @param {string} [fids] Used when filter_type=FIDs . Create a feed based on a list of FIDs. Max array size is 250. Requires feed_type and filter_type. - * @param {string} [parentUrl] Used when filter_type=parent_url can be used to fetch content under any parent url e.g. FIP-2 channels on Warpcast. Requires feed_type and filter_type - * @param {string} [channelId] Used when filter_type=channel_id can be used to fetch casts under a channel. Requires feed_type and filter_type. - * @param {boolean} [membersOnly] Used when filter_type=channel_id. Only include casts from members of the channel. True by default. - * @param {string} [embedUrl] Used when filter_type=embed_url can be used to fetch all casts with an embed url that contains embed_url. Requires feed_type and filter_type - * @param {Array} [embedTypes] Used when filter_type=embed_types can be used to fetch all casts with matching content types. Requires feed_type and filter_type - * @param {boolean} [withRecasts] Include recasts in the response, true by default - * @param {number} [limit] Number of results to fetch (default 25, max 100) - * @param {string} [cursor] Pagination cursor. - * @param {number} [viewerFid] Providing this will return a feed that respects this user\'s mutes and blocks and includes `viewer_context`. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - feed: async (feedType: FeedType, filterType?: FilterType, fid?: number, fids?: string, parentUrl?: string, channelId?: string, membersOnly?: boolean, embedUrl?: string, embedTypes?: Array, withRecasts?: boolean, limit?: number, cursor?: string, viewerFid?: number, options: RawAxiosRequestConfig = {}): Promise => { - // verify required parameter 'feedType' is not null or undefined - assertParamExists('feed', 'feedType', feedType) - const localVarPath = `/farcaster/feed`; - // use dummy base URL string because the URL constructor only accepts absolute URLs. - const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); - let baseOptions; - if (configuration) { - baseOptions = configuration.baseOptions; - } - - const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; - const localVarHeaderParameter = {} as any; - const localVarQueryParameter = {} as any; - - // authentication ApiKeyAuth required - await setApiKeyToObject(localVarHeaderParameter, "x-api-key", configuration) - - if (feedType !== undefined) { - localVarQueryParameter['feed_type'] = feedType; - } - - if (filterType !== undefined) { - localVarQueryParameter['filter_type'] = filterType; - } - - if (fid !== undefined) { - localVarQueryParameter['fid'] = fid; - } - - if (fids !== undefined) { - localVarQueryParameter['fids'] = fids; - } - - if (parentUrl !== undefined) { - localVarQueryParameter['parent_url'] = parentUrl; - } - - if (channelId !== undefined) { - localVarQueryParameter['channel_id'] = channelId; - } - - if (membersOnly !== undefined) { - localVarQueryParameter['members_only'] = membersOnly; - } - - if (embedUrl !== undefined) { - localVarQueryParameter['embed_url'] = embedUrl; - } - - if (embedTypes) { - localVarQueryParameter['embed_types'] = embedTypes.join(COLLECTION_FORMATS.csv); - } - - if (withRecasts !== undefined) { - localVarQueryParameter['with_recasts'] = withRecasts; - } - - if (limit !== undefined) { - localVarQueryParameter['limit'] = limit; - } - - if (cursor !== undefined) { - localVarQueryParameter['cursor'] = cursor; - } - - if (viewerFid !== undefined) { - localVarQueryParameter['viewer_fid'] = viewerFid; - } - - - - setSearchParams(localVarUrlObj, localVarQueryParameter); - let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; - localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; - - return { - url: toPathString(localVarUrlObj), - options: localVarRequestOptions, - }; - }, - /** - * Fetch feed based on channel IDs - * @summary By channel IDs - * @param {string} channelIds Comma separated list of channel IDs e.g. neynar,farcaster - * @param {boolean} [withRecasts] Include recasts in the response, true by default - * @param {number} [viewerFid] Providing this will return a feed that respects this user\'s mutes and blocks and includes `viewer_context`. - * @param {boolean} [withReplies] Include replies in the response, false by default - * @param {boolean} [membersOnly] Only include casts from members of the channel. True by default. - * @param {number} [limit] Number of results to fetch (default 25, max 100) - * @param {string} [cursor] Pagination cursor. - * @param {boolean} [shouldModerate] If true, only casts that have been liked by the moderator (if one exists) will be returned. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - feedChannels: async (channelIds: string, withRecasts?: boolean, viewerFid?: number, withReplies?: boolean, membersOnly?: boolean, limit?: number, cursor?: string, shouldModerate?: boolean, options: RawAxiosRequestConfig = {}): Promise => { - // verify required parameter 'channelIds' is not null or undefined - assertParamExists('feedChannels', 'channelIds', channelIds) - const localVarPath = `/farcaster/feed/channels`; - // use dummy base URL string because the URL constructor only accepts absolute URLs. - const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); - let baseOptions; - if (configuration) { - baseOptions = configuration.baseOptions; - } - - const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; - const localVarHeaderParameter = {} as any; - const localVarQueryParameter = {} as any; - - // authentication ApiKeyAuth required - await setApiKeyToObject(localVarHeaderParameter, "x-api-key", configuration) - - if (channelIds !== undefined) { - localVarQueryParameter['channel_ids'] = channelIds; - } - - if (withRecasts !== undefined) { - localVarQueryParameter['with_recasts'] = withRecasts; - } - - if (viewerFid !== undefined) { - localVarQueryParameter['viewer_fid'] = viewerFid; - } - - if (withReplies !== undefined) { - localVarQueryParameter['with_replies'] = withReplies; - } - - if (membersOnly !== undefined) { - localVarQueryParameter['members_only'] = membersOnly; - } - - if (limit !== undefined) { - localVarQueryParameter['limit'] = limit; - } - - if (cursor !== undefined) { - localVarQueryParameter['cursor'] = cursor; - } - - if (shouldModerate !== undefined) { - localVarQueryParameter['should_moderate'] = shouldModerate; - } - - - - setSearchParams(localVarUrlObj, localVarQueryParameter); - let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; - localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; - - return { - url: toPathString(localVarUrlObj), - options: localVarRequestOptions, - }; - }, - /** - * Fetch feed based on who a user is following - * @summary Following - * @param {number} fid FID of user whose feed you want to create - * @param {number} [viewerFid] Providing this will return a feed that respects this user\'s mutes and blocks and includes `viewer_context`. - * @param {boolean} [withRecasts] Include recasts in the response, true by default - * @param {number} [limit] Number of results to fetch (default 25, max 100) - * @param {string} [cursor] Pagination cursor. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - feedFollowing: async (fid: number, viewerFid?: number, withRecasts?: boolean, limit?: number, cursor?: string, options: RawAxiosRequestConfig = {}): Promise => { - // verify required parameter 'fid' is not null or undefined - assertParamExists('feedFollowing', 'fid', fid) - const localVarPath = `/farcaster/feed/following`; - // use dummy base URL string because the URL constructor only accepts absolute URLs. - const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); - let baseOptions; - if (configuration) { - baseOptions = configuration.baseOptions; - } - - const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; - const localVarHeaderParameter = {} as any; - const localVarQueryParameter = {} as any; - - // authentication ApiKeyAuth required - await setApiKeyToObject(localVarHeaderParameter, "x-api-key", configuration) - - if (fid !== undefined) { - localVarQueryParameter['fid'] = fid; - } - - if (viewerFid !== undefined) { - localVarQueryParameter['viewer_fid'] = viewerFid; - } - - if (withRecasts !== undefined) { - localVarQueryParameter['with_recasts'] = withRecasts; - } - - if (limit !== undefined) { - localVarQueryParameter['limit'] = limit; - } - - if (cursor !== undefined) { - localVarQueryParameter['cursor'] = cursor; - } - - - - setSearchParams(localVarUrlObj, localVarQueryParameter); - let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; - localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; - - return { - url: toPathString(localVarUrlObj), - options: localVarRequestOptions, - }; - }, - /** - * Fetch a personalized For You feed for a user - * @summary For you - * @param {number} fid FID of user whose feed you want to create - * @param {number} [viewerFid] Providing this will return a feed that respects this user\'s mutes and blocks and includes `viewer_context`. - * @param {ForYouProvider} [provider] - * @param {number} [limit] Number of results to fetch (default 25, max 50) - * @param {string} [cursor] Pagination cursor. - * @param {string} [providerMetadata] provider_metadata is a URI-encoded stringified JSON object that can be used to pass additional metadata to the provider. Only available for mbd provider right now. See [here](https://docs.neynar.com/docs/feed-for-you-w-external-providers) on how to use. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - feedForYou: async (fid: number, viewerFid?: number, provider?: ForYouProvider, limit?: number, cursor?: string, providerMetadata?: string, options: RawAxiosRequestConfig = {}): Promise => { - // verify required parameter 'fid' is not null or undefined - assertParamExists('feedForYou', 'fid', fid) - const localVarPath = `/farcaster/feed/for_you`; - // use dummy base URL string because the URL constructor only accepts absolute URLs. - const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); - let baseOptions; - if (configuration) { - baseOptions = configuration.baseOptions; - } - - const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; - const localVarHeaderParameter = {} as any; - const localVarQueryParameter = {} as any; - - // authentication ApiKeyAuth required - await setApiKeyToObject(localVarHeaderParameter, "x-api-key", configuration) - - if (fid !== undefined) { - localVarQueryParameter['fid'] = fid; - } - - if (viewerFid !== undefined) { - localVarQueryParameter['viewer_fid'] = viewerFid; - } - - if (provider !== undefined) { - localVarQueryParameter['provider'] = provider; - } - - if (limit !== undefined) { - localVarQueryParameter['limit'] = limit; - } - - if (cursor !== undefined) { - localVarQueryParameter['cursor'] = cursor; - } - - if (providerMetadata !== undefined) { - localVarQueryParameter['provider_metadata'] = providerMetadata; - } - - - - setSearchParams(localVarUrlObj, localVarQueryParameter); - let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; - localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; - - return { - url: toPathString(localVarUrlObj), - options: localVarRequestOptions, - }; - }, - /** - * Fetch feed of casts with Frames, reverse chronological order - * @summary Casts with Frames - * @param {number} [limit] Number of results to fetch (default 25, max 100) - * @param {number} [viewerFid] Providing this will return a feed that respects this user\'s mutes and blocks and includes `viewer_context`. - * @param {string} [cursor] Pagination cursor. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - feedFrames: async (limit?: number, viewerFid?: number, cursor?: string, options: RawAxiosRequestConfig = {}): Promise => { - const localVarPath = `/farcaster/feed/frames`; - // use dummy base URL string because the URL constructor only accepts absolute URLs. - const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); - let baseOptions; - if (configuration) { - baseOptions = configuration.baseOptions; - } - - const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; - const localVarHeaderParameter = {} as any; - const localVarQueryParameter = {} as any; - - // authentication ApiKeyAuth required - await setApiKeyToObject(localVarHeaderParameter, "x-api-key", configuration) - - if (limit !== undefined) { - localVarQueryParameter['limit'] = limit; - } - - if (viewerFid !== undefined) { - localVarQueryParameter['viewer_fid'] = viewerFid; - } - - if (cursor !== undefined) { - localVarQueryParameter['cursor'] = cursor; - } - - - - setSearchParams(localVarUrlObj, localVarQueryParameter); - let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; - localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; - - return { - url: toPathString(localVarUrlObj), - options: localVarRequestOptions, - }; - }, - /** - * Fetch feed based on parent URLs - * @summary By parent URLs - * @param {string} parentUrls Comma separated list of parent_urls - * @param {boolean} [withRecasts] Include recasts in the response, true by default - * @param {number} [viewerFid] Providing this will return a feed that respects this user\'s mutes and blocks and includes `viewer_context`. - * @param {boolean} [withReplies] Include replies in the response, false by default - * @param {number} [limit] Number of results to fetch (default 25, max 100) - * @param {string} [cursor] Pagination cursor. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - feedParentUrls: async (parentUrls: string, withRecasts?: boolean, viewerFid?: number, withReplies?: boolean, limit?: number, cursor?: string, options: RawAxiosRequestConfig = {}): Promise => { - // verify required parameter 'parentUrls' is not null or undefined - assertParamExists('feedParentUrls', 'parentUrls', parentUrls) - const localVarPath = `/farcaster/feed/parent_urls`; - // use dummy base URL string because the URL constructor only accepts absolute URLs. - const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); - let baseOptions; - if (configuration) { - baseOptions = configuration.baseOptions; - } - - const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; - const localVarHeaderParameter = {} as any; - const localVarQueryParameter = {} as any; - - // authentication ApiKeyAuth required - await setApiKeyToObject(localVarHeaderParameter, "x-api-key", configuration) - - if (parentUrls !== undefined) { - localVarQueryParameter['parent_urls'] = parentUrls; - } - - if (withRecasts !== undefined) { - localVarQueryParameter['with_recasts'] = withRecasts; - } - - if (viewerFid !== undefined) { - localVarQueryParameter['viewer_fid'] = viewerFid; - } - - if (withReplies !== undefined) { - localVarQueryParameter['with_replies'] = withReplies; - } - - if (limit !== undefined) { - localVarQueryParameter['limit'] = limit; - } - - if (cursor !== undefined) { - localVarQueryParameter['cursor'] = cursor; - } - - - - setSearchParams(localVarUrlObj, localVarQueryParameter); - let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; - localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; - - return { - url: toPathString(localVarUrlObj), - options: localVarRequestOptions, - }; - }, - /** - * Fetch trending casts or on the global feed or channels feeds. 7d time window available for channel feeds only. - * @summary Trending casts - * @param {number} [limit] Number of results to fetch (max 10) - * @param {string} [cursor] Pagination cursor - * @param {number} [viewerFid] Providing this will return a feed that respects this user\'s mutes and blocks and includes `viewer_context`. - * @param {FeedTrendingTimeWindowEnum} [timeWindow] Time window for trending casts (7d window for channel feeds only) - * @param {string} [channelId] Channel ID to filter trending casts. Less active channels might have no casts in the time window selected. - * @param {FeedTrendingProvider} [provider] The provider of the trending casts feed. - * @param {string} [providerMetadata] provider_metadata is a URI-encoded stringified JSON object that can be used to pass additional metadata to the provider. Only available for mbd provider right now. See [here](https://docs.neynar.com/docs/feed-for-you-w-external-providers) on how to use. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - feedTrending: async (limit?: number, cursor?: string, viewerFid?: number, timeWindow?: FeedTrendingTimeWindowEnum, channelId?: string, provider?: FeedTrendingProvider, providerMetadata?: string, options: RawAxiosRequestConfig = {}): Promise => { - const localVarPath = `/farcaster/feed/trending`; - // use dummy base URL string because the URL constructor only accepts absolute URLs. - const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); - let baseOptions; - if (configuration) { - baseOptions = configuration.baseOptions; - } - - const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; - const localVarHeaderParameter = {} as any; - const localVarQueryParameter = {} as any; - - // authentication ApiKeyAuth required - await setApiKeyToObject(localVarHeaderParameter, "x-api-key", configuration) - - if (limit !== undefined) { - localVarQueryParameter['limit'] = limit; - } - - if (cursor !== undefined) { - localVarQueryParameter['cursor'] = cursor; - } - - if (viewerFid !== undefined) { - localVarQueryParameter['viewer_fid'] = viewerFid; - } - - if (timeWindow !== undefined) { - localVarQueryParameter['time_window'] = timeWindow; - } - - if (channelId !== undefined) { - localVarQueryParameter['channel_id'] = channelId; - } - - if (provider !== undefined) { - localVarQueryParameter['provider'] = provider; - } - - if (providerMetadata !== undefined) { - localVarQueryParameter['provider_metadata'] = providerMetadata; - } - - - - setSearchParams(localVarUrlObj, localVarQueryParameter); - let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; - localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; - - return { - url: toPathString(localVarUrlObj), - options: localVarRequestOptions, - }; - }, - /** - * Fetch casts for a given user FID in reverse chronological order. Also allows filtering by parent_url and channel - * @summary Chronologically - * @param {number} fid FID of user whose recent casts you want to fetch - * @param {number} [viewerFid] FID of the user viewing the feed - * @param {number} [limit] Number of results to fetch - * @param {string} [cursor] Pagination cursor - * @param {boolean} [includeReplies] Include reply casts by the author in the response, true by default - * @param {string} [parentUrl] Parent URL to filter the feed; mutually exclusive with channel_id - * @param {string} [channelId] Channel ID to filter the feed; mutually exclusive with parent_url - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - feedUserCasts: async (fid: number, viewerFid?: number, limit?: number, cursor?: string, includeReplies?: boolean, parentUrl?: string, channelId?: string, options: RawAxiosRequestConfig = {}): Promise => { - // verify required parameter 'fid' is not null or undefined - assertParamExists('feedUserCasts', 'fid', fid) - const localVarPath = `/farcaster/feed/user/casts`; - // use dummy base URL string because the URL constructor only accepts absolute URLs. - const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); - let baseOptions; - if (configuration) { - baseOptions = configuration.baseOptions; - } - - const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; - const localVarHeaderParameter = {} as any; - const localVarQueryParameter = {} as any; - - // authentication ApiKeyAuth required - await setApiKeyToObject(localVarHeaderParameter, "x-api-key", configuration) - - if (fid !== undefined) { - localVarQueryParameter['fid'] = fid; - } - - if (viewerFid !== undefined) { - localVarQueryParameter['viewer_fid'] = viewerFid; - } - - if (limit !== undefined) { - localVarQueryParameter['limit'] = limit; - } - - if (cursor !== undefined) { - localVarQueryParameter['cursor'] = cursor; - } - - if (includeReplies !== undefined) { - localVarQueryParameter['include_replies'] = includeReplies; - } - - if (parentUrl !== undefined) { - localVarQueryParameter['parent_url'] = parentUrl; - } - - if (channelId !== undefined) { - localVarQueryParameter['channel_id'] = channelId; - } - - - - setSearchParams(localVarUrlObj, localVarQueryParameter); - let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; - localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; - - return { - url: toPathString(localVarUrlObj), - options: localVarRequestOptions, - }; - }, - /** - * Fetch 10 most popular casts for a given user FID; popularity based on replies, likes and recasts; sorted by most popular first - * @summary 10 most popular casts - * @param {number} fid FID of user whose feed you want to create - * @param {number} [viewerFid] - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - feedUserPopular: async (fid: number, viewerFid?: number, options: RawAxiosRequestConfig = {}): Promise => { - // verify required parameter 'fid' is not null or undefined - assertParamExists('feedUserPopular', 'fid', fid) - const localVarPath = `/farcaster/feed/user/popular`; - // use dummy base URL string because the URL constructor only accepts absolute URLs. - const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); - let baseOptions; - if (configuration) { - baseOptions = configuration.baseOptions; - } - - const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; - const localVarHeaderParameter = {} as any; - const localVarQueryParameter = {} as any; - - // authentication ApiKeyAuth required - await setApiKeyToObject(localVarHeaderParameter, "x-api-key", configuration) - - if (fid !== undefined) { - localVarQueryParameter['fid'] = fid; - } - - if (viewerFid !== undefined) { - localVarQueryParameter['viewer_fid'] = viewerFid; - } - - - - setSearchParams(localVarUrlObj, localVarQueryParameter); - let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; - localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; - - return { - url: toPathString(localVarUrlObj), - options: localVarRequestOptions, - }; - }, - /** - * Fetch recent replies and recasts for a given user FID; sorted by most recent first - * @summary Replies and recasts - * @param {number} fid FID of user whose replies and recasts you want to fetch - * @param {FeedUserRepliesRecastsFilterEnum} [filter] filter to fetch only replies or recasts - * @param {number} [limit] Number of results to fetch (default 25, max 100) - * @param {string} [cursor] Pagination cursor. - * @param {number} [viewerFid] Providing this will return a feed that respects this user\'s mutes and blocks and includes `viewer_context`. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - feedUserRepliesRecasts: async (fid: number, filter?: FeedUserRepliesRecastsFilterEnum, limit?: number, cursor?: string, viewerFid?: number, options: RawAxiosRequestConfig = {}): Promise => { - // verify required parameter 'fid' is not null or undefined - assertParamExists('feedUserRepliesRecasts', 'fid', fid) - const localVarPath = `/farcaster/feed/user/replies_and_recasts`; - // use dummy base URL string because the URL constructor only accepts absolute URLs. - const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); - let baseOptions; - if (configuration) { - baseOptions = configuration.baseOptions; - } - - const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; - const localVarHeaderParameter = {} as any; - const localVarQueryParameter = {} as any; - - // authentication ApiKeyAuth required - await setApiKeyToObject(localVarHeaderParameter, "x-api-key", configuration) - - if (fid !== undefined) { - localVarQueryParameter['fid'] = fid; - } - - if (filter !== undefined) { - localVarQueryParameter['filter'] = filter; - } - - if (limit !== undefined) { - localVarQueryParameter['limit'] = limit; - } - - if (cursor !== undefined) { - localVarQueryParameter['cursor'] = cursor; - } - - if (viewerFid !== undefined) { - localVarQueryParameter['viewer_fid'] = viewerFid; - } - - - - setSearchParams(localVarUrlObj, localVarQueryParameter); - let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; - localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; - - return { - url: toPathString(localVarUrlObj), - options: localVarRequestOptions, - }; - }, - } -}; - -/** - * FeedApi - functional programming interface - * @export - */ -export const FeedApiFp = function(configuration?: Configuration) { - const localVarAxiosParamCreator = FeedApiAxiosParamCreator(configuration) - return { - /** - * Fetch casts based on filters. Ensure setting the correct parameters based on the feed_type and filter_type. - * @summary By filters - * @param {FeedType} feedType Defaults to following (requires FID or address). If set to filter (requires filter_type) - * @param {FilterType} [filterType] Used when feed_type=filter. Can be set to FIDs (requires FIDs) or parent_url (requires parent_url) or channel_id (requires channel_id) - * @param {number} [fid] (Optional) FID of user whose feed you want to create. By default, the API expects this field, except if you pass a filter_type - * @param {string} [fids] Used when filter_type=FIDs . Create a feed based on a list of FIDs. Max array size is 250. Requires feed_type and filter_type. - * @param {string} [parentUrl] Used when filter_type=parent_url can be used to fetch content under any parent url e.g. FIP-2 channels on Warpcast. Requires feed_type and filter_type - * @param {string} [channelId] Used when filter_type=channel_id can be used to fetch casts under a channel. Requires feed_type and filter_type. - * @param {boolean} [membersOnly] Used when filter_type=channel_id. Only include casts from members of the channel. True by default. - * @param {string} [embedUrl] Used when filter_type=embed_url can be used to fetch all casts with an embed url that contains embed_url. Requires feed_type and filter_type - * @param {Array} [embedTypes] Used when filter_type=embed_types can be used to fetch all casts with matching content types. Requires feed_type and filter_type - * @param {boolean} [withRecasts] Include recasts in the response, true by default - * @param {number} [limit] Number of results to fetch (default 25, max 100) - * @param {string} [cursor] Pagination cursor. - * @param {number} [viewerFid] Providing this will return a feed that respects this user\'s mutes and blocks and includes `viewer_context`. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - async feed(feedType: FeedType, filterType?: FilterType, fid?: number, fids?: string, parentUrl?: string, channelId?: string, membersOnly?: boolean, embedUrl?: string, embedTypes?: Array, withRecasts?: boolean, limit?: number, cursor?: string, viewerFid?: number, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.feed(feedType, filterType, fid, fids, parentUrl, channelId, membersOnly, embedUrl, embedTypes, withRecasts, limit, cursor, viewerFid, options); - const localVarOperationServerIndex = configuration?.serverIndex ?? 0; - const localVarOperationServerBasePath = operationServerMap['FeedApi.feed']?.[localVarOperationServerIndex]?.url; - return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); - }, - /** - * Fetch feed based on channel IDs - * @summary By channel IDs - * @param {string} channelIds Comma separated list of channel IDs e.g. neynar,farcaster - * @param {boolean} [withRecasts] Include recasts in the response, true by default - * @param {number} [viewerFid] Providing this will return a feed that respects this user\'s mutes and blocks and includes `viewer_context`. - * @param {boolean} [withReplies] Include replies in the response, false by default - * @param {boolean} [membersOnly] Only include casts from members of the channel. True by default. - * @param {number} [limit] Number of results to fetch (default 25, max 100) - * @param {string} [cursor] Pagination cursor. - * @param {boolean} [shouldModerate] If true, only casts that have been liked by the moderator (if one exists) will be returned. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - async feedChannels(channelIds: string, withRecasts?: boolean, viewerFid?: number, withReplies?: boolean, membersOnly?: boolean, limit?: number, cursor?: string, shouldModerate?: boolean, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.feedChannels(channelIds, withRecasts, viewerFid, withReplies, membersOnly, limit, cursor, shouldModerate, options); - const localVarOperationServerIndex = configuration?.serverIndex ?? 0; - const localVarOperationServerBasePath = operationServerMap['FeedApi.feedChannels']?.[localVarOperationServerIndex]?.url; - return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); - }, - /** - * Fetch feed based on who a user is following - * @summary Following - * @param {number} fid FID of user whose feed you want to create - * @param {number} [viewerFid] Providing this will return a feed that respects this user\'s mutes and blocks and includes `viewer_context`. - * @param {boolean} [withRecasts] Include recasts in the response, true by default - * @param {number} [limit] Number of results to fetch (default 25, max 100) - * @param {string} [cursor] Pagination cursor. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - async feedFollowing(fid: number, viewerFid?: number, withRecasts?: boolean, limit?: number, cursor?: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.feedFollowing(fid, viewerFid, withRecasts, limit, cursor, options); - const localVarOperationServerIndex = configuration?.serverIndex ?? 0; - const localVarOperationServerBasePath = operationServerMap['FeedApi.feedFollowing']?.[localVarOperationServerIndex]?.url; - return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); - }, - /** - * Fetch a personalized For You feed for a user - * @summary For you - * @param {number} fid FID of user whose feed you want to create - * @param {number} [viewerFid] Providing this will return a feed that respects this user\'s mutes and blocks and includes `viewer_context`. - * @param {ForYouProvider} [provider] - * @param {number} [limit] Number of results to fetch (default 25, max 50) - * @param {string} [cursor] Pagination cursor. - * @param {string} [providerMetadata] provider_metadata is a URI-encoded stringified JSON object that can be used to pass additional metadata to the provider. Only available for mbd provider right now. See [here](https://docs.neynar.com/docs/feed-for-you-w-external-providers) on how to use. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - async feedForYou(fid: number, viewerFid?: number, provider?: ForYouProvider, limit?: number, cursor?: string, providerMetadata?: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.feedForYou(fid, viewerFid, provider, limit, cursor, providerMetadata, options); - const localVarOperationServerIndex = configuration?.serverIndex ?? 0; - const localVarOperationServerBasePath = operationServerMap['FeedApi.feedForYou']?.[localVarOperationServerIndex]?.url; - return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); - }, - /** - * Fetch feed of casts with Frames, reverse chronological order - * @summary Casts with Frames - * @param {number} [limit] Number of results to fetch (default 25, max 100) - * @param {number} [viewerFid] Providing this will return a feed that respects this user\'s mutes and blocks and includes `viewer_context`. - * @param {string} [cursor] Pagination cursor. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - async feedFrames(limit?: number, viewerFid?: number, cursor?: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.feedFrames(limit, viewerFid, cursor, options); - const localVarOperationServerIndex = configuration?.serverIndex ?? 0; - const localVarOperationServerBasePath = operationServerMap['FeedApi.feedFrames']?.[localVarOperationServerIndex]?.url; - return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); - }, - /** - * Fetch feed based on parent URLs - * @summary By parent URLs - * @param {string} parentUrls Comma separated list of parent_urls - * @param {boolean} [withRecasts] Include recasts in the response, true by default - * @param {number} [viewerFid] Providing this will return a feed that respects this user\'s mutes and blocks and includes `viewer_context`. - * @param {boolean} [withReplies] Include replies in the response, false by default - * @param {number} [limit] Number of results to fetch (default 25, max 100) - * @param {string} [cursor] Pagination cursor. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - async feedParentUrls(parentUrls: string, withRecasts?: boolean, viewerFid?: number, withReplies?: boolean, limit?: number, cursor?: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.feedParentUrls(parentUrls, withRecasts, viewerFid, withReplies, limit, cursor, options); - const localVarOperationServerIndex = configuration?.serverIndex ?? 0; - const localVarOperationServerBasePath = operationServerMap['FeedApi.feedParentUrls']?.[localVarOperationServerIndex]?.url; - return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); - }, - /** - * Fetch trending casts or on the global feed or channels feeds. 7d time window available for channel feeds only. - * @summary Trending casts - * @param {number} [limit] Number of results to fetch (max 10) - * @param {string} [cursor] Pagination cursor - * @param {number} [viewerFid] Providing this will return a feed that respects this user\'s mutes and blocks and includes `viewer_context`. - * @param {FeedTrendingTimeWindowEnum} [timeWindow] Time window for trending casts (7d window for channel feeds only) - * @param {string} [channelId] Channel ID to filter trending casts. Less active channels might have no casts in the time window selected. - * @param {FeedTrendingProvider} [provider] The provider of the trending casts feed. - * @param {string} [providerMetadata] provider_metadata is a URI-encoded stringified JSON object that can be used to pass additional metadata to the provider. Only available for mbd provider right now. See [here](https://docs.neynar.com/docs/feed-for-you-w-external-providers) on how to use. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - async feedTrending(limit?: number, cursor?: string, viewerFid?: number, timeWindow?: FeedTrendingTimeWindowEnum, channelId?: string, provider?: FeedTrendingProvider, providerMetadata?: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.feedTrending(limit, cursor, viewerFid, timeWindow, channelId, provider, providerMetadata, options); - const localVarOperationServerIndex = configuration?.serverIndex ?? 0; - const localVarOperationServerBasePath = operationServerMap['FeedApi.feedTrending']?.[localVarOperationServerIndex]?.url; - return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); - }, - /** - * Fetch casts for a given user FID in reverse chronological order. Also allows filtering by parent_url and channel - * @summary Chronologically - * @param {number} fid FID of user whose recent casts you want to fetch - * @param {number} [viewerFid] FID of the user viewing the feed - * @param {number} [limit] Number of results to fetch - * @param {string} [cursor] Pagination cursor - * @param {boolean} [includeReplies] Include reply casts by the author in the response, true by default - * @param {string} [parentUrl] Parent URL to filter the feed; mutually exclusive with channel_id - * @param {string} [channelId] Channel ID to filter the feed; mutually exclusive with parent_url - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - async feedUserCasts(fid: number, viewerFid?: number, limit?: number, cursor?: string, includeReplies?: boolean, parentUrl?: string, channelId?: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.feedUserCasts(fid, viewerFid, limit, cursor, includeReplies, parentUrl, channelId, options); - const localVarOperationServerIndex = configuration?.serverIndex ?? 0; - const localVarOperationServerBasePath = operationServerMap['FeedApi.feedUserCasts']?.[localVarOperationServerIndex]?.url; - return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); - }, - /** - * Fetch 10 most popular casts for a given user FID; popularity based on replies, likes and recasts; sorted by most popular first - * @summary 10 most popular casts - * @param {number} fid FID of user whose feed you want to create - * @param {number} [viewerFid] - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - async feedUserPopular(fid: number, viewerFid?: number, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.feedUserPopular(fid, viewerFid, options); - const localVarOperationServerIndex = configuration?.serverIndex ?? 0; - const localVarOperationServerBasePath = operationServerMap['FeedApi.feedUserPopular']?.[localVarOperationServerIndex]?.url; - return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); - }, - /** - * Fetch recent replies and recasts for a given user FID; sorted by most recent first - * @summary Replies and recasts - * @param {number} fid FID of user whose replies and recasts you want to fetch - * @param {FeedUserRepliesRecastsFilterEnum} [filter] filter to fetch only replies or recasts - * @param {number} [limit] Number of results to fetch (default 25, max 100) - * @param {string} [cursor] Pagination cursor. - * @param {number} [viewerFid] Providing this will return a feed that respects this user\'s mutes and blocks and includes `viewer_context`. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - async feedUserRepliesRecasts(fid: number, filter?: FeedUserRepliesRecastsFilterEnum, limit?: number, cursor?: string, viewerFid?: number, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.feedUserRepliesRecasts(fid, filter, limit, cursor, viewerFid, options); - const localVarOperationServerIndex = configuration?.serverIndex ?? 0; - const localVarOperationServerBasePath = operationServerMap['FeedApi.feedUserRepliesRecasts']?.[localVarOperationServerIndex]?.url; - return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); - }, - } -}; - -/** - * FeedApi - factory interface - * @export - */ -export const FeedApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) { - const localVarFp = FeedApiFp(configuration) - return { - /** - * Fetch casts based on filters. Ensure setting the correct parameters based on the feed_type and filter_type. - * @summary By filters - * @param {FeedType} feedType Defaults to following (requires FID or address). If set to filter (requires filter_type) - * @param {FilterType} [filterType] Used when feed_type=filter. Can be set to FIDs (requires FIDs) or parent_url (requires parent_url) or channel_id (requires channel_id) - * @param {number} [fid] (Optional) FID of user whose feed you want to create. By default, the API expects this field, except if you pass a filter_type - * @param {string} [fids] Used when filter_type=FIDs . Create a feed based on a list of FIDs. Max array size is 250. Requires feed_type and filter_type. - * @param {string} [parentUrl] Used when filter_type=parent_url can be used to fetch content under any parent url e.g. FIP-2 channels on Warpcast. Requires feed_type and filter_type - * @param {string} [channelId] Used when filter_type=channel_id can be used to fetch casts under a channel. Requires feed_type and filter_type. - * @param {boolean} [membersOnly] Used when filter_type=channel_id. Only include casts from members of the channel. True by default. - * @param {string} [embedUrl] Used when filter_type=embed_url can be used to fetch all casts with an embed url that contains embed_url. Requires feed_type and filter_type - * @param {Array} [embedTypes] Used when filter_type=embed_types can be used to fetch all casts with matching content types. Requires feed_type and filter_type - * @param {boolean} [withRecasts] Include recasts in the response, true by default - * @param {number} [limit] Number of results to fetch (default 25, max 100) - * @param {string} [cursor] Pagination cursor. - * @param {number} [viewerFid] Providing this will return a feed that respects this user\'s mutes and blocks and includes `viewer_context`. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - feed(feedType: FeedType, filterType?: FilterType, fid?: number, fids?: string, parentUrl?: string, channelId?: string, membersOnly?: boolean, embedUrl?: string, embedTypes?: Array, withRecasts?: boolean, limit?: number, cursor?: string, viewerFid?: number, options?: RawAxiosRequestConfig): AxiosPromise { - return localVarFp.feed(feedType, filterType, fid, fids, parentUrl, channelId, membersOnly, embedUrl, embedTypes, withRecasts, limit, cursor, viewerFid, options).then((request) => request(axios, basePath)); - }, - /** - * Fetch feed based on channel IDs - * @summary By channel IDs - * @param {string} channelIds Comma separated list of channel IDs e.g. neynar,farcaster - * @param {boolean} [withRecasts] Include recasts in the response, true by default - * @param {number} [viewerFid] Providing this will return a feed that respects this user\'s mutes and blocks and includes `viewer_context`. - * @param {boolean} [withReplies] Include replies in the response, false by default - * @param {boolean} [membersOnly] Only include casts from members of the channel. True by default. - * @param {number} [limit] Number of results to fetch (default 25, max 100) - * @param {string} [cursor] Pagination cursor. - * @param {boolean} [shouldModerate] If true, only casts that have been liked by the moderator (if one exists) will be returned. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - feedChannels(channelIds: string, withRecasts?: boolean, viewerFid?: number, withReplies?: boolean, membersOnly?: boolean, limit?: number, cursor?: string, shouldModerate?: boolean, options?: RawAxiosRequestConfig): AxiosPromise { - return localVarFp.feedChannels(channelIds, withRecasts, viewerFid, withReplies, membersOnly, limit, cursor, shouldModerate, options).then((request) => request(axios, basePath)); - }, - /** - * Fetch feed based on who a user is following - * @summary Following - * @param {number} fid FID of user whose feed you want to create - * @param {number} [viewerFid] Providing this will return a feed that respects this user\'s mutes and blocks and includes `viewer_context`. - * @param {boolean} [withRecasts] Include recasts in the response, true by default - * @param {number} [limit] Number of results to fetch (default 25, max 100) - * @param {string} [cursor] Pagination cursor. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - feedFollowing(fid: number, viewerFid?: number, withRecasts?: boolean, limit?: number, cursor?: string, options?: RawAxiosRequestConfig): AxiosPromise { - return localVarFp.feedFollowing(fid, viewerFid, withRecasts, limit, cursor, options).then((request) => request(axios, basePath)); - }, - /** - * Fetch a personalized For You feed for a user - * @summary For you - * @param {number} fid FID of user whose feed you want to create - * @param {number} [viewerFid] Providing this will return a feed that respects this user\'s mutes and blocks and includes `viewer_context`. - * @param {ForYouProvider} [provider] - * @param {number} [limit] Number of results to fetch (default 25, max 50) - * @param {string} [cursor] Pagination cursor. - * @param {string} [providerMetadata] provider_metadata is a URI-encoded stringified JSON object that can be used to pass additional metadata to the provider. Only available for mbd provider right now. See [here](https://docs.neynar.com/docs/feed-for-you-w-external-providers) on how to use. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - feedForYou(fid: number, viewerFid?: number, provider?: ForYouProvider, limit?: number, cursor?: string, providerMetadata?: string, options?: RawAxiosRequestConfig): AxiosPromise { - return localVarFp.feedForYou(fid, viewerFid, provider, limit, cursor, providerMetadata, options).then((request) => request(axios, basePath)); - }, - /** - * Fetch feed of casts with Frames, reverse chronological order - * @summary Casts with Frames - * @param {number} [limit] Number of results to fetch (default 25, max 100) - * @param {number} [viewerFid] Providing this will return a feed that respects this user\'s mutes and blocks and includes `viewer_context`. - * @param {string} [cursor] Pagination cursor. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - feedFrames(limit?: number, viewerFid?: number, cursor?: string, options?: RawAxiosRequestConfig): AxiosPromise { - return localVarFp.feedFrames(limit, viewerFid, cursor, options).then((request) => request(axios, basePath)); - }, - /** - * Fetch feed based on parent URLs - * @summary By parent URLs - * @param {string} parentUrls Comma separated list of parent_urls - * @param {boolean} [withRecasts] Include recasts in the response, true by default - * @param {number} [viewerFid] Providing this will return a feed that respects this user\'s mutes and blocks and includes `viewer_context`. - * @param {boolean} [withReplies] Include replies in the response, false by default - * @param {number} [limit] Number of results to fetch (default 25, max 100) - * @param {string} [cursor] Pagination cursor. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - feedParentUrls(parentUrls: string, withRecasts?: boolean, viewerFid?: number, withReplies?: boolean, limit?: number, cursor?: string, options?: RawAxiosRequestConfig): AxiosPromise { - return localVarFp.feedParentUrls(parentUrls, withRecasts, viewerFid, withReplies, limit, cursor, options).then((request) => request(axios, basePath)); - }, - /** - * Fetch trending casts or on the global feed or channels feeds. 7d time window available for channel feeds only. - * @summary Trending casts - * @param {number} [limit] Number of results to fetch (max 10) - * @param {string} [cursor] Pagination cursor - * @param {number} [viewerFid] Providing this will return a feed that respects this user\'s mutes and blocks and includes `viewer_context`. - * @param {FeedTrendingTimeWindowEnum} [timeWindow] Time window for trending casts (7d window for channel feeds only) - * @param {string} [channelId] Channel ID to filter trending casts. Less active channels might have no casts in the time window selected. - * @param {FeedTrendingProvider} [provider] The provider of the trending casts feed. - * @param {string} [providerMetadata] provider_metadata is a URI-encoded stringified JSON object that can be used to pass additional metadata to the provider. Only available for mbd provider right now. See [here](https://docs.neynar.com/docs/feed-for-you-w-external-providers) on how to use. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - feedTrending(limit?: number, cursor?: string, viewerFid?: number, timeWindow?: FeedTrendingTimeWindowEnum, channelId?: string, provider?: FeedTrendingProvider, providerMetadata?: string, options?: RawAxiosRequestConfig): AxiosPromise { - return localVarFp.feedTrending(limit, cursor, viewerFid, timeWindow, channelId, provider, providerMetadata, options).then((request) => request(axios, basePath)); - }, - /** - * Fetch casts for a given user FID in reverse chronological order. Also allows filtering by parent_url and channel - * @summary Chronologically - * @param {number} fid FID of user whose recent casts you want to fetch - * @param {number} [viewerFid] FID of the user viewing the feed - * @param {number} [limit] Number of results to fetch - * @param {string} [cursor] Pagination cursor - * @param {boolean} [includeReplies] Include reply casts by the author in the response, true by default - * @param {string} [parentUrl] Parent URL to filter the feed; mutually exclusive with channel_id - * @param {string} [channelId] Channel ID to filter the feed; mutually exclusive with parent_url - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - feedUserCasts(fid: number, viewerFid?: number, limit?: number, cursor?: string, includeReplies?: boolean, parentUrl?: string, channelId?: string, options?: RawAxiosRequestConfig): AxiosPromise { - return localVarFp.feedUserCasts(fid, viewerFid, limit, cursor, includeReplies, parentUrl, channelId, options).then((request) => request(axios, basePath)); - }, - /** - * Fetch 10 most popular casts for a given user FID; popularity based on replies, likes and recasts; sorted by most popular first - * @summary 10 most popular casts - * @param {number} fid FID of user whose feed you want to create - * @param {number} [viewerFid] - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - feedUserPopular(fid: number, viewerFid?: number, options?: RawAxiosRequestConfig): AxiosPromise { - return localVarFp.feedUserPopular(fid, viewerFid, options).then((request) => request(axios, basePath)); - }, - /** - * Fetch recent replies and recasts for a given user FID; sorted by most recent first - * @summary Replies and recasts - * @param {number} fid FID of user whose replies and recasts you want to fetch - * @param {FeedUserRepliesRecastsFilterEnum} [filter] filter to fetch only replies or recasts - * @param {number} [limit] Number of results to fetch (default 25, max 100) - * @param {string} [cursor] Pagination cursor. - * @param {number} [viewerFid] Providing this will return a feed that respects this user\'s mutes and blocks and includes `viewer_context`. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - feedUserRepliesRecasts(fid: number, filter?: FeedUserRepliesRecastsFilterEnum, limit?: number, cursor?: string, viewerFid?: number, options?: RawAxiosRequestConfig): AxiosPromise { - return localVarFp.feedUserRepliesRecasts(fid, filter, limit, cursor, viewerFid, options).then((request) => request(axios, basePath)); - }, - }; -}; - -/** - * FeedApi - object-oriented interface - * @export - * @class FeedApi - * @extends {BaseAPI} - */ -export class FeedApi extends BaseAPI { - /** - * Fetch casts based on filters. Ensure setting the correct parameters based on the feed_type and filter_type. - * @summary By filters - * @param {FeedType} feedType Defaults to following (requires FID or address). If set to filter (requires filter_type) - * @param {FilterType} [filterType] Used when feed_type=filter. Can be set to FIDs (requires FIDs) or parent_url (requires parent_url) or channel_id (requires channel_id) - * @param {number} [fid] (Optional) FID of user whose feed you want to create. By default, the API expects this field, except if you pass a filter_type - * @param {string} [fids] Used when filter_type=FIDs . Create a feed based on a list of FIDs. Max array size is 250. Requires feed_type and filter_type. - * @param {string} [parentUrl] Used when filter_type=parent_url can be used to fetch content under any parent url e.g. FIP-2 channels on Warpcast. Requires feed_type and filter_type - * @param {string} [channelId] Used when filter_type=channel_id can be used to fetch casts under a channel. Requires feed_type and filter_type. - * @param {boolean} [membersOnly] Used when filter_type=channel_id. Only include casts from members of the channel. True by default. - * @param {string} [embedUrl] Used when filter_type=embed_url can be used to fetch all casts with an embed url that contains embed_url. Requires feed_type and filter_type - * @param {Array} [embedTypes] Used when filter_type=embed_types can be used to fetch all casts with matching content types. Requires feed_type and filter_type - * @param {boolean} [withRecasts] Include recasts in the response, true by default - * @param {number} [limit] Number of results to fetch (default 25, max 100) - * @param {string} [cursor] Pagination cursor. - * @param {number} [viewerFid] Providing this will return a feed that respects this user\'s mutes and blocks and includes `viewer_context`. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof FeedApi - */ - public feed(feedType: FeedType, filterType?: FilterType, fid?: number, fids?: string, parentUrl?: string, channelId?: string, membersOnly?: boolean, embedUrl?: string, embedTypes?: Array, withRecasts?: boolean, limit?: number, cursor?: string, viewerFid?: number, options?: RawAxiosRequestConfig) { - return FeedApiFp(this.configuration).feed(feedType, filterType, fid, fids, parentUrl, channelId, membersOnly, embedUrl, embedTypes, withRecasts, limit, cursor, viewerFid, options).then((request) => request(this.axios, this.basePath)); - } - - /** - * Fetch feed based on channel IDs - * @summary By channel IDs - * @param {string} channelIds Comma separated list of channel IDs e.g. neynar,farcaster - * @param {boolean} [withRecasts] Include recasts in the response, true by default - * @param {number} [viewerFid] Providing this will return a feed that respects this user\'s mutes and blocks and includes `viewer_context`. - * @param {boolean} [withReplies] Include replies in the response, false by default - * @param {boolean} [membersOnly] Only include casts from members of the channel. True by default. - * @param {number} [limit] Number of results to fetch (default 25, max 100) - * @param {string} [cursor] Pagination cursor. - * @param {boolean} [shouldModerate] If true, only casts that have been liked by the moderator (if one exists) will be returned. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof FeedApi - */ - public feedChannels(channelIds: string, withRecasts?: boolean, viewerFid?: number, withReplies?: boolean, membersOnly?: boolean, limit?: number, cursor?: string, shouldModerate?: boolean, options?: RawAxiosRequestConfig) { - return FeedApiFp(this.configuration).feedChannels(channelIds, withRecasts, viewerFid, withReplies, membersOnly, limit, cursor, shouldModerate, options).then((request) => request(this.axios, this.basePath)); - } - - /** - * Fetch feed based on who a user is following - * @summary Following - * @param {number} fid FID of user whose feed you want to create - * @param {number} [viewerFid] Providing this will return a feed that respects this user\'s mutes and blocks and includes `viewer_context`. - * @param {boolean} [withRecasts] Include recasts in the response, true by default - * @param {number} [limit] Number of results to fetch (default 25, max 100) - * @param {string} [cursor] Pagination cursor. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof FeedApi - */ - public feedFollowing(fid: number, viewerFid?: number, withRecasts?: boolean, limit?: number, cursor?: string, options?: RawAxiosRequestConfig) { - return FeedApiFp(this.configuration).feedFollowing(fid, viewerFid, withRecasts, limit, cursor, options).then((request) => request(this.axios, this.basePath)); - } - - /** - * Fetch a personalized For You feed for a user - * @summary For you - * @param {number} fid FID of user whose feed you want to create - * @param {number} [viewerFid] Providing this will return a feed that respects this user\'s mutes and blocks and includes `viewer_context`. - * @param {ForYouProvider} [provider] - * @param {number} [limit] Number of results to fetch (default 25, max 50) - * @param {string} [cursor] Pagination cursor. - * @param {string} [providerMetadata] provider_metadata is a URI-encoded stringified JSON object that can be used to pass additional metadata to the provider. Only available for mbd provider right now. See [here](https://docs.neynar.com/docs/feed-for-you-w-external-providers) on how to use. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof FeedApi - */ - public feedForYou(fid: number, viewerFid?: number, provider?: ForYouProvider, limit?: number, cursor?: string, providerMetadata?: string, options?: RawAxiosRequestConfig) { - return FeedApiFp(this.configuration).feedForYou(fid, viewerFid, provider, limit, cursor, providerMetadata, options).then((request) => request(this.axios, this.basePath)); - } - - /** - * Fetch feed of casts with Frames, reverse chronological order - * @summary Casts with Frames - * @param {number} [limit] Number of results to fetch (default 25, max 100) - * @param {number} [viewerFid] Providing this will return a feed that respects this user\'s mutes and blocks and includes `viewer_context`. - * @param {string} [cursor] Pagination cursor. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof FeedApi - */ - public feedFrames(limit?: number, viewerFid?: number, cursor?: string, options?: RawAxiosRequestConfig) { - return FeedApiFp(this.configuration).feedFrames(limit, viewerFid, cursor, options).then((request) => request(this.axios, this.basePath)); - } - - /** - * Fetch feed based on parent URLs - * @summary By parent URLs - * @param {string} parentUrls Comma separated list of parent_urls - * @param {boolean} [withRecasts] Include recasts in the response, true by default - * @param {number} [viewerFid] Providing this will return a feed that respects this user\'s mutes and blocks and includes `viewer_context`. - * @param {boolean} [withReplies] Include replies in the response, false by default - * @param {number} [limit] Number of results to fetch (default 25, max 100) - * @param {string} [cursor] Pagination cursor. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof FeedApi - */ - public feedParentUrls(parentUrls: string, withRecasts?: boolean, viewerFid?: number, withReplies?: boolean, limit?: number, cursor?: string, options?: RawAxiosRequestConfig) { - return FeedApiFp(this.configuration).feedParentUrls(parentUrls, withRecasts, viewerFid, withReplies, limit, cursor, options).then((request) => request(this.axios, this.basePath)); - } - - /** - * Fetch trending casts or on the global feed or channels feeds. 7d time window available for channel feeds only. - * @summary Trending casts - * @param {number} [limit] Number of results to fetch (max 10) - * @param {string} [cursor] Pagination cursor - * @param {number} [viewerFid] Providing this will return a feed that respects this user\'s mutes and blocks and includes `viewer_context`. - * @param {FeedTrendingTimeWindowEnum} [timeWindow] Time window for trending casts (7d window for channel feeds only) - * @param {string} [channelId] Channel ID to filter trending casts. Less active channels might have no casts in the time window selected. - * @param {FeedTrendingProvider} [provider] The provider of the trending casts feed. - * @param {string} [providerMetadata] provider_metadata is a URI-encoded stringified JSON object that can be used to pass additional metadata to the provider. Only available for mbd provider right now. See [here](https://docs.neynar.com/docs/feed-for-you-w-external-providers) on how to use. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof FeedApi - */ - public feedTrending(limit?: number, cursor?: string, viewerFid?: number, timeWindow?: FeedTrendingTimeWindowEnum, channelId?: string, provider?: FeedTrendingProvider, providerMetadata?: string, options?: RawAxiosRequestConfig) { - return FeedApiFp(this.configuration).feedTrending(limit, cursor, viewerFid, timeWindow, channelId, provider, providerMetadata, options).then((request) => request(this.axios, this.basePath)); - } - - /** - * Fetch casts for a given user FID in reverse chronological order. Also allows filtering by parent_url and channel - * @summary Chronologically - * @param {number} fid FID of user whose recent casts you want to fetch - * @param {number} [viewerFid] FID of the user viewing the feed - * @param {number} [limit] Number of results to fetch - * @param {string} [cursor] Pagination cursor - * @param {boolean} [includeReplies] Include reply casts by the author in the response, true by default - * @param {string} [parentUrl] Parent URL to filter the feed; mutually exclusive with channel_id - * @param {string} [channelId] Channel ID to filter the feed; mutually exclusive with parent_url - * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof FeedApi - */ - public feedUserCasts(fid: number, viewerFid?: number, limit?: number, cursor?: string, includeReplies?: boolean, parentUrl?: string, channelId?: string, options?: RawAxiosRequestConfig) { - return FeedApiFp(this.configuration).feedUserCasts(fid, viewerFid, limit, cursor, includeReplies, parentUrl, channelId, options).then((request) => request(this.axios, this.basePath)); - } - - /** - * Fetch 10 most popular casts for a given user FID; popularity based on replies, likes and recasts; sorted by most popular first - * @summary 10 most popular casts - * @param {number} fid FID of user whose feed you want to create - * @param {number} [viewerFid] - * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof FeedApi - */ - public feedUserPopular(fid: number, viewerFid?: number, options?: RawAxiosRequestConfig) { - return FeedApiFp(this.configuration).feedUserPopular(fid, viewerFid, options).then((request) => request(this.axios, this.basePath)); - } - - /** - * Fetch recent replies and recasts for a given user FID; sorted by most recent first - * @summary Replies and recasts - * @param {number} fid FID of user whose replies and recasts you want to fetch - * @param {FeedUserRepliesRecastsFilterEnum} [filter] filter to fetch only replies or recasts - * @param {number} [limit] Number of results to fetch (default 25, max 100) - * @param {string} [cursor] Pagination cursor. - * @param {number} [viewerFid] Providing this will return a feed that respects this user\'s mutes and blocks and includes `viewer_context`. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof FeedApi - */ - public feedUserRepliesRecasts(fid: number, filter?: FeedUserRepliesRecastsFilterEnum, limit?: number, cursor?: string, viewerFid?: number, options?: RawAxiosRequestConfig) { - return FeedApiFp(this.configuration).feedUserRepliesRecasts(fid, filter, limit, cursor, viewerFid, options).then((request) => request(this.axios, this.basePath)); - } -} - -/** - * @export - */ -export const FeedTrendingTimeWindowEnum = { - _1h: '1h', - _6h: '6h', - _12h: '12h', - _24h: '24h', - _7d: '7d' -} as const; -export type FeedTrendingTimeWindowEnum = typeof FeedTrendingTimeWindowEnum[keyof typeof FeedTrendingTimeWindowEnum]; -/** - * @export - */ -export const FeedUserRepliesRecastsFilterEnum = { - Replies: 'replies', - Recasts: 'recasts', - All: 'all' -} as const; -export type FeedUserRepliesRecastsFilterEnum = typeof FeedUserRepliesRecastsFilterEnum[keyof typeof FeedUserRepliesRecastsFilterEnum]; - - -/** - * FnameApi - axios parameter creator - * @export - */ -export const FnameApiAxiosParamCreator = function (configuration?: Configuration) { - return { - /** - * Check if a given fname is available - * @summary Check fname availability - * @param {string} fname - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - fnameAvailability: async (fname: string, options: RawAxiosRequestConfig = {}): Promise => { - // verify required parameter 'fname' is not null or undefined - assertParamExists('fnameAvailability', 'fname', fname) - const localVarPath = `/farcaster/fname/availability`; - // use dummy base URL string because the URL constructor only accepts absolute URLs. - const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); - let baseOptions; - if (configuration) { - baseOptions = configuration.baseOptions; - } - - const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; - const localVarHeaderParameter = {} as any; - const localVarQueryParameter = {} as any; - - // authentication ApiKeyAuth required - await setApiKeyToObject(localVarHeaderParameter, "x-api-key", configuration) - - if (fname !== undefined) { - localVarQueryParameter['fname'] = fname; - } - - - - setSearchParams(localVarUrlObj, localVarQueryParameter); - let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; - localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; - - return { - url: toPathString(localVarUrlObj), - options: localVarRequestOptions, - }; - }, - } -}; - -/** - * FnameApi - functional programming interface - * @export - */ -export const FnameApiFp = function(configuration?: Configuration) { - const localVarAxiosParamCreator = FnameApiAxiosParamCreator(configuration) - return { - /** - * Check if a given fname is available - * @summary Check fname availability - * @param {string} fname - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - async fnameAvailability(fname: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.fnameAvailability(fname, options); - const localVarOperationServerIndex = configuration?.serverIndex ?? 0; - const localVarOperationServerBasePath = operationServerMap['FnameApi.fnameAvailability']?.[localVarOperationServerIndex]?.url; - return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); - }, - } -}; - -/** - * FnameApi - factory interface - * @export - */ -export const FnameApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) { - const localVarFp = FnameApiFp(configuration) - return { - /** - * Check if a given fname is available - * @summary Check fname availability - * @param {string} fname - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - fnameAvailability(fname: string, options?: RawAxiosRequestConfig): AxiosPromise { - return localVarFp.fnameAvailability(fname, options).then((request) => request(axios, basePath)); - }, - }; -}; - -/** - * FnameApi - object-oriented interface - * @export - * @class FnameApi - * @extends {BaseAPI} - */ -export class FnameApi extends BaseAPI { - /** - * Check if a given fname is available - * @summary Check fname availability - * @param {string} fname - * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof FnameApi - */ - public fnameAvailability(fname: string, options?: RawAxiosRequestConfig) { - return FnameApiFp(this.configuration).fnameAvailability(fname, options).then((request) => request(this.axios, this.basePath)); - } -} - - - -/** - * FollowsApi - axios parameter creator - * @export - */ -export const FollowsApiAxiosParamCreator = function (configuration?: Configuration) { - return { - /** - * Returns a list of followers for a specific FID. - * @summary Followers - * @param {number} fid User who\'s profile you are looking at - * @param {number} [viewerFid] Providing this will return a list of followers that respects this user\'s mutes and blocks and includes `viewer_context`. - * @param {FollowSortType} [sortType] Sort type for fetch followers. Default is `desc_chron` - * @param {number} [limit] Number of results to fetch (default 20, max 100) - * @param {string} [cursor] Pagination cursor. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - followersV2: async (fid: number, viewerFid?: number, sortType?: FollowSortType, limit?: number, cursor?: string, options: RawAxiosRequestConfig = {}): Promise => { - // verify required parameter 'fid' is not null or undefined - assertParamExists('followersV2', 'fid', fid) - const localVarPath = `/farcaster/followers`; - // use dummy base URL string because the URL constructor only accepts absolute URLs. - const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); - let baseOptions; - if (configuration) { - baseOptions = configuration.baseOptions; - } - - const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; - const localVarHeaderParameter = {} as any; - const localVarQueryParameter = {} as any; - - // authentication ApiKeyAuth required - await setApiKeyToObject(localVarHeaderParameter, "x-api-key", configuration) - - if (fid !== undefined) { - localVarQueryParameter['fid'] = fid; - } - - if (viewerFid !== undefined) { - localVarQueryParameter['viewer_fid'] = viewerFid; - } - - if (sortType !== undefined) { - localVarQueryParameter['sort_type'] = sortType; - } - - if (limit !== undefined) { - localVarQueryParameter['limit'] = limit; - } - - if (cursor !== undefined) { - localVarQueryParameter['cursor'] = cursor; - } - - - - setSearchParams(localVarUrlObj, localVarQueryParameter); - let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; - localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; - - return { - url: toPathString(localVarUrlObj), - options: localVarRequestOptions, - }; - }, - /** - * Fetch a list of users followed by a user. Can optionally include a viewer_fid and sort_type. - * @summary Followed by - * @param {number} fid FID of the user whose following you want to fetch. - * @param {number} [viewerFid] Providing this will return a list of users that respects this user\'s mutes and blocks and includes `viewer_context`. - * @param {FollowSortType} [sortType] Optional parameter to sort the users based on different criteria. - * @param {number} [limit] Number of results to fetch (default 25, max 100) - * @param {string} [cursor] Pagination cursor. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - followingV2: async (fid: number, viewerFid?: number, sortType?: FollowSortType, limit?: number, cursor?: string, options: RawAxiosRequestConfig = {}): Promise => { - // verify required parameter 'fid' is not null or undefined - assertParamExists('followingV2', 'fid', fid) - const localVarPath = `/farcaster/following`; - // use dummy base URL string because the URL constructor only accepts absolute URLs. - const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); - let baseOptions; - if (configuration) { - baseOptions = configuration.baseOptions; - } - - const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; - const localVarHeaderParameter = {} as any; - const localVarQueryParameter = {} as any; - - // authentication ApiKeyAuth required - await setApiKeyToObject(localVarHeaderParameter, "x-api-key", configuration) - - if (fid !== undefined) { - localVarQueryParameter['fid'] = fid; - } - - if (viewerFid !== undefined) { - localVarQueryParameter['viewer_fid'] = viewerFid; - } - - if (sortType !== undefined) { - localVarQueryParameter['sort_type'] = sortType; - } - - if (limit !== undefined) { - localVarQueryParameter['limit'] = limit; - } - - if (cursor !== undefined) { - localVarQueryParameter['cursor'] = cursor; - } - - - - setSearchParams(localVarUrlObj, localVarQueryParameter); - let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; - localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; - - return { - url: toPathString(localVarUrlObj), - options: localVarRequestOptions, - }; - }, - /** - * Returns a list of relevant followers for a specific FID. This usually shows on a profile as \"X, Y and Z follow this user\". - * @summary Relevant followers - * @param {number} targetFid User who\'s profile you are looking at - * @param {number} viewerFid The FID of the user to customize this response for. Providing this will also return a list of followers that respects this user\'s mutes and blocks and includes `viewer_context`. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - relevantFollowers: async (targetFid: number, viewerFid: number, options: RawAxiosRequestConfig = {}): Promise => { - // verify required parameter 'targetFid' is not null or undefined - assertParamExists('relevantFollowers', 'targetFid', targetFid) - // verify required parameter 'viewerFid' is not null or undefined - assertParamExists('relevantFollowers', 'viewerFid', viewerFid) - const localVarPath = `/farcaster/followers/relevant`; - // use dummy base URL string because the URL constructor only accepts absolute URLs. - const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); - let baseOptions; - if (configuration) { - baseOptions = configuration.baseOptions; - } - - const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; - const localVarHeaderParameter = {} as any; - const localVarQueryParameter = {} as any; - - // authentication ApiKeyAuth required - await setApiKeyToObject(localVarHeaderParameter, "x-api-key", configuration) - - if (targetFid !== undefined) { - localVarQueryParameter['target_fid'] = targetFid; - } - - if (viewerFid !== undefined) { - localVarQueryParameter['viewer_fid'] = viewerFid; - } - - - - setSearchParams(localVarUrlObj, localVarQueryParameter); - let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; - localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; - - return { - url: toPathString(localVarUrlObj), - options: localVarRequestOptions, - }; - }, - /** - * Fetch a list of suggested users to follow. Used to help users discover new users to follow - * @summary Suggest Follows - * @param {number} fid FID of the user whose following you want to fetch. - * @param {number} [viewerFid] Providing this will return a list of users that respects this user\'s mutes and blocks and includes `viewer_context`. - * @param {number} [limit] Number of results to fetch (default 25, max 100) - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - suggestedFollows: async (fid: number, viewerFid?: number, limit?: number, options: RawAxiosRequestConfig = {}): Promise => { - // verify required parameter 'fid' is not null or undefined - assertParamExists('suggestedFollows', 'fid', fid) - const localVarPath = `/farcaster/following/suggested`; - // use dummy base URL string because the URL constructor only accepts absolute URLs. - const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); - let baseOptions; - if (configuration) { - baseOptions = configuration.baseOptions; - } - - const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; - const localVarHeaderParameter = {} as any; - const localVarQueryParameter = {} as any; - - // authentication ApiKeyAuth required - await setApiKeyToObject(localVarHeaderParameter, "x-api-key", configuration) - - if (fid !== undefined) { - localVarQueryParameter['fid'] = fid; - } - - if (viewerFid !== undefined) { - localVarQueryParameter['viewer_fid'] = viewerFid; - } - - if (limit !== undefined) { - localVarQueryParameter['limit'] = limit; - } - - - - setSearchParams(localVarUrlObj, localVarQueryParameter); - let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; - localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; - - return { - url: toPathString(localVarUrlObj), - options: localVarRequestOptions, - }; - }, - } -}; - -/** - * FollowsApi - functional programming interface - * @export - */ -export const FollowsApiFp = function(configuration?: Configuration) { - const localVarAxiosParamCreator = FollowsApiAxiosParamCreator(configuration) - return { - /** - * Returns a list of followers for a specific FID. - * @summary Followers - * @param {number} fid User who\'s profile you are looking at - * @param {number} [viewerFid] Providing this will return a list of followers that respects this user\'s mutes and blocks and includes `viewer_context`. - * @param {FollowSortType} [sortType] Sort type for fetch followers. Default is `desc_chron` - * @param {number} [limit] Number of results to fetch (default 20, max 100) - * @param {string} [cursor] Pagination cursor. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - async followersV2(fid: number, viewerFid?: number, sortType?: FollowSortType, limit?: number, cursor?: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.followersV2(fid, viewerFid, sortType, limit, cursor, options); - const localVarOperationServerIndex = configuration?.serverIndex ?? 0; - const localVarOperationServerBasePath = operationServerMap['FollowsApi.followersV2']?.[localVarOperationServerIndex]?.url; - return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); - }, - /** - * Fetch a list of users followed by a user. Can optionally include a viewer_fid and sort_type. - * @summary Followed by - * @param {number} fid FID of the user whose following you want to fetch. - * @param {number} [viewerFid] Providing this will return a list of users that respects this user\'s mutes and blocks and includes `viewer_context`. - * @param {FollowSortType} [sortType] Optional parameter to sort the users based on different criteria. - * @param {number} [limit] Number of results to fetch (default 25, max 100) - * @param {string} [cursor] Pagination cursor. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - async followingV2(fid: number, viewerFid?: number, sortType?: FollowSortType, limit?: number, cursor?: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.followingV2(fid, viewerFid, sortType, limit, cursor, options); - const localVarOperationServerIndex = configuration?.serverIndex ?? 0; - const localVarOperationServerBasePath = operationServerMap['FollowsApi.followingV2']?.[localVarOperationServerIndex]?.url; - return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); - }, - /** - * Returns a list of relevant followers for a specific FID. This usually shows on a profile as \"X, Y and Z follow this user\". - * @summary Relevant followers - * @param {number} targetFid User who\'s profile you are looking at - * @param {number} viewerFid The FID of the user to customize this response for. Providing this will also return a list of followers that respects this user\'s mutes and blocks and includes `viewer_context`. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - async relevantFollowers(targetFid: number, viewerFid: number, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.relevantFollowers(targetFid, viewerFid, options); - const localVarOperationServerIndex = configuration?.serverIndex ?? 0; - const localVarOperationServerBasePath = operationServerMap['FollowsApi.relevantFollowers']?.[localVarOperationServerIndex]?.url; - return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); - }, - /** - * Fetch a list of suggested users to follow. Used to help users discover new users to follow - * @summary Suggest Follows - * @param {number} fid FID of the user whose following you want to fetch. - * @param {number} [viewerFid] Providing this will return a list of users that respects this user\'s mutes and blocks and includes `viewer_context`. - * @param {number} [limit] Number of results to fetch (default 25, max 100) - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - async suggestedFollows(fid: number, viewerFid?: number, limit?: number, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.suggestedFollows(fid, viewerFid, limit, options); - const localVarOperationServerIndex = configuration?.serverIndex ?? 0; - const localVarOperationServerBasePath = operationServerMap['FollowsApi.suggestedFollows']?.[localVarOperationServerIndex]?.url; - return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); - }, - } -}; - -/** - * FollowsApi - factory interface - * @export - */ -export const FollowsApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) { - const localVarFp = FollowsApiFp(configuration) - return { - /** - * Returns a list of followers for a specific FID. - * @summary Followers - * @param {number} fid User who\'s profile you are looking at - * @param {number} [viewerFid] Providing this will return a list of followers that respects this user\'s mutes and blocks and includes `viewer_context`. - * @param {FollowSortType} [sortType] Sort type for fetch followers. Default is `desc_chron` - * @param {number} [limit] Number of results to fetch (default 20, max 100) - * @param {string} [cursor] Pagination cursor. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - followersV2(fid: number, viewerFid?: number, sortType?: FollowSortType, limit?: number, cursor?: string, options?: RawAxiosRequestConfig): AxiosPromise { - return localVarFp.followersV2(fid, viewerFid, sortType, limit, cursor, options).then((request) => request(axios, basePath)); - }, - /** - * Fetch a list of users followed by a user. Can optionally include a viewer_fid and sort_type. - * @summary Followed by - * @param {number} fid FID of the user whose following you want to fetch. - * @param {number} [viewerFid] Providing this will return a list of users that respects this user\'s mutes and blocks and includes `viewer_context`. - * @param {FollowSortType} [sortType] Optional parameter to sort the users based on different criteria. - * @param {number} [limit] Number of results to fetch (default 25, max 100) - * @param {string} [cursor] Pagination cursor. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - followingV2(fid: number, viewerFid?: number, sortType?: FollowSortType, limit?: number, cursor?: string, options?: RawAxiosRequestConfig): AxiosPromise { - return localVarFp.followingV2(fid, viewerFid, sortType, limit, cursor, options).then((request) => request(axios, basePath)); - }, - /** - * Returns a list of relevant followers for a specific FID. This usually shows on a profile as \"X, Y and Z follow this user\". - * @summary Relevant followers - * @param {number} targetFid User who\'s profile you are looking at - * @param {number} viewerFid The FID of the user to customize this response for. Providing this will also return a list of followers that respects this user\'s mutes and blocks and includes `viewer_context`. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - relevantFollowers(targetFid: number, viewerFid: number, options?: RawAxiosRequestConfig): AxiosPromise { - return localVarFp.relevantFollowers(targetFid, viewerFid, options).then((request) => request(axios, basePath)); - }, - /** - * Fetch a list of suggested users to follow. Used to help users discover new users to follow - * @summary Suggest Follows - * @param {number} fid FID of the user whose following you want to fetch. - * @param {number} [viewerFid] Providing this will return a list of users that respects this user\'s mutes and blocks and includes `viewer_context`. - * @param {number} [limit] Number of results to fetch (default 25, max 100) - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - suggestedFollows(fid: number, viewerFid?: number, limit?: number, options?: RawAxiosRequestConfig): AxiosPromise { - return localVarFp.suggestedFollows(fid, viewerFid, limit, options).then((request) => request(axios, basePath)); - }, - }; -}; - -/** - * FollowsApi - object-oriented interface - * @export - * @class FollowsApi - * @extends {BaseAPI} - */ -export class FollowsApi extends BaseAPI { - /** - * Returns a list of followers for a specific FID. - * @summary Followers - * @param {number} fid User who\'s profile you are looking at - * @param {number} [viewerFid] Providing this will return a list of followers that respects this user\'s mutes and blocks and includes `viewer_context`. - * @param {FollowSortType} [sortType] Sort type for fetch followers. Default is `desc_chron` - * @param {number} [limit] Number of results to fetch (default 20, max 100) - * @param {string} [cursor] Pagination cursor. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof FollowsApi - */ - public followersV2(fid: number, viewerFid?: number, sortType?: FollowSortType, limit?: number, cursor?: string, options?: RawAxiosRequestConfig) { - return FollowsApiFp(this.configuration).followersV2(fid, viewerFid, sortType, limit, cursor, options).then((request) => request(this.axios, this.basePath)); - } - - /** - * Fetch a list of users followed by a user. Can optionally include a viewer_fid and sort_type. - * @summary Followed by - * @param {number} fid FID of the user whose following you want to fetch. - * @param {number} [viewerFid] Providing this will return a list of users that respects this user\'s mutes and blocks and includes `viewer_context`. - * @param {FollowSortType} [sortType] Optional parameter to sort the users based on different criteria. - * @param {number} [limit] Number of results to fetch (default 25, max 100) - * @param {string} [cursor] Pagination cursor. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof FollowsApi - */ - public followingV2(fid: number, viewerFid?: number, sortType?: FollowSortType, limit?: number, cursor?: string, options?: RawAxiosRequestConfig) { - return FollowsApiFp(this.configuration).followingV2(fid, viewerFid, sortType, limit, cursor, options).then((request) => request(this.axios, this.basePath)); - } - - /** - * Returns a list of relevant followers for a specific FID. This usually shows on a profile as \"X, Y and Z follow this user\". - * @summary Relevant followers - * @param {number} targetFid User who\'s profile you are looking at - * @param {number} viewerFid The FID of the user to customize this response for. Providing this will also return a list of followers that respects this user\'s mutes and blocks and includes `viewer_context`. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof FollowsApi - */ - public relevantFollowers(targetFid: number, viewerFid: number, options?: RawAxiosRequestConfig) { - return FollowsApiFp(this.configuration).relevantFollowers(targetFid, viewerFid, options).then((request) => request(this.axios, this.basePath)); - } - - /** - * Fetch a list of suggested users to follow. Used to help users discover new users to follow - * @summary Suggest Follows - * @param {number} fid FID of the user whose following you want to fetch. - * @param {number} [viewerFid] Providing this will return a list of users that respects this user\'s mutes and blocks and includes `viewer_context`. - * @param {number} [limit] Number of results to fetch (default 25, max 100) - * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof FollowsApi - */ - public suggestedFollows(fid: number, viewerFid?: number, limit?: number, options?: RawAxiosRequestConfig) { - return FollowsApiFp(this.configuration).suggestedFollows(fid, viewerFid, limit, options).then((request) => request(this.axios, this.basePath)); - } -} - - - -/** - * FrameApi - axios parameter creator - * @export - */ -export const FrameApiAxiosParamCreator = function (configuration?: Configuration) { - return { - /** - * Delete an existing frame, if it was made by the developer (identified by API key) - * @summary Delete frame - * @param {DeleteNeynarFrameRequest} deleteNeynarFrameRequest - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - deleteNeynarFrame: async (deleteNeynarFrameRequest: DeleteNeynarFrameRequest, options: RawAxiosRequestConfig = {}): Promise => { - // verify required parameter 'deleteNeynarFrameRequest' is not null or undefined - assertParamExists('deleteNeynarFrame', 'deleteNeynarFrameRequest', deleteNeynarFrameRequest) - const localVarPath = `/farcaster/frame`; - // use dummy base URL string because the URL constructor only accepts absolute URLs. - const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); - let baseOptions; - if (configuration) { - baseOptions = configuration.baseOptions; - } - - const localVarRequestOptions = { method: 'DELETE', ...baseOptions, ...options}; - const localVarHeaderParameter = {} as any; - const localVarQueryParameter = {} as any; - - // authentication ApiKeyAuth required - await setApiKeyToObject(localVarHeaderParameter, "x-api-key", configuration) - - - - localVarHeaderParameter['Content-Type'] = 'application/json'; - - setSearchParams(localVarUrlObj, localVarQueryParameter); - let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; - localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; - localVarRequestOptions.data = serializeDataIfNeeded(deleteNeynarFrameRequest, localVarRequestOptions, configuration) - - return { - url: toPathString(localVarUrlObj), - options: localVarRequestOptions, - }; - }, - /** - * Fetch a list of frames made by the developer (identified by API key) - * @summary List of frames - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - fetchNeynarFrames: async (options: RawAxiosRequestConfig = {}): Promise => { - const localVarPath = `/farcaster/frame/list`; - // use dummy base URL string because the URL constructor only accepts absolute URLs. - const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); - let baseOptions; - if (configuration) { - baseOptions = configuration.baseOptions; - } - - const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; - const localVarHeaderParameter = {} as any; - const localVarQueryParameter = {} as any; - - // authentication ApiKeyAuth required - await setApiKeyToObject(localVarHeaderParameter, "x-api-key", configuration) - - - - setSearchParams(localVarUrlObj, localVarQueryParameter); - let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; - localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; - - return { - url: toPathString(localVarUrlObj), - options: localVarRequestOptions, - }; - }, - /** - * Fetches the frame meta tags from the URL - * @summary Meta tags from URL - * @param {string} url The frame URL to crawl - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - frameFromUrl: async (url: string, options: RawAxiosRequestConfig = {}): Promise => { - // verify required parameter 'url' is not null or undefined - assertParamExists('frameFromUrl', 'url', url) - const localVarPath = `/farcaster/frame/crawl`; - // use dummy base URL string because the URL constructor only accepts absolute URLs. - const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); - let baseOptions; - if (configuration) { - baseOptions = configuration.baseOptions; - } - - const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; - const localVarHeaderParameter = {} as any; - const localVarQueryParameter = {} as any; - - // authentication ApiKeyAuth required - await setApiKeyToObject(localVarHeaderParameter, "x-api-key", configuration) - - if (url !== undefined) { - localVarQueryParameter['url'] = url; - } - - - - setSearchParams(localVarUrlObj, localVarQueryParameter); - let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; - localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; - - return { - url: toPathString(localVarUrlObj), - options: localVarRequestOptions, - }; - }, - /** - * Fetch a frame either by UUID or Neynar URL - * @summary Frame by UUID or URL - * @param {FrameType} type - * @param {string} [uuid] UUID of the frame to fetch - * @param {string} [url] URL of the Neynar frame to fetch - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - lookupNeynarFrame: async (type: FrameType, uuid?: string, url?: string, options: RawAxiosRequestConfig = {}): Promise => { - // verify required parameter 'type' is not null or undefined - assertParamExists('lookupNeynarFrame', 'type', type) - const localVarPath = `/farcaster/frame`; - // use dummy base URL string because the URL constructor only accepts absolute URLs. - const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); - let baseOptions; - if (configuration) { - baseOptions = configuration.baseOptions; - } - - const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; - const localVarHeaderParameter = {} as any; - const localVarQueryParameter = {} as any; - - // authentication ApiKeyAuth required - await setApiKeyToObject(localVarHeaderParameter, "x-api-key", configuration) - - if (type !== undefined) { - localVarQueryParameter['type'] = type; - } - - if (uuid !== undefined) { - localVarQueryParameter['uuid'] = uuid; - } - - if (url !== undefined) { - localVarQueryParameter['url'] = url; - } - - - - setSearchParams(localVarUrlObj, localVarQueryParameter); - let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; - localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; - - return { - url: toPathString(localVarUrlObj), - options: localVarRequestOptions, - }; - }, - /** - * Post frame actions, cast actions or cast composer actions to the server \\ (In order to post any of these actions, you need to have an approved `signer_uuid`) The POST request to the post_url has a timeout of 5 seconds for frames. - * @summary Post a frame action, cast action or a cast composer action - * @param {FrameActionReqBody} frameActionReqBody - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - postFrameAction: async (frameActionReqBody: FrameActionReqBody, options: RawAxiosRequestConfig = {}): Promise => { - // verify required parameter 'frameActionReqBody' is not null or undefined - assertParamExists('postFrameAction', 'frameActionReqBody', frameActionReqBody) - const localVarPath = `/farcaster/frame/action`; - // use dummy base URL string because the URL constructor only accepts absolute URLs. - const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); - let baseOptions; - if (configuration) { - baseOptions = configuration.baseOptions; - } - - const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options}; - const localVarHeaderParameter = {} as any; - const localVarQueryParameter = {} as any; - - // authentication ApiKeyAuth required - await setApiKeyToObject(localVarHeaderParameter, "x-api-key", configuration) - - - - localVarHeaderParameter['Content-Type'] = 'application/json'; - - setSearchParams(localVarUrlObj, localVarQueryParameter); - let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; - localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; - localVarRequestOptions.data = serializeDataIfNeeded(frameActionReqBody, localVarRequestOptions, configuration) - - return { - url: toPathString(localVarUrlObj), - options: localVarRequestOptions, - }; - }, - /** - * Post a frame action that has been signed with a developer managed signer The POST request to the post_url has a timeout of 5 seconds. - * @summary Signature packet - * @param {FrameDeveloperManagedActionReqBody} frameDeveloperManagedActionReqBody - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - postFrameDeveloperManagedAction: async (frameDeveloperManagedActionReqBody: FrameDeveloperManagedActionReqBody, options: RawAxiosRequestConfig = {}): Promise => { - // verify required parameter 'frameDeveloperManagedActionReqBody' is not null or undefined - assertParamExists('postFrameDeveloperManagedAction', 'frameDeveloperManagedActionReqBody', frameDeveloperManagedActionReqBody) - const localVarPath = `/farcaster/frame/developer_managed/action`; - // use dummy base URL string because the URL constructor only accepts absolute URLs. - const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); - let baseOptions; - if (configuration) { - baseOptions = configuration.baseOptions; - } - - const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options}; - const localVarHeaderParameter = {} as any; - const localVarQueryParameter = {} as any; - - // authentication ApiKeyAuth required - await setApiKeyToObject(localVarHeaderParameter, "x-api-key", configuration) - - - - localVarHeaderParameter['Content-Type'] = 'application/json'; - - setSearchParams(localVarUrlObj, localVarQueryParameter); - let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; - localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; - localVarRequestOptions.data = serializeDataIfNeeded(frameDeveloperManagedActionReqBody, localVarRequestOptions, configuration) - - return { - url: toPathString(localVarUrlObj), - options: localVarRequestOptions, - }; - }, - /** - * Create a new frame with a list of pages. - * @summary Create frame - * @param {NeynarFrameCreationRequest} neynarFrameCreationRequest - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - publishNeynarFrame: async (neynarFrameCreationRequest: NeynarFrameCreationRequest, options: RawAxiosRequestConfig = {}): Promise => { - // verify required parameter 'neynarFrameCreationRequest' is not null or undefined - assertParamExists('publishNeynarFrame', 'neynarFrameCreationRequest', neynarFrameCreationRequest) - const localVarPath = `/farcaster/frame`; - // use dummy base URL string because the URL constructor only accepts absolute URLs. - const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); - let baseOptions; - if (configuration) { - baseOptions = configuration.baseOptions; - } - - const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options}; - const localVarHeaderParameter = {} as any; - const localVarQueryParameter = {} as any; - - // authentication ApiKeyAuth required - await setApiKeyToObject(localVarHeaderParameter, "x-api-key", configuration) - - - - localVarHeaderParameter['Content-Type'] = 'application/json'; - - setSearchParams(localVarUrlObj, localVarQueryParameter); - let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; - localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; - localVarRequestOptions.data = serializeDataIfNeeded(neynarFrameCreationRequest, localVarRequestOptions, configuration) - - return { - url: toPathString(localVarUrlObj), - options: localVarRequestOptions, - }; - }, - /** - * Update an existing frame with a list of pages, if it was made by the developer (identified by API key) - * @summary Update frame - * @param {NeynarFrameUpdateRequest} neynarFrameUpdateRequest - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - updateNeynarFrame: async (neynarFrameUpdateRequest: NeynarFrameUpdateRequest, options: RawAxiosRequestConfig = {}): Promise => { - // verify required parameter 'neynarFrameUpdateRequest' is not null or undefined - assertParamExists('updateNeynarFrame', 'neynarFrameUpdateRequest', neynarFrameUpdateRequest) - const localVarPath = `/farcaster/frame`; - // use dummy base URL string because the URL constructor only accepts absolute URLs. - const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); - let baseOptions; - if (configuration) { - baseOptions = configuration.baseOptions; - } - - const localVarRequestOptions = { method: 'PUT', ...baseOptions, ...options}; - const localVarHeaderParameter = {} as any; - const localVarQueryParameter = {} as any; - - // authentication ApiKeyAuth required - await setApiKeyToObject(localVarHeaderParameter, "x-api-key", configuration) - - - - localVarHeaderParameter['Content-Type'] = 'application/json'; - - setSearchParams(localVarUrlObj, localVarQueryParameter); - let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; - localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; - localVarRequestOptions.data = serializeDataIfNeeded(neynarFrameUpdateRequest, localVarRequestOptions, configuration) - - return { - url: toPathString(localVarUrlObj), - options: localVarRequestOptions, - }; - }, - /** - * Validates a frame against by an interacting user against a Farcaster Hub \\ (In order to validate a frame, message bytes from Frame Action must be provided in hex) - * @summary Validate frame action - * @param {ValidateFrameRequest} validateFrameRequest - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - validateFrame: async (validateFrameRequest: ValidateFrameRequest, options: RawAxiosRequestConfig = {}): Promise => { - // verify required parameter 'validateFrameRequest' is not null or undefined - assertParamExists('validateFrame', 'validateFrameRequest', validateFrameRequest) - const localVarPath = `/farcaster/frame/validate`; - // use dummy base URL string because the URL constructor only accepts absolute URLs. - const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); - let baseOptions; - if (configuration) { - baseOptions = configuration.baseOptions; - } - - const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options}; - const localVarHeaderParameter = {} as any; - const localVarQueryParameter = {} as any; - - // authentication ApiKeyAuth required - await setApiKeyToObject(localVarHeaderParameter, "x-api-key", configuration) - - - - localVarHeaderParameter['Content-Type'] = 'application/json'; - - setSearchParams(localVarUrlObj, localVarQueryParameter); - let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; - localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; - localVarRequestOptions.data = serializeDataIfNeeded(validateFrameRequest, localVarRequestOptions, configuration) - - return { - url: toPathString(localVarUrlObj), - options: localVarRequestOptions, - }; - }, - /** - * Fetch analytics for total-interactors, interactors, nteractions-per-cast and input-text. - * @summary Analytics for the frame - * @param {string} frameUrl - * @param {ValidateFrameAnalyticsType} analyticsType - * @param {string} start - * @param {string} stop - * @param {ValidateFrameAnalyticsAggregateWindowEnum} [aggregateWindow] Required for `analytics_type=interactions-per-cast` - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - validateFrameAnalytics: async (frameUrl: string, analyticsType: ValidateFrameAnalyticsType, start: string, stop: string, aggregateWindow?: ValidateFrameAnalyticsAggregateWindowEnum, options: RawAxiosRequestConfig = {}): Promise => { - // verify required parameter 'frameUrl' is not null or undefined - assertParamExists('validateFrameAnalytics', 'frameUrl', frameUrl) - // verify required parameter 'analyticsType' is not null or undefined - assertParamExists('validateFrameAnalytics', 'analyticsType', analyticsType) - // verify required parameter 'start' is not null or undefined - assertParamExists('validateFrameAnalytics', 'start', start) - // verify required parameter 'stop' is not null or undefined - assertParamExists('validateFrameAnalytics', 'stop', stop) - const localVarPath = `/farcaster/frame/validate/analytics`; - // use dummy base URL string because the URL constructor only accepts absolute URLs. - const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); - let baseOptions; - if (configuration) { - baseOptions = configuration.baseOptions; - } - - const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; - const localVarHeaderParameter = {} as any; - const localVarQueryParameter = {} as any; - - // authentication ApiKeyAuth required - await setApiKeyToObject(localVarHeaderParameter, "x-api-key", configuration) - - if (frameUrl !== undefined) { - localVarQueryParameter['frame_url'] = frameUrl; - } - - if (analyticsType !== undefined) { - localVarQueryParameter['analytics_type'] = analyticsType; - } - - if (start !== undefined) { - localVarQueryParameter['start'] = (start as any instanceof Date) ? - (start as any).toISOString() : - start; - } - - if (stop !== undefined) { - localVarQueryParameter['stop'] = (stop as any instanceof Date) ? - (stop as any).toISOString() : - stop; - } - - if (aggregateWindow !== undefined) { - localVarQueryParameter['aggregate_window'] = aggregateWindow; - } - - - - setSearchParams(localVarUrlObj, localVarQueryParameter); - let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; - localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; - - return { - url: toPathString(localVarUrlObj), - options: localVarRequestOptions, - }; - }, - /** - * Fetch a list of all the frames validated by a user - * @summary All frames validated by user - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - validateFrameList: async (options: RawAxiosRequestConfig = {}): Promise => { - const localVarPath = `/farcaster/frame/validate/list`; - // use dummy base URL string because the URL constructor only accepts absolute URLs. - const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); - let baseOptions; - if (configuration) { - baseOptions = configuration.baseOptions; - } - - const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; - const localVarHeaderParameter = {} as any; - const localVarQueryParameter = {} as any; - - // authentication ApiKeyAuth required - await setApiKeyToObject(localVarHeaderParameter, "x-api-key", configuration) - - - - setSearchParams(localVarUrlObj, localVarQueryParameter); - let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; - localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; - - return { - url: toPathString(localVarUrlObj), - options: localVarRequestOptions, - }; - }, - } -}; - -/** - * FrameApi - functional programming interface - * @export - */ -export const FrameApiFp = function(configuration?: Configuration) { - const localVarAxiosParamCreator = FrameApiAxiosParamCreator(configuration) - return { - /** - * Delete an existing frame, if it was made by the developer (identified by API key) - * @summary Delete frame - * @param {DeleteNeynarFrameRequest} deleteNeynarFrameRequest - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - async deleteNeynarFrame(deleteNeynarFrameRequest: DeleteNeynarFrameRequest, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.deleteNeynarFrame(deleteNeynarFrameRequest, options); - const localVarOperationServerIndex = configuration?.serverIndex ?? 0; - const localVarOperationServerBasePath = operationServerMap['FrameApi.deleteNeynarFrame']?.[localVarOperationServerIndex]?.url; - return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); - }, - /** - * Fetch a list of frames made by the developer (identified by API key) - * @summary List of frames - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - async fetchNeynarFrames(options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise>> { - const localVarAxiosArgs = await localVarAxiosParamCreator.fetchNeynarFrames(options); - const localVarOperationServerIndex = configuration?.serverIndex ?? 0; - const localVarOperationServerBasePath = operationServerMap['FrameApi.fetchNeynarFrames']?.[localVarOperationServerIndex]?.url; - return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); - }, - /** - * Fetches the frame meta tags from the URL - * @summary Meta tags from URL - * @param {string} url The frame URL to crawl - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - async frameFromUrl(url: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.frameFromUrl(url, options); - const localVarOperationServerIndex = configuration?.serverIndex ?? 0; - const localVarOperationServerBasePath = operationServerMap['FrameApi.frameFromUrl']?.[localVarOperationServerIndex]?.url; - return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); - }, - /** - * Fetch a frame either by UUID or Neynar URL - * @summary Frame by UUID or URL - * @param {FrameType} type - * @param {string} [uuid] UUID of the frame to fetch - * @param {string} [url] URL of the Neynar frame to fetch - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - async lookupNeynarFrame(type: FrameType, uuid?: string, url?: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.lookupNeynarFrame(type, uuid, url, options); - const localVarOperationServerIndex = configuration?.serverIndex ?? 0; - const localVarOperationServerBasePath = operationServerMap['FrameApi.lookupNeynarFrame']?.[localVarOperationServerIndex]?.url; - return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); - }, - /** - * Post frame actions, cast actions or cast composer actions to the server \\ (In order to post any of these actions, you need to have an approved `signer_uuid`) The POST request to the post_url has a timeout of 5 seconds for frames. - * @summary Post a frame action, cast action or a cast composer action - * @param {FrameActionReqBody} frameActionReqBody - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - async postFrameAction(frameActionReqBody: FrameActionReqBody, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.postFrameAction(frameActionReqBody, options); - const localVarOperationServerIndex = configuration?.serverIndex ?? 0; - const localVarOperationServerBasePath = operationServerMap['FrameApi.postFrameAction']?.[localVarOperationServerIndex]?.url; - return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); - }, - /** - * Post a frame action that has been signed with a developer managed signer The POST request to the post_url has a timeout of 5 seconds. - * @summary Signature packet - * @param {FrameDeveloperManagedActionReqBody} frameDeveloperManagedActionReqBody - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - async postFrameDeveloperManagedAction(frameDeveloperManagedActionReqBody: FrameDeveloperManagedActionReqBody, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.postFrameDeveloperManagedAction(frameDeveloperManagedActionReqBody, options); - const localVarOperationServerIndex = configuration?.serverIndex ?? 0; - const localVarOperationServerBasePath = operationServerMap['FrameApi.postFrameDeveloperManagedAction']?.[localVarOperationServerIndex]?.url; - return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); - }, - /** - * Create a new frame with a list of pages. - * @summary Create frame - * @param {NeynarFrameCreationRequest} neynarFrameCreationRequest - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - async publishNeynarFrame(neynarFrameCreationRequest: NeynarFrameCreationRequest, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.publishNeynarFrame(neynarFrameCreationRequest, options); - const localVarOperationServerIndex = configuration?.serverIndex ?? 0; - const localVarOperationServerBasePath = operationServerMap['FrameApi.publishNeynarFrame']?.[localVarOperationServerIndex]?.url; - return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); - }, - /** - * Update an existing frame with a list of pages, if it was made by the developer (identified by API key) - * @summary Update frame - * @param {NeynarFrameUpdateRequest} neynarFrameUpdateRequest - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - async updateNeynarFrame(neynarFrameUpdateRequest: NeynarFrameUpdateRequest, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.updateNeynarFrame(neynarFrameUpdateRequest, options); - const localVarOperationServerIndex = configuration?.serverIndex ?? 0; - const localVarOperationServerBasePath = operationServerMap['FrameApi.updateNeynarFrame']?.[localVarOperationServerIndex]?.url; - return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); - }, - /** - * Validates a frame against by an interacting user against a Farcaster Hub \\ (In order to validate a frame, message bytes from Frame Action must be provided in hex) - * @summary Validate frame action - * @param {ValidateFrameRequest} validateFrameRequest - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - async validateFrame(validateFrameRequest: ValidateFrameRequest, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.validateFrame(validateFrameRequest, options); - const localVarOperationServerIndex = configuration?.serverIndex ?? 0; - const localVarOperationServerBasePath = operationServerMap['FrameApi.validateFrame']?.[localVarOperationServerIndex]?.url; - return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); - }, - /** - * Fetch analytics for total-interactors, interactors, nteractions-per-cast and input-text. - * @summary Analytics for the frame - * @param {string} frameUrl - * @param {ValidateFrameAnalyticsType} analyticsType - * @param {string} start - * @param {string} stop - * @param {ValidateFrameAnalyticsAggregateWindowEnum} [aggregateWindow] Required for `analytics_type=interactions-per-cast` - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - async validateFrameAnalytics(frameUrl: string, analyticsType: ValidateFrameAnalyticsType, start: string, stop: string, aggregateWindow?: ValidateFrameAnalyticsAggregateWindowEnum, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.validateFrameAnalytics(frameUrl, analyticsType, start, stop, aggregateWindow, options); - const localVarOperationServerIndex = configuration?.serverIndex ?? 0; - const localVarOperationServerBasePath = operationServerMap['FrameApi.validateFrameAnalytics']?.[localVarOperationServerIndex]?.url; - return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); - }, - /** - * Fetch a list of all the frames validated by a user - * @summary All frames validated by user - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - async validateFrameList(options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.validateFrameList(options); - const localVarOperationServerIndex = configuration?.serverIndex ?? 0; - const localVarOperationServerBasePath = operationServerMap['FrameApi.validateFrameList']?.[localVarOperationServerIndex]?.url; - return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); - }, - } -}; - -/** - * FrameApi - factory interface - * @export - */ -export const FrameApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) { - const localVarFp = FrameApiFp(configuration) - return { - /** - * Delete an existing frame, if it was made by the developer (identified by API key) - * @summary Delete frame - * @param {DeleteNeynarFrameRequest} deleteNeynarFrameRequest - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - deleteNeynarFrame(deleteNeynarFrameRequest: DeleteNeynarFrameRequest, options?: RawAxiosRequestConfig): AxiosPromise { - return localVarFp.deleteNeynarFrame(deleteNeynarFrameRequest, options).then((request) => request(axios, basePath)); - }, - /** - * Fetch a list of frames made by the developer (identified by API key) - * @summary List of frames - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - fetchNeynarFrames(options?: RawAxiosRequestConfig): AxiosPromise> { - return localVarFp.fetchNeynarFrames(options).then((request) => request(axios, basePath)); - }, - /** - * Fetches the frame meta tags from the URL - * @summary Meta tags from URL - * @param {string} url The frame URL to crawl - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - frameFromUrl(url: string, options?: RawAxiosRequestConfig): AxiosPromise { - return localVarFp.frameFromUrl(url, options).then((request) => request(axios, basePath)); - }, - /** - * Fetch a frame either by UUID or Neynar URL - * @summary Frame by UUID or URL - * @param {FrameType} type - * @param {string} [uuid] UUID of the frame to fetch - * @param {string} [url] URL of the Neynar frame to fetch - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - lookupNeynarFrame(type: FrameType, uuid?: string, url?: string, options?: RawAxiosRequestConfig): AxiosPromise { - return localVarFp.lookupNeynarFrame(type, uuid, url, options).then((request) => request(axios, basePath)); - }, - /** - * Post frame actions, cast actions or cast composer actions to the server \\ (In order to post any of these actions, you need to have an approved `signer_uuid`) The POST request to the post_url has a timeout of 5 seconds for frames. - * @summary Post a frame action, cast action or a cast composer action - * @param {FrameActionReqBody} frameActionReqBody - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - postFrameAction(frameActionReqBody: FrameActionReqBody, options?: RawAxiosRequestConfig): AxiosPromise { - return localVarFp.postFrameAction(frameActionReqBody, options).then((request) => request(axios, basePath)); - }, - /** - * Post a frame action that has been signed with a developer managed signer The POST request to the post_url has a timeout of 5 seconds. - * @summary Signature packet - * @param {FrameDeveloperManagedActionReqBody} frameDeveloperManagedActionReqBody - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - postFrameDeveloperManagedAction(frameDeveloperManagedActionReqBody: FrameDeveloperManagedActionReqBody, options?: RawAxiosRequestConfig): AxiosPromise { - return localVarFp.postFrameDeveloperManagedAction(frameDeveloperManagedActionReqBody, options).then((request) => request(axios, basePath)); - }, - /** - * Create a new frame with a list of pages. - * @summary Create frame - * @param {NeynarFrameCreationRequest} neynarFrameCreationRequest - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - publishNeynarFrame(neynarFrameCreationRequest: NeynarFrameCreationRequest, options?: RawAxiosRequestConfig): AxiosPromise { - return localVarFp.publishNeynarFrame(neynarFrameCreationRequest, options).then((request) => request(axios, basePath)); - }, - /** - * Update an existing frame with a list of pages, if it was made by the developer (identified by API key) - * @summary Update frame - * @param {NeynarFrameUpdateRequest} neynarFrameUpdateRequest - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - updateNeynarFrame(neynarFrameUpdateRequest: NeynarFrameUpdateRequest, options?: RawAxiosRequestConfig): AxiosPromise { - return localVarFp.updateNeynarFrame(neynarFrameUpdateRequest, options).then((request) => request(axios, basePath)); - }, - /** - * Validates a frame against by an interacting user against a Farcaster Hub \\ (In order to validate a frame, message bytes from Frame Action must be provided in hex) - * @summary Validate frame action - * @param {ValidateFrameRequest} validateFrameRequest - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - validateFrame(validateFrameRequest: ValidateFrameRequest, options?: RawAxiosRequestConfig): AxiosPromise { - return localVarFp.validateFrame(validateFrameRequest, options).then((request) => request(axios, basePath)); - }, - /** - * Fetch analytics for total-interactors, interactors, nteractions-per-cast and input-text. - * @summary Analytics for the frame - * @param {string} frameUrl - * @param {ValidateFrameAnalyticsType} analyticsType - * @param {string} start - * @param {string} stop - * @param {ValidateFrameAnalyticsAggregateWindowEnum} [aggregateWindow] Required for `analytics_type=interactions-per-cast` - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - validateFrameAnalytics(frameUrl: string, analyticsType: ValidateFrameAnalyticsType, start: string, stop: string, aggregateWindow?: ValidateFrameAnalyticsAggregateWindowEnum, options?: RawAxiosRequestConfig): AxiosPromise { - return localVarFp.validateFrameAnalytics(frameUrl, analyticsType, start, stop, aggregateWindow, options).then((request) => request(axios, basePath)); - }, - /** - * Fetch a list of all the frames validated by a user - * @summary All frames validated by user - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - validateFrameList(options?: RawAxiosRequestConfig): AxiosPromise { - return localVarFp.validateFrameList(options).then((request) => request(axios, basePath)); - }, - }; -}; - -/** - * FrameApi - object-oriented interface - * @export - * @class FrameApi - * @extends {BaseAPI} - */ -export class FrameApi extends BaseAPI { - /** - * Delete an existing frame, if it was made by the developer (identified by API key) - * @summary Delete frame - * @param {DeleteNeynarFrameRequest} deleteNeynarFrameRequest - * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof FrameApi - */ - public deleteNeynarFrame(deleteNeynarFrameRequest: DeleteNeynarFrameRequest, options?: RawAxiosRequestConfig) { - return FrameApiFp(this.configuration).deleteNeynarFrame(deleteNeynarFrameRequest, options).then((request) => request(this.axios, this.basePath)); - } - - /** - * Fetch a list of frames made by the developer (identified by API key) - * @summary List of frames - * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof FrameApi - */ - public fetchNeynarFrames(options?: RawAxiosRequestConfig) { - return FrameApiFp(this.configuration).fetchNeynarFrames(options).then((request) => request(this.axios, this.basePath)); - } - - /** - * Fetches the frame meta tags from the URL - * @summary Meta tags from URL - * @param {string} url The frame URL to crawl - * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof FrameApi - */ - public frameFromUrl(url: string, options?: RawAxiosRequestConfig) { - return FrameApiFp(this.configuration).frameFromUrl(url, options).then((request) => request(this.axios, this.basePath)); - } - - /** - * Fetch a frame either by UUID or Neynar URL - * @summary Frame by UUID or URL - * @param {FrameType} type - * @param {string} [uuid] UUID of the frame to fetch - * @param {string} [url] URL of the Neynar frame to fetch - * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof FrameApi - */ - public lookupNeynarFrame(type: FrameType, uuid?: string, url?: string, options?: RawAxiosRequestConfig) { - return FrameApiFp(this.configuration).lookupNeynarFrame(type, uuid, url, options).then((request) => request(this.axios, this.basePath)); - } - - /** - * Post frame actions, cast actions or cast composer actions to the server \\ (In order to post any of these actions, you need to have an approved `signer_uuid`) The POST request to the post_url has a timeout of 5 seconds for frames. - * @summary Post a frame action, cast action or a cast composer action - * @param {FrameActionReqBody} frameActionReqBody - * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof FrameApi - */ - public postFrameAction(frameActionReqBody: FrameActionReqBody, options?: RawAxiosRequestConfig) { - return FrameApiFp(this.configuration).postFrameAction(frameActionReqBody, options).then((request) => request(this.axios, this.basePath)); - } - - /** - * Post a frame action that has been signed with a developer managed signer The POST request to the post_url has a timeout of 5 seconds. - * @summary Signature packet - * @param {FrameDeveloperManagedActionReqBody} frameDeveloperManagedActionReqBody - * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof FrameApi - */ - public postFrameDeveloperManagedAction(frameDeveloperManagedActionReqBody: FrameDeveloperManagedActionReqBody, options?: RawAxiosRequestConfig) { - return FrameApiFp(this.configuration).postFrameDeveloperManagedAction(frameDeveloperManagedActionReqBody, options).then((request) => request(this.axios, this.basePath)); - } - - /** - * Create a new frame with a list of pages. - * @summary Create frame - * @param {NeynarFrameCreationRequest} neynarFrameCreationRequest - * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof FrameApi - */ - public publishNeynarFrame(neynarFrameCreationRequest: NeynarFrameCreationRequest, options?: RawAxiosRequestConfig) { - return FrameApiFp(this.configuration).publishNeynarFrame(neynarFrameCreationRequest, options).then((request) => request(this.axios, this.basePath)); - } - - /** - * Update an existing frame with a list of pages, if it was made by the developer (identified by API key) - * @summary Update frame - * @param {NeynarFrameUpdateRequest} neynarFrameUpdateRequest - * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof FrameApi - */ - public updateNeynarFrame(neynarFrameUpdateRequest: NeynarFrameUpdateRequest, options?: RawAxiosRequestConfig) { - return FrameApiFp(this.configuration).updateNeynarFrame(neynarFrameUpdateRequest, options).then((request) => request(this.axios, this.basePath)); - } - - /** - * Validates a frame against by an interacting user against a Farcaster Hub \\ (In order to validate a frame, message bytes from Frame Action must be provided in hex) - * @summary Validate frame action - * @param {ValidateFrameRequest} validateFrameRequest - * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof FrameApi - */ - public validateFrame(validateFrameRequest: ValidateFrameRequest, options?: RawAxiosRequestConfig) { - return FrameApiFp(this.configuration).validateFrame(validateFrameRequest, options).then((request) => request(this.axios, this.basePath)); - } - - /** - * Fetch analytics for total-interactors, interactors, nteractions-per-cast and input-text. - * @summary Analytics for the frame - * @param {string} frameUrl - * @param {ValidateFrameAnalyticsType} analyticsType - * @param {string} start - * @param {string} stop - * @param {ValidateFrameAnalyticsAggregateWindowEnum} [aggregateWindow] Required for `analytics_type=interactions-per-cast` - * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof FrameApi - */ - public validateFrameAnalytics(frameUrl: string, analyticsType: ValidateFrameAnalyticsType, start: string, stop: string, aggregateWindow?: ValidateFrameAnalyticsAggregateWindowEnum, options?: RawAxiosRequestConfig) { - return FrameApiFp(this.configuration).validateFrameAnalytics(frameUrl, analyticsType, start, stop, aggregateWindow, options).then((request) => request(this.axios, this.basePath)); - } - - /** - * Fetch a list of all the frames validated by a user - * @summary All frames validated by user - * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof FrameApi - */ - public validateFrameList(options?: RawAxiosRequestConfig) { - return FrameApiFp(this.configuration).validateFrameList(options).then((request) => request(this.axios, this.basePath)); - } -} - -/** - * @export - */ -export const ValidateFrameAnalyticsAggregateWindowEnum = { - _10s: '10s', - _1m: '1m', - _2m: '2m', - _5m: '5m', - _10m: '10m', - _20m: '20m', - _30m: '30m', - _2h: '2h', - _12h: '12h', - _1d: '1d', - _7d: '7d' -} as const; -export type ValidateFrameAnalyticsAggregateWindowEnum = typeof ValidateFrameAnalyticsAggregateWindowEnum[keyof typeof ValidateFrameAnalyticsAggregateWindowEnum]; - - -/** - * MuteApi - axios parameter creator - * @export - */ -export const MuteApiAxiosParamCreator = function (configuration?: Configuration) { - return { - /** - * Adds a mute for a given FID. This is a whitelisted API, reach out if you want access. - * @summary Mute FID - * @param {MuteReqBody} muteReqBody - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - addMute: async (muteReqBody: MuteReqBody, options: RawAxiosRequestConfig = {}): Promise => { - // verify required parameter 'muteReqBody' is not null or undefined - assertParamExists('addMute', 'muteReqBody', muteReqBody) - const localVarPath = `/farcaster/mute`; - // use dummy base URL string because the URL constructor only accepts absolute URLs. - const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); - let baseOptions; - if (configuration) { - baseOptions = configuration.baseOptions; - } - - const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options}; - const localVarHeaderParameter = {} as any; - const localVarQueryParameter = {} as any; - - // authentication ApiKeyAuth required - await setApiKeyToObject(localVarHeaderParameter, "x-api-key", configuration) - - - - localVarHeaderParameter['Content-Type'] = 'application/json'; - - setSearchParams(localVarUrlObj, localVarQueryParameter); - let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; - localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; - localVarRequestOptions.data = serializeDataIfNeeded(muteReqBody, localVarRequestOptions, configuration) - - return { - url: toPathString(localVarUrlObj), - options: localVarRequestOptions, - }; - }, - /** - * Deletes a mute for a given FID. This is a whitelisted API, reach out if you want access. - * @summary Unmute FID - * @param {MuteReqBody} muteReqBody - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - deleteMute: async (muteReqBody: MuteReqBody, options: RawAxiosRequestConfig = {}): Promise => { - // verify required parameter 'muteReqBody' is not null or undefined - assertParamExists('deleteMute', 'muteReqBody', muteReqBody) - const localVarPath = `/farcaster/mute`; - // use dummy base URL string because the URL constructor only accepts absolute URLs. - const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); - let baseOptions; - if (configuration) { - baseOptions = configuration.baseOptions; - } - - const localVarRequestOptions = { method: 'DELETE', ...baseOptions, ...options}; - const localVarHeaderParameter = {} as any; - const localVarQueryParameter = {} as any; - - // authentication ApiKeyAuth required - await setApiKeyToObject(localVarHeaderParameter, "x-api-key", configuration) - - - - localVarHeaderParameter['Content-Type'] = 'application/json'; - - setSearchParams(localVarUrlObj, localVarQueryParameter); - let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; - localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; - localVarRequestOptions.data = serializeDataIfNeeded(muteReqBody, localVarRequestOptions, configuration) - - return { - url: toPathString(localVarUrlObj), - options: localVarRequestOptions, - }; - }, - /** - * Fetches all FIDs that a user has muted. - * @summary Muted FIDs of user - * @param {number} fid The user\'s FID (identifier) - * @param {number} [limit] Number of results to fetch (default 20, max 100). - * @param {string} [cursor] Pagination cursor. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - muteList: async (fid: number, limit?: number, cursor?: string, options: RawAxiosRequestConfig = {}): Promise => { - // verify required parameter 'fid' is not null or undefined - assertParamExists('muteList', 'fid', fid) - const localVarPath = `/farcaster/mute/list`; - // use dummy base URL string because the URL constructor only accepts absolute URLs. - const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); - let baseOptions; - if (configuration) { - baseOptions = configuration.baseOptions; - } - - const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; - const localVarHeaderParameter = {} as any; - const localVarQueryParameter = {} as any; - - // authentication ApiKeyAuth required - await setApiKeyToObject(localVarHeaderParameter, "x-api-key", configuration) - - if (fid !== undefined) { - localVarQueryParameter['fid'] = fid; - } - - if (limit !== undefined) { - localVarQueryParameter['limit'] = limit; - } - - if (cursor !== undefined) { - localVarQueryParameter['cursor'] = cursor; - } - - - - setSearchParams(localVarUrlObj, localVarQueryParameter); - let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; - localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; - - return { - url: toPathString(localVarUrlObj), - options: localVarRequestOptions, - }; - }, - } -}; - -/** - * MuteApi - functional programming interface - * @export - */ -export const MuteApiFp = function(configuration?: Configuration) { - const localVarAxiosParamCreator = MuteApiAxiosParamCreator(configuration) - return { - /** - * Adds a mute for a given FID. This is a whitelisted API, reach out if you want access. - * @summary Mute FID - * @param {MuteReqBody} muteReqBody - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - async addMute(muteReqBody: MuteReqBody, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.addMute(muteReqBody, options); - const localVarOperationServerIndex = configuration?.serverIndex ?? 0; - const localVarOperationServerBasePath = operationServerMap['MuteApi.addMute']?.[localVarOperationServerIndex]?.url; - return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); - }, - /** - * Deletes a mute for a given FID. This is a whitelisted API, reach out if you want access. - * @summary Unmute FID - * @param {MuteReqBody} muteReqBody - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - async deleteMute(muteReqBody: MuteReqBody, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.deleteMute(muteReqBody, options); - const localVarOperationServerIndex = configuration?.serverIndex ?? 0; - const localVarOperationServerBasePath = operationServerMap['MuteApi.deleteMute']?.[localVarOperationServerIndex]?.url; - return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); - }, - /** - * Fetches all FIDs that a user has muted. - * @summary Muted FIDs of user - * @param {number} fid The user\'s FID (identifier) - * @param {number} [limit] Number of results to fetch (default 20, max 100). - * @param {string} [cursor] Pagination cursor. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - async muteList(fid: number, limit?: number, cursor?: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.muteList(fid, limit, cursor, options); - const localVarOperationServerIndex = configuration?.serverIndex ?? 0; - const localVarOperationServerBasePath = operationServerMap['MuteApi.muteList']?.[localVarOperationServerIndex]?.url; - return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); - }, - } -}; - -/** - * MuteApi - factory interface - * @export - */ -export const MuteApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) { - const localVarFp = MuteApiFp(configuration) - return { - /** - * Adds a mute for a given FID. This is a whitelisted API, reach out if you want access. - * @summary Mute FID - * @param {MuteReqBody} muteReqBody - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - addMute(muteReqBody: MuteReqBody, options?: RawAxiosRequestConfig): AxiosPromise { - return localVarFp.addMute(muteReqBody, options).then((request) => request(axios, basePath)); - }, - /** - * Deletes a mute for a given FID. This is a whitelisted API, reach out if you want access. - * @summary Unmute FID - * @param {MuteReqBody} muteReqBody - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - deleteMute(muteReqBody: MuteReqBody, options?: RawAxiosRequestConfig): AxiosPromise { - return localVarFp.deleteMute(muteReqBody, options).then((request) => request(axios, basePath)); - }, - /** - * Fetches all FIDs that a user has muted. - * @summary Muted FIDs of user - * @param {number} fid The user\'s FID (identifier) - * @param {number} [limit] Number of results to fetch (default 20, max 100). - * @param {string} [cursor] Pagination cursor. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - muteList(fid: number, limit?: number, cursor?: string, options?: RawAxiosRequestConfig): AxiosPromise { - return localVarFp.muteList(fid, limit, cursor, options).then((request) => request(axios, basePath)); - }, - }; -}; - -/** - * MuteApi - object-oriented interface - * @export - * @class MuteApi - * @extends {BaseAPI} - */ -export class MuteApi extends BaseAPI { - /** - * Adds a mute for a given FID. This is a whitelisted API, reach out if you want access. - * @summary Mute FID - * @param {MuteReqBody} muteReqBody - * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof MuteApi - */ - public addMute(muteReqBody: MuteReqBody, options?: RawAxiosRequestConfig) { - return MuteApiFp(this.configuration).addMute(muteReqBody, options).then((request) => request(this.axios, this.basePath)); - } - - /** - * Deletes a mute for a given FID. This is a whitelisted API, reach out if you want access. - * @summary Unmute FID - * @param {MuteReqBody} muteReqBody - * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof MuteApi - */ - public deleteMute(muteReqBody: MuteReqBody, options?: RawAxiosRequestConfig) { - return MuteApiFp(this.configuration).deleteMute(muteReqBody, options).then((request) => request(this.axios, this.basePath)); - } - - /** - * Fetches all FIDs that a user has muted. - * @summary Muted FIDs of user - * @param {number} fid The user\'s FID (identifier) - * @param {number} [limit] Number of results to fetch (default 20, max 100). - * @param {string} [cursor] Pagination cursor. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof MuteApi - */ - public muteList(fid: number, limit?: number, cursor?: string, options?: RawAxiosRequestConfig) { - return MuteApiFp(this.configuration).muteList(fid, limit, cursor, options).then((request) => request(this.axios, this.basePath)); - } -} - - - -/** - * NotificationsApi - axios parameter creator - * @export - */ -export const NotificationsApiAxiosParamCreator = function (configuration?: Configuration) { - return { - /** - * Mark notifications as seen - * @summary Mark as seen - * @param {MarkNotificationsAsSeenReqBody} markNotificationsAsSeenReqBody - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - markNotificationsAsSeen: async (markNotificationsAsSeenReqBody: MarkNotificationsAsSeenReqBody, options: RawAxiosRequestConfig = {}): Promise => { - // verify required parameter 'markNotificationsAsSeenReqBody' is not null or undefined - assertParamExists('markNotificationsAsSeen', 'markNotificationsAsSeenReqBody', markNotificationsAsSeenReqBody) - const localVarPath = `/farcaster/notifications/seen`; - // use dummy base URL string because the URL constructor only accepts absolute URLs. - const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); - let baseOptions; - if (configuration) { - baseOptions = configuration.baseOptions; - } - - const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options}; - const localVarHeaderParameter = {} as any; - const localVarQueryParameter = {} as any; - - // authentication ApiKeyAuth required - await setApiKeyToObject(localVarHeaderParameter, "x-api-key", configuration) - - - - localVarHeaderParameter['Content-Type'] = 'application/json'; - - setSearchParams(localVarUrlObj, localVarQueryParameter); - let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; - localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; - localVarRequestOptions.data = serializeDataIfNeeded(markNotificationsAsSeenReqBody, localVarRequestOptions, configuration) - - return { - url: toPathString(localVarUrlObj), - options: localVarRequestOptions, - }; - }, - /** - * Returns a list of notifications for a specific FID. - * @summary For user - * @param {number} fid FID of the user you you want to fetch notifications for. The response will respect this user\'s mutes and blocks. - * @param {NotificationType} [type] Notification type to fetch. - * @param {boolean} [priorityMode] When true, only returns notifications from power badge users and users that the viewer follows (if viewer_fid is provided). - * @param {string} [cursor] Pagination cursor. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - notifications: async (fid: number, type?: NotificationType, priorityMode?: boolean, cursor?: string, options: RawAxiosRequestConfig = {}): Promise => { - // verify required parameter 'fid' is not null or undefined - assertParamExists('notifications', 'fid', fid) - const localVarPath = `/farcaster/notifications`; - // use dummy base URL string because the URL constructor only accepts absolute URLs. - const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); - let baseOptions; - if (configuration) { - baseOptions = configuration.baseOptions; - } - - const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; - const localVarHeaderParameter = {} as any; - const localVarQueryParameter = {} as any; - - // authentication ApiKeyAuth required - await setApiKeyToObject(localVarHeaderParameter, "x-api-key", configuration) - - if (fid !== undefined) { - localVarQueryParameter['fid'] = fid; - } - - if (type !== undefined) { - localVarQueryParameter['type'] = type; - } - - if (priorityMode !== undefined) { - localVarQueryParameter['priority_mode'] = priorityMode; - } - - if (cursor !== undefined) { - localVarQueryParameter['cursor'] = cursor; - } - - - - setSearchParams(localVarUrlObj, localVarQueryParameter); - let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; - localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; - - return { - url: toPathString(localVarUrlObj), - options: localVarRequestOptions, - }; - }, - /** - * Returns a list of notifications for a user in specific channels - * @summary For user by channel - * @param {number} fid FID of the user you you want to fetch notifications for. The response will respect this user\'s mutes and blocks. - * @param {string} channelIds Comma separated channel_ids (find list of all channels here - https://docs.neynar.com/reference/list-all-channels) - * @param {boolean} [priorityMode] When true, only returns notifications from power badge users and users that the viewer follows (if viewer_fid is provided). - * @param {string} [cursor] Pagination cursor. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - notificationsChannel: async (fid: number, channelIds: string, priorityMode?: boolean, cursor?: string, options: RawAxiosRequestConfig = {}): Promise => { - // verify required parameter 'fid' is not null or undefined - assertParamExists('notificationsChannel', 'fid', fid) - // verify required parameter 'channelIds' is not null or undefined - assertParamExists('notificationsChannel', 'channelIds', channelIds) - const localVarPath = `/farcaster/notifications/channel`; - // use dummy base URL string because the URL constructor only accepts absolute URLs. - const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); - let baseOptions; - if (configuration) { - baseOptions = configuration.baseOptions; - } - - const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; - const localVarHeaderParameter = {} as any; - const localVarQueryParameter = {} as any; - - // authentication ApiKeyAuth required - await setApiKeyToObject(localVarHeaderParameter, "x-api-key", configuration) - - if (fid !== undefined) { - localVarQueryParameter['fid'] = fid; - } - - if (channelIds !== undefined) { - localVarQueryParameter['channel_ids'] = channelIds; - } - - if (priorityMode !== undefined) { - localVarQueryParameter['priority_mode'] = priorityMode; - } - - if (cursor !== undefined) { - localVarQueryParameter['cursor'] = cursor; - } - - - - setSearchParams(localVarUrlObj, localVarQueryParameter); - let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; - localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; - - return { - url: toPathString(localVarUrlObj), - options: localVarRequestOptions, - }; - }, - /** - * Returns a list of notifications for a user in specific parent_urls - * @summary For user by parent_urls - * @param {number} fid FID of the user you you want to fetch notifications for. The response will respect this user\'s mutes and blocks. - * @param {string} parentUrls Comma separated parent_urls - * @param {boolean} [priorityMode] When true, only returns notifications from power badge users and users that the viewer follows (if viewer_fid is provided). - * @param {string} [cursor] Pagination cursor. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - notificationsParentUrl: async (fid: number, parentUrls: string, priorityMode?: boolean, cursor?: string, options: RawAxiosRequestConfig = {}): Promise => { - // verify required parameter 'fid' is not null or undefined - assertParamExists('notificationsParentUrl', 'fid', fid) - // verify required parameter 'parentUrls' is not null or undefined - assertParamExists('notificationsParentUrl', 'parentUrls', parentUrls) - const localVarPath = `/farcaster/notifications/parent_url`; - // use dummy base URL string because the URL constructor only accepts absolute URLs. - const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); - let baseOptions; - if (configuration) { - baseOptions = configuration.baseOptions; - } - - const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; - const localVarHeaderParameter = {} as any; - const localVarQueryParameter = {} as any; - - // authentication ApiKeyAuth required - await setApiKeyToObject(localVarHeaderParameter, "x-api-key", configuration) - - if (fid !== undefined) { - localVarQueryParameter['fid'] = fid; - } - - if (parentUrls !== undefined) { - localVarQueryParameter['parent_urls'] = parentUrls; - } - - if (priorityMode !== undefined) { - localVarQueryParameter['priority_mode'] = priorityMode; - } - - if (cursor !== undefined) { - localVarQueryParameter['cursor'] = cursor; - } - - - - setSearchParams(localVarUrlObj, localVarQueryParameter); - let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; - localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; - - return { - url: toPathString(localVarUrlObj), - options: localVarRequestOptions, - }; - }, - } -}; - -/** - * NotificationsApi - functional programming interface - * @export - */ -export const NotificationsApiFp = function(configuration?: Configuration) { - const localVarAxiosParamCreator = NotificationsApiAxiosParamCreator(configuration) - return { - /** - * Mark notifications as seen - * @summary Mark as seen - * @param {MarkNotificationsAsSeenReqBody} markNotificationsAsSeenReqBody - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - async markNotificationsAsSeen(markNotificationsAsSeenReqBody: MarkNotificationsAsSeenReqBody, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.markNotificationsAsSeen(markNotificationsAsSeenReqBody, options); - const localVarOperationServerIndex = configuration?.serverIndex ?? 0; - const localVarOperationServerBasePath = operationServerMap['NotificationsApi.markNotificationsAsSeen']?.[localVarOperationServerIndex]?.url; - return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); - }, - /** - * Returns a list of notifications for a specific FID. - * @summary For user - * @param {number} fid FID of the user you you want to fetch notifications for. The response will respect this user\'s mutes and blocks. - * @param {NotificationType} [type] Notification type to fetch. - * @param {boolean} [priorityMode] When true, only returns notifications from power badge users and users that the viewer follows (if viewer_fid is provided). - * @param {string} [cursor] Pagination cursor. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - async notifications(fid: number, type?: NotificationType, priorityMode?: boolean, cursor?: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.notifications(fid, type, priorityMode, cursor, options); - const localVarOperationServerIndex = configuration?.serverIndex ?? 0; - const localVarOperationServerBasePath = operationServerMap['NotificationsApi.notifications']?.[localVarOperationServerIndex]?.url; - return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); - }, - /** - * Returns a list of notifications for a user in specific channels - * @summary For user by channel - * @param {number} fid FID of the user you you want to fetch notifications for. The response will respect this user\'s mutes and blocks. - * @param {string} channelIds Comma separated channel_ids (find list of all channels here - https://docs.neynar.com/reference/list-all-channels) - * @param {boolean} [priorityMode] When true, only returns notifications from power badge users and users that the viewer follows (if viewer_fid is provided). - * @param {string} [cursor] Pagination cursor. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - async notificationsChannel(fid: number, channelIds: string, priorityMode?: boolean, cursor?: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.notificationsChannel(fid, channelIds, priorityMode, cursor, options); - const localVarOperationServerIndex = configuration?.serverIndex ?? 0; - const localVarOperationServerBasePath = operationServerMap['NotificationsApi.notificationsChannel']?.[localVarOperationServerIndex]?.url; - return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); - }, - /** - * Returns a list of notifications for a user in specific parent_urls - * @summary For user by parent_urls - * @param {number} fid FID of the user you you want to fetch notifications for. The response will respect this user\'s mutes and blocks. - * @param {string} parentUrls Comma separated parent_urls - * @param {boolean} [priorityMode] When true, only returns notifications from power badge users and users that the viewer follows (if viewer_fid is provided). - * @param {string} [cursor] Pagination cursor. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - async notificationsParentUrl(fid: number, parentUrls: string, priorityMode?: boolean, cursor?: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.notificationsParentUrl(fid, parentUrls, priorityMode, cursor, options); - const localVarOperationServerIndex = configuration?.serverIndex ?? 0; - const localVarOperationServerBasePath = operationServerMap['NotificationsApi.notificationsParentUrl']?.[localVarOperationServerIndex]?.url; - return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); - }, - } -}; - -/** - * NotificationsApi - factory interface - * @export - */ -export const NotificationsApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) { - const localVarFp = NotificationsApiFp(configuration) - return { - /** - * Mark notifications as seen - * @summary Mark as seen - * @param {MarkNotificationsAsSeenReqBody} markNotificationsAsSeenReqBody - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - markNotificationsAsSeen(markNotificationsAsSeenReqBody: MarkNotificationsAsSeenReqBody, options?: RawAxiosRequestConfig): AxiosPromise { - return localVarFp.markNotificationsAsSeen(markNotificationsAsSeenReqBody, options).then((request) => request(axios, basePath)); - }, - /** - * Returns a list of notifications for a specific FID. - * @summary For user - * @param {number} fid FID of the user you you want to fetch notifications for. The response will respect this user\'s mutes and blocks. - * @param {NotificationType} [type] Notification type to fetch. - * @param {boolean} [priorityMode] When true, only returns notifications from power badge users and users that the viewer follows (if viewer_fid is provided). - * @param {string} [cursor] Pagination cursor. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - notifications(fid: number, type?: NotificationType, priorityMode?: boolean, cursor?: string, options?: RawAxiosRequestConfig): AxiosPromise { - return localVarFp.notifications(fid, type, priorityMode, cursor, options).then((request) => request(axios, basePath)); - }, - /** - * Returns a list of notifications for a user in specific channels - * @summary For user by channel - * @param {number} fid FID of the user you you want to fetch notifications for. The response will respect this user\'s mutes and blocks. - * @param {string} channelIds Comma separated channel_ids (find list of all channels here - https://docs.neynar.com/reference/list-all-channels) - * @param {boolean} [priorityMode] When true, only returns notifications from power badge users and users that the viewer follows (if viewer_fid is provided). - * @param {string} [cursor] Pagination cursor. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - notificationsChannel(fid: number, channelIds: string, priorityMode?: boolean, cursor?: string, options?: RawAxiosRequestConfig): AxiosPromise { - return localVarFp.notificationsChannel(fid, channelIds, priorityMode, cursor, options).then((request) => request(axios, basePath)); - }, - /** - * Returns a list of notifications for a user in specific parent_urls - * @summary For user by parent_urls - * @param {number} fid FID of the user you you want to fetch notifications for. The response will respect this user\'s mutes and blocks. - * @param {string} parentUrls Comma separated parent_urls - * @param {boolean} [priorityMode] When true, only returns notifications from power badge users and users that the viewer follows (if viewer_fid is provided). - * @param {string} [cursor] Pagination cursor. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - notificationsParentUrl(fid: number, parentUrls: string, priorityMode?: boolean, cursor?: string, options?: RawAxiosRequestConfig): AxiosPromise { - return localVarFp.notificationsParentUrl(fid, parentUrls, priorityMode, cursor, options).then((request) => request(axios, basePath)); - }, - }; -}; - -/** - * NotificationsApi - object-oriented interface - * @export - * @class NotificationsApi - * @extends {BaseAPI} - */ -export class NotificationsApi extends BaseAPI { - /** - * Mark notifications as seen - * @summary Mark as seen - * @param {MarkNotificationsAsSeenReqBody} markNotificationsAsSeenReqBody - * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof NotificationsApi - */ - public markNotificationsAsSeen(markNotificationsAsSeenReqBody: MarkNotificationsAsSeenReqBody, options?: RawAxiosRequestConfig) { - return NotificationsApiFp(this.configuration).markNotificationsAsSeen(markNotificationsAsSeenReqBody, options).then((request) => request(this.axios, this.basePath)); - } - - /** - * Returns a list of notifications for a specific FID. - * @summary For user - * @param {number} fid FID of the user you you want to fetch notifications for. The response will respect this user\'s mutes and blocks. - * @param {NotificationType} [type] Notification type to fetch. - * @param {boolean} [priorityMode] When true, only returns notifications from power badge users and users that the viewer follows (if viewer_fid is provided). - * @param {string} [cursor] Pagination cursor. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof NotificationsApi - */ - public notifications(fid: number, type?: NotificationType, priorityMode?: boolean, cursor?: string, options?: RawAxiosRequestConfig) { - return NotificationsApiFp(this.configuration).notifications(fid, type, priorityMode, cursor, options).then((request) => request(this.axios, this.basePath)); - } - - /** - * Returns a list of notifications for a user in specific channels - * @summary For user by channel - * @param {number} fid FID of the user you you want to fetch notifications for. The response will respect this user\'s mutes and blocks. - * @param {string} channelIds Comma separated channel_ids (find list of all channels here - https://docs.neynar.com/reference/list-all-channels) - * @param {boolean} [priorityMode] When true, only returns notifications from power badge users and users that the viewer follows (if viewer_fid is provided). - * @param {string} [cursor] Pagination cursor. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof NotificationsApi - */ - public notificationsChannel(fid: number, channelIds: string, priorityMode?: boolean, cursor?: string, options?: RawAxiosRequestConfig) { - return NotificationsApiFp(this.configuration).notificationsChannel(fid, channelIds, priorityMode, cursor, options).then((request) => request(this.axios, this.basePath)); - } - - /** - * Returns a list of notifications for a user in specific parent_urls - * @summary For user by parent_urls - * @param {number} fid FID of the user you you want to fetch notifications for. The response will respect this user\'s mutes and blocks. - * @param {string} parentUrls Comma separated parent_urls - * @param {boolean} [priorityMode] When true, only returns notifications from power badge users and users that the viewer follows (if viewer_fid is provided). - * @param {string} [cursor] Pagination cursor. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof NotificationsApi - */ - public notificationsParentUrl(fid: number, parentUrls: string, priorityMode?: boolean, cursor?: string, options?: RawAxiosRequestConfig) { - return NotificationsApiFp(this.configuration).notificationsParentUrl(fid, parentUrls, priorityMode, cursor, options).then((request) => request(this.axios, this.basePath)); - } -} - - - -/** - * ReactionApi - axios parameter creator - * @export - */ -export const ReactionApiAxiosParamCreator = function (configuration?: Configuration) { - return { - /** - * Delete a reaction (like or recast) to a cast \\ (In order to delete a reaction `signer_uuid` must be approved) - * @summary Delete reaction - * @param {ReactionReqBody} reactionReqBody - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - deleteReaction: async (reactionReqBody: ReactionReqBody, options: RawAxiosRequestConfig = {}): Promise => { - // verify required parameter 'reactionReqBody' is not null or undefined - assertParamExists('deleteReaction', 'reactionReqBody', reactionReqBody) - const localVarPath = `/farcaster/reaction`; - // use dummy base URL string because the URL constructor only accepts absolute URLs. - const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); - let baseOptions; - if (configuration) { - baseOptions = configuration.baseOptions; - } - - const localVarRequestOptions = { method: 'DELETE', ...baseOptions, ...options}; - const localVarHeaderParameter = {} as any; - const localVarQueryParameter = {} as any; - - // authentication ApiKeyAuth required - await setApiKeyToObject(localVarHeaderParameter, "x-api-key", configuration) - - - - localVarHeaderParameter['Content-Type'] = 'application/json'; - - setSearchParams(localVarUrlObj, localVarQueryParameter); - let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; - localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; - localVarRequestOptions.data = serializeDataIfNeeded(reactionReqBody, localVarRequestOptions, configuration) - - return { - url: toPathString(localVarUrlObj), - options: localVarRequestOptions, - }; - }, - /** - * Post a reaction (like or recast) to a given cast \\ (In order to post a reaction `signer_uuid` must be approved) - * @summary Post a reaction - * @param {ReactionReqBody} reactionReqBody - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - postReaction: async (reactionReqBody: ReactionReqBody, options: RawAxiosRequestConfig = {}): Promise => { - // verify required parameter 'reactionReqBody' is not null or undefined - assertParamExists('postReaction', 'reactionReqBody', reactionReqBody) - const localVarPath = `/farcaster/reaction`; - // use dummy base URL string because the URL constructor only accepts absolute URLs. - const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); - let baseOptions; - if (configuration) { - baseOptions = configuration.baseOptions; - } - - const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options}; - const localVarHeaderParameter = {} as any; - const localVarQueryParameter = {} as any; - - // authentication ApiKeyAuth required - await setApiKeyToObject(localVarHeaderParameter, "x-api-key", configuration) - - - - localVarHeaderParameter['Content-Type'] = 'application/json'; - - setSearchParams(localVarUrlObj, localVarQueryParameter); - let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; - localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; - localVarRequestOptions.data = serializeDataIfNeeded(reactionReqBody, localVarRequestOptions, configuration) - - return { - url: toPathString(localVarUrlObj), - options: localVarRequestOptions, - }; - }, - /** - * Fetches reactions for a given cast - * @summary Reactions for cast - * @param {string} hash - * @param {string} types Customize which reaction types the request should search for. This is a comma-separated string that can include the following values: \'likes\' and \'recasts\'. By default api returns both. To select multiple types, use a comma-separated list of these values. - * @param {number} [viewerFid] Providing this will return a list of reactions that respects this user\'s mutes and blocks and includes `viewer_context`. - * @param {number} [limit] Number of results to fetch (default 25, max 100) - * @param {string} [cursor] Pagination cursor. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - reactionsCast: async (hash: string, types: string, viewerFid?: number, limit?: number, cursor?: string, options: RawAxiosRequestConfig = {}): Promise => { - // verify required parameter 'hash' is not null or undefined - assertParamExists('reactionsCast', 'hash', hash) - // verify required parameter 'types' is not null or undefined - assertParamExists('reactionsCast', 'types', types) - const localVarPath = `/farcaster/reactions/cast`; - // use dummy base URL string because the URL constructor only accepts absolute URLs. - const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); - let baseOptions; - if (configuration) { - baseOptions = configuration.baseOptions; - } - - const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; - const localVarHeaderParameter = {} as any; - const localVarQueryParameter = {} as any; - - // authentication ApiKeyAuth required - await setApiKeyToObject(localVarHeaderParameter, "x-api-key", configuration) - - if (hash !== undefined) { - localVarQueryParameter['hash'] = hash; - } - - if (types !== undefined) { - localVarQueryParameter['types'] = types; - } - - if (viewerFid !== undefined) { - localVarQueryParameter['viewer_fid'] = viewerFid; - } - - if (limit !== undefined) { - localVarQueryParameter['limit'] = limit; - } - - if (cursor !== undefined) { - localVarQueryParameter['cursor'] = cursor; - } - - - - setSearchParams(localVarUrlObj, localVarQueryParameter); - let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; - localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; - - return { - url: toPathString(localVarUrlObj), - options: localVarRequestOptions, - }; - }, - /** - * Fetches reactions for a given user - * @summary Reactions for user - * @param {number} fid - * @param {ReactionsType} type Type of reaction to fetch (likes or recasts or all) - * @param {number} [viewerFid] Providing this will return a list of reactions that respects this user\'s mutes and blocks and includes `viewer_context`. - * @param {number} [limit] Number of results to fetch (default 25, max 100) - * @param {string} [cursor] Pagination cursor. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - reactionsUser: async (fid: number, type: ReactionsType, viewerFid?: number, limit?: number, cursor?: string, options: RawAxiosRequestConfig = {}): Promise => { - // verify required parameter 'fid' is not null or undefined - assertParamExists('reactionsUser', 'fid', fid) - // verify required parameter 'type' is not null or undefined - assertParamExists('reactionsUser', 'type', type) - const localVarPath = `/farcaster/reactions/user`; - // use dummy base URL string because the URL constructor only accepts absolute URLs. - const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); - let baseOptions; - if (configuration) { - baseOptions = configuration.baseOptions; - } - - const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; - const localVarHeaderParameter = {} as any; - const localVarQueryParameter = {} as any; - - // authentication ApiKeyAuth required - await setApiKeyToObject(localVarHeaderParameter, "x-api-key", configuration) - - if (fid !== undefined) { - localVarQueryParameter['fid'] = fid; - } - - if (viewerFid !== undefined) { - localVarQueryParameter['viewer_fid'] = viewerFid; - } - - if (type !== undefined) { - localVarQueryParameter['type'] = type; - } - - if (limit !== undefined) { - localVarQueryParameter['limit'] = limit; - } - - if (cursor !== undefined) { - localVarQueryParameter['cursor'] = cursor; - } - - - - setSearchParams(localVarUrlObj, localVarQueryParameter); - let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; - localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; - - return { - url: toPathString(localVarUrlObj), - options: localVarRequestOptions, - }; - }, - } -}; - -/** - * ReactionApi - functional programming interface - * @export - */ -export const ReactionApiFp = function(configuration?: Configuration) { - const localVarAxiosParamCreator = ReactionApiAxiosParamCreator(configuration) - return { - /** - * Delete a reaction (like or recast) to a cast \\ (In order to delete a reaction `signer_uuid` must be approved) - * @summary Delete reaction - * @param {ReactionReqBody} reactionReqBody - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - async deleteReaction(reactionReqBody: ReactionReqBody, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.deleteReaction(reactionReqBody, options); - const localVarOperationServerIndex = configuration?.serverIndex ?? 0; - const localVarOperationServerBasePath = operationServerMap['ReactionApi.deleteReaction']?.[localVarOperationServerIndex]?.url; - return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); - }, - /** - * Post a reaction (like or recast) to a given cast \\ (In order to post a reaction `signer_uuid` must be approved) - * @summary Post a reaction - * @param {ReactionReqBody} reactionReqBody - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - async postReaction(reactionReqBody: ReactionReqBody, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.postReaction(reactionReqBody, options); - const localVarOperationServerIndex = configuration?.serverIndex ?? 0; - const localVarOperationServerBasePath = operationServerMap['ReactionApi.postReaction']?.[localVarOperationServerIndex]?.url; - return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); - }, - /** - * Fetches reactions for a given cast - * @summary Reactions for cast - * @param {string} hash - * @param {string} types Customize which reaction types the request should search for. This is a comma-separated string that can include the following values: \'likes\' and \'recasts\'. By default api returns both. To select multiple types, use a comma-separated list of these values. - * @param {number} [viewerFid] Providing this will return a list of reactions that respects this user\'s mutes and blocks and includes `viewer_context`. - * @param {number} [limit] Number of results to fetch (default 25, max 100) - * @param {string} [cursor] Pagination cursor. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - async reactionsCast(hash: string, types: string, viewerFid?: number, limit?: number, cursor?: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.reactionsCast(hash, types, viewerFid, limit, cursor, options); - const localVarOperationServerIndex = configuration?.serverIndex ?? 0; - const localVarOperationServerBasePath = operationServerMap['ReactionApi.reactionsCast']?.[localVarOperationServerIndex]?.url; - return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); - }, - /** - * Fetches reactions for a given user - * @summary Reactions for user - * @param {number} fid - * @param {ReactionsType} type Type of reaction to fetch (likes or recasts or all) - * @param {number} [viewerFid] Providing this will return a list of reactions that respects this user\'s mutes and blocks and includes `viewer_context`. - * @param {number} [limit] Number of results to fetch (default 25, max 100) - * @param {string} [cursor] Pagination cursor. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - async reactionsUser(fid: number, type: ReactionsType, viewerFid?: number, limit?: number, cursor?: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.reactionsUser(fid, type, viewerFid, limit, cursor, options); - const localVarOperationServerIndex = configuration?.serverIndex ?? 0; - const localVarOperationServerBasePath = operationServerMap['ReactionApi.reactionsUser']?.[localVarOperationServerIndex]?.url; - return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); - }, - } -}; - -/** - * ReactionApi - factory interface - * @export - */ -export const ReactionApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) { - const localVarFp = ReactionApiFp(configuration) - return { - /** - * Delete a reaction (like or recast) to a cast \\ (In order to delete a reaction `signer_uuid` must be approved) - * @summary Delete reaction - * @param {ReactionReqBody} reactionReqBody - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - deleteReaction(reactionReqBody: ReactionReqBody, options?: RawAxiosRequestConfig): AxiosPromise { - return localVarFp.deleteReaction(reactionReqBody, options).then((request) => request(axios, basePath)); - }, - /** - * Post a reaction (like or recast) to a given cast \\ (In order to post a reaction `signer_uuid` must be approved) - * @summary Post a reaction - * @param {ReactionReqBody} reactionReqBody - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - postReaction(reactionReqBody: ReactionReqBody, options?: RawAxiosRequestConfig): AxiosPromise { - return localVarFp.postReaction(reactionReqBody, options).then((request) => request(axios, basePath)); - }, - /** - * Fetches reactions for a given cast - * @summary Reactions for cast - * @param {string} hash - * @param {string} types Customize which reaction types the request should search for. This is a comma-separated string that can include the following values: \'likes\' and \'recasts\'. By default api returns both. To select multiple types, use a comma-separated list of these values. - * @param {number} [viewerFid] Providing this will return a list of reactions that respects this user\'s mutes and blocks and includes `viewer_context`. - * @param {number} [limit] Number of results to fetch (default 25, max 100) - * @param {string} [cursor] Pagination cursor. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - reactionsCast(hash: string, types: string, viewerFid?: number, limit?: number, cursor?: string, options?: RawAxiosRequestConfig): AxiosPromise { - return localVarFp.reactionsCast(hash, types, viewerFid, limit, cursor, options).then((request) => request(axios, basePath)); - }, - /** - * Fetches reactions for a given user - * @summary Reactions for user - * @param {number} fid - * @param {ReactionsType} type Type of reaction to fetch (likes or recasts or all) - * @param {number} [viewerFid] Providing this will return a list of reactions that respects this user\'s mutes and blocks and includes `viewer_context`. - * @param {number} [limit] Number of results to fetch (default 25, max 100) - * @param {string} [cursor] Pagination cursor. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - reactionsUser(fid: number, type: ReactionsType, viewerFid?: number, limit?: number, cursor?: string, options?: RawAxiosRequestConfig): AxiosPromise { - return localVarFp.reactionsUser(fid, type, viewerFid, limit, cursor, options).then((request) => request(axios, basePath)); - }, - }; -}; - -/** - * ReactionApi - object-oriented interface - * @export - * @class ReactionApi - * @extends {BaseAPI} - */ -export class ReactionApi extends BaseAPI { - /** - * Delete a reaction (like or recast) to a cast \\ (In order to delete a reaction `signer_uuid` must be approved) - * @summary Delete reaction - * @param {ReactionReqBody} reactionReqBody - * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof ReactionApi - */ - public deleteReaction(reactionReqBody: ReactionReqBody, options?: RawAxiosRequestConfig) { - return ReactionApiFp(this.configuration).deleteReaction(reactionReqBody, options).then((request) => request(this.axios, this.basePath)); - } - - /** - * Post a reaction (like or recast) to a given cast \\ (In order to post a reaction `signer_uuid` must be approved) - * @summary Post a reaction - * @param {ReactionReqBody} reactionReqBody - * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof ReactionApi - */ - public postReaction(reactionReqBody: ReactionReqBody, options?: RawAxiosRequestConfig) { - return ReactionApiFp(this.configuration).postReaction(reactionReqBody, options).then((request) => request(this.axios, this.basePath)); - } - - /** - * Fetches reactions for a given cast - * @summary Reactions for cast - * @param {string} hash - * @param {string} types Customize which reaction types the request should search for. This is a comma-separated string that can include the following values: \'likes\' and \'recasts\'. By default api returns both. To select multiple types, use a comma-separated list of these values. - * @param {number} [viewerFid] Providing this will return a list of reactions that respects this user\'s mutes and blocks and includes `viewer_context`. - * @param {number} [limit] Number of results to fetch (default 25, max 100) - * @param {string} [cursor] Pagination cursor. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof ReactionApi - */ - public reactionsCast(hash: string, types: string, viewerFid?: number, limit?: number, cursor?: string, options?: RawAxiosRequestConfig) { - return ReactionApiFp(this.configuration).reactionsCast(hash, types, viewerFid, limit, cursor, options).then((request) => request(this.axios, this.basePath)); - } - - /** - * Fetches reactions for a given user - * @summary Reactions for user - * @param {number} fid - * @param {ReactionsType} type Type of reaction to fetch (likes or recasts or all) - * @param {number} [viewerFid] Providing this will return a list of reactions that respects this user\'s mutes and blocks and includes `viewer_context`. - * @param {number} [limit] Number of results to fetch (default 25, max 100) - * @param {string} [cursor] Pagination cursor. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof ReactionApi - */ - public reactionsUser(fid: number, type: ReactionsType, viewerFid?: number, limit?: number, cursor?: string, options?: RawAxiosRequestConfig) { - return ReactionApiFp(this.configuration).reactionsUser(fid, type, viewerFid, limit, cursor, options).then((request) => request(this.axios, this.basePath)); - } -} - - - -/** - * SignerApi - axios parameter creator - * @export - */ -export const SignerApiAxiosParamCreator = function (configuration?: Configuration) { - return { - /** - * Creates a signer and returns the signer status. \\ **Note**: While tesing please reuse the signer, it costs money to approve a signer. - * @summary Create signer - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - createSigner: async (options: RawAxiosRequestConfig = {}): Promise => { - const localVarPath = `/farcaster/signer`; - // use dummy base URL string because the URL constructor only accepts absolute URLs. - const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); - let baseOptions; - if (configuration) { - baseOptions = configuration.baseOptions; - } - - const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options}; - const localVarHeaderParameter = {} as any; - const localVarQueryParameter = {} as any; - - // authentication ApiKeyAuth required - await setApiKeyToObject(localVarHeaderParameter, "x-api-key", configuration) - - - - setSearchParams(localVarUrlObj, localVarQueryParameter); - let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; - localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; - - return { - url: toPathString(localVarUrlObj), - options: localVarRequestOptions, - }; - }, - /** - * Fetches the status of a developer managed signer by public key - * @summary Status by public key - * @param {string} publicKey - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - developerManagedSigner: async (publicKey: string, options: RawAxiosRequestConfig = {}): Promise => { - // verify required parameter 'publicKey' is not null or undefined - assertParamExists('developerManagedSigner', 'publicKey', publicKey) - const localVarPath = `/farcaster/signer/developer_managed`; - // use dummy base URL string because the URL constructor only accepts absolute URLs. - const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); - let baseOptions; - if (configuration) { - baseOptions = configuration.baseOptions; - } - - const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; - const localVarHeaderParameter = {} as any; - const localVarQueryParameter = {} as any; - - // authentication ApiKeyAuth required - await setApiKeyToObject(localVarHeaderParameter, "x-api-key", configuration) - - if (publicKey !== undefined) { - localVarQueryParameter['public_key'] = publicKey; - } - - - - setSearchParams(localVarUrlObj, localVarQueryParameter); - let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; - localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; - - return { - url: toPathString(localVarUrlObj), - options: localVarRequestOptions, - }; - }, - /** - * Fetch authorization url (Fetched authorized url useful for SIWN login operation) - * @summary Fetch authorization url - * @param {string} clientId - * @param {AuthorizationUrlResponseType} responseType - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - fetchAuthorizationUrl: async (clientId: string, responseType: AuthorizationUrlResponseType, options: RawAxiosRequestConfig = {}): Promise => { - // verify required parameter 'clientId' is not null or undefined - assertParamExists('fetchAuthorizationUrl', 'clientId', clientId) - // verify required parameter 'responseType' is not null or undefined - assertParamExists('fetchAuthorizationUrl', 'responseType', responseType) - const localVarPath = `/farcaster/login/authorize`; - // use dummy base URL string because the URL constructor only accepts absolute URLs. - const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); - let baseOptions; - if (configuration) { - baseOptions = configuration.baseOptions; - } - - const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; - const localVarHeaderParameter = {} as any; - const localVarQueryParameter = {} as any; - - // authentication ApiKeyAuth required - await setApiKeyToObject(localVarHeaderParameter, "x-api-key", configuration) - - if (clientId !== undefined) { - localVarQueryParameter['client_id'] = clientId; - } - - if (responseType !== undefined) { - localVarQueryParameter['response_type'] = responseType; - } - - - - setSearchParams(localVarUrlObj, localVarQueryParameter); - let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; - localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; - - return { - url: toPathString(localVarUrlObj), - options: localVarRequestOptions, - }; - }, - /** - * Publish a message to farcaster. The message must be signed by a signer managed by the developer. Use the @farcaster/core library to construct and sign the message. Use the Message.toJSON method on the signed message and pass the JSON in the body of this POST request. - * @summary Publish message - * @param {object} body - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - publishMessage: async (body: object, options: RawAxiosRequestConfig = {}): Promise => { - // verify required parameter 'body' is not null or undefined - assertParamExists('publishMessage', 'body', body) - const localVarPath = `/farcaster/message`; - // use dummy base URL string because the URL constructor only accepts absolute URLs. - const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); - let baseOptions; - if (configuration) { - baseOptions = configuration.baseOptions; - } - - const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options}; - const localVarHeaderParameter = {} as any; - const localVarQueryParameter = {} as any; - - // authentication ApiKeyAuth required - await setApiKeyToObject(localVarHeaderParameter, "x-api-key", configuration) - - - - localVarHeaderParameter['Content-Type'] = 'application/json'; - - setSearchParams(localVarUrlObj, localVarQueryParameter); - let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; - localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; - localVarRequestOptions.data = serializeDataIfNeeded(body, localVarRequestOptions, configuration) - - return { - url: toPathString(localVarUrlObj), - options: localVarRequestOptions, - }; - }, - /** - * Registers an app FID, deadline and a signature. Returns the signer status with an approval url. - * @summary Register Signed Key - * @param {RegisterSignerKeyReqBody} registerSignerKeyReqBody - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - registerSignedKey: async (registerSignerKeyReqBody: RegisterSignerKeyReqBody, options: RawAxiosRequestConfig = {}): Promise => { - // verify required parameter 'registerSignerKeyReqBody' is not null or undefined - assertParamExists('registerSignedKey', 'registerSignerKeyReqBody', registerSignerKeyReqBody) - const localVarPath = `/farcaster/signer/signed_key`; - // use dummy base URL string because the URL constructor only accepts absolute URLs. - const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); - let baseOptions; - if (configuration) { - baseOptions = configuration.baseOptions; - } - - const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options}; - const localVarHeaderParameter = {} as any; - const localVarQueryParameter = {} as any; - - // authentication ApiKeyAuth required - await setApiKeyToObject(localVarHeaderParameter, "x-api-key", configuration) - - - - localVarHeaderParameter['Content-Type'] = 'application/json'; - - setSearchParams(localVarUrlObj, localVarQueryParameter); - let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; - localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; - localVarRequestOptions.data = serializeDataIfNeeded(registerSignerKeyReqBody, localVarRequestOptions, configuration) - - return { - url: toPathString(localVarUrlObj), - options: localVarRequestOptions, - }; - }, - /** - * Registers an signed key and returns the developer managed signer status with an approval url. - * @summary Register Signed Key - * @param {RegisterDeveloperManagedSignedKeyReqBody} registerDeveloperManagedSignedKeyReqBody - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - registerSignedKeyForDeveloperManagedSigner: async (registerDeveloperManagedSignedKeyReqBody: RegisterDeveloperManagedSignedKeyReqBody, options: RawAxiosRequestConfig = {}): Promise => { - // verify required parameter 'registerDeveloperManagedSignedKeyReqBody' is not null or undefined - assertParamExists('registerSignedKeyForDeveloperManagedSigner', 'registerDeveloperManagedSignedKeyReqBody', registerDeveloperManagedSignedKeyReqBody) - const localVarPath = `/farcaster/signer/developer_managed/signed_key`; - // use dummy base URL string because the URL constructor only accepts absolute URLs. - const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); - let baseOptions; - if (configuration) { - baseOptions = configuration.baseOptions; - } - - const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options}; - const localVarHeaderParameter = {} as any; - const localVarQueryParameter = {} as any; - - // authentication ApiKeyAuth required - await setApiKeyToObject(localVarHeaderParameter, "x-api-key", configuration) - - - - localVarHeaderParameter['Content-Type'] = 'application/json'; - - setSearchParams(localVarUrlObj, localVarQueryParameter); - let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; - localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; - localVarRequestOptions.data = serializeDataIfNeeded(registerDeveloperManagedSignedKeyReqBody, localVarRequestOptions, configuration) - - return { - url: toPathString(localVarUrlObj), - options: localVarRequestOptions, - }; - }, - /** - * Gets information status of a signer by passing in a signer_uuid (Use post API to generate a signer) - * @summary Status - * @param {string} signerUuid - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - signer: async (signerUuid: string, options: RawAxiosRequestConfig = {}): Promise => { - // verify required parameter 'signerUuid' is not null or undefined - assertParamExists('signer', 'signerUuid', signerUuid) - const localVarPath = `/farcaster/signer`; - // use dummy base URL string because the URL constructor only accepts absolute URLs. - const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); - let baseOptions; - if (configuration) { - baseOptions = configuration.baseOptions; - } - - const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; - const localVarHeaderParameter = {} as any; - const localVarQueryParameter = {} as any; - - // authentication ApiKeyAuth required - await setApiKeyToObject(localVarHeaderParameter, "x-api-key", configuration) - - if (signerUuid !== undefined) { - localVarQueryParameter['signer_uuid'] = signerUuid; - } - - - - setSearchParams(localVarUrlObj, localVarQueryParameter); - let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; - localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; - - return { - url: toPathString(localVarUrlObj), - options: localVarRequestOptions, - }; - }, - } -}; - -/** - * SignerApi - functional programming interface - * @export - */ -export const SignerApiFp = function(configuration?: Configuration) { - const localVarAxiosParamCreator = SignerApiAxiosParamCreator(configuration) - return { - /** - * Creates a signer and returns the signer status. \\ **Note**: While tesing please reuse the signer, it costs money to approve a signer. - * @summary Create signer - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - async createSigner(options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.createSigner(options); - const localVarOperationServerIndex = configuration?.serverIndex ?? 0; - const localVarOperationServerBasePath = operationServerMap['SignerApi.createSigner']?.[localVarOperationServerIndex]?.url; - return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); - }, - /** - * Fetches the status of a developer managed signer by public key - * @summary Status by public key - * @param {string} publicKey - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - async developerManagedSigner(publicKey: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.developerManagedSigner(publicKey, options); - const localVarOperationServerIndex = configuration?.serverIndex ?? 0; - const localVarOperationServerBasePath = operationServerMap['SignerApi.developerManagedSigner']?.[localVarOperationServerIndex]?.url; - return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); - }, - /** - * Fetch authorization url (Fetched authorized url useful for SIWN login operation) - * @summary Fetch authorization url - * @param {string} clientId - * @param {AuthorizationUrlResponseType} responseType - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - async fetchAuthorizationUrl(clientId: string, responseType: AuthorizationUrlResponseType, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.fetchAuthorizationUrl(clientId, responseType, options); - const localVarOperationServerIndex = configuration?.serverIndex ?? 0; - const localVarOperationServerBasePath = operationServerMap['SignerApi.fetchAuthorizationUrl']?.[localVarOperationServerIndex]?.url; - return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); - }, - /** - * Publish a message to farcaster. The message must be signed by a signer managed by the developer. Use the @farcaster/core library to construct and sign the message. Use the Message.toJSON method on the signed message and pass the JSON in the body of this POST request. - * @summary Publish message - * @param {object} body - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - async publishMessage(body: object, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.publishMessage(body, options); - const localVarOperationServerIndex = configuration?.serverIndex ?? 0; - const localVarOperationServerBasePath = operationServerMap['SignerApi.publishMessage']?.[localVarOperationServerIndex]?.url; - return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); - }, - /** - * Registers an app FID, deadline and a signature. Returns the signer status with an approval url. - * @summary Register Signed Key - * @param {RegisterSignerKeyReqBody} registerSignerKeyReqBody - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - async registerSignedKey(registerSignerKeyReqBody: RegisterSignerKeyReqBody, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.registerSignedKey(registerSignerKeyReqBody, options); - const localVarOperationServerIndex = configuration?.serverIndex ?? 0; - const localVarOperationServerBasePath = operationServerMap['SignerApi.registerSignedKey']?.[localVarOperationServerIndex]?.url; - return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); - }, - /** - * Registers an signed key and returns the developer managed signer status with an approval url. - * @summary Register Signed Key - * @param {RegisterDeveloperManagedSignedKeyReqBody} registerDeveloperManagedSignedKeyReqBody - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - async registerSignedKeyForDeveloperManagedSigner(registerDeveloperManagedSignedKeyReqBody: RegisterDeveloperManagedSignedKeyReqBody, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.registerSignedKeyForDeveloperManagedSigner(registerDeveloperManagedSignedKeyReqBody, options); - const localVarOperationServerIndex = configuration?.serverIndex ?? 0; - const localVarOperationServerBasePath = operationServerMap['SignerApi.registerSignedKeyForDeveloperManagedSigner']?.[localVarOperationServerIndex]?.url; - return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); - }, - /** - * Gets information status of a signer by passing in a signer_uuid (Use post API to generate a signer) - * @summary Status - * @param {string} signerUuid - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - async signer(signerUuid: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.signer(signerUuid, options); - const localVarOperationServerIndex = configuration?.serverIndex ?? 0; - const localVarOperationServerBasePath = operationServerMap['SignerApi.signer']?.[localVarOperationServerIndex]?.url; - return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); - }, - } -}; - -/** - * SignerApi - factory interface - * @export - */ -export const SignerApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) { - const localVarFp = SignerApiFp(configuration) - return { - /** - * Creates a signer and returns the signer status. \\ **Note**: While tesing please reuse the signer, it costs money to approve a signer. - * @summary Create signer - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - createSigner(options?: RawAxiosRequestConfig): AxiosPromise { - return localVarFp.createSigner(options).then((request) => request(axios, basePath)); - }, - /** - * Fetches the status of a developer managed signer by public key - * @summary Status by public key - * @param {string} publicKey - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - developerManagedSigner(publicKey: string, options?: RawAxiosRequestConfig): AxiosPromise { - return localVarFp.developerManagedSigner(publicKey, options).then((request) => request(axios, basePath)); - }, - /** - * Fetch authorization url (Fetched authorized url useful for SIWN login operation) - * @summary Fetch authorization url - * @param {string} clientId - * @param {AuthorizationUrlResponseType} responseType - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - fetchAuthorizationUrl(clientId: string, responseType: AuthorizationUrlResponseType, options?: RawAxiosRequestConfig): AxiosPromise { - return localVarFp.fetchAuthorizationUrl(clientId, responseType, options).then((request) => request(axios, basePath)); - }, - /** - * Publish a message to farcaster. The message must be signed by a signer managed by the developer. Use the @farcaster/core library to construct and sign the message. Use the Message.toJSON method on the signed message and pass the JSON in the body of this POST request. - * @summary Publish message - * @param {object} body - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - publishMessage(body: object, options?: RawAxiosRequestConfig): AxiosPromise { - return localVarFp.publishMessage(body, options).then((request) => request(axios, basePath)); - }, - /** - * Registers an app FID, deadline and a signature. Returns the signer status with an approval url. - * @summary Register Signed Key - * @param {RegisterSignerKeyReqBody} registerSignerKeyReqBody - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - registerSignedKey(registerSignerKeyReqBody: RegisterSignerKeyReqBody, options?: RawAxiosRequestConfig): AxiosPromise { - return localVarFp.registerSignedKey(registerSignerKeyReqBody, options).then((request) => request(axios, basePath)); - }, - /** - * Registers an signed key and returns the developer managed signer status with an approval url. - * @summary Register Signed Key - * @param {RegisterDeveloperManagedSignedKeyReqBody} registerDeveloperManagedSignedKeyReqBody - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - registerSignedKeyForDeveloperManagedSigner(registerDeveloperManagedSignedKeyReqBody: RegisterDeveloperManagedSignedKeyReqBody, options?: RawAxiosRequestConfig): AxiosPromise { - return localVarFp.registerSignedKeyForDeveloperManagedSigner(registerDeveloperManagedSignedKeyReqBody, options).then((request) => request(axios, basePath)); - }, - /** - * Gets information status of a signer by passing in a signer_uuid (Use post API to generate a signer) - * @summary Status - * @param {string} signerUuid - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - signer(signerUuid: string, options?: RawAxiosRequestConfig): AxiosPromise { - return localVarFp.signer(signerUuid, options).then((request) => request(axios, basePath)); - }, - }; -}; - -/** - * SignerApi - object-oriented interface - * @export - * @class SignerApi - * @extends {BaseAPI} - */ -export class SignerApi extends BaseAPI { - /** - * Creates a signer and returns the signer status. \\ **Note**: While tesing please reuse the signer, it costs money to approve a signer. - * @summary Create signer - * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof SignerApi - */ - public createSigner(options?: RawAxiosRequestConfig) { - return SignerApiFp(this.configuration).createSigner(options).then((request) => request(this.axios, this.basePath)); - } - - /** - * Fetches the status of a developer managed signer by public key - * @summary Status by public key - * @param {string} publicKey - * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof SignerApi - */ - public developerManagedSigner(publicKey: string, options?: RawAxiosRequestConfig) { - return SignerApiFp(this.configuration).developerManagedSigner(publicKey, options).then((request) => request(this.axios, this.basePath)); - } - - /** - * Fetch authorization url (Fetched authorized url useful for SIWN login operation) - * @summary Fetch authorization url - * @param {string} clientId - * @param {AuthorizationUrlResponseType} responseType - * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof SignerApi - */ - public fetchAuthorizationUrl(clientId: string, responseType: AuthorizationUrlResponseType, options?: RawAxiosRequestConfig) { - return SignerApiFp(this.configuration).fetchAuthorizationUrl(clientId, responseType, options).then((request) => request(this.axios, this.basePath)); - } - - /** - * Publish a message to farcaster. The message must be signed by a signer managed by the developer. Use the @farcaster/core library to construct and sign the message. Use the Message.toJSON method on the signed message and pass the JSON in the body of this POST request. - * @summary Publish message - * @param {object} body - * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof SignerApi - */ - public publishMessage(body: object, options?: RawAxiosRequestConfig) { - return SignerApiFp(this.configuration).publishMessage(body, options).then((request) => request(this.axios, this.basePath)); - } - - /** - * Registers an app FID, deadline and a signature. Returns the signer status with an approval url. - * @summary Register Signed Key - * @param {RegisterSignerKeyReqBody} registerSignerKeyReqBody - * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof SignerApi - */ - public registerSignedKey(registerSignerKeyReqBody: RegisterSignerKeyReqBody, options?: RawAxiosRequestConfig) { - return SignerApiFp(this.configuration).registerSignedKey(registerSignerKeyReqBody, options).then((request) => request(this.axios, this.basePath)); - } - - /** - * Registers an signed key and returns the developer managed signer status with an approval url. - * @summary Register Signed Key - * @param {RegisterDeveloperManagedSignedKeyReqBody} registerDeveloperManagedSignedKeyReqBody - * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof SignerApi - */ - public registerSignedKeyForDeveloperManagedSigner(registerDeveloperManagedSignedKeyReqBody: RegisterDeveloperManagedSignedKeyReqBody, options?: RawAxiosRequestConfig) { - return SignerApiFp(this.configuration).registerSignedKeyForDeveloperManagedSigner(registerDeveloperManagedSignedKeyReqBody, options).then((request) => request(this.axios, this.basePath)); - } - - /** - * Gets information status of a signer by passing in a signer_uuid (Use post API to generate a signer) - * @summary Status - * @param {string} signerUuid - * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof SignerApi - */ - public signer(signerUuid: string, options?: RawAxiosRequestConfig) { - return SignerApiFp(this.configuration).signer(signerUuid, options).then((request) => request(this.axios, this.basePath)); - } -} - - - -/** - * StorageApi - axios parameter creator - * @export - */ -export const StorageApiAxiosParamCreator = function (configuration?: Configuration) { - return { - /** - * This api will help you rent units of storage for an year for a specific FID. A storage unit lets you store 5000 casts, 2500 reactions and 2500 links. - * @summary Buy storage - * @param {BuyStorageReqBody} buyStorageReqBody - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - buyStorage: async (buyStorageReqBody: BuyStorageReqBody, options: RawAxiosRequestConfig = {}): Promise => { - // verify required parameter 'buyStorageReqBody' is not null or undefined - assertParamExists('buyStorage', 'buyStorageReqBody', buyStorageReqBody) - const localVarPath = `/farcaster/storage/buy`; - // use dummy base URL string because the URL constructor only accepts absolute URLs. - const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); - let baseOptions; - if (configuration) { - baseOptions = configuration.baseOptions; - } - - const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options}; - const localVarHeaderParameter = {} as any; - const localVarQueryParameter = {} as any; - - // authentication ApiKeyAuth required - await setApiKeyToObject(localVarHeaderParameter, "x-api-key", configuration) - - - - localVarHeaderParameter['Content-Type'] = 'application/json'; - - setSearchParams(localVarUrlObj, localVarQueryParameter); - let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; - localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; - localVarRequestOptions.data = serializeDataIfNeeded(buyStorageReqBody, localVarRequestOptions, configuration) - - return { - url: toPathString(localVarUrlObj), - options: localVarRequestOptions, - }; - }, - /** - * Fetches storage allocations for a given user - * @summary Allocation of user - * @param {number} fid - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - storageAllocations: async (fid: number, options: RawAxiosRequestConfig = {}): Promise => { - // verify required parameter 'fid' is not null or undefined - assertParamExists('storageAllocations', 'fid', fid) - const localVarPath = `/farcaster/storage/allocations`; - // use dummy base URL string because the URL constructor only accepts absolute URLs. - const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); - let baseOptions; - if (configuration) { - baseOptions = configuration.baseOptions; - } - - const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; - const localVarHeaderParameter = {} as any; - const localVarQueryParameter = {} as any; - - // authentication ApiKeyAuth required - await setApiKeyToObject(localVarHeaderParameter, "x-api-key", configuration) - - if (fid !== undefined) { - localVarQueryParameter['fid'] = fid; - } - - - - setSearchParams(localVarUrlObj, localVarQueryParameter); - let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; - localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; - - return { - url: toPathString(localVarUrlObj), - options: localVarRequestOptions, - }; - }, - /** - * Fetches storage usage for a given user - * @summary Usage of user - * @param {number} fid - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - storageUsage: async (fid: number, options: RawAxiosRequestConfig = {}): Promise => { - // verify required parameter 'fid' is not null or undefined - assertParamExists('storageUsage', 'fid', fid) - const localVarPath = `/farcaster/storage/usage`; - // use dummy base URL string because the URL constructor only accepts absolute URLs. - const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); - let baseOptions; - if (configuration) { - baseOptions = configuration.baseOptions; - } - - const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; - const localVarHeaderParameter = {} as any; - const localVarQueryParameter = {} as any; - - // authentication ApiKeyAuth required - await setApiKeyToObject(localVarHeaderParameter, "x-api-key", configuration) - - if (fid !== undefined) { - localVarQueryParameter['fid'] = fid; - } - - - - setSearchParams(localVarUrlObj, localVarQueryParameter); - let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; - localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; - - return { - url: toPathString(localVarUrlObj), - options: localVarRequestOptions, - }; - }, - } -}; - -/** - * StorageApi - functional programming interface - * @export - */ -export const StorageApiFp = function(configuration?: Configuration) { - const localVarAxiosParamCreator = StorageApiAxiosParamCreator(configuration) - return { - /** - * This api will help you rent units of storage for an year for a specific FID. A storage unit lets you store 5000 casts, 2500 reactions and 2500 links. - * @summary Buy storage - * @param {BuyStorageReqBody} buyStorageReqBody - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - async buyStorage(buyStorageReqBody: BuyStorageReqBody, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.buyStorage(buyStorageReqBody, options); - const localVarOperationServerIndex = configuration?.serverIndex ?? 0; - const localVarOperationServerBasePath = operationServerMap['StorageApi.buyStorage']?.[localVarOperationServerIndex]?.url; - return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); - }, - /** - * Fetches storage allocations for a given user - * @summary Allocation of user - * @param {number} fid - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - async storageAllocations(fid: number, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.storageAllocations(fid, options); - const localVarOperationServerIndex = configuration?.serverIndex ?? 0; - const localVarOperationServerBasePath = operationServerMap['StorageApi.storageAllocations']?.[localVarOperationServerIndex]?.url; - return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); - }, - /** - * Fetches storage usage for a given user - * @summary Usage of user - * @param {number} fid - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - async storageUsage(fid: number, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.storageUsage(fid, options); - const localVarOperationServerIndex = configuration?.serverIndex ?? 0; - const localVarOperationServerBasePath = operationServerMap['StorageApi.storageUsage']?.[localVarOperationServerIndex]?.url; - return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); - }, - } -}; - -/** - * StorageApi - factory interface - * @export - */ -export const StorageApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) { - const localVarFp = StorageApiFp(configuration) - return { - /** - * This api will help you rent units of storage for an year for a specific FID. A storage unit lets you store 5000 casts, 2500 reactions and 2500 links. - * @summary Buy storage - * @param {BuyStorageReqBody} buyStorageReqBody - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - buyStorage(buyStorageReqBody: BuyStorageReqBody, options?: RawAxiosRequestConfig): AxiosPromise { - return localVarFp.buyStorage(buyStorageReqBody, options).then((request) => request(axios, basePath)); - }, - /** - * Fetches storage allocations for a given user - * @summary Allocation of user - * @param {number} fid - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - storageAllocations(fid: number, options?: RawAxiosRequestConfig): AxiosPromise { - return localVarFp.storageAllocations(fid, options).then((request) => request(axios, basePath)); - }, - /** - * Fetches storage usage for a given user - * @summary Usage of user - * @param {number} fid - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - storageUsage(fid: number, options?: RawAxiosRequestConfig): AxiosPromise { - return localVarFp.storageUsage(fid, options).then((request) => request(axios, basePath)); - }, - }; -}; - -/** - * StorageApi - object-oriented interface - * @export - * @class StorageApi - * @extends {BaseAPI} - */ -export class StorageApi extends BaseAPI { - /** - * This api will help you rent units of storage for an year for a specific FID. A storage unit lets you store 5000 casts, 2500 reactions and 2500 links. - * @summary Buy storage - * @param {BuyStorageReqBody} buyStorageReqBody - * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof StorageApi - */ - public buyStorage(buyStorageReqBody: BuyStorageReqBody, options?: RawAxiosRequestConfig) { - return StorageApiFp(this.configuration).buyStorage(buyStorageReqBody, options).then((request) => request(this.axios, this.basePath)); - } - - /** - * Fetches storage allocations for a given user - * @summary Allocation of user - * @param {number} fid - * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof StorageApi - */ - public storageAllocations(fid: number, options?: RawAxiosRequestConfig) { - return StorageApiFp(this.configuration).storageAllocations(fid, options).then((request) => request(this.axios, this.basePath)); - } - - /** - * Fetches storage usage for a given user - * @summary Usage of user - * @param {number} fid - * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof StorageApi - */ - public storageUsage(fid: number, options?: RawAxiosRequestConfig) { - return StorageApiFp(this.configuration).storageUsage(fid, options).then((request) => request(this.axios, this.basePath)); - } -} - - - -/** - * SubscribersApi - axios parameter creator - * @export - */ -export const SubscribersApiAxiosParamCreator = function (configuration?: Configuration) { - return { - /** - * Fetch what FIDs and contracts a FID is subscribed to. - * @summary Subscribed to - * @param {number} fid - * @param {SubscriptionProvider} subscriptionProvider - * @param {number} [viewerFid] - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - subscribedTo: async (fid: number, subscriptionProvider: SubscriptionProvider, viewerFid?: number, options: RawAxiosRequestConfig = {}): Promise => { - // verify required parameter 'fid' is not null or undefined - assertParamExists('subscribedTo', 'fid', fid) - // verify required parameter 'subscriptionProvider' is not null or undefined - assertParamExists('subscribedTo', 'subscriptionProvider', subscriptionProvider) - const localVarPath = `/farcaster/user/subscribed_to`; - // use dummy base URL string because the URL constructor only accepts absolute URLs. - const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); - let baseOptions; - if (configuration) { - baseOptions = configuration.baseOptions; - } - - const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; - const localVarHeaderParameter = {} as any; - const localVarQueryParameter = {} as any; - - // authentication ApiKeyAuth required - await setApiKeyToObject(localVarHeaderParameter, "x-api-key", configuration) - - if (fid !== undefined) { - localVarQueryParameter['fid'] = fid; - } - - if (viewerFid !== undefined) { - localVarQueryParameter['viewer_fid'] = viewerFid; - } - - if (subscriptionProvider !== undefined) { - localVarQueryParameter['subscription_provider'] = subscriptionProvider; - } - - - - setSearchParams(localVarUrlObj, localVarQueryParameter); - let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; - localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; - - return { - url: toPathString(localVarUrlObj), - options: localVarRequestOptions, - }; - }, - /** - * Fetch subscribers for a given FID\'s contracts. Doesn\'t return addresses that don\'t have an FID. - * @summary Subscribers of a user - * @param {number} fid - * @param {SubscriptionProviders} subscriptionProvider - * @param {number} [viewerFid] - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - subscribers: async (fid: number, subscriptionProvider: SubscriptionProviders, viewerFid?: number, options: RawAxiosRequestConfig = {}): Promise => { - // verify required parameter 'fid' is not null or undefined - assertParamExists('subscribers', 'fid', fid) - // verify required parameter 'subscriptionProvider' is not null or undefined - assertParamExists('subscribers', 'subscriptionProvider', subscriptionProvider) - const localVarPath = `/farcaster/user/subscribers`; - // use dummy base URL string because the URL constructor only accepts absolute URLs. - const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); - let baseOptions; - if (configuration) { - baseOptions = configuration.baseOptions; - } - - const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; - const localVarHeaderParameter = {} as any; - const localVarQueryParameter = {} as any; - - // authentication ApiKeyAuth required - await setApiKeyToObject(localVarHeaderParameter, "x-api-key", configuration) - - if (fid !== undefined) { - localVarQueryParameter['fid'] = fid; - } - - if (viewerFid !== undefined) { - localVarQueryParameter['viewer_fid'] = viewerFid; - } - - if (subscriptionProvider !== undefined) { - localVarQueryParameter['subscription_provider'] = subscriptionProvider; - } - - - - setSearchParams(localVarUrlObj, localVarQueryParameter); - let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; - localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; - - return { - url: toPathString(localVarUrlObj), - options: localVarRequestOptions, - }; - }, - /** - * Fetch created subscriptions for a given FID\'s. - * @summary Subscriptions created by FID - * @param {number} fid - * @param {SubscriptionProvider} subscriptionProvider - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - subscriptionsCreated: async (fid: number, subscriptionProvider: SubscriptionProvider, options: RawAxiosRequestConfig = {}): Promise => { - // verify required parameter 'fid' is not null or undefined - assertParamExists('subscriptionsCreated', 'fid', fid) - // verify required parameter 'subscriptionProvider' is not null or undefined - assertParamExists('subscriptionsCreated', 'subscriptionProvider', subscriptionProvider) - const localVarPath = `/farcaster/user/subscriptions_created`; - // use dummy base URL string because the URL constructor only accepts absolute URLs. - const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); - let baseOptions; - if (configuration) { - baseOptions = configuration.baseOptions; - } - - const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; - const localVarHeaderParameter = {} as any; - const localVarQueryParameter = {} as any; - - // authentication ApiKeyAuth required - await setApiKeyToObject(localVarHeaderParameter, "x-api-key", configuration) - - if (fid !== undefined) { - localVarQueryParameter['fid'] = fid; - } - - if (subscriptionProvider !== undefined) { - localVarQueryParameter['subscription_provider'] = subscriptionProvider; - } - - - - setSearchParams(localVarUrlObj, localVarQueryParameter); - let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; - localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; - - return { - url: toPathString(localVarUrlObj), - options: localVarRequestOptions, - }; - }, - } -}; - -/** - * SubscribersApi - functional programming interface - * @export - */ -export const SubscribersApiFp = function(configuration?: Configuration) { - const localVarAxiosParamCreator = SubscribersApiAxiosParamCreator(configuration) - return { - /** - * Fetch what FIDs and contracts a FID is subscribed to. - * @summary Subscribed to - * @param {number} fid - * @param {SubscriptionProvider} subscriptionProvider - * @param {number} [viewerFid] - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - async subscribedTo(fid: number, subscriptionProvider: SubscriptionProvider, viewerFid?: number, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.subscribedTo(fid, subscriptionProvider, viewerFid, options); - const localVarOperationServerIndex = configuration?.serverIndex ?? 0; - const localVarOperationServerBasePath = operationServerMap['SubscribersApi.subscribedTo']?.[localVarOperationServerIndex]?.url; - return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); - }, - /** - * Fetch subscribers for a given FID\'s contracts. Doesn\'t return addresses that don\'t have an FID. - * @summary Subscribers of a user - * @param {number} fid - * @param {SubscriptionProviders} subscriptionProvider - * @param {number} [viewerFid] - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - async subscribers(fid: number, subscriptionProvider: SubscriptionProviders, viewerFid?: number, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.subscribers(fid, subscriptionProvider, viewerFid, options); - const localVarOperationServerIndex = configuration?.serverIndex ?? 0; - const localVarOperationServerBasePath = operationServerMap['SubscribersApi.subscribers']?.[localVarOperationServerIndex]?.url; - return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); - }, - /** - * Fetch created subscriptions for a given FID\'s. - * @summary Subscriptions created by FID - * @param {number} fid - * @param {SubscriptionProvider} subscriptionProvider - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - async subscriptionsCreated(fid: number, subscriptionProvider: SubscriptionProvider, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.subscriptionsCreated(fid, subscriptionProvider, options); - const localVarOperationServerIndex = configuration?.serverIndex ?? 0; - const localVarOperationServerBasePath = operationServerMap['SubscribersApi.subscriptionsCreated']?.[localVarOperationServerIndex]?.url; - return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); - }, - } -}; - -/** - * SubscribersApi - factory interface - * @export - */ -export const SubscribersApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) { - const localVarFp = SubscribersApiFp(configuration) - return { - /** - * Fetch what FIDs and contracts a FID is subscribed to. - * @summary Subscribed to - * @param {number} fid - * @param {SubscriptionProvider} subscriptionProvider - * @param {number} [viewerFid] - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - subscribedTo(fid: number, subscriptionProvider: SubscriptionProvider, viewerFid?: number, options?: RawAxiosRequestConfig): AxiosPromise { - return localVarFp.subscribedTo(fid, subscriptionProvider, viewerFid, options).then((request) => request(axios, basePath)); - }, - /** - * Fetch subscribers for a given FID\'s contracts. Doesn\'t return addresses that don\'t have an FID. - * @summary Subscribers of a user - * @param {number} fid - * @param {SubscriptionProviders} subscriptionProvider - * @param {number} [viewerFid] - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - subscribers(fid: number, subscriptionProvider: SubscriptionProviders, viewerFid?: number, options?: RawAxiosRequestConfig): AxiosPromise { - return localVarFp.subscribers(fid, subscriptionProvider, viewerFid, options).then((request) => request(axios, basePath)); - }, - /** - * Fetch created subscriptions for a given FID\'s. - * @summary Subscriptions created by FID - * @param {number} fid - * @param {SubscriptionProvider} subscriptionProvider - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - subscriptionsCreated(fid: number, subscriptionProvider: SubscriptionProvider, options?: RawAxiosRequestConfig): AxiosPromise { - return localVarFp.subscriptionsCreated(fid, subscriptionProvider, options).then((request) => request(axios, basePath)); - }, - }; -}; - -/** - * SubscribersApi - object-oriented interface - * @export - * @class SubscribersApi - * @extends {BaseAPI} - */ -export class SubscribersApi extends BaseAPI { - /** - * Fetch what FIDs and contracts a FID is subscribed to. - * @summary Subscribed to - * @param {number} fid - * @param {SubscriptionProvider} subscriptionProvider - * @param {number} [viewerFid] - * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof SubscribersApi - */ - public subscribedTo(fid: number, subscriptionProvider: SubscriptionProvider, viewerFid?: number, options?: RawAxiosRequestConfig) { - return SubscribersApiFp(this.configuration).subscribedTo(fid, subscriptionProvider, viewerFid, options).then((request) => request(this.axios, this.basePath)); - } - - /** - * Fetch subscribers for a given FID\'s contracts. Doesn\'t return addresses that don\'t have an FID. - * @summary Subscribers of a user - * @param {number} fid - * @param {SubscriptionProviders} subscriptionProvider - * @param {number} [viewerFid] - * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof SubscribersApi - */ - public subscribers(fid: number, subscriptionProvider: SubscriptionProviders, viewerFid?: number, options?: RawAxiosRequestConfig) { - return SubscribersApiFp(this.configuration).subscribers(fid, subscriptionProvider, viewerFid, options).then((request) => request(this.axios, this.basePath)); - } - - /** - * Fetch created subscriptions for a given FID\'s. - * @summary Subscriptions created by FID - * @param {number} fid - * @param {SubscriptionProvider} subscriptionProvider - * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof SubscribersApi - */ - public subscriptionsCreated(fid: number, subscriptionProvider: SubscriptionProvider, options?: RawAxiosRequestConfig) { - return SubscribersApiFp(this.configuration).subscriptionsCreated(fid, subscriptionProvider, options).then((request) => request(this.axios, this.basePath)); - } -} - - - -/** - * UserApi - axios parameter creator - * @export - */ -export const UserApiAxiosParamCreator = function (configuration?: Configuration) { - return { - /** - * Warpcast has deprecated the active badge. Use user/power endpoint instead. - * @summary Fetch active users - * @param {number} [limit] - * @param {string} [cursor] Pagination cursor. - * @param {*} [options] Override http request option. - * @deprecated - * @throws {RequiredError} - */ - activeUsers: async (limit?: number, cursor?: string, options: RawAxiosRequestConfig = {}): Promise => { - const localVarPath = `/farcaster/user/active`; - // use dummy base URL string because the URL constructor only accepts absolute URLs. - const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); - let baseOptions; - if (configuration) { - baseOptions = configuration.baseOptions; - } - - const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; - const localVarHeaderParameter = {} as any; - const localVarQueryParameter = {} as any; - - // authentication ApiKeyAuth required - await setApiKeyToObject(localVarHeaderParameter, "x-api-key", configuration) - - if (limit !== undefined) { - localVarQueryParameter['limit'] = limit; - } - - if (cursor !== undefined) { - localVarQueryParameter['cursor'] = cursor; - } - - - - setSearchParams(localVarUrlObj, localVarQueryParameter); - let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; - localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; - - return { - url: toPathString(localVarUrlObj), - options: localVarRequestOptions, - }; - }, - /** - * Removes verification for an eth address for the user \\ (In order to delete verification `signer_uuid` must be approved) - * @summary Delete verification - * @param {RemoveVerificationReqBody} removeVerificationReqBody - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - farcasterUserVerificationDelete: async (removeVerificationReqBody: RemoveVerificationReqBody, options: RawAxiosRequestConfig = {}): Promise => { - // verify required parameter 'removeVerificationReqBody' is not null or undefined - assertParamExists('farcasterUserVerificationDelete', 'removeVerificationReqBody', removeVerificationReqBody) - const localVarPath = `/farcaster/user/verification`; - // use dummy base URL string because the URL constructor only accepts absolute URLs. - const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); - let baseOptions; - if (configuration) { - baseOptions = configuration.baseOptions; - } - - const localVarRequestOptions = { method: 'DELETE', ...baseOptions, ...options}; - const localVarHeaderParameter = {} as any; - const localVarQueryParameter = {} as any; - - // authentication ApiKeyAuth required - await setApiKeyToObject(localVarHeaderParameter, "x-api-key", configuration) - - - - localVarHeaderParameter['Content-Type'] = 'application/json'; - - setSearchParams(localVarUrlObj, localVarQueryParameter); - let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; - localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; - localVarRequestOptions.data = serializeDataIfNeeded(removeVerificationReqBody, localVarRequestOptions, configuration) - - return { - url: toPathString(localVarUrlObj), - options: localVarRequestOptions, - }; - }, - /** - * Adds verification for an eth address or contract for the user \\ (In order to add verification `signer_uuid` must be approved) - * @summary Add verification - * @param {AddVerificationReqBody} addVerificationReqBody - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - farcasterUserVerificationPost: async (addVerificationReqBody: AddVerificationReqBody, options: RawAxiosRequestConfig = {}): Promise => { - // verify required parameter 'addVerificationReqBody' is not null or undefined - assertParamExists('farcasterUserVerificationPost', 'addVerificationReqBody', addVerificationReqBody) - const localVarPath = `/farcaster/user/verification`; - // use dummy base URL string because the URL constructor only accepts absolute URLs. - const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); - let baseOptions; - if (configuration) { - baseOptions = configuration.baseOptions; - } - - const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options}; - const localVarHeaderParameter = {} as any; - const localVarQueryParameter = {} as any; - - // authentication ApiKeyAuth required - await setApiKeyToObject(localVarHeaderParameter, "x-api-key", configuration) - - - - localVarHeaderParameter['Content-Type'] = 'application/json'; - - setSearchParams(localVarUrlObj, localVarQueryParameter); - let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; - localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; - localVarRequestOptions.data = serializeDataIfNeeded(addVerificationReqBody, localVarRequestOptions, configuration) - - return { - url: toPathString(localVarUrlObj), - options: localVarRequestOptions, - }; - }, - /** - * Follow a user \\ (In order to follow a user `signer_uuid` must be approved) - * @summary Follow user - * @param {FollowReqBody} followReqBody - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - followUser: async (followReqBody: FollowReqBody, options: RawAxiosRequestConfig = {}): Promise => { - // verify required parameter 'followReqBody' is not null or undefined - assertParamExists('followUser', 'followReqBody', followReqBody) - const localVarPath = `/farcaster/user/follow`; - // use dummy base URL string because the URL constructor only accepts absolute URLs. - const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); - let baseOptions; - if (configuration) { - baseOptions = configuration.baseOptions; - } - - const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options}; - const localVarHeaderParameter = {} as any; - const localVarQueryParameter = {} as any; - - // authentication ApiKeyAuth required - await setApiKeyToObject(localVarHeaderParameter, "x-api-key", configuration) - - - - localVarHeaderParameter['Content-Type'] = 'application/json'; - - setSearchParams(localVarUrlObj, localVarQueryParameter); - let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; - localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; - localVarRequestOptions.data = serializeDataIfNeeded(followReqBody, localVarRequestOptions, configuration) - - return { - url: toPathString(localVarUrlObj), - options: localVarRequestOptions, - }; - }, - /** - * Fetches FID to [assign it to new user](https://docs.neynar.com/reference/register-user) - * @summary Fetch fresh FID - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - getFreshFid: async (options: RawAxiosRequestConfig = {}): Promise => { - const localVarPath = `/farcaster/user/fid`; - // use dummy base URL string because the URL constructor only accepts absolute URLs. - const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); - let baseOptions; - if (configuration) { - baseOptions = configuration.baseOptions; - } - - const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; - const localVarHeaderParameter = {} as any; - const localVarQueryParameter = {} as any; - - // authentication ApiKeyAuth required - await setApiKeyToObject(localVarHeaderParameter, "x-api-key", configuration) - - - - setSearchParams(localVarUrlObj, localVarQueryParameter); - let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; - localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; - - return { - url: toPathString(localVarUrlObj), - options: localVarRequestOptions, - }; - }, - /** - * Lookup a user by custody-address - * @summary By custody-address - * @param {string} custodyAddress Custody Address associated with mnemonic - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - lookupUserByCustodyAddress: async (custodyAddress: string, options: RawAxiosRequestConfig = {}): Promise => { - // verify required parameter 'custodyAddress' is not null or undefined - assertParamExists('lookupUserByCustodyAddress', 'custodyAddress', custodyAddress) - const localVarPath = `/farcaster/user/custody-address`; - // use dummy base URL string because the URL constructor only accepts absolute URLs. - const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); - let baseOptions; - if (configuration) { - baseOptions = configuration.baseOptions; - } - - const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; - const localVarHeaderParameter = {} as any; - const localVarQueryParameter = {} as any; - - // authentication ApiKeyAuth required - await setApiKeyToObject(localVarHeaderParameter, "x-api-key", configuration) - - if (custodyAddress !== undefined) { - localVarQueryParameter['custody_address'] = custodyAddress; - } - - - - setSearchParams(localVarUrlObj, localVarQueryParameter); - let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; - localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; - - return { - url: toPathString(localVarUrlObj), - options: localVarRequestOptions, - }; - }, - /** - * Fetches power users based on Warpcast power badges. Information is updated once a day. - * @summary Power users - * @param {number} [viewerFid] - * @param {number} [limit] Number of power users to fetch, max 100 - * @param {string} [cursor] Pagination cursor. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - powerUsers: async (viewerFid?: number, limit?: number, cursor?: string, options: RawAxiosRequestConfig = {}): Promise => { - const localVarPath = `/farcaster/user/power`; - // use dummy base URL string because the URL constructor only accepts absolute URLs. - const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); - let baseOptions; - if (configuration) { - baseOptions = configuration.baseOptions; - } - - const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; - const localVarHeaderParameter = {} as any; - const localVarQueryParameter = {} as any; - - // authentication ApiKeyAuth required - await setApiKeyToObject(localVarHeaderParameter, "x-api-key", configuration) - - if (viewerFid !== undefined) { - localVarQueryParameter['viewer_fid'] = viewerFid; - } - - if (limit !== undefined) { - localVarQueryParameter['limit'] = limit; - } - - if (cursor !== undefined) { - localVarQueryParameter['cursor'] = cursor; - } - - - - setSearchParams(localVarUrlObj, localVarQueryParameter); - let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; - localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; - - return { - url: toPathString(localVarUrlObj), - options: localVarRequestOptions, - }; - }, - /** - * Register account on farcaster. **Note:** This API must be called within 10 minutes of the fetch FID API call (i.e., /v2/farcaster/user/fid). Otherwise, Neynar will assign this FID to another available user. - * @summary Register new account - * @param {RegisterUserReqBody} registerUserReqBody - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - registerUser: async (registerUserReqBody: RegisterUserReqBody, options: RawAxiosRequestConfig = {}): Promise => { - // verify required parameter 'registerUserReqBody' is not null or undefined - assertParamExists('registerUser', 'registerUserReqBody', registerUserReqBody) - const localVarPath = `/farcaster/user`; - // use dummy base URL string because the URL constructor only accepts absolute URLs. - const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); - let baseOptions; - if (configuration) { - baseOptions = configuration.baseOptions; - } - - const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options}; - const localVarHeaderParameter = {} as any; - const localVarQueryParameter = {} as any; - - // authentication ApiKeyAuth required - await setApiKeyToObject(localVarHeaderParameter, "x-api-key", configuration) - - - - localVarHeaderParameter['Content-Type'] = 'application/json'; - - setSearchParams(localVarUrlObj, localVarQueryParameter); - let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; - localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; - localVarRequestOptions.data = serializeDataIfNeeded(registerUserReqBody, localVarRequestOptions, configuration) - - return { - url: toPathString(localVarUrlObj), - options: localVarRequestOptions, - }; - }, - /** - * Unfollow a user \\ (In order to unfollow a user `signer_uuid` must be approved) - * @summary Unfollow user - * @param {FollowReqBody} followReqBody - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - unfollowUser: async (followReqBody: FollowReqBody, options: RawAxiosRequestConfig = {}): Promise => { - // verify required parameter 'followReqBody' is not null or undefined - assertParamExists('unfollowUser', 'followReqBody', followReqBody) - const localVarPath = `/farcaster/user/follow`; - // use dummy base URL string because the URL constructor only accepts absolute URLs. - const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); - let baseOptions; - if (configuration) { - baseOptions = configuration.baseOptions; - } - - const localVarRequestOptions = { method: 'DELETE', ...baseOptions, ...options}; - const localVarHeaderParameter = {} as any; - const localVarQueryParameter = {} as any; - - // authentication ApiKeyAuth required - await setApiKeyToObject(localVarHeaderParameter, "x-api-key", configuration) - - - - localVarHeaderParameter['Content-Type'] = 'application/json'; - - setSearchParams(localVarUrlObj, localVarQueryParameter); - let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; - localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; - localVarRequestOptions.data = serializeDataIfNeeded(followReqBody, localVarRequestOptions, configuration) - - return { - url: toPathString(localVarUrlObj), - options: localVarRequestOptions, - }; - }, - /** - * Update user profile \\ (In order to update user\'s profile `signer_uuid` must be approved) - * @summary Update user profile - * @param {UpdateUserReqBody} updateUserReqBody - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - updateUser: async (updateUserReqBody: UpdateUserReqBody, options: RawAxiosRequestConfig = {}): Promise => { - // verify required parameter 'updateUserReqBody' is not null or undefined - assertParamExists('updateUser', 'updateUserReqBody', updateUserReqBody) - const localVarPath = `/farcaster/user`; - // use dummy base URL string because the URL constructor only accepts absolute URLs. - const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); - let baseOptions; - if (configuration) { - baseOptions = configuration.baseOptions; - } - - const localVarRequestOptions = { method: 'PATCH', ...baseOptions, ...options}; - const localVarHeaderParameter = {} as any; - const localVarQueryParameter = {} as any; - - // authentication ApiKeyAuth required - await setApiKeyToObject(localVarHeaderParameter, "x-api-key", configuration) - - - - localVarHeaderParameter['Content-Type'] = 'application/json'; - - setSearchParams(localVarUrlObj, localVarQueryParameter); - let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; - localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; - localVarRequestOptions.data = serializeDataIfNeeded(updateUserReqBody, localVarRequestOptions, configuration) - - return { - url: toPathString(localVarUrlObj), - options: localVarRequestOptions, - }; - }, - /** - * Fetches information about multiple users based on FIDs - * @summary By FIDs - * @param {string} fids Comma separated list of FIDs, up to 100 at a time - * @param {number} [viewerFid] - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - userBulk: async (fids: string, viewerFid?: number, options: RawAxiosRequestConfig = {}): Promise => { - // verify required parameter 'fids' is not null or undefined - assertParamExists('userBulk', 'fids', fids) - const localVarPath = `/farcaster/user/bulk`; - // use dummy base URL string because the URL constructor only accepts absolute URLs. - const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); - let baseOptions; - if (configuration) { - baseOptions = configuration.baseOptions; - } - - const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; - const localVarHeaderParameter = {} as any; - const localVarQueryParameter = {} as any; - - // authentication ApiKeyAuth required - await setApiKeyToObject(localVarHeaderParameter, "x-api-key", configuration) - - if (fids !== undefined) { - localVarQueryParameter['fids'] = fids; - } - - if (viewerFid !== undefined) { - localVarQueryParameter['viewer_fid'] = viewerFid; - } - - - - setSearchParams(localVarUrlObj, localVarQueryParameter); - let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; - localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; - - return { - url: toPathString(localVarUrlObj), - options: localVarRequestOptions, - }; - }, - /** - * Fetches all users based on multiple Ethereum or Solana addresses. Each farcaster user has a custody Ethereum address and optionally verified Ethereum or Solana addresses. This endpoint returns all users that have any of the given addresses as their custody or verified Ethereum or Solana addresses. A custody address can be associated with only 1 farcaster user at a time but a verified address can be associated with multiple users. You can pass in Ethereum and Solana addresses, comma separated, in the same request. The response will contain users associated with the given addresses. - * @summary By Eth or Sol addresses - * @param {string} addresses Comma separated list of Ethereum addresses, up to 350 at a time - * @param {string} [addressTypes] Customize which address types the request should search for. This is a comma-separated string that can include the following values: \'custody_address\' and \'verified_address\'. By default api returns both. To select multiple types, use a comma-separated list of these values. - * @param {number} [viewerFid] - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - userBulkByAddress: async (addresses: string, addressTypes?: string, viewerFid?: number, options: RawAxiosRequestConfig = {}): Promise => { - // verify required parameter 'addresses' is not null or undefined - assertParamExists('userBulkByAddress', 'addresses', addresses) - const localVarPath = `/farcaster/user/bulk-by-address`; - // use dummy base URL string because the URL constructor only accepts absolute URLs. - const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); - let baseOptions; - if (configuration) { - baseOptions = configuration.baseOptions; - } - - const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; - const localVarHeaderParameter = {} as any; - const localVarQueryParameter = {} as any; - - // authentication ApiKeyAuth required - await setApiKeyToObject(localVarHeaderParameter, "x-api-key", configuration) - - if (addresses !== undefined) { - localVarQueryParameter['addresses'] = addresses; - } - - if (addressTypes !== undefined) { - localVarQueryParameter['address_types'] = addressTypes; - } - - if (viewerFid !== undefined) { - localVarQueryParameter['viewer_fid'] = viewerFid; - } - - - - setSearchParams(localVarUrlObj, localVarQueryParameter); - let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; - localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; - - return { - url: toPathString(localVarUrlObj), - options: localVarRequestOptions, - }; - }, - /** - * Fetches a single hydrated user object given a username - * @summary By username - * @param {string} username Username of the user to fetch - * @param {number} [viewerFid] - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - userByUsernameV2: async (username: string, viewerFid?: number, options: RawAxiosRequestConfig = {}): Promise => { - // verify required parameter 'username' is not null or undefined - assertParamExists('userByUsernameV2', 'username', username) - const localVarPath = `/farcaster/user/by_username`; - // use dummy base URL string because the URL constructor only accepts absolute URLs. - const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); - let baseOptions; - if (configuration) { - baseOptions = configuration.baseOptions; - } - - const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; - const localVarHeaderParameter = {} as any; - const localVarQueryParameter = {} as any; - - // authentication ApiKeyAuth required - await setApiKeyToObject(localVarHeaderParameter, "x-api-key", configuration) - - if (username !== undefined) { - localVarQueryParameter['username'] = username; - } - - if (viewerFid !== undefined) { - localVarQueryParameter['viewer_fid'] = viewerFid; - } - - - - setSearchParams(localVarUrlObj, localVarQueryParameter); - let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; - localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; - - return { - url: toPathString(localVarUrlObj), - options: localVarRequestOptions, - }; - }, - /** - * Fetches power users and respond in a backwards compatible format to Warpcast\'s deprecated power badge endpoint. - * @summary Power user FIDs - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - userPowerLite: async (options: RawAxiosRequestConfig = {}): Promise => { - const localVarPath = `/farcaster/user/power_lite`; - // use dummy base URL string because the URL constructor only accepts absolute URLs. - const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); - let baseOptions; - if (configuration) { - baseOptions = configuration.baseOptions; - } - - const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; - const localVarHeaderParameter = {} as any; - const localVarQueryParameter = {} as any; - - // authentication ApiKeyAuth required - await setApiKeyToObject(localVarHeaderParameter, "x-api-key", configuration) - - - - setSearchParams(localVarUrlObj, localVarQueryParameter); - let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; - localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; - - return { - url: toPathString(localVarUrlObj), - options: localVarRequestOptions, - }; - }, - /** - * Search for Usernames - * @summary Search for Usernames - * @param {string} q - * @param {number} [viewerFid] Providing this will return search results that respects this user\'s mutes and blocks and includes `viewer_context`. - * @param {number} [limit] - * @param {string} [cursor] Pagination cursor. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - userSearch: async (q: string, viewerFid?: number, limit?: number, cursor?: string, options: RawAxiosRequestConfig = {}): Promise => { - // verify required parameter 'q' is not null or undefined - assertParamExists('userSearch', 'q', q) - const localVarPath = `/farcaster/user/search`; - // use dummy base URL string because the URL constructor only accepts absolute URLs. - const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); - let baseOptions; - if (configuration) { - baseOptions = configuration.baseOptions; - } - - const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; - const localVarHeaderParameter = {} as any; - const localVarQueryParameter = {} as any; - - // authentication ApiKeyAuth required - await setApiKeyToObject(localVarHeaderParameter, "x-api-key", configuration) - - if (q !== undefined) { - localVarQueryParameter['q'] = q; - } - - if (viewerFid !== undefined) { - localVarQueryParameter['viewer_fid'] = viewerFid; - } - - if (limit !== undefined) { - localVarQueryParameter['limit'] = limit; - } - - if (cursor !== undefined) { - localVarQueryParameter['cursor'] = cursor; - } - - - - setSearchParams(localVarUrlObj, localVarQueryParameter); - let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; - localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; - - return { - url: toPathString(localVarUrlObj), - options: localVarRequestOptions, - }; - }, - } -}; - -/** - * UserApi - functional programming interface - * @export - */ -export const UserApiFp = function(configuration?: Configuration) { - const localVarAxiosParamCreator = UserApiAxiosParamCreator(configuration) - return { - /** - * Warpcast has deprecated the active badge. Use user/power endpoint instead. - * @summary Fetch active users - * @param {number} [limit] - * @param {string} [cursor] Pagination cursor. - * @param {*} [options] Override http request option. - * @deprecated - * @throws {RequiredError} - */ - async activeUsers(limit?: number, cursor?: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.activeUsers(limit, cursor, options); - const localVarOperationServerIndex = configuration?.serverIndex ?? 0; - const localVarOperationServerBasePath = operationServerMap['UserApi.activeUsers']?.[localVarOperationServerIndex]?.url; - return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); - }, - /** - * Removes verification for an eth address for the user \\ (In order to delete verification `signer_uuid` must be approved) - * @summary Delete verification - * @param {RemoveVerificationReqBody} removeVerificationReqBody - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - async farcasterUserVerificationDelete(removeVerificationReqBody: RemoveVerificationReqBody, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.farcasterUserVerificationDelete(removeVerificationReqBody, options); - const localVarOperationServerIndex = configuration?.serverIndex ?? 0; - const localVarOperationServerBasePath = operationServerMap['UserApi.farcasterUserVerificationDelete']?.[localVarOperationServerIndex]?.url; - return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); - }, - /** - * Adds verification for an eth address or contract for the user \\ (In order to add verification `signer_uuid` must be approved) - * @summary Add verification - * @param {AddVerificationReqBody} addVerificationReqBody - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - async farcasterUserVerificationPost(addVerificationReqBody: AddVerificationReqBody, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.farcasterUserVerificationPost(addVerificationReqBody, options); - const localVarOperationServerIndex = configuration?.serverIndex ?? 0; - const localVarOperationServerBasePath = operationServerMap['UserApi.farcasterUserVerificationPost']?.[localVarOperationServerIndex]?.url; - return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); - }, - /** - * Follow a user \\ (In order to follow a user `signer_uuid` must be approved) - * @summary Follow user - * @param {FollowReqBody} followReqBody - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - async followUser(followReqBody: FollowReqBody, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.followUser(followReqBody, options); - const localVarOperationServerIndex = configuration?.serverIndex ?? 0; - const localVarOperationServerBasePath = operationServerMap['UserApi.followUser']?.[localVarOperationServerIndex]?.url; - return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); - }, - /** - * Fetches FID to [assign it to new user](https://docs.neynar.com/reference/register-user) - * @summary Fetch fresh FID - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - async getFreshFid(options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.getFreshFid(options); - const localVarOperationServerIndex = configuration?.serverIndex ?? 0; - const localVarOperationServerBasePath = operationServerMap['UserApi.getFreshFid']?.[localVarOperationServerIndex]?.url; - return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); - }, - /** - * Lookup a user by custody-address - * @summary By custody-address - * @param {string} custodyAddress Custody Address associated with mnemonic - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - async lookupUserByCustodyAddress(custodyAddress: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.lookupUserByCustodyAddress(custodyAddress, options); - const localVarOperationServerIndex = configuration?.serverIndex ?? 0; - const localVarOperationServerBasePath = operationServerMap['UserApi.lookupUserByCustodyAddress']?.[localVarOperationServerIndex]?.url; - return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); - }, - /** - * Fetches power users based on Warpcast power badges. Information is updated once a day. - * @summary Power users - * @param {number} [viewerFid] - * @param {number} [limit] Number of power users to fetch, max 100 - * @param {string} [cursor] Pagination cursor. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - async powerUsers(viewerFid?: number, limit?: number, cursor?: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.powerUsers(viewerFid, limit, cursor, options); - const localVarOperationServerIndex = configuration?.serverIndex ?? 0; - const localVarOperationServerBasePath = operationServerMap['UserApi.powerUsers']?.[localVarOperationServerIndex]?.url; - return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); - }, - /** - * Register account on farcaster. **Note:** This API must be called within 10 minutes of the fetch FID API call (i.e., /v2/farcaster/user/fid). Otherwise, Neynar will assign this FID to another available user. - * @summary Register new account - * @param {RegisterUserReqBody} registerUserReqBody - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - async registerUser(registerUserReqBody: RegisterUserReqBody, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.registerUser(registerUserReqBody, options); - const localVarOperationServerIndex = configuration?.serverIndex ?? 0; - const localVarOperationServerBasePath = operationServerMap['UserApi.registerUser']?.[localVarOperationServerIndex]?.url; - return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); - }, - /** - * Unfollow a user \\ (In order to unfollow a user `signer_uuid` must be approved) - * @summary Unfollow user - * @param {FollowReqBody} followReqBody - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - async unfollowUser(followReqBody: FollowReqBody, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.unfollowUser(followReqBody, options); - const localVarOperationServerIndex = configuration?.serverIndex ?? 0; - const localVarOperationServerBasePath = operationServerMap['UserApi.unfollowUser']?.[localVarOperationServerIndex]?.url; - return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); - }, - /** - * Update user profile \\ (In order to update user\'s profile `signer_uuid` must be approved) - * @summary Update user profile - * @param {UpdateUserReqBody} updateUserReqBody - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - async updateUser(updateUserReqBody: UpdateUserReqBody, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.updateUser(updateUserReqBody, options); - const localVarOperationServerIndex = configuration?.serverIndex ?? 0; - const localVarOperationServerBasePath = operationServerMap['UserApi.updateUser']?.[localVarOperationServerIndex]?.url; - return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); - }, - /** - * Fetches information about multiple users based on FIDs - * @summary By FIDs - * @param {string} fids Comma separated list of FIDs, up to 100 at a time - * @param {number} [viewerFid] - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - async userBulk(fids: string, viewerFid?: number, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.userBulk(fids, viewerFid, options); - const localVarOperationServerIndex = configuration?.serverIndex ?? 0; - const localVarOperationServerBasePath = operationServerMap['UserApi.userBulk']?.[localVarOperationServerIndex]?.url; - return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); - }, - /** - * Fetches all users based on multiple Ethereum or Solana addresses. Each farcaster user has a custody Ethereum address and optionally verified Ethereum or Solana addresses. This endpoint returns all users that have any of the given addresses as their custody or verified Ethereum or Solana addresses. A custody address can be associated with only 1 farcaster user at a time but a verified address can be associated with multiple users. You can pass in Ethereum and Solana addresses, comma separated, in the same request. The response will contain users associated with the given addresses. - * @summary By Eth or Sol addresses - * @param {string} addresses Comma separated list of Ethereum addresses, up to 350 at a time - * @param {string} [addressTypes] Customize which address types the request should search for. This is a comma-separated string that can include the following values: \'custody_address\' and \'verified_address\'. By default api returns both. To select multiple types, use a comma-separated list of these values. - * @param {number} [viewerFid] - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - async userBulkByAddress(addresses: string, addressTypes?: string, viewerFid?: number, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<{ [key: string]: Array; }>> { - const localVarAxiosArgs = await localVarAxiosParamCreator.userBulkByAddress(addresses, addressTypes, viewerFid, options); - const localVarOperationServerIndex = configuration?.serverIndex ?? 0; - const localVarOperationServerBasePath = operationServerMap['UserApi.userBulkByAddress']?.[localVarOperationServerIndex]?.url; - return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); - }, - /** - * Fetches a single hydrated user object given a username - * @summary By username - * @param {string} username Username of the user to fetch - * @param {number} [viewerFid] - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - async userByUsernameV2(username: string, viewerFid?: number, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.userByUsernameV2(username, viewerFid, options); - const localVarOperationServerIndex = configuration?.serverIndex ?? 0; - const localVarOperationServerBasePath = operationServerMap['UserApi.userByUsernameV2']?.[localVarOperationServerIndex]?.url; - return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); - }, - /** - * Fetches power users and respond in a backwards compatible format to Warpcast\'s deprecated power badge endpoint. - * @summary Power user FIDs - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - async userPowerLite(options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.userPowerLite(options); - const localVarOperationServerIndex = configuration?.serverIndex ?? 0; - const localVarOperationServerBasePath = operationServerMap['UserApi.userPowerLite']?.[localVarOperationServerIndex]?.url; - return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); - }, - /** - * Search for Usernames - * @summary Search for Usernames - * @param {string} q - * @param {number} [viewerFid] Providing this will return search results that respects this user\'s mutes and blocks and includes `viewer_context`. - * @param {number} [limit] - * @param {string} [cursor] Pagination cursor. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - async userSearch(q: string, viewerFid?: number, limit?: number, cursor?: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.userSearch(q, viewerFid, limit, cursor, options); - const localVarOperationServerIndex = configuration?.serverIndex ?? 0; - const localVarOperationServerBasePath = operationServerMap['UserApi.userSearch']?.[localVarOperationServerIndex]?.url; - return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); - }, - } -}; - -/** - * UserApi - factory interface - * @export - */ -export const UserApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) { - const localVarFp = UserApiFp(configuration) - return { - /** - * Warpcast has deprecated the active badge. Use user/power endpoint instead. - * @summary Fetch active users - * @param {number} [limit] - * @param {string} [cursor] Pagination cursor. - * @param {*} [options] Override http request option. - * @deprecated - * @throws {RequiredError} - */ - activeUsers(limit?: number, cursor?: string, options?: RawAxiosRequestConfig): AxiosPromise { - return localVarFp.activeUsers(limit, cursor, options).then((request) => request(axios, basePath)); - }, - /** - * Removes verification for an eth address for the user \\ (In order to delete verification `signer_uuid` must be approved) - * @summary Delete verification - * @param {RemoveVerificationReqBody} removeVerificationReqBody - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - farcasterUserVerificationDelete(removeVerificationReqBody: RemoveVerificationReqBody, options?: RawAxiosRequestConfig): AxiosPromise { - return localVarFp.farcasterUserVerificationDelete(removeVerificationReqBody, options).then((request) => request(axios, basePath)); - }, - /** - * Adds verification for an eth address or contract for the user \\ (In order to add verification `signer_uuid` must be approved) - * @summary Add verification - * @param {AddVerificationReqBody} addVerificationReqBody - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - farcasterUserVerificationPost(addVerificationReqBody: AddVerificationReqBody, options?: RawAxiosRequestConfig): AxiosPromise { - return localVarFp.farcasterUserVerificationPost(addVerificationReqBody, options).then((request) => request(axios, basePath)); - }, - /** - * Follow a user \\ (In order to follow a user `signer_uuid` must be approved) - * @summary Follow user - * @param {FollowReqBody} followReqBody - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - followUser(followReqBody: FollowReqBody, options?: RawAxiosRequestConfig): AxiosPromise { - return localVarFp.followUser(followReqBody, options).then((request) => request(axios, basePath)); - }, - /** - * Fetches FID to [assign it to new user](https://docs.neynar.com/reference/register-user) - * @summary Fetch fresh FID - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - getFreshFid(options?: RawAxiosRequestConfig): AxiosPromise { - return localVarFp.getFreshFid(options).then((request) => request(axios, basePath)); - }, - /** - * Lookup a user by custody-address - * @summary By custody-address - * @param {string} custodyAddress Custody Address associated with mnemonic - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - lookupUserByCustodyAddress(custodyAddress: string, options?: RawAxiosRequestConfig): AxiosPromise { - return localVarFp.lookupUserByCustodyAddress(custodyAddress, options).then((request) => request(axios, basePath)); - }, - /** - * Fetches power users based on Warpcast power badges. Information is updated once a day. - * @summary Power users - * @param {number} [viewerFid] - * @param {number} [limit] Number of power users to fetch, max 100 - * @param {string} [cursor] Pagination cursor. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - powerUsers(viewerFid?: number, limit?: number, cursor?: string, options?: RawAxiosRequestConfig): AxiosPromise { - return localVarFp.powerUsers(viewerFid, limit, cursor, options).then((request) => request(axios, basePath)); - }, - /** - * Register account on farcaster. **Note:** This API must be called within 10 minutes of the fetch FID API call (i.e., /v2/farcaster/user/fid). Otherwise, Neynar will assign this FID to another available user. - * @summary Register new account - * @param {RegisterUserReqBody} registerUserReqBody - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - registerUser(registerUserReqBody: RegisterUserReqBody, options?: RawAxiosRequestConfig): AxiosPromise { - return localVarFp.registerUser(registerUserReqBody, options).then((request) => request(axios, basePath)); - }, - /** - * Unfollow a user \\ (In order to unfollow a user `signer_uuid` must be approved) - * @summary Unfollow user - * @param {FollowReqBody} followReqBody - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - unfollowUser(followReqBody: FollowReqBody, options?: RawAxiosRequestConfig): AxiosPromise { - return localVarFp.unfollowUser(followReqBody, options).then((request) => request(axios, basePath)); - }, - /** - * Update user profile \\ (In order to update user\'s profile `signer_uuid` must be approved) - * @summary Update user profile - * @param {UpdateUserReqBody} updateUserReqBody - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - updateUser(updateUserReqBody: UpdateUserReqBody, options?: RawAxiosRequestConfig): AxiosPromise { - return localVarFp.updateUser(updateUserReqBody, options).then((request) => request(axios, basePath)); - }, - /** - * Fetches information about multiple users based on FIDs - * @summary By FIDs - * @param {string} fids Comma separated list of FIDs, up to 100 at a time - * @param {number} [viewerFid] - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - userBulk(fids: string, viewerFid?: number, options?: RawAxiosRequestConfig): AxiosPromise { - return localVarFp.userBulk(fids, viewerFid, options).then((request) => request(axios, basePath)); - }, - /** - * Fetches all users based on multiple Ethereum or Solana addresses. Each farcaster user has a custody Ethereum address and optionally verified Ethereum or Solana addresses. This endpoint returns all users that have any of the given addresses as their custody or verified Ethereum or Solana addresses. A custody address can be associated with only 1 farcaster user at a time but a verified address can be associated with multiple users. You can pass in Ethereum and Solana addresses, comma separated, in the same request. The response will contain users associated with the given addresses. - * @summary By Eth or Sol addresses - * @param {string} addresses Comma separated list of Ethereum addresses, up to 350 at a time - * @param {string} [addressTypes] Customize which address types the request should search for. This is a comma-separated string that can include the following values: \'custody_address\' and \'verified_address\'. By default api returns both. To select multiple types, use a comma-separated list of these values. - * @param {number} [viewerFid] - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - userBulkByAddress(addresses: string, addressTypes?: string, viewerFid?: number, options?: RawAxiosRequestConfig): AxiosPromise<{ [key: string]: Array; }> { - return localVarFp.userBulkByAddress(addresses, addressTypes, viewerFid, options).then((request) => request(axios, basePath)); - }, - /** - * Fetches a single hydrated user object given a username - * @summary By username - * @param {string} username Username of the user to fetch - * @param {number} [viewerFid] - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - userByUsernameV2(username: string, viewerFid?: number, options?: RawAxiosRequestConfig): AxiosPromise { - return localVarFp.userByUsernameV2(username, viewerFid, options).then((request) => request(axios, basePath)); - }, - /** - * Fetches power users and respond in a backwards compatible format to Warpcast\'s deprecated power badge endpoint. - * @summary Power user FIDs - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - userPowerLite(options?: RawAxiosRequestConfig): AxiosPromise { - return localVarFp.userPowerLite(options).then((request) => request(axios, basePath)); - }, - /** - * Search for Usernames - * @summary Search for Usernames - * @param {string} q - * @param {number} [viewerFid] Providing this will return search results that respects this user\'s mutes and blocks and includes `viewer_context`. - * @param {number} [limit] - * @param {string} [cursor] Pagination cursor. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - userSearch(q: string, viewerFid?: number, limit?: number, cursor?: string, options?: RawAxiosRequestConfig): AxiosPromise { - return localVarFp.userSearch(q, viewerFid, limit, cursor, options).then((request) => request(axios, basePath)); - }, - }; -}; - -/** - * UserApi - object-oriented interface - * @export - * @class UserApi - * @extends {BaseAPI} - */ -export class UserApi extends BaseAPI { - /** - * Warpcast has deprecated the active badge. Use user/power endpoint instead. - * @summary Fetch active users - * @param {number} [limit] - * @param {string} [cursor] Pagination cursor. - * @param {*} [options] Override http request option. - * @deprecated - * @throws {RequiredError} - * @memberof UserApi - */ - public activeUsers(limit?: number, cursor?: string, options?: RawAxiosRequestConfig) { - return UserApiFp(this.configuration).activeUsers(limit, cursor, options).then((request) => request(this.axios, this.basePath)); - } - - /** - * Removes verification for an eth address for the user \\ (In order to delete verification `signer_uuid` must be approved) - * @summary Delete verification - * @param {RemoveVerificationReqBody} removeVerificationReqBody - * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof UserApi - */ - public farcasterUserVerificationDelete(removeVerificationReqBody: RemoveVerificationReqBody, options?: RawAxiosRequestConfig) { - return UserApiFp(this.configuration).farcasterUserVerificationDelete(removeVerificationReqBody, options).then((request) => request(this.axios, this.basePath)); - } - - /** - * Adds verification for an eth address or contract for the user \\ (In order to add verification `signer_uuid` must be approved) - * @summary Add verification - * @param {AddVerificationReqBody} addVerificationReqBody - * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof UserApi - */ - public farcasterUserVerificationPost(addVerificationReqBody: AddVerificationReqBody, options?: RawAxiosRequestConfig) { - return UserApiFp(this.configuration).farcasterUserVerificationPost(addVerificationReqBody, options).then((request) => request(this.axios, this.basePath)); - } - - /** - * Follow a user \\ (In order to follow a user `signer_uuid` must be approved) - * @summary Follow user - * @param {FollowReqBody} followReqBody - * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof UserApi - */ - public followUser(followReqBody: FollowReqBody, options?: RawAxiosRequestConfig) { - return UserApiFp(this.configuration).followUser(followReqBody, options).then((request) => request(this.axios, this.basePath)); - } - - /** - * Fetches FID to [assign it to new user](https://docs.neynar.com/reference/register-user) - * @summary Fetch fresh FID - * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof UserApi - */ - public getFreshFid(options?: RawAxiosRequestConfig) { - return UserApiFp(this.configuration).getFreshFid(options).then((request) => request(this.axios, this.basePath)); - } - - /** - * Lookup a user by custody-address - * @summary By custody-address - * @param {string} custodyAddress Custody Address associated with mnemonic - * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof UserApi - */ - public lookupUserByCustodyAddress(custodyAddress: string, options?: RawAxiosRequestConfig) { - return UserApiFp(this.configuration).lookupUserByCustodyAddress(custodyAddress, options).then((request) => request(this.axios, this.basePath)); - } - - /** - * Fetches power users based on Warpcast power badges. Information is updated once a day. - * @summary Power users - * @param {number} [viewerFid] - * @param {number} [limit] Number of power users to fetch, max 100 - * @param {string} [cursor] Pagination cursor. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof UserApi - */ - public powerUsers(viewerFid?: number, limit?: number, cursor?: string, options?: RawAxiosRequestConfig) { - return UserApiFp(this.configuration).powerUsers(viewerFid, limit, cursor, options).then((request) => request(this.axios, this.basePath)); - } - - /** - * Register account on farcaster. **Note:** This API must be called within 10 minutes of the fetch FID API call (i.e., /v2/farcaster/user/fid). Otherwise, Neynar will assign this FID to another available user. - * @summary Register new account - * @param {RegisterUserReqBody} registerUserReqBody - * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof UserApi - */ - public registerUser(registerUserReqBody: RegisterUserReqBody, options?: RawAxiosRequestConfig) { - return UserApiFp(this.configuration).registerUser(registerUserReqBody, options).then((request) => request(this.axios, this.basePath)); - } - - /** - * Unfollow a user \\ (In order to unfollow a user `signer_uuid` must be approved) - * @summary Unfollow user - * @param {FollowReqBody} followReqBody - * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof UserApi - */ - public unfollowUser(followReqBody: FollowReqBody, options?: RawAxiosRequestConfig) { - return UserApiFp(this.configuration).unfollowUser(followReqBody, options).then((request) => request(this.axios, this.basePath)); - } - - /** - * Update user profile \\ (In order to update user\'s profile `signer_uuid` must be approved) - * @summary Update user profile - * @param {UpdateUserReqBody} updateUserReqBody - * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof UserApi - */ - public updateUser(updateUserReqBody: UpdateUserReqBody, options?: RawAxiosRequestConfig) { - return UserApiFp(this.configuration).updateUser(updateUserReqBody, options).then((request) => request(this.axios, this.basePath)); - } - - /** - * Fetches information about multiple users based on FIDs - * @summary By FIDs - * @param {string} fids Comma separated list of FIDs, up to 100 at a time - * @param {number} [viewerFid] - * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof UserApi - */ - public userBulk(fids: string, viewerFid?: number, options?: RawAxiosRequestConfig) { - return UserApiFp(this.configuration).userBulk(fids, viewerFid, options).then((request) => request(this.axios, this.basePath)); - } - - /** - * Fetches all users based on multiple Ethereum or Solana addresses. Each farcaster user has a custody Ethereum address and optionally verified Ethereum or Solana addresses. This endpoint returns all users that have any of the given addresses as their custody or verified Ethereum or Solana addresses. A custody address can be associated with only 1 farcaster user at a time but a verified address can be associated with multiple users. You can pass in Ethereum and Solana addresses, comma separated, in the same request. The response will contain users associated with the given addresses. - * @summary By Eth or Sol addresses - * @param {string} addresses Comma separated list of Ethereum addresses, up to 350 at a time - * @param {string} [addressTypes] Customize which address types the request should search for. This is a comma-separated string that can include the following values: \'custody_address\' and \'verified_address\'. By default api returns both. To select multiple types, use a comma-separated list of these values. - * @param {number} [viewerFid] - * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof UserApi - */ - public userBulkByAddress(addresses: string, addressTypes?: string, viewerFid?: number, options?: RawAxiosRequestConfig) { - return UserApiFp(this.configuration).userBulkByAddress(addresses, addressTypes, viewerFid, options).then((request) => request(this.axios, this.basePath)); - } - - /** - * Fetches a single hydrated user object given a username - * @summary By username - * @param {string} username Username of the user to fetch - * @param {number} [viewerFid] - * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof UserApi - */ - public userByUsernameV2(username: string, viewerFid?: number, options?: RawAxiosRequestConfig) { - return UserApiFp(this.configuration).userByUsernameV2(username, viewerFid, options).then((request) => request(this.axios, this.basePath)); - } - - /** - * Fetches power users and respond in a backwards compatible format to Warpcast\'s deprecated power badge endpoint. - * @summary Power user FIDs - * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof UserApi - */ - public userPowerLite(options?: RawAxiosRequestConfig) { - return UserApiFp(this.configuration).userPowerLite(options).then((request) => request(this.axios, this.basePath)); - } - - /** - * Search for Usernames - * @summary Search for Usernames - * @param {string} q - * @param {number} [viewerFid] Providing this will return search results that respects this user\'s mutes and blocks and includes `viewer_context`. - * @param {number} [limit] - * @param {string} [cursor] Pagination cursor. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof UserApi - */ - public userSearch(q: string, viewerFid?: number, limit?: number, cursor?: string, options?: RawAxiosRequestConfig) { - return UserApiFp(this.configuration).userSearch(q, viewerFid, limit, cursor, options).then((request) => request(this.axios, this.basePath)); - } -} - - - -/** - * WebhookApi - axios parameter creator - * @export - */ -export const WebhookApiAxiosParamCreator = function (configuration?: Configuration) { - return { - /** - * Delete a webhook - * @summary Delete a webhook - * @param {WebhookDeleteReqBody} webhookDeleteReqBody - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - deleteWebhook: async (webhookDeleteReqBody: WebhookDeleteReqBody, options: RawAxiosRequestConfig = {}): Promise => { - // verify required parameter 'webhookDeleteReqBody' is not null or undefined - assertParamExists('deleteWebhook', 'webhookDeleteReqBody', webhookDeleteReqBody) - const localVarPath = `/farcaster/webhook`; - // use dummy base URL string because the URL constructor only accepts absolute URLs. - const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); - let baseOptions; - if (configuration) { - baseOptions = configuration.baseOptions; - } - - const localVarRequestOptions = { method: 'DELETE', ...baseOptions, ...options}; - const localVarHeaderParameter = {} as any; - const localVarQueryParameter = {} as any; - - // authentication ApiKeyAuth required - await setApiKeyToObject(localVarHeaderParameter, "x-api-key", configuration) - - - - localVarHeaderParameter['Content-Type'] = 'application/json'; - - setSearchParams(localVarUrlObj, localVarQueryParameter); - let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; - localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; - localVarRequestOptions.data = serializeDataIfNeeded(webhookDeleteReqBody, localVarRequestOptions, configuration) - - return { - url: toPathString(localVarUrlObj), - options: localVarRequestOptions, - }; - }, - /** - * Fetch a list of webhooks associated to a user - * @summary Associated webhooks of user - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - fetchWebhooks: async (options: RawAxiosRequestConfig = {}): Promise => { - const localVarPath = `/farcaster/webhook/list`; - // use dummy base URL string because the URL constructor only accepts absolute URLs. - const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); - let baseOptions; - if (configuration) { - baseOptions = configuration.baseOptions; - } - - const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; - const localVarHeaderParameter = {} as any; - const localVarQueryParameter = {} as any; - - // authentication ApiKeyAuth required - await setApiKeyToObject(localVarHeaderParameter, "x-api-key", configuration) - - - - setSearchParams(localVarUrlObj, localVarQueryParameter); - let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; - localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; - - return { - url: toPathString(localVarUrlObj), - options: localVarRequestOptions, - }; - }, - /** - * Fetch a webhook - * @summary Fetch a webhook - * @param {string} webhookId - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - lookupWebhook: async (webhookId: string, options: RawAxiosRequestConfig = {}): Promise => { - // verify required parameter 'webhookId' is not null or undefined - assertParamExists('lookupWebhook', 'webhookId', webhookId) - const localVarPath = `/farcaster/webhook`; - // use dummy base URL string because the URL constructor only accepts absolute URLs. - const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); - let baseOptions; - if (configuration) { - baseOptions = configuration.baseOptions; - } - - const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; - const localVarHeaderParameter = {} as any; - const localVarQueryParameter = {} as any; - - // authentication ApiKeyAuth required - await setApiKeyToObject(localVarHeaderParameter, "x-api-key", configuration) - - if (webhookId !== undefined) { - localVarQueryParameter['webhook_id'] = webhookId; - } - - - - setSearchParams(localVarUrlObj, localVarQueryParameter); - let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; - localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; - - return { - url: toPathString(localVarUrlObj), - options: localVarRequestOptions, - }; - }, - /** - * Create a webhook - * @summary Create a webhook - * @param {WebhookPostReqBody} webhookPostReqBody - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - publishWebhook: async (webhookPostReqBody: WebhookPostReqBody, options: RawAxiosRequestConfig = {}): Promise => { - // verify required parameter 'webhookPostReqBody' is not null or undefined - assertParamExists('publishWebhook', 'webhookPostReqBody', webhookPostReqBody) - const localVarPath = `/farcaster/webhook`; - // use dummy base URL string because the URL constructor only accepts absolute URLs. - const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); - let baseOptions; - if (configuration) { - baseOptions = configuration.baseOptions; - } - - const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options}; - const localVarHeaderParameter = {} as any; - const localVarQueryParameter = {} as any; - - // authentication ApiKeyAuth required - await setApiKeyToObject(localVarHeaderParameter, "x-api-key", configuration) - - - - localVarHeaderParameter['Content-Type'] = 'application/json'; - - setSearchParams(localVarUrlObj, localVarQueryParameter); - let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; - localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; - localVarRequestOptions.data = serializeDataIfNeeded(webhookPostReqBody, localVarRequestOptions, configuration) - - return { - url: toPathString(localVarUrlObj), - options: localVarRequestOptions, - }; - }, - /** - * Update a webhook - * @summary Update a webhook - * @param {WebhookPutReqBody} webhookPutReqBody - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - updateWebhook: async (webhookPutReqBody: WebhookPutReqBody, options: RawAxiosRequestConfig = {}): Promise => { - // verify required parameter 'webhookPutReqBody' is not null or undefined - assertParamExists('updateWebhook', 'webhookPutReqBody', webhookPutReqBody) - const localVarPath = `/farcaster/webhook`; - // use dummy base URL string because the URL constructor only accepts absolute URLs. - const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); - let baseOptions; - if (configuration) { - baseOptions = configuration.baseOptions; - } - - const localVarRequestOptions = { method: 'PUT', ...baseOptions, ...options}; - const localVarHeaderParameter = {} as any; - const localVarQueryParameter = {} as any; - - // authentication ApiKeyAuth required - await setApiKeyToObject(localVarHeaderParameter, "x-api-key", configuration) - - - - localVarHeaderParameter['Content-Type'] = 'application/json'; - - setSearchParams(localVarUrlObj, localVarQueryParameter); - let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; - localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; - localVarRequestOptions.data = serializeDataIfNeeded(webhookPutReqBody, localVarRequestOptions, configuration) - - return { - url: toPathString(localVarUrlObj), - options: localVarRequestOptions, - }; - }, - /** - * Update webhook active status - * @summary Update webhook status - * @param {WebhookPatchReqBody} webhookPatchReqBody - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - updateWebhookActiveStatus: async (webhookPatchReqBody: WebhookPatchReqBody, options: RawAxiosRequestConfig = {}): Promise => { - // verify required parameter 'webhookPatchReqBody' is not null or undefined - assertParamExists('updateWebhookActiveStatus', 'webhookPatchReqBody', webhookPatchReqBody) - const localVarPath = `/farcaster/webhook`; - // use dummy base URL string because the URL constructor only accepts absolute URLs. - const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); - let baseOptions; - if (configuration) { - baseOptions = configuration.baseOptions; - } - - const localVarRequestOptions = { method: 'PATCH', ...baseOptions, ...options}; - const localVarHeaderParameter = {} as any; - const localVarQueryParameter = {} as any; - - // authentication ApiKeyAuth required - await setApiKeyToObject(localVarHeaderParameter, "x-api-key", configuration) - - - - localVarHeaderParameter['Content-Type'] = 'application/json'; - - setSearchParams(localVarUrlObj, localVarQueryParameter); - let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; - localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; - localVarRequestOptions.data = serializeDataIfNeeded(webhookPatchReqBody, localVarRequestOptions, configuration) - - return { - url: toPathString(localVarUrlObj), - options: localVarRequestOptions, - }; - }, - } -}; - -/** - * WebhookApi - functional programming interface - * @export - */ -export const WebhookApiFp = function(configuration?: Configuration) { - const localVarAxiosParamCreator = WebhookApiAxiosParamCreator(configuration) - return { - /** - * Delete a webhook - * @summary Delete a webhook - * @param {WebhookDeleteReqBody} webhookDeleteReqBody - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - async deleteWebhook(webhookDeleteReqBody: WebhookDeleteReqBody, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.deleteWebhook(webhookDeleteReqBody, options); - const localVarOperationServerIndex = configuration?.serverIndex ?? 0; - const localVarOperationServerBasePath = operationServerMap['WebhookApi.deleteWebhook']?.[localVarOperationServerIndex]?.url; - return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); - }, - /** - * Fetch a list of webhooks associated to a user - * @summary Associated webhooks of user - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - async fetchWebhooks(options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.fetchWebhooks(options); - const localVarOperationServerIndex = configuration?.serverIndex ?? 0; - const localVarOperationServerBasePath = operationServerMap['WebhookApi.fetchWebhooks']?.[localVarOperationServerIndex]?.url; - return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); - }, - /** - * Fetch a webhook - * @summary Fetch a webhook - * @param {string} webhookId - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - async lookupWebhook(webhookId: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.lookupWebhook(webhookId, options); - const localVarOperationServerIndex = configuration?.serverIndex ?? 0; - const localVarOperationServerBasePath = operationServerMap['WebhookApi.lookupWebhook']?.[localVarOperationServerIndex]?.url; - return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); - }, - /** - * Create a webhook - * @summary Create a webhook - * @param {WebhookPostReqBody} webhookPostReqBody - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - async publishWebhook(webhookPostReqBody: WebhookPostReqBody, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.publishWebhook(webhookPostReqBody, options); - const localVarOperationServerIndex = configuration?.serverIndex ?? 0; - const localVarOperationServerBasePath = operationServerMap['WebhookApi.publishWebhook']?.[localVarOperationServerIndex]?.url; - return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); - }, - /** - * Update a webhook - * @summary Update a webhook - * @param {WebhookPutReqBody} webhookPutReqBody - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - async updateWebhook(webhookPutReqBody: WebhookPutReqBody, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.updateWebhook(webhookPutReqBody, options); - const localVarOperationServerIndex = configuration?.serverIndex ?? 0; - const localVarOperationServerBasePath = operationServerMap['WebhookApi.updateWebhook']?.[localVarOperationServerIndex]?.url; - return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); - }, - /** - * Update webhook active status - * @summary Update webhook status - * @param {WebhookPatchReqBody} webhookPatchReqBody - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - async updateWebhookActiveStatus(webhookPatchReqBody: WebhookPatchReqBody, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.updateWebhookActiveStatus(webhookPatchReqBody, options); - const localVarOperationServerIndex = configuration?.serverIndex ?? 0; - const localVarOperationServerBasePath = operationServerMap['WebhookApi.updateWebhookActiveStatus']?.[localVarOperationServerIndex]?.url; - return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); - }, - } -}; - -/** - * WebhookApi - factory interface - * @export - */ -export const WebhookApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) { - const localVarFp = WebhookApiFp(configuration) - return { - /** - * Delete a webhook - * @summary Delete a webhook - * @param {WebhookDeleteReqBody} webhookDeleteReqBody - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - deleteWebhook(webhookDeleteReqBody: WebhookDeleteReqBody, options?: RawAxiosRequestConfig): AxiosPromise { - return localVarFp.deleteWebhook(webhookDeleteReqBody, options).then((request) => request(axios, basePath)); - }, - /** - * Fetch a list of webhooks associated to a user - * @summary Associated webhooks of user - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - fetchWebhooks(options?: RawAxiosRequestConfig): AxiosPromise { - return localVarFp.fetchWebhooks(options).then((request) => request(axios, basePath)); - }, - /** - * Fetch a webhook - * @summary Fetch a webhook - * @param {string} webhookId - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - lookupWebhook(webhookId: string, options?: RawAxiosRequestConfig): AxiosPromise { - return localVarFp.lookupWebhook(webhookId, options).then((request) => request(axios, basePath)); - }, - /** - * Create a webhook - * @summary Create a webhook - * @param {WebhookPostReqBody} webhookPostReqBody - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - publishWebhook(webhookPostReqBody: WebhookPostReqBody, options?: RawAxiosRequestConfig): AxiosPromise { - return localVarFp.publishWebhook(webhookPostReqBody, options).then((request) => request(axios, basePath)); - }, - /** - * Update a webhook - * @summary Update a webhook - * @param {WebhookPutReqBody} webhookPutReqBody - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - updateWebhook(webhookPutReqBody: WebhookPutReqBody, options?: RawAxiosRequestConfig): AxiosPromise { - return localVarFp.updateWebhook(webhookPutReqBody, options).then((request) => request(axios, basePath)); - }, - /** - * Update webhook active status - * @summary Update webhook status - * @param {WebhookPatchReqBody} webhookPatchReqBody - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - updateWebhookActiveStatus(webhookPatchReqBody: WebhookPatchReqBody, options?: RawAxiosRequestConfig): AxiosPromise { - return localVarFp.updateWebhookActiveStatus(webhookPatchReqBody, options).then((request) => request(axios, basePath)); - }, - }; -}; - -/** - * WebhookApi - object-oriented interface - * @export - * @class WebhookApi - * @extends {BaseAPI} - */ -export class WebhookApi extends BaseAPI { - /** - * Delete a webhook - * @summary Delete a webhook - * @param {WebhookDeleteReqBody} webhookDeleteReqBody - * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof WebhookApi - */ - public deleteWebhook(webhookDeleteReqBody: WebhookDeleteReqBody, options?: RawAxiosRequestConfig) { - return WebhookApiFp(this.configuration).deleteWebhook(webhookDeleteReqBody, options).then((request) => request(this.axios, this.basePath)); - } - - /** - * Fetch a list of webhooks associated to a user - * @summary Associated webhooks of user - * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof WebhookApi - */ - public fetchWebhooks(options?: RawAxiosRequestConfig) { - return WebhookApiFp(this.configuration).fetchWebhooks(options).then((request) => request(this.axios, this.basePath)); - } - - /** - * Fetch a webhook - * @summary Fetch a webhook - * @param {string} webhookId - * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof WebhookApi - */ - public lookupWebhook(webhookId: string, options?: RawAxiosRequestConfig) { - return WebhookApiFp(this.configuration).lookupWebhook(webhookId, options).then((request) => request(this.axios, this.basePath)); - } - - /** - * Create a webhook - * @summary Create a webhook - * @param {WebhookPostReqBody} webhookPostReqBody - * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof WebhookApi - */ - public publishWebhook(webhookPostReqBody: WebhookPostReqBody, options?: RawAxiosRequestConfig) { - return WebhookApiFp(this.configuration).publishWebhook(webhookPostReqBody, options).then((request) => request(this.axios, this.basePath)); - } - - /** - * Update a webhook - * @summary Update a webhook - * @param {WebhookPutReqBody} webhookPutReqBody - * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof WebhookApi - */ - public updateWebhook(webhookPutReqBody: WebhookPutReqBody, options?: RawAxiosRequestConfig) { - return WebhookApiFp(this.configuration).updateWebhook(webhookPutReqBody, options).then((request) => request(this.axios, this.basePath)); - } - - /** - * Update webhook active status - * @summary Update webhook status - * @param {WebhookPatchReqBody} webhookPatchReqBody - * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof WebhookApi - */ - public updateWebhookActiveStatus(webhookPatchReqBody: WebhookPatchReqBody, options?: RawAxiosRequestConfig) { - return WebhookApiFp(this.configuration).updateWebhookActiveStatus(webhookPatchReqBody, options).then((request) => request(this.axios, this.basePath)); - } -} - +export * from './apis/action-api'; +export * from './apis/ban-api'; +export * from './apis/block-api'; +export * from './apis/cast-api'; +export * from './apis/channel-api'; +export * from './apis/feed-api'; +export * from './apis/fname-api'; +export * from './apis/follows-api'; +export * from './apis/frame-api'; +export * from './apis/mute-api'; +export * from './apis/notifications-api'; +export * from './apis/reaction-api'; +export * from './apis/signer-api'; +export * from './apis/storage-api'; +export * from './apis/subscribers-api'; +export * from './apis/user-api'; +export * from './apis/webhook-api'; diff --git a/src/neynar-api/v2/openapi-farcaster/apis/action-api.ts b/src/neynar-api/v2/openapi-farcaster/apis/action-api.ts new file mode 100644 index 00000000..80e874d2 --- /dev/null +++ b/src/neynar-api/v2/openapi-farcaster/apis/action-api.ts @@ -0,0 +1,136 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Farcaster API V2 + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +import type { Configuration } from '../configuration'; +import type { AxiosPromise, AxiosInstance, RawAxiosRequestConfig } from 'axios'; +import globalAxios from 'axios'; +// Some imports not used depending on template conditions +// @ts-ignore +import { DUMMY_BASE_URL, assertParamExists, setApiKeyToObject, setBasicAuthToObject, setBearerAuthToObject, setOAuthToObject, setSearchParams, serializeDataIfNeeded, toPathString, createRequestFunction } from '../common'; +// @ts-ignore +import { BASE_PATH, COLLECTION_FORMATS, type RequestArgs, BaseAPI, RequiredError, operationServerMap } from '../base'; +// @ts-ignore +import type { FarcasterActionReqBody } from '../models'; +/** + * ActionApi - axios parameter creator + * @export + */ +export const ActionApiAxiosParamCreator = function (configuration?: Configuration) { + return { + /** + * Securely communicate and perform actions on behalf of users across different apps. It enables an app to send data or trigger actions in another app on behalf of a mutual user by signing messages using the user\'s Farcaster signer. + * @summary User actions across apps + * @param {FarcasterActionReqBody} farcasterActionReqBody + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + publishFarcasterAction: async (farcasterActionReqBody: FarcasterActionReqBody, options: RawAxiosRequestConfig = {}): Promise => { + // verify required parameter 'farcasterActionReqBody' is not null or undefined + assertParamExists('publishFarcasterAction', 'farcasterActionReqBody', farcasterActionReqBody) + const localVarPath = `/farcaster/action`; + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication ApiKeyAuth required + await setApiKeyToObject(localVarHeaderParameter, "x-api-key", configuration) + + + + localVarHeaderParameter['Content-Type'] = 'application/json'; + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + localVarRequestOptions.data = serializeDataIfNeeded(farcasterActionReqBody, localVarRequestOptions, configuration) + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + } +}; + +/** + * ActionApi - functional programming interface + * @export + */ +export const ActionApiFp = function(configuration?: Configuration) { + const localVarAxiosParamCreator = ActionApiAxiosParamCreator(configuration) + return { + /** + * Securely communicate and perform actions on behalf of users across different apps. It enables an app to send data or trigger actions in another app on behalf of a mutual user by signing messages using the user\'s Farcaster signer. + * @summary User actions across apps + * @param {FarcasterActionReqBody} farcasterActionReqBody + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async publishFarcasterAction(farcasterActionReqBody: FarcasterActionReqBody, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<{ [key: string]: any; }>> { + const localVarAxiosArgs = await localVarAxiosParamCreator.publishFarcasterAction(farcasterActionReqBody, options); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = operationServerMap['ActionApi.publishFarcasterAction']?.[localVarOperationServerIndex]?.url; + return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); + }, + } +}; + +/** + * ActionApi - factory interface + * @export + */ +export const ActionApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) { + const localVarFp = ActionApiFp(configuration) + return { + /** + * Securely communicate and perform actions on behalf of users across different apps. It enables an app to send data or trigger actions in another app on behalf of a mutual user by signing messages using the user\'s Farcaster signer. + * @summary User actions across apps + * @param {FarcasterActionReqBody} farcasterActionReqBody + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + publishFarcasterAction(farcasterActionReqBody: FarcasterActionReqBody, options?: RawAxiosRequestConfig): AxiosPromise<{ [key: string]: any; }> { + return localVarFp.publishFarcasterAction(farcasterActionReqBody, options).then((request) => request(axios, basePath)); + }, + }; +}; + +/** + * ActionApi - object-oriented interface + * @export + * @class ActionApi + * @extends {BaseAPI} + */ +export class ActionApi extends BaseAPI { + /** + * Securely communicate and perform actions on behalf of users across different apps. It enables an app to send data or trigger actions in another app on behalf of a mutual user by signing messages using the user\'s Farcaster signer. + * @summary User actions across apps + * @param {FarcasterActionReqBody} farcasterActionReqBody + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof ActionApi + */ + public publishFarcasterAction(farcasterActionReqBody: FarcasterActionReqBody, options?: RawAxiosRequestConfig) { + return ActionApiFp(this.configuration).publishFarcasterAction(farcasterActionReqBody, options).then((request) => request(this.axios, this.basePath)); + } +} + diff --git a/src/neynar-api/v2/openapi-farcaster/apis/ban-api.ts b/src/neynar-api/v2/openapi-farcaster/apis/ban-api.ts new file mode 100644 index 00000000..d7d808be --- /dev/null +++ b/src/neynar-api/v2/openapi-farcaster/apis/ban-api.ts @@ -0,0 +1,297 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Farcaster API V2 + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +import type { Configuration } from '../configuration'; +import type { AxiosPromise, AxiosInstance, RawAxiosRequestConfig } from 'axios'; +import globalAxios from 'axios'; +// Some imports not used depending on template conditions +// @ts-ignore +import { DUMMY_BASE_URL, assertParamExists, setApiKeyToObject, setBasicAuthToObject, setBearerAuthToObject, setOAuthToObject, setSearchParams, serializeDataIfNeeded, toPathString, createRequestFunction } from '../common'; +// @ts-ignore +import { BASE_PATH, COLLECTION_FORMATS, type RequestArgs, BaseAPI, RequiredError, operationServerMap } from '../base'; +// @ts-ignore +import type { BanListResponse } from '../models'; +// @ts-ignore +import type { BanReqBody } from '../models'; +// @ts-ignore +import type { BanResponse } from '../models'; +// @ts-ignore +import type { ErrorRes } from '../models'; +/** + * BanApi - axios parameter creator + * @export + */ +export const BanApiAxiosParamCreator = function (configuration?: Configuration) { + return { + /** + * Bans a list of FIDs from the app associated with your API key. Banned users, their casts and reactions will not appear in feeds. + * @summary Ban FIDs from app + * @param {BanReqBody} banReqBody + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + addBan: async (banReqBody: BanReqBody, options: RawAxiosRequestConfig = {}): Promise => { + // verify required parameter 'banReqBody' is not null or undefined + assertParamExists('addBan', 'banReqBody', banReqBody) + const localVarPath = `/farcaster/ban`; + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication ApiKeyAuth required + await setApiKeyToObject(localVarHeaderParameter, "x-api-key", configuration) + + + + localVarHeaderParameter['Content-Type'] = 'application/json'; + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + localVarRequestOptions.data = serializeDataIfNeeded(banReqBody, localVarRequestOptions, configuration) + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * Fetches all FIDs that your app has banned. + * @summary Banned FIDs of app + * @param {number} [limit] Number of results to fetch (default 20, max 100). + * @param {string} [cursor] Pagination cursor. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + banList: async (limit?: number, cursor?: string, options: RawAxiosRequestConfig = {}): Promise => { + const localVarPath = `/farcaster/ban/list`; + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication ApiKeyAuth required + await setApiKeyToObject(localVarHeaderParameter, "x-api-key", configuration) + + if (limit !== undefined) { + localVarQueryParameter['limit'] = limit; + } + + if (cursor !== undefined) { + localVarQueryParameter['cursor'] = cursor; + } + + + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * Deletes a list of FIDs from the app associated with your API key. + * @summary Unban FIDs from app + * @param {BanReqBody} banReqBody + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + deleteBan: async (banReqBody: BanReqBody, options: RawAxiosRequestConfig = {}): Promise => { + // verify required parameter 'banReqBody' is not null or undefined + assertParamExists('deleteBan', 'banReqBody', banReqBody) + const localVarPath = `/farcaster/ban`; + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'DELETE', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication ApiKeyAuth required + await setApiKeyToObject(localVarHeaderParameter, "x-api-key", configuration) + + + + localVarHeaderParameter['Content-Type'] = 'application/json'; + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + localVarRequestOptions.data = serializeDataIfNeeded(banReqBody, localVarRequestOptions, configuration) + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + } +}; + +/** + * BanApi - functional programming interface + * @export + */ +export const BanApiFp = function(configuration?: Configuration) { + const localVarAxiosParamCreator = BanApiAxiosParamCreator(configuration) + return { + /** + * Bans a list of FIDs from the app associated with your API key. Banned users, their casts and reactions will not appear in feeds. + * @summary Ban FIDs from app + * @param {BanReqBody} banReqBody + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async addBan(banReqBody: BanReqBody, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.addBan(banReqBody, options); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = operationServerMap['BanApi.addBan']?.[localVarOperationServerIndex]?.url; + return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); + }, + /** + * Fetches all FIDs that your app has banned. + * @summary Banned FIDs of app + * @param {number} [limit] Number of results to fetch (default 20, max 100). + * @param {string} [cursor] Pagination cursor. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async banList(limit?: number, cursor?: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.banList(limit, cursor, options); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = operationServerMap['BanApi.banList']?.[localVarOperationServerIndex]?.url; + return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); + }, + /** + * Deletes a list of FIDs from the app associated with your API key. + * @summary Unban FIDs from app + * @param {BanReqBody} banReqBody + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async deleteBan(banReqBody: BanReqBody, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.deleteBan(banReqBody, options); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = operationServerMap['BanApi.deleteBan']?.[localVarOperationServerIndex]?.url; + return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); + }, + } +}; + +/** + * BanApi - factory interface + * @export + */ +export const BanApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) { + const localVarFp = BanApiFp(configuration) + return { + /** + * Bans a list of FIDs from the app associated with your API key. Banned users, their casts and reactions will not appear in feeds. + * @summary Ban FIDs from app + * @param {BanReqBody} banReqBody + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + addBan(banReqBody: BanReqBody, options?: RawAxiosRequestConfig): AxiosPromise { + return localVarFp.addBan(banReqBody, options).then((request) => request(axios, basePath)); + }, + /** + * Fetches all FIDs that your app has banned. + * @summary Banned FIDs of app + * @param {number} [limit] Number of results to fetch (default 20, max 100). + * @param {string} [cursor] Pagination cursor. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + banList(limit?: number, cursor?: string, options?: RawAxiosRequestConfig): AxiosPromise { + return localVarFp.banList(limit, cursor, options).then((request) => request(axios, basePath)); + }, + /** + * Deletes a list of FIDs from the app associated with your API key. + * @summary Unban FIDs from app + * @param {BanReqBody} banReqBody + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + deleteBan(banReqBody: BanReqBody, options?: RawAxiosRequestConfig): AxiosPromise { + return localVarFp.deleteBan(banReqBody, options).then((request) => request(axios, basePath)); + }, + }; +}; + +/** + * BanApi - object-oriented interface + * @export + * @class BanApi + * @extends {BaseAPI} + */ +export class BanApi extends BaseAPI { + /** + * Bans a list of FIDs from the app associated with your API key. Banned users, their casts and reactions will not appear in feeds. + * @summary Ban FIDs from app + * @param {BanReqBody} banReqBody + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof BanApi + */ + public addBan(banReqBody: BanReqBody, options?: RawAxiosRequestConfig) { + return BanApiFp(this.configuration).addBan(banReqBody, options).then((request) => request(this.axios, this.basePath)); + } + + /** + * Fetches all FIDs that your app has banned. + * @summary Banned FIDs of app + * @param {number} [limit] Number of results to fetch (default 20, max 100). + * @param {string} [cursor] Pagination cursor. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof BanApi + */ + public banList(limit?: number, cursor?: string, options?: RawAxiosRequestConfig) { + return BanApiFp(this.configuration).banList(limit, cursor, options).then((request) => request(this.axios, this.basePath)); + } + + /** + * Deletes a list of FIDs from the app associated with your API key. + * @summary Unban FIDs from app + * @param {BanReqBody} banReqBody + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof BanApi + */ + public deleteBan(banReqBody: BanReqBody, options?: RawAxiosRequestConfig) { + return BanApiFp(this.configuration).deleteBan(banReqBody, options).then((request) => request(this.axios, this.basePath)); + } +} + diff --git a/src/neynar-api/v2/openapi-farcaster/apis/block-api.ts b/src/neynar-api/v2/openapi-farcaster/apis/block-api.ts new file mode 100644 index 00000000..8514c92a --- /dev/null +++ b/src/neynar-api/v2/openapi-farcaster/apis/block-api.ts @@ -0,0 +1,161 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Farcaster API V2 + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +import type { Configuration } from '../configuration'; +import type { AxiosPromise, AxiosInstance, RawAxiosRequestConfig } from 'axios'; +import globalAxios from 'axios'; +// Some imports not used depending on template conditions +// @ts-ignore +import { DUMMY_BASE_URL, assertParamExists, setApiKeyToObject, setBasicAuthToObject, setBearerAuthToObject, setOAuthToObject, setSearchParams, serializeDataIfNeeded, toPathString, createRequestFunction } from '../common'; +// @ts-ignore +import { BASE_PATH, COLLECTION_FORMATS, type RequestArgs, BaseAPI, RequiredError, operationServerMap } from '../base'; +// @ts-ignore +import type { BlockListResponse } from '../models'; +// @ts-ignore +import type { ErrorRes } from '../models'; +/** + * BlockApi - axios parameter creator + * @export + */ +export const BlockApiAxiosParamCreator = function (configuration?: Configuration) { + return { + /** + * Fetches all FIDs that a user has blocked or has been blocked by + * @summary Blocked / Blocked by FIDs + * @param {number} [blockerFid] Providing this will return the users that this user has blocked + * @param {number} [blockedFid] Providing this will return the users that have blocked this user + * @param {number} [limit] Number of results to fetch (default 20, max 100). + * @param {string} [cursor] Pagination cursor. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + blockList: async (blockerFid?: number, blockedFid?: number, limit?: number, cursor?: string, options: RawAxiosRequestConfig = {}): Promise => { + const localVarPath = `/farcaster/block/list`; + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication ApiKeyAuth required + await setApiKeyToObject(localVarHeaderParameter, "x-api-key", configuration) + + if (blockerFid !== undefined) { + localVarQueryParameter['blocker_fid'] = blockerFid; + } + + if (blockedFid !== undefined) { + localVarQueryParameter['blocked_fid'] = blockedFid; + } + + if (limit !== undefined) { + localVarQueryParameter['limit'] = limit; + } + + if (cursor !== undefined) { + localVarQueryParameter['cursor'] = cursor; + } + + + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + } +}; + +/** + * BlockApi - functional programming interface + * @export + */ +export const BlockApiFp = function(configuration?: Configuration) { + const localVarAxiosParamCreator = BlockApiAxiosParamCreator(configuration) + return { + /** + * Fetches all FIDs that a user has blocked or has been blocked by + * @summary Blocked / Blocked by FIDs + * @param {number} [blockerFid] Providing this will return the users that this user has blocked + * @param {number} [blockedFid] Providing this will return the users that have blocked this user + * @param {number} [limit] Number of results to fetch (default 20, max 100). + * @param {string} [cursor] Pagination cursor. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async blockList(blockerFid?: number, blockedFid?: number, limit?: number, cursor?: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.blockList(blockerFid, blockedFid, limit, cursor, options); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = operationServerMap['BlockApi.blockList']?.[localVarOperationServerIndex]?.url; + return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); + }, + } +}; + +/** + * BlockApi - factory interface + * @export + */ +export const BlockApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) { + const localVarFp = BlockApiFp(configuration) + return { + /** + * Fetches all FIDs that a user has blocked or has been blocked by + * @summary Blocked / Blocked by FIDs + * @param {number} [blockerFid] Providing this will return the users that this user has blocked + * @param {number} [blockedFid] Providing this will return the users that have blocked this user + * @param {number} [limit] Number of results to fetch (default 20, max 100). + * @param {string} [cursor] Pagination cursor. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + blockList(blockerFid?: number, blockedFid?: number, limit?: number, cursor?: string, options?: RawAxiosRequestConfig): AxiosPromise { + return localVarFp.blockList(blockerFid, blockedFid, limit, cursor, options).then((request) => request(axios, basePath)); + }, + }; +}; + +/** + * BlockApi - object-oriented interface + * @export + * @class BlockApi + * @extends {BaseAPI} + */ +export class BlockApi extends BaseAPI { + /** + * Fetches all FIDs that a user has blocked or has been blocked by + * @summary Blocked / Blocked by FIDs + * @param {number} [blockerFid] Providing this will return the users that this user has blocked + * @param {number} [blockedFid] Providing this will return the users that have blocked this user + * @param {number} [limit] Number of results to fetch (default 20, max 100). + * @param {string} [cursor] Pagination cursor. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof BlockApi + */ + public blockList(blockerFid?: number, blockedFid?: number, limit?: number, cursor?: string, options?: RawAxiosRequestConfig) { + return BlockApiFp(this.configuration).blockList(blockerFid, blockedFid, limit, cursor, options).then((request) => request(this.axios, this.basePath)); + } +} + diff --git a/src/neynar-api/v2/openapi-farcaster/apis/cast-api.ts b/src/neynar-api/v2/openapi-farcaster/apis/cast-api.ts new file mode 100644 index 00000000..7cc008dc --- /dev/null +++ b/src/neynar-api/v2/openapi-farcaster/apis/cast-api.ts @@ -0,0 +1,800 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Farcaster API V2 + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +import type { Configuration } from '../configuration'; +import type { AxiosPromise, AxiosInstance, RawAxiosRequestConfig } from 'axios'; +import globalAxios from 'axios'; +// Some imports not used depending on template conditions +// @ts-ignore +import { DUMMY_BASE_URL, assertParamExists, setApiKeyToObject, setBasicAuthToObject, setBearerAuthToObject, setOAuthToObject, setSearchParams, serializeDataIfNeeded, toPathString, createRequestFunction } from '../common'; +// @ts-ignore +import { BASE_PATH, COLLECTION_FORMATS, type RequestArgs, BaseAPI, RequiredError, operationServerMap } from '../base'; +// @ts-ignore +import type { CastComposerActionsListResponse } from '../models'; +// @ts-ignore +import type { CastComposerType } from '../models'; +// @ts-ignore +import type { CastConversationSortType } from '../models'; +// @ts-ignore +import type { CastParamType } from '../models'; +// @ts-ignore +import type { CastResponse } from '../models'; +// @ts-ignore +import type { CastsResponse } from '../models'; +// @ts-ignore +import type { CastsSearchResponse } from '../models'; +// @ts-ignore +import type { Conversation } from '../models'; +// @ts-ignore +import type { DeleteCastReqBody } from '../models'; +// @ts-ignore +import type { ErrorRes } from '../models'; +// @ts-ignore +import type { OperationResponse } from '../models'; +// @ts-ignore +import type { PostCastReqBody } from '../models'; +// @ts-ignore +import type { PostCastResponse } from '../models'; +/** + * CastApi - axios parameter creator + * @export + */ +export const CastApiAxiosParamCreator = function (configuration?: Configuration) { + return { + /** + * Gets information about an individual cast by passing in a Warpcast web URL or cast hash + * @summary By hash or URL + * @param {string} identifier Cast identifier (Its either a url or a hash) + * @param {CastParamType} type + * @param {number} [viewerFid] adds viewer_context to cast object to show whether viewer has liked or recasted the cast. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + cast: async (identifier: string, type: CastParamType, viewerFid?: number, options: RawAxiosRequestConfig = {}): Promise => { + // verify required parameter 'identifier' is not null or undefined + assertParamExists('cast', 'identifier', identifier) + // verify required parameter 'type' is not null or undefined + assertParamExists('cast', 'type', type) + const localVarPath = `/farcaster/cast`; + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication ApiKeyAuth required + await setApiKeyToObject(localVarHeaderParameter, "x-api-key", configuration) + + if (identifier !== undefined) { + localVarQueryParameter['identifier'] = identifier; + } + + if (type !== undefined) { + localVarQueryParameter['type'] = type; + } + + if (viewerFid !== undefined) { + localVarQueryParameter['viewer_fid'] = viewerFid; + } + + + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * Gets all casts related to a conversation surrounding a cast by passing in a cast hash or Warpcast URL. Includes all the ancestors of a cast up to the root parent in a chronological order. Includes all direct_replies to the cast up to the reply_depth specified in the query parameter. + * @summary Conversation for a cast + * @param {string} identifier Cast identifier (Its either a url or a hash) + * @param {CastParamType} type + * @param {number} [replyDepth] The depth of replies in the conversation that will be returned (default 2) + * @param {boolean} [includeChronologicalParentCasts] Include all parent casts in chronological order + * @param {number} [viewerFid] Providing this will return a conversation that respects this user\'s mutes and blocks and includes `viewer_context`. + * @param {CastConversationSortType} [sortType] Sort type for the ordering of descendants. Default is `chron` + * @param {CastConversationFoldEnum} [fold] Show conversation above or below the fold. Lower quality responses are hidden below the fold. Not passing in a value shows the full conversation without any folding. + * @param {number} [limit] Number of results to fetch (default 20, max 50) + * @param {string} [cursor] Pagination cursor. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + castConversation: async (identifier: string, type: CastParamType, replyDepth?: number, includeChronologicalParentCasts?: boolean, viewerFid?: number, sortType?: CastConversationSortType, fold?: CastConversationFoldEnum, limit?: number, cursor?: string, options: RawAxiosRequestConfig = {}): Promise => { + // verify required parameter 'identifier' is not null or undefined + assertParamExists('castConversation', 'identifier', identifier) + // verify required parameter 'type' is not null or undefined + assertParamExists('castConversation', 'type', type) + const localVarPath = `/farcaster/cast/conversation`; + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication ApiKeyAuth required + await setApiKeyToObject(localVarHeaderParameter, "x-api-key", configuration) + + if (identifier !== undefined) { + localVarQueryParameter['identifier'] = identifier; + } + + if (type !== undefined) { + localVarQueryParameter['type'] = type; + } + + if (replyDepth !== undefined) { + localVarQueryParameter['reply_depth'] = replyDepth; + } + + if (includeChronologicalParentCasts !== undefined) { + localVarQueryParameter['include_chronological_parent_casts'] = includeChronologicalParentCasts; + } + + if (viewerFid !== undefined) { + localVarQueryParameter['viewer_fid'] = viewerFid; + } + + if (sortType !== undefined) { + localVarQueryParameter['sort_type'] = sortType; + } + + if (fold !== undefined) { + localVarQueryParameter['fold'] = fold; + } + + if (limit !== undefined) { + localVarQueryParameter['limit'] = limit; + } + + if (cursor !== undefined) { + localVarQueryParameter['cursor'] = cursor; + } + + + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * Search for casts based on a query string, with optional AND filters + * @summary Search for casts + * @param {string} q Query string to search for casts + * @param {number} [authorFid] Fid of the user whose casts you want to search + * @param {number} [viewerFid] Providing this will return search results that respects this user\'s mutes and blocks and includes `viewer_context`. + * @param {string} [parentUrl] Parent URL of the casts you want to search + * @param {string} [channelId] Channel ID of the casts you want to search + * @param {boolean} [priorityMode] When true, only returns search results from power badge users and users that the viewer follows (if viewer_fid is provided). + * @param {number} [limit] + * @param {string} [cursor] Pagination cursor + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + castSearch: async (q: string, authorFid?: number, viewerFid?: number, parentUrl?: string, channelId?: string, priorityMode?: boolean, limit?: number, cursor?: string, options: RawAxiosRequestConfig = {}): Promise => { + // verify required parameter 'q' is not null or undefined + assertParamExists('castSearch', 'q', q) + const localVarPath = `/farcaster/cast/search`; + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication ApiKeyAuth required + await setApiKeyToObject(localVarHeaderParameter, "x-api-key", configuration) + + if (q !== undefined) { + localVarQueryParameter['q'] = q; + } + + if (authorFid !== undefined) { + localVarQueryParameter['author_fid'] = authorFid; + } + + if (viewerFid !== undefined) { + localVarQueryParameter['viewer_fid'] = viewerFid; + } + + if (parentUrl !== undefined) { + localVarQueryParameter['parent_url'] = parentUrl; + } + + if (channelId !== undefined) { + localVarQueryParameter['channel_id'] = channelId; + } + + if (priorityMode !== undefined) { + localVarQueryParameter['priority_mode'] = priorityMode; + } + + if (limit !== undefined) { + localVarQueryParameter['limit'] = limit; + } + + if (cursor !== undefined) { + localVarQueryParameter['cursor'] = cursor; + } + + + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * Fetch multiple casts using their respective hashes. + * @summary Bulk fetch casts + * @param {string} casts Hashes of the cast to be retrived (Comma separated, no spaces) + * @param {number} [viewerFid] adds viewer_context to cast object to show whether viewer has liked or recasted the cast. + * @param {CastsSortTypeEnum} [sortType] Optional parameter to sort the casts based on different criteria + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + casts: async (casts: string, viewerFid?: number, sortType?: CastsSortTypeEnum, options: RawAxiosRequestConfig = {}): Promise => { + // verify required parameter 'casts' is not null or undefined + assertParamExists('casts', 'casts', casts) + const localVarPath = `/farcaster/casts`; + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication ApiKeyAuth required + await setApiKeyToObject(localVarHeaderParameter, "x-api-key", configuration) + + if (casts !== undefined) { + localVarQueryParameter['casts'] = casts; + } + + if (viewerFid !== undefined) { + localVarQueryParameter['viewer_fid'] = viewerFid; + } + + if (sortType !== undefined) { + localVarQueryParameter['sort_type'] = sortType; + } + + + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * Fetches all composer actions on Warpcast. You can filter by top or featured. + * @summary Fetch composer actions + * @param {CastComposerType} list Type of list to fetch. + * @param {number} [limit] Number of results to fetch (default 25, max 25). + * @param {string} [cursor] Pagination cursor. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + composerList: async (list: CastComposerType, limit?: number, cursor?: string, options: RawAxiosRequestConfig = {}): Promise => { + // verify required parameter 'list' is not null or undefined + assertParamExists('composerList', 'list', list) + const localVarPath = `/farcaster/cast/composer_actions/list`; + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication ApiKeyAuth required + await setApiKeyToObject(localVarHeaderParameter, "x-api-key", configuration) + + if (list !== undefined) { + localVarQueryParameter['list'] = list; + } + + if (limit !== undefined) { + localVarQueryParameter['limit'] = limit; + } + + if (cursor !== undefined) { + localVarQueryParameter['cursor'] = cursor; + } + + + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * Delete an existing cast. \\ (In order to delete a cast `signer_uuid` must be approved) + * @summary Delete a cast + * @param {DeleteCastReqBody} deleteCastReqBody + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + deleteCast: async (deleteCastReqBody: DeleteCastReqBody, options: RawAxiosRequestConfig = {}): Promise => { + // verify required parameter 'deleteCastReqBody' is not null or undefined + assertParamExists('deleteCast', 'deleteCastReqBody', deleteCastReqBody) + const localVarPath = `/farcaster/cast`; + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'DELETE', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication ApiKeyAuth required + await setApiKeyToObject(localVarHeaderParameter, "x-api-key", configuration) + + + + localVarHeaderParameter['Content-Type'] = 'application/json'; + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + localVarRequestOptions.data = serializeDataIfNeeded(deleteCastReqBody, localVarRequestOptions, configuration) + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * Posts a cast or cast reply. Works with mentions and embeds. (In order to post a cast `signer_uuid` must be approved) + * @summary Post a cast + * @param {PostCastReqBody} postCastReqBody + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + postCast: async (postCastReqBody: PostCastReqBody, options: RawAxiosRequestConfig = {}): Promise => { + // verify required parameter 'postCastReqBody' is not null or undefined + assertParamExists('postCast', 'postCastReqBody', postCastReqBody) + const localVarPath = `/farcaster/cast`; + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication ApiKeyAuth required + await setApiKeyToObject(localVarHeaderParameter, "x-api-key", configuration) + + + + localVarHeaderParameter['Content-Type'] = 'application/json'; + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + localVarRequestOptions.data = serializeDataIfNeeded(postCastReqBody, localVarRequestOptions, configuration) + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + } +}; + +/** + * CastApi - functional programming interface + * @export + */ +export const CastApiFp = function(configuration?: Configuration) { + const localVarAxiosParamCreator = CastApiAxiosParamCreator(configuration) + return { + /** + * Gets information about an individual cast by passing in a Warpcast web URL or cast hash + * @summary By hash or URL + * @param {string} identifier Cast identifier (Its either a url or a hash) + * @param {CastParamType} type + * @param {number} [viewerFid] adds viewer_context to cast object to show whether viewer has liked or recasted the cast. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async cast(identifier: string, type: CastParamType, viewerFid?: number, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.cast(identifier, type, viewerFid, options); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = operationServerMap['CastApi.cast']?.[localVarOperationServerIndex]?.url; + return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); + }, + /** + * Gets all casts related to a conversation surrounding a cast by passing in a cast hash or Warpcast URL. Includes all the ancestors of a cast up to the root parent in a chronological order. Includes all direct_replies to the cast up to the reply_depth specified in the query parameter. + * @summary Conversation for a cast + * @param {string} identifier Cast identifier (Its either a url or a hash) + * @param {CastParamType} type + * @param {number} [replyDepth] The depth of replies in the conversation that will be returned (default 2) + * @param {boolean} [includeChronologicalParentCasts] Include all parent casts in chronological order + * @param {number} [viewerFid] Providing this will return a conversation that respects this user\'s mutes and blocks and includes `viewer_context`. + * @param {CastConversationSortType} [sortType] Sort type for the ordering of descendants. Default is `chron` + * @param {CastConversationFoldEnum} [fold] Show conversation above or below the fold. Lower quality responses are hidden below the fold. Not passing in a value shows the full conversation without any folding. + * @param {number} [limit] Number of results to fetch (default 20, max 50) + * @param {string} [cursor] Pagination cursor. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async castConversation(identifier: string, type: CastParamType, replyDepth?: number, includeChronologicalParentCasts?: boolean, viewerFid?: number, sortType?: CastConversationSortType, fold?: CastConversationFoldEnum, limit?: number, cursor?: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.castConversation(identifier, type, replyDepth, includeChronologicalParentCasts, viewerFid, sortType, fold, limit, cursor, options); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = operationServerMap['CastApi.castConversation']?.[localVarOperationServerIndex]?.url; + return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); + }, + /** + * Search for casts based on a query string, with optional AND filters + * @summary Search for casts + * @param {string} q Query string to search for casts + * @param {number} [authorFid] Fid of the user whose casts you want to search + * @param {number} [viewerFid] Providing this will return search results that respects this user\'s mutes and blocks and includes `viewer_context`. + * @param {string} [parentUrl] Parent URL of the casts you want to search + * @param {string} [channelId] Channel ID of the casts you want to search + * @param {boolean} [priorityMode] When true, only returns search results from power badge users and users that the viewer follows (if viewer_fid is provided). + * @param {number} [limit] + * @param {string} [cursor] Pagination cursor + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async castSearch(q: string, authorFid?: number, viewerFid?: number, parentUrl?: string, channelId?: string, priorityMode?: boolean, limit?: number, cursor?: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.castSearch(q, authorFid, viewerFid, parentUrl, channelId, priorityMode, limit, cursor, options); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = operationServerMap['CastApi.castSearch']?.[localVarOperationServerIndex]?.url; + return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); + }, + /** + * Fetch multiple casts using their respective hashes. + * @summary Bulk fetch casts + * @param {string} casts Hashes of the cast to be retrived (Comma separated, no spaces) + * @param {number} [viewerFid] adds viewer_context to cast object to show whether viewer has liked or recasted the cast. + * @param {CastsSortTypeEnum} [sortType] Optional parameter to sort the casts based on different criteria + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async casts(casts: string, viewerFid?: number, sortType?: CastsSortTypeEnum, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.casts(casts, viewerFid, sortType, options); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = operationServerMap['CastApi.casts']?.[localVarOperationServerIndex]?.url; + return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); + }, + /** + * Fetches all composer actions on Warpcast. You can filter by top or featured. + * @summary Fetch composer actions + * @param {CastComposerType} list Type of list to fetch. + * @param {number} [limit] Number of results to fetch (default 25, max 25). + * @param {string} [cursor] Pagination cursor. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async composerList(list: CastComposerType, limit?: number, cursor?: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.composerList(list, limit, cursor, options); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = operationServerMap['CastApi.composerList']?.[localVarOperationServerIndex]?.url; + return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); + }, + /** + * Delete an existing cast. \\ (In order to delete a cast `signer_uuid` must be approved) + * @summary Delete a cast + * @param {DeleteCastReqBody} deleteCastReqBody + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async deleteCast(deleteCastReqBody: DeleteCastReqBody, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.deleteCast(deleteCastReqBody, options); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = operationServerMap['CastApi.deleteCast']?.[localVarOperationServerIndex]?.url; + return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); + }, + /** + * Posts a cast or cast reply. Works with mentions and embeds. (In order to post a cast `signer_uuid` must be approved) + * @summary Post a cast + * @param {PostCastReqBody} postCastReqBody + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async postCast(postCastReqBody: PostCastReqBody, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.postCast(postCastReqBody, options); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = operationServerMap['CastApi.postCast']?.[localVarOperationServerIndex]?.url; + return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); + }, + } +}; + +/** + * CastApi - factory interface + * @export + */ +export const CastApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) { + const localVarFp = CastApiFp(configuration) + return { + /** + * Gets information about an individual cast by passing in a Warpcast web URL or cast hash + * @summary By hash or URL + * @param {string} identifier Cast identifier (Its either a url or a hash) + * @param {CastParamType} type + * @param {number} [viewerFid] adds viewer_context to cast object to show whether viewer has liked or recasted the cast. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + cast(identifier: string, type: CastParamType, viewerFid?: number, options?: RawAxiosRequestConfig): AxiosPromise { + return localVarFp.cast(identifier, type, viewerFid, options).then((request) => request(axios, basePath)); + }, + /** + * Gets all casts related to a conversation surrounding a cast by passing in a cast hash or Warpcast URL. Includes all the ancestors of a cast up to the root parent in a chronological order. Includes all direct_replies to the cast up to the reply_depth specified in the query parameter. + * @summary Conversation for a cast + * @param {string} identifier Cast identifier (Its either a url or a hash) + * @param {CastParamType} type + * @param {number} [replyDepth] The depth of replies in the conversation that will be returned (default 2) + * @param {boolean} [includeChronologicalParentCasts] Include all parent casts in chronological order + * @param {number} [viewerFid] Providing this will return a conversation that respects this user\'s mutes and blocks and includes `viewer_context`. + * @param {CastConversationSortType} [sortType] Sort type for the ordering of descendants. Default is `chron` + * @param {CastConversationFoldEnum} [fold] Show conversation above or below the fold. Lower quality responses are hidden below the fold. Not passing in a value shows the full conversation without any folding. + * @param {number} [limit] Number of results to fetch (default 20, max 50) + * @param {string} [cursor] Pagination cursor. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + castConversation(identifier: string, type: CastParamType, replyDepth?: number, includeChronologicalParentCasts?: boolean, viewerFid?: number, sortType?: CastConversationSortType, fold?: CastConversationFoldEnum, limit?: number, cursor?: string, options?: RawAxiosRequestConfig): AxiosPromise { + return localVarFp.castConversation(identifier, type, replyDepth, includeChronologicalParentCasts, viewerFid, sortType, fold, limit, cursor, options).then((request) => request(axios, basePath)); + }, + /** + * Search for casts based on a query string, with optional AND filters + * @summary Search for casts + * @param {string} q Query string to search for casts + * @param {number} [authorFid] Fid of the user whose casts you want to search + * @param {number} [viewerFid] Providing this will return search results that respects this user\'s mutes and blocks and includes `viewer_context`. + * @param {string} [parentUrl] Parent URL of the casts you want to search + * @param {string} [channelId] Channel ID of the casts you want to search + * @param {boolean} [priorityMode] When true, only returns search results from power badge users and users that the viewer follows (if viewer_fid is provided). + * @param {number} [limit] + * @param {string} [cursor] Pagination cursor + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + castSearch(q: string, authorFid?: number, viewerFid?: number, parentUrl?: string, channelId?: string, priorityMode?: boolean, limit?: number, cursor?: string, options?: RawAxiosRequestConfig): AxiosPromise { + return localVarFp.castSearch(q, authorFid, viewerFid, parentUrl, channelId, priorityMode, limit, cursor, options).then((request) => request(axios, basePath)); + }, + /** + * Fetch multiple casts using their respective hashes. + * @summary Bulk fetch casts + * @param {string} casts Hashes of the cast to be retrived (Comma separated, no spaces) + * @param {number} [viewerFid] adds viewer_context to cast object to show whether viewer has liked or recasted the cast. + * @param {CastsSortTypeEnum} [sortType] Optional parameter to sort the casts based on different criteria + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + casts(casts: string, viewerFid?: number, sortType?: CastsSortTypeEnum, options?: RawAxiosRequestConfig): AxiosPromise { + return localVarFp.casts(casts, viewerFid, sortType, options).then((request) => request(axios, basePath)); + }, + /** + * Fetches all composer actions on Warpcast. You can filter by top or featured. + * @summary Fetch composer actions + * @param {CastComposerType} list Type of list to fetch. + * @param {number} [limit] Number of results to fetch (default 25, max 25). + * @param {string} [cursor] Pagination cursor. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + composerList(list: CastComposerType, limit?: number, cursor?: string, options?: RawAxiosRequestConfig): AxiosPromise { + return localVarFp.composerList(list, limit, cursor, options).then((request) => request(axios, basePath)); + }, + /** + * Delete an existing cast. \\ (In order to delete a cast `signer_uuid` must be approved) + * @summary Delete a cast + * @param {DeleteCastReqBody} deleteCastReqBody + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + deleteCast(deleteCastReqBody: DeleteCastReqBody, options?: RawAxiosRequestConfig): AxiosPromise { + return localVarFp.deleteCast(deleteCastReqBody, options).then((request) => request(axios, basePath)); + }, + /** + * Posts a cast or cast reply. Works with mentions and embeds. (In order to post a cast `signer_uuid` must be approved) + * @summary Post a cast + * @param {PostCastReqBody} postCastReqBody + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + postCast(postCastReqBody: PostCastReqBody, options?: RawAxiosRequestConfig): AxiosPromise { + return localVarFp.postCast(postCastReqBody, options).then((request) => request(axios, basePath)); + }, + }; +}; + +/** + * CastApi - object-oriented interface + * @export + * @class CastApi + * @extends {BaseAPI} + */ +export class CastApi extends BaseAPI { + /** + * Gets information about an individual cast by passing in a Warpcast web URL or cast hash + * @summary By hash or URL + * @param {string} identifier Cast identifier (Its either a url or a hash) + * @param {CastParamType} type + * @param {number} [viewerFid] adds viewer_context to cast object to show whether viewer has liked or recasted the cast. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof CastApi + */ + public cast(identifier: string, type: CastParamType, viewerFid?: number, options?: RawAxiosRequestConfig) { + return CastApiFp(this.configuration).cast(identifier, type, viewerFid, options).then((request) => request(this.axios, this.basePath)); + } + + /** + * Gets all casts related to a conversation surrounding a cast by passing in a cast hash or Warpcast URL. Includes all the ancestors of a cast up to the root parent in a chronological order. Includes all direct_replies to the cast up to the reply_depth specified in the query parameter. + * @summary Conversation for a cast + * @param {string} identifier Cast identifier (Its either a url or a hash) + * @param {CastParamType} type + * @param {number} [replyDepth] The depth of replies in the conversation that will be returned (default 2) + * @param {boolean} [includeChronologicalParentCasts] Include all parent casts in chronological order + * @param {number} [viewerFid] Providing this will return a conversation that respects this user\'s mutes and blocks and includes `viewer_context`. + * @param {CastConversationSortType} [sortType] Sort type for the ordering of descendants. Default is `chron` + * @param {CastConversationFoldEnum} [fold] Show conversation above or below the fold. Lower quality responses are hidden below the fold. Not passing in a value shows the full conversation without any folding. + * @param {number} [limit] Number of results to fetch (default 20, max 50) + * @param {string} [cursor] Pagination cursor. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof CastApi + */ + public castConversation(identifier: string, type: CastParamType, replyDepth?: number, includeChronologicalParentCasts?: boolean, viewerFid?: number, sortType?: CastConversationSortType, fold?: CastConversationFoldEnum, limit?: number, cursor?: string, options?: RawAxiosRequestConfig) { + return CastApiFp(this.configuration).castConversation(identifier, type, replyDepth, includeChronologicalParentCasts, viewerFid, sortType, fold, limit, cursor, options).then((request) => request(this.axios, this.basePath)); + } + + /** + * Search for casts based on a query string, with optional AND filters + * @summary Search for casts + * @param {string} q Query string to search for casts + * @param {number} [authorFid] Fid of the user whose casts you want to search + * @param {number} [viewerFid] Providing this will return search results that respects this user\'s mutes and blocks and includes `viewer_context`. + * @param {string} [parentUrl] Parent URL of the casts you want to search + * @param {string} [channelId] Channel ID of the casts you want to search + * @param {boolean} [priorityMode] When true, only returns search results from power badge users and users that the viewer follows (if viewer_fid is provided). + * @param {number} [limit] + * @param {string} [cursor] Pagination cursor + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof CastApi + */ + public castSearch(q: string, authorFid?: number, viewerFid?: number, parentUrl?: string, channelId?: string, priorityMode?: boolean, limit?: number, cursor?: string, options?: RawAxiosRequestConfig) { + return CastApiFp(this.configuration).castSearch(q, authorFid, viewerFid, parentUrl, channelId, priorityMode, limit, cursor, options).then((request) => request(this.axios, this.basePath)); + } + + /** + * Fetch multiple casts using their respective hashes. + * @summary Bulk fetch casts + * @param {string} casts Hashes of the cast to be retrived (Comma separated, no spaces) + * @param {number} [viewerFid] adds viewer_context to cast object to show whether viewer has liked or recasted the cast. + * @param {CastsSortTypeEnum} [sortType] Optional parameter to sort the casts based on different criteria + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof CastApi + */ + public casts(casts: string, viewerFid?: number, sortType?: CastsSortTypeEnum, options?: RawAxiosRequestConfig) { + return CastApiFp(this.configuration).casts(casts, viewerFid, sortType, options).then((request) => request(this.axios, this.basePath)); + } + + /** + * Fetches all composer actions on Warpcast. You can filter by top or featured. + * @summary Fetch composer actions + * @param {CastComposerType} list Type of list to fetch. + * @param {number} [limit] Number of results to fetch (default 25, max 25). + * @param {string} [cursor] Pagination cursor. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof CastApi + */ + public composerList(list: CastComposerType, limit?: number, cursor?: string, options?: RawAxiosRequestConfig) { + return CastApiFp(this.configuration).composerList(list, limit, cursor, options).then((request) => request(this.axios, this.basePath)); + } + + /** + * Delete an existing cast. \\ (In order to delete a cast `signer_uuid` must be approved) + * @summary Delete a cast + * @param {DeleteCastReqBody} deleteCastReqBody + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof CastApi + */ + public deleteCast(deleteCastReqBody: DeleteCastReqBody, options?: RawAxiosRequestConfig) { + return CastApiFp(this.configuration).deleteCast(deleteCastReqBody, options).then((request) => request(this.axios, this.basePath)); + } + + /** + * Posts a cast or cast reply. Works with mentions and embeds. (In order to post a cast `signer_uuid` must be approved) + * @summary Post a cast + * @param {PostCastReqBody} postCastReqBody + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof CastApi + */ + public postCast(postCastReqBody: PostCastReqBody, options?: RawAxiosRequestConfig) { + return CastApiFp(this.configuration).postCast(postCastReqBody, options).then((request) => request(this.axios, this.basePath)); + } +} + +/** + * @export + */ +export const CastConversationFoldEnum = { + Above: 'above', + Below: 'below' +} as const; +export type CastConversationFoldEnum = typeof CastConversationFoldEnum[keyof typeof CastConversationFoldEnum]; +/** + * @export + */ +export const CastsSortTypeEnum = { + Trending: 'trending', + Likes: 'likes', + Recasts: 'recasts', + Replies: 'replies', + Recent: 'recent' +} as const; +export type CastsSortTypeEnum = typeof CastsSortTypeEnum[keyof typeof CastsSortTypeEnum]; diff --git a/src/neynar-api/v2/openapi-farcaster/apis/channel-api.ts b/src/neynar-api/v2/openapi-farcaster/apis/channel-api.ts new file mode 100644 index 00000000..6d8e707d --- /dev/null +++ b/src/neynar-api/v2/openapi-farcaster/apis/channel-api.ts @@ -0,0 +1,1692 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Farcaster API V2 + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +import type { Configuration } from '../configuration'; +import type { AxiosPromise, AxiosInstance, RawAxiosRequestConfig } from 'axios'; +import globalAxios from 'axios'; +// Some imports not used depending on template conditions +// @ts-ignore +import { DUMMY_BASE_URL, assertParamExists, setApiKeyToObject, setBasicAuthToObject, setBearerAuthToObject, setOAuthToObject, setSearchParams, serializeDataIfNeeded, toPathString, createRequestFunction } from '../common'; +// @ts-ignore +import { BASE_PATH, COLLECTION_FORMATS, type RequestArgs, BaseAPI, RequiredError, operationServerMap } from '../base'; +// @ts-ignore +import type { ChannelFollowReqBody } from '../models'; +// @ts-ignore +import type { ChannelListResponse } from '../models'; +// @ts-ignore +import type { ChannelMemberInviteListResponse } from '../models'; +// @ts-ignore +import type { ChannelMemberListResponse } from '../models'; +// @ts-ignore +import type { ChannelResponse } from '../models'; +// @ts-ignore +import type { ChannelResponseBulk } from '../models'; +// @ts-ignore +import type { ChannelSearchResponse } from '../models'; +// @ts-ignore +import type { ChannelType } from '../models'; +// @ts-ignore +import type { ErrorRes } from '../models'; +// @ts-ignore +import type { OperationResponse } from '../models'; +// @ts-ignore +import type { RelevantFollowersResponse } from '../models'; +// @ts-ignore +import type { RemoveChannelMemberRequest } from '../models'; +// @ts-ignore +import type { RespondChannelInviteRequest } from '../models'; +// @ts-ignore +import type { TrendingChannelResponse } from '../models'; +// @ts-ignore +import type { UsersActiveChannelsResponse } from '../models'; +// @ts-ignore +import type { UsersResponse } from '../models'; +/** + * ChannelApi - axios parameter creator + * @export + */ +export const ChannelApiAxiosParamCreator = function (configuration?: Configuration) { + return { + /** + * Fetches all channels that a user has casted in, in reverse chronological order. + * @summary Fetch channels that user is active in + * @param {number} fid The user\'s FID (identifier) + * @param {number} [limit] Number of results to fetch (default 20, max 100). + * @param {string} [cursor] Pagination cursor. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + activeChannels: async (fid: number, limit?: number, cursor?: string, options: RawAxiosRequestConfig = {}): Promise => { + // verify required parameter 'fid' is not null or undefined + assertParamExists('activeChannels', 'fid', fid) + const localVarPath = `/farcaster/channel/user`; + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication ApiKeyAuth required + await setApiKeyToObject(localVarHeaderParameter, "x-api-key", configuration) + + if (fid !== undefined) { + localVarQueryParameter['fid'] = fid; + } + + if (limit !== undefined) { + localVarQueryParameter['limit'] = limit; + } + + if (cursor !== undefined) { + localVarQueryParameter['cursor'] = cursor; + } + + + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * Returns details of a channel + * @summary By ID or parent_url + * @param {string} id Channel ID for the channel being queried + * @param {ChannelType} [type] Type of identifier being used to query the channel. Defaults to ID. + * @param {number} [viewerFid] FID of the user viewing the channel. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + channelDetails: async (id: string, type?: ChannelType, viewerFid?: number, options: RawAxiosRequestConfig = {}): Promise => { + // verify required parameter 'id' is not null or undefined + assertParamExists('channelDetails', 'id', id) + const localVarPath = `/farcaster/channel`; + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication ApiKeyAuth required + await setApiKeyToObject(localVarHeaderParameter, "x-api-key", configuration) + + if (id !== undefined) { + localVarQueryParameter['id'] = id; + } + + if (type !== undefined) { + localVarQueryParameter['type'] = type; + } + + if (viewerFid !== undefined) { + localVarQueryParameter['viewer_fid'] = viewerFid; + } + + + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * Returns details of multiple channels + * @summary Bulk fetch + * @param {string} ids Comma separated list of channel IDs or parent_urls, up to 100 at a time + * @param {ChannelType} [type] Type of identifier being used to query the channels. Defaults to ID. + * @param {number} [viewerFid] FID of the user viewing the channels. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + channelDetailsBulk: async (ids: string, type?: ChannelType, viewerFid?: number, options: RawAxiosRequestConfig = {}): Promise => { + // verify required parameter 'ids' is not null or undefined + assertParamExists('channelDetailsBulk', 'ids', ids) + const localVarPath = `/farcaster/channel/bulk`; + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication ApiKeyAuth required + await setApiKeyToObject(localVarHeaderParameter, "x-api-key", configuration) + + if (ids !== undefined) { + localVarQueryParameter['ids'] = ids; + } + + if (type !== undefined) { + localVarQueryParameter['type'] = type; + } + + if (viewerFid !== undefined) { + localVarQueryParameter['viewer_fid'] = viewerFid; + } + + + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * Returns a list of followers for a specific channel. Max limit is 1000. Use cursor for pagination. + * @summary For channel + * @param {string} id Channel ID for the channel being queried + * @param {number} [viewerFid] Providing this will return a list of followers that respects this user\'s mutes and blocks and includes `viewer_context`. + * @param {string} [cursor] Pagination cursor. + * @param {number} [limit] Number of followers to fetch (default 25, max 1000) + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + channelFollowers: async (id: string, viewerFid?: number, cursor?: string, limit?: number, options: RawAxiosRequestConfig = {}): Promise => { + // verify required parameter 'id' is not null or undefined + assertParamExists('channelFollowers', 'id', id) + const localVarPath = `/farcaster/channel/followers`; + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication ApiKeyAuth required + await setApiKeyToObject(localVarHeaderParameter, "x-api-key", configuration) + + if (id !== undefined) { + localVarQueryParameter['id'] = id; + } + + if (viewerFid !== undefined) { + localVarQueryParameter['viewer_fid'] = viewerFid; + } + + if (cursor !== undefined) { + localVarQueryParameter['cursor'] = cursor; + } + + if (limit !== undefined) { + localVarQueryParameter['limit'] = limit; + } + + + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * Returns a list of users who are active in a given channel, ordered by ascending FIDs + * @summary Fetch users who are active in a channel + * @param {string} id Channel ID for the channel being queried + * @param {boolean} hasRootCastAuthors Include users who posted the root cast in the channel + * @param {boolean} [hasCastLikers] Include users who liked a cast in the channel + * @param {boolean} [hasCastRecasters] Include users who recasted a cast in the channel + * @param {boolean} [hasReplyAuthors] Include users who replied to a cast in the channel + * @param {string} [cursor] Pagination cursor. + * @param {number} [limit] Number of results to fetch (default 25, max 100) + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + channelUsers: async (id: string, hasRootCastAuthors: boolean, hasCastLikers?: boolean, hasCastRecasters?: boolean, hasReplyAuthors?: boolean, cursor?: string, limit?: number, options: RawAxiosRequestConfig = {}): Promise => { + // verify required parameter 'id' is not null or undefined + assertParamExists('channelUsers', 'id', id) + // verify required parameter 'hasRootCastAuthors' is not null or undefined + assertParamExists('channelUsers', 'hasRootCastAuthors', hasRootCastAuthors) + const localVarPath = `/farcaster/channel/users`; + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication ApiKeyAuth required + await setApiKeyToObject(localVarHeaderParameter, "x-api-key", configuration) + + if (id !== undefined) { + localVarQueryParameter['id'] = id; + } + + if (hasRootCastAuthors !== undefined) { + localVarQueryParameter['has_root_cast_authors'] = hasRootCastAuthors; + } + + if (hasCastLikers !== undefined) { + localVarQueryParameter['has_cast_likers'] = hasCastLikers; + } + + if (hasCastRecasters !== undefined) { + localVarQueryParameter['has_cast_recasters'] = hasCastRecasters; + } + + if (hasReplyAuthors !== undefined) { + localVarQueryParameter['has_reply_authors'] = hasReplyAuthors; + } + + if (cursor !== undefined) { + localVarQueryParameter['cursor'] = cursor; + } + + if (limit !== undefined) { + localVarQueryParameter['limit'] = limit; + } + + + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * Follow a channel + * @summary Follow a channel + * @param {ChannelFollowReqBody} channelFollowReqBody + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + followChannel: async (channelFollowReqBody: ChannelFollowReqBody, options: RawAxiosRequestConfig = {}): Promise => { + // verify required parameter 'channelFollowReqBody' is not null or undefined + assertParamExists('followChannel', 'channelFollowReqBody', channelFollowReqBody) + const localVarPath = `/farcaster/channel/follow`; + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication ApiKeyAuth required + await setApiKeyToObject(localVarHeaderParameter, "x-api-key", configuration) + + + + localVarHeaderParameter['Content-Type'] = 'application/json'; + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + localVarRequestOptions.data = serializeDataIfNeeded(channelFollowReqBody, localVarRequestOptions, configuration) + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * Invite a user to a channel + * @summary Invite + * @param {RemoveChannelMemberRequest} removeChannelMemberRequest + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + inviteChannelMember: async (removeChannelMemberRequest: RemoveChannelMemberRequest, options: RawAxiosRequestConfig = {}): Promise => { + // verify required parameter 'removeChannelMemberRequest' is not null or undefined + assertParamExists('inviteChannelMember', 'removeChannelMemberRequest', removeChannelMemberRequest) + const localVarPath = `/farcaster/channel/member/invite`; + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication ApiKeyAuth required + await setApiKeyToObject(localVarHeaderParameter, "x-api-key", configuration) + + + + localVarHeaderParameter['Content-Type'] = 'application/json'; + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + localVarRequestOptions.data = serializeDataIfNeeded(removeChannelMemberRequest, localVarRequestOptions, configuration) + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * Returns a list of all channels with their details + * @summary Fetch all channels with their details + * @param {number} [limit] Number of results to fetch + * @param {string} [cursor] Pagination cursor. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + listAllChannels: async (limit?: number, cursor?: string, options: RawAxiosRequestConfig = {}): Promise => { + const localVarPath = `/farcaster/channel/list`; + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication ApiKeyAuth required + await setApiKeyToObject(localVarHeaderParameter, "x-api-key", configuration) + + if (limit !== undefined) { + localVarQueryParameter['limit'] = limit; + } + + if (cursor !== undefined) { + localVarQueryParameter['cursor'] = cursor; + } + + + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * Fetch a list of invites, either in a channel or for a user. If both are provided, open channel invite for that user is returned. + * @summary Open invites + * @param {string} [channelId] Channel ID for the channel being queried + * @param {number} [invitedFid] FID of the user being invited + * @param {number} [limit] Number of results to fetch + * @param {string} [cursor] Pagination cursor. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + listChannelInvites: async (channelId?: string, invitedFid?: number, limit?: number, cursor?: string, options: RawAxiosRequestConfig = {}): Promise => { + const localVarPath = `/farcaster/channel/member/invite/list`; + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication ApiKeyAuth required + await setApiKeyToObject(localVarHeaderParameter, "x-api-key", configuration) + + if (channelId !== undefined) { + localVarQueryParameter['channel_id'] = channelId; + } + + if (invitedFid !== undefined) { + localVarQueryParameter['invited_fid'] = invitedFid; + } + + if (limit !== undefined) { + localVarQueryParameter['limit'] = limit; + } + + if (cursor !== undefined) { + localVarQueryParameter['cursor'] = cursor; + } + + + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * Fetch a list of members in a channel + * @summary Fetch members + * @param {string} channelId Channel ID for the channel being queried + * @param {number} [fid] FID of the user being queried. Specify this to check if a user is a member of the channel without paginating through all members. + * @param {number} [limit] Number of results to fetch + * @param {string} [cursor] Pagination cursor. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + listChannelMembers: async (channelId: string, fid?: number, limit?: number, cursor?: string, options: RawAxiosRequestConfig = {}): Promise => { + // verify required parameter 'channelId' is not null or undefined + assertParamExists('listChannelMembers', 'channelId', channelId) + const localVarPath = `/farcaster/channel/member/list`; + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication ApiKeyAuth required + await setApiKeyToObject(localVarHeaderParameter, "x-api-key", configuration) + + if (channelId !== undefined) { + localVarQueryParameter['channel_id'] = channelId; + } + + if (fid !== undefined) { + localVarQueryParameter['fid'] = fid; + } + + if (limit !== undefined) { + localVarQueryParameter['limit'] = limit; + } + + if (cursor !== undefined) { + localVarQueryParameter['cursor'] = cursor; + } + + + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * Returns a list of relevant channel followers for a specific FID. This usually shows on a channel as \"X, Y, Z follow this channel\". + * @summary Relevant followers + * @param {string} id Channel ID being queried + * @param {number} viewerFid The FID of the user to customize this response for. Providing this will also return a list of followers that respects this user\'s mutes and blocks and includes `viewer_context`. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + relevantChannelFollowers: async (id: string, viewerFid: number, options: RawAxiosRequestConfig = {}): Promise => { + // verify required parameter 'id' is not null or undefined + assertParamExists('relevantChannelFollowers', 'id', id) + // verify required parameter 'viewerFid' is not null or undefined + assertParamExists('relevantChannelFollowers', 'viewerFid', viewerFid) + const localVarPath = `/farcaster/channel/followers/relevant`; + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication ApiKeyAuth required + await setApiKeyToObject(localVarHeaderParameter, "x-api-key", configuration) + + if (id !== undefined) { + localVarQueryParameter['id'] = id; + } + + if (viewerFid !== undefined) { + localVarQueryParameter['viewer_fid'] = viewerFid; + } + + + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * Remove a user from a channel or a user\'s invite to a channel role + * @summary Remove user + * @param {RemoveChannelMemberRequest} removeChannelMemberRequest + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + removeChannelMember: async (removeChannelMemberRequest: RemoveChannelMemberRequest, options: RawAxiosRequestConfig = {}): Promise => { + // verify required parameter 'removeChannelMemberRequest' is not null or undefined + assertParamExists('removeChannelMember', 'removeChannelMemberRequest', removeChannelMemberRequest) + const localVarPath = `/farcaster/channel/member`; + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'DELETE', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication ApiKeyAuth required + await setApiKeyToObject(localVarHeaderParameter, "x-api-key", configuration) + + + + localVarHeaderParameter['Content-Type'] = 'application/json'; + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + localVarRequestOptions.data = serializeDataIfNeeded(removeChannelMemberRequest, localVarRequestOptions, configuration) + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * Accept or reject a channel invite + * @summary Accept or reject an invite + * @param {RespondChannelInviteRequest} respondChannelInviteRequest + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + respondChannelInvite: async (respondChannelInviteRequest: RespondChannelInviteRequest, options: RawAxiosRequestConfig = {}): Promise => { + // verify required parameter 'respondChannelInviteRequest' is not null or undefined + assertParamExists('respondChannelInvite', 'respondChannelInviteRequest', respondChannelInviteRequest) + const localVarPath = `/farcaster/channel/member/invite`; + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'PUT', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication ApiKeyAuth required + await setApiKeyToObject(localVarHeaderParameter, "x-api-key", configuration) + + + + localVarHeaderParameter['Content-Type'] = 'application/json'; + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + localVarRequestOptions.data = serializeDataIfNeeded(respondChannelInviteRequest, localVarRequestOptions, configuration) + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * Returns a list of channels based on ID or name + * @summary Search by ID or name + * @param {string} q Channel ID or name for the channel being queried + * @param {number} [limit] Number of results to fetch + * @param {string} [cursor] Pagination cursor. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + searchChannels: async (q: string, limit?: number, cursor?: string, options: RawAxiosRequestConfig = {}): Promise => { + // verify required parameter 'q' is not null or undefined + assertParamExists('searchChannels', 'q', q) + const localVarPath = `/farcaster/channel/search`; + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication ApiKeyAuth required + await setApiKeyToObject(localVarHeaderParameter, "x-api-key", configuration) + + if (q !== undefined) { + localVarQueryParameter['q'] = q; + } + + if (limit !== undefined) { + localVarQueryParameter['limit'] = limit; + } + + if (cursor !== undefined) { + localVarQueryParameter['cursor'] = cursor; + } + + + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * Returns a list of trending channels based on activity + * @summary Channels by activity + * @param {TrendingChannelsTimeWindowEnum} [timeWindow] + * @param {number} [limit] Number of results to fetch (default 10, max 25) + * @param {string} [cursor] Pagination cursor. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + trendingChannels: async (timeWindow?: TrendingChannelsTimeWindowEnum, limit?: number, cursor?: string, options: RawAxiosRequestConfig = {}): Promise => { + const localVarPath = `/farcaster/channel/trending`; + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication ApiKeyAuth required + await setApiKeyToObject(localVarHeaderParameter, "x-api-key", configuration) + + if (timeWindow !== undefined) { + localVarQueryParameter['time_window'] = timeWindow; + } + + if (limit !== undefined) { + localVarQueryParameter['limit'] = limit; + } + + if (cursor !== undefined) { + localVarQueryParameter['cursor'] = cursor; + } + + + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * Unfollow a channel + * @summary Unfollow a channel + * @param {ChannelFollowReqBody} channelFollowReqBody + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + unfollowChannel: async (channelFollowReqBody: ChannelFollowReqBody, options: RawAxiosRequestConfig = {}): Promise => { + // verify required parameter 'channelFollowReqBody' is not null or undefined + assertParamExists('unfollowChannel', 'channelFollowReqBody', channelFollowReqBody) + const localVarPath = `/farcaster/channel/follow`; + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'DELETE', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication ApiKeyAuth required + await setApiKeyToObject(localVarHeaderParameter, "x-api-key", configuration) + + + + localVarHeaderParameter['Content-Type'] = 'application/json'; + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + localVarRequestOptions.data = serializeDataIfNeeded(channelFollowReqBody, localVarRequestOptions, configuration) + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * Returns a list of all channels with their details that an FID is a member of. Data may have a delay of up to 1 hour. + * @summary Member of + * @param {number} fid The FID of the user. + * @param {number} [limit] Number of results to fetch (default 20, max 100) + * @param {string} [cursor] Pagination cursor. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + userChannelMemberships: async (fid: number, limit?: number, cursor?: string, options: RawAxiosRequestConfig = {}): Promise => { + // verify required parameter 'fid' is not null or undefined + assertParamExists('userChannelMemberships', 'fid', fid) + const localVarPath = `/farcaster/user/memberships/list`; + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication ApiKeyAuth required + await setApiKeyToObject(localVarHeaderParameter, "x-api-key", configuration) + + if (fid !== undefined) { + localVarQueryParameter['fid'] = fid; + } + + if (limit !== undefined) { + localVarQueryParameter['limit'] = limit; + } + + if (cursor !== undefined) { + localVarQueryParameter['cursor'] = cursor; + } + + + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * Returns a list of all channels with their details that a FID follows. + * @summary Following + * @param {number} fid The FID of the user. + * @param {number} [limit] Number of results to fetch (default 25, max 100) + * @param {string} [cursor] Pagination cursor. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + userChannels: async (fid: number, limit?: number, cursor?: string, options: RawAxiosRequestConfig = {}): Promise => { + // verify required parameter 'fid' is not null or undefined + assertParamExists('userChannels', 'fid', fid) + const localVarPath = `/farcaster/user/channels`; + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication ApiKeyAuth required + await setApiKeyToObject(localVarHeaderParameter, "x-api-key", configuration) + + if (fid !== undefined) { + localVarQueryParameter['fid'] = fid; + } + + if (limit !== undefined) { + localVarQueryParameter['limit'] = limit; + } + + if (cursor !== undefined) { + localVarQueryParameter['cursor'] = cursor; + } + + + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + } +}; + +/** + * ChannelApi - functional programming interface + * @export + */ +export const ChannelApiFp = function(configuration?: Configuration) { + const localVarAxiosParamCreator = ChannelApiAxiosParamCreator(configuration) + return { + /** + * Fetches all channels that a user has casted in, in reverse chronological order. + * @summary Fetch channels that user is active in + * @param {number} fid The user\'s FID (identifier) + * @param {number} [limit] Number of results to fetch (default 20, max 100). + * @param {string} [cursor] Pagination cursor. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async activeChannels(fid: number, limit?: number, cursor?: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.activeChannels(fid, limit, cursor, options); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = operationServerMap['ChannelApi.activeChannels']?.[localVarOperationServerIndex]?.url; + return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); + }, + /** + * Returns details of a channel + * @summary By ID or parent_url + * @param {string} id Channel ID for the channel being queried + * @param {ChannelType} [type] Type of identifier being used to query the channel. Defaults to ID. + * @param {number} [viewerFid] FID of the user viewing the channel. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async channelDetails(id: string, type?: ChannelType, viewerFid?: number, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.channelDetails(id, type, viewerFid, options); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = operationServerMap['ChannelApi.channelDetails']?.[localVarOperationServerIndex]?.url; + return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); + }, + /** + * Returns details of multiple channels + * @summary Bulk fetch + * @param {string} ids Comma separated list of channel IDs or parent_urls, up to 100 at a time + * @param {ChannelType} [type] Type of identifier being used to query the channels. Defaults to ID. + * @param {number} [viewerFid] FID of the user viewing the channels. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async channelDetailsBulk(ids: string, type?: ChannelType, viewerFid?: number, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.channelDetailsBulk(ids, type, viewerFid, options); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = operationServerMap['ChannelApi.channelDetailsBulk']?.[localVarOperationServerIndex]?.url; + return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); + }, + /** + * Returns a list of followers for a specific channel. Max limit is 1000. Use cursor for pagination. + * @summary For channel + * @param {string} id Channel ID for the channel being queried + * @param {number} [viewerFid] Providing this will return a list of followers that respects this user\'s mutes and blocks and includes `viewer_context`. + * @param {string} [cursor] Pagination cursor. + * @param {number} [limit] Number of followers to fetch (default 25, max 1000) + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async channelFollowers(id: string, viewerFid?: number, cursor?: string, limit?: number, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.channelFollowers(id, viewerFid, cursor, limit, options); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = operationServerMap['ChannelApi.channelFollowers']?.[localVarOperationServerIndex]?.url; + return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); + }, + /** + * Returns a list of users who are active in a given channel, ordered by ascending FIDs + * @summary Fetch users who are active in a channel + * @param {string} id Channel ID for the channel being queried + * @param {boolean} hasRootCastAuthors Include users who posted the root cast in the channel + * @param {boolean} [hasCastLikers] Include users who liked a cast in the channel + * @param {boolean} [hasCastRecasters] Include users who recasted a cast in the channel + * @param {boolean} [hasReplyAuthors] Include users who replied to a cast in the channel + * @param {string} [cursor] Pagination cursor. + * @param {number} [limit] Number of results to fetch (default 25, max 100) + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async channelUsers(id: string, hasRootCastAuthors: boolean, hasCastLikers?: boolean, hasCastRecasters?: boolean, hasReplyAuthors?: boolean, cursor?: string, limit?: number, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.channelUsers(id, hasRootCastAuthors, hasCastLikers, hasCastRecasters, hasReplyAuthors, cursor, limit, options); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = operationServerMap['ChannelApi.channelUsers']?.[localVarOperationServerIndex]?.url; + return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); + }, + /** + * Follow a channel + * @summary Follow a channel + * @param {ChannelFollowReqBody} channelFollowReqBody + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async followChannel(channelFollowReqBody: ChannelFollowReqBody, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.followChannel(channelFollowReqBody, options); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = operationServerMap['ChannelApi.followChannel']?.[localVarOperationServerIndex]?.url; + return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); + }, + /** + * Invite a user to a channel + * @summary Invite + * @param {RemoveChannelMemberRequest} removeChannelMemberRequest + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async inviteChannelMember(removeChannelMemberRequest: RemoveChannelMemberRequest, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.inviteChannelMember(removeChannelMemberRequest, options); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = operationServerMap['ChannelApi.inviteChannelMember']?.[localVarOperationServerIndex]?.url; + return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); + }, + /** + * Returns a list of all channels with their details + * @summary Fetch all channels with their details + * @param {number} [limit] Number of results to fetch + * @param {string} [cursor] Pagination cursor. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async listAllChannels(limit?: number, cursor?: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.listAllChannels(limit, cursor, options); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = operationServerMap['ChannelApi.listAllChannels']?.[localVarOperationServerIndex]?.url; + return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); + }, + /** + * Fetch a list of invites, either in a channel or for a user. If both are provided, open channel invite for that user is returned. + * @summary Open invites + * @param {string} [channelId] Channel ID for the channel being queried + * @param {number} [invitedFid] FID of the user being invited + * @param {number} [limit] Number of results to fetch + * @param {string} [cursor] Pagination cursor. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async listChannelInvites(channelId?: string, invitedFid?: number, limit?: number, cursor?: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.listChannelInvites(channelId, invitedFid, limit, cursor, options); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = operationServerMap['ChannelApi.listChannelInvites']?.[localVarOperationServerIndex]?.url; + return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); + }, + /** + * Fetch a list of members in a channel + * @summary Fetch members + * @param {string} channelId Channel ID for the channel being queried + * @param {number} [fid] FID of the user being queried. Specify this to check if a user is a member of the channel without paginating through all members. + * @param {number} [limit] Number of results to fetch + * @param {string} [cursor] Pagination cursor. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async listChannelMembers(channelId: string, fid?: number, limit?: number, cursor?: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.listChannelMembers(channelId, fid, limit, cursor, options); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = operationServerMap['ChannelApi.listChannelMembers']?.[localVarOperationServerIndex]?.url; + return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); + }, + /** + * Returns a list of relevant channel followers for a specific FID. This usually shows on a channel as \"X, Y, Z follow this channel\". + * @summary Relevant followers + * @param {string} id Channel ID being queried + * @param {number} viewerFid The FID of the user to customize this response for. Providing this will also return a list of followers that respects this user\'s mutes and blocks and includes `viewer_context`. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async relevantChannelFollowers(id: string, viewerFid: number, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.relevantChannelFollowers(id, viewerFid, options); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = operationServerMap['ChannelApi.relevantChannelFollowers']?.[localVarOperationServerIndex]?.url; + return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); + }, + /** + * Remove a user from a channel or a user\'s invite to a channel role + * @summary Remove user + * @param {RemoveChannelMemberRequest} removeChannelMemberRequest + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async removeChannelMember(removeChannelMemberRequest: RemoveChannelMemberRequest, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.removeChannelMember(removeChannelMemberRequest, options); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = operationServerMap['ChannelApi.removeChannelMember']?.[localVarOperationServerIndex]?.url; + return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); + }, + /** + * Accept or reject a channel invite + * @summary Accept or reject an invite + * @param {RespondChannelInviteRequest} respondChannelInviteRequest + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async respondChannelInvite(respondChannelInviteRequest: RespondChannelInviteRequest, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.respondChannelInvite(respondChannelInviteRequest, options); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = operationServerMap['ChannelApi.respondChannelInvite']?.[localVarOperationServerIndex]?.url; + return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); + }, + /** + * Returns a list of channels based on ID or name + * @summary Search by ID or name + * @param {string} q Channel ID or name for the channel being queried + * @param {number} [limit] Number of results to fetch + * @param {string} [cursor] Pagination cursor. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async searchChannels(q: string, limit?: number, cursor?: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.searchChannels(q, limit, cursor, options); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = operationServerMap['ChannelApi.searchChannels']?.[localVarOperationServerIndex]?.url; + return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); + }, + /** + * Returns a list of trending channels based on activity + * @summary Channels by activity + * @param {TrendingChannelsTimeWindowEnum} [timeWindow] + * @param {number} [limit] Number of results to fetch (default 10, max 25) + * @param {string} [cursor] Pagination cursor. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async trendingChannels(timeWindow?: TrendingChannelsTimeWindowEnum, limit?: number, cursor?: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.trendingChannels(timeWindow, limit, cursor, options); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = operationServerMap['ChannelApi.trendingChannels']?.[localVarOperationServerIndex]?.url; + return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); + }, + /** + * Unfollow a channel + * @summary Unfollow a channel + * @param {ChannelFollowReqBody} channelFollowReqBody + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async unfollowChannel(channelFollowReqBody: ChannelFollowReqBody, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.unfollowChannel(channelFollowReqBody, options); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = operationServerMap['ChannelApi.unfollowChannel']?.[localVarOperationServerIndex]?.url; + return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); + }, + /** + * Returns a list of all channels with their details that an FID is a member of. Data may have a delay of up to 1 hour. + * @summary Member of + * @param {number} fid The FID of the user. + * @param {number} [limit] Number of results to fetch (default 20, max 100) + * @param {string} [cursor] Pagination cursor. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async userChannelMemberships(fid: number, limit?: number, cursor?: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.userChannelMemberships(fid, limit, cursor, options); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = operationServerMap['ChannelApi.userChannelMemberships']?.[localVarOperationServerIndex]?.url; + return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); + }, + /** + * Returns a list of all channels with their details that a FID follows. + * @summary Following + * @param {number} fid The FID of the user. + * @param {number} [limit] Number of results to fetch (default 25, max 100) + * @param {string} [cursor] Pagination cursor. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async userChannels(fid: number, limit?: number, cursor?: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.userChannels(fid, limit, cursor, options); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = operationServerMap['ChannelApi.userChannels']?.[localVarOperationServerIndex]?.url; + return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); + }, + } +}; + +/** + * ChannelApi - factory interface + * @export + */ +export const ChannelApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) { + const localVarFp = ChannelApiFp(configuration) + return { + /** + * Fetches all channels that a user has casted in, in reverse chronological order. + * @summary Fetch channels that user is active in + * @param {number} fid The user\'s FID (identifier) + * @param {number} [limit] Number of results to fetch (default 20, max 100). + * @param {string} [cursor] Pagination cursor. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + activeChannels(fid: number, limit?: number, cursor?: string, options?: RawAxiosRequestConfig): AxiosPromise { + return localVarFp.activeChannels(fid, limit, cursor, options).then((request) => request(axios, basePath)); + }, + /** + * Returns details of a channel + * @summary By ID or parent_url + * @param {string} id Channel ID for the channel being queried + * @param {ChannelType} [type] Type of identifier being used to query the channel. Defaults to ID. + * @param {number} [viewerFid] FID of the user viewing the channel. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + channelDetails(id: string, type?: ChannelType, viewerFid?: number, options?: RawAxiosRequestConfig): AxiosPromise { + return localVarFp.channelDetails(id, type, viewerFid, options).then((request) => request(axios, basePath)); + }, + /** + * Returns details of multiple channels + * @summary Bulk fetch + * @param {string} ids Comma separated list of channel IDs or parent_urls, up to 100 at a time + * @param {ChannelType} [type] Type of identifier being used to query the channels. Defaults to ID. + * @param {number} [viewerFid] FID of the user viewing the channels. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + channelDetailsBulk(ids: string, type?: ChannelType, viewerFid?: number, options?: RawAxiosRequestConfig): AxiosPromise { + return localVarFp.channelDetailsBulk(ids, type, viewerFid, options).then((request) => request(axios, basePath)); + }, + /** + * Returns a list of followers for a specific channel. Max limit is 1000. Use cursor for pagination. + * @summary For channel + * @param {string} id Channel ID for the channel being queried + * @param {number} [viewerFid] Providing this will return a list of followers that respects this user\'s mutes and blocks and includes `viewer_context`. + * @param {string} [cursor] Pagination cursor. + * @param {number} [limit] Number of followers to fetch (default 25, max 1000) + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + channelFollowers(id: string, viewerFid?: number, cursor?: string, limit?: number, options?: RawAxiosRequestConfig): AxiosPromise { + return localVarFp.channelFollowers(id, viewerFid, cursor, limit, options).then((request) => request(axios, basePath)); + }, + /** + * Returns a list of users who are active in a given channel, ordered by ascending FIDs + * @summary Fetch users who are active in a channel + * @param {string} id Channel ID for the channel being queried + * @param {boolean} hasRootCastAuthors Include users who posted the root cast in the channel + * @param {boolean} [hasCastLikers] Include users who liked a cast in the channel + * @param {boolean} [hasCastRecasters] Include users who recasted a cast in the channel + * @param {boolean} [hasReplyAuthors] Include users who replied to a cast in the channel + * @param {string} [cursor] Pagination cursor. + * @param {number} [limit] Number of results to fetch (default 25, max 100) + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + channelUsers(id: string, hasRootCastAuthors: boolean, hasCastLikers?: boolean, hasCastRecasters?: boolean, hasReplyAuthors?: boolean, cursor?: string, limit?: number, options?: RawAxiosRequestConfig): AxiosPromise { + return localVarFp.channelUsers(id, hasRootCastAuthors, hasCastLikers, hasCastRecasters, hasReplyAuthors, cursor, limit, options).then((request) => request(axios, basePath)); + }, + /** + * Follow a channel + * @summary Follow a channel + * @param {ChannelFollowReqBody} channelFollowReqBody + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + followChannel(channelFollowReqBody: ChannelFollowReqBody, options?: RawAxiosRequestConfig): AxiosPromise { + return localVarFp.followChannel(channelFollowReqBody, options).then((request) => request(axios, basePath)); + }, + /** + * Invite a user to a channel + * @summary Invite + * @param {RemoveChannelMemberRequest} removeChannelMemberRequest + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + inviteChannelMember(removeChannelMemberRequest: RemoveChannelMemberRequest, options?: RawAxiosRequestConfig): AxiosPromise { + return localVarFp.inviteChannelMember(removeChannelMemberRequest, options).then((request) => request(axios, basePath)); + }, + /** + * Returns a list of all channels with their details + * @summary Fetch all channels with their details + * @param {number} [limit] Number of results to fetch + * @param {string} [cursor] Pagination cursor. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + listAllChannels(limit?: number, cursor?: string, options?: RawAxiosRequestConfig): AxiosPromise { + return localVarFp.listAllChannels(limit, cursor, options).then((request) => request(axios, basePath)); + }, + /** + * Fetch a list of invites, either in a channel or for a user. If both are provided, open channel invite for that user is returned. + * @summary Open invites + * @param {string} [channelId] Channel ID for the channel being queried + * @param {number} [invitedFid] FID of the user being invited + * @param {number} [limit] Number of results to fetch + * @param {string} [cursor] Pagination cursor. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + listChannelInvites(channelId?: string, invitedFid?: number, limit?: number, cursor?: string, options?: RawAxiosRequestConfig): AxiosPromise { + return localVarFp.listChannelInvites(channelId, invitedFid, limit, cursor, options).then((request) => request(axios, basePath)); + }, + /** + * Fetch a list of members in a channel + * @summary Fetch members + * @param {string} channelId Channel ID for the channel being queried + * @param {number} [fid] FID of the user being queried. Specify this to check if a user is a member of the channel without paginating through all members. + * @param {number} [limit] Number of results to fetch + * @param {string} [cursor] Pagination cursor. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + listChannelMembers(channelId: string, fid?: number, limit?: number, cursor?: string, options?: RawAxiosRequestConfig): AxiosPromise { + return localVarFp.listChannelMembers(channelId, fid, limit, cursor, options).then((request) => request(axios, basePath)); + }, + /** + * Returns a list of relevant channel followers for a specific FID. This usually shows on a channel as \"X, Y, Z follow this channel\". + * @summary Relevant followers + * @param {string} id Channel ID being queried + * @param {number} viewerFid The FID of the user to customize this response for. Providing this will also return a list of followers that respects this user\'s mutes and blocks and includes `viewer_context`. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + relevantChannelFollowers(id: string, viewerFid: number, options?: RawAxiosRequestConfig): AxiosPromise { + return localVarFp.relevantChannelFollowers(id, viewerFid, options).then((request) => request(axios, basePath)); + }, + /** + * Remove a user from a channel or a user\'s invite to a channel role + * @summary Remove user + * @param {RemoveChannelMemberRequest} removeChannelMemberRequest + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + removeChannelMember(removeChannelMemberRequest: RemoveChannelMemberRequest, options?: RawAxiosRequestConfig): AxiosPromise { + return localVarFp.removeChannelMember(removeChannelMemberRequest, options).then((request) => request(axios, basePath)); + }, + /** + * Accept or reject a channel invite + * @summary Accept or reject an invite + * @param {RespondChannelInviteRequest} respondChannelInviteRequest + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + respondChannelInvite(respondChannelInviteRequest: RespondChannelInviteRequest, options?: RawAxiosRequestConfig): AxiosPromise { + return localVarFp.respondChannelInvite(respondChannelInviteRequest, options).then((request) => request(axios, basePath)); + }, + /** + * Returns a list of channels based on ID or name + * @summary Search by ID or name + * @param {string} q Channel ID or name for the channel being queried + * @param {number} [limit] Number of results to fetch + * @param {string} [cursor] Pagination cursor. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + searchChannels(q: string, limit?: number, cursor?: string, options?: RawAxiosRequestConfig): AxiosPromise { + return localVarFp.searchChannels(q, limit, cursor, options).then((request) => request(axios, basePath)); + }, + /** + * Returns a list of trending channels based on activity + * @summary Channels by activity + * @param {TrendingChannelsTimeWindowEnum} [timeWindow] + * @param {number} [limit] Number of results to fetch (default 10, max 25) + * @param {string} [cursor] Pagination cursor. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + trendingChannels(timeWindow?: TrendingChannelsTimeWindowEnum, limit?: number, cursor?: string, options?: RawAxiosRequestConfig): AxiosPromise { + return localVarFp.trendingChannels(timeWindow, limit, cursor, options).then((request) => request(axios, basePath)); + }, + /** + * Unfollow a channel + * @summary Unfollow a channel + * @param {ChannelFollowReqBody} channelFollowReqBody + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + unfollowChannel(channelFollowReqBody: ChannelFollowReqBody, options?: RawAxiosRequestConfig): AxiosPromise { + return localVarFp.unfollowChannel(channelFollowReqBody, options).then((request) => request(axios, basePath)); + }, + /** + * Returns a list of all channels with their details that an FID is a member of. Data may have a delay of up to 1 hour. + * @summary Member of + * @param {number} fid The FID of the user. + * @param {number} [limit] Number of results to fetch (default 20, max 100) + * @param {string} [cursor] Pagination cursor. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + userChannelMemberships(fid: number, limit?: number, cursor?: string, options?: RawAxiosRequestConfig): AxiosPromise { + return localVarFp.userChannelMemberships(fid, limit, cursor, options).then((request) => request(axios, basePath)); + }, + /** + * Returns a list of all channels with their details that a FID follows. + * @summary Following + * @param {number} fid The FID of the user. + * @param {number} [limit] Number of results to fetch (default 25, max 100) + * @param {string} [cursor] Pagination cursor. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + userChannels(fid: number, limit?: number, cursor?: string, options?: RawAxiosRequestConfig): AxiosPromise { + return localVarFp.userChannels(fid, limit, cursor, options).then((request) => request(axios, basePath)); + }, + }; +}; + +/** + * ChannelApi - object-oriented interface + * @export + * @class ChannelApi + * @extends {BaseAPI} + */ +export class ChannelApi extends BaseAPI { + /** + * Fetches all channels that a user has casted in, in reverse chronological order. + * @summary Fetch channels that user is active in + * @param {number} fid The user\'s FID (identifier) + * @param {number} [limit] Number of results to fetch (default 20, max 100). + * @param {string} [cursor] Pagination cursor. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof ChannelApi + */ + public activeChannels(fid: number, limit?: number, cursor?: string, options?: RawAxiosRequestConfig) { + return ChannelApiFp(this.configuration).activeChannels(fid, limit, cursor, options).then((request) => request(this.axios, this.basePath)); + } + + /** + * Returns details of a channel + * @summary By ID or parent_url + * @param {string} id Channel ID for the channel being queried + * @param {ChannelType} [type] Type of identifier being used to query the channel. Defaults to ID. + * @param {number} [viewerFid] FID of the user viewing the channel. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof ChannelApi + */ + public channelDetails(id: string, type?: ChannelType, viewerFid?: number, options?: RawAxiosRequestConfig) { + return ChannelApiFp(this.configuration).channelDetails(id, type, viewerFid, options).then((request) => request(this.axios, this.basePath)); + } + + /** + * Returns details of multiple channels + * @summary Bulk fetch + * @param {string} ids Comma separated list of channel IDs or parent_urls, up to 100 at a time + * @param {ChannelType} [type] Type of identifier being used to query the channels. Defaults to ID. + * @param {number} [viewerFid] FID of the user viewing the channels. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof ChannelApi + */ + public channelDetailsBulk(ids: string, type?: ChannelType, viewerFid?: number, options?: RawAxiosRequestConfig) { + return ChannelApiFp(this.configuration).channelDetailsBulk(ids, type, viewerFid, options).then((request) => request(this.axios, this.basePath)); + } + + /** + * Returns a list of followers for a specific channel. Max limit is 1000. Use cursor for pagination. + * @summary For channel + * @param {string} id Channel ID for the channel being queried + * @param {number} [viewerFid] Providing this will return a list of followers that respects this user\'s mutes and blocks and includes `viewer_context`. + * @param {string} [cursor] Pagination cursor. + * @param {number} [limit] Number of followers to fetch (default 25, max 1000) + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof ChannelApi + */ + public channelFollowers(id: string, viewerFid?: number, cursor?: string, limit?: number, options?: RawAxiosRequestConfig) { + return ChannelApiFp(this.configuration).channelFollowers(id, viewerFid, cursor, limit, options).then((request) => request(this.axios, this.basePath)); + } + + /** + * Returns a list of users who are active in a given channel, ordered by ascending FIDs + * @summary Fetch users who are active in a channel + * @param {string} id Channel ID for the channel being queried + * @param {boolean} hasRootCastAuthors Include users who posted the root cast in the channel + * @param {boolean} [hasCastLikers] Include users who liked a cast in the channel + * @param {boolean} [hasCastRecasters] Include users who recasted a cast in the channel + * @param {boolean} [hasReplyAuthors] Include users who replied to a cast in the channel + * @param {string} [cursor] Pagination cursor. + * @param {number} [limit] Number of results to fetch (default 25, max 100) + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof ChannelApi + */ + public channelUsers(id: string, hasRootCastAuthors: boolean, hasCastLikers?: boolean, hasCastRecasters?: boolean, hasReplyAuthors?: boolean, cursor?: string, limit?: number, options?: RawAxiosRequestConfig) { + return ChannelApiFp(this.configuration).channelUsers(id, hasRootCastAuthors, hasCastLikers, hasCastRecasters, hasReplyAuthors, cursor, limit, options).then((request) => request(this.axios, this.basePath)); + } + + /** + * Follow a channel + * @summary Follow a channel + * @param {ChannelFollowReqBody} channelFollowReqBody + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof ChannelApi + */ + public followChannel(channelFollowReqBody: ChannelFollowReqBody, options?: RawAxiosRequestConfig) { + return ChannelApiFp(this.configuration).followChannel(channelFollowReqBody, options).then((request) => request(this.axios, this.basePath)); + } + + /** + * Invite a user to a channel + * @summary Invite + * @param {RemoveChannelMemberRequest} removeChannelMemberRequest + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof ChannelApi + */ + public inviteChannelMember(removeChannelMemberRequest: RemoveChannelMemberRequest, options?: RawAxiosRequestConfig) { + return ChannelApiFp(this.configuration).inviteChannelMember(removeChannelMemberRequest, options).then((request) => request(this.axios, this.basePath)); + } + + /** + * Returns a list of all channels with their details + * @summary Fetch all channels with their details + * @param {number} [limit] Number of results to fetch + * @param {string} [cursor] Pagination cursor. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof ChannelApi + */ + public listAllChannels(limit?: number, cursor?: string, options?: RawAxiosRequestConfig) { + return ChannelApiFp(this.configuration).listAllChannels(limit, cursor, options).then((request) => request(this.axios, this.basePath)); + } + + /** + * Fetch a list of invites, either in a channel or for a user. If both are provided, open channel invite for that user is returned. + * @summary Open invites + * @param {string} [channelId] Channel ID for the channel being queried + * @param {number} [invitedFid] FID of the user being invited + * @param {number} [limit] Number of results to fetch + * @param {string} [cursor] Pagination cursor. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof ChannelApi + */ + public listChannelInvites(channelId?: string, invitedFid?: number, limit?: number, cursor?: string, options?: RawAxiosRequestConfig) { + return ChannelApiFp(this.configuration).listChannelInvites(channelId, invitedFid, limit, cursor, options).then((request) => request(this.axios, this.basePath)); + } + + /** + * Fetch a list of members in a channel + * @summary Fetch members + * @param {string} channelId Channel ID for the channel being queried + * @param {number} [fid] FID of the user being queried. Specify this to check if a user is a member of the channel without paginating through all members. + * @param {number} [limit] Number of results to fetch + * @param {string} [cursor] Pagination cursor. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof ChannelApi + */ + public listChannelMembers(channelId: string, fid?: number, limit?: number, cursor?: string, options?: RawAxiosRequestConfig) { + return ChannelApiFp(this.configuration).listChannelMembers(channelId, fid, limit, cursor, options).then((request) => request(this.axios, this.basePath)); + } + + /** + * Returns a list of relevant channel followers for a specific FID. This usually shows on a channel as \"X, Y, Z follow this channel\". + * @summary Relevant followers + * @param {string} id Channel ID being queried + * @param {number} viewerFid The FID of the user to customize this response for. Providing this will also return a list of followers that respects this user\'s mutes and blocks and includes `viewer_context`. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof ChannelApi + */ + public relevantChannelFollowers(id: string, viewerFid: number, options?: RawAxiosRequestConfig) { + return ChannelApiFp(this.configuration).relevantChannelFollowers(id, viewerFid, options).then((request) => request(this.axios, this.basePath)); + } + + /** + * Remove a user from a channel or a user\'s invite to a channel role + * @summary Remove user + * @param {RemoveChannelMemberRequest} removeChannelMemberRequest + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof ChannelApi + */ + public removeChannelMember(removeChannelMemberRequest: RemoveChannelMemberRequest, options?: RawAxiosRequestConfig) { + return ChannelApiFp(this.configuration).removeChannelMember(removeChannelMemberRequest, options).then((request) => request(this.axios, this.basePath)); + } + + /** + * Accept or reject a channel invite + * @summary Accept or reject an invite + * @param {RespondChannelInviteRequest} respondChannelInviteRequest + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof ChannelApi + */ + public respondChannelInvite(respondChannelInviteRequest: RespondChannelInviteRequest, options?: RawAxiosRequestConfig) { + return ChannelApiFp(this.configuration).respondChannelInvite(respondChannelInviteRequest, options).then((request) => request(this.axios, this.basePath)); + } + + /** + * Returns a list of channels based on ID or name + * @summary Search by ID or name + * @param {string} q Channel ID or name for the channel being queried + * @param {number} [limit] Number of results to fetch + * @param {string} [cursor] Pagination cursor. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof ChannelApi + */ + public searchChannels(q: string, limit?: number, cursor?: string, options?: RawAxiosRequestConfig) { + return ChannelApiFp(this.configuration).searchChannels(q, limit, cursor, options).then((request) => request(this.axios, this.basePath)); + } + + /** + * Returns a list of trending channels based on activity + * @summary Channels by activity + * @param {TrendingChannelsTimeWindowEnum} [timeWindow] + * @param {number} [limit] Number of results to fetch (default 10, max 25) + * @param {string} [cursor] Pagination cursor. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof ChannelApi + */ + public trendingChannels(timeWindow?: TrendingChannelsTimeWindowEnum, limit?: number, cursor?: string, options?: RawAxiosRequestConfig) { + return ChannelApiFp(this.configuration).trendingChannels(timeWindow, limit, cursor, options).then((request) => request(this.axios, this.basePath)); + } + + /** + * Unfollow a channel + * @summary Unfollow a channel + * @param {ChannelFollowReqBody} channelFollowReqBody + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof ChannelApi + */ + public unfollowChannel(channelFollowReqBody: ChannelFollowReqBody, options?: RawAxiosRequestConfig) { + return ChannelApiFp(this.configuration).unfollowChannel(channelFollowReqBody, options).then((request) => request(this.axios, this.basePath)); + } + + /** + * Returns a list of all channels with their details that an FID is a member of. Data may have a delay of up to 1 hour. + * @summary Member of + * @param {number} fid The FID of the user. + * @param {number} [limit] Number of results to fetch (default 20, max 100) + * @param {string} [cursor] Pagination cursor. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof ChannelApi + */ + public userChannelMemberships(fid: number, limit?: number, cursor?: string, options?: RawAxiosRequestConfig) { + return ChannelApiFp(this.configuration).userChannelMemberships(fid, limit, cursor, options).then((request) => request(this.axios, this.basePath)); + } + + /** + * Returns a list of all channels with their details that a FID follows. + * @summary Following + * @param {number} fid The FID of the user. + * @param {number} [limit] Number of results to fetch (default 25, max 100) + * @param {string} [cursor] Pagination cursor. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof ChannelApi + */ + public userChannels(fid: number, limit?: number, cursor?: string, options?: RawAxiosRequestConfig) { + return ChannelApiFp(this.configuration).userChannels(fid, limit, cursor, options).then((request) => request(this.axios, this.basePath)); + } +} + +/** + * @export + */ +export const TrendingChannelsTimeWindowEnum = { + _1d: '1d', + _7d: '7d', + _30d: '30d' +} as const; +export type TrendingChannelsTimeWindowEnum = typeof TrendingChannelsTimeWindowEnum[keyof typeof TrendingChannelsTimeWindowEnum]; diff --git a/src/neynar-api/v2/openapi-farcaster/apis/feed-api.ts b/src/neynar-api/v2/openapi-farcaster/apis/feed-api.ts new file mode 100644 index 00000000..70149856 --- /dev/null +++ b/src/neynar-api/v2/openapi-farcaster/apis/feed-api.ts @@ -0,0 +1,1260 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Farcaster API V2 + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +import type { Configuration } from '../configuration'; +import type { AxiosPromise, AxiosInstance, RawAxiosRequestConfig } from 'axios'; +import globalAxios from 'axios'; +// Some imports not used depending on template conditions +// @ts-ignore +import { DUMMY_BASE_URL, assertParamExists, setApiKeyToObject, setBasicAuthToObject, setBearerAuthToObject, setOAuthToObject, setSearchParams, serializeDataIfNeeded, toPathString, createRequestFunction } from '../common'; +// @ts-ignore +import { BASE_PATH, COLLECTION_FORMATS, type RequestArgs, BaseAPI, RequiredError, operationServerMap } from '../base'; +// @ts-ignore +import type { BulkCastsResponse } from '../models'; +// @ts-ignore +import type { EmbedType } from '../models'; +// @ts-ignore +import type { ErrorRes } from '../models'; +// @ts-ignore +import type { FeedForYou400Response } from '../models'; +// @ts-ignore +import type { FeedResponse } from '../models'; +// @ts-ignore +import type { FeedTrendingProvider } from '../models'; +// @ts-ignore +import type { FeedType } from '../models'; +// @ts-ignore +import type { FilterType } from '../models'; +// @ts-ignore +import type { ForYouProvider } from '../models'; +/** + * FeedApi - axios parameter creator + * @export + */ +export const FeedApiAxiosParamCreator = function (configuration?: Configuration) { + return { + /** + * Fetch casts based on filters. Ensure setting the correct parameters based on the feed_type and filter_type. + * @summary By filters + * @param {FeedType} feedType Defaults to following (requires FID or address). If set to filter (requires filter_type) + * @param {FilterType} [filterType] Used when feed_type=filter. Can be set to FIDs (requires FIDs) or parent_url (requires parent_url) or channel_id (requires channel_id) + * @param {number} [fid] (Optional) FID of user whose feed you want to create. By default, the API expects this field, except if you pass a filter_type + * @param {string} [fids] Used when filter_type=FIDs . Create a feed based on a list of FIDs. Max array size is 250. Requires feed_type and filter_type. + * @param {string} [parentUrl] Used when filter_type=parent_url can be used to fetch content under any parent url e.g. FIP-2 channels on Warpcast. Requires feed_type and filter_type + * @param {string} [channelId] Used when filter_type=channel_id can be used to fetch casts under a channel. Requires feed_type and filter_type. + * @param {boolean} [membersOnly] Used when filter_type=channel_id. Only include casts from members of the channel. True by default. + * @param {string} [embedUrl] Used when filter_type=embed_url can be used to fetch all casts with an embed url that contains embed_url. Requires feed_type and filter_type + * @param {Array} [embedTypes] Used when filter_type=embed_types can be used to fetch all casts with matching content types. Requires feed_type and filter_type + * @param {boolean} [withRecasts] Include recasts in the response, true by default + * @param {number} [limit] Number of results to fetch (default 25, max 100) + * @param {string} [cursor] Pagination cursor. + * @param {number} [viewerFid] Providing this will return a feed that respects this user\'s mutes and blocks and includes `viewer_context`. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + feed: async (feedType: FeedType, filterType?: FilterType, fid?: number, fids?: string, parentUrl?: string, channelId?: string, membersOnly?: boolean, embedUrl?: string, embedTypes?: Array, withRecasts?: boolean, limit?: number, cursor?: string, viewerFid?: number, options: RawAxiosRequestConfig = {}): Promise => { + // verify required parameter 'feedType' is not null or undefined + assertParamExists('feed', 'feedType', feedType) + const localVarPath = `/farcaster/feed`; + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication ApiKeyAuth required + await setApiKeyToObject(localVarHeaderParameter, "x-api-key", configuration) + + if (feedType !== undefined) { + localVarQueryParameter['feed_type'] = feedType; + } + + if (filterType !== undefined) { + localVarQueryParameter['filter_type'] = filterType; + } + + if (fid !== undefined) { + localVarQueryParameter['fid'] = fid; + } + + if (fids !== undefined) { + localVarQueryParameter['fids'] = fids; + } + + if (parentUrl !== undefined) { + localVarQueryParameter['parent_url'] = parentUrl; + } + + if (channelId !== undefined) { + localVarQueryParameter['channel_id'] = channelId; + } + + if (membersOnly !== undefined) { + localVarQueryParameter['members_only'] = membersOnly; + } + + if (embedUrl !== undefined) { + localVarQueryParameter['embed_url'] = embedUrl; + } + + if (embedTypes) { + localVarQueryParameter['embed_types'] = embedTypes.join(COLLECTION_FORMATS.csv); + } + + if (withRecasts !== undefined) { + localVarQueryParameter['with_recasts'] = withRecasts; + } + + if (limit !== undefined) { + localVarQueryParameter['limit'] = limit; + } + + if (cursor !== undefined) { + localVarQueryParameter['cursor'] = cursor; + } + + if (viewerFid !== undefined) { + localVarQueryParameter['viewer_fid'] = viewerFid; + } + + + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * Fetch feed based on channel IDs + * @summary By channel IDs + * @param {string} channelIds Comma separated list of channel IDs e.g. neynar,farcaster + * @param {boolean} [withRecasts] Include recasts in the response, true by default + * @param {number} [viewerFid] Providing this will return a feed that respects this user\'s mutes and blocks and includes `viewer_context`. + * @param {boolean} [withReplies] Include replies in the response, false by default + * @param {boolean} [membersOnly] Only include casts from members of the channel. True by default. + * @param {number} [limit] Number of results to fetch (default 25, max 100) + * @param {string} [cursor] Pagination cursor. + * @param {boolean} [shouldModerate] If true, only casts that have been liked by the moderator (if one exists) will be returned. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + feedChannels: async (channelIds: string, withRecasts?: boolean, viewerFid?: number, withReplies?: boolean, membersOnly?: boolean, limit?: number, cursor?: string, shouldModerate?: boolean, options: RawAxiosRequestConfig = {}): Promise => { + // verify required parameter 'channelIds' is not null or undefined + assertParamExists('feedChannels', 'channelIds', channelIds) + const localVarPath = `/farcaster/feed/channels`; + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication ApiKeyAuth required + await setApiKeyToObject(localVarHeaderParameter, "x-api-key", configuration) + + if (channelIds !== undefined) { + localVarQueryParameter['channel_ids'] = channelIds; + } + + if (withRecasts !== undefined) { + localVarQueryParameter['with_recasts'] = withRecasts; + } + + if (viewerFid !== undefined) { + localVarQueryParameter['viewer_fid'] = viewerFid; + } + + if (withReplies !== undefined) { + localVarQueryParameter['with_replies'] = withReplies; + } + + if (membersOnly !== undefined) { + localVarQueryParameter['members_only'] = membersOnly; + } + + if (limit !== undefined) { + localVarQueryParameter['limit'] = limit; + } + + if (cursor !== undefined) { + localVarQueryParameter['cursor'] = cursor; + } + + if (shouldModerate !== undefined) { + localVarQueryParameter['should_moderate'] = shouldModerate; + } + + + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * Fetch feed based on who a user is following + * @summary Following + * @param {number} fid FID of user whose feed you want to create + * @param {number} [viewerFid] Providing this will return a feed that respects this user\'s mutes and blocks and includes `viewer_context`. + * @param {boolean} [withRecasts] Include recasts in the response, true by default + * @param {number} [limit] Number of results to fetch (default 25, max 100) + * @param {string} [cursor] Pagination cursor. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + feedFollowing: async (fid: number, viewerFid?: number, withRecasts?: boolean, limit?: number, cursor?: string, options: RawAxiosRequestConfig = {}): Promise => { + // verify required parameter 'fid' is not null or undefined + assertParamExists('feedFollowing', 'fid', fid) + const localVarPath = `/farcaster/feed/following`; + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication ApiKeyAuth required + await setApiKeyToObject(localVarHeaderParameter, "x-api-key", configuration) + + if (fid !== undefined) { + localVarQueryParameter['fid'] = fid; + } + + if (viewerFid !== undefined) { + localVarQueryParameter['viewer_fid'] = viewerFid; + } + + if (withRecasts !== undefined) { + localVarQueryParameter['with_recasts'] = withRecasts; + } + + if (limit !== undefined) { + localVarQueryParameter['limit'] = limit; + } + + if (cursor !== undefined) { + localVarQueryParameter['cursor'] = cursor; + } + + + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * Fetch a personalized For You feed for a user + * @summary For you + * @param {number} fid FID of user whose feed you want to create + * @param {number} [viewerFid] Providing this will return a feed that respects this user\'s mutes and blocks and includes `viewer_context`. + * @param {ForYouProvider} [provider] + * @param {number} [limit] Number of results to fetch (default 25, max 50) + * @param {string} [cursor] Pagination cursor. + * @param {string} [providerMetadata] provider_metadata is a URI-encoded stringified JSON object that can be used to pass additional metadata to the provider. Only available for mbd provider right now. See [here](https://docs.neynar.com/docs/feed-for-you-w-external-providers) on how to use. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + feedForYou: async (fid: number, viewerFid?: number, provider?: ForYouProvider, limit?: number, cursor?: string, providerMetadata?: string, options: RawAxiosRequestConfig = {}): Promise => { + // verify required parameter 'fid' is not null or undefined + assertParamExists('feedForYou', 'fid', fid) + const localVarPath = `/farcaster/feed/for_you`; + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication ApiKeyAuth required + await setApiKeyToObject(localVarHeaderParameter, "x-api-key", configuration) + + if (fid !== undefined) { + localVarQueryParameter['fid'] = fid; + } + + if (viewerFid !== undefined) { + localVarQueryParameter['viewer_fid'] = viewerFid; + } + + if (provider !== undefined) { + localVarQueryParameter['provider'] = provider; + } + + if (limit !== undefined) { + localVarQueryParameter['limit'] = limit; + } + + if (cursor !== undefined) { + localVarQueryParameter['cursor'] = cursor; + } + + if (providerMetadata !== undefined) { + localVarQueryParameter['provider_metadata'] = providerMetadata; + } + + + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * Fetch feed of casts with Frames, reverse chronological order + * @summary Casts with Frames + * @param {number} [limit] Number of results to fetch (default 25, max 100) + * @param {number} [viewerFid] Providing this will return a feed that respects this user\'s mutes and blocks and includes `viewer_context`. + * @param {string} [cursor] Pagination cursor. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + feedFrames: async (limit?: number, viewerFid?: number, cursor?: string, options: RawAxiosRequestConfig = {}): Promise => { + const localVarPath = `/farcaster/feed/frames`; + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication ApiKeyAuth required + await setApiKeyToObject(localVarHeaderParameter, "x-api-key", configuration) + + if (limit !== undefined) { + localVarQueryParameter['limit'] = limit; + } + + if (viewerFid !== undefined) { + localVarQueryParameter['viewer_fid'] = viewerFid; + } + + if (cursor !== undefined) { + localVarQueryParameter['cursor'] = cursor; + } + + + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * Fetch feed based on parent URLs + * @summary By parent URLs + * @param {string} parentUrls Comma separated list of parent_urls + * @param {boolean} [withRecasts] Include recasts in the response, true by default + * @param {number} [viewerFid] Providing this will return a feed that respects this user\'s mutes and blocks and includes `viewer_context`. + * @param {boolean} [withReplies] Include replies in the response, false by default + * @param {number} [limit] Number of results to fetch (default 25, max 100) + * @param {string} [cursor] Pagination cursor. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + feedParentUrls: async (parentUrls: string, withRecasts?: boolean, viewerFid?: number, withReplies?: boolean, limit?: number, cursor?: string, options: RawAxiosRequestConfig = {}): Promise => { + // verify required parameter 'parentUrls' is not null or undefined + assertParamExists('feedParentUrls', 'parentUrls', parentUrls) + const localVarPath = `/farcaster/feed/parent_urls`; + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication ApiKeyAuth required + await setApiKeyToObject(localVarHeaderParameter, "x-api-key", configuration) + + if (parentUrls !== undefined) { + localVarQueryParameter['parent_urls'] = parentUrls; + } + + if (withRecasts !== undefined) { + localVarQueryParameter['with_recasts'] = withRecasts; + } + + if (viewerFid !== undefined) { + localVarQueryParameter['viewer_fid'] = viewerFid; + } + + if (withReplies !== undefined) { + localVarQueryParameter['with_replies'] = withReplies; + } + + if (limit !== undefined) { + localVarQueryParameter['limit'] = limit; + } + + if (cursor !== undefined) { + localVarQueryParameter['cursor'] = cursor; + } + + + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * Fetch trending casts or on the global feed or channels feeds. 7d time window available for channel feeds only. + * @summary Trending casts + * @param {number} [limit] Number of results to fetch (max 10) + * @param {string} [cursor] Pagination cursor + * @param {number} [viewerFid] Providing this will return a feed that respects this user\'s mutes and blocks and includes `viewer_context`. + * @param {FeedTrendingTimeWindowEnum} [timeWindow] Time window for trending casts (7d window for channel feeds only) + * @param {string} [channelId] Channel ID to filter trending casts. Less active channels might have no casts in the time window selected. + * @param {FeedTrendingProvider} [provider] The provider of the trending casts feed. + * @param {string} [providerMetadata] provider_metadata is a URI-encoded stringified JSON object that can be used to pass additional metadata to the provider. Only available for mbd provider right now. See [here](https://docs.neynar.com/docs/feed-for-you-w-external-providers) on how to use. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + feedTrending: async (limit?: number, cursor?: string, viewerFid?: number, timeWindow?: FeedTrendingTimeWindowEnum, channelId?: string, provider?: FeedTrendingProvider, providerMetadata?: string, options: RawAxiosRequestConfig = {}): Promise => { + const localVarPath = `/farcaster/feed/trending`; + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication ApiKeyAuth required + await setApiKeyToObject(localVarHeaderParameter, "x-api-key", configuration) + + if (limit !== undefined) { + localVarQueryParameter['limit'] = limit; + } + + if (cursor !== undefined) { + localVarQueryParameter['cursor'] = cursor; + } + + if (viewerFid !== undefined) { + localVarQueryParameter['viewer_fid'] = viewerFid; + } + + if (timeWindow !== undefined) { + localVarQueryParameter['time_window'] = timeWindow; + } + + if (channelId !== undefined) { + localVarQueryParameter['channel_id'] = channelId; + } + + if (provider !== undefined) { + localVarQueryParameter['provider'] = provider; + } + + if (providerMetadata !== undefined) { + localVarQueryParameter['provider_metadata'] = providerMetadata; + } + + + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * Fetch casts for a given user FID in reverse chronological order. Also allows filtering by parent_url and channel + * @summary Chronologically + * @param {number} fid FID of user whose recent casts you want to fetch + * @param {number} [viewerFid] FID of the user viewing the feed + * @param {number} [limit] Number of results to fetch + * @param {string} [cursor] Pagination cursor + * @param {boolean} [includeReplies] Include reply casts by the author in the response, true by default + * @param {string} [parentUrl] Parent URL to filter the feed; mutually exclusive with channel_id + * @param {string} [channelId] Channel ID to filter the feed; mutually exclusive with parent_url + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + feedUserCasts: async (fid: number, viewerFid?: number, limit?: number, cursor?: string, includeReplies?: boolean, parentUrl?: string, channelId?: string, options: RawAxiosRequestConfig = {}): Promise => { + // verify required parameter 'fid' is not null or undefined + assertParamExists('feedUserCasts', 'fid', fid) + const localVarPath = `/farcaster/feed/user/casts`; + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication ApiKeyAuth required + await setApiKeyToObject(localVarHeaderParameter, "x-api-key", configuration) + + if (fid !== undefined) { + localVarQueryParameter['fid'] = fid; + } + + if (viewerFid !== undefined) { + localVarQueryParameter['viewer_fid'] = viewerFid; + } + + if (limit !== undefined) { + localVarQueryParameter['limit'] = limit; + } + + if (cursor !== undefined) { + localVarQueryParameter['cursor'] = cursor; + } + + if (includeReplies !== undefined) { + localVarQueryParameter['include_replies'] = includeReplies; + } + + if (parentUrl !== undefined) { + localVarQueryParameter['parent_url'] = parentUrl; + } + + if (channelId !== undefined) { + localVarQueryParameter['channel_id'] = channelId; + } + + + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * Fetch 10 most popular casts for a given user FID; popularity based on replies, likes and recasts; sorted by most popular first + * @summary 10 most popular casts + * @param {number} fid FID of user whose feed you want to create + * @param {number} [viewerFid] + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + feedUserPopular: async (fid: number, viewerFid?: number, options: RawAxiosRequestConfig = {}): Promise => { + // verify required parameter 'fid' is not null or undefined + assertParamExists('feedUserPopular', 'fid', fid) + const localVarPath = `/farcaster/feed/user/popular`; + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication ApiKeyAuth required + await setApiKeyToObject(localVarHeaderParameter, "x-api-key", configuration) + + if (fid !== undefined) { + localVarQueryParameter['fid'] = fid; + } + + if (viewerFid !== undefined) { + localVarQueryParameter['viewer_fid'] = viewerFid; + } + + + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * Fetch recent replies and recasts for a given user FID; sorted by most recent first + * @summary Replies and recasts + * @param {number} fid FID of user whose replies and recasts you want to fetch + * @param {FeedUserRepliesRecastsFilterEnum} [filter] filter to fetch only replies or recasts + * @param {number} [limit] Number of results to fetch (default 25, max 100) + * @param {string} [cursor] Pagination cursor. + * @param {number} [viewerFid] Providing this will return a feed that respects this user\'s mutes and blocks and includes `viewer_context`. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + feedUserRepliesRecasts: async (fid: number, filter?: FeedUserRepliesRecastsFilterEnum, limit?: number, cursor?: string, viewerFid?: number, options: RawAxiosRequestConfig = {}): Promise => { + // verify required parameter 'fid' is not null or undefined + assertParamExists('feedUserRepliesRecasts', 'fid', fid) + const localVarPath = `/farcaster/feed/user/replies_and_recasts`; + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication ApiKeyAuth required + await setApiKeyToObject(localVarHeaderParameter, "x-api-key", configuration) + + if (fid !== undefined) { + localVarQueryParameter['fid'] = fid; + } + + if (filter !== undefined) { + localVarQueryParameter['filter'] = filter; + } + + if (limit !== undefined) { + localVarQueryParameter['limit'] = limit; + } + + if (cursor !== undefined) { + localVarQueryParameter['cursor'] = cursor; + } + + if (viewerFid !== undefined) { + localVarQueryParameter['viewer_fid'] = viewerFid; + } + + + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + } +}; + +/** + * FeedApi - functional programming interface + * @export + */ +export const FeedApiFp = function(configuration?: Configuration) { + const localVarAxiosParamCreator = FeedApiAxiosParamCreator(configuration) + return { + /** + * Fetch casts based on filters. Ensure setting the correct parameters based on the feed_type and filter_type. + * @summary By filters + * @param {FeedType} feedType Defaults to following (requires FID or address). If set to filter (requires filter_type) + * @param {FilterType} [filterType] Used when feed_type=filter. Can be set to FIDs (requires FIDs) or parent_url (requires parent_url) or channel_id (requires channel_id) + * @param {number} [fid] (Optional) FID of user whose feed you want to create. By default, the API expects this field, except if you pass a filter_type + * @param {string} [fids] Used when filter_type=FIDs . Create a feed based on a list of FIDs. Max array size is 250. Requires feed_type and filter_type. + * @param {string} [parentUrl] Used when filter_type=parent_url can be used to fetch content under any parent url e.g. FIP-2 channels on Warpcast. Requires feed_type and filter_type + * @param {string} [channelId] Used when filter_type=channel_id can be used to fetch casts under a channel. Requires feed_type and filter_type. + * @param {boolean} [membersOnly] Used when filter_type=channel_id. Only include casts from members of the channel. True by default. + * @param {string} [embedUrl] Used when filter_type=embed_url can be used to fetch all casts with an embed url that contains embed_url. Requires feed_type and filter_type + * @param {Array} [embedTypes] Used when filter_type=embed_types can be used to fetch all casts with matching content types. Requires feed_type and filter_type + * @param {boolean} [withRecasts] Include recasts in the response, true by default + * @param {number} [limit] Number of results to fetch (default 25, max 100) + * @param {string} [cursor] Pagination cursor. + * @param {number} [viewerFid] Providing this will return a feed that respects this user\'s mutes and blocks and includes `viewer_context`. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async feed(feedType: FeedType, filterType?: FilterType, fid?: number, fids?: string, parentUrl?: string, channelId?: string, membersOnly?: boolean, embedUrl?: string, embedTypes?: Array, withRecasts?: boolean, limit?: number, cursor?: string, viewerFid?: number, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.feed(feedType, filterType, fid, fids, parentUrl, channelId, membersOnly, embedUrl, embedTypes, withRecasts, limit, cursor, viewerFid, options); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = operationServerMap['FeedApi.feed']?.[localVarOperationServerIndex]?.url; + return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); + }, + /** + * Fetch feed based on channel IDs + * @summary By channel IDs + * @param {string} channelIds Comma separated list of channel IDs e.g. neynar,farcaster + * @param {boolean} [withRecasts] Include recasts in the response, true by default + * @param {number} [viewerFid] Providing this will return a feed that respects this user\'s mutes and blocks and includes `viewer_context`. + * @param {boolean} [withReplies] Include replies in the response, false by default + * @param {boolean} [membersOnly] Only include casts from members of the channel. True by default. + * @param {number} [limit] Number of results to fetch (default 25, max 100) + * @param {string} [cursor] Pagination cursor. + * @param {boolean} [shouldModerate] If true, only casts that have been liked by the moderator (if one exists) will be returned. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async feedChannels(channelIds: string, withRecasts?: boolean, viewerFid?: number, withReplies?: boolean, membersOnly?: boolean, limit?: number, cursor?: string, shouldModerate?: boolean, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.feedChannels(channelIds, withRecasts, viewerFid, withReplies, membersOnly, limit, cursor, shouldModerate, options); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = operationServerMap['FeedApi.feedChannels']?.[localVarOperationServerIndex]?.url; + return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); + }, + /** + * Fetch feed based on who a user is following + * @summary Following + * @param {number} fid FID of user whose feed you want to create + * @param {number} [viewerFid] Providing this will return a feed that respects this user\'s mutes and blocks and includes `viewer_context`. + * @param {boolean} [withRecasts] Include recasts in the response, true by default + * @param {number} [limit] Number of results to fetch (default 25, max 100) + * @param {string} [cursor] Pagination cursor. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async feedFollowing(fid: number, viewerFid?: number, withRecasts?: boolean, limit?: number, cursor?: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.feedFollowing(fid, viewerFid, withRecasts, limit, cursor, options); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = operationServerMap['FeedApi.feedFollowing']?.[localVarOperationServerIndex]?.url; + return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); + }, + /** + * Fetch a personalized For You feed for a user + * @summary For you + * @param {number} fid FID of user whose feed you want to create + * @param {number} [viewerFid] Providing this will return a feed that respects this user\'s mutes and blocks and includes `viewer_context`. + * @param {ForYouProvider} [provider] + * @param {number} [limit] Number of results to fetch (default 25, max 50) + * @param {string} [cursor] Pagination cursor. + * @param {string} [providerMetadata] provider_metadata is a URI-encoded stringified JSON object that can be used to pass additional metadata to the provider. Only available for mbd provider right now. See [here](https://docs.neynar.com/docs/feed-for-you-w-external-providers) on how to use. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async feedForYou(fid: number, viewerFid?: number, provider?: ForYouProvider, limit?: number, cursor?: string, providerMetadata?: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.feedForYou(fid, viewerFid, provider, limit, cursor, providerMetadata, options); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = operationServerMap['FeedApi.feedForYou']?.[localVarOperationServerIndex]?.url; + return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); + }, + /** + * Fetch feed of casts with Frames, reverse chronological order + * @summary Casts with Frames + * @param {number} [limit] Number of results to fetch (default 25, max 100) + * @param {number} [viewerFid] Providing this will return a feed that respects this user\'s mutes and blocks and includes `viewer_context`. + * @param {string} [cursor] Pagination cursor. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async feedFrames(limit?: number, viewerFid?: number, cursor?: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.feedFrames(limit, viewerFid, cursor, options); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = operationServerMap['FeedApi.feedFrames']?.[localVarOperationServerIndex]?.url; + return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); + }, + /** + * Fetch feed based on parent URLs + * @summary By parent URLs + * @param {string} parentUrls Comma separated list of parent_urls + * @param {boolean} [withRecasts] Include recasts in the response, true by default + * @param {number} [viewerFid] Providing this will return a feed that respects this user\'s mutes and blocks and includes `viewer_context`. + * @param {boolean} [withReplies] Include replies in the response, false by default + * @param {number} [limit] Number of results to fetch (default 25, max 100) + * @param {string} [cursor] Pagination cursor. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async feedParentUrls(parentUrls: string, withRecasts?: boolean, viewerFid?: number, withReplies?: boolean, limit?: number, cursor?: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.feedParentUrls(parentUrls, withRecasts, viewerFid, withReplies, limit, cursor, options); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = operationServerMap['FeedApi.feedParentUrls']?.[localVarOperationServerIndex]?.url; + return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); + }, + /** + * Fetch trending casts or on the global feed or channels feeds. 7d time window available for channel feeds only. + * @summary Trending casts + * @param {number} [limit] Number of results to fetch (max 10) + * @param {string} [cursor] Pagination cursor + * @param {number} [viewerFid] Providing this will return a feed that respects this user\'s mutes and blocks and includes `viewer_context`. + * @param {FeedTrendingTimeWindowEnum} [timeWindow] Time window for trending casts (7d window for channel feeds only) + * @param {string} [channelId] Channel ID to filter trending casts. Less active channels might have no casts in the time window selected. + * @param {FeedTrendingProvider} [provider] The provider of the trending casts feed. + * @param {string} [providerMetadata] provider_metadata is a URI-encoded stringified JSON object that can be used to pass additional metadata to the provider. Only available for mbd provider right now. See [here](https://docs.neynar.com/docs/feed-for-you-w-external-providers) on how to use. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async feedTrending(limit?: number, cursor?: string, viewerFid?: number, timeWindow?: FeedTrendingTimeWindowEnum, channelId?: string, provider?: FeedTrendingProvider, providerMetadata?: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.feedTrending(limit, cursor, viewerFid, timeWindow, channelId, provider, providerMetadata, options); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = operationServerMap['FeedApi.feedTrending']?.[localVarOperationServerIndex]?.url; + return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); + }, + /** + * Fetch casts for a given user FID in reverse chronological order. Also allows filtering by parent_url and channel + * @summary Chronologically + * @param {number} fid FID of user whose recent casts you want to fetch + * @param {number} [viewerFid] FID of the user viewing the feed + * @param {number} [limit] Number of results to fetch + * @param {string} [cursor] Pagination cursor + * @param {boolean} [includeReplies] Include reply casts by the author in the response, true by default + * @param {string} [parentUrl] Parent URL to filter the feed; mutually exclusive with channel_id + * @param {string} [channelId] Channel ID to filter the feed; mutually exclusive with parent_url + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async feedUserCasts(fid: number, viewerFid?: number, limit?: number, cursor?: string, includeReplies?: boolean, parentUrl?: string, channelId?: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.feedUserCasts(fid, viewerFid, limit, cursor, includeReplies, parentUrl, channelId, options); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = operationServerMap['FeedApi.feedUserCasts']?.[localVarOperationServerIndex]?.url; + return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); + }, + /** + * Fetch 10 most popular casts for a given user FID; popularity based on replies, likes and recasts; sorted by most popular first + * @summary 10 most popular casts + * @param {number} fid FID of user whose feed you want to create + * @param {number} [viewerFid] + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async feedUserPopular(fid: number, viewerFid?: number, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.feedUserPopular(fid, viewerFid, options); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = operationServerMap['FeedApi.feedUserPopular']?.[localVarOperationServerIndex]?.url; + return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); + }, + /** + * Fetch recent replies and recasts for a given user FID; sorted by most recent first + * @summary Replies and recasts + * @param {number} fid FID of user whose replies and recasts you want to fetch + * @param {FeedUserRepliesRecastsFilterEnum} [filter] filter to fetch only replies or recasts + * @param {number} [limit] Number of results to fetch (default 25, max 100) + * @param {string} [cursor] Pagination cursor. + * @param {number} [viewerFid] Providing this will return a feed that respects this user\'s mutes and blocks and includes `viewer_context`. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async feedUserRepliesRecasts(fid: number, filter?: FeedUserRepliesRecastsFilterEnum, limit?: number, cursor?: string, viewerFid?: number, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.feedUserRepliesRecasts(fid, filter, limit, cursor, viewerFid, options); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = operationServerMap['FeedApi.feedUserRepliesRecasts']?.[localVarOperationServerIndex]?.url; + return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); + }, + } +}; + +/** + * FeedApi - factory interface + * @export + */ +export const FeedApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) { + const localVarFp = FeedApiFp(configuration) + return { + /** + * Fetch casts based on filters. Ensure setting the correct parameters based on the feed_type and filter_type. + * @summary By filters + * @param {FeedType} feedType Defaults to following (requires FID or address). If set to filter (requires filter_type) + * @param {FilterType} [filterType] Used when feed_type=filter. Can be set to FIDs (requires FIDs) or parent_url (requires parent_url) or channel_id (requires channel_id) + * @param {number} [fid] (Optional) FID of user whose feed you want to create. By default, the API expects this field, except if you pass a filter_type + * @param {string} [fids] Used when filter_type=FIDs . Create a feed based on a list of FIDs. Max array size is 250. Requires feed_type and filter_type. + * @param {string} [parentUrl] Used when filter_type=parent_url can be used to fetch content under any parent url e.g. FIP-2 channels on Warpcast. Requires feed_type and filter_type + * @param {string} [channelId] Used when filter_type=channel_id can be used to fetch casts under a channel. Requires feed_type and filter_type. + * @param {boolean} [membersOnly] Used when filter_type=channel_id. Only include casts from members of the channel. True by default. + * @param {string} [embedUrl] Used when filter_type=embed_url can be used to fetch all casts with an embed url that contains embed_url. Requires feed_type and filter_type + * @param {Array} [embedTypes] Used when filter_type=embed_types can be used to fetch all casts with matching content types. Requires feed_type and filter_type + * @param {boolean} [withRecasts] Include recasts in the response, true by default + * @param {number} [limit] Number of results to fetch (default 25, max 100) + * @param {string} [cursor] Pagination cursor. + * @param {number} [viewerFid] Providing this will return a feed that respects this user\'s mutes and blocks and includes `viewer_context`. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + feed(feedType: FeedType, filterType?: FilterType, fid?: number, fids?: string, parentUrl?: string, channelId?: string, membersOnly?: boolean, embedUrl?: string, embedTypes?: Array, withRecasts?: boolean, limit?: number, cursor?: string, viewerFid?: number, options?: RawAxiosRequestConfig): AxiosPromise { + return localVarFp.feed(feedType, filterType, fid, fids, parentUrl, channelId, membersOnly, embedUrl, embedTypes, withRecasts, limit, cursor, viewerFid, options).then((request) => request(axios, basePath)); + }, + /** + * Fetch feed based on channel IDs + * @summary By channel IDs + * @param {string} channelIds Comma separated list of channel IDs e.g. neynar,farcaster + * @param {boolean} [withRecasts] Include recasts in the response, true by default + * @param {number} [viewerFid] Providing this will return a feed that respects this user\'s mutes and blocks and includes `viewer_context`. + * @param {boolean} [withReplies] Include replies in the response, false by default + * @param {boolean} [membersOnly] Only include casts from members of the channel. True by default. + * @param {number} [limit] Number of results to fetch (default 25, max 100) + * @param {string} [cursor] Pagination cursor. + * @param {boolean} [shouldModerate] If true, only casts that have been liked by the moderator (if one exists) will be returned. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + feedChannels(channelIds: string, withRecasts?: boolean, viewerFid?: number, withReplies?: boolean, membersOnly?: boolean, limit?: number, cursor?: string, shouldModerate?: boolean, options?: RawAxiosRequestConfig): AxiosPromise { + return localVarFp.feedChannels(channelIds, withRecasts, viewerFid, withReplies, membersOnly, limit, cursor, shouldModerate, options).then((request) => request(axios, basePath)); + }, + /** + * Fetch feed based on who a user is following + * @summary Following + * @param {number} fid FID of user whose feed you want to create + * @param {number} [viewerFid] Providing this will return a feed that respects this user\'s mutes and blocks and includes `viewer_context`. + * @param {boolean} [withRecasts] Include recasts in the response, true by default + * @param {number} [limit] Number of results to fetch (default 25, max 100) + * @param {string} [cursor] Pagination cursor. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + feedFollowing(fid: number, viewerFid?: number, withRecasts?: boolean, limit?: number, cursor?: string, options?: RawAxiosRequestConfig): AxiosPromise { + return localVarFp.feedFollowing(fid, viewerFid, withRecasts, limit, cursor, options).then((request) => request(axios, basePath)); + }, + /** + * Fetch a personalized For You feed for a user + * @summary For you + * @param {number} fid FID of user whose feed you want to create + * @param {number} [viewerFid] Providing this will return a feed that respects this user\'s mutes and blocks and includes `viewer_context`. + * @param {ForYouProvider} [provider] + * @param {number} [limit] Number of results to fetch (default 25, max 50) + * @param {string} [cursor] Pagination cursor. + * @param {string} [providerMetadata] provider_metadata is a URI-encoded stringified JSON object that can be used to pass additional metadata to the provider. Only available for mbd provider right now. See [here](https://docs.neynar.com/docs/feed-for-you-w-external-providers) on how to use. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + feedForYou(fid: number, viewerFid?: number, provider?: ForYouProvider, limit?: number, cursor?: string, providerMetadata?: string, options?: RawAxiosRequestConfig): AxiosPromise { + return localVarFp.feedForYou(fid, viewerFid, provider, limit, cursor, providerMetadata, options).then((request) => request(axios, basePath)); + }, + /** + * Fetch feed of casts with Frames, reverse chronological order + * @summary Casts with Frames + * @param {number} [limit] Number of results to fetch (default 25, max 100) + * @param {number} [viewerFid] Providing this will return a feed that respects this user\'s mutes and blocks and includes `viewer_context`. + * @param {string} [cursor] Pagination cursor. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + feedFrames(limit?: number, viewerFid?: number, cursor?: string, options?: RawAxiosRequestConfig): AxiosPromise { + return localVarFp.feedFrames(limit, viewerFid, cursor, options).then((request) => request(axios, basePath)); + }, + /** + * Fetch feed based on parent URLs + * @summary By parent URLs + * @param {string} parentUrls Comma separated list of parent_urls + * @param {boolean} [withRecasts] Include recasts in the response, true by default + * @param {number} [viewerFid] Providing this will return a feed that respects this user\'s mutes and blocks and includes `viewer_context`. + * @param {boolean} [withReplies] Include replies in the response, false by default + * @param {number} [limit] Number of results to fetch (default 25, max 100) + * @param {string} [cursor] Pagination cursor. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + feedParentUrls(parentUrls: string, withRecasts?: boolean, viewerFid?: number, withReplies?: boolean, limit?: number, cursor?: string, options?: RawAxiosRequestConfig): AxiosPromise { + return localVarFp.feedParentUrls(parentUrls, withRecasts, viewerFid, withReplies, limit, cursor, options).then((request) => request(axios, basePath)); + }, + /** + * Fetch trending casts or on the global feed or channels feeds. 7d time window available for channel feeds only. + * @summary Trending casts + * @param {number} [limit] Number of results to fetch (max 10) + * @param {string} [cursor] Pagination cursor + * @param {number} [viewerFid] Providing this will return a feed that respects this user\'s mutes and blocks and includes `viewer_context`. + * @param {FeedTrendingTimeWindowEnum} [timeWindow] Time window for trending casts (7d window for channel feeds only) + * @param {string} [channelId] Channel ID to filter trending casts. Less active channels might have no casts in the time window selected. + * @param {FeedTrendingProvider} [provider] The provider of the trending casts feed. + * @param {string} [providerMetadata] provider_metadata is a URI-encoded stringified JSON object that can be used to pass additional metadata to the provider. Only available for mbd provider right now. See [here](https://docs.neynar.com/docs/feed-for-you-w-external-providers) on how to use. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + feedTrending(limit?: number, cursor?: string, viewerFid?: number, timeWindow?: FeedTrendingTimeWindowEnum, channelId?: string, provider?: FeedTrendingProvider, providerMetadata?: string, options?: RawAxiosRequestConfig): AxiosPromise { + return localVarFp.feedTrending(limit, cursor, viewerFid, timeWindow, channelId, provider, providerMetadata, options).then((request) => request(axios, basePath)); + }, + /** + * Fetch casts for a given user FID in reverse chronological order. Also allows filtering by parent_url and channel + * @summary Chronologically + * @param {number} fid FID of user whose recent casts you want to fetch + * @param {number} [viewerFid] FID of the user viewing the feed + * @param {number} [limit] Number of results to fetch + * @param {string} [cursor] Pagination cursor + * @param {boolean} [includeReplies] Include reply casts by the author in the response, true by default + * @param {string} [parentUrl] Parent URL to filter the feed; mutually exclusive with channel_id + * @param {string} [channelId] Channel ID to filter the feed; mutually exclusive with parent_url + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + feedUserCasts(fid: number, viewerFid?: number, limit?: number, cursor?: string, includeReplies?: boolean, parentUrl?: string, channelId?: string, options?: RawAxiosRequestConfig): AxiosPromise { + return localVarFp.feedUserCasts(fid, viewerFid, limit, cursor, includeReplies, parentUrl, channelId, options).then((request) => request(axios, basePath)); + }, + /** + * Fetch 10 most popular casts for a given user FID; popularity based on replies, likes and recasts; sorted by most popular first + * @summary 10 most popular casts + * @param {number} fid FID of user whose feed you want to create + * @param {number} [viewerFid] + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + feedUserPopular(fid: number, viewerFid?: number, options?: RawAxiosRequestConfig): AxiosPromise { + return localVarFp.feedUserPopular(fid, viewerFid, options).then((request) => request(axios, basePath)); + }, + /** + * Fetch recent replies and recasts for a given user FID; sorted by most recent first + * @summary Replies and recasts + * @param {number} fid FID of user whose replies and recasts you want to fetch + * @param {FeedUserRepliesRecastsFilterEnum} [filter] filter to fetch only replies or recasts + * @param {number} [limit] Number of results to fetch (default 25, max 100) + * @param {string} [cursor] Pagination cursor. + * @param {number} [viewerFid] Providing this will return a feed that respects this user\'s mutes and blocks and includes `viewer_context`. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + feedUserRepliesRecasts(fid: number, filter?: FeedUserRepliesRecastsFilterEnum, limit?: number, cursor?: string, viewerFid?: number, options?: RawAxiosRequestConfig): AxiosPromise { + return localVarFp.feedUserRepliesRecasts(fid, filter, limit, cursor, viewerFid, options).then((request) => request(axios, basePath)); + }, + }; +}; + +/** + * FeedApi - object-oriented interface + * @export + * @class FeedApi + * @extends {BaseAPI} + */ +export class FeedApi extends BaseAPI { + /** + * Fetch casts based on filters. Ensure setting the correct parameters based on the feed_type and filter_type. + * @summary By filters + * @param {FeedType} feedType Defaults to following (requires FID or address). If set to filter (requires filter_type) + * @param {FilterType} [filterType] Used when feed_type=filter. Can be set to FIDs (requires FIDs) or parent_url (requires parent_url) or channel_id (requires channel_id) + * @param {number} [fid] (Optional) FID of user whose feed you want to create. By default, the API expects this field, except if you pass a filter_type + * @param {string} [fids] Used when filter_type=FIDs . Create a feed based on a list of FIDs. Max array size is 250. Requires feed_type and filter_type. + * @param {string} [parentUrl] Used when filter_type=parent_url can be used to fetch content under any parent url e.g. FIP-2 channels on Warpcast. Requires feed_type and filter_type + * @param {string} [channelId] Used when filter_type=channel_id can be used to fetch casts under a channel. Requires feed_type and filter_type. + * @param {boolean} [membersOnly] Used when filter_type=channel_id. Only include casts from members of the channel. True by default. + * @param {string} [embedUrl] Used when filter_type=embed_url can be used to fetch all casts with an embed url that contains embed_url. Requires feed_type and filter_type + * @param {Array} [embedTypes] Used when filter_type=embed_types can be used to fetch all casts with matching content types. Requires feed_type and filter_type + * @param {boolean} [withRecasts] Include recasts in the response, true by default + * @param {number} [limit] Number of results to fetch (default 25, max 100) + * @param {string} [cursor] Pagination cursor. + * @param {number} [viewerFid] Providing this will return a feed that respects this user\'s mutes and blocks and includes `viewer_context`. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof FeedApi + */ + public feed(feedType: FeedType, filterType?: FilterType, fid?: number, fids?: string, parentUrl?: string, channelId?: string, membersOnly?: boolean, embedUrl?: string, embedTypes?: Array, withRecasts?: boolean, limit?: number, cursor?: string, viewerFid?: number, options?: RawAxiosRequestConfig) { + return FeedApiFp(this.configuration).feed(feedType, filterType, fid, fids, parentUrl, channelId, membersOnly, embedUrl, embedTypes, withRecasts, limit, cursor, viewerFid, options).then((request) => request(this.axios, this.basePath)); + } + + /** + * Fetch feed based on channel IDs + * @summary By channel IDs + * @param {string} channelIds Comma separated list of channel IDs e.g. neynar,farcaster + * @param {boolean} [withRecasts] Include recasts in the response, true by default + * @param {number} [viewerFid] Providing this will return a feed that respects this user\'s mutes and blocks and includes `viewer_context`. + * @param {boolean} [withReplies] Include replies in the response, false by default + * @param {boolean} [membersOnly] Only include casts from members of the channel. True by default. + * @param {number} [limit] Number of results to fetch (default 25, max 100) + * @param {string} [cursor] Pagination cursor. + * @param {boolean} [shouldModerate] If true, only casts that have been liked by the moderator (if one exists) will be returned. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof FeedApi + */ + public feedChannels(channelIds: string, withRecasts?: boolean, viewerFid?: number, withReplies?: boolean, membersOnly?: boolean, limit?: number, cursor?: string, shouldModerate?: boolean, options?: RawAxiosRequestConfig) { + return FeedApiFp(this.configuration).feedChannels(channelIds, withRecasts, viewerFid, withReplies, membersOnly, limit, cursor, shouldModerate, options).then((request) => request(this.axios, this.basePath)); + } + + /** + * Fetch feed based on who a user is following + * @summary Following + * @param {number} fid FID of user whose feed you want to create + * @param {number} [viewerFid] Providing this will return a feed that respects this user\'s mutes and blocks and includes `viewer_context`. + * @param {boolean} [withRecasts] Include recasts in the response, true by default + * @param {number} [limit] Number of results to fetch (default 25, max 100) + * @param {string} [cursor] Pagination cursor. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof FeedApi + */ + public feedFollowing(fid: number, viewerFid?: number, withRecasts?: boolean, limit?: number, cursor?: string, options?: RawAxiosRequestConfig) { + return FeedApiFp(this.configuration).feedFollowing(fid, viewerFid, withRecasts, limit, cursor, options).then((request) => request(this.axios, this.basePath)); + } + + /** + * Fetch a personalized For You feed for a user + * @summary For you + * @param {number} fid FID of user whose feed you want to create + * @param {number} [viewerFid] Providing this will return a feed that respects this user\'s mutes and blocks and includes `viewer_context`. + * @param {ForYouProvider} [provider] + * @param {number} [limit] Number of results to fetch (default 25, max 50) + * @param {string} [cursor] Pagination cursor. + * @param {string} [providerMetadata] provider_metadata is a URI-encoded stringified JSON object that can be used to pass additional metadata to the provider. Only available for mbd provider right now. See [here](https://docs.neynar.com/docs/feed-for-you-w-external-providers) on how to use. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof FeedApi + */ + public feedForYou(fid: number, viewerFid?: number, provider?: ForYouProvider, limit?: number, cursor?: string, providerMetadata?: string, options?: RawAxiosRequestConfig) { + return FeedApiFp(this.configuration).feedForYou(fid, viewerFid, provider, limit, cursor, providerMetadata, options).then((request) => request(this.axios, this.basePath)); + } + + /** + * Fetch feed of casts with Frames, reverse chronological order + * @summary Casts with Frames + * @param {number} [limit] Number of results to fetch (default 25, max 100) + * @param {number} [viewerFid] Providing this will return a feed that respects this user\'s mutes and blocks and includes `viewer_context`. + * @param {string} [cursor] Pagination cursor. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof FeedApi + */ + public feedFrames(limit?: number, viewerFid?: number, cursor?: string, options?: RawAxiosRequestConfig) { + return FeedApiFp(this.configuration).feedFrames(limit, viewerFid, cursor, options).then((request) => request(this.axios, this.basePath)); + } + + /** + * Fetch feed based on parent URLs + * @summary By parent URLs + * @param {string} parentUrls Comma separated list of parent_urls + * @param {boolean} [withRecasts] Include recasts in the response, true by default + * @param {number} [viewerFid] Providing this will return a feed that respects this user\'s mutes and blocks and includes `viewer_context`. + * @param {boolean} [withReplies] Include replies in the response, false by default + * @param {number} [limit] Number of results to fetch (default 25, max 100) + * @param {string} [cursor] Pagination cursor. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof FeedApi + */ + public feedParentUrls(parentUrls: string, withRecasts?: boolean, viewerFid?: number, withReplies?: boolean, limit?: number, cursor?: string, options?: RawAxiosRequestConfig) { + return FeedApiFp(this.configuration).feedParentUrls(parentUrls, withRecasts, viewerFid, withReplies, limit, cursor, options).then((request) => request(this.axios, this.basePath)); + } + + /** + * Fetch trending casts or on the global feed or channels feeds. 7d time window available for channel feeds only. + * @summary Trending casts + * @param {number} [limit] Number of results to fetch (max 10) + * @param {string} [cursor] Pagination cursor + * @param {number} [viewerFid] Providing this will return a feed that respects this user\'s mutes and blocks and includes `viewer_context`. + * @param {FeedTrendingTimeWindowEnum} [timeWindow] Time window for trending casts (7d window for channel feeds only) + * @param {string} [channelId] Channel ID to filter trending casts. Less active channels might have no casts in the time window selected. + * @param {FeedTrendingProvider} [provider] The provider of the trending casts feed. + * @param {string} [providerMetadata] provider_metadata is a URI-encoded stringified JSON object that can be used to pass additional metadata to the provider. Only available for mbd provider right now. See [here](https://docs.neynar.com/docs/feed-for-you-w-external-providers) on how to use. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof FeedApi + */ + public feedTrending(limit?: number, cursor?: string, viewerFid?: number, timeWindow?: FeedTrendingTimeWindowEnum, channelId?: string, provider?: FeedTrendingProvider, providerMetadata?: string, options?: RawAxiosRequestConfig) { + return FeedApiFp(this.configuration).feedTrending(limit, cursor, viewerFid, timeWindow, channelId, provider, providerMetadata, options).then((request) => request(this.axios, this.basePath)); + } + + /** + * Fetch casts for a given user FID in reverse chronological order. Also allows filtering by parent_url and channel + * @summary Chronologically + * @param {number} fid FID of user whose recent casts you want to fetch + * @param {number} [viewerFid] FID of the user viewing the feed + * @param {number} [limit] Number of results to fetch + * @param {string} [cursor] Pagination cursor + * @param {boolean} [includeReplies] Include reply casts by the author in the response, true by default + * @param {string} [parentUrl] Parent URL to filter the feed; mutually exclusive with channel_id + * @param {string} [channelId] Channel ID to filter the feed; mutually exclusive with parent_url + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof FeedApi + */ + public feedUserCasts(fid: number, viewerFid?: number, limit?: number, cursor?: string, includeReplies?: boolean, parentUrl?: string, channelId?: string, options?: RawAxiosRequestConfig) { + return FeedApiFp(this.configuration).feedUserCasts(fid, viewerFid, limit, cursor, includeReplies, parentUrl, channelId, options).then((request) => request(this.axios, this.basePath)); + } + + /** + * Fetch 10 most popular casts for a given user FID; popularity based on replies, likes and recasts; sorted by most popular first + * @summary 10 most popular casts + * @param {number} fid FID of user whose feed you want to create + * @param {number} [viewerFid] + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof FeedApi + */ + public feedUserPopular(fid: number, viewerFid?: number, options?: RawAxiosRequestConfig) { + return FeedApiFp(this.configuration).feedUserPopular(fid, viewerFid, options).then((request) => request(this.axios, this.basePath)); + } + + /** + * Fetch recent replies and recasts for a given user FID; sorted by most recent first + * @summary Replies and recasts + * @param {number} fid FID of user whose replies and recasts you want to fetch + * @param {FeedUserRepliesRecastsFilterEnum} [filter] filter to fetch only replies or recasts + * @param {number} [limit] Number of results to fetch (default 25, max 100) + * @param {string} [cursor] Pagination cursor. + * @param {number} [viewerFid] Providing this will return a feed that respects this user\'s mutes and blocks and includes `viewer_context`. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof FeedApi + */ + public feedUserRepliesRecasts(fid: number, filter?: FeedUserRepliesRecastsFilterEnum, limit?: number, cursor?: string, viewerFid?: number, options?: RawAxiosRequestConfig) { + return FeedApiFp(this.configuration).feedUserRepliesRecasts(fid, filter, limit, cursor, viewerFid, options).then((request) => request(this.axios, this.basePath)); + } +} + +/** + * @export + */ +export const FeedTrendingTimeWindowEnum = { + _1h: '1h', + _6h: '6h', + _12h: '12h', + _24h: '24h', + _7d: '7d' +} as const; +export type FeedTrendingTimeWindowEnum = typeof FeedTrendingTimeWindowEnum[keyof typeof FeedTrendingTimeWindowEnum]; +/** + * @export + */ +export const FeedUserRepliesRecastsFilterEnum = { + Replies: 'replies', + Recasts: 'recasts', + All: 'all' +} as const; +export type FeedUserRepliesRecastsFilterEnum = typeof FeedUserRepliesRecastsFilterEnum[keyof typeof FeedUserRepliesRecastsFilterEnum]; diff --git a/src/neynar-api/v2/openapi-farcaster/apis/fname-api.ts b/src/neynar-api/v2/openapi-farcaster/apis/fname-api.ts new file mode 100644 index 00000000..88dc4acc --- /dev/null +++ b/src/neynar-api/v2/openapi-farcaster/apis/fname-api.ts @@ -0,0 +1,139 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Farcaster API V2 + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +import type { Configuration } from '../configuration'; +import type { AxiosPromise, AxiosInstance, RawAxiosRequestConfig } from 'axios'; +import globalAxios from 'axios'; +// Some imports not used depending on template conditions +// @ts-ignore +import { DUMMY_BASE_URL, assertParamExists, setApiKeyToObject, setBasicAuthToObject, setBearerAuthToObject, setOAuthToObject, setSearchParams, serializeDataIfNeeded, toPathString, createRequestFunction } from '../common'; +// @ts-ignore +import { BASE_PATH, COLLECTION_FORMATS, type RequestArgs, BaseAPI, RequiredError, operationServerMap } from '../base'; +// @ts-ignore +import type { ErrorRes } from '../models'; +// @ts-ignore +import type { FnameAvailabilityResponse } from '../models'; +/** + * FnameApi - axios parameter creator + * @export + */ +export const FnameApiAxiosParamCreator = function (configuration?: Configuration) { + return { + /** + * Check if a given fname is available + * @summary Check fname availability + * @param {string} fname + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + fnameAvailability: async (fname: string, options: RawAxiosRequestConfig = {}): Promise => { + // verify required parameter 'fname' is not null or undefined + assertParamExists('fnameAvailability', 'fname', fname) + const localVarPath = `/farcaster/fname/availability`; + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication ApiKeyAuth required + await setApiKeyToObject(localVarHeaderParameter, "x-api-key", configuration) + + if (fname !== undefined) { + localVarQueryParameter['fname'] = fname; + } + + + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + } +}; + +/** + * FnameApi - functional programming interface + * @export + */ +export const FnameApiFp = function(configuration?: Configuration) { + const localVarAxiosParamCreator = FnameApiAxiosParamCreator(configuration) + return { + /** + * Check if a given fname is available + * @summary Check fname availability + * @param {string} fname + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async fnameAvailability(fname: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.fnameAvailability(fname, options); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = operationServerMap['FnameApi.fnameAvailability']?.[localVarOperationServerIndex]?.url; + return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); + }, + } +}; + +/** + * FnameApi - factory interface + * @export + */ +export const FnameApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) { + const localVarFp = FnameApiFp(configuration) + return { + /** + * Check if a given fname is available + * @summary Check fname availability + * @param {string} fname + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + fnameAvailability(fname: string, options?: RawAxiosRequestConfig): AxiosPromise { + return localVarFp.fnameAvailability(fname, options).then((request) => request(axios, basePath)); + }, + }; +}; + +/** + * FnameApi - object-oriented interface + * @export + * @class FnameApi + * @extends {BaseAPI} + */ +export class FnameApi extends BaseAPI { + /** + * Check if a given fname is available + * @summary Check fname availability + * @param {string} fname + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof FnameApi + */ + public fnameAvailability(fname: string, options?: RawAxiosRequestConfig) { + return FnameApiFp(this.configuration).fnameAvailability(fname, options).then((request) => request(this.axios, this.basePath)); + } +} + diff --git a/src/neynar-api/v2/openapi-farcaster/apis/follows-api.ts b/src/neynar-api/v2/openapi-farcaster/apis/follows-api.ts new file mode 100644 index 00000000..87aba065 --- /dev/null +++ b/src/neynar-api/v2/openapi-farcaster/apis/follows-api.ts @@ -0,0 +1,460 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Farcaster API V2 + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +import type { Configuration } from '../configuration'; +import type { AxiosPromise, AxiosInstance, RawAxiosRequestConfig } from 'axios'; +import globalAxios from 'axios'; +// Some imports not used depending on template conditions +// @ts-ignore +import { DUMMY_BASE_URL, assertParamExists, setApiKeyToObject, setBasicAuthToObject, setBearerAuthToObject, setOAuthToObject, setSearchParams, serializeDataIfNeeded, toPathString, createRequestFunction } from '../common'; +// @ts-ignore +import { BASE_PATH, COLLECTION_FORMATS, type RequestArgs, BaseAPI, RequiredError, operationServerMap } from '../base'; +// @ts-ignore +import type { ErrorRes } from '../models'; +// @ts-ignore +import type { FollowSortType } from '../models'; +// @ts-ignore +import type { FollowersResponse } from '../models'; +// @ts-ignore +import type { RelevantFollowersResponse } from '../models'; +// @ts-ignore +import type { UsersResponse } from '../models'; +/** + * FollowsApi - axios parameter creator + * @export + */ +export const FollowsApiAxiosParamCreator = function (configuration?: Configuration) { + return { + /** + * Returns a list of followers for a specific FID. + * @summary Followers + * @param {number} fid User who\'s profile you are looking at + * @param {number} [viewerFid] Providing this will return a list of followers that respects this user\'s mutes and blocks and includes `viewer_context`. + * @param {FollowSortType} [sortType] Sort type for fetch followers. Default is `desc_chron` + * @param {number} [limit] Number of results to fetch (default 20, max 100) + * @param {string} [cursor] Pagination cursor. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + followersV2: async (fid: number, viewerFid?: number, sortType?: FollowSortType, limit?: number, cursor?: string, options: RawAxiosRequestConfig = {}): Promise => { + // verify required parameter 'fid' is not null or undefined + assertParamExists('followersV2', 'fid', fid) + const localVarPath = `/farcaster/followers`; + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication ApiKeyAuth required + await setApiKeyToObject(localVarHeaderParameter, "x-api-key", configuration) + + if (fid !== undefined) { + localVarQueryParameter['fid'] = fid; + } + + if (viewerFid !== undefined) { + localVarQueryParameter['viewer_fid'] = viewerFid; + } + + if (sortType !== undefined) { + localVarQueryParameter['sort_type'] = sortType; + } + + if (limit !== undefined) { + localVarQueryParameter['limit'] = limit; + } + + if (cursor !== undefined) { + localVarQueryParameter['cursor'] = cursor; + } + + + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * Fetch a list of users followed by a user. Can optionally include a viewer_fid and sort_type. + * @summary Followed by + * @param {number} fid FID of the user whose following you want to fetch. + * @param {number} [viewerFid] Providing this will return a list of users that respects this user\'s mutes and blocks and includes `viewer_context`. + * @param {FollowSortType} [sortType] Optional parameter to sort the users based on different criteria. + * @param {number} [limit] Number of results to fetch (default 25, max 100) + * @param {string} [cursor] Pagination cursor. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + followingV2: async (fid: number, viewerFid?: number, sortType?: FollowSortType, limit?: number, cursor?: string, options: RawAxiosRequestConfig = {}): Promise => { + // verify required parameter 'fid' is not null or undefined + assertParamExists('followingV2', 'fid', fid) + const localVarPath = `/farcaster/following`; + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication ApiKeyAuth required + await setApiKeyToObject(localVarHeaderParameter, "x-api-key", configuration) + + if (fid !== undefined) { + localVarQueryParameter['fid'] = fid; + } + + if (viewerFid !== undefined) { + localVarQueryParameter['viewer_fid'] = viewerFid; + } + + if (sortType !== undefined) { + localVarQueryParameter['sort_type'] = sortType; + } + + if (limit !== undefined) { + localVarQueryParameter['limit'] = limit; + } + + if (cursor !== undefined) { + localVarQueryParameter['cursor'] = cursor; + } + + + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * Returns a list of relevant followers for a specific FID. This usually shows on a profile as \"X, Y and Z follow this user\". + * @summary Relevant followers + * @param {number} targetFid User who\'s profile you are looking at + * @param {number} viewerFid The FID of the user to customize this response for. Providing this will also return a list of followers that respects this user\'s mutes and blocks and includes `viewer_context`. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + relevantFollowers: async (targetFid: number, viewerFid: number, options: RawAxiosRequestConfig = {}): Promise => { + // verify required parameter 'targetFid' is not null or undefined + assertParamExists('relevantFollowers', 'targetFid', targetFid) + // verify required parameter 'viewerFid' is not null or undefined + assertParamExists('relevantFollowers', 'viewerFid', viewerFid) + const localVarPath = `/farcaster/followers/relevant`; + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication ApiKeyAuth required + await setApiKeyToObject(localVarHeaderParameter, "x-api-key", configuration) + + if (targetFid !== undefined) { + localVarQueryParameter['target_fid'] = targetFid; + } + + if (viewerFid !== undefined) { + localVarQueryParameter['viewer_fid'] = viewerFid; + } + + + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * Fetch a list of suggested users to follow. Used to help users discover new users to follow + * @summary Suggest Follows + * @param {number} fid FID of the user whose following you want to fetch. + * @param {number} [viewerFid] Providing this will return a list of users that respects this user\'s mutes and blocks and includes `viewer_context`. + * @param {number} [limit] Number of results to fetch (default 25, max 100) + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + suggestedFollows: async (fid: number, viewerFid?: number, limit?: number, options: RawAxiosRequestConfig = {}): Promise => { + // verify required parameter 'fid' is not null or undefined + assertParamExists('suggestedFollows', 'fid', fid) + const localVarPath = `/farcaster/following/suggested`; + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication ApiKeyAuth required + await setApiKeyToObject(localVarHeaderParameter, "x-api-key", configuration) + + if (fid !== undefined) { + localVarQueryParameter['fid'] = fid; + } + + if (viewerFid !== undefined) { + localVarQueryParameter['viewer_fid'] = viewerFid; + } + + if (limit !== undefined) { + localVarQueryParameter['limit'] = limit; + } + + + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + } +}; + +/** + * FollowsApi - functional programming interface + * @export + */ +export const FollowsApiFp = function(configuration?: Configuration) { + const localVarAxiosParamCreator = FollowsApiAxiosParamCreator(configuration) + return { + /** + * Returns a list of followers for a specific FID. + * @summary Followers + * @param {number} fid User who\'s profile you are looking at + * @param {number} [viewerFid] Providing this will return a list of followers that respects this user\'s mutes and blocks and includes `viewer_context`. + * @param {FollowSortType} [sortType] Sort type for fetch followers. Default is `desc_chron` + * @param {number} [limit] Number of results to fetch (default 20, max 100) + * @param {string} [cursor] Pagination cursor. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async followersV2(fid: number, viewerFid?: number, sortType?: FollowSortType, limit?: number, cursor?: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.followersV2(fid, viewerFid, sortType, limit, cursor, options); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = operationServerMap['FollowsApi.followersV2']?.[localVarOperationServerIndex]?.url; + return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); + }, + /** + * Fetch a list of users followed by a user. Can optionally include a viewer_fid and sort_type. + * @summary Followed by + * @param {number} fid FID of the user whose following you want to fetch. + * @param {number} [viewerFid] Providing this will return a list of users that respects this user\'s mutes and blocks and includes `viewer_context`. + * @param {FollowSortType} [sortType] Optional parameter to sort the users based on different criteria. + * @param {number} [limit] Number of results to fetch (default 25, max 100) + * @param {string} [cursor] Pagination cursor. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async followingV2(fid: number, viewerFid?: number, sortType?: FollowSortType, limit?: number, cursor?: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.followingV2(fid, viewerFid, sortType, limit, cursor, options); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = operationServerMap['FollowsApi.followingV2']?.[localVarOperationServerIndex]?.url; + return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); + }, + /** + * Returns a list of relevant followers for a specific FID. This usually shows on a profile as \"X, Y and Z follow this user\". + * @summary Relevant followers + * @param {number} targetFid User who\'s profile you are looking at + * @param {number} viewerFid The FID of the user to customize this response for. Providing this will also return a list of followers that respects this user\'s mutes and blocks and includes `viewer_context`. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async relevantFollowers(targetFid: number, viewerFid: number, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.relevantFollowers(targetFid, viewerFid, options); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = operationServerMap['FollowsApi.relevantFollowers']?.[localVarOperationServerIndex]?.url; + return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); + }, + /** + * Fetch a list of suggested users to follow. Used to help users discover new users to follow + * @summary Suggest Follows + * @param {number} fid FID of the user whose following you want to fetch. + * @param {number} [viewerFid] Providing this will return a list of users that respects this user\'s mutes and blocks and includes `viewer_context`. + * @param {number} [limit] Number of results to fetch (default 25, max 100) + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async suggestedFollows(fid: number, viewerFid?: number, limit?: number, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.suggestedFollows(fid, viewerFid, limit, options); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = operationServerMap['FollowsApi.suggestedFollows']?.[localVarOperationServerIndex]?.url; + return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); + }, + } +}; + +/** + * FollowsApi - factory interface + * @export + */ +export const FollowsApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) { + const localVarFp = FollowsApiFp(configuration) + return { + /** + * Returns a list of followers for a specific FID. + * @summary Followers + * @param {number} fid User who\'s profile you are looking at + * @param {number} [viewerFid] Providing this will return a list of followers that respects this user\'s mutes and blocks and includes `viewer_context`. + * @param {FollowSortType} [sortType] Sort type for fetch followers. Default is `desc_chron` + * @param {number} [limit] Number of results to fetch (default 20, max 100) + * @param {string} [cursor] Pagination cursor. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + followersV2(fid: number, viewerFid?: number, sortType?: FollowSortType, limit?: number, cursor?: string, options?: RawAxiosRequestConfig): AxiosPromise { + return localVarFp.followersV2(fid, viewerFid, sortType, limit, cursor, options).then((request) => request(axios, basePath)); + }, + /** + * Fetch a list of users followed by a user. Can optionally include a viewer_fid and sort_type. + * @summary Followed by + * @param {number} fid FID of the user whose following you want to fetch. + * @param {number} [viewerFid] Providing this will return a list of users that respects this user\'s mutes and blocks and includes `viewer_context`. + * @param {FollowSortType} [sortType] Optional parameter to sort the users based on different criteria. + * @param {number} [limit] Number of results to fetch (default 25, max 100) + * @param {string} [cursor] Pagination cursor. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + followingV2(fid: number, viewerFid?: number, sortType?: FollowSortType, limit?: number, cursor?: string, options?: RawAxiosRequestConfig): AxiosPromise { + return localVarFp.followingV2(fid, viewerFid, sortType, limit, cursor, options).then((request) => request(axios, basePath)); + }, + /** + * Returns a list of relevant followers for a specific FID. This usually shows on a profile as \"X, Y and Z follow this user\". + * @summary Relevant followers + * @param {number} targetFid User who\'s profile you are looking at + * @param {number} viewerFid The FID of the user to customize this response for. Providing this will also return a list of followers that respects this user\'s mutes and blocks and includes `viewer_context`. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + relevantFollowers(targetFid: number, viewerFid: number, options?: RawAxiosRequestConfig): AxiosPromise { + return localVarFp.relevantFollowers(targetFid, viewerFid, options).then((request) => request(axios, basePath)); + }, + /** + * Fetch a list of suggested users to follow. Used to help users discover new users to follow + * @summary Suggest Follows + * @param {number} fid FID of the user whose following you want to fetch. + * @param {number} [viewerFid] Providing this will return a list of users that respects this user\'s mutes and blocks and includes `viewer_context`. + * @param {number} [limit] Number of results to fetch (default 25, max 100) + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + suggestedFollows(fid: number, viewerFid?: number, limit?: number, options?: RawAxiosRequestConfig): AxiosPromise { + return localVarFp.suggestedFollows(fid, viewerFid, limit, options).then((request) => request(axios, basePath)); + }, + }; +}; + +/** + * FollowsApi - object-oriented interface + * @export + * @class FollowsApi + * @extends {BaseAPI} + */ +export class FollowsApi extends BaseAPI { + /** + * Returns a list of followers for a specific FID. + * @summary Followers + * @param {number} fid User who\'s profile you are looking at + * @param {number} [viewerFid] Providing this will return a list of followers that respects this user\'s mutes and blocks and includes `viewer_context`. + * @param {FollowSortType} [sortType] Sort type for fetch followers. Default is `desc_chron` + * @param {number} [limit] Number of results to fetch (default 20, max 100) + * @param {string} [cursor] Pagination cursor. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof FollowsApi + */ + public followersV2(fid: number, viewerFid?: number, sortType?: FollowSortType, limit?: number, cursor?: string, options?: RawAxiosRequestConfig) { + return FollowsApiFp(this.configuration).followersV2(fid, viewerFid, sortType, limit, cursor, options).then((request) => request(this.axios, this.basePath)); + } + + /** + * Fetch a list of users followed by a user. Can optionally include a viewer_fid and sort_type. + * @summary Followed by + * @param {number} fid FID of the user whose following you want to fetch. + * @param {number} [viewerFid] Providing this will return a list of users that respects this user\'s mutes and blocks and includes `viewer_context`. + * @param {FollowSortType} [sortType] Optional parameter to sort the users based on different criteria. + * @param {number} [limit] Number of results to fetch (default 25, max 100) + * @param {string} [cursor] Pagination cursor. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof FollowsApi + */ + public followingV2(fid: number, viewerFid?: number, sortType?: FollowSortType, limit?: number, cursor?: string, options?: RawAxiosRequestConfig) { + return FollowsApiFp(this.configuration).followingV2(fid, viewerFid, sortType, limit, cursor, options).then((request) => request(this.axios, this.basePath)); + } + + /** + * Returns a list of relevant followers for a specific FID. This usually shows on a profile as \"X, Y and Z follow this user\". + * @summary Relevant followers + * @param {number} targetFid User who\'s profile you are looking at + * @param {number} viewerFid The FID of the user to customize this response for. Providing this will also return a list of followers that respects this user\'s mutes and blocks and includes `viewer_context`. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof FollowsApi + */ + public relevantFollowers(targetFid: number, viewerFid: number, options?: RawAxiosRequestConfig) { + return FollowsApiFp(this.configuration).relevantFollowers(targetFid, viewerFid, options).then((request) => request(this.axios, this.basePath)); + } + + /** + * Fetch a list of suggested users to follow. Used to help users discover new users to follow + * @summary Suggest Follows + * @param {number} fid FID of the user whose following you want to fetch. + * @param {number} [viewerFid] Providing this will return a list of users that respects this user\'s mutes and blocks and includes `viewer_context`. + * @param {number} [limit] Number of results to fetch (default 25, max 100) + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof FollowsApi + */ + public suggestedFollows(fid: number, viewerFid?: number, limit?: number, options?: RawAxiosRequestConfig) { + return FollowsApiFp(this.configuration).suggestedFollows(fid, viewerFid, limit, options).then((request) => request(this.axios, this.basePath)); + } +} + diff --git a/src/neynar-api/v2/openapi-farcaster/apis/frame-api.ts b/src/neynar-api/v2/openapi-farcaster/apis/frame-api.ts new file mode 100644 index 00000000..b7dcb797 --- /dev/null +++ b/src/neynar-api/v2/openapi-farcaster/apis/frame-api.ts @@ -0,0 +1,966 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Farcaster API V2 + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +import type { Configuration } from '../configuration'; +import type { AxiosPromise, AxiosInstance, RawAxiosRequestConfig } from 'axios'; +import globalAxios from 'axios'; +// Some imports not used depending on template conditions +// @ts-ignore +import { DUMMY_BASE_URL, assertParamExists, setApiKeyToObject, setBasicAuthToObject, setBearerAuthToObject, setOAuthToObject, setSearchParams, serializeDataIfNeeded, toPathString, createRequestFunction } from '../common'; +// @ts-ignore +import { BASE_PATH, COLLECTION_FORMATS, type RequestArgs, BaseAPI, RequiredError, operationServerMap } from '../base'; +// @ts-ignore +import type { DeleteFrameResponse } from '../models'; +// @ts-ignore +import type { DeleteNeynarFrameRequest } from '../models'; +// @ts-ignore +import type { ErrorRes } from '../models'; +// @ts-ignore +import type { Frame } from '../models'; +// @ts-ignore +import type { FrameActionReqBody } from '../models'; +// @ts-ignore +import type { FrameDeveloperManagedActionReqBody } from '../models'; +// @ts-ignore +import type { FrameFromUrl200Response } from '../models'; +// @ts-ignore +import type { FrameType } from '../models'; +// @ts-ignore +import type { FrameValidateAnalyticsResponse } from '../models'; +// @ts-ignore +import type { FrameValidateListResponse } from '../models'; +// @ts-ignore +import type { NeynarFrame } from '../models'; +// @ts-ignore +import type { NeynarFrameCreationRequest } from '../models'; +// @ts-ignore +import type { NeynarFrameUpdateRequest } from '../models'; +// @ts-ignore +import type { ValidateFrameActionResponse } from '../models'; +// @ts-ignore +import type { ValidateFrameAnalyticsType } from '../models'; +// @ts-ignore +import type { ValidateFrameRequest } from '../models'; +/** + * FrameApi - axios parameter creator + * @export + */ +export const FrameApiAxiosParamCreator = function (configuration?: Configuration) { + return { + /** + * Delete an existing frame, if it was made by the developer (identified by API key) + * @summary Delete frame + * @param {DeleteNeynarFrameRequest} deleteNeynarFrameRequest + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + deleteNeynarFrame: async (deleteNeynarFrameRequest: DeleteNeynarFrameRequest, options: RawAxiosRequestConfig = {}): Promise => { + // verify required parameter 'deleteNeynarFrameRequest' is not null or undefined + assertParamExists('deleteNeynarFrame', 'deleteNeynarFrameRequest', deleteNeynarFrameRequest) + const localVarPath = `/farcaster/frame`; + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'DELETE', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication ApiKeyAuth required + await setApiKeyToObject(localVarHeaderParameter, "x-api-key", configuration) + + + + localVarHeaderParameter['Content-Type'] = 'application/json'; + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + localVarRequestOptions.data = serializeDataIfNeeded(deleteNeynarFrameRequest, localVarRequestOptions, configuration) + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * Fetch a list of frames made by the developer (identified by API key) + * @summary List of frames + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + fetchNeynarFrames: async (options: RawAxiosRequestConfig = {}): Promise => { + const localVarPath = `/farcaster/frame/list`; + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication ApiKeyAuth required + await setApiKeyToObject(localVarHeaderParameter, "x-api-key", configuration) + + + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * Fetches the frame meta tags from the URL + * @summary Meta tags from URL + * @param {string} url The frame URL to crawl + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + frameFromUrl: async (url: string, options: RawAxiosRequestConfig = {}): Promise => { + // verify required parameter 'url' is not null or undefined + assertParamExists('frameFromUrl', 'url', url) + const localVarPath = `/farcaster/frame/crawl`; + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication ApiKeyAuth required + await setApiKeyToObject(localVarHeaderParameter, "x-api-key", configuration) + + if (url !== undefined) { + localVarQueryParameter['url'] = url; + } + + + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * Fetch a frame either by UUID or Neynar URL + * @summary Frame by UUID or URL + * @param {FrameType} type + * @param {string} [uuid] UUID of the frame to fetch + * @param {string} [url] URL of the Neynar frame to fetch + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + lookupNeynarFrame: async (type: FrameType, uuid?: string, url?: string, options: RawAxiosRequestConfig = {}): Promise => { + // verify required parameter 'type' is not null or undefined + assertParamExists('lookupNeynarFrame', 'type', type) + const localVarPath = `/farcaster/frame`; + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication ApiKeyAuth required + await setApiKeyToObject(localVarHeaderParameter, "x-api-key", configuration) + + if (type !== undefined) { + localVarQueryParameter['type'] = type; + } + + if (uuid !== undefined) { + localVarQueryParameter['uuid'] = uuid; + } + + if (url !== undefined) { + localVarQueryParameter['url'] = url; + } + + + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * Post frame actions, cast actions or cast composer actions to the server \\ (In order to post any of these actions, you need to have an approved `signer_uuid`) The POST request to the post_url has a timeout of 5 seconds for frames. + * @summary Post a frame action, cast action or a cast composer action + * @param {FrameActionReqBody} frameActionReqBody + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + postFrameAction: async (frameActionReqBody: FrameActionReqBody, options: RawAxiosRequestConfig = {}): Promise => { + // verify required parameter 'frameActionReqBody' is not null or undefined + assertParamExists('postFrameAction', 'frameActionReqBody', frameActionReqBody) + const localVarPath = `/farcaster/frame/action`; + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication ApiKeyAuth required + await setApiKeyToObject(localVarHeaderParameter, "x-api-key", configuration) + + + + localVarHeaderParameter['Content-Type'] = 'application/json'; + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + localVarRequestOptions.data = serializeDataIfNeeded(frameActionReqBody, localVarRequestOptions, configuration) + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * Post a frame action that has been signed with a developer managed signer The POST request to the post_url has a timeout of 5 seconds. + * @summary Signature packet + * @param {FrameDeveloperManagedActionReqBody} frameDeveloperManagedActionReqBody + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + postFrameDeveloperManagedAction: async (frameDeveloperManagedActionReqBody: FrameDeveloperManagedActionReqBody, options: RawAxiosRequestConfig = {}): Promise => { + // verify required parameter 'frameDeveloperManagedActionReqBody' is not null or undefined + assertParamExists('postFrameDeveloperManagedAction', 'frameDeveloperManagedActionReqBody', frameDeveloperManagedActionReqBody) + const localVarPath = `/farcaster/frame/developer_managed/action`; + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication ApiKeyAuth required + await setApiKeyToObject(localVarHeaderParameter, "x-api-key", configuration) + + + + localVarHeaderParameter['Content-Type'] = 'application/json'; + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + localVarRequestOptions.data = serializeDataIfNeeded(frameDeveloperManagedActionReqBody, localVarRequestOptions, configuration) + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * Create a new frame with a list of pages. + * @summary Create frame + * @param {NeynarFrameCreationRequest} neynarFrameCreationRequest + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + publishNeynarFrame: async (neynarFrameCreationRequest: NeynarFrameCreationRequest, options: RawAxiosRequestConfig = {}): Promise => { + // verify required parameter 'neynarFrameCreationRequest' is not null or undefined + assertParamExists('publishNeynarFrame', 'neynarFrameCreationRequest', neynarFrameCreationRequest) + const localVarPath = `/farcaster/frame`; + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication ApiKeyAuth required + await setApiKeyToObject(localVarHeaderParameter, "x-api-key", configuration) + + + + localVarHeaderParameter['Content-Type'] = 'application/json'; + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + localVarRequestOptions.data = serializeDataIfNeeded(neynarFrameCreationRequest, localVarRequestOptions, configuration) + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * Update an existing frame with a list of pages, if it was made by the developer (identified by API key) + * @summary Update frame + * @param {NeynarFrameUpdateRequest} neynarFrameUpdateRequest + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + updateNeynarFrame: async (neynarFrameUpdateRequest: NeynarFrameUpdateRequest, options: RawAxiosRequestConfig = {}): Promise => { + // verify required parameter 'neynarFrameUpdateRequest' is not null or undefined + assertParamExists('updateNeynarFrame', 'neynarFrameUpdateRequest', neynarFrameUpdateRequest) + const localVarPath = `/farcaster/frame`; + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'PUT', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication ApiKeyAuth required + await setApiKeyToObject(localVarHeaderParameter, "x-api-key", configuration) + + + + localVarHeaderParameter['Content-Type'] = 'application/json'; + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + localVarRequestOptions.data = serializeDataIfNeeded(neynarFrameUpdateRequest, localVarRequestOptions, configuration) + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * Validates a frame against by an interacting user against a Farcaster Hub \\ (In order to validate a frame, message bytes from Frame Action must be provided in hex) + * @summary Validate frame action + * @param {ValidateFrameRequest} validateFrameRequest + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + validateFrame: async (validateFrameRequest: ValidateFrameRequest, options: RawAxiosRequestConfig = {}): Promise => { + // verify required parameter 'validateFrameRequest' is not null or undefined + assertParamExists('validateFrame', 'validateFrameRequest', validateFrameRequest) + const localVarPath = `/farcaster/frame/validate`; + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication ApiKeyAuth required + await setApiKeyToObject(localVarHeaderParameter, "x-api-key", configuration) + + + + localVarHeaderParameter['Content-Type'] = 'application/json'; + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + localVarRequestOptions.data = serializeDataIfNeeded(validateFrameRequest, localVarRequestOptions, configuration) + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * Fetch analytics for total-interactors, interactors, nteractions-per-cast and input-text. + * @summary Analytics for the frame + * @param {string} frameUrl + * @param {ValidateFrameAnalyticsType} analyticsType + * @param {string} start + * @param {string} stop + * @param {ValidateFrameAnalyticsAggregateWindowEnum} [aggregateWindow] Required for `analytics_type=interactions-per-cast` + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + validateFrameAnalytics: async (frameUrl: string, analyticsType: ValidateFrameAnalyticsType, start: string, stop: string, aggregateWindow?: ValidateFrameAnalyticsAggregateWindowEnum, options: RawAxiosRequestConfig = {}): Promise => { + // verify required parameter 'frameUrl' is not null or undefined + assertParamExists('validateFrameAnalytics', 'frameUrl', frameUrl) + // verify required parameter 'analyticsType' is not null or undefined + assertParamExists('validateFrameAnalytics', 'analyticsType', analyticsType) + // verify required parameter 'start' is not null or undefined + assertParamExists('validateFrameAnalytics', 'start', start) + // verify required parameter 'stop' is not null or undefined + assertParamExists('validateFrameAnalytics', 'stop', stop) + const localVarPath = `/farcaster/frame/validate/analytics`; + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication ApiKeyAuth required + await setApiKeyToObject(localVarHeaderParameter, "x-api-key", configuration) + + if (frameUrl !== undefined) { + localVarQueryParameter['frame_url'] = frameUrl; + } + + if (analyticsType !== undefined) { + localVarQueryParameter['analytics_type'] = analyticsType; + } + + if (start !== undefined) { + localVarQueryParameter['start'] = (start as any instanceof Date) ? + (start as any).toISOString() : + start; + } + + if (stop !== undefined) { + localVarQueryParameter['stop'] = (stop as any instanceof Date) ? + (stop as any).toISOString() : + stop; + } + + if (aggregateWindow !== undefined) { + localVarQueryParameter['aggregate_window'] = aggregateWindow; + } + + + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * Fetch a list of all the frames validated by a user + * @summary All frames validated by user + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + validateFrameList: async (options: RawAxiosRequestConfig = {}): Promise => { + const localVarPath = `/farcaster/frame/validate/list`; + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication ApiKeyAuth required + await setApiKeyToObject(localVarHeaderParameter, "x-api-key", configuration) + + + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + } +}; + +/** + * FrameApi - functional programming interface + * @export + */ +export const FrameApiFp = function(configuration?: Configuration) { + const localVarAxiosParamCreator = FrameApiAxiosParamCreator(configuration) + return { + /** + * Delete an existing frame, if it was made by the developer (identified by API key) + * @summary Delete frame + * @param {DeleteNeynarFrameRequest} deleteNeynarFrameRequest + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async deleteNeynarFrame(deleteNeynarFrameRequest: DeleteNeynarFrameRequest, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.deleteNeynarFrame(deleteNeynarFrameRequest, options); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = operationServerMap['FrameApi.deleteNeynarFrame']?.[localVarOperationServerIndex]?.url; + return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); + }, + /** + * Fetch a list of frames made by the developer (identified by API key) + * @summary List of frames + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async fetchNeynarFrames(options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise>> { + const localVarAxiosArgs = await localVarAxiosParamCreator.fetchNeynarFrames(options); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = operationServerMap['FrameApi.fetchNeynarFrames']?.[localVarOperationServerIndex]?.url; + return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); + }, + /** + * Fetches the frame meta tags from the URL + * @summary Meta tags from URL + * @param {string} url The frame URL to crawl + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async frameFromUrl(url: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.frameFromUrl(url, options); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = operationServerMap['FrameApi.frameFromUrl']?.[localVarOperationServerIndex]?.url; + return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); + }, + /** + * Fetch a frame either by UUID or Neynar URL + * @summary Frame by UUID or URL + * @param {FrameType} type + * @param {string} [uuid] UUID of the frame to fetch + * @param {string} [url] URL of the Neynar frame to fetch + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async lookupNeynarFrame(type: FrameType, uuid?: string, url?: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.lookupNeynarFrame(type, uuid, url, options); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = operationServerMap['FrameApi.lookupNeynarFrame']?.[localVarOperationServerIndex]?.url; + return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); + }, + /** + * Post frame actions, cast actions or cast composer actions to the server \\ (In order to post any of these actions, you need to have an approved `signer_uuid`) The POST request to the post_url has a timeout of 5 seconds for frames. + * @summary Post a frame action, cast action or a cast composer action + * @param {FrameActionReqBody} frameActionReqBody + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async postFrameAction(frameActionReqBody: FrameActionReqBody, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.postFrameAction(frameActionReqBody, options); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = operationServerMap['FrameApi.postFrameAction']?.[localVarOperationServerIndex]?.url; + return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); + }, + /** + * Post a frame action that has been signed with a developer managed signer The POST request to the post_url has a timeout of 5 seconds. + * @summary Signature packet + * @param {FrameDeveloperManagedActionReqBody} frameDeveloperManagedActionReqBody + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async postFrameDeveloperManagedAction(frameDeveloperManagedActionReqBody: FrameDeveloperManagedActionReqBody, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.postFrameDeveloperManagedAction(frameDeveloperManagedActionReqBody, options); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = operationServerMap['FrameApi.postFrameDeveloperManagedAction']?.[localVarOperationServerIndex]?.url; + return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); + }, + /** + * Create a new frame with a list of pages. + * @summary Create frame + * @param {NeynarFrameCreationRequest} neynarFrameCreationRequest + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async publishNeynarFrame(neynarFrameCreationRequest: NeynarFrameCreationRequest, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.publishNeynarFrame(neynarFrameCreationRequest, options); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = operationServerMap['FrameApi.publishNeynarFrame']?.[localVarOperationServerIndex]?.url; + return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); + }, + /** + * Update an existing frame with a list of pages, if it was made by the developer (identified by API key) + * @summary Update frame + * @param {NeynarFrameUpdateRequest} neynarFrameUpdateRequest + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async updateNeynarFrame(neynarFrameUpdateRequest: NeynarFrameUpdateRequest, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.updateNeynarFrame(neynarFrameUpdateRequest, options); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = operationServerMap['FrameApi.updateNeynarFrame']?.[localVarOperationServerIndex]?.url; + return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); + }, + /** + * Validates a frame against by an interacting user against a Farcaster Hub \\ (In order to validate a frame, message bytes from Frame Action must be provided in hex) + * @summary Validate frame action + * @param {ValidateFrameRequest} validateFrameRequest + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async validateFrame(validateFrameRequest: ValidateFrameRequest, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.validateFrame(validateFrameRequest, options); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = operationServerMap['FrameApi.validateFrame']?.[localVarOperationServerIndex]?.url; + return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); + }, + /** + * Fetch analytics for total-interactors, interactors, nteractions-per-cast and input-text. + * @summary Analytics for the frame + * @param {string} frameUrl + * @param {ValidateFrameAnalyticsType} analyticsType + * @param {string} start + * @param {string} stop + * @param {ValidateFrameAnalyticsAggregateWindowEnum} [aggregateWindow] Required for `analytics_type=interactions-per-cast` + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async validateFrameAnalytics(frameUrl: string, analyticsType: ValidateFrameAnalyticsType, start: string, stop: string, aggregateWindow?: ValidateFrameAnalyticsAggregateWindowEnum, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.validateFrameAnalytics(frameUrl, analyticsType, start, stop, aggregateWindow, options); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = operationServerMap['FrameApi.validateFrameAnalytics']?.[localVarOperationServerIndex]?.url; + return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); + }, + /** + * Fetch a list of all the frames validated by a user + * @summary All frames validated by user + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async validateFrameList(options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.validateFrameList(options); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = operationServerMap['FrameApi.validateFrameList']?.[localVarOperationServerIndex]?.url; + return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); + }, + } +}; + +/** + * FrameApi - factory interface + * @export + */ +export const FrameApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) { + const localVarFp = FrameApiFp(configuration) + return { + /** + * Delete an existing frame, if it was made by the developer (identified by API key) + * @summary Delete frame + * @param {DeleteNeynarFrameRequest} deleteNeynarFrameRequest + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + deleteNeynarFrame(deleteNeynarFrameRequest: DeleteNeynarFrameRequest, options?: RawAxiosRequestConfig): AxiosPromise { + return localVarFp.deleteNeynarFrame(deleteNeynarFrameRequest, options).then((request) => request(axios, basePath)); + }, + /** + * Fetch a list of frames made by the developer (identified by API key) + * @summary List of frames + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + fetchNeynarFrames(options?: RawAxiosRequestConfig): AxiosPromise> { + return localVarFp.fetchNeynarFrames(options).then((request) => request(axios, basePath)); + }, + /** + * Fetches the frame meta tags from the URL + * @summary Meta tags from URL + * @param {string} url The frame URL to crawl + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + frameFromUrl(url: string, options?: RawAxiosRequestConfig): AxiosPromise { + return localVarFp.frameFromUrl(url, options).then((request) => request(axios, basePath)); + }, + /** + * Fetch a frame either by UUID or Neynar URL + * @summary Frame by UUID or URL + * @param {FrameType} type + * @param {string} [uuid] UUID of the frame to fetch + * @param {string} [url] URL of the Neynar frame to fetch + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + lookupNeynarFrame(type: FrameType, uuid?: string, url?: string, options?: RawAxiosRequestConfig): AxiosPromise { + return localVarFp.lookupNeynarFrame(type, uuid, url, options).then((request) => request(axios, basePath)); + }, + /** + * Post frame actions, cast actions or cast composer actions to the server \\ (In order to post any of these actions, you need to have an approved `signer_uuid`) The POST request to the post_url has a timeout of 5 seconds for frames. + * @summary Post a frame action, cast action or a cast composer action + * @param {FrameActionReqBody} frameActionReqBody + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + postFrameAction(frameActionReqBody: FrameActionReqBody, options?: RawAxiosRequestConfig): AxiosPromise { + return localVarFp.postFrameAction(frameActionReqBody, options).then((request) => request(axios, basePath)); + }, + /** + * Post a frame action that has been signed with a developer managed signer The POST request to the post_url has a timeout of 5 seconds. + * @summary Signature packet + * @param {FrameDeveloperManagedActionReqBody} frameDeveloperManagedActionReqBody + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + postFrameDeveloperManagedAction(frameDeveloperManagedActionReqBody: FrameDeveloperManagedActionReqBody, options?: RawAxiosRequestConfig): AxiosPromise { + return localVarFp.postFrameDeveloperManagedAction(frameDeveloperManagedActionReqBody, options).then((request) => request(axios, basePath)); + }, + /** + * Create a new frame with a list of pages. + * @summary Create frame + * @param {NeynarFrameCreationRequest} neynarFrameCreationRequest + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + publishNeynarFrame(neynarFrameCreationRequest: NeynarFrameCreationRequest, options?: RawAxiosRequestConfig): AxiosPromise { + return localVarFp.publishNeynarFrame(neynarFrameCreationRequest, options).then((request) => request(axios, basePath)); + }, + /** + * Update an existing frame with a list of pages, if it was made by the developer (identified by API key) + * @summary Update frame + * @param {NeynarFrameUpdateRequest} neynarFrameUpdateRequest + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + updateNeynarFrame(neynarFrameUpdateRequest: NeynarFrameUpdateRequest, options?: RawAxiosRequestConfig): AxiosPromise { + return localVarFp.updateNeynarFrame(neynarFrameUpdateRequest, options).then((request) => request(axios, basePath)); + }, + /** + * Validates a frame against by an interacting user against a Farcaster Hub \\ (In order to validate a frame, message bytes from Frame Action must be provided in hex) + * @summary Validate frame action + * @param {ValidateFrameRequest} validateFrameRequest + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + validateFrame(validateFrameRequest: ValidateFrameRequest, options?: RawAxiosRequestConfig): AxiosPromise { + return localVarFp.validateFrame(validateFrameRequest, options).then((request) => request(axios, basePath)); + }, + /** + * Fetch analytics for total-interactors, interactors, nteractions-per-cast and input-text. + * @summary Analytics for the frame + * @param {string} frameUrl + * @param {ValidateFrameAnalyticsType} analyticsType + * @param {string} start + * @param {string} stop + * @param {ValidateFrameAnalyticsAggregateWindowEnum} [aggregateWindow] Required for `analytics_type=interactions-per-cast` + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + validateFrameAnalytics(frameUrl: string, analyticsType: ValidateFrameAnalyticsType, start: string, stop: string, aggregateWindow?: ValidateFrameAnalyticsAggregateWindowEnum, options?: RawAxiosRequestConfig): AxiosPromise { + return localVarFp.validateFrameAnalytics(frameUrl, analyticsType, start, stop, aggregateWindow, options).then((request) => request(axios, basePath)); + }, + /** + * Fetch a list of all the frames validated by a user + * @summary All frames validated by user + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + validateFrameList(options?: RawAxiosRequestConfig): AxiosPromise { + return localVarFp.validateFrameList(options).then((request) => request(axios, basePath)); + }, + }; +}; + +/** + * FrameApi - object-oriented interface + * @export + * @class FrameApi + * @extends {BaseAPI} + */ +export class FrameApi extends BaseAPI { + /** + * Delete an existing frame, if it was made by the developer (identified by API key) + * @summary Delete frame + * @param {DeleteNeynarFrameRequest} deleteNeynarFrameRequest + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof FrameApi + */ + public deleteNeynarFrame(deleteNeynarFrameRequest: DeleteNeynarFrameRequest, options?: RawAxiosRequestConfig) { + return FrameApiFp(this.configuration).deleteNeynarFrame(deleteNeynarFrameRequest, options).then((request) => request(this.axios, this.basePath)); + } + + /** + * Fetch a list of frames made by the developer (identified by API key) + * @summary List of frames + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof FrameApi + */ + public fetchNeynarFrames(options?: RawAxiosRequestConfig) { + return FrameApiFp(this.configuration).fetchNeynarFrames(options).then((request) => request(this.axios, this.basePath)); + } + + /** + * Fetches the frame meta tags from the URL + * @summary Meta tags from URL + * @param {string} url The frame URL to crawl + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof FrameApi + */ + public frameFromUrl(url: string, options?: RawAxiosRequestConfig) { + return FrameApiFp(this.configuration).frameFromUrl(url, options).then((request) => request(this.axios, this.basePath)); + } + + /** + * Fetch a frame either by UUID or Neynar URL + * @summary Frame by UUID or URL + * @param {FrameType} type + * @param {string} [uuid] UUID of the frame to fetch + * @param {string} [url] URL of the Neynar frame to fetch + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof FrameApi + */ + public lookupNeynarFrame(type: FrameType, uuid?: string, url?: string, options?: RawAxiosRequestConfig) { + return FrameApiFp(this.configuration).lookupNeynarFrame(type, uuid, url, options).then((request) => request(this.axios, this.basePath)); + } + + /** + * Post frame actions, cast actions or cast composer actions to the server \\ (In order to post any of these actions, you need to have an approved `signer_uuid`) The POST request to the post_url has a timeout of 5 seconds for frames. + * @summary Post a frame action, cast action or a cast composer action + * @param {FrameActionReqBody} frameActionReqBody + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof FrameApi + */ + public postFrameAction(frameActionReqBody: FrameActionReqBody, options?: RawAxiosRequestConfig) { + return FrameApiFp(this.configuration).postFrameAction(frameActionReqBody, options).then((request) => request(this.axios, this.basePath)); + } + + /** + * Post a frame action that has been signed with a developer managed signer The POST request to the post_url has a timeout of 5 seconds. + * @summary Signature packet + * @param {FrameDeveloperManagedActionReqBody} frameDeveloperManagedActionReqBody + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof FrameApi + */ + public postFrameDeveloperManagedAction(frameDeveloperManagedActionReqBody: FrameDeveloperManagedActionReqBody, options?: RawAxiosRequestConfig) { + return FrameApiFp(this.configuration).postFrameDeveloperManagedAction(frameDeveloperManagedActionReqBody, options).then((request) => request(this.axios, this.basePath)); + } + + /** + * Create a new frame with a list of pages. + * @summary Create frame + * @param {NeynarFrameCreationRequest} neynarFrameCreationRequest + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof FrameApi + */ + public publishNeynarFrame(neynarFrameCreationRequest: NeynarFrameCreationRequest, options?: RawAxiosRequestConfig) { + return FrameApiFp(this.configuration).publishNeynarFrame(neynarFrameCreationRequest, options).then((request) => request(this.axios, this.basePath)); + } + + /** + * Update an existing frame with a list of pages, if it was made by the developer (identified by API key) + * @summary Update frame + * @param {NeynarFrameUpdateRequest} neynarFrameUpdateRequest + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof FrameApi + */ + public updateNeynarFrame(neynarFrameUpdateRequest: NeynarFrameUpdateRequest, options?: RawAxiosRequestConfig) { + return FrameApiFp(this.configuration).updateNeynarFrame(neynarFrameUpdateRequest, options).then((request) => request(this.axios, this.basePath)); + } + + /** + * Validates a frame against by an interacting user against a Farcaster Hub \\ (In order to validate a frame, message bytes from Frame Action must be provided in hex) + * @summary Validate frame action + * @param {ValidateFrameRequest} validateFrameRequest + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof FrameApi + */ + public validateFrame(validateFrameRequest: ValidateFrameRequest, options?: RawAxiosRequestConfig) { + return FrameApiFp(this.configuration).validateFrame(validateFrameRequest, options).then((request) => request(this.axios, this.basePath)); + } + + /** + * Fetch analytics for total-interactors, interactors, nteractions-per-cast and input-text. + * @summary Analytics for the frame + * @param {string} frameUrl + * @param {ValidateFrameAnalyticsType} analyticsType + * @param {string} start + * @param {string} stop + * @param {ValidateFrameAnalyticsAggregateWindowEnum} [aggregateWindow] Required for `analytics_type=interactions-per-cast` + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof FrameApi + */ + public validateFrameAnalytics(frameUrl: string, analyticsType: ValidateFrameAnalyticsType, start: string, stop: string, aggregateWindow?: ValidateFrameAnalyticsAggregateWindowEnum, options?: RawAxiosRequestConfig) { + return FrameApiFp(this.configuration).validateFrameAnalytics(frameUrl, analyticsType, start, stop, aggregateWindow, options).then((request) => request(this.axios, this.basePath)); + } + + /** + * Fetch a list of all the frames validated by a user + * @summary All frames validated by user + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof FrameApi + */ + public validateFrameList(options?: RawAxiosRequestConfig) { + return FrameApiFp(this.configuration).validateFrameList(options).then((request) => request(this.axios, this.basePath)); + } +} + +/** + * @export + */ +export const ValidateFrameAnalyticsAggregateWindowEnum = { + _10s: '10s', + _1m: '1m', + _2m: '2m', + _5m: '5m', + _10m: '10m', + _20m: '20m', + _30m: '30m', + _2h: '2h', + _12h: '12h', + _1d: '1d', + _7d: '7d' +} as const; +export type ValidateFrameAnalyticsAggregateWindowEnum = typeof ValidateFrameAnalyticsAggregateWindowEnum[keyof typeof ValidateFrameAnalyticsAggregateWindowEnum]; diff --git a/src/neynar-api/v2/openapi-farcaster/apis/mute-api.ts b/src/neynar-api/v2/openapi-farcaster/apis/mute-api.ts new file mode 100644 index 00000000..55eb74b4 --- /dev/null +++ b/src/neynar-api/v2/openapi-farcaster/apis/mute-api.ts @@ -0,0 +1,307 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Farcaster API V2 + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +import type { Configuration } from '../configuration'; +import type { AxiosPromise, AxiosInstance, RawAxiosRequestConfig } from 'axios'; +import globalAxios from 'axios'; +// Some imports not used depending on template conditions +// @ts-ignore +import { DUMMY_BASE_URL, assertParamExists, setApiKeyToObject, setBasicAuthToObject, setBearerAuthToObject, setOAuthToObject, setSearchParams, serializeDataIfNeeded, toPathString, createRequestFunction } from '../common'; +// @ts-ignore +import { BASE_PATH, COLLECTION_FORMATS, type RequestArgs, BaseAPI, RequiredError, operationServerMap } from '../base'; +// @ts-ignore +import type { ErrorRes } from '../models'; +// @ts-ignore +import type { MuteListResponse } from '../models'; +// @ts-ignore +import type { MuteReqBody } from '../models'; +// @ts-ignore +import type { MuteResponse } from '../models'; +/** + * MuteApi - axios parameter creator + * @export + */ +export const MuteApiAxiosParamCreator = function (configuration?: Configuration) { + return { + /** + * Adds a mute for a given FID. This is a whitelisted API, reach out if you want access. + * @summary Mute FID + * @param {MuteReqBody} muteReqBody + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + addMute: async (muteReqBody: MuteReqBody, options: RawAxiosRequestConfig = {}): Promise => { + // verify required parameter 'muteReqBody' is not null or undefined + assertParamExists('addMute', 'muteReqBody', muteReqBody) + const localVarPath = `/farcaster/mute`; + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication ApiKeyAuth required + await setApiKeyToObject(localVarHeaderParameter, "x-api-key", configuration) + + + + localVarHeaderParameter['Content-Type'] = 'application/json'; + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + localVarRequestOptions.data = serializeDataIfNeeded(muteReqBody, localVarRequestOptions, configuration) + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * Deletes a mute for a given FID. This is a whitelisted API, reach out if you want access. + * @summary Unmute FID + * @param {MuteReqBody} muteReqBody + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + deleteMute: async (muteReqBody: MuteReqBody, options: RawAxiosRequestConfig = {}): Promise => { + // verify required parameter 'muteReqBody' is not null or undefined + assertParamExists('deleteMute', 'muteReqBody', muteReqBody) + const localVarPath = `/farcaster/mute`; + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'DELETE', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication ApiKeyAuth required + await setApiKeyToObject(localVarHeaderParameter, "x-api-key", configuration) + + + + localVarHeaderParameter['Content-Type'] = 'application/json'; + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + localVarRequestOptions.data = serializeDataIfNeeded(muteReqBody, localVarRequestOptions, configuration) + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * Fetches all FIDs that a user has muted. + * @summary Muted FIDs of user + * @param {number} fid The user\'s FID (identifier) + * @param {number} [limit] Number of results to fetch (default 20, max 100). + * @param {string} [cursor] Pagination cursor. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + muteList: async (fid: number, limit?: number, cursor?: string, options: RawAxiosRequestConfig = {}): Promise => { + // verify required parameter 'fid' is not null or undefined + assertParamExists('muteList', 'fid', fid) + const localVarPath = `/farcaster/mute/list`; + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication ApiKeyAuth required + await setApiKeyToObject(localVarHeaderParameter, "x-api-key", configuration) + + if (fid !== undefined) { + localVarQueryParameter['fid'] = fid; + } + + if (limit !== undefined) { + localVarQueryParameter['limit'] = limit; + } + + if (cursor !== undefined) { + localVarQueryParameter['cursor'] = cursor; + } + + + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + } +}; + +/** + * MuteApi - functional programming interface + * @export + */ +export const MuteApiFp = function(configuration?: Configuration) { + const localVarAxiosParamCreator = MuteApiAxiosParamCreator(configuration) + return { + /** + * Adds a mute for a given FID. This is a whitelisted API, reach out if you want access. + * @summary Mute FID + * @param {MuteReqBody} muteReqBody + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async addMute(muteReqBody: MuteReqBody, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.addMute(muteReqBody, options); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = operationServerMap['MuteApi.addMute']?.[localVarOperationServerIndex]?.url; + return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); + }, + /** + * Deletes a mute for a given FID. This is a whitelisted API, reach out if you want access. + * @summary Unmute FID + * @param {MuteReqBody} muteReqBody + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async deleteMute(muteReqBody: MuteReqBody, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.deleteMute(muteReqBody, options); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = operationServerMap['MuteApi.deleteMute']?.[localVarOperationServerIndex]?.url; + return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); + }, + /** + * Fetches all FIDs that a user has muted. + * @summary Muted FIDs of user + * @param {number} fid The user\'s FID (identifier) + * @param {number} [limit] Number of results to fetch (default 20, max 100). + * @param {string} [cursor] Pagination cursor. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async muteList(fid: number, limit?: number, cursor?: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.muteList(fid, limit, cursor, options); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = operationServerMap['MuteApi.muteList']?.[localVarOperationServerIndex]?.url; + return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); + }, + } +}; + +/** + * MuteApi - factory interface + * @export + */ +export const MuteApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) { + const localVarFp = MuteApiFp(configuration) + return { + /** + * Adds a mute for a given FID. This is a whitelisted API, reach out if you want access. + * @summary Mute FID + * @param {MuteReqBody} muteReqBody + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + addMute(muteReqBody: MuteReqBody, options?: RawAxiosRequestConfig): AxiosPromise { + return localVarFp.addMute(muteReqBody, options).then((request) => request(axios, basePath)); + }, + /** + * Deletes a mute for a given FID. This is a whitelisted API, reach out if you want access. + * @summary Unmute FID + * @param {MuteReqBody} muteReqBody + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + deleteMute(muteReqBody: MuteReqBody, options?: RawAxiosRequestConfig): AxiosPromise { + return localVarFp.deleteMute(muteReqBody, options).then((request) => request(axios, basePath)); + }, + /** + * Fetches all FIDs that a user has muted. + * @summary Muted FIDs of user + * @param {number} fid The user\'s FID (identifier) + * @param {number} [limit] Number of results to fetch (default 20, max 100). + * @param {string} [cursor] Pagination cursor. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + muteList(fid: number, limit?: number, cursor?: string, options?: RawAxiosRequestConfig): AxiosPromise { + return localVarFp.muteList(fid, limit, cursor, options).then((request) => request(axios, basePath)); + }, + }; +}; + +/** + * MuteApi - object-oriented interface + * @export + * @class MuteApi + * @extends {BaseAPI} + */ +export class MuteApi extends BaseAPI { + /** + * Adds a mute for a given FID. This is a whitelisted API, reach out if you want access. + * @summary Mute FID + * @param {MuteReqBody} muteReqBody + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof MuteApi + */ + public addMute(muteReqBody: MuteReqBody, options?: RawAxiosRequestConfig) { + return MuteApiFp(this.configuration).addMute(muteReqBody, options).then((request) => request(this.axios, this.basePath)); + } + + /** + * Deletes a mute for a given FID. This is a whitelisted API, reach out if you want access. + * @summary Unmute FID + * @param {MuteReqBody} muteReqBody + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof MuteApi + */ + public deleteMute(muteReqBody: MuteReqBody, options?: RawAxiosRequestConfig) { + return MuteApiFp(this.configuration).deleteMute(muteReqBody, options).then((request) => request(this.axios, this.basePath)); + } + + /** + * Fetches all FIDs that a user has muted. + * @summary Muted FIDs of user + * @param {number} fid The user\'s FID (identifier) + * @param {number} [limit] Number of results to fetch (default 20, max 100). + * @param {string} [cursor] Pagination cursor. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof MuteApi + */ + public muteList(fid: number, limit?: number, cursor?: string, options?: RawAxiosRequestConfig) { + return MuteApiFp(this.configuration).muteList(fid, limit, cursor, options).then((request) => request(this.axios, this.basePath)); + } +} + diff --git a/src/neynar-api/v2/openapi-farcaster/apis/notifications-api.ts b/src/neynar-api/v2/openapi-farcaster/apis/notifications-api.ts new file mode 100644 index 00000000..5eab7793 --- /dev/null +++ b/src/neynar-api/v2/openapi-farcaster/apis/notifications-api.ts @@ -0,0 +1,445 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Farcaster API V2 + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +import type { Configuration } from '../configuration'; +import type { AxiosPromise, AxiosInstance, RawAxiosRequestConfig } from 'axios'; +import globalAxios from 'axios'; +// Some imports not used depending on template conditions +// @ts-ignore +import { DUMMY_BASE_URL, assertParamExists, setApiKeyToObject, setBasicAuthToObject, setBearerAuthToObject, setOAuthToObject, setSearchParams, serializeDataIfNeeded, toPathString, createRequestFunction } from '../common'; +// @ts-ignore +import { BASE_PATH, COLLECTION_FORMATS, type RequestArgs, BaseAPI, RequiredError, operationServerMap } from '../base'; +// @ts-ignore +import type { ErrorRes } from '../models'; +// @ts-ignore +import type { MarkNotificationsAsSeenReqBody } from '../models'; +// @ts-ignore +import type { NotificationType } from '../models'; +// @ts-ignore +import type { NotificationsResponse } from '../models'; +// @ts-ignore +import type { OperationResponse } from '../models'; +/** + * NotificationsApi - axios parameter creator + * @export + */ +export const NotificationsApiAxiosParamCreator = function (configuration?: Configuration) { + return { + /** + * Mark notifications as seen + * @summary Mark as seen + * @param {MarkNotificationsAsSeenReqBody} markNotificationsAsSeenReqBody + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + markNotificationsAsSeen: async (markNotificationsAsSeenReqBody: MarkNotificationsAsSeenReqBody, options: RawAxiosRequestConfig = {}): Promise => { + // verify required parameter 'markNotificationsAsSeenReqBody' is not null or undefined + assertParamExists('markNotificationsAsSeen', 'markNotificationsAsSeenReqBody', markNotificationsAsSeenReqBody) + const localVarPath = `/farcaster/notifications/seen`; + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication ApiKeyAuth required + await setApiKeyToObject(localVarHeaderParameter, "x-api-key", configuration) + + + + localVarHeaderParameter['Content-Type'] = 'application/json'; + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + localVarRequestOptions.data = serializeDataIfNeeded(markNotificationsAsSeenReqBody, localVarRequestOptions, configuration) + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * Returns a list of notifications for a specific FID. + * @summary For user + * @param {number} fid FID of the user you you want to fetch notifications for. The response will respect this user\'s mutes and blocks. + * @param {NotificationType} [type] Notification type to fetch. + * @param {boolean} [priorityMode] When true, only returns notifications from power badge users and users that the viewer follows (if viewer_fid is provided). + * @param {string} [cursor] Pagination cursor. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + notifications: async (fid: number, type?: NotificationType, priorityMode?: boolean, cursor?: string, options: RawAxiosRequestConfig = {}): Promise => { + // verify required parameter 'fid' is not null or undefined + assertParamExists('notifications', 'fid', fid) + const localVarPath = `/farcaster/notifications`; + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication ApiKeyAuth required + await setApiKeyToObject(localVarHeaderParameter, "x-api-key", configuration) + + if (fid !== undefined) { + localVarQueryParameter['fid'] = fid; + } + + if (type !== undefined) { + localVarQueryParameter['type'] = type; + } + + if (priorityMode !== undefined) { + localVarQueryParameter['priority_mode'] = priorityMode; + } + + if (cursor !== undefined) { + localVarQueryParameter['cursor'] = cursor; + } + + + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * Returns a list of notifications for a user in specific channels + * @summary For user by channel + * @param {number} fid FID of the user you you want to fetch notifications for. The response will respect this user\'s mutes and blocks. + * @param {string} channelIds Comma separated channel_ids (find list of all channels here - https://docs.neynar.com/reference/list-all-channels) + * @param {boolean} [priorityMode] When true, only returns notifications from power badge users and users that the viewer follows (if viewer_fid is provided). + * @param {string} [cursor] Pagination cursor. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + notificationsChannel: async (fid: number, channelIds: string, priorityMode?: boolean, cursor?: string, options: RawAxiosRequestConfig = {}): Promise => { + // verify required parameter 'fid' is not null or undefined + assertParamExists('notificationsChannel', 'fid', fid) + // verify required parameter 'channelIds' is not null or undefined + assertParamExists('notificationsChannel', 'channelIds', channelIds) + const localVarPath = `/farcaster/notifications/channel`; + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication ApiKeyAuth required + await setApiKeyToObject(localVarHeaderParameter, "x-api-key", configuration) + + if (fid !== undefined) { + localVarQueryParameter['fid'] = fid; + } + + if (channelIds !== undefined) { + localVarQueryParameter['channel_ids'] = channelIds; + } + + if (priorityMode !== undefined) { + localVarQueryParameter['priority_mode'] = priorityMode; + } + + if (cursor !== undefined) { + localVarQueryParameter['cursor'] = cursor; + } + + + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * Returns a list of notifications for a user in specific parent_urls + * @summary For user by parent_urls + * @param {number} fid FID of the user you you want to fetch notifications for. The response will respect this user\'s mutes and blocks. + * @param {string} parentUrls Comma separated parent_urls + * @param {boolean} [priorityMode] When true, only returns notifications from power badge users and users that the viewer follows (if viewer_fid is provided). + * @param {string} [cursor] Pagination cursor. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + notificationsParentUrl: async (fid: number, parentUrls: string, priorityMode?: boolean, cursor?: string, options: RawAxiosRequestConfig = {}): Promise => { + // verify required parameter 'fid' is not null or undefined + assertParamExists('notificationsParentUrl', 'fid', fid) + // verify required parameter 'parentUrls' is not null or undefined + assertParamExists('notificationsParentUrl', 'parentUrls', parentUrls) + const localVarPath = `/farcaster/notifications/parent_url`; + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication ApiKeyAuth required + await setApiKeyToObject(localVarHeaderParameter, "x-api-key", configuration) + + if (fid !== undefined) { + localVarQueryParameter['fid'] = fid; + } + + if (parentUrls !== undefined) { + localVarQueryParameter['parent_urls'] = parentUrls; + } + + if (priorityMode !== undefined) { + localVarQueryParameter['priority_mode'] = priorityMode; + } + + if (cursor !== undefined) { + localVarQueryParameter['cursor'] = cursor; + } + + + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + } +}; + +/** + * NotificationsApi - functional programming interface + * @export + */ +export const NotificationsApiFp = function(configuration?: Configuration) { + const localVarAxiosParamCreator = NotificationsApiAxiosParamCreator(configuration) + return { + /** + * Mark notifications as seen + * @summary Mark as seen + * @param {MarkNotificationsAsSeenReqBody} markNotificationsAsSeenReqBody + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async markNotificationsAsSeen(markNotificationsAsSeenReqBody: MarkNotificationsAsSeenReqBody, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.markNotificationsAsSeen(markNotificationsAsSeenReqBody, options); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = operationServerMap['NotificationsApi.markNotificationsAsSeen']?.[localVarOperationServerIndex]?.url; + return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); + }, + /** + * Returns a list of notifications for a specific FID. + * @summary For user + * @param {number} fid FID of the user you you want to fetch notifications for. The response will respect this user\'s mutes and blocks. + * @param {NotificationType} [type] Notification type to fetch. + * @param {boolean} [priorityMode] When true, only returns notifications from power badge users and users that the viewer follows (if viewer_fid is provided). + * @param {string} [cursor] Pagination cursor. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async notifications(fid: number, type?: NotificationType, priorityMode?: boolean, cursor?: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.notifications(fid, type, priorityMode, cursor, options); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = operationServerMap['NotificationsApi.notifications']?.[localVarOperationServerIndex]?.url; + return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); + }, + /** + * Returns a list of notifications for a user in specific channels + * @summary For user by channel + * @param {number} fid FID of the user you you want to fetch notifications for. The response will respect this user\'s mutes and blocks. + * @param {string} channelIds Comma separated channel_ids (find list of all channels here - https://docs.neynar.com/reference/list-all-channels) + * @param {boolean} [priorityMode] When true, only returns notifications from power badge users and users that the viewer follows (if viewer_fid is provided). + * @param {string} [cursor] Pagination cursor. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async notificationsChannel(fid: number, channelIds: string, priorityMode?: boolean, cursor?: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.notificationsChannel(fid, channelIds, priorityMode, cursor, options); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = operationServerMap['NotificationsApi.notificationsChannel']?.[localVarOperationServerIndex]?.url; + return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); + }, + /** + * Returns a list of notifications for a user in specific parent_urls + * @summary For user by parent_urls + * @param {number} fid FID of the user you you want to fetch notifications for. The response will respect this user\'s mutes and blocks. + * @param {string} parentUrls Comma separated parent_urls + * @param {boolean} [priorityMode] When true, only returns notifications from power badge users and users that the viewer follows (if viewer_fid is provided). + * @param {string} [cursor] Pagination cursor. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async notificationsParentUrl(fid: number, parentUrls: string, priorityMode?: boolean, cursor?: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.notificationsParentUrl(fid, parentUrls, priorityMode, cursor, options); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = operationServerMap['NotificationsApi.notificationsParentUrl']?.[localVarOperationServerIndex]?.url; + return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); + }, + } +}; + +/** + * NotificationsApi - factory interface + * @export + */ +export const NotificationsApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) { + const localVarFp = NotificationsApiFp(configuration) + return { + /** + * Mark notifications as seen + * @summary Mark as seen + * @param {MarkNotificationsAsSeenReqBody} markNotificationsAsSeenReqBody + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + markNotificationsAsSeen(markNotificationsAsSeenReqBody: MarkNotificationsAsSeenReqBody, options?: RawAxiosRequestConfig): AxiosPromise { + return localVarFp.markNotificationsAsSeen(markNotificationsAsSeenReqBody, options).then((request) => request(axios, basePath)); + }, + /** + * Returns a list of notifications for a specific FID. + * @summary For user + * @param {number} fid FID of the user you you want to fetch notifications for. The response will respect this user\'s mutes and blocks. + * @param {NotificationType} [type] Notification type to fetch. + * @param {boolean} [priorityMode] When true, only returns notifications from power badge users and users that the viewer follows (if viewer_fid is provided). + * @param {string} [cursor] Pagination cursor. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + notifications(fid: number, type?: NotificationType, priorityMode?: boolean, cursor?: string, options?: RawAxiosRequestConfig): AxiosPromise { + return localVarFp.notifications(fid, type, priorityMode, cursor, options).then((request) => request(axios, basePath)); + }, + /** + * Returns a list of notifications for a user in specific channels + * @summary For user by channel + * @param {number} fid FID of the user you you want to fetch notifications for. The response will respect this user\'s mutes and blocks. + * @param {string} channelIds Comma separated channel_ids (find list of all channels here - https://docs.neynar.com/reference/list-all-channels) + * @param {boolean} [priorityMode] When true, only returns notifications from power badge users and users that the viewer follows (if viewer_fid is provided). + * @param {string} [cursor] Pagination cursor. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + notificationsChannel(fid: number, channelIds: string, priorityMode?: boolean, cursor?: string, options?: RawAxiosRequestConfig): AxiosPromise { + return localVarFp.notificationsChannel(fid, channelIds, priorityMode, cursor, options).then((request) => request(axios, basePath)); + }, + /** + * Returns a list of notifications for a user in specific parent_urls + * @summary For user by parent_urls + * @param {number} fid FID of the user you you want to fetch notifications for. The response will respect this user\'s mutes and blocks. + * @param {string} parentUrls Comma separated parent_urls + * @param {boolean} [priorityMode] When true, only returns notifications from power badge users and users that the viewer follows (if viewer_fid is provided). + * @param {string} [cursor] Pagination cursor. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + notificationsParentUrl(fid: number, parentUrls: string, priorityMode?: boolean, cursor?: string, options?: RawAxiosRequestConfig): AxiosPromise { + return localVarFp.notificationsParentUrl(fid, parentUrls, priorityMode, cursor, options).then((request) => request(axios, basePath)); + }, + }; +}; + +/** + * NotificationsApi - object-oriented interface + * @export + * @class NotificationsApi + * @extends {BaseAPI} + */ +export class NotificationsApi extends BaseAPI { + /** + * Mark notifications as seen + * @summary Mark as seen + * @param {MarkNotificationsAsSeenReqBody} markNotificationsAsSeenReqBody + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof NotificationsApi + */ + public markNotificationsAsSeen(markNotificationsAsSeenReqBody: MarkNotificationsAsSeenReqBody, options?: RawAxiosRequestConfig) { + return NotificationsApiFp(this.configuration).markNotificationsAsSeen(markNotificationsAsSeenReqBody, options).then((request) => request(this.axios, this.basePath)); + } + + /** + * Returns a list of notifications for a specific FID. + * @summary For user + * @param {number} fid FID of the user you you want to fetch notifications for. The response will respect this user\'s mutes and blocks. + * @param {NotificationType} [type] Notification type to fetch. + * @param {boolean} [priorityMode] When true, only returns notifications from power badge users and users that the viewer follows (if viewer_fid is provided). + * @param {string} [cursor] Pagination cursor. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof NotificationsApi + */ + public notifications(fid: number, type?: NotificationType, priorityMode?: boolean, cursor?: string, options?: RawAxiosRequestConfig) { + return NotificationsApiFp(this.configuration).notifications(fid, type, priorityMode, cursor, options).then((request) => request(this.axios, this.basePath)); + } + + /** + * Returns a list of notifications for a user in specific channels + * @summary For user by channel + * @param {number} fid FID of the user you you want to fetch notifications for. The response will respect this user\'s mutes and blocks. + * @param {string} channelIds Comma separated channel_ids (find list of all channels here - https://docs.neynar.com/reference/list-all-channels) + * @param {boolean} [priorityMode] When true, only returns notifications from power badge users and users that the viewer follows (if viewer_fid is provided). + * @param {string} [cursor] Pagination cursor. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof NotificationsApi + */ + public notificationsChannel(fid: number, channelIds: string, priorityMode?: boolean, cursor?: string, options?: RawAxiosRequestConfig) { + return NotificationsApiFp(this.configuration).notificationsChannel(fid, channelIds, priorityMode, cursor, options).then((request) => request(this.axios, this.basePath)); + } + + /** + * Returns a list of notifications for a user in specific parent_urls + * @summary For user by parent_urls + * @param {number} fid FID of the user you you want to fetch notifications for. The response will respect this user\'s mutes and blocks. + * @param {string} parentUrls Comma separated parent_urls + * @param {boolean} [priorityMode] When true, only returns notifications from power badge users and users that the viewer follows (if viewer_fid is provided). + * @param {string} [cursor] Pagination cursor. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof NotificationsApi + */ + public notificationsParentUrl(fid: number, parentUrls: string, priorityMode?: boolean, cursor?: string, options?: RawAxiosRequestConfig) { + return NotificationsApiFp(this.configuration).notificationsParentUrl(fid, parentUrls, priorityMode, cursor, options).then((request) => request(this.axios, this.basePath)); + } +} + diff --git a/src/neynar-api/v2/openapi-farcaster/apis/reaction-api.ts b/src/neynar-api/v2/openapi-farcaster/apis/reaction-api.ts new file mode 100644 index 00000000..b9efcc6d --- /dev/null +++ b/src/neynar-api/v2/openapi-farcaster/apis/reaction-api.ts @@ -0,0 +1,438 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Farcaster API V2 + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +import type { Configuration } from '../configuration'; +import type { AxiosPromise, AxiosInstance, RawAxiosRequestConfig } from 'axios'; +import globalAxios from 'axios'; +// Some imports not used depending on template conditions +// @ts-ignore +import { DUMMY_BASE_URL, assertParamExists, setApiKeyToObject, setBasicAuthToObject, setBearerAuthToObject, setOAuthToObject, setSearchParams, serializeDataIfNeeded, toPathString, createRequestFunction } from '../common'; +// @ts-ignore +import { BASE_PATH, COLLECTION_FORMATS, type RequestArgs, BaseAPI, RequiredError, operationServerMap } from '../base'; +// @ts-ignore +import type { ErrorRes } from '../models'; +// @ts-ignore +import type { OperationResponse } from '../models'; +// @ts-ignore +import type { ReactionReqBody } from '../models'; +// @ts-ignore +import type { ReactionsCastResponse } from '../models'; +// @ts-ignore +import type { ReactionsResponse } from '../models'; +// @ts-ignore +import type { ReactionsType } from '../models'; +/** + * ReactionApi - axios parameter creator + * @export + */ +export const ReactionApiAxiosParamCreator = function (configuration?: Configuration) { + return { + /** + * Delete a reaction (like or recast) to a cast \\ (In order to delete a reaction `signer_uuid` must be approved) + * @summary Delete reaction + * @param {ReactionReqBody} reactionReqBody + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + deleteReaction: async (reactionReqBody: ReactionReqBody, options: RawAxiosRequestConfig = {}): Promise => { + // verify required parameter 'reactionReqBody' is not null or undefined + assertParamExists('deleteReaction', 'reactionReqBody', reactionReqBody) + const localVarPath = `/farcaster/reaction`; + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'DELETE', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication ApiKeyAuth required + await setApiKeyToObject(localVarHeaderParameter, "x-api-key", configuration) + + + + localVarHeaderParameter['Content-Type'] = 'application/json'; + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + localVarRequestOptions.data = serializeDataIfNeeded(reactionReqBody, localVarRequestOptions, configuration) + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * Post a reaction (like or recast) to a given cast \\ (In order to post a reaction `signer_uuid` must be approved) + * @summary Post a reaction + * @param {ReactionReqBody} reactionReqBody + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + postReaction: async (reactionReqBody: ReactionReqBody, options: RawAxiosRequestConfig = {}): Promise => { + // verify required parameter 'reactionReqBody' is not null or undefined + assertParamExists('postReaction', 'reactionReqBody', reactionReqBody) + const localVarPath = `/farcaster/reaction`; + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication ApiKeyAuth required + await setApiKeyToObject(localVarHeaderParameter, "x-api-key", configuration) + + + + localVarHeaderParameter['Content-Type'] = 'application/json'; + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + localVarRequestOptions.data = serializeDataIfNeeded(reactionReqBody, localVarRequestOptions, configuration) + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * Fetches reactions for a given cast + * @summary Reactions for cast + * @param {string} hash + * @param {string} types Customize which reaction types the request should search for. This is a comma-separated string that can include the following values: \'likes\' and \'recasts\'. By default api returns both. To select multiple types, use a comma-separated list of these values. + * @param {number} [viewerFid] Providing this will return a list of reactions that respects this user\'s mutes and blocks and includes `viewer_context`. + * @param {number} [limit] Number of results to fetch (default 25, max 100) + * @param {string} [cursor] Pagination cursor. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + reactionsCast: async (hash: string, types: string, viewerFid?: number, limit?: number, cursor?: string, options: RawAxiosRequestConfig = {}): Promise => { + // verify required parameter 'hash' is not null or undefined + assertParamExists('reactionsCast', 'hash', hash) + // verify required parameter 'types' is not null or undefined + assertParamExists('reactionsCast', 'types', types) + const localVarPath = `/farcaster/reactions/cast`; + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication ApiKeyAuth required + await setApiKeyToObject(localVarHeaderParameter, "x-api-key", configuration) + + if (hash !== undefined) { + localVarQueryParameter['hash'] = hash; + } + + if (types !== undefined) { + localVarQueryParameter['types'] = types; + } + + if (viewerFid !== undefined) { + localVarQueryParameter['viewer_fid'] = viewerFid; + } + + if (limit !== undefined) { + localVarQueryParameter['limit'] = limit; + } + + if (cursor !== undefined) { + localVarQueryParameter['cursor'] = cursor; + } + + + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * Fetches reactions for a given user + * @summary Reactions for user + * @param {number} fid + * @param {ReactionsType} type Type of reaction to fetch (likes or recasts or all) + * @param {number} [viewerFid] Providing this will return a list of reactions that respects this user\'s mutes and blocks and includes `viewer_context`. + * @param {number} [limit] Number of results to fetch (default 25, max 100) + * @param {string} [cursor] Pagination cursor. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + reactionsUser: async (fid: number, type: ReactionsType, viewerFid?: number, limit?: number, cursor?: string, options: RawAxiosRequestConfig = {}): Promise => { + // verify required parameter 'fid' is not null or undefined + assertParamExists('reactionsUser', 'fid', fid) + // verify required parameter 'type' is not null or undefined + assertParamExists('reactionsUser', 'type', type) + const localVarPath = `/farcaster/reactions/user`; + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication ApiKeyAuth required + await setApiKeyToObject(localVarHeaderParameter, "x-api-key", configuration) + + if (fid !== undefined) { + localVarQueryParameter['fid'] = fid; + } + + if (viewerFid !== undefined) { + localVarQueryParameter['viewer_fid'] = viewerFid; + } + + if (type !== undefined) { + localVarQueryParameter['type'] = type; + } + + if (limit !== undefined) { + localVarQueryParameter['limit'] = limit; + } + + if (cursor !== undefined) { + localVarQueryParameter['cursor'] = cursor; + } + + + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + } +}; + +/** + * ReactionApi - functional programming interface + * @export + */ +export const ReactionApiFp = function(configuration?: Configuration) { + const localVarAxiosParamCreator = ReactionApiAxiosParamCreator(configuration) + return { + /** + * Delete a reaction (like or recast) to a cast \\ (In order to delete a reaction `signer_uuid` must be approved) + * @summary Delete reaction + * @param {ReactionReqBody} reactionReqBody + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async deleteReaction(reactionReqBody: ReactionReqBody, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.deleteReaction(reactionReqBody, options); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = operationServerMap['ReactionApi.deleteReaction']?.[localVarOperationServerIndex]?.url; + return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); + }, + /** + * Post a reaction (like or recast) to a given cast \\ (In order to post a reaction `signer_uuid` must be approved) + * @summary Post a reaction + * @param {ReactionReqBody} reactionReqBody + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async postReaction(reactionReqBody: ReactionReqBody, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.postReaction(reactionReqBody, options); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = operationServerMap['ReactionApi.postReaction']?.[localVarOperationServerIndex]?.url; + return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); + }, + /** + * Fetches reactions for a given cast + * @summary Reactions for cast + * @param {string} hash + * @param {string} types Customize which reaction types the request should search for. This is a comma-separated string that can include the following values: \'likes\' and \'recasts\'. By default api returns both. To select multiple types, use a comma-separated list of these values. + * @param {number} [viewerFid] Providing this will return a list of reactions that respects this user\'s mutes and blocks and includes `viewer_context`. + * @param {number} [limit] Number of results to fetch (default 25, max 100) + * @param {string} [cursor] Pagination cursor. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async reactionsCast(hash: string, types: string, viewerFid?: number, limit?: number, cursor?: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.reactionsCast(hash, types, viewerFid, limit, cursor, options); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = operationServerMap['ReactionApi.reactionsCast']?.[localVarOperationServerIndex]?.url; + return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); + }, + /** + * Fetches reactions for a given user + * @summary Reactions for user + * @param {number} fid + * @param {ReactionsType} type Type of reaction to fetch (likes or recasts or all) + * @param {number} [viewerFid] Providing this will return a list of reactions that respects this user\'s mutes and blocks and includes `viewer_context`. + * @param {number} [limit] Number of results to fetch (default 25, max 100) + * @param {string} [cursor] Pagination cursor. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async reactionsUser(fid: number, type: ReactionsType, viewerFid?: number, limit?: number, cursor?: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.reactionsUser(fid, type, viewerFid, limit, cursor, options); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = operationServerMap['ReactionApi.reactionsUser']?.[localVarOperationServerIndex]?.url; + return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); + }, + } +}; + +/** + * ReactionApi - factory interface + * @export + */ +export const ReactionApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) { + const localVarFp = ReactionApiFp(configuration) + return { + /** + * Delete a reaction (like or recast) to a cast \\ (In order to delete a reaction `signer_uuid` must be approved) + * @summary Delete reaction + * @param {ReactionReqBody} reactionReqBody + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + deleteReaction(reactionReqBody: ReactionReqBody, options?: RawAxiosRequestConfig): AxiosPromise { + return localVarFp.deleteReaction(reactionReqBody, options).then((request) => request(axios, basePath)); + }, + /** + * Post a reaction (like or recast) to a given cast \\ (In order to post a reaction `signer_uuid` must be approved) + * @summary Post a reaction + * @param {ReactionReqBody} reactionReqBody + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + postReaction(reactionReqBody: ReactionReqBody, options?: RawAxiosRequestConfig): AxiosPromise { + return localVarFp.postReaction(reactionReqBody, options).then((request) => request(axios, basePath)); + }, + /** + * Fetches reactions for a given cast + * @summary Reactions for cast + * @param {string} hash + * @param {string} types Customize which reaction types the request should search for. This is a comma-separated string that can include the following values: \'likes\' and \'recasts\'. By default api returns both. To select multiple types, use a comma-separated list of these values. + * @param {number} [viewerFid] Providing this will return a list of reactions that respects this user\'s mutes and blocks and includes `viewer_context`. + * @param {number} [limit] Number of results to fetch (default 25, max 100) + * @param {string} [cursor] Pagination cursor. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + reactionsCast(hash: string, types: string, viewerFid?: number, limit?: number, cursor?: string, options?: RawAxiosRequestConfig): AxiosPromise { + return localVarFp.reactionsCast(hash, types, viewerFid, limit, cursor, options).then((request) => request(axios, basePath)); + }, + /** + * Fetches reactions for a given user + * @summary Reactions for user + * @param {number} fid + * @param {ReactionsType} type Type of reaction to fetch (likes or recasts or all) + * @param {number} [viewerFid] Providing this will return a list of reactions that respects this user\'s mutes and blocks and includes `viewer_context`. + * @param {number} [limit] Number of results to fetch (default 25, max 100) + * @param {string} [cursor] Pagination cursor. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + reactionsUser(fid: number, type: ReactionsType, viewerFid?: number, limit?: number, cursor?: string, options?: RawAxiosRequestConfig): AxiosPromise { + return localVarFp.reactionsUser(fid, type, viewerFid, limit, cursor, options).then((request) => request(axios, basePath)); + }, + }; +}; + +/** + * ReactionApi - object-oriented interface + * @export + * @class ReactionApi + * @extends {BaseAPI} + */ +export class ReactionApi extends BaseAPI { + /** + * Delete a reaction (like or recast) to a cast \\ (In order to delete a reaction `signer_uuid` must be approved) + * @summary Delete reaction + * @param {ReactionReqBody} reactionReqBody + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof ReactionApi + */ + public deleteReaction(reactionReqBody: ReactionReqBody, options?: RawAxiosRequestConfig) { + return ReactionApiFp(this.configuration).deleteReaction(reactionReqBody, options).then((request) => request(this.axios, this.basePath)); + } + + /** + * Post a reaction (like or recast) to a given cast \\ (In order to post a reaction `signer_uuid` must be approved) + * @summary Post a reaction + * @param {ReactionReqBody} reactionReqBody + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof ReactionApi + */ + public postReaction(reactionReqBody: ReactionReqBody, options?: RawAxiosRequestConfig) { + return ReactionApiFp(this.configuration).postReaction(reactionReqBody, options).then((request) => request(this.axios, this.basePath)); + } + + /** + * Fetches reactions for a given cast + * @summary Reactions for cast + * @param {string} hash + * @param {string} types Customize which reaction types the request should search for. This is a comma-separated string that can include the following values: \'likes\' and \'recasts\'. By default api returns both. To select multiple types, use a comma-separated list of these values. + * @param {number} [viewerFid] Providing this will return a list of reactions that respects this user\'s mutes and blocks and includes `viewer_context`. + * @param {number} [limit] Number of results to fetch (default 25, max 100) + * @param {string} [cursor] Pagination cursor. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof ReactionApi + */ + public reactionsCast(hash: string, types: string, viewerFid?: number, limit?: number, cursor?: string, options?: RawAxiosRequestConfig) { + return ReactionApiFp(this.configuration).reactionsCast(hash, types, viewerFid, limit, cursor, options).then((request) => request(this.axios, this.basePath)); + } + + /** + * Fetches reactions for a given user + * @summary Reactions for user + * @param {number} fid + * @param {ReactionsType} type Type of reaction to fetch (likes or recasts or all) + * @param {number} [viewerFid] Providing this will return a list of reactions that respects this user\'s mutes and blocks and includes `viewer_context`. + * @param {number} [limit] Number of results to fetch (default 25, max 100) + * @param {string} [cursor] Pagination cursor. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof ReactionApi + */ + public reactionsUser(fid: number, type: ReactionsType, viewerFid?: number, limit?: number, cursor?: string, options?: RawAxiosRequestConfig) { + return ReactionApiFp(this.configuration).reactionsUser(fid, type, viewerFid, limit, cursor, options).then((request) => request(this.axios, this.basePath)); + } +} + diff --git a/src/neynar-api/v2/openapi-farcaster/apis/signer-api.ts b/src/neynar-api/v2/openapi-farcaster/apis/signer-api.ts new file mode 100644 index 00000000..83508178 --- /dev/null +++ b/src/neynar-api/v2/openapi-farcaster/apis/signer-api.ts @@ -0,0 +1,596 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Farcaster API V2 + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +import type { Configuration } from '../configuration'; +import type { AxiosPromise, AxiosInstance, RawAxiosRequestConfig } from 'axios'; +import globalAxios from 'axios'; +// Some imports not used depending on template conditions +// @ts-ignore +import { DUMMY_BASE_URL, assertParamExists, setApiKeyToObject, setBasicAuthToObject, setBearerAuthToObject, setOAuthToObject, setSearchParams, serializeDataIfNeeded, toPathString, createRequestFunction } from '../common'; +// @ts-ignore +import { BASE_PATH, COLLECTION_FORMATS, type RequestArgs, BaseAPI, RequiredError, operationServerMap } from '../base'; +// @ts-ignore +import type { AuthorizationUrlResponse } from '../models'; +// @ts-ignore +import type { AuthorizationUrlResponseType } from '../models'; +// @ts-ignore +import type { DeveloperManagedSigner } from '../models'; +// @ts-ignore +import type { ErrorRes } from '../models'; +// @ts-ignore +import type { RegisterDeveloperManagedSignedKeyReqBody } from '../models'; +// @ts-ignore +import type { RegisterSignerKeyReqBody } from '../models'; +// @ts-ignore +import type { Signer } from '../models'; +/** + * SignerApi - axios parameter creator + * @export + */ +export const SignerApiAxiosParamCreator = function (configuration?: Configuration) { + return { + /** + * Creates a signer and returns the signer status. \\ **Note**: While tesing please reuse the signer, it costs money to approve a signer. + * @summary Create signer + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + createSigner: async (options: RawAxiosRequestConfig = {}): Promise => { + const localVarPath = `/farcaster/signer`; + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication ApiKeyAuth required + await setApiKeyToObject(localVarHeaderParameter, "x-api-key", configuration) + + + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * Fetches the status of a developer managed signer by public key + * @summary Status by public key + * @param {string} publicKey + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + developerManagedSigner: async (publicKey: string, options: RawAxiosRequestConfig = {}): Promise => { + // verify required parameter 'publicKey' is not null or undefined + assertParamExists('developerManagedSigner', 'publicKey', publicKey) + const localVarPath = `/farcaster/signer/developer_managed`; + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication ApiKeyAuth required + await setApiKeyToObject(localVarHeaderParameter, "x-api-key", configuration) + + if (publicKey !== undefined) { + localVarQueryParameter['public_key'] = publicKey; + } + + + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * Fetch authorization url (Fetched authorized url useful for SIWN login operation) + * @summary Fetch authorization url + * @param {string} clientId + * @param {AuthorizationUrlResponseType} responseType + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + fetchAuthorizationUrl: async (clientId: string, responseType: AuthorizationUrlResponseType, options: RawAxiosRequestConfig = {}): Promise => { + // verify required parameter 'clientId' is not null or undefined + assertParamExists('fetchAuthorizationUrl', 'clientId', clientId) + // verify required parameter 'responseType' is not null or undefined + assertParamExists('fetchAuthorizationUrl', 'responseType', responseType) + const localVarPath = `/farcaster/login/authorize`; + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication ApiKeyAuth required + await setApiKeyToObject(localVarHeaderParameter, "x-api-key", configuration) + + if (clientId !== undefined) { + localVarQueryParameter['client_id'] = clientId; + } + + if (responseType !== undefined) { + localVarQueryParameter['response_type'] = responseType; + } + + + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * Publish a message to farcaster. The message must be signed by a signer managed by the developer. Use the @farcaster/core library to construct and sign the message. Use the Message.toJSON method on the signed message and pass the JSON in the body of this POST request. + * @summary Publish message + * @param {object} body + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + publishMessage: async (body: object, options: RawAxiosRequestConfig = {}): Promise => { + // verify required parameter 'body' is not null or undefined + assertParamExists('publishMessage', 'body', body) + const localVarPath = `/farcaster/message`; + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication ApiKeyAuth required + await setApiKeyToObject(localVarHeaderParameter, "x-api-key", configuration) + + + + localVarHeaderParameter['Content-Type'] = 'application/json'; + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + localVarRequestOptions.data = serializeDataIfNeeded(body, localVarRequestOptions, configuration) + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * Registers an app FID, deadline and a signature. Returns the signer status with an approval url. + * @summary Register Signed Key + * @param {RegisterSignerKeyReqBody} registerSignerKeyReqBody + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + registerSignedKey: async (registerSignerKeyReqBody: RegisterSignerKeyReqBody, options: RawAxiosRequestConfig = {}): Promise => { + // verify required parameter 'registerSignerKeyReqBody' is not null or undefined + assertParamExists('registerSignedKey', 'registerSignerKeyReqBody', registerSignerKeyReqBody) + const localVarPath = `/farcaster/signer/signed_key`; + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication ApiKeyAuth required + await setApiKeyToObject(localVarHeaderParameter, "x-api-key", configuration) + + + + localVarHeaderParameter['Content-Type'] = 'application/json'; + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + localVarRequestOptions.data = serializeDataIfNeeded(registerSignerKeyReqBody, localVarRequestOptions, configuration) + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * Registers an signed key and returns the developer managed signer status with an approval url. + * @summary Register Signed Key + * @param {RegisterDeveloperManagedSignedKeyReqBody} registerDeveloperManagedSignedKeyReqBody + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + registerSignedKeyForDeveloperManagedSigner: async (registerDeveloperManagedSignedKeyReqBody: RegisterDeveloperManagedSignedKeyReqBody, options: RawAxiosRequestConfig = {}): Promise => { + // verify required parameter 'registerDeveloperManagedSignedKeyReqBody' is not null or undefined + assertParamExists('registerSignedKeyForDeveloperManagedSigner', 'registerDeveloperManagedSignedKeyReqBody', registerDeveloperManagedSignedKeyReqBody) + const localVarPath = `/farcaster/signer/developer_managed/signed_key`; + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication ApiKeyAuth required + await setApiKeyToObject(localVarHeaderParameter, "x-api-key", configuration) + + + + localVarHeaderParameter['Content-Type'] = 'application/json'; + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + localVarRequestOptions.data = serializeDataIfNeeded(registerDeveloperManagedSignedKeyReqBody, localVarRequestOptions, configuration) + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * Gets information status of a signer by passing in a signer_uuid (Use post API to generate a signer) + * @summary Status + * @param {string} signerUuid + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + signer: async (signerUuid: string, options: RawAxiosRequestConfig = {}): Promise => { + // verify required parameter 'signerUuid' is not null or undefined + assertParamExists('signer', 'signerUuid', signerUuid) + const localVarPath = `/farcaster/signer`; + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication ApiKeyAuth required + await setApiKeyToObject(localVarHeaderParameter, "x-api-key", configuration) + + if (signerUuid !== undefined) { + localVarQueryParameter['signer_uuid'] = signerUuid; + } + + + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + } +}; + +/** + * SignerApi - functional programming interface + * @export + */ +export const SignerApiFp = function(configuration?: Configuration) { + const localVarAxiosParamCreator = SignerApiAxiosParamCreator(configuration) + return { + /** + * Creates a signer and returns the signer status. \\ **Note**: While tesing please reuse the signer, it costs money to approve a signer. + * @summary Create signer + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async createSigner(options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.createSigner(options); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = operationServerMap['SignerApi.createSigner']?.[localVarOperationServerIndex]?.url; + return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); + }, + /** + * Fetches the status of a developer managed signer by public key + * @summary Status by public key + * @param {string} publicKey + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async developerManagedSigner(publicKey: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.developerManagedSigner(publicKey, options); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = operationServerMap['SignerApi.developerManagedSigner']?.[localVarOperationServerIndex]?.url; + return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); + }, + /** + * Fetch authorization url (Fetched authorized url useful for SIWN login operation) + * @summary Fetch authorization url + * @param {string} clientId + * @param {AuthorizationUrlResponseType} responseType + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async fetchAuthorizationUrl(clientId: string, responseType: AuthorizationUrlResponseType, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.fetchAuthorizationUrl(clientId, responseType, options); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = operationServerMap['SignerApi.fetchAuthorizationUrl']?.[localVarOperationServerIndex]?.url; + return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); + }, + /** + * Publish a message to farcaster. The message must be signed by a signer managed by the developer. Use the @farcaster/core library to construct and sign the message. Use the Message.toJSON method on the signed message and pass the JSON in the body of this POST request. + * @summary Publish message + * @param {object} body + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async publishMessage(body: object, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.publishMessage(body, options); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = operationServerMap['SignerApi.publishMessage']?.[localVarOperationServerIndex]?.url; + return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); + }, + /** + * Registers an app FID, deadline and a signature. Returns the signer status with an approval url. + * @summary Register Signed Key + * @param {RegisterSignerKeyReqBody} registerSignerKeyReqBody + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async registerSignedKey(registerSignerKeyReqBody: RegisterSignerKeyReqBody, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.registerSignedKey(registerSignerKeyReqBody, options); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = operationServerMap['SignerApi.registerSignedKey']?.[localVarOperationServerIndex]?.url; + return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); + }, + /** + * Registers an signed key and returns the developer managed signer status with an approval url. + * @summary Register Signed Key + * @param {RegisterDeveloperManagedSignedKeyReqBody} registerDeveloperManagedSignedKeyReqBody + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async registerSignedKeyForDeveloperManagedSigner(registerDeveloperManagedSignedKeyReqBody: RegisterDeveloperManagedSignedKeyReqBody, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.registerSignedKeyForDeveloperManagedSigner(registerDeveloperManagedSignedKeyReqBody, options); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = operationServerMap['SignerApi.registerSignedKeyForDeveloperManagedSigner']?.[localVarOperationServerIndex]?.url; + return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); + }, + /** + * Gets information status of a signer by passing in a signer_uuid (Use post API to generate a signer) + * @summary Status + * @param {string} signerUuid + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async signer(signerUuid: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.signer(signerUuid, options); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = operationServerMap['SignerApi.signer']?.[localVarOperationServerIndex]?.url; + return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); + }, + } +}; + +/** + * SignerApi - factory interface + * @export + */ +export const SignerApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) { + const localVarFp = SignerApiFp(configuration) + return { + /** + * Creates a signer and returns the signer status. \\ **Note**: While tesing please reuse the signer, it costs money to approve a signer. + * @summary Create signer + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + createSigner(options?: RawAxiosRequestConfig): AxiosPromise { + return localVarFp.createSigner(options).then((request) => request(axios, basePath)); + }, + /** + * Fetches the status of a developer managed signer by public key + * @summary Status by public key + * @param {string} publicKey + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + developerManagedSigner(publicKey: string, options?: RawAxiosRequestConfig): AxiosPromise { + return localVarFp.developerManagedSigner(publicKey, options).then((request) => request(axios, basePath)); + }, + /** + * Fetch authorization url (Fetched authorized url useful for SIWN login operation) + * @summary Fetch authorization url + * @param {string} clientId + * @param {AuthorizationUrlResponseType} responseType + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + fetchAuthorizationUrl(clientId: string, responseType: AuthorizationUrlResponseType, options?: RawAxiosRequestConfig): AxiosPromise { + return localVarFp.fetchAuthorizationUrl(clientId, responseType, options).then((request) => request(axios, basePath)); + }, + /** + * Publish a message to farcaster. The message must be signed by a signer managed by the developer. Use the @farcaster/core library to construct and sign the message. Use the Message.toJSON method on the signed message and pass the JSON in the body of this POST request. + * @summary Publish message + * @param {object} body + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + publishMessage(body: object, options?: RawAxiosRequestConfig): AxiosPromise { + return localVarFp.publishMessage(body, options).then((request) => request(axios, basePath)); + }, + /** + * Registers an app FID, deadline and a signature. Returns the signer status with an approval url. + * @summary Register Signed Key + * @param {RegisterSignerKeyReqBody} registerSignerKeyReqBody + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + registerSignedKey(registerSignerKeyReqBody: RegisterSignerKeyReqBody, options?: RawAxiosRequestConfig): AxiosPromise { + return localVarFp.registerSignedKey(registerSignerKeyReqBody, options).then((request) => request(axios, basePath)); + }, + /** + * Registers an signed key and returns the developer managed signer status with an approval url. + * @summary Register Signed Key + * @param {RegisterDeveloperManagedSignedKeyReqBody} registerDeveloperManagedSignedKeyReqBody + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + registerSignedKeyForDeveloperManagedSigner(registerDeveloperManagedSignedKeyReqBody: RegisterDeveloperManagedSignedKeyReqBody, options?: RawAxiosRequestConfig): AxiosPromise { + return localVarFp.registerSignedKeyForDeveloperManagedSigner(registerDeveloperManagedSignedKeyReqBody, options).then((request) => request(axios, basePath)); + }, + /** + * Gets information status of a signer by passing in a signer_uuid (Use post API to generate a signer) + * @summary Status + * @param {string} signerUuid + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + signer(signerUuid: string, options?: RawAxiosRequestConfig): AxiosPromise { + return localVarFp.signer(signerUuid, options).then((request) => request(axios, basePath)); + }, + }; +}; + +/** + * SignerApi - object-oriented interface + * @export + * @class SignerApi + * @extends {BaseAPI} + */ +export class SignerApi extends BaseAPI { + /** + * Creates a signer and returns the signer status. \\ **Note**: While tesing please reuse the signer, it costs money to approve a signer. + * @summary Create signer + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof SignerApi + */ + public createSigner(options?: RawAxiosRequestConfig) { + return SignerApiFp(this.configuration).createSigner(options).then((request) => request(this.axios, this.basePath)); + } + + /** + * Fetches the status of a developer managed signer by public key + * @summary Status by public key + * @param {string} publicKey + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof SignerApi + */ + public developerManagedSigner(publicKey: string, options?: RawAxiosRequestConfig) { + return SignerApiFp(this.configuration).developerManagedSigner(publicKey, options).then((request) => request(this.axios, this.basePath)); + } + + /** + * Fetch authorization url (Fetched authorized url useful for SIWN login operation) + * @summary Fetch authorization url + * @param {string} clientId + * @param {AuthorizationUrlResponseType} responseType + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof SignerApi + */ + public fetchAuthorizationUrl(clientId: string, responseType: AuthorizationUrlResponseType, options?: RawAxiosRequestConfig) { + return SignerApiFp(this.configuration).fetchAuthorizationUrl(clientId, responseType, options).then((request) => request(this.axios, this.basePath)); + } + + /** + * Publish a message to farcaster. The message must be signed by a signer managed by the developer. Use the @farcaster/core library to construct and sign the message. Use the Message.toJSON method on the signed message and pass the JSON in the body of this POST request. + * @summary Publish message + * @param {object} body + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof SignerApi + */ + public publishMessage(body: object, options?: RawAxiosRequestConfig) { + return SignerApiFp(this.configuration).publishMessage(body, options).then((request) => request(this.axios, this.basePath)); + } + + /** + * Registers an app FID, deadline and a signature. Returns the signer status with an approval url. + * @summary Register Signed Key + * @param {RegisterSignerKeyReqBody} registerSignerKeyReqBody + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof SignerApi + */ + public registerSignedKey(registerSignerKeyReqBody: RegisterSignerKeyReqBody, options?: RawAxiosRequestConfig) { + return SignerApiFp(this.configuration).registerSignedKey(registerSignerKeyReqBody, options).then((request) => request(this.axios, this.basePath)); + } + + /** + * Registers an signed key and returns the developer managed signer status with an approval url. + * @summary Register Signed Key + * @param {RegisterDeveloperManagedSignedKeyReqBody} registerDeveloperManagedSignedKeyReqBody + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof SignerApi + */ + public registerSignedKeyForDeveloperManagedSigner(registerDeveloperManagedSignedKeyReqBody: RegisterDeveloperManagedSignedKeyReqBody, options?: RawAxiosRequestConfig) { + return SignerApiFp(this.configuration).registerSignedKeyForDeveloperManagedSigner(registerDeveloperManagedSignedKeyReqBody, options).then((request) => request(this.axios, this.basePath)); + } + + /** + * Gets information status of a signer by passing in a signer_uuid (Use post API to generate a signer) + * @summary Status + * @param {string} signerUuid + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof SignerApi + */ + public signer(signerUuid: string, options?: RawAxiosRequestConfig) { + return SignerApiFp(this.configuration).signer(signerUuid, options).then((request) => request(this.axios, this.basePath)); + } +} + diff --git a/src/neynar-api/v2/openapi-farcaster/apis/storage-api.ts b/src/neynar-api/v2/openapi-farcaster/apis/storage-api.ts new file mode 100644 index 00000000..2c57449f --- /dev/null +++ b/src/neynar-api/v2/openapi-farcaster/apis/storage-api.ts @@ -0,0 +1,296 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Farcaster API V2 + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +import type { Configuration } from '../configuration'; +import type { AxiosPromise, AxiosInstance, RawAxiosRequestConfig } from 'axios'; +import globalAxios from 'axios'; +// Some imports not used depending on template conditions +// @ts-ignore +import { DUMMY_BASE_URL, assertParamExists, setApiKeyToObject, setBasicAuthToObject, setBearerAuthToObject, setOAuthToObject, setSearchParams, serializeDataIfNeeded, toPathString, createRequestFunction } from '../common'; +// @ts-ignore +import { BASE_PATH, COLLECTION_FORMATS, type RequestArgs, BaseAPI, RequiredError, operationServerMap } from '../base'; +// @ts-ignore +import type { BuyStorageReqBody } from '../models'; +// @ts-ignore +import type { ConflictErrorRes } from '../models'; +// @ts-ignore +import type { ErrorRes } from '../models'; +// @ts-ignore +import type { StorageAllocationsResponse } from '../models'; +// @ts-ignore +import type { StorageUsageResponse } from '../models'; +// @ts-ignore +import type { ZodError } from '../models'; +/** + * StorageApi - axios parameter creator + * @export + */ +export const StorageApiAxiosParamCreator = function (configuration?: Configuration) { + return { + /** + * This api will help you rent units of storage for an year for a specific FID. A storage unit lets you store 5000 casts, 2500 reactions and 2500 links. + * @summary Buy storage + * @param {BuyStorageReqBody} buyStorageReqBody + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + buyStorage: async (buyStorageReqBody: BuyStorageReqBody, options: RawAxiosRequestConfig = {}): Promise => { + // verify required parameter 'buyStorageReqBody' is not null or undefined + assertParamExists('buyStorage', 'buyStorageReqBody', buyStorageReqBody) + const localVarPath = `/farcaster/storage/buy`; + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication ApiKeyAuth required + await setApiKeyToObject(localVarHeaderParameter, "x-api-key", configuration) + + + + localVarHeaderParameter['Content-Type'] = 'application/json'; + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + localVarRequestOptions.data = serializeDataIfNeeded(buyStorageReqBody, localVarRequestOptions, configuration) + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * Fetches storage allocations for a given user + * @summary Allocation of user + * @param {number} fid + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + storageAllocations: async (fid: number, options: RawAxiosRequestConfig = {}): Promise => { + // verify required parameter 'fid' is not null or undefined + assertParamExists('storageAllocations', 'fid', fid) + const localVarPath = `/farcaster/storage/allocations`; + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication ApiKeyAuth required + await setApiKeyToObject(localVarHeaderParameter, "x-api-key", configuration) + + if (fid !== undefined) { + localVarQueryParameter['fid'] = fid; + } + + + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * Fetches storage usage for a given user + * @summary Usage of user + * @param {number} fid + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + storageUsage: async (fid: number, options: RawAxiosRequestConfig = {}): Promise => { + // verify required parameter 'fid' is not null or undefined + assertParamExists('storageUsage', 'fid', fid) + const localVarPath = `/farcaster/storage/usage`; + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication ApiKeyAuth required + await setApiKeyToObject(localVarHeaderParameter, "x-api-key", configuration) + + if (fid !== undefined) { + localVarQueryParameter['fid'] = fid; + } + + + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + } +}; + +/** + * StorageApi - functional programming interface + * @export + */ +export const StorageApiFp = function(configuration?: Configuration) { + const localVarAxiosParamCreator = StorageApiAxiosParamCreator(configuration) + return { + /** + * This api will help you rent units of storage for an year for a specific FID. A storage unit lets you store 5000 casts, 2500 reactions and 2500 links. + * @summary Buy storage + * @param {BuyStorageReqBody} buyStorageReqBody + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async buyStorage(buyStorageReqBody: BuyStorageReqBody, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.buyStorage(buyStorageReqBody, options); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = operationServerMap['StorageApi.buyStorage']?.[localVarOperationServerIndex]?.url; + return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); + }, + /** + * Fetches storage allocations for a given user + * @summary Allocation of user + * @param {number} fid + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async storageAllocations(fid: number, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.storageAllocations(fid, options); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = operationServerMap['StorageApi.storageAllocations']?.[localVarOperationServerIndex]?.url; + return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); + }, + /** + * Fetches storage usage for a given user + * @summary Usage of user + * @param {number} fid + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async storageUsage(fid: number, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.storageUsage(fid, options); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = operationServerMap['StorageApi.storageUsage']?.[localVarOperationServerIndex]?.url; + return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); + }, + } +}; + +/** + * StorageApi - factory interface + * @export + */ +export const StorageApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) { + const localVarFp = StorageApiFp(configuration) + return { + /** + * This api will help you rent units of storage for an year for a specific FID. A storage unit lets you store 5000 casts, 2500 reactions and 2500 links. + * @summary Buy storage + * @param {BuyStorageReqBody} buyStorageReqBody + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + buyStorage(buyStorageReqBody: BuyStorageReqBody, options?: RawAxiosRequestConfig): AxiosPromise { + return localVarFp.buyStorage(buyStorageReqBody, options).then((request) => request(axios, basePath)); + }, + /** + * Fetches storage allocations for a given user + * @summary Allocation of user + * @param {number} fid + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + storageAllocations(fid: number, options?: RawAxiosRequestConfig): AxiosPromise { + return localVarFp.storageAllocations(fid, options).then((request) => request(axios, basePath)); + }, + /** + * Fetches storage usage for a given user + * @summary Usage of user + * @param {number} fid + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + storageUsage(fid: number, options?: RawAxiosRequestConfig): AxiosPromise { + return localVarFp.storageUsage(fid, options).then((request) => request(axios, basePath)); + }, + }; +}; + +/** + * StorageApi - object-oriented interface + * @export + * @class StorageApi + * @extends {BaseAPI} + */ +export class StorageApi extends BaseAPI { + /** + * This api will help you rent units of storage for an year for a specific FID. A storage unit lets you store 5000 casts, 2500 reactions and 2500 links. + * @summary Buy storage + * @param {BuyStorageReqBody} buyStorageReqBody + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof StorageApi + */ + public buyStorage(buyStorageReqBody: BuyStorageReqBody, options?: RawAxiosRequestConfig) { + return StorageApiFp(this.configuration).buyStorage(buyStorageReqBody, options).then((request) => request(this.axios, this.basePath)); + } + + /** + * Fetches storage allocations for a given user + * @summary Allocation of user + * @param {number} fid + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof StorageApi + */ + public storageAllocations(fid: number, options?: RawAxiosRequestConfig) { + return StorageApiFp(this.configuration).storageAllocations(fid, options).then((request) => request(this.axios, this.basePath)); + } + + /** + * Fetches storage usage for a given user + * @summary Usage of user + * @param {number} fid + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof StorageApi + */ + public storageUsage(fid: number, options?: RawAxiosRequestConfig) { + return StorageApiFp(this.configuration).storageUsage(fid, options).then((request) => request(this.axios, this.basePath)); + } +} + diff --git a/src/neynar-api/v2/openapi-farcaster/apis/subscribers-api.ts b/src/neynar-api/v2/openapi-farcaster/apis/subscribers-api.ts new file mode 100644 index 00000000..1b78f249 --- /dev/null +++ b/src/neynar-api/v2/openapi-farcaster/apis/subscribers-api.ts @@ -0,0 +1,343 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Farcaster API V2 + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +import type { Configuration } from '../configuration'; +import type { AxiosPromise, AxiosInstance, RawAxiosRequestConfig } from 'axios'; +import globalAxios from 'axios'; +// Some imports not used depending on template conditions +// @ts-ignore +import { DUMMY_BASE_URL, assertParamExists, setApiKeyToObject, setBasicAuthToObject, setBearerAuthToObject, setOAuthToObject, setSearchParams, serializeDataIfNeeded, toPathString, createRequestFunction } from '../common'; +// @ts-ignore +import { BASE_PATH, COLLECTION_FORMATS, type RequestArgs, BaseAPI, RequiredError, operationServerMap } from '../base'; +// @ts-ignore +import type { ErrorRes } from '../models'; +// @ts-ignore +import type { SubscribedToResponse } from '../models'; +// @ts-ignore +import type { SubscribersResponse } from '../models'; +// @ts-ignore +import type { SubscriptionProvider } from '../models'; +// @ts-ignore +import type { SubscriptionProviders } from '../models'; +// @ts-ignore +import type { SubscriptionsResponse } from '../models'; +/** + * SubscribersApi - axios parameter creator + * @export + */ +export const SubscribersApiAxiosParamCreator = function (configuration?: Configuration) { + return { + /** + * Fetch what FIDs and contracts a FID is subscribed to. + * @summary Subscribed to + * @param {number} fid + * @param {SubscriptionProvider} subscriptionProvider + * @param {number} [viewerFid] + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + subscribedTo: async (fid: number, subscriptionProvider: SubscriptionProvider, viewerFid?: number, options: RawAxiosRequestConfig = {}): Promise => { + // verify required parameter 'fid' is not null or undefined + assertParamExists('subscribedTo', 'fid', fid) + // verify required parameter 'subscriptionProvider' is not null or undefined + assertParamExists('subscribedTo', 'subscriptionProvider', subscriptionProvider) + const localVarPath = `/farcaster/user/subscribed_to`; + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication ApiKeyAuth required + await setApiKeyToObject(localVarHeaderParameter, "x-api-key", configuration) + + if (fid !== undefined) { + localVarQueryParameter['fid'] = fid; + } + + if (viewerFid !== undefined) { + localVarQueryParameter['viewer_fid'] = viewerFid; + } + + if (subscriptionProvider !== undefined) { + localVarQueryParameter['subscription_provider'] = subscriptionProvider; + } + + + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * Fetch subscribers for a given FID\'s contracts. Doesn\'t return addresses that don\'t have an FID. + * @summary Subscribers of a user + * @param {number} fid + * @param {SubscriptionProviders} subscriptionProvider + * @param {number} [viewerFid] + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + subscribers: async (fid: number, subscriptionProvider: SubscriptionProviders, viewerFid?: number, options: RawAxiosRequestConfig = {}): Promise => { + // verify required parameter 'fid' is not null or undefined + assertParamExists('subscribers', 'fid', fid) + // verify required parameter 'subscriptionProvider' is not null or undefined + assertParamExists('subscribers', 'subscriptionProvider', subscriptionProvider) + const localVarPath = `/farcaster/user/subscribers`; + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication ApiKeyAuth required + await setApiKeyToObject(localVarHeaderParameter, "x-api-key", configuration) + + if (fid !== undefined) { + localVarQueryParameter['fid'] = fid; + } + + if (viewerFid !== undefined) { + localVarQueryParameter['viewer_fid'] = viewerFid; + } + + if (subscriptionProvider !== undefined) { + localVarQueryParameter['subscription_provider'] = subscriptionProvider; + } + + + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * Fetch created subscriptions for a given FID\'s. + * @summary Subscriptions created by FID + * @param {number} fid + * @param {SubscriptionProvider} subscriptionProvider + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + subscriptionsCreated: async (fid: number, subscriptionProvider: SubscriptionProvider, options: RawAxiosRequestConfig = {}): Promise => { + // verify required parameter 'fid' is not null or undefined + assertParamExists('subscriptionsCreated', 'fid', fid) + // verify required parameter 'subscriptionProvider' is not null or undefined + assertParamExists('subscriptionsCreated', 'subscriptionProvider', subscriptionProvider) + const localVarPath = `/farcaster/user/subscriptions_created`; + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication ApiKeyAuth required + await setApiKeyToObject(localVarHeaderParameter, "x-api-key", configuration) + + if (fid !== undefined) { + localVarQueryParameter['fid'] = fid; + } + + if (subscriptionProvider !== undefined) { + localVarQueryParameter['subscription_provider'] = subscriptionProvider; + } + + + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + } +}; + +/** + * SubscribersApi - functional programming interface + * @export + */ +export const SubscribersApiFp = function(configuration?: Configuration) { + const localVarAxiosParamCreator = SubscribersApiAxiosParamCreator(configuration) + return { + /** + * Fetch what FIDs and contracts a FID is subscribed to. + * @summary Subscribed to + * @param {number} fid + * @param {SubscriptionProvider} subscriptionProvider + * @param {number} [viewerFid] + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async subscribedTo(fid: number, subscriptionProvider: SubscriptionProvider, viewerFid?: number, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.subscribedTo(fid, subscriptionProvider, viewerFid, options); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = operationServerMap['SubscribersApi.subscribedTo']?.[localVarOperationServerIndex]?.url; + return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); + }, + /** + * Fetch subscribers for a given FID\'s contracts. Doesn\'t return addresses that don\'t have an FID. + * @summary Subscribers of a user + * @param {number} fid + * @param {SubscriptionProviders} subscriptionProvider + * @param {number} [viewerFid] + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async subscribers(fid: number, subscriptionProvider: SubscriptionProviders, viewerFid?: number, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.subscribers(fid, subscriptionProvider, viewerFid, options); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = operationServerMap['SubscribersApi.subscribers']?.[localVarOperationServerIndex]?.url; + return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); + }, + /** + * Fetch created subscriptions for a given FID\'s. + * @summary Subscriptions created by FID + * @param {number} fid + * @param {SubscriptionProvider} subscriptionProvider + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async subscriptionsCreated(fid: number, subscriptionProvider: SubscriptionProvider, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.subscriptionsCreated(fid, subscriptionProvider, options); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = operationServerMap['SubscribersApi.subscriptionsCreated']?.[localVarOperationServerIndex]?.url; + return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); + }, + } +}; + +/** + * SubscribersApi - factory interface + * @export + */ +export const SubscribersApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) { + const localVarFp = SubscribersApiFp(configuration) + return { + /** + * Fetch what FIDs and contracts a FID is subscribed to. + * @summary Subscribed to + * @param {number} fid + * @param {SubscriptionProvider} subscriptionProvider + * @param {number} [viewerFid] + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + subscribedTo(fid: number, subscriptionProvider: SubscriptionProvider, viewerFid?: number, options?: RawAxiosRequestConfig): AxiosPromise { + return localVarFp.subscribedTo(fid, subscriptionProvider, viewerFid, options).then((request) => request(axios, basePath)); + }, + /** + * Fetch subscribers for a given FID\'s contracts. Doesn\'t return addresses that don\'t have an FID. + * @summary Subscribers of a user + * @param {number} fid + * @param {SubscriptionProviders} subscriptionProvider + * @param {number} [viewerFid] + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + subscribers(fid: number, subscriptionProvider: SubscriptionProviders, viewerFid?: number, options?: RawAxiosRequestConfig): AxiosPromise { + return localVarFp.subscribers(fid, subscriptionProvider, viewerFid, options).then((request) => request(axios, basePath)); + }, + /** + * Fetch created subscriptions for a given FID\'s. + * @summary Subscriptions created by FID + * @param {number} fid + * @param {SubscriptionProvider} subscriptionProvider + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + subscriptionsCreated(fid: number, subscriptionProvider: SubscriptionProvider, options?: RawAxiosRequestConfig): AxiosPromise { + return localVarFp.subscriptionsCreated(fid, subscriptionProvider, options).then((request) => request(axios, basePath)); + }, + }; +}; + +/** + * SubscribersApi - object-oriented interface + * @export + * @class SubscribersApi + * @extends {BaseAPI} + */ +export class SubscribersApi extends BaseAPI { + /** + * Fetch what FIDs and contracts a FID is subscribed to. + * @summary Subscribed to + * @param {number} fid + * @param {SubscriptionProvider} subscriptionProvider + * @param {number} [viewerFid] + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof SubscribersApi + */ + public subscribedTo(fid: number, subscriptionProvider: SubscriptionProvider, viewerFid?: number, options?: RawAxiosRequestConfig) { + return SubscribersApiFp(this.configuration).subscribedTo(fid, subscriptionProvider, viewerFid, options).then((request) => request(this.axios, this.basePath)); + } + + /** + * Fetch subscribers for a given FID\'s contracts. Doesn\'t return addresses that don\'t have an FID. + * @summary Subscribers of a user + * @param {number} fid + * @param {SubscriptionProviders} subscriptionProvider + * @param {number} [viewerFid] + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof SubscribersApi + */ + public subscribers(fid: number, subscriptionProvider: SubscriptionProviders, viewerFid?: number, options?: RawAxiosRequestConfig) { + return SubscribersApiFp(this.configuration).subscribers(fid, subscriptionProvider, viewerFid, options).then((request) => request(this.axios, this.basePath)); + } + + /** + * Fetch created subscriptions for a given FID\'s. + * @summary Subscriptions created by FID + * @param {number} fid + * @param {SubscriptionProvider} subscriptionProvider + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof SubscribersApi + */ + public subscriptionsCreated(fid: number, subscriptionProvider: SubscriptionProvider, options?: RawAxiosRequestConfig) { + return SubscribersApiFp(this.configuration).subscriptionsCreated(fid, subscriptionProvider, options).then((request) => request(this.axios, this.basePath)); + } +} + diff --git a/src/neynar-api/v2/openapi-farcaster/apis/user-api.ts b/src/neynar-api/v2/openapi-farcaster/apis/user-api.ts new file mode 100644 index 00000000..3d321898 --- /dev/null +++ b/src/neynar-api/v2/openapi-farcaster/apis/user-api.ts @@ -0,0 +1,1273 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Farcaster API V2 + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +import type { Configuration } from '../configuration'; +import type { AxiosPromise, AxiosInstance, RawAxiosRequestConfig } from 'axios'; +import globalAxios from 'axios'; +// Some imports not used depending on template conditions +// @ts-ignore +import { DUMMY_BASE_URL, assertParamExists, setApiKeyToObject, setBasicAuthToObject, setBearerAuthToObject, setOAuthToObject, setSearchParams, serializeDataIfNeeded, toPathString, createRequestFunction } from '../common'; +// @ts-ignore +import { BASE_PATH, COLLECTION_FORMATS, type RequestArgs, BaseAPI, RequiredError, operationServerMap } from '../base'; +// @ts-ignore +import type { AddVerificationReqBody } from '../models'; +// @ts-ignore +import type { BulkFollowResponse } from '../models'; +// @ts-ignore +import type { BulkUsersResponse } from '../models'; +// @ts-ignore +import type { ConflictErrorRes } from '../models'; +// @ts-ignore +import type { ErrorRes } from '../models'; +// @ts-ignore +import type { FollowReqBody } from '../models'; +// @ts-ignore +import type { OperationResponse } from '../models'; +// @ts-ignore +import type { RegisterUserReqBody } from '../models'; +// @ts-ignore +import type { RegisterUserResponse } from '../models'; +// @ts-ignore +import type { RemoveVerificationReqBody } from '../models'; +// @ts-ignore +import type { UpdateUserReqBody } from '../models'; +// @ts-ignore +import type { User } from '../models'; +// @ts-ignore +import type { UserFIDResponse } from '../models'; +// @ts-ignore +import type { UserPowerLiteResponse } from '../models'; +// @ts-ignore +import type { UserResponse } from '../models'; +// @ts-ignore +import type { UserSearchResponse } from '../models'; +// @ts-ignore +import type { UsersResponse } from '../models'; +/** + * UserApi - axios parameter creator + * @export + */ +export const UserApiAxiosParamCreator = function (configuration?: Configuration) { + return { + /** + * Warpcast has deprecated the active badge. Use user/power endpoint instead. + * @summary Fetch active users + * @param {number} [limit] + * @param {string} [cursor] Pagination cursor. + * @param {*} [options] Override http request option. + * @deprecated + * @throws {RequiredError} + */ + activeUsers: async (limit?: number, cursor?: string, options: RawAxiosRequestConfig = {}): Promise => { + const localVarPath = `/farcaster/user/active`; + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication ApiKeyAuth required + await setApiKeyToObject(localVarHeaderParameter, "x-api-key", configuration) + + if (limit !== undefined) { + localVarQueryParameter['limit'] = limit; + } + + if (cursor !== undefined) { + localVarQueryParameter['cursor'] = cursor; + } + + + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * Removes verification for an eth address for the user \\ (In order to delete verification `signer_uuid` must be approved) + * @summary Delete verification + * @param {RemoveVerificationReqBody} removeVerificationReqBody + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + farcasterUserVerificationDelete: async (removeVerificationReqBody: RemoveVerificationReqBody, options: RawAxiosRequestConfig = {}): Promise => { + // verify required parameter 'removeVerificationReqBody' is not null or undefined + assertParamExists('farcasterUserVerificationDelete', 'removeVerificationReqBody', removeVerificationReqBody) + const localVarPath = `/farcaster/user/verification`; + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'DELETE', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication ApiKeyAuth required + await setApiKeyToObject(localVarHeaderParameter, "x-api-key", configuration) + + + + localVarHeaderParameter['Content-Type'] = 'application/json'; + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + localVarRequestOptions.data = serializeDataIfNeeded(removeVerificationReqBody, localVarRequestOptions, configuration) + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * Adds verification for an eth address or contract for the user \\ (In order to add verification `signer_uuid` must be approved) + * @summary Add verification + * @param {AddVerificationReqBody} addVerificationReqBody + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + farcasterUserVerificationPost: async (addVerificationReqBody: AddVerificationReqBody, options: RawAxiosRequestConfig = {}): Promise => { + // verify required parameter 'addVerificationReqBody' is not null or undefined + assertParamExists('farcasterUserVerificationPost', 'addVerificationReqBody', addVerificationReqBody) + const localVarPath = `/farcaster/user/verification`; + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication ApiKeyAuth required + await setApiKeyToObject(localVarHeaderParameter, "x-api-key", configuration) + + + + localVarHeaderParameter['Content-Type'] = 'application/json'; + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + localVarRequestOptions.data = serializeDataIfNeeded(addVerificationReqBody, localVarRequestOptions, configuration) + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * Follow a user \\ (In order to follow a user `signer_uuid` must be approved) + * @summary Follow user + * @param {FollowReqBody} followReqBody + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + followUser: async (followReqBody: FollowReqBody, options: RawAxiosRequestConfig = {}): Promise => { + // verify required parameter 'followReqBody' is not null or undefined + assertParamExists('followUser', 'followReqBody', followReqBody) + const localVarPath = `/farcaster/user/follow`; + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication ApiKeyAuth required + await setApiKeyToObject(localVarHeaderParameter, "x-api-key", configuration) + + + + localVarHeaderParameter['Content-Type'] = 'application/json'; + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + localVarRequestOptions.data = serializeDataIfNeeded(followReqBody, localVarRequestOptions, configuration) + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * Fetches FID to [assign it to new user](https://docs.neynar.com/reference/register-user) + * @summary Fetch fresh FID + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + getFreshFid: async (options: RawAxiosRequestConfig = {}): Promise => { + const localVarPath = `/farcaster/user/fid`; + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication ApiKeyAuth required + await setApiKeyToObject(localVarHeaderParameter, "x-api-key", configuration) + + + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * Lookup a user by custody-address + * @summary By custody-address + * @param {string} custodyAddress Custody Address associated with mnemonic + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + lookupUserByCustodyAddress: async (custodyAddress: string, options: RawAxiosRequestConfig = {}): Promise => { + // verify required parameter 'custodyAddress' is not null or undefined + assertParamExists('lookupUserByCustodyAddress', 'custodyAddress', custodyAddress) + const localVarPath = `/farcaster/user/custody-address`; + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication ApiKeyAuth required + await setApiKeyToObject(localVarHeaderParameter, "x-api-key", configuration) + + if (custodyAddress !== undefined) { + localVarQueryParameter['custody_address'] = custodyAddress; + } + + + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * Fetches power users based on Warpcast power badges. Information is updated once a day. + * @summary Power users + * @param {number} [viewerFid] + * @param {number} [limit] Number of power users to fetch, max 100 + * @param {string} [cursor] Pagination cursor. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + powerUsers: async (viewerFid?: number, limit?: number, cursor?: string, options: RawAxiosRequestConfig = {}): Promise => { + const localVarPath = `/farcaster/user/power`; + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication ApiKeyAuth required + await setApiKeyToObject(localVarHeaderParameter, "x-api-key", configuration) + + if (viewerFid !== undefined) { + localVarQueryParameter['viewer_fid'] = viewerFid; + } + + if (limit !== undefined) { + localVarQueryParameter['limit'] = limit; + } + + if (cursor !== undefined) { + localVarQueryParameter['cursor'] = cursor; + } + + + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * Register account on farcaster. **Note:** This API must be called within 10 minutes of the fetch FID API call (i.e., /v2/farcaster/user/fid). Otherwise, Neynar will assign this FID to another available user. + * @summary Register new account + * @param {RegisterUserReqBody} registerUserReqBody + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + registerUser: async (registerUserReqBody: RegisterUserReqBody, options: RawAxiosRequestConfig = {}): Promise => { + // verify required parameter 'registerUserReqBody' is not null or undefined + assertParamExists('registerUser', 'registerUserReqBody', registerUserReqBody) + const localVarPath = `/farcaster/user`; + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication ApiKeyAuth required + await setApiKeyToObject(localVarHeaderParameter, "x-api-key", configuration) + + + + localVarHeaderParameter['Content-Type'] = 'application/json'; + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + localVarRequestOptions.data = serializeDataIfNeeded(registerUserReqBody, localVarRequestOptions, configuration) + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * Unfollow a user \\ (In order to unfollow a user `signer_uuid` must be approved) + * @summary Unfollow user + * @param {FollowReqBody} followReqBody + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + unfollowUser: async (followReqBody: FollowReqBody, options: RawAxiosRequestConfig = {}): Promise => { + // verify required parameter 'followReqBody' is not null or undefined + assertParamExists('unfollowUser', 'followReqBody', followReqBody) + const localVarPath = `/farcaster/user/follow`; + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'DELETE', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication ApiKeyAuth required + await setApiKeyToObject(localVarHeaderParameter, "x-api-key", configuration) + + + + localVarHeaderParameter['Content-Type'] = 'application/json'; + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + localVarRequestOptions.data = serializeDataIfNeeded(followReqBody, localVarRequestOptions, configuration) + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * Update user profile \\ (In order to update user\'s profile `signer_uuid` must be approved) + * @summary Update user profile + * @param {UpdateUserReqBody} updateUserReqBody + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + updateUser: async (updateUserReqBody: UpdateUserReqBody, options: RawAxiosRequestConfig = {}): Promise => { + // verify required parameter 'updateUserReqBody' is not null or undefined + assertParamExists('updateUser', 'updateUserReqBody', updateUserReqBody) + const localVarPath = `/farcaster/user`; + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'PATCH', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication ApiKeyAuth required + await setApiKeyToObject(localVarHeaderParameter, "x-api-key", configuration) + + + + localVarHeaderParameter['Content-Type'] = 'application/json'; + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + localVarRequestOptions.data = serializeDataIfNeeded(updateUserReqBody, localVarRequestOptions, configuration) + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * Fetches information about multiple users based on FIDs + * @summary By FIDs + * @param {string} fids Comma separated list of FIDs, up to 100 at a time + * @param {number} [viewerFid] + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + userBulk: async (fids: string, viewerFid?: number, options: RawAxiosRequestConfig = {}): Promise => { + // verify required parameter 'fids' is not null or undefined + assertParamExists('userBulk', 'fids', fids) + const localVarPath = `/farcaster/user/bulk`; + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication ApiKeyAuth required + await setApiKeyToObject(localVarHeaderParameter, "x-api-key", configuration) + + if (fids !== undefined) { + localVarQueryParameter['fids'] = fids; + } + + if (viewerFid !== undefined) { + localVarQueryParameter['viewer_fid'] = viewerFid; + } + + + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * Fetches all users based on multiple Ethereum or Solana addresses. Each farcaster user has a custody Ethereum address and optionally verified Ethereum or Solana addresses. This endpoint returns all users that have any of the given addresses as their custody or verified Ethereum or Solana addresses. A custody address can be associated with only 1 farcaster user at a time but a verified address can be associated with multiple users. You can pass in Ethereum and Solana addresses, comma separated, in the same request. The response will contain users associated with the given addresses. + * @summary By Eth or Sol addresses + * @param {string} addresses Comma separated list of Ethereum addresses, up to 350 at a time + * @param {string} [addressTypes] Customize which address types the request should search for. This is a comma-separated string that can include the following values: \'custody_address\' and \'verified_address\'. By default api returns both. To select multiple types, use a comma-separated list of these values. + * @param {number} [viewerFid] + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + userBulkByAddress: async (addresses: string, addressTypes?: string, viewerFid?: number, options: RawAxiosRequestConfig = {}): Promise => { + // verify required parameter 'addresses' is not null or undefined + assertParamExists('userBulkByAddress', 'addresses', addresses) + const localVarPath = `/farcaster/user/bulk-by-address`; + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication ApiKeyAuth required + await setApiKeyToObject(localVarHeaderParameter, "x-api-key", configuration) + + if (addresses !== undefined) { + localVarQueryParameter['addresses'] = addresses; + } + + if (addressTypes !== undefined) { + localVarQueryParameter['address_types'] = addressTypes; + } + + if (viewerFid !== undefined) { + localVarQueryParameter['viewer_fid'] = viewerFid; + } + + + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * Fetches a single hydrated user object given a username + * @summary By username + * @param {string} username Username of the user to fetch + * @param {number} [viewerFid] + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + userByUsernameV2: async (username: string, viewerFid?: number, options: RawAxiosRequestConfig = {}): Promise => { + // verify required parameter 'username' is not null or undefined + assertParamExists('userByUsernameV2', 'username', username) + const localVarPath = `/farcaster/user/by_username`; + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication ApiKeyAuth required + await setApiKeyToObject(localVarHeaderParameter, "x-api-key", configuration) + + if (username !== undefined) { + localVarQueryParameter['username'] = username; + } + + if (viewerFid !== undefined) { + localVarQueryParameter['viewer_fid'] = viewerFid; + } + + + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * Fetches power users and respond in a backwards compatible format to Warpcast\'s deprecated power badge endpoint. + * @summary Power user FIDs + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + userPowerLite: async (options: RawAxiosRequestConfig = {}): Promise => { + const localVarPath = `/farcaster/user/power_lite`; + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication ApiKeyAuth required + await setApiKeyToObject(localVarHeaderParameter, "x-api-key", configuration) + + + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * Search for Usernames + * @summary Search for Usernames + * @param {string} q + * @param {number} [viewerFid] Providing this will return search results that respects this user\'s mutes and blocks and includes `viewer_context`. + * @param {number} [limit] + * @param {string} [cursor] Pagination cursor. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + userSearch: async (q: string, viewerFid?: number, limit?: number, cursor?: string, options: RawAxiosRequestConfig = {}): Promise => { + // verify required parameter 'q' is not null or undefined + assertParamExists('userSearch', 'q', q) + const localVarPath = `/farcaster/user/search`; + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication ApiKeyAuth required + await setApiKeyToObject(localVarHeaderParameter, "x-api-key", configuration) + + if (q !== undefined) { + localVarQueryParameter['q'] = q; + } + + if (viewerFid !== undefined) { + localVarQueryParameter['viewer_fid'] = viewerFid; + } + + if (limit !== undefined) { + localVarQueryParameter['limit'] = limit; + } + + if (cursor !== undefined) { + localVarQueryParameter['cursor'] = cursor; + } + + + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + } +}; + +/** + * UserApi - functional programming interface + * @export + */ +export const UserApiFp = function(configuration?: Configuration) { + const localVarAxiosParamCreator = UserApiAxiosParamCreator(configuration) + return { + /** + * Warpcast has deprecated the active badge. Use user/power endpoint instead. + * @summary Fetch active users + * @param {number} [limit] + * @param {string} [cursor] Pagination cursor. + * @param {*} [options] Override http request option. + * @deprecated + * @throws {RequiredError} + */ + async activeUsers(limit?: number, cursor?: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.activeUsers(limit, cursor, options); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = operationServerMap['UserApi.activeUsers']?.[localVarOperationServerIndex]?.url; + return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); + }, + /** + * Removes verification for an eth address for the user \\ (In order to delete verification `signer_uuid` must be approved) + * @summary Delete verification + * @param {RemoveVerificationReqBody} removeVerificationReqBody + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async farcasterUserVerificationDelete(removeVerificationReqBody: RemoveVerificationReqBody, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.farcasterUserVerificationDelete(removeVerificationReqBody, options); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = operationServerMap['UserApi.farcasterUserVerificationDelete']?.[localVarOperationServerIndex]?.url; + return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); + }, + /** + * Adds verification for an eth address or contract for the user \\ (In order to add verification `signer_uuid` must be approved) + * @summary Add verification + * @param {AddVerificationReqBody} addVerificationReqBody + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async farcasterUserVerificationPost(addVerificationReqBody: AddVerificationReqBody, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.farcasterUserVerificationPost(addVerificationReqBody, options); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = operationServerMap['UserApi.farcasterUserVerificationPost']?.[localVarOperationServerIndex]?.url; + return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); + }, + /** + * Follow a user \\ (In order to follow a user `signer_uuid` must be approved) + * @summary Follow user + * @param {FollowReqBody} followReqBody + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async followUser(followReqBody: FollowReqBody, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.followUser(followReqBody, options); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = operationServerMap['UserApi.followUser']?.[localVarOperationServerIndex]?.url; + return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); + }, + /** + * Fetches FID to [assign it to new user](https://docs.neynar.com/reference/register-user) + * @summary Fetch fresh FID + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async getFreshFid(options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.getFreshFid(options); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = operationServerMap['UserApi.getFreshFid']?.[localVarOperationServerIndex]?.url; + return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); + }, + /** + * Lookup a user by custody-address + * @summary By custody-address + * @param {string} custodyAddress Custody Address associated with mnemonic + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async lookupUserByCustodyAddress(custodyAddress: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.lookupUserByCustodyAddress(custodyAddress, options); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = operationServerMap['UserApi.lookupUserByCustodyAddress']?.[localVarOperationServerIndex]?.url; + return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); + }, + /** + * Fetches power users based on Warpcast power badges. Information is updated once a day. + * @summary Power users + * @param {number} [viewerFid] + * @param {number} [limit] Number of power users to fetch, max 100 + * @param {string} [cursor] Pagination cursor. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async powerUsers(viewerFid?: number, limit?: number, cursor?: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.powerUsers(viewerFid, limit, cursor, options); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = operationServerMap['UserApi.powerUsers']?.[localVarOperationServerIndex]?.url; + return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); + }, + /** + * Register account on farcaster. **Note:** This API must be called within 10 minutes of the fetch FID API call (i.e., /v2/farcaster/user/fid). Otherwise, Neynar will assign this FID to another available user. + * @summary Register new account + * @param {RegisterUserReqBody} registerUserReqBody + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async registerUser(registerUserReqBody: RegisterUserReqBody, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.registerUser(registerUserReqBody, options); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = operationServerMap['UserApi.registerUser']?.[localVarOperationServerIndex]?.url; + return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); + }, + /** + * Unfollow a user \\ (In order to unfollow a user `signer_uuid` must be approved) + * @summary Unfollow user + * @param {FollowReqBody} followReqBody + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async unfollowUser(followReqBody: FollowReqBody, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.unfollowUser(followReqBody, options); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = operationServerMap['UserApi.unfollowUser']?.[localVarOperationServerIndex]?.url; + return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); + }, + /** + * Update user profile \\ (In order to update user\'s profile `signer_uuid` must be approved) + * @summary Update user profile + * @param {UpdateUserReqBody} updateUserReqBody + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async updateUser(updateUserReqBody: UpdateUserReqBody, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.updateUser(updateUserReqBody, options); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = operationServerMap['UserApi.updateUser']?.[localVarOperationServerIndex]?.url; + return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); + }, + /** + * Fetches information about multiple users based on FIDs + * @summary By FIDs + * @param {string} fids Comma separated list of FIDs, up to 100 at a time + * @param {number} [viewerFid] + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async userBulk(fids: string, viewerFid?: number, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.userBulk(fids, viewerFid, options); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = operationServerMap['UserApi.userBulk']?.[localVarOperationServerIndex]?.url; + return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); + }, + /** + * Fetches all users based on multiple Ethereum or Solana addresses. Each farcaster user has a custody Ethereum address and optionally verified Ethereum or Solana addresses. This endpoint returns all users that have any of the given addresses as their custody or verified Ethereum or Solana addresses. A custody address can be associated with only 1 farcaster user at a time but a verified address can be associated with multiple users. You can pass in Ethereum and Solana addresses, comma separated, in the same request. The response will contain users associated with the given addresses. + * @summary By Eth or Sol addresses + * @param {string} addresses Comma separated list of Ethereum addresses, up to 350 at a time + * @param {string} [addressTypes] Customize which address types the request should search for. This is a comma-separated string that can include the following values: \'custody_address\' and \'verified_address\'. By default api returns both. To select multiple types, use a comma-separated list of these values. + * @param {number} [viewerFid] + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async userBulkByAddress(addresses: string, addressTypes?: string, viewerFid?: number, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<{ [key: string]: Array; }>> { + const localVarAxiosArgs = await localVarAxiosParamCreator.userBulkByAddress(addresses, addressTypes, viewerFid, options); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = operationServerMap['UserApi.userBulkByAddress']?.[localVarOperationServerIndex]?.url; + return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); + }, + /** + * Fetches a single hydrated user object given a username + * @summary By username + * @param {string} username Username of the user to fetch + * @param {number} [viewerFid] + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async userByUsernameV2(username: string, viewerFid?: number, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.userByUsernameV2(username, viewerFid, options); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = operationServerMap['UserApi.userByUsernameV2']?.[localVarOperationServerIndex]?.url; + return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); + }, + /** + * Fetches power users and respond in a backwards compatible format to Warpcast\'s deprecated power badge endpoint. + * @summary Power user FIDs + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async userPowerLite(options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.userPowerLite(options); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = operationServerMap['UserApi.userPowerLite']?.[localVarOperationServerIndex]?.url; + return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); + }, + /** + * Search for Usernames + * @summary Search for Usernames + * @param {string} q + * @param {number} [viewerFid] Providing this will return search results that respects this user\'s mutes and blocks and includes `viewer_context`. + * @param {number} [limit] + * @param {string} [cursor] Pagination cursor. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async userSearch(q: string, viewerFid?: number, limit?: number, cursor?: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.userSearch(q, viewerFid, limit, cursor, options); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = operationServerMap['UserApi.userSearch']?.[localVarOperationServerIndex]?.url; + return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); + }, + } +}; + +/** + * UserApi - factory interface + * @export + */ +export const UserApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) { + const localVarFp = UserApiFp(configuration) + return { + /** + * Warpcast has deprecated the active badge. Use user/power endpoint instead. + * @summary Fetch active users + * @param {number} [limit] + * @param {string} [cursor] Pagination cursor. + * @param {*} [options] Override http request option. + * @deprecated + * @throws {RequiredError} + */ + activeUsers(limit?: number, cursor?: string, options?: RawAxiosRequestConfig): AxiosPromise { + return localVarFp.activeUsers(limit, cursor, options).then((request) => request(axios, basePath)); + }, + /** + * Removes verification for an eth address for the user \\ (In order to delete verification `signer_uuid` must be approved) + * @summary Delete verification + * @param {RemoveVerificationReqBody} removeVerificationReqBody + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + farcasterUserVerificationDelete(removeVerificationReqBody: RemoveVerificationReqBody, options?: RawAxiosRequestConfig): AxiosPromise { + return localVarFp.farcasterUserVerificationDelete(removeVerificationReqBody, options).then((request) => request(axios, basePath)); + }, + /** + * Adds verification for an eth address or contract for the user \\ (In order to add verification `signer_uuid` must be approved) + * @summary Add verification + * @param {AddVerificationReqBody} addVerificationReqBody + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + farcasterUserVerificationPost(addVerificationReqBody: AddVerificationReqBody, options?: RawAxiosRequestConfig): AxiosPromise { + return localVarFp.farcasterUserVerificationPost(addVerificationReqBody, options).then((request) => request(axios, basePath)); + }, + /** + * Follow a user \\ (In order to follow a user `signer_uuid` must be approved) + * @summary Follow user + * @param {FollowReqBody} followReqBody + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + followUser(followReqBody: FollowReqBody, options?: RawAxiosRequestConfig): AxiosPromise { + return localVarFp.followUser(followReqBody, options).then((request) => request(axios, basePath)); + }, + /** + * Fetches FID to [assign it to new user](https://docs.neynar.com/reference/register-user) + * @summary Fetch fresh FID + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + getFreshFid(options?: RawAxiosRequestConfig): AxiosPromise { + return localVarFp.getFreshFid(options).then((request) => request(axios, basePath)); + }, + /** + * Lookup a user by custody-address + * @summary By custody-address + * @param {string} custodyAddress Custody Address associated with mnemonic + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + lookupUserByCustodyAddress(custodyAddress: string, options?: RawAxiosRequestConfig): AxiosPromise { + return localVarFp.lookupUserByCustodyAddress(custodyAddress, options).then((request) => request(axios, basePath)); + }, + /** + * Fetches power users based on Warpcast power badges. Information is updated once a day. + * @summary Power users + * @param {number} [viewerFid] + * @param {number} [limit] Number of power users to fetch, max 100 + * @param {string} [cursor] Pagination cursor. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + powerUsers(viewerFid?: number, limit?: number, cursor?: string, options?: RawAxiosRequestConfig): AxiosPromise { + return localVarFp.powerUsers(viewerFid, limit, cursor, options).then((request) => request(axios, basePath)); + }, + /** + * Register account on farcaster. **Note:** This API must be called within 10 minutes of the fetch FID API call (i.e., /v2/farcaster/user/fid). Otherwise, Neynar will assign this FID to another available user. + * @summary Register new account + * @param {RegisterUserReqBody} registerUserReqBody + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + registerUser(registerUserReqBody: RegisterUserReqBody, options?: RawAxiosRequestConfig): AxiosPromise { + return localVarFp.registerUser(registerUserReqBody, options).then((request) => request(axios, basePath)); + }, + /** + * Unfollow a user \\ (In order to unfollow a user `signer_uuid` must be approved) + * @summary Unfollow user + * @param {FollowReqBody} followReqBody + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + unfollowUser(followReqBody: FollowReqBody, options?: RawAxiosRequestConfig): AxiosPromise { + return localVarFp.unfollowUser(followReqBody, options).then((request) => request(axios, basePath)); + }, + /** + * Update user profile \\ (In order to update user\'s profile `signer_uuid` must be approved) + * @summary Update user profile + * @param {UpdateUserReqBody} updateUserReqBody + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + updateUser(updateUserReqBody: UpdateUserReqBody, options?: RawAxiosRequestConfig): AxiosPromise { + return localVarFp.updateUser(updateUserReqBody, options).then((request) => request(axios, basePath)); + }, + /** + * Fetches information about multiple users based on FIDs + * @summary By FIDs + * @param {string} fids Comma separated list of FIDs, up to 100 at a time + * @param {number} [viewerFid] + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + userBulk(fids: string, viewerFid?: number, options?: RawAxiosRequestConfig): AxiosPromise { + return localVarFp.userBulk(fids, viewerFid, options).then((request) => request(axios, basePath)); + }, + /** + * Fetches all users based on multiple Ethereum or Solana addresses. Each farcaster user has a custody Ethereum address and optionally verified Ethereum or Solana addresses. This endpoint returns all users that have any of the given addresses as their custody or verified Ethereum or Solana addresses. A custody address can be associated with only 1 farcaster user at a time but a verified address can be associated with multiple users. You can pass in Ethereum and Solana addresses, comma separated, in the same request. The response will contain users associated with the given addresses. + * @summary By Eth or Sol addresses + * @param {string} addresses Comma separated list of Ethereum addresses, up to 350 at a time + * @param {string} [addressTypes] Customize which address types the request should search for. This is a comma-separated string that can include the following values: \'custody_address\' and \'verified_address\'. By default api returns both. To select multiple types, use a comma-separated list of these values. + * @param {number} [viewerFid] + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + userBulkByAddress(addresses: string, addressTypes?: string, viewerFid?: number, options?: RawAxiosRequestConfig): AxiosPromise<{ [key: string]: Array; }> { + return localVarFp.userBulkByAddress(addresses, addressTypes, viewerFid, options).then((request) => request(axios, basePath)); + }, + /** + * Fetches a single hydrated user object given a username + * @summary By username + * @param {string} username Username of the user to fetch + * @param {number} [viewerFid] + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + userByUsernameV2(username: string, viewerFid?: number, options?: RawAxiosRequestConfig): AxiosPromise { + return localVarFp.userByUsernameV2(username, viewerFid, options).then((request) => request(axios, basePath)); + }, + /** + * Fetches power users and respond in a backwards compatible format to Warpcast\'s deprecated power badge endpoint. + * @summary Power user FIDs + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + userPowerLite(options?: RawAxiosRequestConfig): AxiosPromise { + return localVarFp.userPowerLite(options).then((request) => request(axios, basePath)); + }, + /** + * Search for Usernames + * @summary Search for Usernames + * @param {string} q + * @param {number} [viewerFid] Providing this will return search results that respects this user\'s mutes and blocks and includes `viewer_context`. + * @param {number} [limit] + * @param {string} [cursor] Pagination cursor. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + userSearch(q: string, viewerFid?: number, limit?: number, cursor?: string, options?: RawAxiosRequestConfig): AxiosPromise { + return localVarFp.userSearch(q, viewerFid, limit, cursor, options).then((request) => request(axios, basePath)); + }, + }; +}; + +/** + * UserApi - object-oriented interface + * @export + * @class UserApi + * @extends {BaseAPI} + */ +export class UserApi extends BaseAPI { + /** + * Warpcast has deprecated the active badge. Use user/power endpoint instead. + * @summary Fetch active users + * @param {number} [limit] + * @param {string} [cursor] Pagination cursor. + * @param {*} [options] Override http request option. + * @deprecated + * @throws {RequiredError} + * @memberof UserApi + */ + public activeUsers(limit?: number, cursor?: string, options?: RawAxiosRequestConfig) { + return UserApiFp(this.configuration).activeUsers(limit, cursor, options).then((request) => request(this.axios, this.basePath)); + } + + /** + * Removes verification for an eth address for the user \\ (In order to delete verification `signer_uuid` must be approved) + * @summary Delete verification + * @param {RemoveVerificationReqBody} removeVerificationReqBody + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof UserApi + */ + public farcasterUserVerificationDelete(removeVerificationReqBody: RemoveVerificationReqBody, options?: RawAxiosRequestConfig) { + return UserApiFp(this.configuration).farcasterUserVerificationDelete(removeVerificationReqBody, options).then((request) => request(this.axios, this.basePath)); + } + + /** + * Adds verification for an eth address or contract for the user \\ (In order to add verification `signer_uuid` must be approved) + * @summary Add verification + * @param {AddVerificationReqBody} addVerificationReqBody + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof UserApi + */ + public farcasterUserVerificationPost(addVerificationReqBody: AddVerificationReqBody, options?: RawAxiosRequestConfig) { + return UserApiFp(this.configuration).farcasterUserVerificationPost(addVerificationReqBody, options).then((request) => request(this.axios, this.basePath)); + } + + /** + * Follow a user \\ (In order to follow a user `signer_uuid` must be approved) + * @summary Follow user + * @param {FollowReqBody} followReqBody + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof UserApi + */ + public followUser(followReqBody: FollowReqBody, options?: RawAxiosRequestConfig) { + return UserApiFp(this.configuration).followUser(followReqBody, options).then((request) => request(this.axios, this.basePath)); + } + + /** + * Fetches FID to [assign it to new user](https://docs.neynar.com/reference/register-user) + * @summary Fetch fresh FID + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof UserApi + */ + public getFreshFid(options?: RawAxiosRequestConfig) { + return UserApiFp(this.configuration).getFreshFid(options).then((request) => request(this.axios, this.basePath)); + } + + /** + * Lookup a user by custody-address + * @summary By custody-address + * @param {string} custodyAddress Custody Address associated with mnemonic + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof UserApi + */ + public lookupUserByCustodyAddress(custodyAddress: string, options?: RawAxiosRequestConfig) { + return UserApiFp(this.configuration).lookupUserByCustodyAddress(custodyAddress, options).then((request) => request(this.axios, this.basePath)); + } + + /** + * Fetches power users based on Warpcast power badges. Information is updated once a day. + * @summary Power users + * @param {number} [viewerFid] + * @param {number} [limit] Number of power users to fetch, max 100 + * @param {string} [cursor] Pagination cursor. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof UserApi + */ + public powerUsers(viewerFid?: number, limit?: number, cursor?: string, options?: RawAxiosRequestConfig) { + return UserApiFp(this.configuration).powerUsers(viewerFid, limit, cursor, options).then((request) => request(this.axios, this.basePath)); + } + + /** + * Register account on farcaster. **Note:** This API must be called within 10 minutes of the fetch FID API call (i.e., /v2/farcaster/user/fid). Otherwise, Neynar will assign this FID to another available user. + * @summary Register new account + * @param {RegisterUserReqBody} registerUserReqBody + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof UserApi + */ + public registerUser(registerUserReqBody: RegisterUserReqBody, options?: RawAxiosRequestConfig) { + return UserApiFp(this.configuration).registerUser(registerUserReqBody, options).then((request) => request(this.axios, this.basePath)); + } + + /** + * Unfollow a user \\ (In order to unfollow a user `signer_uuid` must be approved) + * @summary Unfollow user + * @param {FollowReqBody} followReqBody + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof UserApi + */ + public unfollowUser(followReqBody: FollowReqBody, options?: RawAxiosRequestConfig) { + return UserApiFp(this.configuration).unfollowUser(followReqBody, options).then((request) => request(this.axios, this.basePath)); + } + + /** + * Update user profile \\ (In order to update user\'s profile `signer_uuid` must be approved) + * @summary Update user profile + * @param {UpdateUserReqBody} updateUserReqBody + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof UserApi + */ + public updateUser(updateUserReqBody: UpdateUserReqBody, options?: RawAxiosRequestConfig) { + return UserApiFp(this.configuration).updateUser(updateUserReqBody, options).then((request) => request(this.axios, this.basePath)); + } + + /** + * Fetches information about multiple users based on FIDs + * @summary By FIDs + * @param {string} fids Comma separated list of FIDs, up to 100 at a time + * @param {number} [viewerFid] + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof UserApi + */ + public userBulk(fids: string, viewerFid?: number, options?: RawAxiosRequestConfig) { + return UserApiFp(this.configuration).userBulk(fids, viewerFid, options).then((request) => request(this.axios, this.basePath)); + } + + /** + * Fetches all users based on multiple Ethereum or Solana addresses. Each farcaster user has a custody Ethereum address and optionally verified Ethereum or Solana addresses. This endpoint returns all users that have any of the given addresses as their custody or verified Ethereum or Solana addresses. A custody address can be associated with only 1 farcaster user at a time but a verified address can be associated with multiple users. You can pass in Ethereum and Solana addresses, comma separated, in the same request. The response will contain users associated with the given addresses. + * @summary By Eth or Sol addresses + * @param {string} addresses Comma separated list of Ethereum addresses, up to 350 at a time + * @param {string} [addressTypes] Customize which address types the request should search for. This is a comma-separated string that can include the following values: \'custody_address\' and \'verified_address\'. By default api returns both. To select multiple types, use a comma-separated list of these values. + * @param {number} [viewerFid] + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof UserApi + */ + public userBulkByAddress(addresses: string, addressTypes?: string, viewerFid?: number, options?: RawAxiosRequestConfig) { + return UserApiFp(this.configuration).userBulkByAddress(addresses, addressTypes, viewerFid, options).then((request) => request(this.axios, this.basePath)); + } + + /** + * Fetches a single hydrated user object given a username + * @summary By username + * @param {string} username Username of the user to fetch + * @param {number} [viewerFid] + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof UserApi + */ + public userByUsernameV2(username: string, viewerFid?: number, options?: RawAxiosRequestConfig) { + return UserApiFp(this.configuration).userByUsernameV2(username, viewerFid, options).then((request) => request(this.axios, this.basePath)); + } + + /** + * Fetches power users and respond in a backwards compatible format to Warpcast\'s deprecated power badge endpoint. + * @summary Power user FIDs + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof UserApi + */ + public userPowerLite(options?: RawAxiosRequestConfig) { + return UserApiFp(this.configuration).userPowerLite(options).then((request) => request(this.axios, this.basePath)); + } + + /** + * Search for Usernames + * @summary Search for Usernames + * @param {string} q + * @param {number} [viewerFid] Providing this will return search results that respects this user\'s mutes and blocks and includes `viewer_context`. + * @param {number} [limit] + * @param {string} [cursor] Pagination cursor. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof UserApi + */ + public userSearch(q: string, viewerFid?: number, limit?: number, cursor?: string, options?: RawAxiosRequestConfig) { + return UserApiFp(this.configuration).userSearch(q, viewerFid, limit, cursor, options).then((request) => request(this.axios, this.basePath)); + } +} + diff --git a/src/neynar-api/v2/openapi-farcaster/apis/webhook-api.ts b/src/neynar-api/v2/openapi-farcaster/apis/webhook-api.ts new file mode 100644 index 00000000..0f69fb04 --- /dev/null +++ b/src/neynar-api/v2/openapi-farcaster/apis/webhook-api.ts @@ -0,0 +1,510 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Farcaster API V2 + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +import type { Configuration } from '../configuration'; +import type { AxiosPromise, AxiosInstance, RawAxiosRequestConfig } from 'axios'; +import globalAxios from 'axios'; +// Some imports not used depending on template conditions +// @ts-ignore +import { DUMMY_BASE_URL, assertParamExists, setApiKeyToObject, setBasicAuthToObject, setBearerAuthToObject, setOAuthToObject, setSearchParams, serializeDataIfNeeded, toPathString, createRequestFunction } from '../common'; +// @ts-ignore +import { BASE_PATH, COLLECTION_FORMATS, type RequestArgs, BaseAPI, RequiredError, operationServerMap } from '../base'; +// @ts-ignore +import type { ErrorRes } from '../models'; +// @ts-ignore +import type { WebhookDeleteReqBody } from '../models'; +// @ts-ignore +import type { WebhookListResponse } from '../models'; +// @ts-ignore +import type { WebhookPatchReqBody } from '../models'; +// @ts-ignore +import type { WebhookPostReqBody } from '../models'; +// @ts-ignore +import type { WebhookPutReqBody } from '../models'; +// @ts-ignore +import type { WebhookResponse } from '../models'; +/** + * WebhookApi - axios parameter creator + * @export + */ +export const WebhookApiAxiosParamCreator = function (configuration?: Configuration) { + return { + /** + * Delete a webhook + * @summary Delete a webhook + * @param {WebhookDeleteReqBody} webhookDeleteReqBody + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + deleteWebhook: async (webhookDeleteReqBody: WebhookDeleteReqBody, options: RawAxiosRequestConfig = {}): Promise => { + // verify required parameter 'webhookDeleteReqBody' is not null or undefined + assertParamExists('deleteWebhook', 'webhookDeleteReqBody', webhookDeleteReqBody) + const localVarPath = `/farcaster/webhook`; + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'DELETE', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication ApiKeyAuth required + await setApiKeyToObject(localVarHeaderParameter, "x-api-key", configuration) + + + + localVarHeaderParameter['Content-Type'] = 'application/json'; + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + localVarRequestOptions.data = serializeDataIfNeeded(webhookDeleteReqBody, localVarRequestOptions, configuration) + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * Fetch a list of webhooks associated to a user + * @summary Associated webhooks of user + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + fetchWebhooks: async (options: RawAxiosRequestConfig = {}): Promise => { + const localVarPath = `/farcaster/webhook/list`; + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication ApiKeyAuth required + await setApiKeyToObject(localVarHeaderParameter, "x-api-key", configuration) + + + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * Fetch a webhook + * @summary Fetch a webhook + * @param {string} webhookId + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + lookupWebhook: async (webhookId: string, options: RawAxiosRequestConfig = {}): Promise => { + // verify required parameter 'webhookId' is not null or undefined + assertParamExists('lookupWebhook', 'webhookId', webhookId) + const localVarPath = `/farcaster/webhook`; + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication ApiKeyAuth required + await setApiKeyToObject(localVarHeaderParameter, "x-api-key", configuration) + + if (webhookId !== undefined) { + localVarQueryParameter['webhook_id'] = webhookId; + } + + + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * Create a webhook + * @summary Create a webhook + * @param {WebhookPostReqBody} webhookPostReqBody + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + publishWebhook: async (webhookPostReqBody: WebhookPostReqBody, options: RawAxiosRequestConfig = {}): Promise => { + // verify required parameter 'webhookPostReqBody' is not null or undefined + assertParamExists('publishWebhook', 'webhookPostReqBody', webhookPostReqBody) + const localVarPath = `/farcaster/webhook`; + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication ApiKeyAuth required + await setApiKeyToObject(localVarHeaderParameter, "x-api-key", configuration) + + + + localVarHeaderParameter['Content-Type'] = 'application/json'; + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + localVarRequestOptions.data = serializeDataIfNeeded(webhookPostReqBody, localVarRequestOptions, configuration) + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * Update a webhook + * @summary Update a webhook + * @param {WebhookPutReqBody} webhookPutReqBody + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + updateWebhook: async (webhookPutReqBody: WebhookPutReqBody, options: RawAxiosRequestConfig = {}): Promise => { + // verify required parameter 'webhookPutReqBody' is not null or undefined + assertParamExists('updateWebhook', 'webhookPutReqBody', webhookPutReqBody) + const localVarPath = `/farcaster/webhook`; + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'PUT', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication ApiKeyAuth required + await setApiKeyToObject(localVarHeaderParameter, "x-api-key", configuration) + + + + localVarHeaderParameter['Content-Type'] = 'application/json'; + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + localVarRequestOptions.data = serializeDataIfNeeded(webhookPutReqBody, localVarRequestOptions, configuration) + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * Update webhook active status + * @summary Update webhook status + * @param {WebhookPatchReqBody} webhookPatchReqBody + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + updateWebhookActiveStatus: async (webhookPatchReqBody: WebhookPatchReqBody, options: RawAxiosRequestConfig = {}): Promise => { + // verify required parameter 'webhookPatchReqBody' is not null or undefined + assertParamExists('updateWebhookActiveStatus', 'webhookPatchReqBody', webhookPatchReqBody) + const localVarPath = `/farcaster/webhook`; + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'PATCH', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication ApiKeyAuth required + await setApiKeyToObject(localVarHeaderParameter, "x-api-key", configuration) + + + + localVarHeaderParameter['Content-Type'] = 'application/json'; + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + localVarRequestOptions.data = serializeDataIfNeeded(webhookPatchReqBody, localVarRequestOptions, configuration) + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + } +}; + +/** + * WebhookApi - functional programming interface + * @export + */ +export const WebhookApiFp = function(configuration?: Configuration) { + const localVarAxiosParamCreator = WebhookApiAxiosParamCreator(configuration) + return { + /** + * Delete a webhook + * @summary Delete a webhook + * @param {WebhookDeleteReqBody} webhookDeleteReqBody + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async deleteWebhook(webhookDeleteReqBody: WebhookDeleteReqBody, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.deleteWebhook(webhookDeleteReqBody, options); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = operationServerMap['WebhookApi.deleteWebhook']?.[localVarOperationServerIndex]?.url; + return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); + }, + /** + * Fetch a list of webhooks associated to a user + * @summary Associated webhooks of user + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async fetchWebhooks(options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.fetchWebhooks(options); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = operationServerMap['WebhookApi.fetchWebhooks']?.[localVarOperationServerIndex]?.url; + return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); + }, + /** + * Fetch a webhook + * @summary Fetch a webhook + * @param {string} webhookId + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async lookupWebhook(webhookId: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.lookupWebhook(webhookId, options); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = operationServerMap['WebhookApi.lookupWebhook']?.[localVarOperationServerIndex]?.url; + return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); + }, + /** + * Create a webhook + * @summary Create a webhook + * @param {WebhookPostReqBody} webhookPostReqBody + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async publishWebhook(webhookPostReqBody: WebhookPostReqBody, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.publishWebhook(webhookPostReqBody, options); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = operationServerMap['WebhookApi.publishWebhook']?.[localVarOperationServerIndex]?.url; + return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); + }, + /** + * Update a webhook + * @summary Update a webhook + * @param {WebhookPutReqBody} webhookPutReqBody + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async updateWebhook(webhookPutReqBody: WebhookPutReqBody, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.updateWebhook(webhookPutReqBody, options); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = operationServerMap['WebhookApi.updateWebhook']?.[localVarOperationServerIndex]?.url; + return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); + }, + /** + * Update webhook active status + * @summary Update webhook status + * @param {WebhookPatchReqBody} webhookPatchReqBody + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async updateWebhookActiveStatus(webhookPatchReqBody: WebhookPatchReqBody, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.updateWebhookActiveStatus(webhookPatchReqBody, options); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = operationServerMap['WebhookApi.updateWebhookActiveStatus']?.[localVarOperationServerIndex]?.url; + return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); + }, + } +}; + +/** + * WebhookApi - factory interface + * @export + */ +export const WebhookApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) { + const localVarFp = WebhookApiFp(configuration) + return { + /** + * Delete a webhook + * @summary Delete a webhook + * @param {WebhookDeleteReqBody} webhookDeleteReqBody + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + deleteWebhook(webhookDeleteReqBody: WebhookDeleteReqBody, options?: RawAxiosRequestConfig): AxiosPromise { + return localVarFp.deleteWebhook(webhookDeleteReqBody, options).then((request) => request(axios, basePath)); + }, + /** + * Fetch a list of webhooks associated to a user + * @summary Associated webhooks of user + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + fetchWebhooks(options?: RawAxiosRequestConfig): AxiosPromise { + return localVarFp.fetchWebhooks(options).then((request) => request(axios, basePath)); + }, + /** + * Fetch a webhook + * @summary Fetch a webhook + * @param {string} webhookId + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + lookupWebhook(webhookId: string, options?: RawAxiosRequestConfig): AxiosPromise { + return localVarFp.lookupWebhook(webhookId, options).then((request) => request(axios, basePath)); + }, + /** + * Create a webhook + * @summary Create a webhook + * @param {WebhookPostReqBody} webhookPostReqBody + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + publishWebhook(webhookPostReqBody: WebhookPostReqBody, options?: RawAxiosRequestConfig): AxiosPromise { + return localVarFp.publishWebhook(webhookPostReqBody, options).then((request) => request(axios, basePath)); + }, + /** + * Update a webhook + * @summary Update a webhook + * @param {WebhookPutReqBody} webhookPutReqBody + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + updateWebhook(webhookPutReqBody: WebhookPutReqBody, options?: RawAxiosRequestConfig): AxiosPromise { + return localVarFp.updateWebhook(webhookPutReqBody, options).then((request) => request(axios, basePath)); + }, + /** + * Update webhook active status + * @summary Update webhook status + * @param {WebhookPatchReqBody} webhookPatchReqBody + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + updateWebhookActiveStatus(webhookPatchReqBody: WebhookPatchReqBody, options?: RawAxiosRequestConfig): AxiosPromise { + return localVarFp.updateWebhookActiveStatus(webhookPatchReqBody, options).then((request) => request(axios, basePath)); + }, + }; +}; + +/** + * WebhookApi - object-oriented interface + * @export + * @class WebhookApi + * @extends {BaseAPI} + */ +export class WebhookApi extends BaseAPI { + /** + * Delete a webhook + * @summary Delete a webhook + * @param {WebhookDeleteReqBody} webhookDeleteReqBody + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof WebhookApi + */ + public deleteWebhook(webhookDeleteReqBody: WebhookDeleteReqBody, options?: RawAxiosRequestConfig) { + return WebhookApiFp(this.configuration).deleteWebhook(webhookDeleteReqBody, options).then((request) => request(this.axios, this.basePath)); + } + + /** + * Fetch a list of webhooks associated to a user + * @summary Associated webhooks of user + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof WebhookApi + */ + public fetchWebhooks(options?: RawAxiosRequestConfig) { + return WebhookApiFp(this.configuration).fetchWebhooks(options).then((request) => request(this.axios, this.basePath)); + } + + /** + * Fetch a webhook + * @summary Fetch a webhook + * @param {string} webhookId + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof WebhookApi + */ + public lookupWebhook(webhookId: string, options?: RawAxiosRequestConfig) { + return WebhookApiFp(this.configuration).lookupWebhook(webhookId, options).then((request) => request(this.axios, this.basePath)); + } + + /** + * Create a webhook + * @summary Create a webhook + * @param {WebhookPostReqBody} webhookPostReqBody + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof WebhookApi + */ + public publishWebhook(webhookPostReqBody: WebhookPostReqBody, options?: RawAxiosRequestConfig) { + return WebhookApiFp(this.configuration).publishWebhook(webhookPostReqBody, options).then((request) => request(this.axios, this.basePath)); + } + + /** + * Update a webhook + * @summary Update a webhook + * @param {WebhookPutReqBody} webhookPutReqBody + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof WebhookApi + */ + public updateWebhook(webhookPutReqBody: WebhookPutReqBody, options?: RawAxiosRequestConfig) { + return WebhookApiFp(this.configuration).updateWebhook(webhookPutReqBody, options).then((request) => request(this.axios, this.basePath)); + } + + /** + * Update webhook active status + * @summary Update webhook status + * @param {WebhookPatchReqBody} webhookPatchReqBody + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof WebhookApi + */ + public updateWebhookActiveStatus(webhookPatchReqBody: WebhookPatchReqBody, options?: RawAxiosRequestConfig) { + return WebhookApiFp(this.configuration).updateWebhookActiveStatus(webhookPatchReqBody, options).then((request) => request(this.axios, this.basePath)); + } +} + diff --git a/src/neynar-api/v2/openapi-farcaster/index.ts b/src/neynar-api/v2/openapi-farcaster/index.ts index 43a75818..9a6fa92f 100644 --- a/src/neynar-api/v2/openapi-farcaster/index.ts +++ b/src/neynar-api/v2/openapi-farcaster/index.ts @@ -15,4 +15,4 @@ export * from "./api"; export * from "./configuration"; - +export * from "./models"; diff --git a/src/neynar-api/v2/openapi-farcaster/models/add-verification-req-body.ts b/src/neynar-api/v2/openapi-farcaster/models/add-verification-req-body.ts new file mode 100644 index 00000000..2565a5c3 --- /dev/null +++ b/src/neynar-api/v2/openapi-farcaster/models/add-verification-req-body.ts @@ -0,0 +1,68 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Farcaster API V2 + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +// May contain unused imports in some cases +// @ts-ignore +import type { VerificationChainId } from './verification-chain-id'; +// May contain unused imports in some cases +// @ts-ignore +import type { VerificationType } from './verification-type'; + +/** + * + * @export + * @interface AddVerificationReqBody + */ +export interface AddVerificationReqBody { + /** + * UUID of the signer + * @type {string} + * @memberof AddVerificationReqBody + */ + 'signer_uuid': string; + /** + * Ethereum address + * @type {string} + * @memberof AddVerificationReqBody + */ + 'address': string; + /** + * + * @type {string} + * @memberof AddVerificationReqBody + */ + 'block_hash': string; + /** + * + * @type {string} + * @memberof AddVerificationReqBody + */ + 'eth_signature': string; + /** + * + * @type {VerificationType} + * @memberof AddVerificationReqBody + */ + 'verification_type'?: VerificationType; + /** + * + * @type {VerificationChainId} + * @memberof AddVerificationReqBody + */ + 'chain_id'?: VerificationChainId; +} + + + diff --git a/src/neynar-api/v2/openapi-farcaster/models/authorization-url-response-type.ts b/src/neynar-api/v2/openapi-farcaster/models/authorization-url-response-type.ts new file mode 100644 index 00000000..82e1f92d --- /dev/null +++ b/src/neynar-api/v2/openapi-farcaster/models/authorization-url-response-type.ts @@ -0,0 +1,30 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Farcaster API V2 + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + + +/** + * + * @export + * @enum {string} + */ + +export const AuthorizationUrlResponseType = { + Code: 'code' +} as const; + +export type AuthorizationUrlResponseType = typeof AuthorizationUrlResponseType[keyof typeof AuthorizationUrlResponseType]; + + + diff --git a/src/neynar-api/v2/openapi-farcaster/models/authorization-url-response.ts b/src/neynar-api/v2/openapi-farcaster/models/authorization-url-response.ts new file mode 100644 index 00000000..593a94e4 --- /dev/null +++ b/src/neynar-api/v2/openapi-farcaster/models/authorization-url-response.ts @@ -0,0 +1,30 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Farcaster API V2 + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + + +/** + * + * @export + * @interface AuthorizationUrlResponse + */ +export interface AuthorizationUrlResponse { + /** + * + * @type {string} + * @memberof AuthorizationUrlResponse + */ + 'authorization_url': string; +} + diff --git a/src/neynar-api/v2/openapi-farcaster/models/ban-list-response.ts b/src/neynar-api/v2/openapi-farcaster/models/ban-list-response.ts new file mode 100644 index 00000000..1d59abf0 --- /dev/null +++ b/src/neynar-api/v2/openapi-farcaster/models/ban-list-response.ts @@ -0,0 +1,42 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Farcaster API V2 + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +// May contain unused imports in some cases +// @ts-ignore +import type { BanRecord } from './ban-record'; +// May contain unused imports in some cases +// @ts-ignore +import type { NextCursor } from './next-cursor'; + +/** + * + * @export + * @interface BanListResponse + */ +export interface BanListResponse { + /** + * + * @type {Array} + * @memberof BanListResponse + */ + 'bans': Array; + /** + * + * @type {NextCursor} + * @memberof BanListResponse + */ + 'next': NextCursor; +} + diff --git a/src/neynar-api/v2/openapi-farcaster/models/ban-record.ts b/src/neynar-api/v2/openapi-farcaster/models/ban-record.ts new file mode 100644 index 00000000..993b1009 --- /dev/null +++ b/src/neynar-api/v2/openapi-farcaster/models/ban-record.ts @@ -0,0 +1,52 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Farcaster API V2 + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +// May contain unused imports in some cases +// @ts-ignore +import type { User } from './user'; + +/** + * + * @export + * @interface BanRecord + */ +export interface BanRecord { + /** + * + * @type {string} + * @memberof BanRecord + */ + 'object': BanRecordObjectEnum; + /** + * + * @type {User} + * @memberof BanRecord + */ + 'banned'?: User; + /** + * + * @type {string} + * @memberof BanRecord + */ + 'banned_at': string; +} + +export const BanRecordObjectEnum = { + Ban: 'ban' +} as const; + +export type BanRecordObjectEnum = typeof BanRecordObjectEnum[keyof typeof BanRecordObjectEnum]; + + diff --git a/src/neynar-api/v2/openapi-farcaster/models/ban-req-body.ts b/src/neynar-api/v2/openapi-farcaster/models/ban-req-body.ts new file mode 100644 index 00000000..dd2b6f5f --- /dev/null +++ b/src/neynar-api/v2/openapi-farcaster/models/ban-req-body.ts @@ -0,0 +1,30 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Farcaster API V2 + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + + +/** + * + * @export + * @interface BanReqBody + */ +export interface BanReqBody { + /** + * + * @type {Array} + * @memberof BanReqBody + */ + 'fids': Array; +} + diff --git a/src/neynar-api/v2/openapi-farcaster/models/ban-response.ts b/src/neynar-api/v2/openapi-farcaster/models/ban-response.ts new file mode 100644 index 00000000..4fdc3843 --- /dev/null +++ b/src/neynar-api/v2/openapi-farcaster/models/ban-response.ts @@ -0,0 +1,36 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Farcaster API V2 + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + + +/** + * + * @export + * @interface BanResponse + */ +export interface BanResponse { + /** + * + * @type {boolean} + * @memberof BanResponse + */ + 'success': boolean; + /** + * + * @type {string} + * @memberof BanResponse + */ + 'message'?: string | null; +} + diff --git a/src/neynar-api/v2/openapi-farcaster/models/block-list-response.ts b/src/neynar-api/v2/openapi-farcaster/models/block-list-response.ts new file mode 100644 index 00000000..3e79fb16 --- /dev/null +++ b/src/neynar-api/v2/openapi-farcaster/models/block-list-response.ts @@ -0,0 +1,42 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Farcaster API V2 + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +// May contain unused imports in some cases +// @ts-ignore +import type { BlockRecord } from './block-record'; +// May contain unused imports in some cases +// @ts-ignore +import type { NextCursor } from './next-cursor'; + +/** + * + * @export + * @interface BlockListResponse + */ +export interface BlockListResponse { + /** + * + * @type {Array} + * @memberof BlockListResponse + */ + 'blocks': Array; + /** + * + * @type {NextCursor} + * @memberof BlockListResponse + */ + 'next': NextCursor; +} + diff --git a/src/neynar-api/v2/openapi-farcaster/models/block-record.ts b/src/neynar-api/v2/openapi-farcaster/models/block-record.ts new file mode 100644 index 00000000..7d7867c3 --- /dev/null +++ b/src/neynar-api/v2/openapi-farcaster/models/block-record.ts @@ -0,0 +1,58 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Farcaster API V2 + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +// May contain unused imports in some cases +// @ts-ignore +import type { User } from './user'; + +/** + * + * @export + * @interface BlockRecord + */ +export interface BlockRecord { + /** + * + * @type {string} + * @memberof BlockRecord + */ + 'object': BlockRecordObjectEnum; + /** + * + * @type {User} + * @memberof BlockRecord + */ + 'blocked'?: User; + /** + * + * @type {User} + * @memberof BlockRecord + */ + 'blocker'?: User; + /** + * + * @type {string} + * @memberof BlockRecord + */ + 'blocked_at': string; +} + +export const BlockRecordObjectEnum = { + Block: 'block' +} as const; + +export type BlockRecordObjectEnum = typeof BlockRecordObjectEnum[keyof typeof BlockRecordObjectEnum]; + + diff --git a/src/neynar-api/v2/openapi-farcaster/models/bulk-casts-response.ts b/src/neynar-api/v2/openapi-farcaster/models/bulk-casts-response.ts new file mode 100644 index 00000000..563bec88 --- /dev/null +++ b/src/neynar-api/v2/openapi-farcaster/models/bulk-casts-response.ts @@ -0,0 +1,33 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Farcaster API V2 + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +// May contain unused imports in some cases +// @ts-ignore +import type { CastWithInteractions } from './cast-with-interactions'; + +/** + * + * @export + * @interface BulkCastsResponse + */ +export interface BulkCastsResponse { + /** + * + * @type {Array} + * @memberof BulkCastsResponse + */ + 'casts': Array; +} + diff --git a/src/neynar-api/v2/openapi-farcaster/models/bulk-follow-response.ts b/src/neynar-api/v2/openapi-farcaster/models/bulk-follow-response.ts new file mode 100644 index 00000000..abc07bac --- /dev/null +++ b/src/neynar-api/v2/openapi-farcaster/models/bulk-follow-response.ts @@ -0,0 +1,39 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Farcaster API V2 + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +// May contain unused imports in some cases +// @ts-ignore +import type { FollowResponse } from './follow-response'; + +/** + * + * @export + * @interface BulkFollowResponse + */ +export interface BulkFollowResponse { + /** + * + * @type {boolean} + * @memberof BulkFollowResponse + */ + 'success': boolean; + /** + * + * @type {Array} + * @memberof BulkFollowResponse + */ + 'details': Array; +} + diff --git a/src/neynar-api/v2/openapi-farcaster/models/bulk-users-response.ts b/src/neynar-api/v2/openapi-farcaster/models/bulk-users-response.ts new file mode 100644 index 00000000..97205951 --- /dev/null +++ b/src/neynar-api/v2/openapi-farcaster/models/bulk-users-response.ts @@ -0,0 +1,33 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Farcaster API V2 + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +// May contain unused imports in some cases +// @ts-ignore +import type { User } from './user'; + +/** + * + * @export + * @interface BulkUsersResponse + */ +export interface BulkUsersResponse { + /** + * + * @type {Array} + * @memberof BulkUsersResponse + */ + 'users': Array; +} + diff --git a/src/neynar-api/v2/openapi-farcaster/models/buy-storage-req-body.ts b/src/neynar-api/v2/openapi-farcaster/models/buy-storage-req-body.ts new file mode 100644 index 00000000..1b1dc72f --- /dev/null +++ b/src/neynar-api/v2/openapi-farcaster/models/buy-storage-req-body.ts @@ -0,0 +1,42 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Farcaster API V2 + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + + +/** + * + * @export + * @interface BuyStorageReqBody + */ +export interface BuyStorageReqBody { + /** + * + * @type {number} + * @memberof BuyStorageReqBody + */ + 'fid': number; + /** + * Number of storage units to buy. A storage unit lets you store 5000 casts, 2500 reactions and 2500 links. + * @type {number} + * @memberof BuyStorageReqBody + */ + 'units'?: number; + /** + * An Idempotency key is a unique identifier for the request. **Note:** 1) This is used to prevent duplicate requests. Use the same idem key on retry attempts. 2) This should be a unique identifier for each request. 3) Recommended format is a 16-character string generated by the developer at the time of making this request. + * @type {string} + * @memberof BuyStorageReqBody + */ + 'idem'?: string; +} + diff --git a/src/neynar-api/v2/openapi-farcaster/models/cast-composer-actions-list-response-actions-inner-action.ts b/src/neynar-api/v2/openapi-farcaster/models/cast-composer-actions-list-response-actions-inner-action.ts new file mode 100644 index 00000000..715762c3 --- /dev/null +++ b/src/neynar-api/v2/openapi-farcaster/models/cast-composer-actions-list-response-actions-inner-action.ts @@ -0,0 +1,36 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Farcaster API V2 + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + + +/** + * + * @export + * @interface CastComposerActionsListResponseActionsInnerAction + */ +export interface CastComposerActionsListResponseActionsInnerAction { + /** + * Type of the action (e.g., post). + * @type {string} + * @memberof CastComposerActionsListResponseActionsInnerAction + */ + 'action_type'?: string; + /** + * URL to post the action. + * @type {string} + * @memberof CastComposerActionsListResponseActionsInnerAction + */ + 'post_url'?: string; +} + diff --git a/src/neynar-api/v2/openapi-farcaster/models/cast-composer-actions-list-response-actions-inner.ts b/src/neynar-api/v2/openapi-farcaster/models/cast-composer-actions-list-response-actions-inner.ts new file mode 100644 index 00000000..f6ebe46a --- /dev/null +++ b/src/neynar-api/v2/openapi-farcaster/models/cast-composer-actions-list-response-actions-inner.ts @@ -0,0 +1,105 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Farcaster API V2 + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +// May contain unused imports in some cases +// @ts-ignore +import type { CastComposerActionsListResponseActionsInnerAction } from './cast-composer-actions-list-response-actions-inner-action'; + +/** + * + * @export + * @interface CastComposerActionsListResponseActionsInner + */ +export interface CastComposerActionsListResponseActionsInner { + /** + * The name of the action. + * @type {string} + * @memberof CastComposerActionsListResponseActionsInner + */ + 'name'?: string; + /** + * The icon representing the action. + * @type {string} + * @memberof CastComposerActionsListResponseActionsInner + */ + 'icon'?: string; + /** + * A brief description of the action. + * @type {string} + * @memberof CastComposerActionsListResponseActionsInner + */ + 'description'?: string; + /** + * URL to learn more about the action. + * @type {string} + * @memberof CastComposerActionsListResponseActionsInner + */ + 'about_url'?: string; + /** + * URL of the action\'s image. + * @type {string} + * @memberof CastComposerActionsListResponseActionsInner + */ + 'image_url'?: string; + /** + * URL to perform the action. + * @type {string} + * @memberof CastComposerActionsListResponseActionsInner + */ + 'action_url'?: string; + /** + * + * @type {CastComposerActionsListResponseActionsInnerAction} + * @memberof CastComposerActionsListResponseActionsInner + */ + 'action'?: CastComposerActionsListResponseActionsInnerAction; + /** + * Icon name for the action. + * @type {string} + * @memberof CastComposerActionsListResponseActionsInner + */ + 'octicon'?: string; + /** + * Number of times the action has been added. + * @type {number} + * @memberof CastComposerActionsListResponseActionsInner + */ + 'added_count'?: number; + /** + * Name of the application providing the action. + * @type {string} + * @memberof CastComposerActionsListResponseActionsInner + */ + 'app_name'?: string; + /** + * Author\'s Farcaster ID. + * @type {number} + * @memberof CastComposerActionsListResponseActionsInner + */ + 'author_fid'?: number; + /** + * Category of the action. + * @type {string} + * @memberof CastComposerActionsListResponseActionsInner + */ + 'category'?: string; + /** + * Object type, which is \"composer_action\". + * @type {string} + * @memberof CastComposerActionsListResponseActionsInner + */ + 'object'?: string; +} + diff --git a/src/neynar-api/v2/openapi-farcaster/models/cast-composer-actions-list-response.ts b/src/neynar-api/v2/openapi-farcaster/models/cast-composer-actions-list-response.ts new file mode 100644 index 00000000..044546a1 --- /dev/null +++ b/src/neynar-api/v2/openapi-farcaster/models/cast-composer-actions-list-response.ts @@ -0,0 +1,42 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Farcaster API V2 + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +// May contain unused imports in some cases +// @ts-ignore +import type { CastComposerActionsListResponseActionsInner } from './cast-composer-actions-list-response-actions-inner'; +// May contain unused imports in some cases +// @ts-ignore +import type { NextCursor } from './next-cursor'; + +/** + * + * @export + * @interface CastComposerActionsListResponse + */ +export interface CastComposerActionsListResponse { + /** + * + * @type {Array} + * @memberof CastComposerActionsListResponse + */ + 'actions'?: Array; + /** + * + * @type {NextCursor} + * @memberof CastComposerActionsListResponse + */ + 'next'?: NextCursor; +} + diff --git a/src/neynar-api/v2/openapi-farcaster/models/cast-composer-type.ts b/src/neynar-api/v2/openapi-farcaster/models/cast-composer-type.ts new file mode 100644 index 00000000..50d5f1bd --- /dev/null +++ b/src/neynar-api/v2/openapi-farcaster/models/cast-composer-type.ts @@ -0,0 +1,31 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Farcaster API V2 + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + + +/** + * + * @export + * @enum {string} + */ + +export const CastComposerType = { + Top: 'top', + Featured: 'featured' +} as const; + +export type CastComposerType = typeof CastComposerType[keyof typeof CastComposerType]; + + + diff --git a/src/neynar-api/v2/openapi-farcaster/models/cast-conversation-sort-type.ts b/src/neynar-api/v2/openapi-farcaster/models/cast-conversation-sort-type.ts new file mode 100644 index 00000000..203e6f54 --- /dev/null +++ b/src/neynar-api/v2/openapi-farcaster/models/cast-conversation-sort-type.ts @@ -0,0 +1,32 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Farcaster API V2 + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + + +/** + * + * @export + * @enum {string} + */ + +export const CastConversationSortType = { + Chron: 'chron', + DescChron: 'desc_chron', + Algorithmic: 'algorithmic' +} as const; + +export type CastConversationSortType = typeof CastConversationSortType[keyof typeof CastConversationSortType]; + + + diff --git a/src/neynar-api/v2/openapi-farcaster/models/cast-dehydrated.ts b/src/neynar-api/v2/openapi-farcaster/models/cast-dehydrated.ts new file mode 100644 index 00000000..e91d0110 --- /dev/null +++ b/src/neynar-api/v2/openapi-farcaster/models/cast-dehydrated.ts @@ -0,0 +1,52 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Farcaster API V2 + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +// May contain unused imports in some cases +// @ts-ignore +import type { UserDehydrated } from './user-dehydrated'; + +/** + * + * @export + * @interface CastDehydrated + */ +export interface CastDehydrated { + /** + * + * @type {string} + * @memberof CastDehydrated + */ + 'object': CastDehydratedObjectEnum; + /** + * + * @type {string} + * @memberof CastDehydrated + */ + 'hash': string; + /** + * + * @type {UserDehydrated} + * @memberof CastDehydrated + */ + 'author'?: UserDehydrated; +} + +export const CastDehydratedObjectEnum = { + CastDehydrated: 'cast_dehydrated' +} as const; + +export type CastDehydratedObjectEnum = typeof CastDehydratedObjectEnum[keyof typeof CastDehydratedObjectEnum]; + + diff --git a/src/neynar-api/v2/openapi-farcaster/models/cast-embedded-parent-author.ts b/src/neynar-api/v2/openapi-farcaster/models/cast-embedded-parent-author.ts new file mode 100644 index 00000000..7cabf93d --- /dev/null +++ b/src/neynar-api/v2/openapi-farcaster/models/cast-embedded-parent-author.ts @@ -0,0 +1,30 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Farcaster API V2 + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + + +/** + * + * @export + * @interface CastEmbeddedParentAuthor + */ +export interface CastEmbeddedParentAuthor { + /** + * The unique identifier of a farcaster user (unsigned integer) + * @type {number} + * @memberof CastEmbeddedParentAuthor + */ + 'fid': number; +} + diff --git a/src/neynar-api/v2/openapi-farcaster/models/cast-embedded.ts b/src/neynar-api/v2/openapi-farcaster/models/cast-embedded.ts new file mode 100644 index 00000000..79ddb8e0 --- /dev/null +++ b/src/neynar-api/v2/openapi-farcaster/models/cast-embedded.ts @@ -0,0 +1,107 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Farcaster API V2 + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +// May contain unused imports in some cases +// @ts-ignore +import type { CastEmbeddedParentAuthor } from './cast-embedded-parent-author'; +// May contain unused imports in some cases +// @ts-ignore +import type { CastNotificationType } from './cast-notification-type'; +// May contain unused imports in some cases +// @ts-ignore +import type { DehydratedChannel } from './dehydrated-channel'; +// May contain unused imports in some cases +// @ts-ignore +import type { EmbedDeep } from './embed-deep'; +// May contain unused imports in some cases +// @ts-ignore +import type { UserDehydrated } from './user-dehydrated'; + +/** + * + * @export + * @interface CastEmbedded + */ +export interface CastEmbedded { + /** + * + * @type {string} + * @memberof CastEmbedded + */ + 'hash': string; + /** + * + * @type {string} + * @memberof CastEmbedded + */ + 'parent_hash': string | null; + /** + * + * @type {string} + * @memberof CastEmbedded + */ + 'parent_url': string | null; + /** + * + * @type {string} + * @memberof CastEmbedded + */ + 'root_parent_url': string | null; + /** + * + * @type {CastEmbeddedParentAuthor} + * @memberof CastEmbedded + */ + 'parent_author': CastEmbeddedParentAuthor; + /** + * + * @type {UserDehydrated} + * @memberof CastEmbedded + */ + 'author': UserDehydrated; + /** + * + * @type {string} + * @memberof CastEmbedded + */ + 'text': string; + /** + * + * @type {string} + * @memberof CastEmbedded + */ + 'timestamp': string; + /** + * + * @type {CastNotificationType} + * @memberof CastEmbedded + */ + 'type': CastNotificationType; + /** + * + * @type {Array} + * @memberof CastEmbedded + */ + 'embeds': Array; + /** + * + * @type {DehydratedChannel} + * @memberof CastEmbedded + */ + 'channel': DehydratedChannel | null; +} + + + diff --git a/src/neynar-api/v2/openapi-farcaster/models/cast-id.ts b/src/neynar-api/v2/openapi-farcaster/models/cast-id.ts new file mode 100644 index 00000000..3ab47ba5 --- /dev/null +++ b/src/neynar-api/v2/openapi-farcaster/models/cast-id.ts @@ -0,0 +1,36 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Farcaster API V2 + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + + +/** + * + * @export + * @interface CastId + */ +export interface CastId { + /** + * The unique identifier of a farcaster user (unsigned integer) + * @type {number} + * @memberof CastId + */ + 'fid': number; + /** + * + * @type {string} + * @memberof CastId + */ + 'hash': string; +} + diff --git a/src/neynar-api/v2/openapi-farcaster/models/cast-notification-type.ts b/src/neynar-api/v2/openapi-farcaster/models/cast-notification-type.ts new file mode 100644 index 00000000..1051e2c3 --- /dev/null +++ b/src/neynar-api/v2/openapi-farcaster/models/cast-notification-type.ts @@ -0,0 +1,31 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Farcaster API V2 + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + + +/** + * The notification type of a cast. + * @export + * @enum {string} + */ + +export const CastNotificationType = { + Mention: 'cast-mention', + Reply: 'cast-reply' +} as const; + +export type CastNotificationType = typeof CastNotificationType[keyof typeof CastNotificationType]; + + + diff --git a/src/neynar-api/v2/openapi-farcaster/models/cast-param-type.ts b/src/neynar-api/v2/openapi-farcaster/models/cast-param-type.ts new file mode 100644 index 00000000..c9279ee7 --- /dev/null +++ b/src/neynar-api/v2/openapi-farcaster/models/cast-param-type.ts @@ -0,0 +1,31 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Farcaster API V2 + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + + +/** + * The query param accepted by the API. Sent along with identifier param. url - Cast identifier is a url hash - Cast identifier is a hash + * @export + * @enum {string} + */ + +export const CastParamType = { + Url: 'url', + Hash: 'hash' +} as const; + +export type CastParamType = typeof CastParamType[keyof typeof CastParamType]; + + + diff --git a/src/neynar-api/v2/openapi-farcaster/models/cast-response.ts b/src/neynar-api/v2/openapi-farcaster/models/cast-response.ts new file mode 100644 index 00000000..d45e1a65 --- /dev/null +++ b/src/neynar-api/v2/openapi-farcaster/models/cast-response.ts @@ -0,0 +1,33 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Farcaster API V2 + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +// May contain unused imports in some cases +// @ts-ignore +import type { CastWithInteractions } from './cast-with-interactions'; + +/** + * + * @export + * @interface CastResponse + */ +export interface CastResponse { + /** + * + * @type {CastWithInteractions} + * @memberof CastResponse + */ + 'cast': CastWithInteractions; +} + diff --git a/src/neynar-api/v2/openapi-farcaster/models/cast-viewer-context.ts b/src/neynar-api/v2/openapi-farcaster/models/cast-viewer-context.ts new file mode 100644 index 00000000..a11e015a --- /dev/null +++ b/src/neynar-api/v2/openapi-farcaster/models/cast-viewer-context.ts @@ -0,0 +1,36 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Farcaster API V2 + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + + +/** + * Adds context on interactions the viewer has made with the cast. + * @export + * @interface CastViewerContext + */ +export interface CastViewerContext { + /** + * Indicates if the viewer liked the cast. + * @type {boolean} + * @memberof CastViewerContext + */ + 'liked': boolean; + /** + * Indicates if the viewer recasted the cast. + * @type {boolean} + * @memberof CastViewerContext + */ + 'recasted': boolean; +} + diff --git a/src/neynar-api/v2/openapi-farcaster/models/cast-with-interactions-all-of.ts b/src/neynar-api/v2/openapi-farcaster/models/cast-with-interactions-all-of.ts new file mode 100644 index 00000000..5342fc20 --- /dev/null +++ b/src/neynar-api/v2/openapi-farcaster/models/cast-with-interactions-all-of.ts @@ -0,0 +1,93 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Farcaster API V2 + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +// May contain unused imports in some cases +// @ts-ignore +import type { CastViewerContext } from './cast-viewer-context'; +// May contain unused imports in some cases +// @ts-ignore +import type { CastWithInteractionsReactions } from './cast-with-interactions-reactions'; +// May contain unused imports in some cases +// @ts-ignore +import type { CastWithInteractionsReplies } from './cast-with-interactions-replies'; +// May contain unused imports in some cases +// @ts-ignore +import type { ChannelOrDehydratedChannel } from './channel-or-dehydrated-channel'; +// May contain unused imports in some cases +// @ts-ignore +import type { ChannelUserContext } from './channel-user-context'; +// May contain unused imports in some cases +// @ts-ignore +import type { Frame } from './frame'; +// May contain unused imports in some cases +// @ts-ignore +import type { User } from './user'; + +/** + * + * @export + * @interface CastWithInteractionsAllOf + */ +export interface CastWithInteractionsAllOf { + /** + * + * @type {Array} + * @memberof CastWithInteractionsAllOf + */ + 'frames'?: Array; + /** + * + * @type {CastWithInteractionsReactions} + * @memberof CastWithInteractionsAllOf + */ + 'reactions': CastWithInteractionsReactions; + /** + * + * @type {CastWithInteractionsReplies} + * @memberof CastWithInteractionsAllOf + */ + 'replies': CastWithInteractionsReplies; + /** + * + * @type {string} + * @memberof CastWithInteractionsAllOf + */ + 'thread_hash': string | null; + /** + * + * @type {Array} + * @memberof CastWithInteractionsAllOf + */ + 'mentioned_profiles': Array; + /** + * + * @type {ChannelOrDehydratedChannel} + * @memberof CastWithInteractionsAllOf + */ + 'channel': ChannelOrDehydratedChannel | null; + /** + * + * @type {CastViewerContext} + * @memberof CastWithInteractionsAllOf + */ + 'viewer_context'?: CastViewerContext; + /** + * + * @type {ChannelUserContext} + * @memberof CastWithInteractionsAllOf + */ + 'author_channel_context'?: ChannelUserContext; +} + diff --git a/src/neynar-api/v2/openapi-farcaster/models/cast-with-interactions-and-conversations-all-of.ts b/src/neynar-api/v2/openapi-farcaster/models/cast-with-interactions-and-conversations-all-of.ts new file mode 100644 index 00000000..75382ae3 --- /dev/null +++ b/src/neynar-api/v2/openapi-farcaster/models/cast-with-interactions-and-conversations-all-of.ts @@ -0,0 +1,33 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Farcaster API V2 + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +// May contain unused imports in some cases +// @ts-ignore +import type { CastWithInteractionsAndConversationsRef } from './cast-with-interactions-and-conversations-ref'; + +/** + * + * @export + * @interface CastWithInteractionsAndConversationsAllOf + */ +export interface CastWithInteractionsAndConversationsAllOf { + /** + * note: This is recursive. It contains the direct replies to the cast and their direct replies up to n reply_depth. + * @type {Array} + * @memberof CastWithInteractionsAndConversationsAllOf + */ + 'direct_replies': Array; +} + diff --git a/src/neynar-api/v2/openapi-farcaster/models/cast-with-interactions-and-conversations-ref-all-of.ts b/src/neynar-api/v2/openapi-farcaster/models/cast-with-interactions-and-conversations-ref-all-of.ts new file mode 100644 index 00000000..203fd1a1 --- /dev/null +++ b/src/neynar-api/v2/openapi-farcaster/models/cast-with-interactions-and-conversations-ref-all-of.ts @@ -0,0 +1,30 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Farcaster API V2 + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + + +/** + * + * @export + * @interface CastWithInteractionsAndConversationsRefAllOf + */ +export interface CastWithInteractionsAndConversationsRefAllOf { + /** + * note: This is recursive. It contains the direct replies to the cast and their direct replies up to n reply_depth. + * @type {Array} + * @memberof CastWithInteractionsAndConversationsRefAllOf + */ + 'direct_replies': Array; +} + diff --git a/src/neynar-api/v2/openapi-farcaster/models/cast-with-interactions-and-conversations-ref.ts b/src/neynar-api/v2/openapi-farcaster/models/cast-with-interactions-and-conversations-ref.ts new file mode 100644 index 00000000..2590b5c0 --- /dev/null +++ b/src/neynar-api/v2/openapi-farcaster/models/cast-with-interactions-and-conversations-ref.ts @@ -0,0 +1,60 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Farcaster API V2 + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +// May contain unused imports in some cases +// @ts-ignore +import type { CastEmbeddedParentAuthor } from './cast-embedded-parent-author'; +// May contain unused imports in some cases +// @ts-ignore +import type { CastNotificationType } from './cast-notification-type'; +// May contain unused imports in some cases +// @ts-ignore +import type { CastViewerContext } from './cast-viewer-context'; +// May contain unused imports in some cases +// @ts-ignore +import type { CastWithInteractions } from './cast-with-interactions'; +// May contain unused imports in some cases +// @ts-ignore +import type { CastWithInteractionsAndConversationsRefAllOf } from './cast-with-interactions-and-conversations-ref-all-of'; +// May contain unused imports in some cases +// @ts-ignore +import type { CastWithInteractionsReactions } from './cast-with-interactions-reactions'; +// May contain unused imports in some cases +// @ts-ignore +import type { CastWithInteractionsReplies } from './cast-with-interactions-replies'; +// May contain unused imports in some cases +// @ts-ignore +import type { ChannelOrDehydratedChannel } from './channel-or-dehydrated-channel'; +// May contain unused imports in some cases +// @ts-ignore +import type { ChannelUserContext } from './channel-user-context'; +// May contain unused imports in some cases +// @ts-ignore +import type { Embed } from './embed'; +// May contain unused imports in some cases +// @ts-ignore +import type { Frame } from './frame'; +// May contain unused imports in some cases +// @ts-ignore +import type { User } from './user'; + +/** + * @type CastWithInteractionsAndConversationsRef + * Reference to CastWithInteractionsAndConversations to avoid circular reference + * @export + */ +export type CastWithInteractionsAndConversationsRef = CastWithInteractions & CastWithInteractionsAndConversationsRefAllOf; + + diff --git a/src/neynar-api/v2/openapi-farcaster/models/cast-with-interactions-and-conversations.ts b/src/neynar-api/v2/openapi-farcaster/models/cast-with-interactions-and-conversations.ts new file mode 100644 index 00000000..c5bfb6a0 --- /dev/null +++ b/src/neynar-api/v2/openapi-farcaster/models/cast-with-interactions-and-conversations.ts @@ -0,0 +1,62 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Farcaster API V2 + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +// May contain unused imports in some cases +// @ts-ignore +import type { CastEmbeddedParentAuthor } from './cast-embedded-parent-author'; +// May contain unused imports in some cases +// @ts-ignore +import type { CastNotificationType } from './cast-notification-type'; +// May contain unused imports in some cases +// @ts-ignore +import type { CastViewerContext } from './cast-viewer-context'; +// May contain unused imports in some cases +// @ts-ignore +import type { CastWithInteractions } from './cast-with-interactions'; +// May contain unused imports in some cases +// @ts-ignore +import type { CastWithInteractionsAndConversationsAllOf } from './cast-with-interactions-and-conversations-all-of'; +// May contain unused imports in some cases +// @ts-ignore +import type { CastWithInteractionsAndConversationsRef } from './cast-with-interactions-and-conversations-ref'; +// May contain unused imports in some cases +// @ts-ignore +import type { CastWithInteractionsReactions } from './cast-with-interactions-reactions'; +// May contain unused imports in some cases +// @ts-ignore +import type { CastWithInteractionsReplies } from './cast-with-interactions-replies'; +// May contain unused imports in some cases +// @ts-ignore +import type { ChannelOrDehydratedChannel } from './channel-or-dehydrated-channel'; +// May contain unused imports in some cases +// @ts-ignore +import type { ChannelUserContext } from './channel-user-context'; +// May contain unused imports in some cases +// @ts-ignore +import type { Embed } from './embed'; +// May contain unused imports in some cases +// @ts-ignore +import type { Frame } from './frame'; +// May contain unused imports in some cases +// @ts-ignore +import type { User } from './user'; + +/** + * @type CastWithInteractionsAndConversations + * @export + */ +export type CastWithInteractionsAndConversations = CastWithInteractions & CastWithInteractionsAndConversationsAllOf; + + diff --git a/src/neynar-api/v2/openapi-farcaster/models/cast-with-interactions-reactions.ts b/src/neynar-api/v2/openapi-farcaster/models/cast-with-interactions-reactions.ts new file mode 100644 index 00000000..a8b449fa --- /dev/null +++ b/src/neynar-api/v2/openapi-farcaster/models/cast-with-interactions-reactions.ts @@ -0,0 +1,54 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Farcaster API V2 + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +// May contain unused imports in some cases +// @ts-ignore +import type { ReactionLike } from './reaction-like'; +// May contain unused imports in some cases +// @ts-ignore +import type { ReactionRecast } from './reaction-recast'; + +/** + * + * @export + * @interface CastWithInteractionsReactions + */ +export interface CastWithInteractionsReactions { + /** + * + * @type {Array} + * @memberof CastWithInteractionsReactions + */ + 'likes': Array; + /** + * + * @type {Array} + * @memberof CastWithInteractionsReactions + */ + 'recasts': Array; + /** + * + * @type {number} + * @memberof CastWithInteractionsReactions + */ + 'likes_count': number; + /** + * + * @type {number} + * @memberof CastWithInteractionsReactions + */ + 'recasts_count': number; +} + diff --git a/src/neynar-api/v2/openapi-farcaster/models/cast-with-interactions-replies.ts b/src/neynar-api/v2/openapi-farcaster/models/cast-with-interactions-replies.ts new file mode 100644 index 00000000..57325724 --- /dev/null +++ b/src/neynar-api/v2/openapi-farcaster/models/cast-with-interactions-replies.ts @@ -0,0 +1,30 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Farcaster API V2 + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + + +/** + * + * @export + * @interface CastWithInteractionsReplies + */ +export interface CastWithInteractionsReplies { + /** + * + * @type {number} + * @memberof CastWithInteractionsReplies + */ + 'count': number; +} + diff --git a/src/neynar-api/v2/openapi-farcaster/models/cast-with-interactions.ts b/src/neynar-api/v2/openapi-farcaster/models/cast-with-interactions.ts new file mode 100644 index 00000000..82619acb --- /dev/null +++ b/src/neynar-api/v2/openapi-farcaster/models/cast-with-interactions.ts @@ -0,0 +1,59 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Farcaster API V2 + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +// May contain unused imports in some cases +// @ts-ignore +import type { Cast } from './cast'; +// May contain unused imports in some cases +// @ts-ignore +import type { CastEmbeddedParentAuthor } from './cast-embedded-parent-author'; +// May contain unused imports in some cases +// @ts-ignore +import type { CastNotificationType } from './cast-notification-type'; +// May contain unused imports in some cases +// @ts-ignore +import type { CastViewerContext } from './cast-viewer-context'; +// May contain unused imports in some cases +// @ts-ignore +import type { CastWithInteractionsAllOf } from './cast-with-interactions-all-of'; +// May contain unused imports in some cases +// @ts-ignore +import type { CastWithInteractionsReactions } from './cast-with-interactions-reactions'; +// May contain unused imports in some cases +// @ts-ignore +import type { CastWithInteractionsReplies } from './cast-with-interactions-replies'; +// May contain unused imports in some cases +// @ts-ignore +import type { ChannelOrDehydratedChannel } from './channel-or-dehydrated-channel'; +// May contain unused imports in some cases +// @ts-ignore +import type { ChannelUserContext } from './channel-user-context'; +// May contain unused imports in some cases +// @ts-ignore +import type { Embed } from './embed'; +// May contain unused imports in some cases +// @ts-ignore +import type { Frame } from './frame'; +// May contain unused imports in some cases +// @ts-ignore +import type { User } from './user'; + +/** + * @type CastWithInteractions + * @export + */ +export type CastWithInteractions = Cast & CastWithInteractionsAllOf; + + diff --git a/src/neynar-api/v2/openapi-farcaster/models/cast.ts b/src/neynar-api/v2/openapi-farcaster/models/cast.ts new file mode 100644 index 00000000..0a864a3f --- /dev/null +++ b/src/neynar-api/v2/openapi-farcaster/models/cast.ts @@ -0,0 +1,98 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Farcaster API V2 + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +// May contain unused imports in some cases +// @ts-ignore +import type { CastEmbeddedParentAuthor } from './cast-embedded-parent-author'; +// May contain unused imports in some cases +// @ts-ignore +import type { CastNotificationType } from './cast-notification-type'; +// May contain unused imports in some cases +// @ts-ignore +import type { Embed } from './embed'; +// May contain unused imports in some cases +// @ts-ignore +import type { User } from './user'; + +/** + * + * @export + * @interface Cast + */ +export interface Cast { + /** + * + * @type {string} + * @memberof Cast + */ + 'hash': string; + /** + * + * @type {string} + * @memberof Cast + */ + 'parent_hash': string | null; + /** + * + * @type {string} + * @memberof Cast + */ + 'parent_url': string | null; + /** + * + * @type {string} + * @memberof Cast + */ + 'root_parent_url': string | null; + /** + * + * @type {CastEmbeddedParentAuthor} + * @memberof Cast + */ + 'parent_author': CastEmbeddedParentAuthor; + /** + * + * @type {User} + * @memberof Cast + */ + 'author': User; + /** + * + * @type {string} + * @memberof Cast + */ + 'text': string; + /** + * + * @type {string} + * @memberof Cast + */ + 'timestamp': string; + /** + * + * @type {Array} + * @memberof Cast + */ + 'embeds': Array; + /** + * + * @type {CastNotificationType} + * @memberof Cast + */ + 'type'?: CastNotificationType; +} + + + diff --git a/src/neynar-api/v2/openapi-farcaster/models/casts-response-result.ts b/src/neynar-api/v2/openapi-farcaster/models/casts-response-result.ts new file mode 100644 index 00000000..6ea08ff4 --- /dev/null +++ b/src/neynar-api/v2/openapi-farcaster/models/casts-response-result.ts @@ -0,0 +1,33 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Farcaster API V2 + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +// May contain unused imports in some cases +// @ts-ignore +import type { CastWithInteractions } from './cast-with-interactions'; + +/** + * + * @export + * @interface CastsResponseResult + */ +export interface CastsResponseResult { + /** + * + * @type {Array} + * @memberof CastsResponseResult + */ + 'casts': Array; +} + diff --git a/src/neynar-api/v2/openapi-farcaster/models/casts-response.ts b/src/neynar-api/v2/openapi-farcaster/models/casts-response.ts new file mode 100644 index 00000000..3175f52c --- /dev/null +++ b/src/neynar-api/v2/openapi-farcaster/models/casts-response.ts @@ -0,0 +1,33 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Farcaster API V2 + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +// May contain unused imports in some cases +// @ts-ignore +import type { CastsResponseResult } from './casts-response-result'; + +/** + * + * @export + * @interface CastsResponse + */ +export interface CastsResponse { + /** + * + * @type {CastsResponseResult} + * @memberof CastsResponse + */ + 'result': CastsResponseResult; +} + diff --git a/src/neynar-api/v2/openapi-farcaster/models/casts-search-response-result.ts b/src/neynar-api/v2/openapi-farcaster/models/casts-search-response-result.ts new file mode 100644 index 00000000..bdd5541f --- /dev/null +++ b/src/neynar-api/v2/openapi-farcaster/models/casts-search-response-result.ts @@ -0,0 +1,42 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Farcaster API V2 + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +// May contain unused imports in some cases +// @ts-ignore +import type { CastWithInteractions } from './cast-with-interactions'; +// May contain unused imports in some cases +// @ts-ignore +import type { NextCursor } from './next-cursor'; + +/** + * + * @export + * @interface CastsSearchResponseResult + */ +export interface CastsSearchResponseResult { + /** + * + * @type {Array} + * @memberof CastsSearchResponseResult + */ + 'casts': Array; + /** + * + * @type {NextCursor} + * @memberof CastsSearchResponseResult + */ + 'next': NextCursor; +} + diff --git a/src/neynar-api/v2/openapi-farcaster/models/casts-search-response.ts b/src/neynar-api/v2/openapi-farcaster/models/casts-search-response.ts new file mode 100644 index 00000000..24988a1c --- /dev/null +++ b/src/neynar-api/v2/openapi-farcaster/models/casts-search-response.ts @@ -0,0 +1,33 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Farcaster API V2 + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +// May contain unused imports in some cases +// @ts-ignore +import type { CastsSearchResponseResult } from './casts-search-response-result'; + +/** + * + * @export + * @interface CastsSearchResponse + */ +export interface CastsSearchResponse { + /** + * + * @type {CastsSearchResponseResult} + * @memberof CastsSearchResponse + */ + 'result': CastsSearchResponseResult; +} + diff --git a/src/neynar-api/v2/openapi-farcaster/models/channel-activity.ts b/src/neynar-api/v2/openapi-farcaster/models/channel-activity.ts new file mode 100644 index 00000000..06e0a555 --- /dev/null +++ b/src/neynar-api/v2/openapi-farcaster/models/channel-activity.ts @@ -0,0 +1,64 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Farcaster API V2 + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +// May contain unused imports in some cases +// @ts-ignore +import type { Channel } from './channel'; + +/** + * + * @export + * @interface ChannelActivity + */ +export interface ChannelActivity { + /** + * + * @type {string} + * @memberof ChannelActivity + */ + 'object': ChannelActivityObjectEnum; + /** + * + * @type {string} + * @memberof ChannelActivity + */ + 'cast_count_1d': string; + /** + * + * @type {string} + * @memberof ChannelActivity + */ + 'cast_count_7d': string; + /** + * + * @type {string} + * @memberof ChannelActivity + */ + 'cast_count_30d': string; + /** + * + * @type {Channel} + * @memberof ChannelActivity + */ + 'channel': Channel; +} + +export const ChannelActivityObjectEnum = { + ChannelActivity: 'channel_activity' +} as const; + +export type ChannelActivityObjectEnum = typeof ChannelActivityObjectEnum[keyof typeof ChannelActivityObjectEnum]; + + diff --git a/src/neynar-api/v2/openapi-farcaster/models/channel-external-link.ts b/src/neynar-api/v2/openapi-farcaster/models/channel-external-link.ts new file mode 100644 index 00000000..fece7bc2 --- /dev/null +++ b/src/neynar-api/v2/openapi-farcaster/models/channel-external-link.ts @@ -0,0 +1,36 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Farcaster API V2 + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + + +/** + * Channel\'s external link. + * @export + * @interface ChannelExternalLink + */ +export interface ChannelExternalLink { + /** + * + * @type {string} + * @memberof ChannelExternalLink + */ + 'title'?: string; + /** + * + * @type {string} + * @memberof ChannelExternalLink + */ + 'url'?: string; +} + diff --git a/src/neynar-api/v2/openapi-farcaster/models/channel-follow-req-body.ts b/src/neynar-api/v2/openapi-farcaster/models/channel-follow-req-body.ts new file mode 100644 index 00000000..e905e6e0 --- /dev/null +++ b/src/neynar-api/v2/openapi-farcaster/models/channel-follow-req-body.ts @@ -0,0 +1,36 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Farcaster API V2 + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + + +/** + * + * @export + * @interface ChannelFollowReqBody + */ +export interface ChannelFollowReqBody { + /** + * UUID of the signer + * @type {string} + * @memberof ChannelFollowReqBody + */ + 'signer_uuid': string; + /** + * The unique identifier of a farcaster channel + * @type {string} + * @memberof ChannelFollowReqBody + */ + 'channel_id': string; +} + diff --git a/src/neynar-api/v2/openapi-farcaster/models/channel-list-response.ts b/src/neynar-api/v2/openapi-farcaster/models/channel-list-response.ts new file mode 100644 index 00000000..195b0995 --- /dev/null +++ b/src/neynar-api/v2/openapi-farcaster/models/channel-list-response.ts @@ -0,0 +1,42 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Farcaster API V2 + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +// May contain unused imports in some cases +// @ts-ignore +import type { Channel } from './channel'; +// May contain unused imports in some cases +// @ts-ignore +import type { NextCursor } from './next-cursor'; + +/** + * + * @export + * @interface ChannelListResponse + */ +export interface ChannelListResponse { + /** + * + * @type {Array} + * @memberof ChannelListResponse + */ + 'channels': Array; + /** + * + * @type {NextCursor} + * @memberof ChannelListResponse + */ + 'next'?: NextCursor; +} + diff --git a/src/neynar-api/v2/openapi-farcaster/models/channel-member-channel.ts b/src/neynar-api/v2/openapi-farcaster/models/channel-member-channel.ts new file mode 100644 index 00000000..b63a2fa5 --- /dev/null +++ b/src/neynar-api/v2/openapi-farcaster/models/channel-member-channel.ts @@ -0,0 +1,38 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Farcaster API V2 + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +// May contain unused imports in some cases +// @ts-ignore +import type { Channel } from './channel'; +// May contain unused imports in some cases +// @ts-ignore +import type { ChannelExternalLink } from './channel-external-link'; +// May contain unused imports in some cases +// @ts-ignore +import type { ChannelUserContext } from './channel-user-context'; +// May contain unused imports in some cases +// @ts-ignore +import type { DehydratedChannel } from './dehydrated-channel'; +// May contain unused imports in some cases +// @ts-ignore +import type { User } from './user'; + +/** + * @type ChannelMemberChannel + * @export + */ +export type ChannelMemberChannel = Channel | DehydratedChannel; + + diff --git a/src/neynar-api/v2/openapi-farcaster/models/channel-member-invite-list-response.ts b/src/neynar-api/v2/openapi-farcaster/models/channel-member-invite-list-response.ts new file mode 100644 index 00000000..957b684e --- /dev/null +++ b/src/neynar-api/v2/openapi-farcaster/models/channel-member-invite-list-response.ts @@ -0,0 +1,42 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Farcaster API V2 + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +// May contain unused imports in some cases +// @ts-ignore +import type { ChannelMemberInvite } from './channel-member-invite'; +// May contain unused imports in some cases +// @ts-ignore +import type { NextCursor } from './next-cursor'; + +/** + * + * @export + * @interface ChannelMemberInviteListResponse + */ +export interface ChannelMemberInviteListResponse { + /** + * + * @type {Array} + * @memberof ChannelMemberInviteListResponse + */ + 'invites': Array; + /** + * + * @type {NextCursor} + * @memberof ChannelMemberInviteListResponse + */ + 'next'?: NextCursor; +} + diff --git a/src/neynar-api/v2/openapi-farcaster/models/channel-member-invite.ts b/src/neynar-api/v2/openapi-farcaster/models/channel-member-invite.ts new file mode 100644 index 00000000..eccdbf7d --- /dev/null +++ b/src/neynar-api/v2/openapi-farcaster/models/channel-member-invite.ts @@ -0,0 +1,56 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Farcaster API V2 + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +// May contain unused imports in some cases +// @ts-ignore +import type { ChannelMemberRole } from './channel-member-role'; +// May contain unused imports in some cases +// @ts-ignore +import type { User } from './user'; + +/** + * + * @export + * @interface ChannelMemberInvite + */ +export interface ChannelMemberInvite { + /** + * The unique identifier of a farcaster channel + * @type {string} + * @memberof ChannelMemberInvite + */ + 'channel_id': string; + /** + * + * @type {ChannelMemberRole} + * @memberof ChannelMemberInvite + */ + 'role': ChannelMemberRole; + /** + * + * @type {User} + * @memberof ChannelMemberInvite + */ + 'inviter': User; + /** + * + * @type {User} + * @memberof ChannelMemberInvite + */ + 'invited': User; +} + + + diff --git a/src/neynar-api/v2/openapi-farcaster/models/channel-member-list-response.ts b/src/neynar-api/v2/openapi-farcaster/models/channel-member-list-response.ts new file mode 100644 index 00000000..4cc65cce --- /dev/null +++ b/src/neynar-api/v2/openapi-farcaster/models/channel-member-list-response.ts @@ -0,0 +1,42 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Farcaster API V2 + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +// May contain unused imports in some cases +// @ts-ignore +import type { ChannelMember } from './channel-member'; +// May contain unused imports in some cases +// @ts-ignore +import type { NextCursor } from './next-cursor'; + +/** + * + * @export + * @interface ChannelMemberListResponse + */ +export interface ChannelMemberListResponse { + /** + * + * @type {Array} + * @memberof ChannelMemberListResponse + */ + 'members': Array; + /** + * + * @type {NextCursor} + * @memberof ChannelMemberListResponse + */ + 'next': NextCursor; +} + diff --git a/src/neynar-api/v2/openapi-farcaster/models/channel-member-role.ts b/src/neynar-api/v2/openapi-farcaster/models/channel-member-role.ts new file mode 100644 index 00000000..7d65995b --- /dev/null +++ b/src/neynar-api/v2/openapi-farcaster/models/channel-member-role.ts @@ -0,0 +1,31 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Farcaster API V2 + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + + +/** + * The role of a channel member + * @export + * @enum {string} + */ + +export const ChannelMemberRole = { + Member: 'member', + Moderator: 'moderator' +} as const; + +export type ChannelMemberRole = typeof ChannelMemberRole[keyof typeof ChannelMemberRole]; + + + diff --git a/src/neynar-api/v2/openapi-farcaster/models/channel-member-user.ts b/src/neynar-api/v2/openapi-farcaster/models/channel-member-user.ts new file mode 100644 index 00000000..19f7729d --- /dev/null +++ b/src/neynar-api/v2/openapi-farcaster/models/channel-member-user.ts @@ -0,0 +1,41 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Farcaster API V2 + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +// May contain unused imports in some cases +// @ts-ignore +import type { User } from './user'; +// May contain unused imports in some cases +// @ts-ignore +import type { UserDehydrated } from './user-dehydrated'; +// May contain unused imports in some cases +// @ts-ignore +import type { UserProfile } from './user-profile'; +// May contain unused imports in some cases +// @ts-ignore +import type { UserVerifiedAccountsInner } from './user-verified-accounts-inner'; +// May contain unused imports in some cases +// @ts-ignore +import type { UserVerifiedAddresses } from './user-verified-addresses'; +// May contain unused imports in some cases +// @ts-ignore +import type { UserViewerContext } from './user-viewer-context'; + +/** + * @type ChannelMemberUser + * @export + */ +export type ChannelMemberUser = User | UserDehydrated; + + diff --git a/src/neynar-api/v2/openapi-farcaster/models/channel-member.ts b/src/neynar-api/v2/openapi-farcaster/models/channel-member.ts new file mode 100644 index 00000000..d055336b --- /dev/null +++ b/src/neynar-api/v2/openapi-farcaster/models/channel-member.ts @@ -0,0 +1,64 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Farcaster API V2 + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +// May contain unused imports in some cases +// @ts-ignore +import type { ChannelMemberChannel } from './channel-member-channel'; +// May contain unused imports in some cases +// @ts-ignore +import type { ChannelMemberRole } from './channel-member-role'; +// May contain unused imports in some cases +// @ts-ignore +import type { ChannelMemberUser } from './channel-member-user'; + +/** + * + * @export + * @interface ChannelMember + */ +export interface ChannelMember { + /** + * + * @type {string} + * @memberof ChannelMember + */ + 'object': ChannelMemberObjectEnum; + /** + * + * @type {ChannelMemberRole} + * @memberof ChannelMember + */ + 'role': ChannelMemberRole; + /** + * + * @type {ChannelMemberUser} + * @memberof ChannelMember + */ + 'user': ChannelMemberUser; + /** + * + * @type {ChannelMemberChannel} + * @memberof ChannelMember + */ + 'channel': ChannelMemberChannel; +} + +export const ChannelMemberObjectEnum = { + Member: 'member' +} as const; + +export type ChannelMemberObjectEnum = typeof ChannelMemberObjectEnum[keyof typeof ChannelMemberObjectEnum]; + + diff --git a/src/neynar-api/v2/openapi-farcaster/models/channel-or-dehydrated-channel.ts b/src/neynar-api/v2/openapi-farcaster/models/channel-or-dehydrated-channel.ts new file mode 100644 index 00000000..4e96bee6 --- /dev/null +++ b/src/neynar-api/v2/openapi-farcaster/models/channel-or-dehydrated-channel.ts @@ -0,0 +1,38 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Farcaster API V2 + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +// May contain unused imports in some cases +// @ts-ignore +import type { Channel } from './channel'; +// May contain unused imports in some cases +// @ts-ignore +import type { ChannelExternalLink } from './channel-external-link'; +// May contain unused imports in some cases +// @ts-ignore +import type { ChannelUserContext } from './channel-user-context'; +// May contain unused imports in some cases +// @ts-ignore +import type { DehydratedChannel } from './dehydrated-channel'; +// May contain unused imports in some cases +// @ts-ignore +import type { User } from './user'; + +/** + * @type ChannelOrDehydratedChannel + * @export + */ +export type ChannelOrDehydratedChannel = { object: 'channel' } & Channel | { object: 'dehydrated_channel' } & DehydratedChannel; + + diff --git a/src/neynar-api/v2/openapi-farcaster/models/channel-response-bulk.ts b/src/neynar-api/v2/openapi-farcaster/models/channel-response-bulk.ts new file mode 100644 index 00000000..f80a2661 --- /dev/null +++ b/src/neynar-api/v2/openapi-farcaster/models/channel-response-bulk.ts @@ -0,0 +1,33 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Farcaster API V2 + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +// May contain unused imports in some cases +// @ts-ignore +import type { Channel } from './channel'; + +/** + * + * @export + * @interface ChannelResponseBulk + */ +export interface ChannelResponseBulk { + /** + * + * @type {Array} + * @memberof ChannelResponseBulk + */ + 'channels': Array; +} + diff --git a/src/neynar-api/v2/openapi-farcaster/models/channel-response.ts b/src/neynar-api/v2/openapi-farcaster/models/channel-response.ts new file mode 100644 index 00000000..bb6653e2 --- /dev/null +++ b/src/neynar-api/v2/openapi-farcaster/models/channel-response.ts @@ -0,0 +1,33 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Farcaster API V2 + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +// May contain unused imports in some cases +// @ts-ignore +import type { Channel } from './channel'; + +/** + * + * @export + * @interface ChannelResponse + */ +export interface ChannelResponse { + /** + * + * @type {Channel} + * @memberof ChannelResponse + */ + 'channel': Channel; +} + diff --git a/src/neynar-api/v2/openapi-farcaster/models/channel-search-response.ts b/src/neynar-api/v2/openapi-farcaster/models/channel-search-response.ts new file mode 100644 index 00000000..49e2eebe --- /dev/null +++ b/src/neynar-api/v2/openapi-farcaster/models/channel-search-response.ts @@ -0,0 +1,42 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Farcaster API V2 + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +// May contain unused imports in some cases +// @ts-ignore +import type { Channel } from './channel'; +// May contain unused imports in some cases +// @ts-ignore +import type { NextCursor } from './next-cursor'; + +/** + * + * @export + * @interface ChannelSearchResponse + */ +export interface ChannelSearchResponse { + /** + * + * @type {Array} + * @memberof ChannelSearchResponse + */ + 'channels': Array; + /** + * + * @type {NextCursor} + * @memberof ChannelSearchResponse + */ + 'next': NextCursor; +} + diff --git a/src/neynar-api/v2/openapi-farcaster/models/channel-type.ts b/src/neynar-api/v2/openapi-farcaster/models/channel-type.ts new file mode 100644 index 00000000..ed5342be --- /dev/null +++ b/src/neynar-api/v2/openapi-farcaster/models/channel-type.ts @@ -0,0 +1,31 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Farcaster API V2 + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + + +/** + * + * @export + * @enum {string} + */ + +export const ChannelType = { + Id: 'id', + ParentUrl: 'parent_url' +} as const; + +export type ChannelType = typeof ChannelType[keyof typeof ChannelType]; + + + diff --git a/src/neynar-api/v2/openapi-farcaster/models/channel-user-context.ts b/src/neynar-api/v2/openapi-farcaster/models/channel-user-context.ts new file mode 100644 index 00000000..2625532f --- /dev/null +++ b/src/neynar-api/v2/openapi-farcaster/models/channel-user-context.ts @@ -0,0 +1,41 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Farcaster API V2 + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +// May contain unused imports in some cases +// @ts-ignore +import type { ChannelMemberRole } from './channel-member-role'; + +/** + * Adds context on the viewer\'s or author\'s role in the channel. + * @export + * @interface ChannelUserContext + */ +export interface ChannelUserContext { + /** + * Indicates if the user is following the channel. + * @type {boolean} + * @memberof ChannelUserContext + */ + 'following': boolean; + /** + * + * @type {ChannelMemberRole} + * @memberof ChannelUserContext + */ + 'role'?: ChannelMemberRole; +} + + + diff --git a/src/neynar-api/v2/openapi-farcaster/models/channel-viewer-context.ts b/src/neynar-api/v2/openapi-farcaster/models/channel-viewer-context.ts new file mode 100644 index 00000000..22c73559 --- /dev/null +++ b/src/neynar-api/v2/openapi-farcaster/models/channel-viewer-context.ts @@ -0,0 +1,30 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Farcaster API V2 + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + + +/** + * + * @export + * @interface ChannelViewerContext + */ +export interface ChannelViewerContext { + /** + * Indicates if the viewer is following the channel. + * @type {boolean} + * @memberof ChannelViewerContext + */ + 'following': boolean; +} + diff --git a/src/neynar-api/v2/openapi-farcaster/models/channel.ts b/src/neynar-api/v2/openapi-farcaster/models/channel.ts new file mode 100644 index 00000000..582d0d4e --- /dev/null +++ b/src/neynar-api/v2/openapi-farcaster/models/channel.ts @@ -0,0 +1,143 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Farcaster API V2 + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +// May contain unused imports in some cases +// @ts-ignore +import type { ChannelExternalLink } from './channel-external-link'; +// May contain unused imports in some cases +// @ts-ignore +import type { ChannelUserContext } from './channel-user-context'; +// May contain unused imports in some cases +// @ts-ignore +import type { User } from './user'; + +/** + * + * @export + * @interface Channel + */ +export interface Channel { + /** + * + * @type {string} + * @memberof Channel + */ + 'id': string; + /** + * + * @type {string} + * @memberof Channel + */ + 'url': string; + /** + * + * @type {string} + * @memberof Channel + */ + 'name'?: string; + /** + * + * @type {string} + * @memberof Channel + */ + 'description'?: string; + /** + * + * @type {string} + * @memberof Channel + */ + 'object': ChannelObjectEnum; + /** + * Epoch timestamp in seconds. + * @type {number} + * @memberof Channel + */ + 'created_at'?: number; + /** + * Number of followers the channel has. + * @type {number} + * @memberof Channel + */ + 'follower_count'?: number; + /** + * + * @type {ChannelExternalLink} + * @memberof Channel + */ + 'external_link'?: ChannelExternalLink; + /** + * + * @type {string} + * @memberof Channel + */ + 'image_url'?: string; + /** + * + * @type {string} + * @memberof Channel + */ + 'parent_url'?: string; + /** + * + * @type {User} + * @memberof Channel + */ + 'lead'?: User; + /** + * + * @type {Array} + * @memberof Channel + */ + 'moderator_fids'?: Array; + /** + * + * @type {number} + * @memberof Channel + */ + 'member_count'?: number; + /** + * Use `lead` instead. + * @type {User} + * @memberof Channel + * @deprecated + */ + 'moderator'?: User; + /** + * Cast Hash + * @type {string} + * @memberof Channel + */ + 'pinned_cast_hash'?: string; + /** + * + * @type {Array} + * @memberof Channel + */ + 'hosts'?: Array; + /** + * + * @type {ChannelUserContext} + * @memberof Channel + */ + 'viewer_context'?: ChannelUserContext; +} + +export const ChannelObjectEnum = { + Channel: 'channel' +} as const; + +export type ChannelObjectEnum = typeof ChannelObjectEnum[keyof typeof ChannelObjectEnum]; + + diff --git a/src/neynar-api/v2/openapi-farcaster/models/conflict-error-res.ts b/src/neynar-api/v2/openapi-farcaster/models/conflict-error-res.ts new file mode 100644 index 00000000..bbf61153 --- /dev/null +++ b/src/neynar-api/v2/openapi-farcaster/models/conflict-error-res.ts @@ -0,0 +1,48 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Farcaster API V2 + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + + +/** + * Details for the conflict error response + * @export + * @interface ConflictErrorRes + */ +export interface ConflictErrorRes { + /** + * + * @type {string} + * @memberof ConflictErrorRes + */ + 'code'?: string; + /** + * + * @type {string} + * @memberof ConflictErrorRes + */ + 'message': string; + /** + * + * @type {string} + * @memberof ConflictErrorRes + */ + 'property'?: string; + /** + * + * @type {string} + * @memberof ConflictErrorRes + */ + 'key'?: string; +} + diff --git a/src/neynar-api/v2/openapi-farcaster/models/conversation-conversation.ts b/src/neynar-api/v2/openapi-farcaster/models/conversation-conversation.ts new file mode 100644 index 00000000..419f46fb --- /dev/null +++ b/src/neynar-api/v2/openapi-farcaster/models/conversation-conversation.ts @@ -0,0 +1,42 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Farcaster API V2 + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +// May contain unused imports in some cases +// @ts-ignore +import type { CastWithInteractions } from './cast-with-interactions'; +// May contain unused imports in some cases +// @ts-ignore +import type { CastWithInteractionsAndConversations } from './cast-with-interactions-and-conversations'; + +/** + * + * @export + * @interface ConversationConversation + */ +export interface ConversationConversation { + /** + * + * @type {CastWithInteractionsAndConversations} + * @memberof ConversationConversation + */ + 'cast': CastWithInteractionsAndConversations; + /** + * + * @type {Array} + * @memberof ConversationConversation + */ + 'chronological_parent_casts'?: Array; +} + diff --git a/src/neynar-api/v2/openapi-farcaster/models/conversation.ts b/src/neynar-api/v2/openapi-farcaster/models/conversation.ts new file mode 100644 index 00000000..602101a3 --- /dev/null +++ b/src/neynar-api/v2/openapi-farcaster/models/conversation.ts @@ -0,0 +1,42 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Farcaster API V2 + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +// May contain unused imports in some cases +// @ts-ignore +import type { ConversationConversation } from './conversation-conversation'; +// May contain unused imports in some cases +// @ts-ignore +import type { NextCursor } from './next-cursor'; + +/** + * + * @export + * @interface Conversation + */ +export interface Conversation { + /** + * + * @type {ConversationConversation} + * @memberof Conversation + */ + 'conversation': ConversationConversation; + /** + * + * @type {NextCursor} + * @memberof Conversation + */ + 'next'?: NextCursor; +} + diff --git a/src/neynar-api/v2/openapi-farcaster/models/dehydrated-channel.ts b/src/neynar-api/v2/openapi-farcaster/models/dehydrated-channel.ts new file mode 100644 index 00000000..039a370d --- /dev/null +++ b/src/neynar-api/v2/openapi-farcaster/models/dehydrated-channel.ts @@ -0,0 +1,64 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Farcaster API V2 + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +// May contain unused imports in some cases +// @ts-ignore +import type { ChannelUserContext } from './channel-user-context'; + +/** + * + * @export + * @interface DehydratedChannel + */ +export interface DehydratedChannel { + /** + * + * @type {string} + * @memberof DehydratedChannel + */ + 'id': string; + /** + * + * @type {string} + * @memberof DehydratedChannel + */ + 'name': string; + /** + * + * @type {string} + * @memberof DehydratedChannel + */ + 'object': DehydratedChannelObjectEnum; + /** + * + * @type {string} + * @memberof DehydratedChannel + */ + 'image_url'?: string; + /** + * + * @type {ChannelUserContext} + * @memberof DehydratedChannel + */ + 'viewer_context'?: ChannelUserContext; +} + +export const DehydratedChannelObjectEnum = { + ChannelDehydrated: 'channel_dehydrated' +} as const; + +export type DehydratedChannelObjectEnum = typeof DehydratedChannelObjectEnum[keyof typeof DehydratedChannelObjectEnum]; + + diff --git a/src/neynar-api/v2/openapi-farcaster/models/dehydrated-follower.ts b/src/neynar-api/v2/openapi-farcaster/models/dehydrated-follower.ts new file mode 100644 index 00000000..b01957cb --- /dev/null +++ b/src/neynar-api/v2/openapi-farcaster/models/dehydrated-follower.ts @@ -0,0 +1,46 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Farcaster API V2 + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +// May contain unused imports in some cases +// @ts-ignore +import type { UserDehydrated } from './user-dehydrated'; + +/** + * + * @export + * @interface DehydratedFollower + */ +export interface DehydratedFollower { + /** + * + * @type {string} + * @memberof DehydratedFollower + */ + 'object'?: DehydratedFollowerObjectEnum; + /** + * + * @type {UserDehydrated} + * @memberof DehydratedFollower + */ + 'user'?: UserDehydrated; +} + +export const DehydratedFollowerObjectEnum = { + Follow: 'follow' +} as const; + +export type DehydratedFollowerObjectEnum = typeof DehydratedFollowerObjectEnum[keyof typeof DehydratedFollowerObjectEnum]; + + diff --git a/src/neynar-api/v2/openapi-farcaster/models/delete-cast-req-body.ts b/src/neynar-api/v2/openapi-farcaster/models/delete-cast-req-body.ts new file mode 100644 index 00000000..2b0f197f --- /dev/null +++ b/src/neynar-api/v2/openapi-farcaster/models/delete-cast-req-body.ts @@ -0,0 +1,36 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Farcaster API V2 + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + + +/** + * + * @export + * @interface DeleteCastReqBody + */ +export interface DeleteCastReqBody { + /** + * UUID of the signer + * @type {string} + * @memberof DeleteCastReqBody + */ + 'signer_uuid': string; + /** + * Cast Hash + * @type {string} + * @memberof DeleteCastReqBody + */ + 'target_hash': string; +} + diff --git a/src/neynar-api/v2/openapi-farcaster/models/delete-frame-response.ts b/src/neynar-api/v2/openapi-farcaster/models/delete-frame-response.ts new file mode 100644 index 00000000..f0a125ba --- /dev/null +++ b/src/neynar-api/v2/openapi-farcaster/models/delete-frame-response.ts @@ -0,0 +1,36 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Farcaster API V2 + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + + +/** + * + * @export + * @interface DeleteFrameResponse + */ +export interface DeleteFrameResponse { + /** + * + * @type {boolean} + * @memberof DeleteFrameResponse + */ + 'success'?: boolean; + /** + * + * @type {string} + * @memberof DeleteFrameResponse + */ + 'uuid'?: string; +} + diff --git a/src/neynar-api/v2/openapi-farcaster/models/delete-neynar-frame-request.ts b/src/neynar-api/v2/openapi-farcaster/models/delete-neynar-frame-request.ts new file mode 100644 index 00000000..e462dce9 --- /dev/null +++ b/src/neynar-api/v2/openapi-farcaster/models/delete-neynar-frame-request.ts @@ -0,0 +1,30 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Farcaster API V2 + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + + +/** + * + * @export + * @interface DeleteNeynarFrameRequest + */ +export interface DeleteNeynarFrameRequest { + /** + * + * @type {string} + * @memberof DeleteNeynarFrameRequest + */ + 'uuid'?: string; +} + diff --git a/src/neynar-api/v2/openapi-farcaster/models/developer-managed-signer.ts b/src/neynar-api/v2/openapi-farcaster/models/developer-managed-signer.ts new file mode 100644 index 00000000..15c87ddd --- /dev/null +++ b/src/neynar-api/v2/openapi-farcaster/models/developer-managed-signer.ts @@ -0,0 +1,57 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Farcaster API V2 + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + + +/** + * + * @export + * @interface DeveloperManagedSigner + */ +export interface DeveloperManagedSigner { + /** + * Ed25519 public key + * @type {string} + * @memberof DeveloperManagedSigner + */ + 'public_key': string; + /** + * + * @type {string} + * @memberof DeveloperManagedSigner + */ + 'status': DeveloperManagedSignerStatusEnum; + /** + * + * @type {string} + * @memberof DeveloperManagedSigner + */ + 'signer_approval_url'?: string; + /** + * The unique identifier of a farcaster user (unsigned integer) + * @type {number} + * @memberof DeveloperManagedSigner + */ + 'fid'?: number; +} + +export const DeveloperManagedSignerStatusEnum = { + PendingApproval: 'pending_approval', + Approved: 'approved', + Revoked: 'revoked' +} as const; + +export type DeveloperManagedSignerStatusEnum = typeof DeveloperManagedSignerStatusEnum[keyof typeof DeveloperManagedSignerStatusEnum]; + + diff --git a/src/neynar-api/v2/openapi-farcaster/models/embed-cast-deep.ts b/src/neynar-api/v2/openapi-farcaster/models/embed-cast-deep.ts new file mode 100644 index 00000000..48f755a2 --- /dev/null +++ b/src/neynar-api/v2/openapi-farcaster/models/embed-cast-deep.ts @@ -0,0 +1,43 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Farcaster API V2 + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +// May contain unused imports in some cases +// @ts-ignore +import type { CastDehydrated } from './cast-dehydrated'; +// May contain unused imports in some cases +// @ts-ignore +import type { CastId } from './cast-id'; + +/** + * + * @export + * @interface EmbedCastDeep + */ +export interface EmbedCastDeep { + /** + * [DEPRECATED: Use \"cast\" key instead] + * @type {CastId} + * @memberof EmbedCastDeep + * @deprecated + */ + 'cast_id'?: CastId; + /** + * + * @type {CastDehydrated} + * @memberof EmbedCastDeep + */ + 'cast': CastDehydrated; +} + diff --git a/src/neynar-api/v2/openapi-farcaster/models/embed-cast.ts b/src/neynar-api/v2/openapi-farcaster/models/embed-cast.ts new file mode 100644 index 00000000..f666f2cc --- /dev/null +++ b/src/neynar-api/v2/openapi-farcaster/models/embed-cast.ts @@ -0,0 +1,43 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Farcaster API V2 + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +// May contain unused imports in some cases +// @ts-ignore +import type { CastEmbedded } from './cast-embedded'; +// May contain unused imports in some cases +// @ts-ignore +import type { CastId } from './cast-id'; + +/** + * + * @export + * @interface EmbedCast + */ +export interface EmbedCast { + /** + * [DEPRECATED: Use \"cast\" key instead] + * @type {CastId} + * @memberof EmbedCast + * @deprecated + */ + 'cast_id'?: CastId; + /** + * + * @type {CastEmbedded} + * @memberof EmbedCast + */ + 'cast': CastEmbedded; +} + diff --git a/src/neynar-api/v2/openapi-farcaster/models/embed-deep.ts b/src/neynar-api/v2/openapi-farcaster/models/embed-deep.ts new file mode 100644 index 00000000..cf60df7f --- /dev/null +++ b/src/neynar-api/v2/openapi-farcaster/models/embed-deep.ts @@ -0,0 +1,38 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Farcaster API V2 + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +// May contain unused imports in some cases +// @ts-ignore +import type { CastDehydrated } from './cast-dehydrated'; +// May contain unused imports in some cases +// @ts-ignore +import type { CastId } from './cast-id'; +// May contain unused imports in some cases +// @ts-ignore +import type { EmbedCastDeep } from './embed-cast-deep'; +// May contain unused imports in some cases +// @ts-ignore +import type { EmbedUrl } from './embed-url'; +// May contain unused imports in some cases +// @ts-ignore +import type { EmbedUrlMetadata } from './embed-url-metadata'; + +/** + * @type EmbedDeep + * @export + */ +export type EmbedDeep = EmbedCastDeep | EmbedUrl; + + diff --git a/src/neynar-api/v2/openapi-farcaster/models/embed-type.ts b/src/neynar-api/v2/openapi-farcaster/models/embed-type.ts new file mode 100644 index 00000000..4fe66290 --- /dev/null +++ b/src/neynar-api/v2/openapi-farcaster/models/embed-type.ts @@ -0,0 +1,47 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Farcaster API V2 + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + + +/** + * The content type of the embedded file + * @export + * @enum {string} + */ + +export const EmbedType = { + Text: 'text', + Image: 'image', + Video: 'video', + Audio: 'audio', + TextHtml: 'text/html', + TextPlain: 'text/plain', + ImageJpeg: 'image/jpeg', + ImagePng: 'image/png', + ImageGif: 'image/gif', + ImageWebp: 'image/webp', + ImageSvgxml: 'image/svg+xml', + ImageHeif: 'image/heif', + VideoMp4: 'video/mp4', + VideoQuicktime: 'video/quicktime', + AudioMpeg: 'audio/mpeg', + ApplicationPdf: 'application/pdf', + ApplicationJson: 'application/json', + ApplicationXMpegurl: 'application/x-mpegurl' +} as const; + +export type EmbedType = typeof EmbedType[keyof typeof EmbedType]; + + + diff --git a/src/neynar-api/v2/openapi-farcaster/models/embed-url-metadata-html-all-of-oembed.ts b/src/neynar-api/v2/openapi-farcaster/models/embed-url-metadata-html-all-of-oembed.ts new file mode 100644 index 00000000..3676ee37 --- /dev/null +++ b/src/neynar-api/v2/openapi-farcaster/models/embed-url-metadata-html-all-of-oembed.ts @@ -0,0 +1,35 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Farcaster API V2 + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +// May contain unused imports in some cases +// @ts-ignore +import type { OembedLinkData } from './oembed-link-data'; +// May contain unused imports in some cases +// @ts-ignore +import type { OembedPhotoData } from './oembed-photo-data'; +// May contain unused imports in some cases +// @ts-ignore +import type { OembedRichData } from './oembed-rich-data'; +// May contain unused imports in some cases +// @ts-ignore +import type { OembedVideoData } from './oembed-video-data'; + +/** + * @type EmbedUrlMetadataHtmlAllOfOembed + * @export + */ +export type EmbedUrlMetadataHtmlAllOfOembed = { type: 'link' } & OembedLinkData | { type: 'photo' } & OembedPhotoData | { type: 'rich' } & OembedRichData | { type: 'video' } & OembedVideoData; + + diff --git a/src/neynar-api/v2/openapi-farcaster/models/embed-url-metadata-html-all-of.ts b/src/neynar-api/v2/openapi-farcaster/models/embed-url-metadata-html-all-of.ts new file mode 100644 index 00000000..8de89406 --- /dev/null +++ b/src/neynar-api/v2/openapi-farcaster/models/embed-url-metadata-html-all-of.ts @@ -0,0 +1,33 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Farcaster API V2 + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +// May contain unused imports in some cases +// @ts-ignore +import type { EmbedUrlMetadataHtmlAllOfOembed } from './embed-url-metadata-html-all-of-oembed'; + +/** + * + * @export + * @interface EmbedUrlMetadataHtmlAllOf + */ +export interface EmbedUrlMetadataHtmlAllOf { + /** + * + * @type {EmbedUrlMetadataHtmlAllOfOembed} + * @memberof EmbedUrlMetadataHtmlAllOf + */ + 'oembed'?: EmbedUrlMetadataHtmlAllOfOembed; +} + diff --git a/src/neynar-api/v2/openapi-farcaster/models/embed-url-metadata-html.ts b/src/neynar-api/v2/openapi-farcaster/models/embed-url-metadata-html.ts new file mode 100644 index 00000000..79df302c --- /dev/null +++ b/src/neynar-api/v2/openapi-farcaster/models/embed-url-metadata-html.ts @@ -0,0 +1,38 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Farcaster API V2 + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +// May contain unused imports in some cases +// @ts-ignore +import type { EmbedUrlMetadataHtmlAllOf } from './embed-url-metadata-html-all-of'; +// May contain unused imports in some cases +// @ts-ignore +import type { EmbedUrlMetadataHtmlAllOfOembed } from './embed-url-metadata-html-all-of-oembed'; +// May contain unused imports in some cases +// @ts-ignore +import type { ImageObject } from './image-object'; +// May contain unused imports in some cases +// @ts-ignore +import type { OgObject } from './og-object'; +// May contain unused imports in some cases +// @ts-ignore +import type { VideoObject } from './video-object'; + +/** + * @type EmbedUrlMetadataHtml + * @export + */ +export type EmbedUrlMetadataHtml = EmbedUrlMetadataHtmlAllOf & OgObject; + + diff --git a/src/neynar-api/v2/openapi-farcaster/models/embed-url-metadata-image.ts b/src/neynar-api/v2/openapi-farcaster/models/embed-url-metadata-image.ts new file mode 100644 index 00000000..8fbfdef5 --- /dev/null +++ b/src/neynar-api/v2/openapi-farcaster/models/embed-url-metadata-image.ts @@ -0,0 +1,36 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Farcaster API V2 + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + + +/** + * + * @export + * @interface EmbedUrlMetadataImage + */ +export interface EmbedUrlMetadataImage { + /** + * + * @type {number} + * @memberof EmbedUrlMetadataImage + */ + 'height_px'?: number; + /** + * + * @type {number} + * @memberof EmbedUrlMetadataImage + */ + 'width_px'?: number; +} + diff --git a/src/neynar-api/v2/openapi-farcaster/models/embed-url-metadata-video-stream-inner.ts b/src/neynar-api/v2/openapi-farcaster/models/embed-url-metadata-video-stream-inner.ts new file mode 100644 index 00000000..d8ea0038 --- /dev/null +++ b/src/neynar-api/v2/openapi-farcaster/models/embed-url-metadata-video-stream-inner.ts @@ -0,0 +1,42 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Farcaster API V2 + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + + +/** + * + * @export + * @interface EmbedUrlMetadataVideoStreamInner + */ +export interface EmbedUrlMetadataVideoStreamInner { + /** + * + * @type {string} + * @memberof EmbedUrlMetadataVideoStreamInner + */ + 'codec_name'?: string; + /** + * + * @type {number} + * @memberof EmbedUrlMetadataVideoStreamInner + */ + 'height_px'?: number; + /** + * + * @type {number} + * @memberof EmbedUrlMetadataVideoStreamInner + */ + 'width_px'?: number; +} + diff --git a/src/neynar-api/v2/openapi-farcaster/models/embed-url-metadata-video.ts b/src/neynar-api/v2/openapi-farcaster/models/embed-url-metadata-video.ts new file mode 100644 index 00000000..b6a92073 --- /dev/null +++ b/src/neynar-api/v2/openapi-farcaster/models/embed-url-metadata-video.ts @@ -0,0 +1,39 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Farcaster API V2 + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +// May contain unused imports in some cases +// @ts-ignore +import type { EmbedUrlMetadataVideoStreamInner } from './embed-url-metadata-video-stream-inner'; + +/** + * + * @export + * @interface EmbedUrlMetadataVideo + */ +export interface EmbedUrlMetadataVideo { + /** + * + * @type {number} + * @memberof EmbedUrlMetadataVideo + */ + 'duration_s'?: number; + /** + * + * @type {Array} + * @memberof EmbedUrlMetadataVideo + */ + 'stream'?: Array; +} + diff --git a/src/neynar-api/v2/openapi-farcaster/models/embed-url-metadata.ts b/src/neynar-api/v2/openapi-farcaster/models/embed-url-metadata.ts new file mode 100644 index 00000000..f750d509 --- /dev/null +++ b/src/neynar-api/v2/openapi-farcaster/models/embed-url-metadata.ts @@ -0,0 +1,69 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Farcaster API V2 + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +// May contain unused imports in some cases +// @ts-ignore +import type { EmbedUrlMetadataHtml } from './embed-url-metadata-html'; +// May contain unused imports in some cases +// @ts-ignore +import type { EmbedUrlMetadataImage } from './embed-url-metadata-image'; +// May contain unused imports in some cases +// @ts-ignore +import type { EmbedUrlMetadataVideo } from './embed-url-metadata-video'; + +/** + * + * @export + * @interface EmbedUrlMetadata + */ +export interface EmbedUrlMetadata { + /** + * + * @type {string} + * @memberof EmbedUrlMetadata + */ + '_status': string; + /** + * + * @type {string} + * @memberof EmbedUrlMetadata + */ + 'content_type'?: string | null; + /** + * + * @type {number} + * @memberof EmbedUrlMetadata + */ + 'content_length'?: number | null; + /** + * + * @type {EmbedUrlMetadataImage} + * @memberof EmbedUrlMetadata + */ + 'image'?: EmbedUrlMetadataImage; + /** + * + * @type {EmbedUrlMetadataVideo} + * @memberof EmbedUrlMetadata + */ + 'video'?: EmbedUrlMetadataVideo; + /** + * + * @type {EmbedUrlMetadataHtml} + * @memberof EmbedUrlMetadata + */ + 'html'?: EmbedUrlMetadataHtml; +} + diff --git a/src/neynar-api/v2/openapi-farcaster/models/embed-url.ts b/src/neynar-api/v2/openapi-farcaster/models/embed-url.ts new file mode 100644 index 00000000..5a830a60 --- /dev/null +++ b/src/neynar-api/v2/openapi-farcaster/models/embed-url.ts @@ -0,0 +1,39 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Farcaster API V2 + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +// May contain unused imports in some cases +// @ts-ignore +import type { EmbedUrlMetadata } from './embed-url-metadata'; + +/** + * + * @export + * @interface EmbedUrl + */ +export interface EmbedUrl { + /** + * + * @type {string} + * @memberof EmbedUrl + */ + 'url': string; + /** + * + * @type {EmbedUrlMetadata} + * @memberof EmbedUrl + */ + 'metadata'?: EmbedUrlMetadata; +} + diff --git a/src/neynar-api/v2/openapi-farcaster/models/embed.ts b/src/neynar-api/v2/openapi-farcaster/models/embed.ts new file mode 100644 index 00000000..f37ed9eb --- /dev/null +++ b/src/neynar-api/v2/openapi-farcaster/models/embed.ts @@ -0,0 +1,38 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Farcaster API V2 + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +// May contain unused imports in some cases +// @ts-ignore +import type { CastEmbedded } from './cast-embedded'; +// May contain unused imports in some cases +// @ts-ignore +import type { CastId } from './cast-id'; +// May contain unused imports in some cases +// @ts-ignore +import type { EmbedCast } from './embed-cast'; +// May contain unused imports in some cases +// @ts-ignore +import type { EmbedUrl } from './embed-url'; +// May contain unused imports in some cases +// @ts-ignore +import type { EmbedUrlMetadata } from './embed-url-metadata'; + +/** + * @type Embed + * @export + */ +export type Embed = EmbedCast | EmbedUrl; + + diff --git a/src/neynar-api/v2/openapi-farcaster/models/error-res.ts b/src/neynar-api/v2/openapi-farcaster/models/error-res.ts new file mode 100644 index 00000000..a34fc0c9 --- /dev/null +++ b/src/neynar-api/v2/openapi-farcaster/models/error-res.ts @@ -0,0 +1,48 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Farcaster API V2 + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + + +/** + * Details for the error response + * @export + * @interface ErrorRes + */ +export interface ErrorRes { + /** + * + * @type {string} + * @memberof ErrorRes + */ + 'code'?: string; + /** + * + * @type {string} + * @memberof ErrorRes + */ + 'message': string; + /** + * + * @type {string} + * @memberof ErrorRes + */ + 'property'?: string; + /** + * + * @type {number} + * @memberof ErrorRes + */ + 'status'?: number; +} + diff --git a/src/neynar-api/v2/openapi-farcaster/models/farcaster-action-req-body-action.ts b/src/neynar-api/v2/openapi-farcaster/models/farcaster-action-req-body-action.ts new file mode 100644 index 00000000..3e2c9574 --- /dev/null +++ b/src/neynar-api/v2/openapi-farcaster/models/farcaster-action-req-body-action.ts @@ -0,0 +1,36 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Farcaster API V2 + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + + +/** + * + * @export + * @interface FarcasterActionReqBodyAction + */ +export interface FarcasterActionReqBodyAction { + /** + * The type of action being performed. + * @type {string} + * @memberof FarcasterActionReqBodyAction + */ + 'type': string; + /** + * The payload of the action being performed. + * @type {object} + * @memberof FarcasterActionReqBodyAction + */ + 'payload'?: object; +} + diff --git a/src/neynar-api/v2/openapi-farcaster/models/farcaster-action-req-body.ts b/src/neynar-api/v2/openapi-farcaster/models/farcaster-action-req-body.ts new file mode 100644 index 00000000..8f7e5dc6 --- /dev/null +++ b/src/neynar-api/v2/openapi-farcaster/models/farcaster-action-req-body.ts @@ -0,0 +1,45 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Farcaster API V2 + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +// May contain unused imports in some cases +// @ts-ignore +import type { FarcasterActionReqBodyAction } from './farcaster-action-req-body-action'; + +/** + * + * @export + * @interface FarcasterActionReqBody + */ +export interface FarcasterActionReqBody { + /** + * The signer_uuid of the user on behalf of whom the action is being performed. + * @type {string} + * @memberof FarcasterActionReqBody + */ + 'signer_uuid': string; + /** + * The base URL of the app on which the action is being performed. + * @type {string} + * @memberof FarcasterActionReqBody + */ + 'base_url': string; + /** + * + * @type {FarcasterActionReqBodyAction} + * @memberof FarcasterActionReqBody + */ + 'action': FarcasterActionReqBodyAction; +} + diff --git a/src/neynar-api/v2/openapi-farcaster/models/feed-for-you400-response.ts b/src/neynar-api/v2/openapi-farcaster/models/feed-for-you400-response.ts new file mode 100644 index 00000000..5945373a --- /dev/null +++ b/src/neynar-api/v2/openapi-farcaster/models/feed-for-you400-response.ts @@ -0,0 +1,32 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Farcaster API V2 + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +// May contain unused imports in some cases +// @ts-ignore +import type { ErrorRes } from './error-res'; +// May contain unused imports in some cases +// @ts-ignore +import type { ZodError } from './zod-error'; +// May contain unused imports in some cases +// @ts-ignore +import type { ZodErrorErrorsInner } from './zod-error-errors-inner'; + +/** + * @type FeedForYou400Response + * @export + */ +export type FeedForYou400Response = ErrorRes | ZodError; + + diff --git a/src/neynar-api/v2/openapi-farcaster/models/feed-response.ts b/src/neynar-api/v2/openapi-farcaster/models/feed-response.ts new file mode 100644 index 00000000..78e55acd --- /dev/null +++ b/src/neynar-api/v2/openapi-farcaster/models/feed-response.ts @@ -0,0 +1,42 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Farcaster API V2 + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +// May contain unused imports in some cases +// @ts-ignore +import type { CastWithInteractions } from './cast-with-interactions'; +// May contain unused imports in some cases +// @ts-ignore +import type { NextCursor } from './next-cursor'; + +/** + * + * @export + * @interface FeedResponse + */ +export interface FeedResponse { + /** + * + * @type {Array} + * @memberof FeedResponse + */ + 'casts': Array; + /** + * + * @type {NextCursor} + * @memberof FeedResponse + */ + 'next': NextCursor; +} + diff --git a/src/neynar-api/v2/openapi-farcaster/models/feed-trending-provider.ts b/src/neynar-api/v2/openapi-farcaster/models/feed-trending-provider.ts new file mode 100644 index 00000000..a2a2eb6d --- /dev/null +++ b/src/neynar-api/v2/openapi-farcaster/models/feed-trending-provider.ts @@ -0,0 +1,32 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Farcaster API V2 + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + + +/** + * The provider of the trending casts feed. + * @export + * @enum {string} + */ + +export const FeedTrendingProvider = { + Neynar: 'neynar', + Openrank: 'openrank', + Mbd: 'mbd' +} as const; + +export type FeedTrendingProvider = typeof FeedTrendingProvider[keyof typeof FeedTrendingProvider]; + + + diff --git a/src/neynar-api/v2/openapi-farcaster/models/feed-type.ts b/src/neynar-api/v2/openapi-farcaster/models/feed-type.ts new file mode 100644 index 00000000..d68c05b7 --- /dev/null +++ b/src/neynar-api/v2/openapi-farcaster/models/feed-type.ts @@ -0,0 +1,31 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Farcaster API V2 + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + + +/** + * + * @export + * @enum {string} + */ + +export const FeedType = { + Following: 'following', + Filter: 'filter' +} as const; + +export type FeedType = typeof FeedType[keyof typeof FeedType]; + + + diff --git a/src/neynar-api/v2/openapi-farcaster/models/filter-type.ts b/src/neynar-api/v2/openapi-farcaster/models/filter-type.ts new file mode 100644 index 00000000..34f641e4 --- /dev/null +++ b/src/neynar-api/v2/openapi-farcaster/models/filter-type.ts @@ -0,0 +1,35 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Farcaster API V2 + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + + +/** + * The type of filter to apply to the feed. + * @export + * @enum {string} + */ + +export const FilterType = { + Fids: 'fids', + ParentUrl: 'parent_url', + ChannelId: 'channel_id', + EmbedUrl: 'embed_url', + EmbedTypes: 'embed_types', + GlobalTrending: 'global_trending' +} as const; + +export type FilterType = typeof FilterType[keyof typeof FilterType]; + + + diff --git a/src/neynar-api/v2/openapi-farcaster/models/fname-availability-response.ts b/src/neynar-api/v2/openapi-farcaster/models/fname-availability-response.ts new file mode 100644 index 00000000..3c824e67 --- /dev/null +++ b/src/neynar-api/v2/openapi-farcaster/models/fname-availability-response.ts @@ -0,0 +1,30 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Farcaster API V2 + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + + +/** + * + * @export + * @interface FnameAvailabilityResponse + */ +export interface FnameAvailabilityResponse { + /** + * + * @type {boolean} + * @memberof FnameAvailabilityResponse + */ + 'available': boolean; +} + diff --git a/src/neynar-api/v2/openapi-farcaster/models/follow-req-body.ts b/src/neynar-api/v2/openapi-farcaster/models/follow-req-body.ts new file mode 100644 index 00000000..4811909b --- /dev/null +++ b/src/neynar-api/v2/openapi-farcaster/models/follow-req-body.ts @@ -0,0 +1,36 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Farcaster API V2 + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + + +/** + * + * @export + * @interface FollowReqBody + */ +export interface FollowReqBody { + /** + * UUID of the signer + * @type {string} + * @memberof FollowReqBody + */ + 'signer_uuid': string; + /** + * + * @type {Array} + * @memberof FollowReqBody + */ + 'target_fids': Array; +} + diff --git a/src/neynar-api/v2/openapi-farcaster/models/follow-response.ts b/src/neynar-api/v2/openapi-farcaster/models/follow-response.ts new file mode 100644 index 00000000..74aac42c --- /dev/null +++ b/src/neynar-api/v2/openapi-farcaster/models/follow-response.ts @@ -0,0 +1,42 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Farcaster API V2 + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + + +/** + * + * @export + * @interface FollowResponse + */ +export interface FollowResponse { + /** + * + * @type {boolean} + * @memberof FollowResponse + */ + 'success': boolean; + /** + * The unique identifier of a farcaster user (unsigned integer) + * @type {number} + * @memberof FollowResponse + */ + 'target_fid': number; + /** + * + * @type {string} + * @memberof FollowResponse + */ + 'hash': string; +} + diff --git a/src/neynar-api/v2/openapi-farcaster/models/follow-sort-type.ts b/src/neynar-api/v2/openapi-farcaster/models/follow-sort-type.ts new file mode 100644 index 00000000..a532e5f1 --- /dev/null +++ b/src/neynar-api/v2/openapi-farcaster/models/follow-sort-type.ts @@ -0,0 +1,31 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Farcaster API V2 + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + + +/** + * + * @export + * @enum {string} + */ + +export const FollowSortType = { + DescChron: 'desc_chron', + Algorithmic: 'algorithmic' +} as const; + +export type FollowSortType = typeof FollowSortType[keyof typeof FollowSortType]; + + + diff --git a/src/neynar-api/v2/openapi-farcaster/models/follow.ts b/src/neynar-api/v2/openapi-farcaster/models/follow.ts new file mode 100644 index 00000000..1a785c92 --- /dev/null +++ b/src/neynar-api/v2/openapi-farcaster/models/follow.ts @@ -0,0 +1,46 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Farcaster API V2 + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +// May contain unused imports in some cases +// @ts-ignore +import type { User } from './user'; + +/** + * + * @export + * @interface Follow + */ +export interface Follow { + /** + * + * @type {string} + * @memberof Follow + */ + 'object': FollowObjectEnum; + /** + * + * @type {User} + * @memberof Follow + */ + 'user': User; +} + +export const FollowObjectEnum = { + Follow: 'follow' +} as const; + +export type FollowObjectEnum = typeof FollowObjectEnum[keyof typeof FollowObjectEnum]; + + diff --git a/src/neynar-api/v2/openapi-farcaster/models/followers-response.ts b/src/neynar-api/v2/openapi-farcaster/models/followers-response.ts new file mode 100644 index 00000000..7f48a6df --- /dev/null +++ b/src/neynar-api/v2/openapi-farcaster/models/followers-response.ts @@ -0,0 +1,42 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Farcaster API V2 + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +// May contain unused imports in some cases +// @ts-ignore +import type { HydratedFollower } from './hydrated-follower'; +// May contain unused imports in some cases +// @ts-ignore +import type { NextCursor } from './next-cursor'; + +/** + * + * @export + * @interface FollowersResponse + */ +export interface FollowersResponse { + /** + * + * @type {Array} + * @memberof FollowersResponse + */ + 'users': Array; + /** + * + * @type {NextCursor} + * @memberof FollowersResponse + */ + 'next': NextCursor; +} + diff --git a/src/neynar-api/v2/openapi-farcaster/models/for-you-provider.ts b/src/neynar-api/v2/openapi-farcaster/models/for-you-provider.ts new file mode 100644 index 00000000..0d4ffd3d --- /dev/null +++ b/src/neynar-api/v2/openapi-farcaster/models/for-you-provider.ts @@ -0,0 +1,32 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Farcaster API V2 + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + + +/** + * The provider of the For You feed. + * @export + * @enum {string} + */ + +export const ForYouProvider = { + Openrank: 'openrank', + Karma3: 'karma3', + Mbd: 'mbd' +} as const; + +export type ForYouProvider = typeof ForYouProvider[keyof typeof ForYouProvider]; + + + diff --git a/src/neynar-api/v2/openapi-farcaster/models/frame-action-button.ts b/src/neynar-api/v2/openapi-farcaster/models/frame-action-button.ts new file mode 100644 index 00000000..a79d554a --- /dev/null +++ b/src/neynar-api/v2/openapi-farcaster/models/frame-action-button.ts @@ -0,0 +1,59 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Farcaster API V2 + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +// May contain unused imports in some cases +// @ts-ignore +import type { FrameButtonActionType } from './frame-button-action-type'; + +/** + * + * @export + * @interface FrameActionButton + */ +export interface FrameActionButton { + /** + * Title of the button + * @type {string} + * @memberof FrameActionButton + */ + 'title'?: string; + /** + * Index of the button + * @type {number} + * @memberof FrameActionButton + */ + 'index': number; + /** + * + * @type {FrameButtonActionType} + * @memberof FrameActionButton + */ + 'action_type': FrameButtonActionType; + /** + * Target of the button + * @type {string} + * @memberof FrameActionButton + */ + 'target'?: string; + /** + * Used specifically for the tx action type to post a successful transaction hash + * @type {string} + * @memberof FrameActionButton + */ + 'post_url'?: string; +} + + + diff --git a/src/neynar-api/v2/openapi-farcaster/models/frame-action-req-body.ts b/src/neynar-api/v2/openapi-farcaster/models/frame-action-req-body.ts new file mode 100644 index 00000000..b7205561 --- /dev/null +++ b/src/neynar-api/v2/openapi-farcaster/models/frame-action-req-body.ts @@ -0,0 +1,45 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Farcaster API V2 + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +// May contain unused imports in some cases +// @ts-ignore +import type { FrameAction } from './frame-action'; + +/** + * + * @export + * @interface FrameActionReqBody + */ +export interface FrameActionReqBody { + /** + * UUID of the signer + * @type {string} + * @memberof FrameActionReqBody + */ + 'signer_uuid': string; + /** + * Cast Hash + * @type {string} + * @memberof FrameActionReqBody + */ + 'cast_hash'?: string; + /** + * + * @type {FrameAction} + * @memberof FrameActionReqBody + */ + 'action': FrameAction; +} + diff --git a/src/neynar-api/v2/openapi-farcaster/models/frame-action.ts b/src/neynar-api/v2/openapi-farcaster/models/frame-action.ts new file mode 100644 index 00000000..133c2a93 --- /dev/null +++ b/src/neynar-api/v2/openapi-farcaster/models/frame-action.ts @@ -0,0 +1,96 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Farcaster API V2 + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +// May contain unused imports in some cases +// @ts-ignore +import type { FrameActionButton } from './frame-action-button'; +// May contain unused imports in some cases +// @ts-ignore +import type { FrameInput } from './frame-input'; +// May contain unused imports in some cases +// @ts-ignore +import type { FrameState } from './frame-state'; +// May contain unused imports in some cases +// @ts-ignore +import type { FrameTransaction } from './frame-transaction'; + +/** + * + * @export + * @interface FrameAction + */ +export interface FrameAction { + /** + * + * @type {string} + * @memberof FrameAction + */ + 'version'?: string; + /** + * + * @type {string} + * @memberof FrameAction + */ + 'title'?: string; + /** + * + * @type {string} + * @memberof FrameAction + */ + 'image'?: string; + /** + * + * @type {FrameActionButton} + * @memberof FrameAction + */ + 'button': FrameActionButton; + /** + * + * @type {FrameInput} + * @memberof FrameAction + */ + 'input'?: FrameInput; + /** + * + * @type {FrameState} + * @memberof FrameAction + */ + 'state'?: FrameState; + /** + * + * @type {FrameTransaction} + * @memberof FrameAction + */ + 'transaction'?: FrameTransaction; + /** + * The connected wallet address of the interacting user. + * @type {string} + * @memberof FrameAction + */ + 'address'?: string; + /** + * URL of the frames + * @type {string} + * @memberof FrameAction + */ + 'frames_url': string; + /** + * URL of the post to get the next frame + * @type {string} + * @memberof FrameAction + */ + 'post_url': string; +} + diff --git a/src/neynar-api/v2/openapi-farcaster/models/frame-button-action-type.ts b/src/neynar-api/v2/openapi-farcaster/models/frame-button-action-type.ts new file mode 100644 index 00000000..1b701c80 --- /dev/null +++ b/src/neynar-api/v2/openapi-farcaster/models/frame-button-action-type.ts @@ -0,0 +1,32 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Farcaster API V2 + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + + +/** + * + * @export + * @enum {string} + */ + +export const FrameButtonActionType = { + Post: 'post', + PostRedirect: 'post_redirect', + Tx: 'tx' +} as const; + +export type FrameButtonActionType = typeof FrameButtonActionType[keyof typeof FrameButtonActionType]; + + + diff --git a/src/neynar-api/v2/openapi-farcaster/models/frame-developer-managed-action-req-body.ts b/src/neynar-api/v2/openapi-farcaster/models/frame-developer-managed-action-req-body.ts new file mode 100644 index 00000000..8b6e5c37 --- /dev/null +++ b/src/neynar-api/v2/openapi-farcaster/models/frame-developer-managed-action-req-body.ts @@ -0,0 +1,48 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Farcaster API V2 + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +// May contain unused imports in some cases +// @ts-ignore +import type { FrameAction } from './frame-action'; +// May contain unused imports in some cases +// @ts-ignore +import type { FrameSignaturePacket } from './frame-signature-packet'; + +/** + * + * @export + * @interface FrameDeveloperManagedActionReqBody + */ +export interface FrameDeveloperManagedActionReqBody { + /** + * Cast Hash + * @type {string} + * @memberof FrameDeveloperManagedActionReqBody + */ + 'cast_hash'?: string; + /** + * + * @type {FrameAction} + * @memberof FrameDeveloperManagedActionReqBody + */ + 'action': FrameAction; + /** + * + * @type {FrameSignaturePacket} + * @memberof FrameDeveloperManagedActionReqBody + */ + 'signature_packet': FrameSignaturePacket; +} + diff --git a/src/neynar-api/v2/openapi-farcaster/models/frame-from-url200-response.ts b/src/neynar-api/v2/openapi-farcaster/models/frame-from-url200-response.ts new file mode 100644 index 00000000..440716a7 --- /dev/null +++ b/src/neynar-api/v2/openapi-farcaster/models/frame-from-url200-response.ts @@ -0,0 +1,33 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Farcaster API V2 + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +// May contain unused imports in some cases +// @ts-ignore +import type { Frame } from './frame'; + +/** + * The frame object containing the meta tags + * @export + * @interface FrameFromUrl200Response + */ +export interface FrameFromUrl200Response { + /** + * + * @type {Frame} + * @memberof FrameFromUrl200Response + */ + 'frame': Frame; +} + diff --git a/src/neynar-api/v2/openapi-farcaster/models/frame-input.ts b/src/neynar-api/v2/openapi-farcaster/models/frame-input.ts new file mode 100644 index 00000000..2f8d4b38 --- /dev/null +++ b/src/neynar-api/v2/openapi-farcaster/models/frame-input.ts @@ -0,0 +1,30 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Farcaster API V2 + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + + +/** + * + * @export + * @interface FrameInput + */ +export interface FrameInput { + /** + * Input text for the frame + * @type {string} + * @memberof FrameInput + */ + 'text'?: string; +} + diff --git a/src/neynar-api/v2/openapi-farcaster/models/frame-signature-packet-trusted-data.ts b/src/neynar-api/v2/openapi-farcaster/models/frame-signature-packet-trusted-data.ts new file mode 100644 index 00000000..42b591e6 --- /dev/null +++ b/src/neynar-api/v2/openapi-farcaster/models/frame-signature-packet-trusted-data.ts @@ -0,0 +1,30 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Farcaster API V2 + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + + +/** + * Trusted data from the user + * @export + * @interface FrameSignaturePacketTrustedData + */ +export interface FrameSignaturePacketTrustedData { + /** + * Message bytes + * @type {string} + * @memberof FrameSignaturePacketTrustedData + */ + 'messageBytes'?: string; +} + diff --git a/src/neynar-api/v2/openapi-farcaster/models/frame-signature-packet-untrusted-data.ts b/src/neynar-api/v2/openapi-farcaster/models/frame-signature-packet-untrusted-data.ts new file mode 100644 index 00000000..007e92ea --- /dev/null +++ b/src/neynar-api/v2/openapi-farcaster/models/frame-signature-packet-untrusted-data.ts @@ -0,0 +1,93 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Farcaster API V2 + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +// May contain unused imports in some cases +// @ts-ignore +import type { CastId } from './cast-id'; + +/** + * Untrusted data from the user + * @export + * @interface FrameSignaturePacketUntrustedData + */ +export interface FrameSignaturePacketUntrustedData { + /** + * The unique identifier of a farcaster user (unsigned integer) + * @type {number} + * @memberof FrameSignaturePacketUntrustedData + */ + 'fid'?: number; + /** + * URL of the frame + * @type {string} + * @memberof FrameSignaturePacketUntrustedData + */ + 'url'?: string; + /** + * Message hash + * @type {string} + * @memberof FrameSignaturePacketUntrustedData + */ + 'messageHash'?: string; + /** + * Timestamp + * @type {string} + * @memberof FrameSignaturePacketUntrustedData + */ + 'timestamp'?: string; + /** + * Network + * @type {number} + * @memberof FrameSignaturePacketUntrustedData + */ + 'network'?: number; + /** + * Index of the button + * @type {number} + * @memberof FrameSignaturePacketUntrustedData + */ + 'buttonIndex'?: number; + /** + * Input text + * @type {string} + * @memberof FrameSignaturePacketUntrustedData + */ + 'inputText'?: string; + /** + * State + * @type {string} + * @memberof FrameSignaturePacketUntrustedData + */ + 'state'?: string; + /** + * Transaction ID + * @type {string} + * @memberof FrameSignaturePacketUntrustedData + */ + 'transactionId'?: string; + /** + * Ethereum address + * @type {string} + * @memberof FrameSignaturePacketUntrustedData + */ + 'address'?: string; + /** + * + * @type {CastId} + * @memberof FrameSignaturePacketUntrustedData + */ + 'castId'?: CastId; +} + diff --git a/src/neynar-api/v2/openapi-farcaster/models/frame-signature-packet.ts b/src/neynar-api/v2/openapi-farcaster/models/frame-signature-packet.ts new file mode 100644 index 00000000..38e0e0e6 --- /dev/null +++ b/src/neynar-api/v2/openapi-farcaster/models/frame-signature-packet.ts @@ -0,0 +1,42 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Farcaster API V2 + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +// May contain unused imports in some cases +// @ts-ignore +import type { FrameSignaturePacketTrustedData } from './frame-signature-packet-trusted-data'; +// May contain unused imports in some cases +// @ts-ignore +import type { FrameSignaturePacketUntrustedData } from './frame-signature-packet-untrusted-data'; + +/** + * The Frame Signature Packet (https://docs.farcaster.xyz/developers/frames/spec#frame-signature-packet) + * @export + * @interface FrameSignaturePacket + */ +export interface FrameSignaturePacket { + /** + * + * @type {FrameSignaturePacketUntrustedData} + * @memberof FrameSignaturePacket + */ + 'untrustedData': FrameSignaturePacketUntrustedData; + /** + * + * @type {FrameSignaturePacketTrustedData} + * @memberof FrameSignaturePacket + */ + 'trustedData': FrameSignaturePacketTrustedData; +} + diff --git a/src/neynar-api/v2/openapi-farcaster/models/frame-state.ts b/src/neynar-api/v2/openapi-farcaster/models/frame-state.ts new file mode 100644 index 00000000..c56e0188 --- /dev/null +++ b/src/neynar-api/v2/openapi-farcaster/models/frame-state.ts @@ -0,0 +1,30 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Farcaster API V2 + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + + +/** + * + * @export + * @interface FrameState + */ +export interface FrameState { + /** + * State for the frame in a serialized format + * @type {string} + * @memberof FrameState + */ + 'serialized'?: string; +} + diff --git a/src/neynar-api/v2/openapi-farcaster/models/frame-transaction.ts b/src/neynar-api/v2/openapi-farcaster/models/frame-transaction.ts new file mode 100644 index 00000000..4be2f205 --- /dev/null +++ b/src/neynar-api/v2/openapi-farcaster/models/frame-transaction.ts @@ -0,0 +1,30 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Farcaster API V2 + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + + +/** + * + * @export + * @interface FrameTransaction + */ +export interface FrameTransaction { + /** + * Transaction hash + * @type {string} + * @memberof FrameTransaction + */ + 'hash': string; +} + diff --git a/src/neynar-api/v2/openapi-farcaster/models/frame-type.ts b/src/neynar-api/v2/openapi-farcaster/models/frame-type.ts new file mode 100644 index 00000000..ed93f722 --- /dev/null +++ b/src/neynar-api/v2/openapi-farcaster/models/frame-type.ts @@ -0,0 +1,31 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Farcaster API V2 + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + + +/** + * Type of identifier (either \'uuid\' or \'url\') + * @export + * @enum {string} + */ + +export const FrameType = { + Uuid: 'uuid', + Url: 'url' +} as const; + +export type FrameType = typeof FrameType[keyof typeof FrameType]; + + + diff --git a/src/neynar-api/v2/openapi-farcaster/models/frame-validate-analytics-input-text-input-texts-inner.ts b/src/neynar-api/v2/openapi-farcaster/models/frame-validate-analytics-input-text-input-texts-inner.ts new file mode 100644 index 00000000..4be40977 --- /dev/null +++ b/src/neynar-api/v2/openapi-farcaster/models/frame-validate-analytics-input-text-input-texts-inner.ts @@ -0,0 +1,42 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Farcaster API V2 + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + + +/** + * + * @export + * @interface FrameValidateAnalyticsInputTextInputTextsInner + */ +export interface FrameValidateAnalyticsInputTextInputTextsInner { + /** + * The unique identifier of a farcaster user (unsigned integer) + * @type {number} + * @memberof FrameValidateAnalyticsInputTextInputTextsInner + */ + 'fid': number; + /** + * + * @type {string} + * @memberof FrameValidateAnalyticsInputTextInputTextsInner + */ + 'username': string; + /** + * + * @type {string} + * @memberof FrameValidateAnalyticsInputTextInputTextsInner + */ + 'input_text': string; +} + diff --git a/src/neynar-api/v2/openapi-farcaster/models/frame-validate-analytics-input-text.ts b/src/neynar-api/v2/openapi-farcaster/models/frame-validate-analytics-input-text.ts new file mode 100644 index 00000000..8129447f --- /dev/null +++ b/src/neynar-api/v2/openapi-farcaster/models/frame-validate-analytics-input-text.ts @@ -0,0 +1,33 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Farcaster API V2 + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +// May contain unused imports in some cases +// @ts-ignore +import type { FrameValidateAnalyticsInputTextInputTextsInner } from './frame-validate-analytics-input-text-input-texts-inner'; + +/** + * + * @export + * @interface FrameValidateAnalyticsInputText + */ +export interface FrameValidateAnalyticsInputText { + /** + * + * @type {Array} + * @memberof FrameValidateAnalyticsInputText + */ + 'input_texts': Array; +} + diff --git a/src/neynar-api/v2/openapi-farcaster/models/frame-validate-analytics-interactions-per-cast-interactions-per-cast-inner.ts b/src/neynar-api/v2/openapi-farcaster/models/frame-validate-analytics-interactions-per-cast-interactions-per-cast-inner.ts new file mode 100644 index 00000000..9d5de05d --- /dev/null +++ b/src/neynar-api/v2/openapi-farcaster/models/frame-validate-analytics-interactions-per-cast-interactions-per-cast-inner.ts @@ -0,0 +1,54 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Farcaster API V2 + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + + +/** + * + * @export + * @interface FrameValidateAnalyticsInteractionsPerCastInteractionsPerCastInner + */ +export interface FrameValidateAnalyticsInteractionsPerCastInteractionsPerCastInner { + /** + * + * @type {string} + * @memberof FrameValidateAnalyticsInteractionsPerCastInteractionsPerCastInner + */ + 'start': string; + /** + * + * @type {string} + * @memberof FrameValidateAnalyticsInteractionsPerCastInteractionsPerCastInner + */ + 'stop': string; + /** + * + * @type {string} + * @memberof FrameValidateAnalyticsInteractionsPerCastInteractionsPerCastInner + */ + 'time': string; + /** + * + * @type {number} + * @memberof FrameValidateAnalyticsInteractionsPerCastInteractionsPerCastInner + */ + 'interaction_count': number; + /** + * + * @type {string} + * @memberof FrameValidateAnalyticsInteractionsPerCastInteractionsPerCastInner + */ + 'cast_url': string; +} + diff --git a/src/neynar-api/v2/openapi-farcaster/models/frame-validate-analytics-interactions-per-cast.ts b/src/neynar-api/v2/openapi-farcaster/models/frame-validate-analytics-interactions-per-cast.ts new file mode 100644 index 00000000..7cdbb033 --- /dev/null +++ b/src/neynar-api/v2/openapi-farcaster/models/frame-validate-analytics-interactions-per-cast.ts @@ -0,0 +1,33 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Farcaster API V2 + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +// May contain unused imports in some cases +// @ts-ignore +import type { FrameValidateAnalyticsInteractionsPerCastInteractionsPerCastInner } from './frame-validate-analytics-interactions-per-cast-interactions-per-cast-inner'; + +/** + * + * @export + * @interface FrameValidateAnalyticsInteractionsPerCast + */ +export interface FrameValidateAnalyticsInteractionsPerCast { + /** + * + * @type {Array} + * @memberof FrameValidateAnalyticsInteractionsPerCast + */ + 'interactions_per_cast': Array; +} + diff --git a/src/neynar-api/v2/openapi-farcaster/models/frame-validate-analytics-interactors-interactors-inner.ts b/src/neynar-api/v2/openapi-farcaster/models/frame-validate-analytics-interactors-interactors-inner.ts new file mode 100644 index 00000000..1bb1711f --- /dev/null +++ b/src/neynar-api/v2/openapi-farcaster/models/frame-validate-analytics-interactors-interactors-inner.ts @@ -0,0 +1,42 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Farcaster API V2 + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + + +/** + * + * @export + * @interface FrameValidateAnalyticsInteractorsInteractorsInner + */ +export interface FrameValidateAnalyticsInteractorsInteractorsInner { + /** + * The unique identifier of a farcaster user (unsigned integer) + * @type {number} + * @memberof FrameValidateAnalyticsInteractorsInteractorsInner + */ + 'fid': number; + /** + * + * @type {string} + * @memberof FrameValidateAnalyticsInteractorsInteractorsInner + */ + 'username': string; + /** + * + * @type {number} + * @memberof FrameValidateAnalyticsInteractorsInteractorsInner + */ + 'interaction_count': number; +} + diff --git a/src/neynar-api/v2/openapi-farcaster/models/frame-validate-analytics-interactors.ts b/src/neynar-api/v2/openapi-farcaster/models/frame-validate-analytics-interactors.ts new file mode 100644 index 00000000..1aa5da50 --- /dev/null +++ b/src/neynar-api/v2/openapi-farcaster/models/frame-validate-analytics-interactors.ts @@ -0,0 +1,33 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Farcaster API V2 + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +// May contain unused imports in some cases +// @ts-ignore +import type { FrameValidateAnalyticsInteractorsInteractorsInner } from './frame-validate-analytics-interactors-interactors-inner'; + +/** + * + * @export + * @interface FrameValidateAnalyticsInteractors + */ +export interface FrameValidateAnalyticsInteractors { + /** + * + * @type {Array} + * @memberof FrameValidateAnalyticsInteractors + */ + 'interactors': Array; +} + diff --git a/src/neynar-api/v2/openapi-farcaster/models/frame-validate-analytics-response.ts b/src/neynar-api/v2/openapi-farcaster/models/frame-validate-analytics-response.ts new file mode 100644 index 00000000..59b44a28 --- /dev/null +++ b/src/neynar-api/v2/openapi-farcaster/models/frame-validate-analytics-response.ts @@ -0,0 +1,44 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Farcaster API V2 + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +// May contain unused imports in some cases +// @ts-ignore +import type { FrameValidateAnalyticsInputText } from './frame-validate-analytics-input-text'; +// May contain unused imports in some cases +// @ts-ignore +import type { FrameValidateAnalyticsInputTextInputTextsInner } from './frame-validate-analytics-input-text-input-texts-inner'; +// May contain unused imports in some cases +// @ts-ignore +import type { FrameValidateAnalyticsInteractionsPerCast } from './frame-validate-analytics-interactions-per-cast'; +// May contain unused imports in some cases +// @ts-ignore +import type { FrameValidateAnalyticsInteractionsPerCastInteractionsPerCastInner } from './frame-validate-analytics-interactions-per-cast-interactions-per-cast-inner'; +// May contain unused imports in some cases +// @ts-ignore +import type { FrameValidateAnalyticsInteractors } from './frame-validate-analytics-interactors'; +// May contain unused imports in some cases +// @ts-ignore +import type { FrameValidateAnalyticsInteractorsInteractorsInner } from './frame-validate-analytics-interactors-interactors-inner'; +// May contain unused imports in some cases +// @ts-ignore +import type { FrameValidateAnalyticsTotalInteractors } from './frame-validate-analytics-total-interactors'; + +/** + * @type FrameValidateAnalyticsResponse + * @export + */ +export type FrameValidateAnalyticsResponse = FrameValidateAnalyticsInputText | FrameValidateAnalyticsInteractionsPerCast | FrameValidateAnalyticsInteractors | FrameValidateAnalyticsTotalInteractors; + + diff --git a/src/neynar-api/v2/openapi-farcaster/models/frame-validate-analytics-total-interactors.ts b/src/neynar-api/v2/openapi-farcaster/models/frame-validate-analytics-total-interactors.ts new file mode 100644 index 00000000..8cbca44b --- /dev/null +++ b/src/neynar-api/v2/openapi-farcaster/models/frame-validate-analytics-total-interactors.ts @@ -0,0 +1,30 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Farcaster API V2 + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + + +/** + * + * @export + * @interface FrameValidateAnalyticsTotalInteractors + */ +export interface FrameValidateAnalyticsTotalInteractors { + /** + * + * @type {number} + * @memberof FrameValidateAnalyticsTotalInteractors + */ + 'total_interactors': number; +} + diff --git a/src/neynar-api/v2/openapi-farcaster/models/frame-validate-list-response.ts b/src/neynar-api/v2/openapi-farcaster/models/frame-validate-list-response.ts new file mode 100644 index 00000000..10f909dc --- /dev/null +++ b/src/neynar-api/v2/openapi-farcaster/models/frame-validate-list-response.ts @@ -0,0 +1,30 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Farcaster API V2 + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + + +/** + * + * @export + * @interface FrameValidateListResponse + */ +export interface FrameValidateListResponse { + /** + * + * @type {Array} + * @memberof FrameValidateListResponse + */ + 'frames': Array; +} + diff --git a/src/neynar-api/v2/openapi-farcaster/models/frame.ts b/src/neynar-api/v2/openapi-farcaster/models/frame.ts new file mode 100644 index 00000000..2bfb521c --- /dev/null +++ b/src/neynar-api/v2/openapi-farcaster/models/frame.ts @@ -0,0 +1,87 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Farcaster API V2 + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +// May contain unused imports in some cases +// @ts-ignore +import type { FrameActionButton } from './frame-action-button'; +// May contain unused imports in some cases +// @ts-ignore +import type { FrameInput } from './frame-input'; +// May contain unused imports in some cases +// @ts-ignore +import type { FrameState } from './frame-state'; + +/** + * + * @export + * @interface Frame + */ +export interface Frame { + /** + * Version of the frame + * @type {string} + * @memberof Frame + */ + 'version': string; + /** + * URL of the image + * @type {string} + * @memberof Frame + */ + 'image': string; + /** + * + * @type {Array} + * @memberof Frame + */ + 'buttons'?: Array; + /** + * Post URL to take an action on this frame + * @type {string} + * @memberof Frame + */ + 'post_url'?: string; + /** + * URL of the frames + * @type {string} + * @memberof Frame + */ + 'frames_url': string; + /** + * + * @type {string} + * @memberof Frame + */ + 'title'?: string; + /** + * + * @type {string} + * @memberof Frame + */ + 'image_aspect_ratio'?: string; + /** + * + * @type {FrameInput} + * @memberof Frame + */ + 'input'?: FrameInput; + /** + * + * @type {FrameState} + * @memberof Frame + */ + 'state'?: FrameState; +} + diff --git a/src/neynar-api/v2/openapi-farcaster/models/hydrated-follower.ts b/src/neynar-api/v2/openapi-farcaster/models/hydrated-follower.ts new file mode 100644 index 00000000..585cce71 --- /dev/null +++ b/src/neynar-api/v2/openapi-farcaster/models/hydrated-follower.ts @@ -0,0 +1,46 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Farcaster API V2 + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +// May contain unused imports in some cases +// @ts-ignore +import type { User } from './user'; + +/** + * + * @export + * @interface HydratedFollower + */ +export interface HydratedFollower { + /** + * + * @type {string} + * @memberof HydratedFollower + */ + 'object'?: HydratedFollowerObjectEnum; + /** + * + * @type {User} + * @memberof HydratedFollower + */ + 'user'?: User; +} + +export const HydratedFollowerObjectEnum = { + Follow: 'follow' +} as const; + +export type HydratedFollowerObjectEnum = typeof HydratedFollowerObjectEnum[keyof typeof HydratedFollowerObjectEnum]; + + diff --git a/src/neynar-api/v2/openapi-farcaster/models/image-object.ts b/src/neynar-api/v2/openapi-farcaster/models/image-object.ts new file mode 100644 index 00000000..f75850ff --- /dev/null +++ b/src/neynar-api/v2/openapi-farcaster/models/image-object.ts @@ -0,0 +1,54 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Farcaster API V2 + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + + +/** + * + * @export + * @interface ImageObject + */ +export interface ImageObject { + /** + * + * @type {string} + * @memberof ImageObject + */ + 'height'?: string; + /** + * + * @type {string} + * @memberof ImageObject + */ + 'type'?: string; + /** + * + * @type {string} + * @memberof ImageObject + */ + 'url': string; + /** + * + * @type {string} + * @memberof ImageObject + */ + 'width'?: string; + /** + * + * @type {string} + * @memberof ImageObject + */ + 'alt'?: string; +} + diff --git a/src/neynar-api/v2/openapi-farcaster/models/index.ts b/src/neynar-api/v2/openapi-farcaster/models/index.ts new file mode 100644 index 00000000..70ff81c9 --- /dev/null +++ b/src/neynar-api/v2/openapi-farcaster/models/index.ts @@ -0,0 +1,248 @@ +export * from './add-verification-req-body'; +export * from './authorization-url-response'; +export * from './authorization-url-response-type'; +export * from './ban-list-response'; +export * from './ban-record'; +export * from './ban-req-body'; +export * from './ban-response'; +export * from './block-list-response'; +export * from './block-record'; +export * from './bulk-casts-response'; +export * from './bulk-follow-response'; +export * from './bulk-users-response'; +export * from './buy-storage-req-body'; +export * from './cast'; +export * from './cast-composer-actions-list-response'; +export * from './cast-composer-actions-list-response-actions-inner'; +export * from './cast-composer-actions-list-response-actions-inner-action'; +export * from './cast-composer-type'; +export * from './cast-conversation-sort-type'; +export * from './cast-dehydrated'; +export * from './cast-embedded'; +export * from './cast-embedded-parent-author'; +export * from './cast-id'; +export * from './cast-notification-type'; +export * from './cast-param-type'; +export * from './cast-response'; +export * from './cast-viewer-context'; +export * from './cast-with-interactions'; +export * from './cast-with-interactions-all-of'; +export * from './cast-with-interactions-and-conversations'; +export * from './cast-with-interactions-and-conversations-all-of'; +export * from './cast-with-interactions-and-conversations-ref'; +export * from './cast-with-interactions-and-conversations-ref-all-of'; +export * from './cast-with-interactions-reactions'; +export * from './cast-with-interactions-replies'; +export * from './casts-response'; +export * from './casts-response-result'; +export * from './casts-search-response'; +export * from './casts-search-response-result'; +export * from './channel'; +export * from './channel-activity'; +export * from './channel-external-link'; +export * from './channel-follow-req-body'; +export * from './channel-list-response'; +export * from './channel-member'; +export * from './channel-member-channel'; +export * from './channel-member-invite'; +export * from './channel-member-invite-list-response'; +export * from './channel-member-list-response'; +export * from './channel-member-role'; +export * from './channel-member-user'; +export * from './channel-or-dehydrated-channel'; +export * from './channel-response'; +export * from './channel-response-bulk'; +export * from './channel-search-response'; +export * from './channel-type'; +export * from './channel-user-context'; +export * from './channel-viewer-context'; +export * from './conflict-error-res'; +export * from './conversation'; +export * from './conversation-conversation'; +export * from './dehydrated-channel'; +export * from './dehydrated-follower'; +export * from './delete-cast-req-body'; +export * from './delete-frame-response'; +export * from './delete-neynar-frame-request'; +export * from './developer-managed-signer'; +export * from './embed'; +export * from './embed-cast'; +export * from './embed-cast-deep'; +export * from './embed-deep'; +export * from './embed-type'; +export * from './embed-url'; +export * from './embed-url-metadata'; +export * from './embed-url-metadata-html'; +export * from './embed-url-metadata-html-all-of'; +export * from './embed-url-metadata-html-all-of-oembed'; +export * from './embed-url-metadata-image'; +export * from './embed-url-metadata-video'; +export * from './embed-url-metadata-video-stream-inner'; +export * from './error-res'; +export * from './farcaster-action-req-body'; +export * from './farcaster-action-req-body-action'; +export * from './feed-for-you400-response'; +export * from './feed-response'; +export * from './feed-trending-provider'; +export * from './feed-type'; +export * from './filter-type'; +export * from './fname-availability-response'; +export * from './follow'; +export * from './follow-req-body'; +export * from './follow-response'; +export * from './follow-sort-type'; +export * from './followers-response'; +export * from './for-you-provider'; +export * from './frame'; +export * from './frame-action'; +export * from './frame-action-button'; +export * from './frame-action-req-body'; +export * from './frame-button-action-type'; +export * from './frame-developer-managed-action-req-body'; +export * from './frame-from-url200-response'; +export * from './frame-input'; +export * from './frame-signature-packet'; +export * from './frame-signature-packet-trusted-data'; +export * from './frame-signature-packet-untrusted-data'; +export * from './frame-state'; +export * from './frame-transaction'; +export * from './frame-type'; +export * from './frame-validate-analytics-input-text'; +export * from './frame-validate-analytics-input-text-input-texts-inner'; +export * from './frame-validate-analytics-interactions-per-cast'; +export * from './frame-validate-analytics-interactions-per-cast-interactions-per-cast-inner'; +export * from './frame-validate-analytics-interactors'; +export * from './frame-validate-analytics-interactors-interactors-inner'; +export * from './frame-validate-analytics-response'; +export * from './frame-validate-analytics-total-interactors'; +export * from './frame-validate-list-response'; +export * from './hydrated-follower'; +export * from './image-object'; +export * from './individual-hash-obj'; +export * from './location'; +export * from './location-address'; +export * from './mark-notifications-as-seen-req-body'; +export * from './mute-list-response'; +export * from './mute-record'; +export * from './mute-req-body'; +export * from './mute-response'; +export * from './next-cursor'; +export * from './neynar-frame'; +export * from './neynar-frame-creation-request'; +export * from './neynar-frame-page'; +export * from './neynar-frame-update-request'; +export * from './neynar-next-frame-page'; +export * from './neynar-next-frame-page-mint-url'; +export * from './neynar-next-frame-page-redirect'; +export * from './neynar-page-button'; +export * from './neynar-page-button-next-page'; +export * from './neynar-page-image'; +export * from './neynar-page-input'; +export * from './neynar-page-input-text'; +export * from './notification'; +export * from './notification-type'; +export * from './notifications-response'; +export * from './oembed-data'; +export * from './oembed-link-data'; +export * from './oembed-link-data-all-of'; +export * from './oembed-photo-data'; +export * from './oembed-photo-data-all-of'; +export * from './oembed-rich-data'; +export * from './oembed-rich-data-all-of'; +export * from './oembed-video-data'; +export * from './oembed-video-data-all-of'; +export * from './og-object'; +export * from './operation-response'; +export * from './post-cast-req-body'; +export * from './post-cast-req-body-embeds'; +export * from './post-cast-req-body-embeds-cast-id-properties'; +export * from './post-cast-response'; +export * from './post-cast-response-cast'; +export * from './profile-url'; +export * from './profile-url-pfp'; +export * from './reaction-for-cast'; +export * from './reaction-like'; +export * from './reaction-recast'; +export * from './reaction-req-body'; +export * from './reaction-type'; +export * from './reaction-with-cast-info'; +export * from './reaction-with-user-info'; +export * from './reactions-cast-response'; +export * from './reactions-response'; +export * from './reactions-type'; +export * from './register-developer-managed-signed-key-req-body'; +export * from './register-signer-key-req-body'; +export * from './register-user-req-body'; +export * from './register-user-response'; +export * from './relevant-followers-response'; +export * from './remove-channel-member-request'; +export * from './remove-verification-req-body'; +export * from './respond-channel-invite-request'; +export * from './searched-user'; +export * from './signed-key-request-sponsor'; +export * from './signer'; +export * from './storage-allocation'; +export * from './storage-allocations-response'; +export * from './storage-object'; +export * from './storage-usage-response'; +export * from './subscribed-to'; +export * from './subscribed-to-all-of'; +export * from './subscribed-to-object'; +export * from './subscribed-to-response'; +export * from './subscriber'; +export * from './subscribers-response'; +export * from './subscription'; +export * from './subscription-metadata'; +export * from './subscription-price'; +export * from './subscription-provider'; +export * from './subscription-providers'; +export * from './subscription-status'; +export * from './subscription-tier'; +export * from './subscription-tier-price'; +export * from './subscription-token'; +export * from './subscriptions'; +export * from './subscriptions-response'; +export * from './trending-channel-response'; +export * from './update-user-req-body'; +export * from './update-user-req-body-location'; +export * from './user'; +export * from './user-dehydrated'; +export * from './user-fidresponse'; +export * from './user-power-lite-response'; +export * from './user-power-lite-response-result'; +export * from './user-profile'; +export * from './user-profile-bio'; +export * from './user-response'; +export * from './user-search-response'; +export * from './user-search-response-result'; +export * from './user-verified-accounts-inner'; +export * from './user-verified-addresses'; +export * from './user-viewer-context'; +export * from './users-active-channels-response'; +export * from './users-response'; +export * from './validate-frame-action-response'; +export * from './validate-frame-analytics-type'; +export * from './validate-frame-request'; +export * from './validated-frame-action'; +export * from './validated-frame-action-signer'; +export * from './validated-frame-action-tapped-button'; +export * from './verification-chain-id'; +export * from './verification-type'; +export * from './video-object'; +export * from './webhook'; +export * from './webhook-delete-req-body'; +export * from './webhook-list-response'; +export * from './webhook-patch-req-body'; +export * from './webhook-post-req-body'; +export * from './webhook-put-req-body'; +export * from './webhook-put-req-body-all-of'; +export * from './webhook-response'; +export * from './webhook-secret'; +export * from './webhook-subscription'; +export * from './webhook-subscription-filters'; +export * from './webhook-subscription-filters-cast'; +export * from './webhook-subscription-filters-follow'; +export * from './webhook-subscription-filters-reaction'; +export * from './webhook-subscription-filters-user-updated'; +export * from './zod-error'; +export * from './zod-error-errors-inner'; diff --git a/src/neynar-api/v2/openapi-farcaster/models/individual-hash-obj.ts b/src/neynar-api/v2/openapi-farcaster/models/individual-hash-obj.ts new file mode 100644 index 00000000..167b2083 --- /dev/null +++ b/src/neynar-api/v2/openapi-farcaster/models/individual-hash-obj.ts @@ -0,0 +1,30 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Farcaster API V2 + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + + +/** + * + * @export + * @interface IndividualHashObj + */ +export interface IndividualHashObj { + /** + * + * @type {string} + * @memberof IndividualHashObj + */ + 'hash': string; +} + diff --git a/src/neynar-api/v2/openapi-farcaster/models/location-address.ts b/src/neynar-api/v2/openapi-farcaster/models/location-address.ts new file mode 100644 index 00000000..fe6b4524 --- /dev/null +++ b/src/neynar-api/v2/openapi-farcaster/models/location-address.ts @@ -0,0 +1,54 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Farcaster API V2 + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + + +/** + * + * @export + * @interface LocationAddress + */ +export interface LocationAddress { + /** + * + * @type {string} + * @memberof LocationAddress + */ + 'city': string; + /** + * + * @type {string} + * @memberof LocationAddress + */ + 'state'?: string; + /** + * + * @type {string} + * @memberof LocationAddress + */ + 'state_code'?: string; + /** + * + * @type {string} + * @memberof LocationAddress + */ + 'country': string; + /** + * + * @type {string} + * @memberof LocationAddress + */ + 'country_code'?: string; +} + diff --git a/src/neynar-api/v2/openapi-farcaster/models/location.ts b/src/neynar-api/v2/openapi-farcaster/models/location.ts new file mode 100644 index 00000000..8b545110 --- /dev/null +++ b/src/neynar-api/v2/openapi-farcaster/models/location.ts @@ -0,0 +1,45 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Farcaster API V2 + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +// May contain unused imports in some cases +// @ts-ignore +import type { LocationAddress } from './location-address'; + +/** + * Coordinates and place names for a location + * @export + * @interface Location + */ +export interface Location { + /** + * + * @type {number} + * @memberof Location + */ + 'latitude': number; + /** + * + * @type {number} + * @memberof Location + */ + 'longitude': number; + /** + * + * @type {LocationAddress} + * @memberof Location + */ + 'address'?: LocationAddress; +} + diff --git a/src/neynar-api/v2/openapi-farcaster/models/mark-notifications-as-seen-req-body.ts b/src/neynar-api/v2/openapi-farcaster/models/mark-notifications-as-seen-req-body.ts new file mode 100644 index 00000000..57a78170 --- /dev/null +++ b/src/neynar-api/v2/openapi-farcaster/models/mark-notifications-as-seen-req-body.ts @@ -0,0 +1,41 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Farcaster API V2 + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +// May contain unused imports in some cases +// @ts-ignore +import type { NotificationType } from './notification-type'; + +/** + * + * @export + * @interface MarkNotificationsAsSeenReqBody + */ +export interface MarkNotificationsAsSeenReqBody { + /** + * The UUID of the signer. Signer should have atleast one write permission + * @type {string} + * @memberof MarkNotificationsAsSeenReqBody + */ + 'signer_uuid': string; + /** + * + * @type {NotificationType} + * @memberof MarkNotificationsAsSeenReqBody + */ + 'type'?: NotificationType; +} + + + diff --git a/src/neynar-api/v2/openapi-farcaster/models/mute-list-response.ts b/src/neynar-api/v2/openapi-farcaster/models/mute-list-response.ts new file mode 100644 index 00000000..632b5022 --- /dev/null +++ b/src/neynar-api/v2/openapi-farcaster/models/mute-list-response.ts @@ -0,0 +1,42 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Farcaster API V2 + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +// May contain unused imports in some cases +// @ts-ignore +import type { MuteRecord } from './mute-record'; +// May contain unused imports in some cases +// @ts-ignore +import type { NextCursor } from './next-cursor'; + +/** + * + * @export + * @interface MuteListResponse + */ +export interface MuteListResponse { + /** + * + * @type {Array} + * @memberof MuteListResponse + */ + 'mutes': Array; + /** + * + * @type {NextCursor} + * @memberof MuteListResponse + */ + 'next': NextCursor; +} + diff --git a/src/neynar-api/v2/openapi-farcaster/models/mute-record.ts b/src/neynar-api/v2/openapi-farcaster/models/mute-record.ts new file mode 100644 index 00000000..82419555 --- /dev/null +++ b/src/neynar-api/v2/openapi-farcaster/models/mute-record.ts @@ -0,0 +1,52 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Farcaster API V2 + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +// May contain unused imports in some cases +// @ts-ignore +import type { User } from './user'; + +/** + * + * @export + * @interface MuteRecord + */ +export interface MuteRecord { + /** + * + * @type {string} + * @memberof MuteRecord + */ + 'object': MuteRecordObjectEnum; + /** + * + * @type {User} + * @memberof MuteRecord + */ + 'muted': User; + /** + * + * @type {string} + * @memberof MuteRecord + */ + 'muted_at': string; +} + +export const MuteRecordObjectEnum = { + Mute: 'mute' +} as const; + +export type MuteRecordObjectEnum = typeof MuteRecordObjectEnum[keyof typeof MuteRecordObjectEnum]; + + diff --git a/src/neynar-api/v2/openapi-farcaster/models/mute-req-body.ts b/src/neynar-api/v2/openapi-farcaster/models/mute-req-body.ts new file mode 100644 index 00000000..30fe13f1 --- /dev/null +++ b/src/neynar-api/v2/openapi-farcaster/models/mute-req-body.ts @@ -0,0 +1,36 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Farcaster API V2 + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + + +/** + * + * @export + * @interface MuteReqBody + */ +export interface MuteReqBody { + /** + * The unique identifier of a farcaster user (unsigned integer) + * @type {number} + * @memberof MuteReqBody + */ + 'fid': number; + /** + * The unique identifier of a farcaster user (unsigned integer) + * @type {number} + * @memberof MuteReqBody + */ + 'muted_fid': number; +} + diff --git a/src/neynar-api/v2/openapi-farcaster/models/mute-response.ts b/src/neynar-api/v2/openapi-farcaster/models/mute-response.ts new file mode 100644 index 00000000..ea017157 --- /dev/null +++ b/src/neynar-api/v2/openapi-farcaster/models/mute-response.ts @@ -0,0 +1,36 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Farcaster API V2 + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + + +/** + * + * @export + * @interface MuteResponse + */ +export interface MuteResponse { + /** + * + * @type {boolean} + * @memberof MuteResponse + */ + 'success': boolean; + /** + * + * @type {string} + * @memberof MuteResponse + */ + 'message'?: string; +} + diff --git a/src/neynar-api/v2/openapi-farcaster/models/next-cursor.ts b/src/neynar-api/v2/openapi-farcaster/models/next-cursor.ts new file mode 100644 index 00000000..ae330837 --- /dev/null +++ b/src/neynar-api/v2/openapi-farcaster/models/next-cursor.ts @@ -0,0 +1,30 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Farcaster API V2 + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + + +/** + * Returns next cursor + * @export + * @interface NextCursor + */ +export interface NextCursor { + /** + * + * @type {string} + * @memberof NextCursor + */ + 'cursor': string | null; +} + diff --git a/src/neynar-api/v2/openapi-farcaster/models/neynar-frame-creation-request.ts b/src/neynar-api/v2/openapi-farcaster/models/neynar-frame-creation-request.ts new file mode 100644 index 00000000..cd2fbcc4 --- /dev/null +++ b/src/neynar-api/v2/openapi-farcaster/models/neynar-frame-creation-request.ts @@ -0,0 +1,39 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Farcaster API V2 + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +// May contain unused imports in some cases +// @ts-ignore +import type { NeynarFramePage } from './neynar-frame-page'; + +/** + * + * @export + * @interface NeynarFrameCreationRequest + */ +export interface NeynarFrameCreationRequest { + /** + * The name of the frame. + * @type {string} + * @memberof NeynarFrameCreationRequest + */ + 'name': string; + /** + * + * @type {Array} + * @memberof NeynarFrameCreationRequest + */ + 'pages': Array; +} + diff --git a/src/neynar-api/v2/openapi-farcaster/models/neynar-frame-page.ts b/src/neynar-api/v2/openapi-farcaster/models/neynar-frame-page.ts new file mode 100644 index 00000000..38d25833 --- /dev/null +++ b/src/neynar-api/v2/openapi-farcaster/models/neynar-frame-page.ts @@ -0,0 +1,69 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Farcaster API V2 + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +// May contain unused imports in some cases +// @ts-ignore +import type { NeynarPageButton } from './neynar-page-button'; +// May contain unused imports in some cases +// @ts-ignore +import type { NeynarPageImage } from './neynar-page-image'; +// May contain unused imports in some cases +// @ts-ignore +import type { NeynarPageInput } from './neynar-page-input'; + +/** + * + * @export + * @interface NeynarFramePage + */ +export interface NeynarFramePage { + /** + * Unique identifier for the page. + * @type {string} + * @memberof NeynarFramePage + */ + 'uuid': string; + /** + * The version of the page schema. + * @type {string} + * @memberof NeynarFramePage + */ + 'version': string; + /** + * The title of the page. + * @type {string} + * @memberof NeynarFramePage + */ + 'title': string; + /** + * + * @type {NeynarPageImage} + * @memberof NeynarFramePage + */ + 'image': NeynarPageImage; + /** + * + * @type {Array} + * @memberof NeynarFramePage + */ + 'buttons'?: Array; + /** + * + * @type {NeynarPageInput} + * @memberof NeynarFramePage + */ + 'input'?: NeynarPageInput; +} + diff --git a/src/neynar-api/v2/openapi-farcaster/models/neynar-frame-update-request.ts b/src/neynar-api/v2/openapi-farcaster/models/neynar-frame-update-request.ts new file mode 100644 index 00000000..ba6d65e1 --- /dev/null +++ b/src/neynar-api/v2/openapi-farcaster/models/neynar-frame-update-request.ts @@ -0,0 +1,45 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Farcaster API V2 + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +// May contain unused imports in some cases +// @ts-ignore +import type { NeynarFramePage } from './neynar-frame-page'; + +/** + * + * @export + * @interface NeynarFrameUpdateRequest + */ +export interface NeynarFrameUpdateRequest { + /** + * The UUID of the frame to update. + * @type {string} + * @memberof NeynarFrameUpdateRequest + */ + 'uuid': string; + /** + * The name of the frame. + * @type {string} + * @memberof NeynarFrameUpdateRequest + */ + 'name'?: string; + /** + * + * @type {Array} + * @memberof NeynarFrameUpdateRequest + */ + 'pages': Array; +} + diff --git a/src/neynar-api/v2/openapi-farcaster/models/neynar-frame.ts b/src/neynar-api/v2/openapi-farcaster/models/neynar-frame.ts new file mode 100644 index 00000000..bd9d6062 --- /dev/null +++ b/src/neynar-api/v2/openapi-farcaster/models/neynar-frame.ts @@ -0,0 +1,57 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Farcaster API V2 + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +// May contain unused imports in some cases +// @ts-ignore +import type { NeynarFramePage } from './neynar-frame-page'; + +/** + * + * @export + * @interface NeynarFrame + */ +export interface NeynarFrame { + /** + * Unique identifier for the frame. + * @type {string} + * @memberof NeynarFrame + */ + 'uuid': string; + /** + * Name of the frame. + * @type {string} + * @memberof NeynarFrame + */ + 'name': string; + /** + * Generated link for the frame\'s first page. + * @type {string} + * @memberof NeynarFrame + */ + 'link': string; + /** + * + * @type {Array} + * @memberof NeynarFrame + */ + 'pages': Array; + /** + * Indicates if the frame is valid. + * @type {boolean} + * @memberof NeynarFrame + */ + 'valid'?: boolean; +} + diff --git a/src/neynar-api/v2/openapi-farcaster/models/neynar-next-frame-page-mint-url.ts b/src/neynar-api/v2/openapi-farcaster/models/neynar-next-frame-page-mint-url.ts new file mode 100644 index 00000000..abe7b9df --- /dev/null +++ b/src/neynar-api/v2/openapi-farcaster/models/neynar-next-frame-page-mint-url.ts @@ -0,0 +1,30 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Farcaster API V2 + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + + +/** + * + * @export + * @interface NeynarNextFramePageMintUrl + */ +export interface NeynarNextFramePageMintUrl { + /** + * The URL for minting, specific to the mint action. + * @type {string} + * @memberof NeynarNextFramePageMintUrl + */ + 'mint_url': string; +} + diff --git a/src/neynar-api/v2/openapi-farcaster/models/neynar-next-frame-page-redirect.ts b/src/neynar-api/v2/openapi-farcaster/models/neynar-next-frame-page-redirect.ts new file mode 100644 index 00000000..4c560db3 --- /dev/null +++ b/src/neynar-api/v2/openapi-farcaster/models/neynar-next-frame-page-redirect.ts @@ -0,0 +1,30 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Farcaster API V2 + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + + +/** + * + * @export + * @interface NeynarNextFramePageRedirect + */ +export interface NeynarNextFramePageRedirect { + /** + * The URL to redirect to. + * @type {string} + * @memberof NeynarNextFramePageRedirect + */ + 'redirect_url': string; +} + diff --git a/src/neynar-api/v2/openapi-farcaster/models/neynar-next-frame-page.ts b/src/neynar-api/v2/openapi-farcaster/models/neynar-next-frame-page.ts new file mode 100644 index 00000000..9f5f22f5 --- /dev/null +++ b/src/neynar-api/v2/openapi-farcaster/models/neynar-next-frame-page.ts @@ -0,0 +1,30 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Farcaster API V2 + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + + +/** + * + * @export + * @interface NeynarNextFramePage + */ +export interface NeynarNextFramePage { + /** + * The UUID of the next page. + * @type {string} + * @memberof NeynarNextFramePage + */ + 'uuid': string; +} + diff --git a/src/neynar-api/v2/openapi-farcaster/models/neynar-page-button-next-page.ts b/src/neynar-api/v2/openapi-farcaster/models/neynar-page-button-next-page.ts new file mode 100644 index 00000000..f36eecc0 --- /dev/null +++ b/src/neynar-api/v2/openapi-farcaster/models/neynar-page-button-next-page.ts @@ -0,0 +1,32 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Farcaster API V2 + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +// May contain unused imports in some cases +// @ts-ignore +import type { NeynarNextFramePage } from './neynar-next-frame-page'; +// May contain unused imports in some cases +// @ts-ignore +import type { NeynarNextFramePageMintUrl } from './neynar-next-frame-page-mint-url'; +// May contain unused imports in some cases +// @ts-ignore +import type { NeynarNextFramePageRedirect } from './neynar-next-frame-page-redirect'; + +/** + * @type NeynarPageButtonNextPage + * @export + */ +export type NeynarPageButtonNextPage = NeynarNextFramePage | NeynarNextFramePageMintUrl | NeynarNextFramePageRedirect; + + diff --git a/src/neynar-api/v2/openapi-farcaster/models/neynar-page-button.ts b/src/neynar-api/v2/openapi-farcaster/models/neynar-page-button.ts new file mode 100644 index 00000000..404d4016 --- /dev/null +++ b/src/neynar-api/v2/openapi-farcaster/models/neynar-page-button.ts @@ -0,0 +1,61 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Farcaster API V2 + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +// May contain unused imports in some cases +// @ts-ignore +import type { NeynarPageButtonNextPage } from './neynar-page-button-next-page'; + +/** + * + * @export + * @interface NeynarPageButton + */ +export interface NeynarPageButton { + /** + * The title of the button. + * @type {string} + * @memberof NeynarPageButton + */ + 'title': string; + /** + * The index of the button, first button should have index 1 and so on. + * @type {number} + * @memberof NeynarPageButton + */ + 'index': number; + /** + * The type of action that the button performs. + * @type {string} + * @memberof NeynarPageButton + */ + 'action_type': NeynarPageButtonActionTypeEnum; + /** + * + * @type {NeynarPageButtonNextPage} + * @memberof NeynarPageButton + */ + 'next_page'?: NeynarPageButtonNextPage; +} + +export const NeynarPageButtonActionTypeEnum = { + Post: 'post', + PostRedirect: 'post_redirect', + Mint: 'mint', + Link: 'link' +} as const; + +export type NeynarPageButtonActionTypeEnum = typeof NeynarPageButtonActionTypeEnum[keyof typeof NeynarPageButtonActionTypeEnum]; + + diff --git a/src/neynar-api/v2/openapi-farcaster/models/neynar-page-image.ts b/src/neynar-api/v2/openapi-farcaster/models/neynar-page-image.ts new file mode 100644 index 00000000..6fb1a787 --- /dev/null +++ b/src/neynar-api/v2/openapi-farcaster/models/neynar-page-image.ts @@ -0,0 +1,44 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Farcaster API V2 + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + + +/** + * + * @export + * @interface NeynarPageImage + */ +export interface NeynarPageImage { + /** + * The URL of the page\'s image. + * @type {string} + * @memberof NeynarPageImage + */ + 'url': string; + /** + * The aspect ratio of the image. + * @type {string} + * @memberof NeynarPageImage + */ + 'aspect_ratio': NeynarPageImageAspectRatioEnum; +} + +export const NeynarPageImageAspectRatioEnum = { + _1911: '1.91:1', + _11: '1:1' +} as const; + +export type NeynarPageImageAspectRatioEnum = typeof NeynarPageImageAspectRatioEnum[keyof typeof NeynarPageImageAspectRatioEnum]; + + diff --git a/src/neynar-api/v2/openapi-farcaster/models/neynar-page-input-text.ts b/src/neynar-api/v2/openapi-farcaster/models/neynar-page-input-text.ts new file mode 100644 index 00000000..d8d0f7f9 --- /dev/null +++ b/src/neynar-api/v2/openapi-farcaster/models/neynar-page-input-text.ts @@ -0,0 +1,36 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Farcaster API V2 + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + + +/** + * + * @export + * @interface NeynarPageInputText + */ +export interface NeynarPageInputText { + /** + * Indicates if text input is enabled. + * @type {boolean} + * @memberof NeynarPageInputText + */ + 'enabled': boolean; + /** + * The placeholder text for the input. + * @type {string} + * @memberof NeynarPageInputText + */ + 'placeholder'?: string; +} + diff --git a/src/neynar-api/v2/openapi-farcaster/models/neynar-page-input.ts b/src/neynar-api/v2/openapi-farcaster/models/neynar-page-input.ts new file mode 100644 index 00000000..675a70ae --- /dev/null +++ b/src/neynar-api/v2/openapi-farcaster/models/neynar-page-input.ts @@ -0,0 +1,33 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Farcaster API V2 + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +// May contain unused imports in some cases +// @ts-ignore +import type { NeynarPageInputText } from './neynar-page-input-text'; + +/** + * + * @export + * @interface NeynarPageInput + */ +export interface NeynarPageInput { + /** + * + * @type {NeynarPageInputText} + * @memberof NeynarPageInput + */ + 'text'?: NeynarPageInputText; +} + diff --git a/src/neynar-api/v2/openapi-farcaster/models/notification-type.ts b/src/neynar-api/v2/openapi-farcaster/models/notification-type.ts new file mode 100644 index 00000000..232f13d1 --- /dev/null +++ b/src/neynar-api/v2/openapi-farcaster/models/notification-type.ts @@ -0,0 +1,34 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Farcaster API V2 + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + + +/** + * + * @export + * @enum {string} + */ + +export const NotificationType = { + Follows: 'follows', + Recasts: 'recasts', + Likes: 'likes', + Mentions: 'mentions', + Replies: 'replies' +} as const; + +export type NotificationType = typeof NotificationType[keyof typeof NotificationType]; + + + diff --git a/src/neynar-api/v2/openapi-farcaster/models/notification.ts b/src/neynar-api/v2/openapi-farcaster/models/notification.ts new file mode 100644 index 00000000..726428f3 --- /dev/null +++ b/src/neynar-api/v2/openapi-farcaster/models/notification.ts @@ -0,0 +1,92 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Farcaster API V2 + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +// May contain unused imports in some cases +// @ts-ignore +import type { CastWithInteractions } from './cast-with-interactions'; +// May contain unused imports in some cases +// @ts-ignore +import type { Follow } from './follow'; +// May contain unused imports in some cases +// @ts-ignore +import type { ReactionWithUserInfo } from './reaction-with-user-info'; + +/** + * + * @export + * @interface Notification + */ +export interface Notification { + /** + * + * @type {string} + * @memberof Notification + */ + 'object': string; + /** + * + * @type {string} + * @memberof Notification + */ + 'most_recent_timestamp': string; + /** + * + * @type {string} + * @memberof Notification + */ + 'type': NotificationTypeEnum; + /** + * + * @type {boolean} + * @memberof Notification + */ + 'seen': boolean; + /** + * + * @type {Array} + * @memberof Notification + */ + 'follows'?: Array; + /** + * + * @type {CastWithInteractions} + * @memberof Notification + */ + 'cast'?: CastWithInteractions; + /** + * + * @type {Array} + * @memberof Notification + */ + 'reactions'?: Array; + /** + * The number of notifications of this(follows, likes, recast) type bundled in a single notification. + * @type {number} + * @memberof Notification + */ + 'count'?: number; +} + +export const NotificationTypeEnum = { + Follows: 'follows', + Recasts: 'recasts', + Likes: 'likes', + Mention: 'mention', + Reply: 'reply' +} as const; + +export type NotificationTypeEnum = typeof NotificationTypeEnum[keyof typeof NotificationTypeEnum]; + + diff --git a/src/neynar-api/v2/openapi-farcaster/models/notifications-response.ts b/src/neynar-api/v2/openapi-farcaster/models/notifications-response.ts new file mode 100644 index 00000000..d722044e --- /dev/null +++ b/src/neynar-api/v2/openapi-farcaster/models/notifications-response.ts @@ -0,0 +1,48 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Farcaster API V2 + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +// May contain unused imports in some cases +// @ts-ignore +import type { NextCursor } from './next-cursor'; +// May contain unused imports in some cases +// @ts-ignore +import type { Notification } from './notification'; + +/** + * + * @export + * @interface NotificationsResponse + */ +export interface NotificationsResponse { + /** + * + * @type {number} + * @memberof NotificationsResponse + */ + 'unseen_notifications_count': number; + /** + * + * @type {Array} + * @memberof NotificationsResponse + */ + 'notifications': Array; + /** + * + * @type {NextCursor} + * @memberof NotificationsResponse + */ + 'next': NextCursor; +} + diff --git a/src/neynar-api/v2/openapi-farcaster/models/oembed-data.ts b/src/neynar-api/v2/openapi-farcaster/models/oembed-data.ts new file mode 100644 index 00000000..0e8dfab6 --- /dev/null +++ b/src/neynar-api/v2/openapi-farcaster/models/oembed-data.ts @@ -0,0 +1,90 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Farcaster API V2 + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + + +/** + * Basic data structure of every oembed response see https://oembed.com/ + * @export + * @interface OembedData + */ +export interface OembedData { + /** + * + * @type {string} + * @memberof OembedData + */ + 'type': string; + /** + * + * @type {string} + * @memberof OembedData + */ + 'version': string | null; + /** + * A text title, describing the resource. + * @type {string} + * @memberof OembedData + */ + 'title'?: string | null; + /** + * The name of the author/owner of the resource. + * @type {string} + * @memberof OembedData + */ + 'author_name'?: string | null; + /** + * A URL for the author/owner of the resource. + * @type {string} + * @memberof OembedData + */ + 'author_url'?: string | null; + /** + * The name of the resource provider. + * @type {string} + * @memberof OembedData + */ + 'provider_name'?: string | null; + /** + * The url of the resource provider. + * @type {string} + * @memberof OembedData + */ + 'provider_url'?: string | null; + /** + * The suggested cache lifetime for this resource, in seconds. Consumers may choose to use this value or not. + * @type {string} + * @memberof OembedData + */ + 'cache_age'?: string | null; + /** + * A URL to a thumbnail image representing the resource. The thumbnail must respect any maxwidth and maxheight parameters. If this parameter is present, thumbnail_width and thumbnail_height must also be present. + * @type {string} + * @memberof OembedData + */ + 'thumbnail_url'?: string | null; + /** + * The width of the optional thumbnail. If this parameter is present, thumbnail_url and thumbnail_height must also be present. + * @type {number} + * @memberof OembedData + */ + 'thumbnail_width'?: number | null; + /** + * The height of the optional thumbnail. If this parameter is present, thumbnail_url and thumbnail_width must also be present. + * @type {number} + * @memberof OembedData + */ + 'thumbnail_height'?: number | null; +} + diff --git a/src/neynar-api/v2/openapi-farcaster/models/oembed-link-data-all-of.ts b/src/neynar-api/v2/openapi-farcaster/models/oembed-link-data-all-of.ts new file mode 100644 index 00000000..ba90cf61 --- /dev/null +++ b/src/neynar-api/v2/openapi-farcaster/models/oembed-link-data-all-of.ts @@ -0,0 +1,37 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Farcaster API V2 + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + + +/** + * + * @export + * @interface OembedLinkDataAllOf + */ +export interface OembedLinkDataAllOf { + /** + * + * @type {string} + * @memberof OembedLinkDataAllOf + */ + 'type': OembedLinkDataAllOfTypeEnum; +} + +export const OembedLinkDataAllOfTypeEnum = { + Link: 'link' +} as const; + +export type OembedLinkDataAllOfTypeEnum = typeof OembedLinkDataAllOfTypeEnum[keyof typeof OembedLinkDataAllOfTypeEnum]; + + diff --git a/src/neynar-api/v2/openapi-farcaster/models/oembed-link-data.ts b/src/neynar-api/v2/openapi-farcaster/models/oembed-link-data.ts new file mode 100644 index 00000000..9cffd961 --- /dev/null +++ b/src/neynar-api/v2/openapi-farcaster/models/oembed-link-data.ts @@ -0,0 +1,29 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Farcaster API V2 + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +// May contain unused imports in some cases +// @ts-ignore +import type { OembedData } from './oembed-data'; +// May contain unused imports in some cases +// @ts-ignore +import type { OembedLinkDataAllOf } from './oembed-link-data-all-of'; + +/** + * @type OembedLinkData + * @export + */ +export type OembedLinkData = OembedData & OembedLinkDataAllOf; + + diff --git a/src/neynar-api/v2/openapi-farcaster/models/oembed-photo-data-all-of.ts b/src/neynar-api/v2/openapi-farcaster/models/oembed-photo-data-all-of.ts new file mode 100644 index 00000000..cec3f884 --- /dev/null +++ b/src/neynar-api/v2/openapi-farcaster/models/oembed-photo-data-all-of.ts @@ -0,0 +1,55 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Farcaster API V2 + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + + +/** + * + * @export + * @interface OembedPhotoDataAllOf + */ +export interface OembedPhotoDataAllOf { + /** + * + * @type {string} + * @memberof OembedPhotoDataAllOf + */ + 'type': OembedPhotoDataAllOfTypeEnum; + /** + * The source URL of the image. Consumers should be able to insert this URL into an element. Only HTTP and HTTPS URLs are valid. + * @type {string} + * @memberof OembedPhotoDataAllOf + */ + 'url': string | null; + /** + * The width in pixels of the image specified in the url parameter. + * @type {number} + * @memberof OembedPhotoDataAllOf + */ + 'width': number | null; + /** + * The height in pixels of the image specified in the url parameter. + * @type {number} + * @memberof OembedPhotoDataAllOf + */ + 'height': number | null; +} + +export const OembedPhotoDataAllOfTypeEnum = { + Photo: 'photo' +} as const; + +export type OembedPhotoDataAllOfTypeEnum = typeof OembedPhotoDataAllOfTypeEnum[keyof typeof OembedPhotoDataAllOfTypeEnum]; + + diff --git a/src/neynar-api/v2/openapi-farcaster/models/oembed-photo-data.ts b/src/neynar-api/v2/openapi-farcaster/models/oembed-photo-data.ts new file mode 100644 index 00000000..394247d0 --- /dev/null +++ b/src/neynar-api/v2/openapi-farcaster/models/oembed-photo-data.ts @@ -0,0 +1,29 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Farcaster API V2 + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +// May contain unused imports in some cases +// @ts-ignore +import type { OembedData } from './oembed-data'; +// May contain unused imports in some cases +// @ts-ignore +import type { OembedPhotoDataAllOf } from './oembed-photo-data-all-of'; + +/** + * @type OembedPhotoData + * @export + */ +export type OembedPhotoData = OembedData & OembedPhotoDataAllOf; + + diff --git a/src/neynar-api/v2/openapi-farcaster/models/oembed-rich-data-all-of.ts b/src/neynar-api/v2/openapi-farcaster/models/oembed-rich-data-all-of.ts new file mode 100644 index 00000000..80c50f52 --- /dev/null +++ b/src/neynar-api/v2/openapi-farcaster/models/oembed-rich-data-all-of.ts @@ -0,0 +1,55 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Farcaster API V2 + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + + +/** + * + * @export + * @interface OembedRichDataAllOf + */ +export interface OembedRichDataAllOf { + /** + * + * @type {string} + * @memberof OembedRichDataAllOf + */ + 'type': OembedRichDataAllOfTypeEnum; + /** + * The HTML required to display the resource. The HTML should have no padding or margins. Consumers may wish to load the HTML in an off-domain iframe to avoid XSS vulnerabilities. The markup should be valid XHTML 1.0 Basic. + * @type {string} + * @memberof OembedRichDataAllOf + */ + 'html': string | null; + /** + * The width in pixels required to display the HTML. + * @type {number} + * @memberof OembedRichDataAllOf + */ + 'width': number | null; + /** + * The height in pixels required to display the HTML. + * @type {number} + * @memberof OembedRichDataAllOf + */ + 'height': number | null; +} + +export const OembedRichDataAllOfTypeEnum = { + Rich: 'rich' +} as const; + +export type OembedRichDataAllOfTypeEnum = typeof OembedRichDataAllOfTypeEnum[keyof typeof OembedRichDataAllOfTypeEnum]; + + diff --git a/src/neynar-api/v2/openapi-farcaster/models/oembed-rich-data.ts b/src/neynar-api/v2/openapi-farcaster/models/oembed-rich-data.ts new file mode 100644 index 00000000..dd0c2f0b --- /dev/null +++ b/src/neynar-api/v2/openapi-farcaster/models/oembed-rich-data.ts @@ -0,0 +1,29 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Farcaster API V2 + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +// May contain unused imports in some cases +// @ts-ignore +import type { OembedData } from './oembed-data'; +// May contain unused imports in some cases +// @ts-ignore +import type { OembedRichDataAllOf } from './oembed-rich-data-all-of'; + +/** + * @type OembedRichData + * @export + */ +export type OembedRichData = OembedData & OembedRichDataAllOf; + + diff --git a/src/neynar-api/v2/openapi-farcaster/models/oembed-video-data-all-of.ts b/src/neynar-api/v2/openapi-farcaster/models/oembed-video-data-all-of.ts new file mode 100644 index 00000000..f2df77c0 --- /dev/null +++ b/src/neynar-api/v2/openapi-farcaster/models/oembed-video-data-all-of.ts @@ -0,0 +1,55 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Farcaster API V2 + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + + +/** + * + * @export + * @interface OembedVideoDataAllOf + */ +export interface OembedVideoDataAllOf { + /** + * + * @type {string} + * @memberof OembedVideoDataAllOf + */ + 'type': OembedVideoDataAllOfTypeEnum; + /** + * The HTML required to embed a video player. The HTML should have no padding or margins. Consumers may wish to load the HTML in an off-domain iframe to avoid XSS vulnerabilities. + * @type {string} + * @memberof OembedVideoDataAllOf + */ + 'html': string | null; + /** + * The width in pixels required to display the HTML. + * @type {number} + * @memberof OembedVideoDataAllOf + */ + 'width': number | null; + /** + * The height in pixels required to display the HTML. + * @type {number} + * @memberof OembedVideoDataAllOf + */ + 'height': number | null; +} + +export const OembedVideoDataAllOfTypeEnum = { + Video: 'video' +} as const; + +export type OembedVideoDataAllOfTypeEnum = typeof OembedVideoDataAllOfTypeEnum[keyof typeof OembedVideoDataAllOfTypeEnum]; + + diff --git a/src/neynar-api/v2/openapi-farcaster/models/oembed-video-data.ts b/src/neynar-api/v2/openapi-farcaster/models/oembed-video-data.ts new file mode 100644 index 00000000..6812c3e9 --- /dev/null +++ b/src/neynar-api/v2/openapi-farcaster/models/oembed-video-data.ts @@ -0,0 +1,29 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Farcaster API V2 + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +// May contain unused imports in some cases +// @ts-ignore +import type { OembedData } from './oembed-data'; +// May contain unused imports in some cases +// @ts-ignore +import type { OembedVideoDataAllOf } from './oembed-video-data-all-of'; + +/** + * @type OembedVideoData + * @export + */ +export type OembedVideoData = OembedData & OembedVideoDataAllOf; + + diff --git a/src/neynar-api/v2/openapi-farcaster/models/og-object.ts b/src/neynar-api/v2/openapi-farcaster/models/og-object.ts new file mode 100644 index 00000000..1cd59f04 --- /dev/null +++ b/src/neynar-api/v2/openapi-farcaster/models/og-object.ts @@ -0,0 +1,324 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Farcaster API V2 + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +// May contain unused imports in some cases +// @ts-ignore +import type { ImageObject } from './image-object'; +// May contain unused imports in some cases +// @ts-ignore +import type { VideoObject } from './video-object'; + +/** + * + * @export + * @interface OgObject + */ +export interface OgObject { + /** + * + * @type {string} + * @memberof OgObject + */ + 'favicon'?: string; + /** + * + * @type {string} + * @memberof OgObject + */ + 'modifiedTime'?: string; + /** + * + * @type {string} + * @memberof OgObject + */ + 'ogArticleAuthor'?: string; + /** + * + * @type {string} + * @memberof OgObject + */ + 'ogArticleExpirationTime'?: string; + /** + * + * @type {string} + * @memberof OgObject + */ + 'ogArticleModifiedTime'?: string; + /** + * + * @type {string} + * @memberof OgObject + */ + 'ogArticlePublishedTime'?: string; + /** + * + * @type {string} + * @memberof OgObject + */ + 'ogArticlePublisher'?: string; + /** + * + * @type {string} + * @memberof OgObject + */ + 'ogArticleSection'?: string; + /** + * + * @type {string} + * @memberof OgObject + */ + 'ogArticleTag'?: string; + /** + * + * @type {string} + * @memberof OgObject + */ + 'ogAudio'?: string; + /** + * + * @type {string} + * @memberof OgObject + */ + 'ogAudioSecureURL'?: string; + /** + * + * @type {string} + * @memberof OgObject + */ + 'ogAudioType'?: string; + /** + * + * @type {string} + * @memberof OgObject + */ + 'ogAudioURL'?: string; + /** + * + * @type {string} + * @memberof OgObject + */ + 'ogAvailability'?: string; + /** + * + * @type {string} + * @memberof OgObject + */ + 'ogDate'?: string; + /** + * + * @type {string} + * @memberof OgObject + */ + 'ogDescription'?: string; + /** + * + * @type {string} + * @memberof OgObject + */ + 'ogDeterminer'?: string; + /** + * + * @type {string} + * @memberof OgObject + */ + 'ogEpisode'?: string; + /** + * + * @type {Array} + * @memberof OgObject + */ + 'ogImage'?: Array; + /** + * + * @type {string} + * @memberof OgObject + */ + 'ogLocale'?: string; + /** + * + * @type {string} + * @memberof OgObject + */ + 'ogLocaleAlternate'?: string; + /** + * + * @type {string} + * @memberof OgObject + */ + 'ogLogo'?: string; + /** + * + * @type {string} + * @memberof OgObject + */ + 'ogMovie'?: string; + /** + * + * @type {string} + * @memberof OgObject + */ + 'ogPriceAmount'?: string; + /** + * + * @type {string} + * @memberof OgObject + */ + 'ogPriceCurrency'?: string; + /** + * + * @type {string} + * @memberof OgObject + */ + 'ogProductAvailability'?: string; + /** + * + * @type {string} + * @memberof OgObject + */ + 'ogProductCondition'?: string; + /** + * + * @type {string} + * @memberof OgObject + */ + 'ogProductPriceAmount'?: string; + /** + * + * @type {string} + * @memberof OgObject + */ + 'ogProductPriceCurrency'?: string; + /** + * + * @type {string} + * @memberof OgObject + */ + 'ogProductRetailerItemId'?: string; + /** + * + * @type {string} + * @memberof OgObject + */ + 'ogSiteName'?: string; + /** + * + * @type {string} + * @memberof OgObject + */ + 'ogTitle'?: string; + /** + * + * @type {string} + * @memberof OgObject + */ + 'ogType'?: string; + /** + * + * @type {string} + * @memberof OgObject + */ + 'ogUrl'?: string; + /** + * + * @type {Array} + * @memberof OgObject + */ + 'ogVideo'?: Array; + /** + * + * @type {string} + * @memberof OgObject + */ + 'ogVideoActor'?: string; + /** + * + * @type {string} + * @memberof OgObject + */ + 'ogVideoActorId'?: string; + /** + * + * @type {string} + * @memberof OgObject + */ + 'ogVideoActorRole'?: string; + /** + * + * @type {string} + * @memberof OgObject + */ + 'ogVideoDirector'?: string; + /** + * + * @type {string} + * @memberof OgObject + */ + 'ogVideoDuration'?: string; + /** + * + * @type {string} + * @memberof OgObject + */ + 'ogVideoOther'?: string; + /** + * + * @type {string} + * @memberof OgObject + */ + 'ogVideoReleaseDate'?: string; + /** + * + * @type {string} + * @memberof OgObject + */ + 'ogVideoSecureURL'?: string; + /** + * + * @type {string} + * @memberof OgObject + */ + 'ogVideoSeries'?: string; + /** + * + * @type {string} + * @memberof OgObject + */ + 'ogVideoTag'?: string; + /** + * + * @type {string} + * @memberof OgObject + */ + 'ogVideoTvShow'?: string; + /** + * + * @type {string} + * @memberof OgObject + */ + 'ogVideoWriter'?: string; + /** + * + * @type {string} + * @memberof OgObject + */ + 'ogWebsite'?: string; + /** + * + * @type {string} + * @memberof OgObject + */ + 'updatedTime'?: string; +} + diff --git a/src/neynar-api/v2/openapi-farcaster/models/operation-response.ts b/src/neynar-api/v2/openapi-farcaster/models/operation-response.ts new file mode 100644 index 00000000..a56a71a8 --- /dev/null +++ b/src/neynar-api/v2/openapi-farcaster/models/operation-response.ts @@ -0,0 +1,36 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Farcaster API V2 + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + + +/** + * + * @export + * @interface OperationResponse + */ +export interface OperationResponse { + /** + * + * @type {boolean} + * @memberof OperationResponse + */ + 'success'?: boolean; + /** + * + * @type {string} + * @memberof OperationResponse + */ + 'message'?: string; +} + diff --git a/src/neynar-api/v2/openapi-farcaster/models/post-cast-req-body-embeds-cast-id-properties.ts b/src/neynar-api/v2/openapi-farcaster/models/post-cast-req-body-embeds-cast-id-properties.ts new file mode 100644 index 00000000..eeda9709 --- /dev/null +++ b/src/neynar-api/v2/openapi-farcaster/models/post-cast-req-body-embeds-cast-id-properties.ts @@ -0,0 +1,36 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Farcaster API V2 + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + + +/** + * + * @export + * @interface PostCastReqBodyEmbedsCastIdProperties + */ +export interface PostCastReqBodyEmbedsCastIdProperties { + /** + * The unique identifier of a farcaster user (unsigned integer) + * @type {number} + * @memberof PostCastReqBodyEmbedsCastIdProperties + */ + 'fid': number; + /** + * + * @type {string} + * @memberof PostCastReqBodyEmbedsCastIdProperties + */ + 'hash': string; +} + diff --git a/src/neynar-api/v2/openapi-farcaster/models/post-cast-req-body-embeds.ts b/src/neynar-api/v2/openapi-farcaster/models/post-cast-req-body-embeds.ts new file mode 100644 index 00000000..1ca154b7 --- /dev/null +++ b/src/neynar-api/v2/openapi-farcaster/models/post-cast-req-body-embeds.ts @@ -0,0 +1,45 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Farcaster API V2 + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +// May contain unused imports in some cases +// @ts-ignore +import type { PostCastReqBodyEmbedsCastIdProperties } from './post-cast-req-body-embeds-cast-id-properties'; + +/** + * + * @export + * @interface PostCastReqBodyEmbeds + */ +export interface PostCastReqBodyEmbeds { + /** + * + * @type {PostCastReqBodyEmbedsCastIdProperties} + * @memberof PostCastReqBodyEmbeds + */ + 'cast_id'?: PostCastReqBodyEmbedsCastIdProperties; + /** + * + * @type {PostCastReqBodyEmbedsCastIdProperties} + * @memberof PostCastReqBodyEmbeds + */ + 'castId'?: PostCastReqBodyEmbedsCastIdProperties; + /** + * + * @type {string} + * @memberof PostCastReqBodyEmbeds + */ + 'url'?: string; +} + diff --git a/src/neynar-api/v2/openapi-farcaster/models/post-cast-req-body.ts b/src/neynar-api/v2/openapi-farcaster/models/post-cast-req-body.ts new file mode 100644 index 00000000..16a99d96 --- /dev/null +++ b/src/neynar-api/v2/openapi-farcaster/models/post-cast-req-body.ts @@ -0,0 +1,69 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Farcaster API V2 + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +// May contain unused imports in some cases +// @ts-ignore +import type { PostCastReqBodyEmbeds } from './post-cast-req-body-embeds'; + +/** + * + * @export + * @interface PostCastReqBody + */ +export interface PostCastReqBody { + /** + * UUID of the signer + * @type {string} + * @memberof PostCastReqBody + */ + 'signer_uuid': string; + /** + * + * @type {string} + * @memberof PostCastReqBody + */ + 'text'?: string; + /** + * + * @type {Array} + * @memberof PostCastReqBody + */ + 'embeds'?: Array; + /** + * parent_url of the channel the cast is in, or hash of the cast + * @type {string} + * @memberof PostCastReqBody + */ + 'parent'?: string; + /** + * Channel ID of the channel where the cast is to be posted. e.g. neynar, farcaster, warpcast + * @type {string} + * @memberof PostCastReqBody + */ + 'channel_id'?: string; + /** + * An Idempotency key is a unique identifier for the request. **Note:** 1) This is used to prevent duplicate requests. Use the same idem key on retry attempts. 2) This should be a unique identifier for each request. 3) Recommended format is a 16-character string generated by the developer at the time of making this request. + * @type {string} + * @memberof PostCastReqBody + */ + 'idem'?: string; + /** + * The unique identifier of a farcaster user (unsigned integer) + * @type {number} + * @memberof PostCastReqBody + */ + 'parent_author_fid'?: number; +} + diff --git a/src/neynar-api/v2/openapi-farcaster/models/post-cast-response-cast.ts b/src/neynar-api/v2/openapi-farcaster/models/post-cast-response-cast.ts new file mode 100644 index 00000000..90699125 --- /dev/null +++ b/src/neynar-api/v2/openapi-farcaster/models/post-cast-response-cast.ts @@ -0,0 +1,45 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Farcaster API V2 + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +// May contain unused imports in some cases +// @ts-ignore +import type { CastEmbeddedParentAuthor } from './cast-embedded-parent-author'; + +/** + * + * @export + * @interface PostCastResponseCast + */ +export interface PostCastResponseCast { + /** + * Cast Hash + * @type {string} + * @memberof PostCastResponseCast + */ + 'hash': string; + /** + * + * @type {CastEmbeddedParentAuthor} + * @memberof PostCastResponseCast + */ + 'author': CastEmbeddedParentAuthor; + /** + * + * @type {string} + * @memberof PostCastResponseCast + */ + 'text': string; +} + diff --git a/src/neynar-api/v2/openapi-farcaster/models/post-cast-response.ts b/src/neynar-api/v2/openapi-farcaster/models/post-cast-response.ts new file mode 100644 index 00000000..9f5b509d --- /dev/null +++ b/src/neynar-api/v2/openapi-farcaster/models/post-cast-response.ts @@ -0,0 +1,39 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Farcaster API V2 + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +// May contain unused imports in some cases +// @ts-ignore +import type { PostCastResponseCast } from './post-cast-response-cast'; + +/** + * + * @export + * @interface PostCastResponse + */ +export interface PostCastResponse { + /** + * + * @type {boolean} + * @memberof PostCastResponse + */ + 'success': boolean; + /** + * + * @type {PostCastResponseCast} + * @memberof PostCastResponse + */ + 'cast': PostCastResponseCast; +} + diff --git a/src/neynar-api/v2/openapi-farcaster/models/profile-url-pfp.ts b/src/neynar-api/v2/openapi-farcaster/models/profile-url-pfp.ts new file mode 100644 index 00000000..31466094 --- /dev/null +++ b/src/neynar-api/v2/openapi-farcaster/models/profile-url-pfp.ts @@ -0,0 +1,30 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Farcaster API V2 + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + + +/** + * + * @export + * @interface ProfileUrlPfp + */ +export interface ProfileUrlPfp { + /** + * + * @type {string} + * @memberof ProfileUrlPfp + */ + 'url': string; +} + diff --git a/src/neynar-api/v2/openapi-farcaster/models/profile-url.ts b/src/neynar-api/v2/openapi-farcaster/models/profile-url.ts new file mode 100644 index 00000000..45d01661 --- /dev/null +++ b/src/neynar-api/v2/openapi-farcaster/models/profile-url.ts @@ -0,0 +1,33 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Farcaster API V2 + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +// May contain unused imports in some cases +// @ts-ignore +import type { ProfileUrlPfp } from './profile-url-pfp'; + +/** + * + * @export + * @interface ProfileUrl + */ +export interface ProfileUrl { + /** + * + * @type {ProfileUrlPfp} + * @memberof ProfileUrl + */ + 'pfp': ProfileUrlPfp; +} + diff --git a/src/neynar-api/v2/openapi-farcaster/models/reaction-for-cast.ts b/src/neynar-api/v2/openapi-farcaster/models/reaction-for-cast.ts new file mode 100644 index 00000000..3c84105c --- /dev/null +++ b/src/neynar-api/v2/openapi-farcaster/models/reaction-for-cast.ts @@ -0,0 +1,65 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Farcaster API V2 + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +// May contain unused imports in some cases +// @ts-ignore +import type { User } from './user'; + +/** + * + * @export + * @interface ReactionForCast + */ +export interface ReactionForCast { + /** + * + * @type {string} + * @memberof ReactionForCast + */ + 'reaction_type': ReactionForCastReactionTypeEnum; + /** + * + * @type {string} + * @memberof ReactionForCast + */ + 'reaction_timestamp': string; + /** + * + * @type {string} + * @memberof ReactionForCast + */ + 'object': ReactionForCastObjectEnum; + /** + * + * @type {User} + * @memberof ReactionForCast + */ + 'user': User; +} + +export const ReactionForCastReactionTypeEnum = { + Like: 'like', + Recast: 'recast' +} as const; + +export type ReactionForCastReactionTypeEnum = typeof ReactionForCastReactionTypeEnum[keyof typeof ReactionForCastReactionTypeEnum]; +export const ReactionForCastObjectEnum = { + Likes: 'likes', + Recasts: 'recasts' +} as const; + +export type ReactionForCastObjectEnum = typeof ReactionForCastObjectEnum[keyof typeof ReactionForCastObjectEnum]; + + diff --git a/src/neynar-api/v2/openapi-farcaster/models/reaction-like.ts b/src/neynar-api/v2/openapi-farcaster/models/reaction-like.ts new file mode 100644 index 00000000..6dc383fe --- /dev/null +++ b/src/neynar-api/v2/openapi-farcaster/models/reaction-like.ts @@ -0,0 +1,30 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Farcaster API V2 + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + + +/** + * + * @export + * @interface ReactionLike + */ +export interface ReactionLike { + /** + * The unique identifier of a farcaster user (unsigned integer) + * @type {number} + * @memberof ReactionLike + */ + 'fid': number; +} + diff --git a/src/neynar-api/v2/openapi-farcaster/models/reaction-recast.ts b/src/neynar-api/v2/openapi-farcaster/models/reaction-recast.ts new file mode 100644 index 00000000..49cb3a5b --- /dev/null +++ b/src/neynar-api/v2/openapi-farcaster/models/reaction-recast.ts @@ -0,0 +1,36 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Farcaster API V2 + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + + +/** + * + * @export + * @interface ReactionRecast + */ +export interface ReactionRecast { + /** + * The unique identifier of a farcaster user (unsigned integer) + * @type {number} + * @memberof ReactionRecast + */ + 'fid': number; + /** + * + * @type {string} + * @memberof ReactionRecast + */ + 'fname': string; +} + diff --git a/src/neynar-api/v2/openapi-farcaster/models/reaction-req-body.ts b/src/neynar-api/v2/openapi-farcaster/models/reaction-req-body.ts new file mode 100644 index 00000000..6175ea20 --- /dev/null +++ b/src/neynar-api/v2/openapi-farcaster/models/reaction-req-body.ts @@ -0,0 +1,59 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Farcaster API V2 + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +// May contain unused imports in some cases +// @ts-ignore +import type { ReactionType } from './reaction-type'; + +/** + * + * @export + * @interface ReactionReqBody + */ +export interface ReactionReqBody { + /** + * UUID of the signer + * @type {string} + * @memberof ReactionReqBody + */ + 'signer_uuid': string; + /** + * + * @type {ReactionType} + * @memberof ReactionReqBody + */ + 'reaction_type': ReactionType; + /** + * + * @type {string} + * @memberof ReactionReqBody + */ + 'target': string; + /** + * The unique identifier of a farcaster user (unsigned integer) + * @type {number} + * @memberof ReactionReqBody + */ + 'target_author_fid'?: number; + /** + * An Idempotency key is a unique identifier for the request. **Note:** 1) This is used to prevent duplicate requests. Use the same idem key on retry attempts. 2) This should be a unique identifier for each request. 3) Recommended format is a 16-character string generated by the developer at the time of making this request. + * @type {string} + * @memberof ReactionReqBody + */ + 'idem'?: string; +} + + + diff --git a/src/neynar-api/v2/openapi-farcaster/models/reaction-type.ts b/src/neynar-api/v2/openapi-farcaster/models/reaction-type.ts new file mode 100644 index 00000000..0dac49b8 --- /dev/null +++ b/src/neynar-api/v2/openapi-farcaster/models/reaction-type.ts @@ -0,0 +1,31 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Farcaster API V2 + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + + +/** + * + * @export + * @enum {string} + */ + +export const ReactionType = { + Like: 'like', + Recast: 'recast' +} as const; + +export type ReactionType = typeof ReactionType[keyof typeof ReactionType]; + + + diff --git a/src/neynar-api/v2/openapi-farcaster/models/reaction-with-cast-info.ts b/src/neynar-api/v2/openapi-farcaster/models/reaction-with-cast-info.ts new file mode 100644 index 00000000..e50a39df --- /dev/null +++ b/src/neynar-api/v2/openapi-farcaster/models/reaction-with-cast-info.ts @@ -0,0 +1,74 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Farcaster API V2 + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +// May contain unused imports in some cases +// @ts-ignore +import type { CastWithInteractions } from './cast-with-interactions'; +// May contain unused imports in some cases +// @ts-ignore +import type { UserDehydrated } from './user-dehydrated'; + +/** + * + * @export + * @interface ReactionWithCastInfo + */ +export interface ReactionWithCastInfo { + /** + * + * @type {string} + * @memberof ReactionWithCastInfo + */ + 'reaction_type': ReactionWithCastInfoReactionTypeEnum; + /** + * + * @type {CastWithInteractions} + * @memberof ReactionWithCastInfo + */ + 'cast': CastWithInteractions; + /** + * + * @type {string} + * @memberof ReactionWithCastInfo + */ + 'reaction_timestamp': string; + /** + * + * @type {string} + * @memberof ReactionWithCastInfo + */ + 'object': ReactionWithCastInfoObjectEnum; + /** + * + * @type {UserDehydrated} + * @memberof ReactionWithCastInfo + */ + 'user': UserDehydrated; +} + +export const ReactionWithCastInfoReactionTypeEnum = { + Like: 'like', + Recast: 'recast' +} as const; + +export type ReactionWithCastInfoReactionTypeEnum = typeof ReactionWithCastInfoReactionTypeEnum[keyof typeof ReactionWithCastInfoReactionTypeEnum]; +export const ReactionWithCastInfoObjectEnum = { + Likes: 'likes', + Recasts: 'recasts' +} as const; + +export type ReactionWithCastInfoObjectEnum = typeof ReactionWithCastInfoObjectEnum[keyof typeof ReactionWithCastInfoObjectEnum]; + + diff --git a/src/neynar-api/v2/openapi-farcaster/models/reaction-with-user-info.ts b/src/neynar-api/v2/openapi-farcaster/models/reaction-with-user-info.ts new file mode 100644 index 00000000..a950b0b3 --- /dev/null +++ b/src/neynar-api/v2/openapi-farcaster/models/reaction-with-user-info.ts @@ -0,0 +1,56 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Farcaster API V2 + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +// May contain unused imports in some cases +// @ts-ignore +import type { CastDehydrated } from './cast-dehydrated'; +// May contain unused imports in some cases +// @ts-ignore +import type { User } from './user'; + +/** + * + * @export + * @interface ReactionWithUserInfo + */ +export interface ReactionWithUserInfo { + /** + * + * @type {string} + * @memberof ReactionWithUserInfo + */ + 'object': ReactionWithUserInfoObjectEnum; + /** + * + * @type {CastDehydrated} + * @memberof ReactionWithUserInfo + */ + 'cast': CastDehydrated; + /** + * + * @type {User} + * @memberof ReactionWithUserInfo + */ + 'user': User; +} + +export const ReactionWithUserInfoObjectEnum = { + Likes: 'likes', + Recasts: 'recasts' +} as const; + +export type ReactionWithUserInfoObjectEnum = typeof ReactionWithUserInfoObjectEnum[keyof typeof ReactionWithUserInfoObjectEnum]; + + diff --git a/src/neynar-api/v2/openapi-farcaster/models/reactions-cast-response.ts b/src/neynar-api/v2/openapi-farcaster/models/reactions-cast-response.ts new file mode 100644 index 00000000..95cae9d6 --- /dev/null +++ b/src/neynar-api/v2/openapi-farcaster/models/reactions-cast-response.ts @@ -0,0 +1,42 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Farcaster API V2 + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +// May contain unused imports in some cases +// @ts-ignore +import type { NextCursor } from './next-cursor'; +// May contain unused imports in some cases +// @ts-ignore +import type { ReactionForCast } from './reaction-for-cast'; + +/** + * + * @export + * @interface ReactionsCastResponse + */ +export interface ReactionsCastResponse { + /** + * + * @type {Array} + * @memberof ReactionsCastResponse + */ + 'reactions': Array; + /** + * + * @type {NextCursor} + * @memberof ReactionsCastResponse + */ + 'next': NextCursor; +} + diff --git a/src/neynar-api/v2/openapi-farcaster/models/reactions-response.ts b/src/neynar-api/v2/openapi-farcaster/models/reactions-response.ts new file mode 100644 index 00000000..34601201 --- /dev/null +++ b/src/neynar-api/v2/openapi-farcaster/models/reactions-response.ts @@ -0,0 +1,42 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Farcaster API V2 + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +// May contain unused imports in some cases +// @ts-ignore +import type { NextCursor } from './next-cursor'; +// May contain unused imports in some cases +// @ts-ignore +import type { ReactionWithCastInfo } from './reaction-with-cast-info'; + +/** + * + * @export + * @interface ReactionsResponse + */ +export interface ReactionsResponse { + /** + * + * @type {Array} + * @memberof ReactionsResponse + */ + 'reactions': Array; + /** + * + * @type {NextCursor} + * @memberof ReactionsResponse + */ + 'next': NextCursor; +} + diff --git a/src/neynar-api/v2/openapi-farcaster/models/reactions-type.ts b/src/neynar-api/v2/openapi-farcaster/models/reactions-type.ts new file mode 100644 index 00000000..0c1a2fb8 --- /dev/null +++ b/src/neynar-api/v2/openapi-farcaster/models/reactions-type.ts @@ -0,0 +1,32 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Farcaster API V2 + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + + +/** + * + * @export + * @enum {string} + */ + +export const ReactionsType = { + All: 'all', + Likes: 'likes', + Recasts: 'recasts' +} as const; + +export type ReactionsType = typeof ReactionsType[keyof typeof ReactionsType]; + + + diff --git a/src/neynar-api/v2/openapi-farcaster/models/register-developer-managed-signed-key-req-body.ts b/src/neynar-api/v2/openapi-farcaster/models/register-developer-managed-signed-key-req-body.ts new file mode 100644 index 00000000..e79348f3 --- /dev/null +++ b/src/neynar-api/v2/openapi-farcaster/models/register-developer-managed-signed-key-req-body.ts @@ -0,0 +1,63 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Farcaster API V2 + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +// May contain unused imports in some cases +// @ts-ignore +import type { SignedKeyRequestSponsor } from './signed-key-request-sponsor'; + +/** + * + * @export + * @interface RegisterDeveloperManagedSignedKeyReqBody + */ +export interface RegisterDeveloperManagedSignedKeyReqBody { + /** + * Ed25519 public key + * @type {string} + * @memberof RegisterDeveloperManagedSignedKeyReqBody + */ + 'public_key': string; + /** + * Signature generated by the custody address of the app. Signed data includes app_fid, deadline, signer’s public key + * @type {string} + * @memberof RegisterDeveloperManagedSignedKeyReqBody + */ + 'signature': string; + /** + * The unique identifier of a farcaster user (unsigned integer) + * @type {number} + * @memberof RegisterDeveloperManagedSignedKeyReqBody + */ + 'app_fid': number; + /** + * unix timestamp in seconds that controls how long the signed key request is valid for. (24 hours from now is recommended) + * @type {number} + * @memberof RegisterDeveloperManagedSignedKeyReqBody + */ + 'deadline': number; + /** + * Url to redirect to after the signer is approved. **Note** : This should only be used when requesting a signer from a native mobile application. + * @type {string} + * @memberof RegisterDeveloperManagedSignedKeyReqBody + */ + 'redirect_url'?: string; + /** + * + * @type {SignedKeyRequestSponsor} + * @memberof RegisterDeveloperManagedSignedKeyReqBody + */ + 'sponsor'?: SignedKeyRequestSponsor; +} + diff --git a/src/neynar-api/v2/openapi-farcaster/models/register-signer-key-req-body.ts b/src/neynar-api/v2/openapi-farcaster/models/register-signer-key-req-body.ts new file mode 100644 index 00000000..9b70e50e --- /dev/null +++ b/src/neynar-api/v2/openapi-farcaster/models/register-signer-key-req-body.ts @@ -0,0 +1,63 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Farcaster API V2 + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +// May contain unused imports in some cases +// @ts-ignore +import type { SignedKeyRequestSponsor } from './signed-key-request-sponsor'; + +/** + * + * @export + * @interface RegisterSignerKeyReqBody + */ +export interface RegisterSignerKeyReqBody { + /** + * UUID of the signer + * @type {string} + * @memberof RegisterSignerKeyReqBody + */ + 'signer_uuid': string; + /** + * Signature generated by the custody address of the app. Signed data includes app_fid, deadline, signer’s public key + * @type {string} + * @memberof RegisterSignerKeyReqBody + */ + 'signature': string; + /** + * The unique identifier of a farcaster user (unsigned integer) + * @type {number} + * @memberof RegisterSignerKeyReqBody + */ + 'app_fid': number; + /** + * unix timestamp in seconds that controls how long the signed key request is valid for. (24 hours from now is recommended) + * @type {number} + * @memberof RegisterSignerKeyReqBody + */ + 'deadline': number; + /** + * Url to redirect to after the signer is approved. **Note** : This should only be used when requesting a signer from a native mobile application. + * @type {string} + * @memberof RegisterSignerKeyReqBody + */ + 'redirect_url'?: string; + /** + * + * @type {SignedKeyRequestSponsor} + * @memberof RegisterSignerKeyReqBody + */ + 'sponsor'?: SignedKeyRequestSponsor; +} + diff --git a/src/neynar-api/v2/openapi-farcaster/models/register-user-req-body.ts b/src/neynar-api/v2/openapi-farcaster/models/register-user-req-body.ts new file mode 100644 index 00000000..63625979 --- /dev/null +++ b/src/neynar-api/v2/openapi-farcaster/models/register-user-req-body.ts @@ -0,0 +1,54 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Farcaster API V2 + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + + +/** + * + * @export + * @interface RegisterUserReqBody + */ +export interface RegisterUserReqBody { + /** + * + * @type {string} + * @memberof RegisterUserReqBody + */ + 'signature': string; + /** + * + * @type {number} + * @memberof RegisterUserReqBody + */ + 'fid': number; + /** + * + * @type {string} + * @memberof RegisterUserReqBody + */ + 'requested_user_custody_address': string; + /** + * + * @type {number} + * @memberof RegisterUserReqBody + */ + 'deadline': number; + /** + * + * @type {string} + * @memberof RegisterUserReqBody + */ + 'fname'?: string; +} + diff --git a/src/neynar-api/v2/openapi-farcaster/models/register-user-response.ts b/src/neynar-api/v2/openapi-farcaster/models/register-user-response.ts new file mode 100644 index 00000000..018834e9 --- /dev/null +++ b/src/neynar-api/v2/openapi-farcaster/models/register-user-response.ts @@ -0,0 +1,52 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Farcaster API V2 + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +// May contain unused imports in some cases +// @ts-ignore +import type { Signer } from './signer'; + +/** + * + * @export + * @interface RegisterUserResponse + */ +export interface RegisterUserResponse { + /** + * + * @type {boolean} + * @memberof RegisterUserResponse + */ + 'success': RegisterUserResponseSuccessEnum; + /** + * + * @type {string} + * @memberof RegisterUserResponse + */ + 'message': string; + /** + * + * @type {Signer} + * @memberof RegisterUserResponse + */ + 'signer': Signer; +} + +export const RegisterUserResponseSuccessEnum = { + True: true +} as const; + +export type RegisterUserResponseSuccessEnum = typeof RegisterUserResponseSuccessEnum[keyof typeof RegisterUserResponseSuccessEnum]; + + diff --git a/src/neynar-api/v2/openapi-farcaster/models/relevant-followers-response.ts b/src/neynar-api/v2/openapi-farcaster/models/relevant-followers-response.ts new file mode 100644 index 00000000..32529a76 --- /dev/null +++ b/src/neynar-api/v2/openapi-farcaster/models/relevant-followers-response.ts @@ -0,0 +1,42 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Farcaster API V2 + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +// May contain unused imports in some cases +// @ts-ignore +import type { DehydratedFollower } from './dehydrated-follower'; +// May contain unused imports in some cases +// @ts-ignore +import type { HydratedFollower } from './hydrated-follower'; + +/** + * + * @export + * @interface RelevantFollowersResponse + */ +export interface RelevantFollowersResponse { + /** + * + * @type {Array} + * @memberof RelevantFollowersResponse + */ + 'top_relevant_followers_hydrated': Array; + /** + * + * @type {Array} + * @memberof RelevantFollowersResponse + */ + 'all_relevant_followers_dehydrated': Array; +} + diff --git a/src/neynar-api/v2/openapi-farcaster/models/remove-channel-member-request.ts b/src/neynar-api/v2/openapi-farcaster/models/remove-channel-member-request.ts new file mode 100644 index 00000000..8e78ffba --- /dev/null +++ b/src/neynar-api/v2/openapi-farcaster/models/remove-channel-member-request.ts @@ -0,0 +1,53 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Farcaster API V2 + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +// May contain unused imports in some cases +// @ts-ignore +import type { ChannelMemberRole } from './channel-member-role'; + +/** + * + * @export + * @interface RemoveChannelMemberRequest + */ +export interface RemoveChannelMemberRequest { + /** + * UUID of the signer + * @type {string} + * @memberof RemoveChannelMemberRequest + */ + 'signer_uuid': string; + /** + * The unique identifier of a farcaster channel + * @type {string} + * @memberof RemoveChannelMemberRequest + */ + 'channel_id': string; + /** + * The unique identifier of a farcaster user (unsigned integer) + * @type {number} + * @memberof RemoveChannelMemberRequest + */ + 'fid': number; + /** + * + * @type {ChannelMemberRole} + * @memberof RemoveChannelMemberRequest + */ + 'role': ChannelMemberRole; +} + + + diff --git a/src/neynar-api/v2/openapi-farcaster/models/remove-verification-req-body.ts b/src/neynar-api/v2/openapi-farcaster/models/remove-verification-req-body.ts new file mode 100644 index 00000000..db1862f7 --- /dev/null +++ b/src/neynar-api/v2/openapi-farcaster/models/remove-verification-req-body.ts @@ -0,0 +1,36 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Farcaster API V2 + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + + +/** + * + * @export + * @interface RemoveVerificationReqBody + */ +export interface RemoveVerificationReqBody { + /** + * UUID of the signer + * @type {string} + * @memberof RemoveVerificationReqBody + */ + 'signer_uuid': string; + /** + * Ethereum address + * @type {string} + * @memberof RemoveVerificationReqBody + */ + 'address': string; +} + diff --git a/src/neynar-api/v2/openapi-farcaster/models/respond-channel-invite-request.ts b/src/neynar-api/v2/openapi-farcaster/models/respond-channel-invite-request.ts new file mode 100644 index 00000000..233080fa --- /dev/null +++ b/src/neynar-api/v2/openapi-farcaster/models/respond-channel-invite-request.ts @@ -0,0 +1,53 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Farcaster API V2 + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +// May contain unused imports in some cases +// @ts-ignore +import type { ChannelMemberRole } from './channel-member-role'; + +/** + * + * @export + * @interface RespondChannelInviteRequest + */ +export interface RespondChannelInviteRequest { + /** + * UUID of the signer + * @type {string} + * @memberof RespondChannelInviteRequest + */ + 'signer_uuid': string; + /** + * The unique identifier of a farcaster channel + * @type {string} + * @memberof RespondChannelInviteRequest + */ + 'channel_id': string; + /** + * + * @type {ChannelMemberRole} + * @memberof RespondChannelInviteRequest + */ + 'role': ChannelMemberRole; + /** + * Accept or reject the invite + * @type {boolean} + * @memberof RespondChannelInviteRequest + */ + 'accept': boolean; +} + + + diff --git a/src/neynar-api/v2/openapi-farcaster/models/searched-user.ts b/src/neynar-api/v2/openapi-farcaster/models/searched-user.ts new file mode 100644 index 00000000..a7c0bfb1 --- /dev/null +++ b/src/neynar-api/v2/openapi-farcaster/models/searched-user.ts @@ -0,0 +1,142 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Farcaster API V2 + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +// May contain unused imports in some cases +// @ts-ignore +import type { ProfileUrl } from './profile-url'; +// May contain unused imports in some cases +// @ts-ignore +import type { ProfileUrlPfp } from './profile-url-pfp'; +// May contain unused imports in some cases +// @ts-ignore +import type { User } from './user'; +// May contain unused imports in some cases +// @ts-ignore +import type { UserProfile } from './user-profile'; +// May contain unused imports in some cases +// @ts-ignore +import type { UserVerifiedAccountsInner } from './user-verified-accounts-inner'; +// May contain unused imports in some cases +// @ts-ignore +import type { UserVerifiedAddresses } from './user-verified-addresses'; +// May contain unused imports in some cases +// @ts-ignore +import type { UserViewerContext } from './user-viewer-context'; + +/** + * + * @export + * @interface SearchedUser + */ +export interface SearchedUser { + /** + * + * @type {string} + * @memberof SearchedUser + */ + 'object': SearchedUserObjectEnum; + /** + * The unique identifier of a farcaster user (unsigned integer) + * @type {number} + * @memberof SearchedUser + */ + 'fid': number; + /** + * + * @type {string} + * @memberof SearchedUser + */ + 'username': string; + /** + * + * @type {string} + * @memberof SearchedUser + */ + 'display_name'?: string; + /** + * Ethereum address + * @type {string} + * @memberof SearchedUser + */ + 'custody_address': string; + /** + * The URL of the user\'s profile picture + * @type {string} + * @memberof SearchedUser + */ + 'pfp_url'?: string; + /** + * + * @type {UserProfile} + * @memberof SearchedUser + */ + 'profile': UserProfile; + /** + * The number of followers the user has. + * @type {number} + * @memberof SearchedUser + */ + 'follower_count': number; + /** + * The number of users the user is following. + * @type {number} + * @memberof SearchedUser + */ + 'following_count': number; + /** + * + * @type {Array} + * @memberof SearchedUser + */ + 'verifications': Array; + /** + * + * @type {UserVerifiedAddresses} + * @memberof SearchedUser + */ + 'verified_addresses': UserVerifiedAddresses; + /** + * Verified accounts of the user on other platforms, currently only X is supported. + * @type {Array} + * @memberof SearchedUser + */ + 'verified_accounts': Array; + /** + * + * @type {boolean} + * @memberof SearchedUser + */ + 'power_badge': boolean; + /** + * + * @type {UserViewerContext} + * @memberof SearchedUser + */ + 'viewer_context'?: UserViewerContext; + /** + * + * @type {ProfileUrlPfp} + * @memberof SearchedUser + */ + 'pfp': ProfileUrlPfp; +} + +export const SearchedUserObjectEnum = { + User: 'user' +} as const; + +export type SearchedUserObjectEnum = typeof SearchedUserObjectEnum[keyof typeof SearchedUserObjectEnum]; + + diff --git a/src/neynar-api/v2/openapi-farcaster/models/signed-key-request-sponsor.ts b/src/neynar-api/v2/openapi-farcaster/models/signed-key-request-sponsor.ts new file mode 100644 index 00000000..2fc82d06 --- /dev/null +++ b/src/neynar-api/v2/openapi-farcaster/models/signed-key-request-sponsor.ts @@ -0,0 +1,42 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Farcaster API V2 + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + + +/** + * + * @export + * @interface SignedKeyRequestSponsor + */ +export interface SignedKeyRequestSponsor { + /** + * The unique identifier of a farcaster user (unsigned integer) + * @type {number} + * @memberof SignedKeyRequestSponsor + */ + 'fid'?: number; + /** + * Signature generated by the fid of the sponsor and the signature generated from signKeyRequest for the app. + * @type {string} + * @memberof SignedKeyRequestSponsor + */ + 'signature'?: string; + /** + * Neynar will sponsor the signer if set to true. **Note: ** If sponsor.fid and sponsor.signature are provided along with sponsored_by_neynar set to true, the sponsor.fid and sponsor.signature will be ignored. Neynar will sponsor the signer on behalf of the user. The developer will get charged in compute units. + * @type {boolean} + * @memberof SignedKeyRequestSponsor + */ + 'sponsored_by_neynar'?: boolean; +} + diff --git a/src/neynar-api/v2/openapi-farcaster/models/signer.ts b/src/neynar-api/v2/openapi-farcaster/models/signer.ts new file mode 100644 index 00000000..4495b929 --- /dev/null +++ b/src/neynar-api/v2/openapi-farcaster/models/signer.ts @@ -0,0 +1,64 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Farcaster API V2 + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + + +/** + * + * @export + * @interface Signer + */ +export interface Signer { + /** + * UUID of the signer + * @type {string} + * @memberof Signer + */ + 'signer_uuid': string; + /** + * Ed25519 public key + * @type {string} + * @memberof Signer + */ + 'public_key': string; + /** + * + * @type {string} + * @memberof Signer + */ + 'status': SignerStatusEnum; + /** + * + * @type {string} + * @memberof Signer + */ + 'signer_approval_url'?: string; + /** + * The unique identifier of a farcaster user (unsigned integer) + * @type {number} + * @memberof Signer + */ + 'fid'?: number; +} + +export const SignerStatusEnum = { + Generated: 'generated', + PendingApproval: 'pending_approval', + Approved: 'approved', + Revoked: 'revoked' +} as const; + +export type SignerStatusEnum = typeof SignerStatusEnum[keyof typeof SignerStatusEnum]; + + diff --git a/src/neynar-api/v2/openapi-farcaster/models/storage-allocation.ts b/src/neynar-api/v2/openapi-farcaster/models/storage-allocation.ts new file mode 100644 index 00000000..3e24ddcb --- /dev/null +++ b/src/neynar-api/v2/openapi-farcaster/models/storage-allocation.ts @@ -0,0 +1,57 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Farcaster API V2 + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +// May contain unused imports in some cases +// @ts-ignore +import type { UserDehydrated } from './user-dehydrated'; + +/** + * + * @export + * @interface StorageAllocation + */ +export interface StorageAllocation { + /** + * + * @type {string} + * @memberof StorageAllocation + */ + 'object'?: string; + /** + * + * @type {UserDehydrated} + * @memberof StorageAllocation + */ + 'user'?: UserDehydrated; + /** + * + * @type {number} + * @memberof StorageAllocation + */ + 'units'?: number; + /** + * + * @type {string} + * @memberof StorageAllocation + */ + 'expiry'?: string; + /** + * + * @type {string} + * @memberof StorageAllocation + */ + 'timestamp'?: string; +} + diff --git a/src/neynar-api/v2/openapi-farcaster/models/storage-allocations-response.ts b/src/neynar-api/v2/openapi-farcaster/models/storage-allocations-response.ts new file mode 100644 index 00000000..778f9533 --- /dev/null +++ b/src/neynar-api/v2/openapi-farcaster/models/storage-allocations-response.ts @@ -0,0 +1,39 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Farcaster API V2 + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +// May contain unused imports in some cases +// @ts-ignore +import type { StorageAllocation } from './storage-allocation'; + +/** + * + * @export + * @interface StorageAllocationsResponse + */ +export interface StorageAllocationsResponse { + /** + * + * @type {number} + * @memberof StorageAllocationsResponse + */ + 'total_active_units'?: number; + /** + * + * @type {Array} + * @memberof StorageAllocationsResponse + */ + 'allocations'?: Array; +} + diff --git a/src/neynar-api/v2/openapi-farcaster/models/storage-object.ts b/src/neynar-api/v2/openapi-farcaster/models/storage-object.ts new file mode 100644 index 00000000..da1c061c --- /dev/null +++ b/src/neynar-api/v2/openapi-farcaster/models/storage-object.ts @@ -0,0 +1,42 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Farcaster API V2 + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + + +/** + * + * @export + * @interface StorageObject + */ +export interface StorageObject { + /** + * + * @type {string} + * @memberof StorageObject + */ + 'object'?: string; + /** + * + * @type {number} + * @memberof StorageObject + */ + 'used'?: number; + /** + * + * @type {number} + * @memberof StorageObject + */ + 'capacity'?: number; +} + diff --git a/src/neynar-api/v2/openapi-farcaster/models/storage-usage-response.ts b/src/neynar-api/v2/openapi-farcaster/models/storage-usage-response.ts new file mode 100644 index 00000000..8e93c103 --- /dev/null +++ b/src/neynar-api/v2/openapi-farcaster/models/storage-usage-response.ts @@ -0,0 +1,84 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Farcaster API V2 + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +// May contain unused imports in some cases +// @ts-ignore +import type { StorageObject } from './storage-object'; +// May contain unused imports in some cases +// @ts-ignore +import type { UserDehydrated } from './user-dehydrated'; + +/** + * + * @export + * @interface StorageUsageResponse + */ +export interface StorageUsageResponse { + /** + * + * @type {string} + * @memberof StorageUsageResponse + */ + 'object'?: string; + /** + * + * @type {UserDehydrated} + * @memberof StorageUsageResponse + */ + 'user'?: UserDehydrated; + /** + * + * @type {StorageObject} + * @memberof StorageUsageResponse + */ + 'casts'?: StorageObject; + /** + * + * @type {StorageObject} + * @memberof StorageUsageResponse + */ + 'reactions'?: StorageObject; + /** + * + * @type {StorageObject} + * @memberof StorageUsageResponse + */ + 'links'?: StorageObject; + /** + * + * @type {StorageObject} + * @memberof StorageUsageResponse + */ + 'verified_addresses'?: StorageObject; + /** + * + * @type {StorageObject} + * @memberof StorageUsageResponse + */ + 'username_proofs'?: StorageObject; + /** + * + * @type {StorageObject} + * @memberof StorageUsageResponse + */ + 'signers'?: StorageObject; + /** + * + * @type {number} + * @memberof StorageUsageResponse + */ + 'total_active_units'?: number; +} + diff --git a/src/neynar-api/v2/openapi-farcaster/models/subscribed-to-all-of.ts b/src/neynar-api/v2/openapi-farcaster/models/subscribed-to-all-of.ts new file mode 100644 index 00000000..e0653d74 --- /dev/null +++ b/src/neynar-api/v2/openapi-farcaster/models/subscribed-to-all-of.ts @@ -0,0 +1,54 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Farcaster API V2 + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +// May contain unused imports in some cases +// @ts-ignore +import type { SubscriptionTier } from './subscription-tier'; +// May contain unused imports in some cases +// @ts-ignore +import type { User } from './user'; + +/** + * + * @export + * @interface SubscribedToAllOf + */ +export interface SubscribedToAllOf { + /** + * + * @type {string} + * @memberof SubscribedToAllOf + */ + 'expires_at': string; + /** + * + * @type {string} + * @memberof SubscribedToAllOf + */ + 'subscribed_at': string; + /** + * + * @type {SubscriptionTier} + * @memberof SubscribedToAllOf + */ + 'tier': SubscriptionTier; + /** + * + * @type {User} + * @memberof SubscribedToAllOf + */ + 'creator': User; +} + diff --git a/src/neynar-api/v2/openapi-farcaster/models/subscribed-to-object.ts b/src/neynar-api/v2/openapi-farcaster/models/subscribed-to-object.ts new file mode 100644 index 00000000..ea3c2ee6 --- /dev/null +++ b/src/neynar-api/v2/openapi-farcaster/models/subscribed-to-object.ts @@ -0,0 +1,72 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Farcaster API V2 + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + + +/** + * + * @export + * @interface SubscribedToObject + */ +export interface SubscribedToObject { + /** + * + * @type {string} + * @memberof SubscribedToObject + */ + 'object': string; + /** + * + * @type {string} + * @memberof SubscribedToObject + */ + 'provider_name': string; + /** + * + * @type {string} + * @memberof SubscribedToObject + */ + 'contract_address'?: string; + /** + * + * @type {number} + * @memberof SubscribedToObject + */ + 'protocol_version'?: number; + /** + * + * @type {number} + * @memberof SubscribedToObject + */ + 'chain'?: number; + /** + * + * @type {string} + * @memberof SubscribedToObject + */ + 'expires_at'?: string; + /** + * + * @type {string} + * @memberof SubscribedToObject + */ + 'subscribed_at'?: string; + /** + * + * @type {string} + * @memberof SubscribedToObject + */ + 'tier_id'?: string; +} + diff --git a/src/neynar-api/v2/openapi-farcaster/models/subscribed-to-response.ts b/src/neynar-api/v2/openapi-farcaster/models/subscribed-to-response.ts new file mode 100644 index 00000000..35a33b68 --- /dev/null +++ b/src/neynar-api/v2/openapi-farcaster/models/subscribed-to-response.ts @@ -0,0 +1,33 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Farcaster API V2 + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +// May contain unused imports in some cases +// @ts-ignore +import type { SubscribedTo } from './subscribed-to'; + +/** + * + * @export + * @interface SubscribedToResponse + */ +export interface SubscribedToResponse { + /** + * + * @type {Array} + * @memberof SubscribedToResponse + */ + 'subscribed_to'?: Array; +} + diff --git a/src/neynar-api/v2/openapi-farcaster/models/subscribed-to.ts b/src/neynar-api/v2/openapi-farcaster/models/subscribed-to.ts new file mode 100644 index 00000000..efb6bffd --- /dev/null +++ b/src/neynar-api/v2/openapi-farcaster/models/subscribed-to.ts @@ -0,0 +1,44 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Farcaster API V2 + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +// May contain unused imports in some cases +// @ts-ignore +import type { SubscribedToAllOf } from './subscribed-to-all-of'; +// May contain unused imports in some cases +// @ts-ignore +import type { Subscription } from './subscription'; +// May contain unused imports in some cases +// @ts-ignore +import type { SubscriptionMetadata } from './subscription-metadata'; +// May contain unused imports in some cases +// @ts-ignore +import type { SubscriptionPrice } from './subscription-price'; +// May contain unused imports in some cases +// @ts-ignore +import type { SubscriptionTier } from './subscription-tier'; +// May contain unused imports in some cases +// @ts-ignore +import type { SubscriptionToken } from './subscription-token'; +// May contain unused imports in some cases +// @ts-ignore +import type { User } from './user'; + +/** + * @type SubscribedTo + * @export + */ +export type SubscribedTo = SubscribedToAllOf & Subscription; + + diff --git a/src/neynar-api/v2/openapi-farcaster/models/subscriber.ts b/src/neynar-api/v2/openapi-farcaster/models/subscriber.ts new file mode 100644 index 00000000..a643fe4f --- /dev/null +++ b/src/neynar-api/v2/openapi-farcaster/models/subscriber.ts @@ -0,0 +1,48 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Farcaster API V2 + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +// May contain unused imports in some cases +// @ts-ignore +import type { SubscribedToObject } from './subscribed-to-object'; +// May contain unused imports in some cases +// @ts-ignore +import type { User } from './user'; + +/** + * + * @export + * @interface Subscriber + */ +export interface Subscriber { + /** + * + * @type {string} + * @memberof Subscriber + */ + 'object': string; + /** + * + * @type {User} + * @memberof Subscriber + */ + 'user': User; + /** + * + * @type {SubscribedToObject} + * @memberof Subscriber + */ + 'subscribed_to': SubscribedToObject; +} + diff --git a/src/neynar-api/v2/openapi-farcaster/models/subscribers-response.ts b/src/neynar-api/v2/openapi-farcaster/models/subscribers-response.ts new file mode 100644 index 00000000..7502756a --- /dev/null +++ b/src/neynar-api/v2/openapi-farcaster/models/subscribers-response.ts @@ -0,0 +1,33 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Farcaster API V2 + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +// May contain unused imports in some cases +// @ts-ignore +import type { Subscriber } from './subscriber'; + +/** + * + * @export + * @interface SubscribersResponse + */ +export interface SubscribersResponse { + /** + * + * @type {Array} + * @memberof SubscribersResponse + */ + 'subscribers'?: Array; +} + diff --git a/src/neynar-api/v2/openapi-farcaster/models/subscription-metadata.ts b/src/neynar-api/v2/openapi-farcaster/models/subscription-metadata.ts new file mode 100644 index 00000000..938f0861 --- /dev/null +++ b/src/neynar-api/v2/openapi-farcaster/models/subscription-metadata.ts @@ -0,0 +1,42 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Farcaster API V2 + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + + +/** + * + * @export + * @interface SubscriptionMetadata + */ +export interface SubscriptionMetadata { + /** + * + * @type {string} + * @memberof SubscriptionMetadata + */ + 'title': string; + /** + * + * @type {string} + * @memberof SubscriptionMetadata + */ + 'symbol': string; + /** + * + * @type {string} + * @memberof SubscriptionMetadata + */ + 'art_url': string; +} + diff --git a/src/neynar-api/v2/openapi-farcaster/models/subscription-price.ts b/src/neynar-api/v2/openapi-farcaster/models/subscription-price.ts new file mode 100644 index 00000000..ec2daf17 --- /dev/null +++ b/src/neynar-api/v2/openapi-farcaster/models/subscription-price.ts @@ -0,0 +1,42 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Farcaster API V2 + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + + +/** + * + * @export + * @interface SubscriptionPrice + */ +export interface SubscriptionPrice { + /** + * + * @type {number} + * @memberof SubscriptionPrice + */ + 'period_duration_seconds': number; + /** + * + * @type {string} + * @memberof SubscriptionPrice + */ + 'tokens_per_period': string; + /** + * + * @type {string} + * @memberof SubscriptionPrice + */ + 'initial_mint_price': string; +} + diff --git a/src/neynar-api/v2/openapi-farcaster/models/subscription-provider.ts b/src/neynar-api/v2/openapi-farcaster/models/subscription-provider.ts new file mode 100644 index 00000000..418d99ec --- /dev/null +++ b/src/neynar-api/v2/openapi-farcaster/models/subscription-provider.ts @@ -0,0 +1,30 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Farcaster API V2 + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + + +/** + * The provider of the subscription. + * @export + * @enum {string} + */ + +export const SubscriptionProvider = { + FabricStp: 'fabric_stp' +} as const; + +export type SubscriptionProvider = typeof SubscriptionProvider[keyof typeof SubscriptionProvider]; + + + diff --git a/src/neynar-api/v2/openapi-farcaster/models/subscription-providers.ts b/src/neynar-api/v2/openapi-farcaster/models/subscription-providers.ts new file mode 100644 index 00000000..1074099a --- /dev/null +++ b/src/neynar-api/v2/openapi-farcaster/models/subscription-providers.ts @@ -0,0 +1,31 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Farcaster API V2 + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + + +/** + * The provider of the subscription. + * @export + * @enum {string} + */ + +export const SubscriptionProviders = { + FabricStp: 'fabric_stp', + Paragraph: 'paragraph' +} as const; + +export type SubscriptionProviders = typeof SubscriptionProviders[keyof typeof SubscriptionProviders]; + + + diff --git a/src/neynar-api/v2/openapi-farcaster/models/subscription-status.ts b/src/neynar-api/v2/openapi-farcaster/models/subscription-status.ts new file mode 100644 index 00000000..5d8851c6 --- /dev/null +++ b/src/neynar-api/v2/openapi-farcaster/models/subscription-status.ts @@ -0,0 +1,64 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Farcaster API V2 + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +// May contain unused imports in some cases +// @ts-ignore +import type { SubscriptionTier } from './subscription-tier'; + +/** + * + * @export + * @interface SubscriptionStatus + */ +export interface SubscriptionStatus { + /** + * + * @type {string} + * @memberof SubscriptionStatus + */ + 'object': SubscriptionStatusObjectEnum; + /** + * + * @type {boolean} + * @memberof SubscriptionStatus + */ + 'status': boolean; + /** + * + * @type {number} + * @memberof SubscriptionStatus + */ + 'expires_at': number | null; + /** + * + * @type {number} + * @memberof SubscriptionStatus + */ + 'subscribed_at': number | null; + /** + * + * @type {SubscriptionTier} + * @memberof SubscriptionStatus + */ + 'tier': SubscriptionTier | null; +} + +export const SubscriptionStatusObjectEnum = { + SubscribedToDehydrated: 'subscribed_to_dehydrated' +} as const; + +export type SubscriptionStatusObjectEnum = typeof SubscriptionStatusObjectEnum[keyof typeof SubscriptionStatusObjectEnum]; + + diff --git a/src/neynar-api/v2/openapi-farcaster/models/subscription-tier-price.ts b/src/neynar-api/v2/openapi-farcaster/models/subscription-tier-price.ts new file mode 100644 index 00000000..d5ecf9ab --- /dev/null +++ b/src/neynar-api/v2/openapi-farcaster/models/subscription-tier-price.ts @@ -0,0 +1,42 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Farcaster API V2 + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + + +/** + * + * @export + * @interface SubscriptionTierPrice + */ +export interface SubscriptionTierPrice { + /** + * + * @type {number} + * @memberof SubscriptionTierPrice + */ + 'period_duration_seconds'?: number; + /** + * + * @type {string} + * @memberof SubscriptionTierPrice + */ + 'tokens_per_period'?: string; + /** + * + * @type {string} + * @memberof SubscriptionTierPrice + */ + 'initial_mint_price'?: string; +} + diff --git a/src/neynar-api/v2/openapi-farcaster/models/subscription-tier.ts b/src/neynar-api/v2/openapi-farcaster/models/subscription-tier.ts new file mode 100644 index 00000000..09b16641 --- /dev/null +++ b/src/neynar-api/v2/openapi-farcaster/models/subscription-tier.ts @@ -0,0 +1,39 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Farcaster API V2 + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +// May contain unused imports in some cases +// @ts-ignore +import type { SubscriptionTierPrice } from './subscription-tier-price'; + +/** + * + * @export + * @interface SubscriptionTier + */ +export interface SubscriptionTier { + /** + * + * @type {number} + * @memberof SubscriptionTier + */ + 'id'?: number; + /** + * + * @type {SubscriptionTierPrice} + * @memberof SubscriptionTier + */ + 'price'?: SubscriptionTierPrice; +} + diff --git a/src/neynar-api/v2/openapi-farcaster/models/subscription-token.ts b/src/neynar-api/v2/openapi-farcaster/models/subscription-token.ts new file mode 100644 index 00000000..e0f21120 --- /dev/null +++ b/src/neynar-api/v2/openapi-farcaster/models/subscription-token.ts @@ -0,0 +1,48 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Farcaster API V2 + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + + +/** + * + * @export + * @interface SubscriptionToken + */ +export interface SubscriptionToken { + /** + * + * @type {string} + * @memberof SubscriptionToken + */ + 'symbol': string; + /** + * + * @type {string} + * @memberof SubscriptionToken + */ + 'address': string | null; + /** + * + * @type {number} + * @memberof SubscriptionToken + */ + 'decimals': number; + /** + * + * @type {boolean} + * @memberof SubscriptionToken + */ + 'erc20': boolean; +} + diff --git a/src/neynar-api/v2/openapi-farcaster/models/subscription.ts b/src/neynar-api/v2/openapi-farcaster/models/subscription.ts new file mode 100644 index 00000000..e075a20d --- /dev/null +++ b/src/neynar-api/v2/openapi-farcaster/models/subscription.ts @@ -0,0 +1,96 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Farcaster API V2 + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +// May contain unused imports in some cases +// @ts-ignore +import type { SubscriptionMetadata } from './subscription-metadata'; +// May contain unused imports in some cases +// @ts-ignore +import type { SubscriptionPrice } from './subscription-price'; +// May contain unused imports in some cases +// @ts-ignore +import type { SubscriptionTier } from './subscription-tier'; +// May contain unused imports in some cases +// @ts-ignore +import type { SubscriptionToken } from './subscription-token'; + +/** + * + * @export + * @interface Subscription + */ +export interface Subscription { + /** + * + * @type {string} + * @memberof Subscription + */ + 'object': string; + /** + * + * @type {string} + * @memberof Subscription + */ + 'provider_name'?: string; + /** + * + * @type {string} + * @memberof Subscription + */ + 'contract_address': string; + /** + * + * @type {number} + * @memberof Subscription + */ + 'chain': number; + /** + * + * @type {SubscriptionMetadata} + * @memberof Subscription + */ + 'metadata': SubscriptionMetadata; + /** + * + * @type {string} + * @memberof Subscription + */ + 'owner_address': string; + /** + * + * @type {SubscriptionPrice} + * @memberof Subscription + */ + 'price': SubscriptionPrice; + /** + * + * @type {Array} + * @memberof Subscription + */ + 'tiers'?: Array; + /** + * + * @type {number} + * @memberof Subscription + */ + 'protocol_version': number; + /** + * + * @type {SubscriptionToken} + * @memberof Subscription + */ + 'token': SubscriptionToken; +} + diff --git a/src/neynar-api/v2/openapi-farcaster/models/subscriptions-response.ts b/src/neynar-api/v2/openapi-farcaster/models/subscriptions-response.ts new file mode 100644 index 00000000..b6846dab --- /dev/null +++ b/src/neynar-api/v2/openapi-farcaster/models/subscriptions-response.ts @@ -0,0 +1,33 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Farcaster API V2 + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +// May contain unused imports in some cases +// @ts-ignore +import type { Subscriptions } from './subscriptions'; + +/** + * + * @export + * @interface SubscriptionsResponse + */ +export interface SubscriptionsResponse { + /** + * + * @type {Array} + * @memberof SubscriptionsResponse + */ + 'subscriptions_created'?: Array; +} + diff --git a/src/neynar-api/v2/openapi-farcaster/models/subscriptions.ts b/src/neynar-api/v2/openapi-farcaster/models/subscriptions.ts new file mode 100644 index 00000000..66905623 --- /dev/null +++ b/src/neynar-api/v2/openapi-farcaster/models/subscriptions.ts @@ -0,0 +1,39 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Farcaster API V2 + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +// May contain unused imports in some cases +// @ts-ignore +import type { Subscription } from './subscription'; + +/** + * + * @export + * @interface Subscriptions + */ +export interface Subscriptions { + /** + * + * @type {string} + * @memberof Subscriptions + */ + 'object': string; + /** + * + * @type {Array} + * @memberof Subscriptions + */ + 'subscriptions_created': Array; +} + diff --git a/src/neynar-api/v2/openapi-farcaster/models/trending-channel-response.ts b/src/neynar-api/v2/openapi-farcaster/models/trending-channel-response.ts new file mode 100644 index 00000000..568f3899 --- /dev/null +++ b/src/neynar-api/v2/openapi-farcaster/models/trending-channel-response.ts @@ -0,0 +1,42 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Farcaster API V2 + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +// May contain unused imports in some cases +// @ts-ignore +import type { ChannelActivity } from './channel-activity'; +// May contain unused imports in some cases +// @ts-ignore +import type { NextCursor } from './next-cursor'; + +/** + * + * @export + * @interface TrendingChannelResponse + */ +export interface TrendingChannelResponse { + /** + * + * @type {Array} + * @memberof TrendingChannelResponse + */ + 'channels': Array; + /** + * + * @type {NextCursor} + * @memberof TrendingChannelResponse + */ + 'next': NextCursor; +} + diff --git a/src/neynar-api/v2/openapi-farcaster/models/update-user-req-body-location.ts b/src/neynar-api/v2/openapi-farcaster/models/update-user-req-body-location.ts new file mode 100644 index 00000000..53e52082 --- /dev/null +++ b/src/neynar-api/v2/openapi-farcaster/models/update-user-req-body-location.ts @@ -0,0 +1,36 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Farcaster API V2 + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + + +/** + * + * @export + * @interface UpdateUserReqBodyLocation + */ +export interface UpdateUserReqBodyLocation { + /** + * + * @type {number} + * @memberof UpdateUserReqBodyLocation + */ + 'latitude': number; + /** + * + * @type {number} + * @memberof UpdateUserReqBodyLocation + */ + 'longitude': number; +} + diff --git a/src/neynar-api/v2/openapi-farcaster/models/update-user-req-body.ts b/src/neynar-api/v2/openapi-farcaster/models/update-user-req-body.ts new file mode 100644 index 00000000..04ff3728 --- /dev/null +++ b/src/neynar-api/v2/openapi-farcaster/models/update-user-req-body.ts @@ -0,0 +1,69 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Farcaster API V2 + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +// May contain unused imports in some cases +// @ts-ignore +import type { UpdateUserReqBodyLocation } from './update-user-req-body-location'; + +/** + * + * @export + * @interface UpdateUserReqBody + */ +export interface UpdateUserReqBody { + /** + * UUID of the signer + * @type {string} + * @memberof UpdateUserReqBody + */ + 'signer_uuid': string; + /** + * + * @type {string} + * @memberof UpdateUserReqBody + */ + 'bio'?: string; + /** + * + * @type {string} + * @memberof UpdateUserReqBody + */ + 'pfp_url'?: string; + /** + * + * @type {string} + * @memberof UpdateUserReqBody + */ + 'url'?: string; + /** + * + * @type {string} + * @memberof UpdateUserReqBody + */ + 'username'?: string; + /** + * + * @type {string} + * @memberof UpdateUserReqBody + */ + 'display_name'?: string; + /** + * + * @type {UpdateUserReqBodyLocation} + * @memberof UpdateUserReqBody + */ + 'location'?: UpdateUserReqBodyLocation; +} + diff --git a/src/neynar-api/v2/openapi-farcaster/models/user-dehydrated.ts b/src/neynar-api/v2/openapi-farcaster/models/user-dehydrated.ts new file mode 100644 index 00000000..7aaaa2da --- /dev/null +++ b/src/neynar-api/v2/openapi-farcaster/models/user-dehydrated.ts @@ -0,0 +1,61 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Farcaster API V2 + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + + +/** + * + * @export + * @interface UserDehydrated + */ +export interface UserDehydrated { + /** + * + * @type {string} + * @memberof UserDehydrated + */ + 'object': UserDehydratedObjectEnum; + /** + * The unique identifier of a farcaster user (unsigned integer) + * @type {number} + * @memberof UserDehydrated + */ + 'fid': number; + /** + * + * @type {string} + * @memberof UserDehydrated + */ + 'username'?: string; + /** + * + * @type {string} + * @memberof UserDehydrated + */ + 'display_name'?: string; + /** + * + * @type {string} + * @memberof UserDehydrated + */ + 'pfp_url'?: string; +} + +export const UserDehydratedObjectEnum = { + UserDehydrated: 'user_dehydrated' +} as const; + +export type UserDehydratedObjectEnum = typeof UserDehydratedObjectEnum[keyof typeof UserDehydratedObjectEnum]; + + diff --git a/src/neynar-api/v2/openapi-farcaster/models/user-fidresponse.ts b/src/neynar-api/v2/openapi-farcaster/models/user-fidresponse.ts new file mode 100644 index 00000000..523fbf58 --- /dev/null +++ b/src/neynar-api/v2/openapi-farcaster/models/user-fidresponse.ts @@ -0,0 +1,30 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Farcaster API V2 + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + + +/** + * + * @export + * @interface UserFIDResponse + */ +export interface UserFIDResponse { + /** + * + * @type {number} + * @memberof UserFIDResponse + */ + 'fid': number; +} + diff --git a/src/neynar-api/v2/openapi-farcaster/models/user-power-lite-response-result.ts b/src/neynar-api/v2/openapi-farcaster/models/user-power-lite-response-result.ts new file mode 100644 index 00000000..35e80758 --- /dev/null +++ b/src/neynar-api/v2/openapi-farcaster/models/user-power-lite-response-result.ts @@ -0,0 +1,30 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Farcaster API V2 + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + + +/** + * + * @export + * @interface UserPowerLiteResponseResult + */ +export interface UserPowerLiteResponseResult { + /** + * List of FIDs + * @type {Array} + * @memberof UserPowerLiteResponseResult + */ + 'fids': Array; +} + diff --git a/src/neynar-api/v2/openapi-farcaster/models/user-power-lite-response.ts b/src/neynar-api/v2/openapi-farcaster/models/user-power-lite-response.ts new file mode 100644 index 00000000..ea67270d --- /dev/null +++ b/src/neynar-api/v2/openapi-farcaster/models/user-power-lite-response.ts @@ -0,0 +1,33 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Farcaster API V2 + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +// May contain unused imports in some cases +// @ts-ignore +import type { UserPowerLiteResponseResult } from './user-power-lite-response-result'; + +/** + * + * @export + * @interface UserPowerLiteResponse + */ +export interface UserPowerLiteResponse { + /** + * + * @type {UserPowerLiteResponseResult} + * @memberof UserPowerLiteResponse + */ + 'result': UserPowerLiteResponseResult; +} + diff --git a/src/neynar-api/v2/openapi-farcaster/models/user-profile-bio.ts b/src/neynar-api/v2/openapi-farcaster/models/user-profile-bio.ts new file mode 100644 index 00000000..ba4b0901 --- /dev/null +++ b/src/neynar-api/v2/openapi-farcaster/models/user-profile-bio.ts @@ -0,0 +1,36 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Farcaster API V2 + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + + +/** + * + * @export + * @interface UserProfileBio + */ +export interface UserProfileBio { + /** + * + * @type {string} + * @memberof UserProfileBio + */ + 'text': string; + /** + * + * @type {Array} + * @memberof UserProfileBio + */ + 'mentioned_profiles': Array; +} + diff --git a/src/neynar-api/v2/openapi-farcaster/models/user-profile.ts b/src/neynar-api/v2/openapi-farcaster/models/user-profile.ts new file mode 100644 index 00000000..995e3bd4 --- /dev/null +++ b/src/neynar-api/v2/openapi-farcaster/models/user-profile.ts @@ -0,0 +1,42 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Farcaster API V2 + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +// May contain unused imports in some cases +// @ts-ignore +import type { Location } from './location'; +// May contain unused imports in some cases +// @ts-ignore +import type { UserProfileBio } from './user-profile-bio'; + +/** + * + * @export + * @interface UserProfile + */ +export interface UserProfile { + /** + * + * @type {UserProfileBio} + * @memberof UserProfile + */ + 'bio': UserProfileBio; + /** + * + * @type {Location} + * @memberof UserProfile + */ + 'location'?: Location; +} + diff --git a/src/neynar-api/v2/openapi-farcaster/models/user-response.ts b/src/neynar-api/v2/openapi-farcaster/models/user-response.ts new file mode 100644 index 00000000..6e673c2b --- /dev/null +++ b/src/neynar-api/v2/openapi-farcaster/models/user-response.ts @@ -0,0 +1,33 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Farcaster API V2 + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +// May contain unused imports in some cases +// @ts-ignore +import type { User } from './user'; + +/** + * + * @export + * @interface UserResponse + */ +export interface UserResponse { + /** + * + * @type {User} + * @memberof UserResponse + */ + 'user': User; +} + diff --git a/src/neynar-api/v2/openapi-farcaster/models/user-search-response-result.ts b/src/neynar-api/v2/openapi-farcaster/models/user-search-response-result.ts new file mode 100644 index 00000000..3428bb0b --- /dev/null +++ b/src/neynar-api/v2/openapi-farcaster/models/user-search-response-result.ts @@ -0,0 +1,42 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Farcaster API V2 + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +// May contain unused imports in some cases +// @ts-ignore +import type { NextCursor } from './next-cursor'; +// May contain unused imports in some cases +// @ts-ignore +import type { SearchedUser } from './searched-user'; + +/** + * + * @export + * @interface UserSearchResponseResult + */ +export interface UserSearchResponseResult { + /** + * + * @type {Array} + * @memberof UserSearchResponseResult + */ + 'users': Array; + /** + * + * @type {NextCursor} + * @memberof UserSearchResponseResult + */ + 'next'?: NextCursor; +} + diff --git a/src/neynar-api/v2/openapi-farcaster/models/user-search-response.ts b/src/neynar-api/v2/openapi-farcaster/models/user-search-response.ts new file mode 100644 index 00000000..60abef90 --- /dev/null +++ b/src/neynar-api/v2/openapi-farcaster/models/user-search-response.ts @@ -0,0 +1,33 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Farcaster API V2 + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +// May contain unused imports in some cases +// @ts-ignore +import type { UserSearchResponseResult } from './user-search-response-result'; + +/** + * + * @export + * @interface UserSearchResponse + */ +export interface UserSearchResponse { + /** + * + * @type {UserSearchResponseResult} + * @memberof UserSearchResponse + */ + 'result': UserSearchResponseResult; +} + diff --git a/src/neynar-api/v2/openapi-farcaster/models/user-verified-accounts-inner.ts b/src/neynar-api/v2/openapi-farcaster/models/user-verified-accounts-inner.ts new file mode 100644 index 00000000..dc7b047b --- /dev/null +++ b/src/neynar-api/v2/openapi-farcaster/models/user-verified-accounts-inner.ts @@ -0,0 +1,43 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Farcaster API V2 + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + + +/** + * + * @export + * @interface UserVerifiedAccountsInner + */ +export interface UserVerifiedAccountsInner { + /** + * + * @type {string} + * @memberof UserVerifiedAccountsInner + */ + 'platform'?: UserVerifiedAccountsInnerPlatformEnum; + /** + * + * @type {string} + * @memberof UserVerifiedAccountsInner + */ + 'username'?: string; +} + +export const UserVerifiedAccountsInnerPlatformEnum = { + X: 'x' +} as const; + +export type UserVerifiedAccountsInnerPlatformEnum = typeof UserVerifiedAccountsInnerPlatformEnum[keyof typeof UserVerifiedAccountsInnerPlatformEnum]; + + diff --git a/src/neynar-api/v2/openapi-farcaster/models/user-verified-addresses.ts b/src/neynar-api/v2/openapi-farcaster/models/user-verified-addresses.ts new file mode 100644 index 00000000..231e1877 --- /dev/null +++ b/src/neynar-api/v2/openapi-farcaster/models/user-verified-addresses.ts @@ -0,0 +1,36 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Farcaster API V2 + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + + +/** + * + * @export + * @interface UserVerifiedAddresses + */ +export interface UserVerifiedAddresses { + /** + * + * @type {Array} + * @memberof UserVerifiedAddresses + */ + 'eth_addresses': Array; + /** + * + * @type {Array} + * @memberof UserVerifiedAddresses + */ + 'sol_addresses': Array; +} + diff --git a/src/neynar-api/v2/openapi-farcaster/models/user-viewer-context.ts b/src/neynar-api/v2/openapi-farcaster/models/user-viewer-context.ts new file mode 100644 index 00000000..049becd0 --- /dev/null +++ b/src/neynar-api/v2/openapi-farcaster/models/user-viewer-context.ts @@ -0,0 +1,48 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Farcaster API V2 + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + + +/** + * Adds context on the viewer\'s follow relationship with the user. + * @export + * @interface UserViewerContext + */ +export interface UserViewerContext { + /** + * Indicates if the viewer is following the user. + * @type {boolean} + * @memberof UserViewerContext + */ + 'following': boolean; + /** + * Indicates if the viewer is followed by the user. + * @type {boolean} + * @memberof UserViewerContext + */ + 'followed_by': boolean; + /** + * Indicates if the viewer is blocking the user. + * @type {boolean} + * @memberof UserViewerContext + */ + 'blocking': boolean; + /** + * Indicates if the viewer is blocked by the user. + * @type {boolean} + * @memberof UserViewerContext + */ + 'blocked_by': boolean; +} + diff --git a/src/neynar-api/v2/openapi-farcaster/models/user.ts b/src/neynar-api/v2/openapi-farcaster/models/user.ts new file mode 100644 index 00000000..a075c5ad --- /dev/null +++ b/src/neynar-api/v2/openapi-farcaster/models/user.ts @@ -0,0 +1,127 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Farcaster API V2 + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +// May contain unused imports in some cases +// @ts-ignore +import type { UserProfile } from './user-profile'; +// May contain unused imports in some cases +// @ts-ignore +import type { UserVerifiedAccountsInner } from './user-verified-accounts-inner'; +// May contain unused imports in some cases +// @ts-ignore +import type { UserVerifiedAddresses } from './user-verified-addresses'; +// May contain unused imports in some cases +// @ts-ignore +import type { UserViewerContext } from './user-viewer-context'; + +/** + * + * @export + * @interface User + */ +export interface User { + /** + * + * @type {string} + * @memberof User + */ + 'object': UserObjectEnum; + /** + * The unique identifier of a farcaster user (unsigned integer) + * @type {number} + * @memberof User + */ + 'fid': number; + /** + * + * @type {string} + * @memberof User + */ + 'username': string; + /** + * + * @type {string} + * @memberof User + */ + 'display_name'?: string; + /** + * Ethereum address + * @type {string} + * @memberof User + */ + 'custody_address': string; + /** + * The URL of the user\'s profile picture + * @type {string} + * @memberof User + */ + 'pfp_url'?: string; + /** + * + * @type {UserProfile} + * @memberof User + */ + 'profile': UserProfile; + /** + * The number of followers the user has. + * @type {number} + * @memberof User + */ + 'follower_count': number; + /** + * The number of users the user is following. + * @type {number} + * @memberof User + */ + 'following_count': number; + /** + * + * @type {Array} + * @memberof User + */ + 'verifications': Array; + /** + * + * @type {UserVerifiedAddresses} + * @memberof User + */ + 'verified_addresses': UserVerifiedAddresses; + /** + * Verified accounts of the user on other platforms, currently only X is supported. + * @type {Array} + * @memberof User + */ + 'verified_accounts': Array; + /** + * + * @type {boolean} + * @memberof User + */ + 'power_badge': boolean; + /** + * + * @type {UserViewerContext} + * @memberof User + */ + 'viewer_context'?: UserViewerContext; +} + +export const UserObjectEnum = { + User: 'user' +} as const; + +export type UserObjectEnum = typeof UserObjectEnum[keyof typeof UserObjectEnum]; + + diff --git a/src/neynar-api/v2/openapi-farcaster/models/users-active-channels-response.ts b/src/neynar-api/v2/openapi-farcaster/models/users-active-channels-response.ts new file mode 100644 index 00000000..d88d1cad --- /dev/null +++ b/src/neynar-api/v2/openapi-farcaster/models/users-active-channels-response.ts @@ -0,0 +1,42 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Farcaster API V2 + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +// May contain unused imports in some cases +// @ts-ignore +import type { Channel } from './channel'; +// May contain unused imports in some cases +// @ts-ignore +import type { NextCursor } from './next-cursor'; + +/** + * + * @export + * @interface UsersActiveChannelsResponse + */ +export interface UsersActiveChannelsResponse { + /** + * + * @type {Array} + * @memberof UsersActiveChannelsResponse + */ + 'channels'?: Array; + /** + * + * @type {NextCursor} + * @memberof UsersActiveChannelsResponse + */ + 'next'?: NextCursor; +} + diff --git a/src/neynar-api/v2/openapi-farcaster/models/users-response.ts b/src/neynar-api/v2/openapi-farcaster/models/users-response.ts new file mode 100644 index 00000000..b2940a1b --- /dev/null +++ b/src/neynar-api/v2/openapi-farcaster/models/users-response.ts @@ -0,0 +1,42 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Farcaster API V2 + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +// May contain unused imports in some cases +// @ts-ignore +import type { NextCursor } from './next-cursor'; +// May contain unused imports in some cases +// @ts-ignore +import type { User } from './user'; + +/** + * + * @export + * @interface UsersResponse + */ +export interface UsersResponse { + /** + * + * @type {Array} + * @memberof UsersResponse + */ + 'users': Array; + /** + * + * @type {NextCursor} + * @memberof UsersResponse + */ + 'next': NextCursor; +} + diff --git a/src/neynar-api/v2/openapi-farcaster/models/validate-frame-action-response.ts b/src/neynar-api/v2/openapi-farcaster/models/validate-frame-action-response.ts new file mode 100644 index 00000000..0f242cd0 --- /dev/null +++ b/src/neynar-api/v2/openapi-farcaster/models/validate-frame-action-response.ts @@ -0,0 +1,39 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Farcaster API V2 + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +// May contain unused imports in some cases +// @ts-ignore +import type { ValidatedFrameAction } from './validated-frame-action'; + +/** + * + * @export + * @interface ValidateFrameActionResponse + */ +export interface ValidateFrameActionResponse { + /** + * + * @type {boolean} + * @memberof ValidateFrameActionResponse + */ + 'valid': boolean; + /** + * + * @type {ValidatedFrameAction} + * @memberof ValidateFrameActionResponse + */ + 'action': ValidatedFrameAction; +} + diff --git a/src/neynar-api/v2/openapi-farcaster/models/validate-frame-analytics-type.ts b/src/neynar-api/v2/openapi-farcaster/models/validate-frame-analytics-type.ts new file mode 100644 index 00000000..1e0381cd --- /dev/null +++ b/src/neynar-api/v2/openapi-farcaster/models/validate-frame-analytics-type.ts @@ -0,0 +1,33 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Farcaster API V2 + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + + +/** + * + * @export + * @enum {string} + */ + +export const ValidateFrameAnalyticsType = { + TotalInteractors: 'total-interactors', + Interactors: 'interactors', + InteractionsPerCast: 'interactions-per-cast', + InputText: 'input-text' +} as const; + +export type ValidateFrameAnalyticsType = typeof ValidateFrameAnalyticsType[keyof typeof ValidateFrameAnalyticsType]; + + + diff --git a/src/neynar-api/v2/openapi-farcaster/models/validate-frame-request.ts b/src/neynar-api/v2/openapi-farcaster/models/validate-frame-request.ts new file mode 100644 index 00000000..cd4504bf --- /dev/null +++ b/src/neynar-api/v2/openapi-farcaster/models/validate-frame-request.ts @@ -0,0 +1,54 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Farcaster API V2 + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + + +/** + * + * @export + * @interface ValidateFrameRequest + */ +export interface ValidateFrameRequest { + /** + * Hexadecimal string of message bytes. + * @type {string} + * @memberof ValidateFrameRequest + */ + 'message_bytes_in_hex': string; + /** + * Adds viewer_context inside the cast object to indicate whether the interactor reacted to the cast housing the frame. + * @type {boolean} + * @memberof ValidateFrameRequest + */ + 'cast_reaction_context'?: boolean; + /** + * Adds viewer_context inside the user (interactor) object to indicate whether the interactor follows or is followed by the cast author. + * @type {boolean} + * @memberof ValidateFrameRequest + */ + 'follow_context'?: boolean; + /** + * Adds context about the app used by the user inside `frame.action`. + * @type {boolean} + * @memberof ValidateFrameRequest + */ + 'signer_context'?: boolean; + /** + * Adds context about the channel that the cast belongs to inside of the cast object. + * @type {boolean} + * @memberof ValidateFrameRequest + */ + 'channel_follow_context'?: boolean; +} + diff --git a/src/neynar-api/v2/openapi-farcaster/models/validated-frame-action-signer.ts b/src/neynar-api/v2/openapi-farcaster/models/validated-frame-action-signer.ts new file mode 100644 index 00000000..c86ccc40 --- /dev/null +++ b/src/neynar-api/v2/openapi-farcaster/models/validated-frame-action-signer.ts @@ -0,0 +1,33 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Farcaster API V2 + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +// May contain unused imports in some cases +// @ts-ignore +import type { User } from './user'; + +/** + * + * @export + * @interface ValidatedFrameActionSigner + */ +export interface ValidatedFrameActionSigner { + /** + * + * @type {User} + * @memberof ValidatedFrameActionSigner + */ + 'client'?: User; +} + diff --git a/src/neynar-api/v2/openapi-farcaster/models/validated-frame-action-tapped-button.ts b/src/neynar-api/v2/openapi-farcaster/models/validated-frame-action-tapped-button.ts new file mode 100644 index 00000000..fe41186e --- /dev/null +++ b/src/neynar-api/v2/openapi-farcaster/models/validated-frame-action-tapped-button.ts @@ -0,0 +1,30 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Farcaster API V2 + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + + +/** + * + * @export + * @interface ValidatedFrameActionTappedButton + */ +export interface ValidatedFrameActionTappedButton { + /** + * + * @type {number} + * @memberof ValidatedFrameActionTappedButton + */ + 'index': number; +} + diff --git a/src/neynar-api/v2/openapi-farcaster/models/validated-frame-action.ts b/src/neynar-api/v2/openapi-farcaster/models/validated-frame-action.ts new file mode 100644 index 00000000..4503e334 --- /dev/null +++ b/src/neynar-api/v2/openapi-farcaster/models/validated-frame-action.ts @@ -0,0 +1,118 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Farcaster API V2 + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +// May contain unused imports in some cases +// @ts-ignore +import type { CastWithInteractions } from './cast-with-interactions'; +// May contain unused imports in some cases +// @ts-ignore +import type { FrameInput } from './frame-input'; +// May contain unused imports in some cases +// @ts-ignore +import type { FrameState } from './frame-state'; +// May contain unused imports in some cases +// @ts-ignore +import type { FrameTransaction } from './frame-transaction'; +// May contain unused imports in some cases +// @ts-ignore +import type { User } from './user'; +// May contain unused imports in some cases +// @ts-ignore +import type { ValidatedFrameActionSigner } from './validated-frame-action-signer'; +// May contain unused imports in some cases +// @ts-ignore +import type { ValidatedFrameActionTappedButton } from './validated-frame-action-tapped-button'; + +/** + * + * @export + * @interface ValidatedFrameAction + */ +export interface ValidatedFrameAction { + /** + * + * @type {string} + * @memberof ValidatedFrameAction + */ + 'object': ValidatedFrameActionObjectEnum; + /** + * + * @type {string} + * @memberof ValidatedFrameAction + */ + 'url': string; + /** + * + * @type {User} + * @memberof ValidatedFrameAction + */ + 'interactor': User; + /** + * + * @type {ValidatedFrameActionTappedButton} + * @memberof ValidatedFrameAction + */ + 'tapped_button': ValidatedFrameActionTappedButton; + /** + * + * @type {FrameInput} + * @memberof ValidatedFrameAction + */ + 'input'?: FrameInput; + /** + * + * @type {FrameState} + * @memberof ValidatedFrameAction + */ + 'state': FrameState; + /** + * + * @type {CastWithInteractions} + * @memberof ValidatedFrameAction + */ + 'cast': CastWithInteractions; + /** + * + * @type {string} + * @memberof ValidatedFrameAction + */ + 'timestamp': string; + /** + * + * @type {ValidatedFrameActionSigner} + * @memberof ValidatedFrameAction + */ + 'signer'?: ValidatedFrameActionSigner; + /** + * + * @type {FrameTransaction} + * @memberof ValidatedFrameAction + */ + 'transaction'?: FrameTransaction; + /** + * The connected wallet address of the interacting user. + * @type {string} + * @memberof ValidatedFrameAction + */ + 'address'?: string; +} + +export const ValidatedFrameActionObjectEnum = { + ValidatedFrameAction: 'validated_frame_action' +} as const; + +export type ValidatedFrameActionObjectEnum = typeof ValidatedFrameActionObjectEnum[keyof typeof ValidatedFrameActionObjectEnum]; + + diff --git a/src/neynar-api/v2/openapi-farcaster/models/verification-chain-id.ts b/src/neynar-api/v2/openapi-farcaster/models/verification-chain-id.ts new file mode 100644 index 00000000..47d4d0b3 --- /dev/null +++ b/src/neynar-api/v2/openapi-farcaster/models/verification-chain-id.ts @@ -0,0 +1,32 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Farcaster API V2 + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + + +/** + * Chain ID for farcaster verifications. 0 for EOA verifications, 1 or 10 for contract verifications + * @export + * @enum {number} + */ + +export const VerificationChainId = { + NUMBER_0: 0, + NUMBER_1: 1, + NUMBER_10: 10 +} as const; + +export type VerificationChainId = typeof VerificationChainId[keyof typeof VerificationChainId]; + + + diff --git a/src/neynar-api/v2/openapi-farcaster/models/verification-type.ts b/src/neynar-api/v2/openapi-farcaster/models/verification-type.ts new file mode 100644 index 00000000..f0366b6c --- /dev/null +++ b/src/neynar-api/v2/openapi-farcaster/models/verification-type.ts @@ -0,0 +1,31 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Farcaster API V2 + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + + +/** + * Type of verification. 0 = EOA, 1 = contract + * @export + * @enum {number} + */ + +export const VerificationType = { + NUMBER_0: 0, + NUMBER_1: 1 +} as const; + +export type VerificationType = typeof VerificationType[keyof typeof VerificationType]; + + + diff --git a/src/neynar-api/v2/openapi-farcaster/models/video-object.ts b/src/neynar-api/v2/openapi-farcaster/models/video-object.ts new file mode 100644 index 00000000..5f6364c7 --- /dev/null +++ b/src/neynar-api/v2/openapi-farcaster/models/video-object.ts @@ -0,0 +1,48 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Farcaster API V2 + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + + +/** + * + * @export + * @interface VideoObject + */ +export interface VideoObject { + /** + * + * @type {string} + * @memberof VideoObject + */ + 'height'?: string; + /** + * + * @type {string} + * @memberof VideoObject + */ + 'type'?: string; + /** + * + * @type {string} + * @memberof VideoObject + */ + 'url': string; + /** + * + * @type {string} + * @memberof VideoObject + */ + 'width'?: string; +} + diff --git a/src/neynar-api/v2/openapi-farcaster/models/webhook-delete-req-body.ts b/src/neynar-api/v2/openapi-farcaster/models/webhook-delete-req-body.ts new file mode 100644 index 00000000..2ec9e3bf --- /dev/null +++ b/src/neynar-api/v2/openapi-farcaster/models/webhook-delete-req-body.ts @@ -0,0 +1,30 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Farcaster API V2 + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + + +/** + * + * @export + * @interface WebhookDeleteReqBody + */ +export interface WebhookDeleteReqBody { + /** + * + * @type {string} + * @memberof WebhookDeleteReqBody + */ + 'webhook_id': string; +} + diff --git a/src/neynar-api/v2/openapi-farcaster/models/webhook-list-response.ts b/src/neynar-api/v2/openapi-farcaster/models/webhook-list-response.ts new file mode 100644 index 00000000..97e99628 --- /dev/null +++ b/src/neynar-api/v2/openapi-farcaster/models/webhook-list-response.ts @@ -0,0 +1,33 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Farcaster API V2 + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +// May contain unused imports in some cases +// @ts-ignore +import type { Webhook } from './webhook'; + +/** + * + * @export + * @interface WebhookListResponse + */ +export interface WebhookListResponse { + /** + * + * @type {Array} + * @memberof WebhookListResponse + */ + 'webhooks': Array; +} + diff --git a/src/neynar-api/v2/openapi-farcaster/models/webhook-patch-req-body.ts b/src/neynar-api/v2/openapi-farcaster/models/webhook-patch-req-body.ts new file mode 100644 index 00000000..abbdd491 --- /dev/null +++ b/src/neynar-api/v2/openapi-farcaster/models/webhook-patch-req-body.ts @@ -0,0 +1,44 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Farcaster API V2 + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + + +/** + * + * @export + * @interface WebhookPatchReqBody + */ +export interface WebhookPatchReqBody { + /** + * + * @type {string} + * @memberof WebhookPatchReqBody + */ + 'webhook_id': string; + /** + * + * @type {string} + * @memberof WebhookPatchReqBody + */ + 'active': WebhookPatchReqBodyActiveEnum; +} + +export const WebhookPatchReqBodyActiveEnum = { + True: 'true', + False: 'false' +} as const; + +export type WebhookPatchReqBodyActiveEnum = typeof WebhookPatchReqBodyActiveEnum[keyof typeof WebhookPatchReqBodyActiveEnum]; + + diff --git a/src/neynar-api/v2/openapi-farcaster/models/webhook-post-req-body.ts b/src/neynar-api/v2/openapi-farcaster/models/webhook-post-req-body.ts new file mode 100644 index 00000000..99908b8f --- /dev/null +++ b/src/neynar-api/v2/openapi-farcaster/models/webhook-post-req-body.ts @@ -0,0 +1,45 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Farcaster API V2 + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +// May contain unused imports in some cases +// @ts-ignore +import type { WebhookSubscriptionFilters } from './webhook-subscription-filters'; + +/** + * + * @export + * @interface WebhookPostReqBody + */ +export interface WebhookPostReqBody { + /** + * + * @type {string} + * @memberof WebhookPostReqBody + */ + 'name': string; + /** + * + * @type {string} + * @memberof WebhookPostReqBody + */ + 'url': string; + /** + * + * @type {WebhookSubscriptionFilters} + * @memberof WebhookPostReqBody + */ + 'subscription'?: WebhookSubscriptionFilters; +} + diff --git a/src/neynar-api/v2/openapi-farcaster/models/webhook-put-req-body-all-of.ts b/src/neynar-api/v2/openapi-farcaster/models/webhook-put-req-body-all-of.ts new file mode 100644 index 00000000..e13141df --- /dev/null +++ b/src/neynar-api/v2/openapi-farcaster/models/webhook-put-req-body-all-of.ts @@ -0,0 +1,30 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Farcaster API V2 + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + + +/** + * + * @export + * @interface WebhookPutReqBodyAllOf + */ +export interface WebhookPutReqBodyAllOf { + /** + * + * @type {string} + * @memberof WebhookPutReqBodyAllOf + */ + 'webhook_id': string; +} + diff --git a/src/neynar-api/v2/openapi-farcaster/models/webhook-put-req-body.ts b/src/neynar-api/v2/openapi-farcaster/models/webhook-put-req-body.ts new file mode 100644 index 00000000..c00c5045 --- /dev/null +++ b/src/neynar-api/v2/openapi-farcaster/models/webhook-put-req-body.ts @@ -0,0 +1,32 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Farcaster API V2 + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +// May contain unused imports in some cases +// @ts-ignore +import type { WebhookPostReqBody } from './webhook-post-req-body'; +// May contain unused imports in some cases +// @ts-ignore +import type { WebhookPutReqBodyAllOf } from './webhook-put-req-body-all-of'; +// May contain unused imports in some cases +// @ts-ignore +import type { WebhookSubscriptionFilters } from './webhook-subscription-filters'; + +/** + * @type WebhookPutReqBody + * @export + */ +export type WebhookPutReqBody = WebhookPostReqBody & WebhookPutReqBodyAllOf; + + diff --git a/src/neynar-api/v2/openapi-farcaster/models/webhook-response.ts b/src/neynar-api/v2/openapi-farcaster/models/webhook-response.ts new file mode 100644 index 00000000..afa2ba7c --- /dev/null +++ b/src/neynar-api/v2/openapi-farcaster/models/webhook-response.ts @@ -0,0 +1,45 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Farcaster API V2 + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +// May contain unused imports in some cases +// @ts-ignore +import type { Webhook } from './webhook'; + +/** + * + * @export + * @interface WebhookResponse + */ +export interface WebhookResponse { + /** + * + * @type {string} + * @memberof WebhookResponse + */ + 'message'?: string; + /** + * + * @type {boolean} + * @memberof WebhookResponse + */ + 'success'?: boolean; + /** + * + * @type {Webhook} + * @memberof WebhookResponse + */ + 'webhook'?: Webhook; +} + diff --git a/src/neynar-api/v2/openapi-farcaster/models/webhook-secret.ts b/src/neynar-api/v2/openapi-farcaster/models/webhook-secret.ts new file mode 100644 index 00000000..2eccd1cf --- /dev/null +++ b/src/neynar-api/v2/openapi-farcaster/models/webhook-secret.ts @@ -0,0 +1,60 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Farcaster API V2 + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + + +/** + * + * @export + * @interface WebhookSecret + */ +export interface WebhookSecret { + /** + * + * @type {string} + * @memberof WebhookSecret + */ + 'uid': string; + /** + * + * @type {string} + * @memberof WebhookSecret + */ + 'value': string; + /** + * + * @type {string} + * @memberof WebhookSecret + */ + 'expires_at': string; + /** + * + * @type {string} + * @memberof WebhookSecret + */ + 'created_at': string; + /** + * + * @type {string} + * @memberof WebhookSecret + */ + 'updated_at': string; + /** + * + * @type {string} + * @memberof WebhookSecret + */ + 'deleted_at': string; +} + diff --git a/src/neynar-api/v2/openapi-farcaster/models/webhook-subscription-filters-cast.ts b/src/neynar-api/v2/openapi-farcaster/models/webhook-subscription-filters-cast.ts new file mode 100644 index 00000000..21d45eeb --- /dev/null +++ b/src/neynar-api/v2/openapi-farcaster/models/webhook-subscription-filters-cast.ts @@ -0,0 +1,78 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Farcaster API V2 + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + + +/** + * + * @export + * @interface WebhookSubscriptionFiltersCast + */ +export interface WebhookSubscriptionFiltersCast { + /** + * Exclude casts that matches these authors. **Note:** This is applied as an AND operation against rest of the filters. Rest of the filters are bundled as an OR operation. + * @type {Array} + * @memberof WebhookSubscriptionFiltersCast + */ + 'exclude_author_fids'?: Array; + /** + * + * @type {Array} + * @memberof WebhookSubscriptionFiltersCast + */ + 'author_fids'?: Array; + /** + * + * @type {Array} + * @memberof WebhookSubscriptionFiltersCast + */ + 'mentioned_fids'?: Array; + /** + * + * @type {Array} + * @memberof WebhookSubscriptionFiltersCast + */ + 'parent_urls'?: Array; + /** + * + * @type {Array} + * @memberof WebhookSubscriptionFiltersCast + */ + 'root_parent_urls'?: Array; + /** + * + * @type {Array} + * @memberof WebhookSubscriptionFiltersCast + */ + 'parent_hashes'?: Array; + /** + * + * @type {Array} + * @memberof WebhookSubscriptionFiltersCast + */ + 'parent_author_fids'?: Array; + /** + * Regex pattern to match the text key of the cast. **Note:** 1) Regex must be parsed by Go\'s RE2 engine (Test your expression here: https://www.lddgo.net/en/string/golangregex) 2) Use backslashes to escape special characters. For example: (?i)\\\\$degen should be written as (?i)\\\\\\\\$degen + * @type {string} + * @memberof WebhookSubscriptionFiltersCast + */ + 'text'?: string; + /** + * Regex pattern to match the embeded_url (key embeds) of the cast. **Note:** 1) Regex must be parsed by Go\'s RE2 engine (Test your expression here: https://www.lddgo.net/en/string/golangregex) 2) Use backslashes to escape special characters. For example: \\\\b(farcaster|neynar)\\\\b should be written as \\\\\\\\b(farcaster|neynar)\\\\\\\\b + * @type {string} + * @memberof WebhookSubscriptionFiltersCast + */ + 'embeds'?: string; +} + diff --git a/src/neynar-api/v2/openapi-farcaster/models/webhook-subscription-filters-follow.ts b/src/neynar-api/v2/openapi-farcaster/models/webhook-subscription-filters-follow.ts new file mode 100644 index 00000000..0dc73fe7 --- /dev/null +++ b/src/neynar-api/v2/openapi-farcaster/models/webhook-subscription-filters-follow.ts @@ -0,0 +1,36 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Farcaster API V2 + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + + +/** + * + * @export + * @interface WebhookSubscriptionFiltersFollow + */ +export interface WebhookSubscriptionFiltersFollow { + /** + * + * @type {Array} + * @memberof WebhookSubscriptionFiltersFollow + */ + 'fids'?: Array; + /** + * + * @type {Array} + * @memberof WebhookSubscriptionFiltersFollow + */ + 'target_fids'?: Array; +} + diff --git a/src/neynar-api/v2/openapi-farcaster/models/webhook-subscription-filters-reaction.ts b/src/neynar-api/v2/openapi-farcaster/models/webhook-subscription-filters-reaction.ts new file mode 100644 index 00000000..5b0381e1 --- /dev/null +++ b/src/neynar-api/v2/openapi-farcaster/models/webhook-subscription-filters-reaction.ts @@ -0,0 +1,36 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Farcaster API V2 + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + + +/** + * + * @export + * @interface WebhookSubscriptionFiltersReaction + */ +export interface WebhookSubscriptionFiltersReaction { + /** + * + * @type {Array} + * @memberof WebhookSubscriptionFiltersReaction + */ + 'fids'?: Array; + /** + * + * @type {Array} + * @memberof WebhookSubscriptionFiltersReaction + */ + 'target_fids'?: Array; +} + diff --git a/src/neynar-api/v2/openapi-farcaster/models/webhook-subscription-filters-user-updated.ts b/src/neynar-api/v2/openapi-farcaster/models/webhook-subscription-filters-user-updated.ts new file mode 100644 index 00000000..46d20cd3 --- /dev/null +++ b/src/neynar-api/v2/openapi-farcaster/models/webhook-subscription-filters-user-updated.ts @@ -0,0 +1,30 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Farcaster API V2 + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + + +/** + * + * @export + * @interface WebhookSubscriptionFiltersUserUpdated + */ +export interface WebhookSubscriptionFiltersUserUpdated { + /** + * + * @type {Array} + * @memberof WebhookSubscriptionFiltersUserUpdated + */ + 'fids'?: Array; +} + diff --git a/src/neynar-api/v2/openapi-farcaster/models/webhook-subscription-filters.ts b/src/neynar-api/v2/openapi-farcaster/models/webhook-subscription-filters.ts new file mode 100644 index 00000000..e6798950 --- /dev/null +++ b/src/neynar-api/v2/openapi-farcaster/models/webhook-subscription-filters.ts @@ -0,0 +1,84 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Farcaster API V2 + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +// May contain unused imports in some cases +// @ts-ignore +import type { WebhookSubscriptionFiltersCast } from './webhook-subscription-filters-cast'; +// May contain unused imports in some cases +// @ts-ignore +import type { WebhookSubscriptionFiltersFollow } from './webhook-subscription-filters-follow'; +// May contain unused imports in some cases +// @ts-ignore +import type { WebhookSubscriptionFiltersReaction } from './webhook-subscription-filters-reaction'; +// May contain unused imports in some cases +// @ts-ignore +import type { WebhookSubscriptionFiltersUserUpdated } from './webhook-subscription-filters-user-updated'; + +/** + * + * @export + * @interface WebhookSubscriptionFilters + */ +export interface WebhookSubscriptionFilters { + /** + * + * @type {WebhookSubscriptionFiltersCast} + * @memberof WebhookSubscriptionFilters + */ + 'cast.created'?: WebhookSubscriptionFiltersCast; + /** + * + * @type {WebhookSubscriptionFiltersCast} + * @memberof WebhookSubscriptionFilters + */ + 'cast.deleted'?: WebhookSubscriptionFiltersCast; + /** + * + * @type {object} + * @memberof WebhookSubscriptionFilters + */ + 'user.created'?: object; + /** + * + * @type {WebhookSubscriptionFiltersUserUpdated} + * @memberof WebhookSubscriptionFilters + */ + 'user.updated'?: WebhookSubscriptionFiltersUserUpdated; + /** + * + * @type {WebhookSubscriptionFiltersFollow} + * @memberof WebhookSubscriptionFilters + */ + 'follow.created'?: WebhookSubscriptionFiltersFollow; + /** + * + * @type {WebhookSubscriptionFiltersFollow} + * @memberof WebhookSubscriptionFilters + */ + 'follow.deleted'?: WebhookSubscriptionFiltersFollow; + /** + * + * @type {WebhookSubscriptionFiltersReaction} + * @memberof WebhookSubscriptionFilters + */ + 'reaction.created'?: WebhookSubscriptionFiltersReaction; + /** + * + * @type {WebhookSubscriptionFiltersReaction} + * @memberof WebhookSubscriptionFilters + */ + 'reaction.deleted'?: WebhookSubscriptionFiltersReaction; +} + diff --git a/src/neynar-api/v2/openapi-farcaster/models/webhook-subscription.ts b/src/neynar-api/v2/openapi-farcaster/models/webhook-subscription.ts new file mode 100644 index 00000000..1b47ebe9 --- /dev/null +++ b/src/neynar-api/v2/openapi-farcaster/models/webhook-subscription.ts @@ -0,0 +1,64 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Farcaster API V2 + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +// May contain unused imports in some cases +// @ts-ignore +import type { WebhookSubscriptionFilters } from './webhook-subscription-filters'; + +/** + * + * @export + * @interface WebhookSubscription + */ +export interface WebhookSubscription { + /** + * + * @type {string} + * @memberof WebhookSubscription + */ + 'object': WebhookSubscriptionObjectEnum; + /** + * + * @type {string} + * @memberof WebhookSubscription + */ + 'subscription_id': string; + /** + * + * @type {WebhookSubscriptionFilters} + * @memberof WebhookSubscription + */ + 'filters': WebhookSubscriptionFilters; + /** + * + * @type {string} + * @memberof WebhookSubscription + */ + 'created_at': string; + /** + * + * @type {string} + * @memberof WebhookSubscription + */ + 'updated_at': string; +} + +export const WebhookSubscriptionObjectEnum = { + WebhookSubscription: 'webhook_subscription' +} as const; + +export type WebhookSubscriptionObjectEnum = typeof WebhookSubscriptionObjectEnum[keyof typeof WebhookSubscriptionObjectEnum]; + + diff --git a/src/neynar-api/v2/openapi-farcaster/models/webhook.ts b/src/neynar-api/v2/openapi-farcaster/models/webhook.ts new file mode 100644 index 00000000..8d6d8c42 --- /dev/null +++ b/src/neynar-api/v2/openapi-farcaster/models/webhook.ts @@ -0,0 +1,127 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Farcaster API V2 + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +// May contain unused imports in some cases +// @ts-ignore +import type { WebhookSecret } from './webhook-secret'; +// May contain unused imports in some cases +// @ts-ignore +import type { WebhookSubscription } from './webhook-subscription'; + +/** + * + * @export + * @interface Webhook + */ +export interface Webhook { + /** + * + * @type {string} + * @memberof Webhook + */ + 'object': WebhookObjectEnum; + /** + * + * @type {string} + * @memberof Webhook + */ + 'webhook_id': string; + /** + * + * @type {string} + * @memberof Webhook + */ + 'developer_uuid': string; + /** + * + * @type {string} + * @memberof Webhook + */ + 'target_url': string; + /** + * + * @type {string} + * @memberof Webhook + */ + 'title': string; + /** + * + * @type {Array} + * @memberof Webhook + */ + 'secrets': Array; + /** + * + * @type {string} + * @memberof Webhook + */ + 'description': string; + /** + * + * @type {string} + * @memberof Webhook + */ + 'http_timeout': string; + /** + * + * @type {number} + * @memberof Webhook + */ + 'rate_limit': number; + /** + * + * @type {boolean} + * @memberof Webhook + */ + 'active': boolean; + /** + * + * @type {string} + * @memberof Webhook + */ + 'rate_limit_duration': string; + /** + * + * @type {string} + * @memberof Webhook + */ + 'created_at': string; + /** + * + * @type {string} + * @memberof Webhook + */ + 'updated_at': string; + /** + * + * @type {string} + * @memberof Webhook + */ + 'deleted_at': string; + /** + * + * @type {WebhookSubscription} + * @memberof Webhook + */ + 'subscription'?: WebhookSubscription; +} + +export const WebhookObjectEnum = { + Webhook: 'webhook' +} as const; + +export type WebhookObjectEnum = typeof WebhookObjectEnum[keyof typeof WebhookObjectEnum]; + + diff --git a/src/neynar-api/v2/openapi-farcaster/models/zod-error-errors-inner.ts b/src/neynar-api/v2/openapi-farcaster/models/zod-error-errors-inner.ts new file mode 100644 index 00000000..99d90a89 --- /dev/null +++ b/src/neynar-api/v2/openapi-farcaster/models/zod-error-errors-inner.ts @@ -0,0 +1,54 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Farcaster API V2 + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + + +/** + * + * @export + * @interface ZodErrorErrorsInner + */ +export interface ZodErrorErrorsInner { + /** + * + * @type {string} + * @memberof ZodErrorErrorsInner + */ + 'code': string; + /** + * + * @type {string} + * @memberof ZodErrorErrorsInner + */ + 'expected': string; + /** + * + * @type {string} + * @memberof ZodErrorErrorsInner + */ + 'received': string; + /** + * + * @type {Array} + * @memberof ZodErrorErrorsInner + */ + 'path': Array; + /** + * + * @type {string} + * @memberof ZodErrorErrorsInner + */ + 'message': string; +} + diff --git a/src/neynar-api/v2/openapi-farcaster/models/zod-error.ts b/src/neynar-api/v2/openapi-farcaster/models/zod-error.ts new file mode 100644 index 00000000..495d7869 --- /dev/null +++ b/src/neynar-api/v2/openapi-farcaster/models/zod-error.ts @@ -0,0 +1,45 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Farcaster API V2 + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +// May contain unused imports in some cases +// @ts-ignore +import type { ZodErrorErrorsInner } from './zod-error-errors-inner'; + +/** + * + * @export + * @interface ZodError + */ +export interface ZodError { + /** + * + * @type {string} + * @memberof ZodError + */ + 'message': string; + /** + * + * @type {string} + * @memberof ZodError + */ + 'code': string; + /** + * + * @type {Array} + * @memberof ZodError + */ + 'errors': Array; +} + diff --git a/src/neynar-api/v2/openapi-stp/.openapi-generator/FILES b/src/neynar-api/v2/openapi-stp/.openapi-generator/FILES index 16b445ee..ff2fd4b8 100644 --- a/src/neynar-api/v2/openapi-stp/.openapi-generator/FILES +++ b/src/neynar-api/v2/openapi-stp/.openapi-generator/FILES @@ -2,8 +2,15 @@ .npmignore .openapi-generator-ignore api.ts +apis/stpapi.ts base.ts common.ts configuration.ts git_push.sh index.ts +models/conflict-error-res.ts +models/error-res.ts +models/index.ts +models/subscription-status.ts +models/subscription-tier-price.ts +models/subscription-tier.ts diff --git a/src/neynar-api/v2/openapi-stp/api.ts b/src/neynar-api/v2/openapi-stp/api.ts index 54d3f191..9f62eb40 100644 --- a/src/neynar-api/v2/openapi-stp/api.ts +++ b/src/neynar-api/v2/openapi-stp/api.ts @@ -13,298 +13,6 @@ */ -import type { Configuration } from './configuration'; -import type { AxiosPromise, AxiosInstance, RawAxiosRequestConfig } from 'axios'; -import globalAxios from 'axios'; -// Some imports not used depending on template conditions -// @ts-ignore -import { DUMMY_BASE_URL, assertParamExists, setApiKeyToObject, setBasicAuthToObject, setBearerAuthToObject, setOAuthToObject, setSearchParams, serializeDataIfNeeded, toPathString, createRequestFunction } from './common'; -import type { RequestArgs } from './base'; -// @ts-ignore -import { BASE_PATH, COLLECTION_FORMATS, BaseAPI, RequiredError, operationServerMap } from './base'; - -/** - * Details for the conflict error response - * @export - * @interface ConflictErrorRes - */ -export interface ConflictErrorRes { - /** - * - * @type {string} - * @memberof ConflictErrorRes - */ - 'code'?: string; - /** - * - * @type {string} - * @memberof ConflictErrorRes - */ - 'message': string; - /** - * - * @type {string} - * @memberof ConflictErrorRes - */ - 'property'?: string; - /** - * - * @type {string} - * @memberof ConflictErrorRes - */ - 'key'?: string; -} -/** - * Details for the error response - * @export - * @interface ErrorRes - */ -export interface ErrorRes { - /** - * - * @type {string} - * @memberof ErrorRes - */ - 'code'?: string; - /** - * - * @type {string} - * @memberof ErrorRes - */ - 'message': string; - /** - * - * @type {string} - * @memberof ErrorRes - */ - 'property'?: string; - /** - * - * @type {number} - * @memberof ErrorRes - */ - 'status'?: number; -} -/** - * - * @export - * @interface SubscriptionStatus - */ -export interface SubscriptionStatus { - /** - * - * @type {string} - * @memberof SubscriptionStatus - */ - 'object': SubscriptionStatusObjectEnum; - /** - * - * @type {boolean} - * @memberof SubscriptionStatus - */ - 'status': boolean; - /** - * - * @type {number} - * @memberof SubscriptionStatus - */ - 'expires_at': number | null; - /** - * - * @type {number} - * @memberof SubscriptionStatus - */ - 'subscribed_at': number | null; - /** - * - * @type {SubscriptionTier} - * @memberof SubscriptionStatus - */ - 'tier': SubscriptionTier; -} - -export const SubscriptionStatusObjectEnum = { - SubscribedToDehydrated: 'subscribed_to_dehydrated' -} as const; - -export type SubscriptionStatusObjectEnum = typeof SubscriptionStatusObjectEnum[keyof typeof SubscriptionStatusObjectEnum]; - -/** - * - * @export - * @interface SubscriptionTier - */ -export interface SubscriptionTier { - /** - * - * @type {number} - * @memberof SubscriptionTier - */ - 'id'?: number; - /** - * - * @type {SubscriptionTierPrice} - * @memberof SubscriptionTier - */ - 'price'?: SubscriptionTierPrice; -} -/** - * - * @export - * @interface SubscriptionTierPrice - */ -export interface SubscriptionTierPrice { - /** - * - * @type {number} - * @memberof SubscriptionTierPrice - */ - 'period_duration_seconds'?: number; - /** - * - * @type {string} - * @memberof SubscriptionTierPrice - */ - 'tokens_per_period'?: string; - /** - * - * @type {string} - * @memberof SubscriptionTierPrice - */ - 'initial_mint_price'?: string; -} - -/** - * STPApi - axios parameter creator - * @export - */ -export const STPApiAxiosParamCreator = function (configuration?: Configuration) { - return { - /** - * Check if a wallet address is subscribed to a given STP contract. - * @summary Subscription check by wallet address - * @param {string} addresses Comma separated list of Ethereum addresses, up to 350 at a time - * @param {string} contractAddress Ethereum address of the STP contract - * @param {string} chainId Chain ID of the STP contract - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - subscriptionCheck: async (addresses: string, contractAddress: string, chainId: string, options: RawAxiosRequestConfig = {}): Promise => { - // verify required parameter 'addresses' is not null or undefined - assertParamExists('subscriptionCheck', 'addresses', addresses) - // verify required parameter 'contractAddress' is not null or undefined - assertParamExists('subscriptionCheck', 'contractAddress', contractAddress) - // verify required parameter 'chainId' is not null or undefined - assertParamExists('subscriptionCheck', 'chainId', chainId) - const localVarPath = `/stp/subscription_check`; - // use dummy base URL string because the URL constructor only accepts absolute URLs. - const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); - let baseOptions; - if (configuration) { - baseOptions = configuration.baseOptions; - } - - const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; - const localVarHeaderParameter = {} as any; - const localVarQueryParameter = {} as any; - - // authentication ApiKeyAuth required - await setApiKeyToObject(localVarHeaderParameter, "x-api-key", configuration) - - if (addresses !== undefined) { - localVarQueryParameter['addresses'] = addresses; - } - - if (contractAddress !== undefined) { - localVarQueryParameter['contract_address'] = contractAddress; - } - - if (chainId !== undefined) { - localVarQueryParameter['chain_id'] = chainId; - } - - - - setSearchParams(localVarUrlObj, localVarQueryParameter); - let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; - localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; - - return { - url: toPathString(localVarUrlObj), - options: localVarRequestOptions, - }; - }, - } -}; - -/** - * STPApi - functional programming interface - * @export - */ -export const STPApiFp = function(configuration?: Configuration) { - const localVarAxiosParamCreator = STPApiAxiosParamCreator(configuration) - return { - /** - * Check if a wallet address is subscribed to a given STP contract. - * @summary Subscription check by wallet address - * @param {string} addresses Comma separated list of Ethereum addresses, up to 350 at a time - * @param {string} contractAddress Ethereum address of the STP contract - * @param {string} chainId Chain ID of the STP contract - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - async subscriptionCheck(addresses: string, contractAddress: string, chainId: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<{ [key: string]: SubscriptionStatus; }>> { - const localVarAxiosArgs = await localVarAxiosParamCreator.subscriptionCheck(addresses, contractAddress, chainId, options); - const localVarOperationServerIndex = configuration?.serverIndex ?? 0; - const localVarOperationServerBasePath = operationServerMap['STPApi.subscriptionCheck']?.[localVarOperationServerIndex]?.url; - return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); - }, - } -}; - -/** - * STPApi - factory interface - * @export - */ -export const STPApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) { - const localVarFp = STPApiFp(configuration) - return { - /** - * Check if a wallet address is subscribed to a given STP contract. - * @summary Subscription check by wallet address - * @param {string} addresses Comma separated list of Ethereum addresses, up to 350 at a time - * @param {string} contractAddress Ethereum address of the STP contract - * @param {string} chainId Chain ID of the STP contract - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - subscriptionCheck(addresses: string, contractAddress: string, chainId: string, options?: RawAxiosRequestConfig): AxiosPromise<{ [key: string]: SubscriptionStatus; }> { - return localVarFp.subscriptionCheck(addresses, contractAddress, chainId, options).then((request) => request(axios, basePath)); - }, - }; -}; - -/** - * STPApi - object-oriented interface - * @export - * @class STPApi - * @extends {BaseAPI} - */ -export class STPApi extends BaseAPI { - /** - * Check if a wallet address is subscribed to a given STP contract. - * @summary Subscription check by wallet address - * @param {string} addresses Comma separated list of Ethereum addresses, up to 350 at a time - * @param {string} contractAddress Ethereum address of the STP contract - * @param {string} chainId Chain ID of the STP contract - * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof STPApi - */ - public subscriptionCheck(addresses: string, contractAddress: string, chainId: string, options?: RawAxiosRequestConfig) { - return STPApiFp(this.configuration).subscriptionCheck(addresses, contractAddress, chainId, options).then((request) => request(this.axios, this.basePath)); - } -} - +export * from './apis/stpapi'; diff --git a/src/neynar-api/v2/openapi-stp/apis/stpapi.ts b/src/neynar-api/v2/openapi-stp/apis/stpapi.ts new file mode 100644 index 00000000..de532e53 --- /dev/null +++ b/src/neynar-api/v2/openapi-stp/apis/stpapi.ts @@ -0,0 +1,159 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * STP API V2 + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +import type { Configuration } from '../configuration'; +import type { AxiosPromise, AxiosInstance, RawAxiosRequestConfig } from 'axios'; +import globalAxios from 'axios'; +// Some imports not used depending on template conditions +// @ts-ignore +import { DUMMY_BASE_URL, assertParamExists, setApiKeyToObject, setBasicAuthToObject, setBearerAuthToObject, setOAuthToObject, setSearchParams, serializeDataIfNeeded, toPathString, createRequestFunction } from '../common'; +// @ts-ignore +import { BASE_PATH, COLLECTION_FORMATS, type RequestArgs, BaseAPI, RequiredError, operationServerMap } from '../base'; +// @ts-ignore +import type { ErrorRes } from '../models'; +// @ts-ignore +import type { SubscriptionStatus } from '../models'; +/** + * STPApi - axios parameter creator + * @export + */ +export const STPApiAxiosParamCreator = function (configuration?: Configuration) { + return { + /** + * Check if a wallet address is subscribed to a given STP contract. + * @summary Subscription check by wallet address + * @param {string} addresses Comma separated list of Ethereum addresses, up to 350 at a time + * @param {string} contractAddress Ethereum address of the STP contract + * @param {string} chainId Chain ID of the STP contract + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + subscriptionCheck: async (addresses: string, contractAddress: string, chainId: string, options: RawAxiosRequestConfig = {}): Promise => { + // verify required parameter 'addresses' is not null or undefined + assertParamExists('subscriptionCheck', 'addresses', addresses) + // verify required parameter 'contractAddress' is not null or undefined + assertParamExists('subscriptionCheck', 'contractAddress', contractAddress) + // verify required parameter 'chainId' is not null or undefined + assertParamExists('subscriptionCheck', 'chainId', chainId) + const localVarPath = `/stp/subscription_check`; + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication ApiKeyAuth required + await setApiKeyToObject(localVarHeaderParameter, "x-api-key", configuration) + + if (addresses !== undefined) { + localVarQueryParameter['addresses'] = addresses; + } + + if (contractAddress !== undefined) { + localVarQueryParameter['contract_address'] = contractAddress; + } + + if (chainId !== undefined) { + localVarQueryParameter['chain_id'] = chainId; + } + + + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + } +}; + +/** + * STPApi - functional programming interface + * @export + */ +export const STPApiFp = function(configuration?: Configuration) { + const localVarAxiosParamCreator = STPApiAxiosParamCreator(configuration) + return { + /** + * Check if a wallet address is subscribed to a given STP contract. + * @summary Subscription check by wallet address + * @param {string} addresses Comma separated list of Ethereum addresses, up to 350 at a time + * @param {string} contractAddress Ethereum address of the STP contract + * @param {string} chainId Chain ID of the STP contract + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async subscriptionCheck(addresses: string, contractAddress: string, chainId: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<{ [key: string]: SubscriptionStatus; }>> { + const localVarAxiosArgs = await localVarAxiosParamCreator.subscriptionCheck(addresses, contractAddress, chainId, options); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = operationServerMap['STPApi.subscriptionCheck']?.[localVarOperationServerIndex]?.url; + return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); + }, + } +}; + +/** + * STPApi - factory interface + * @export + */ +export const STPApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) { + const localVarFp = STPApiFp(configuration) + return { + /** + * Check if a wallet address is subscribed to a given STP contract. + * @summary Subscription check by wallet address + * @param {string} addresses Comma separated list of Ethereum addresses, up to 350 at a time + * @param {string} contractAddress Ethereum address of the STP contract + * @param {string} chainId Chain ID of the STP contract + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + subscriptionCheck(addresses: string, contractAddress: string, chainId: string, options?: RawAxiosRequestConfig): AxiosPromise<{ [key: string]: SubscriptionStatus; }> { + return localVarFp.subscriptionCheck(addresses, contractAddress, chainId, options).then((request) => request(axios, basePath)); + }, + }; +}; + +/** + * STPApi - object-oriented interface + * @export + * @class STPApi + * @extends {BaseAPI} + */ +export class STPApi extends BaseAPI { + /** + * Check if a wallet address is subscribed to a given STP contract. + * @summary Subscription check by wallet address + * @param {string} addresses Comma separated list of Ethereum addresses, up to 350 at a time + * @param {string} contractAddress Ethereum address of the STP contract + * @param {string} chainId Chain ID of the STP contract + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof STPApi + */ + public subscriptionCheck(addresses: string, contractAddress: string, chainId: string, options?: RawAxiosRequestConfig) { + return STPApiFp(this.configuration).subscriptionCheck(addresses, contractAddress, chainId, options).then((request) => request(this.axios, this.basePath)); + } +} + diff --git a/src/neynar-api/v2/openapi-stp/index.ts b/src/neynar-api/v2/openapi-stp/index.ts index c82df7aa..32d2c14b 100644 --- a/src/neynar-api/v2/openapi-stp/index.ts +++ b/src/neynar-api/v2/openapi-stp/index.ts @@ -15,4 +15,4 @@ export * from "./api"; export * from "./configuration"; - +export * from "./models"; diff --git a/src/neynar-api/v2/openapi-stp/models/conflict-error-res.ts b/src/neynar-api/v2/openapi-stp/models/conflict-error-res.ts new file mode 100644 index 00000000..0dc0c28c --- /dev/null +++ b/src/neynar-api/v2/openapi-stp/models/conflict-error-res.ts @@ -0,0 +1,48 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * STP API V2 + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + + +/** + * Details for the conflict error response + * @export + * @interface ConflictErrorRes + */ +export interface ConflictErrorRes { + /** + * + * @type {string} + * @memberof ConflictErrorRes + */ + 'code'?: string; + /** + * + * @type {string} + * @memberof ConflictErrorRes + */ + 'message': string; + /** + * + * @type {string} + * @memberof ConflictErrorRes + */ + 'property'?: string; + /** + * + * @type {string} + * @memberof ConflictErrorRes + */ + 'key'?: string; +} + diff --git a/src/neynar-api/v2/openapi-stp/models/error-res.ts b/src/neynar-api/v2/openapi-stp/models/error-res.ts new file mode 100644 index 00000000..f4fbb7ad --- /dev/null +++ b/src/neynar-api/v2/openapi-stp/models/error-res.ts @@ -0,0 +1,48 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * STP API V2 + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + + +/** + * Details for the error response + * @export + * @interface ErrorRes + */ +export interface ErrorRes { + /** + * + * @type {string} + * @memberof ErrorRes + */ + 'code'?: string; + /** + * + * @type {string} + * @memberof ErrorRes + */ + 'message': string; + /** + * + * @type {string} + * @memberof ErrorRes + */ + 'property'?: string; + /** + * + * @type {number} + * @memberof ErrorRes + */ + 'status'?: number; +} + diff --git a/src/neynar-api/v2/openapi-stp/models/index.ts b/src/neynar-api/v2/openapi-stp/models/index.ts new file mode 100644 index 00000000..7828083b --- /dev/null +++ b/src/neynar-api/v2/openapi-stp/models/index.ts @@ -0,0 +1,5 @@ +export * from './conflict-error-res'; +export * from './error-res'; +export * from './subscription-status'; +export * from './subscription-tier'; +export * from './subscription-tier-price'; diff --git a/src/neynar-api/v2/openapi-stp/models/subscription-status.ts b/src/neynar-api/v2/openapi-stp/models/subscription-status.ts new file mode 100644 index 00000000..b1f35261 --- /dev/null +++ b/src/neynar-api/v2/openapi-stp/models/subscription-status.ts @@ -0,0 +1,64 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * STP API V2 + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +// May contain unused imports in some cases +// @ts-ignore +import type { SubscriptionTier } from './subscription-tier'; + +/** + * + * @export + * @interface SubscriptionStatus + */ +export interface SubscriptionStatus { + /** + * + * @type {string} + * @memberof SubscriptionStatus + */ + 'object': SubscriptionStatusObjectEnum; + /** + * + * @type {boolean} + * @memberof SubscriptionStatus + */ + 'status': boolean; + /** + * + * @type {number} + * @memberof SubscriptionStatus + */ + 'expires_at': number | null; + /** + * + * @type {number} + * @memberof SubscriptionStatus + */ + 'subscribed_at': number | null; + /** + * + * @type {SubscriptionTier} + * @memberof SubscriptionStatus + */ + 'tier': SubscriptionTier; +} + +export const SubscriptionStatusObjectEnum = { + SubscribedToDehydrated: 'subscribed_to_dehydrated' +} as const; + +export type SubscriptionStatusObjectEnum = typeof SubscriptionStatusObjectEnum[keyof typeof SubscriptionStatusObjectEnum]; + + diff --git a/src/neynar-api/v2/openapi-stp/models/subscription-tier-price.ts b/src/neynar-api/v2/openapi-stp/models/subscription-tier-price.ts new file mode 100644 index 00000000..1f87a465 --- /dev/null +++ b/src/neynar-api/v2/openapi-stp/models/subscription-tier-price.ts @@ -0,0 +1,42 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * STP API V2 + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + + +/** + * + * @export + * @interface SubscriptionTierPrice + */ +export interface SubscriptionTierPrice { + /** + * + * @type {number} + * @memberof SubscriptionTierPrice + */ + 'period_duration_seconds'?: number; + /** + * + * @type {string} + * @memberof SubscriptionTierPrice + */ + 'tokens_per_period'?: string; + /** + * + * @type {string} + * @memberof SubscriptionTierPrice + */ + 'initial_mint_price'?: string; +} + diff --git a/src/neynar-api/v2/openapi-stp/models/subscription-tier.ts b/src/neynar-api/v2/openapi-stp/models/subscription-tier.ts new file mode 100644 index 00000000..9f7c34c8 --- /dev/null +++ b/src/neynar-api/v2/openapi-stp/models/subscription-tier.ts @@ -0,0 +1,39 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * STP API V2 + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +// May contain unused imports in some cases +// @ts-ignore +import type { SubscriptionTierPrice } from './subscription-tier-price'; + +/** + * + * @export + * @interface SubscriptionTier + */ +export interface SubscriptionTier { + /** + * + * @type {number} + * @memberof SubscriptionTier + */ + 'id'?: number; + /** + * + * @type {SubscriptionTierPrice} + * @memberof SubscriptionTier + */ + 'price'?: SubscriptionTierPrice; +} + From 19940315c1a63b8a6dac4e8e34bb3e3e4c767013 Mon Sep 17 00:00:00 2001 From: Ty Book Date: Tue, 29 Oct 2024 23:37:32 -0400 Subject: [PATCH 3/3] latest OAS --- src/oas | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/oas b/src/oas index a1b7f019..bf66939f 160000 --- a/src/oas +++ b/src/oas @@ -1 +1 @@ -Subproject commit a1b7f0192792d85add65e3b464f75c5544965cbe +Subproject commit bf66939f3927dc5cfff2ba1b0432f2ae122e35b3