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

    Variable EditProfileUsernameScreenConst

    EditProfileUsernameScreen: ScreenDefinition<
        "EditProfileUsername",
        "screen",
        { username: string },
        { check?: { available: boolean }; username: string },
        Record<never, never>,
        never,
        PlainJsonApiHttp | MobileNavigation | MobileUserFlows,
        {
            changeUsername: (
                self: ScreenHandle,
                state: State,
            ) => (
                ...args: [username: string],
            ) => Effect<
                UpdateProfileUsernameResponse & { raw: ActionRaw },

                    | IgApiError
                    | RequestError
                    | ParseError
                    | TransportError
                    | ScreenEnterConcurrentError,
                | PlainJsonApiHttp
                | Signature
                | MobileSession
                | MobileDevice
                | GraphqlJsonHttp
                | MobileApplication
                | PlainNdjsonApiHttp
                | MobileNavigation
                | ScreenStack,
            >;
            typeUsername: (
                self: ScreenHandle,
                state: State,
            ) => ScreenDataMember<
                ScreenDataShape,
                (
                    ...args: [username: string],
                ) => Effect<
                    ScreenHandle,
                    ScreenDataActionFailure<
                        IgApiError
                        | RequestError
                        | ParseError
                        | TransportError,
                    >,

                        | PlainJsonApiHttp
                        | Signature
                        | MobileSession
                        | MobileDevice
                        | MobileNavigation
                        | ScreenStack,
                >,
            >;
        },
        Record<never, never>,
        never,
        never,
    > = ...

    EditUsernameFragment, the username editor (profile_edit_username, Android 451), opened from the profile editor's Username row. The field shows the account's username; the app asks the server whether the typed name is free while the person types and sends the change on Done.

    Actions:

    • typeUsername(username) is one availability check (users/check_username/). It answers the editor's live handle over what the field now shows — the typed name and the server's check — so the caller continues from it (field = yield* field.typeUsername(name)), as with a search field's keystroke. The handle the action was called on keeps the snapshot the visit loaded.
    • changeUsername(username) sends the change (accounts/update_profile_username/, an unsigned form) and answers the updated user the server returns. The app shows neither a confirmation dialog nor a challenge for it; the profile editor's profile_edit_params carry the dialog's flags, which this screen does not act on.

    The change is not guarded by the check: the app sends the change whatever the last check said, and the server decides.

    How it is reached: EditProfileScreen.openUsername(), the EditUsernameFragment:profile_edit_username:6:button entry over the profile editor. Opening it sends nothing; the change sends the profile editor's reloads.

    No screenshot: the library renders no UI.

    Guide: Profiles