Type alias ReadRequest<Context, AuthContext>

ReadRequest<Context, AuthContext>: {
    authContext: AuthContext;
    context: Context;
    machineInstanceName: string;
    state: StateValue;
}

A request to read the state of a machine instance.

Use ReadRequest<Context, AuthContext> to specify the types of the context for your machine and the authContext you will provide.

Type Parameters

Type declaration

  • authContext: AuthContext

    The authorization context of the reader requesting access to the machine instance.

    The authorization context is the act claim of the JWT used to authenticate the reader (with the top-level sub claim used as a fallback if act did not provide a sub)

  • context: Context

    The context of the machine instance.

  • machineInstanceName: string

    The name of the machine instance to read.

    This is the name you provided when you created the machine instance.

  • state: StateValue

    The current state of the machine instance.

    If the machine is in a single top-level state, this is the name of that state. If the machine is in a nested state, this is an object with the name of the parent state as the key and the name of the child state as the value. If the machine is in a parallel state, there will be multiple keys and values.

    Identical to the state.value property of an XState state.

Generated using TypeDoc