igpapi — Instagram private API Simulator for Node.js (API reference) 4.19.0
    Preparing search index...

    Function swipeableFeed

    • Makes a feed screen swipeable: one item in front (current), and a swipe (swipeToNext) that brings the next one, loading the next portion itself when the loaded items ran out. It takes a feed screen definition only — a plain screen is a type error — and returns one, so it composes with .pipe: defineFeedScreen({ … }).pipe(swipeableFeed({ onSwipe })).

      A swipe is a transition, like a scroll. Its item move, the app's onSwipe and the two items' visits are one step: the item in front leaves, the app sends what it sends on a swipe, the next item's enter runs — and only then does the frame move, so a failure leaves the item in front where it was. A trail keeps the item in front, and a retrace swipes to it again, sending what each swipe sends; a checkpoint keeps it too. A swipeable feed whose first answer holds no item has nothing in front; the first item that loads comes in front on the next swipe.

      Type Parameters

      Parameters

      Returns <
          Id extends
              | "LoginHomepage"
              | "LoginHomeCds"
              | "LandingScreen"
              | "LoginTwoFactorEntrypoint"
              | "LoginTwoFactorMethodPicker"
              | "LoginTwoFactorEnterTotpCode"
              | "AccountRecoverySearchCds"
              | "AccountRecoverySearch"
              | "AccountRecoveryAuthenticationConfirmation"
              | "AccountRecoveryEmailCode"
              | "RegistrationPhoneNumber"
              | "RegistrationConfirmationCode"
              | "RegistrationPassword"
              | "RegistrationBirthday"
              | "RegistrationName"
              | "RegistrationUsername"
              | "RegistrationTermsOfService"
              | "SaveCredentials"
              | "AccountRecoverySuccessLocationPermission"
              | "OnboardingProfileCard"
              | "OnboardingFindFacebookFriendsPrompt"
              | "OnboardingDiscoverPeople"
              | "OnboardingAddEmail"
              | "OnboardingReelsTuning"
              | "FeedTimeline"
              | "PostOpenedFromLink"
              | "ReelsViewer"
              | "MediaComments"
              | "RepostNoteEditor"
              | "Explore"
              | "SearchInput"
              | "SearchResultsTopTab"
              | "SearchResultsAccountsTab"
              | "UserProfile"
              | "ProfileMediaTab"
              | "MyProfile"
              | "MyProfileMediaTab"
              | "EditProfile"
              | "EditProfileBio"
              | "EditProfileUsername"
              | "EditProfileLinks"
              | "EditProfileAddLink"
              | "ProfilePostsFeed"
              | "FeedTimelineFollowing"
              | "UserProfileReelsTab"
              | "DirectInbox"
              | "DirectRecipientPicker"
              | "DirectThread"
              | "DirectForwardingSheet"
              | "DirectMediaPickerPhotos"
              | "DirectStickerTabTray"
              | "DirectGifTray"
              | "DirectStickerPickerGrid"
              | "DirectImagineLoading"
              | "DirectImagineCreation"
              | "DirectDoodleEditor"
              | "DirectCustomizeChat"
              | "DirectThreadThemePicker"
              | "DirectThreadDetails"
              | "DirectThreadSharedMedia"
              | "DirectThreadNicknames"
              | "DirectThreadNicknameChange"
              | "DirectGroupNameAndPhotoEditor"
              | "DirectShareSheet"
              | "StoriesViewer"
              | "PostingGalleryPicker"
              | "PostingPostEdit"
              | "PostingNewPost"
              | "PostingCamera"
              | "PostingCameraGallery"
              | "PostingReelEditor"
              | "PostingNewReel"
              | "PostingPostVideoCameraGallery"
              | "PostingPostVideoCamera"
              | "PostingReelCamera"
              | "PostingStoryCameraHost"
              | "PostingStoryCameraGallery"
              | "PostingPostVideoNewReel"
              | "PostingStoryPhotoEditor"
              | "PostingStoryVideoEditor"
              | "PostingStoryStickerTray"
              | "PostingStoryMusicStickerEditor"
              | "PostingStoryShareSheet"
              | "PostingStoryAlsoShareTo"
              | "PostingStoryDoneCamera"
              | "PostingStoryMusicSearchHost"
              | "PostingMusicBrowser"
              | "PostingMusicSearchResults"
              | "PostingReelMusicOverlayDetail"
              | "PostingReelMusicEditor"
              | "ChallengeSelectVerifyMethod"
              | "ChallengeVerifyCode"
              | "ChallengeSubmitPhone"
              | "ChallengeSetNewPassword"
              | "ChallengeAddBirthday"
              | "ChallengeLoginReview"
              | "ChallengeAccountTemporarilyLocked"
              | "ChallengeEscalationInformation"
              | "ChallengeReviewContactPointChange"
              | "ChallengeScrapingWarning"
              | "ChallengeWebRecaptcha"
              | "ChallengeWebSetNewPassword"
              | "ChallengeTextCaptcha"
              | "ChallengeRecaptcha"
              | "ChallengeSetContactPoint"
              | "ChallengeContactPointCode"
              | "ChallengeAuthenticityWizard"
              | "ChallengeAwaitingReview"
              | "ChallengeThanksForProvidingInfo"
              | "ChallengeAccountSuspended",
          Kind extends EnterableScreenKind,
          Input,
          Cursor,
          Data extends object,
          FE,
          FR,
          E,
          R,
          Actions extends object,
          Page,
          Host extends object = never,
          Opens extends
          
                  | "LoginHomepage"
                  | "LoginHomeCds"
                  | "LandingScreen"
                  | "LoginTwoFactorEntrypoint"
                  | "LoginTwoFactorMethodPicker"
                  | "LoginTwoFactorEnterTotpCode"
                  | "AccountRecoverySearchCds"
                  | "AccountRecoverySearch"
                  | "AccountRecoveryAuthenticationConfirmation"
                  | "AccountRecoveryEmailCode"
                  | "RegistrationPhoneNumber"
                  | "RegistrationConfirmationCode"
                  | "RegistrationPassword"
                  | "RegistrationBirthday"
                  | "RegistrationName"
                  | "RegistrationUsername"
                  | "RegistrationTermsOfService"
                  | "SaveCredentials"
                  | "AccountRecoverySuccessLocationPermission"
                  | "OnboardingProfileCard"
                  | "OnboardingFindFacebookFriendsPrompt"
                  | "OnboardingDiscoverPeople"
                  | "OnboardingAddEmail"
                  | "OnboardingReelsTuning"
                  | "FeedTimeline"
                  | "PostOpenedFromLink"
                  | "ReelsViewer"
                  | "MediaComments"
                  | "RepostNoteEditor"
                  | "Explore"
                  | "SearchInput"
                  | "SearchResultsTopTab"
                  | "SearchResultsAccountsTab"
                  | "UserProfile"
                  | "ProfileMediaTab"
                  | "MyProfile"
                  | "MyProfileMediaTab"
                  | "EditProfile"
                  | "EditProfileBio"
                  | "EditProfileUsername"
                  | "EditProfileLinks"
                  | "EditProfileAddLink"
                  | "ProfilePostsFeed"
                  | "FeedTimelineFollowing"
                  | "UserProfileReelsTab"
                  | "DirectInbox"
                  | "DirectRecipientPicker"
                  | "DirectThread"
                  | "DirectForwardingSheet"
                  | "DirectMediaPickerPhotos"
                  | "DirectStickerTabTray"
                  | "DirectGifTray"
                  | "DirectStickerPickerGrid"
                  | "DirectImagineLoading"
                  | "DirectImagineCreation"
                  | "DirectDoodleEditor"
                  | "DirectCustomizeChat"
                  | "DirectThreadThemePicker"
                  | "DirectThreadDetails"
                  | "DirectThreadSharedMedia"
                  | "DirectThreadNicknames"
                  | "DirectThreadNicknameChange"
                  | "DirectGroupNameAndPhotoEditor"
                  | "DirectShareSheet"
                  | "StoriesViewer"
                  | "PostingGalleryPicker"
                  | "PostingPostEdit"
                  | "PostingNewPost"
                  | "PostingCamera"
                  | "PostingCameraGallery"
                  | "PostingReelEditor"
                  | "PostingNewReel"
                  | "PostingPostVideoCameraGallery"
                  | "PostingPostVideoCamera"
                  | "PostingReelCamera"
                  | "PostingStoryCameraHost"
                  | "PostingStoryCameraGallery"
                  | "PostingPostVideoNewReel"
                  | "PostingStoryPhotoEditor"
                  | "PostingStoryVideoEditor"
                  | "PostingStoryStickerTray"
                  | "PostingStoryMusicStickerEditor"
                  | "PostingStoryShareSheet"
                  | "PostingStoryAlsoShareTo"
                  | "PostingStoryDoneCamera"
                  | "PostingStoryMusicSearchHost"
                  | "PostingMusicBrowser"
                  | "PostingMusicSearchResults"
                  | "PostingReelMusicOverlayDetail"
                  | "PostingReelMusicEditor"
                  | "ChallengeSelectVerifyMethod"
                  | "ChallengeVerifyCode"
                  | "ChallengeSubmitPhone"
                  | "ChallengeSetNewPassword"
                  | "ChallengeAddBirthday"
                  | "ChallengeLoginReview"
                  | "ChallengeAccountTemporarilyLocked"
                  | "ChallengeEscalationInformation"
                  | "ChallengeReviewContactPointChange"
                  | "ChallengeScrapingWarning"
                  | "ChallengeWebRecaptcha"
                  | "ChallengeWebSetNewPassword"
                  | "ChallengeTextCaptcha"
                  | "ChallengeRecaptcha"
                  | "ChallengeSetContactPoint"
                  | "ChallengeContactPointCode"
                  | "ChallengeAuthenticityWizard"
                  | "ChallengeAwaitingReview"
                  | "ChallengeThanksForProvidingInfo"
                  | "ChallengeAccountSuspended" = never,
      >(
          feed: ScreenDefinition<
              Id,
              Kind,
              Input,
              Data,
              ScreenFeedState<Cursor, Host>,
              E,
              R,
              Actions & ScreenFeedMembers<Cursor, Page, FE, FR>,
              ScreenFeedItems<Page>,
              Opens,
              never,
          > & {
              "~feed": ScreenFeedMarker<
                  Id,
                  Kind,
                  Input,
                  Cursor,
                  Data,
                  FE,
                  FR,
                  E,
                  R,
                  Actions,
                  Page,
                  Host,
                  Opens,
              >;
              "~items"?: ScreenListItem<Page, ScreenHandle>;
          } & { "~items"?: Item },
      ) => SwipeableFeedScreen<
          Id,
          Kind,
          Input,
          Cursor,
          Data,
          FE,
          FR,
          E,
          R,
          Actions,
          Page,
          SE,
          SR,
          Host,
          Opens,
      >