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

    Interface ProcessCheckpointPart

    One piece of a platform's own process state that a checkpoint carries (the Android recovery tickets, the login home's issued state). The platform installs its parts in ProcessCheckpointRegistries; the checkpoint stores each part's value under its key and a restore hands it back. encode must produce JSON; a failure is a defect of the part.

    interface ProcessCheckpointPart {
        encode: () => Effect<Json>;
        initial?: Json;
        key: string;
        restore: (value: Json) => Effect<void, CheckpointDecodeError>;
        restoreOnReturnFromBackground?: (
            value: Json,
        ) => Effect<void, CheckpointDecodeError>;
    }
    Index

    Properties

    encode: () => Effect<Json>
    initial?: Json

    What a checkpoint of an older released format restores when it does not carry the part: the state a process of the build that wrote it held, where the fact the part carries did not exist yet. It is the truth about that process, never a guess about a value the older build stored — a part whose absence the older data cannot explain leaves this out, and such a checkpoint is refused. A checkpoint of the current format always carries every part and never uses it.

    key: string

    The key the part's value is stored under; unique among the layer's parts.

    restore: (value: Json) => Effect<void, CheckpointDecodeError>
    restoreOnReturnFromBackground?: (
        value: Json,
    ) => Effect<void, CheckpointDecodeError>

    What the part does instead of restore when the restore is the app returning from the background (restoreAsAppReturningFromBackgroundOf): the part knows what its state does when the app comes back after being away (the Android routing-map refresh, overdue while the app was away, is sent as APP_RESUME). A part without it restores the same way for every kind of restore.